:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #627083;
  --line: #dce2ea;
  --brand: #126c64;
  --brand-strong: #0d4e49;
  --accent: #cc5a2e;
  --soft: #e9f4f2;
  --warning: #f6efe6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--brand-strong);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(13, 78, 73, 0.18);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav a,
.filter-button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 11px;
  color: var(--muted);
  font: inherit;
  background: transparent;
  cursor: pointer;
}

.nav a.active,
.filter-button.active {
  color: var(--brand-strong);
  background: var(--soft);
  border-color: #c7e5df;
}

.language-menu {
  position: relative;
  border-left: 1px solid var(--line);
  padding-left: 12px;
  font-size: 0.92rem;
}

.language-menu summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--brand-strong);
  background: #fff;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu[open] summary {
  border-color: #c7e5df;
  background: var(--soft);
}

.language-globe {
  width: 17px;
  height: 17px;
}

.locale-badge {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 22px;
  border-radius: 6px;
  color: var(--brand-strong);
  background: var(--soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.language-chevron {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.language-menu[open] .language-chevron {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 170px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(23, 32, 42, 0.14);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 6px;
  padding: 8px;
  color: var(--ink);
  font-weight: 700;
}

.language-option:hover,
.language-option.active {
  color: var(--brand-strong);
  background: var(--soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--brand-strong);
  font-weight: 700;
}

main {
  min-height: 70vh;
}

.hero,
.detail-hero,
.page-title,
.band,
.article,
.content-grid {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: stretch;
  padding: 72px 0 48px;
}

.hero-copy {
  padding: 8px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2.3rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  line-height: 1.2;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.hero p,
.page-title p,
.section-head p,
.article .lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 9px 14px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.button:hover {
  color: #fff;
  background: var(--brand-strong);
}

.button.secondary {
  color: var(--brand-strong);
  background: #fff;
}

.button.secondary:hover {
  color: var(--brand-strong);
  background: var(--soft);
}

.text-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
}

.text-action:hover,
.text-action.active {
  border-color: #c7e5df;
  color: var(--brand-strong);
  background: var(--soft);
}

.hero-panel,
.summary-panel,
.checklist {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.hero-panel {
  display: grid;
  align-content: center;
}

.demo-panel {
  align-content: start;
  gap: 18px;
  padding: 20px;
  box-shadow: 0 18px 48px rgba(23, 32, 42, 0.08);
}

.demo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.demo-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.demo-head .eyebrow {
  margin-bottom: 6px;
}

.demo-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: #7b341d;
  background: #ffe8db;
  font-size: 0.75rem;
  font-weight: 850;
}

.demo-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f5;
}

.demo-meter span {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #2d6cdf 58%, var(--accent));
}

.demo-picks {
  display: grid;
  gap: 10px;
}

.demo-picks a,
.demo-checks div,
.hero-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.demo-picks a {
  display: grid;
  gap: 4px;
  padding: 11px;
}

.demo-picks strong {
  color: var(--ink);
}

.demo-picks small,
.demo-note,
.hero-metrics span {
  color: var(--muted);
}

.demo-checks {
  display: grid;
  gap: 8px;
  margin: 0;
}

.demo-checks div {
  padding: 10px 11px;
}

.demo-note {
  margin: 0;
  font-size: 0.92rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-metrics div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.hero-metrics strong {
  color: var(--brand-strong);
  font-size: 1.9rem;
  line-height: 1;
}

.stat {
  margin: 0;
  color: var(--brand-strong);
  font-size: 3rem;
  font-weight: 850;
  line-height: 1;
}

.band {
  padding: 40px 0;
}

.decision-band {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 16px 0 36px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.decision-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.decision-card h3 {
  margin-bottom: 10px;
}

.decision-card p {
  margin: 0;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.category-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

main > .tool-grid {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.category-tile,
.tool-card,
.article-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 18px;
}

.category-tile span {
  font-size: 1.1rem;
  font-weight: 800;
}

.category-tile small,
.article-row small {
  color: var(--muted);
  font-size: 0.9rem;
}

.tool-card {
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  gap: 14px;
  min-height: 330px;
  padding: 18px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
}

.mini-list,
.summary-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.mini-list div,
.summary-panel div {
  display: grid;
  gap: 3px;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--brand-strong);
  background: var(--soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.page-title {
  padding: 56px 0 24px;
}

.toolbar {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-shell {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto 64px;
}

.directory-shell .toolbar,
.directory-shell .tool-grid {
  width: 100%;
}

.directory-shell .toolbar {
  margin: 0 0 14px;
}

.directory-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.search-field,
.sort-field {
  display: grid;
  gap: 6px;
}

.search-field span,
.sort-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input,
.sort-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.search-field input:focus,
.sort-field select:focus {
  outline: 3px solid #c7e5df;
  border-color: var(--brand);
}

.flag-filters {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flag-filters label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--muted);
  background: #fff;
  font-size: 0.92rem;
  font-weight: 650;
}

.flag-filters input {
  accent-color: var(--brand);
}

.clear-filter {
  justify-self: end;
}

.result-summary {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 56px 0 28px;
}

.detail-hero h1,
.page-title h1,
.article h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 24px 0 56px;
}

.prose,
.article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.prose.narrow {
  width: min(820px, calc(100% - 36px));
  margin: 0 auto 56px;
}

.disclosure-block {
  margin: 18px 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--soft);
}

.disclosure-block strong {
  display: block;
  margin-bottom: 4px;
}

.disclosure-block p {
  margin: 0;
  color: var(--muted);
}

.prose h2,
.article h2,
.checklist h2 {
  margin-top: 28px;
}

.prose h2:first-child,
.article h2:first-child,
.checklist h2:first-child {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-wrap.compact table {
  min-width: 900px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.article {
  margin-top: 48px;
  margin-bottom: 56px;
}

.article-list {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto 56px;
  display: grid;
  gap: 10px;
}

.article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.article-row span {
  font-weight: 800;
}

.review-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.guide-grid,
.review-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.review-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0;
}

.review-summary-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.review-meta div,
.verdict-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.verdict-box {
  margin: 20px 0;
  background: var(--warning);
}

.verdict-box h2 {
  margin-top: 0;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  margin: 18px 0 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.compare-panel {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 32px rgba(23, 32, 42, 0.08);
  backdrop-filter: blur(14px);
}

.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.compare-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.compare-head small,
.compare-panel > div:last-child {
  color: var(--muted);
}

.admin-shell {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto 64px;
}

.admin-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--brand-strong);
  background: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.admin-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-fields input,
.admin-fields textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
}

.admin-fields textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-fields input:focus,
.admin-fields textarea:focus {
  outline: 3px solid #c7e5df;
  border-color: var(--brand);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px clamp(18px, 4vw, 56px);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 4px 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .hero,
  .detail-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .tool-grid,
  .decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    display: block;
  }

  .directory-controls {
    grid-template-columns: 1fr;
  }

  .clear-filter {
    justify-self: start;
  }

  .review-meta,
  .guide-grid,
  .review-summary-grid,
  .admin-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .language-menu {
    border-left: 0;
    padding-left: 0;
  }

  .language-options {
    right: auto;
    left: 0;
  }

  .category-grid,
  .tool-grid,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .article-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-shell,
  .toolbar {
    width: min(100% - 28px, 1160px);
  }

  .directory-controls {
    padding: 12px;
  }

  .flag-filters label,
  .filter-button {
    width: 100%;
    justify-content: center;
  }

  .compare-panel {
    margin-left: -14px;
    margin-right: -14px;
    border-right: 0;
    border-left: 0;
  }

  .admin-card-head {
    display: grid;
  }

  .admin-actions .button {
    width: 100%;
  }
}
