/* Shared stylesheet for the Feldar team's comparison sites.
   Each site sets its own theme variables in a <style> block via build.py. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("/fonts/LibreBaskerville-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #161616;
  --ink-2: #3d3d3d;
  --muted: #6b6b6b;
  --rule: #e6e3df;
  --rule-strong: #d6d2cc;
  --accent: #2f5d50;
  --head-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head-weight: 600;
  --head-track: -0.02em;
  --body-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --frame: radial-gradient(120% 120% at 0% 0%, #f3e3cf 0%, #efe7f3 45%, #dfe9f1 100%);
  --wide: 1080px;
  --text: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
:root { --soft: rgba(40, 32, 20, .032); --soft-2: rgba(40, 32, 20, .06); }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--text); }

/* Disclosure and header */
.disclosure { font-size: 12.5px; line-height: 1.5; color: var(--muted); background: var(--soft); }
.disclosure .wrap { padding-top: 8px; padding-bottom: 8px; }
.disclosure a { color: var(--ink-2); }

.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.wordmark { font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: var(--head-track); font-size: 16px; text-decoration: none; white-space: nowrap; margin-right: auto; }
.site-nav { display: flex; gap: 24px; font-size: 14px; color: var(--ink-2); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.btn.sm { font-size: 13.5px; padding: 8px 15px; white-space: nowrap; flex: none; }

/* Hero */
.hero { padding: 72px 0 8px; }
.hero .wrap.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; align-items: start; }
.eyebrow { font-size: 13px; color: var(--muted); margin: 0 0 16px; letter-spacing: 0.01em; }
h1, h2, h3 { font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: var(--head-track); color: var(--ink); }
h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.12; margin: 0 0 20px; max-width: 18ch; }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink); max-width: 620px; margin: 0 0 18px; }
.byline { font-size: 14px; color: var(--muted); margin: 0; }

/* Quick answer: the one coloured container on a comparison page */
.verdict { background: var(--frame); border-radius: 22px; padding: 26px 26px 24px; margin-top: 6px; }
.verdict .v-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; }
.verdict .v-best { display: block; text-decoration: none; background: rgba(255,255,255,.72); border-radius: 14px; padding: 16px 18px; margin: 0 0 18px; }
.verdict .v-best:hover { background: rgba(255,255,255,.9); }
.verdict .v-k { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.verdict .v-best b { display: block; font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: var(--head-track); font-size: 24px; line-height: 1.2; margin-bottom: 6px; }
.verdict .v-best span.v-why { display: block; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.verdict .v-best span.v-price { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
.verdict ul { list-style: none; margin: 0 0 20px; padding: 0 4px; display: grid; gap: 12px; }
.verdict li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: baseline; font-size: 14px; line-height: 1.4; }
.verdict li span { color: var(--ink-2); }
.verdict li a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.verdict li a:hover { text-decoration: underline; }
.verdict .v-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 4px; }
.verdict .v-go small { font-size: 12.5px; color: var(--muted); }

/* Sections: space, not lines */
main > section { padding: 88px 0 0; }
h2 { font-size: clamp(24px, 2.6vw, 28px); line-height: 1.22; margin: 0 0 12px; }
h3 { font-size: 19px; line-height: 1.32; margin: 32px 0 8px; }
.section-intro { color: var(--ink-2); max-width: var(--text); margin-bottom: 28px; }

/* Picks */
.picks { list-style: none; margin: 8px 0 0; padding: 0; }
.picks li { display: grid; grid-template-columns: 36px minmax(150px, 200px) 1fr auto; gap: 16px; align-items: baseline; padding: 13px 16px; border-radius: 12px; }
.picks li:nth-child(odd) { background: var(--soft); }
.picks .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.picks .name { font-weight: 600; text-decoration: none; }
.picks .name:hover { text-decoration: underline; }
.picks .for { color: var(--ink-2); }
.picks .price { font-size: 14px; color: var(--muted); text-align: right; white-space: nowrap; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-left: 8px; vertical-align: 1px; }

/* Table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 14px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14.5px; line-height: 1.45; min-width: 880px; }
th, td { text-align: left; vertical-align: top; padding: 13px 14px; }
thead th { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; padding-top: 0; padding-bottom: 10px; }
tbody tr:nth-child(odd) > * { background: var(--soft); }
tbody tr > :first-child { border-radius: 10px 0 0 10px; }
tbody tr > :last-child { border-radius: 0 10px 10px 0; }
tbody th { font-weight: 600; white-space: nowrap; }
td.dim { color: var(--muted); }
.table-note { font-size: 13px; color: var(--muted); margin: 0; max-width: var(--text); }
tr[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; align-items: center; }
.filters .label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.chip { font: inherit; font-size: 13.5px; padding: 6px 13px; border-radius: 999px; border: 0; background: var(--soft-2); color: var(--ink); cursor: pointer; }
.chip:hover { background: rgba(40, 32, 20, .09); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filter-count { font-size: 13px; color: var(--muted); margin-left: 6px; }

/* Reviews */
.app { padding: 64px 0 0; }
.app:first-of-type { padding-top: 8px; }
.app h3 { font-size: 24px; margin: 0 0 4px; }
.app h3 .num { color: var(--muted); font-weight: 400; margin-right: 10px; font-variant-numeric: tabular-nums; }
.app .bestfor { color: var(--accent); font-weight: 500; margin: 0 0 16px; }
.app > p { max-width: var(--text); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin: 24px 0 4px; max-width: 860px; }
.facts dt { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); padding-top: 14px; }
.facts dd { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); padding: 4px 0 6px; }
.facts dt:nth-of-type(1) { grid-area: 1 / 1; } .facts dd:nth-of-type(1) { grid-area: 2 / 1; }
.facts dt:nth-of-type(2) { grid-area: 1 / 2; } .facts dd:nth-of-type(2) { grid-area: 2 / 2; }
.facts dt:nth-of-type(3) { grid-area: 3 / 1; } .facts dd:nth-of-type(3) { grid-area: 4 / 1; }
.facts dt:nth-of-type(4) { grid-area: 3 / 2; } .facts dd:nth-of-type(4) { grid-area: 4 / 2; }
.official { font-size: 14px; color: var(--muted); margin-top: 14px; }

