/* Tempo in morning light: deep slate before sunrise, the warm orange of the sun coming up, and sage for what went
   well. Muster, Folio and Ledger share the family look - dark, a serif for headings, a rule under the bar; this one is
   about getting moving again, so it is calm rather than a gym. */
:root {
    --bg: #121a1c;
    --panel: #1a2427;
    --panel-hover: #213034;
    --sunk: #141d1f;
    --line: #2a3739;
    --line-strong: #3a4a49;
    --text: #e8e4da;
    --muted: #8f9a94;
    --faint: #5f6b67;
    --accent: #eb9a63;
    --accent-strong: #f2ac7a;
    --accent-dim: #3a2a1c;
    --accent-ink: #2a1608;
    --good: #86c49a;
    --good-dim: #2f5a43;
    --danger: #e0766a;
    --danger-dim: #3e2220;
    --warn: #e9b44c;

    /* No fonts are fetched from anywhere: the serif each device already has. */
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;

    --radius: 14px;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 "Segoe UI", system-ui, sans-serif;
}

/* First light on the horizon, low and warm, on a layer of its own that stays put while the page scrolls. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse 90% 45% at 50% 108%, rgba(235, 154, 99, .10) 0%, transparent 70%),
                radial-gradient(ellipse 120% 60% at 50% -10%, #1a2629 0%, var(--bg) 60%); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .005em; }
h1 { font-size: 2rem; margin: 0 0 1rem; line-height: 1.15; }
h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
h1:focus { outline: none; }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.accent { color: var(--accent); }
.good { color: var(--good); }
.warn { color: var(--danger); }
.lead { max-width: 46rem; margin: -.4rem 0 1.4rem; }
.label { display: block; color: var(--muted); font-size: .84rem; margin-bottom: .35rem; }
.big-number { font-size: 1.6rem; font-weight: 600; margin: .1rem 0; font-variant-numeric: tabular-nums; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }

.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon .fill { fill: currentColor; }

/* ---- Shell ---- */

.shell { min-height: 100vh; }

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 2rem;
    padding: .7rem 2rem;
    background: rgba(18, 26, 28, .88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
/* A line of first light under the bar. */
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-dim) 20%, var(--accent) 50%, var(--accent-dim) 80%, transparent); opacity: .7; }

.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-family: var(--serif); font-size: 1.5rem; font-style: italic; font-weight: 600; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand img { width: 1.6rem; height: 1.6rem; }

.topnav { display: flex; gap: .3rem; flex-wrap: wrap; }
.topnav a, .topbar-end a { color: var(--text); padding: .35rem .8rem; border-radius: 999px; }
.topnav a:hover, .topbar-end a:hover { background: var(--panel-hover); text-decoration: none; }
.topnav a.active, .topbar-end a.active { color: var(--accent); background: var(--accent-dim); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.sign-out { margin: 0; }
.topbar-gear { display: none; }

.content { max-width: 1280px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }

.tabbar { display: none; }

/* ---- Pieces ---- */

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.card + .card { margin-top: 0; }
.card h2 { display: flex; align-items: center; gap: .45rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    background: var(--accent); color: var(--accent-ink);
    border: 1px solid var(--accent); border-radius: 10px;
    padding: .5rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line-strong); font-weight: 500; }
