/* Shared public navigation and editorial theme. */
/* ToolAccess.io landing — design tokens shared with the member application. */

:root {
  color-scheme: light;

  --bg: #fbfbfd;
  --surface: #fff;
  --surface-2: #f4f4f8;
  --surface-3: #ecebf2;

  --text: #17161f;
  --text-muted: #61606d;
  --text-subtle: #8b8a97;

  --border: #e6e5ee;
  --border-strong: #d3d2df;

  --accent: #5a4ad4;
  --accent-hover: #4b3cc2;
  --accent-soft: #f0edff;
  --accent-contrast: #fff;

  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;

  --shadow-sm: 0 1px 2px rgb(20 18 40 / 5%);
  --shadow-lg: 0 12px 48px rgb(20 18 40 / 16%);

  --transition: 140ms ease;
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --bg: #0c0c10;
  --surface: #141419;
  --surface-2: #1b1b22;
  --surface-3: #23232c;

  --text: #f1f1f5;
  --text-muted: #a1a0ad;
  --text-subtle: #77768a;

  --border: #262630;
  --border-strong: #33333f;

  --accent: #9384ff;
  --accent-hover: #a79aff;
  --accent-soft: #1f1c39;
  --accent-contrast: #14121f;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-lg: 0 12px 48px rgb(0 0 0 / 56%);
}

:is(.site-header, .site-footer) .btn {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition);
}

:is(.site-header, .site-footer) .btn:hover {
  border-color: var(--text-subtle);
  background: var(--surface-2);
}

:is(.site-header, .site-footer) .btn-primary {
  border-color: transparent;
  color: var(--accent-contrast);
  background: var(--accent);
}

:is(.site-header, .site-footer) .btn-primary:hover {
  border-color: transparent;
  background: var(--accent-hover);
}

:is(.site-header, .site-footer) .btn-lg {
  padding: 0.65rem 1.2rem;
  font-size: 0.875rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.header-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  height: 3.75rem;
}

.brand {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 660;
  letter-spacing: -0.025em;
}

.brand-mark {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 0.55rem;
  color: var(--accent-contrast);
  background: var(--accent);
}

.brand-mark svg {
  width: 1.05rem;
  height: 1.05rem;
}

.brand-word > span {
  color: var(--text-subtle);
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-right: auto;
  margin-left: 1rem;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 520;
  transition: color var(--transition);
}

.site-nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── Preferences ────────────────────────────────────────────── */

.preferences {
  position: relative;
}

.pref-trigger {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.pref-trigger:hover {
  color: var(--text);
  background: var(--surface-2);
}

.pref-trigger svg {
  width: 1rem;
  height: 1rem;
}

.pref-popover {
  position: absolute;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 0.35rem;
  width: 13.5rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  margin-top: 0.4rem;
}

.pref-group {
  padding: 0 0.25rem;
  color: var(--text-subtle);
  font-size: 0.6875rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.segmented + .pref-group {
  margin-top: 0.5rem;
}

.segmented {
  display: grid;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  grid-template-columns: repeat(3, 1fr);
}

.segmented button {
  padding: 0.4rem 0.2rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 0.15rem);
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 560;
  cursor: pointer;
}

.segmented button.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.option-list {
  display: grid;
  gap: 0.1rem;
}

.option-list button {
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
}

.option-list button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.option-list button.active {
  color: var(--accent);
  font-weight: 560;
}

.site-footer {
  padding: clamp(2.75rem, 6vw, 4rem) 0 1.5rem;
  color: #f5f4fa;
  background: #09080f;
}

.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(16rem, 1.7fr) repeat(4, minmax(7rem, 1fr));
}

