/* Cozy dashboard. Plain CSS: no build step. Tokens first; light and dark are selected, not inverted. */
:root {
  color-scheme: light;
  --bg: #f6f5f2; --surface: #fcfcfb; --surface-2: #f0efec; --line: #e2e0da; --grid: #e7e5df;
  --text: #0b0b0b; --text-2: #52514e; --text-3: #7c7b76;
  --accent: #2a78d6; --accent-ink: #ffffff; --accent-soft: #e8f0fb;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7; --series-8: #e34948; --series-other: #8f8e86;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --good-ink: #0a6b0a; --warning-ink: #7a5600; --critical-ink: #a32424;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.04);
}
/* Dark is chosen by the OS unless the person picked one with the switch (data-theme on <html>, set early by boot.js). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131312; --surface: #1a1a19; --surface-2: #232321; --line: #33322f; --grid: #2b2a28;
  --text: #ffffff; --text-2: #c3c2b7; --text-3: #8f8e86;
  --accent: #3987e5; --accent-ink: #0b0b0b; --accent-soft: #1d2a3b;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767; --series-other: #7c7b76;
  --good-ink: #5fd35f; --warning-ink: #f0c15a; --critical-ink: #f08a8a;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131312; --surface: #1a1a19; --surface-2: #232321; --line: #33322f; --grid: #2b2a28;
    --text: #ffffff; --text-2: #c3c2b7; --text-3: #8f8e86;
    --accent: #3987e5; --accent-ink: #0b0b0b; --accent-soft: #1d2a3b;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767; --series-other: #7c7b76;
    --good-ink: #5fd35f; --warning-ink: #f0c15a; --critical-ink: #f08a8a;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; } h2 { font-size: 16px; margin: 0 0 12px; }
p { margin: 0 0 12px; } .muted { color: var(--text-2); } .faint { color: var(--text-3); font-size: 13px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* Shell */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side-menu { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.brand { font-weight: 650; font-size: 17px; padding: 4px 10px 16px; display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 50%; display: block; flex: none; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); margin-bottom: 2px; }
.nav .ic { flex: none; opacity: .85; } .nav a[aria-current="page"] .ic { opacity: 1; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-foot { margin-top: auto; padding: 10px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); }
.side-foot form { margin-top: 6px; }
.side-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 2px 4px 0 auto; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.theme-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-btn[hidden] { display: none; }
.theme-btn .ic-sun { display: none; }                                         /* moon = "go dark" (shown in light); sun = "go light" (shown in dark) */
.theme-btn[aria-pressed="true"] .ic-sun { display: block; } .theme-btn[aria-pressed="true"] .ic-moon { display: none; }
.side-foot .who { display: block; overflow-wrap: anywhere; color: var(--text); }
main { min-width: 0; padding: 26px 32px 60px; max-width: 1180px; width: 100%; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; } .title-row h1 { margin: 0; }
.menu-btn { display: none; }
.menu-btn .ic-close { display: none; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; } .grid > * { min-width: 0; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g2 { grid-template-columns: repeat(2, 1fr); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile .label { color: var(--text-2); font-size: 13px; } .tile .value { font-size: 28px; font-weight: 620; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.tile .sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }

/* Status: never colour alone, always icon + label */
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.status .ic { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; color: #fff; line-height: 1; }
.status.ok .ic { background: var(--good); } .status.ok { color: var(--good-ink); }
.status.warn .ic { background: var(--warning); color: #3a2900; } .status.warn { color: var(--warning-ink); }
.status.bad .ic { background: var(--critical); } .status.bad { color: var(--critical-ink); }
.status.open .ic { background: var(--accent); color: var(--accent-ink); } .status.open { color: var(--text-2); }
.status.idle .ic { background: var(--text-3); } .status.idle { color: var(--text-2); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.scroll { overflow-x: auto; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.err { color: var(--critical-ink); font-size: 13px; word-break: break-word; }

/* Forms */
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; font-weight: 550; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { margin-bottom: 14px; } .hint { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); font-weight: 500; margin: 0; } .check input { width: 16px; height: 16px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; } .row > .field { margin-bottom: 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; } .btn:disabled:hover { background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.primary:hover { filter: brightness(1.06); } .btn.primary:disabled:hover { background: var(--accent); filter: none; }
.btn.danger { color: var(--critical-ink); } .btn.small { padding: 5px 10px; font-size: 13px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--accent-soft); }
.flash.error { background: color-mix(in srgb, var(--critical) 12%, var(--surface)); border-color: var(--critical); }
.errors { color: var(--critical-ink); font-size: 13px; margin-top: 4px; }

/* Card header with an action on the right; "+ Add" reveals its form in place */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin-bottom: 4px; }
details.add { position: relative; } details.add > summary { list-style: none; cursor: pointer; user-select: none; } details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.add-panel { flex-basis: 100%; }
details.add[open] { flex: 1 1 100%; } details.add[open] > summary { width: max-content; margin-left: auto; }
details.add[open] .add-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Collapsible settings rows: title and current value on one line, details on demand */
details.fold { padding: 0; margin-bottom: 8px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-radius: var(--radius); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > summary:hover { background: var(--surface-2); }
.member-fold .st { font-weight: 600; white-space: nowrap; } .st::before { content: "●"; font-size: .7em; margin-right: 5px; vertical-align: 1px; }
.st.ok { color: var(--good-ink); } .st.bad { color: var(--critical-ink); } .st.warn { color: var(--warning-ink); } .st.idle { color: var(--text-2); }
.fold-title { flex: none; }
.fold-title { font-weight: 600; font-size: 15px; }
.fold-sum { margin-left: auto; color: var(--text-2); font-size: 13.5px; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.fold-body { padding: 4px 16px 16px; border-top: 1px solid var(--grid); padding-top: 14px; }
.folds .fold + .fold, form.folds + .folds { margin-top: 0; }
form.folds > .btn.primary { margin: 8px 0 22px; }
.fold-body .card-head { margin-top: 0; }

/* Pickers */
.picker { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.picker-filter { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 8px 8px 0 0 !important; }
.picker-list { max-height: 150px; overflow: auto; padding: 6px 10px; }
.picker-list label { display: flex; gap: 8px; align-items: center; font-weight: 450; color: var(--text); margin: 0; padding: 3px 0; font-size: 14px; }
.picker-list input { width: 15px; height: 15px; }
.picker details { border-top: 1px solid var(--line); padding: 6px 10px; } .picker summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.picker textarea { margin-top: 6px; }

/* Command rows */
details.cmd { border-top: 1px solid var(--grid); } details.cmd:first-of-type { border-top: 0; }
details.cmd > summary { list-style: none; display: grid; grid-template-columns: 260px 1fr auto; gap: 12px; align-items: center; padding: 11px 4px; cursor: pointer; }
details.cmd > summary::-webkit-details-marker { display: none; }
details.cmd > summary:hover { background: var(--surface-2); }
details.cmd .body { padding: 6px 4px 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
details.cmd .body .actions { grid-column: 1 / -1; display: flex; gap: 10px; }

/* A command group's card: the group rule is on the title; its own edit form hides behind one small button */
.group-line { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 2px 4px 12px; font-size: 14px; }
details.group-edit[open] { flex: 1 1 100%; } details.group-edit[open] > summary { margin-left: auto; }
details.cmd-group .fold-body { padding-top: 10px; }
details.cmd-group .fold-sum { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0 2px; }

.sync-line { display: flex; justify-content: flex-end; margin: -2px 0 8px; }
.notion-section > .card-head { margin-top: 0; }

/* Marketing: phone-style preview of a push notification, and the per-notification card */
.push { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; max-width: 360px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.push-app { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.push-icon { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; }
.push-time { margin-left: auto; }
.push-title { font-weight: 650; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.push-img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 10px; margin-top: 8px; }
.push-body { font-size: 14px; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; margin-top: 2px; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.item-body { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 14px; }
.item-actions form { margin: 0; } .item-actions form.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.warn-line { margin: 0 0 6px; color: var(--warning-ink); font-size: 13.5px; }
.over { color: var(--critical-ink); font-weight: 700; }
.history { list-style: none; margin: 0; padding: 0; } .history li { padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 13.5px; } .history li:last-child { border-bottom: 0; }
pre.brief-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0; max-height: 460px; overflow: auto; }
@media (max-width: 760px) { .item-body { grid-template-columns: 1fr; } }

/* A plan that is still being drafted: a placeholder row with a spinner, so it appears the moment it is asked for */
.draft-row td { opacity: .85; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; vertical-align: -1px; margin-right: 6px; animation: spin .8s linear infinite; }
.shimmer { color: var(--text-2); animation: pulse 1.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .spinner, .shimmer { animation: none; } }

/* Versions of a plan and the feedback behind each */
.versions { list-style: none; margin: 0 0 14px; padding: 0; border-left: 2px solid var(--line); }
.versions li { padding: 6px 0 8px 14px; position: relative; } .versions li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.versions li[aria-current="true"]::before { background: var(--accent); }
.feedback-quote { margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--warning); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }

/* Team */
.member { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--grid); }
.member:last-child { border-bottom: 0; }
.member-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-bottom: 1px solid var(--grid); background: var(--surface); position: relative; }
.ev-row .ev-name { flex: 1 1 260px; min-width: 0; width: auto; padding: 9px 2px; overflow-wrap: anywhere; }
.ev-row .check { flex: none; white-space: nowrap; }
.drag { flex: none; display: grid; place-items: center; width: 36px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); cursor: grab; touch-action: none; }
.drag:hover { background: var(--surface-2); color: var(--text); }
.ev-row.dragging { z-index: 5; box-shadow: 0 6px 20px rgba(0,0,0,.22); border-radius: 8px; cursor: grabbing; opacity: .97; }
.ev-row.dragging .drag { cursor: grabbing; }
.ev-list.sorting .ev-row:not(.dragging) { transition: transform .12s ease; }
.ev-list.sorting { user-select: none; -webkit-user-select: none; }
.savebar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 0; margin-top: 8px; background: var(--surface); border-top: 1px solid var(--line); z-index: 10; }
.dirty-note { color: var(--warning-ink); font-weight: 600; font-size: 13.5px; }
.wordcount { color: var(--text-2); font-size: 13.5px; }
.dirty-note::before { content: "● "; }

/* Pager, filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; } .filters .field { margin: 0; min-width: 130px; }
.js [data-autofilter] .filter-btn { display: none; }
.pager { display: flex; gap: 6px; align-items: center; margin-top: 14px; flex-wrap: wrap; } .pager a, .pager span { padding: 5px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; }
.pager .on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .pager .off { color: var(--text-3); }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.segmented a { padding: 6px 14px; color: var(--text-2); font-weight: 600; font-size: 14px; } .segmented a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); } .segmented a:hover { text-decoration: none; }

/* Chart */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; } .chart text { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.chart .bar { fill: var(--series-1); } .chart .hit { fill: transparent; } .chart .hit:hover + .bar, .chart g:hover .bar { filter: brightness(1.15); }
.chart .peak { fill: var(--text); font-weight: 600; }
.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 13px; line-height: 1.35; white-space: pre; box-shadow: 0 4px 14px rgba(0,0,0,.25); display: none; }
.meter { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--series-1) 18%, var(--surface)); overflow: hidden; min-width: 90px; } .meter > i { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 420px; padding: 32px 30px; }
.login-card { text-align: center; }
.login-logo { width: 72px; height: 72px; border-radius: 50%; display: block; margin: 0 auto 14px; }
.login-card h1 { font-size: 22px; margin: 0 0 4px; }
.login-sub { margin: 0 0 24px; }
.login-note { margin: 14px 0 0; }

/* Google's official "Sign in with Google" button (branding guidelines: 40px, 4px radius, 12px padding, 20px icon, 10px gap).
   Light and dark colours are Google's own; the "G" is never recoloured. */
.gsi-button { --gsi-bg: #ffffff; --gsi-border: #747775; --gsi-text: #1f1f1f; --gsi-hover: rgba(48,48,48,.08); --gsi-press: rgba(48,48,48,.12);
  display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; height: 40px; width: 100%; padding: 0 12px;
  background: var(--gsi-bg); border: 1px solid var(--gsi-border); border-radius: 4px; color: var(--gsi-text);
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-size: 14px; font-weight: 500; line-height: 20px; letter-spacing: .25px;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden; }
.gsi-button:hover { text-decoration: none; box-shadow: 0 1px 2px rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15); }
.gsi-button:hover::after, .gsi-button:active::after { content: ""; position: absolute; inset: 0; background: var(--gsi-hover); pointer-events: none; }
.gsi-button:active::after { background: var(--gsi-press); }
.gsi-icon { width: 20px; height: 20px; flex: none; display: block; }
.gsi-label { white-space: nowrap; }
:root[data-theme="dark"] .gsi-button { --gsi-bg: #131314; --gsi-border: #8e918f; --gsi-text: #e3e3e3; --gsi-hover: rgba(232,234,237,.08); --gsi-press: rgba(232,234,237,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gsi-button { --gsi-bg: #131314; --gsi-border: #8e918f; --gsi-text: #e3e3e3; --gsi-hover: rgba(232,234,237,.08); --gsi-press: rgba(232,234,237,.12); } }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  /* Top bar: brand + Menu button; the nav opens as a full-width panel under it. Without JS the nav simply stays visible. */
  .side { position: sticky; top: 0; z-index: 30; height: auto; max-height: 100vh; max-height: 100dvh; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px 12px; }
  .side-top { min-height: 48px; align-items: center; }
  .theme-btn { margin: 0 0 0 auto; }
  .brand { padding: 0; }
  .js .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; margin-right: -6px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
  .js .menu-btn:hover { background: var(--surface-2); }
  .js .menu-btn[aria-expanded="true"] .ic-open { display: none; } .js .menu-btn[aria-expanded="true"] .ic-close { display: block; }
  .js .side-menu { display: none; }
  .js .side.open .side-menu { display: flex; padding: 4px 0 10px; }
  .side-menu { flex: none; }
  .nav a { padding: 12px 10px; margin-bottom: 0; font-size: 16px; }
  .side-foot { margin: 6px 0 0; padding: 12px 10px 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .side-foot .who { min-width: 0; }
  main { padding: 18px 16px 50px; } .head { margin-bottom: 16px; }
  .g3, .g4, .g2 { grid-template-columns: 1fr 1fr; } .member { grid-template-columns: 1fr 1fr; }
  details.cmd > summary { grid-template-columns: 1fr auto; } details.cmd > summary .note { display: none; } details.cmd .body { grid-template-columns: 1fr; }
  /* 16px+ form text stops iOS from zooming the page on focus; larger targets for thumbs */
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; justify-content: center; } .drag { width: 44px; height: 44px; } .btn.small { min-height: 40px; padding: 6px 12px; }
  .pager a, .pager span { padding: 10px 14px; } .segmented a { padding: 11px 16px; }
  .picker-list { max-height: 200px; } .picker-list label { padding: 8px 0; } .picker-list input, .check input { width: 20px; height: 20px; }
  .filters .field { flex: 1 1 140px; }
  details:not(.cmd):not(.add):not(.fold) > summary { padding: 10px 0; cursor: pointer; }
  details.fold > summary { min-height: 52px; } .fold-body { padding: 4px 14px 14px; padding-top: 12px; }
  .tile .value { font-size: 24px; }
}
@media (max-width: 520px) {
  /* a command card's title and status stack instead of squeezing side by side */
  details.cmd-group > summary { flex-wrap: wrap; row-gap: 4px; }
  details.cmd-group .fold-title { flex: 1 1 100%; overflow-wrap: anywhere; }
  details.cmd-group .fold-sum { margin-left: 0; justify-content: flex-start; text-align: left; }
  details.cmd-group > summary::after { margin-left: auto; }
  .g3, .g4, .g2, .member { grid-template-columns: 1fr; }
  main { padding: 14px 12px 40px; } .card { padding: 14px; }
  .login .card { padding: 26px 20px; }
  .filters .field, .row > .field { flex: 1 1 100%; }
}
/* Wide log tables turn into one card per row on phones (labels come from the header via app.js; without JS they just scroll sideways) */
@media (max-width: 640px) {
  table.kv, table.kv tbody, table.kv tr, table.kv td { display: block; width: 100% !important; } table.kv tr { padding: 6px 0; border-bottom: 1px solid var(--grid); } table.kv td { border: 0; padding: 2px 0; }
  .js .scroll:has(> table.stack) { overflow: visible; }
  .js table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .js table.stack, .js table.stack tbody, .js table.stack tr, .js table.stack td { display: block; width: 100%; }
  .js table.stack tr { padding: 10px 0; border-bottom: 1px solid var(--grid); }
  .js table.stack tr:last-child { border-bottom: 0; }
  .js table.stack td { border: 0; padding: 4px 0; text-align: left; overflow-wrap: anywhere; }
  .js table.stack td:empty { display: none; }
  .js table.stack td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; }
}
@media (forced-colors: active) { .chart .bar { fill: CanvasText; } .status .ic { border: 1px solid; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Confirmation popups (native <dialog>) */
.dlg { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.dlg-wide { width: min(640px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(0,0,0,.55); }
.dlg h3 { margin: 0 0 8px; font-size: 17px; }
.dlg textarea { width: 100%; }
.dlg-list { margin: 0 0 10px; padding: 8px 12px 8px 28px; background: var(--surface-2); border-radius: 8px; overflow-wrap: anywhere; }
.dlg-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.dlg-buttons { display: inline-flex; gap: 8px; margin-left: auto; }
.dlg-link { font-size: 13px; }
input[type=datetime-local], input[type=date], input[type=time] { font-family: inherit; min-height: 38px; }
input[type=datetime-local]::-webkit-calendar-picker-indicator, input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; border-radius: 4px; }
input[type=datetime-local]::-webkit-calendar-picker-indicator:hover, input[type=date]::-webkit-calendar-picker-indicator:hover, input[type=time]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
input[type=datetime-local] { padding-top: 6px; padding-bottom: 6px; }
[hidden] { display: none !important; }   /* a class that sets display (.btn) must not make a hidden element show */

/* Cost per day by model: stacked marks, legend, and the chart/table switch */
.chart .bar.s-1 { fill: var(--series-1); } .chart .bar.s-2 { fill: var(--series-2); } .chart .bar.s-3 { fill: var(--series-3); } .chart .bar.s-4 { fill: var(--series-4); } .chart .bar.s-other { fill: var(--series-other); }
.chart .bar.s-1, .chart .bar.s-2, .chart .bar.s-3, .chart .bar.s-4, .chart .bar.s-other { stroke: var(--surface); stroke-width: 1; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: baseline; }
.sw.s-1 { background: var(--series-1); } .sw.s-2 { background: var(--series-2); } .sw.s-3 { background: var(--series-3); } .sw.s-4 { background: var(--series-4); } .sw.s-other { background: var(--series-other); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 10px 0 0; padding: 0; color: var(--text-2); font-size: 13.5px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; } .card-head h2 { margin: 0; }
.viewswitch { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.viewswitch button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; padding: 0; background: transparent; color: var(--text-3); border: 0; border-radius: 6px; cursor: pointer; }
.viewswitch button:hover { color: var(--text); } .viewswitch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 640px) { .viewswitch button { width: 40px; height: 36px; } }
.chart .bar { pointer-events: none; }   /* the whole column is the hover target (its .hit rect), not just the empty part above the bar */

/* Plan at a glance: a calendar of the plan's notifications (weeks, Monday first) */
.cal-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; }
.cal { display: grid; gap: 6px; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head span { color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 0 4px; }
.cal-day { min-height: 74px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.out { background: transparent; border-style: dashed; opacity: .55; }
.cal-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal-day.past:not(.today) .cal-chip { opacity: .8; }
.cal-date { font-size: 12.5px; color: var(--text-2); } .cal-date strong { color: var(--text); font-size: 14px; }
.cal-wd, .cal-mon-narrow { display: none; } .cal-mon { color: var(--text-3); }
.cal-flag { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.cal-chip { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); border-left-width: 3px; background: var(--surface-2); color: var(--text); font-size: 12px; line-height: 1.3; min-width: 0; }
.cal-chip:hover { text-decoration: none; border-color: var(--accent); }
.cal-chip.ok { border-left-color: var(--good); } .cal-chip.warn { border-left-color: var(--warning); } .cal-chip.idle { border-left-color: var(--text-3); border-left-style: dashed; }
.cal-chip.is-skipped .cal-title { text-decoration: line-through; color: var(--text-3); }
.cal-chip .cal-when { display: flex; flex-wrap: wrap; gap: 0 6px; font-weight: 600; } .cal-chip .st { font-weight: 600; font-size: 11.5px; }
.cal-chip .cal-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; color: var(--text-2); }
.cal-close { font-size: 11.5px; color: var(--warning-ink); margin-top: auto; }
.item:target { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) {
  /* narrow screens: an agenda, one row per day that has something, instead of seven cramped columns */
  .cal-head { display: none; } .cal-week { grid-template-columns: 1fr; }
  .cal-day.empty, .cal-day.out:not(:has(.cal-chip)):not(.today) { display: none; }
  .cal-day { min-height: 0; padding: 8px 10px; } .cal-wd, .cal-mon-narrow { display: inline; }
  .cal-chip { font-size: 13px; padding: 6px 8px; } .cal-chip .cal-title { -webkit-line-clamp: 3; }
}
.switch-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }

/* Many series (Messages per day, one per sender): slots 1-8 are solid colours from the validated palette; slots 9-16 repeat those eight colours as diagonal
   stripes, so no two neighbours in a stack look alike and colour is never the only cue (the legend, the tooltip and the table name every one). */
.chart .bar.s-5 { fill: var(--series-5); stroke: var(--surface); stroke-width: 1; }
.sw.s-5 { background: var(--series-5); }
.chart .bar.s-6 { fill: var(--series-6); stroke: var(--surface); stroke-width: 1; }
.sw.s-6 { background: var(--series-6); }
.chart .bar.s-7 { fill: var(--series-7); stroke: var(--surface); stroke-width: 1; }
.sw.s-7 { background: var(--series-7); }
.chart .bar.s-8 { fill: var(--series-8); stroke: var(--surface); stroke-width: 1; }
.sw.s-8 { background: var(--series-8); }
.chart .bar.s-9 { fill: url(#hatch-1); stroke: var(--surface); stroke-width: 1; }
.sw.s-9 { background: repeating-linear-gradient(45deg, var(--series-1) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-1); }
.chart .bar.s-10 { fill: url(#hatch-2); stroke: var(--surface); stroke-width: 1; }
.sw.s-10 { background: repeating-linear-gradient(45deg, var(--series-2) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-2); }
.chart .bar.s-11 { fill: url(#hatch-3); stroke: var(--surface); stroke-width: 1; }
.sw.s-11 { background: repeating-linear-gradient(45deg, var(--series-3) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-3); }
.chart .bar.s-12 { fill: url(#hatch-4); stroke: var(--surface); stroke-width: 1; }
.sw.s-12 { background: repeating-linear-gradient(45deg, var(--series-4) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-4); }
.chart .bar.s-13 { fill: url(#hatch-5); stroke: var(--surface); stroke-width: 1; }
.sw.s-13 { background: repeating-linear-gradient(45deg, var(--series-5) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-5); }
.chart .bar.s-14 { fill: url(#hatch-6); stroke: var(--surface); stroke-width: 1; }
.sw.s-14 { background: repeating-linear-gradient(45deg, var(--series-6) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-6); }
.chart .bar.s-15 { fill: url(#hatch-7); stroke: var(--surface); stroke-width: 1; }
.sw.s-15 { background: repeating-linear-gradient(45deg, var(--series-7) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-7); }
.chart .bar.s-16 { fill: url(#hatch-8); stroke: var(--surface); stroke-width: 1; }
.sw.s-16 { background: repeating-linear-gradient(45deg, var(--series-8) 0 2px, var(--surface-2) 2px 4px); box-shadow: inset 0 0 0 1px var(--series-8); }
.chart .hatch-bg { fill: var(--surface); }
.chart .hatch-1 { fill: var(--series-1); }
.chart .hatch-2 { fill: var(--series-2); }
.chart .hatch-3 { fill: var(--series-3); }
.chart .hatch-4 { fill: var(--series-4); }
.chart .hatch-5 { fill: var(--series-5); }
.chart .hatch-6 { fill: var(--series-6); }
.chart .hatch-7 { fill: var(--series-7); }
.chart .hatch-8 { fill: var(--series-8); }
.tip.rich { white-space: normal; min-width: 150px; } .tip .tip-title { font-weight: 600; margin-bottom: 3px; }
.tip .tip-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; } .tip .tip-name { display: inline-flex; align-items: center; } .tip .tip-name .sw { margin-right: 7px; flex: none; }
.tip .tip-value { font-variant-numeric: tabular-nums; } .tip .tip-footer { margin-top: 3px; padding-top: 3px; border-top: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); font-weight: 600; }
.total-row td { border-top: 2px solid var(--line); }

/* Marketing → Voice */
.rule-line { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rule-row { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; margin: 0; }
.rule-line .rule-del { margin: 0; flex: none; }
.rule-del { margin: 0 0 12px; text-align: right; }
.example-row { display: grid; gap: 4px; margin-bottom: 4px; padding-top: 10px; border-top: 1px solid var(--grid); } .example-row:first-of-type { border-top: 0; padding-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 3px 4px 3px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.chip button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; font-size: 16px; line-height: 1; } .chip button:hover { color: var(--critical-ink); background: var(--surface); }
.suggest { padding: 12px 0; border-top: 1px solid var(--grid); } .suggest:first-of-type { border-top: 0; }
.suggest-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.suggest-actions { display: flex; gap: 8px; } .suggest-actions form { margin: 0; }
@media (max-width: 760px) { .rule-line { flex-direction: column; align-items: stretch; margin-bottom: 14px; } .rule-row { grid-template-columns: 1fr 1fr; } .rule-row input[type=text]:first-child { grid-column: 1 / -1; } .rule-line .rule-del { text-align: left; } }

.chips-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 4px; }
.chip-btn { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; } .chip-btn:hover { color: var(--text); border-color: var(--accent); }
.cal-chip.other { background: transparent; border-style: dashed; border-left-style: dashed; border-left-color: var(--text-3); color: var(--text-2); } .cal-chip.other .cal-title { color: var(--text-3); }

/* Design: upload, verdict, findings with a marked picture each */
.upload { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; } .upload .field { flex: 1 1 320px; margin: 0; }
.upload input[type=file] { width: 100%; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); font: inherit; }
.verdict { border-left: 5px solid var(--text-3); }
.verdict.ok { border-left-color: var(--good); } .verdict.warn { border-left-color: var(--warning); } .verdict.bad { border-left-color: var(--critical); }
.verdict-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; } .verdict-head .st { font-size: 18px; font-weight: 650; }
.verdict-text { font-size: 15.5px; }
.section-title { margin: 22px 0 10px; }
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.page-thumb { margin: 0; } .page-thumb img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.page-thumb figcaption { margin-top: 6px; font-size: 13.5px; }
.role { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); } .role.role-production { background: var(--accent-soft); color: var(--accent); }
.finding { display: grid; gap: 18px; } .finding.has-img { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.finding-img a > img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mark-wrap { position: relative; } .finding-img .where { position: absolute; right: 8px; bottom: 8px; width: 26%; min-width: 70px; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 1px 6px rgba(0,0,0,.35); background: #fff; }
.finding-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.finding h3 { font-size: 17px; margin: 0 0 8px; line-height: 1.3; } .finding p { margin: 0 0 8px; } .finding .fix { color: var(--text); }
.num-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 14px; color: #fff; background: var(--text-3); }
.num-badge.bad { background: var(--critical); } .num-badge.warn { background: #b07a00; } .num-badge.idle { background: var(--text-3); }
.oklist.plain li::marker { content: none; } .oklist.plain { list-style: none; padding-left: 0; }
.oklist { margin: 0; padding-left: 20px; } .oklist li { margin-bottom: 6px; } .oklist li::marker { color: var(--good); content: "✓  "; }
@media (max-width: 760px) { .finding.has-img { grid-template-columns: 1fr; } }
.finding-img .boost-cap { margin: 10px 0 4px; }

/* Line chart (registrations after a notification) */
.line-chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .line.l-1 { stroke: var(--series-1); } .line-chart .line.l-2 { stroke: var(--series-2); } .line-chart .line.l-other { stroke: var(--series-other); }
.line-chart .line.dashed { stroke-dasharray: 6 5; stroke-width: 2; }
.line-chart .dot { stroke: var(--surface); stroke-width: 2; } .line-chart .dot.l-1 { fill: var(--series-1); } .line-chart .dot.l-2 { fill: var(--series-2); } .line-chart .dot.l-other { fill: var(--series-other); }
.line-chart .mark-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.line-chart .hit { fill: transparent; } .line-chart .hit:hover { fill: rgba(127,127,127,.10); }
.legend .sw.dashed { background: none; border-top: 2px dashed var(--series-other); height: 0; align-self: center; }
/* Results after a notification */
.results { border-top: 1px solid var(--grid); margin-top: 14px; padding-top: 12px; }
.results-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.win-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.win { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.win .label { color: var(--text-2); font-size: 13px; } .win .big { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.win .cmp { font-size: 13px; color: var(--text-2); } .win .up { color: var(--good-ink); font-weight: 600; } .win .flat { color: var(--text-2); font-weight: 600; }
.win.pending { background: var(--surface-2); }
.results details { margin-top: 10px; } .results summary { cursor: pointer; color: var(--accent); font-weight: 600; }
@media (max-width: 760px) { .win-grid { grid-template-columns: 1fr; } }

.line-chart .band { fill: var(--series-other); opacity: .18; stroke: none; }
.line-chart .event-line { stroke: var(--series-2); stroke-width: 1.5; stroke-dasharray: 4 3; } .line-chart .event-label { fill: var(--warning-ink); font-weight: 600; }
.legend .sw.band { opacity: .35; }

/* Results pages */
.result-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; border-top: 1px solid var(--grid); margin-top: 12px; padding-top: 10px; }
.win-row { margin-bottom: 14px; } .win-row-name { font-weight: 600; margin-bottom: 6px; }
.chart-title { font-size: 14px; margin: 0 0 4px; color: var(--text-2); font-weight: 600; }
.win .cmp + .cmp { margin-top: 4px; }
.evrow { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(120px, 2fr) 120px 104px; gap: 6px 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--grid); }
.evrow:first-of-type { border-top: 0; } .evname { min-width: 0; overflow-wrap: anywhere; }
.evbar { position: relative; height: 14px; background: var(--surface-2); border-radius: 4px; } .evfill { position: absolute; inset: 0 auto 0 0; background: var(--series-1); border-radius: 4px; min-width: 2px; }
.evtick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); border-radius: 1px; }
.evnum { white-space: nowrap; }
.people-bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.people-bar .seg { display: flex; align-items: center; justify-content: center; min-width: 26px; color: #fff; font-weight: 650; font-size: 13px; }
.people-bar .seg.s-1 { background: var(--series-1); } .people-bar .seg.s-3 { background: var(--series-3); color: #0b0b0b; } .people-bar .seg.s-other { background: var(--series-other); color: #0b0b0b; }
.ibar { height: 6px; background: var(--surface-2); border-radius: 3px; margin-bottom: 4px; min-width: 80px; } .ibar i { display: block; height: 100%; background: var(--series-1); border-radius: 3px; } .ibar.o i { background: var(--series-2); }
.results-table td { vertical-align: top; }
@media (max-width: 760px) { .evrow { grid-template-columns: 1fr auto; } .evbar { grid-column: 1 / -1; } .evrow form { grid-column: 1 / -1; } }
/* Five Marketing tabs no longer fit a phone at the touch-size padding: they scroll inside their own box instead of widening the page */
.segmented { max-width: 100%; overflow-x: auto; } .segmented a { white-space: nowrap; }
@media (max-width: 760px) { .segmented a { padding: 11px 13px; } }

/* Marketing channels and the blog */
/* The hairline is an inset shadow (the active tab's underline paints over it) rather than a border the links overlap with a negative margin: that overlap made the row 1px taller than its box, and overflow-x: auto turned that into a vertical scrollbar. */
.channels { display: flex; gap: 6px; margin-bottom: 14px; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; }
.channels a { padding: 8px 16px 10px; font-weight: 650; color: var(--text-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.channels a:hover { color: var(--text); text-decoration: none; } .channels a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.blog-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; } .blog-grid > .card { margin-bottom: 0; } .blog-grid + .card { margin-top: 18px; }
.counter { float: right; font-weight: 400; color: var(--text-3); font-size: 12.5px; } .counter.over { color: var(--critical-ink); font-weight: 650; }
.md-editor { font-size: 13.5px; line-height: 1.55; resize: vertical; }
.prose { font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; } .prose .prose-title { font-size: 26px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.01em; }
.prose h2 { font-size: 20px; margin: 22px 0 8px; } .prose h3 { font-size: 17px; margin: 18px 0 6px; } .prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; } .prose blockquote { border-left: 3px solid var(--line); padding-left: 12px; color: var(--text-2); } .prose code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.prose a { text-decoration: underline; }
.checks { list-style: none; margin: 0; padding: 0; } .checks li { padding: 7px 0; border-top: 1px solid var(--grid); } .checks li:first-child { border-top: 0; } .checks .st { margin-right: 6px; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }

.sources { margin: 0; padding-left: 22px; } .sources li { margin-bottom: 10px; } .sources .feedback-quote { margin: 4px 0 0; }

/* Blog hero image */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hero-preview { width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: var(--surface-2); }
.focus-pick { position: relative; cursor: crosshair; line-height: 0; } .focus-pick img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.focus-dot { position: absolute; width: 20px; height: 20px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 1px 6px rgba(0,0,0,.5); transform: translate(-50%, -50%); pointer-events: none; }
.cand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .cand { margin: 0; }
.cand img { width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: var(--surface-2); } .cand figcaption { margin-top: 6px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .cand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cand-grid { grid-template-columns: 1fr; } }

.ctx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } @media (max-width: 900px) { .ctx-grid { grid-template-columns: 1fr; } }

/* Design → Asset kit */
.checker { background-color: #d9d9d9; background-image: linear-gradient(45deg, #bdbdbd 25%, transparent 25%, transparent 75%, #bdbdbd 75%), linear-gradient(45deg, #bdbdbd 25%, transparent 25%, transparent 75%, #bdbdbd 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.kit-img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.kit-input { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.kit-rows { display: flex; flex-direction: column; gap: 10px; }
.kit-row { padding: 14px 16px; margin-bottom: 0; } .kit-row .card-head { align-items: center; } .kit-row .fold { margin-top: 10px; margin-bottom: 0; }
.kit-row .fold-body .kit-img { max-width: 480px; }
.layer-table td { vertical-align: top; }
@media (max-width: 760px) { .kit-input { grid-template-columns: 1fr; } }

.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); vertical-align: middle; }

.cmp-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 14px; }
.cmp { display: block; margin: 0; width: 150px; }
.cmp-fill { display: block; width: 100%; height: 72px; border-radius: 10px; border: 1px solid var(--line); }
.cmp-cap { display: block; font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.35; }
.cmp-cap code { display: block; color: var(--text); font-size: 13px; }

.where { margin-top: 6px; }
.where-pair { display: flex; flex-wrap: wrap; gap: 12px; }
.where-pair figure { margin: 0; width: min(340px, 100%); }
.where-pair img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.where-pair figcaption { font-size: 12px; color: var(--text-2); margin-top: 4px; }

.drive-browser { border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow-y: auto; margin-top: 4px; }
.drive-row { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.drive-row:last-child { border-bottom: none; }
.drive-row label { cursor: pointer; }
