/* ADHDROOM · Accountability quiz (Day 6 tool)
   Same look as the ADHDROOM website and quiz: the dark silk background, Figtree + Libre Franklin,
   glass answer cards that turn lime when picked. Results are picture-led: white cards with the illustration,
   a score ring and one line, then the 8 types as picture tiles. The quiz logic lives in app.js (unchanged). */
:root {
  color-scheme: dark;
  --teal: #0B2A33;
  --deep: #061A21;
  --lime: #DEF245;
  --lime-h: #E7F76B;
  --cream: #F7EFE4;
  --cream-soft: rgba(247, 239, 228, .78);
  --cream-dim: rgba(247, 239, 228, .58);
  --slate: #41585E;
  --olive: #4F6B00;
  --mist: #E9EEEB;
  --paper: #FAFAFA;
  --glass: rgba(247, 239, 228, .06);
  --glass-h: rgba(247, 239, 228, .11);
  --glass-line: rgba(247, 239, 228, .16);
  --line: rgba(11, 42, 51, .1);
  --head: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--deep); color: var(--cream);
  font-family: var(--body); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* the website hero's silk, glowing from the top and fading into deep teal */
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 90vh; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 26, 33, 0) 0%, rgba(6, 26, 33, .5) 40%, #061A21 96%),
    radial-gradient(ellipse 120% 90% at 30% 20%, rgba(1, 5, 8, 0) 30%, rgba(1, 5, 8, .5) 100%),
    url("assets/silk.webp") 72% 0 / cover no-repeat;
}
button { font: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin-top: 0; }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Top bar: the website's glass bar ── */
.topbar {
  position: sticky; top: 12px; z-index: 20;
  width: min(1120px, calc(100% - 24px)); margin: 12px auto 0; padding: 8px 10px 8px 18px; min-height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(30, 66, 76, .92), rgba(11, 42, 51, .92));
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(255, 255, 255, .06), 0 14px 34px rgba(0, 0, 0, .28);
}
.topbar-logo { display: block; line-height: 0; }
.topbar-logo img { height: 40px; width: auto; }
.topbar-chip {
  padding: 8px 14px; border-radius: 999px; background: var(--lime); color: var(--teal);
  font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}

main { flex: 1; }

/* ── Type ── */
.eyebrow { margin: 0 0 14px; font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
h1 { font-family: var(--head); font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
h1 em, h2 em { font-style: italic; color: var(--lime); }

/* ── Quiz: one column; the title and two fact chips show on question 1 only ── */
.quiz-layout { width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 56px; }
.quiz-intro { display: none; margin: 4px 0 28px; text-align: center; }
.quiz-layout.is-first .quiz-intro { display: block; }
.quiz-intro h1 { margin: 0 0 18px; font-size: clamp(34px, 5.6vw, 52px); line-height: 1.04; color: var(--cream); }
.intro-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.intro-facts li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--glass); border: 1.5px solid var(--glass-line);
  font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--cream-soft);
}
.intro-facts svg { width: 18px; height: 18px; color: var(--lime); }

.question-panel {
  scroll-margin-top: 90px;
  padding: 26px; border-radius: 28px;
  background: var(--glass); border: 1.5px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
}
.progress-row { display: flex; justify-content: space-between; font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-soft); }
.progress-track { height: 6px; margin: 10px 0 26px; border-radius: 99px; background: rgba(247, 239, 228, .12); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); box-shadow: 0 0 12px rgba(222, 242, 69, .45); transition: width .25s ease; }
.question-kicker { margin-bottom: 10px; font-size: 14px; color: var(--cream-dim); }
.question-card h2 { margin-bottom: 24px; font-family: var(--head); font-weight: 600; font-size: clamp(24px, 3vw, 32px); line-height: 1.18; letter-spacing: -.02em; color: var(--cream); text-wrap: balance; }

