/* Tokens and rules from docs/design/DESIGN.md. Keep them in step: this file is
   the build's copy of that document, not a second opinion. */
:root{
  /* Studio. The slides are the only saturated thing on screen and the chrome
     stays quiet — section 1 of DESIGN.md, finally obeyed. There is no
     decorative accent: every colour here is a neutral or a status, and all
     the chroma comes from the user's photographs. That is also how this
     steps around the two palettes section 7 bans by name, cream with
     terracotta and near-black with acid green. */
  --bg:#0f0f11; --raise:#17171a; --card:#1b1b1f; --rail:#131316;
  --fill:#232328; --fill2:#2e2e34;
  --line:#26262b; --line2:#36363d;
  --ink:#f4f3f1; --mut:#9a99a1; --faint:#6f6e77;
  /* The primary action is the page's own ink on a dark ground: the loudest
     thing available without introducing a colour that competes with a
     photograph. */
  --ac:#f4f3f1; --ac2:#ffffff; --ac-soft:#232328;
  --ok:#3ecf8e; --ok-soft:#14301f;
  --warn:#e8b339; --warn-soft:#332710;
  --bad:#f2555a; --bad-soft:#38181b;
  /* A card on a dark ground takes a hairline, not a blur. A shadow here is
     mud; the ring is what reads. */
  --sh1:0 0 0 1px var(--line);
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;
  --r-sm:6px; --r:8px; --r-md:12px; --r-lg:16px;
  --d:"Funnel Display",system-ui,sans-serif;
  --f:"Funnel Sans",system-ui,-apple-system,sans-serif;
  /* Motion. Never ease-in on UI: it delays the first movement, so the
     element reads as stuck before it goes. DESIGN.md section 9. */
  --ease-out:cubic-bezier(.23,1,.32,1);
  --ease-in-out:cubic-bezier(.77,0,.175,1);
  --ease-drawer:cubic-bezier(.32,.72,0,1);
  --dur-press:140ms; --dur-tip:160ms; --dur-menu:200ms; --dur-panel:320ms;
}
*{box-sizing:border-box}
button,a,label,summary,input,select,textarea{touch-action:manipulation}
[hidden]{display:none!important}
html{-webkit-font-smoothing:antialiased;color-scheme:dark}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);
  font:400 15px/24px var(--f);font-variant-numeric:tabular-nums;
  display:grid;grid-template-columns:240px minmax(0,1fr)}
body:has(.centre){display:block}
h1,h2{margin:0;font-weight:600}
h1{font-family:var(--d);font-size:46px;letter-spacing:-.03em;line-height:48px;font-weight:800}
h2{font-size:19px;letter-spacing:-.014em;line-height:24px}
p{margin:0}
a{color:inherit}
/* tracking is a function of size, declared per size, never inherited */
body,p,label,span,div,a,button,input,h2{letter-spacing:-.011em}
.sm{font-size:13px;line-height:20px;letter-spacing:-.006em}
.mut{color:var(--mut)}
:focus-visible{outline:none;box-shadow:0 0 0 2px var(--card),0 0 0 4px var(--ac);border-radius:6px}
/* Reduced motion means fewer and gentler animations, not zero. Colour and
   opacity cost nothing and carry meaning; what goes is movement. */
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;animation-iteration-count:1!important}
  *{transition-property:opacity,background-color,border-color,color,box-shadow!important}
  .plist > *,.ghost,.skel-thumb,.skel-line,.spin{animation:none!important}
}

.rail{padding:var(--s4) var(--s3);display:flex;flex-direction:column;gap:var(--s1);
  position:sticky;top:0;height:100vh;background:var(--rail);border-right:1px solid var(--line)}
.logo{display:flex;align-items:center;gap:var(--s2);padding:var(--s1) var(--s3) var(--s5);
  font:700 19px/1 var(--d);letter-spacing:-.022em}
.logo i{width:28px;height:28px;border-radius:var(--r);background:var(--ac);flex:none}
.rail a{display:flex;align-items:center;padding:var(--s3);border-radius:var(--r);
  color:var(--mut);font-weight:500;text-decoration:none;transition:background .12s,color .12s}
.rail a[aria-current]{background:var(--ac-soft);color:var(--ink);font-weight:600}
@media (hover:hover) and (pointer:fine){.rail a:hover{background:var(--fill);color:var(--ink)}}
.rail .btm{margin-top:auto}

main{min-width:0;padding:var(--s6)}
main.centre{display:grid;place-items:center;min-height:100vh;padding:var(--s5)}
.head{margin-bottom:var(--s5)}
.head p{margin-top:var(--s2);color:var(--mut);max-width:60ch}
.row{display:flex;align-items:center;gap:var(--s3);flex-wrap:wrap}