.footer-brand {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.footer-brand .brand-word > span {
  color: #888694;
}

.footer-brand > p {
  max-width: 32rem;
  color: #9694a2;
  font-size: 0.8125rem;
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
}

.footer-socials a {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #292733;
  border-radius: 0.5rem;
  color: #aaa8b5;
  background: #121119;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.footer-socials a:hover {
  border-color: #494653;
  color: #fff;
  background: #1a1822;
}

.footer-socials svg {
  width: 1rem;
  height: 1rem;
}

.footer-column h2 {
  color: #f5f4fa;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column ul {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.footer-column a {
  color: #9694a2;
  font-size: 0.75rem;
  transition: color var(--transition);
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  display: grid;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #24222d;
  color: #777582;
  font-size: 0.6875rem;
  grid-template-columns: 1fr minmax(18rem, 1fr);
  margin-top: 2.75rem;
}

.footer-bottom p:last-child {
  max-width: 42rem;
}

@media (max-width: 46rem) {
  .site-nav {
    display: none;
  }

  .header-row {
    justify-content: space-between;
  }

  .header-actions .btn:not(.btn-primary) {
    display: none;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 46.01rem) and (max-width: 64rem) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}


[hidden] { display: none !important; }
:is(.site-header, .site-footer), :is(.site-header, .site-footer) * { box-sizing: border-box; }
:is(.site-header, .site-footer) {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
}
:is(.site-header, .site-footer) a { text-decoration: none; }
:is(.site-header, .site-footer) p { margin: 0; }
:is(.site-header, .site-footer) .container {
  width: min(100%, 68rem); max-width: 68rem; margin: 0 auto; padding-inline: clamp(1.25rem, 4vw, 2rem);
}
.site-header { color: var(--text); }
.site-header .brand { color: var(--text); flex-shrink: 0; }
.site-footer .brand { color: #f5f4fa; }
.site-header .site-nav a[aria-current] { color: var(--accent); }
.site-header :is(a, button):focus-visible, .site-footer a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
.shell-menu-toggle { display: none; border: 1px solid var(--border); border-radius: .5rem; padding: .5rem; background: var(--surface); color: var(--text); cursor: pointer; }
.shell-mobile-menu { display: none; }
.public-page {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  --color-brand-50: var(--accent-soft); --color-brand-100: var(--accent-soft);
  --color-brand-600: var(--accent); --color-brand-700: var(--accent-hover);
}
.public-page .container-site { width: min(100%, 68rem); max-width: 68rem; padding-inline: clamp(1.25rem, 4vw, 2rem); margin-inline: auto; }
.public-page main :is(h1, h2, h3, h4) { font-family: inherit; letter-spacing: -.025em; }
.public-page main > section:first-child { background: var(--surface-2); color: var(--text); border-bottom: 1px solid var(--border); }
.public-page main > section:first-child > .container-site { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.public-page main > section:first-child h1 { color: var(--text); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 650; line-height: 1.15; text-wrap: balance; }
.public-page main > section:first-child :is(p, nav) { color: var(--text-muted); }
.public-page .section-kicker { border-color: var(--border) !important; background: var(--surface) !important; color: var(--accent) !important; }
.public-page .card { border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.public-page a.card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.public-page .card :is(h2, h3) { color: var(--text); }
.public-page .card p { color: var(--text-muted); }
.public-page main :is(.text-slate-900, .text-slate-800) { color: var(--text); }
.public-page main :is(.text-slate-700, .text-slate-600, .text-slate-500) { color: var(--text-muted); }
.public-page .prose {
  color: var(--text-muted); font-size: 1.0625rem; line-height: 1.8;
  --tw-prose-body: var(--text-muted); --tw-prose-headings: var(--text); --tw-prose-bold: var(--text);
  --tw-prose-links: var(--accent); --tw-prose-counters: var(--text-muted); --tw-prose-bullets: var(--border-strong);
  --tw-prose-hr: var(--border); --tw-prose-quotes: var(--text); --tw-prose-quote-borders: var(--accent);
  --tw-prose-captions: var(--text-muted); --tw-prose-code: var(--text); --tw-prose-th-borders: var(--border-strong); --tw-prose-td-borders: var(--border);
}
.public-page main :is(.bg-white, .bg-slate-50, .score-box, .tldr-box) { background: var(--surface); }
.public-page main :is(.border-slate-200, .border-slate-100, .score-box, .tldr-box) { border-color: var(--border); }
.public-page .prose :is(th, td) { padding: .85rem 1rem; }
.public-page .prose table { display: block; max-width: 100%; overflow-x: auto; }
.public-page .score-box { flex-wrap: wrap; }
.public-page .prose pre { max-width: 100%; overflow-x: auto; }
.public-page :is(.tldr-box, .score-box, .pros-cons .pc-col) { border-radius: 1rem; }
:root[data-theme='dark'] .public-page .pros-cons .pc-col { background: var(--surface); border-color: var(--border); }
:root[data-theme='dark'] .public-page .pros-cons :is(h4, li) { color: var(--text); }
@media (max-width: 52rem) {
  .site-header .site-nav { display: none; }
  .site-header .header-row { gap: .6rem; justify-content: space-between; }
  .site-header .header-actions { margin-left: auto; gap: .4rem; }
  .site-header .header-actions > .btn:not(.btn-primary) { display: none; }
  .shell-menu-toggle { display: inline-flex; }
  .shell-mobile-menu { display: grid; gap: .25rem; padding-block: .5rem 1rem !important; border-top: 1px solid var(--border); }
  .shell-mobile-menu a { padding: .65rem .5rem; color: var(--text-muted); font-size: .875rem; border-radius: .5rem; }
  .shell-mobile-menu a:hover { color: var(--accent); background: var(--accent-soft); }
}
@media (max-width: 380px) {
  .site-header .brand { font-size: .8125rem; gap: .35rem; }
  .site-header .btn { padding-inline: .65rem; font-size: .75rem; }
  .site-header .container { padding-inline: .85rem; }
}
@media (prefers-reduced-motion: reduce) { .public-page * { scroll-behavior: auto !important; transition: none !important; } }
@media (max-width: 380px) {
  .site-header .brand { font-size: .75rem; }
  .site-header .brand-mark { width: 1.5rem; height: 1.5rem; }
  .site-header .brand-word > span { display: none; }
  .site-header .pref-trigger { padding-inline: .4rem; }
  .site-header .btn { padding-inline: .5rem; font-size: .6875rem; }
  .site-header .shell-menu-toggle { padding: .35rem; }
  .site-header .header-row { gap: .4rem; }
}
.public-page .score-box > div:last-child { flex: 1; min-width: min(100%, 12rem); }
.public-page .score-box p { color: var(--text-muted); }
.public-page .score-box .score-title { color: var(--text); }