.answer-options { display: grid; gap: 10px; }
.answer-button {
  width: 100%; min-height: 60px; padding: 12px 16px 12px 12px;
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 14px; text-align: left;
  border: 1.5px solid var(--glass-line); border-radius: 18px;
  background: var(--glass); color: var(--cream); cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.answer-button:hover { background: var(--glass-h); border-color: rgba(247, 239, 228, .34); transform: translateY(-1px); }
.answer-number {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(247, 239, 228, .1); font-family: var(--head); font-weight: 800;
}
.answer-label { font-family: var(--head); font-weight: 700; font-size: 16px; }
.answer-help { font-size: 13px; color: var(--cream-dim); }
.answer-button[aria-checked="true"] { background: var(--lime); border-color: var(--lime); color: var(--teal); }
.answer-button[aria-checked="true"] .answer-number { background: var(--teal); color: var(--lime); }
.answer-button[aria-checked="true"] .answer-help { color: rgba(11, 42, 51, .7); }

.quiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.primary-button, .secondary-button, .text-button {
  min-height: 52px; padding: 10px 24px; border-radius: 999px; cursor: pointer;
  font-family: var(--head); font-weight: 800; font-size: 16px;
  transition: background-color .2s, transform .15s, opacity .2s;
}
.primary-button { border: 0; background: var(--lime); color: var(--teal); box-shadow: 0 10px 30px rgba(222, 242, 69, .22); }
.primary-button:hover:not(:disabled) { background: var(--lime-h); }
.primary-button:active:not(:disabled) { transform: scale(.98); }
.primary-button:disabled { background: rgba(247, 239, 228, .14); color: var(--cream-dim); box-shadow: none; cursor: not-allowed; }
.secondary-button { border: 1.5px solid var(--glass-line); background: var(--glass); color: var(--cream); }
.secondary-button:hover { background: var(--glass-h); }
.text-button { border: 0; background: transparent; color: var(--cream-soft); padding-inline: 12px; }
.text-button:hover:not(:disabled) { color: var(--cream); }
.text-button:disabled { opacity: .35; cursor: not-allowed; }
.danger { color: #FFB8AE; }

/* ── Results: pictures first, one line of text per idea ── */
.results-view { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 72px; }
.results-head { margin-bottom: 26px; text-align: center; }
.results-head h1 { margin: 0; font-size: clamp(38px, 6vw, 56px); line-height: 1.02; color: var(--cream); }

.recommendation-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rec {
  display: grid; align-items: center; column-gap: 24px;
  border-radius: 28px; background: var(--paper); color: var(--teal);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .3);
}
.rec-art { grid-area: art; align-self: start; border-radius: 22px; background: #F2F7DA; padding: 14px; }
.rec-art img { display: block; width: 100%; height: auto; }
.rec-main { grid-area: main; min-width: 0; }
.rec-rank {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; padding-right: 14px; border-radius: 999px;
  background: var(--mist); font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.rec-rank span { min-width: 42px; padding: 6px 10px; border-radius: 999px; background: var(--teal); color: var(--lime); font-size: 15px; letter-spacing: 0; text-align: center; }
.rec h3 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; }
.rec-score { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.rec-ring {
  --size: 64px; position: relative; flex: 0 0 auto; width: var(--size); height: var(--size);
  display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--lime) calc(var(--p) * 1%), rgba(11, 42, 51, .1) 0);
}
.rec-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--teal); }
.rec-ring b { position: relative; font-family: var(--head); font-weight: 800; font-size: 16px; color: var(--cream); }
.rec-band { font-family: var(--head); font-weight: 800; font-size: 15px; color: var(--olive); }
.rec-line { grid-area: line; margin: 16px 0 0; font-family: var(--head); font-weight: 600; font-size: 17px; line-height: 1.38; color: var(--teal); }

/* #1: the big card */
.rec--hero {
  grid-column: 1 / -1; padding: 30px; row-gap: 0;
  grid-template-columns: 210px minmax(0, 1fr); grid-template-areas: "art main" "art line" "try try";
  box-shadow: 0 0 0 3px var(--lime), 0 30px 70px rgba(222, 242, 69, .14);
}
.rec--hero .rec-art { padding: 20px; }
.rec--hero .rec-rank { background: var(--lime); }
.rec--hero h3 { font-size: clamp(28px, 3.4vw, 36px); }
.rec--hero .rec-ring { --size: 92px; }
.rec--hero .rec-ring::before { inset: 9px; }
.rec--hero .rec-ring b { font-size: 23px; }
.rec--hero .rec-band { font-size: 17px; }
.rec--hero .rec-line { align-self: start; font-size: 20px; }
.rec-try { grid-area: try; margin-top: 26px; }
.rec-try h4 { margin: 0 0 10px; font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--olive); }
.rec-tries { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rec--hero .rec-tries { grid-template-columns: repeat(3, 1fr); }
.rec-tries li {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--mist);
  font-size: 15.5px; line-height: 1.4; color: var(--teal);
}
.rec-tries li span {
  flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--lime); font-family: var(--head); font-weight: 800; font-size: 14px;
}

/* #2 and #3: smaller, the tries tucked away */
.rec--small { padding: 22px; grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "art main" "line line" "more more"; }
.rec--small:nth-child(2):last-child { grid-column: 1 / -1; }
.rec--small .rec-art { padding: 10px; }
.rec-more { grid-area: more; margin-top: 14px; }
.rec-more summary {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; cursor: pointer; list-style: none;
  background: var(--mist); font-family: var(--head); font-weight: 800; font-size: 14px; color: var(--teal);
}
.rec-more summary::-webkit-details-marker { display: none; }
.rec-more summary::before {
  content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal); color: var(--lime); font-size: 16px; line-height: 1;
}
.rec-more[open] summary::before { content: "\2212"; }
.rec-more .rec-tries { margin-top: 10px; }
.rec-more .rec-tries li { padding: 10px 12px; font-size: 15px; }
.rec-more .rec-tries li span { width: 24px; height: 24px; font-size: 13px; }
.empty-recommendations { grid-column: 1 / -1; padding: 22px; border-radius: 22px; background: var(--glass); border: 1.5px solid var(--glass-line); color: var(--cream-soft); }

