/* ToolBistro — clean editorial design system (Inter, self-hosted) */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Inter.woff2") format("woff2");
}

/* Fallback stack: system fonts keep rendering fast on mobile when Inter is
   still loading (font-display: swap already covers this). No preload needed
   — Inter is the only webfont and 344KB is heavy for mobile LCP. */

:root {
  color-scheme: light;

  /* Ink + text (single navy family) */
  --ink: #15233a;          /* headings, dark surfaces */
  --ink-2: #2f3e52;        /* body copy */
  --muted: #51637a;        /* meta, captions, secondary (>=4.5:1 on white) */

  /* Single accent: teal (CTA + links). Dark enough for white-text contrast. */
  --teal: #0f766e;
  --teal-strong: #115e59;
  --teal-tint: #e6f3f1;
  --teal-tint-border: #bfddd7;

  /* One warm accent, used only for rating badges */
  --amber-tint: #fdf2d6;
  --amber-ink: #8a5a07;

  /* Neutrals / surfaces */
  --paper: #ffffff;
  --surface: #f7f9fb;
  --surface-2: #eef2f6;
  --line: #e4e9ef;
  --line-strong: #cfd8e2;

  /* Back-compat aliases (older selectors referenced these) */
  --mint: var(--teal);
  --mint-dark: var(--teal-strong);
  --amber: var(--amber-ink);
  --blue: #3f5f8a;

  --shadow-sm: 0 1px 2px rgba(21, 35, 58, 0.06);
  --shadow: 0 8px 24px rgba(21, 35, 58, 0.08);
  --shadow-lg: 0 18px 48px rgba(21, 35, 58, 0.12);

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.disclosure-bar {
  padding: 10px 18px;
  color: #eaf1f0;
  background: var(--ink);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, var(--ink), var(--teal));
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 550;
  font-size: 0.93rem;
}

.nav a,
.site-footer a,
.text-link {
  text-decoration: none;
  transition: color 160ms ease;
}

/* Mobile tap targets: nav links are bare text (14px) which fails the 44px
   tap-target guideline and hurts mobile usability/UX signals. Add padding
   so each link is comfortably tappable; the flex-wrap nav stays centered. */
.nav a {
  padding: 8px 6px;
  border-radius: 6px;
}

.nav a:hover,
.site-footer a:hover,
.text-link:hover {
  color: var(--teal);
}

/* ---------- Buttons ---------- */

.header-cta,
.primary-button,
.secondary-button,
.signup-form button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  border-radius: var(--radius-sm);
  padding: 0 20px;
  font-weight: 650;
  font-size: 0.97rem;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}

.header-cta,
.primary-button,
.signup-form button {
  color: #fff;
  background: var(--teal);
  box-shadow: var(--shadow-sm);
}