.card{background:var(--card);border-radius:var(--r-lg);box-shadow:var(--sh1);padding:var(--s5)}
.auth{width:100%;max-width:400px;display:grid;gap:var(--s4)}
.addbar{margin-bottom:var(--s4)}
.addbar .inp{flex:1;min-width:200px}
.plist{display:grid;gap:var(--s4)}
.prod{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--s5);align-items:center}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--s2);
  height:40px;padding:0 var(--s5);border-radius:999px;background:var(--card);color:var(--ink);
  font:600 15px/1 var(--f);letter-spacing:-.011em;border:1px solid var(--line);cursor:pointer;
  text-decoration:none;transition:background var(--dur-press) var(--ease-out),
    border-color var(--dur-press) var(--ease-out),
    transform var(--dur-press) var(--ease-out)}
.btn:active{background:var(--fill2);transform:scale(.97)}
.btn.pri{background:var(--ac);border-color:var(--ac);color:#111114}
.btn.flat{background:transparent;border-color:transparent;color:var(--mut)}
.btn.wide{width:100%}
@media (hover:hover) and (pointer:fine){
  .btn:hover{background:var(--fill);border-color:var(--line2)}
  .btn.pri:hover{background:var(--ac2);border-color:var(--ac2)}
  .btn.flat:hover{background:var(--fill);color:var(--ink)}}

.fl{display:grid;gap:var(--s2)}
.fl > label{font-size:13px;line-height:20px;font-weight:600;color:var(--mut)}
.fl .hint{font-size:13px;line-height:20px;color:var(--mut)}
.inp{width:100%;background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  height:40px;padding:0 var(--s3);font:400 16px/38px var(--f);color:var(--ink);
  transition:border-color .12s,box-shadow .12s}
.inp:focus{outline:0;border-color:var(--ac);box-shadow:0 0 0 3px var(--ac-soft)}

/* an error says what happened, in the user's words, next to its trigger.
   It carries its own bottom margin, like .note does: a banner that leaves
   its spacing to whatever happens to follow it sits flush against the next
   thing the first time it appears somewhere new.

   The spacing is set with margin-block, never the margin shorthand. The
   shorthand writes all four sides, which replaces the margin-inline:auto that
   makes `main > *` a centred column — that left every one of these bars
   hanging 88px to the left of the content it belonged to. Writing `auto` for
   the sides fixes that and breaks something else: an auto side margin centres
   the element when it is a grid item, so the same rule inside a .stack card
   shrank a heading to its text and floated it mid-card. margin-block touches
   neither. */
.error{margin-block:0 var(--s4);background:var(--bad-soft);color:var(--bad);border-radius:var(--r);
  padding:var(--s3) var(--s4);font-size:14px;line-height:20px}
.tag{display:inline-flex;align-items:center;height:28px;padding:0 var(--s3);border-radius:999px;
  background:var(--fill);color:var(--mut);font:500 13px/1 var(--f);letter-spacing:-.006em;white-space:nowrap}

/* day one is designed, not an apology */
.blank{display:grid;justify-items:center;text-align:center;gap:var(--s4);
  padding:var(--s8) var(--s5);background:var(--card);border-radius:var(--r-lg);box-shadow:var(--sh1)}
.blank .shapes{display:flex;gap:var(--s3)}
.blank .shapes i{width:60px;aspect-ratio:9/16;border-radius:var(--r);background:var(--fill2);display:block}
.blank .shapes i:nth-child(1){opacity:.5;transform:rotate(-6deg)}
.blank .shapes i:nth-child(3){opacity:.5;transform:rotate(6deg)}
.blank h2{font-size:22px;letter-spacing:-.018em}
.blank p{color:var(--mut);max-width:44ch}

@media (max-width:860px){
  body{grid-template-columns:1fr;padding-bottom:72px}
  main{padding:var(--s4) var(--s4) var(--s7)}
  /* The rail becomes a bottom bar. Six labels do not divide into 375px, and
     dividing them equally made "Products 2" and "Accounts" overlap and sit on
     top of each other, so the bar scrolls instead of shrinking its items. */
  .rail{position:fixed;inset:auto 0 0 0;height:auto;flex-direction:row;z-index:9;
    padding:var(--s2);gap:var(--s1);border-right:0;border-top:1px solid var(--line);
    overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
  .rail::-webkit-scrollbar{display:none}
  .logo{display:none}
  .rail a,.rail .btm{flex:0 0 auto;white-space:nowrap;justify-content:center}
  .rail .btm{margin-top:0;margin-left:auto}
  .btn,.btn.flat{height:44px}
  .prod{grid-template-columns:1fr}
}

/* ---------- M1 ---------- *//* ---------- M1 ---------- */

/* A measure. Without this the form fields on a wide screen stretch to a
   thousand pixels and the page reads as a spreadsheet. */
main > * { max-width: 960px; margin-inline: auto; }
/* A single-column page — Settings, say — reads better at a form's measure
   than at the page's. Everything in the column shares it, head included, or
   the heading and the fields sit on different axes. */
.narrow { max-width: 540px; margin-inline: auto; }

.row.between { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--s4) }
.stack { display:grid; gap:var(--s4) }
.sect { margin-block:var(--s7) var(--s4) }

/* A quiet line of status above the content it describes. */
.note { margin-block:0 var(--s4); padding:var(--s3) var(--s4); border-radius:var(--r);
  background:var(--fill); color:var(--mut); font-size:14px; line-height:20px }
.note.work { background:var(--ac-soft); color:var(--ac2) }
.note.bad  { background:var(--bad-soft); color:var(--bad) }

.tag.ok   { background:var(--ok-soft);   color:var(--ok) }
.tag.work { background:var(--ac-soft);   color:var(--ac2) }
.tag.bad  { background:var(--bad-soft);  color:var(--bad) }
.tag.wait { background:var(--warn-soft); color:var(--warn) }

.slides { list-style:none; margin:0; padding:0; display:grid; gap:var(--s3) }
.slides li { display:flex; align-items:center; gap:var(--s4);
  padding:var(--s3); border-radius:var(--r-md); background:var(--fill) }
.slides .num { flex:none; width:24px; height:24px; display:grid; place-items:center;
  border-radius:999px; background:var(--ink); color:#111114;
  font-size:13px; font-weight:600;
  /* A fixed-height chip inherits the body line-height and sits the numeral
     off-centre. See docs/design/DESIGN.md. */
  line-height:1 }
.slides .thumb { flex:none; border-radius:var(--r); object-fit:cover;
  background:var(--fill2); box-shadow:0 8px 24px -10px rgba(0,0,0,.75) }
.slidetext { font-weight:600 }
.pre { white-space:pre-wrap }

/* One convention for a labelled field. .fl holds a <label> or a <span>; both
   get the same treatment, so a form never has two kinds of label in it. */
.fl > label, .fl > span { font-size:13px; line-height:20px; font-weight:600; color:var(--mut) }
.fl em { font-style:normal; font-weight:400 }
textarea.inp { height:auto; padding:var(--s3); font:400 16px/24px var(--f); resize:vertical }
select.inp { appearance:none; padding-right:var(--s7);
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236b6964' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat:no-repeat; background-position:right var(--s3) center }

/* A card that is a link is still a card: the whole thing is the target, so
   the words inside it must not be underlined as if they were the link. */
a.card { text-decoration:none; color:inherit;
  transition:box-shadow .12s, transform .08s }
@media (hover:hover) and (pointer:fine) { a.card:hover { box-shadow:0 0 0 1px var(--line2) } }
a.card:active { transform:translateY(1px) }

/* The credential list: one row per provider, read not operated. */
.creds { display:grid; gap:var(--s3); margin-bottom:var(--s5) }
.cred { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:var(--s4);
  align-items:center; padding:var(--s4) var(--s5) }
.cred h2 { font-size:17px }
.cred .meta { margin-top:2px; font-variant-numeric:tabular-nums }

@media (max-width:860px) {
  main > * { max-width:none }
  .slides .thumb { width:72px; height:128px }
}

/* ---------- M2: the editor ---------- */

/* The editor is its own layout: full width, no page measure, because the
   canvas wants every pixel it can get. */
main:has(.ed) > * { max-width: none }
.ed {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 244px minmax(320px, 1fr) 320px;
  grid-template-areas:
    "top    top     top"
    "film   canvas  panel"
    "film   caption panel";
  align-items: start;
}
.ed-top     { grid-area: top; display:flex; align-items:center; justify-content:space-between; gap:var(--s4) }
.ed-film    { grid-area: film; position:sticky; top:var(--s4) }
.ed-canvas  { grid-area: canvas; display:grid; justify-items:center; gap:var(--s3) }
.ed-panel   { grid-area: panel; display:grid; gap:var(--s5); position:sticky; top:var(--s4);
              background:var(--card); border-radius:var(--r-lg); box-shadow:var(--sh1); padding:var(--s5) }
.ed-caption { grid-area: caption; width:100%; max-width:560px }

/* The stage is a 9:16 box; the preview is the real 1080x1920 page scaled
   into it, so what is on screen is the page that gets screenshotted. */
.stage {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--fill2);
  box-shadow: 0 12px 40px rgba(0,0,0,.16), var(--sh1);
}
.stage iframe {
  position: absolute; top: 0; left: 0;
  width: 1080px; height: 1920px;
  border: 0;
  transform-origin: top left;
  /* scale() takes a unitless number, and CSS cannot divide one length by
     another to produce one — calc(360px / 1080) is a length, which makes the
     whole transform invalid and silently renders the slide unscaled, showing
     only its top-left corner. editor.js measures the stage and sets --scale.
     The fallback keeps the slide sensible before that runs. */
  transform: scale(var(--scale, 0.333));
  pointer-events: none;
}
.drag { position:absolute; inset:0; cursor:grab; touch-action:none }
.drag.dragging { cursor:grabbing }
.drag:focus-visible { outline:2px solid var(--ac); outline-offset:-2px }

/* TikTok's own UI covers the bottom and a column on the right. The guides
   show where, as percentages of the stage. */
.guides { position:absolute; inset:0; pointer-events:none }
.guides div { position:absolute; border:1px dashed rgba(255,255,255,.75) }
.g-safe      { left:13.9%; right:13.9%; top:9.4%; bottom:20.8% }
.g-ui-bottom { left:0; right:0; bottom:0; height:19.8%; background:rgba(206,44,49,.16); border:0 }
.g-ui-right  { right:0; top:0; bottom:0; width:13%; background:rgba(206,44,49,.16); border:0 }

.film { list-style:none; margin:0 0 var(--s3); padding:0; display:grid; gap:var(--s2) }
.film-item a { display:grid; grid-template-columns:auto auto minmax(0,1fr); gap:var(--s2);
  align-items:center; padding:var(--s2); border-radius:var(--r-md);
  text-decoration:none; color:inherit; background:var(--card); box-shadow:var(--sh1) }
.film-item.on a { box-shadow:0 0 0 2px var(--ac) }
.film-item.held { opacity:.4 }
.film-item img, .film-blank { border-radius:var(--r-sm); background:var(--fill2); display:block }
.film-blank { width:80px; height:142px }
.film-text { display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical;
  overflow:hidden; color:var(--mut); word-break:break-word }
.film-item .num { width:20px; height:20px; display:grid; place-items:center; border-radius:999px;
  background:var(--fill); font-size:11px; font-weight:600; line-height:1 }

.ed-panel h2 { font-size:15px; letter-spacing:-.011em }
.ed-panel hr { border:0; border-top:1px solid var(--line); margin:0 }
.ed-panel form { display:grid; gap:var(--s3) }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:var(--s3) }
.gap2 { gap:var(--s2) }
.sm-inp { height:34px; font-size:14px }
.fl.inline { display:flex; align-items:center; gap:var(--s2) }

