/* GAIL: mobile first, no external fonts or scripts, no inline styles. */
:root {
  --ink: #13303a; --muted: #52646a; --brand: #173f4c; --brand-2: #1f7a8c; --accent: #c8651f;
  --bg: #f3f6f7; --card: #ffffff; --line: #dbe5e8; --track: #e9eff1; --danger: #a12b2b;
  --radius: 16px; --shadow: 0 1px 2px rgba(19,48,58,.06), 0 4px 16px rgba(19,48,58,.06);
  --pc: var(--brand-2); --pc-soft: #e3f1f4;
}
.pc-feedback { --pc: #1f7a8c; --pc-soft: #e1f1f4; }
.pc-vicarious { --pc: #6a4c93; --pc-soft: #eee8f6; }
.pc-experiment { --pc: #d1761f; --pc-soft: #fcefe2; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 680px; margin: 0 auto; padding: 1rem 1rem 4rem; animation: rise .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
a { color: var(--brand-2); }
h1 { font-size: 1.65rem; line-height: 1.2; margin: .4rem 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; margin: 1.6rem 0 .6rem; }
.small { font-size: .875rem; color: var(--muted); }
.lead { font-size: 1.06rem; color: var(--muted); margin-top: 0; }
.center { text-align: center; }
.eyebrow { margin: .6rem 0 0; font-weight: 600; color: var(--brand-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .6rem 1rem; background: var(--brand); color: #fff; }
.top a, .top .link { color: #fff; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1.2rem; letter-spacing: .05em; }
.brand img { border-radius: 7px; }
.menu { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .92rem; opacity: .92; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
footer { text-align: center; font-size: .8rem; color: var(--muted); padding: 1rem 1rem 1.5rem; border-top: 1px solid var(--line); }
footer p { margin: .15rem 0; }

/* Step tracker */
.tracker { background: var(--card); border-bottom: 1px solid var(--line); }
.tracker ol { list-style: none; margin: 0 auto; padding: .6rem .5rem; max-width: 680px; display: flex; justify-content: space-between; }
.tracker li { flex: 1; position: relative; text-align: center; font-size: .72rem; color: var(--muted); }
.tracker li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.current::before { background: var(--brand-2); }
.tracker a { color: inherit; text-decoration: none; }
.tracker .dot { position: relative; z-index: 1; display: grid; place-items: center; margin: 0 auto .2rem; width: 28px; height: 28px;
  border-radius: 50%; background: var(--card); border: 2px solid var(--line); font-weight: 700; font-size: .8rem; transition: all .2s; }
.tracker li.done .dot { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.tracker li.current .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px #fbe7d6; }
.tracker li.current { color: var(--ink); font-weight: 700; }
.tracker-label { display: block; line-height: 1.2; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1.25rem; border-radius: 12px;
  border: 2px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 650; text-decoration: none;
  cursor: pointer; min-height: 46px; margin: .25rem .4rem .25rem 0; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover { box-shadow: var(--shadow); }
.button:active { transform: scale(.98); }
.button.big { width: 100%; min-height: 54px; font-size: 1.08rem; margin-right: 0; }
.button.secondary { background: transparent; color: var(--brand); }
.button.danger { background: var(--danger); border-color: var(--danger); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-2); text-decoration: underline; cursor: pointer; }
.button:focus-visible, input:focus-visible, textarea:focus-visible, .link:focus-visible, .link-button:focus-visible,
.pill:has(input:focus-visible), .chip:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; margin: 1rem 0; }
.sticky-actions { position: sticky; bottom: 0; padding: .75rem 0; margin-top: 1rem;
  background: linear-gradient(to bottom, rgba(243,246,247,0), var(--bg) 35%); }

/* Forms */
label { display: block; font-weight: 600; margin: 1rem 0 .35rem; }
input[type=text], input:not([type]), textarea { width: 100%; padding: .75rem .85rem; font: inherit; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea:focus, input:focus { border-color: var(--pc); box-shadow: 0 0 0 4px var(--pc-soft); outline: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Welcome */
.hero { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 22px; padding: 1.5rem 1.25rem 1.25rem;
  margin-top: .5rem; box-shadow: var(--shadow); }
.hero .eyebrow { color: #bfe3ec; }
.hero h1 { font-size: 1.9rem; }
.hero .lead { color: #e2f2f6; }
.hero .button { background: #fff; color: var(--brand); border-color: #fff; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; padding: 0; }
.meta span { background: rgba(255,255,255,.16); border-radius: 99px; padding: .2rem .7rem; font-size: .85rem; }
.how { padding-left: 1.3rem; }
.how li { margin: .5rem 0; }

/* Practice cards and icons */
.icon { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--pc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.practice-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.practice-card { display: flex; gap: .8rem; align-items: flex-start; background: var(--card); border-radius: var(--radius);
  padding: .85rem 1rem; box-shadow: var(--shadow); border-left: 5px solid var(--pc); }
.practice-card .icon { margin-top: .1rem; padding: 6px; width: 38px; height: 38px; border-radius: 12px; background: var(--pc-soft); }
.practice-card strong { display: block; }
.practice-card span { display: block; font-size: .92rem; color: var(--muted); }

/* Ratings */
.rating { background: var(--card); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; box-shadow: var(--shadow);
  border-top: 5px solid var(--pc); }
.rating.missing { box-shadow: 0 0 0 2px var(--danger); }
.rating legend { display: contents; }
.rating-head { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 700; color: var(--pc);
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .35rem; }
.question { display: block; font-size: 1.12rem; font-weight: 650; line-height: 1.35; margin-bottom: .8rem; }
.scale { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (min-width: 560px) { .scale { grid-template-columns: repeat(4, 1fr); } }
.pill { margin: 0; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill-body { display: flex; flex-direction: column; justify-content: center; min-height: 64px; height: 100%; padding: .55rem .7rem;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; transition: all .15s; }
.pill-body strong { font-size: 1rem; }
.pill-body small { font-weight: 400; font-size: .78rem; color: var(--muted); line-height: 1.25; }
.pill:hover .pill-body { border-color: var(--pc); }
.pill input:checked + .pill-body { border-color: var(--pc); background: var(--pc-soft); transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(19,48,58,.1); }
.pill input:checked + .pill-body strong { color: var(--pc); }

/* Reflections */
.reflect .rating-head { margin-top: .6rem; }
.prompt-choice legend { font-weight: 600; margin-bottom: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: .5rem .95rem; border-radius: 99px; border: 2px solid var(--line); background: #fff;
  font-weight: 600; font-size: .92rem; transition: all .15s; }
.chip input:checked + span { background: var(--pc); border-color: var(--pc); color: #fff; }
.prompt-text { display: none; margin: .9rem 0 .6rem; padding: .85rem 1rem; border-radius: 12px; background: var(--pc-soft);
  font-size: 1.08rem; font-weight: 600; line-height: 1.4; animation: rise .25s ease-out; }
.prompt-choice:has(input[value="1"]:checked) .p1, .prompt-choice:has(input[value="2"]:checked) .p2 { display: block; }
.prompt-choice:not(:has(input:checked)) .p1 { display: block; }
.hint { display: flex; justify-content: space-between; gap: .6rem; font-size: .875rem; color: var(--muted); margin: .4rem 0 0; }
.save-state { flex: none; color: var(--brand-2); font-weight: 600; }
.feedback { background: var(--pc-soft); border-radius: 12px; padding: .2rem 1rem; margin: .6rem 0 1rem; border-left: 4px solid var(--pc); }
.feedback-head { font-size: .92rem; }

/* Notices */
.notice { background: #fff6e8; border: 1px solid #f0d3a8; border-radius: 12px; padding: .65rem .95rem; }
.celebrate { background: #e8f6ee; border: 1px solid #b8e0c8; border-radius: 12px; padding: .75rem 1rem; font-weight: 600; animation: rise .4s ease-out; }

/* Home */
.next-card { background: var(--card); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.level-mini { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin: 0; }

/* Report */
.level-box { display: flex; align-items: center; gap: 1.1rem; background: var(--card); border-radius: 20px; padding: 1rem 1.1rem;
  box-shadow: var(--shadow); margin-top: .8rem; }
.level-box p { margin: .25rem 0; }
.level { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin: 0; line-height: 1.1; }
.ring { width: 112px; height: 112px; flex: none; }
.ring-track { fill: none; stroke: var(--track); stroke-width: 11; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round; }
.ring-num { font-size: 30px; font-weight: 800; fill: var(--ink); }
.ring-sub { font-size: 11px; fill: var(--muted); }
.grid-2 { display: grid; gap: .8rem; margin-top: 1rem; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.tile { background: var(--card); border-radius: var(--radius); padding: .2rem 1.1rem .6rem; box-shadow: var(--shadow); }
.tile h2 { display: flex; align-items: center; gap: .45rem; font-size: 1.02rem; margin-top: .9rem; }
.tile ul { padding-left: 1.1rem; margin-top: 0; }
.tile.good { border-top: 5px solid #2e8b57; }
.tile.grow { border-top: 5px solid var(--pc); }
.tile.try { margin-top: .8rem; border-left: 6px solid var(--accent); background: #fffaf5; }
.about { margin: 1.4rem 0 .5rem; }
.about summary { cursor: pointer; font-weight: 600; color: var(--brand-2); }

.bars { background: var(--card); border-radius: var(--radius); padding: .4rem 1.1rem .6rem; box-shadow: var(--shadow); }
.bar-row { margin: .7rem 0 1rem; }
.bar-label { display: flex; align-items: center; gap: .5rem; margin: 0 0 .3rem; font-weight: 650; }
.bar-score { margin-left: auto; color: var(--pc); font-size: 1.1rem; }
.bar-label .icon { width: 22px; height: 22px; }
.bar { display: block; width: 100%; height: 22px; }
.bar .track { fill: var(--track); }
.bar .base { fill: var(--pc); opacity: .35; }
.bar .post { fill: var(--pc); }
.bar-values { margin: .2rem 0 0; }
.key { display: inline-block; width: .9rem; height: .6rem; border-radius: 3px; margin: 0 .2rem 0 .6rem; background: var(--brand-2); }
.key.base { opacity: .35; }

table.answers { width: 100%; border-collapse: collapse; background: var(--card); font-size: .95rem; border-radius: 12px; overflow: hidden; }
table.answers td { border-bottom: 1px solid var(--line); padding: .55rem .6rem; vertical-align: top; }
.card-preview img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.14); background: #fff; }

/* Welcome: how it works */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.how-steps li { display: flex; gap: .8rem; align-items: flex-start; background: var(--card); border-radius: var(--radius);
  padding: .85rem 1rem; box-shadow: var(--shadow); }
.how-steps div strong, .how-steps div span { display: block; }
.how-steps div span { color: var(--muted); font-size: .92rem; }
.how-num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-2); color: #fff; font-weight: 800; }

/* Weekly check-in */
.activities legend { font-weight: 650; font-size: 1.05rem; margin-bottom: .4rem; }
.activity-group { background: var(--card); border-radius: var(--radius); padding: .7rem 1rem .9rem; margin: 0 0 .8rem;
  box-shadow: var(--shadow); border-top: 4px solid var(--pc); }
.ticks { display: grid; gap: .45rem; }
@media (min-width: 560px) { .ticks { grid-template-columns: 1fr 1fr; } }
.tick { display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .6rem .7rem; border: 2px solid var(--line);
  border-radius: 12px; font-weight: 500; font-size: .95rem; line-height: 1.35; cursor: pointer; background: #fff; transition: all .15s; }
.tick input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .1rem; accent-color: var(--pc); }
.tick:has(input:checked) { border-color: var(--pc); background: var(--pc-soft); }
.tick:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.small-label { font-size: .95rem; }
.story-label { font-size: 1.08rem; line-height: 1.4; margin-top: 1.4rem; }
.review { background: #eef7f9; border-radius: var(--radius); padding: .3rem 1rem .5rem; margin: .4rem 0 1.2rem;
  border-left: 5px solid var(--brand-2); }
.review-head { font-weight: 700; }
.review-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .5rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.review-tags .tag, .timeline .tag { display: inline-flex; align-items: center; gap: .3rem; margin: 0; background: var(--pc-soft);
  color: var(--pc); font-size: .82rem; }
.icon.small { width: 16px; height: 16px; }

/* Programme dashboard */
.week-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.week-card { display: flex; gap: .8rem; align-items: center; background: var(--card); border-radius: 14px; padding: .7rem 1rem;
  box-shadow: var(--shadow); border-left: 5px solid var(--line); }
.week-card div strong, .week-card div span { display: block; }
.week-card div span { color: var(--muted); font-size: .9rem; }
.week-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--line); font-weight: 800; }
.week-card.done { border-left-color: var(--brand-2); }
.week-card.done .week-num { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.week-card.due { border-left-color: var(--accent); }
.week-card.due .week-num { border-color: var(--accent); color: var(--accent); }
.week-card.late { border-left-color: #e0b050; }
.week-card.upcoming { opacity: .7; }
.dev-box { margin-top: 2rem; padding: .3rem 1rem .8rem; border: 2px dashed #c9a227; border-radius: 12px; background: #fffbea; font-size: .9rem; }

/* Report timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--line); }
.timeline li { position: relative; margin: 0 0 .8rem 1rem; background: var(--card); border-radius: 14px; padding: .2rem 1rem .4rem;
  box-shadow: var(--shadow); }
.timeline li::before { content: ""; position: absolute; left: -1.55rem; top: 1rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--line); border: 3px solid var(--bg); }
.timeline li.done::before { background: var(--brand-2); }
.timeline li.empty { opacity: .75; }
.tl-head { display: flex; justify-content: space-between; margin: .5rem 0 .2rem; }
.timeline p { margin: .3rem 0; font-size: .95rem; }

/* name first, on the welcome page */
.name-start { margin-top: 1.2rem; display: grid; gap: .45rem; max-width: 26rem; }
.name-start label { font-weight: 700; font-size: 1.05rem; }
.name-start .small { margin: 0; }
.name-start .button { margin-top: .4rem; }
.hero .small { color: #cfe8ee; }
.test-banner { margin: 0; padding: .5rem 1rem; background: #fff4d6; color: #6b5200; font-size: .85rem; text-align: center; }