.shot { margin: 28px 0 8px; padding: clamp(16px, 4vw, 44px); border-radius: 22px; background: var(--frame); }
.shot img { border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 44px rgba(30, 30, 50, .16); }
.shot-caption { font-size: 14px; color: var(--muted); margin: 12px 0 0; max-width: var(--text); }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 56px; }
.cols > div { padding: 14px 0 0; }
.cols h3 { margin-top: 0; font-size: 18px; }
.cols p { color: var(--ink-2); font-size: 16px; }

.spectrum { margin: 24px 0 8px; }
.spectrum .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--ink); margin-bottom: 0; }
.spectrum ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 24px; }
.spectrum li { padding-top: 16px; }
.spectrum li b { display: block; font-size: 15px; margin-bottom: 4px; }
.spectrum li span { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

.tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 56px; }
.task { padding: 14px 0 4px; }
.task h3 { margin: 0 0 4px; font-size: 19px; }
.task .who { font-size: 14px; color: var(--accent); font-weight: 500; margin: 0 0 8px; }
.task p { font-size: 16px; color: var(--ink-2); margin: 0 0 10px; }

.prompt { font-size: 17px; line-height: 1.7; border-left: 2px solid var(--ink); padding: 4px 0 4px 20px; margin: 20px 0; max-width: var(--text); }
.prompt mark { background: none; color: var(--accent); font-weight: 500; }

ul.clean, ol.clean { padding-left: 20px; max-width: var(--text); }
ul.clean li, ol.clean li { margin-bottom: 8px; }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 15px; font-weight: 400; font-size: 20px; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 16px; color: var(--ink-2); max-width: var(--text); }

.sources { font-size: 14.5px; color: var(--ink-2); max-width: 860px; }
.sources dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 20px; margin: 0; }
.sources dt, .sources dd { margin: 0; }
.sources dt { font-weight: 600; color: var(--ink); }