.rng { width:100%; accent-color:var(--ac) }
.inp.col { padding:2px; height:40px; cursor:pointer }
output { font-variant-numeric:tabular-nums }

/* Visually hidden, still read aloud. */
.vh { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap }

@media (max-width:1100px) {
  .ed {
    grid-template-columns: 1fr;
    /* The slide first: on a narrow screen the canvas is the thing you came
       for, and controls above it push it off the fold. */
    grid-template-areas: "top" "canvas" "panel" "film" "caption";
  }
  .ed-film, .ed-panel { position:static }
  .film { grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); display:grid }
}

/* ---------- components from the approved mockup ----------
   These were in docs/design/mockup.html and never made it into the build,
   which is why the screens drifted into the SaaS-card kit that DESIGN.md
   section 7 bans. */

.btn.sm { height: 32px; padding: 0 var(--s4); font-size: 14px; letter-spacing: -.006em }

/* A destructive action reads as one before it is clicked, not after.
   DESIGN.md 3e.1. */
.btn.bad { color: var(--bad); border-color: transparent; background: transparent }
.btn.bad:active { background: var(--bad-soft) }
@media (hover:hover) and (pointer:fine) {
  .btn.bad:hover { background: var(--bad-soft); border-color: var(--bad-soft); color: var(--bad) }
}
.btn[disabled] { background: var(--fill); border-color: var(--line); color: var(--mut); cursor: not-allowed }

