/* Review Deck home extras: search, today, trends, features, and the screen / morning / week / evening panels */

/* ---------------------------------------------------------------- search (top bar) */
.search { position: relative; flex: 0 1 420px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--sunk); }
.search:focus-within { border-color: var(--ink); background: var(--paper); }
.search > svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 14px var(--ui); color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 600 11px var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.search:focus-within kbd { display: none; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; max-height: min(70vh, 520px); overflow: auto; padding: 6px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line-2); box-shadow: 0 18px 44px rgba(0,0,0,.18); }
.sr-group { margin: 8px 8px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-3); }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; text-decoration: none; }
.sr-item.on { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line-2); }
.sr-item span { display: flex; flex-direction: column; min-width: 0; }
.sr-item b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-ic { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--ink-3); }
.sr-screen { background: var(--blue); }
.sr-file { background: var(--green); }
.sr-topic { background: var(--amber); }
.sr-feature { background: var(--purple); }
.sr-issue { border-radius: 50%; }
.sr-issue.sev-b { background: var(--red); }
.sr-issue.sev-m { background: var(--orange); }
.sr-issue.sev-n { background: var(--olive); }
.sr-empty { margin: 10px; color: var(--ink-3); font-size: 13.5px; }

/* ---------------------------------------------------------------- today + since last time */
.today-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.tp-col { padding: 18px 22px; min-width: 0; }
.tp-col + .tp-col { border-left: 1px solid var(--line); }
.tp-col .mini-h { margin-bottom: 8px; }
.today-list, .m-list { display: grid; gap: 2px; }
.t-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; font-size: 14.5px; font-weight: 600; }
.t-item:hover { background: var(--sunk); }
.t-item svg, .s-pill svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.t-item span { min-width: 0; }
.tone-good svg { color: var(--green); }
.tone-bad svg { color: var(--red); }
.tone-todo svg { color: var(--amber); }
.tone-info svg { color: var(--blue); }
.t-item.tone-bad { color: var(--red); }
.since-list { display: flex; flex-wrap: wrap; gap: 6px; }
.s-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--sunk); text-decoration: none; font-size: 13px; font-weight: 600; }
.s-pill svg { width: 15px; height: 15px; }
.s-pill:hover { border-color: var(--ink); }
.s-pill.tone-good { border-color: color-mix(in srgb, var(--green) 40%, var(--line-2)); }
.s-pill.tone-bad { border-color: color-mix(in srgb, var(--red) 40%, var(--line-2)); }

/* ---------------------------------------------------------------- sections below the cards */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 40px 0 14px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.section-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); max-width: 720px; }
.trends .section-head p { color: var(--ink-3); }

/* trends: one small line chart per measure, each on its own scale */
.trend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.trend { padding: 16px 18px 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); min-width: 0; }
.tr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tr-head span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-3); }
.tr-head b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.tr-head b small { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-left: 2px; }
.tr-delta { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-2); }
.tr-delta.up { color: var(--green); }
.tr-delta.down { color: var(--red); }
.tchart { position: relative; height: 72px; }
.tchart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.t-line { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.t-area { fill: color-mix(in srgb, var(--blue) 12%, transparent); stroke: none; }
.t-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--paper); pointer-events: none; }
.t-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); pointer-events: none; }
.t-tip { position: absolute; bottom: calc(100% + 4px); transform: translateX(-50%); white-space: nowrap; padding: 4px 8px; border-radius: 7px; background: var(--ink); color: var(--on-ink); font-size: 12px; pointer-events: none; }
.t-tip b { font-weight: 800; margin-right: 3px; }
.tchart.empty { display: grid; place-items: center; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 12.5px; }