.site-foot { margin-top: 112px; border-top: 1px solid var(--rule); padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-foot p { margin: 0 0 6px; max-width: 580px; }
.site-foot nav { display: flex; gap: 18px; }

@media (max-width: 980px) {
  .hero .wrap.split { grid-template-columns: 1fr; gap: 36px; }
  .verdict { max-width: 560px; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .site-nav { display: none; }
  .site-head .wrap { height: 56px; gap: 12px; }
  .wordmark { font-size: 14.5px; white-space: normal; line-height: 1.25; }
  .hide-sm { display: none; }
  .hero { padding-top: 40px; }
  .lead { font-size: 17.5px; }
  .verdict { padding: 20px 18px; border-radius: 18px; }
  .picks li { grid-template-columns: 28px 1fr; gap: 2px 10px; padding: 12px; }
  .picks .for, .picks .price { grid-column: 2; text-align: left; }
  .facts { grid-template-columns: 1fr; }
  .facts dt, .facts dd { grid-area: auto !important; }
  .cols, .tasks { grid-template-columns: 1fr; }
  .spectrum ol { grid-template-columns: 1fr; }
  .sources dl { grid-template-columns: 1fr; gap: 2px; }
  .sources dd { margin-bottom: 10px; }
  main > section { padding-top: 64px; }
  .site-foot { margin-top: 80px; }
}


/* Story tool (aistorywriter.io) */
.tool { border-radius: 22px; padding: clamp(18px, 3vw, 30px); background: var(--frame); max-width: 860px; }
.tool label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.tool textarea { width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 17px; line-height: 1.5; padding: 14px 16px; border: 0; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,40,.06); }
.tool textarea:focus, .tool select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tool .row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 18px; }
.tool select { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,40,.06); }
.tool .go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn { font: inherit; font-size: 15px; font-weight: 600; border-radius: 999px; padding: 11px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none; display: inline-block; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--rule-strong); }
.tool .hint { font-size: 13px; color: var(--muted); margin: 0; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; align-items: center; }
.examples .label { font-size: 13px; color: var(--muted); }
.tool .chip { background: rgba(255,255,255,.7); }
.tool .chip:hover { background: #fff; }
.status { font-size: 14px; color: var(--muted); min-height: 1.4em; margin: 14px 0 0; }
.status.err { color: #9b2c2c; }
.story { max-width: 680px; margin: 28px 0 0; }
.story:empty { display: none; }
.story h3 { font-size: 26px; margin: 0 0 16px; }
.story p { font-size: 18px; line-height: 1.7; margin: 0 0 1em; }
.story-actions { display: none; gap: 10px; margin: 8px 0 0; flex-wrap: wrap; }
.story-actions.on { display: flex; }
.cta-line { margin-top: 18px; font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px) { .tool .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .story p { font-size: 17px; } }


/* More on this site */
ul.more { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 40px; max-width: 900px; }
ul.more li { padding: 12px 0; }
ul.more a { display: inline-block; font-weight: 600; text-decoration: none; margin-bottom: 2px; }
ul.more a::after { content: " \2192"; color: var(--muted); font-weight: 400; }
ul.more a:hover { text-decoration: underline; }
ul.more span { display: block; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.cta-line .hint { font-size: 14px; color: var(--muted); margin-left: 10px; }
@media (max-width: 760px) { ul.more { grid-template-columns: 1fr; gap: 0; } }


/* Keep prose and sources sections aligned with the page grid */
.wrap.prose, .wrap.sources { max-width: var(--wide); }
.wrap.prose > * { max-width: var(--text); }
.wrap.prose > .shot { max-width: 820px; }
.wrap.sources > * { max-width: 860px; }


/* Prompt generator (aistorywriter.io) */
.promptgen { background: var(--soft); border-radius: 22px; padding: clamp(20px, 3vw, 32px); max-width: 860px; }
.promptgen .prompt-out { font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: var(--head-track); font-size: clamp(21px, 2.4vw, 26px); line-height: 1.35; margin: 0 0 20px; min-height: 2.7em; }
.promptgen .go { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.promptgen .hint { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.random-note { font-size: 15px; color: var(--ink-2); margin: 14px 0 0; max-width: 760px; }

/* Tool output lists (openings, chapter outlines) */
.story ol.openings { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.story ol.openings li { display: grid; gap: 4px; }
.story ol.openings .kind { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.story ol.openings .line { font-family: var(--head-font); font-size: 20px; line-height: 1.45; }
.story ol.chapters { padding-left: 22px; margin: 8px 0 0; display: grid; gap: 10px; }
.story ol.chapters li { font-size: 16.5px; line-height: 1.55; }
.story ol.chapters li::marker { color: var(--muted); }
.tool input[type=text] { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,40,.06); }
.tool input[type=text]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tool .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
@media (max-width: 760px) { .tool .pair { grid-template-columns: 1fr; } }