/* The primary action gets a moment: a highlight sweeps across it and it pops
   4%. DESIGN.md 3d.4. */
.btn.pri { position: relative; overflow: hidden }
.btn.pri .sweep { position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent) }
.btn.pri.firing .sweep { animation: sweepby .5s cubic-bezier(.3,.7,.3,1) }
.btn.pri.firing { animation: pop .36s cubic-bezier(.2,.7,.3,1) }
@keyframes sweepby { to { transform: translateX(100%) } }
@keyframes pop { 0% { transform: scale(1) } 40% { transform: scale(1.04) } 100% { transform: scale(1) } }

.tag { gap: var(--s2) }
.dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; flex: none }

/* One dealt moment per screen, on load only. DESIGN.md 3d.1. */
@keyframes deal { from { opacity: 0; transform: translateY(10px) scale(.985) } }
.plist > * { animation: deal .42s var(--ease-out) backwards }
.plist > *:nth-child(1) { animation-delay: 0s }
.plist > *:nth-child(2) { animation-delay: .04s }
.plist > *:nth-child(3) { animation-delay: .08s }
.plist > *:nth-child(4) { animation-delay: .12s }
.plist > *:nth-child(5) { animation-delay: .16s }
.plist > *:nth-child(6) { animation-delay: .20s }