/* all 8 types as picture tiles */
.profile-section { margin-top: 44px; }
.profile-section h2 { margin: 0 0 16px; text-align: center; font-family: var(--head); font-weight: 600; font-size: 28px; line-height: 1.12; letter-spacing: -.02em; color: var(--cream); }
.type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.type-tile {
  display: grid; justify-items: center; align-content: start; gap: 6px; padding: 18px 14px 16px; border-radius: 22px;
  background: var(--glass); border: 1.5px solid var(--glass-line); text-align: center;
}
.type-tile.is-top { border-color: var(--lime); background: rgba(222, 242, 69, .08); }
.type-tile .type-icon { width: 76px; height: 76px; filter: brightness(0) invert(1); opacity: .88; }
.type-name { min-height: 2.4em; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--cream); }
.type-pct { font-family: var(--head); font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--cream); }
.type-tile.is-top .type-pct { color: var(--lime); }
.type-meter { width: 100%; height: 8px; margin-top: 4px; border-radius: 99px; background: rgba(247, 239, 228, .12); overflow: hidden; }
.type-meter span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.type-tile.is-empty { opacity: .5; }

/* the results PDF: a short lime card */
.pdf-cta {
  margin-top: 32px; padding: 24px 28px; border-radius: 28px;
  display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: center;
  background: var(--lime); color: var(--teal); box-shadow: 0 24px 60px rgba(222, 242, 69, .18);
}
.pdf-cta h2 { margin: 0 0 2px; font-family: var(--head); font-weight: 700; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; }
.pdf-cta p { margin: 0; color: rgba(11, 42, 51, .8); }
.save-pdf-button { background: var(--teal); color: var(--lime); box-shadow: 0 12px 28px rgba(11, 42, 51, .25); }
.save-pdf-button:hover:not(:disabled) { background: #0F3443; }
.save-status { grid-column: 1 / -1; min-height: 0; margin: 0; font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--teal); }
.save-status:empty { display: none; }

.results-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 28px; }

/* the printable worksheet: a quiet link under question 1, a button next to Review answers */
.paper-link {
  display: none; align-items: center; gap: 12px; width: fit-content; margin: 18px auto 0; padding: 7px 18px 7px 7px;
  border-radius: 999px; background: var(--glass); border: 1.5px solid var(--glass-line);
  font-size: 14px; color: var(--cream-soft); text-decoration: none; transition: background-color .2s;
}
.quiz-layout.is-first .paper-link { display: flex; }
.paper-link strong { font-family: var(--head); font-weight: 800; color: var(--cream); }
.paper-link:hover { background: var(--glass-h); }
.paper-icon { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--teal); }
.paper-icon svg { width: 17px; height: 17px; }
.paper-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding-left: 12px; text-decoration: none; }

/* ── Footer ── */
footer {
  width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 28px;
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--glass-line); font-size: 13px; color: var(--cream-dim);
}
footer p { margin: 0; }

/* ── Tablets and phones ── */
@media (max-width: 820px) {
  .quiz-layout { padding-top: 22px; }
  .quiz-intro { margin-bottom: 20px; }
  .intro-facts { gap: 6px; }
  .intro-facts li { padding: 6px 12px 6px 8px; font-size: 13px; }
  .question-panel { padding: 20px 16px; border-radius: 24px; }
  .recommendation-list { grid-template-columns: 1fr; }
  .rec--hero { padding: 22px; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "art main" "line line" "try try"; }
  .rec--hero .rec-art { padding: 12px; }
  .rec--hero h3 { font-size: 26px; }
  .rec--hero .rec-ring { --size: 76px; }
  .rec--hero .rec-ring b { font-size: 19px; }
  .rec--hero .rec-line { font-size: 18px; }
  .rec--hero .rec-tries { grid-template-columns: 1fr; }
  .rec-try { margin-top: 20px; }
  .rec--small { padding: 20px; grid-template-columns: 92px minmax(0, 1fr); }
  .rec h3 { font-size: 22px; }
  .rec-score { flex-wrap: wrap; gap: 8px 12px; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .type-tile { padding: 16px 12px 14px; }
  .type-tile .type-icon { width: 64px; height: 64px; }
  .pdf-cta { grid-template-columns: 1fr; padding: 22px 20px; }
  .pdf-cta .save-pdf-button { width: 100%; }
  .results-actions button, .results-actions .paper-button { flex: 1 1 100%; }
  footer { display: grid; gap: 6px; }
}
@media (max-width: 480px) {
  .topbar-logo img { height: 34px; }
  .topbar-chip { font-size: 11px; padding: 7px 12px; }
  .answer-button { grid-template-columns: 36px 1fr; }
  .answer-help { display: none; }
  .question-card h2 { font-size: 23px; }
  .quiz-nav .primary-button { flex: 1; }
  .rec--hero { grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; }
  .rec--small { grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; }
  .rec h3, .rec--hero h3 { font-size: 21px; }
  .rec--hero .rec-ring { --size: 64px; }
  .rec--hero .rec-ring::before { inset: 7px; }
  .rec--hero .rec-ring b { font-size: 16px; }
  .rec--hero .rec-line { font-size: 17px; }
  .rec-line { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
