/* ------------------------------------------------------------ tokens */
:root {
  --bg: #fafaf9; --bg-2: #f3f3f1; --card: #ffffff; --ink: #18181b; --ink-2: #3f3f46; --muted: #71717a;
  --line: #e4e4e1; --line-2: #d4d4d0; --accent: #0f766e; --accent-ink: #0d5f59; --focus: #2563eb;
  --yes: #15803d; --yes-bg: #ecfdf3; --yes-line: #b7ebc9;
  --res: #b45309; --res-bg: #fff7e6; --res-line: #f8d8a0;
  --no: #b91c1c; --no-bg: #fef1f1; --no-line: #f6c4c4;
  --unv: #52525b; --unv-bg: #f4f4f5; --unv-line: #c9c9cf;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 1px 1px rgb(0 0 0 / .02);
  --radius: 10px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c0d0f; --bg-2: #131518; --card: #15171a; --ink: #ececee; --ink-2: #c4c4c9; --muted: #8b8b94;
  --line: #24262b; --line-2: #33363c; --accent: #2dd4bf; --accent-ink: #5eead4; --focus: #60a5fa;
  --yes: #4ade80; --yes-bg: #0f2418; --yes-line: #1f4d31;
  --res: #fbbf24; --res-bg: #2a1f0a; --res-line: #5a4213;
  --no: #f87171; --no-bg: #2b1212; --no-line: #5c2323;
  --unv: #a1a1aa; --unv-bg: #1c1d21; --unv-line: #3f3f46;
  --shadow: none; color-scheme: dark;
}}
:root[data-theme="dark"] {
  --bg: #0c0d0f; --bg-2: #131518; --card: #15171a; --ink: #ececee; --ink-2: #c4c4c9; --muted: #8b8b94;
  --line: #24262b; --line-2: #33363c; --accent: #2dd4bf; --accent-ink: #5eead4; --focus: #60a5fa;
  --yes: #4ade80; --yes-bg: #0f2418; --yes-line: #1f4d31;
  --res: #fbbf24; --res-bg: #2a1f0a; --res-line: #5a4213;
  --no: #f87171; --no-bg: #2b1212; --no-line: #5c2323;
  --unv: #a1a1aa; --unv-bg: #1c1d21; --unv-line: #3f3f46;
  --shadow: none; color-scheme: dark;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0; }
