:root {
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --panel: #ffffff;
  --soft: #f8fafc;
  --soft-teal: #eef8f7;
  --brand: #006c67;
  --brand-dark: #045a57;
  --brand-soft: #dff4f1;
  --accent: #f59e0b;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 16px 36px rgba(16, 24, 40, .07);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, .04);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f6f8fb;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.page {
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: 320px minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px 0 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.logo img {
  display: block;
  width: min(304px, 100%);
  height: auto;
}

.search-panel {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow-soft);
}

.search-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 0 10px 0 16px;
}

.search-icon {
  color: #475467;
  font-size: 1.35rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.search-panel input {
  border: 0;
  min-height: 44px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

textarea {
  min-height: 128px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 108, 103, .12);
}

.search-panel input:focus { box-shadow: none; }

button,
.button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 15px;
  background: var(--brand);
  color: #ffffff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

button:hover,
.button:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

.button.secondary,
button.secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover,
button.secondary:hover { background: var(--soft); }

.button.danger,
button.danger {
  background: var(--danger);
  color: #ffffff;
}

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.categories-panel,
.right-menu {
  position: static;
}

.panel-heading {
  padding: 16px 16px 8px;
  background: var(--panel);
  border-bottom: 0;
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .04em;
}

.nav-list,
.link-list,
.quick-list {
  list-style: none;
  padding: 10px 12px;
  margin: 0;
}

.nav-list a,
.quick-list a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #263445;
  font-weight: 700;
  line-height: 1.25;
}

.nav-list a.active,
.nav-list a:hover,
.quick-list a:hover {
  background: var(--soft-teal);
  color: var(--brand-dark);
  text-decoration: none;
}

.nav-list a.active {
  box-shadow: inset 4px 0 0 var(--brand);
}

.category-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 11px;
  background: var(--soft-teal);
  border: 1px solid #cfe8e4;
  color: var(--brand-dark);
}

.category-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-icon-ai,
.category-icon-space,
.category-icon-science {
  background: #eef4ff;
  border-color: #d7e4ff;
  color: #315a9f;
}

.category-icon-health {
  background: #fef0f5;
  border-color: #fad0df;
  color: #b4235a;
}

.category-icon-finance {
  background: #fff7e6;
  border-color: #f7dfaa;
  color: #9a5b00;
}

.category-icon-nature,
.category-icon-outdoor {
  background: #eef8ed;
  border-color: #d4ead0;
  color: #2f6f3e;
}

.category-icon-food,
.category-icon-culture,
.category-icon-entertainment {
  background: #fff4ec;
  border-color: #f5d8c3;
  color: #9c4d13;
}

.category-icon-business {
  background: #eef7ff;
  border-color: #cfe6fb;
  color: #155e75;
}

.category-icon-innovation {
  background: #fff8db;
  border-color: #f1dda2;
  color: #8a5a00;
}

.content {
  padding: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .92rem;
}

.breadcrumb a {
  color: #475467;
  font-weight: 650;
}

.mobile-category-link { display: none; }

.content h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 850;
}

.content h2 {
  margin: 24px 0 12px;
  font-size: 1.14rem;
  line-height: 1.25;
  font-weight: 850;
}

.content > p,
.text-page p {
  color: #475467;
  line-height: 1.68;
}

.home-hero {
  padding: 20px 22px;
  margin-bottom: 18px;
  border: 1px solid #d8e8e6;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(0, 108, 103, .08), rgba(255, 255, 255, 0) 48%),
    #ffffff;
  box-shadow: var(--shadow);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 9px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: .82rem;
  font-weight: 800;
}

.home-hero h1 {
  max-width: 720px;
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.08;
}

.home-hero p {
  max-width: 820px;
  margin: 0;
  color: #475467;
  font-size: 1.02rem;
  line-height: 1.68;
}

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.trust-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  font-size: .84rem;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.home-section { margin-top: 22px; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.feature-card {
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.feature-card:hover,
.category-card:hover,
.link-card:hover {
  border-color: #b8d5d2;
  box-shadow: 0 14px 28px rgba(16, 24, 40, .08);
  text-decoration: none;
  transform: translateY(-1px);
}

.feature-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.feature-card span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.split-section > div {
  min-width: 0;
}

.split-section .section-title {
  display: block;
}

.split-section .section-title h2 {
  margin-bottom: 4px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.category-card,
.link-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  background: #ffffff;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.category-card {
  min-height: 92px;
}

.category-card a,
.link-card a {
  font-weight: 800;
  color: var(--ink);
}

.link-title-row {
  display: inline;
  max-width: 100%;
}

.link-title-row a {
  overflow-wrap: anywhere;
  word-break: normal;
}

.affiliate-info {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  margin-left: 7px;
  vertical-align: text-bottom;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.affiliate-info::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: 180px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #152033;
  color: #ffffff;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .18);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .14s ease, visibility .14s ease;
}

.affiliate-info:hover::after,
.affiliate-info:focus::after {
  opacity: 1;
  visibility: visible;
}

.category-card a:hover,
.link-card a:hover {
  color: var(--brand-dark);
}

.link-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 9px;
}

.latest-section .link-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.compact-link {
  padding: 12px;
}

.desc {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--soft-teal);
  color: var(--brand-dark);
  font-size: .9rem;
  font-weight: 850;
}