.btn.secondary:hover { background: var(--panel-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #2a0e0b; }
.btn.small { padding: .25rem .7rem; font-size: .85rem; }
.btn.large { padding: .75rem 1.5rem; font-size: 1.05rem; }

.link-button { background: none; border: 0; padding: .3rem .2rem; color: var(--accent); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.link-button:hover { text-decoration: underline; }
.link-button.muted { color: var(--muted); }
.link-button.small { font-size: .84rem; }
.topbar-end .link-button { color: var(--muted); }

.icon-button { background: none; border: 1px solid transparent; border-radius: 8px; color: var(--muted); padding: .3rem; cursor: pointer; line-height: 0; }
.icon-button:hover:not(:disabled) { color: var(--text); background: var(--panel-hover); }
.icon-button:disabled { opacity: .3; cursor: default; }

.notice { border-radius: 10px; padding: .55rem .8rem; margin: .6rem 0; background: var(--sunk); border: 1px solid var(--line); }
.notice.warn { color: var(--danger); border-color: var(--danger-dim); background: var(--danger-dim); }
.notice.good-notice { color: var(--good); border-color: var(--good-dim); background: rgba(47, 90, 67, .25); }

input, select, textarea {
    background: var(--sunk); color: var(--text);
    border: 1px solid var(--line-strong); border-radius: 9px;
    padding: .45rem .6rem; font: inherit; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
input[type="date"] { color-scheme: dark; }
textarea { resize: vertical; width: 100%; }
input.big { font-size: 1.35rem; width: 7.5rem; font-variant-numeric: tabular-nums; }
.search { width: 100%; }

.fields { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end; margin: .6rem 0; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.field > span:first-child { color: var(--muted); font-size: .84rem; }
.field.wide { flex: 1 1 100%; }
.field.wide input { width: 100%; }
.field.narrow input { width: 6.5rem; }
.with-unit { display: inline-flex; align-items: center; gap: .4rem; }
.with-unit input:not(.big) { width: 6rem; }
.unit { color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; }

.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill {
    display: inline-flex; align-items: center; gap: .35rem;
    background: transparent; color: var(--text);
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: .3rem .8rem; font: inherit; cursor: pointer;
}
.pill:hover { background: var(--panel-hover); }
.pill.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.pills.small .pill { padding: .15rem .6rem; font-size: .84rem; }

.tag { display: inline-block; padding: .1rem .6rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .8rem; color: #c9c4b8; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }

/* The five faces. */
.moods { display: flex; gap: .35rem; }
.mood { background: none; border: 1px solid transparent; border-radius: 50%; color: var(--muted); padding: .25rem; cursor: pointer; line-height: 0; font-size: 1.7rem; }
.mood:hover { color: var(--text); background: var(--panel-hover); }
.mood.on { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.moods.large .mood { font-size: 2.3rem; padding: .3rem; }

/* Numbered blocks for effort and the back. */
.scale { display: flex; gap: 4px; flex-wrap: nowrap; max-width: 30rem; }
.scale .step {
    flex: 1; min-width: 1.9rem; height: 2.1rem;
    background: var(--sunk); color: var(--muted);
    border: 1px solid var(--line); border-radius: 6px;
    font: inherit; font-size: .85rem; cursor: pointer;
}
.scale .step:hover { border-color: var(--line-strong); color: var(--text); }
.scale .step.filled { background: var(--good-dim); color: var(--text); border-color: var(--good-dim); }
.scale .step.on { background: var(--good); color: #0f2016; border-color: var(--good); font-weight: 600; }
.scale.pain .step.filled { background: #4a3324; border-color: #4a3324; }
.scale.pain .step.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.question { display: flex; flex-direction: column; gap: .3rem; margin: .9rem 0; }

.meter { height: 7px; background: var(--line); border-radius: 4px; margin: .5rem 0 .7rem; overflow: hidden; }
.meter > div { height: 100%; background: var(--good); border-radius: 4px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); margin-bottom: .6rem; }

.table { width: 100%; border-collapse: collapse; margin-top: .8rem; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: .84rem; border-bottom: 1px solid var(--line); padding: .35rem .5rem; }
.table td { border-bottom: 1px solid var(--line); padding: .35rem .5rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table input { width: 100%; }

.empty { text-align: center; padding: 2rem; }

/* ---- Charts ---- */

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; }
.chart .series { fill: none; stroke: var(--good); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--good); stroke: var(--panel); stroke-width: 2; }
.chart .goal { stroke: var(--accent); stroke-dasharray: 5 5; opacity: .7; }
.chart .goal-label { fill: var(--accent); }
.chart .guide { stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .guide.goal { stroke: var(--accent); opacity: .8; }
.chart .guide.healthy { stroke: var(--good); stroke-dasharray: 2 6; opacity: .7; }
.chart .guide-label.goal { fill: var(--accent); }
.chart .guide-label.healthy { fill: var(--good); }
.chart .bar { fill: var(--good-dim); }
.chart .bar.met { fill: #3f7a59; }
.chart .bar.current { fill: var(--good); }
.chart .bar.paused { fill: var(--line); }
.chart .value { fill: var(--text); font-size: 12px; }
.chart-empty { padding: 1.5rem 0; }

/* ---- Vandaag ---- */

.today { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.today .col { display: flex; flex-direction: column; gap: 1rem; }
.greeting { margin-bottom: 1rem; }
.greeting h1 { margin: 0; }
.checkin { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.checkin .label { margin: 0; font-size: .95rem; }
.proposal { border-color: #5a3d26; }
.proposal h2 { font-size: 1.4rem; margin: .2rem 0 .1rem; }
.proposal .last { margin: .8rem 0 0; border-top: 1px solid var(--line); padding-top: .6rem; }
.saved { display: flex; align-items: center; gap: .8rem; border-color: var(--good-dim); }
.saved .icon { font-size: 1.6rem; }
.saved div { flex: 1; display: flex; flex-direction: column; }
.milestone { display: flex; align-items: center; gap: .8rem; border-color: var(--good-dim); padding: .7rem 1rem; }
.milestone > .icon { font-size: 1.4rem; }
.milestone div { flex: 1; display: flex; flex-direction: column; }
.icon.turned { transform: rotate(45deg); }
.review h2 { margin: 0; font-size: 1.1rem; }
.review-rows li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.review-rows li:last-child { border-bottom: 0; }
.intervals-link { margin: .7rem 0 0; display: flex; align-items: center; gap: .35rem; }
.workout-links li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.workout-links li:first-child { border-top: 0; }
.workout-links a { display: inline-flex; gap: .4rem; align-items: center; color: var(--text); font-weight: 500; }
.done-list li { display: flex; align-items: center; gap: .6rem; padding: .25rem 0; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .8rem; color: var(--muted); }
.day { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.day .mark { width: .7rem; height: .7rem; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.day.moved { color: var(--good); }
.day.moved .mark { background: var(--good); border-color: var(--good); }
.day.today span:first-child { color: var(--accent); font-weight: 600; }
.weigh-in { display: flex; align-items: center; gap: .8rem; margin: .4rem 0; }
.figure-line { display: flex; align-items: baseline; gap: .7rem; }

/* ---- Sessies ---- */

.form-card { margin-bottom: 1.2rem; }
.week-group { margin-bottom: 1.4rem; }
.week-group header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; border-bottom: 1px solid var(--line); padding-bottom: .3rem; margin-bottom: .3rem; }
.week-group h2 { margin: 0; font-size: 1.1rem; }
.rows { list-style: none; margin: 0; padding: 0; }
.session-row {
    display: grid; grid-template-columns: 7rem minmax(9rem, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: center; gap: .3rem 1rem; padding: .5rem .4rem; border-bottom: 1px solid var(--line);
}
.session-row:hover { background: rgba(255, 255, 255, .015); }
.session-row .when { color: var(--muted); }
.session-row .what { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
.session-row .nums { font-variant-numeric: tabular-nums; }
.session-row .feel { display: inline-flex; align-items: center; gap: .3rem; font-size: 1.15rem; }
.session-row .feel .small { font-size: .78rem; margin-left: .3rem; }
.session-row .row-actions { display: inline-flex; align-items: center; gap: .2rem; justify-self: end; }
.session-row .note { grid-column: 2 / -1; }
.exercises-done { grid-column: 2 / -1; list-style: none; padding: .3rem 0 0; margin: 0; }
.exercises-done li { display: flex; gap: .8rem; padding: .1rem 0; }

/* ---- Voortgang ---- */

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; }
.stat strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.milestone-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.milestone-list li > span:first-child { display: inline-flex; align-items: center; gap: .45rem; }
.milestone-list li.ahead { color: var(--muted); }
.milestone-list li.ahead .icon { color: var(--faint); }
.review-col { display: flex; flex-direction: column; gap: .7rem; }
.measure .fields { align-items: flex-end; }

/* ---- Oefeningen ---- */

.library { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.library-list { position: sticky; top: calc(4rem + 1rem); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; max-height: calc(100vh - 6rem); overflow: auto; }
.library-list h3 { font-family: inherit; font-size: .8rem; color: var(--muted); font-weight: 500; margin: .9rem .4rem .2rem; }
.library-list .item { display: flex; justify-content: space-between; align-items: center; padding: .3rem .55rem; border-radius: 8px; color: var(--text); }
.library-list .item:hover { background: var(--panel-hover); text-decoration: none; }
.library-list .item.on { background: var(--accent-dim); color: var(--accent); }
.library-list .item.add { color: var(--accent); margin-top: .8rem; justify-content: flex-start; gap: .4rem; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.detail-head h1 { margin-bottom: .4rem; }
.head-actions { display: flex; align-items: center; gap: .4rem; }
.head-actions .icon-button { font-size: 1.25rem; }
.steps { margin: 0; padding-left: 1.3rem; }
.steps li { margin: .3rem 0; }
.cautions { margin: 0; padding-left: 1.1rem; }
.cautions li { margin: .25rem 0; }
.easier { margin: .9rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); }
.easier .label { display: inline; margin-right: .3rem; }
.history li { display: flex; gap: .9rem; align-items: center; padding: .2rem 0; font-variant-numeric: tabular-nums; }
.history li span:first-child { color: var(--muted); width: 6.5rem; }
.disclaimer { max-width: 50rem; }
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.editor .fields { margin: .4rem 0 .8rem; }

/* The stick figures: what holds still in grey, what moves in the morning colour. */
.figure-card { display: flex; align-items: center; justify-content: center; }
.figure { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; }
.figure polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.figure .floor { stroke: var(--line-strong); stroke-width: 2; }
.figure .trunk { stroke: var(--text); stroke-width: 7; }
.figure .still { stroke: var(--muted); stroke-width: 5; }
.figure .moves { stroke: var(--accent); stroke-width: 5.5; }
.figure .prop { stroke: var(--faint); stroke-width: 3; }
.figure .other { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 4; opacity: .55; }
.figure .head { fill: var(--text); }
.figure .dumbbell line { stroke: var(--muted); stroke-width: 2.5; }
.figure .dumbbell rect { fill: var(--muted); }
.figure.none { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--faint); min-height: 8rem; }

/* ---- Workouts ---- */

.workout-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.workout-card { display: flex; flex-direction: column; }
.workout-card .actions { margin-top: auto; padding-top: .6rem; }
.items li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem .1rem; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.edit-items { margin: .6rem 0; }
.edit-item { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); margin-bottom: .45rem; }
.edit-item .order { display: flex; flex-direction: column; }
.edit-item .order .icon-button { padding: .05rem; }
.edit-item .name { flex: 1 1 9rem; display: flex; flex-direction: column; }
.mini { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); }
.mini input { width: 4.4rem; padding: .3rem .4rem; }
.add-exercise { display: flex; gap: .6rem; flex-wrap: wrap; }
.add-exercise select { flex: 1; min-width: 12rem; }

/* Doing one: big targets, for a finger on a tablet on the floor beside the mat. */
.run { max-width: 1100px; margin: 0 auto; }
.run-head { display: flex; justify-content: space-between; align-items: center; }
.run-head .clock { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.run-card h1 { margin-bottom: .4rem; }
.segments { display: flex; gap: 4px; margin: .3rem 0 1rem; }
.segment { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.segment.done { background: var(--good); }
.segment.now { background: var(--accent); }
.run-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.cues { margin: .6rem 0; }
.counter-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
.tap {
    width: 100%; max-width: 22rem; aspect-ratio: 1.5;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--sunk); color: var(--text);
    border: 1px solid var(--line-strong); border-radius: 18px; cursor: pointer; font: inherit;
}
.tap:hover:not(:disabled) { border-color: var(--accent); }
.tap:active:not(:disabled) { transform: scale(.99); }
.tap .count { font-size: 4.2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tap .of { color: var(--muted); font-size: 1.2rem; }
.tap .hint { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.countdown { font-size: 5rem; font-weight: 600; color: var(--good); font-variant-numeric: tabular-nums; line-height: 1.1; }
.run-actions { display: flex; gap: .7rem; width: 100%; max-width: 22rem; }
.run-actions .btn.large { flex: 2; }
.run-actions .btn.secondary { flex: 1; }
.weight-field { align-items: center; }
.next { margin-top: .4rem; border-top: 1px solid var(--line); padding-top: .6rem; width: 100%; }

/* Intervals: a bar of blocks, and the block you are in large. */
.block-bar { display: flex; gap: 3px; margin: .3rem 0 1rem; }
.block-bar .block { height: 8px; border-radius: 3px; background: var(--good-dim); }
.block-bar.large .block { height: 14px; }
.block-bar .block.pittig { background: #6b4a2c; }
.block-bar .block.inlopen, .block-bar .block.uitlopen { background: var(--line-strong); }
.block-bar .block.past { opacity: .35; }
.block-bar .block.now { outline: 2px solid var(--text); outline-offset: 1px; }
.interval-now { text-align: center; padding: 1.6rem 1rem; margin-bottom: 1rem; }
.interval-now .block-name { font-size: 1.3rem; font-weight: 600; color: var(--good); }
.interval-now.pittig { border-color: var(--accent); background: rgba(58, 42, 28, .5); }
.interval-now.pittig .block-name, .interval-now.pittig .countdown { color: var(--accent); }
.interval-now.inlopen .block-name, .interval-now.uitlopen .block-name, .interval-now.inlopen .countdown, .interval-now.uitlopen .countdown { color: var(--text); }
.intervals .countdown { font-size: 5.5rem; }
.intervals > .card.row-between { margin-bottom: 1rem; }
.run-actions.wide { max-width: none; margin: 1rem 0 .5rem; }
.run-actions.wide .btn { flex: 1; }

/* ---- Opbouw ---- */

.ladder .rung { display: flex; gap: .8rem; align-items: flex-start; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .4rem; }
.ladder .rung > span:last-child { display: flex; flex-direction: column; }
.ladder .rung.done { opacity: .6; }
.ladder .rung.done .mark { color: var(--good); }
.ladder .rung.now { border-color: var(--accent); background: rgba(58, 42, 28, .6); }
.ladder .rung.now .mark { color: var(--accent); }
.ladder .rung.later .mark { color: var(--faint); }
.goal-steps { margin: .7rem 0 .4rem; }
.goal-steps .rung { padding: .4rem .6rem; }
.goal-steps .rung > span:last-child { flex-direction: row; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.week-checks li { display: flex; gap: .8rem; align-items: center; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.week-checks li span:first-child { width: 3.5rem; }
.plan-edit td:nth-child(2) input, .plan-edit td:nth-child(3) input, .plan-edit td:nth-child(4) input { width: 4.5rem; }

.pause-col { display: flex; flex-direction: column; gap: 1rem; }
.paused { border-color: var(--line-strong); }
.faint { color: var(--faint); }
.resume { border-color: var(--good-dim); }
.choices { display: flex; flex-direction: column; gap: .5rem; margin: .6rem 0; }
.choice { display: flex; flex-direction: column; align-items: stretch; gap: .2rem; text-align: left; background: var(--sunk); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; font: inherit; cursor: pointer; }
.choice:hover { border-color: var(--line-strong); }
.choice.on { border-color: var(--good); background: rgba(47, 90, 67, .2); }

/* ---- Instellingen ---- */

.panel h2 { margin-bottom: .3rem; }
.inline-form { display: flex; gap: .6rem; margin: .6rem 0; }
.inline-form input { flex: 1; }
.password-fields { display: flex; flex-direction: column; gap: .5rem; max-width: 24rem; }
.backups li { display: flex; justify-content: space-between; padding: .2rem 0; font-size: .85rem; }

/* ---- Signing in ---- */

.signin-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.signin { width: 100%; max-width: 24rem; display: flex; flex-direction: column; gap: .7rem; }
.signin h1 { margin-bottom: .2rem; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: .7rem 1rem; background: var(--danger-dim); color: var(--text); z-index: 50; }
#blazor-error-ui .reload { margin-left: .5rem; }

/* ---- Narrower ---- */

@media (max-width: 1000px) {
    .today, .grid-2, .run-grid { grid-template-columns: minmax(0, 1fr); }
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library { grid-template-columns: minmax(0, 1fr); }
    .library-list { position: static; max-height: none; }
    .session-row { grid-template-columns: 6rem minmax(0, 1fr) auto; }
    .session-row .nums, .session-row .feel { grid-column: 2 / 3; }
}

/* The phone: a row of tabs under the thumb. */
@media (max-width: 760px) {
    .topbar { padding: .55rem 1rem; gap: 1rem; }
    .topnav, .topbar-end { display: none; }
    .topbar-gear { display: block; margin-left: auto; color: var(--muted); font-size: 1.4rem; line-height: 0; }
    .content { padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); }
    h1 { font-size: 1.65rem; }
    .moods.large .mood { font-size: 2rem; }
    .scale .step { min-width: 0; }

    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
        display: grid; grid-template-columns: repeat(6, 1fr);
        padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
        background: rgba(18, 26, 28, .95); backdrop-filter: blur(8px);
        border-top: 1px solid var(--line);
    }
    .tabbar a { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: var(--muted); font-size: .66rem; padding: .25rem 0; }
    .tabbar a .icon { font-size: 1.35rem; }
    .tabbar a.active { color: var(--accent); }
    .tabbar a:hover { text-decoration: none; }
}
.goal-line { margin: .3rem 0 0; }