/* A connected account is a row with a face on it, its state in a sentence,
   and its actions on the row. DESIGN.md 3c.4. */
.acct { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: var(--s4);
  align-items: center }
.acct .face { width: 48px; height: 48px; border-radius: 999px; object-fit: cover;
  background: var(--fill2); display: grid; place-items: center; flex: none;
  font: 600 18px/1 var(--d); color: var(--mut) }

/* An explanation, not a warning box. Warm, because it is information. */
/* The measure goes on the text, not on the box. The box is a direct child of
   main, so a max-width there centres it inside the column and the bar floats
   away from the edge everything else starts at. */
.note.why { display: flex; gap: var(--s3); background: var(--warn-soft); color: var(--warn);
  border-radius: var(--r-md); padding: var(--s4); font-size: 14px; line-height: 20px }
.note.why > * { max-width: 80ch }

/* The one place you add work invites the click. DESIGN.md 3e.4. */
.empty { text-align: center; padding: var(--s8) var(--s5) }
.empty h2 { margin-bottom: var(--s2) }
.empty p { color: var(--mut); max-width: 44ch; margin: 0 auto var(--s4) }

/* The working state: the shape of what is coming, in the grid the real thing
   will use. DESIGN.md section 6. */
.working .slides li { background: var(--fill) }
.skel-thumb { flex: none; width: 80px; height: 142px; border-radius: var(--r);
  background: var(--fill2) }
.skel-line { display: block; height: 12px; border-radius: 999px; background: var(--fill2);
  margin-bottom: var(--s2) }
.skel-line.short { width: 48% }
.grow { flex: 1; min-width: 0 }
.skel-thumb, .skel-line { animation: shimmer 1.6s ease-in-out infinite }
@keyframes shimmer { 50% { opacity: .5 } }
.spin { width: 14px; height: 14px; border-radius: 999px; flex: none;
  border: 2px solid var(--line2); border-top-color: var(--ac);
  animation: spin .7s linear infinite }
@keyframes spin { to { transform: rotate(360deg) } }
/* Under reduced motion the shimmer and the spinner stop; the words still say
   what is happening. */
@media (prefers-reduced-motion: reduce) {
  .skel-thumb, .skel-line, .spin { animation: none }
}

/* Day one shows the shape of what will appear, not an empty box.
   DESIGN.md section 6. */
.ghosts { display: grid; gap: var(--s2); max-width: 420px; margin: 0 auto var(--s5) }
.ghost { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: var(--s3);
  align-items: center; padding: var(--s3); border-radius: var(--r-md); background: var(--fill) }
.ghost:nth-child(2) { opacity: .5 }
.ghost i { display: block; background: var(--fill2); border-radius: 999px }
.g-face { width: 40px; height: 40px }
.g-line { height: 10px; border-radius: 999px }
.g-pill { width: 64px; height: 20px; border-radius: 999px }

/* The queue. A post waiting on a decision shows its whole deck at a width
   where the slide text can be read; a decided post is a list row. The
   hierarchy comes from the difference between those two, not from varying
   the radius. DESIGN.md 3b.1 and 3b.2. */
.qpost { display: grid; gap: var(--s4) }
.qdeck { display: grid; gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) }
.qsl { position: relative; display: block; aspect-ratio: 9/16; border-radius: var(--r-md);
  overflow: hidden; background: var(--fill2); text-decoration: none;
  box-shadow: 0 10px 28px -12px rgba(0,0,0,.7);
  transition: transform var(--dur-press) var(--ease-out) }
.qsl img { width: 100%; height: 100%; object-fit: cover; display: block }
/* The feedback belongs to the container, never to the photograph inside it:
   an image that moves under the cursor is the tell. */
@media (hover:hover) and (pointer:fine) { .qsl:hover { transform: translateY(-3px) } }
.qsl:active { transform: translateY(0) scale(.98) }
.qsl-text { display: grid; place-items: center; height: 100%; padding: var(--s3);
  text-align: center; font-weight: 600; font-size: 14px; line-height: 18px;
  color: var(--mut) }