.editorial-note {
  padding: 18px;
  border: 1px solid #d8e8e6;
  border-left: 4px solid var(--brand);
  background: #fbfefd;
  border-radius: 14px;
}

.editorial-note h2 { margin-top: 0; }

.editorial-note p {
  margin-bottom: 0;
  color: #475467;
  line-height: 1.68;
}

.right-menu {
  padding-bottom: 10px;
}

.right-visibility {
  margin: 12px;
  padding: 16px;
  border: 1px solid #c5e3df;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(0, 108, 103, .12), rgba(255, 255, 255, .72) 66%),
    #edf8f6;
}

.right-visibility h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 850;
}

.right-visibility p {
  margin: 0 0 12px;
  color: #344054;
  font-size: .9rem;
  line-height: 1.5;
}

.right-visibility .button {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 12px;
}

.letters a {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #344054;
  font-weight: 800;
  font-size: .82rem;
}

.letters a:hover {
  background: var(--soft-teal);
  color: var(--brand-dark);
  text-decoration: none;
}

.admin-actions {
  display: inline-flex;
  position: relative;
  z-index: 3;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.admin-actions form { display: inline-flex; }

.icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 9px;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  box-shadow: none;
  line-height: 1;
  text-decoration: none;
}

.icon-button:hover {
  text-decoration: none;
}

.admin-note {
  border: 1px solid #f1d08a;
  border-left: 4px solid var(--accent);
  background: #fffbeb;
  color: #344054;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 12px;
}

.site-footer {
  margin: 26px 0 30px;
  padding: 18px 4px 0;
  text-align: left;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .92rem;
  line-height: 1.6;
}

.site-footer p {
  max-width: 920px;
  margin: 0 0 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.suggestion-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  background: #ffffff;
}

.suggestion-card h2 { margin-top: 0; }

.consent {
  position: fixed;
  inset: auto 12px 12px 12px;
  max-width: 760px;
  margin: 0 auto;
  background: #152033;
  color: #ffffff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
  z-index: 10;
}

.consent p { margin: 0 0 10px; }

.form-card {
  max-width: 760px;
  margin: 24px auto;
  padding: 18px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-help {
  margin: -4px 0 4px;
  color: var(--muted);
  font-size: .9rem;
}

.required-mark {
  color: var(--danger);
  font-weight: 900;
}

.form-message {
  margin: 16px 0;
  padding: 13px 14px;
  border-radius: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.form-message.success {
  border: 1px solid #b7dfc3;
  background: #ecfdf3;
  color: #067647;
}

.form-message.error {
  border: 1px solid #f3b8b3;
  background: #fff1f0;
  color: var(--danger);
}

.form-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: start;
}

.form-row label {
  padding-top: 9px;
  font-weight: 700;
  color: #344054;
}

.checkbox-label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  line-height: 1.45;
}

.checkbox-label input {
  width: auto;
  margin-top: 4px;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.details-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 7px 12px;
  padding: 12px;
  background: var(--soft);
  border-radius: 11px;
}

.details-list dt {
  font-weight: 800;
  color: #344054;
}

.details-list dd {
  margin: 0;
  color: #475467;
}

.registration-card { max-width: 860px; }

.lead {
  font-size: 1.04rem;
  line-height: 1.7;
  color: #475467;
}

.text-page h2 {
  margin: 26px 0 8px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.text-page h3 {
  margin: 18px 0 6px;
  font-size: 1rem;
  line-height: 1.35;
}

.text-page a:not(.button) {
  font-weight: 750;
}

@media (max-width: 1100px) {
  .page { width: min(100% - 28px, 1320px); }
  .layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .right-menu {
    grid-column: 1 / -1;
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .page { width: min(100% - 18px, 1320px); }
  .topbar,
  .layout {
    grid-template-columns: 1fr;
  }
  .topbar {
    gap: 12px;
    padding: 16px 0 12px;
  }
  .logo img { width: min(260px, 100%); }
  .search-row {
    grid-template-columns: auto 1fr;
  }
  .search-row button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .categories-panel,
  .right-menu {
    position: static;
  }
  .layout-detail .content { order: 1; }
  .layout-detail .categories-panel { order: 2; }
  .layout-detail .right-menu { order: 3; }
  .content { padding: 16px; }
  .breadcrumb { margin-bottom: 8px; }
  .mobile-category-link {
    display: inline-flex;
    margin: 0 0 14px;
    font-weight: 800;
  }
  .content h1 {
    font-size: 2rem;
  }
  .category-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .section-title { display: block; }
  .home-hero {
    padding: 18px;
    margin-bottom: 16px;
  }
  .link-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .form-row,
  .details-list {
    grid-template-columns: 1fr;
  }
  .form-row label { padding-top: 0; }
}