/* ---------------------------------------------------------------- features */
.feat-actions { display: flex; align-items: center; gap: 12px; flex: none; font-size: 12.5px; color: var(--ink-3); }
.feat-actions .stale { color: var(--orange); font-weight: 600; }
.pill-btn:disabled { opacity: .55; cursor: progress; }
.feat-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.feat-col { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.fc-head { display: grid; grid-template-columns: 12px auto 1fr; align-items: center; column-gap: 8px; margin-bottom: 2px; }
.fc-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.fc-head b { justify-self: start; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); }
.fc-head small { grid-column: 2 / -1; font-size: 12px; color: var(--ink-3); }
.fc-dot { width: 12px; height: 12px; border-radius: 4px; }
.col-built .fc-dot { background: var(--green); }
.col-in_progress .fc-dot { background: var(--amber); }
.col-recommended .fc-dot { background: var(--blue); }
.feat { padding: 12px 13px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--line); display: grid; gap: 6px; scroll-margin: 90px; }
.feat > b { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.feat > p { margin: 0; font-size: 13px; color: var(--ink-2); }
.feat .missing { padding: 7px 9px; border-radius: 9px; background: color-mix(in srgb, var(--amber) 12%, var(--paper)); color: var(--ink); }
.feat .missing span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: color-mix(in srgb, var(--amber) 60%, var(--ink)); }
.feat.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--ink); } 100% { box-shadow: 0 0 0 0 transparent; } }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--paper); }
.chip::first-letter { text-transform: uppercase; }
.chip.effort-small { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--line-2)); }
.chip.effort-medium { color: color-mix(in srgb, var(--amber) 60%, var(--ink)); border-color: color-mix(in srgb, var(--amber) 50%, var(--line-2)); }
.chip.effort-large { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line-2)); }
.evs { display: flex; flex-wrap: wrap; gap: 5px; }
.ev { display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px var(--ui); padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2); text-decoration: none; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-screen::before, .ev-file::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none; }
.ev-screen::before { background: var(--blue); }
.ev-file { font-family: var(--mono); font-weight: 500; }
.ev-file::before { background: var(--green); }
button.ev:hover, a.ev:hover { border-color: var(--ink); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.link-btn:hover { color: var(--ink); }
.features .setup-error { margin: 0 0 14px; }

/* ---------------------------------------------------------------- dialogs */
.sheet { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border-radius: 22px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.sheet::backdrop { background: rgba(10,10,12,.45); backdrop-filter: blur(2px); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 2px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.sheet-head .mini-h { text-transform: uppercase; }
.ss-file { margin: 2px 0 0; font: 12px var(--mono); color: var(--ink-3); word-break: break-all; }
.x-btn { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: var(--paper); font-size: 22px; line-height: 1; color: var(--ink-2); }
.x-btn:hover { border-color: var(--ink); color: var(--ink); }
.sheet-body { padding: 18px 24px 24px; display: grid; gap: 14px; }
.ss-sec { display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.ss-sec > .pill-btn { justify-self: start; text-decoration: none; }
.ss-h { display: flex; align-items: center; gap: 10px; }
.ss-h img { width: 26px; height: 26px; border-radius: 7px; }
.ss-h h3 { margin: 0; font-size: 16px; font-weight: 800; }
.ss-h span { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ss-issues { display: grid; gap: 2px; }
.ss-issue { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 9px; text-decoration: none; font-size: 13.5px; }
.ss-issue:hover { background: var(--sunk); }
.ss-issue i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.good-note { color: var(--green); }
.ss-known { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.ss-known b { font-size: 15px; color: var(--ink); }
.ss-rounds { display: grid; gap: 4px; }
.ss-round { display: grid; grid-template-columns: 1fr auto 34px; gap: 10px; align-items: center; font-size: 13px; }
.ss-round span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-round small { color: var(--ink-3); }
.ss-round b { text-align: right; }
.ss-round b.hi { color: var(--green); }
.ss-round b.mid { color: var(--amber); }
.ss-round b.lo { color: var(--red); }
.ss-links { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ss-links > span { padding-top: 3px; }

/* morning */
.morning { width: min(560px, calc(100vw - 32px)); padding: 26px 28px 22px; background: var(--paper); overflow: hidden; }
.morning h2 { margin: 2px 0 14px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.morning .mini-h { text-transform: uppercase; margin-top: 16px; margin-bottom: 8px; }
.morning #mDate { margin-top: 0; }
.m-timer { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--track); }
.m-timer i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; animation: m-run 10s linear forwards; }
.morning:hover .m-timer i { animation-play-state: paused; }
@keyframes m-run { to { transform: scaleX(0); } }
.m-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.m-actions a { text-decoration: none; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }

/* week report */
.week-report { width: min(980px, calc(100vw - 32px)); }
.wr-actions { display: flex; gap: 8px; }
.wr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wr-sec { display: grid; gap: 12px; align-content: start; padding: 16px 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.wr-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wr-days div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wr-days i { width: 100%; max-width: 40px; aspect-ratio: 1; border-radius: 9px; background: var(--track); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.wr-days .some i { background: color-mix(in srgb, var(--amber) 55%, var(--track)); color: var(--ink); }
.wr-days .met i { background: var(--green); color: #fff; }
.wr-days span { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.wr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; }
.wr-stats div { padding: 9px 10px; border-radius: 11px; background: var(--sunk); border: 1px solid var(--line); display: grid; }
.wr-stats b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.wr-stats b small { font-size: 12px; color: var(--ink-3); }
.wr-stats span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.wr-line { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.wr-line b { color: var(--ink); }
.wr-line small { margin-left: 4px; font-weight: 700; color: var(--ink-3); }
.wr-line small.up { color: var(--green); }
.wr-line small.down { color: var(--red); }
.wr-grade { display: flex; align-items: center; gap: 12px; }
.grade.sm { width: 52px; height: 52px; border-radius: 13px; }
.grade.sm b { font-size: 28px; }
.arrow-r { font-size: 20px; font-weight: 700; color: var(--ink-3); }
.wr-spark { display: block; width: 160px; height: 36px; margin-top: 6px; }
.wr-spark path { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
.wr-files { display: grid; gap: 4px; }
.wr-files div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; font: 12.5px var(--mono); }
.wr-files span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-files i { font: 600 10.5px var(--ui); text-transform: uppercase; letter-spacing: .06em; font-style: normal; }
.fk-added { color: var(--green); }
.fk-edited { color: var(--blue); }
.fk-removed { color: var(--red); }

/* evening reminder */
.evening { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(6px); }
.ev-card { width: min(440px, 100%); padding: 30px 30px 24px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.25); text-align: center; display: grid; justify-items: center; gap: 6px; }
.ev-card h2 { margin: 8px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ev-card p { margin: 0; color: var(--ink-2); }
.ev-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--orange) 14%, var(--paper)); color: var(--orange); font-size: 30px; font-weight: 800; }
.ev-icon svg { width: 34px; height: 34px; fill: currentColor; }
.ev-icon.good { background: color-mix(in srgb, var(--green) 14%, var(--paper)); color: var(--green); }
.ev-actions { display: flex; gap: 10px; margin-top: 18px; }
.ev-actions a { text-decoration: none; }
.ev-actions .pill-btn { height: 44px; padding: 0 22px; }
.ev-card .link-btn { justify-self: center; margin-top: 6px; }

/* ---------------------------------------------------------------- features you add yourself */
.add-feat { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.add-feat span { font-size: 18px; line-height: 1; }
.add-feat:hover { border-color: var(--ink); color: var(--ink); }
.add-form { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--ink); background: var(--paper); }
.add-form label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.add-form textarea { width: 100%; resize: vertical; font: 14px/1.45 var(--ui); color: var(--ink); background: var(--sunk); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; outline: 0; }
.add-form textarea:focus { border-color: var(--ink); }
.add-form .setup-error { margin: 0; font-size: 13px; padding: 7px 10px; }
.add-form .busy { padding: 6px 0; }
.add-actions { display: flex; justify-content: flex-end; gap: 8px; }
.add-actions .pill-btn { height: 34px; padding: 0 13px; font-size: 13px; }
.feat.mine { background: var(--paper); border-color: var(--ink); }
.mine-top { display: flex; align-items: center; justify-content: space-between; }
.mine-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--ink); color: var(--on-ink); }
.mine-pct { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.feat .asked { font-size: 12.5px; color: var(--ink-3); font-style: italic; }
.pbar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 3px; }
.feat .moved { font-size: 12.5px; color: var(--blue); font-weight: 600; }
.mine-actions { display: flex; align-items: center; gap: 12px; }
.mine-actions .link-btn { font-size: 12.5px; padding: 0; }
.mine-actions small { margin-left: auto; font-size: 11.5px; color: var(--ink-3); text-align: right; }
.feat-intro { margin: 0 0 12px; }

/* edit / remove on every feature */
.feat-actions-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.feat-actions-row .link-btn, .mine-actions .link-btn { font-size: 12.5px; padding: 0; color: var(--ink-3); }
.feat-actions-row .link-btn:hover, .mine-actions .link-btn:hover { color: var(--ink); }
.link-btn.danger:hover { color: var(--red) !important; }
.edited-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-3); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); }
.edited-tag + .link-btn { margin-right: auto; margin-left: -4px; }
.edit-form { background: var(--paper); border-color: var(--ink); }
.edit-form label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 2px; }
.edit-form .field { padding: 8px 10px; font-size: 14px; font-weight: 600; }
.edit-form textarea { width: 100%; resize: vertical; font: 13.5px/1.45 var(--ui); color: var(--ink); background: var(--sunk); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; outline: 0; }
.edit-form textarea:focus { border-color: var(--ink); }
.edit-form .note { font-size: 12px; }
.undo-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-size: 13.5px; font-weight: 600; }
.undo-bar span { margin-right: auto; }
.undo-bar .link-btn { color: var(--on-ink); }
.x-btn.sm { width: 28px; height: 28px; font-size: 18px; background: transparent; border-color: transparent; color: var(--on-ink); }
.removed-list { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.removed-list summary { cursor: pointer; font-weight: 600; width: max-content; }
.rm-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); max-width: 560px; }
.rm-row span { font-weight: 600; color: var(--ink); }
.rm-row small { color: var(--ink-3); margin-right: auto; }
.rm-row .link-btn { padding: 0; }