.header-cta:hover,
.primary-button:hover,
.signup-form button:hover {
  background: var(--teal-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.secondary-button:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

/* Coming-soon / disabled CTA: must read as unavailable, not clickable */
.primary-button.disabled,
.primary-button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-button.disabled:hover,
.primary-button[aria-disabled="true"]:hover {
  background: var(--teal);
  transform: none;
  box-shadow: none;
}

/* ---------- Layout widths ---------- */

.hero,
.section,
.newsletter,
.site-footer {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  gap: 48px;
  align-items: center;
  padding: 92px 0 64px;
}

/* ---------- Typography ---------- */

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 16ch;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(2.3rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
}

h2 {
  color: var(--ink);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 750;
}

h3 {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.hero-text {
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 16px;
}

.trust-note {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Hero panel ---------- */

.hero-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.panel-topline strong {
  color: var(--teal);
}

.stack-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stack-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.stack-card.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.stack-card h2 {
  font-size: 1.05rem;
  color: inherit;
}

.stack-card.active h2 {
  color: #fff;
}

.stack-card p {
  margin: 5px 0 0;
  color: inherit;
  opacity: 0.74;
  font-size: 0.9rem;
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  font-weight: 800;
  color: var(--teal);
  background: var(--teal-tint);
}

.tool-icon.ai {
  color: var(--ink);
  background: var(--surface-2);
}

.tool-icon.ops {
  color: var(--blue);
  background: #e8eef7;
}

.tool-icon.money {
  color: var(--amber-ink);
  background: var(--amber-tint);
}

/* ---------- Logo strip ---------- */

.logo-strip {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.logo-strip span {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 88px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-heading p,
.split-section p,
.newsletter p,
.method p,
.tool-card p,
.tool-card li {
  color: var(--muted);
  line-height: 1.62;
}

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

.tool-card {
  padding: 26px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tool-card.featured {
  background: linear-gradient(150deg, var(--ink), var(--teal-strong));
  color: #fff;
  border-color: transparent;
}

.tool-card.featured h3 {
  color: #fff;
}

.tool-card.featured p,
.tool-card.featured li {
  color: rgba(255, 255, 255, 0.82);
}

.category-tag {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-tint);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.tool-card.featured .category-tag {
  color: #d8fff4;
  background: rgba(255, 255, 255, 0.14);
}

.tool-card ul {
  padding-left: 18px;
  margin: 14px 0;
}

.tool-card li {
  margin-bottom: 6px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  color: var(--teal);
  font-weight: 650;
}

.text-link::after {
  content: "\2192";
  transition: transform 160ms ease;
}

.text-link:hover::after {
  transform: translateX(3px);
}

.tool-card.featured .text-link {
  color: #fff;
}

/* ---------- Split / stacks / method ---------- */

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1fr);
  gap: 40px;
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 14px;
}

.stack-list article {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stack-list article:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.stack-list span {
  color: var(--teal);
  font-weight: 800;
  font-size: 1.15rem;
}

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

.method-grid div {
  min-height: 168px;
  padding: 22px;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(155deg, var(--ink), var(--teal-strong));
}

.method-grid strong {
  display: block;
  margin-bottom: 30px;
  font-size: 1.2rem;
}

.method-grid p {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Newsletter ---------- */

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 28px;
  align-items: center;
  margin-top: 34px;
  padding: 40px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(150deg, var(--ink), #103a4f);
  box-shadow: var(--shadow);
}

.newsletter h2 {
  color: #fff;
}

.newsletter .eyebrow {
  color: #8fe3d8;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.82);
}

.signup-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.signup-form span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.signup-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font: inherit;
  background: #fff;
  color: var(--ink-2);
}

.signup-form button {
  border: 0;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
}

.signup-form button:hover {
  background: #0aa394;
}

.form-message {
  margin: 4px 0 0;
  color: #8fe3d8;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 44px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* ---------- Legal / article pages ---------- */

.legal-page {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 312px;
  gap: 40px;
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 88px;
}

.article-shell.single-column {
  grid-template-columns: minmax(0, 1fr);
  width: min(800px, calc(100% - 48px));
}

.article-content {
  padding: 8px 0;
}

.article-content h1 {
  max-width: none;
  font-size: clamp(2.05rem, 3.8vw, 2.9rem);
  line-height: 1.14;
}

.article-content h2 {
  margin-top: 2.1em;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

.article-content h3 {
  margin-top: 1.5em;
  font-size: 1.16rem;
}

.article-content p,
.article-content li {
  color: var(--ink-2);
  line-height: 1.74;
  font-size: 1.05rem;
}

.article-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.article-content a:hover {
  color: var(--teal-strong);
}

.article-content section {
  margin-top: 8px;
}

.article-meta,
.breadcrumb {
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb {
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--teal);
}

.quick-verdict {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  margin: 30px 0;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--teal-tint);
  border: 1px solid var(--teal-tint-border);
}

.quick-verdict h2 {
  font-size: 1.3rem;
}

.quick-verdict p {
  margin: 0;
  color: var(--ink-2);
}

.rating {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--amber-ink);
  background: var(--amber-tint);
  font-weight: 700;
  font-size: 0.78rem;
}

.primary-button.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.check-list {
  padding-left: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 28px;
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--teal);
  font-weight: 800;
}

/* ---------- Tables ---------- */

.comparison-table {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin: 18px 0;
}

.comparison-table table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.97rem;
}

.comparison-table th {
  color: #fff;
  background: var(--ink);
  text-align: left;
  font-weight: 600;
}

.comparison-table th,
.comparison-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--surface);
}

.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.comparison-table a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Pros / cons ---------- */

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 8px 0;
}

.pros-cons > div {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
}

.pros-cons > div:first-child {
  border-top: 3px solid var(--teal);
}

.pros-cons > div:last-child {
  border-top: 3px solid var(--line-strong);
}

.pros-cons h2 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.pros-cons ul {
  margin: 0;
  padding-left: 18px;
}

.pros-cons li {
  margin-bottom: 7px;
  color: var(--ink-2);
}

/* ---------- Sidebar ---------- */

.article-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.sidebar-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.sidebar-card h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.sidebar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.sidebar-card a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.legal-page h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
}

.legal-page h2 {
  margin-top: 1.8em;
}

.legal-page p,
.legal-page li {
  color: var(--ink-2);
  line-height: 1.72;
}

.legal-page a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  body {
    font-size: 16px;
  }

  .site-header {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .header-cta {
    display: none;
  }

  .hero,
  .split-section,
  .newsletter,
  .article-shell,
  .pros-cons,
  .compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-sidebar {
    position: static;
  }

  .tool-grid,
  .method-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 60px 0;
  }

  .hero {
    padding-top: 56px;
    gap: 32px;
  }

  .quick-verdict {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 6px 14px;
    font-size: 0.9rem;
  }

  .brand {
    font-size: 1rem;
  }

  .newsletter,
  .method-grid div {
    padding: 24px;
  }
}

