/* Askvue: reads like an analyst's report, not a SaaS dashboard. */
:root {
  --ink: #15172B; --paper: #FFFFFF; --surface: #F4F4FB; --rule: #DADCEB; --muted: #5C607A;
  --accent: #4338CA; --accent-dark: #3730A3; --good: #0F8A5F; --warn: #C27803; --bad: #B42334;
  --radius: 6px; --max: 1080px; --font: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--font); color: var(--ink); background: var(--paper); }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1rem; max-width: 70ch; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 60px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .45rem; letter-spacing: -.02em; }
.brand .mark { width: 22px; height: 22px; background: var(--accent); border-radius: 6px; display: inline-block; position: relative; }
.brand .mark::after { content: ''; position: absolute; left: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
nav.main { margin-left: auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .35rem 0; }
nav.main a:hover { text-decoration: underline; }
main { padding: 2rem 0 4rem; }
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; padding: 1.5rem 0; }
.site-footer .wrap { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 1rem var(--font); padding: .65rem 1.1rem; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.quiet { border-color: var(--rule); font-weight: 500; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.block { width: 100%; }
label { display: block; font-weight: 600; margin: .9rem 0 .3rem; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], textarea, select { width: 100%; font: 400 1rem var(--font); padding: .6rem .7rem; border: 1.5px solid var(--rule);
  border-radius: var(--radius); background: #fff; color: var(--ink); min-height: 44px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid #C7D2FE; outline-offset: 1px; }
.hint { color: var(--muted); font-size: .9rem; margin: .25rem 0 0; }
.notice { border-left: 4px solid var(--warn); background: #FFF7E6; padding: .75rem 1rem; margin: 1rem 0; }
.notice.ok { border-color: var(--good); background: #E8F6F0; }
.notice.bad { border-color: var(--bad); background: #FBEBEC; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2.wide-left { grid-template-columns: 3fr 2fr; } }
.panel { border: 1px solid var(--rule); border-top: 6px solid var(--accent); padding: 1.25rem; background: var(--paper); border-radius: var(--radius); }
.panel h2 { margin-top: 0; }

/* Landing */
.hero { padding: 2.5rem 0 1rem; }
.hero .lede { font-size: 1.2rem; max-width: 58ch; }
.proof { display: flex; gap: 1.25rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.proof li { padding-left: 1.1rem; position: relative; }
.proof li::before { content: ''; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; background: var(--accent); border-radius: 50%; }
.sample .tiles { grid-template-columns: 1fr 1.8fr; }
.sample { border: 1px solid var(--rule); background: var(--surface); padding: 1.25rem; font-size: .92rem; border-radius: var(--radius); }
.how { margin: 3rem 0; }
.how ol { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
@media (min-width: 700px) { .how ol { grid-template-columns: repeat(3, 1fr); } }
.how li { counter-increment: step; border-top: 2px solid var(--accent); padding-top: .75rem; }
.how li::before { content: counter(step); font-weight: 800; font-size: 1.6rem; display: block; color: var(--accent); }
.plans { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { border: 1px solid var(--rule); padding: 1.25rem; display: flex; flex-direction: column; border-radius: var(--radius); }
.plan.featured { border: 2px solid var(--accent); }
.plan .price { font-size: 2.2rem; font-weight: 800; line-height: 1; margin: .25rem 0; letter-spacing: -.02em; }
.plan .price small { font-size: .95rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan ul { padding-left: 1.1rem; margin: .5rem 0 1rem; flex: 1; }
.plan li { margin: .25rem 0; }
.faq dt { font-weight: 600; margin-top: 1rem; }
.faq dd { margin: .25rem 0 0; max-width: 70ch; }
.cta { margin-top: 2rem; }

/* Dashboard blocks */
.tiles { display: grid; gap: 1rem; margin: 1rem 0 1.5rem; }
@media (min-width: 760px) { .tiles { grid-template-columns: 1fr 1.4fr 1.4fr; } }
.tile { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--paper); min-width: 0; }
.tile .label { display: block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .5rem; }
.tile.score .big { font-size: 3.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; display: block; color: var(--accent); }
.tile .delta { display: inline-block; font-weight: 600; font-size: .9rem; margin-top: .35rem; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.tile .hint { display: block; }
.bars { display: grid; gap: .45rem; }
.bar { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 3rem; gap: .6rem; align-items: center; font-size: .9rem; }
.bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .name small { color: var(--muted); font-weight: 600; }
.bar .track { height: 12px; background: var(--surface); border-radius: 6px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--rule); }
.bar.tracked .fill { background: #A5B4FC; }
.bar.ours .fill { background: var(--accent); }
.bar.ours .name { font-weight: 700; }
.bar .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
svg.trend { width: 100%; height: auto; display: block; }
svg.trend .grid { stroke: var(--rule); stroke-width: 1; }
svg.trend .axis { font: 10px var(--font); fill: var(--muted); }
svg.trend .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
svg.trend .dot { fill: var(--accent); }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; }
.pill.yes { background: #E0E7FF; color: var(--accent-dark); } .pill.no { background: #FBEBEC; color: var(--bad); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.list th { font-weight: 600; font-size: .85rem; color: var(--muted); }
table.list a.title { font-weight: 600; color: var(--ink); }
table.list tr.ours td { font-weight: 600; } table.list tr.ours small { color: var(--accent); font-weight: 600; }
table.prompts summary { cursor: pointer; font-weight: 500; }
table.prompts .answer { margin: .6rem 0 .3rem; padding: .75rem; background: var(--surface); border-radius: var(--radius); font-size: .92rem; max-width: 72ch; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.empty { border: 1.5px dashed var(--rule); padding: 2rem; text-align: center; color: var(--muted); border-radius: var(--radius); }
.paywall { border: 1px solid var(--rule); border-top: 6px solid var(--warn); padding: 1.25rem; margin: 1rem 0; border-radius: var(--radius); }
.paywall .row { margin-top: .75rem; }
.auth { max-width: 420px; }
input.code { font: 700 2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .4em; text-align: center; }
.actions { padding-left: 1.2rem; } .actions li { margin: .35rem 0; }

/* Print / PDF report */
body.print { font-size: 10.5pt; background: #fff; }
.doc { max-width: 190mm; margin: 0 auto; padding: 8mm 0; position: relative; }
.doc-head { border-bottom: 3px solid var(--accent); padding-bottom: 4mm; margin-bottom: 4mm; display: grid; grid-template-columns: 1fr auto; gap: 4mm; }
.doc-head h1 { font-size: 20pt; margin: 0; }
.doc-head .kind { font-weight: 700; font-size: 9pt; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.doc h2 { font-size: 12.5pt; border-bottom: 1px solid var(--rule); padding-bottom: 1mm; margin: 5mm 0 2mm; }
.doc .tiles { grid-template-columns: 1fr 1.4fr 1.4fr; }
.doc .tile.score .big { font-size: 28pt; }
.doc table.list { font-size: 9pt; }
.doc table.prompts details { display: block; } .doc table.prompts summary { list-style: none; }
.doc table.prompts .answer { display: block; }
.doc .grid-2 { grid-template-columns: 1fr 1fr; }
.doc-foot { margin-top: 6mm; font-size: 8pt; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 2mm; }
.watermark { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 10; }
.watermark span { font-weight: 800; font-size: 64pt; color: rgba(180, 35, 52, .14); transform: rotate(-28deg); border: 6pt solid rgba(180, 35, 52, .14); padding: 4mm 10mm; }
@page { size: A4; margin: 12mm; }
@media print { .doc { max-width: none; padding: 0; } tr { page-break-inside: avoid; } }
/* Generating state: staged list plus a bar that eases toward done */
.gen { margin-top: 2rem; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.gen-bar { display: block; height: 6px; margin: .5rem 0 1rem; background: var(--surface); border-radius: 3px; overflow: hidden; }
.gen-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .4s ease-out; }
.gen ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.gen li { position: relative; padding-left: 1.75rem; color: var(--muted); transition: color .3s; }
.gen li::before { content: ''; position: absolute; left: 0; top: .2em; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--rule); box-sizing: border-box; }
.gen li.now { color: var(--ink); font-weight: 600; }
.gen li.now::before { border-color: var(--surface); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.gen li.done { color: var(--ink); }
.gen li.done::before { border-color: var(--good); background: var(--good); box-shadow: inset 0 0 0 3px var(--paper); }
#progress .gen-bar { margin: .6rem 0 0; }
.revealing .fill { transition: width .9s cubic-bezier(.2,.7,.2,1); }
.revealing .prompts tbody tr { animation: rise .45s ease-out both; }
.revealing .prompts tbody tr:nth-child(2) { animation-delay: .06s; } .revealing .prompts tbody tr:nth-child(3) { animation-delay: .12s; }
.revealing .prompts tbody tr:nth-child(4) { animation-delay: .18s; } .revealing .prompts tbody tr:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
/* Organisation setup: suggest helper and offering chips */
.suggest-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: .75rem 0 .25rem; }
.suggest-row .hint { margin: 0; flex: 1 1 220px; }
.btn.ai { background: #EEF0FF; border-color: #C7CBF7; color: var(--accent-dark); }
.btn.ai::before { content: '✦'; font-size: .85em; }
.offerings { margin: .5rem 0; padding: .75rem; background: var(--surface); border-radius: var(--radius); display: grid; gap: .6rem; }
.offerings .hint { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: grid; text-align: left; gap: 1px; padding: .45rem .7rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); cursor: pointer; font: inherit; color: var(--ink); }
.chip span { font-size: .8rem; color: var(--muted); }
.chip:hover { border-color: var(--accent); }
.chip.on { border-color: var(--accent); box-shadow: 0 0 0 2px #C7CBF7; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
