@font-face { font-family: "Delight"; src: url("fonts/Delight-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter_24pt-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter_24pt-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --scarlet: #DD1D1D; --lime: #D9FE94; --mahogany: #4F0804; --royal: #0A16A3;
  --onyx: #0A0A0A; --slate: #AEB1B5; --soft: #E5E3E3; --white: #FFFFFF;
  --bg: #F4F3F2; --card: #FFFFFF; --ink: var(--onyx); --muted: #55585C; --line: #D6D4D3;
  --ok: #1B6B2E; --bad: var(--scarlet);
  --wrap: 1440px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 "Inter", system-ui, sans-serif; }
img, video { max-width: 100%; display: block; }
a { color: var(--royal); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
h1, h2 { font-family: "Delight", "Inter", sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: 0.01em; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(30px, 4vw, 52px); }
h2 { font-size: clamp(22px, 2.4vw, 32px); }
h3 { font-size: 18px; margin: 0 0 6px; font-weight: 600; }
.mono { font-family: "Plex", ui-monospace, monospace; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
p { margin: 0 0 10px; max-width: 72ch; }
.muted { color: var(--muted); }

/* header */
header.top { background: var(--scarlet); color: var(--white); padding: 28px 0 24px; }
header.top .mono { color: var(--white); } /* lime on scarlet read 1.9:1 in axe; the mono label style stays */
header.top p { color: var(--white); font-size: 18px; margin-top: 10px; }
.banner { background: var(--lime); color: var(--onyx); padding: 14px 0; font-weight: 600; }
.banner p { margin: 0; }

/* flow strip */
.flow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 24px 0 8px; }
.flow .f { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.flow .f .n { font-family: "Plex", monospace; font-size: 13px; color: var(--muted); }
.flow .f b { display: block; font-size: 15px; }
.flow .f .st { font-size: 13px; margin-top: 4px; }
.st-built { color: var(--ok); font-weight: 600; }
.st-design { color: var(--mahogany); font-weight: 600; }

/* tabs */
nav.tabs { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 0; }
nav.tabs .wrap { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
nav.tabs .wrap::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--onyx); background: var(--white); color: var(--onyx); font: 600 15px "Inter", sans-serif; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--onyx); color: var(--lime); }
.tab .c { font-family: "Plex", monospace; font-weight: 400; font-size: 13px; margin-left: 6px; }

/* screens */
section.screen { padding: 28px 0 48px; }
.screen-head { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; margin-bottom: 20px; }
.how { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 15px; }
.how h3 { font-size: 15px; }
.how ul { margin: 0; padding-left: 18px; }
.how li { margin-bottom: 4px; }
.store { background: var(--onyx); color: var(--soft); border-radius: 12px; padding: 14px 16px; font-size: 14px; margin-top: 12px; }
.store .mono { color: var(--lime); display: block; margin-bottom: 4px; }
.store code { color: var(--white); font-family: "Plex", monospace; font-size: 13px; word-break: break-word; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
#clip-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.item { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.item.picked-yes { border-color: var(--ok); }
.item.picked-no { border-color: var(--scarlet); opacity: 0.8; }
.item .meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.item .text { font-size: 16px; white-space: pre-line; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: "Plex", monospace; font-size: 13px; letter-spacing: 0.03em; padding: 3px 8px; border-radius: 6px; background: var(--soft); color: var(--onyx); }
.chip.ok { background: #DDF3DF; color: var(--ok); }
.chip.bad { background: #FBE0E0; color: var(--scarlet); }
.chip.warn { background: #FFF1C9; color: #6A4A00; }

.verdict { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.verdict button { min-height: 48px; border-radius: 10px; border: 1px solid var(--onyx); background: var(--white); font: 600 15px "Inter", sans-serif; cursor: pointer; color: var(--onyx); }
.verdict button[data-v="yes"].on { background: var(--ok); color: var(--white); border-color: var(--ok); }
.verdict button[data-v="no"].on { background: var(--scarlet); color: var(--white); border-color: var(--scarlet); }
.verdict button[data-v="change"].on { background: var(--royal); color: var(--white); border-color: var(--royal); }
.saved-to { display: none; font-family: "Plex", monospace; font-size: 13px; background: var(--onyx); color: var(--lime); border-radius: 8px; padding: 8px 10px; word-break: break-word; }
.item.picked-yes .saved-to, .item.picked-no .saved-to, .item.picked-change .saved-to { display: block; }
.edit { display: none; gap: 8px; grid-template-columns: 1fr 1fr; }
.item.picked-no .edit.note, .item:not(.clip).picked-change .edit.note, .item.clip.picked-change .edit.trim { display: grid; }
.grid.paged { grid-template-columns: minmax(0, 560px) !important; }
.grid.paged > .item:not(.cur) { display: none; }
.pager { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; max-width: 560px; }
.pager .pos { flex: 1; text-align: center; }
.pg { min-height: 44px; min-width: 88px; border-radius: 999px; border: 1px solid var(--onyx); background: var(--white); color: var(--onyx); font: 600 15px "Inter", sans-serif; cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--onyx); color: var(--lime); }
details.how summary { font-size: 15px; }
/* the review pins buttons cover cards on a phone, so they load there only with ?pins=1 (ui-review rule of Nov 18) */
@media (max-width: 640px) { html:not(.pins) [data-tyrekick], html:not(.pins) [data-review-area] { display: none !important; } }
.edit label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.edit label:only-child { grid-column: 1 / -1; }
.edit input, .edit textarea { min-height: 44px; font: 400 16px "Inter", sans-serif; padding: 8px 10px; border: 1px solid var(--onyx); border-radius: 8px; width: 100%; }
#opus-read a, #opus-src a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }

/* save state: the banner counts the taps that wait in the outbox; each card says Saved only after the server ok */
.banner .save.wait { color: var(--mahogany); }
.banner:has(.save.wait) { background: #FFF1C9; }
.answers { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.tap-state { font-family: "Plex", monospace; font-size: 13px; }
.tap-state.ok { color: var(--ok); }
.tap-state.wait { color: #6A4A00; }
.edit .btn-line { min-height: 44px; border-radius: 10px; border: 1px solid var(--onyx); background: var(--white); color: var(--onyx); font: 600 15px "Inter", sans-serif; cursor: pointer; align-self: end; }
.edit.note { grid-template-columns: 1fr auto; }
header.top .who { margin: 16px 0 0; }
/* a work page: the header is one band, the H1 at 40 px, the reviewer switch at its right (uiux-pass.md of task 3, finding 2) */
@media (min-width: 900px) {
  header.top { padding: 20px 0; }
  header.top .wrap { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: end; }
  header.top h1 { font-size: 40px; }
  header.top .who { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .banner { padding: 10px 0; }
}
header.top .who .mono { color: var(--white); }
header.top .who .tab { border-color: var(--white); }
header.top .who .tab[aria-pressed="true"] { background: var(--onyx); border-color: var(--onyx); }
.cls-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
#clips .pager { margin-bottom: 8px; }
.cls-bar .tab { background: var(--white); color: var(--onyx); }
.cls-bar .tab[aria-pressed="true"] { background: var(--onyx); color: var(--lime); }
#left-out p { font-size: 14px; }

/* clip card */
/* phone and laptop: the video beside the score, the words and taps under both; from 1100 px the video stands left at 270 px and the
   words and taps sit beside it, so the Yes row shows in the first screen (uiux-pass.md of task 3, finding 2) */
.clip .body { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.clip .side { display: contents; }
.clip .side > :not(.score) { grid-column: 1 / -1; }
.clip .side > * { margin: 0; }
.clip video { width: 150px; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--onyx); object-fit: cover; }
@media (min-width: 1100px) {
  #clip-grid.paged { grid-template-columns: minmax(0, 880px) !important; }
  #clips .pager { max-width: 880px; }
  .clip .body { grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
  .clip .side { display: flex; flex-direction: column; gap: 12px; }
  .clip video { width: 270px; }
}
.score { display: flex; gap: 10px; align-items: stretch; }
.score .big { flex: 1; border-radius: 10px; padding: 8px 10px; }
.score .ours { background: var(--onyx); color: var(--white); }
.score .lens { background: var(--soft); }
.score .num { font-family: "Delight", sans-serif; font-size: 30px; line-height: 1; }
.score .lbl { font-family: "Plex", monospace; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; }
.bars { display: grid; gap: 4px; margin-top: 6px; }
.bar { display: grid; grid-template-columns: 62px 1fr 34px; gap: 6px; align-items: center; font-size: 13px; }
.bar .t { height: 8px; background: rgba(128,128,128,0.25); border-radius: 4px; overflow: hidden; }
.bar .t i { display: block; height: 100%; background: var(--lime); }
.lens .bar .t i { background: var(--royal); }
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.strip img { border-radius: 4px; aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
details { border-top: 1px solid var(--line); padding-top: 8px; }
summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { font-family: "Plex", monospace; font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--muted); }
.tablewrap { overflow-x: auto; }
.item table { table-layout: fixed; }
.item td, .item th { overflow-wrap: anywhere; }

/* template card */
.tpl img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--onyx); }
.tpl-media { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* combine */
.combine { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 18px; }
.formula .box { background: var(--card); border: 2px solid var(--onyx); border-radius: 12px; padding: 10px 14px; text-align: center; min-width: 96px; }
.formula .box b { font-family: "Delight", sans-serif; font-size: 34px; display: block; line-height: 1; }
.formula .box.result { background: var(--scarlet); color: var(--white); border-color: var(--scarlet); }
.rules li { margin-bottom: 6px; }
.combine > details.how { align-self: start; }
.cap { display: flex; align-items: center; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.cap input { width: 220px; height: 44px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 10px; background: var(--onyx); color: var(--lime); font: 600 15px "Inter", sans-serif; border: 0; cursor: pointer; text-decoration: none; }
.combo-list { display: grid; gap: 6px; }
.combo { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: 14px; }
.combo img { width: 44px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 4px; }

/* pipeline + storage */
.pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pipe .p { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.pipe .p .mono { color: var(--muted); display: block; margin-bottom: 4px; }
.diagram { width: 100%; height: auto; }
.cov td:first-child { font-weight: 600; white-space: nowrap; }
footer { padding: 32px 0 60px; color: var(--muted); font-size: 14px; }

@media (max-width: 1100px) {
  .screen-head, .combine { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(4, 1fr); }
  .pipe { grid-template-columns: repeat(2, 1fr); }
  /* the Yes row sits under the video and the score, the words below it, so a phone reaches the taps first (uiux-pass.md of task 3, finding 8) */
  .clip .side > .said { order: 1; }
  .clip .side > .chips { order: 2; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .pager { max-width: none; }
  /* six classes in two columns, so the first clip starts higher on a phone (uiux-pass.md of task 3, finding 1) */
  .cls-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .cls-bar .tab { padding: 4px 10px; font-size: 14px; line-height: 1.2; white-space: normal; text-align: left; }
  header.top { padding: 14px 0 12px; }
  section.screen { padding-top: 14px; }
  header.top p { margin-top: 6px; }
  .banner { padding: 10px 0; }
  .grid, #clip-grid { grid-template-columns: 1fr; }
  .clip .body { grid-template-columns: 120px 1fr; }
  .clip video { width: 120px; }
  .pipe { grid-template-columns: 1fr; }
  header.top p { font-size: 16px; }
  /* tables stack into label and value rows, so no table box scrolls sideways (uiux-pass.md finding 10) */
  table, tbody, tr, td { display: block; width: 100%; }
  tr:first-child:has(th) { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  td { border: 0; padding: 2px 0; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); display: block; font-family: "Plex", monospace; font-size: 13px; text-transform: uppercase; color: var(--muted); }
  td[data-label=""]::before { display: none; }
}