/* Buttons keep their own text color/decoration even inside link-styled
   containers (.article-content/.legal-page/.sidebar-card set link color to
   teal; without this guard a teal button shows teal text = invisible). */
a.primary-button,
a.header-cta {
  color: #fff;
  text-decoration: none;
}

a.secondary-button {
  color: var(--ink);
  text-decoration: none;
}

a.primary-button:hover,
a.header-cta:hover {
  color: #fff;
}

a.secondary-button:hover {
  color: var(--teal);
}

/* ---------- Tools directory + page screenshots (appended 2026-06-12) ---------- */

.page-shot {
  margin: 26px 0;
}

.page-shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.page-shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.dir-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.dir-filters button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.dir-filters button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.dir-filters button.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.dir-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dir-meta strong {
  color: var(--ink);
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber-ink);
  font-weight: 700;
  font-size: 0.8rem;
}

.dir-links {
  margin-top: 12px;
}

/* ---------- One-Person-Companies study (pillar + clusters) ---------- */
.study-shell { width: min(1080px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 88px; }
.study-shell .article-content { padding: 0; }
.study-shell h2 { margin-top: 1.8em; }
.study-shell h3 { margin-top: 1.6em; scroll-margin-top: 90px; }
.study-shell p, .study-shell li { color: var(--ink-2); line-height: 1.7; }
.study-shell p.meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 6px; }
.study-shell p.tagline { color: var(--ink-2); font-size: 1.05rem; border-left: 3px solid var(--teal); padding-left: 14px; }
.study-shell ul.stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.study-shell ul.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 0.86rem; }
.study-shell ul.catlist { columns: 2; }
.study-shell a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.study-shell table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.92rem; display: block; overflow-x: auto; }
.study-shell thead th { position: sticky; top: 0; background: var(--ink); color: #fff; text-align: left; padding: 11px 13px; }
.study-shell tbody td { padding: 10px 13px; border-bottom: 1px solid var(--line); }
.study-shell tbody tr:nth-child(even) { background: var(--surface); }
.study-shell a.text-link { text-decoration: none; }
.opc-cta { margin: 30px 0; padding: 22px 24px; border-radius: var(--radius-md); background: linear-gradient(150deg, var(--ink), #103a4f); color: #fff; }
.opc-cta h3 { color: #fff; margin: 0 0 6px; }
.opc-cta p { color: rgba(255,255,255,0.85); margin: 0 0 14px; }
.opc-cta a.primary-button { background: var(--teal); }
.opc-lead { font-size: 1.1rem; }
.opc-partof { color: var(--muted); font-size: 0.95rem; }
.opc-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; font-size: 0.9rem; }
.opc-filter select { background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; font: inherit; }
.opc-filter button { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.opc-filter button:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Visual components (per tianwenwangluo-visual-components, light-theme adapted) ---------- */

.data-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.data-card {
  background: linear-gradient(135deg, var(--ink), var(--teal-strong));
  padding: 24px 20px;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(21, 35, 58, 0.18);
}

.data-card .num {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.data-card .lbl {
  font-size: 13px;
  opacity: 0.92;
  line-height: 1.5;
}

.data-card .src {
  display: block;
  margin-top: 6px;
  opacity: 0.68;
  font-size: 11px;
}

.vs-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
}

.vs-block > div {
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.95rem;
}

.vs-block .vs-bad {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
}

.vs-block .vs-good {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
}

.vs-block h4 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vs-block .vs-bad h4 { color: #dc2626; }
.vs-block .vs-good h4 { color: #16a34a; }
.vs-block ul { margin: 0; padding-left: 18px; }
.vs-block li { margin-bottom: 6px; color: var(--ink-2); }

.key-insight {
  background: var(--teal-tint);
  border-left: 4px solid var(--teal);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 22px 0;
}

.key-insight strong { color: var(--ink); }

@media (max-width: 700px) {
  .vs-block { grid-template-columns: minmax(0, 1fr); }
  .data-card .num { font-size: 30px; }
}

/* ---------- Mobile hamburger navigation (appended 2026-08-14) ----------
   The .site-header inline nav wraps into 2-3 stacked lines on phones.
   Below the 900px breakpoint it collapses behind a hamburger toggle and
   drops a full-width panel under the sticky header. Desktop (>=900px)
   keeps the inline nav exactly as before. */

.nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: nowrap;
    gap: 12px;
    padding: 10px 16px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    cursor: pointer;
  }

  .nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    order: 0;
    flex-basis: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 30;
  }

  .nav.open {
    display: flex;
    animation: nav-drop 180ms ease;
  }

  .nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    font-size: 1rem;
    color: var(--ink-2);
  }

  .nav a + a {
    border-top: 1px solid var(--line);
  }

  .nav a:hover {
    background: var(--surface);
    color: var(--teal);
  }
}

@keyframes nav-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