/* ---------------------------------------------------------------- find your code */
.find-card { padding: 20px 22px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); display: grid; gap: 16px; }
.fg-intro { display: flex; align-items: center; gap: 22px; }
.fg-intro h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.fg-intro p { margin: 0; color: var(--ink-2); font-size: 14px; }
.fg-intro > div:nth-child(2) { flex: 1; }
.fg-art { width: 74px; flex: none; display: grid; gap: 5px; padding: 10px; border-radius: 14px; background: #1c1b22; }
.fg-art i { height: 5px; border-radius: 3px; background: #4a4857; }
.fg-art i:nth-child(1) { width: 60%; } .fg-art i:nth-child(2) { width: 85%; } .fg-art i:nth-child(4) { width: 50%; }
.fg-art i.hit { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 30%, transparent); }
.fg-task { padding: 16px 18px; border-radius: 16px; background: var(--sunk); border: 1px solid var(--line); }
.fg-task .mini-h { text-transform: uppercase; }
.fg-task h3 { margin: 4px 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.fg-hint { margin: 0; font-size: 14px; color: var(--ink-2); padding-left: 10px; border-left: 3px solid var(--amber); }
.fg-step { display: grid; grid-template-columns: 26px auto 1fr; align-items: center; gap: 10px; }
.fg-step label { font-weight: 700; font-size: 15px; }
.fg-step select { max-width: 360px; justify-self: start; width: 100%; padding: 9px 12px; font-size: 14px; cursor: pointer; }
.fg-how { margin: 0; font-size: 13px; color: var(--ink-3); }
.fg-wait { margin: 0 0 0 36px; }
.fg-code { border-radius: 14px; overflow: hidden; background: #16151c; border: 1px solid #2a2933; }
.fg-file { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #1f1e27; border-bottom: 1px solid #2a2933; color: #e8e6f0; font: 600 12.5px var(--mono); }
.fg-file small { margin-left: auto; color: #8d8aa3; font-weight: 500; }
.fg-scroll { max-height: 460px; overflow: auto; }
.fg-inner { position: relative; display: flex; min-width: max-content; }
.fg-gutter { position: sticky; left: 0; z-index: 2; padding: 12px 10px 12px 14px; text-align: right; white-space: pre; color: #5d5a70; background: #16151c; font: 13px/21px var(--mono); user-select: none; cursor: pointer; }
.fg-inner pre { margin: 0; padding: 12px 18px 12px 12px; color: #e3e1ee; cursor: text; }
.fg-inner code { display: block; font: 13px/21px var(--mono); white-space: pre; background: none; border: 0; padding: 0; border-radius: 0; color: inherit; }
.fg-bands { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fg-band { position: absolute; left: 0; right: 0; }
.fg-band.sel { background: rgba(91, 141, 239, .22); box-shadow: inset 3px 0 0 #5b8def; }
.fg-band.ans { background: rgba(63, 191, 111, .2); box-shadow: inset 3px 0 0 #3fbf6f; }
.fg-band.ans + .fg-band.sel { background: rgba(239, 75, 64, .16); box-shadow: inset 3px 0 0 #ef4b40; }
.fg-inner ::selection { background: rgba(91, 141, 239, .45); }
.fg-bar { display: flex; align-items: center; gap: 14px; }
.fg-bar > span { margin-right: auto; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.fg-bar a { text-decoration: none; }
.fg-key { display: inline-flex; align-items: center; gap: 6px; }
.fg-key i { width: 12px; height: 12px; border-radius: 3px; }
.fg-key i + i, .fg-key i.sel { margin-left: 8px; }
.fg-key i.ans { background: #3fbf6f; } .fg-key i.sel { background: #ef4b40; }
.fg-verdict { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid; }
.fg-verdict b { font-size: 18px; font-weight: 800; }
.fg-verdict.tone-good { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--paper)); }
.fg-verdict.tone-good b { color: var(--green); }
.fg-verdict.tone-mid { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--paper)); }
.fg-verdict.tone-bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--paper)); }
.fg-verdict.tone-bad b { color: var(--red); }
.fg-explain { margin: -4px 0 0; font-size: 14px; color: var(--ink-2); }
/* code colours, as in Code Check */
.fg-code .hljs-keyword, .fg-code .hljs-meta .hljs-keyword { color: #ff8a80; }
.fg-code .hljs-built_in, .fg-code .hljs-type, .fg-code .hljs-title.class_ { color: #5ec8f8; }
.fg-code .hljs-title.function_ { color: #ffd08a; }
.fg-code .hljs-string { color: #8fe3a8; }
.fg-code .hljs-number, .fg-code .hljs-literal { color: #ffb454; }
.fg-code .hljs-comment { color: #6b6987; font-style: italic; }
.fg-code .hljs-meta { color: #f38ba8; }
.fg-code .hljs-params { color: #d9d7ea; }
.fg-code .hljs-variable, .fg-code .hljs-attr { color: #c9c6e8; }

@media (max-width: 900px) {
  .fg-intro { flex-wrap: wrap; }
  .fg-step { grid-template-columns: 26px 1fr; }
  .fg-step select, .fg-how { grid-column: 1 / -1; }
  .fg-bar { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .today-panel, .trend-grid, .feat-cols, .wr-grid { grid-template-columns: 1fr; }
  .tp-col + .tp-col { border-left: 0; border-top: 1px solid var(--line); }
  .search { order: 3; flex-basis: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* the week report on paper */
@media print {
  body.printing-week > *:not(#weekReport) { display: none !important; }
  body.printing-week #weekReport { position: static; width: 100%; max-height: none; border: 0; box-shadow: none; }
  body.printing-week .wr-actions { display: none; }
}

/* ---------------------------------------------------------------- Explain */
.sr-explain { background: var(--teal); }
.ex-box { gap: 14px; }
.ex-form { display: flex; align-items: center; gap: 10px; }
.ex-form .field { flex: 1; padding: 9px 12px; font-size: 14px; }
.ex-form select.field { cursor: pointer; max-width: 420px; }
.ex-mode { flex: none; }
.ex-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ex-recent:empty { display: none; }
.ex-recent .mini-h { margin: 0 4px 0 0; }
.ex-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2); border-radius: 999px; padding: 4px 11px; font: 600 12.5px var(--ui); text-align: left; }
.ex-chip:hover { border-color: var(--ink); color: var(--ink); }
.ex-chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ex-chip i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.ex-k-class { background: var(--green); } .ex-k-feature { background: var(--purple); }
.ex-intro { display: flex; align-items: center; gap: 22px; padding: 6px 0; }
.ex-intro h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ex-intro p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 760px; }
.ex-art { position: relative; width: 74px; flex: none; display: grid; gap: 5px; padding: 10px; border-radius: 14px; background: #1c1b22; }
.ex-art i { height: 5px; border-radius: 3px; background: #4a4857; width: 70%; }
.ex-art i.hit { width: 90%; background: var(--teal); }
.ex-art b { position: absolute; right: -8px; bottom: -8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 15px; font-weight: 800; }
.ex-card { display: grid; gap: 14px; }
.ex-head { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ex-head > div:first-child { flex: 1; min-width: 0; }
.ex-head .mini-h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-head h3 { margin: 4px 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.ex-sum { margin: 0; font-size: 15px; color: var(--ink-2); }
.ex-meta { display: flex; align-items: center; gap: 12px; flex: none; }
.ex-meta small { font-size: 12.5px; color: var(--ink-3); }
.ex-over { margin: 0; font-size: 15px; line-height: 1.6; padding: 14px 16px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--line); }
.ex-h { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--ink-3); }
.ex-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ex-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; position: relative; padding-bottom: 14px; }
.ex-steps li:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.ex-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-weight: 800; font-size: 14px; }
.ex-step { display: grid; gap: 6px; min-width: 0; padding-top: 4px; }
.ex-step b { font-size: 15.5px; }
.ex-step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.ex-code .fg-scroll { max-height: 340px; }
.ex-code { margin-top: 4px; }
.ex-open { margin-left: 10px; color: #8d8aa3; font: 600 12px var(--ui); text-decoration: underline; text-underline-offset: 3px; }
.ex-open:hover { color: #e8e6f0; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 28px; }
.ex-grid > div { display: grid; gap: 10px; align-content: start; }
.ex-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ex-parts li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ex-parts code { font: 600 13px var(--mono); color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.ex-parts p { flex-basis: 100%; margin: 0; font-size: 13.5px; color: var(--ink-2); }
.ex-fit { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; }
.ex-fit > span { font-size: 12.5px; font-weight: 700; color: var(--ink-3); padding-top: 4px; }
button.ev { cursor: pointer; }
button.ev:hover { border-color: var(--ink); color: var(--ink); }
.ex-watch { padding: 12px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--amber) 55%, var(--line)); background: color-mix(in srgb, var(--amber) 8%, var(--paper)); }
.ex-watch ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 5px; font-size: 14px; }
.ex-follow { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ex-qa { display: grid; gap: 6px; }
.ex-q { margin: 0; justify-self: end; max-width: 80%; padding: 8px 14px; border-radius: 14px 14px 4px 14px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 600; }
.ex-a { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.ex-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-follow-form { display: flex; gap: 8px; }
.ex-follow-form .field { padding: 9px 12px; font-size: 14px; }
@media (max-width: 720px) {
  .ex-form { flex-wrap: wrap; }
  .ex-head { flex-direction: column; }
}
.ex-meta .x-btn.sm { color: var(--ink-2); border-color: var(--line-2); }
.ex-meta .stale { color: var(--orange); font-weight: 600; }
.fg-copies { margin: -6px 0 0; font-size: 13.5px; color: var(--ink-2); padding: 8px 12px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); }
