/* Gladsay "dark + gold": the ONE shared sheet for free-tool and guide pages. Load after /tokens-1.css.
   Source of truth: .claude/skills/gladsay-design/SKILL.md. Dark tokens come from tokens-1.css.
   The only literal colours here are in the :root block below: the skill's LIGHT theme values, used solely inside
   preview frames that show what a customer-facing wall, card or email will look like (skill: those stay light),
   plus the exact palette the wall generator's exported snippet uses (gen.js), so the preview matches the export. */
:root {
  --lt-bg:#fbfaf7; --lt-panel:#ffffff; --lt-line:#e4e1d9; --lt-ink:#17150f; --lt-muted:#5d584c;
  --twx-fg:#17202b; --twx-mut:#566170; --twx-dark-bg:#14181d; --twx-dark-fg:#f1f3f5; --twx-dark-mut:#aab2bd; --twx-dark-line:#2c333b;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

/* Page head: nav from tokens-1.css, then the page-kind chip ("Free tool" / "Not live yet"). */
.page-kind { margin:24px 0 0; }
.pill { display:inline-block; font-size:13px; color:var(--muted); border:1px solid var(--line); border-radius:99px; padding:5px 12px; }

/* Article typography: one readable column, max 68ch. */
main { overflow-wrap:break-word; }
h1 { font-size:clamp(32px,5.2vw,48px); font-weight:700; line-height:1.08; letter-spacing:-.03em; margin:20px 0 16px; max-width:22ch; overflow-wrap:anywhere; }
h2 { font-size:28px; font-weight:700; line-height:1.2; letter-spacing:-.02em; margin:0 0 16px; max-width:30ch; }
h3 { font-size:18px; font-weight:650; line-height:1.3; margin:24px 0 8px; }
p, ul, ol, dl { max-width:68ch; }
p { margin:0 0 16px; }
.lead { font-size:19px; color:var(--muted); max-width:58ch; margin:0 0 32px; overflow-wrap:anywhere; }
main a { color:var(--ink); text-decoration:underline; text-decoration-color:var(--gold); text-underline-offset:3px; }
main a:hover { color:var(--gold); }
section { padding:48px 0; border-top:1px solid var(--line); }
ul.tips, ol.tips { padding-left:22px; margin:0 0 16px; }
ul.tips li, ol.tips li { margin:8px 0; }
li::marker { color:var(--muted); }
.byline { font-size:14px; color:var(--muted); margin:-4px 0 20px; }
.note { font-size:14px; color:var(--muted); overflow-wrap:anywhere; }

/* Callouts are panels: tone and a border, never a coloured fill. */
.cta, .fict, .warn, blockquote.ex, ul.ex-list li { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:20px 24px; max-width:68ch; overflow-wrap:anywhere; }
.cta > :last-child, .fict > :last-child, .warn > :last-child, blockquote.ex > :last-child { margin-bottom:0; }
.fict, .warn { border-color:var(--gold-soft-line); background:var(--gold-soft-bg); color:var(--ink); }
blockquote.ex { margin:16px 0; }
blockquote.ex p { margin:0 0 8px; }
ul.ex-list { list-style:none; padding:0; margin:0 0 16px; }
ul.ex-list li { margin:12px 0; }
main a.btn { margin-top:8px; text-decoration:none; color:var(--gold-ink); }
main a.btn:hover { color:var(--gold-ink); }
main a.btn.ghost, main a.btn.ghost:hover { color:var(--ink); }

/* Tables: scroll sideways inside their own frame on phones, never the page. */
.tablewrap { overflow-x:auto; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
table { border-collapse:collapse; width:100%; min-width:520px; font-size:14px; }
th, td { text-align:left; vertical-align:top; padding:13px 20px; border-bottom:1px solid var(--line); }
tr:last-child td { border-bottom:0; }
th { font-size:12px; font-weight:600; color:var(--muted); }
/* Comparison tables: row labels read as labels (--ink, 14px), our column sits on --panel-2, links get a 44px-tall hit area via line-height. */
.cmp { margin-bottom:16px; }
.cmp table { min-width:640px; }
.cmp thead th { font-size:13px; color:var(--ink); border-bottom-color:var(--control-line); }
.cmp th[scope=row] { font-size:14px; color:var(--ink); width:24%; }
.cmp td { color:var(--muted); width:38%; }
.cmp td:nth-child(2) { background:var(--panel-2); color:var(--ink); }
.scroll-hint { display:none; }

/* Code. */
code { font-family:var(--mono); font-size:.9em; overflow-wrap:anywhere; }
:not(pre) > code { background:var(--panel-2); border:1px solid var(--line); border-radius:8px; padding:1px 5px; }
pre { background:var(--panel); color:var(--ink); border:1px solid var(--line); padding:16px 20px; border-radius:14px; overflow-x:auto; font-size:14px; line-height:1.5; max-width:68ch; white-space:pre-wrap; overflow-wrap:anywhere; }

/* Tool forms: visible labels, 16px inputs on --panel-2 with a --control-line edge, 44px controls. */
.panel, form.gen { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:24px; margin-bottom:16px; }
form.gen { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.panel h2 { font-size:20px; }
label { display:block; font-size:14px; font-weight:600; color:var(--muted); margin:0 0 6px; }
input, select, textarea { width:100%; min-height:44px; padding:11px 14px; border:1px solid var(--control-line); border-radius:8px; background:var(--panel-2); color:var(--ink); font:inherit; font-size:16px; }
input::placeholder, textarea::placeholder { color:var(--muted); opacity:1; }
input[type=color] { padding:2px; height:44px; }
input[type=checkbox], input[type=radio] { width:20px; height:20px; min-height:0; padding:0; flex:none; accent-color:var(--gold); }
textarea { resize:vertical; }
fieldset { border:1px solid var(--line); border-radius:8px; margin:0 0 12px; padding:12px 16px; }
legend { font-size:14px; font-weight:600; color:var(--muted); padding:0 6px; }
/* Same convention as .btn / .btn.ghost and the dashboard: a bare button is a ghost; the one gold primary of a tool page is button.primary. */
button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:11px 18px; border:1px solid var(--control-line); border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:15px; font-weight:650; cursor:pointer; }
button:hover { background:var(--panel-2); border-color:var(--muted); }
button.primary { background:var(--gold); color:var(--gold-ink); border-color:var(--gold); }
button.primary:hover { background:var(--gold-d); border-color:var(--gold-d); }
button.small { font-size:14px; }
.actions { grid-column:1/-1; }
.err { color:var(--danger); font-weight:600; margin:12px 0 0; min-height:1.4em; }
.status { margin-left:12px; font-size:14px; color:var(--ok); font-weight:600; }
.bar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.bar-flush { margin-bottom:0; }
.bar .push-end { margin-left:auto; }
.undo-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:12px 0 0; padding:8px 8px 8px 12px; background:var(--panel-2); border:1px solid var(--line); border-radius:8px; color:var(--ink); font-size:14px; max-width:none; }
.undo-bar[hidden] { display:none; }
.rows-gap { margin-top:16px; }
.stars-gap { margin-top:12px; }
.opts { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:16px; }
.two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.row { border:1px solid var(--line); border-radius:8px; padding:16px; margin:0 0 12px; background:var(--bg); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.row .q { grid-column:1/-1; }
.row .foot { grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.row .foot span { font-size:14px; color:var(--muted); }
.sample-flag { display:none; margin:12px 0 0; background:var(--gold-soft-bg); border:1px solid var(--gold-soft-line); color:var(--ink); border-radius:8px; padding:8px 12px; font-weight:600; font-size:14px; max-width:none; }
.sample-flag.on { display:block; }
ul.cands { list-style:none; margin:0; padding:0; max-width:none; }
ul.cands li { margin:0 0 8px; }
ul.cands label { display:flex; gap:12px; align-items:flex-start; min-height:44px; font-weight:400; color:var(--ink); font-size:16px; border:1px solid var(--control-line); border-radius:8px; padding:11px 14px; background:var(--panel-2); cursor:pointer; margin:0; }
ul.cands input { margin-top:2px; }
ul.cands .meta { display:block; font-size:13px; color:var(--muted); }
.stars label { display:inline-flex; gap:8px; align-items:center; min-height:44px; min-width:44px; font-weight:400; color:var(--ink); margin:0 16px 0 0; }

/* Tool output: code to copy stays dark (it is our UI); previews of customer-facing things are LIGHT in a frame. */
textarea#out, #html { font:14px/1.45 var(--mono); min-height:220px; }
textarea#out { white-space:pre; overflow:auto; }
#html { min-height:11rem; }
textarea.tpl { font:14px/1.5 var(--mono); min-height:30rem; white-space:pre-wrap; }
#results { display:grid; gap:16px; margin-top:24px; }
.email { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:24px; }
.email h3 { margin:0 0 8px; }
.subj { font-weight:600; margin:0 0 12px; overflow-wrap:anywhere; max-width:none; }
.subj span { color:var(--muted); font-weight:400; }
/* Email body as the customer will read it: light. */
pre.body { font:inherit; margin:0 0 16px; padding:16px 20px; max-width:none; background:var(--lt-panel); color:var(--lt-ink); border:1px solid var(--control-line); border-radius:8px; }
/* Wall / card preview frame: light, bordered. */
#preview { border:1px solid var(--control-line); border-radius:14px; padding:16px; background:var(--lt-bg); color:var(--lt-ink); overflow:hidden; }
#preview:empty { background:var(--panel); color:var(--muted); border-style:dashed; }
#preview:empty::before { content:"Add a testimonial above to see a preview."; }

/* Preview of the generated wall snippet: same rules as gen.js CSS, colours via the :root block above. */
.tw-wall { --tw-bg:var(--lt-panel); --tw-fg:var(--twx-fg); --tw-mut:var(--twx-mut); --tw-line:var(--lt-line); font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:var(--tw-fg); background:var(--tw-bg); padding:16px; border-radius:12px; box-sizing:border-box; }
.tw-dark { --tw-bg:var(--twx-dark-bg); --tw-fg:var(--twx-dark-fg); --tw-mut:var(--twx-dark-mut); --tw-line:var(--twx-dark-line); }
.tw-list { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.tw-single .tw-list { grid-template-columns:minmax(0,560px); justify-content:center; }
.tw-carousel .tw-list { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:14px; padding-bottom:8px; }
.tw-carousel .tw-card { flex:0 0 min(320px,85%); scroll-snap-align:start; }
.tw-card { margin:0; padding:18px; border:1px solid var(--tw-line); border-top:4px solid var(--tw-accent); border-radius:10px; background:var(--tw-bg); }
.tw-stars { color:var(--tw-accent); letter-spacing:2px; margin-bottom:6px; }
.tw-card blockquote { margin:0 0 12px; overflow-wrap:anywhere; }
.tw-card figcaption { font-size:.9rem; color:var(--tw-mut); }
.tw-card figcaption strong { display:block; color:var(--tw-fg); }
.tw-badge { margin:12px 0 0; font-size:.75rem; text-align:right; color:var(--tw-mut); max-width:none; }
.tw-badge a { color:inherit; }
/* Preview of the exported quote card: mirrors the inline styles fmt.js emits (the preview strips them; CSP forbids style=). */
#preview figure { margin:0; max-width:34rem; padding:20px 22px; background:var(--lt-panel); color:var(--twx-fg); border:1px solid var(--lt-line); border-left:4px solid var(--card-accent,var(--twx-fg)); border-radius:10px; font:16px/1.55 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; }
#preview figure > p { margin:0 0 8px; color:var(--card-accent,var(--twx-fg)); font-size:1.1rem; letter-spacing:2px; }
#preview figure blockquote { margin:0; }
#preview figure blockquote p { margin:0; }
#preview figcaption { margin-top:12px; font-size:.92rem; color:var(--twx-mut); }
#preview figcaption strong { color:var(--twx-fg); }

/* Footer: same structure as the landing (site-9.css is landing-only, so the rules live here too). */
footer { margin-top:48px; padding:72px 0 56px; border-top:1px solid var(--line); color:var(--muted); font-size:14px; }
/* Three groups here: the landing also lists the comparison pages, which are noindex for now (test/seo_onpage.test.ts: indexed pages link only to indexed pages). */
.foot-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px 24px; }
.foot-nav.four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.foot-nav h3 { font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:.12em; color:var(--muted); margin:0 0 4px; }
.foot-nav ul { list-style:none; padding:0; margin:0; max-width:none; }
.foot-nav a { display:flex; align-items:center; min-height:44px; padding:8px 0; line-height:1.35; color:var(--ink); text-decoration:none; }
.foot-nav a:hover { text-decoration:underline; }
.foot-notes { margin-top:48px; padding-top:24px; border-top:1px solid var(--line); }
.foot-notes p { margin:0 0 8px; max-width:70ch; font-size:13px; line-height:1.9; overflow-wrap:anywhere; }
.foot-notes a { color:var(--ink); }

@media (max-width:900px) { .foot-nav, .foot-nav.four { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) {
  section { padding:32px 0; }
  .panel, form.gen, .email { padding:16px; }
  .row, .two { grid-template-columns:1fr; }
  th, td { padding:12px; }
  .scroll-hint { display:block; margin:8px 0 0; }
  footer { padding:56px 0 48px; }
}

/* Waitlist status line on pages that reuse /waitlist.js (it sets .ok or .err on #msg). */
#msg.ok { color:var(--ok); font-weight:600; }