/* A count on the rail item it belongs to, so the shape of the workspace is
   visible before clicking anything. From 60fps.design — DESIGN.md 10. */
.rail a .n { margin-left: var(--s2); font-size: 11px; font-weight: 600;
  color: var(--mut); vertical-align: super; line-height: 1 }
.rail a[aria-current] .n { color: var(--ac-2) }

/* The filter row, with the total beside it. */
.filters { display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s4); flex-wrap: wrap }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--s4);
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; letter-spacing: -.006em; color: var(--mut);
  text-decoration: none; line-height: 1;
  transition: background var(--dur-press) var(--ease-out),
              color var(--dur-press) var(--ease-out) }
.chip.on { background: var(--ink); border-color: var(--ink); color: #111114 }
@media (hover:hover) and (pointer:fine) {
  .chip:hover { background: var(--fill); color: var(--ink) }
  .chip.on:hover { background: var(--ink); color: #111114 }
}

/* Structured facts under a product. Labels muted, values in the body weight,
   laid out so the eye can scan down the values. From the approved mockup. */
.pfacts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
  margin: var(--s4) 0 0; font-size: 14px }
.pfacts div { display: flex; align-items: baseline; gap: var(--s2) }
.pfacts dt { color: var(--mut); line-height: 20px }
.pfacts dd { margin: 0; font-weight: 500 }

/* A product shows its recent work rather than describing it. */
.strip { display: flex; gap: var(--s2); flex: none }
/* The width is declared here, not left to the HTML attribute. Inside a flex
   row the attribute is only a starting size: these rendered at 79px, one
   pixel under the floor in DESIGN.md 3b.4, because the row was allowed to
   shrink them. flex:none is what makes the number true. */
.strip img { display: block; flex: none; width: 88px; height: 156px;
  border-radius: var(--r); object-fit: cover;
  background: var(--fill2); box-shadow: 0 8px 24px -10px rgba(0,0,0,.7) }
.strip a { display: block; transition: transform var(--dur-press) var(--ease-out) }
@media (hover:hover) and (pointer:fine) { .strip a:hover { transform: translateY(-2px) } }

/* Two cards stacked straight inside main have nothing between them: the
   gap on .plist does not apply, because these are not in one. */
main > .card + .card, main > .card + form.card, main > form.card + .card {
  margin-top: var(--s5) }

/* A heading that is also a link should not look like body copy with an
   underline under it. */
a.plain { text-decoration: none; color: inherit }
@media (hover:hover) and (pointer:fine) { a.plain:hover { color: var(--ac-2) } }

@media (max-width:860px) { .strip { display: none } }

/* The review screen: the work on the left at a size it can be read, what it
   is on the right. From the approved mockup. */
.review { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--s5);
  align-items: start }
.rcol  { display: grid; gap: var(--s5); min-width: 0 }
.rside { display: grid; gap: var(--s4); position: sticky; top: var(--s4) }
.deck-card { display: grid; gap: var(--s4) }
.deck { display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) }
.dsl { margin: 0; display: grid; gap: var(--s2) }
.dsl img { width: 100%; height: auto; aspect-ratio: 9/16; object-fit: cover;
  border-radius: var(--r-md); background: var(--fill2); display: block;
  box-shadow: 0 10px 28px -12px rgba(0,0,0,.7) }
.dsl-text { display: grid; place-items: center; aspect-ratio: 9/16; padding: var(--s3);
  border-radius: var(--r-md); background: var(--fill); text-align: center;
  font-weight: 600; font-size: 14px; line-height: 18px; color: var(--mut) }
.dsl figcaption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden }

/* A label column and a value column, so the facts line up and the values
   keep a readable measure. */
.brief { margin: var(--s3) 0 0 }
.brief-row { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: var(--s4);
  padding: var(--s3) 0; border-bottom: 1px solid var(--line); align-items: start }
.brief-row:last-child { border-bottom: 0; padding-bottom: 0 }
.brief-row dt { color: var(--mut); font-size: 14px; line-height: 24px }
.brief-row dd { margin: 0; max-width: 62ch }

@media (max-width:1000px) {
  .review { grid-template-columns: 1fr }
  .rside { position: static }
  .brief-row { grid-template-columns: 1fr; gap: var(--s1) }
}

/* The pipeline: one segmented track with a legend beneath that names each
   count. DESIGN.md 3c.3 — this replaces the banned row of figures over
   one-word labels. */
.pipe { margin-block: var(--s5) 0 }
.track { display: flex; height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--fill2) }
.track i { display: block; height: 100% }
.pipekey { display: flex; gap: var(--s5); margin-top: var(--s3); flex-wrap: wrap }
.pipekey span { display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--mut) }
.pipekey b { color: var(--ink); font-weight: 600 }
.pipekey .dot { width: 8px; height: 8px }

