/* Corinia — signed-in app, school dashboard and single-card pages */

body.app { background: var(--mist); min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }

/* ---- top bar ---- */
.bar { position: sticky; top: 0; z-index: 40; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.bar-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; padding-inline: clamp(16px, 4vw, 32px); max-width: 1240px; margin-inline: auto; gap: 20px; }
.bar-in > .logo { justify-self: start; flex: none; }
.bar-in .logo svg { flex: none; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 7px 14px; border-radius: 980px; font-size: 0.875rem; color: var(--muted); letter-spacing: -0.006em; transition: color 0.15s, background 0.15s; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--green-text); background: var(--green-soft); font-weight: 500; }
.bar-right { display: flex; align-items: center; gap: 12px; justify-self: end; min-width: 0; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--green-deep); color: #fff; display: grid; place-items: center; font: 600 0.75rem/1 var(--font); letter-spacing: 0.02em; }
.avatar-l { width: 56px; height: 56px; font-size: 1.125rem; }
.avatar-soft { background: var(--mist); color: var(--ink-2); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 42px; width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); padding: 8px; z-index: 60; }
.menu-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; overflow: hidden; }
.menu-who strong { font-weight: 600; font-size: 0.9375rem; }
.menu-who span { overflow: hidden; text-overflow: ellipsis; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; font-size: 0.9375rem; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--mist); }
.bar-school { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.plan-chip { font: 600 0.6875rem/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 9px; border-radius: 980px; background: var(--green); color: #fff; }
.plan-chip.is-free { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---- mobile dock ---- */
.dock { display: none; }
@media (max-width: 760px) {
  .bar-in { grid-template-columns: 1fr auto; }
  .tabs, .bar-school { display: none; }
  .dock { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--glass-strong); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .dock a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; font-size: 0.625rem; letter-spacing: 0.01em; color: var(--faint); }
  .dock a.is-active { color: var(--green-text); }
  .dock .icon { width: 23px; height: 23px; }
  body.app { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ---- page frame ---- */
.app-main { max-width: 1040px; margin-inline: auto; padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 32px) 80px; }
.app-main.is-wide { max-width: 1240px; }
body[data-shell='school'] .app-main, body[data-shell='admin'] .app-main { max-width: 1240px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 32px); }
.ph h1 { font: 600 clamp(1.75rem, 4vw, 2.25rem) / 1.1 var(--font-display); letter-spacing: -0.028em; }
.ph p { color: var(--muted); margin-top: 6px; max-width: 46em; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.875rem; margin-bottom: 14px; }
.crumb:hover { color: var(--ink); }
.crumb .icon { width: 16px; height: 16px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 12px; }
.sec-h h2 { font: 600 1.1875rem/1.2 var(--font-display); letter-spacing: -0.018em; }
.sec-h > :not(h2) { flex: none; white-space: nowrap; }
.sec-h a, .sec-h button { font-size: 0.875rem; color: var(--green-text); font-weight: 500; }
.panel { background: var(--card); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--ring), var(--shadow-1); }
.panel-pad { padding: clamp(18px, 2.6vw, 26px); }
.panel + .panel { margin-top: 14px; }
.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.cols.is-even { grid-template-columns: 1fr 1fr; }
.cols > * { min-width: 0; }
@media (max-width: 880px) { .cols, .cols.is-even { grid-template-columns: 1fr; } }
.flash { background: var(--flash); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 0.9375rem; margin-bottom: 20px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--flash); color: #fff; padding: 12px 20px; border-radius: 980px; font-size: 0.9375rem; box-shadow: var(--shadow-2); z-index: 90; max-width: calc(100vw - 32px); text-align: center; }

/* ---- lists ---- */
.list > * { display: flex; align-items: center; gap: 14px; padding: 15px clamp(18px, 2.6vw, 26px); }
.list > * + * { border-top: 1px solid var(--line); }
a.list-row { transition: background 0.15s; }
a.list-row:hover { background: var(--mist-2); }
.list-row:first-child { border-radius: var(--r-l) var(--r-l) 0 0; }
.list-row:last-child { border-radius: 0 0 var(--r-l) var(--r-l); }
.list-t { font-weight: 600; font-size: 1rem; letter-spacing: -0.014em; line-height: 1.3; }
.list-s { font-size: 0.875rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.list .icon.chev { color: var(--line-2); margin-left: 4px; }
.flagbox { width: 42px; height: 42px; border-radius: 12px; background: var(--mist); display: grid; place-items: center; font: 600 0.75rem/1 var(--font); color: var(--ink-2); flex: none; letter-spacing: 0.03em; }

/* ---- steps to get started ---- */
.start { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .start { grid-template-columns: 1fr; } }
.start-card { background: var(--card); border-radius: var(--r-l); padding: 22px; box-shadow: 0 0 0 1px var(--ring), var(--shadow-1); display: flex; flex-direction: column; min-height: 190px; }
.start-card.is-done { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.start-n { width: 28px; height: 28px; border-radius: 50%; color: var(--green-text); background: var(--green-soft); display: grid; place-items: center; font: 600 0.8125rem/1 var(--font); }
.start-card.is-done .start-n { background: var(--green); color: #fff; }
.start-n .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.start-card h3 { font: 600 1.0625rem/1.25 var(--font-display); letter-spacing: -0.015em; margin-top: 16px; }
.start-card p { font-size: 0.875rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.start-card .btn, .start-card .arrow-link { margin-top: auto; align-self: flex-start; }
.start-card p + .btn, .start-card p + .arrow-link { margin-top: 18px; }
.start-card > :last-child { margin-top: auto; padding-top: 18px; min-height: 54px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---- stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--card); border-radius: var(--r-l); padding: 20px 22px; box-shadow: 0 0 0 1px var(--ring), var(--shadow-1); }
.stat b { display: block; font: 600 2rem/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 8px; line-height: 1.3; }
.stat.is-warn b { color: var(--reach); }

/* ---- upload ---- */
.dropzone { display: block; border: 1.5px dashed var(--line-2); border-radius: var(--r-l); padding: clamp(26px, 5vw, 44px) 20px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: var(--card); }
.dropzone:hover, .dropzone.is-over { border-color: var(--green); background: var(--green-mist); }
.dropzone .icon { width: 28px; height: 28px; margin: 0 auto 12px; color: var(--green-text); }
.dropzone b { display: block; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.014em; }
.dropzone span { display: block; font-size: 0.875rem; color: var(--muted); margin-top: 5px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.doc { display: flex; align-items: center; gap: 13px; padding: 13px clamp(18px, 2.6vw, 26px); }
.doc + .doc { border-top: 1px solid var(--line); }
.doc-ic { width: 36px; height: 44px; border-radius: 8px; background: var(--mist); display: grid; place-items: center; font: 700 0.5625rem/1 var(--font); color: var(--muted); letter-spacing: 0.04em; flex: none; }
.doc-n { font-weight: 500; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-m { font-size: 0.8125rem; color: var(--muted); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; transition: background 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--mist); color: var(--ink); }
.icon-btn .icon { width: 18px; height: 18px; }

/* ---- profile ---- */
.pf-head { display: flex; align-items: flex-start; gap: 16px; }
.pf-head p { margin-top: 4px; }
.pf-head h2 { font: 600 1.375rem/1.15 var(--font-display); letter-spacing: -0.022em; }
/* One unbroken rule per row: the gap between label and value is padding, not a grid gap. */
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 0; font-size: 0.9375rem; }
.kv > dt { color: var(--muted); padding: 11px 16px 11px 0; border-top: 1px solid var(--line); }
.kv > :last-child { padding-bottom: 0; }
.kv > dt:nth-last-child(2) { padding-bottom: 0; }
.note-line { display: flex; gap: 8px; align-items: flex-start; padding: 14px 6px; }
.note-line .icon { flex: none; margin-top: 1px; }
.kv > dd { padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; }
.kv > dt:first-of-type, .kv > dd:first-of-type { border-top: 0; padding-top: 0; }
/* Short labels keep their two columns on a phone; long ones stack. Never set the columns inline: it breaks the stacked rules below. */
.kv.is-tight { grid-template-columns: 110px 1fr; }
@media (max-width: 560px) { .kv:not(.is-tight) { grid-template-columns: 1fr; } .kv:not(.is-tight) > dd { border-top: 0; padding-top: 0; } .kv:not(.is-tight) > dt { padding-bottom: 2px; } }
.entry { padding: 14px 0; }
/* Inside a padded panel the first and last entries sit on the panel's own padding. */
.panel-pad > .entry:first-child { padding-top: 0; }
.panel-pad > .entry:last-child { padding-bottom: 0; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry-t { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.entry-s { font-size: 0.875rem; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 14px; line-height: 1.3; border-radius: 16px; background: var(--mist); font-size: 0.875rem; color: var(--ink-2); }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 980px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 0.9375rem; background: var(--card); transition: background 0.15s, color 0.15s, box-shadow 0.15s; user-select: none; }
.pick input:checked + span { background: var(--green); color: #fff; box-shadow: none; }
.pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.meter { display: flex; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--muted); }
.meter .progress { flex: 1; }
.rowform { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 640px) { .rowform { grid-template-columns: 1fr; } }
.repeat-item { display: grid; gap: 10px; grid-template-columns: 1fr 1fr 34px; align-items: start; padding: 10px 0; }
.repeat-item.is-3 { grid-template-columns: 1.3fr 1fr 0.7fr 34px; }
.repeat-item + .repeat-item { border-top: 1px solid var(--line); }
@media (max-width: 640px) { .repeat-item, .repeat-item.is-3 { grid-template-columns: 1fr 34px; } .repeat-item > .input:not(:first-child), .repeat-item > .select { grid-column: 1; } .repeat-item > .icon-btn { grid-column: 2; grid-row: 1; } }

/* ---- matches ---- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter { height: 34px; padding: 0 15px; border-radius: 980px; font-size: 0.875rem; color: var(--ink-2); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 6px; }
.filter.is-on { background: var(--green); color: #fff; box-shadow: none; }
.filter b { font-weight: 500; opacity: 0.6; }
.mcard { display: block; background: var(--card); border-radius: var(--r-l); padding: clamp(18px, 2.6vw, 24px); box-shadow: 0 0 0 1px var(--ring), var(--shadow-1); transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
a.mcard:hover { box-shadow: 0 0 0 1px var(--line-2), var(--shadow-2); transform: translateY(-1px); }
.mcard + .mcard { margin-top: 12px; }
.mcard-top { display: flex; gap: 14px; align-items: flex-start; }
.mcard-name { font: 600 1.125rem/1.25 var(--font-display); letter-spacing: -0.018em; }
.mcard-sub { font-size: 0.9375rem; color: var(--ink-2); margin-top: 3px; }
.mcard-place { font-size: 0.8125rem; color: var(--muted); margin-top: 3px; }
.mcard-why { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.mcard-foot { display: flex; gap: 14px; align-items: center; margin-top: 14px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted); }
.mcard-foot .saved { color: var(--ink); font-weight: 500; display: inline-flex; gap: 5px; align-items: center; }
.mcard-foot .saved .icon { width: 14px; height: 14px; fill: currentColor; }
.reasons li { display: flex; gap: 11px; padding: 9px 0; font-size: 0.9375rem; line-height: 1.45; }
.reasons li + li { border-top: 1px solid var(--line); }
.reasons .icon { width: 18px; height: 18px; margin-top: 2px; }
.reasons .is-yes .icon { color: var(--green-text); stroke-width: 2; }
.reasons .is-warn .icon { color: var(--reach); }
.req { padding: 16px 0; }
.req + .req { border-top: 1px solid var(--line); }
.req-k { font-size: 0.8125rem; color: var(--muted); }
.req-v { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.014em; margin-top: 3px; line-height: 1.35; }
.req-q { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); }
.req-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 9px; }
.req-foot a { font-size: 0.8125rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); display: inline-flex; gap: 4px; align-items: center; }
.req-foot a:hover { color: var(--ink); }
.req-foot a .icon { width: 13px; height: 13px; }
.stage-select { height: 44px; min-height: 44px; padding: 0 38px 0 18px; border-radius: 980px; font-size: 1rem; font-weight: 500; width: auto; background-color: var(--card); border-color: var(--line-2); }

/* ---- plan ---- */
.task { display: flex; gap: 14px; align-items: flex-start; padding: 15px clamp(18px, 2.6vw, 26px); }
.task + .task { border-top: 1px solid var(--line); }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; margin-top: 1px; transition: background 0.15s, border-color 0.15s; color: transparent; }
.tick:hover { border-color: var(--green); }
.tick .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.task.is-done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.task.is-done .task-t { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-2); }
.task-t { font-weight: 500; font-size: 1rem; letter-spacing: -0.012em; line-height: 1.35; }
.task-d { font-size: 0.875rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.task-m { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; align-items: center; }
.due { display: inline-flex; align-items: center; flex: none; white-space: nowrap; gap: 5px; height: 24px; padding: 0 10px; border-radius: 980px; background: var(--mist); font: 500 0.75rem/1 var(--font); color: var(--ink-2); }
.due .icon { width: 12px; height: 12px; }
.due.is-soon { background: var(--reach-soft); color: var(--reach); }
.due.is-late { background: var(--red-soft); color: var(--red); }
.task .icon-btn { opacity: 0; margin: -4px -8px 0 auto; }
.task:hover .icon-btn, .task:focus-within .icon-btn { opacity: 1; }
@media (hover: none) { .task .icon-btn { opacity: 1; } }
.locked { position: relative; overflow: hidden; }
.locked-rows { filter: blur(5px); opacity: 0.55; pointer-events: none; user-select: none; }
.locked-cta { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: linear-gradient(to bottom, transparent, var(--card) 62%); }

/* ---- upsell ---- */
.upsell { background: var(--green-deep); color: #fff; border-radius: var(--r-l); padding: clamp(22px, 3vw, 30px); }
.upsell h3 { font: 600 1.3125rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.upsell p { color: #a9c9ba; font-size: 0.9375rem; margin-top: 8px; line-height: 1.45; }
.upsell .btn { margin-top: 18px; background: #ffffff; color: #1d1d1f; }
.upsell .btn:hover { background: #ececef; }
.upsell ul { margin-top: 14px; font-size: 0.9375rem; }
.upsell li { display: flex; gap: 9px; padding: 4px 0; color: #e3f1ea; }
.upsell li .icon { color: var(--green-bright); }
.upsell li .icon { width: 16px; height: 16px; margin-top: 3px; stroke-width: 2; }

/* ---- empty ---- */
.empty { text-align: center; padding: clamp(40px, 7vw, 72px) 24px; }
.empty .icon { width: 30px; height: 30px; margin: 0 auto 16px; color: var(--faint); }
.empty h2 { font: 600 1.375rem/1.2 var(--font-display); letter-spacing: -0.022em; }
.empty p { color: var(--muted); max-width: 30em; margin: 8px auto 0; text-wrap: balance; }
.empty .btn { margin-top: 22px; }

/* ---- working overlay ---- */
.working { position: fixed; inset: 0; z-index: 100; background: var(--veil); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; place-items: center; padding: 24px; }
.working-card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow-3); padding: 34px 32px; width: min(420px, 100%); text-align: center; }
.working-card .spinner { width: 28px; height: 28px; color: var(--green-text); border-width: 2.5px; }
.working-card h2 { font: 600 1.3125rem/1.2 var(--font-display); letter-spacing: -0.02em; margin-top: 18px; }
.working-card p { color: var(--muted); font-size: 0.9375rem; margin-top: 8px; min-height: 2.9em; }

/* On the grey page a grey button would vanish and its label would look like stray, indented text.
   Outside a white panel, secondary buttons are white with a hairline. */
body.app .btn-secondary { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); }
body.app .btn-secondary:hover { background: var(--card); box-shadow: inset 0 0 0 1px var(--muted); }
body.app .panel .btn-secondary, body.app dialog .btn-secondary, body.app .start-card .btn-secondary { background: var(--mist); box-shadow: none; }
body.app .panel .btn-secondary:hover, body.app dialog .btn-secondary:hover, body.app .start-card .btn-secondary:hover { background: var(--mist-hover); }
.table a.name { white-space: nowrap; }

/* ---- dialog ---- */
dialog { border: 0; padding: 0; background: var(--card); border-radius: 24px; box-shadow: var(--shadow-3); width: min(460px, calc(100vw - 32px)); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, 0.32); backdrop-filter: blur(4px); }
.dlg { padding: 30px 28px 26px; }
.dlg h2 { font: 600 1.375rem/1.2 var(--font-display); letter-spacing: -0.022em; }
.dlg p { color: var(--muted); margin-top: 10px; font-size: 0.9375rem; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
.table { font-size: 0.9375rem; min-width: 640px; }
.table th { text-align: left; font: 500 0.75rem/1.2 var(--font); color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; letter-spacing: 0.01em; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.is-top td { vertical-align: top; }
@media (max-width: 560px) { .table.is-top td:first-child { white-space: normal !important; min-width: 104px; max-width: 128px; } }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--mist-2); }
.table a.name { font-weight: 600; letter-spacing: -0.012em; }
.table .progress { width: 90px; }
.table th:first-child, .table td:first-child { padding-left: clamp(18px, 2.6vw, 26px); }
.bars { display: grid; gap: 10px; }
.bars-row { display: grid; grid-template-columns: 180px 1fr 44px; gap: 14px; align-items: center; font-size: 0.9375rem; }
.bars-row .progress { height: 10px; border-radius: 5px; }
.bars-row b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 560px) { .bars-row { grid-template-columns: 150px 1fr 40px; gap: 10px; } }
.codebox { font: 600 1.75rem/1 var(--mono); letter-spacing: 0.14em; padding: 18px 22px; background: var(--mist); border-radius: 14px; display: inline-block; }

/* ---- writing ---- */
.editor { min-height: 340px; font-size: 1rem; line-height: 1.6; border: 0; padding: 0; resize: vertical; width: 100%; outline: none; background: transparent; }
.fb h3 { font: 600 0.9375rem/1.3 var(--font); margin-bottom: 8px; }
.fb ul { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.fb li { padding: 7px 0 7px 16px; position: relative; }
.fb li::before { content: ''; position: absolute; left: 0; top: 16px; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.fb > div + div { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---- single-card pages ---- */
body.solo { background: var(--mist); min-height: 100vh; display: flex; flex-direction: column; }
.solo-top { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(20px, 5vw, 40px); }
.solo-main { flex: 1; display: grid; place-items: center; padding: 12px 16px 48px; }
.solo-card { width: min(440px, 100%); background: var(--card); border-radius: 28px; padding: clamp(28px, 6vw, 44px); box-shadow: 0 0 0 1px var(--ring), var(--shadow-2); }
.solo-card.is-wide { width: min(620px, 100%); }
.solo-card h1 { font: 600 1.75rem/1.12 var(--font-display); letter-spacing: -0.028em; }
.solo-card .sub { color: var(--muted); margin-top: 10px; }
.solo-card form { margin-top: 26px; }
.suggest { margin: 6px 0 4px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line), var(--shadow-1, 0 4px 14px rgba(0, 0, 0, 0.06)); overflow: hidden; max-height: 296px; overflow-y: auto; }
.suggest[hidden] { display: none; }
.suggest-item { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 9px 14px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.suggest-item + .suggest-item { border-top: 1px solid var(--line); }
.suggest-item b { font-weight: 600; font-size: 0.9375rem; }
.suggest-item span { font-size: 0.8125rem; color: var(--muted); }
.suggest-item:hover, .suggest-item.is-active { background: var(--mist); }
.suggest-none { padding: 12px 14px; font-size: 0.875rem; color: var(--muted); }
.who { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--green-soft); font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
.who .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--green-text); }
.who b { font-weight: 600; color: var(--ink); }
.solo-foot { display: flex; gap: 22px; justify-content: center; padding: 0 16px 28px; }
.solo-foot a:hover { color: var(--ink); }
.or { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 0.8125rem; margin: 20px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-input { font: 600 1.75rem/1 var(--mono); letter-spacing: 0.32em; text-align: center; padding-left: calc(15px + 0.32em); height: 64px; }
.gbtn svg { width: 18px; height: 18px; }

/* ---- entrance and small transitions ---- */
.app-main > * { animation: rise 0.24s var(--ease) both; }
.app-main > :nth-child(2) { animation-delay: 0.03s; }
.app-main > :nth-child(3) { animation-delay: 0.06s; }
.app-main > :nth-child(n + 4) { animation-delay: 0.08s; }
.app-main > dialog { animation: none; }
.app-main > dialog[open] { animation: pop 0.18s var(--ease); }
.solo-card { animation: pop 0.28s var(--ease) both; }
.menu[open] .menu-pop { animation: pop 0.14s var(--ease); transform-origin: top right; }
.flash { animation: rise 0.28s var(--ease) both; }
.toast:not([hidden]) { animation: fade 0.2s ease; }
.working { animation: fade 0.2s ease; }
.working-card { animation: pop 0.24s var(--ease); }
.msg { animation: rise 0.22s var(--ease) both; }
.task.is-done .tick { animation: tick 0.26s var(--ease); }
[data-rows] > [data-row] { animation: rise 0.2s var(--ease); }

/* ---- print (parent reports) ---- */
@media print {
  body.app { background: #fff; padding: 0; }
  .bar, .dock, .no-print, .flash, .toast { display: none !important; }
  .app-main { max-width: none; padding: 0; }
  .panel, .stat, .mcard { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  a { text-decoration: none; }
}

/* ---- ask ---- */
.chat { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; min-height: calc(100vh - 230px); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-bottom: 36px; }
.chat-hello { margin: auto 0; text-align: center; padding: 24px 0 8px; }
.chat-hello h1 { font: 600 clamp(1.75rem, 4.4vw, 2.5rem) / 1.1 var(--font-display); letter-spacing: -0.03em; }
.chat-hello p { color: var(--muted); max-width: 34em; margin: 14px auto 0; }
.chat-ideas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.chat-idea { padding: 10px 16px; border-radius: 980px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.9375rem; color: var(--ink-2); transition: box-shadow 0.15s, color 0.15s; text-align: left; }
.chat-idea:hover { box-shadow: inset 0 0 0 1px var(--green); color: var(--green-text); }
.msg { max-width: 88%; background: var(--card); border-radius: 20px 20px 20px 6px; padding: 14px 18px; box-shadow: 0 0 0 1px var(--ring), var(--shadow-1); font-size: 1rem; line-height: 1.55; align-self: flex-start; overflow-wrap: anywhere; }
.msg.is-me { align-self: flex-end; background: var(--green); color: #fff; border-radius: 20px 20px 6px 20px; box-shadow: none; white-space: pre-wrap; }
.msg p + p, .msg ul + p, .msg p + ul { margin-top: 10px; }
.msg ul { list-style: disc; padding-left: 1.2em; }
.msg li { margin: 4px 0; }
.msg strong { font-weight: 600; }
.dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 80%, 100% { opacity: 0.35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.opps { display: grid; gap: 14px; max-width: 820px; }
.opp h2 a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.opp h2 a:hover { color: var(--green-text); }
.pill-kind { background: var(--green-soft); color: var(--green-text); }
.opp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.ans-act.is-quiet { background: none; color: var(--muted); }
.ans-act.is-quiet:hover { background: var(--mist); color: var(--ink); }
.opp-fact { padding: 12px 14px; border-radius: 14px; background: var(--mist-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.opp-v { font-weight: 600; line-height: 1.35; margin-top: 3px; overflow-wrap: anywhere; }
.opp-fact .fact-q { margin-top: 6px; font-size: 0.75rem; }
.opp-src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; }
@media (max-width: 720px) { .opp-facts { grid-template-columns: 1fr; } }
/* Ask: the question as a heading, the answer as a briefing with parts you can act on. */
.ask-q { font: 600 1.25rem/1.3 var(--font-display); letter-spacing: -0.02em; margin-top: 18px; padding-left: 14px; border-left: 3px solid var(--green); animation: rise 0.22s var(--ease) both; }
.ask-q:first-child { margin-top: 0; }
.ans { display: grid; gap: 10px; animation: rise 0.24s var(--ease) both; }
.ans-card, .ans.is-wait { background: var(--card); border-radius: 22px; padding: 22px; box-shadow: 0 0 0 1px var(--ring), var(--shadow-1); min-width: 0; }
.ans.is-wait { padding: 18px 22px; width: max-content; }
/* A part that stands on its own starts with its title, not with a dividing line. */
.ans-card.is-part > .ans-b { margin-top: 0; padding-top: 0; border-top: 0; }
.ans-card.is-part .ans-h { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 14px; }
.ans-card.is-next { background: none; box-shadow: none; padding: 6px 4px 0; }
.ans-card.is-next .ans-h { font-size: 0.8125rem; color: var(--muted); margin-bottom: 10px; }
.ans-card.is-next .ans-next { margin-top: 0; }
.ans-card.is-next .chat-idea { background: var(--card); }
.ans-plain p + p, .ans-plain ul + p, .ans-plain p + ul { margin-top: 10px; }
.ans-plain ul { list-style: disc; padding-left: 1.2em; }
.ans-lead { font-size: 1.0625rem; line-height: 1.55; color: var(--ink); }
.ans-b { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.ans-h { font: 600 0.8125rem/1.3 var(--font); letter-spacing: 0.01em; color: var(--muted); margin-bottom: 10px; }
.ans-t { font-weight: 600; line-height: 1.35; }
a.ans-t { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
a.ans-t:hover { color: var(--green-text); }
.ans-s { font-size: 0.875rem; color: var(--ink-2); margin-top: 2px; }
.ans-d { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); margin-top: 4px; }
.ans-host { font-size: 0.75rem; color: var(--faint); margin-top: 4px; }
.ans-points { display: grid; gap: 10px; }
.ans-points li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.ans-points .icon { flex: none; margin-top: 4px; color: var(--green-text); }
.ans-steps { display: grid; gap: 14px; }
.ans-steps > li { display: flex; gap: 12px; align-items: flex-start; }
.ans-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); font: 600 0.8125rem/26px var(--font); text-align: center; }
.ans-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ans-act { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 13px; border-radius: 980px; font: 500 0.8125rem/1 var(--font); color: var(--green-text); background: var(--green-soft); cursor: pointer; transition: background 0.15s, color 0.15s; flex: none; }
.ans-act:hover { background: var(--green); color: #fff; }
.ans-act.is-done, .ans-act.is-done:hover { background: var(--mist); color: var(--muted); cursor: default; }
.ans-unis, .ans-links { display: grid; gap: 10px; }
.ans-uni, .ans-link { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--mist-2); box-shadow: inset 0 0 0 1px var(--line); }
.ans-link { align-items: center; }
.ans-scroll { overflow-x: auto; margin: 0 -4px; }
.ans-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.ans-table th { text-align: left; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: bottom; }
.ans-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.ans-table td:first-child { color: var(--muted); white-space: nowrap; }
.ans-table tr:last-child td { border-bottom: 0; }
.ans-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--green-soft); font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.ans-note .icon { flex: none; margin-top: 3px; color: var(--green-text); }
.ans-note.is-caution { background: var(--reach-soft); }
.ans-note.is-caution .icon { color: var(--reach); }
.ans-src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 6px; font-size: 0.75rem; color: var(--faint); }
.ans-src a { padding: 3px 9px; border-radius: 980px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.ans-src a:hover { color: var(--green-text); }
.ans-src-note { flex-basis: 100%; }
.ans-next { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ans-next .chat-idea { font-size: 0.875rem; padding: 8px 14px; background: var(--mist-2); }
.chat-log > .ans + .ask-q { margin-top: 26px; }
@media (max-width: 560px) { .ans-card { padding: 18px 16px; border-radius: 20px; } .ans-link { flex-direction: column; align-items: flex-start; } }
.chat-form { position: sticky; bottom: 18px; display: flex; align-items: flex-end; gap: 8px; background: var(--card); border-radius: 26px; padding: 8px 8px 8px 20px; box-shadow: 0 0 0 1px var(--line-2), var(--shadow-2); }
.chat-form:focus-within { box-shadow: 0 0 0 1.5px var(--green), var(--shadow-2); }
.chat-input { flex: 1; border: 0; outline: 0; resize: none; background: transparent; padding: 9px 0; line-height: 1.45; max-height: 160px; min-height: 42px; }
.chat-send { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; transition: background 0.15s; }
.chat-send:hover { background: var(--green-d); }
.chat-send .icon { transform: rotate(-90deg); stroke-width: 2; }
@media (max-width: 760px) { .chat { min-height: calc(100vh - 260px); } .chat-form { bottom: calc(84px + env(safe-area-inset-bottom)); } .msg { max-width: 94%; } }
