@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg-rgb: 5, 8, 15;
  --bg: rgb(var(--bg-rgb));
  --ink: #F2F4F8;
  --soft: #C6CEDD;
  --muted: #9BA6BC;
  --panel: rgba(10, 15, 28, .78);
  --accent-rgb: 246, 182, 87;
  --accent: rgb(var(--accent-rgb));
  --hi: 255, 255, 255;
  --shine: 255, 255, 255;
  --shadow: 0, 0, 0;
  --glass-ink: #fff;
  --card-solid: rgb(12, 17, 30);
}
/* Light theme: on screen only, so the printed report stays dark. */
@media screen {
  html[data-theme="light"] {
    color-scheme: light;
    --bg-rgb: 246, 244, 239;
    --ink: #14181F;
    --soft: #3A4252;
    --muted: #5E6678;
    --panel: rgba(255, 255, 255, .72);
    --accent-rgb: 154, 94, 13;
    --hi: 20, 24, 31;
    --shadow: 40, 30, 10;
    --glass-ink: #14181F;
    --card-solid: #FBFAF6;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.6 "Plus Jakarta Sans", system-ui, sans-serif;
  text-align: center;
}
#flow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
header, main, footer { position: relative; }
header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  padding: .5rem 1rem;
  background: var(--panel);
  font-weight: 700;
}
header a { color: var(--soft); padding-block: .625rem; }
footer { padding: .75rem 1rem; background: var(--panel); color: var(--muted); }
footer p { margin: .125rem auto; }
#tagline { color: var(--soft); }
.credit a, .credit-link { color: var(--accent); }
main {
  flex: 1;
  display: grid;
  align-items: center;
  padding: clamp(1rem, 4vw, 3.5rem);
}
.screen {
  width: 100%;
  padding: clamp(1rem, 4vw, 4rem);
  background: var(--panel);
  border-radius: 1.5rem;
}
h1, h2, h3 { line-height: 1.13; text-wrap: balance; }
h1, h2 { margin: 0 auto 1rem; letter-spacing: -.035em; }
h1 { max-width: 23ch; font-size: clamp(2rem, 6.2vw, 5rem); }
h2 { font-size: clamp(1.625rem, 4vw, 3.5rem); }
h3 { margin: 0 0 .625rem; }
p { margin: 0 auto 1rem; color: var(--soft); }
.twin, .todo { color: var(--accent); font-weight: 700; }
.credit, .hint, .date { color: var(--muted); }
.lead { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
button {
  min-height: 44px;
  padding: .625rem 1rem;
  border: 0;
  border-radius: .75rem;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.primary { background: var(--accent); color: var(--bg); }
.primary:disabled { cursor: default; opacity: .55; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.primary:focus-visible { outline-color: var(--ink); }
.choices { display: grid; gap: .75rem; }
.choice {
  min-height: 64px;
  padding: 1rem;
  background: rgba(var(--hi),.08);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}
.choice[aria-pressed="true"], .choice:hover { background: rgba(var(--accent-rgb), .22); }
.choice[aria-disabled="true"] { cursor: default; }
.twin-response { min-height: 1.6em; margin: .75rem auto .25rem; }
.progress { display: flex; justify-content: center; align-items: center; gap: .65rem; min-height: 1.5rem; margin: 0 auto .625rem; }
.dot { width: .625rem; height: .625rem; border-radius: 50%; background: var(--muted); }
.dot.complete { background: var(--accent); }
.dot.current { width: .875rem; height: .875rem; background: var(--accent); }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 .5rem; }
.fields { display: flex; flex-wrap: wrap; justify-content: center; align-items: end; gap: .75rem 1.5rem; }
label { display: grid; gap: .25rem; min-width: 0; }
input[type="text"], textarea {
  min-height: 44px;
  width: min(100%, 18rem);
  justify-self: center;
  padding: .5rem .75rem;
  border: 0;
  border-radius: .5rem;
  background: rgba(var(--hi),.08);
  color: var(--ink);
  font: inherit;
  text-align: center;
}
.report-title { margin-block: 1rem .5rem; font-size: clamp(1.625rem, 3.1vw, 2.75rem); }
.report-block, .report-closing { margin-block: 1.5rem; }
.report-block p { max-width: 65ch; }
.copy-link { font-size: .875rem; }
.report-link a { color: var(--accent); overflow-wrap: anywhere; }
.report-keep { margin: 0 auto 1.5rem; }
.li-done svg { vertical-align: -4px; margin-right: .5rem; }
.quiet { min-height: 44px; padding-inline: .5rem; background: none; color: var(--muted); font-size: .875rem; font-weight: 400; text-decoration: underline; }
.copy-address { margin: .5rem auto 0; overflow-wrap: anywhere; }
.copy-address:empty { margin: 0; }
.answer-list {
  display: grid;
  gap: .5rem 1rem;
  margin: 0;
}
.answer-list div { padding: .75rem; border-radius: .75rem; background: rgba(var(--hi),.06); overflow-wrap: anywhere; }
dt { font-weight: 700; }
dd { margin: .125rem 0 0; color: var(--soft); }
.checklist { list-style: none; display: grid; gap: .5rem; width: min(100%, 56ch); margin: 0 auto; padding: 0; text-align: start; }
.checklist label { display: flex; gap: .65rem; align-items: baseline; min-height: 44px; padding-block: .375rem; cursor: pointer; }
.checklist input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; align-self: start; accent-color: var(--accent); }
.one-thing input { width: min(100%, 36rem); }
.talk-option { margin-top: .75rem; }
.talk-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  max-width: 100%;
  padding: .5rem 1.125rem;
  overflow: hidden;
  border: 2px solid rgba(var(--accent-rgb), .55);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .08);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), .2);
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
}
.talk-pill svg { flex: none; color: var(--accent); }
.talk-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(var(--accent-rgb), .3) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.talk-pill:hover, .talk-pill:focus-visible {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), .16);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), .45);
  filter: none;
}
@media (prefers-reduced-motion: no-preference) {
  .talk-pill::after { animation: talk-sweep 6s ease-in-out 1.5s infinite; }
  .talk-pill { transition: box-shadow .3s, background-color .3s, border-color .3s; }
}
@keyframes talk-sweep {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
#report-talk { margin: 0 0 1rem; }
.talk-hint { margin: .375rem auto 0; color: var(--muted); font-size: .75rem; }
.others { margin: 1.5rem auto 0; max-width: 40rem; }
.others h3 { color: var(--muted); font-size: .9375rem; }
.others ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.others li { padding: .625rem .875rem; border-radius: .75rem; background: rgba(var(--hi),.06); color: var(--soft); overflow-wrap: anywhere; }
.conversation-reflection { max-width: 48ch; margin-bottom: .625rem; overflow-wrap: anywhere; }
.profile-note { margin: 1rem auto 0; }
.profile-note a { display: inline-block; padding: .625rem .25rem; color: var(--muted); }
.conversation-question { font-weight: 800; font-size: clamp(1.375rem, 3vw, 2.5rem); max-width: 34ch; overflow-wrap: anywhere; }
.conversation-form { width: min(100%, 42rem); margin-inline: auto; }
.conversation-form textarea { width: 100%; resize: vertical; text-align: start; }
.conversation-form .hint { font-size: .9375rem; }
#conversation-status { margin-top: .75rem; }
#conversation-status:empty { margin: 0; }
.print-check, .print-watermark { display: none; }
.print-value { display: none; }
.feedback { margin-top: 1rem; }
.feedback-fields { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: .75rem; }
.feedback input { width: min(100%, 26rem); }
.feedback .twin:last-child { margin-bottom: 0; }
@media (min-width: 48rem) {
  .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .choice { min-height: 116px; }
  .answer-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@page {
  margin: 8mm 0 14mm;
  background: #05080F;
  @bottom-center {
    content: var(--report-print-footer, none);
    white-space: pre;
    font: 8pt/1.35 "Plus Jakarta Sans", system-ui, sans-serif;
    text-align: center;
    color: #9BA6BC;
  }
}
@media print {
  :root {
    background: var(--bg);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body, main, .report { display: block; min-height: auto; }
  body { font-size: 11pt; line-height: 1.4; }
  header, footer, #flow, .no-print, button, input { display: none !important; }
  main { padding: 0; }
  .report { position: relative; isolation: isolate; overflow: hidden; padding: 6mm 16mm 1mm; border-radius: 0; background: transparent; }
  .print-watermark {
    display: block;
    position: absolute;
    z-index: -1;
    inset: 38% 0 auto;
    text-align: center;
    white-space: nowrap;
    color: var(--ink);
    opacity: .05;
    font-size: 54pt;
    font-weight: 800;
  }
  :focus-visible { outline: none; }
  .report-title { font-size: 24pt; line-height: 1.15; margin: 0 0 6pt; }
  h3 { font-size: 13pt; margin-bottom: 5pt; break-after: avoid; }
  p, .report-block p { max-width: none; margin-bottom: 8pt; }
  .report-block, .report-closing { margin-block: 9pt; }
  /* Answers print as a compact list: label and answer on one line, so five or six answers still fit on the first page. */
  .answer-list { display: block; font-size: 9.5pt; line-height: 1.3; text-align: start; }
  .answer-list div { margin-bottom: 4pt; padding: 4pt 8pt; break-inside: avoid; }
  .answer-list div:last-child { margin-bottom: 0; }
  .answer-list dt, .answer-list dd { display: inline; margin: 0; }
  .answer-list dt::after { content: ": "; }
  .answer-list dd { white-space: normal; }
  .print-long .answer-list { font-size: 9pt; line-height: 1.2; }
  .print-long .answer-list div { margin-bottom: 3pt; padding-block: 2pt; break-inside: auto; }
  .print-extra-long .answer-list { font-size: 8pt; line-height: 1.12; }
  .print-dense { padding-inline: 5mm; }
  .print-dense .report-block, .print-dense .report-closing { margin-block: 5pt; }
  .print-dense .answer-list { font-size: 6pt; line-height: 1; }
  .print-dense .answer-list div { margin-bottom: 1pt; }
  .print-dense .answer-list dd { word-break: break-all; }
  .fields, .report-closing, .checklist li { break-inside: avoid; }
  .checklist { gap: 9pt; }
  .checklist label { min-height: auto; padding: 0; }
  .print-check { display: inline-grid; place-items: center; flex: none; width: 14pt; height: 14pt; border: 1pt solid var(--accent); border-radius: 2pt; }
  .checklist input:checked + .print-check { color: var(--bg); background: var(--accent); }
  .checklist input:checked + .print-check::before { content: "✓"; font-weight: 800; }
  .print-value { display: block; overflow-wrap: anywhere; }
}

/* Footer credit: a liquid-glass pill with a light that glides across it */
.glass-credit, .hub-quiet {
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin: .5rem auto .25rem;
  padding: .6rem 1.25rem;
  border-radius: 999px;
  color: var(--glass-ink);
  background: linear-gradient(160deg, rgba(var(--shine),.22), rgba(var(--shine),.06) 45%, rgba(var(--shine),.12));
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  box-shadow:
    inset 0 1px 1px rgba(var(--hi),.55),
    inset 0 -8px 14px rgba(var(--hi),.08),
    0 8px 24px rgba(var(--shadow),.35);
}
.glass-credit::after, .hub-quiet::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(var(--shine),.28) 42%, rgba(var(--shine),.5) 50%, rgba(var(--shine),.28) 58%, transparent 80%);
  filter: blur(6px);
  transform: translateX(-130%);
  animation: glass-credit-glide 26s cubic-bezier(.4,0,.2,1) infinite;
}
.glass-credit a { color: var(--glass-ink); font-weight: 600; text-decoration: none; }
.glass-credit a:hover, .glass-credit a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
@keyframes glass-credit-glide { 0%, 25% { transform: translateX(-130%); } 85%, 100% { transform: translateX(130%); } }
.hub-quiet { display: block; border-radius: 1.5rem; }
.hub-quiet h2 { color: var(--glass-ink); }
@media (prefers-reduced-motion: reduce) { .glass-credit::after, .hub-quiet::after { animation: none; opacity: 0; } }

/* Press feel on the glass pieces: they sink a little and a ripple spreads from the touch */
.glass-credit, .hub-quiet { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; -webkit-tap-highlight-color: transparent; }
.glass-credit:active, .hub-quiet:active { transform: scale(.965); box-shadow: inset 0 1px 1px rgba(var(--hi),.8), inset 0 0 24px rgba(var(--hi),.22), 0 3px 10px rgba(var(--shadow),.4); }
.glass-ripple {
  position: absolute;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--shine),.75), rgba(var(--shine),.25) 55%, transparent 70%);
  transform: scale(0);
  animation: glass-ripple .6s ease-out forwards;
}
@keyframes glass-ripple { to { transform: scale(34); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .glass-credit:active, .hub-quiet:active { transform: none; }
  .glass-ripple { display: none; }
}
