/* Template QA. Style: achromatic ledger (tasteskill app sheet, seed 1392471956) with the shashankthigale.com brand kept:
   paper ground, ink text, Schibsted Grotesk, IBM Plex Mono for figures, IDs and widths only. Colour goes on data: the
   brand blue marks findings in the width ruler and the width grid; red, amber and grey mark severity, always with a shape.
   Shell: open plane. A 240px labelled sidebar on the ground, no top bar; the canvas is fluid with a 32px gutter and its
   content capped at 1160px. Rows inside use one 16px gap: 1fr + 16 + 340 = the canvas width. */
@import url("/assets/fonts/fonts.css");

:root {
    --ground: #f7f7f4;
    --surface: #ffffff;
    --raised: #f1f1ed;
    --active: #e9e9e4;
    --border: #e2e3de;
    --rule: #eeeee9;
    --control: #cdcfc8;
    --text: #15171b;
    --muted: #4f545c;
    --faint: #62676f;
    --primary: #15171b;
    --primary-ink: #ffffff;
    --accent: #2448d8;
    --accent-1: #e6ebfb;
    --accent-2: #c3cff5;
    --accent-3: #7f97ea;
    --high: #b3261e;
    --high-bg: #fde8e6;
    --medium: #92400e;
    --medium-mark: #c46a08;
    --medium-bg: #fdf1dc;
    --low: #62676f;
    --low-bg: #eeeee9;
    --pass: #1f7a46;
    --pass-bg: #dff4e7;
    --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --radius-card: 8px;
    --radius-control: 6px;
    --radius-chip: 4px;
    --gap: 16px;
    --pad: 20px;
    --control-height: 36px;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ground: #0d0e10;
        --surface: #15171b;
        --raised: #1d2025;
        --active: #23262c;
        --border: #2a2e35;
        --rule: #22252b;
        --control: #3d424b;
        --text: #eceee9;
        --muted: #b2b7be;
        --faint: #969ba3;
        --primary: #eceee9;
        --primary-ink: #111317;
        --accent: #8ea6ff;
        --accent-1: #1b2340;
        --accent-2: #2a3a78;
        --accent-3: #5a74d6;
        --high: #ff9b8f;
        --high-bg: #3a1b18;
        --medium: #f2b766;
        --medium-mark: #f2b766;
        --medium-bg: #33270f;
        --low: #969ba3;
        --low-bg: #23262c;
        --pass: #4cc785;
        --pass-bg: #15301f;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 14px/20px var(--font); }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 12px 16px; border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; text-decoration: none; }
.brand-mark { flex: none; color: var(--text); }
.brand b { display: block; font-size: 15px; font-weight: 600; line-height: 18px; }
.brand span { display: block; font-size: 12px; color: var(--muted); line-height: 16px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--radius-control); color: var(--muted); text-decoration: none; }
.nav a:hover { background: var(--raised); color: var(--text); }
.nav a[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 500; }
.nav svg { flex: none; width: 16px; height: 16px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.side-foot a { color: var(--muted); }
.side-foot a:hover { color: var(--text); }
.pilot-note { padding: 10px 12px; border-radius: var(--radius-card); background: var(--raised); color: var(--text); }
.topbar { display: none; }

.canvas { padding: 32px 32px 64px; min-width: 0; }
.page { max-width: 1160px; display: grid; gap: 24px; }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.title-row h1 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.title-row .sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-height); padding: 0 14px; border-radius: var(--radius-control); border: 1px solid var(--control); background: var(--surface); color: var(--text); font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .08s; }
.btn:hover { background: var(--raised); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--ground)); }
.btn.text { border-color: transparent; background: transparent; padding: 0 8px; }
.btn.text:hover { background: var(--raised); }
.btn[disabled] { cursor: progress; opacity: .7; }
.btn svg { width: 16px; height: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; }
.field .hint { color: var(--muted); font-size: 12px; line-height: 16px; }
.input { height: 40px; padding: 0 12px; border-radius: var(--radius-control); border: 1px solid var(--control); background: var(--surface); width: 100%; }
.input::placeholder { color: var(--faint); }
textarea.input { height: 260px; padding: 12px; resize: vertical; font: 13px/20px var(--mono); }
.form-error { margin: 0; color: var(--high); }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px var(--pad) 0; }
.panel-head h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.panel-head .meta { color: var(--muted); font-size: 12px; }
.panel-body { padding: 12px var(--pad) var(--pad); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }

/* Severity marks: a shape and a colour, never colour alone */
.sev { flex: none; display: inline-block; width: 10px; height: 10px; }
.sev.high { background: var(--high); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sev.medium { background: var(--medium-mark); transform: rotate(45deg) scale(.82); border-radius: 1px; }
.sev.low { background: var(--low); border-radius: 50%; transform: scale(.8); }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--radius-chip); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill.high { background: var(--high-bg); color: var(--high); }
.pill.medium { background: var(--medium-bg); color: var(--medium); }
.pill.low, .pill.manual, .pill.look { background: var(--low-bg); color: var(--muted); }
.pill.pass { background: var(--pass-bg); color: var(--pass); }
.pill.issues { background: var(--high-bg); color: var(--high); }