/* The post screen. */
.who { display: flex; align-items: center; gap: var(--s3) }
.who .face { width: 40px; height: 40px; border-radius: 999px; background: var(--fill2);
  display: grid; place-items: center; font: 600 16px/1 var(--d); color: var(--mut); flex: none }
.disclose { border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s4); margin: 0; display: grid; gap: var(--s3) }
.disclose legend { padding: 0 var(--s2); color: var(--mut) }
.disclose em { font-style: normal; display: block; margin-top: 2px }
.consent { border-top: 1px solid var(--line); padding-top: var(--s4) }
.consent a { color: var(--ink) }

/* The calendar: a week of the account's own local time. */
.cal { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr));
  gap: 1px; background: var(--line); padding: 1px; overflow: hidden }
.cal > * { background: var(--raise) }
.cal-head { padding: var(--s3); display: grid; gap: 2px; text-align: center }
/* Today is the one column a person looks for first. */
.cal-head.today { background: var(--fill) }
.cal-head.today b::after { content: ""; display: block; height: 2px; width: 18px;
  margin: 3px auto 0; border-radius: 2px; background: var(--ink) }
.cal-cell.istoday { background: var(--card) }
.cal-head b { font-weight: 600; font-size: 14px }
.cal-hour { padding: var(--s3) var(--s2); text-align: right; font-variant-numeric: tabular-nums }
.cal-cell { min-height: 64px; padding: var(--s2); display: grid; gap: var(--s2);
  align-content: start; transition: background var(--dur-press) var(--ease-out) }
.cal-cell.over { background: var(--fill) }
.cal-post { display: grid; gap: 2px; padding: var(--s2); border-radius: var(--r);
  background: var(--fill); cursor: grab; touch-action: none;
  grid-template-areas: "dot when" "hook hook" "who who" }
.cal-post .dot { grid-area: dot; width: 7px; height: 7px; align-self: center;
  background: var(--mut) }
.cal-post.scheduled .dot { background: #5d7fb8 }
.cal-post.publishing .dot { background: var(--warn) }
.cal-post.published .dot { background: var(--ok) }
.cal-post.failed .dot { background: var(--bad) }
.cal-post .cal-when { grid-area: when; font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums }
.cal-post .cal-hook { grid-area: hook; font-size: 13px; line-height: 17px; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.cal-post > .sm { grid-area: who }
.cal-post.dragging { opacity: .4; cursor: grabbing }

@media (max-width: 900px) {
  /* Seven narrow columns are unreadable, so the week scrolls sideways with
     the hour column pinned rather than hiding days the user came to see. */
  .cal { grid-template-columns: 56px repeat(7, 118px); overflow-x: auto }
  .cal-hour { position: sticky; left: 0; z-index: 1; background: var(--raise) }
}

/* When an account posts. Part of the account card rather than a screen of its
   own: "when does this post" is part of what an account is. */
.when { grid-column: 1 / -1; border-top: 1px solid var(--line);
  padding-top: var(--s4); margin-top: var(--s2); display: grid; gap: var(--s3) }
.when h3 { font: 600 14px/20px var(--d); color: var(--ink) }
.slots { display: grid; gap: 1px; background: var(--line); border-radius: var(--r);
  overflow: hidden; list-style: none }
.slots li { display: grid; grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center; gap: var(--s3); padding: var(--s2) var(--s3);
  background: var(--fill); font-size: 14px }
/* Two short forms, side by side where there is room. They use the project's
   one labelled-field convention (.fl + .inp), not a second one of their own. */
.slotform { flex-wrap: wrap; align-items: end; gap: var(--s3) }
.slotform .fl { display: grid; gap: var(--s1) }
.slotform .inp { min-width: 9rem }
.slotform + .slotform { padding-top: var(--s3); border-top: 1px dashed var(--line) }

/* main > * is a centred 960px column, so a direct child with a narrower
   max-width centres itself inside it instead of starting at the column's
   left edge. The width belongs on the paragraph, not on the child. */
.cal-hint { margin-top: var(--s3) }
.cal-hint p { max-width: 56ch }

/* The drag's status line. Empty for most of the page's life, so it takes up
   no room at all until it has something to say. */
#cal-msg { margin: 0 0 var(--s3) }
#cal-msg:empty { display: none }

/* ---------- M5: trends ---------- */

/* A pattern and the one action on it: throw it away. DESIGN.md 3c.4 — the
   action belongs on the row, not in a toolbar above the list. */
.trend { display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s4); align-items: start }
.trend h3 { margin-top: var(--s2); font: 600 17px/24px var(--d); color: var(--ink) }
.trend p { margin-top: var(--s1); max-width: 70ch }
/* The example is the model's own writing, so it is set apart from the
   description of the pattern rather than reading as more of it. */
.trend .eg { color: var(--ink); font-style: italic }

/* Spent, not hidden. The research going stale is information: a screen that
   silently drops expired items looks like a screen with nothing on it. */
.trend.spent { opacity: .55 }
.trend.spent h3 { color: var(--mut) }

/* A file input is the one control a browser will not let you restyle, so the
   button inside it is styled instead and the field around it is made to match
   everything else. DESIGN.md 3e: one control appearance, not two. */
input[type="file"].inp { padding: var(--s2); cursor: pointer;
  font: 400 14px/20px var(--f); color: var(--mut) }
input[type="file"].inp::file-selector-button {
  margin-right: var(--s3); padding: 0 var(--s4); height: 32px;
  border: 0; border-radius: var(--r); cursor: pointer;
  background: var(--fill2); color: var(--ink);
  font: 600 13px/32px var(--f); letter-spacing: -.006em;
  transition: background var(--dur-press) var(--ease-out) }
@media (hover:hover) and (pointer:fine) {
  input[type="file"].inp::file-selector-button:hover { background: var(--line2) }
}

.urows { display: grid; gap: 1px; background: var(--line); padding: 1px }
.urow { display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); padding: var(--s3) var(--s4); background: var(--card) }

