/* Suntide quiz lab. Fonts and colours are placeholders. */
:root {
  --bg: #faf7f2; --paper: #ffffff; --soft: #f2ece2; --rule: #e2dacd;
  --ink: #1e2a32; --muted: #56626b; --sun: #c96a14; --sun-soft: rgba(217, 130, 43, .14);
  --action: #1f4e5a; --action-ink: #ffffff; --err: #a3301c; --focus: #0b57d0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 650; }
h2 { font-size: 1.3rem; line-height: 1.25; margin-top: 2.6rem; margin-bottom: .7rem; font-weight: 650; }
h3 { font-size: 1.05rem; margin-top: 1.6rem; margin-bottom: .5rem; font-weight: 650; }
p + p { margin-top: .8rem; }
a { color: var(--action); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1:focus { outline: none; }

/* top bar + switcher */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--rule); background: var(--paper); position: relative; }
.skip { position: absolute; left: -999px; top: 6px; background: var(--paper); padding: 6px 10px; z-index: 5; }
.skip:focus { left: 8px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { font-weight: 400; color: var(--muted); }
.top ul { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
.top nav a { display: block; padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .9rem; white-space: nowrap; }
.top nav a:hover { background: var(--soft); }
.top nav a[aria-current] { background: var(--action); color: var(--action-ink); }
.wide { opacity: .85; }
@media (max-width: 760px) { .wide { display: none; } .top { padding: 8px 12px; } .top nav a { padding: 6px 9px; } .brand span { display: none; } }

.wrap { max-width: 1120px; margin: 0 auto; padding: 40px 20px 72px; }
.wrap.narrow { max-width: 680px; }
.wrap.result { max-width: 820px; }
.wrap.doc { max-width: 1120px; }
.kicker { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.lede { font-size: 1.2rem; line-height: 1.45; margin-top: .9rem; max-width: 40em; }
.hint { color: var(--muted); font-size: .9rem; margin-top: .7rem; }
.intro { padding-top: 6vh; }
.intro .btn { margin-top: 1.6rem; }

.btn { font: inherit; font-weight: 600; background: var(--action); color: var(--action-ink); border: 2px solid var(--action); border-radius: 999px; padding: 10px 22px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(1.12); }
.btn.big { padding: 13px 32px; font-size: 1.05rem; }
.btn.ghost { background: transparent; color: var(--action); }

/* questions */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.split .qcol { grid-column: 1; grid-row: 1; }
.linepanel { grid-column: 2; grid-row: 1; position: sticky; top: 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; padding: 20px; }
.linepanel .kicker { margin-bottom: .2rem; }
.live { color: var(--muted); font-size: .95rem; min-height: 2.9em; margin-top: .4rem; }
@media (max-width: 899px) {
  .split { display: block; padding-top: 0; }
  .linepanel { top: 0; z-index: 3; margin: 0 -20px 18px; border-radius: 0; border-width: 0 0 1px; padding: 10px 20px 8px; }
  .live { min-height: 2.6em; font-size: .85rem; margin-top: 0; }
  .wrap { padding-top: 28px; }
}
.progress { font-size: .85rem; color: var(--muted); }
.bar { height: 4px; background: var(--rule); border-radius: 4px; margin: 8px 0 26px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--sun); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.qtext { display: block; font-size: clamp(1.45rem, 3.4vw, 2rem); line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
.help { color: var(--muted); margin: .6rem 0 1.2rem; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.opt:hover { border-color: var(--action); }
.opt input { margin: .3em 0 0; width: 18px; height: 18px; accent-color: var(--action); flex: none; }
.opt:has(input:checked) { border-color: var(--action); background: #eef4f5; }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt input:focus-visible { outline: none; }
.actions { display: flex; justify-content: space-between; margin-top: 24px; }
.err { color: var(--err); font-size: .92rem; margin-top: .4rem; min-height: 0; }
.err:empty { display: none; }

/* chart */
.chart { width: 100%; }
.chart svg { display: block; max-width: 100%; }
.grid { stroke: var(--rule); stroke-dasharray: 2 5; }
.base { stroke: var(--rule); }
.tick { font-size: 12px; fill: var(--muted); }
.line { fill: none; stroke: var(--sun); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.area { fill: var(--sun-soft); }
.band { fill: rgba(217, 130, 43, .16); }
.ref { fill: none; stroke: #7d8a93; stroke-width: 2; stroke-dasharray: 5 6; stroke-linecap: round; }
.dot { fill: var(--paper); stroke: var(--sun); stroke-width: 3; }
.note { font-size: 13px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.focus { fill: rgba(31, 78, 90, .08); }
.focus-t { font-size: 11px; fill: var(--action); letter-spacing: .06em; text-transform: uppercase; }
.bigchart { background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; padding: 20px; margin-top: 1.8rem; }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .88rem; color: var(--muted); margin-top: .6rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.key { width: 26px; height: 0; border-top: 4px solid var(--sun); border-radius: 2px; }
.key.k-ref { border-top: 2px dashed #7d8a93; }
.key.k-band { height: 12px; border: 0; background: rgba(217, 130, 43, .25); }
.key.k-focus { height: 12px; border: 0; background: rgba(31, 78, 90, .14); }
.plain { font-size: .95rem; margin-top: .6rem; color: var(--muted); }

/* result */
.hero-type { display: flex; gap: 20px; align-items: center; }
.hero-type .mark { flex: none; }
.sub { color: var(--muted); font-size: 1.1rem; margin-top: .25rem; display: block; }
.callout { background: var(--soft); border-left: 4px solid var(--sun); border-radius: 0 10px 10px 0; padding: 14px 16px; margin-top: 1.4rem; }
.person { font-size: 1.08rem; margin-top: 1.6rem; max-width: 40em; }
.day { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 1.2rem; }
.day > div { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; }
.day dt { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.day dd { margin: 0; }
.profile .day { margin-top: 0; }
.recs { padding-left: 1.3em; }
.recs li + li { margin-top: .5rem; }
.try { background: var(--paper); border: 1.5px solid var(--sun); border-radius: 14px; padding: 4px 20px 18px; margin-top: 2rem; }
.try h2, .try h3 { margin-top: 1rem; }
.again { margin-top: 2.4rem; }
@media (max-width: 640px) { .day { grid-template-columns: 1fr; } .hero-type { gap: 14px; } .hero-type .mark { width: 64px; height: 64px; } }

.plan, .emails { list-style: none; padding: 0; margin-top: 1rem; display: grid; gap: 8px; }
.plan li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: baseline; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px; }
.plan .d { font-weight: 650; }
.src { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.src.goal { color: var(--sun); }
.emails li { border-left: 3px solid var(--rule); padding: 2px 0 2px 14px; }
.emails li span { display: block; color: var(--muted); font-size: .95rem; }
.emails li span.src { font-size: .74rem; color: var(--sun); }
@media (max-width: 640px) { .plan li { grid-template-columns: 1fr; gap: 2px; } }

/* share */
.share, .signup, .gallery, .compare { margin-top: 3rem; padding-top: .4rem; border-top: 1px solid var(--rule); }
.share-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; margin-top: 1.1rem; align-items: start; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; padding: 22px; text-align: center; box-shadow: 0 6px 24px rgba(30, 42, 50, .06); }
.card .c-k { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: .5rem 0; }
.card .c-t { font-size: 1.6rem; font-weight: 650; line-height: 1.15; margin: .2rem 0 0; }
.card .c-s { color: var(--muted); margin: .1rem 0 0; }
.card .c-q { font-size: .88rem; color: var(--muted); margin-top: .9rem; }
.share-ctl label, .field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=tel] { font: inherit; width: 100%; padding: 11px 13px; border: 1.5px solid #9aa5ac; border-radius: 10px; background: var(--paper); color: var(--ink); }
input[aria-invalid=true] { border-color: var(--err); }
.row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 700px) { .share-grid { grid-template-columns: 1fr; } .card { max-width: 320px; } }

/* sign-up */
.signup form { max-width: 520px; margin-top: 1.2rem; }
.field { margin-bottom: 16px; }
.opt-tag { font-weight: 400; color: var(--muted); font-size: .85rem; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--action); }
.honest { background: #fff6dc; border: 1px solid #e6cf8a; border-radius: 10px; padding: 10px 14px; font-size: .92rem; margin: 18px 0; }
.done { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 6px 20px 20px; margin-top: 1.2rem; }
.done:focus { outline: none; }
.done h3 { margin-top: 1rem; }
details summary { cursor: pointer; font-weight: 600; margin-top: .8rem; }
.kv { border-collapse: collapse; width: 100%; margin-top: .6rem; font-size: .85rem; table-layout: fixed; }
.kv th, .kv td { text-align: left; padding: 5px 8px 5px 0; border-top: 1px solid var(--rule); vertical-align: top; font-weight: 400; overflow-wrap: anywhere; }
.kv th { color: var(--muted); width: 42%; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }

/* gallery + banner */
.gcard { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 0 18px; margin-top: 10px; }
.gcard[open] { padding-bottom: 18px; }
.gcard summary { display: flex; align-items: center; gap: 14px; padding: 12px 0; margin: 0; list-style: none; }
.gcard summary::-webkit-details-marker { display: none; }
.gcard summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--muted); font-weight: 400; }
.gcard[open] summary::after { content: "\2212"; }
.gcard summary .sub { font-size: .92rem; font-weight: 400; margin: 0; }
.gcard .person { margin-top: .8rem; font-size: 1rem; }
.banner { background: var(--action); color: #fff; border-radius: 14px; padding: 16px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 2rem; }
.banner .btn { background: #fff; color: var(--action); border-color: #fff; }

/* home */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 2.4rem; }
.vcard { background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: .6rem; }
.vcard h2 { margin: 0; }
.vcard .tagline { color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.vcard .btn { margin-top: auto; align-self: flex-start; }
.vcard .meta { font-size: .88rem; color: var(--muted); }
.types-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 1rem; }
.types-row div { text-align: center; font-size: .82rem; color: var(--muted); }
.types-row strong { display: block; color: var(--ink); font-size: .9rem; margin-top: 4px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } .types-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* behind (document style) */
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.doc h2 { font-size: 1.45rem; margin-top: 3.4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.doc p, .doc li { max-width: 78ch; }
.draft { display: inline-block; background: #fff6dc; border: 1px solid #e6cf8a; border-radius: 999px; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; padding: 2px 10px; margin-left: 8px; vertical-align: middle; font-weight: 600; white-space: nowrap; }
.toc { columns: 2; padding-left: 1.2em; margin-top: 1rem; font-size: .95rem; }
.tscroll { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
table.t { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.t th, table.t td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.t thead th { background: var(--soft); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
table.t tr:last-child td, table.t tr:last-child th { border-bottom: 0; }
table.t td.n { text-align: center; font-variant-numeric: tabular-nums; }
table.t td.n.hi { font-weight: 700; color: var(--sun); }
table.t code, .doc code { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 1rem; }
.tcard { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 16px; }
.tcard h3 { margin: 0; font-size: 1.1rem; }
.tcard .sub { font-size: .9rem; margin: 0 0 .4rem; }
.tcard .chart { margin: .4rem 0; }
.tcard p { font-size: .92rem; }
.tcard .pts { font-family: ui-monospace, Consolas, monospace; font-size: .72rem; color: var(--muted); margin-top: .5rem; overflow-wrap: anywhere; }
.qblock { margin-top: 2rem; }
.qblock h3 { font-size: 1.1rem; }
.qblock .dim { color: var(--muted); font-weight: 400; font-size: .9rem; }
.oq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 1rem; }
.oq > div { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 6px 18px 18px; }
.oq ul, .doc ul { padding-left: 1.2em; }
.oq li + li, .doc li + li { margin-top: .5rem; }
.oq li { font-size: .93rem; }
@media (max-width: 900px) { .tgrid, .oq { grid-template-columns: 1fr; } .toc { columns: 1; } }

.foot { border-top: 1px solid var(--rule); padding: 22px 20px 36px; color: var(--muted); font-size: .84rem; text-align: center; }
.foot p { max-width: 780px; margin-left: auto; margin-right: auto; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