/* The verdict */
.verdict { padding: 24px var(--pad); display: grid; gap: 10px; }
.verdict h2 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.015em; }
.verdict p { margin: 0; color: var(--muted); font-size: 16px; line-height: 24px; max-width: 60ch; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.counts > div { padding: 14px var(--pad); display: grid; gap: 2px; }
.counts > div + div { border-left: 1px solid var(--rule); }
.counts dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.counts dd { margin: 0; font-size: 24px; line-height: 30px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.counts dd small { font-size: 12px; color: var(--muted); font-family: var(--font); }
.compare { display: flex; gap: 20px; flex-wrap: wrap; padding: 12px var(--pad); border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.compare b { color: var(--text); font-family: var(--mono); font-weight: 500; }

/* The width ruler: six ticks at their true positions from 320 to 1440 px */
.ruler { position: relative; display: inline-block; vertical-align: middle; flex: none; width: 132px; height: 22px; }
.ruler::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--rule); border-radius: 1px; }
.ruler i { position: absolute; top: 4px; width: 4px; height: 14px; margin-left: -2px; border-radius: 1px; background: var(--active); }
.ruler i.on { background: var(--accent); }
.ruler-legend { display: flex; justify-content: space-between; width: 132px; font: 11px/14px var(--mono); color: var(--faint); }

/* Finding rows */
.findings { display: grid; }
.finding { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 112px; gap: 14px; align-items: center; padding: 12px var(--pad); border-top: 1px solid var(--rule); background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; cursor: pointer; }
.finding:first-child { border-top: 0; }
.finding:hover { background: var(--raised); }
.finding .t { display: block; font-weight: 500; overflow-wrap: anywhere; }
.finding .w { display: block; color: var(--muted); font-size: 12px; line-height: 16px; margin-top: 2px; overflow-wrap: anywhere; }
.finding .shot { width: 112px; height: 64px; border-radius: 4px; overflow: hidden; background: var(--raised); }
.finding .shot img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.finding.is-marked .t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--control); }
.group-head { display: flex; align-items: center; gap: 8px; padding: 14px var(--pad) 6px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--rule); }
.group-head:first-child { border-top: 0; }

/* Tabs */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; height: 40px; padding: 0 2px; border: 0; background: none; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }
.tabs button:hover { color: var(--text); }
.tabs .count { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-left: 4px; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--raised); font-size: 13px; }
.filter-chip button { border: 0; background: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); }
.filter-chip button:hover { background: var(--active); color: var(--text); }

/* Width grid: pages down, widths across, finding counts shaded in the data hue */
.grid-wrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; min-width: 560px; }
.grid th, .grid td { padding: 0; height: 40px; border-top: 1px solid var(--rule); }
.grid thead th { border-top: 0; height: 32px; font: 400 12px var(--mono); color: var(--muted); text-align: center; }
.grid thead th:first-child { text-align: left; font-family: var(--font); }
.grid tbody th { text-align: left; font-weight: 400; padding-right: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid td { width: 13%; text-align: center; }
.cell { width: calc(100% - 8px); height: 30px; margin: 0 auto; border: 0; border-radius: 4px; font: 500 13px var(--mono); font-variant-numeric: tabular-nums; cursor: pointer; background: transparent; color: var(--faint); }
.cell.l1 { background: var(--accent-1); color: var(--text); }
.cell.l2 { background: var(--accent-2); color: var(--text); }
.cell.l3 { background: var(--accent-3); color: #fff; }
.cell.l4 { background: var(--accent); color: #fff; }
.cell:hover { outline: 1px solid var(--text); }
.cell[disabled] { cursor: default; outline: 0; }

/* Checklist */
.cl-section { padding: 6px 0 4px; }
.cl-section h3 { margin: 0; padding: 12px var(--pad) 6px; font-size: 13px; font-weight: 600; }
.cl-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px var(--pad); border-top: 1px solid var(--rule); }
.cl-item label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cl-item input { margin: 3px 0 0; accent-color: var(--text); width: 16px; height: 16px; flex: none; }
.cl-item .note { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.cl-summary { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px var(--pad) 6px; }

/* Progress */
.bar { height: 8px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.bar-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); color: var(--muted); }
.steps li:first-child { border-top: 0; }
.steps li.now { color: var(--text); font-weight: 500; }
.steps li.done { color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--control); margin: 0 auto; }
.done .dot { background: var(--text); border-color: var(--text); }
.now .dot { border-color: var(--accent); background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.live-pages { display: grid; }
.live-page { display: grid; grid-template-columns: minmax(0, 1fr) auto 132px; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.live-page:first-child { border-top: 0; }
.live-page .p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lists of runs */
.runs { display: grid; }
.run { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: 16px; align-items: center; padding: 12px var(--pad); border-top: 1px solid var(--rule); text-decoration: none; }
.run:first-child { border-top: 0; }
.run:hover { background: var(--raised); }
.run .site { font-weight: 500; overflow-wrap: anywhere; }
.run .when { color: var(--muted); font-size: 12px; text-align: right; }

/* Drawer for one finding */
.scrim { position: fixed; inset: 0; background: rgba(13, 14, 16, .42); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--surface); z-index: 21; overflow-y: auto; box-shadow: -12px 0 32px rgba(0, 0, 0, .12); display: grid; align-content: start; } /* taste-skill-ignore: a modal dialog floats */
.drawer-head { position: sticky; top: 0; background: var(--surface); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px var(--pad) 12px; border-bottom: 1px solid var(--rule); z-index: 1; }
.drawer-head h2 { margin: 6px 0 0; font-size: 20px; line-height: 26px; font-weight: 600; }
.drawer section { padding: 16px var(--pad); border-top: 1px solid var(--rule); display: grid; gap: 8px; }
.drawer section:first-of-type { border-top: 0; }
.drawer h3 { margin: 0; font-size: 13px; font-weight: 600; }
.drawer p { margin: 0; font-size: 15px; line-height: 23px; }
.crop-big { border-radius: 6px; overflow: hidden; background: var(--raised); border: 1px solid var(--rule); }
.where { display: grid; }
.where > div { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.where > div:first-child { border-top: 0; }
.where .item { overflow-wrap: anywhere; }
.where .path { display: block; color: var(--muted); font-size: 12px; }
.mark-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-control); border: 1px solid transparent; background: none; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--raised); color: var(--text); }