@media (max-width: 720px) {
  .trend { grid-template-columns: 1fr }
}

/* ---------- M6: the approval queue ---------- */

/* One post, one screen, built for a phone first. The deck is the page: the
   person approving is looking at the work, not at a form about the work. */
/* The measure goes on the text, not on the article: .appr is a direct child
   of main, and a max-width there centres it in the column. The deck is left
   full width on purpose — it scrolls. */
.appr { display: grid; gap: var(--s5) }
.appr h2, .appr .caption, .appr .decide { max-width: 640px }
.appr h2 { font: 600 24px/30px var(--d); color: var(--ink); letter-spacing: -.018em }
.appr .deck { display: flex; gap: var(--s3); overflow-x: auto; padding-bottom: var(--s2);
  scroll-snap-type: x mandatory; scrollbar-width: none }
.appr .deck::-webkit-scrollbar { display: none }
.appr .deck img, .appr .deck .qsl-text { flex: none; width: 270px; height: 480px;
  border-radius: var(--r-md); object-fit: cover; scroll-snap-align: start;
  background: var(--fill2) }
.appr .deck .qsl-text { display: grid; place-items: center; padding: var(--s5);
  text-align: center; font: 600 17px/24px var(--d); color: var(--ink) }
.appr .caption p { color: var(--mut); font-size: 15px; line-height: 23px; max-width: 60ch }

/* The two decisions, with the destructive one already red. */
.decide { display: flex; align-items: start; gap: var(--s3); flex-wrap: wrap }
.decide .btn.big { height: 52px; padding: 0 var(--s6); font-size: 16px }
.why summary { list-style: none; cursor: pointer; display: inline-flex }
.why summary::-webkit-details-marker { display: none }
.why .reasons { display: grid; gap: var(--s2); margin-top: var(--s3);
  padding: var(--s3); border-radius: var(--r-md); background: var(--raise);
  box-shadow: var(--sh1) }
.why .reasons .btn { justify-content: flex-start; width: 100% }

@media (max-width: 720px) {
  /* The decision sits where a thumb is, and the primary action is full width
     because it is the one being asked for. */
  .decide { flex-direction: column-reverse; align-items: stretch }
  .decide form, .decide .btn { width: 100% }
  .appr .deck img, .appr .deck .qsl-text { width: 78vw; height: calc(78vw * 16 / 9) }
}

/* A switch, for the one setting that is genuinely on or off. Everything else
   in this app is a select, because most settings are not binary. */
.sw { display: inline-flex; align-items: center; cursor: pointer }
.sw input { position: absolute; opacity: 0; width: 0; height: 0 }
.sw .track { width: 44px; height: 26px; border-radius: 999px; background: var(--fill2);
  display: block; position: relative;
  transition: background var(--dur-press) var(--ease-out) }
.sw .track i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 999px; background: var(--mut); display: block;
  transition: transform var(--dur-press) var(--ease-out),
              background var(--dur-press) var(--ease-out) }
.sw input:checked + .track { background: var(--ok-soft) }
.sw input:checked + .track i { transform: translateX(18px); background: var(--ok) }
.sw input:focus-visible + .track { outline: 2px solid var(--ac); outline-offset: 2px }
@media (prefers-reduced-motion: reduce) {
  .sw .track, .sw .track i { transition-duration: 1ms }
}