code, kbd { font-family: var(--mono); font-size: .86em; }
code { background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.i { width: 1em; height: 1em; vertical-align: -.12em; flex: none; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo-mark { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); position: relative; }
.logo-mark::after { content: ""; position: absolute; left: 5px; top: 4.5px; width: 9px; height: 5px; border: solid var(--bg); border-width: 0 0 2.4px 2.4px; transform: rotate(-45deg); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 7px; font-size: 14px; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.theme-toggle { margin-left: 6px; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; font-size: 15px; }
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.theme-toggle .i:last-child { display: none; }
:root[data-theme="dark"] .theme-toggle .i:first-child { display: none; }
:root[data-theme="dark"] .theme-toggle .i:last-child { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i:first-child { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i:last-child { display: inline; }
}

/* ------------------------------------------------------------ sponsor slot */
.sponsor-slot { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.sponsor-in { display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: 13px; color: var(--muted); }
.sponsor-label { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; border: 1px dashed var(--line-2); padding: 5px 7px; border-radius: 5px; }
.sponsor-text { flex: 1; }
.sponsor-cta { color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------ hero */
.hero { padding-top: 56px; padding-bottom: 28px; }
.eyebrow { font: 500 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; margin: 0 0 14px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 54px); font-weight: 700; letter-spacing: -.035em; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; margin: 16px 0 0; }
.stat-row { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stat-row a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: var(--shadow); transition: border-color .15s; }
.stat-row a:hover { border-color: var(--line-2); }
.stat-n { font: 600 15px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-n.sm { font-size: 13px; margin-right: 8px; }
.hero-foot { font-size: 14px; margin: 14px 0 0; }

/* ------------------------------------------------------------ badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); letter-spacing: .005em; padding: 5px 9px 5px 6px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.badge-ico { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font: 700 10.5px/1 var(--sans); color: var(--card); }
.badge-yes { color: var(--yes); background: var(--yes-bg); border-color: var(--yes-line); } .badge-yes .badge-ico { background: var(--yes); }
.badge-restricted { color: var(--res); background: var(--res-bg); border-color: var(--res-line); } .badge-restricted .badge-ico { background: var(--res); }
.badge-no { color: var(--no); background: var(--no-bg); border-color: var(--no-line); } .badge-no .badge-ico { background: var(--no); }
.badge-unverified { color: var(--unv); background: var(--unv-bg); border-color: var(--unv-line); border-style: dashed; } .badge-unverified .badge-ico { background: var(--unv); }
.badge.lg { font-size: 14px; padding: 7px 13px 7px 8px; gap: 8px; } .badge.lg .badge-ico { width: 19px; height: 19px; font-size: 12px; }

/* ------------------------------------------------------------ filters */
.directory { padding-top: 12px; }
.filters { position: sticky; top: 56px; z-index: 3; display: grid; gap: 12px; padding: 14px; margin: 0 -14px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.search { position: relative; display: flex; align-items: center; }
.search .i { position: absolute; left: 12px; color: var(--muted); }
.search input { width: 100%; height: 42px; padding: 0 44px 0 36px; font: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 9px; box-shadow: var(--shadow); }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.search kbd { position: absolute; right: 10px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; font-size: 11px; }
.flabel { display: block; font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips legend { float: left; width: 100%; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--card); cursor: pointer; user-select: none; transition: background .12s, border-color .12s; }
.chip > span:hover { border-color: var(--muted); }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip .n { font: 500 11px/1 var(--mono); opacity: .65; }
.cdot { width: 8px; height: 8px; border-radius: 50%; }
.c-yes { background: var(--yes); } .c-restricted { background: var(--res); } .c-no { background: var(--no); } .c-unverified { background: transparent; border: 1.5px dashed var(--unv); }
.selects { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.selects label { display: block; min-width: 0; }
select { width: 100%; height: 38px; padding: 0 32px 0 11px; font: inherit; font-size: 14px; color: var(--ink); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; border: 1px solid var(--line-2); border-radius: 8px; appearance: none; text-overflow: ellipsis; }
.result-bar { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; font-size: 13px; color: var(--muted); }
.result-bar p { margin: 0; font-family: var(--mono); font-size: 12px; }
.reset, .linkish { background: none; border: 0; color: var(--accent-ink); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------ tool rows */
.tools { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; padding: 18px 20px; border-top: 1px solid var(--line); }
.tool:first-child { border-top: 0; }
.tool-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.tool-name { font-size: 17px; font-weight: 650; }
.tool-name a { color: var(--ink); text-decoration: none; }
.tool-name a:hover { color: var(--accent-ink); text-decoration: underline; }
.tag { font: 500 11px/1.4 var(--mono); color: var(--muted); }
.tool-line { margin: 4px 0 6px; color: var(--ink-2); }
.tool-meta { margin: 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 7px; }
.w-no, .w-unverified { color: var(--muted); font-style: italic; }
.tool-rights { border-left: 3px solid var(--line-2); padding-left: 16px; min-width: 0; }
.rights-yes { border-left-color: var(--yes); } .rights-restricted { border-left-color: var(--res); } .rights-no { border-left-color: var(--no); } .rights-unverified { border-left-color: var(--unv-line); border-left-style: dashed; }
.rights-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.lic { font: 500 12px/1.45 var(--mono); color: var(--ink-2); min-width: 0; padding-top: 3px; overflow-wrap: anywhere; }
.note { margin: 8px 0 8px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; }
.src { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.verified { color: var(--muted); font: 11.5px var(--mono); margin-left: auto; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }

/* ------------------------------------------------------------ legend / disclaimer */
.legend { padding-top: 56px; }
.legend h2, .tp-grid h2, .related h2, .prose h2 { font-size: 19px; font-weight: 650; }
.legend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 20px; }
.legend-grid div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.legend-grid dd { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.disclaimer { border: 1px solid var(--line-2); background: var(--bg-2); border-radius: var(--radius); padding: 14px 16px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.disclaimer.compact { font-size: 13px; margin-top: 18px; }

/* ------------------------------------------------------------ signup */
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin: 56px 0 64px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, var(--card), var(--bg-2)); }
.signup-h { font-size: 19px; font-weight: 650; }
.signup p { margin: 6px 0 0; font-size: 14px; }
.signup-form { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-form input[type="email"] { flex: 1 1 200px; height: 42px; padding: 0 12px; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 9px; }
.signup-form input[type="email"]:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.signup-form button { height: 42px; padding: 0 18px; font: 600 14px var(--sans); color: var(--bg); background: var(--ink); border: 0; border-radius: 9px; cursor: pointer; }
.signup-form button:hover { opacity: .88; }
.signup-msg { flex-basis: 100%; min-height: 1.2em; font-size: 13px; color: var(--muted); margin: 0 !important; }
.signup-form.is-off .signup-msg { color: var(--res); }

/* ------------------------------------------------------------ tool page */
.tool-page { padding-top: 28px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.tp-head { margin: 22px 0 26px; }
.tp-head h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 700; letter-spacing: -.03em; }
.tp-head .lede { margin-top: 10px; }
.tp-head .muted { margin: 8px 0 0; font-size: 14px; }
.rights-panel { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); background: var(--card); padding: 22px 24px; box-shadow: var(--shadow); }
.rights-panel.rights-yes { border-left-color: var(--yes); background: linear-gradient(90deg, var(--yes-bg), var(--card) 60%); }
.rights-panel.rights-restricted { border-left-color: var(--res); background: linear-gradient(90deg, var(--res-bg), var(--card) 60%); }
.rights-panel.rights-no { border-left-color: var(--no); background: linear-gradient(90deg, var(--no-bg), var(--card) 60%); }
.rights-panel.rights-unverified { border-left-color: var(--unv); border-left-style: dashed; background: linear-gradient(90deg, var(--unv-bg), var(--card) 60%); }
.rp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rp-h { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rp-lic { margin: 18px 0 0; font: 500 15px/1.5 var(--mono); color: var(--ink); }
.rp-note { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink); max-width: 75ch; }
.rp-sources { margin-top: 18px; }
.rp-sources ol { margin: 0; padding-left: 20px; font-size: 14px; }
.rp-sources li { margin: 3px 0; word-break: break-all; }
.rp-sources a { font-family: var(--mono); font-size: 13px; }
.rp-meaning { font-size: 13px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.tp-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; margin-top: 40px; }
.when { font-size: 16px; line-height: 1.65; color: var(--ink-2); margin: 10px 0 0; }
.facts { margin: 10px 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.related { margin-top: 44px; }
.related ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.related a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 550; font-size: 14px; }
.related a:hover { border-color: var(--line-2); }
.related a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ prose pages */
.prose-page { padding-top: 48px; max-width: 780px; }
.prose-page h1 { font-size: clamp(30px, 4.6vw, 42px); font-weight: 700; letter-spacing: -.03em; }
.prose h2 { margin: 36px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose .disclaimer { margin-top: 32px; }
.changelog { list-style: none; padding: 0; margin: 32px 0 0; border-left: 1px solid var(--line-2); }
.cl-entry { position: relative; padding: 0 0 28px 24px; }
.cl-entry::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.cl-date { font: 500 12.5px var(--mono); color: var(--muted); }
.cl-body h2 { font-size: 19px; margin: 4px 0 10px; }
.cl-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.cl-tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 20px; }
.cl-tools li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }

/* ------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; color: var(--ink-2); }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0 0 4px; }
.footer .s2s { color: var(--muted); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .legend-grid { grid-template-columns: 1fr 1fr; }
  .tp-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .tool { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .signup { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .selects { grid-template-columns: 1fr 1fr; }
  .selects label:first-child { grid-column: 1 / -1; }
  .filters { position: static; }
}
@media (max-width: 520px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .lede { font-size: 16.5px; }
  .sponsor-text { display: none; }
  .sponsor-in { justify-content: space-between; }
  .nav a { padding: 6px 7px; }
  .legend-grid { grid-template-columns: 1fr; }
  .search kbd { display: none; }
  .rights-panel { padding: 18px 16px; }
  .facts div { grid-template-columns: 110px 1fr; }
  .verified { margin-left: 0; flex-basis: 100%; }
  .chip > span { padding: 6px 9px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .sponsor-slot, .filters, .signup, .theme-toggle { display: none !important; } }

/* ---- what-it-does + cost-of-commercial-use layer (added 2026-10-15) */
.tool-what { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.tool-what .flabel { display: block; margin-bottom: 2px; }
.cost-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cost-note { font-size: 13px; line-height: 1.5; color: var(--muted); flex: 1 1 220px; min-width: 0; }
.cost-badge .badge-ico { font-size: 10px; }
.what-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.what-text { margin: 6px 0 0; font-size: 16px; line-height: 1.65; }
.legend-sub { margin: 22px 0 10px; font-size: 15px; }
.tool-page .rights-panel + .rights-panel { margin-top: 18px; }

/* ================================================================
   2026-10-15 premium redesign layer — dark-first, refined type
   ================================================================ */
:root {
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --bg: #fbfbfa; --bg-2: #f3f3f0; --card: #ffffff; --line: #e7e6e2; --line-2: #d6d5d0;
  --accent: #0f766e; --glow: rgb(15 118 110 / .08); --radius: 14px;
  --shadow: 0 1px 0 rgb(0 0 0 / .02), 0 8px 24px -12px rgb(0 0 0 / .08);
}
:root:not([data-theme="light"]) {
  --bg: #07080a; --bg-2: #0d0f12; --card: #0f1114; --ink: #ededee; --ink-2: #b4b6bc; --muted: #7d8089;
  --line: #1c1f24; --line-2: #2a2e35; --accent: #5eead4; --accent-ink: #99f6e4; --focus: #818cf8;
  --yes: #4ade80; --yes-bg: rgb(74 222 128 / .08); --yes-line: rgb(74 222 128 / .25);
  --res: #fbbf24; --res-bg: rgb(251 191 36 / .08); --res-line: rgb(251 191 36 / .25);
  --no: #f87171; --no-bg: rgb(248 113 113 / .08); --no-line: rgb(248 113 113 / .25);
  --unv: #a1a1aa; --unv-bg: rgb(161 161 170 / .08); --unv-line: rgb(161 161 170 / .28);
  --glow: rgb(94 234 212 / .07);
  --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 32px -16px rgb(0 0 0 / .6);
  color-scheme: dark;
}
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--sans); font-feature-settings: "cv11", "ss01", "ss03"; background: var(--bg);
  background-image: radial-gradient(1200px 600px at 75% -10%, var(--glow), transparent 60%); background-repeat: no-repeat; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
a { text-underline-offset: 3px; }

.topbar { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 600; letter-spacing: -.02em; }
.logo-mark { background: conic-gradient(from 210deg, #5eead4, #818cf8, #f0abfc, #5eead4) !important; border-radius: 50% !important; box-shadow: 0 0 18px rgb(94 234 212 / .35); }
.byline { margin-left: 10px; margin-right: auto; padding: 3px 9px; font: 500 11.5px var(--mono); color: var(--muted); text-decoration: none;
  border: 1px solid var(--line-2); border-radius: 999px; transition: color .2s, border-color .2s; }
.byline:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.nav a { font-size: 13.5px; }

.hero { padding-top: 72px; padding-bottom: 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 32px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); letter-spacing: .02em; color: var(--ink-2);
  padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--card) 70%, transparent); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--yes); box-shadow: 0 0 0 0 var(--yes); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--yes) 60%, transparent); } 70%,100% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; font-weight: 600; letter-spacing: -.045em; margin-top: 22px;
  background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--ink) 62%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; padding-right: .06em;
  background: linear-gradient(100deg, #5eead4, #818cf8 55%, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .hero h1 em { background-image: linear-gradient(100deg, #0f766e, #4f46e5 60%, #a21caf); }
.lede { font-size: 18.5px; line-height: 1.6; color: var(--ink-2); max-width: 58ch; }
.hero-foot { font-size: 14px; line-height: 1.65; max-width: 70ch; }
.stat-row a { border-radius: 12px; background: var(--card); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.stat-row a:hover { border-color: var(--line-2); transform: translateY(-1px); }
.stat-n { font: 500 22px var(--mono); letter-spacing: -.03em; }
.hero-art { position: relative; aspect-ratio: 1; color: var(--ink); }
.fold { width: 100%; height: 100%; animation: drift 40s linear infinite; }
.fold-path { stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 3.2s cubic-bezier(.4,0,.2,1) .2s forwards; }
.fold-dots { opacity: 0; animation: fade 1s ease 2.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: .9; } }
@keyframes drift { to { transform: rotate(360deg); } }

/* Seq2Study CTA */
.s2s-cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 40px 0 8px; padding: 22px 26px;
  border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 7%, var(--card)), var(--card) 55%); }