/* Start screen */
.start { display: grid; gap: 18px; padding: var(--pad); }
.covers { margin: 0; padding: 0; list-style: none; display: grid; }
.covers li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.covers li:first-child { border-top: 0; }
.covers b { font-family: var(--mono); font-weight: 500; }
.empty { padding: 18px var(--pad); color: var(--muted); }
.notice { padding: 12px 14px; border-radius: var(--radius-card); background: var(--raised); color: var(--text); font-size: 13px; line-height: 19px; }
.prose { max-width: 70ch; font-size: 15px; line-height: 24px; }
.prose h2 { font-size: 16px; margin: 24px 0 6px; }
.prose p, .prose ul { margin: 0 0 10px; }
.lint-hit { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; padding: 12px var(--pad); border-top: 1px solid var(--rule); }
.lint-hit:first-child { border-top: 0; }
.lint-hit .t { font-weight: 500; }
.lint-hit p { margin: 4px 0 0; color: var(--muted); }
.skeleton { display: inline-block; height: 1em; width: 8ch; border-radius: 4px; background: var(--rule); vertical-align: middle; }

/* Tablet and phone */
@media (max-width: 1100px) {
    .row2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .side { display: none; }
    .side.open { display: flex; position: fixed; inset: 0; z-index: 30; height: auto; width: 100%; background: var(--ground); border-right: 0; padding-top: 64px; }
    .topbar { display: flex; position: sticky; top: 0; z-index: 31; height: 52px; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; background: var(--ground); border-bottom: 1px solid var(--border); }
    .topbar .brand { padding: 0; }
    .canvas { padding: 20px 16px 48px; }
    .finding { grid-template-columns: 16px minmax(0, 1fr) 88px; }
    .finding .ruler-cell { display: none; }
    .finding .shot { width: 88px; height: 56px; }
    .verdict h2 { font-size: 24px; line-height: 30px; }
    .counts dd { font-size: 20px; line-height: 26px; }
    .run { grid-template-columns: minmax(0, 1fr) auto; }
    .run .when { display: none; }
    .live-page { grid-template-columns: minmax(0, 1fr) 132px; }
    .live-page .n { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
@media print {
    .side, .topbar, .actions, .tabs, .mark-row, .filter-chip { display: none !important; }
    .shell { display: block; }
    .canvas { padding: 0; }
    .panel { break-inside: avoid; }
}

/* Polish after the first look (Nov 2): balanced headings, the ruler's legend under the ruler, count notes on their own line on phones. */
.title-row h1, .verdict h2, .drawer-head h2 { text-wrap: balance; }
.ruler-stack { display: grid; gap: 2px; justify-items: end; }
@media (max-width: 860px) {
    .counts dd small { display: block; line-height: 16px; }
}
/* Figures that stack in columns get fixed-width digits; sentences and times keep proportional ones
   (Schibsted Grotesk's tabular set also widens the colon, which spaced out "10:11" and "yet: 2"). */
.covers b, .covers li > span:last-child, .finding .w, .live-page .n, .bar-ends, .cl-summary .pill, .where .path, .run .state { font-variant-numeric: tabular-nums; }
