/* Layout: dark gym logbook. Sticky header, one view at a time, icon tab bar at the bottom with Today as the raised main button. */
:root {
  color-scheme: dark;
  --bg: #0C1218;
  --surface: #141D26;
  --raised: #1B2632;
  --sunk: #0F161E;
  --ink: #E8EDF2;
  --muted: #97A3AF;
  --faint: #66727F;
  --line: #24303C;
  --blue: #7DA7EF;
  --red: #F27F70;
  --green: #5EC08A;
  --amber: #E5AB4E;
  --violet: #A79EF0;
  --teal: #55C6CF;
  --ok: #5EC08A;
  --warn: #E5AB4E;
  --accent: #F27F70;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.45;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  -webkit-tap-highlight-color: transparent;
}
body.no-tabs { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.wrap { max-width: 680px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; text-wrap: balance; margin: 0; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.12rem; }
p { margin: 0; }
a { color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); font-weight: 600; }
.form-err { color: var(--red); font-size: 0.95rem; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom, 0px)); z-index: 20; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; max-width: calc(100% - 32px); text-align: center; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 10px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; line-height: 1; white-space: nowrap; min-width: 0; }
.brand span { color: var(--accent); }
.brand .role { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-left: 6px; }
.big-brand { font-size: 2.6rem; }
.top-r { display: flex; align-items: center; gap: 8px; flex: none; }
.hdr-date { color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: 600 0.9rem var(--font-body); cursor: pointer; white-space: nowrap; }
.icon-btn.round { padding: 6px; }
.icon-btn svg { width: 18px; height: 18px; }
.lang-select { width: auto; padding: 6px 10px; border-radius: 999px; background: var(--raised); font-size: 0.9rem; }
.demo-bar, .preview-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--ink); font-size: 0.88rem; border-bottom: 1px solid var(--line); }
.preview-bar { background: color-mix(in srgb, var(--blue) 20%, var(--surface)); }

main { display: block; padding-block: 16px; }
.view { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--raised); font-family: var(--font-display); font-weight: 600; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; }
.sh-0 { color: var(--violet); } .sh-1 { color: var(--amber); } .sh-2 { color: var(--teal); } .sh-3 { color: var(--blue); } .sh-4 { color: var(--green); } .sh-free { color: var(--muted); }
.st-invited { color: var(--muted); } .st-intake { color: var(--amber); } .st-review { color: var(--red); } .st-active { color: var(--green); } .st-archived { color: var(--faint); }
.c-blue { color: var(--blue); } .c-red { color: var(--red); } .c-green { color: var(--green); } .c-amber { color: var(--amber); } .c-violet { color: var(--violet); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; background: var(--raised); color: var(--muted); }
.badge.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.badge.warnb { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red); }
.badge.t-blue { background: color-mix(in srgb, var(--blue) 20%, transparent); color: var(--blue); }
.badge.t-red { background: color-mix(in srgb, var(--red) 20%, transparent); color: var(--red); }
.badge.t-green { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); }
.badge.t-amber { background: color-mix(in srgb, var(--amber) 20%, transparent); color: var(--amber); }
.badge.t-violet { background: color-mix(in srgb, var(--violet) 20%, transparent); color: var(--violet); }