.s2s-cta::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: linear-gradient(#5eead4, #818cf8); }
.s2s-k { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.s2s-h { margin: 6px 0 2px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.s2s-h em { font-family: var(--serif); font-weight: 400; font-size: 1.12em; color: var(--accent); }
.s2s-p { margin: 0; font-size: 13.5px; color: var(--muted); }
.s2s-btn { flex: none; display: inline-flex; gap: 8px; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  color: var(--bg); background: var(--ink); text-decoration: none; transition: transform .2s, opacity .2s; }
.s2s-btn:hover { transform: translateX(2px); opacity: .92; }
.s2s-tool { margin-top: 44px; }

/* directory */
.filters { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line) !important; border-radius: 16px; }
.search input, .selects select { background: var(--card); border-color: var(--line-2); border-radius: 10px; }
.chip > span { border-radius: 999px; transition: background .15s, border-color .15s; }
.tools { gap: 10px; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s, box-shadow .2s; }
.tool:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent); }
.tool-name { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.tool-name a { color: var(--ink); text-decoration: none; }
.tool-name a:hover { color: var(--accent); }
.tag { font: 500 11px var(--mono); text-transform: lowercase; border-radius: 6px; }
.badge { border-radius: 999px; }
.legend h2, .tp-grid h2, .related h2, .prose h2, .signup-h { font-weight: 600; letter-spacing: -.02em; }
.tp-head h1, .prose-page h1 { font-weight: 600; letter-spacing: -.04em; }
.signup { border-radius: 16px; background: var(--card); }
.footer { margin-top: 24px; background: var(--bg-2); }
.footer .s2s a { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: min(240px, 60vw); margin: 0 auto -10px; }
  .hero { padding-top: 36px; }
}
@media (max-width: 640px) {
  .s2s-cta { flex-direction: column; align-items: flex-start; padding: 18px; }
  .byline { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fold, .fold-path, .fold-dots, .pulse { animation: none !important; stroke-dashoffset: 0; opacity: 1; } }
:root:not([data-theme="light"]) .theme-toggle .i:first-child { display: none; }
:root:not([data-theme="light"]) .theme-toggle .i:last-child { display: inline; }
.fold { animation: breathe 9s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes breathe { 50% { transform: rotate(3deg) scale(1.02); } }
.fold-path { stroke-dasharray: 9000; stroke-dashoffset: 9000; animation: draw 3.6s cubic-bezier(.4,0,.2,1) .1s forwards; }
.fold-front { opacity: 0; animation: fade 1.2s ease 1.6s forwards; }
@media (prefers-reduced-motion: reduce) { .fold-front { animation: none !important; opacity: 1; } }

/* ---- sponsor slot (2026-10-15) */
.sp-slot { display: flex; align-items: center; gap: 16px; margin: 8px 0 18px; padding: 12px 16px; border: 1px dashed var(--line-2);
  border-radius: 14px; background: color-mix(in srgb, var(--card) 60%, transparent); }
.sp-k { flex: none; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 6px; }
.sp-mark { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px dashed var(--line-2);
  background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--ink) 6%, transparent) 5px 6px); }
.sp-t { margin: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-who { font-size: 14.5px; font-weight: 550; color: var(--ink); letter-spacing: -.01em; }
.sp-who em { font-family: var(--serif); font-weight: 400; font-size: 1.12em; color: var(--ink-2); }
.sp-sub { font-size: 12.5px; color: var(--muted); }
.sp-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; font-size: 13px; font-weight: 550;
  color: var(--ink); text-decoration: none; border: 1px solid var(--line-2); border-radius: 9px; transition: border-color .2s, color .2s; }
.sp-btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.sp-tool { margin-top: 44px; }
@media (max-width: 640px) { .sp-slot { flex-wrap: wrap; } .sp-mark { display: none; } .sp-t { flex-basis: 100%; order: 3; } .sp-btn { margin-left: auto; } }
@media print { .sp-slot { display: none !important; } }
