/* The app, dressed like the Ukiyo website: the same type, top bar, buttons and cards. */

@font-face {
  font-family: "Mulish";
  src: url("fonts/mulish-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  /* The website's colours (landing/site.css), with the brand kit's teal. */
  --ink: #0a0b0d;
  --teal: #0e4f4a;
  --coral: #ff6f5e;
  --cream: #f1eee8;

  --surface: #111416;
  --surface-high: #171b1d;
  --stroke: #ffffff16;
  --card-edge: #ffb79b27;
  --brand-light: #ff9e8c;
  --teal-bright: #8fcfc4;
  --fg: var(--cream);
  --muted: #a7aaac;
  --faint: #838b8b;
  --line: #ffffff14;
  --well: #0c1012;
  --err: #ff9a8c;
  --warn: #f0c36f;
  --card-shine: inset 0 1px 0 #ffffff0c, inset 0 -10px 28px #ff6f5e0e;

  --text: "Mulish", "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--ink); scrollbar-color: #ffffff3a transparent; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font: 15px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--coral); color: var(--ink); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--text); font-weight: 680; letter-spacing: -0.045em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); font-weight: 620; letter-spacing: -0.055em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.12rem; letter-spacing: -0.03em; }
h4 { font-size: 16px; font-weight: 750; margin: 22px 0 6px; }
p { margin: 0 0 12px; }
a { color: var(--brand-light); text-underline-offset: 3px; }
code { background: #ffffff10; padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the light behind the page, as at the top of the website ---------- */

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(120px); will-change: transform; }
.glow-coral { width: 46vw; height: 30vw; right: -6%; top: -14%; background: var(--coral); opacity: 0.16; }
.glow-teal { width: 52vw; height: 34vw; left: -16%; top: 4%; background: #1d6d66; opacity: 0.34; }

/* ---------- the top bar (the website's masthead) ---------- */

.masthead {
  position: sticky; top: 0; z-index: 10;
  background: #0a0b0dd1;
  border-bottom: 1px solid #ffffff10;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.nav-shell {
  width: min(calc(100% - 64px), 1500px); min-height: 64px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 26px;
}
.wordmark { display: inline-flex; align-items: center; width: fit-content; color: var(--cream); border-radius: 8px; }

/* The Ukiyo logo, in the colour of what is around it. */
.sprite { position: absolute; }
.logo { display: block; flex: none; color: var(--cream); fill: currentColor; }
.lockup { height: 30px; width: auto; aspect-ratio: 849.51 / 207.25; }

.rail-nav { position: relative; display: flex; align-items: center; gap: 4px; }
.rail-pip {
  position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 11px;
  background: #ffffff0d; border: 1px solid #ffffff14;
}
.rail-btn {
  position: relative; z-index: 1; min-height: 40px; padding: 0 14px; border-radius: 11px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 0.875rem; font-weight: 650; white-space: nowrap;
  transition: color 0.18s ease;
}
.rail-btn svg { opacity: 0.75; }
.rail-btn:hover:not(:disabled), .rail-btn[aria-current="page"] { color: var(--cream); }
.rail-btn[aria-current="page"] svg { opacity: 1; color: var(--brand-light); }
.rail-count {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px;
  background: var(--coral); color: #1b0e0c; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
}

.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 14px; }
#last-run { white-space: nowrap; }

.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.progress span { display: block; width: 36%; height: 100%; background: linear-gradient(90deg, transparent, var(--coral), #ffc4a8); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .progress span { animation: none; width: 100%; } }

/* ---------- the page ---------- */

.shell { position: relative; z-index: 1; width: min(calc(100% - 64px), 1360px); margin: 0 auto; padding: clamp(34px, 5vw, 58px) 0 80px; }
.page-head { margin-bottom: clamp(22px, 3vw, 34px); }
.demo-note {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 6px 13px 6px 10px;
  border: 1px solid #ff99738c; border-radius: 60px; background: #ff846f14; color: #ffd6cc; font-size: 0.8rem; font-weight: 700;
}
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 12px #ff6f5e88; }

/* ---------- controls (the website's buttons) ---------- */

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: default; }
.solid, .ghost, .primary, .publish {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 16px; border-radius: 12px; border: 1px solid transparent;
  font-size: 0.875rem; font-weight: 750; line-height: 1.25; white-space: nowrap;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
/* The coral button: the main thing to do on a screen, and the button that publishes. */
.solid, .publish, .primary {
  background: linear-gradient(112deg, #ff7b68, #ff987f 54%, #ff735e);
  border-color: #ff9d815d;
  box-shadow: 0 3px 20px #ff6f5e3d, inset 0 1px 1px #fff5;
  color: #1b0e0c;
}
.solid:hover:not(:disabled), .publish:hover:not(:disabled), .primary:hover:not(:disabled) { box-shadow: 0 3px 25px #ff6f5e74, inset 0 1px 1px #fff7; }
/* The quiet button: everything else. */
.ghost { background: linear-gradient(180deg, #171819, #2c211e); border-color: #ffd1bd16; color: var(--cream); }
.ghost:hover:not(:disabled) { border-color: #ffd1bd51; background: #312421; }
.small-btn { min-height: 34px; padding: 0 13px; font-size: 0.8rem; border-radius: 10px; }

input, textarea, select {
  font: inherit; color: var(--fg); background: var(--well);
  border: 1px solid #ffffff27; border-radius: 9px; padding: 9px 12px;
}
input:focus, textarea:focus, select:focus { border-color: #ff9d8180; outline: none; box-shadow: 0 0 0 3px #ff6f5e26; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="number"] { width: 72px; }
input[type="checkbox"] { accent-color: var(--coral); width: 16px; height: 16px; padding: 0; }
/* Where the browser supports it, a text box is as tall as what is in it. */
textarea { width: 100%; min-height: 3.2em; resize: vertical; display: block; field-sizing: content; }
select {
  appearance: none; padding-right: 38px; font-weight: 700; font-size: 0.85rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
select option { background: #15171a; color: var(--cream); }

.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar p { margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }

/* ---------- surfaces (the website's cards) ---------- */

.glass {
  position: relative;
  border: 1px solid var(--card-edge); border-radius: 23px;
  background: radial-gradient(ellipse at 45% 105%, #78403922, transparent 68%), linear-gradient(145deg, #14181a, #111315 80%);
  box-shadow: 0 0 0 4px #ffffff06, var(--card-shine);
}
.panel { padding: 24px 26px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.panel-head p { margin: 4px 0 0; }
.view > .panel + *, .view > * + .panel { margin-top: 16px; }


/* ---------- overview ---------- */

.grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 18px; }
.grid.no-audit { grid-template-columns: 1fr; }
.table-card { grid-column: 1 / -1; }

/* The hero card is lit like the website's closing card: a coral sun rising from its lower corner. */
.hero {
  position: relative; grid-row: span 2; overflow: hidden;
  min-height: 430px; padding: 38px 36px 150px;
  display: flex; flex-direction: column; justify-content: center;
  border-color: #ffc8a934;
  background: radial-gradient(ellipse 70% 62% at 104% 112%, #e96147, #512921 64%, transparent 100%), linear-gradient(129deg, #161719, #0d0e10 61%);
  box-shadow: inset 0 0 32px #ff99721f, 0 13px 51px #80332425;
}
.grid.no-audit .hero { min-height: 380px; padding-bottom: 38px; }
.hero-copy { position: relative; z-index: 2; max-width: min(45%, 440px); }
.grid.no-audit .hero-copy { max-width: 560px; }
#hero-title { font-size: clamp(1.9rem, 3vw, 2.9rem); font-weight: 720; letter-spacing: -0.054em; margin: 6px 0 16px; }
#hero-text { color: #c9cbcc; max-width: 40ch; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-art { position: absolute; z-index: 1; right: 2.5%; top: 11%; width: 50%; height: 60%; }
.poster {
  position: absolute; width: 66%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  border: 1px solid #ffffff2a; background: #1c1f23;
  box-shadow: 0 0 0 5px #1e2528bd, 0 30px 60px #0008;
}
.poster img, .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster:nth-child(1) { left: 0; top: 42%; transform: rotate(-9deg); }
.poster:nth-child(2) { right: 0; top: 0; transform: rotate(7deg); }
.poster:nth-child(3) { left: 17%; top: 21%; transform: rotate(-2deg); z-index: 2; }
/* A video with no thumbnail gets a plain poster carrying its title. */
.poster.blank { display: flex; align-items: flex-end; padding: 14px 16px; }
/* The poster at the back shows only its top edge, so its title sits there. */
.poster.blank:nth-child(2) { align-items: flex-start; justify-content: flex-end; text-align: right; }
.poster.blank span { font-weight: 780; letter-spacing: -0.03em; font-size: clamp(11px, 1.15vw, 15px); line-height: 1.2; }
.poster.blank:nth-child(1) { background: linear-gradient(140deg, #245852, #0d2b29 70%); }
.poster.blank:nth-child(2) { background: linear-gradient(140deg, #3a3d44, #101215 75%); }
.poster.blank:nth-child(3) { background: linear-gradient(140deg, #ff7b68, #8e2f3a 55%, #14353a); color: #1b0e0c; }

.stats {
  position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 16px; margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.stat {
  display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; padding: 13px 15px 12px;
  border: 1px solid #ffc2ac21; border-radius: 12px;
  background: linear-gradient(161deg, #17191bdd, #121416dd 68%); box-shadow: var(--card-shine);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.stat dd { margin: 0; font-weight: 770; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.stat dt { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 750; color: var(--muted); white-space: nowrap; }
.stat dt::before, .dot { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--coral); flex: none; }
.stat:nth-child(2) dt::before { background: var(--teal-bright); }
.stat:nth-child(3) dt::before { background: var(--cream); }

/* the retention chart */
.chart { margin-top: 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart .rule { stroke: #ffffff14; stroke-width: 1; }
.chart text { fill: var(--muted); font: 600 10px var(--text); }
.chart .line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart .series-0, .legend .series-0 { stroke: var(--teal-bright); background: var(--teal-bright); }
.chart .series-1, .legend .series-1 { stroke: var(--coral); background: var(--coral); }
.chart .capsule { fill: #ffffff14; }
.chart .knob { stroke: var(--ink); stroke-width: 2; }
.chart .knob.series-0 { fill: var(--teal-bright); }
.chart .knob.series-1 { fill: var(--coral); }
.chart .pill rect { fill: #1b1f22; }
.chart .pill text { fill: var(--cream); font-weight: 750; }
.legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.legend li { display: flex; align-items: center; gap: 9px; font-size: 0.85rem; min-width: 0; }
.legend .dot { display: inline-block; }
.legend .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .reading { margin-left: auto; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-empty { padding: 34px 0; color: var(--muted); }

/* the fixes card */
.fixes-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; margin-top: 10px; align-items: stretch; }
.fixes-count strong { display: block; font-weight: 800; font-size: 3rem; line-height: 1; letter-spacing: -0.06em; color: var(--brand-light); font-variant-numeric: tabular-nums; }
.tally { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.tally li { display: flex; align-items: center; gap: 8px; }
.tally .dot { background: var(--faint); }
.tally .approved .dot { background: var(--coral); }
.tally .published .dot { background: var(--teal-bright); }
.next-fix { border-radius: 14px; border: 1px solid #ffffff12; background: #0d1012; padding: 14px 16px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.next-fix .for { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.next-fix .proposed { font-weight: 700; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; overflow-wrap: anywhere; }

/* the videos table */
.vtable { display: grid; gap: 8px; margin-top: 16px; }
.vrow {
  display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center; gap: 18px; padding: 10px 18px 10px 10px;
  border-radius: 14px; border: 1px solid #ffffff0d; background: #ffffff06;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.vrow:hover { background: #ffffff0c; border-color: #ffb79b33; }
.vhead, .vhead:hover { background: none; border-color: transparent; border-bottom-color: var(--line); border-radius: 0; padding-top: 0; padding-bottom: 8px; color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.vvideo { display: flex; align-items: center; gap: 14px; min-width: 0; }
.thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; flex: none; background: #1c1f23; }
.thumb.blank { background: linear-gradient(140deg, #245852, #15171a 75%); }
.vtitle { min-width: 0; }
.vtitle a { display: block; color: var(--cream); font-weight: 750; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtitle a:hover { text-decoration: underline; }
.vtitle span { font-size: 0.8rem; color: var(--muted); }
.num { display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num .dot { width: 6px; height: 6px; border-radius: 50%; }
.num.duration .dot { background: var(--teal-bright); }
.num em { font-style: normal; font-weight: 600; color: var(--muted); }
.spark svg { display: block; width: 100%; height: 32px; }
.spark path { fill: none; stroke: var(--teal-bright); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.spark .none { font-size: 0.8rem; color: var(--faint); }
#show-all { margin-top: 12px; }

/* ---------- audit ---------- */

.report { max-width: 70ch; font-size: 1.02rem; line-height: 1.7; margin-top: 18px; color: #d8d9d9; }
.report h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 8px 0 20px; color: var(--cream); }
.report h3 { margin: 38px 0 12px; font-size: 1.15rem; color: var(--cream); }
.report ul, .report ol { padding-left: 22px; }
.report li { margin: 4px 0; }
.report li::marker { color: var(--coral); }
.report strong { font-weight: 780; color: var(--cream); }
.report hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
/* The top actions are in order of impact, so they keep their numbers. */
.report ol.actions { list-style: none; padding: 0; counter-reset: action; display: grid; gap: 10px; }
.report ol.actions li {
  counter-increment: action; margin: 0; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 13px; border: 1px solid #ffffff16;
  background: linear-gradient(120deg, #262d2f, #171a1e); color: var(--cream); font-weight: 700;
}
.report ol.actions li:first-child { background: linear-gradient(120deg, #ff7a68, #f79782); border-color: transparent; box-shadow: 0 0 25px #ff6f5e48; color: #1a1010; }
.report ol.actions li::before { content: counter(action, decimal-leading-zero); font-size: 0.8rem; font-weight: 800; opacity: 0.7; font-variant-numeric: tabular-nums; }
.empty { margin: 12px 0; padding: 40px 20px; border: 1px dashed #ffffff22; border-radius: 18px; color: var(--muted); text-align: center; }

/* the audit, laid out from the report itself, in frosted glass over the page's light */
.audit {
  --glass-fill: rgba(241, 238, 232, 0.045);
  --glass-edge: rgba(241, 238, 232, 0.12);
  --glass-hair: rgba(241, 238, 232, 0.08);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  display: grid; gap: 22px;
}
.audit-head, .glass-sheet {
  border: 1px solid var(--glass-edge); border-radius: 24px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(28px) saturate(140%); backdrop-filter: blur(28px) saturate(140%);
  box-shadow: var(--glass-shine), 0 24px 60px rgba(0, 0, 0, 0.28);
}
.audit-head { padding: 28px 30px 30px; display: grid; gap: 24px; }
.audit-head-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 8px; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.audit-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 600; letter-spacing: -0.045em; }

/* "3 high · 1 medium · 1 low", as plain words */
.audit-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; }
.audit-counts li + li::before { content: "\00b7"; margin: 0 9px; opacity: 0.6; }
.audit-counts strong { color: var(--cream); font-weight: 700; font-variant-numeric: tabular-nums; }

.top-actions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.top-actions li {
  display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 18px; border-radius: 18px;
  border: 1px solid var(--glass-hair); background: rgba(241, 238, 232, 0.04); box-shadow: var(--glass-shine);
}
.top-actions .num { font-size: 2rem; font-weight: 250; line-height: 1; letter-spacing: -0.04em; color: rgba(241, 238, 232, 0.38); font-variant-numeric: tabular-nums; }
.top-actions li:first-child .num { color: var(--brand-light); }
.top-actions p { margin: 0; flex: 1; font-weight: 600; line-height: 1.45; color: var(--cream); }
.why-link { align-self: flex-start; font-size: 0.8rem; font-weight: 600; color: var(--muted); text-decoration: underline; text-decoration-color: rgba(241, 238, 232, 0.25); text-underline-offset: 4px; }
.why-link:hover { color: var(--cream); text-decoration-color: currentColor; }

.audit-block { display: grid; gap: 14px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.block-head h3 { font-size: 1.2rem; font-weight: 650; }

/* the section filter, as quiet text tabs */
.chips { display: flex; gap: 2px 18px; flex-wrap: wrap; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0;
  color: var(--muted); font-size: 0.85rem; font-weight: 600; transition: color 0.18s ease;
}
.chip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transition: transform 0.2s ease; }
.chip:hover { color: var(--cream); }
.chip.on { color: var(--cream); }
.chip.on::after { transform: scaleX(1); }
.chip-n { opacity: 0.5; font-variant-numeric: tabular-nums; }

/* findings: rows in one sheet of glass */
.findings { display: grid; overflow: hidden; }
.finding + .finding { border-top: 1px solid var(--glass-hair); }
.finding summary {
  position: relative; list-style: none; cursor: pointer; padding: 18px 56px 18px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; transition: background-color 0.18s ease;
}
.finding summary:hover { background: rgba(241, 238, 232, 0.025); }
.finding summary::-webkit-details-marker { display: none; }
.finding summary::after {
  content: ""; position: absolute; right: 26px; top: 26px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease;
}
.finding[open] summary::after { transform: rotate(225deg); top: 30px; }
.prio { display: inline-flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.prio-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(241, 238, 232, 0.35); }
.prio.high { color: var(--cream); }
.prio.high .prio-dot { background: var(--coral); box-shadow: 0 0 10px rgba(255, 111, 94, 0.6); }
.prio.medium .prio-dot { background: var(--warn); }
.finding-section { font-size: 0.75rem; color: var(--faint); }
.finding h4 { flex-basis: 100%; margin: 6px 0 0; font-size: 1.04rem; font-weight: 650; letter-spacing: -0.02em; color: var(--cream); }
.finding-do { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); }
.finding-body { display: grid; gap: 14px; margin: 0 24px; padding: 4px 0 22px 0; }
.finding-body p { margin: 0; color: #d6d7d6; }
.finding-body .label { margin-bottom: 4px; font-size: 0.72rem; font-weight: 600; color: var(--faint); }
.finding-videos { display: flex; flex-wrap: wrap; gap: 8px; }
.video-chip {
  padding: 6px 12px; border-radius: 10px; border: 1px solid var(--glass-hair); background: rgba(241, 238, 232, 0.04);
  color: var(--cream); font-size: 0.8rem; font-weight: 600; text-decoration: none;
}
.video-chip:hover { border-color: var(--glass-edge); background: rgba(241, 238, 232, 0.07); }

/* the plan: one sheet, four weeks */
.weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.week { padding: 20px 22px 22px; }
.week + .week { border-left: 1px solid var(--glass-hair); }
.week-n { margin: 0 0 10px; font-size: 0.75rem; font-weight: 600; color: var(--faint); }
.week ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--cream); font-size: 0.92rem; line-height: 1.45; }
.audit-foot { margin: 0; max-width: 90ch; }
.audit-options { margin-top: 18px; color: var(--muted); font-size: 0.85rem; }
.audit-options summary { cursor: pointer; font-weight: 600; width: fit-content; }
.audit-options .check { margin-top: 10px; }

@media (max-width: 1080px) {
  .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week:nth-child(3) { border-left: 0; }
  .week:nth-child(n + 3) { border-top: 1px solid var(--glass-hair); }
}
@media (max-width: 820px) {
  /* The top bar drops its blur on phones; the page's glass keeps a little more fill to stay readable. */
  .audit { --glass-fill: rgba(241, 238, 232, 0.06); }
}
@media (max-width: 560px) {
  .weeks { grid-template-columns: 1fr; }
  .week + .week { border-left: 0; border-top: 1px solid var(--glass-hair); }
  .audit-head { padding: 22px 18px; }
  .finding summary { padding: 16px 48px 16px 18px; }
  .finding-body { margin: 0 18px; }
}

/* ---------- fixes ---------- */

.toolbar .bar { margin-bottom: 10px; }
.toolbar p { margin: 0; }
.note { margin-top: 16px; padding: 14px 18px; border-radius: 14px; border: 1px solid #f0c36f33; background: #f0c36f12; color: var(--warn); }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.group-head { display: flex; align-items: center; gap: 14px; margin: 30px 0 12px; }
.group-head a { color: inherit; text-decoration: none; }
.group-head a:hover { text-decoration: underline; }

.card {
  border: 1px solid #ffc2ac21; border-radius: 17px; padding: 18px 20px; margin: 10px 0;
  background: linear-gradient(161deg, #17191b, #121416 68%); box-shadow: var(--card-shine);
}
/* An approved fix is waiting to go live: it carries the coral edge. */
.card.approved { border-color: #ff9a7580; box-shadow: inset 4px 0 0 var(--coral), 0 -12px 40px #ff6f5e10; }
.card.skipped { background: none; border-style: dashed; box-shadow: none; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.field { font-weight: 780; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.col-label { font-size: 0.75rem; font-weight: 750; color: var(--muted); margin-bottom: 5px; }
.value { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--well); border: 1px solid #ffffff12; border-radius: 9px; padding: 9px 12px; min-height: 2.6em; color: #dddedd; }
.count { font-size: 0.75rem; color: var(--muted); text-align: right; margin-top: 5px; font-variant-numeric: tabular-nums; }
.count.over { color: var(--err); font-weight: 750; }
.reason { margin: 14px 0 0; }
.error-text { margin: 8px 0 0; color: var(--err); }
.card > .muted { margin: 8px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.badge { font-size: 0.72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #ffffff12; color: var(--muted); }
.badge.approved { background: #ff846f; color: #1d1010; }
.badge.published { background: #8fcfc41f; color: var(--teal-bright); }
.badge.failed, .badge.error { background: #ff9a8c22; color: var(--err); }
.badge.warn { background: #f0c36f22; color: var(--warn); }

/* ---------- the pre-publish check ---------- */

.check-intro { margin: 0; max-width: 74ch; color: #c9cbcc; }
.check-intro strong { color: var(--cream); }
.check-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; margin-top: 16px; align-items: start; }
.check-list { display: grid; gap: 10px; }
.check-video {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 12px;
  border: 1px solid #ffc2ac1c; border-radius: 15px;
  background: linear-gradient(161deg, #17191b, #121416 68%); box-shadow: var(--card-shine);
  transition: border-color 0.18s ease;
}
.check-video.focused { border-color: #ff9a7580; box-shadow: 0 -12px 40px #ff6f5e10, var(--card-shine); }
.check-video .thumb { width: 112px; }
.check-video h3 { font-size: 0.98rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.check-video p { margin: 0 0 4px; }
.check-video .actions { margin-top: 10px; }
.check-status { color: var(--brand-light); font-weight: 750; }
.check-status.ready { color: var(--teal-bright); }
.check-result { display: grid; gap: 14px; min-width: 0; }
.check-result .group-head { margin: 14px 0 0; }
.check-result .card { margin: 0; }
.check-placeholder h3 { margin-bottom: 6px; }
.check-placeholder p { margin: 0; }
.check-summary .eyebrow { margin: 0 0 8px; font-size: 0.75rem; font-weight: 750; color: var(--muted); }
.check-summary h2 { margin-bottom: 12px; overflow-wrap: anywhere; }
.check-verdict { font-size: 1.12rem; line-height: 1.5; color: var(--cream); font-weight: 650; }
.check-summary .muted { margin: 0; }
.check-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-item {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 16px 18px;
  border: 1px solid #ffffff12; border-radius: 14px; background: #ffffff06;
}
.check-item h3 { font-size: 1rem; margin-bottom: 4px; }
.check-item p { margin: 0; color: #d0d1d1; }
.verdict { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; }
.check-item.good .verdict { background: #8fcfc41f; color: var(--teal-bright); }
.check-item.fix .verdict { background: linear-gradient(120deg, #ff7a68, #f79782); color: #1a1010; box-shadow: 0 0 18px #ff6f5e40; }
.check-item blockquote {
  margin: 10px 0 0; padding: 9px 12px; border-left: 2px solid var(--coral); border-radius: 0 9px 9px 0;
  background: var(--well); color: #dcdcdc; font-style: italic; overflow-wrap: anywhere;
}
.check-item blockquote .at { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 8px; text-decoration: none; }
.check-item blockquote .at:hover { text-decoration: underline; }

@media (max-width: 1080px) {
  .check-layout { grid-template-columns: 1fr; }
}

/* ---------- history ---------- */

.entry {
  border: 1px solid #ffc2ac1c; border-radius: 15px; padding: 14px 18px; margin: 10px 0;
  background: linear-gradient(161deg, #17191b, #121416 68%); box-shadow: var(--card-shine);
}
.entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.entry-head .spacer { min-width: 8px; }
.entry > .muted { margin: 8px 0 0; }
.when { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.entry details { margin-top: 8px; }
.entry summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.entry details .cols { margin-top: 10px; }

/* ---------- messages ---------- */

.toast {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 24px; margin: 0 auto;
  width: min(560px, calc(100% - 32px));
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px 13px 18px;
  border-radius: 14px; border: 1px solid #ffffff1d;
  background: #15181ae8;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 0 0 5px #ffffff07, 0 20px 60px #000a;
}
.toast::before { content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--cream); flex: none; }
.toast.ok::before { background: var(--teal-bright); }
.toast.error::before { background: var(--coral); }
.toast.error { border-color: #ff6f5e80; }
.toast .body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.toast button { width: 28px; height: 28px; border-radius: 8px; font-size: 18px; line-height: 1; color: var(--muted); }
.toast button:hover { background: #ffffff14; color: var(--cream); }

.dialog {
  width: min(440px, calc(100% - 32px)); padding: 26px; border-radius: 21px;
  border: 1px solid #ffc8a934; color: var(--cream);
  background: radial-gradient(ellipse 80% 70% at 110% 120%, #6a2c22, transparent 70%), linear-gradient(129deg, #161719, #0d0e10 61%);
  box-shadow: 0 0 0 5px #ffffff07, 0 40px 120px #000b;
}
.dialog::backdrop { background: #0a0b0db0; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog p { font-size: 1.02rem; white-space: pre-line; margin: 0 0 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- glass: every surface is frosted glass over the page's light ---------- */

:root {
  --glass-fill: rgba(241, 238, 232, 0.045);
  --glass-fill-strong: rgba(241, 238, 232, 0.075);
  --glass-edge: rgba(241, 238, 232, 0.12);
  --glass-hair: rgba(241, 238, 232, 0.08);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --glass-blur: blur(28px) saturate(140%);
  --glass-drop: 0 24px 60px rgba(0, 0, 0, 0.25);
}

/* The outer surfaces blur what is behind them; what sits inside them only tints, which keeps scrolling smooth. */
.glass, .card, .entry, .check-video, .toast, .dialog, .note {
  border: 1px solid var(--glass-edge);
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shine), var(--glass-drop);
}
.glass { border-radius: 24px; }
.card { border-radius: 18px; }
.entry { border-radius: 16px; }
.toast, .dialog { background: rgba(20, 22, 25, 0.72); }
.note { background: rgba(240, 195, 111, 0.07); border-color: rgba(240, 195, 111, 0.22); }

/* The hero keeps a low coral sun behind its glass. */
.hero {
  border-color: var(--glass-edge);
  background: radial-gradient(ellipse 70% 75% at 102% 112%, rgba(255, 111, 94, 0.3), transparent 70%), var(--glass-fill);
  box-shadow: var(--glass-shine), var(--glass-drop);
}

.card.approved { border-color: rgba(255, 111, 94, 0.45); box-shadow: inset 3px 0 0 var(--coral), var(--glass-shine), var(--glass-drop); }
.card.skipped { background: transparent; border-style: dashed; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.check-video.focused { border-color: rgba(241, 238, 232, 0.28); background: var(--glass-fill-strong); box-shadow: var(--glass-shine), var(--glass-drop); }

/* Surfaces inside a surface: a lighter tint and a hairline. */
.stat, .next-fix, .value, .check-item, .vrow, .top-actions li {
  border: 1px solid var(--glass-hair);
  background: rgba(241, 238, 232, 0.035);
  box-shadow: var(--glass-shine);
}
.stat { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.vrow:hover { background: var(--glass-fill-strong); border-color: var(--glass-edge); }
.vhead, .vhead:hover { background: none; border-color: transparent; border-bottom-color: var(--glass-hair); box-shadow: none; }
.check-item.fix .verdict { background: rgba(255, 111, 94, 0.16); color: var(--brand-light); box-shadow: none; }
.check-item.good .verdict { background: rgba(143, 207, 196, 0.12); }
.check-item blockquote { background: rgba(10, 11, 13, 0.35); border-left-color: rgba(255, 111, 94, 0.7); }
.report ol.actions li, .report ol.actions li:first-child { border: 1px solid var(--glass-hair); background: rgba(241, 238, 232, 0.035); box-shadow: var(--glass-shine); color: var(--cream); }

/* Buttons: cream for the main thing on a screen, coral only for what publishes, glass for the rest. */
.solid, .primary { background: var(--cream); border-color: transparent; box-shadow: none; color: #121314; }
.solid:hover:not(:disabled), .primary:hover:not(:disabled) { background: #fff; box-shadow: none; }
.publish { background: var(--coral); border-color: transparent; box-shadow: none; color: #1b0e0c; }
.publish:hover:not(:disabled) { background: #ff8676; box-shadow: none; }
.ghost { background: var(--glass-fill); border-color: var(--glass-edge); box-shadow: var(--glass-shine); color: var(--cream); }
.ghost:hover:not(:disabled) { background: var(--glass-fill-strong); border-color: rgba(241, 238, 232, 0.22); }

input, textarea, select { background: rgba(10, 11, 13, 0.35); border-color: var(--glass-edge); }
input:focus, textarea:focus, select:focus { border-color: rgba(241, 238, 232, 0.35); box-shadow: 0 0 0 3px rgba(241, 238, 232, 0.08); }

.badge { background: rgba(241, 238, 232, 0.08); }
.badge.approved { background: rgba(255, 111, 94, 0.18); color: var(--brand-light); }

.masthead { background: rgba(10, 11, 13, 0.55); border-bottom-color: var(--glass-hair); }
.rail-pip { background: var(--glass-fill-strong); border-color: var(--glass-edge); box-shadow: var(--glass-shine); }
.demo-note { background: var(--glass-fill); border-color: var(--glass-edge); color: var(--cream); }
.empty { border-color: var(--glass-edge); background: rgba(241, 238, 232, 0.02); }

/* the connect step */
.connect { display: grid; gap: 14px; }
.connect-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.connect-head h3 { margin-bottom: 6px; }
.connect-head p { margin: 0; max-width: 64ch; }
.connect-label { margin: 10px 0 0; font-size: 0.75rem; font-weight: 600; color: var(--faint); }
.connect-item { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--glass-hair); }
.connect-video { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.connect-video .thumb { width: 112px; }
.connect-video p { margin: 4px 0 0; }
.connect-title { color: var(--cream); font-weight: 650; text-decoration: none; }
.connect-title:hover { text-decoration: underline; }
.connect-note { color: var(--warn); }
.connect .card { margin: 0; }

/* ---------- smaller screens ---------- */

@media (max-width: 1180px) {
  .rail-btn { padding: 0 11px; }
  #last-run { display: none; }
}

@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; }
  .hero { grid-row: auto; }
}

@media (max-width: 820px) {
  /* The section links become a bar along the bottom of the screen. The top bar loses its blur here:
     an element with one becomes the frame its fixed children are placed in. */
  .masthead { -webkit-backdrop-filter: none; backdrop-filter: none; background: #0a0b0df2; }
  .nav-shell { width: calc(100% - 32px); grid-template-columns: 1fr auto; gap: 12px; }
  .lockup { height: 26px; }
  .rail-nav {
    position: fixed; z-index: 10; left: 12px; right: 12px; bottom: 12px; height: 64px;
    justify-content: space-around; padding: 0 8px; border-radius: 18px;
    border: 1px solid #ffffff1d; background: #111416ee;
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    box-shadow: 0 0 0 5px #ffffff07, 0 14px 40px #000a;
  }
  .rail-btn { flex-direction: column; gap: 3px; min-height: 52px; padding: 6px 10px; font-size: 0.68rem; }
  .rail-count { position: absolute; top: 2px; right: 4px; }
  .shell { width: calc(100% - 32px); padding: 26px 0 110px; }
  .glass { border-radius: 19px; }
  .panel { padding: 20px 18px; }
  .hero, .grid.no-audit .hero { display: block; min-height: 0; padding: 22px 18px 18px; }
  .hero-art { position: relative; right: auto; top: auto; width: 100%; height: 210px; margin-bottom: 26px; }
  .poster { width: 58%; }
  .hero-copy, .grid.no-audit .hero-copy { max-width: none; }
  .stats { position: static; grid-template-columns: 1fr 1fr; margin-top: 22px; }
  .fixes-body, .cols { grid-template-columns: 1fr; }
  .vrow { grid-template-columns: 1fr 1fr; row-gap: 8px; padding: 10px 12px; }
  .vvideo { grid-column: 1 / -1; }
  .vhead, .spark { display: none; }
  .toast { bottom: 90px; }
}

@media (max-width: 420px) {
  .solid { padding-inline: 13px; }
  .rail-btn { padding-inline: 6px; }
}

/* ---------- the hosted app: signing in and the account ---------- */

.button-link { text-decoration: none; }

/* Signed out: only the sign-in page, without the app's sections around it. */
body.signed-out .rail-nav, body.signed-out .page-head, body.signed-out .topbar-actions { display: none; }
.signin-layout {
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 420px);
  align-items: center;
  gap: clamp(32px, 7vw, 110px);
  max-width: 1040px;
  margin: 0 auto;
  padding: 4vh 0 8vh;
}
.signin-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 620; letter-spacing: -0.055em; line-height: 1.04; }
.signin-points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; color: var(--muted); font-size: 1.02rem; }
.signin-points li { display: flex; align-items: center; gap: 12px; }
.signin-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 14px #ff6f5e88; }
.signin-points li:nth-child(2) .signin-dot { background: var(--teal-bright); box-shadow: 0 0 14px #8fcfc488; }
.signin-points li:nth-child(3) .signin-dot { background: var(--cream); box-shadow: 0 0 14px #f1eee866; }
.signin-card { padding: 34px 32px 28px; display: flex; flex-direction: column; }
.signin-card h2 { margin-bottom: 6px; font-size: 1.7rem; }
.signin-card > .muted { margin: 0 0 22px; }
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  background: #fff;
  color: #1f1f1f;
  font-weight: 720;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 1px 0 #ffffff40 inset, 0 10px 30px #00000059;
  transition: transform .15s ease, box-shadow .15s ease;
}
.google-button:hover { transform: translateY(-1px); box-shadow: 0 1px 0 #ffffff40 inset, 0 14px 36px #00000073; }
.google-button:active { transform: translateY(0); }
.signin-fine { margin: 14px 0 0; color: var(--faint); font-size: .82rem; line-height: 1.5; }
.signin-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.signin-or::before, .signin-or::after { content: ''; flex: 1; height: 1px; background: var(--stroke); }
.signin-demo { align-self: center; font-weight: 700; font-size: .92rem; text-decoration: none; }
.signin-demo:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .signin-layout { grid-template-columns: 1fr; min-height: 0; padding-top: 2vh; gap: 28px; }
  .signin-points { margin-top: 20px; }
}
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.account-card { display: flex; flex-direction: column; gap: 6px; }
.account-card .muted { margin: 0; }
.account-label { margin: 0; color: var(--muted); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.account-value { margin: 0; font-size: 1.15rem; font-weight: 750; overflow-wrap: anywhere; }
.account-value a { color: inherit; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.account-card.danger { border-color: rgba(255, 154, 140, 0.24); }

/* ---------- an audit running on the server ---------- */

.audit-job { display: grid; gap: 10px; margin: 0 0 22px; padding: 16px 20px 14px; }
.audit-job p { margin: 0; }
.audit-job-head { display: flex; align-items: center; gap: 10px; }
.audit-job-head p { flex: 1; font-weight: 650; color: var(--cream); }
#audit-job-pct { font-variant-numeric: tabular-nums; }
.audit-job-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 12px #ff6f5e99; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.audit-job-bar { height: 6px; border-radius: 6px; overflow: hidden; background: rgba(241, 238, 232, 0.08); }
.audit-job-bar span {
  display: block; height: 100%; border-radius: inherit; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--coral), #ffc4a8); transition: transform 0.6s ease;
}
@media (prefers-reduced-motion: reduce) {
  .audit-job-dot { animation: none; }
  .audit-job-bar span { transition: none; }
}

/* ---------- the audit's tools and options ---------- */

.audit-tools { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.studio-upload { display: grid; gap: 8px; margin-top: 16px; max-width: 70ch; }
.studio-pick { font-weight: 600; color: var(--cream); }
.studio-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-row input[type="file"] { max-width: 100%; padding: 0; border: 0; background: none; box-shadow: none; color: var(--muted); font: inherit; font-size: 0.85rem; }
.studio-row input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 7px 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid #ffd1bd2a; background: linear-gradient(180deg, #171819, #2c211e); color: var(--cream); font: inherit; font-weight: 650;
}
.studio-row input[type="file"]::file-selector-button:hover { border-color: #ffd1bd51; }
.studio-status { margin: 0; color: var(--muted); line-height: 1.5; }
.studio-status.ok { color: var(--teal-bright); }
.studio-status.err { color: var(--err); }

/* ---------- the audit as a printed report (printReport.js), for the PDF ---------- */

.print-report { display: none; }

@media print {
  @page {
    size: A4; margin: 14mm 14mm 16mm;
    @bottom-left { content: "Ukiyo channel audit"; font: 600 7.5pt "Mulish", sans-serif; color: #8a8f92; }
    @bottom-right { content: counter(page) " of " counter(pages); font: 600 7.5pt "Mulish", sans-serif; color: #8a8f92; }
  }
  :root { color-scheme: light; }
  html, body { background: #fff !important; }
  /* Only the report is printed; the logo drawings stay, for the report to use. */
  body > *:not(.print-report):not(.sprite) { display: none !important; }
  .print-report { display: block; }
}

.pr {
  --ink: #15181a; --body: #33383b; --soft: #6b7174; --hair: #e6e2dc; --paper: #f7f4ef;
  --coral: #e5533f; --coral-soft: #fbe3dd; --amber: #d99a2b; --amber-soft: #fbefd6; --sage: #8d958f; --sage-soft: #eceeec;
  --teal: #1f6f66; --teal-mid: #5aa69b; --teal-soft: #dcefeb;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  color: var(--body); font: 400 9.6pt/1.5 var(--text); letter-spacing: 0;
}
.pr h1, .pr h2, .pr h3, .pr p { margin: 0; }
.pr h2 { font-size: 15pt; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); }
.pr h3 { font-size: 10.5pt; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.pr section { margin-top: 9mm; }
.pr-heading { display: grid; gap: 2px; margin-bottom: 4mm; }
.pr-heading p { color: var(--soft); }

/* the cover band */
.pr-cover {
  position: relative; overflow: hidden; padding: 9mm 9mm 8mm; border-radius: 5mm;
  background: #101416 linear-gradient(135deg, #18332f 0%, #101416 48%, #3a1d18 100%); color: #f1eee8;
}
.pr-cover::after {
  content: ""; position: absolute; right: -18mm; top: -22mm; width: 70mm; height: 70mm; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 111, 94, 0.45), rgba(255, 111, 94, 0) 70%);
}
.pr-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 2.5mm; font-weight: 800; font-size: 10pt; }
.pr-mark { width: 6mm; height: 6mm; fill: #ff8a76; }
.pr-brand-sub { padding-left: 2.5mm; border-left: 1px solid rgba(241, 238, 232, 0.3); font-weight: 600; color: #c9c5bf; }
.pr-cover h1 { position: relative; z-index: 1; margin-top: 9mm; font-size: 30pt; line-height: 1.05; font-weight: 750; letter-spacing: -0.04em; color: #fff; }
.pr-period { position: relative; z-index: 1; margin-top: 2.5mm !important; color: #c9c5bf; font-weight: 600; }
.pr-dot { margin: 0 2mm; opacity: 0.6; }
.pr-tiles { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3mm; margin-top: 8mm; }
.pr-tile { padding: 3.5mm 4mm; border-radius: 3mm; background: rgba(241, 238, 232, 0.08); border: 1px solid rgba(241, 238, 232, 0.14); }
.pr-tile-label { font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #b9b5ae; }
.pr-tile-value { margin-top: 1mm !important; font-size: 19pt; font-weight: 750; letter-spacing: -0.03em; color: #fff; font-variant-numeric: tabular-nums; }
.pr-tile-detail { font-size: 7.5pt; color: #b9b5ae; }

/* what to do first */
.pr-actions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3mm; }
.pr-actions li { display: flex; flex-direction: column; gap: 2mm; padding: 4mm; border-radius: 3mm; background: var(--paper); border-top: 1.2mm solid var(--coral); break-inside: avoid; }
.pr-action-n { font-size: 20pt; font-weight: 800; line-height: 1; color: var(--coral); }
.pr-action-text { flex: 1; font-size: 10.5pt; font-weight: 700; line-height: 1.4; color: var(--ink); }
.pr-action-ref { font-size: 7.5pt; font-weight: 600; color: var(--soft); }

/* findings at a glance */
.pr-stack { display: flex; height: 4mm; border-radius: 2mm; overflow: hidden; background: var(--hair); }
.pr-seg { height: 100%; }
.pr-seg + .pr-seg { border-left: 0.6mm solid #fff; }
.pr-seg.high, .pr-swatch.high, .pr-pip.high { background: var(--coral); }
.pr-seg.medium, .pr-swatch.medium, .pr-pip.medium { background: var(--amber); }
.pr-seg.low, .pr-swatch.low, .pr-pip.low { background: var(--sage); }
.pr-legend { list-style: none; margin: 2.5mm 0 0; padding: 0; display: flex; gap: 6mm; font-size: 8.5pt; color: var(--soft); }
.pr-legend strong { color: var(--ink); }
.pr-swatch { display: inline-block; width: 2.6mm; height: 2.6mm; margin-right: 1.5mm; border-radius: 0.8mm; vertical-align: -0.2mm; }
.pr-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2mm 8mm; margin-top: 5mm; }
.pr-area { display: grid; grid-template-columns: 38mm 1fr auto; align-items: center; gap: 3mm; padding: 1.8mm 0; border-bottom: 1px solid var(--hair); }
.pr-area-name { font-weight: 650; color: var(--ink); }
.pr-area-dots { display: flex; gap: 1.2mm; }
.pr-pip { width: 2.6mm; height: 2.6mm; border-radius: 50%; }
.pr-area-n { font-weight: 700; color: var(--soft); font-variant-numeric: tabular-nums; }

/* the charts */
.pr-charts { break-before: page; margin-top: 0 !important; }
.pr-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
.pr-chart { margin: 0; padding: 3.5mm 4.5mm; border: 1px solid var(--hair); border-radius: 3mm; break-inside: avoid; }
.pr-chart figcaption { display: grid; gap: 0.5mm; margin-bottom: 3mm; }
.pr-chart figcaption p { font-size: 7.8pt; color: var(--soft); }
.pr-wide { grid-column: 1 / -1; }
.pr-bars { display: grid; gap: 1.7mm; }
.pr-bar { display: grid; grid-template-columns: 1fr 12mm; grid-template-areas: 'label label' 'track value'; align-items: center; gap: 0.4mm 2.5mm; font-size: 7.8pt; line-height: 1.3; }
.pr-bar-label { grid-area: label; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--body); }
.pr-bar-track { grid-area: track; height: 2.8mm; border-radius: 1.6mm; background: var(--paper); overflow: hidden; }
.pr-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--teal-mid); }
.pr-bar.cited .pr-bar-fill { background: var(--coral); }
.pr-bar.cited .pr-bar-label { color: var(--ink); font-weight: 700; }
.pr-bar-value { grid-area: value; text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.pr-curves { display: block; width: 100%; height: auto; }
.pr-curves .rule { stroke: var(--hair); stroke-width: 1; }
.pr-curves .axis { stroke: #c9c4bc; stroke-width: 1; }
.pr-curves text { fill: var(--soft); font: 600 8.5px var(--text); }
.pr-curves .curve { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.pr .c0 { stroke: var(--coral); background: var(--coral); }
.pr .c1 { stroke: var(--teal); background: var(--teal); }
.pr .c2 { stroke: var(--amber); background: var(--amber); }
.pr-key { list-style: none; margin: 2.5mm 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5mm 7mm; font-size: 8pt; color: var(--ink); font-weight: 600; }
.pr-line { display: inline-block; width: 5mm; height: 0.9mm; margin-right: 1.8mm; border-radius: 0.5mm; vertical-align: 0.4mm; }
.pr-key-n { color: var(--soft); font-weight: 400; }

/* the findings */
.pr-findings { break-before: page; margin-top: 0 !important; }
.pr-group + .pr-group { margin-top: 7mm; }
.pr-group-head { break-after: avoid; display: flex; align-items: baseline; gap: 3mm; margin-bottom: 3mm; }
.pr-group-chip { padding: 0.8mm 3mm; border-radius: 10mm; font-size: 8pt; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.pr-group.high .pr-group-chip { background: var(--coral-soft); color: #a8321f; }
.pr-group.medium .pr-group-chip { background: var(--amber-soft); color: #8a5a07; }
.pr-group.low .pr-group-chip { background: var(--sage-soft); color: #4f5651; }
.pr-group-note { font-size: 8.5pt; color: var(--soft); }
.pr-finding { display: grid; gap: 3mm; padding: 4.5mm 5mm; margin-bottom: 3.5mm; border: 1px solid var(--hair); border-left: 1.4mm solid var(--sage); border-radius: 3mm; break-inside: avoid; }
.pr-finding.high { border-left-color: var(--coral); }
.pr-finding.medium { border-left-color: var(--amber); }
.pr-finding-head { display: flex; gap: 3.5mm; align-items: flex-start; }
.pr-finding-n { flex: none; display: grid; place-items: center; width: 7mm; height: 7mm; border-radius: 50%; background: var(--ink); color: #fff; font-size: 9pt; font-weight: 800; }
.pr-finding-section { font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--soft); }
.pr-finding h3 { margin-top: 0.5mm; font-size: 12pt; }
.pr-do { display: flex; gap: 3mm; align-items: baseline; padding: 2.5mm 3.5mm; border-radius: 2mm; background: var(--teal-soft); }
.pr-do-label { flex: none; font-size: 7.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal); }
.pr-do p { font-weight: 700; color: var(--ink); }
.pr-why { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
.pr-label { margin-bottom: 0.8mm !important; font-size: 7.5pt; font-weight: 700; color: var(--soft); }
.pr-videos { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5mm; }
.pr-videos .pr-label { margin: 0 1mm 0 0 !important; }
.pr-chip { padding: 0.6mm 2.4mm; border-radius: 1.5mm; background: var(--paper); font-size: 8pt; font-weight: 600; color: var(--ink); }

/* the plan, as a checklist */
.pr-plan { break-inside: avoid; }
.pr-weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3mm; }
.pr-week { padding: 4mm; border-radius: 3mm; background: var(--paper); }
.pr-week-n { margin-bottom: 2.5mm !important; font-size: 8pt; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--coral); }
.pr-week ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2mm; }
.pr-week li { display: flex; gap: 2mm; align-items: flex-start; color: var(--ink); font-weight: 600; line-height: 1.4; }
.pr-box { flex: none; width: 3.2mm; height: 3.2mm; margin-top: 0.5mm; border: 1.2px solid #a7a29a; border-radius: 0.8mm; background: #fff; }
.pr-notes { break-inside: avoid; margin-top: 9mm; padding-top: 3mm; border-top: 1px solid var(--hair); display: grid; gap: 1mm; font-size: 7.5pt; color: var(--soft); }

/* ---------- the thumbnail review (reached from Audit) ---------- */

.subnav { display: inline-flex; gap: 4px; margin-top: 14px; padding: 4px; border-radius: 12px; border: 1px solid var(--glass-hair); background: var(--glass-fill); }
.subnav button {
  min-height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: none;
  color: var(--muted); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
}
.subnav button:hover { color: var(--cream); }
.subnav button[aria-current="page"] { background: rgba(241, 238, 232, 0.09); color: var(--cream); box-shadow: var(--glass-shine); }
.thumbs { display: grid; gap: 16px; }
#thumbs-dropped { margin: 0 0 16px; }
.thumbs-intro { display: flex; align-items: center; gap: 20px; }
.thumbs-intro p { margin: 0 0 6px; max-width: 70ch; }
.thumbs-intro > button { flex: none; margin-left: auto; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; }
.thumb-review { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.thumb-review h3 { font-size: 1.05rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.thumb-review-body > p { margin: 0 0 12px; }
.thumb-link { display: block; border-radius: 11px; }
.thumb.thumb-big { width: 100%; border-radius: 11px; }
.banner-review h3 { font-size: 1.05rem; margin-bottom: 12px; }
.banner-img { width: 100%; aspect-ratio: 16 / 9; max-height: 340px; border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: #1c1f23; }
.banner-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.banner-img.blank { display: grid; place-items: center; color: var(--muted); }

@media (max-width: 560px) {
  .thumbs-intro { flex-direction: column; align-items: stretch; }
  .thumbs-intro > button { margin-left: 0; }
  .thumb-review { grid-template-columns: 1fr; }
}