/* controls */
button { font: inherit; cursor: pointer; }
.btn { background: var(--ink); color: var(--bg); border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: 1rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 8px 12px; font-size: 0.9rem; font-weight: 600; }
.btn:disabled { opacity: 0.5; cursor: default; }
.danger-btn { background: var(--red); color: var(--bg); }
.linkbtn { background: none; border: 0; color: var(--blue); font-weight: 600; font-size: 0.9rem; padding: 2px 0; text-decoration: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status { font-size: 0.9rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 64px; resize: vertical; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; line-height: 1.4; }
input[type="checkbox"] { width: 24px; height: 24px; padding: 0; margin: 0; accent-color: var(--ok); flex: none; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .q-label { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.checkrow { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkrow span { padding-top: 2px; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg.tabs5 { display: flex; flex-wrap: wrap; }
.seg.tabs5 a { flex: 1 0 auto; padding: 9px 10px; font-size: 0.95rem; text-align: center; }
@media (max-width: 430px) { .seg.tabs5 a { padding: 8px 4px; font-size: 0.85rem; } }
.seg button, .seg a { border: 1px solid var(--line); background: var(--sunk); color: var(--ink); border-radius: 10px; padding: 10px 2px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; text-decoration: none; }
.seg [aria-selected="true"], .seg [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.seg [aria-pressed="true"][data-color="blue"] { background: var(--blue); border-color: var(--blue); }
.seg [aria-pressed="true"][data-color="red"] { background: var(--red); border-color: var(--red); }
.seg [aria-pressed="true"][data-color="green"] { background: var(--green); border-color: var(--green); }
.seg [aria-pressed="true"][data-color="amber"] { background: var(--amber); border-color: var(--amber); }
.seg [aria-pressed="true"][data-color="violet"] { background: var(--violet); border-color: var(--violet); }

/* auth */
.auth { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; max-width: 460px; }
.auth-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.auth form { display: flex; flex-direction: column; gap: 12px; }

/* intake */
.intake-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.progressbar { height: 6px; background: var(--sunk); border-radius: 999px; overflow: hidden; }
.progressbar span { display: block; height: 100%; background: var(--accent); }
.q-list { display: flex; flex-direction: column; gap: 18px; }
.q { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.q-label { color: var(--ink); font-size: 1rem; font-weight: 600; }
.q-help { font-size: 0.86rem; color: var(--muted); }
.q-missing .q-label, .q-missing.q-check span { color: var(--red); }
.req { color: var(--red); }
.num-wrap { display: flex; align-items: center; gap: 8px; max-width: 220px; }
.num-wrap .unit { color: var(--muted); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-opt { position: relative; }
.pill-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-opt span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--sunk); cursor: pointer; font-size: 0.95rem; }
.pill-opt input:checked + span { background: color-mix(in srgb, var(--accent) 24%, var(--sunk)); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.pill-opt input:focus-visible + span, .scale-opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.scale { display: grid; gap: 4px; }
.scale-opt { position: relative; }
.scale-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale-opt span { display: block; text-align: center; padding: 9px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); cursor: pointer; font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.scale-opt input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.q-check .checkrow span { color: var(--ink); }
.intake-actions { padding-top: 6px; }
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.review-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding-block: 10px; border-top: 1px solid var(--line); }
.review-list li:first-child { border-top: 0; }

/* hero & timeline */
.hero { gap: 14px; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.next { display: flex; gap: 14px; align-items: stretch; }
.next .bar { width: 6px; border-radius: 4px; background: var(--line); flex: none; }
.bar.b-blue { background: var(--blue); } .bar.b-red { background: var(--red); } .bar.b-green { background: var(--green); } .bar.b-amber { background: var(--amber); } .bar.b-violet { background: var(--violet); } .bar.b-ok { background: var(--ok); }
.next-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.next-when { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.next-title { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1.02; }
.hint { border-radius: 10px; padding: 10px 12px; background: var(--raised); font-size: 0.95rem; border-left: 4px solid var(--muted); }
.hint.ok { border-left-color: var(--ok); } .hint.warn { border-left-color: var(--warn); } .hint.bad { border-left-color: var(--red); }
.tomorrow { font-size: 0.92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.pain { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.pain button { border: 1px solid var(--line); background: var(--sunk); color: var(--ink); border-radius: 8px; padding: 9px 0; font-family: var(--font-display); font-weight: 600; font-size: 1rem; font-variant-numeric: tabular-nums; }
.pain button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pain button.hi[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl li { display: grid; grid-template-columns: 52px 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding-block: 9px; position: relative; }
.tl .tm { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl .dot { width: 12px; height: 12px; border-radius: 50%; margin: 5px auto 0; background: var(--line); border: 2px solid var(--line); }
.tl li::before { content: ""; position: absolute; left: 68px; top: 24px; bottom: -6px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .k-meal .dot { background: var(--sunk); border-color: var(--ok); }
.tl .k-train .dot { background: currentColor; border-color: currentColor; }
.tl .k-train .tt { color: var(--ink); }
.tl .k-shift .dot { background: var(--sunk); border-color: var(--amber); }
.tl .k-sleep .dot { background: var(--violet); border-color: var(--violet); }
.tl .k-cook .dot { background: var(--warn); border-color: var(--warn); }
.tl .k-wake .dot { background: var(--sunk); border-color: var(--blue); }
.tl .tt { font-weight: 600; }
.tl .ts { font-size: 0.88rem; color: var(--muted); }
.tl .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--ink); }
.tl .side { display: flex; align-items: center; gap: 8px; }
.tl .pg { font-family: var(--font-display); font-weight: 600; color: var(--muted); white-space: nowrap; }
.tl li.past { opacity: 0.5; }
.tl li.done .tt { text-decoration: line-through; text-decoration-color: var(--muted); }
.tl li.now { background: var(--raised); border-radius: 10px; margin-inline: -8px; padding-inline: 8px; }
.tl li.now .tm { color: var(--ink); }
.tl li.now::before { left: 76px; }
.now-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--ok); }
.extras { display: flex; flex-wrap: wrap; gap: 8px; }
.extras label { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; cursor: pointer; background: var(--sunk); }
.extras input[type="checkbox"] { width: 18px; height: 18px; }
.notes { display: flex; flex-direction: column; gap: 10px; }
.note { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 3px solid var(--blue); }
.note .when { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* training */
.tr-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.tr-head .field { width: 150px; }
.tr-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.big { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; }
.ex { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ex-name { font-weight: 700; font-size: 1.02rem; }
.ex-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-meta span { background: var(--raised); border-radius: 6px; padding: 2px 8px; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-tip { font-size: 0.9rem; color: var(--muted); }
.prev { font-size: 0.88rem; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.sets { display: flex; flex-direction: column; gap: 6px; }
.set { display: grid; grid-template-columns: 28px minmax(0, 1fr) 16px minmax(0, 1fr); gap: 8px; align-items: center; }
.set.one { grid-template-columns: 64px minmax(0, 1fr); }
.set .sn { font-family: var(--font-display); font-weight: 600; color: var(--muted); font-size: 0.95rem; }
.set .x { color: var(--faint); text-align: center; }
.set input { text-align: center; font-variant-numeric: tabular-nums; padding: 10px 6px; }

/* food */
.weeknav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.weeknav button { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font-size: 1.3rem; }
.weeknav .wl { text-align: center; display: flex; flex-direction: column; }
.weeknav .wl b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.dayc { padding: 0; gap: 0; overflow: hidden; }
.dayc > summary { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.dayc > summary .sl { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dayc > summary .dn { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.dayc > summary .chev { color: var(--faint); transition: transform .15s; }
.dayc[open] > summary .chev { transform: rotate(90deg); }
.dayc.is-today { border-color: var(--ok); }
.dayc .meals { list-style: none; margin: 0; padding: 0 16px 14px; display: flex; flex-direction: column; }
.dayc .meals li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding-block: 9px; border-top: 1px solid var(--line); }
.dayc .meals .tm { font-family: var(--font-display); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.dayc .meals .mn { font-weight: 600; }
.dayc .meals .mw { font-size: 0.9rem; color: var(--muted); }
.recipe { border-top: 1px solid var(--line); padding-top: 12px; }
.recipe:first-of-type { border-top: 0; padding-top: 0; }
.recipe > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.recipe .rb { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.recipe ul, .recipe ol, .plan-sec ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checklist li { border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist label { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 10px; cursor: pointer; }
.checklist .q { color: var(--muted); font-size: 0.9rem; }
.checklist .pr { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.checklist input:checked ~ span .n { text-decoration: line-through; color: var(--muted); }

/* calendar & progress */
.week-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding-block: 10px; border-top: 1px solid var(--line); }
.day.past { opacity: 0.5; }
.day.is-today { background: var(--raised); border-radius: 10px; padding-inline: 10px; margin-inline: -10px; border-top-color: transparent; box-shadow: inset 3px 0 0 var(--ok); }
.day .dd { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.day .dd small { display: block; color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.day .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; border-top: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.list li:first-child { border-top: 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.target { background: var(--raised); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.target .v { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.plan-sec { gap: 8px; }

/* admin */
.client-card { text-decoration: none; color: var(--ink); gap: 6px; }
.client-card:hover { border-color: var(--faint); }
.invite { display: flex; flex-direction: column; gap: 8px; background: var(--raised); border-radius: 12px; padding: 12px; }
.invite .code { font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: 0.12em; }
.invite .msg { white-space: pre-wrap; font-family: var(--font-body); font-size: 0.9rem; margin: 0; color: var(--muted); }
.ans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; padding-block: 7px; border-top: 1px solid var(--line); font-size: 0.95rem; }
.ans:first-of-type { border-top: 0; }
.ans .ak { color: var(--muted); }
.ans .av { white-space: pre-wrap; }
.ans.flag { background: color-mix(in srgb, var(--red) 14%, transparent); border-radius: 8px; padding-inline: 8px; }
.ans.flag .av { color: var(--red); font-weight: 600; }
.toggles { display: flex; flex-direction: column; }
.toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 10px; border-top: 1px solid var(--line); cursor: pointer; position: relative; }
.toggle:first-child { border-top: 0; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .tg-l { display: flex; flex-direction: column; gap: 2px; }
.toggle .tg-l small { color: var(--muted); font-size: 0.82rem; }
.toggle .sw { width: 46px; height: 26px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); position: relative; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--faint); transition: transform .15s; }
.toggle input:checked ~ .sw { background: color-mix(in srgb, var(--ok) 40%, var(--sunk)); border-color: var(--ok); }
.toggle input:checked ~ .sw::after { transform: translateX(20px); background: var(--ok); }
.toggle input:focus-visible ~ .sw { outline: 3px solid var(--blue); outline-offset: 2px; }
.danger { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
input[type="search"] { border-radius: 999px; }

/* tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
.tabs .inner { max-width: 680px; margin: 0 auto; display: grid; align-items: end; gap: 4px; padding-top: 6px; }
.tabs button { background: none; border: 1.5px solid transparent; border-radius: 14px; margin-bottom: 6px; color: var(--faint); padding: 6px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 0.78rem var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--ink); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tabs button[aria-current="page"] svg { color: var(--accent); }
.tabs button.main { overflow: visible; color: var(--ink); font-weight: 700; padding-top: 0; }
.tabs button.main .disc { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-top: -28px; background: var(--raised); border: 2px solid var(--accent); color: var(--accent); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.tabs button.main svg { width: 28px; height: 28px; }
.tabs button.main[aria-current="page"] { background: none; border-color: transparent; }
.tabs button.main[aria-current="page"] .disc { background: var(--accent); color: var(--bg); outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 3px; }
.tabs button.main[aria-current="page"] svg { color: var(--bg); }

@media (prefers-reduced-motion: no-preference) { .btn, .seg button, .tabs button, .pain button, .pill-opt span { transition: background-color .15s, color .15s, border-color .15s; } }
@media (max-width: 430px) { .brand .role { display: none; } }
@media (max-width: 380px) {
  .grid2, .targets { grid-template-columns: minmax(0, 1fr); }
  .next-title { font-size: 1.8rem; }
  .tl li { grid-template-columns: 46px 16px minmax(0, 1fr) auto; }
  .tl li::before { left: 61px; }
  .ans { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hdr-date { display: none; }
}

/* Lakši dan */
.easy { margin-top: 12px; }
.easy > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.easy > summary::-webkit-details-marker { display: none; }
.easy > summary::after { content: "›"; transform: rotate(90deg); color: var(--muted); }
.easy[open] > summary::after { transform: rotate(-90deg); }
.easy-opts { display: grid; gap: 8px; margin-top: 8px; }
.easy-opt { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); font: inherit; cursor: pointer; }
.easy-opt span { color: var(--muted); font-size: 0.9rem; }
.easy-opt:active { border-color: var(--accent); }
.easy-on { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }

/* Pregled i napredak klijenata */
.ov-list { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 2px; }
.ov-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ov-list a .small { flex-basis: 100%; padding-left: 18px; }
.ov-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-right: 6px; vertical-align: 1px; }
.pr-seg { display: flex; flex-wrap: wrap; margin-top: 10px; }
.pr-seg button { flex: 1 0 auto; }
.pr-svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.pr-svg .grid { stroke: var(--line); stroke-width: 1; }
.pr-svg .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
.pr-svg .ax { fill: var(--muted); font-size: 10px; font-family: inherit; }
.pr-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pr-legend button { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; }
.pr-legend button[aria-pressed="false"] { opacity: 0.4; text-decoration: line-through; }
.pr-table td a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.pr-table td:nth-child(2) { min-width: 150px; }
.pr-cards { display: grid; gap: 10px; margin-top: 8px; }
.pr-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 6px; background: var(--sunk); }
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr-head a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-width: 0; }
.pr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
@media (min-width: 720px) { .pr-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pr-stat { display: grid; gap: 1px; min-width: 0; align-content: start; }
.pr-l { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.pr-v { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pr-s { font-size: 0.8rem; color: var(--muted); }
.pr-sort select { width: auto; padding: 4px 8px; font-size: 0.9rem; }
.pr-svg .ax { font-size: 11px; }
