/*
 * Design tokens as CSS custom properties.
 * Mirrors docs/design-language/tokens.md and tailwind.config.js.
 *
 * Aligned with the ShootBuddy / One-Liner design system. The only deliberate
 * divergence is --color-header-bg (black for Image Approvals).
 */

:root {
  /* Brand red scale */
  --color-brand-50:  #FFF1F1;
  --color-brand-100: #FFE0E0;
  --color-brand-200: #FFC5C5;
  --color-brand-300: #FF9B9B;
  --color-brand-400: #E04545;
  --color-brand-500: #c00000;
  --color-brand-600: #9a0000;
  --color-brand-700: #800000;
  --color-brand-800: #660000;
  --color-brand-900: #500000;

  --color-primary:       var(--color-brand-500);
  --color-primary-light: #d42a2a;
  --color-primary-dark:  var(--color-brand-600);

  /* Neutrals (Tailwind gray) */
  --color-gray-50:  #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Surfaces */
  --color-bg:               #FAFAFA;
  --color-surface:          #FFFFFF;
  --color-surface-elevated: #FFFFFF;
  --color-dark-base:        #111827;
  --color-dark-elevated:    #1F2937;
  --color-header-bg:        #000000; /* divergence from ShootBuddy */
  /* A subtly recessed band inside a card (gray-900 at 4 %): an overlay, not a
     solid, so it reads one step darker on white AND on a tinted card (the
     green approved day) alike. gray-50 would vanish against --color-bg. */
  --color-surface-sunken:   rgba(17, 24, 39, 0.04);

  /* Text */
  --color-text:           var(--color-gray-900);
  --color-text-secondary: var(--color-gray-600);
  /* gray-500, not gray-400: meta text must meet WCAG AA 4.5:1 on white and on
     --color-bg (gray-400 measured 2.5:1 and 2.4:1 — axe colour-contrast, 2026-11-07). */
  --color-text-tertiary:  var(--color-gray-500);
  --color-text-inverse:   #FFFFFF;

  /* Borders */
  --color-border:         var(--color-gray-200);
  --color-border-subtle:  var(--color-gray-100);
  --color-border-focus:   var(--color-brand-500);

  /* Categorical palette — for charts, tags, calendar pills, owner/production
     identity. NEVER for actions, links, focus, or anything decision-bearing
     (those belong to brand red). Each hue ships three steps: 100 = tinted bg,
     500 = solid dot/fill, 700 = readable text on the 100 tint. */
  --color-cat-indigo-100: #E0E7FF;
  --color-cat-indigo-500: #4F46E5;
  --color-cat-indigo-700: #3730A3;
  --color-cat-teal-100:   #CCFBF1;
  --color-cat-teal-500:   #0D9488;
  --color-cat-teal-700:   #115E59;
  --color-cat-amber-100:  #FEF3C7;
  --color-cat-amber-500:  #D97706;
  --color-cat-amber-700:  #92400E;
  --color-cat-violet-100: #EDE9FE;
  --color-cat-violet-500: #7C3AED;
  --color-cat-violet-700: #5B21B6;
  --color-cat-pink-100:   #FCE7F3;
  --color-cat-pink-500:   #DB2777;
  --color-cat-pink-700:   #9D174D;
  --color-cat-slate-100:  #E2E8F0;
  --color-cat-slate-500:  #475569;
  --color-cat-slate-700:  #1E293B;
  /* Rose completes the categorical set with a red identity hue. It is NOT
     brand red (#C00000) and must never stand in for it: brand red marks
     decisions (buttons, links, focus), rose only identifies a category —
     here the admin / reseller persona. Kept off the brand hue deliberately
     so a rose tag can never be mistaken for something clickable. */
  --color-cat-rose-100:   #FEE2E2;
  --color-cat-rose-500:   #DC2626;
  --color-cat-rose-700:   #991B1B;

  /* Semantic */
  --color-success:    #059669;
  --color-success-bg: #ECFDF5;
  /* Success one step darker (emerald-700) for success TEXT and small marks:
     5.5:1 on white, 5.2:1 on --color-success-bg. --color-success (#059669) is
     ~3.8:1 on white, too low for small text. */
  --color-success-ink: #047857;
  --color-warning:    #B45309;
  --color-warning-bg: #FFFBEB;
  --color-error:      #c00000;
  --color-error-bg:   #FEF2F2;
  --color-info:       #2563EB;
  --color-info-bg:    #EFF6FF;

  /* Select — the one colour that means "selected / a select" (the ★ on tiles,
     the starred Select button, selects chips, select figures). Owner
     2026-11-15: selects are YELLOW, not orange, and never read as an amber
     warning. This is NOT cat.amber (identity) and NOT --color-warning.
     - select:        bright yellow (yellow-400, hue 48°). Fills and stars on
                      dark surfaces and photos (11.6:1 on gray-900); dot fills
                      with a gray-900 glyph (12:1).
     - select-strong: a deeper yellow (yellow-500, hue 45°) for star fills on
                      WHITE surfaces. Yellow cannot reach 3:1 on white without
                      turning olive or orange (1.9:1), so a star on white is
                      always drawn with a select-edge outline.
     - select-edge:   the thin gold outline round a yellow star / swatch on a
                      light surface (4.9:1 on white, so the shape clears the
                      3:1 non-text minimum while the fill stays yellow).
     - select-tint:   pale yellow chip / aside background (yellow-100).
     - select-ink:    text on select-tint or on white (yellow-900; 8.1:1 on the
                      tint, 8.7:1 on white). */
  --color-select:        #FACC15;
  --color-select-strong: #EAB308;
  --color-select-edge:   #A16207;
  --color-select-tint:   #FEF9C3;
  --color-select-ink:    #713F12;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Spacing (4px grid) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  8px;
  --radius-xl:  12px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.06), 0 10px 10px rgba(0,0,0,0.03);
  --shadow-focus:       0 0 0 3px rgba(192, 0, 0, 0.15);
  --shadow-focus-error: 0 0 0 3px rgba(220, 38, 38, 0.15);

  /* Motion */
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:  75ms;
  --duration-base:  150ms;
  --duration-slow:  300ms;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
  }
}
/*
 * Base layer: body defaults, focus rings.
 * Designed to live inside `@layer base { … }` once Tailwind is wired up.
 *
 * Inter is loaded from Google Fonts in the base Jinja layout:
 *   <link rel="preconnect" href="https://fonts.googleapis.com">
 *   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 *   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
 */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  line-height: 1.5;
  font-size: 0.875rem; /* 14px default body */
}

h1, h2, h3, h4 {
  color: var(--color-text);
  margin: 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease);
}
/* Exclude `.btn` (including anchor-styled buttons `<a class="btn ...">`) from
 * link hover styling. Otherwise `a:hover` (specificity 0,1,1) overrides a
 * button variant's base text colour (e.g. `.btn-primary` at 0,1,0), so a
 * `.btn-primary` anchor gets dark-red text on its dark-red hover background —
 * invisible — plus an unwanted underline. Buttons own their hover appearance. */
a:not(.btn):hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Tabular figures for any number that lives in a stat / table cell. */
.tabular-nums,
.stat__value,
.table td,
.table th {
  font-variant-numeric: tabular-nums;
}

/* Accessible focus ring on every interactive element. */
:where(button, a, input, textarea, select, [role="button"], [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-md);
}

::selection {
  background: var(--color-brand-50);
  color: var(--color-gray-900);
}

/* Skip-to-content link — visually hidden until keyboard-focused. */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(-150%);
  transition: transform 120ms var(--ease, ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.\!m-0{margin:0!important}.m-0{margin:0}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-24{margin-bottom:6rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.\!hidden{display:none!important}.hidden{display:none}.\!h-screen{height:100vh!important}.h-5{height:1.25rem}.max-h-40{max-height:10rem}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-4{width:1rem}.w-40{width:10rem}.w-\[5\.5rem\]{width:5.5rem}.w-\[6\.5rem\]{width:6.5rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[180px\]{min-width:180px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[18ch\]{max-width:18ch}.max-w-\[22rem\]{max-width:22rem}.max-w-\[64ch\]{max-width:64ch}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-screen-2xl{max-width:1536px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity,1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:6px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.border{border-width:1px}.border-0{border-width:0}.\!border-b-0{border-bottom-width:0!important}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-4{border-bottom-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(192 0 0/var(--tw-border-opacity,1))}.border-white\/10{border-color:hsla(0,0%,100%,.1)}.border-white\/25{border-color:hsla(0,0%,100%,.25)}.bg-dark-base{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-1{padding:.25rem!important}.p-0{padding:0}.p-3{padding:.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-2\.5{padding-bottom:.625rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pr-1{padding-right:.25rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:JetBrains Mono,Fira Code,Consolas,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.5}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-\[1\.05\]{line-height:1.05}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.18em\]{letter-spacing:.18em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-brand-300{--tw-text-opacity:1;color:rgb(255 155 155/var(--tw-text-opacity,1))}.text-error{--tw-text-opacity:1;color:rgb(192 0 0/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(192 0 0/var(--tw-text-opacity,1))}.text-success{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/60{color:hsla(0,0%,100%,.6)}.text-white\/70{color:hsla(0,0%,100%,.7)}.text-white\/80{color:hsla(0,0%,100%,.8)}.text-white\/90{color:hsla(0,0%,100%,.9)}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.accent-\[var\(--color-primary\)\]{accent-color:var(--color-primary)}.shadow-sm{--tw-shadow:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);--tw-shadow-colored:0 1px 3px var(--tw-shadow-color),0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.first\:pt-0:first-child{padding-top:0}.last\:pb-0:last-child{padding-bottom:0}.empty\:hidden:empty{display:none}.hover\:text-primary:hover{--tw-text-opacity:1;color:rgb(192 0 0/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[120px_1fr\]{grid-template-columns:120px 1fr}.sm\:grid-cols-\[minmax\(0\2c 1fr\)_7rem\]{grid-template-columns:minmax(0,1fr) 7rem}}@media (min-width:768px){.md\:col-span-1{grid-column:span 1/span 1}.md\:col-span-2{grid-column:span 2/span 2}.md\:table-cell{display:table-cell}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[11rem_1fr\]{grid-template-columns:11rem 1fr}.md\:whitespace-nowrap{white-space:nowrap}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-8{padding-top:2rem;padding-bottom:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-6xl{font-size:3.75rem;line-height:1}}@media (min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_19rem\]{grid-template-columns:minmax(0,1fr) 19rem}}@media (min-width:1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}/*
 * Component recipes. Designed to live inside `@layer components { … }`.
 *
 * Aligned with the ShootBuddy / One-Liner design system. The recipe names
 * (`.btn`, `.btn-primary`, `.card`, `.stat-row`, `.status-badge`,
 * `.meatball`, `.app-header`) match across both projects so people moving
 * between codebases see the same vocabulary.
 *
 * The only deliberate visual divergence is `.app-header` — Image Approvals
 * keeps a black header background. See docs/design-language/README.md.
 */

/* ---------- Layout ---------- */

.page {
  max-width: 80rem; /* 1280px */
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) { .page { padding-inline: var(--space-6); } }
@media (min-width: 1024px) { .page { padding-inline: var(--space-8); } }

.page--narrow { max-width: 64rem; /* 1024px */ }

/* ---------- App header (black variant) ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: var(--color-header-bg);
  color: var(--color-text-inverse);
  border-bottom: 1px solid #000;
}
.app-header__inner {
  max-width: 80rem;
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.app-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.app-header__divider {
  width: 1px;
  height: 28px;
  background: var(--color-gray-600); /* visible on black */
  margin: 0 var(--space-2);
}

/* Hamburger trigger — sits as an enclosed square cell at the start of the
   header, with full-height side borders so it reads as its own boundary. */
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}
.hamburger:hover { background: rgba(255,255,255,0.08); }
.hamburger svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.25; }

/* Header nav links — white on black, brand-red active underline. */
.nav-item {
  display: inline-flex;
  align-items: center;
  height: 64px;
  padding: 0 var(--space-4);
  color: var(--color-gray-300);
  font-weight: 500;
  font-size: 0.875rem;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-base) var(--ease),
              border-color var(--duration-base) var(--ease);
}
.nav-item:hover { color: #fff; text-decoration: none; }
.nav-item.is-active { color: #fff; border-bottom-color: var(--color-primary); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--duration-base) var(--ease),
              border-color var(--duration-base) var(--ease),
              color var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn--sm { height: 32px; padding: 0 16px; font-size: 0.8rem; border-radius: var(--radius-md); box-shadow: none; }
.btn--lg { padding: 12px 20px; font-size: 1rem; }
.btn--block { width: 100%; min-width: 0; }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--color-primary-dark); }

.btn-secondary {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border-color: var(--color-gray-200);
  font-weight: 500;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--color-gray-200);
  border-color: var(--color-gray-300);
}

.btn-danger {
  background: #fff;
  color: var(--color-error);
  border-color: var(--color-gray-200);
}
.btn-danger:hover:not(:disabled) {
  background: var(--color-error-bg);
  border-color: var(--color-brand-200);
}

.btn-ghost {
  background: transparent;
  color: var(--color-gray-700);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) { background: var(--color-gray-100); color: var(--color-gray-900); }

/* Button on an already-tinted surface — a persona-group heading, a coloured
   callout. It takes NO colour of its own: the background stays transparent so
   the surface tint shows through, and the label, border and icon all inherit
   the surface's own text colour. That is what keeps one rule working for
   every hue — add a persona colour and the button follows it for free, with
   no per-hue button variant to forget.

   Icons must be drawn with `stroke="currentColor"` (all our SVGs are) so they
   inherit too. */
.btn--on-tint {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  box-shadow: none;
  font-weight: 600;
}
/* Softened so the outline reads as a border, not a second label. Declared
   after the solid fallback above, so a browser without color-mix keeps the
   full-strength currentColor border rather than losing it entirely. */
.btn--on-tint { border-color: color-mix(in srgb, currentColor 40%, transparent); }
.btn--on-tint:hover:not(:disabled) {
  background: color-mix(in srgb, currentColor 12%, transparent);
  border-color: currentColor;
}

/* ---------- Card ---------- */

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-base) var(--ease),
              border-color var(--duration-base) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.card__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-3);
  margin-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Stat row (segmented) ---------- */

.stat-row {
  display: flex;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-4) 0;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-2);
  text-align: center;
  border-left: 1px solid var(--color-border-subtle);
  transition: background-color var(--duration-base) var(--ease);
}
.stat:first-child { border-left: 0; }
.stat:hover { background: var(--color-gray-50); }
.stat__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
}
.stat__label {
  margin-top: 2px;
  font-size: 0.65rem;
  font-weight: 500;
  /* text-secondary, not tertiary: gray-400 on white is 2.5:1 at 10px (WCAG 1.4.3). */
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Status badges (outlined pills) ---------- */

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}
/* Badge text one step darker than the tone token: the 10.4px label must reach
   4.5:1 on its tinted background (WCAG 1.4.3); #059669 on #ECFDF5 is 3.6:1. */
.status-badge--success { background: var(--color-success-bg); color: var(--color-success-ink); border-color: #A7F3D0; }
.status-badge--warning { background: var(--color-warning-bg); color: #92400E; border-color: #FDE68A; }
.status-badge--error   { background: var(--color-error-bg);   color: #B91C1C;   border-color: #FECACA; }
.status-badge--info    { background: var(--color-info-bg);    color: #1D4ED8;    border-color: #BFDBFE; }
/* An image's select state (owner 2026-11-15: select = yellow, never amber /
   warning): select ink on the select tint is ~8:1. */
.status-badge--select  { background: var(--color-select-tint); color: var(--color-select-ink); border-color: #FDE047; }
/* Small badge (2026-11-15): 18 px tall, 11 px sentence-case text — for dense,
   non-interactive read-outs (the sideways split cast card's days pill and
   access badges). Never below 11 px. */
.status-badge.status-badge--sm { height: 18px; padding: 0 6px; font-size: 0.6875rem; text-transform: none; letter-spacing: 0; }

/* ---------- Switch (toggle) ----------
   Binary on/off control. Use for "is this thing active" — feature flags,
   enable/disable, per-row toggles. NOT a substitute for a destructive
   confirm (that's still .modal) and NOT a substitute for a multi-option
   choice (that's a segmented control or select).
   Markup pattern:
     <label class="switch">
       <input type="checkbox" class="switch__input" checked>
       <span class="switch__track"><span class="switch__thumb"></span></span>
       <span class="switch__label">On</span>
     </label>
   For server-driven toggles (no JS), wrap the label inside a <form> that
   submits on change — see admin/workers/index.html. */
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.switch__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.switch__track {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--color-gray-300);
  border-radius: var(--radius-full);
  transition: background-color var(--duration-base) var(--ease);
  flex-shrink: 0;
}
.switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: transform var(--duration-base) var(--ease);
}
.switch__input:checked + .switch__track {
  background: var(--color-primary);
}
.switch__input:checked + .switch__track .switch__thumb {
  transform: translateX(16px);
}
.switch__input:focus-visible + .switch__track {
  box-shadow: 0 0 0 3px rgba(192,0,0,0.15);
}
.switch__input:disabled + .switch__track {
  opacity: 0.5;
  cursor: not-allowed;
}
.switch:has(.switch__input:disabled) {
  cursor: not-allowed;
  color: var(--color-text-tertiary);
}
.switch__label { white-space: nowrap; }
/* A long label wraps beside the track instead of running off a phone screen. */
.switch--wrap { align-items: flex-start; }
.switch--wrap .switch__label { white-space: normal; }
.switch--wrap .switch__track { flex: none; margin-top: 1px; }
/* Compact variant for table cells. */
.switch--sm .switch__track { width: 28px; height: 16px; }
.switch--sm .switch__thumb { width: 12px; height: 12px; }
.switch--sm .switch__input:checked + .switch__track .switch__thumb {
  transform: translateX(12px);
}

/* `.setting-pair` (owner 2026-11-15, talent Settings "Reviewing images"): two
   switch settings, each a `.setting-pair__item` holding a `.switch.switch--wrap`
   and its `.setting-pair__help` description (linked with aria-describedby).
   The switch label is the action — semibold, primary text, 15 px — and the
   description sits under it, aligned with the label text, muted. Stacked on a
   phone held upright; side by side in two equal halves on a desktop / tablet
   (≥ 640 px) and on a phone held sideways, tops aligned, a hairline divider in
   the gutter. A lone item keeps the full width. */
.setting-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.setting-pair__item { min-width: 0; }
.setting-pair__item > .switch { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--color-text); }
.setting-pair__item > .switch--wrap .switch__track { margin-top: 1px; }
.setting-pair__help {
  margin: var(--space-1) 0 0; padding-left: calc(36px + var(--space-2));
  max-width: 60ch; font-size: 0.8125rem; line-height: 1.5; color: var(--color-text-secondary);
}
@media (min-width: 640px), (orientation: landscape) and (max-height: 500px) {
  .setting-pair { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: start; gap: 0; }
  .setting-pair__item:not(:last-child) { padding-right: var(--space-6); }
  .setting-pair__item + .setting-pair__item {
    padding-left: var(--space-6); border-left: 1px solid var(--color-border);
    align-self: stretch;
  }
}

/* ---------- Meatball menu (card overflow) ---------- */

.meatball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease),
              color var(--duration-base) var(--ease);
}
.meatball:hover { background: var(--color-gray-100); color: var(--color-gray-700); }
.meatball svg { width: 16px; height: 16px; }

.menu {
  min-width: 170px;
  padding: var(--space-1);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-gray-700);
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
}
.menu__item:hover { background: var(--color-gray-50); color: var(--color-gray-900); }
.menu__item--danger { color: var(--color-error); }
.menu__divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--space-1) 0;
  border: 0;
}

/* Promoted row action(s) sitting beside the overflow menu. Keeps the button
   and the ⋯ trigger on one line and vertically centred, and stops the pair
   wrapping when the cell narrows. Use sparingly — one promoted action per
   row at most, everything else belongs in the menu. */
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

/* Row overflow (meatball) menu positioning. The trigger + panel live in a
   .row-menu-wrap so the .menu drops below the ⋯ button, right-aligned. The
   panel starts [hidden]; app/static/js/admin.js (or the small per-page toggle)
   removes [hidden] on open. */
.row-menu-wrap { position: relative; display: inline-block; text-align: left; }
.row-menu-wrap .menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 30;
  min-width: 180px;
}
/* These are the closed-state defaults. On open, admin.js switches the panel to
   `position: fixed` and positions it against the viewport, because a row menu
   inside `.table-scroll` (a scroll container) or `.accordion`
   (overflow: hidden) would otherwise be clipped — the last row loses its
   bottom items. The inline styles are cleared on close. */
.menu a.menu__item,
.menu button.menu__item { width: 100%; text-decoration: none; }
.menu__item svg { width: 14px; height: 14px; flex: none; opacity: 0.7; }

/* ---------- Checkbox picker (searchable multi-select) ----------
   A usable replacement for a native <select multiple>: a search box over a
   scrollable list of checkbox rows. Used for the user↔productions assignment. */
.check-list__search { margin-top: var(--space-2); }
.check-list__items {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
  margin-top: var(--space-2);
}
.check-list__empty { padding: var(--space-3); font-size: 0.8125rem; color: var(--color-text-tertiary); }
.check-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.3;
}
.check-row:hover { background: var(--color-gray-50); }
.check-row input { flex: none; margin: 0; }

/* Type-ahead user picker (reuses .menu for the results dropdown). */
.user-picker { position: relative; }
.user-picker__results {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
}
.user-picker__results .menu__item { width: 100%; cursor: pointer; }
.user-picker__results .menu__item--empty { color: var(--color-text-tertiary); cursor: default; }

/* ---------- Progress bar ---------- */

.progress {
  height: 4px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: var(--color-primary);
  transition: width var(--duration-slow) var(--ease);
}
.progress--complete .progress__fill { background: var(--color-success); }

/* ---------- Form fields ---------- */

/* `display: flex` here outranks the UA `[hidden] { display: none }` rule, so
   a field hidden with the `hidden` attribute would still render. Same
   per-component patch as `.modal-overlay[hidden]` / `.filter-popover-wrap[hidden]`. */
.field[hidden] { display: none; }
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-5);
}
.field__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.input,
.field__input,
.field__textarea,
.field__select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
}
.field__textarea { min-height: 96px; }
.input:hover,
.field__input:hover { border-color: var(--color-gray-400); }
.input:focus,
.field__input:focus,
.field__textarea:focus,
.field__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.input::placeholder,
.field__input::placeholder { color: var(--color-text-tertiary); }
.input:disabled { background: var(--color-gray-50); color: var(--color-text-tertiary); cursor: not-allowed; }
.field__help  { font-size: 0.75rem; color: var(--color-text-tertiary); }
.field__error { font-size: 0.75rem; color: var(--color-error); }

/* Tick-box field (2026-11-17, sign-in Terms) — ONE checkbox with a sentence
   label that may hold a link. A real <input type="checkbox"> with its own id,
   a <label for> naming it, and `.field__error` underneath tied to the input by
   aria-describedby. Brand red tick via accent-color; 44 px row on touch. */
.field-check { display: flex; flex-direction: column; gap: var(--space-1); }
.field-check__row { display: flex; align-items: flex-start; gap: var(--space-2); }
.field-check__input {
  -webkit-appearance: checkbox; appearance: auto;
  width: 18px; height: 18px; margin: 1px 0 0; flex: none;
  accent-color: var(--color-primary); cursor: pointer;
}
.field-check__input:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.field-check__input[aria-invalid="true"] { outline: 2px solid var(--color-error); outline-offset: 2px; }
.field-check__label { font-size: 0.875rem; line-height: 1.45; color: var(--color-text-primary); cursor: pointer; }
@media (pointer: coarse) {
  .field-check__row { min-height: 44px; align-items: center; }
  .field-check__input { width: 22px; height: 22px; margin: 0; }
}

/* Input with a trailing control — the password "Show password" toggle.
   `.field__control` wraps the input; `.field__reveal` is a real <button>
   with `aria-pressed` (the accessible name stays "Show password"; the
   pressed state says whether it is showing). Brand red when pressed. */
.field__control { position: relative; display: block; }
.field__control .field__input { padding-right: 2.75rem; }
.field__reveal {
  position: absolute;
  top: 50%;
  right: 0.25rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius-md);
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: color var(--duration-base) var(--ease);
}
.field__reveal:hover { color: var(--color-text); }
.field__reveal:focus-visible { outline: none; box-shadow: var(--shadow-focus); color: var(--color-text); }
.field__reveal[aria-pressed="true"] { color: var(--color-primary); }
.field__reveal svg { width: 18px; height: 18px; }

/* Locked (read-only) field (owner 2026-11-19, Settings "Your details") — a
   value the person can see and copy but never change (someone else manages
   it). Sunken fill, dashed border, no hover change, and a padlock at the
   trailing edge (`.field__lock`, inside `.field__control`) so it never looks
   like an input waiting to be typed in. Say who can change it in
   `.field__help`. Not `disabled`: the value stays focusable and copyable. */
.field__input[readonly] {
  background: var(--color-surface-sunken);
  color: var(--color-text-secondary);
  border-style: dashed;
  cursor: default;
}
.field__input[readonly]:hover { border-color: var(--color-gray-300); }
.field__lock {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  pointer-events: none;
}

/* ---------- Inline alerts / notice boxes ----------
   Rule: put the text directly on the alert container — never wrap in <p>. */

.alert {
  display: block;
  padding: 10px 12px;
  font-size: 0.875rem;
  border: 1px solid;
  border-radius: var(--radius-lg);
}
.alert--warning { background: var(--color-warning-bg); border-color: #FDE68A; color: #92400E; }
.alert--info    { background: var(--color-info-bg);    border-color: #BFDBFE; color: #1D4ED8; }
.alert--success { background: var(--color-success-bg); border-color: #A7F3D0; color: var(--color-success-ink); }
.alert--error   { background: var(--color-error-bg);   border-color: #FECACA; color: var(--color-error); }
/* Dismissible variant — flash messages with a close button (wired by admin.js
   via data-dismiss-alert). Base .alert stays block so plain alerts are unaffected. */
.alert--dismissible { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
/* Owner 2026-11-19: the × is ALWAYS pinned to the top-right corner, whatever
   the alert's own layout (flex row, `.alert--note` grid, a centred
   `.lightbox__look`), and the alert keeps room for it on the right. */
.alert--dismissible { position: relative; padding-right: 40px; }
.alert--dismissible > .alert__close { position: absolute; top: 8px; right: 8px; margin: 0; }
.alert__close {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin: -1px -2px 0 0; padding: 0;
  color: inherit; background: transparent; border: 0; border-radius: var(--radius-sm);
  opacity: 0.6; cursor: pointer;
}
.alert__close:hover { opacity: 1; }
/* Explainer note (2026-11-15, `.alert--note` on an `.alert--info`): a short
   "what does this mean" note — a leading icon (`.alert__icon`) | the body.
   The body holds a bold `.alert__title` and the sentence; on a full note the
   title sits on its own line, on a compact note (`.alert--compact`: 13 px
   text, 8 / 12 px padding, for repeat-visit pages) it runs into the sentence
   so the note stays one or two lines. A dismissible note closes with the
   `.alert__close` × pinned top right (owner 2026-11-19; it used an inline
   "Got it" `.alert__action`, still available for other uses, whose 44 px
   touch target is an invisible ::after). Never decision-bearing: dismissing
   only hides it. */
.alert--note {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start;
  column-gap: var(--space-2); line-height: 1.45;
}
.alert__icon { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.alert__title { font-weight: 700; }
.alert--note:not(.alert--compact) .alert__title { display: block; margin-bottom: 2px; }
.alert__action {
  position: relative; display: inline; padding: 0 2px; margin: 0;
  font: inherit; font-weight: 600; color: inherit; white-space: nowrap;
  background: transparent; border: 0; border-radius: var(--radius-sm);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.alert__action:hover { text-decoration-thickness: 2px; }
.alert__action:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (pointer: coarse) {
  .alert__action::after { content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }
}
.alert--compact { padding: var(--space-2) var(--space-3); font-size: 0.8125rem; }
.alert--compact .alert__icon { width: 16px; height: 16px; margin-top: 1px; }
/* A phone held sideways has little height: a compact note drops its visible
   title so the sentence keeps one line (the note keeps its title as its
   accessible name, `aria-label`). */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .alert--note.alert--compact .alert__title { display: none; }
}

/* ---------- Tables ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-500);
  background: var(--color-gray-50);
  border-bottom: 1px solid var(--color-border);
}
/* `.table th` sets `text-align: left` with a class+element selector, which
   outranks a bare utility class — so `<th class="text-right">` silently did
   nothing and numeric headers sat LEFT while their cells sat right. That
   mismatch is what made the numeric columns look offset. These re-assert the
   utilities at matching specificity so a header can align with its column. */
.table th.text-right  { text-align: right; }
.table th.text-center { text-align: center; }
.table th.text-left   { text-align: left; }
.table td {
  padding: var(--space-4);
  font-size: 0.875rem;
  color: var(--color-gray-700);
  border-bottom: 1px solid var(--color-border-subtle);
}
.table tr:hover td { background: var(--color-gray-50); }

/* Wide tables.
   `.table` is `width: 100%`, so on its own it shrinks to fit its container
   rather than overflowing it — put it in an `overflow-x: auto` wrapper and
   nothing scrolls, the right-hand columns just get crushed and clip. Pair
   `.table-scroll` (the wrapper) with `.table--wide` (a min-width on the
   table) so the overflow is real and the scrollbar actually engages. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-300) var(--color-gray-50);
}
/* Force a PERSISTENT scrollbar. macOS defaults to overlay scrollbars that stay
   invisible until you already scroll — which is useless as an affordance,
   because the whole point is telling the user there is more table to the
   right. Declaring ::-webkit-scrollbar with a height opts this element out of
   overlay behaviour in Chrome / Safari, so the bar is always drawn. */
.table-scroll::-webkit-scrollbar {
  height: 10px;
  -webkit-appearance: none;
}
.table-scroll::-webkit-scrollbar-track {
  background: var(--color-gray-50);
  border-top: 1px solid var(--color-border-subtle);
}
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 999px;
  border: 2px solid var(--color-gray-50);
}
.table-scroll::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }
/* Floor, not a target: wide enough that the columns stay legible, low enough
   that a normal laptop viewport fits the table without scrolling. Only raise
   this if columns actually start colliding — every rem added here is a rem of
   horizontal scrolling for anyone on a smaller screen. */
.table--wide { min-width: 60rem; }
/* Same idea for a table living in a side panel or a half-width card, where
   60rem would mean permanent scrolling on a column that is only ~28rem
   wide. Pick the variant from the container, not the column count. */
.table--wide-sm { min-width: 32rem; }
.table .cell-names {
  display: block;
  max-width: 18rem;
  white-space: normal;
  line-height: 1.35;
}
.table .cell-muted { color: var(--color-gray-400); }

/* An "a / b" count pair in a table cell — published days over total days,
   active images over total images. `--match` / `--mismatch` carry a status
   read on the pair: all days published vs some still sitting in draft.
   Semantic status colours, NOT brand red: this reports a state, it is not a
   decision-bearing control, and the categorical palette has no success /
   error axis. Colour is never the only signal — the cell also carries a
   `title` and visually-hidden text naming the mismatch, so the meaning
   survives greyscale, colour-blindness and a screen reader. */
.cell-ratio { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-ratio__sep { color: var(--color-gray-400); padding: 0 0.125rem; }
.cell-ratio--match .cell-ratio__lead { color: var(--color-success); }
.cell-ratio--mismatch .cell-ratio__lead { color: var(--color-error); }
/* Weight bump only inside a table, where the pair sits in body-weight text
   and needs the lift to read as a status. `.stat__value` is already 700, so
   restating a weight there would DROP it. */
.table .cell-ratio--match .cell-ratio__lead,
.table .cell-ratio--mismatch .cell-ratio__lead { font-weight: 600; }

/* A "used / budget" cell: `.cell-ratio` + a short note on one line, a thin
   `.progress` under it. Two lines tall so a row can carry several of these
   (review progress: reviewed + solo / group kill allowance) and still scan
   down a column. `--full` / `--over` are semantic warning / error states, not
   brand red; colour is never the only signal — set `title` + `.sr-only`. */
.cell-meter { min-width: 7.5rem; }
.cell-meter__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 0.3125rem;
  white-space: nowrap;
}
.cell-meter .cell-ratio__lead { font-weight: 600; color: var(--color-gray-900); }
.cell-meter__note {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  font-variant-numeric: tabular-nums;
}
/* `--budget`: an allowance being spent, not progress towards a goal — the
   bar stays neutral until it means something (full / over), so colour on a
   budget column is always a signal. */
.cell-meter--budget .progress__fill { background: var(--color-gray-500); }
.cell-meter--full .progress__fill { background: var(--color-warning); }
.cell-meter--full .cell-ratio__lead { color: var(--color-warning); }
.cell-meter--over .progress__fill { background: var(--color-error); }
.cell-meter--over .cell-ratio__lead { color: var(--color-error); }

/* Grouped header: a spanning label row above its sub-columns. The span label
   sits centred with a hairline under it, so the group reads as one block. */
.table th.th-group {
  text-align: center;
  padding-bottom: var(--space-1);
  border-bottom: 0;
}
.table th.th-group > span {
  display: block;
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-gray-200);
}
.table th.th-sub { padding-top: var(--space-1); }
/* Divider in front of a column group, carried down the body. */
.table .col-divide { border-left: 1px solid var(--color-border-subtle); }

/* First column pinned while a `.table-scroll` table scrolls sideways, so the
   row is still identifiable on a phone. Needs an opaque background or the
   scrolled cells show through; hover re-asserts the row tint. */
.table .cell-sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--color-surface);
  box-shadow: inset -1px 0 0 var(--color-border-subtle);
}
.table th.cell-sticky { background: var(--color-gray-50); z-index: 2; }
.table tr:hover td.cell-sticky { background: var(--color-gray-50); }

/* Frozen table: the header row(s) and the identifying first column stay in
   view while the table scrolls either way, so a row action can't land on the
   wrong day or person. Pair `.table-scroll--frozen` (the wrapper scrolls both
   ways, capped at the viewport) with `.table--frozen` and put `.cell-sticky`
   on the first column. A sticky header needs the wrapper to be the vertical
   scroller: inside an `overflow-x: auto` box, `top: 0` would pin to a box
   that never scrolls. Short tables never hit the cap and look unchanged.
   Collapsed borders don't travel with sticky cells, so the header's bottom
   rule and the pinned column's edge are drawn with box-shadow. */
.table-scroll--frozen { overflow: auto; max-height: calc(100dvh - 10rem); }
.table-scroll--frozen::-webkit-scrollbar { width: 10px; }
.table--frozen thead { position: sticky; top: 0; z-index: 3; }
.table--frozen thead th { box-shadow: inset 0 -1px 0 var(--color-border); }
.table--frozen thead th.cell-sticky { box-shadow: inset 0 -1px 0 var(--color-border), inset -1px 0 0 var(--color-border-subtle); }
/* A narrow drag-handle column pinned in front of the sticky column; the
   column after it pins at the handle's width. */
.table .cell-handle {
  position: sticky; left: 0; z-index: 1;
  width: 2.5rem; min-width: 2.5rem; max-width: 2.5rem; box-sizing: border-box;
  padding-left: 0; padding-right: 0; text-align: center;
  background: var(--color-surface);
}
.table th.cell-handle { background: var(--color-gray-50); z-index: 2; }
.table--frozen thead th.cell-handle { box-shadow: inset 0 -1px 0 var(--color-border); }
.table tr:hover td.cell-handle { background: var(--color-gray-50); }
.table .cell-sticky--after-handle { left: 2.5rem; }
/* Phones: the handle is only a cue (the whole row is draggable) and its
   width is better spent on data, so it goes and the sticky column pins to
   the edge. */
@media (max-width: 639px) {
  .table .cell-handle { display: none; }
  .table .cell-sticky--after-handle { left: 0; }
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 50;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  /* `overflow: hidden` keeps the rounded corners clipping their children. On
     its own it also CLIPPED any modal taller than 90vh with no way to reach
     the rest — the footer buttons included. Becoming a flex column lets the
     body take the leftover height and scroll inside it, so the header and the
     Cancel/Confirm footer stay pinned and reachable at any viewport height. */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal__header { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-border); font-weight: 600; }
/* Danger variant — for destructive confirmation modals (permanent delete). */
.modal__header--danger {
  background: var(--color-error-bg);
  border-bottom-color: rgba(192, 0, 0, 0.18);
  color: var(--color-error);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.modal__header--danger svg { width: 18px; height: 18px; flex: none; }
/* A modal whose body and footer are wrapped in a <form> — the pattern every
   editable modal uses, so the footer's submit button posts the body's fields.
   Without this the form is the flex child and `.modal__body` is not, so the
   body has nothing to shrink against and `overflow-y` never engages: the
   modal stays clipped exactly as it was before the flex column was added.
   Pass the column through the form so the body is a flex child either way. */
.modal > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* The scrolling region. `min-height: 0` is required: a flex child defaults to
   min-height auto, which refuses to shrink below its content and re-creates
   the clipping this fixes. */
.modal__body {
  padding: var(--space-6);
  overflow-y: auto;
  min-height: 0;
}
/* "Don't ask me again" under a confirmation's text (round 35). A real tick box
   (forms-plugin reset undone), brand red when ticked. */
.modal__check { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); font-size: 0.8125rem; color: var(--color-text-secondary); cursor: pointer; }
.modal__check input[type="checkbox"] { appearance: auto; width: 16px; height: 16px; margin: 0; accent-color: var(--color-primary); flex: none; }
.modal__footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--color-border); background: var(--color-gray-50); display: flex; justify-content: flex-end; gap: var(--space-2); }

/* ---------- Spinner ---------- */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
.spinner--sm { width: 14px; height: 14px; border-width: 2px; }
.spinner--lg { width: 32px; height: 32px; border-width: 3px; }
.spinner--inverse { border-color: rgba(255,255,255,0.25); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 0s; }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  z-index: 5;
}
.loading-overlay__label {
  margin-top: 44px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease);
}
.tab:hover { color: var(--color-text); }
.tab.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--color-gray-100);
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
}
.tab.is-active .tab__count { background: var(--color-primary); color: #fff; }

/* ---------- Tooltip ---------- */

.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip__bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  /* width (not min-width): max-content lets short tips shrink-wrap, but is
     clamped by max-width so long tips WRAP instead of rendering as one huge
     line that clips outside the modal — min-width would win over max-width. */
  width: max-content;
  max-width: 240px;
  padding: 0.5rem 0.75rem;
  background: var(--color-gray-900);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  /* Tooltip prose is authored in sentence case and must render that way
     wherever the trigger sits. `.table th` and `.stat__label` set
     `text-transform: uppercase` + letter-spacing for the label itself; an
     info-tip inside one INHERITS both, which turned a whole explanatory
     sentence into shouty tracked-out caps. The bubble is its own surface,
     not part of the label, so it resets them. */
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease);
  white-space: normal;
  z-index: 10;
}
.tooltip__bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--color-gray-900);
}
.tooltip:hover .tooltip__bubble,
.tooltip:focus-within .tooltip__bubble { opacity: 1; }

/* Top-layer lift (admin.js). Inside a modal the absolutely-positioned bubble
   is clipped by the modal's own overflow, so admin.js promotes every bubble
   to a native popover on page load (a closed popover is display:none, so a
   hidden bubble takes no layout space) and opens it on hover/focus: popovers render in the browser's top
   layer, above every overflow / z-index context on the page. admin.js sets
   the popover attribute, calls showPopover(), and positions the bubble via
   inline left/top clamped to the viewport (flipping below the trigger when
   there is no room above — .tooltip__bubble--below). Without JS or the
   Popover API the attribute is never added and the CSS-only behaviour above
   still applies. */
.tooltip__bubble[popover] {
  position: fixed;
  inset: auto;          /* JS owns left/top; kill the UA centering default */
  margin: 0;
  border: 0;            /* UA popover default draws a border */
  overflow: visible;    /* UA sets auto, which would clip the ::after arrow */
  transform: none;
}
.tooltip__bubble[popover]:popover-open { opacity: 1; }
/* Keep the arrow pointing at the trigger after the bubble is clamped:
   admin.js sets --tooltip-arrow-x to the trigger's offset inside the bubble. */
.tooltip__bubble[popover]::after { left: var(--tooltip-arrow-x, 50%); }
/* Owner 2026-11-14: hover-only explanations on talent surfaces (cast chips,
   day steps, the decisions tally). `.tooltip--hover` never shows on touch
   screens (no hover), and sits above a card's stretched link so it can be
   hovered at all. */
@media (hover: none) { .tooltip--hover .tooltip__bubble { display: none; } }
.tooltip--hover { z-index: 1; }
.tooltip--hover .tooltip__bubble { max-width: 260px; }
.tooltip__bubble--below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--color-gray-900);
}

/* ---------- Inline chip select / inline number edit ---------- */

/* Click-to-edit table cells. The trigger is an existing .status-badge (or a
   number) wrapped in a button; clicking opens a standard .menu of the valid
   options and the choice is saved immediately. Composition of existing
   recipes — the only new styling is the positioning glue and the editability
   affordance (caret / dashed underline). */
.inline-edit { position: relative; display: inline-flex; }
.inline-edit__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-md);
}
.inline-edit__chip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.inline-edit__caret {
  color: var(--color-text-secondary);
  transition: transform var(--duration-base) var(--ease);
}
.inline-edit__chip[aria-expanded="true"] .inline-edit__caret { transform: rotate(180deg); }
.inline-edit__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 210px;
}
/* Top-layer lift, same trick as .tooltip__bubble[popover]: inside a
   .table-scroll wrapper the absolute menu would be clipped, so the script
   promotes it to a popover and positions it fixed under the chip. */
.inline-edit__menu[popover] {
  position: fixed;
  inset: auto;
  margin: 0;
  border: 1px solid var(--color-border); /* keep the .menu border over the UA reset */
  padding: var(--space-1);
  overflow: visible;
}
.inline-edit__num {
  background: none;
  border: 0;
  padding: 0.125rem 0.25rem;
  margin: -0.125rem -0.25rem;
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-md);
  border-bottom: 1px dashed var(--color-gray-400);
}
.inline-edit__num:hover { background: var(--color-gray-100); }
.inline-edit__num:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.inline-edit__input {
  width: 4.5rem;
  /* Matches the centred percentage cells it replaces in place — right
     alignment made the number jump sideways the moment you clicked it. */
  text-align: center;
}

/* Actionable person chip (marked-done matrix): a .cat-tag rendered as a
   button. The WHOLE chip is the action — one click (or a drag to the other
   column) moves the person between "done" and "waiting". */
button.md-chip {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  transition: filter var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
}
button.md-chip:hover {
  filter: brightness(0.94);
  box-shadow: var(--shadow-sm);
}
button.md-chip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.md-chip__icon { opacity: 0.55; }
button.md-chip:hover .md-chip__icon { opacity: 1; }
/* A chip renders both icons; show the one for the move it would make, so a
   chip moved in place by the page script needs no markup rebuilt. */
button.md-chip[data-md-action="mark"] .md-chip__icon--unmark,
button.md-chip[data-md-action="unmark"] .md-chip__icon--mark { display: none; }
/* Saving in the background: dimmed, and not clickable again until it lands. */
button.md-chip[aria-busy="true"] { opacity: 0.6; cursor: progress; pointer-events: none; }
/* The matrix toggles [hidden] on flex chip lists, the filter toolbar and
   rows; `display: flex` would otherwise outrank the UA rule. */
.md-matrix [hidden] { display: none !important; }
/* Valid drop target while a chip is being dragged over it. */
[data-md-drop].md-drop-ok {
  outline: 2px dashed var(--color-primary);
  outline-offset: -4px;
  background: var(--color-gray-100);
}

/* ---------- Empty state ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  color: var(--color-text-secondary);
}
.empty__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--color-gray-100);
  color: var(--color-gray-400);
  border-radius: var(--radius-full);
}
.empty__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}
.empty__body { font-size: 0.875rem; max-width: 40ch; margin: 0; }

/* ---------- Circular progress (allowance widget) ---------- */

.progress-circle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 96px;
}
.progress-circle svg { transform: rotate(-90deg); }
.progress-circle__track  { stroke: var(--color-gray-100); }
.progress-circle__fill   { stroke: var(--color-primary); transition: stroke-dashoffset var(--duration-slow) var(--ease); stroke-linecap: round; }
.progress-circle--success .progress-circle__fill { stroke: var(--color-success); }
.progress-circle--warning .progress-circle__fill { stroke: var(--color-warning); }
.progress-circle__label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.progress-circle__value { font-size: 1.25rem; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.progress-circle__caption { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--color-text-tertiary); }
/* Small ring (≤ 72 px, e.g. the day card's 64 px): "100%" must fit inside the
   8 px stroke (walkthrough D-10 — at 1.25rem it overflowed the ring). */
.progress-circle--sm .progress-circle__value { font-size: 0.8125rem; letter-spacing: -0.01em; }
.progress-circle--sm .progress-circle__caption { font-size: 0.5rem; letter-spacing: 0.25px; }

/* ---------- Dropzone (file upload) ---------- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: var(--space-12) var(--space-6);
  background: var(--color-surface);
  border: 2px dashed var(--color-gray-300);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  text-align: center;
  transition: border-color var(--duration-base) var(--ease), background var(--duration-base) var(--ease);
}
.dropzone:hover,
.dropzone.is-active { border-color: var(--color-primary); background: var(--color-brand-50); color: var(--color-text); }
.dropzone__title { font-size: 1rem; font-weight: 600; color: var(--color-text); margin: 0; }
.dropzone__body  { font-size: 0.8125rem; margin: 0; }

/* ---------- List view (toolbar, view toggle, pagination) ----------
   The standard pattern for any CRUD list: search/filter row at top,
   the data in either table or card form, and a pagination footer.
   The same toolbar serves both views so switching never disorients. */

.list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
}
/* On screens with room (≥768px) the toolbar should never wrap — the
   `+ New X` button must stay on the same row as the search field. Below
   that breakpoint we fall back to wrap so the buttons don't get cropped. */
@media (min-width: 768px) {
  .list-toolbar { flex-wrap: nowrap; }
}
.list-toolbar__search {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
  max-width: 360px;
}
.list-toolbar__search .input { padding-left: 2.25rem; }
.list-toolbar__search svg {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--color-text-tertiary);
}
.list-toolbar__spacer { flex: 1 1 0; }

/* Primary "+ New X" action inside a list toolbar. `margin-left: auto`
   makes it sit at the right edge whether the toolbar fits on one row
   (the spacer already absorbs slack on the left of it) or wraps to a
   second row (the auto margin pushes the lone button to the right edge
   instead of leaving it left-aligned). */
.list-toolbar > a.btn-primary,
.list-toolbar > button.btn-primary {
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Row-link — turn an identity cell (name, title, email) into an inline link
   that leads to the row's edit / detail page without competing visually
   with the Action column buttons on the right. */
.row-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}
.row-link:hover { color: var(--color-primary); }
.row-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Sortable column header — used inside <th>. The chevron switches between
   asc / desc / unsorted; styling lives in the page template so the icon
   stays trivially overridable per column. */
.th-sort {
  display: inline-flex; align-items: center; gap: 0.375rem;
  color: inherit; text-decoration: none;
}
.th-sort--right { flex-direction: row-reverse; }
.th-sort:hover { color: var(--color-primary); }
/* aria-sort lives on the columnheader (<th>); style the inner link from it.
   `ascending` / `descending` are the valid ARIA tokens; `asc` / `desc` are
   kept for lists that still emit the short form. */
.th-sort[aria-sort="asc"], .th-sort[aria-sort="desc"],
[aria-sort="asc"] .th-sort, [aria-sort="desc"] .th-sort,
[aria-sort="ascending"] .th-sort, [aria-sort="descending"] .th-sort {
  color: var(--color-text); font-weight: 600;
}

/* Filter popover wrapper — anchors a .filter-panel under its trigger
   button inside a .list-toolbar. The panel itself uses the existing
   .filter-panel recipe; this wrapper only handles positioning. */
.filter-popover-wrap { position: relative; display: inline-block; }
.filter-popover-wrap .filter-panel {
  position: absolute; top: calc(100% + 0.5rem); left: 0; z-index: 30;
}
.filter-popover-wrap[hidden] { display: none; }
/* Round 8: roomier popover. The gallery day rail later resets
   `.filter-panel__group` padding to 0 for its sidebar; restate it here so the
   popover's groups keep their inner spacing, and never scroll sideways. */
.filter-popover-wrap .filter-panel { width: 340px; max-width: calc(100vw - 2rem); }
.filter-popover-wrap .filter-panel__head { padding: 1rem 1.25rem; }
.filter-popover-wrap .filter-panel__body { padding: 0.25rem 0; overflow-x: hidden; }
.filter-popover-wrap .filter-panel__group { padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border-subtle); }
.filter-popover-wrap .filter-panel__group:last-child { border-bottom: 0; }
.filter-popover-wrap .filter-panel__label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.filter-popover-wrap .filter-panel__options { max-height: 16rem; overflow-y: auto; overflow-x: hidden; margin: 0 -0.25rem; padding: 0 0.25rem; }
.filter-popover-wrap .filter-panel__option { gap: 0.75rem; padding: 0.5rem 0; min-width: 0; }
.filter-popover-wrap .filter-panel__option span { min-width: 0; overflow-wrap: anywhere; }
.filter-popover-wrap .filter-panel__hint { padding: 0 1.25rem 0.75rem; }
.filter-popover-wrap .filter-panel__foot { padding: 0.875rem 1.25rem; }
.filter-toggle[aria-expanded="true"] {
  background: var(--color-gray-100); color: var(--color-text);
}
.filter-toggle__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 0.3rem;
  font-size: 0.65rem; font-weight: 700;
  background: var(--color-primary); color: #fff;
  border-radius: var(--radius-full);
  margin-left: 0.25rem;
}

/* Row overflow menu — anchors a .menu panel under a .meatball trigger in a
   table row or card footer. The panel uses the existing .menu recipe; this
   wrapper only handles positioning. Open/close is wired by admin.js via the
   data-menu-wrap / data-menu-toggle / data-menu-panel hooks. */
.row-menu-wrap { position: relative; display: inline-block; }
.row-menu-wrap .menu {
  position: absolute; top: calc(100% + 0.25rem); right: 0; z-index: 30;
  min-width: 180px;
}
.menu a.menu__item { text-decoration: none; }
.menu a.menu__item:hover { color: var(--color-gray-900); }
.menu__item svg { width: 14px; height: 14px; flex: none; opacity: 0.7; }

/* Filter chip — for active filters that the user has applied. */
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  height: 28px;
  padding: 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border-radius: var(--radius-full);
}
.filter-chip button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  background: transparent; border: 0;
  color: var(--color-gray-500); cursor: pointer;
  border-radius: var(--radius-full);
}
.filter-chip button:hover { background: rgba(0,0,0,0.08); color: var(--color-gray-900); }

/* View toggle — segmented control for table ↔ cards.
   Height locked to match .btn--sm (32px) so it lines up with
   neighbouring toolbar buttons (Filter, New day) without tweaks. */
.view-toggle {
  /* Round 25: every option the same width (the widest label sets it). */
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}
.view-toggle__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  height: 100%;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-secondary);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease);
}
.view-toggle__btn + .view-toggle__btn { border-left: 1px solid var(--color-border); }
/* Round 30: icon-only options (gallery / table): square, the word in a tooltip + hidden text. */
.view-toggle__btn--icon { padding: 0 0.625rem; min-width: 36px; }
.view-toggle__btn--icon svg { width: 16px; height: 16px; }
.view-toggle__btn:hover { color: var(--color-text); background: var(--color-gray-50); }
.view-toggle__btn.is-active { background: var(--color-gray-900); color: #fff; }
.view-toggle__btn.is-active:hover { background: var(--color-gray-800); }
.view-toggle__btn svg { width: 14px; height: 14px; }
/* On a dark bar (gray-900): translucent track, the active option light. */
.view-toggle--on-dark { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); }
.view-toggle--on-dark .view-toggle__btn { color: var(--color-gray-200); }
.view-toggle--on-dark .view-toggle__btn + .view-toggle__btn { border-left-color: rgba(255, 255, 255, 0.16); }
.view-toggle--on-dark .view-toggle__btn:hover { color: #fff; background: rgba(255, 255, 255, 0.10); }
.view-toggle--on-dark .view-toggle__btn.is-active,
.view-toggle--on-dark .view-toggle__btn.is-active:hover { background: #fff; color: var(--color-gray-900); }
.view-toggle--on-dark .view-toggle__btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

/* Pagination footer */
.list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-gray-50);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.list-footer__range { margin-right: auto; }
.list-footer__range strong { color: var(--color-text); font-weight: 600; }

.pagination { display: inline-flex; align-items: center; gap: 0.125rem; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease);
}
.page-btn:hover:not(:disabled) { background: var(--color-gray-100); color: var(--color-text); }
.page-btn.is-active {
  background: var(--color-gray-900);
  color: #fff;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { padding: 0 0.25rem; color: var(--color-text-tertiary); user-select: none; }

/* Page-size selector (small native select inside the footer). */
.page-size {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.8125rem; color: var(--color-text-secondary);
}
.page-size select {
  height: 30px;
  padding: 0 0.5rem;
  font: inherit; font-size: 0.8125rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

/* ---------- Filter panel (popover that opens from list toolbar) ---------- */

.filter-panel {
  width: 320px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.filter-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 0.8125rem; font-weight: 600;
  color: var(--color-text);
}
.filter-panel__body {
  max-height: 360px; overflow-y: auto;
  padding: 0.75rem 0;
}
.filter-panel__group {
  padding: 0.5rem 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
.filter-panel__group:last-child { border-bottom: 0; }
.filter-panel__label {
  display: block;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: 0.5rem;
}
.filter-panel__option {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3125rem 0;
  font-size: 0.875rem; color: var(--color-text);
  cursor: pointer;
}
/* Native box (round 28): the forms reset made an unticked box invisible in the panel. */
.filter-panel__option input[type="checkbox"] { -webkit-appearance: checkbox; appearance: auto; width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--color-primary); }
.filter-panel__option .count {
  margin-left: auto;
  font-size: 0.7rem; color: var(--color-text-tertiary); font-variant-numeric: tabular-nums;
}
.filter-panel__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-gray-50);
}

/* ---------- Categorical tags & dots ----------
   Non-action identity colours — productions, owners, day units, chart series.
   Use the `.cat-{hue}` modifier on a `.cat-tag` or `.cat-dot`. */

.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 22px;
  padding: 0 0.625rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: var(--radius-full);
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}
.cat-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-gray-400);
  flex-shrink: 0;
}

.cat-tag.cat-indigo { background: var(--color-cat-indigo-100); color: var(--color-cat-indigo-700); }
.cat-tag.cat-teal   { background: var(--color-cat-teal-100);   color: var(--color-cat-teal-700);   }
.cat-tag.cat-amber  { background: var(--color-cat-amber-100);  color: var(--color-cat-amber-700);  }
.cat-tag.cat-violet { background: var(--color-cat-violet-100); color: var(--color-cat-violet-700); }
.cat-tag.cat-pink   { background: var(--color-cat-pink-100);   color: var(--color-cat-pink-700);   }
.cat-tag.cat-slate  { background: var(--color-cat-slate-100);  color: var(--color-cat-slate-700);  }
.cat-tag.cat-rose   { background: var(--color-cat-rose-100);   color: var(--color-cat-rose-700);   }

.cat-dot.cat-indigo { background: var(--color-cat-indigo-500); }
.cat-dot.cat-teal   { background: var(--color-cat-teal-500);   }
.cat-dot.cat-amber  { background: var(--color-cat-amber-500);  }
.cat-dot.cat-violet { background: var(--color-cat-violet-500); }
.cat-dot.cat-pink   { background: var(--color-cat-pink-500);   }
.cat-dot.cat-slate  { background: var(--color-cat-slate-500);  }
.cat-dot.cat-rose   { background: var(--color-cat-rose-500);   }

/* ---------- Colour-coded row action icon buttons ----------
   Compact, solid-colour icon buttons for dense table-row action toolbars
   (admin production days / access). Colour-coding + icon makes each action
   scannable at a glance where a stack of same-colour buttons overflowed and
   read as undifferentiated. Icon-only, so the label lives in `aria-label` +
   `title` (required on every instance for a11y + hover tooltip).
   NOTE: this intentionally uses the categorical hues on ACTION controls — a
   product-owner-requested exception to the usual "categorical = non-action
   only" rule; destructive stays brand-red. */
.act-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  box-shadow: none;
  transition: filter var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
}
.act-icon svg { width: 16px; height: 16px; }
.act-icon:hover:not(:disabled) { filter: brightness(1.08); }
.act-icon:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.act-icon:disabled { opacity: 0.5; cursor: not-allowed; }

.act-icon--indigo { background: var(--color-cat-indigo-500); }
.act-icon--teal   { background: var(--color-cat-teal-500);   }
.act-icon--amber  { background: var(--color-cat-amber-500);  }
.act-icon--violet { background: var(--color-cat-violet-500); }
.act-icon--pink   { background: var(--color-cat-pink-500);   }
.act-icon--slate  { background: var(--color-cat-slate-500);  }
.act-icon--danger { background: var(--color-error); }

/* Tidy inline toolbar wrapper for the action cell. */
.act-toolbar { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Side nav ----------
   Persistent left sidebar for desktop layouts. Two states:
   .side-nav (expanded ~240px) and .side-nav.is-collapsed (~64px, icons only).
   The collapsed state still shows tooltips on hover for each item. */

.side-nav {
  display: flex;
  flex-direction: column;
  width: 240px;
  height: 100%;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  transition: width var(--duration-base) var(--ease);
}
.side-nav.is-collapsed { width: 64px; }
.side-nav__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 56px;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
.side-nav__head .label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-text-tertiary); }
.side-nav.is-collapsed .side-nav__head .label,
.side-nav.is-collapsed .side-nav__group,
.side-nav.is-collapsed .side-nav__item .label { display: none; }

.side-nav__body { flex: 1; overflow-y: auto; padding: 0.5rem 0.5rem; }
.side-nav__group {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  padding: 0.75rem 0.625rem 0.375rem;
}
.side-nav__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--duration-base) var(--ease), color var(--duration-base) var(--ease);
}
.side-nav__item:hover { background: var(--color-gray-50); color: var(--color-gray-900); text-decoration: none; }
.side-nav__item.is-active { background: var(--color-brand-50); color: var(--color-primary); font-weight: 600; }
.side-nav__item.is-active svg { color: var(--color-primary); }
.side-nav__item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-gray-500); }
.side-nav.is-collapsed .side-nav__item { justify-content: center; padding: 0.5rem; }
.side-nav__item .count {
  margin-left: auto;
  font-size: 0.7rem; font-variant-numeric: tabular-nums;
  background: var(--color-gray-100); color: var(--color-text-secondary);
  padding: 0 0.375rem; height: 18px;
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center;
}
.side-nav__item.is-active .count { background: var(--color-primary); color: #fff; }
.side-nav.is-collapsed .side-nav__item .count { display: none; }

.side-nav__foot {
  padding: 0.5rem;
  border-top: 1px solid var(--color-border-subtle);
}

/* Off-canvas drawer variant. Below 768px the side nav leaves the layout and
   slides in over the page, driven by the `.app-bar__burger` trigger. Add
   `side-nav--drawer` alongside `side-nav`; JS toggles `is-mobile-open` on the
   nav and `is-open` on the sibling `.side-nav-backdrop`. */
@media (max-width: 767px) {
  .side-nav--drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform var(--duration-base) var(--ease);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* Force the drawer to its expanded width even if the desktop "Collapse"
       state is persisted in localStorage — icons-only is unusable here. */
    width: 260px !important;
  }
  .side-nav--drawer.is-mobile-open { transform: translateX(0); }
  /* Suppress the collapsed-state rules so labels / groups / counts reappear.
     Same specificity as the .side-nav.is-collapsed rules above; these win on
     source order, so this block must stay after them. */
  .side-nav--drawer.is-collapsed .side-nav__head .label,
  .side-nav--drawer.is-collapsed .side-nav__group,
  .side-nav--drawer.is-collapsed .side-nav__item .label,
  .side-nav--drawer.is-collapsed .side-nav__item .count { display: revert; }
  .side-nav--drawer.is-collapsed .side-nav__item { justify-content: flex-start; padding: 0.5rem 0.75rem; }
  /* The desktop "Collapse" button has no role inside an off-canvas drawer —
     the backdrop / burger is the dismiss affordance. */
  .side-nav--drawer [data-side-nav-toggle] { display: none !important; }
}
.side-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
}
.side-nav-backdrop.is-open { display: block; }
@media (min-width: 768px) {
  .side-nav-backdrop { display: none !important; }
}

/* `.side-nav--overlay` (+ `.side-nav-backdrop--overlay`): the drawer stays
   off-canvas at EVERY width. The React talent app has no side-nav rail
   (README "Chrome exception"), so its burger opens the same drawer on a
   1440 px screen as on a phone; without this the drawer dropped into the page
   flow above 768 px. Pair with `.side-nav--drawer`. */
.side-nav--overlay {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 280px;
  max-width: calc(100vw - 48px);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--duration-base) var(--ease);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.side-nav--overlay.is-mobile-open { transform: translateX(0); }
.side-nav-backdrop.side-nav-backdrop--overlay.is-open { display: block !important; }

/* ---------- App bar (light chrome strip) ---------- */

/* The slim light bar that sits above <main> on signed-in surfaces: alongside
   the side nav in the admin app, and as the sole chrome in the React talent
   app (which has no side nav — see README "Chrome exception"). NOT the black
   `.app-header`, which is reserved for public / auth / marketing pages.
   Sub-parts are optional; compose only what the surface needs. */
.app-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  padding: 0.625rem 1rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-gray-200);
  position: sticky;
  top: 0;
  z-index: 30;
}

/* Square icon-button cell — back chevron, hamburger, overflow. 36px on
   pointer-precise devices, 44px under `pointer: coarse` (see the touch-target
   block at the end of this file). */
.app-bar__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--color-gray-700);
  flex-shrink: 0;
}
.app-bar__icon-btn:hover { background: var(--color-gray-100); }

/* Burger variant — hidden once the side nav is permanently on screen. */
.app-bar__burger { display: none; }
@media (max-width: 767px) {
  .app-bar__burger { display: inline-flex; }
}

/* Brand slot. Use the light-mode logo: this bar is a light surface. */
.app-bar__brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.app-bar__brand img { height: 24px; width: auto; display: block; }

.app-bar__crumbs {
  flex: 1;
  min-width: 0;
  /* Long trails (Productions › X › Days › Upload to Y) scroll horizontally on
     narrow viewports rather than silently clipping. */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.app-bar__crumbs > nav { white-space: nowrap; }
/* Round 37 (owner): with the whole trail showing, the back arrow repeats its
   first crumb (Productions), so it goes. Phones keep it: there the trail is
   swapped for the page title and the arrow is the only way back. */
@media (min-width: 640px) { .app-bar:has(.app-bar__crumbs) .app-bar__back { display: none; } }
.app-bar__crumbs > nav,
.app-bar__crumbs > ol { margin: 0; }

/* Single-line page title for surfaces with no breadcrumb trail (phone). */
.app-bar__title {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-bar__spacer { flex: 1; min-width: 0; }
.app-bar__actions { display: inline-flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* Account control + its dropdown. */
.app-bar__user { position: relative; flex-shrink: 0; }
.app-bar__user-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--color-gray-800);
  font: inherit;
  text-decoration: none; /* also rendered as a link to account settings */
}
.app-bar__user-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.app-bar__user-btn:hover { background: var(--color-gray-50); border-color: var(--color-gray-200); }
.app-bar__user-name { font-size: 0.875rem; font-weight: 500; }
@media (max-width: 767px) {
  .app-bar__user-name { display: none; }
}
.app-bar__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
  padding: 0.25rem;
  display: none;
  z-index: 45;
}
.app-bar__menu.is-open { display: block; }
.app-bar__menu-head {
  padding: 0.625rem 0.75rem 0.75rem;
  border-bottom: 1px solid var(--color-gray-200);
  margin-bottom: 0.25rem;
}
.app-bar__menu-head .name { font-weight: 600; color: var(--color-gray-900); font-size: 0.875rem; }
.app-bar__menu-head .meta { font-size: 0.75rem; color: var(--color-gray-500); margin-top: 2px; }
.app-bar__menu a,
.app-bar__menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--color-gray-800);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
}
.app-bar__menu a:hover,
.app-bar__menu button:hover { background: var(--color-gray-50); }
.app-bar__menu hr { margin: 0.25rem 0; border: 0; border-top: 1px solid var(--color-gray-200); }

/* ---------- Breadcrumbs ---------- */

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs a {
  color: var(--color-text-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--duration-base) var(--ease), color var(--duration-base) var(--ease);
}
.crumbs a:hover { background: var(--color-gray-100); color: var(--color-text); text-decoration: none; }
.crumbs__sep { color: var(--color-gray-300); user-select: none; display: inline-flex; align-items: center; }
.crumbs__here { padding: 0.125rem 0.375rem; color: var(--color-text); font-weight: 600; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs__home {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  color: var(--color-text-tertiary);
}
.crumbs__home:hover { background: var(--color-gray-100); color: var(--color-text); }

/* ---------- Avatar ---------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-900);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 24px; height: 24px; font-size: 0.625rem; }
.avatar--sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar--md { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.125rem; }

.avatar-stack { display: inline-flex; }
.avatar-stack > .avatar + .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--color-surface); }
.avatar-stack > .avatar--sm + .avatar--sm { margin-left: -10px; }

.identity {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.identity__meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.identity__name { font-size: 0.875rem; font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity__sub  { font-size: 0.7rem; color: var(--color-text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- View-as bar (owner 2026-11-18) ----------
   Shown on every signed-in talent-app screen while a ROOT ADMIN views the app
   as someone else (view only). Fixed bottom-left, never full width, so it
   covers as little as possible; dark so it reads as "not part of the page";
   brand-red "Stop viewing" (the one action). Above toasts and modals. */
.view-as-bar {
  position: fixed; left: var(--space-4); bottom: var(--space-4); z-index: 1100;
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  max-width: calc(100vw - 2 * var(--space-4));
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  background: var(--color-gray-900); color: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  font-size: 0.8125rem; line-height: 1.35;
}
.view-as-bar__eye { flex: none; width: 16px; height: 16px; color: var(--color-brand-300); }
.view-as-bar__text { min-width: 0; }
.view-as-bar__text strong { font-weight: 700; }
.view-as-bar__meta { color: var(--color-gray-300); }
.view-as-bar .btn { flex: none; }
@media (max-width: 639px) {
  .view-as-bar { left: var(--space-2); right: var(--space-2); bottom: var(--space-2); max-width: none; }
}

/* ---------- Toast ----------
   Transient, time-bound feedback. Distinct from inline .alert which lives
   inline with content. Toasts stack in a corner and dismiss automatically. */

.toast-stack {
  position: fixed;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  max-width: 24rem;
  /* The stack is a layout box above everything (z 70): it must never catch a
     click or a drop meant for what lies under it — only the toasts do. */
  pointer-events: none;
}
.toast-stack > * { pointer-events: auto; }
.toast-stack--br { bottom: 0; right: 0; }
.toast-stack--tr { top: 0; right: 0; }
.toast-stack--bl { bottom: 0; left: 0; }
.toast-stack--tl { top: 0; left: 0; }

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  background: var(--color-gray-900);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.toast__icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  color: #fff;
}
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-weight: 600; margin: 0 0 0.125rem; }
.toast__msg { margin: 0; color: rgba(255,255,255,0.78); }
.toast__close {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: transparent; border: 0;
  color: rgba(255,255,255,0.6); cursor: pointer;
  border-radius: var(--radius-sm);
}
.toast__close:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* Inline text-button slot inside the dark toast — the reversal affordance for
   optimistic actions ("Killed — Undo"). It inherits the dark-toast palette
   rather than the brand-red .btn recipe: brand red on the gray-900 toast fill
   fails contrast, and a toast action is a secondary, time-limited affordance.
   A timed toast must never be the *only* way to reverse an action (WCAG 2.2
   3.3.4) — keep the permanent control on the object itself. */
.toast__action {
  flex-shrink: 0;
  align-self: center;
  padding: 0.25rem 0.5rem;
  margin: -0.25rem 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease);
}
.toast__action:hover { background: rgba(255, 255, 255, 0.12); }
.toast__action:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  text-decoration: none;
}

.toast--success .toast__icon { color: #6EE7B7; }
.toast--warning .toast__icon { color: #FCD34D; }
.toast--error   .toast__icon { color: #FCA5A5; }
.toast--info    .toast__icon { color: #93C5FD; }

/* ---------- Prose container ----------
   For long-form page text: T&Cs, release notes, help articles, request-access
   explanations, anything where the user is reading paragraphs. Caps line
   length, gives headings/lists/inline elements a consistent voice without
   the author having to style each tag. */

.prose {
  max-width: 64ch;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.65;
}
.prose > * + * { margin-top: 1rem; }
/* Round 30: a flagged note inside prose (e.g. when to use Kill and exclude). */
.prose .prose-flag { padding: var(--space-2) var(--space-3); border: 1px solid #FCD34D; border-radius: var(--radius-md); background: #FFFBEB; color: #92400E; font-weight: 600; font-size: 0.875rem; }
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2.5rem;
  color: var(--color-text);
}
.prose h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.75rem;
  color: var(--color-text);
}
.prose h2:first-child,
.prose h3:first-child { margin-top: 0; }
/* margin-bottom only: `margin: 0` here out-ranked `.prose > * + *` and ran
   paragraphs together (found on the terms page, 2026-11-11). */
.prose p { margin-bottom: 0; color: var(--color-gray-700); }
.prose strong { color: var(--color-text); font-weight: 600; }
.prose a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--color-primary-dark); }
.prose ul, .prose ol { padding-left: 1.25rem; color: var(--color-gray-700); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.375rem; }
.prose li::marker { color: var(--color-text-tertiary); }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.125rem 0.375rem;
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.prose blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--color-primary);
  color: var(--color-gray-700);
  font-style: italic;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}
.prose__lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--color-gray-700);
}

.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
}
@media (min-width: 768px) { .content-card { padding: 2.5rem 3rem; } }

/* ---------- Accordion ----------
   Built on native <details>/<summary> for keyboard + screen-reader support
   out of the box. The chevron rotates via [open] selector — no JS required. */

.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  overflow: hidden;
}
.accordion__item + .accordion__item { border-top: 1px solid var(--color-border-subtle); }
.accordion__item { position: relative; }
.accordion__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--duration-base) var(--ease);
}
.accordion__summary::-webkit-details-marker { display: none; }
/* Parks an action against the right edge of the summary, immediately left of
   the chevron. Keep it to ONE action — a summary is a heading, not a toolbar.

   The chevron is an `::after` that right-aligns itself with `margin-left:
   auto`. Two flex items both claiming `auto` SPLIT the free space between
   them, which parked the action in the middle of the heading instead of
   beside the chevron. So when an action is present the chevron gives up its
   auto margin and takes a fixed gap: the action owns the push, the chevron
   just follows it. */
.accordion__summary-action { margin-left: auto; display: inline-flex; }
.accordion__summary:has(.accordion__summary-action)::after {
  margin-left: var(--space-3);
}
.accordion__summary:hover { background: var(--color-gray-50); }
.accordion__summary::after {
  content: "";
  margin-left: auto;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--duration-base) var(--ease);
}
.accordion__item[open] > .accordion__summary::after { transform: rotate(180deg); }
.accordion__item[open] > .accordion__summary { background: var(--color-gray-50); color: var(--color-text); }
.accordion__body {
  padding: 0 1.25rem 1.25rem;
  color: var(--color-gray-700);
  font-size: 0.875rem;
  line-height: 1.6;
}
.accordion__body > p { margin: 0; }
.accordion__body > * + * { margin-top: 0.75rem; }

/* ---------- Persona group accent ----------
   Tints an accordion group's summary row with one categorical hue, so a
   block of rows is identifiable at a glance without reading the heading.
   Used by the production access tables, where each account type carries the
   SAME hue it has on the review-progress board — one persona, one colour,
   across both screens.

   The tint stops at the summary. Colouring the table header underneath as
   well doubled the tinted area, fought the `.table th` label styling, and
   made the group heading stop reading as the thing that owns the colour.
   One coloured band per group is the whole signal.

   Categorical (identity) colours, never brand red: these label who a group
   of people are, they are not controls. `--rose` is the red identity hue,
   deliberately not #C00000, so an admin group can read as red without
   looking clickable. `--amber` is the viewer hue — chosen over violet, which
   sat too close to indigo to separate agents from viewers at a glance.

   The `[open]` variants are listed because `.accordion__item[open] >
   .accordion__summary` sets its own grey background at equal specificity —
   without them an opened group would lose its tint. */
.persona-group > .accordion__summary,
.persona-group[open] > .accordion__summary {
  border-left: 3px solid transparent;
}

.persona-group--teal > .accordion__summary,
.persona-group--teal[open] > .accordion__summary {
  background: var(--color-cat-teal-100);
  color: var(--color-cat-teal-700);
  border-left-color: var(--color-cat-teal-500);
}

.persona-group--indigo > .accordion__summary,
.persona-group--indigo[open] > .accordion__summary {
  background: var(--color-cat-indigo-100);
  color: var(--color-cat-indigo-700);
  border-left-color: var(--color-cat-indigo-500);
}

.persona-group--amber > .accordion__summary,
.persona-group--amber[open] > .accordion__summary {
  background: var(--color-cat-amber-100);
  color: var(--color-cat-amber-700);
  border-left-color: var(--color-cat-amber-500);
}

.persona-group--rose > .accordion__summary,
.persona-group--rose[open] > .accordion__summary {
  background: var(--color-cat-rose-100);
  color: var(--color-cat-rose-700);
  border-left-color: var(--color-cat-rose-500);
}


.persona-group--pink > .accordion__summary,
.persona-group--pink[open] > .accordion__summary {
  background: var(--color-cat-pink-100);
  color: var(--color-cat-pink-700);
  border-left-color: var(--color-cat-pink-500);
}

/* ---------- Attention card ----------
   A card that must not be missed: something on the page is waiting for a
   decision (e.g. production members with no role, tagged names with no
   account). Warning tint + a thick amber edge; render it ONLY when it has
   something in it — an always-on warning trains people to ignore it. The
   content sits on white panels so tables and lists stay readable on the
   tint. Two panels side by side from `lg`, stacked below. */
.card--attention {
  background: var(--color-warning-bg);
  border-color: #FDE68A;
  border-left: 4px solid var(--color-warning);
}
.card--attention .card__title { color: #92400E; }
.attention__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* Stacked panels need more air between them than side-by-side ones, or
     the second panel's heading crowds the first panel's last row. */
  gap: var(--space-8) var(--space-4);
}
@media (min-width: 1024px) {
  .attention__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.attention__panel {
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.attention__panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-900);
}
/* Tables inside a panel are a quick scan, not the main grid: a slim,
   untinted header so the column labels don't outweigh the rows. */
.attention__panel .table th {
  padding: var(--space-1) var(--space-3);
  font-size: 0.6875rem;
  background: transparent;
}
.attention__panel .table td { padding: var(--space-3); }
.attention__empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

/* ---------- Tag scan ----------
   A long list of short names to eyeball, each with one action — e.g. the
   "tagged people with no account on this production" check. One compact line
   per name in a responsive multi-column grid, capped height with its own
   scroll so hundreds of names never push the page away. Names are neutral
   (they are data, not identity colours); the action is a normal .btn. */
.tag-scan { min-width: 0; }
.tag-scan__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.tag-scan__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-900);
}
.tag-scan__search { max-width: 16rem; }
.tag-scan__header .attention__panel-title { margin: 0; }
.tag-scan__help {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}
.tag-scan__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.25rem 1rem;
  max-height: 22rem;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tag-scan__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0.125rem 0.25rem;
  border-bottom: 1px solid var(--color-gray-100);
}
.tag-scan__item[hidden] { display: none; }
.tag-scan__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  text-transform: capitalize;
  color: var(--color-gray-800);
}
/* A name that opens something (e.g. the account that owns the tag): a quiet
   underline so it reads as a link without shouting over the list. */
a.tag-scan__name {
  text-decoration: underline;
  text-decoration-color: var(--color-gray-300);
  text-underline-offset: 2px;
}
a.tag-scan__name:hover { text-decoration-color: currentColor; }
.tag-scan__count {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-gray-500);
}
.tag-scan__note {
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

/* Hover must not wash the tint back out to grey. Darkening is done with a
   translucent overlay rather than a per-hue hover token, so adding a hue
   needs no extra hover rule. */
.persona-group > .accordion__summary:hover {
  background-image: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04));
}

/* Leading icon variant — for FAQ-style accordions where each item has its
   own glyph. Use inside the summary; size matches the chevron. */
.accordion__summary .lead-icon {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  background: var(--color-brand-50);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* ---------- Quiet accordion (footer disclosure) ----------
   `.accordion--quiet`: ONE rarely-used section parked at the foot of a page
   as a single muted line ("› Storage · Local disk · 11 images"). Same native
   <details>/<summary> (keyboard + screen reader for free), but no box: a
   hairline above, a 13px grey summary with a LEADING chevron (the shared
   ::after chevron moved to the front, pointing right when closed, down when
   open), and the body as a bordered surface panel below. Summary bits:
   __label (the section name, darker), __sep (a pale "·"), __icon (a 14px
   glyph); a .status-badge may join the line to flag state. Open it from the
   server (the `open` attribute) when the section needs attention. */
.accordion--quiet {
  border: 0; border-top: 1px solid var(--color-border-subtle);
  border-radius: 0; background: transparent; overflow: visible;
}
.accordion--quiet > .accordion__summary,
.accordion--quiet[open] > .accordion__summary {
  gap: var(--space-2); flex-wrap: wrap;
  padding: var(--space-3) var(--space-1);
  font-size: 0.8125rem; font-weight: 400;
  color: var(--color-text-tertiary);
  background: transparent;
  border-radius: var(--radius-md);
}
.accordion--quiet > .accordion__summary:hover { background: transparent; color: var(--color-text-secondary); }
.accordion--quiet > .accordion__summary:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.accordion--quiet > .accordion__summary::after {
  order: -1; margin-left: 0; width: 14px; height: 14px; flex: none;
  transform: rotate(-90deg);
}
.accordion--quiet[open] > .accordion__summary::after { transform: rotate(0deg); }
.accordion__label { font-weight: 600; color: var(--color-text-secondary); }
.accordion__sep { color: var(--color-gray-300); }
.accordion__icon { width: 14px; height: 14px; flex: none; }
.accordion--quiet > .accordion__summary .status-badge { gap: 6px; }
.accordion--quiet > .accordion__summary .status-badge .spinner { width: 11px; height: 11px; border-width: 2px; }
.accordion--quiet > .accordion__body {
  padding: var(--space-4); margin-bottom: var(--space-4);
  border: 1px solid var(--color-border-subtle); border-radius: var(--radius-lg);
  background: var(--color-surface);
}
@media (prefers-reduced-motion: reduce) {
  .accordion--quiet > .accordion__summary::after { transition: none; }
}

/* ---------- Content card with side aside ----------
   Variant of .content-card with an optional supporting right column —
   table of contents, callouts, metadata, related links. The aside is
   sticky on desktop so it stays in view as the main article scrolls.
   Stacks below the main column under 900 px. */

.content-card--with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 3rem;
  padding: 2rem 2.25rem;
}
@media (min-width: 768px) {
  .content-card--with-aside { padding: 2.5rem 3rem; }
}
@media (max-width: 900px) {
  .content-card--with-aside { grid-template-columns: 1fr; gap: 2rem; }
}

.content-aside {
  position: sticky;
  /* Clear app header + sticky section nav (64 + 52 + slack). */
  top: calc(64px + 52px + 24px);
  align-self: start;
  font-size: 0.8125rem;
}
@media (max-width: 900px) {
  .content-aside { position: static; }
}

.content-aside__group + .content-aside__group { margin-top: 1.5rem; }
.content-aside__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.content-aside__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 1px solid var(--color-border);
}
.content-aside__list a {
  display: block;
  padding: 0.25rem 0 0.25rem 0.75rem;
  margin-left: -1px;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-left: 1px solid transparent;
  font-size: 0.8125rem;
  transition: color var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease);
}
.content-aside__list a:hover { color: var(--color-text); }
.content-aside__list a.is-active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.content-aside__callout {
  padding: 0.875rem 1rem;
  background: var(--color-brand-50);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-gray-700);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.content-aside__callout strong { color: var(--color-text); }

.content-aside__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}
.content-aside__meta dt { font-weight: 600; color: var(--color-text); margin-bottom: 0.125rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }
.content-aside__meta dd { margin: 0; }

/* ============================================================
   Gallery island — image viewer recipes
   ============================================================ */

/* Layout shell that hosts the React-mounted island below the admin
   sidenav. The toolbar + body split mirrors a standard inbox-style
   reading surface: sticky header, scrollable body, left filter rail.
*/
.gallery-island {
  display: flex;
  flex-direction: column;
  /* The island fills the remaining height of its flex-parent (the admin
     main column). 100% is the parent's flex-basis; min-height: 0 lets
     internal scrollers (grid + filter rail) own their own overflow. */
  height: 100%;
  min-height: 0;
  background: var(--color-surface-muted, #fafafa);
}
.gallery-island__body {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.gallery-island__main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: var(--space-5) var(--space-6);
}

.gallery-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.gallery-toolbar__title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.gallery-toolbar__title-actions { display: flex; gap: var(--space-2); }
.gallery-toolbar__heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.gallery-toolbar__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.gallery-toolbar__count {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.gallery-toolbar__count strong {
  color: var(--color-text);
  font-size: 1rem;
  margin-right: 0.25rem;
}
.gallery-toolbar__count-meta { color: var(--color-text-tertiary); margin-left: 0.25rem; }
.gallery-toolbar__group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}
.gallery-toolbar__field-label {
  font-weight: 500;
  color: var(--color-text-secondary);
}
.gallery-toolbar__pager { display: inline-flex; gap: 0.25rem; }
.gallery-toolbar__spacer { flex: 1; }

/* Inline select inside the toolbar — narrower than the page-form variant. */
.field__select--inline {
  height: 32px;
  padding: 0 1.75rem 0 0.5rem;
  font-size: 0.8125rem;
}

/* ---------- Filter panel (gallery variant) ---------- */

.filter-panel--gallery {
  flex-shrink: 0;
  width: 260px;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.filter-panel__group {
  margin: 0;
  padding: 0;
  border: 0;
}
.filter-panel__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-secondary);
  margin: 0 0 0.5rem;
}
.filter-panel__clear {
  background: none;
  border: 0;
  font: inherit;
  color: var(--color-primary);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.7rem;
}
.filter-panel__hint {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin: 0;
}
.filter-panel__day-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 220px;
  overflow-y: auto;
}
.filter-panel__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.125rem 0;
}
.filter-panel__day-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-panel__day-count {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-tertiary);
  font-size: 0.75rem;
}
/* Single-select day rail: the native radio takes brand red, never the
   browser's blue (D-12). */
.filter-panel__check input[type="radio"] { accent-color: var(--color-primary); margin: 0; }
/* A day whose kills the actor has submitted: name over a padlock line. */
.filter-panel__day-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.filter-panel__day-text .filter-panel__day-name { flex: none; }
.filter-panel__day-done {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-success-ink); /* success, one step darker: 11px text needs 4.5:1 (as .day-card__stamp) */
}
.filter-panel__day-done svg { flex: none; width: 12px; height: 12px; }
/* One plain-language line saying what a list tab holds (round 5, kill list):
   replaces tooltips and dismissable blurbs. */
.list-definition { margin: 0 0 var(--space-4); font-size: 0.875rem; color: var(--color-text-secondary); max-width: 70ch; }
/* Round 6: the kill list / selects tabs are status pills INSIDE the gallery
   column (above the images they filter), not a strip above the island.
   Unkilled = mid green hollow dot, Approved = deep green solid dot (same
   language as the grid's Unviewed / Viewed), Killed = red (.tab--killed).
   `.tab.tab--…` beats the neutral `.tabs--status .tab.is-active` fill defined later. */
.list-tabs { margin: 0 0 var(--space-3); padding: 0; }
.tabs--status .tab--unkilled::before,
.tabs--status .tab--approved::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: var(--radius-full); }
.tabs--status .tab--unkilled::before { box-shadow: inset 0 0 0 2px #2563EB; }
.tabs--status .tab--approved::before { background: #064E3B; }
.tabs--status .tab.tab--approved:not(.is-active):not([aria-current="page"]) { background: var(--color-success-bg); border-color: #A7F3D0; color: #065F46; }
/* Round 9: Unkilled is BLUE on every list (kill list, selects, totals, tallies,
   summary) — green means approved, red killed. (The day grid's own "Unkilled"
   group of Unviewed / Viewed stays green, as the owner set it in round 5.) */
.tabs--status .tab.tab--unkilled:not(.is-active):not([aria-current="page"]) { background: var(--color-info-bg); border-color: #BFDBFE; color: #1E40AF; }
.tabs--status .tab.tab--unkilled.is-active { background: #1D4ED8; border-color: #1D4ED8; }
.tabs--status .tab.tab--approved.is-active { background: #064E3B; border-color: #064E3B; }
.tabs--status .tab--unkilled.is-active::before { box-shadow: inset 0 0 0 2px #fff; }
.tabs--status .tab--approved.is-active::before { background: #fff; }
/* Round 6: always-visible production totals under a list page's title. */
.list-totals { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.list-totals__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-secondary); }
.list-totals__items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.list-totals__item { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; color: var(--color-text-secondary); }
.list-totals__count { font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.list-totals__item--killed::before,
.list-totals__item--unkilled::before,
.list-totals__item--approved::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); flex: none; }
.list-totals__item--killed::before { background: var(--color-error); }
.list-totals__item--unkilled::before { box-shadow: inset 0 0 0 2px #2563EB; }
.list-totals__item--approved::before { background: #064E3B; }
/* Round 5: the kill list / selects day rail fills the gallery's height
   instead of a 220 px scroll box. */
.filter-panel__day-list--fill { max-height: none; overflow-y: visible; }
/* Round 5: a submitted day reads "Submitted ✓" in green on the name line. */
.filter-panel__day-submitted {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-success-ink); /* success, one step darker: 11px text needs 4.5:1 */
}
.filter-panel__pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.filter-panel__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--color-gray-100);
  color: var(--color-text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--duration-base) var(--ease),
              color var(--duration-base) var(--ease);
}
.filter-panel__pill input { position: absolute; opacity: 0; pointer-events: none; }
.filter-panel__pill.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary-dark);
}
/* Form-control variants of the pill and segmented-control recipes. Wrap a
   real checkbox / radio in the label and its checked state drives the look —
   no JS state to drift, and the form posts natively. The JS-driven
   `.is-active` class keeps working everywhere else. */
.filter-panel__pill,
.view-toggle__btn { position: relative; }
.view-toggle__btn input { position: absolute; opacity: 0; pointer-events: none; }
.filter-panel__pill:hover:not(:has(input:checked)) { background: var(--color-gray-200); color: var(--color-text); }
.filter-panel__pill:has(input:checked) {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary-dark);
}
.view-toggle__btn:has(input:checked) { background: var(--color-gray-900); color: #fff; }
.filter-panel__pill:has(input:focus-visible) { box-shadow: var(--shadow-focus); border-color: var(--color-border-focus); }
.view-toggle__btn:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--color-border-focus); }
/* Larger sizes for a primary form choice rather than a side-rail filter. */
.filter-panel__pills--lg { gap: 0.5rem; }
.filter-panel__pills--lg .filter-panel__pill { padding: 0.375rem 0.875rem; font-size: 0.8125rem; font-weight: 500; }
.view-toggle--lg { height: 40px; }
.view-toggle--lg .view-toggle__btn { padding: 0 1rem; font-size: 0.875rem; }
.filter-panel__tag-input {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.filter-panel__tag-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* ---------- Image grid + cards ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 200px), 1fr));
  gap: var(--space-3);
}
.gallery-grid__skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 200px), 1fr));
  gap: var(--space-3);
}

.image-grid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--duration-base) var(--ease),
              border-color var(--duration-base) var(--ease),
              transform var(--duration-base) var(--ease);
}
.image-grid-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-gray-300);
}
.image-grid-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(192, 0, 0, 0.15);
}
.image-grid-card.is-removed { opacity: 0.55; }
.image-grid-card.is-removed .image-grid-card__thumb img {
  filter: grayscale(0.8);
}
.image-grid-card--skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-100) 0%,
    var(--color-gray-200) 50%,
    var(--color-gray-100) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  height: var(--thumb-size, 200px);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.image-grid-card__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-gray-100);
  border: 0;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}
.image-grid-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-base) var(--ease);
}
.image-grid-card:hover .image-grid-card__thumb img { transform: scale(1.03); }
.image-grid-card__missing {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-tertiary);
  font-size: 0.75rem;
}
.image-grid-card__check {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  padding: 0.125rem;
  z-index: 2;
  cursor: pointer;
  line-height: 0;
}
.image-grid-card__check input { width: 14px; height: 14px; cursor: pointer; }
.image-grid-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.625rem;
  gap: 0.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
}
.image-grid-card__name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-grid-card__day { color: var(--color-text-tertiary); font-size: 0.7rem; }

/* Thumbnail overlay — small status dots that ride the bottom-right of the
   thumbnail. Stacked horizontally and clipped against the thumbnail edge so
   they read as part of the image rather than the card chrome. */
.thumbnail-overlay {
  position: absolute;
  right: 0.375rem;
  bottom: 0.375rem;
  display: inline-flex;
  gap: 0.25rem;
  pointer-events: none;
}
.thumbnail-overlay__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.25rem;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
/* Selects are yellow (a "star"/gold signal) so brand red can belong to kills.
   Dark text, not white: white on yellow is ~1.5:1; gray-900 on --color-select
   (#FACC15) is ~12:1. */
.thumbnail-overlay__dot--selected {
  background: var(--color-select);
  color: var(--color-gray-900);
  text-shadow: none;
}

/* ---------- Select colour (owner 2026-11-15: "the select icons are not
   orange — they need to be yellow, across the board", and never an amber
   warning). Everything that means *select* uses the --color-select-* tokens,
   never cat.amber (identity) or --color-warning. On dark surfaces and photos a
   star is plain --color-select. On a light surface yellow alone is ~1.9:1, so
   a star there is --color-select-strong with a thin --color-select-edge
   outline (4.9:1 on white): it still reads yellow and its shape clears the
   3:1 non-text minimum.
   - `.select-star` — a text ★ on a light surface (tables, figures).
   - `.select-icon` — an SVG star on a light surface (buttons, asides, lists).
   - `.selects-chip` — "★ N selects": select tint + ink, a count, never an action. */
.select-star {
  color: var(--color-select-strong);
  -webkit-text-stroke: 0.75px var(--color-select-edge);
  paint-order: stroke fill;
}
.select-icon {
  color: var(--color-select-strong);
  stroke: var(--color-select-edge);
  stroke-width: 1.5px;
  stroke-linejoin: round;
  paint-order: stroke fill;
}
.selects-chip {
  /* Same geometry as `.cat-tag`, so it sits in the same rows. */
  display: inline-flex; align-items: center; gap: 0.375rem;
  height: 22px; padding: 0 0.625rem; border-radius: var(--radius-full);
  background: var(--color-select-tint); color: var(--color-select-ink);
  box-shadow: inset 0 0 0 1px rgba(161, 98, 7, 0.22);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap;
}
.selects-chip svg {
  flex: none; color: var(--color-select-strong);
  stroke: var(--color-select-edge); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke fill;
}
.thumbnail-overlay__dot--removed { background: var(--color-gray-700); }
/* 700-step categorical tokens, not 500: these dots carry white text, and
   teal-500 (#0D9488) only reaches ~3.0:1 against #fff. The 700 steps clear
   4.5:1. (Until 2026-09 these referenced undefined --cat-teal / --cat-indigo
   variables, so the raw 500-ish hex fallback always won.) */
.thumbnail-overlay__dot--caption { background: var(--color-cat-teal-700); }
.thumbnail-overlay__dot--tag { background: var(--color-cat-indigo-700); }
.thumbnail-overlay__dot--kill { background: var(--color-primary); }
/* Inline SVG glyph inside a dot (e.g. the tag icon before the tag count). */
.thumbnail-overlay__icon {
  width: 10px;
  height: 10px;
  margin-right: 0.125rem;
  flex-shrink: 0;
}

/* ---------- Bulk toolbar ---------- */

.bulk-toolbar {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gray-900);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0.75rem;
  /* Additive to the 0.5rem base padding so the bar clears the iOS home
     indicator / Android gesture bar when it sits at the bottom of the
     viewport. Falls back to the plain 0.5rem where env() is unsupported. */
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 40;
  animation: bulk-rise var(--duration-base) var(--ease);
}
@keyframes bulk-rise {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to   { transform: translate(-50%, 0);     opacity: 1; }
}
.bulk-toolbar__count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding-right: 0.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}
.bulk-toolbar__count strong { font-size: 0.95rem; }
.bulk-toolbar__count .btn-ghost {
  color: var(--color-gray-300);
}
.bulk-toolbar__count .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.bulk-toolbar__actions { display: flex; gap: 0.25rem; }
.bulk-toolbar__actions .btn { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: transparent; }
.bulk-toolbar__actions .btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.bulk-toolbar__actions .btn-ghost { background: transparent; }
/* The visible reason beside a disabled bulk action ("Every picked image is already killed"). */
.bulk-toolbar__note { align-self: center; font-size: 0.75rem; color: var(--color-gray-300); white-space: nowrap; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.94);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
}
/* Routed single-image page: the same dark viewer, but laid out in the normal
   document flow so the router (not a stacking context) owns Back, scroll
   restoration and focus return. Overrides the three positioning declarations
   above — `inset` is inert once position is static, but it is reset anyway so
   the cascade reads unambiguously. */
.lightbox { --lightbox-top-h: 56px; }
.lightbox--page {
  position: static;
  inset: auto;
  z-index: auto;
  /* A min, not a max: an in-flow page may legitimately grow past the viewport
     (a long drawer on a phone) and should scroll with the page. */
  min-height: 100vh;
  min-height: 100dvh;
}
/* The overlay variant relies on the fixed box to bound its children; in flow
   the body has no definite height, so `flex: 1` has nothing to grow into and
   `.lightbox__img { max-height: 100% }` would resolve to `none` (a 6000px
   portrait original would render at intrinsic size). Give the body a floor
   and the stage a DEFINITE height so the image fits the viewport. */
.lightbox--page .lightbox__body {
  min-height: calc(100vh - var(--lightbox-top-h));
  min-height: calc(100dvh - var(--lightbox-top-h));
}
.lightbox--page .lightbox__stage {
  height: calc(100vh - var(--lightbox-top-h));
  height: calc(100dvh - var(--lightbox-top-h));
}

.lightbox__top {
  height: var(--lightbox-top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox__top-left {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.lightbox__icon-btn {
  width: 32px; height: 32px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 1.25rem;
  cursor: pointer;
}
.lightbox__icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox__name {
  /* The routed page renders the file name as its <h1>; base.css gives
     headings the light-surface gray-900, so restate the dark-surface colour
     (and drop the heading margin) or it reads at ~1.2:1. */
  margin: 0;
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox__name-meta { color: rgba(255, 255, 255, 0.6); margin-left: 0.5rem; font-weight: 400; }
/* Owner 2026-11-17: centred, so the slimmer state pill ("Folder signed off",
   "Locked for delivery", 30 px) sits level with the taller Download / Details. */
.lightbox__top-actions { display: inline-flex; align-items: center; gap: 0.25rem; }
/* The translucent treatment is for the *secondary* buttons only. Scoped with
   :not(.btn-primary) because the descendant selector (0,2,0) would otherwise
   beat `.btn-primary` (0,1,0) and render a brand-red primary action (Kill) as
   a ghost. */
.lightbox__top-actions .btn:not(.btn-primary),
.lightbox__top-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: transparent;
}
.lightbox__top-actions .btn:not(.btn-primary):hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.lightbox__top-actions .btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
}
.lightbox__top-actions .btn-primary:hover:not(:disabled) { background: var(--color-primary-dark); }

.lightbox__body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.lightbox__stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-4);
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  cursor: zoom-in;
}
.lightbox__img.is-zoomed {
  cursor: zoom-out;
  max-width: none;
  max-height: none;
  transform: scale(1.8);
}
.lightbox__placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 0;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }

.lightbox__drawer {
  width: 360px;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.lightbox__section { display: flex; flex-direction: column; gap: 0.5rem; }
.lightbox__section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
.lightbox__section .field__input {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.1);
}
.lightbox__section .field__input::placeholder { color: rgba(255, 255, 255, 0.45); }
/* Dark-surface variant. `.btn-ghost`'s light-surface gray-700 text sits at
   ~2.2:1 on the slate-900 drawer; white at 72% opacity clears 4.5:1. The
   drawer already re-skins `.field__input` — its buttons need the same. */
.lightbox__drawer .btn-ghost { color: rgba(255, 255, 255, 0.72); }
.lightbox__drawer .btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.lightbox__section-actions { display: flex; gap: 0.25rem; }
.lightbox__tag-input { display: flex; gap: 0.25rem; }
.lightbox__tag-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.lightbox__hint { color: rgba(255, 255, 255, 0.5); font-size: 0.8125rem; }
/* A quiet text link inside the dark drawer (e.g. "See your summary"). */
.lightbox__link { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.lightbox__link:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 2px; }
.lightbox__meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  margin: 0;
}
.lightbox__meta dt { color: rgba(255, 255, 255, 0.55); font-weight: 500; }
.lightbox__meta dd { margin: 0; color: #f1f5f9; }
.lightbox__viewers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.8125rem;
}
.lightbox__viewer-meta { color: rgba(255, 255, 255, 0.55); margin-left: 0.25rem; }
.lightbox__viewer--killed strong { color: #fca5a5; }
.lightbox__outstanding summary {
  cursor: pointer;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}
.lightbox__outstanding ul {
  list-style: none;
  padding: 0.5rem 0 0;
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* ---------- Keyboard shortcut chips ---------- */

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  background: var(--color-gray-100);
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--color-text);
}
/* Lightbox drawer "Keyboard" list: one shortcut per row, key caps in a
   fixed-width column so labels line up and caps never touch. */
.lightbox__keys { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: 0.8125rem; color: rgba(255, 255, 255, 0.72); }
.lightbox__keys li { display: flex; align-items: center; gap: var(--space-3); }
.lightbox__keys-caps { display: inline-flex; gap: var(--space-1); min-width: 4.5rem; }
.kbd-help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.kbd-help-table th {
  text-align: left;
  padding: 0.5rem 0;
  font-weight: 500;
  width: 1%;
  white-space: nowrap;
}
.kbd-help-table td {
  padding: 0.5rem 0 0.5rem 1rem;
  color: var(--color-text-secondary);
}
.kbd-help-sep { display: inline-block; margin: 0 0.25rem; color: var(--color-text-tertiary); }

/* Small inline-dismiss button paired with the existing .cat-tag chip. The
   chip body itself is defined upstream (cat-indigo / cat-teal / etc.) —
   we only add the close-button affordance for the gallery filter chips. */
.cat-tag__remove {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0 0 0.125rem;
  margin-left: 0.125rem;
  opacity: 0.7;
}
.cat-tag__remove:hover { opacity: 1; }

/* Toast entrance animation — the recipe body itself is defined upstream
   (.toast / .toast-stack at the design-language top) which uses dark
   gray-900 with white text. We reuse it from the React island so the
   visual contract is single-sourced. */
@keyframes toast-in {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
/* The admin gallery island's stack is `.toast-stack--island` (top right). It
   must not share `.toast-stack--gallery`, the talent app's bottom-centre stack:
   the two positions combined stretched an empty stack over the upload modal. */
.toast-stack--gallery .toast,
.toast-stack--island .toast { animation: toast-in var(--duration-base) var(--ease); }

/* Small generic spinner used by the toolbar count + lightbox stage. */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner-rot 0.8s linear infinite;
}
@keyframes spinner-rot {
  to { transform: rotate(360deg); }
}

/* ---------- Modal — large variant (gallery upload) ---------- */
.modal--lg { max-width: 720px; width: calc(100vw - 4rem); }

.upload-modal__body { display: flex; flex-direction: column; gap: var(--space-3); }
.upload-modal__controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr);
  gap: var(--space-3);
}
.upload-modal__field { display: flex; flex-direction: column; gap: 0.25rem; }
.upload-modal__loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.upload-modal__dashboard {
  /* Uppy injects its own dashboard chrome here. We just reserve a sensible
     minimum height so the loading state and empty state don't collapse. */
  min-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.upload-modal__hint {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  flex: 1;
  margin-right: var(--space-3);
}

/* Per-file upload outcome, inside the summary .alert. A batch can be 200
   files, so the list scrolls rather than pushing the modal footer off
   screen; each row is filename + reason so nothing fails silently. */
.upload-modal__summary-note {
  font-size: 0.75rem;
  margin-top: var(--space-1);
}
.upload-modal__summary-heading {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: var(--space-2);
}
.upload-modal__summary-list {
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
  max-height: 10rem;
  overflow-y: auto;
  font-size: 0.75rem;
}
.upload-modal__summary-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}
.upload-modal__summary-list li:last-child { border-bottom: 0; }
.upload-modal__summary-name {
  font-family: var(--font-mono, ui-monospace, monospace);
  word-break: break-all;
}
.upload-modal__summary-reason {
  color: var(--color-text-secondary);
  text-align: right;
  flex: none;
  max-width: 60%;
}

.upload-modal__empty {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted, #fafafa);
}
.upload-modal__empty-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Modal header variant with an inline icon-only close affordance. The
   default `.modal__header` only carries the title; this variant flexes it
   left and pins the `×` button to the right edge with the standard
   icon-button treatment so any modal can opt in by adding the modifier. */
.modal__header--with-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease),
              color var(--duration-base) var(--ease);
}
.modal__close:hover { background: var(--color-gray-100); color: var(--color-text); }
.modal__close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Gallery toolbar meatball + menu positioning + counts chip. */
.gallery-toolbar__menu-wrap { position: relative; }
.gallery-toolbar__meatball {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.gallery-toolbar__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 280px;
}
.gallery-toolbar__menu-header {
  padding: 0.375rem 0.75rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-tertiary);
}
.gallery-toolbar__menu .menu__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.gallery-toolbar__menu .menu__item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.menu__count {
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--color-gray-100);
  color: var(--color-text-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
}

/* ---------- Accessibility utilities ---------- */

/* Visually hide a label while leaving it in the accessibility tree. Use for
   the text behind an icon-only control and for the meaning of a status dot
   (`.thumbnail-overlay__dot` is pointer-events:none and conveys state by
   colour alone — the word has to be somewhere). Never use `display:none` or
   `visibility:hidden` for this: both remove the node from the a11y tree. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Same, but revealed when the element itself takes focus — for a control that
   is only useful to keyboard users (`.skip-link` builds on this). */
.visually-hidden--focusable:focus,
.visually-hidden--focusable:focus-within {
  position: static !important;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
}

/* First focusable element on the page; jumps past the chrome to <main>.
   Off-screen until focused, then pinned top-left above every chrome layer
   (.app-header is z-index 50, the side-nav drawer 50 — this sits above both). */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transform: translateY(-120%);
  padding: 0.625rem 1rem;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-md) 0;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: transform var(--duration-base) var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  text-decoration: none;
}

/* ---------- Phone layout (admin) ----------

   Everything in this section is scoped to `max-width: 767px` — the same
   breakpoint at which the side nav becomes a drawer. Nothing here may change
   a desktop or tablet (≥768px) render; desktop styling lives in the recipes
   above and is untouched.

   Stacked tables (`.table--stack`)
   --------------------------------
   On a phone a 9-column admin table either crushes or scrolls sideways, and a
   reviewer working from a phone loses the row they were reading. Add
   `table--stack` to a `.table` and, under 768px only, each row becomes a
   small card: the header row is hidden and every cell shows its column name
   (from `data-label`) on the left with its value on the right. Desktop keeps
   the ordinary table.

   `data-label` is filled in from the <thead> by `app/static/js/admin.js`
   (grouped headers become "Group · Sub"), so templates rarely set it by hand.
   A <th data-label="…"> overrides the header text; `data-label=""` on a cell
   drops its label. Cell hooks, all optional:

     .stack-title    the row's name — first line of the card, no label.
     .stack-lead     a leading control (row checkbox) before the title.
     .stack-actions  the row menu / buttons — top-right of the card.
     .stack-block    label above, value below at full width (meters, chip
                     lists, multi-button cells).
     .stack-hide     not shown on a phone (drag handles, internal IDs,
                     columns the card already says elsewhere).

   admin.js also marks a cell with nothing in it `.stack-empty`, which is not
   shown on a phone, so a card never carries a bare label.

   admin.js also infers `.stack-title` (the cell holding `.row-link`) and
   `.stack-actions` (a cell holding only a row menu) when a template has not
   set them, so a plain admin list stacks sensibly with just the table class.
   Cells spanning several columns (empty states) render full width.

   Utility: `.mobile-hide` hides an element on a phone only (long help copy,
   eyebrows). */

/* Gallery "Filters & sort" button: phone-only (the rail is always shown
   on desktop). */
.gallery-filter-toggle { display: none; }
/* "Choose image…" button + file name that stand in for a drop box on a phone
   (`.file-pick`, the production featured image). Desktop shows the drop box
   with the native input, so these are hidden there. */
.file-pick__row { display: none; }
/* Production name that replaces the breadcrumb in the app bar on a phone
   (`_partials/admin_header.html`). Hidden on desktop, which keeps the trail. */
.app-bar__title--phone { display: none; }

@media (max-width: 767px) {
  .mobile-hide { display: none !important; }

  /* The drawer's drop shadow bled onto the left edge of every page while the
     drawer was closed (it sits just off-canvas). Only cast it when open. */
  .side-nav--drawer:not(.is-mobile-open) { box-shadow: none; }

  /* Visually-hidden text (`.sr-only`, position: absolute) inside a scrolled
     table escaped its wrapper and widened the whole page, because the
     wrapper was not its containing block. */
  .table-scroll { position: relative; }

  .table--stack,
  .table--stack > tbody { display: block; width: 100%; min-width: 0; }
  .table--stack.table--wide,
  .table--stack.table--wide-sm { min-width: 0; }
  .table--stack > thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .table--stack > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }
  .table--stack > tbody > tr:hover > td { background: transparent; }
  /* Cells are flow-root blocks with the label floated left, rather than flex
     boxes: a value made of several pieces (a name with an email under it, a
     badge plus a dropdown) then flows as it would in the table cell instead
     of every child becoming a separate flex item. */
  .table--stack > tbody > tr > td {
    display: flow-root;
    flex: 1 1 100%;
    min-width: 0;
    padding: 0.3125rem 0;
    border: 0;
    text-align: right;
    white-space: normal;
    /* Undo the desktop pinned column — nothing scrolls sideways here. */
    position: static;
    box-shadow: none;
    background: transparent;
  }
  /* `.table .cell-sticky` (0,2,0) outranks the reset above. */
  .table--stack > tbody > tr > td.cell-sticky {
    position: static;
    box-shadow: none;
    background: transparent;
  }
  .table--stack > tbody > tr > td::before {
    content: attr(data-label);
    float: left;
    max-width: 60%;
    margin-right: var(--space-3);
    padding-top: 0.125rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-gray-500);
  }
  .table--stack > tbody > tr > td[data-label=""]::before,
  .table--stack > tbody > tr > td:not([data-label])::before { content: none; }

  /* Row name: the first line of the card. */
  .table--stack > tbody > tr > td.stack-title {
    order: -2;
    flex: 1 1 0;
    text-align: left;
    font-size: 0.9375rem;
    color: var(--color-gray-900);
    padding-bottom: var(--space-2);
  }
  .table--stack > tbody > tr > td.stack-title::before { content: none; }
  .table--stack > tbody > tr > td.stack-title .row-link,
  .table--stack > tbody > tr > td.stack-title .truncate { max-width: none; white-space: normal; }
  .table--stack > tbody > tr > td.stack-lead {
    order: -3;
    flex: 0 0 auto;
    padding-bottom: var(--space-2);
  }
  .table--stack > tbody > tr > td.stack-lead::before { content: none; }
  .table--stack > tbody > tr > td.stack-actions {
    order: -1;
    flex: 0 0 auto;
    margin-left: auto;
    padding-bottom: var(--space-2);
  }
  .table--stack > tbody > tr > td.stack-actions::before { content: none; }
  /* Several buttons in the action cell: let them wrap under the title row
     instead of squeezing it. */
  .table--stack > tbody > tr > td.stack-actions.stack-block {
    order: 0;
    flex: 1 1 100%;
    margin-left: 0;
    padding-top: var(--space-2);
  }
  .table--stack > tbody > tr > td.stack-actions.stack-block > * { align-items: flex-start; }

  /* Label above, value below, full width. */
  .table--stack > tbody > tr > td.stack-block { text-align: left; }
  .table--stack > tbody > tr > td.stack-block::before {
    float: none;
    display: block;
    max-width: none;
    margin: 0 0 var(--space-1);
  }
  .table--stack .cell-meter { min-width: 0; }
  .table--stack > tbody > tr > td:not(.stack-block) .cell-meter {
    display: inline-block;
    width: 9.5rem;
    text-align: left;
  }

  /* Column-group dividers are a desktop scan aid; inside a card they read
     as stray rules. */
  .table--stack > tbody > tr > td.col-divide { border-left: 0; }

  /* Full-width rows: empty states and "no limit" spans. */
  .table--stack > tbody > tr > td[colspan]:not([data-label]) { text-align: left; }
  .table--stack > tbody > tr > td[colspan]:only-child { padding: 0; }

  .table--stack > tbody > tr > td.stack-empty,
  .table--stack > tbody > tr > td.stack-hide,
  .table--stack > tbody > tr > td.hidden { display: none; }

  /* A stacked table no longer needs the bleed-to-edge scroll wrapper. */
  .table-scroll:has(> .table--stack) { overflow-x: visible; }
  /* …nor the frozen variant's capped-height scroll box: a stack of cards
     scrolls with the page, and its sticky header is hidden anyway. */
  .table-scroll--frozen:has(> .table--stack) { overflow: visible; max-height: none; }


  /* App bar on a phone: one line. Inside a production the trail is swapped
     for just the production's name (the Section picker below names the
     section); elsewhere the trail stays but no longer wraps — it scrolls
     sideways within the bar, as `.app-bar__crumbs` already allows. */
  .app-bar__crumbs--phone-title > nav { display: none; }
  .app-bar__title--phone {
    display: block;
    color: var(--color-text);
    text-decoration: none;
  }
  .app-bar__crumbs .crumbs { flex-wrap: nowrap; }

  /* Gallery island: the 260px filter rail would leave the grid ~100px wide.
     Stack the body, fold the rail behind a "Filters & sort" button, and keep
     at least two thumbnails per row whatever the size slider says. */
  .gallery-island__body { flex-direction: column; }
  .gallery-filter-toggle {
    display: inline-flex;
    align-self: flex-start;
    margin: var(--space-3) var(--space-4) 0;
  }
  .gallery-island__body .filter-panel--gallery {
    display: none;
    width: auto;
    max-height: 60vh;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    margin-top: var(--space-3);
  }
  .gallery-island__body.is-filters-open .filter-panel--gallery { display: flex; }
  .gallery-island__main { padding: var(--space-3) var(--space-4); }
  .gallery-toolbar { padding: var(--space-3) var(--space-4); }
  .gallery-toolbar__eyebrow { display: none; }
  .gallery-grid,
  .gallery-grid__skeleton {
    grid-template-columns: repeat(auto-fill, minmax(min(var(--thumb-size, 200px), calc(50% - var(--space-3))), 1fr));
  }

  /* Gallery bulk bar: full width along the bottom; the action buttons
     scroll sideways rather than running off both edges. */
  .bulk-toolbar {
    left: var(--space-2);
    right: var(--space-2);
    bottom: var(--space-2);
    transform: none;
    max-width: none;
    animation-name: bulk-rise-phone;
  }
  .bulk-toolbar__actions {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .bulk-toolbar__actions .btn { flex-shrink: 0; white-space: nowrap; }

  /* Image viewer: image on top, details underneath (scroll down to reach
     caption / tags / review activity), and the action buttons on their own
     sideways-scrolling row under the file name. */
  /* Opaque: the stacked viewer is taller than the gallery behind it. */
  .lightbox:not(.lightbox--page) { overflow-y: auto; background: #0f172a; }
  .lightbox__top {
    height: auto;
    flex-wrap: wrap;
    row-gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
  }
  .lightbox__top-left { flex: 1 1 100%; }
  .lightbox__top-actions {
    flex: 1 1 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .lightbox__top-actions .btn { flex-shrink: 0; white-space: nowrap; }
  .lightbox__body { flex-direction: column; flex: 0 0 auto; }
  .lightbox__stage,
  .lightbox--page .lightbox__stage {
    flex: 0 0 auto;
    height: 60vh;
    height: 60dvh;
    padding: var(--space-2);
  }
  .lightbox__nav--prev { left: var(--space-2); }
  .lightbox__nav--next { right: var(--space-2); }
  .lightbox__drawer {
    width: auto;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: visible;
  }

  /* File picker on a phone: no dashed drop box (drag and drop means nothing
     on a touch screen, and beside the preview it was squeezed to a sliver).
     A plain "Choose image…" button opens the picker, the chosen file's name
     sits beside it, and the current image goes full width underneath. */
  .file-pick { flex-direction: column; gap: var(--space-3); }
  .file-pick__drop.dropzone {
    min-height: 0 !important;
    padding: 0;
    border: 0;
    background: transparent;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .file-pick__input {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .file-pick__row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    max-width: 100%;
  }
  .file-pick__btn { flex-shrink: 0; }
  .file-pick__drop .dropzone__hint { text-align: left; margin: 0; }
  .file-pick__name {
    min-width: 0;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-pick__input:focus-visible + .file-pick__row .file-pick__btn {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
  .file-pick__preview { width: 100% !important; max-width: 20rem; }

  /* Long unbroken strings (route paths in <code>, slugs, emails) and the
     `min-width: auto` of grid / flex children pushed cards past the screen
     edge. Let them shrink and break instead. */
  #main-content .grid > * { min-width: 0; }
  #main-content code { overflow-wrap: anywhere; }

  /* Page headers: the desktop h1 sizes are generous for a 390px screen. */
  #main-content h1.text-3xl { font-size: 1.5rem; line-height: 2rem; }
  #main-content .card__header { flex-wrap: wrap; gap: var(--space-2); }
}

/* The desktop bulk-rise keyframes carry the bar's translateX(-50%) centring,
   which the phone bar does not use. */
@keyframes bulk-rise-phone {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ---------- Touch targets ---------- */

/* Coarse pointers (finger, stylus) need a 44x44 CSS-px target (WCAG 2.5.5 /
   iOS HIG). These controls are sized for a mouse in the base recipes; grow
   them here only, so desktop geometry and alignment are untouched.
   Growth is via min-height / min-width and padding — never a fixed height —
   so nothing that is already ≥44px changes. */
@media (pointer: coarse) {
  .tab {
    min-height: 44px;
  }

  .view-toggle { height: auto; }
  .view-toggle__btn {
    min-height: 44px;
    padding: 0 1rem;
  }

  .app-bar__icon-btn {
    width: 44px;
    height: 44px;
  }

  .lightbox__icon-btn {
    width: 44px;
    height: 44px;
  }

  /* The checkbox itself stays 14px so the tile crop is unchanged; the label
     wrapper it sits in becomes the 44px hit area, padded off the corner so
     the box stays optically where it was. */
  .image-grid-card__check {
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 44px;
    min-height: 44px;
    top: 0;
    left: 0;
    padding: 0.375rem;
    background: transparent;
  }
  .image-grid-card__check input {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92);
  }

  .toast__action { min-height: 44px; }
}

/* ===========================================================================
   Release grid — people × days (production Releases tab)
   ---------------------------------------------------------------------------
   Rows are people in release groups, columns are days. The person column and
   the day header stick while the box scrolls both ways. Every square is one
   on / off switch — red: can see the day, grey: can't — the same reading as
   the `.switch` recipe, with the person's tagged-image count for that day in
   small grey type underneath. Deliberately no other colour: unsaved state is
   carried by the save bar and the leave-page guard, not by the squares.
   =========================================================================== */
/* Controls on this page are shown and hidden with the `hidden` attribute;
   display utilities (`flex`, `.btn`) would otherwise override it. */
.release-matrix [hidden] { display: none !important; }
.release-grid-wrap {
  overflow: auto;
  max-height: calc(100vh - 15rem);
  min-height: 16rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.release-grid { min-width: max-content; padding-bottom: var(--space-2); }
.release-grid.hide-drafts [data-draft] { display: none; }
.release-grid__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px var(--space-3) 4px 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
}
.release-grid__row[hidden] { display: none; }
.release-grid__row--head {
  position: sticky;
  top: 0;
  z-index: 3;
  align-items: stretch;
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom-color: var(--color-border);
}
/* Group header rows: taller, set apart from the group above, tinted with the
   group's identity hue (the same as its "All …" chip in the toolbar) and a
   solid accent down the left edge. */
.release-grid__row--group {
  --rg-tint: var(--color-gray-50);
  --rg-accent: var(--color-gray-400);
  --rg-ink: var(--color-text);
  min-height: 3.25rem;
  margin-top: var(--space-5);
  background: var(--rg-tint);
  border-top: 1px solid var(--color-border);
  border-bottom-color: var(--color-border);
}
.release-grid__row--head + .release-grid__row--group { margin-top: 0; border-top: 0; }
/* Group identity hues, shared by the grid's group rows and the By day cards. */
.release-grid__row--group.cat-indigo, .release-detail__section.cat-indigo { --rg-tint: var(--color-cat-indigo-100); --rg-accent: var(--color-cat-indigo-500); --rg-ink: var(--color-cat-indigo-700); }
.release-grid__row--group.cat-teal,   .release-detail__section.cat-teal   { --rg-tint: var(--color-cat-teal-100);   --rg-accent: var(--color-cat-teal-500);   --rg-ink: var(--color-cat-teal-700); }
.release-grid__row--group.cat-amber,  .release-detail__section.cat-amber  { --rg-tint: var(--color-cat-amber-100);  --rg-accent: var(--color-cat-amber-500);  --rg-ink: var(--color-cat-amber-700); }
.release-grid__row--group .release-grid__name { box-shadow: inset 4px 0 0 var(--rg-accent); padding-left: var(--space-2); }

.release-grid__row.is-selected { background: var(--color-gray-100); }
.release-grid__name {
  position: sticky;
  left: 0;
  z-index: 2;
  flex: 0 0 16.5rem;
  width: 16.5rem;
  box-sizing: border-box;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--space-3);
  background: inherit;
}
.release-grid__name input[type="checkbox"],
.release-grid__day input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--color-primary); cursor: pointer; }
.release-grid__person {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: var(--color-text);
  cursor: pointer;
}
.release-grid__person strong { font-size: 0.8125rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.release-grid__person span { font-size: 0.7rem; color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.release-grid__person:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.release-grid__group-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.release-grid__group-label { font-size: 0.9375rem; font-weight: 700; color: var(--rg-ink, var(--color-text)); white-space: nowrap; }
/* Phones: a narrower name column (names ellipsise, emails drop) so more
   days fit beside it. */
@media (max-width: 639px) {
  .release-grid__name { flex-basis: 9.5rem; width: 9.5rem; padding: 0 var(--space-2); gap: var(--space-2); }
  .release-grid__person span { display: none; }
  /* The chip's tint already says which group; the dot and padding go so
     all three fit on one line. */
  .release-pick { padding: 6px 10px; }
  .release-pick .cat-dot { display: none; }
}

/* "All production accounts / actors / viewers" chips: tinted with the
   group's identity hue so they read as the same thing as the header rows.
   A deliberate, documented exception to "no categorical colour on buttons":
   they pick a group, they do not release anything on their own. */
.release-pick { font-weight: 600; border-color: transparent; }
.release-pick.cat-indigo { background: var(--color-cat-indigo-100); color: var(--color-cat-indigo-700); }
.release-pick.cat-teal   { background: var(--color-cat-teal-100);   color: var(--color-cat-teal-700); }
.release-pick.cat-amber  { background: var(--color-cat-amber-100);  color: var(--color-cat-amber-700); }
.release-pick:hover:not(:disabled) { filter: brightness(0.96); }
.release-pick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.release-grid__day {
  flex: 0 0 44px;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Breathing room between the day name and the first group below. */
  padding: 4px 0 10px;
  border-radius: var(--radius-md);
}
.release-grid__day.is-selected { background: var(--color-gray-200); }
.release-grid__day-name {
  max-width: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.75rem/1.2 var(--font-sans, inherit);
  color: var(--color-text);
  text-align: center;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--color-gray-300);
  text-underline-offset: 3px;
  cursor: pointer;
}
.release-grid__draft { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; color: var(--color-warning); }
.release-grid__sees {
  flex: 0 0 4.5rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}
.rcell, .rgroup {
  flex: 0 0 44px;
  width: 44px;
  min-height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
}
.rcell:hover, .rgroup:hover { background: var(--color-gray-100); }
.rcell__n {
  min-height: 0.75rem;
  font-size: 0.6875rem;
  line-height: 1;
  color: var(--color-gray-500);
  font-variant-numeric: tabular-nums;
}
/* The switch drawn inside a square (and in the legend). */
.rtoggle {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 28px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-gray-300);
  transition: background-color var(--duration-base) var(--ease);
}
.rtoggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.25);
  transition: left var(--duration-base) var(--ease);
}
.rcell.is-on .rtoggle, .rgroup.is-on .rtoggle, .rtoggle.is-on { background: var(--color-primary); }
.rcell.is-on .rtoggle__thumb, .rgroup.is-on .rtoggle__thumb, .rtoggle.is-on .rtoggle__thumb { left: 14px; }
.rcell[data-draft], .rgroup[data-draft] { opacity: 0.5; }
/* Inside the ticked people × days: what a bulk Release / Unrelease will touch. */
.rcell.is-sel { box-shadow: inset 0 0 0 2px var(--color-gray-300); }
.rcell:focus-visible, .rgroup:focus-visible, .release-grid__day-name:focus-visible, .release-grid__person:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Bulk bar under the toolbar (dark surface): the selection, an optional
   "For" group switch, Release / Unrelease, and a sentence saying what each
   does. Buttons need their own colours here — `.btn` has none of its own. */
.release-bulk { background: var(--color-gray-900); color: #fff; padding: var(--space-2) var(--space-3); }
.release-bulk__row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
/* Title and hint stack on the left; the For switch and buttons sit centred
   against both lines, not level with the title. */
.release-bulk__text { flex: 1 1 16rem; min-width: 0; }
.release-bulk__title { display: block; font-size: 0.875rem; }
.release-bulk__who { display: inline-flex; align-items: center; gap: var(--space-2); }
.release-bulk__label { font-size: 0.75rem; color: var(--color-gray-300); }
.release-bulk__actions { display: inline-flex; gap: var(--space-2); }
.release-bulk .btn { color: #fff; background: rgba(255, 255, 255, 0.10); border-color: transparent; }
.release-bulk .btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18); }
.release-bulk .btn-primary { background: var(--color-primary); }
.release-bulk .btn-primary:hover:not(:disabled) { background: var(--color-brand-600); }
.release-bulk .release-bulk__clear { background: transparent; color: var(--color-gray-300); }
.release-bulk__hint { margin: 2px 0 0; font-size: 0.75rem; color: var(--color-gray-300); }
.release-bulk__hint:empty { display: none; }
.release-bulk .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.release-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); align-items: center; font-size: 0.75rem; color: var(--color-text-secondary); }

/* ===========================================================================
   Release detail — the Releases tab's "By day" and "By person" views
   ---------------------------------------------------------------------------
   One day (everyone, by group) or one person (every day) as plain switch
   rows, in a card under the view tabs. A picker row at the top moves between
   days or people.
   =========================================================================== */
.release-detail { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-5) var(--space-6); }
.release-detail[hidden] { display: none; }
.release-detail__picker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
.release-detail__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) 0; }
.release-detail__title { margin: 0; font-size: 1.25rem; font-weight: 700; }
/* Focus lands on the title when a day or person opens (tabindex="-1") so
   screen readers announce it; it is not a control, so no ring. */
.release-detail__title:focus { outline: none; box-shadow: none; }
.release-detail__meta { margin: var(--space-1) 0 0; font-size: 0.8125rem; color: var(--color-text-secondary); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.release-detail__body { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
.release-detail__section { border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-3) var(--space-4); }
.release-detail__section-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.release-detail__section-head h4 { margin: 0; flex: 1; font-size: 0.875rem; font-weight: 600; }
/* By day: a group's card gets a header band in the group's hue (the same
   tint and left accent as the grid's group row); the body stays white so
   the switches are the only colour where decisions are made. */
.release-detail__section--group {
  --rg-tint: var(--color-gray-50);
  --rg-accent: var(--color-gray-400);
  --rg-ink: var(--color-text);
  padding: 0;
  overflow: hidden;
}
.release-detail__section--group .release-detail__section-head {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--rg-tint);
  box-shadow: inset 4px 0 0 var(--rg-accent);
  border-bottom: 1px solid var(--color-border);
}
.release-detail__section--group .release-detail__section-head h4,
.release-detail__section--group .release-detail__section-head span { color: var(--rg-ink); }
.release-detail__section-body { padding: var(--space-3) var(--space-4); }
.release-detail__note { margin: var(--space-2) 0 0; font-size: 0.8rem; color: var(--color-text-secondary); }
/* By day: name, status chip and the everyone buttons share one line. */
.release-detail__head--inline { align-items: center; }
.release-detail__title-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); min-width: 0; }
.release-detail__note--under { margin: calc(-1 * var(--space-2)) 0 var(--space-4); }
.release-detail__row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border-subtle); }
.release-detail__row:last-child { border-bottom: 0; }
.release-detail__row-text { flex: 1; min-width: 0; font-size: 0.8125rem; }
.release-detail__row-text small { display: block; font-size: 0.75rem; color: var(--color-text-secondary); }

/* ---------- Section switcher (production header on narrow screens) ----------
   The production header carries both the .tabs row and a .section-switcher.
   While the tabs fit, the switcher is hidden. When they don't (admin.js adds
   .is-collapsed; a phone-width media query sets the same state up front),
   the row keeps its width but drops to zero height and out of the
   accessibility tree, and the switcher shows: one full-width button naming
   the current section that opens a .menu of every section. */
.section-switcher { display: none; }
/* Eight sections: slightly tighter tabs keep the row whole on a 1280 px
   laptop beside the side nav, so the switcher is for phones, tablets and
   narrow windows. */
.production-header__tabs { gap: 0; }
.production-header__tabs .tab { padding-left: 0.75rem; padding-right: 0.75rem; }
.section-switcher__toggle { width: 100%; justify-content: space-between; }
.section-switcher__current { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; font-weight: 600; }
.section-switcher__current > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-switcher__menu { position: absolute; z-index: 40; }
.section-switcher__menu .menu__item { min-height: 44px; font-size: 0.9375rem; }
.section-switcher__menu .menu__item svg { width: 16px; height: 16px; }
.section-switcher__menu .menu__item.is-current { color: var(--color-primary); font-weight: 600; }
.section-switcher__menu .menu__item.is-current svg { opacity: 1; }
.section-switcher__tick { margin-left: auto; }
.production-header.is-collapsed .section-switcher { display: block; }
.production-header.is-collapsed .production-header__tabs {
  height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; visibility: hidden;
}
@media (max-width: 639px) {
  .production-header .section-switcher { display: block; }
  .production-header .production-header__tabs {
    height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; visibility: hidden;
  }
}

/* =====================================================================
   TALENT APP RECIPES — promoted from the storyboard (2026-11-07)
   ---------------------------------------------------------------------
   Every rule below was a stub in docs/ui-refactor/proposal/ (proposal.css,
   frames/01-shared-stubs.css, frames/30, 45, 52). Panel 2 decision 12:
   promote them here, in one place, before any app-react `ui/` primitive is
   built on them. Storyboard-only scaffolding (`.sb-*`, `.is-coarse`) was
   NOT promoted; the real `@media (pointer: coarse)` rules replace it.
   Documented in components.md § "Talent app recipes".
   ===================================================================== */

/* ---------- Status tabs: pills + the "Unkilled" group ----------
   Markup: <nav aria-label="Image status"> of links; aria-current="page" on
   the selected one. The group label is a real element and the accessible
   name of a role="group" wrapper. Selected = the dark `.view-toggle` fill,
   never brand red (red means killed on this screen). */
.tabs--status {
  border-bottom: 0;
  gap: var(--space-2);
  align-items: center;
  padding: 4px 2px;
}
.tabs--status .tab {
  min-height: 36px;
  text-decoration: none;
  padding: 0.375rem 0.875rem;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-weight: 500;
}
.tabs--status .tab:hover { color: var(--color-text); border-color: var(--color-gray-300); }
.tabs--status .tab.is-active,
.tabs--status .tab[aria-current="page"] {
  background: var(--color-gray-900);
  border-color: var(--color-gray-900);
  color: #fff;
  font-weight: 600;
}
.tabs--status .tab.is-active .tab__count,
.tabs--status .tab[aria-current="page"] .tab__count { background: rgba(255, 255, 255, 0.18); color: #fff; }
.tabs--status .tab:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.tabs__group {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--color-gray-100);
}
.tabs__group-label {
  padding: 0 0.5rem 0 0.625rem;
  color: var(--color-gray-700);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.tabs--status .tabs__group .tab { border-color: transparent; background: transparent; min-height: 32px; }
.tabs--status .tabs__group .tab:hover { background: rgba(255, 255, 255, 0.7); }
.tabs--status .tabs__group .tab.is-active,
.tabs--status .tabs__group .tab[aria-current="page"] { background: var(--color-gray-900); border-color: var(--color-gray-900); }
.tabs--status .tabs__group .tab:not(.is-active):not([aria-current="page"]) .tab__count { background: var(--color-surface); }
/* Status colour (round 5): the "Unkilled" group reads green, Killed reads
   red, All stays neutral. Inside the group, Unviewed (mid green, hollow dot)
   and Viewed (deep green, solid dot) differ in both fill and dot shape so
   they never rely on colour alone. Every selected fill keeps white text at
   ≥ 5.4:1. */
.tabs--status .tabs__group--unkilled { background: var(--color-success-bg); box-shadow: inset 0 0 0 1px #A7F3D0; }
.tabs--status .tabs__group--unkilled .tabs__group-label { color: var(--color-success-ink); }
.tabs--status .tab--unviewed::before,
.tabs--status .tab--viewed::before,
.tabs--status .tab--killed::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: var(--radius-full);
}
.tabs--status .tab--unviewed::before { box-shadow: inset 0 0 0 2px #059669; }
.tabs--status .tab--viewed::before { background: #064E3B; }
.tabs--status .tab--killed::before { background: var(--color-error); }
.tabs--status .tabs__group .tab--unviewed:not(.is-active):not([aria-current="page"]),
.tabs--status .tabs__group .tab--viewed:not(.is-active):not([aria-current="page"]) { color: #065F46; }
.tabs--status .tabs__group .tab--unviewed.is-active,
.tabs--status .tabs__group .tab--unviewed[aria-current="page"] { background: var(--color-success-ink); border-color: var(--color-success-ink); }
.tabs--status .tabs__group .tab--viewed.is-active,
.tabs--status .tabs__group .tab--viewed[aria-current="page"] { background: #064E3B; border-color: #064E3B; }
.tabs--status .tab--unviewed.is-active::before,
.tabs--status .tab--unviewed[aria-current="page"]::before { box-shadow: inset 0 0 0 2px #fff; }
.tabs--status .tab--viewed.is-active::before,
.tabs--status .tab--viewed[aria-current="page"]::before { background: #fff; }
.tabs--status .tab--killed:not(.is-active):not([aria-current="page"]) { background: var(--color-error-bg); border-color: #FECACA; color: #991B1B; }
.tabs--status .tab--killed:not(.is-active):not([aria-current="page"]):hover { border-color: #FCA5A5; }
.tabs--status .tab--killed.is-active,
.tabs--status .tab--killed[aria-current="page"] { background: var(--color-error); border-color: var(--color-error); }
.tabs--status .tab--killed.is-active::before,
.tabs--status .tab--killed[aria-current="page"]::before { background: #fff; }
@media (pointer: coarse) {
  .tabs--status .tab,
  .tabs--status .tabs__group .tab { min-height: 44px; }
  .tabs--status .tabs__group { padding: 2px; }
}
/* Status tabs WRAP instead of scrolling sideways out of sight (a hidden
   "All" pill at 390 px). On a phone the pills and the "Unkilled" label get
   tighter, but the label always stays visible. */
.tabs--status { flex-wrap: wrap; overflow-x: visible; row-gap: var(--space-2); }
@media (max-width: 479px) {
  .tabs--status { gap: var(--space-1); }
  .tabs--status .tab { padding: 0.375rem 0.625rem; gap: var(--space-1); }
  .tabs--status .tabs__group .tab { padding: 0.375rem 0.5rem; }
  .tabs__group-label { padding: 0 0.25rem 0 0.5rem; font-size: 0.6875rem; }
}
/* Counts arrive after first paint: reserve room for up to five digits on
   wide screens, so the toolbar does not re-wrap when they land (D-07 CLS). */
@media (min-width: 768px) {
  .tabs--status .tab__count { min-width: 2.75rem; font-variant-numeric: tabular-nums; }
}

/* ---------- Skeleton — generic shimmer at any geometry ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--color-gray-100) 0%, var(--color-gray-200) 50%, var(--color-gray-100) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
.skeleton--text { height: 0.75rem; }
.skeleton--circle { border-radius: var(--radius-full); }
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

/* ---------- Card as one navigation target ---------- */
.card--link { display: block; color: inherit; text-decoration: none; }
.card--link:hover { text-decoration: none; }
.card--link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Production card internals (production list). Composition of shipped
   recipes; the figure is a 16:9 crop, 16:7 on phones. */
.prod-card { padding: 0; overflow: hidden; }
.prod-card__figure { display: block; aspect-ratio: 16 / 9; background: var(--color-gray-100); overflow: hidden; }
.prod-card__figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prod-card__body { padding: var(--space-4) var(--space-5) var(--space-5); }
.prod-card__name { margin: 0; font-size: 1rem; font-weight: 700; color: var(--color-text); line-height: 1.3; }
.prod-card__progress-label {
  display: flex; gap: var(--space-2); margin: var(--space-3) 0 4px;
  font-size: 0.75rem; color: var(--color-text-secondary); /* AA contrast, as .stat__label */
}
.prod-card__progress-label span:last-child { margin-left: auto; font-variant-numeric: tabular-nums; }
.prod-card .stat-row { margin: var(--space-4) 0 0; }
@media (max-width: 639px) {
  .prod-card__figure { aspect-ratio: 16 / 7; }
  .prod-card__body { padding: var(--space-3) var(--space-4) var(--space-4); }
}
/* `.list` has no padded body slot of its own. */
.list-body { padding: var(--space-5) var(--space-5) var(--space-6); }
.list-body--tight { padding: var(--space-4); }

/* ---------- Grid tile states ----------
   `.is-viewed`: an eye glyph (`.image-grid-card__viewed`) only — viewed tiles
   are shown at full strength (round 7: the old wash read as "done / ignore").
   `.is-dim`: an UNVIEWED tile on a mixed tab (All, Killed) is faded so what you
   have looked at stands out; the Unviewed / Viewed tabs never fade (every tile
   there has the same state). `.is-killed`: the viewer's own kill, distinct
   from `.is-removed`. */
.image-grid-card.is-dim .image-grid-card__thumb img { opacity: 0.45; }
.image-grid-card.is-dim .image-grid-card__name { color: var(--color-text-secondary); font-weight: 400; }
.image-grid-card.is-killed .image-grid-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.image-grid-card.is-killed { border-color: var(--color-brand-200); }
.image-grid-card.is-killed .image-grid-card__thumb img { filter: grayscale(0.85); }
.image-grid-card.is-killed .image-grid-card__thumb::after { background: rgba(17, 24, 39, 0.28); }
/* Owner 2026-11-18: the viewed eye is deliberately QUIET — a bare white eye
   with a soft shadow (readable on light photos), no circle behind it — so it
   never competes with the round status marks in the opposite corner. */
.image-grid-card__viewed {
  position: absolute;
  left: 0.375rem;
  bottom: 0.375rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 0 1px rgba(17, 24, 39, 0.9)) drop-shadow(0 1px 2px rgba(17, 24, 39, 0.55));
  pointer-events: none;
}
.image-grid-card__viewed svg { width: 14px; height: 14px; }

/* ---------- Tile dots: killed (brand red), excluded (black), selected
   (yellow ★, --color-select), captioned (small round teal). `--kill` is
   already brand red. Selected keeps a gray-900 glyph: white on yellow is
   ~1.5:1, gray-900 on --color-select clears 11:1. */
.thumbnail-overlay__dot--excluded { background: #000; }
.thumbnail-overlay__dot--selected {
  background: var(--color-select);
  color: var(--color-gray-900);
  text-shadow: none;
}
.thumbnail-overlay__dot--caption {
  min-width: 16px;
  height: 16px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: 0.5625rem;
}

/* ---------- Status badge: excluded ---------- */
.status-badge--excluded { background: var(--color-gray-900); color: #fff; border-color: var(--color-gray-900); }
/* Owner 2026-11-15: "✕ Excluded" — the glyph before the word (a flex item, so the gap is a margin). */
.status-badge__glyph { margin-right: 0.3em; }
.status-badge .tag-state__icon { width: 13px; height: 13px; margin-right: 0.25rem; flex: none; }

/* ---------- Tag state — a tagged person's state on an image ----------
   Glyph + colour + visually-hidden text, never colour alone. */
.tag-state {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  font-size: 0.8125rem;
  line-height: 1.3;
  white-space: nowrap;
}
.tag-state + .tag-state { margin-left: var(--space-3); }
.tag-state__icon { width: 15px; height: 15px; flex: none; }
.tag-state__name { overflow: hidden; text-overflow: ellipsis; }
.tag-state--viewed { color: var(--color-gray-700); font-weight: 500; }
.tag-state--unviewed { color: var(--color-gray-500); }
.tag-state--killed { color: var(--color-primary); font-weight: 600; }

/* ---------- Table additions ---------- */
.table--sticky-first th:first-child,
.table--sticky-first td:first-child { position: sticky; left: 0; z-index: 1; background: var(--color-surface); }
.table--sticky-first thead th:first-child { z-index: 2; background: var(--color-gray-50); }
.table--sticky-first tr:hover td:first-child,
.table--sticky-first tr:hover th:first-child { background: var(--color-gray-50); }
.table td.text-center { text-align: center; }
.table .cell-clip { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A row header names the row; it is not a column label. */
.table tbody th {
  font-size: 0.8125rem; font-weight: 500; text-transform: none; letter-spacing: 0;
  color: var(--color-text); white-space: nowrap; text-align: left;
}
/* Group heading rows: each group is its own <tbody>. */
.table tr.table-group th {
  background: var(--color-gray-50);
  font-size: 0.75rem; font-weight: 700; text-transform: none; letter-spacing: 0;
  color: var(--color-text);
  padding-top: var(--space-2); padding-bottom: var(--space-2);
}
.table-group__count { font-weight: 400; color: var(--color-text-secondary); margin-left: var(--space-2); }
/* `.th-sort` as a real <button> (sorting is an action, not navigation). */
button.th-sort {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  cursor: pointer;
}
.th-sort:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
.th-sort svg { width: 13px; height: 13px; flex: none; }
.th-sort:not(.is-active) svg { opacity: 0.45; }
.cell-star {
  color: var(--color-select-strong); font-size: 1rem;
  -webkit-text-stroke: 0.75px var(--color-select-edge); paint-order: stroke fill;
}
/* Compact table: the pick checkbox before the file name, and the row menu button. */
.cell-pick { display: inline-flex; align-items: center; gap: var(--space-2); }
/* Round 27: a reference thumbnail beside the file name in the day table
   (checkbox · thumbnail · name). 64×48 makes each row ~1.6× its old height. */
.row-thumb {
  flex: none; width: 64px; height: 48px; border-radius: var(--radius-sm, 4px); overflow: hidden;
  background: var(--color-gray-100); display: inline-block;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell-pick:has(.row-thumb) { gap: var(--space-3); }
@media (max-width: 639px) { .row-thumb { width: 48px; height: 36px; } }
/* Round 31: the day table spans the full centre column. */
.grid-table .table.table--fit { width: 100%; }
.cell-pick input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--color-primary); flex: none; }
/* Owner 2026-11-15 (phones): the day table keeps every column (as on desktop)
   and scrolls sideways inside its own `.table-scroll`; the page itself never
   gets wider (`.day-page__body > .gallery-island__main`, phone layout fixes
   2). Each
   column is as wide as its content (file name on one line, the Tagged
   names wrapping inside `.cell-names`' 18rem); the file-name column is not
   pinned on a phone — it is most of the screen wide, so pinning it would
   leave no room to scroll the other columns into view. */
@media (max-width: 639px) {
  .grid-table .table.table--fit { width: max-content; min-width: 100%; max-width: none; }
  .grid-table .cell-pick a { white-space: nowrap; }
  .grid-table .table--sticky-first :is(th, td):first-child { position: static; }
}
@media (pointer: coarse) { .cell-pick input[type="checkbox"] { width: 22px; height: 22px; } }
.cell-menu-btn { min-width: 32px; padding-inline: var(--space-2); font-size: 1rem; line-height: 1; }

/* ---------- Menu as a bottom sheet (touch) ---------- */
.menu--sheet {
  position: fixed;
  right: 0; bottom: 0; left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.18);
}
.menu--sheet .menu__item { min-height: 44px; padding: var(--space-2) var(--space-3); font-size: 0.9375rem; }
.menu--sheet__handle {
  align-self: center; width: 36px; height: 4px;
  margin: var(--space-1) 0 var(--space-2);
  border-radius: var(--radius-full); background: var(--color-gray-300);
}
.menu--sheet__title {
  margin: 0 0 var(--space-1); padding: 0 var(--space-3);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menu--sheet__cancel {
  margin-top: var(--space-1); justify-content: center; font-weight: 600;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border-subtle);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ---------- Tile "⋯" menu trigger ----------
   Quiet until the tile is hovered or holds focus; always in the tab order;
   always visible on a coarse pointer. */
.tile-menu-btn {
  position: absolute;
  top: var(--space-1); right: var(--space-1);
  z-index: 3;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: var(--radius-md);
  background: rgba(17, 24, 39, 0.55); color: #fff;
  font-size: 1.05rem; line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}
.image-grid-card:hover .tile-menu-btn,
.image-grid-card:focus-within .tile-menu-btn,
.tile-menu-btn:focus-visible { opacity: 1; }
.tile-menu-btn:hover { background: rgba(17, 24, 39, 0.78); }
.tile-menu-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media (pointer: coarse) { .tile-menu-btn { opacity: 1; } }

/* ---------- Gallery toolbar additions ---------- */
.gallery-toolbar__count { font-variant-numeric: tabular-nums; white-space: nowrap; margin: 0; }
.gallery-toolbar__hint { margin: 0; font-size: 0.75rem; line-height: 1.4; color: var(--color-text-secondary); }
/* File-name search inside the toolbar (filters the current tab). */
/* Round 10: `.table--fit` — each column as wide as its content plus padding,
   not stretched across the page, so a short row scans without big gaps.
   Long names still wrap rather than push the table past its scroller. */
.table.table--fit { width: auto; max-width: 100%; }
.table.table--fit th, .table.table--fit td { padding-right: var(--space-8); }
.table.table--fit th:last-child, .table.table--fit td:last-child { padding-right: var(--space-4); }
/* Round 10: wide enough for the whole "Search file names" placeholder. */
.gallery-search { flex: 0 1 240px; min-width: 200px; }
.gallery-search--row { display: block; max-width: none; width: 100%; margin: var(--space-2) 0; flex: none; }
.gallery-search .input { display: block; width: 100%; }
/* 16px on touch so iOS never zooms the page on focus. */
@media (pointer: coarse) { .gallery-search .input, .list-toolbar__search .input { font-size: 1rem; } }

/* Contact-sheet mode (production accounts + admins): fit, don't crop. */
.gallery-grid--contact .image-grid-card__thumb { background: var(--color-gray-100); }
.gallery-grid--contact .image-grid-card__thumb img { object-fit: contain; }
.gallery-grid--contact .image-grid-card:hover .image-grid-card__thumb img { transform: none; }
.size-range { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.8rem; color: var(--color-text-secondary); }
.size-range input[type="range"] { width: 116px; accent-color: var(--color-gray-900); cursor: pointer; }
.size-range__value { font-variant-numeric: tabular-nums; min-width: 3.5em; }

/* Gallery rail as chrome, not a popover; the current day in a single-select rail. */
.filter-panel--gallery { border-radius: 0; box-shadow: none; }
.filter-panel__check.is-active {
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
  font-weight: 600;
  margin-inline: -0.375rem;
  padding-inline: 0.375rem;
  box-shadow: inset 2px 0 0 var(--color-primary);
}

/* ---------- Gallery toast stack position ----------
   Bottom-centre over the grid / stage; raised on the single image so a
   toast never covers the action bar or the decision buttons. */
.toast-stack--gallery {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
}
.lightbox:has(.lightbox__actionbar) .toast-stack--gallery { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.lightbox:has(.lightbox__actions-under) .toast-stack--gallery { bottom: auto; top: 72px; }

/* ---------- Single image (routed `.lightbox--page`) ---------- */
/* Phone bottom action bar: ‹ · Kill · ›, 48px targets, ≥16px gap. */
.lightbox__actionbar {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox__actionbar .lightbox__nav { position: static; transform: none; width: 48px; height: 48px; }
.lightbox__actionbar .btn { height: 48px; min-width: 140px; padding: 0 var(--space-6); font-size: 0.9375rem; }
.lightbox__actionbar--four { gap: 0.5rem; padding-inline: 0.75rem; }
.lightbox__actionbar--four .btn { flex: 1 1 0; min-width: 0; padding: 0 0.5rem; font-size: 0.8125rem; white-space: nowrap; }
.lightbox__actionbar--four .lightbox__nav--next { margin-left: 1rem; }

/* Phone "Details" sheet: the drawer docked to the bottom. */
.lightbox--sheet .lightbox__drawer {
  width: auto; max-height: 42%;
  border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.lightbox__sheet-handle { align-self: center; width: 36px; height: 4px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.25); }

/* Stage + under-image strip. */
.lightbox__stage-col { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.lightbox--page .lightbox__stage-col .lightbox__stage { height: auto; min-height: 0; flex: 1 1 auto; }
.lightbox__underbar {
  flex: none;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-2);
  color: #e2e8f0; font-size: 0.8125rem;
}
.lightbox__underbar--cols {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3) var(--space-8); align-items: start;
}
.lightbox__underbar--scroll { max-height: 132px; overflow-y: auto; }
.lightbox__underbar-col { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.lightbox__underbar-title {
  display: flex; align-items: center; gap: var(--space-2); margin: 0;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.lightbox__underbar-actions { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.lightbox__underbar .lightbox__hint { margin: 0; }
.lightbox__underbar .field__textarea { min-height: 68px; }
@media (max-width: 767px) { .lightbox__underbar--cols { grid-template-columns: 1fr; } }

/* Decision buttons directly under the image (selection walk). */
.lightbox__actions-under {
  flex: none;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox__actions-hint { margin-left: var(--space-4); }
.lightbox__actions-hint a { color: #cbd5e1; text-decoration: underline; } /* not colour alone (WCAG 1.4.1) */
.lightbox__actions-hint strong { color: #f1f5f9; font-weight: 600; }
.lightbox__tagged-count { margin: 0; color: #f1f5f9; font-weight: 600; }
.lightbox__tagged-count .lightbox__viewer-meta { margin-left: var(--space-2); font-weight: 400; }

/* The walk is confined to a subset (a tab, a sort, a selection). */
.lightbox__scope-bar {
  flex: none;
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0.5rem var(--space-5);
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem; color: #e2e8f0;
}
.lightbox__scope-bar .btn { margin-left: auto; }
/* The bar is lighter than the stage: the base 50 % hint measured ~4:1 here (AA needs 4.5). */
.lightbox__scope-bar .lightbox__hint { color: rgba(255, 255, 255, 0.72); }

/* One tagged / viewer row with a state glyph. */
.lightbox__viewers > li { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
/* Horizontal variant: a short list ("You · + 1 other", a few names) on one wrapping line. */
.lightbox__viewers--row { flex-direction: row; flex-wrap: wrap; gap: 0.375rem 1.5rem; }
.lightbox__viewers > li > strong { font-weight: 600; }
.lightbox__viewer-glyph { flex: none; display: inline-flex; align-items: center; justify-content: center; }
.lightbox__viewer-glyph--viewed { color: #e2e8f0; }
.lightbox__viewer-glyph--unviewed { color: rgba(255, 255, 255, 0.5); }
.lightbox__viewer-glyph--killed { color: #fca5a5; }
.lightbox__viewer-remove {
  margin-left: 0.125rem; width: 22px; height: 22px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: rgba(255, 255, 255, 0.6); cursor: pointer;
}
.lightbox__viewer-remove:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
@media (pointer: coarse) { .lightbox__viewer-remove { width: 44px; height: 44px; } }
.lightbox__killed-by { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.8125rem; }
.lightbox__difference-link {
  align-self: flex-start; padding: 0; border: 0; background: none;
  color: #fca5a5; font: inherit; text-decoration: underline; cursor: pointer;
}
.lightbox__caption-tools { display: flex; gap: 0.25rem; flex-wrap: wrap; }

/* An image that failed to load: a placeholder with an affordance. */
.lightbox__failed {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
  color: rgba(255, 255, 255, 0.7); text-align: center; padding: var(--space-6);
}
.lightbox__failed svg { color: rgba(255, 255, 255, 0.35); }

/* Dark-surface `.btn` re-skin for EVERY dark region of the lightbox.
   Upstream only re-skinned `.lightbox__top-actions` and `.lightbox__drawer`
   `.btn-ghost`, so any other button on the slate-900 surface kept its
   light-surface gray text (~2.2:1). `.btn-primary` (Kill) is excluded and
   stays brand red. */
.lightbox :is(.lightbox__underbar, .lightbox__scope-bar, .lightbox__failed, .lightbox__actions-under, .lightbox__actionbar, .lightbox__drawer) .btn:not(.btn-primary):not(.btn-ghost) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
}
.lightbox :is(.lightbox__underbar, .lightbox__scope-bar, .lightbox__failed, .lightbox__actions-under, .lightbox__actionbar) .btn-ghost {
  background: transparent; border-color: transparent; color: rgba(255, 255, 255, 0.78);
}
.lightbox :is(.lightbox__underbar, .lightbox__scope-bar, .lightbox__failed, .lightbox__actions-under, .lightbox__actionbar, .lightbox__drawer) .btn:not(.btn-primary):hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16); color: #fff;
}
.lightbox :is(.lightbox__top-actions, .lightbox__actionbar, .lightbox__actions-under) .btn-secondary {
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.45); color: #fff;
}
.lightbox :is(.lightbox__top-actions, .lightbox__actionbar, .lightbox__actions-under) .btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.lightbox :is(.lightbox__actionbar, .lightbox__actions-under, .lightbox__underbar) .btn-primary {
  background: var(--color-primary); color: #fff; border-color: transparent;
}
.lightbox :is(.lightbox__actionbar, .lightbox__actions-under, .lightbox__underbar) .btn-primary:hover:not(:disabled) { background: var(--color-primary-dark); }
.lightbox .btn:disabled { opacity: 0.5; }
/* Selected star on the dark surface: select yellow, never brand red or amber. */
.lightbox .btn.is-starred { color: var(--color-select); }

/* Routed page on a phone: it grows past the viewport (stage + tagged strip +
   sheet), so the ‹ · Kill · › bar sticks to the bottom edge instead of ending
   up below the fold, and the top bar stays ONE row — name (ellipsised) left,
   Details / Download right — instead of the overlay's wrapped two-row bar. */
/* Notices that must be seen (lock, allowance refusal, download error,
   offline, "Not saved — Retry") and the decision status line
   ("✓ Killed IMG_4417 · Unkill"). Always in view: on a desktop the stack sits
   between the stage and the decision buttons (the stage shrinks to make room);
   on a phone it docks above the sticky action bar in `.lightbox__dock`. */
.lightbox__notices {
  flex: none;
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox__notices .alert { margin: 0; }
/* Owner 2026-11-19: the Image summary's quick-look note sits centred under the
   stage, in line with the decision buttons below it, as one compact row: the
   sentence, then a "Review in <folder>" .btn-secondary .btn--sm, then ×. */
.lightbox__notices .lightbox__look { align-self: center; width: fit-content; max-width: 100%; display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-3); text-align: center; }
.lightbox__look .btn { flex: none; }
/* Owner 2026-11-19: the longer "Selects only here" note — a readable paragraph
   (left-aligned, up to ~70 characters a line), still centred under the stage. */
.lightbox__notices .lightbox__look--wide { max-width: 46rem; flex-wrap: nowrap; text-align: left; justify-content: flex-start; align-items: flex-start; }
.lightbox__look--wide a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lightbox__status {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0; min-height: 1.5rem;
  font-size: 0.8125rem; color: #e2e8f0;
}
.lightbox__status strong { color: #f1f5f9; font-weight: 600; }
.lightbox__status-mark { color: #86efac; font-weight: 700; }
.lightbox__status--error { color: #fecaca; }
.lightbox__status--error .lightbox__status-mark { color: #fca5a5; }
/* An inline action in the line ("Unkill", "Retry"): underlined, not colour alone. */
.lightbox__status-action {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; font-weight: 600; color: #f1f5f9;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.lightbox__status-action:hover { color: #fff; }
.lightbox__status-action:focus-visible { outline: 2px solid #fca5a5; outline-offset: 2px; border-radius: 2px; }
@media (pointer: coarse) { .lightbox__status-action { min-height: 44px; padding: 0 var(--space-2); } }
.lightbox__dock { flex: none; }
/* Desktop dock under the stage: notices + decision buttons stick to the bottom
   of the viewport, so a lock / refusal notice and Kill are never below the fold
   when the stage fills the screen. The stack scrolls if several notices pile up. */
.lightbox--page .lightbox__dock--under { position: sticky; bottom: 0; z-index: 1; background: #0f172a; }
/* ---------- Round 8: the single image fits the window (desktop) ----------
   `.lightbox--fit`: the page is exactly one viewport tall — top bar, optional
   scope bar, then a body whose stage takes whatever the decision dock leaves.
   Nothing to scroll to: the Tagged block lives in the details panel, which
   scrolls on its own. */
.lightbox--fit { height: 100vh; height: 100dvh; min-height: 0; }
.lightbox--fit .lightbox__body { flex: 1 1 auto; min-height: 0; }
.lightbox--fit .lightbox__stage-col { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.lightbox--fit .lightbox__stage { height: auto; flex: 1 1 0; min-height: 0; container-type: size; }
.lightbox--fit .lightbox__dock--under { position: static; }
.lightbox--fit .lightbox__drawer { min-height: 0; }
/* The image and its status marks: the figure is sized to the image's own
   aspect ratio inside the stage (container units), so the marks sit on the
   IMAGE's bottom-right corner, not the stage's. */
.lightbox__figure {
  position: relative;
  display: block;
  aspect-ratio: var(--ratio, 1);
  width: min(100cqw, calc(100cqh * var(--ratio, 1)));
  max-height: 100cqh;
}
.lightbox__figure .lightbox__img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; }
/* Status marks on the picture's bottom-right corner (every size; owner 2026-11-15):
   the grid tiles' `.thumbnail-overlay__dot` tokens — brand-red ✕ killed, black ✕
   excluded, yellow ★ selected — drawn as 32 px squares (28 px on phones, where
   `.lightbox__marks--placed` is positioned from the drawn picture inline). */
.lightbox__marks { position: absolute; z-index: 2; right: var(--space-3); bottom: var(--space-3); display: flex; gap: var(--space-2); pointer-events: none; }
.lightbox__marks[hidden] { display: none; }
.lightbox__marks .lightbox__mark {
  width: 32px; height: 32px; min-width: 32px; padding: 0; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 1rem; line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.lightbox__marks .thumbnail-overlay__dot--selected.lightbox__mark { font-size: 1.125rem; }
.lightbox__marks.lightbox__marks--placed { gap: 6px; }
.lightbox__marks--placed .lightbox__mark { width: 28px; height: 28px; min-width: 28px; font-size: 0.875rem; }
.lightbox__marks--placed .thumbnail-overlay__dot--selected.lightbox__mark { font-size: 1rem; }
/* The swipe moves the picture; the marks ride with it (as the zoom button). */
.lightbox__stage > .lightbox__marks { translate: var(--lightbox-swipe-x, 0px) 0; }
/* Selected: the Select button turns yellow so the state is unmissable (round 8). */

.lightbox__dock--under .lightbox__notices { max-height: 40vh; overflow-y: auto; }
/* Badge beside Kill when someone else killed the image (non-actors only). */
.lightbox__killed-by-others { white-space: nowrap; }

@media (max-width: 767px) {
  .lightbox--page .lightbox__actionbar { position: sticky; bottom: 0; z-index: 1; }
  /* The dock carries the bar; the bar inside it stays in flow. */
  .lightbox--page .lightbox__dock { position: sticky; bottom: 0; z-index: 1; }
  .lightbox--page .lightbox__dock .lightbox__actionbar { position: static; }
  .lightbox__dock .lightbox__notices { padding: var(--space-2) var(--space-3); max-height: 40vh; overflow-y: auto; }
  .lightbox--page .lightbox__top { flex-wrap: nowrap; }
  .lightbox--page .lightbox__top-left { flex: 1 1 auto; min-width: 0; }
  .lightbox--page .lightbox__top-actions { flex: 0 0 auto; overflow: visible; }
}

/* ---------- Day list (actor) ---------- */
.day-list__head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: var(--space-4); margin-bottom: var(--space-4);
}
/* Search + "Submit kills for all days" on one row (round 15). */
.day-list__tools {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: var(--space-3) var(--space-4); margin: 0 0 var(--space-4);
}
.day-list__tools > .list-toolbar__search { flex: 1 1 280px; max-width: 480px; }
/* Owner 2026-11-17: the row's right-hand actions — Submit kills for all days
   (actors) and the big "Image summary" link — right-aligned together. */
.day-list__actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: var(--space-3); margin-left: auto; }
.day-list__actions > .btn { gap: var(--space-2); }
@media (max-width: 639px) { .day-list__actions, .day-list__actions > .btn, .day-list__actions .day-list__submit { width: 100%; } }

/* ---------- Actor summary (round 5): .summary, .summary-hero, .split-bar,
   .split-legend, .summary-allowance / .summary-bucket ----------
   The solo / group split is a CHART, so it takes the categorical palette
   (indigo = solo, teal = group / lower group, amber = upper group) — never
   brand red. Allowance rings reuse .progress-circle (warning once used up). */
.summary { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-6); padding-bottom: var(--space-10); }
.summary .gallery-toolbar__heading { margin: 0 0 var(--space-2); }
.summary__heading { font-size: 1rem; font-weight: 700; margin: var(--space-4) 0 0; }
.summary__section-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-secondary); margin: 0 0 var(--space-3); }
.summary__note { margin: 0; font-size: 0.8125rem; color: var(--color-text-tertiary); }
.summary-hero { padding: var(--space-6); }
.summary-hero__total { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-4); }
.summary-hero__number { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--color-text); }
.summary-hero__caption { font-size: 0.9375rem; color: var(--color-text-secondary); }
.split-bar { display: flex; gap: 3px; height: 14px; border-radius: var(--radius-full); overflow: hidden; background: var(--color-gray-100); margin: 0 0 var(--space-4); }
.split-bar__seg { flex: 1 1 0; min-width: 6px; }
.split-bar__seg.cat-indigo, .split-legend__swatch.cat-indigo { background: var(--color-cat-indigo-500); }
.split-bar__seg.cat-teal,   .split-legend__swatch.cat-teal   { background: var(--color-cat-teal-500); }
.split-bar__seg.cat-amber,  .split-legend__swatch.cat-amber  { background: var(--color-cat-amber-500); }
.split-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.split-legend__item { display: flex; align-items: center; gap: var(--space-2); font-size: 0.875rem; }
.split-legend__swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.split-legend__label { color: var(--color-text-secondary); }
.split-legend__count { font-weight: 700; font-variant-numeric: tabular-nums; }
.split-legend__pct { color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
/* Round 7: the production summary's status bar uses the SEMANTIC status
   colours (same meaning as the grid tabs and .tally), not the categorical
   palette: approved deep green, unkilled-not-yet-approved light green,
   killed red, excluded dark grey. */
.split-bar__seg.status-approved, .split-legend__swatch.status-approved { background: #064E3B; }
.split-bar__seg.status-unkilled, .split-legend__swatch.status-unkilled { background: #93C5FD; }
.split-bar__seg.status-killed,   .split-legend__swatch.status-killed   { background: var(--color-error); }
.split-bar__seg.status-excluded, .split-legend__swatch.status-excluded { background: var(--color-gray-700); }
/* Round 28 (owner's option A): the cast as cards (Cards | Table on the Production
   summary; cards by default on phones). "Full breakdown" opens the same solo /
   group / total table as the table row, across the card's full width. */
.cast-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-4) 0 var(--space-2); }
/* Owner 2026-11-25: the "Cast" heading shares its line with the toggles; the note gets its own line. */
.cast-head > .summary__heading { margin: 0; }
.summary__note.cast-head__note { margin: 0 0 var(--space-3); }
.cast-head .summary__note { margin: 0; }
.cast-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.cast-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.cast-card.is-open { grid-column: 1 / -1; }
/* Round 1121: everything under the name row (figures, viewed, selects, kill
   allowance, the Full breakdown toggle) sits in `.cast-card__summary`, a column
   with the card's own 12 px rhythm — so a card can widen into two halves
   (`.cast-card--split`) without its parts moving inside it. */
.cast-card > .cast-card__summary { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.cast-card__head { display: flex; align-items: flex-start; gap: var(--space-3); }
.cast-card__avatar { flex: none; }
.cast-card__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.cast-card__name { margin: 0; font-size: 1rem; font-weight: 700; }
/* Owner 2026-11-25: the title line (name, then the folders pill, wrapping under the
   name only when both cannot fit), then the counts as three spaced figures
   (`.cast-card__stats`: "40 images  30 solo  10 group", the numbers bold), then
   — in Released days — `.cast-card__scope` ("3 of 4 folders released"). */
.cast-card__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); min-width: 0; }
.cast-card__title > .cast-card__name { min-width: 0; overflow-wrap: anywhere; }
.cast-card__title > .status-badge { flex: none; }
.cast-card__stats { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-4); font-size: 0.8125rem; color: var(--color-text-secondary); }
.cast-card__stat b { font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.cast-card__stat--images b { font-size: 0.9375rem; }
.cast-card__scope { margin: 0; font-size: 0.75rem; color: var(--color-text-tertiary); }
.cast-card__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.cast-card__fig { border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
.cast-card__fig dt { font-size: 0.75rem; font-weight: 600; }
.cast-card__fig dd { margin: 0; font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--color-text); }
.cast-card__fig--killed { background: var(--color-error-bg, #FEF2F2); } .cast-card__fig--killed dt { color: #B91C1C; }
.cast-card__fig--unkilled { background: #EFF6FF; } .cast-card__fig--unkilled dt { color: #1D4ED8; }
.cast-card__fig--approved { background: var(--color-success-bg); } .cast-card__fig--approved dt { color: var(--color-success-ink); }
.cast-card__viewed { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); }
.cast-card__label { font-size: 0.75rem; font-weight: 600; color: var(--color-text-secondary); }
.cast-card__pct { font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cast-card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); font-size: 0.8125rem; }
.cast-card__foot > span { display: inline-flex; align-items: baseline; gap: var(--space-2); }
.cast-card__muted { color: var(--color-text-secondary); }
.cast-card__more { align-self: flex-start; }
.cast-card__detail { border-top: 1px solid var(--color-border-subtle); padding-top: var(--space-3); overflow-x: auto; }
@media (max-width: 639px) { .cast-cards { grid-template-columns: minmax(0, 1fr); } }
/* Round 27: `.figure-cards` — one card per status under the summary bar (the bar's
   key and the old header tiles in one): count large, share smaller and darker. */
.figure-cards { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
.figure-card { border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); background: var(--color-surface); display: flex; flex-direction: column; gap: var(--space-1); }
.figure-card__label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.8125rem; font-weight: 600; color: var(--color-text-secondary); }
.figure-card__swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.figure-card__swatch.status-approved { background: #064E3B; }
.figure-card__swatch.status-unkilled { background: #93C5FD; }
.figure-card__swatch.status-killed { background: var(--color-error); }
.figure-card__swatch.status-excluded { background: var(--color-gray-700); }
.figure-card__swatch.status-selects { background: var(--color-select-strong); box-shadow: inset 0 0 0 1px var(--color-select-edge); }
.figure-card__value { display: flex; align-items: baseline; gap: var(--space-2); }
/* Owner 2026-11-17: an ⓘ beside a figure's label with its definition (.tooltip). */
.figure-card__info { width: 18px; height: 18px; border-radius: var(--radius-full); border: 1px solid var(--color-gray-300); background: var(--color-surface); color: var(--color-gray-600); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: help; flex: none; }
.figure-card__info:hover { border-color: var(--color-gray-500); color: var(--color-gray-900); }
.figure-card__info:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-color: var(--color-brand-500); }
/* The bubble is pinned to its own card (the ⓘ's .tooltip goes static so the
   card is the anchor): it spans the card's width just above it, so it never
   pokes past the screen edge on a phone, and it takes no layout while hidden
   (display: none) — a hidden absolutely-placed bubble still widened the page. */
.figure-card { position: relative; }
.figure-card .tooltip { position: static; }
.figure-card .tooltip__bubble {
  display: none;
  left: 0; right: 0; bottom: calc(100% + 6px);
  width: auto; max-width: none; transform: none;
  font-weight: 500;
}
.figure-card .tooltip:hover .tooltip__bubble,
.figure-card .tooltip:focus-within .tooltip__bubble { display: block; }
.figure-card .tooltip__bubble::after { left: var(--space-6); }
.figure-card__count { font-size: 1.75rem; font-weight: 800; line-height: 1.1; color: var(--color-text); font-variant-numeric: tabular-nums; }
.figure-card__pct { font-size: 0.8125rem; font-weight: 600; color: var(--color-gray-700); font-variant-numeric: tabular-nums; }
@media (max-width: 639px) { .figure-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .figure-card__count { font-size: 1.5rem; } }
/* Reviewer tables on the production summary. */
.summary-table { padding: 0; overflow-x: auto; }
.summary-table:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.summary-table .table { margin: 0; min-width: 640px; }
.summary-table .table th, .summary-table .table td { white-space: nowrap; }
/* ---------- Round 11: cast table (production summary, owner's option D) ----------
   One summary row per actor that expands into a solo / group / total
   breakdown. Number columns and their headings are both right-aligned so a
   heading sits over its figures; the breakdown starts under the second
   column, leaving the names as a clean list down the left. */
.cast-table th.cast-table__num, .cast-table td.cast-table__num,
.cast-breakdown th.cast-table__num, .cast-breakdown td.cast-table__num { text-align: right; }
.cast-table__toggle { display: inline-flex; align-items: center; gap: var(--space-2); background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--color-text); cursor: pointer; text-align: left; }
.cast-table__toggle:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 4px; }
.cast-table__chev { width: 1em; color: var(--color-text-tertiary); font-size: 0.75rem; }
.cast-table__row.is-open > th, .cast-table__row.is-open > td, .cast-table__detail > td { background: var(--color-gray-50); }
.cast-table__big { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.cast-table__sub { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--color-text-tertiary); white-space: nowrap; }
.cast-table__sub-inline { font-size: 0.75rem; color: var(--color-text-tertiary); }
.cast-table__decisions { min-width: 280px; }
.cast-table td, .cast-table th { vertical-align: middle; }
.split-bar.split-bar--row { height: 10px; margin: 0; }
.t-killed { color: var(--color-error); }
.t-unkilled { color: #1D4ED8; }
.t-approved { color: #065F46; }
/* Select figures: yellow text is unreadable on white, so the number stays body
   text and its ★ (`.select-star`) carries the yellow. */
.t-select { color: var(--color-text); }
.cast-table__detail > td { padding-top: 0; padding-bottom: var(--space-4); }
.cast-breakdown { width: auto; margin: 0; background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); }
.cast-breakdown th, .cast-breakdown td { padding: 0.5rem 1rem; white-space: nowrap; }
.cast-breakdown tbody th { font-weight: 600; text-align: left; background: transparent; }
.cast-breakdown__total th, .cast-breakdown__total td { font-weight: 700; border-top: 1px solid var(--color-border); }
.cast-table__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); margin: var(--space-3) 0 0; font-size: 0.8125rem; color: var(--color-text-secondary); }
.cast-table__meta > span { display: inline-flex; align-items: center; gap: var(--space-2); }
/* Owner 2026-11-15: the actor's access under the breakdown (`.cast-access`, on a
   `.cast-table__meta`) is its own group — a divider and space above it — read as
   "Watermark On · Image downloads Disabled": a 12 px semibold label
   (`.cast-access__label`) before each badge, a "·" between the items. */
.cast-table__meta.cast-access {
  margin-top: var(--space-4); padding-top: var(--space-3);
  border-top: 1px solid var(--color-border); gap: var(--space-2) var(--space-3);
}
.cast-access__label { font-size: 0.75rem; font-weight: 600; color: var(--color-text-secondary); }
.cast-access__item + .cast-access__item::before { content: "·"; content: "·" / ""; color: var(--color-text-tertiary); }
/* A phone held upright: the two items share one line at 360 px — tighter gaps,
   12 px labels and compact sentence-case badges (12 px, 20 px tall); wrapping
   only if a badge cannot fit. */
@media (max-width: 639px) {
  .cast-table__meta.cast-access { gap: var(--space-1) var(--space-2); font-size: 0.75rem; }
  .cast-table__meta.cast-access > .cast-access__item { gap: var(--space-1); }
  .cast-table__meta.cast-access .status-badge {
    height: 20px; padding: 0 6px; font-size: 0.75rem; text-transform: none; letter-spacing: 0;
  }
}
/* The narrowest phones (< 380 px): "Watermarked" downloads may need a second
   line, so no "·" that could start it — a wider gap separates the items. */
@media (max-width: 379px) {
  .cast-table__meta.cast-access { column-gap: var(--space-4); }
  .cast-access__item + .cast-access__item::before { content: none; }
}
/* Round 9: the production summary is wider (its cast table has nine columns). */
.summary-table th[scope="row"] { font-weight: 600; text-align: left; background: transparent; }
.summary-table__progress { min-width: 180px; }
/* Flex lives on an inner wrapper — a flex table cell drops out of the row's height and background. */
.summary-table__progress-in { display: flex; align-items: center; gap: var(--space-3); }
.summary-table__bar { flex: 1 1 auto; min-width: 0; }
.summary-table__bar .progress { margin: 0; }
.summary-table__pct { flex: none; width: 3rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.summary-decisions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.summary-decisions .tally { justify-content: flex-start; }
.summary__link { font-size: 0.875rem; font-weight: 600; }
/* Round 9: the production summary's decision tiles span the full width. */
.summary-decisions--wide .tally { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
.summary-decisions--wide .tally__item { min-width: 0; padding: var(--space-5); }
.summary-decisions--wide .tally__count { font-size: 2rem; }
@media (max-width: 639px) { .summary-decisions--wide .tally { grid-template-columns: 1fr; } }
.summary-allowance { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.summary-bucket { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-5); }
.summary-bucket .progress-circle { flex: none; }
.summary-bucket__body { min-width: 0; }
.summary-bucket__title { font-size: 1rem; font-weight: 700; margin: 0 0 var(--space-1); }
.summary-bucket__line { margin: 0 0 var(--space-1); font-size: 0.9375rem; font-weight: 600; }
.summary-bucket__meta { margin: 0; font-size: 0.8125rem; color: var(--color-text-tertiary); }
.summary-progress { margin: 0; background: var(--color-surface); }
.summary-progress .stat { padding: var(--space-4) var(--space-2); }
/* ---------- Round 49: phone tables (`.table--reflow`, `.table--transpose`) ----------
   Talent-app tables that must fit a phone (≤ 639 px) with NO sideways scroll
   and no text below the accessible floor (body and numbers ≥ 14 px, labels
   ≥ 12 px, tap targets ≥ 44 px). Both modifiers keep the real <table> — one
   set of cells, so a screen reader hears each value once — and only re-flow
   it with CSS. Nothing here applies at 640 px and above.

   `.table--reflow`: each body row becomes a small card. The row header
   (`th[scope=row]`, or a cell with `.reflow-title`) is the card's title
   across the full width; every other cell sits in a two-column grid with its
   column name (`data-label`, set in the markup) as a small label above the
   value. `.reflow-wide` gives a cell the full width (bars, lists, nested
   tables), `.reflow-hide` drops it on a phone. The visible label is
   generated content with empty alt text (`content: … / ""`), so assistive
   technology reads the real column header instead of the label twice. The
   header row stays in the accessibility tree, clipped. Put explicit ARIA
   table roles on the elements (`role="row"`, `"cell"`, …): some browsers drop
   table semantics once a table is no longer `display: table`.

   `.table--transpose`: a small matrix whose rows are few (e.g. Solo / Group /
   Total) and whose columns are many turns on its side — the rows become
   columns of numbers and the column headings become row labels, so it reads
   as a narrow table. Set `--transpose-rows` to the number of cells in each
   original row (header cell included). Same ARIA-role rule as above.
   One exception at 640 px and above (round 1121): the breakdown in an opened
   cast card's right half (`.cast-card--split.is-open`) turns on its side too. */
@media (max-width: 639px) {
  .table.table--reflow,
  .table.table--reflow > tbody { display: block; width: 100%; min-width: 0; }
  .table.table--reflow > thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .table.table--reflow > tbody > tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense;
    gap: var(--space-3) var(--space-4);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }
  .table.table--reflow > tbody > tr:last-child { border-bottom: 0; }
  .table.table--reflow > tbody > tr > th,
  .table.table--reflow > tbody > tr > td {
    display: block; min-width: 0; padding: 0; border: 0;
    text-align: left; white-space: normal; background: transparent;
    font-size: 0.875rem;
  }
  .table.table--reflow > tbody > tr > th[scope="row"],
  .table.table--reflow > tbody > tr > .reflow-title {
    grid-column: 1 / -1; font-size: 1rem; font-weight: 700; color: var(--color-text);
  }
  .table.table--reflow > tbody > tr > [data-label]::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block; margin-bottom: var(--space-1);
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--color-gray-600);
  }
  .table.table--reflow > tbody > tr > .reflow-wide { grid-column: 1 / -1; }
  .table.table--reflow > tbody > tr > .reflow-hide { display: none; }
}

/* `.table--transpose` applies on a phone either way up: portrait (≤ 639 px)
   and held sideways (a touch screen under 500 px tall), where a matrix in a
   half-width column needs it just as much. On a desktop or tablet only inside
   an opened cast card's right half (`.cast-card--split.is-open`, round 1121). */
@media (max-width: 639px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .table.table--transpose {
    display: grid; grid-auto-flow: column;
    grid-template-rows: repeat(var(--transpose-rows, 5), auto);
    grid-template-columns: minmax(0, 1.3fr); grid-auto-columns: minmax(0, 1fr);
    width: 100%;
  }
  .table.table--transpose > thead,
  .table.table--transpose > tbody,
  .table.table--transpose > thead > tr,
  .table.table--transpose > tbody > tr { display: contents; }
  .table.table--transpose th,
  .table.table--transpose td {
    display: block; min-width: 0;
    padding: var(--space-2) var(--space-3); border: 0; border-top: 1px solid var(--color-border-subtle);
    white-space: normal; font-size: 0.875rem; text-align: right;
  }
  /* The old column headings: row labels down the left. */
  /* Sentence case at 13 px: an uppercase label wraps badly in a narrow column.
     Set in full because `.table tbody th` reaches a transposed table nested in
     another table's body. */
  .table.table--transpose > thead th {
    text-align: left; font-size: 0.8125rem; line-height: 1.3; font-weight: 600;
    text-transform: none; letter-spacing: 0; white-space: normal; color: var(--color-gray-600);
  }
  /* The old row headings: the new column headings across the top. */
  .table.table--transpose > tbody th[scope="row"] { text-align: right; font-size: 0.875rem; font-weight: 700; background: var(--color-gray-50); }
  .table.table--transpose > thead th:first-child,
  .table.table--transpose > tbody th[scope="row"] { border-top: 0; }
}

/* The production summary's tables on a phone: the access table and the
   cast table (Table view) re-flow into cards; each actor's solo / group /
   total breakdown turns on its side. Figures and lines that were 12–13 px
   come up to 14 px, badges to 12 px, and the controls to 44 px. */
.cast-breakdown { --transpose-rows: 5; }
@media (max-width: 639px) {
  .summary-table { overflow-x: visible; }
  .summary-table .table.table--reflow,
  .summary-table .table.table--transpose { min-width: 0; }
  .summary-table .table.table--reflow > tbody > tr > th[scope="row"] { font-size: 1rem; }
  .summary-table .status-badge,
  .cast-card .status-badge,
  .cast-table__meta .status-badge { font-size: 0.75rem; height: 24px; }
  .cast-table__sub, .cast-table__sub-inline,
  .cast-card__stats, .cast-card__pct, .cast-card__foot, .cast-table__meta,
  .summary-table .allowance-rows, .cast-card .allowance-rows { font-size: 0.875rem; }
  .cast-table__sub { white-space: normal; }
  .cast-table .cast-table__toggle { min-height: 44px; font-size: 1rem; }
  .cast-table__row.is-open, .cast-table__detail { background: var(--color-gray-50); }
  .table.table--reflow > tbody > tr.cast-table__row.is-open { border-bottom: 0; padding-bottom: 0; }
  .cast-table__detail > td { padding: 0; }
  .cast-card__detail { overflow-x: visible; }
  .cast-card__more { min-height: 44px; font-size: 0.875rem; }
  .cast-head .view-toggle { height: 46px; } /* 44 px inside the 1 px border */
  .cast-head .view-toggle__btn--icon { min-width: 44px; }
}
@media (max-width: 639px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .cast-breakdown { width: 100%; }
  .cast-breakdown.table--transpose .cast-breakdown__total th,
  .cast-breakdown.table--transpose .cast-breakdown__total td { border-top: 1px solid var(--color-border-subtle); border-left: 1px solid var(--color-border); }
  .cast-breakdown.table--transpose .cast-breakdown__total th { border-top: 0; }
}
.summary-progress .stat__value { font-size: 1.5rem; }
@media (max-width: 479px) {
  .summary-hero { padding: var(--space-4); }
  .summary-hero__number { font-size: 2.25rem; }
}

/* ---------- Tally: decision counts at a glance (round 5) ----------
   Markup: <ul class="tally" aria-label="…"> of <li class="tally__item
   tally__item--killed|approved"> with .tally__icon (decorative ✕ / ✓),
   .tally__count and .tally__label. Red = killed, green = approved / unkilled
   — the same meaning as the status tabs. */
.tally { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.tally__item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3); border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface); min-width: 9rem; }
.tally__icon { flex: none; width: 40px; height: 40px; border-radius: var(--radius-full); display: grid; place-items: center; color: #fff; }
.tally__text { display: flex; flex-direction: column; text-align: left; }
.tally__count { font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: var(--color-text); font-variant-numeric: tabular-nums; }
.tally__label { font-size: 0.8125rem; font-weight: 600; }
.tally__item--killed { background: var(--color-error-bg); border-color: #FECACA; }
.tally__item--killed .tally__icon { background: var(--color-error); }
.tally__item--killed .tally__label { color: #991B1B; }
.tally__item--unkilled { background: var(--color-info-bg); border-color: #BFDBFE; }
.tally__item--unkilled .tally__icon { background: #1D4ED8; color: #fff; }
.tally__item--unkilled .tally__label { color: #1E40AF; }
.tally__item--approved { background: var(--color-success-bg); border-color: #A7F3D0; }
.tally__item--approved .tally__icon { background: var(--color-success-ink); }
.tally__item--approved .tally__label { color: #065F46; }
/* Owner 2026-11-14: Excluded (killed and hidden from cast) — the black ✕ of the tile corner. */
.tally__item--excluded { background: var(--color-gray-100, #F4F4F5); border-color: #D4D4D8; }
.tally__item--excluded .tally__icon { background: #18181B; }
.tally__item--excluded .tally__label { color: #27272A; }
/* Round 10: a tile can be a link to its tab — the whole tile is the target. */
.tally__item--link { padding: 0; }
.tally__link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3); color: inherit; text-decoration: none; border-radius: inherit; width: 100%; }
.tally__item--link { transition: transform var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease); }
.tally__item--link:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tally__link:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Day card: the day name is a link stretched over the whole card, so the
   card stays one target while "Submit kills" remains a separate button
   (a <button> inside an <a> is invalid HTML). */
.day-card { position: relative; display: flex; align-items: center; gap: var(--space-5); padding: var(--space-4) var(--space-5); }
.day-card__main { flex: 1 1 auto; min-width: 0; }
.day-card__name { font-size: 1rem; font-weight: 700; margin: 0 0 0.125rem; display: flex; align-items: center; gap: var(--space-2); }
/* 84 px ring (round 5): "100%" and "VIEWED" sit inside the stroke with room
   to spare instead of touching it. */
.day-card .progress-circle { width: 84px; height: 84px; flex: none; }
.day-card .progress-circle__value { font-size: 0.9375rem; }
.day-card .progress-circle__caption { font-size: 0.55rem; }
.day-card__link { color: inherit; text-decoration: none; }
.day-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.day-card__link:focus-visible { outline: none; }
.day-card:has(.day-card__link:focus-visible) { box-shadow: var(--shadow-focus); }
.day-card__action { position: relative; z-index: 1; flex: none; }
/* Round 22: a done day is evenly tinted (fill + border on every side; no
   one-sided edge), the Viewed ring becomes a solid tick disc, and a Done stamp
   with a padlock replaces the old "Kills submitted" line. */
.day-card.is-submitted { background: var(--color-success-bg); border-color: #6EE7B7; }
.day-card__done-disc { flex: none; width: 84px; height: 84px; display: inline-flex; }
.day-card__done-disc circle { fill: var(--color-success-ink); }
.day-card__done-disc path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
/* A wrapper (button + its visible reason) rather than the button itself. */
.day-card__action:not(.btn) { display: inline-flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }
/* Title row with an optional "Done" chip once every day is submitted (round 5). */
.day-list__title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
/* The permanent "all submitted" banner: no dismiss, a heavier success edge. */
.day-list__all-done .alert { border: 1px solid #6EE7B7; }
/* Round 37 (owner): a notice above the search row (all submitted, a success, a
   not-submitted warning) always keeps a gap before it. */
.alert + .day-list__tools, .day-list__all-done + .day-list__tools { margin-top: var(--space-4); }
.alert + .alert, .alert + .day-list__all-done, .day-list__all-done + .alert { margin-top: var(--space-3); }
/* "Submit kills for all days" + its count / visible reason when disabled (A-W7). */
.day-list__submit { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }
.day-list__submit-note { font-size: 0.75rem; color: var(--color-text-secondary); text-align: right; }
/* Round 30: a restricted viewer's "what you are seeing" note, full width under the search row. */
.day-list__scope { margin: 0 0 var(--space-4); }
.day-card__figures {
  display: flex; flex-wrap: wrap; gap: 0 var(--space-4); margin: 0;
  font-size: 0.8125rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums;
}
.day-card__figures strong { color: var(--color-text); }
/* The Done stamp (round 22): outlined, slightly tilted, padlock + Done + date.
   --color-success-ink (#047857) is success one step darker so the small date text keeps 4.5:1 on the tint. */
.day-card__stamp {
  flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 var(--space-2) 0 0;
  padding: 4px 12px 5px; border: 2.5px solid var(--color-success-ink); border-radius: var(--radius-md, 8px); color: var(--color-success-ink);
  transform: rotate(-6deg); text-align: center; line-height: 1.1;
}
/* Round 34: straight on phones — a tilted stamp looks askew in the narrow card. */
@media (max-width: 639px) { .day-card__stamp { transform: none; } }
.day-card__stamp-word { display: inline-flex; align-items: center; gap: 6px; font-size: 1.125rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.day-card__stamp-word svg { width: 15px; height: 15px; stroke-width: 2.5; }
.day-card__stamp time { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.02em; }
/* Round 31 (viewers): the same stamp says Approved (green) or Unkilled (blue) per day. */
.day-card__stamp-sub { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.02em; }
.day-card__stamp--unkilled { border-color: #1D4ED8; color: #1D4ED8; }
.day-card__foot {
  margin-top: var(--space-3); padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
  font-size: 0.75rem; color: var(--color-text-secondary);
}
.day-card__foot p { margin: 0; }
.day-card__foot p + p { margin-top: 4px; }
.day-card__foot strong { color: var(--color-text); font-weight: 600; }
.day-card--stack { flex-direction: column; align-items: stretch; gap: var(--space-3); }
.day-card__head { display: flex; align-items: center; gap: var(--space-4); }
.day-card__chev { flex: none; color: var(--color-text-tertiary); display: inline-flex; }
@media (max-width: 639px) {
  .day-card { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .day-card__head { gap: var(--space-3); }
  /* Round 23/24: compact phone card — 60 px ring with a 5 px stroke / tick (the "Viewed N of M" figure
     carries the caption), figures one per line, a smaller stamp. */
  .day-card .progress-circle, .day-card__done-disc, .day-card__done-disc svg { width: 60px; height: 60px; }
  .day-card .progress-circle__caption { display: none; }
  .day-card .progress-circle__value { font-size: 0.75rem; letter-spacing: 0; }
  .day-card__name { font-size: 0.9375rem; }
  .day-card__figures { flex-direction: column; font-size: 0.75rem; line-height: 1.45; }
  .day-card__stamp { padding: 2px 8px 3px; border-width: 2px; margin-right: 2px; }
  .day-card__stamp-word { font-size: 0.875rem; gap: 4px; letter-spacing: 0.1em; }
  .day-card__stamp-word svg { width: 12px; height: 12px; }
  .day-card__stamp time { font-size: 0.5625rem; }
  /* Submit kills for all days: full width under the search; the unviewed count is dropped. */
  .day-list__submit { flex: 1 1 100%; align-items: stretch; }
  .day-list__submit-note { text-align: center; }
  .day-list__submit-note--count { display: none; }
}

/* File-name search results across days. */
.search-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.search-result {
  /* Round 9: fixed columns so day, status and the select star line up row to row. */
  display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(7rem, 12rem) 6.5rem 1.25rem; align-items: center; gap: var(--space-3);
  padding: var(--space-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: inherit; text-decoration: none; font-size: 0.8125rem;
}
.search-result:hover { background: var(--color-gray-50); }
.search-result:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.search-result__thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; display: block; }
.search-result__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-result__name { font-weight: 600; }
.search-result__day { color: var(--color-text-secondary); }
.search-result__name, .search-result__day { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result__select { display: inline-flex; justify-content: center; }
.search-result__select svg { color: var(--color-select-strong); stroke: var(--color-select-edge); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke fill; }
@media (max-width: 559px) {
  .search-result { grid-template-columns: 48px minmax(0, 1fr) auto 1.25rem; }
  .search-result__day { grid-column: 2; grid-row: 2; font-size: 0.75rem; }
  .search-result__name { grid-row: 1; }
  .search-result__status { grid-column: 3; grid-row: 1 / span 2; }
  .search-result__select { grid-column: 4; grid-row: 1 / span 2; }
  .search-result__thumb { grid-row: 1 / span 2; }
}

/* ---------- Public header icon cell + drawer context ---------- */
.app-header__icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: transparent; border: 0; color: #fff; cursor: pointer;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}
.app-header__icon-btn:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.app-header__icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.app-header__icon-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.25; }
.app-header__title {
  font-size: 0.9375rem; font-weight: 600; color: #fff;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drawer-context { padding: 0.75rem 0.875rem; border-bottom: 1px solid var(--color-border-subtle); background: var(--color-gray-50); }
.drawer-context__label {
  margin: 0 0 2px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-text-tertiary);
}
.drawer-context__row { display: flex; align-items: center; gap: 0.5rem; }
.drawer-context__name { margin: 0; font-weight: 600; font-size: 0.875rem; min-width: 0; }
@media (pointer: coarse) {
  .side-nav--drawer .side-nav__item,
  .side-nav--drawer .side-nav__foot .btn { min-height: 48px; }
}

/* ---------- Route announcer ----------
   A page heading focused after a route change shows no ring: focus moved
   there for screen readers, not as a keyboard target. */
[data-route-heading]:focus { outline: none; }

/* ---------- Sign-in viewfinder — `.signin-viewfinder` ----------
   The sign-in screen only (React `/login`, including its two-step and
   auto-login states). A full-bleed dark page dressed as a camera viewfinder:
   a centred HUD label replaces the black `.app-header` on this one screen
   (documented chrome exception, components.md § Sign-in viewfinder), four
   corner brackets frame the form, a green focus square sits above it, and a
   row of exposure readouts runs along the bottom above the public footer
   links. Everything decorative is `aria-hidden="true"`.

   Motion (transform / opacity only, no layout shift; all of it is stripped
   under `prefers-reduced-motion: reduce`, which shows the settled state):
     1. the corner brackets ease in from just outside the frame on load;
     2. the focus square "hunts" (small drifts) for ~2.4 s, then locks; it
        fills solid while any field inside the frame has focus;
     3. the readouts dim briefly while `.is-metering` is on (the page toggles
        it while the values tick between realistic stops, then settle).
   There is deliberately no REC dot or any other recording cue. */

.signin-viewfinder {
  --vf-ink: #fff;
  --vf-ink-soft: var(--color-gray-200);
  --vf-ink-muted: var(--color-gray-400);   /* >= 5:1 on the lightest gradient stop */
  --vf-hud: rgba(255, 255, 255, 0.72);
  --vf-line: rgba(255, 255, 255, 0.85);
  --vf-lock: #22C55E;                     /* decorative only: the AF square */
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--vf-ink);
  background-color: #0b0a0d;
  background-image: radial-gradient(ellipse at 30% 20%, #3a2a2a 0, #141017 45%, #060608 100%);
}
/* Very faint film grain + vignette. Static (no animation) and fixed, so a
   tall two-step form on a phone scrolls over them. */
.signin-viewfinder::before,
.signin-viewfinder::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.signin-viewfinder::before {
  background: repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
}
.signin-viewfinder::after {
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

/* Embedded preview (the design-language showcase): the layers stay inside
   the box instead of covering the viewport. Not used by the app. */
.signin-viewfinder--embed { min-height: 0; overflow: hidden; border-radius: var(--radius-xl); }
.signin-viewfinder--embed::before,
.signin-viewfinder--embed::after { position: absolute; }

/* HUD rows. The top row holds ONE label, centred across the full page
   width — the frame is centred in the same width, so the label sits on the
   frame's vertical axis. */
.signin-viewfinder__hud {
  margin: 0;
  padding: var(--space-6) var(--space-4) 0;
  font: 500 0.75rem/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--vf-hud);
}
.signin-viewfinder__hud--bottom { padding: 0 var(--space-4) var(--space-5); }

.signin-viewfinder__main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: var(--space-8) var(--space-4);
  outline: none;
}

/* The frame: the form column plus its four corner brackets. */
.signin-viewfinder__frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: var(--space-16) 56px;
}
.signin-viewfinder__corner {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 3px solid var(--vf-line);
  animation: vf-corner-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.signin-viewfinder__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; --vf-from: -14px, -14px; }
.signin-viewfinder__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; --vf-from: 14px, -14px; animation-delay: 60ms; }
.signin-viewfinder__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; --vf-from: -14px, 14px; animation-delay: 120ms; }
.signin-viewfinder__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; --vf-from: 14px, 14px; animation-delay: 180ms; }
@keyframes vf-corner-in {
  from { opacity: 0; transform: translate(var(--vf-from)); }
  to   { opacity: 1; transform: translate(0, 0); }
}

/* AF square. Placed with `left: calc(50% - 8px)` (not a transform) so the
   hunting keyframes own `transform`. The fill is a pseudo-element, so
   "lock" is an opacity + scale change, never a repaint of the box. */
.signin-viewfinder__focus {
  position: absolute;
  top: 18px;
  left: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border: 2px solid var(--vf-lock);
  border-radius: 2px;
  animation: vf-focus-hunt 2.4s cubic-bezier(0.4, 0, 0.2, 1) 400ms both;
}
.signin-viewfinder__focus::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 1px;
  background: var(--vf-lock);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.signin-viewfinder__frame:focus-within .signin-viewfinder__focus::after {
  opacity: 1;
  transform: scale(1);
}
@keyframes vf-focus-hunt {
  0%   { opacity: 0;   transform: translate(-22px, 10px) scale(1.35); }
  15%  { opacity: 0.9; transform: translate(-22px, 10px) scale(1.35); }
  35%  { transform: translate(14px, -6px) scale(1.2); }
  55%  { transform: translate(-6px, 4px) scale(1.1); }
  72%  { transform: translate(3px, -2px) scale(1.04); }
  84%  { transform: translate(0, 0) scale(0.9); }
  100% { opacity: 1;   transform: translate(0, 0) scale(1); }
}

/* Frame content. */
.signin-viewfinder__logo { display: block; width: fit-content; margin: 0 auto var(--space-6); }
.signin-viewfinder__logo img { display: block; width: 150px; height: auto; }
.signin-viewfinder__title {
  margin: 0 0 var(--space-2);
  font-size: 1.875rem;                    /* H1 */
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--vf-ink);
}
.signin-viewfinder__lede {
  margin: 0 0 var(--space-6);
  font-size: 0.875rem;
  text-align: center;
  color: var(--vf-ink-muted);
}
.signin-viewfinder__note {
  margin: 0;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--vf-ink-muted);
}
.signin-viewfinder__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  margin: 0;
  font-size: 0.875rem;
  color: var(--vf-ink-muted);
}

/* Dark-surface re-skin of the shipped recipes inside the page. Links are
   light, never brand red (#c00000 is ~2.9:1 here); brand red stays on the
   Sign in button (`.btn btn-primary btn--block btn--lg`). */
.signin-viewfinder a:not(.btn) {
  color: var(--vf-ink-soft);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 2px;
}
.signin-viewfinder a:not(.btn):hover { color: #fff; text-decoration-color: currentColor; }
.signin-viewfinder :is(a, button):focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: none; }
.signin-viewfinder .field__label { color: var(--vf-ink-soft); }
.signin-viewfinder .field__input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.signin-viewfinder .field__input::placeholder { color: rgba(255, 255, 255, 0.5); }
.signin-viewfinder .field__input:hover { border-color: rgba(255, 255, 255, 0.4); }
.signin-viewfinder .field__input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(224, 69, 69, 0.55); }
.signin-viewfinder .field__input[aria-invalid="true"] { border-color: var(--color-brand-300); }
.signin-viewfinder .field__error { color: var(--color-brand-300); }
.signin-viewfinder .field-check__label { color: var(--vf-ink-soft); }
.signin-viewfinder .field-check__input:focus-visible { outline-color: #fff; }
.signin-viewfinder .field-check__input[aria-invalid="true"] { outline-color: var(--color-brand-300); }
.signin-viewfinder .field__help { color: var(--vf-ink-muted); }
.signin-viewfinder .field__reveal { color: rgba(255, 255, 255, 0.72); }
.signin-viewfinder .field__reveal:hover { color: #fff; }
.signin-viewfinder .field__reveal[aria-pressed="true"] { color: var(--color-brand-300); }
.signin-viewfinder .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.signin-viewfinder .btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); }
.signin-viewfinder .btn-ghost { color: rgba(255, 255, 255, 0.78); }
.signin-viewfinder .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); color: #fff; }
/* Light ink for a bare status line (the spinner caption) only: an .alert is a
   light card with its own tone ink, and light-on-light would be unreadable
   ("Sign in to open this production.", a reset-password success). */
.signin-viewfinder [role="status"]:not(.alert) { color: var(--vf-ink-soft); }
.signin-viewfinder .spinner:not(.spinner--inverse) { border-color: rgba(255, 255, 255, 0.25); border-top-color: #fff; }

/* Exposure readouts: decorative mono labels along the bottom edge. */
.signin-viewfinder__readouts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  max-width: 1376px;
  margin: 0 auto var(--space-4);
  padding: 0;
  list-style: none;
  text-transform: none;                   /* "f/2.8", not "F/2.8" */
  font-variant-numeric: tabular-nums;
  transition: opacity 300ms var(--ease);
}
.signin-viewfinder__readouts.is-metering { opacity: 0.55; }
.signin-viewfinder__readout { white-space: nowrap; }

/* Public footer links — the same destinations as the public footer. */
.signin-viewfinder__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  font: 400 0.75rem/1.5 var(--font-sans);
  letter-spacing: normal;
  text-transform: none;
  color: var(--vf-ink-muted);
}

/* Phone: tighter frame, smaller brackets, three readouts centred. */
@media (max-width: 639px) {
  .signin-viewfinder__hud { padding-top: var(--space-4); }
  .signin-viewfinder__main { padding: var(--space-4) var(--space-3); }
  .signin-viewfinder__frame { padding: 52px 24px 40px; }
  .signin-viewfinder__corner { width: 28px; height: 28px; border-width: 2px; }
  .signin-viewfinder__focus { top: 14px; }
  .signin-viewfinder__title { font-size: 1.5rem; }
  .signin-viewfinder__logo { margin-bottom: var(--space-5); }
  .signin-viewfinder__logo img { width: 120px; }
  .signin-viewfinder__readouts { justify-content: center; }
  .signin-viewfinder__readout--wide { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .signin-viewfinder__corner,
  .signin-viewfinder__focus { animation: none; }
  .signin-viewfinder__focus::after,
  .signin-viewfinder__readouts { transition: none; }
}

/* ---------- Day page (round 12; round 32 day view option A) ----------
   The day view's content column, centred at 1,120 px like every talent page.
   Round 32: the old sticky `.day-head` tab band and `.day-tools` row are gone —
   a `.day-progress` card heads the page, a `.filter-panel--gallery` rail sits
   beside the grid (`.day-page__body`), as on the Image summary. */
.day-page {
  max-width: calc(var(--page-max) + 2 * var(--space-6));
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Tabs on the dark header: neutral labels, an underline for the open tab, and
   the COUNT CHIP carries the status colour — Unviewed / Viewed blue (the
   unkilled colour), Killed red, All neutral. White on #1D4ED8 = 6.7:1, on
   #B91C1C = 6.5:1. */
.tabs--day {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-1) var(--space-2);
  border-bottom: 0;
  padding-top: var(--space-3);
}
.tabs--day .tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  margin: 0;
  color: var(--color-gray-400);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.tabs--day .tab:hover { color: #fff; }
.tabs--day .tab.is-active,
.tabs--day .tab[aria-current="page"] { color: #fff; border-bottom-color: var(--color-primary); } /* round 31: brand red, so the open tab stands out from the page below */
.tabs--day .tab:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: var(--radius-sm); }
.tabs--day .tab .tab__count { background: #27272A; color: #E4E4E7; min-width: 24px; }
.tabs--day .tab.is-active .tab__count { background: #52525B; color: #fff; }
.tabs--day .tab.tab--unviewed .tab__count,
.tabs--day .tab.tab--viewed .tab__count { background: #1D4ED8; color: #fff; }
.tabs--day .tab.tab--killed .tab__count { background: #B91C1C; color: #fff; }
.tabs--day .tabs__group {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 0;
  padding: 0 var(--space-1);
  background: transparent;
  border: 1px solid #3F3F46;
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.tabs--day .tabs__group-label {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 var(--space-2);
  background: #0B0B0D;
  color: #93C5FD;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Round 29: downloads folded into the Image summary — a Download menu (choices per
   grant: JPG ZIP, XLSX, PDF; each for the images the filters match) and a Recent
   exports button + modal list. */
.export-menu { position: relative; }
.export-menu > .btn { display: inline-flex; align-items: center; gap: var(--space-2); }
.export-menu > .btn svg { width: 14px; height: 14px; }
.filter-popover-wrap.export-menu .export-menu__panel { position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 40; width: 340px; color: var(--color-text); text-align: left; }
.export-menu__panel .filter-panel__body { padding: var(--space-4); }
.filter-popover-wrap.export-menu .export-menu__panel { max-height: none; overflow: visible; }
/* Phones: the panel spans the header's actions row instead of hanging off the button. */
@media (max-width: 639px) {
  .page-head__actions:has(.export-menu) { position: relative; width: 100%; }
  .filter-popover-wrap.export-menu { position: static; }
  .filter-popover-wrap.export-menu .export-menu__panel { left: 0; right: 0; width: auto; }
}
.export-menu__what { margin: 0 0 var(--space-3); font-size: 0.8125rem; color: var(--color-text-secondary); }
.export-menu__what strong { color: var(--color-text); }
.export-menu__choices { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.export-menu__choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: var(--space-3);
  font: inherit; text-align: left; cursor: pointer; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.export-menu__choice:hover:not(:disabled) { border-color: var(--color-primary); background: var(--color-gray-50); }
.export-menu__choice:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.export-menu__choice:disabled { opacity: 0.5; cursor: not-allowed; }
.export-menu__label { font-weight: 700; font-size: 0.875rem; color: var(--color-text); }
.export-menu__hint { font-size: 0.75rem; color: var(--color-text-secondary); }
.export-recent { display: inline-flex; align-items: center; gap: var(--space-2); }
.export-recent__count { min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--color-primary); color: #fff; }
.export-recent__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.export-recent__row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border-subtle); }
.export-recent__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.export-recent__name { font-weight: 600; overflow-wrap: anywhere; }
.export-recent__meta { font-size: 0.75rem; color: var(--color-text-secondary); }
/* Round 27: day complete (viewed everything, not yet submitted) — a big action
   first, then the tally, then the explanation: a centred block, left-aligned text. */
.day-complete { gap: var(--space-4); }
/* Focus is moved here for screen readers only (it is not a control): no ring. */
.day-complete:focus { outline: none; box-shadow: none; }
.day-complete__cta { min-width: min(100%, 320px); }
.day-complete__text { max-width: 46ch; width: 100%; margin: 0 auto; text-align: left; font-size: 0.875rem; line-height: 1.55; color: var(--color-text-secondary); }
.day-complete__text p { margin: 0; }
.day-complete__text p + p { margin-top: var(--space-4); }
.day-complete__text strong { color: var(--color-text); }

/* Round 32 (owner, day view option A): the progress header card above the
   filter rail — "You have 12 of 40 images left to review on Day 3", a hint,
   a progress bar (the unviewed blue; green once complete) and the persona's
   action on the right (Submit kills / Mark done; nothing for viewers). Done:
   a green tint and the `.day-card__stamp` (padlock + Done + time) in the
   action slot. Phones: one column, the action full width under the bar. */
.day-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin: var(--space-6) 0 var(--space-2);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.day-progress__text { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.day-progress__title { margin: 0; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--color-text); }
.day-progress__hint { margin: 0; font-size: 0.875rem; color: var(--color-text-secondary); }
/* Round 35: the production account's numbered steps under the title (owner's option B).
   Black numbered discs; the last step (the action) bold, its disc brand red like the button.
   Wraps on wide screens, one step per line on phones. */
.day-progress__steps { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 0.875rem; color: var(--color-text-secondary); }
.day-progress__steps li { display: inline-flex; align-items: center; gap: 7px; }
.day-progress__step-n { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--color-gray-900, #18181B); color: #fff; font-size: 0.6875rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.day-progress__steps .is-last { font-weight: 700; color: var(--color-text); }
.day-progress__steps .is-last .day-progress__step-n { background: var(--color-primary); }
@media (max-width: 639px) { .day-progress__steps { flex-direction: column; gap: 6px; } }
.day-progress .progress { height: 8px; margin-top: var(--space-3); }
.day-progress .progress__fill { background: #1D4ED8; }
.day-progress .progress--complete .progress__fill { background: var(--color-success); }
.day-progress__action { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.day-progress__action .btn { min-height: 44px; padding-inline: var(--space-6); }
.day-progress__note { font-size: 0.75rem; color: var(--color-text-secondary); }
.day-progress--done { background: var(--color-success-bg); border-color: #A7F3D0; }
.day-progress--done .day-card__stamp { margin: 0 var(--space-2); }
/* The rail + grid row: the rail is a card like the header, and the grid's
   right edge lines up with the header card's. */
.day-page__body { align-items: flex-start; gap: var(--space-6); margin-top: var(--space-4); }
.day-page__body .filter-panel--gallery {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.day-page__body .gallery-island__main { padding: 0; }
@media (max-width: 639px) {
  .day-progress { grid-template-columns: 1fr; padding: var(--space-4); margin-top: var(--space-4); }
  .day-progress__title { font-size: 1.125rem; }
  .day-progress__action { align-items: stretch; }
  .day-progress__action .btn { width: 100%; }
  .day-progress--done .day-progress__action { align-items: flex-start; }
}

/* Tick boxes appear on hover / focus, on a ticked tile, and on every tile
   once anything is ticked; always on touch screens (no hover there). */
.day-page .image-grid-card__check { opacity: 0; transition: opacity var(--duration-base) var(--ease); }
.day-page .image-grid-card:hover .image-grid-card__check,
.day-page .image-grid-card:focus-within .image-grid-card__check,
.day-page .image-grid-card.is-selected .image-grid-card__check,
.day-page--picking .image-grid-card__check { opacity: 1; }
@media (pointer: coarse) { .day-page .image-grid-card__check { opacity: 1; } }

@media (max-width: 640px) {
  .day-page { padding: 0 var(--space-4); }
  .tabs--day .tab { padding: 0 var(--space-3); }
}
@media (prefers-reduced-motion: reduce) {
  .day-page .image-grid-card__check { transition: none; }
}

/* ---------- Single image, round 13 ----------
   Unkill is green (it restores the image; Kill stays brand red). On the
   fitted desktop page the image gives up some room so the decision buttons
   are larger and more prominent. White on --color-success-ink = 5.5:1. */
.lightbox :is(.lightbox__actions-under, .lightbox__actionbar) .btn.lightbox__unkill:not(.btn-primary) {
  background: var(--color-success-ink); border-color: var(--color-success-ink); color: #fff;
}
.lightbox :is(.lightbox__actions-under, .lightbox__actionbar) .btn.lightbox__unkill:not(.btn-primary):hover:not(:disabled) {
  background: #065F46; border-color: #065F46; color: #fff;
}
.lightbox--fit .lightbox__stage { padding: var(--space-8) var(--space-12); }
.lightbox--fit .lightbox__actions-under { gap: var(--space-4); padding: var(--space-5) var(--space-6); }
.lightbox--fit .lightbox__actions-under .btn { min-height: 48px; min-width: 144px; padding: 0 var(--space-6); font-size: 1rem; }


/* Production summary cast, round 14: kills used of the allowance on the
   actor's own row — solo above group; red and bold once all used. */
/* Round 37 (owner's A1): the cast's kill allowances as thin bars (`.allowance-bar`),
   one row per bucket — label · bar · "18 of 25". Same rows in the table's last
   column and in each card's "Kill allowance" block. */
.allowance-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.allowance-rows__row { display: grid; grid-template-columns: 2.75rem minmax(40px, 1fr) auto; align-items: center; gap: var(--space-2); }
/* An "Upper group" bucket (the third row) needs a wider label column, on every row so the bars still line up. */
.allowance-rows:has(> .allowance-rows__row:nth-child(3)) > .allowance-rows__row { grid-template-columns: 6.25em minmax(40px, 1fr) auto; }
.allowance-rows__label { color: var(--color-text-secondary); white-space: nowrap; }
.allowance-rows__fig { color: var(--color-text-secondary); white-space: nowrap; }
.allowance-rows__fig b { color: var(--color-text); font-weight: 700; }
.allowance-rows__fig.is-high b { color: #DC2626; }
.allowance-rows__none { grid-column: 2 / -1; color: var(--color-text-tertiary, #71717A); font-style: italic; }
.cast-table__allowance { min-width: 170px; }
.cast-card__allowance { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-border-subtle, #F4F4F5); }

/* Production selector card, round 15: title left, status chip right-aligned. */
.prod-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.prod-card__head .prod-card__name { min-width: 0; }
.prod-card__chip { flex: none; margin-top: 2px; }

/* ---------- Talent app page width (round 17) ----------
   One centred column for every signed-in talent page: 1,120 px of content.
   `.talent-page` is the page container; the app bar's menu, crumbs and
   account line up with the same content edges (`#root` scopes it to the
   talent app — the admin's phone header also uses `.app-bar`). No full-width
   mode: the owner chose one consistent, centred layout. */
:root { --page-max: 1120px; }
.talent-page {
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--space-6));
  margin-inline: auto;
  padding-inline: var(--space-6);
}
#root .app-bar { padding-inline: max(var(--space-4), calc((100% - var(--page-max)) / 2)); }
/* Round 37 (owner): the production summary widens the whole page column — app
   bar, black page head and content together — so the cast table fits without a
   sideways scroll on a laptop. */
#root:has(.summary--wide) { --page-max: 1360px; }

.talent-page > .gallery-toolbar { position: static; padding-inline: 0; background: transparent; border-bottom: 0; }
@media (max-width: 640px) {
  .talent-page { padding-inline: var(--space-4); }
}

/* ---------- Single image decision bar, round 18 ----------
   A taller bottom bar. Centre: Kill (brand red) + Kill and exclude (black,
   bold white), or one green Unkill once either is pressed, with "Kill versus
   kill and exclude, what's the difference?" beneath. Right: Select, in its own
   fixed slot (the grid keeps it in place whatever the kill buttons do). The
   star is empty until selected, then gold — the same star marks the image. */
.lightbox--fit .lightbox__actions-under { padding: var(--space-6) var(--space-6) var(--space-5); }
/* Round 34: one centred group no wider than 640px (less mouse travel), kill
   decisions on its left edge and Select on its right, whatever the image's shape. */
.lightbox__decide {
  flex: 1 1 100%;
  max-width: 640px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-4);
}
.lightbox__decide-kill { grid-column: 1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.lightbox__decide-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--space-4); }
.lightbox__decide-select { grid-column: 2; justify-self: end; }
/* Round 37: one decision only (actors: Kill / Unkill) — centred under the image. */
.lightbox__decide--single { grid-template-columns: minmax(0, 1fr); }
.lightbox__decide--single .lightbox__decide-kill { align-items: center; }
.lightbox__decide--single .lightbox__decide-buttons { justify-content: center; }
.lightbox__decide .lightbox__difference-link { align-self: flex-start; padding-bottom: var(--space-1); font-size: 0.875rem; }
.lightbox :is(.lightbox__actions-under, .lightbox__actionbar) .btn.lightbox__exclude:not(.btn-primary) {
  background: #000; border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; font-weight: 700;
}
.lightbox :is(.lightbox__actions-under, .lightbox__actionbar) .btn.lightbox__exclude:not(.btn-primary):hover:not(:disabled) { background: #1f1f1f; border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.lightbox :is(.lightbox__actions-under, .lightbox__actionbar) .btn.lightbox__select:not(.btn-primary) {
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; gap: var(--space-2);
}
.lightbox :is(.lightbox__actions-under, .lightbox__actionbar) .btn.lightbox__select:not(.btn-primary):hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lightbox .btn.lightbox__select svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.lightbox :is(.lightbox__actions-under, .lightbox__actionbar) .btn.lightbox__select.is-starred:not(.btn-primary) { border-color: var(--color-select); }
.lightbox .btn.lightbox__select.is-starred svg { fill: var(--color-select); stroke: var(--color-select); }
/* Phone: the bar wraps — prev · Kill · Kill and exclude · ☆ · next, then the
   difference link on its own line underneath. */
.lightbox__actionbar:has(.lightbox__actionbar-foot) { flex-wrap: wrap; row-gap: var(--space-3); }
/* Phone upright (2026-11-15): the difference link sits well clear of the decisions
   (40 px) and recedes to slate-300 (#cbd5e1, about 11:1 on the page), still underlined. */
.lightbox--phone .lightbox__actionbar:has(.lightbox__actionbar-foot) { row-gap: var(--space-10); }
.lightbox--phone .lightbox__actionbar-foot .lightbox__difference-link {
  color: #cbd5e1; text-decoration-color: rgba(203, 213, 225, 0.55); text-underline-offset: 3px;
}
.lightbox__actionbar-foot { flex: 1 1 100%; display: flex; justify-content: center; }
.lightbox__actionbar-foot .lightbox__difference-link { align-self: center; font-size: 0.8125rem; }
.lightbox__actionbar .btn.lightbox__select--icon,
.lightbox__actionbar--four .btn.lightbox__select--icon { flex: 0 0 48px; min-width: 48px; width: 48px; padding: 0; justify-content: center; }

/* ---------- Single image info panel, round 18 ----------
   Title "Production › Day", then folding sections (all open by default). */
.lightbox__drawer-title { margin: 0 0 var(--space-1); font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.35; }
.lightbox__drawer-sep { color: rgba(255, 255, 255, 0.5); }
.lightbox__fold { gap: 0; }
/* Round 30: Keyboard shortcuts sits last and recedes (dimmer title, keys and caps). */
.lightbox__fold--quiet .lightbox__section-title,
.lightbox__fold--quiet .lightbox__keys { color: rgba(255, 255, 255, 0.58); } /* the dimmest that keeps 4.5:1 on the panel */
.lightbox__fold--quiet .kbd { color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }
/* Round 30, actor panel: this image's type stands out, the other bucket recedes. */
.lightbox__bucket strong { color: #fff; font-weight: 800; }
.lightbox__meta--buckets dt.is-strong, .lightbox__meta--buckets dd.is-strong { color: #fff; font-weight: 700; }
/* Round 37 (owner's A1): kill allowance bars. Filled by what is USED; the colour
   says how far through: up to 50 % green, 51–80 % amber, 81–100 % red. A status,
   not an action. `.allowance-meters` is the list in the dark info panel; the
   current image's bucket is bright, the others dimmed. `.allowance-bar` also
   works on light surfaces (production summary). */
.allowance-bar { display: block; height: 6px; border-radius: 999px; background: var(--allowance-track, var(--color-gray-100)); overflow: hidden; }
.allowance-bar__fill { display: block; height: 100%; border-radius: inherit; }
.allowance-bar--ok .allowance-bar__fill { background: #16A34A; }
.allowance-bar--warn .allowance-bar__fill { background: #D97706; }
.allowance-bar--high .allowance-bar__fill { background: #DC2626; }
.allowance-meters { list-style: none; margin: var(--space-3) 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); --allowance-track: rgba(255, 255, 255, 0.12); }
.allowance-meter { display: flex; flex-direction: column; gap: 6px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md, 8px); }
.allowance-meter__head { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 0.875rem; }
.allowance-meter.is-current { background: rgba(255, 255, 255, 0.06); }
.allowance-meter.is-current .allowance-meter__head { color: #fff; font-weight: 700; }
.allowance-meter.is-dim .allowance-meter__head { color: rgba(255, 255, 255, 0.62); }
.allowance-meter.is-dim .allowance-bar { opacity: 0.6; }
.lightbox__sheet-line .allowance-bar { margin-top: var(--space-2); flex-basis: 100%; --allowance-track: rgba(255, 255, 255, 0.12); }
.lightbox__meta--buckets dt.is-dim, .lightbox__meta--buckets dd.is-dim { color: rgba(255, 255, 255, 0.58); font-weight: 400; }
/* Round 30: "Images you appear in" as a compact table on the dark panel. */
.lightbox__table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.lightbox__table th, .lightbox__table td { padding: 6px 4px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.lightbox__table thead th { color: rgba(255, 255, 255, 0.55); font-weight: 600; font-size: 0.75rem; }
.lightbox__table th[scope="row"] { text-align: left; color: rgba(255, 255, 255, 0.72); font-weight: 500; }
.lightbox__table td { color: #f1f5f9; }
.lightbox__fold-summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: 32px; cursor: pointer; list-style: none;
}
.lightbox__fold-summary::-webkit-details-marker { display: none; }
.lightbox__fold-summary::after {
  content: ""; width: 8px; height: 8px; flex: none; margin-right: 4px;
  border-right: 2px solid rgba(255, 255, 255, 0.6); border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg); transition: transform var(--duration-base) var(--ease);
}
.lightbox__fold:not([open]) > .lightbox__fold-summary::after { transform: rotate(-45deg); }
.lightbox__fold-summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: var(--radius-sm); }
.lightbox__fold-body { display: flex; flex-direction: column; gap: 0.5rem; padding-top: var(--space-2); }
.lightbox__activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.lightbox__activity-row { display: flex; flex-direction: column; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.85); }
.lightbox__activity-what { color: rgba(255, 255, 255, 0.65); }
.lightbox__activity-row.is-killed .lightbox__activity-what,
.lightbox__activity-row.is-excluded .lightbox__activity-what { color: #fca5a5; }
.lightbox__activity-row.is-selected .lightbox__activity-what { color: var(--color-select); }
.lightbox__summary { width: 100%; border-collapse: collapse; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }
.lightbox__summary th, .lightbox__summary td { padding: 4px 0; text-align: right; font-weight: 400; }
.lightbox__summary thead th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.6); }
.lightbox__summary tbody th { text-align: left; color: rgba(255, 255, 255, 0.7); }
.lightbox__summary tbody tr + tr { border-top: 1px solid rgba(255, 255, 255, 0.08); }
@media (prefers-reduced-motion: reduce) { .lightbox__fold-summary::after { transition: none; } }

/* ---------- Day view header, round 19 (owner's option A) ----------
   The talent app bar has no logo and no name chip (the logo sits at the foot
   of the menu). On the day view the bar turns black and runs straight into
   the black tab band, so ☰ and the full breadcrumb head the page — no day
   title line. An actor's kills left sit on the right of the bar as rings
   (`.kill-rings`); Mark done / Submit kills moves to the tool row. */
#root:has(.page-head) .app-bar { background: #0B0B0D; border-bottom-color: #0B0B0D; color: #fff; }
#root:has(.page-head) .app-bar .app-bar__icon-btn { color: #fff; }
#root:has(.page-head) .app-bar .app-bar__icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
#root:has(.page-head) .app-bar .crumbs a { color: #A1A1AA; }
#root:has(.page-head) .app-bar .crumbs a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
#root:has(.page-head) .app-bar .crumbs__sep { color: #52525B; }
#root:has(.page-head) .app-bar .crumbs__here { color: #fff; }
#root:has(.page-head) .app-bar :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 767px) {
  /* Phones: just the day after the back arrow, as the original header did. */
  #root:has(.page-head) .app-bar .crumbs > li:not(:last-child) { display: none; }
}

/* Owner 2026-11-14: a "Your remaining kills" title spanning the rings, with a
   thin rule either side and a little air before the rings. */
.kill-rings-box { display: inline-flex; flex-direction: column; align-items: stretch; gap: 7px; }
.kill-rings__title { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: 0.625rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #E4E4E7; line-height: 1; white-space: nowrap; }
.kill-rings__title::before, .kill-rings__title::after { content: ""; flex: 1 1 0; min-width: 12px; height: 1px; background: rgba(255, 255, 255, 0.28); }
/* Phones: the rings leave the bar for a slim black strip right under it. */
.app-bar-strip { display: none; }
@media (max-width: 639px) {
  .app-bar .kill-rings-box { display: none; }
  .app-bar-strip { display: block; background: #0B0B0D; padding: 2px var(--space-4) var(--space-3); }
  /* Nothing to show (not an actor, or stats still loading): no black band under the bar. */
  .app-bar-strip:empty { display: none; }
  .app-bar-strip .kill-rings-box { display: flex; }
  .app-bar-strip .kill-rings { justify-content: center; gap: var(--space-6); }
}
.kill-rings { display: flex; align-items: center; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.kill-ring { display: flex; align-items: center; gap: var(--space-2); }
.kill-ring__svg { flex: none; transform: rotate(-90deg); }
.kill-ring__track, .kill-ring__fill { fill: none; stroke-width: 4; }
.kill-ring__track { stroke: #3F3F46; }
.kill-ring__fill { stroke-linecap: round; transition: stroke-dashoffset var(--duration-slow) var(--ease); }
.kill-ring--ok .kill-ring__fill { stroke: #22C55E; }
.kill-ring--warn .kill-ring__fill { stroke: #F59E0B; }
.kill-ring--high .kill-ring__fill { stroke: #EF4444; }
.kill-ring__text { display: flex; flex-direction: column; line-height: 1.2; }
.kill-ring__label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #A1A1AA; }
.kill-ring__value { font-size: 0.8125rem; color: #D4D4D8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kill-ring__value strong { color: #fff; font-size: 0.9375rem; }
@media (max-width: 767px) {
  /* Phones: tighter, smaller — the bucket names stay visible. */
  .kill-rings { gap: var(--space-3); }
  .kill-ring__value { font-size: 0.75rem; }
  .kill-ring__value strong { font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) { .kill-ring__fill { transition: none; } }


/* Side menu (round 30) — the talent drawer (`.side-nav--overlay`): the logo
   sits at the TOP, in `.side-nav__head` beside Close (light surface, so the
   light-mode logo); `.drawer-context__change` is the way to the production
   list (Change / Choose a production) — there is no "Productions" item.
   Items are bold everywhere and step up a size from 768 px. */
.side-nav__logo { display: flex; align-items: center; margin-right: auto; border-radius: var(--radius-md); }
.side-nav__logo img { height: 32px; width: auto; display: block; }
.side-nav--overlay .side-nav__head { height: 64px; padding: 0 0.5rem 0 1rem; }
.side-nav--overlay .side-nav__item { font-size: 1rem; font-weight: 600; padding: 0.75rem 0.875rem; }
.drawer-context__change { margin-left: auto; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.drawer-context__change:only-child { margin-left: 0; }
@media (min-width: 768px) {
  .side-nav--overlay { width: 360px; }
  .side-nav--overlay .side-nav__head { height: 80px; padding: 0 0.75rem 0 1.25rem; }
  .side-nav--overlay .side-nav__logo img { height: 44px; }
  .side-nav--overlay .side-nav__body { padding: 0.75rem; }
  .side-nav--overlay .side-nav__item { font-size: 1.125rem; min-height: 56px; padding: 0.875rem 1rem; gap: 0.75rem; }
  .side-nav--overlay .side-nav__item svg { width: 22px; height: 22px; }
  .side-nav--overlay .drawer-context { padding: 1.125rem 1.25rem; }
  .side-nav--overlay .drawer-context__label { font-size: 0.75rem; margin-bottom: 4px; }
  .side-nav--overlay .drawer-context__name { font-size: 1.125rem; }
  .side-nav--overlay .drawer-context__change { font-size: 1rem; }
}

/* Day view tabs, round 20: from tablet width up, the four tabs share the
   1,120 px column equally (the Unkilled pair takes two shares), and step up
   a size so they outrank the breadcrumb above. Phones keep the wrapping row. */
@media (min-width: 768px) {
  .tabs--day { flex-wrap: nowrap; gap: var(--space-2); }
  .tabs--day > .tab { flex: 1 1 0; }
  .tabs--day > .tabs__group { flex: 2 1 0; }
  .tabs--day .tabs__group > .tab { flex: 1 1 0; }
  .tabs--day .tab { justify-content: center; min-height: 56px; font-size: 1rem; }
  .tabs--day .tab .tab__count { min-width: 28px; height: 22px; font-size: 0.75rem; }
}

/* ---------- Talent page header, round 21 ----------
   The day view's black header on every production page (owner): the app bar
   turns black (above) and a `.page-head` band follows it with the page title
   and, per page, its tabs or headline tiles. Content inside is the same
   1,120 px column as `.talent-page`. */
.page-head { background: #0B0B0D; color: #fff; }
.page-head__in {
  max-width: calc(var(--page-max) + 2 * var(--space-6));
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.page-head__title-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-4); padding: var(--space-3) 0 var(--space-5); }
.page-head__title { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: #fff; }
.page-head__title:focus { outline: none; }
.page-head__sub { margin: 0; font-size: 0.875rem; color: #A1A1AA; }
.page-head__spacer { flex: 1; }
.page-head__actions { display: flex; align-items: center; gap: var(--space-3); }
.page-head .btn-secondary { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.page-head .btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); color: #fff; }
.page-head .btn:focus-visible { box-shadow: 0 0 0 2px #0B0B0D, 0 0 0 4px #fff; }
.page-head__band { padding-bottom: var(--space-6); }
@media (max-width: 640px) {
  .page-head__in { padding: 0 var(--space-4); }
  .page-head__title { font-size: 1.375rem; }
}

/* Killed & Approved / Selects: the tabs sit in the band, spanning only the
   image grid — they start where the gallery starts, past the day rail. */
@media (min-width: 768px) {
  .page-head__tabs--gallery { padding-left: calc(260px + var(--space-6)); }
}
.tabs--day .tab.tab--unkilled .tab__count { background: #1D4ED8; color: #fff; }
.tabs--day .tab.tab--approved .tab__count { background: var(--color-success-ink); color: #fff; }
.tabs--day .tab.tab--killed-select .tab__count { background: #B91C1C; color: #fff; }
.tabs--day button.tab { background: transparent; border-top: 0; border-left: 0; border-right: 0; font: inherit; font-weight: 600; cursor: pointer; }

/* My summary / Production summary: the three decision tiles on the dark band. */
.page-head .tally { margin: 0; }
.page-head .summary-decisions { margin: 0; }
.page-head .tally__item { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
.page-head .tally__item--killed { background: rgba(185, 28, 28, 0.2); border-color: rgba(248, 113, 113, 0.35); }
.page-head .tally__item--unkilled { background: rgba(29, 78, 216, 0.24); border-color: rgba(147, 197, 253, 0.35); }
.page-head .tally__item--approved { background: rgba(4, 120, 87, 0.24); border-color: rgba(110, 231, 183, 0.35); }
.page-head .tally__count { color: #fff; }
.page-head .tally__label { color: #E4E4E7; }

/* Settings: section tabs in the band — real navigation tabs (underline). */
.page-head .tabs--day a.tab { text-decoration: none; }

/* Image summary page (round 28) — the talent app's combined Killed & Approved
   + Selects page: a `.filter-panel--gallery` rail of tickbox lists
   (`.filter-panel__option`, "All" first in each group), an "Any / All selected"
   match choice under the actors, and the same rail inside a `.modal` on phones. */
.filter-panel--gallery fieldset.filter-panel__group { min-width: 0; }
.filter-panel--gallery legend.filter-panel__label { padding: 0; width: 100%; }
/* Round 32: native radios too (the forms reset hid an unchecked radio and painted a checked one blue). */
.filter-panel__option input[type="radio"] { -webkit-appearance: radio; appearance: auto; width: 16px; height: 16px; flex: none; margin: 0; background: none; border: 0; accent-color: var(--color-primary); }
.filter-panel__option > span:not(.count) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-panel__match {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
}
.filter-panel--sheet { display: flex; flex-direction: column; gap: var(--space-4); }
.filter-panel--sheet fieldset.filter-panel__group { min-width: 0; margin: 0; padding: 0; border: 0; }
.filter-panel--sheet legend.filter-panel__label { padding: 0; }
.filter-panel--sheet .filter-panel__option { min-height: 40px; }


/* Image summary selection (round 30) — people with a download grant tick
   images to narrow the Download menu to them. The tile tick box is the day
   grid's `.image-grid-card__check` (shown on hover / focus, on a ticked tile,
   on every tile once anything is ticked, always on touch screens); the table
   puts it first in the file-name `.cell-pick`. `.gallery-toolbar__selection`
   holds "N selected" + Select all / Clear selection in the gallery toolbar. */
.image-summary .image-grid-card__check { opacity: 0; transition: opacity var(--duration-base) var(--ease); }
.image-summary .image-grid-card:hover .image-grid-card__check,
.image-summary .image-grid-card:focus-within .image-grid-card__check,
.image-summary .image-grid-card.is-selected .image-grid-card__check,
.image-summary--picking .image-grid-card__check { opacity: 1; }
@media (pointer: coarse) { .image-summary .image-grid-card__check { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .image-summary .image-grid-card__check { transition: none; } }
.gallery-toolbar__selection {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.gallery-toolbar__selection strong { color: var(--color-text); font-variant-numeric: tabular-nums; }
.gallery-toolbar__selection-note { color: var(--color-text-tertiary); }

/* Round 35: past the last image the person sees this panel where the
   image was — a big Mark done, the explanation under it (left-aligned, the block
   centred in the stage), and a quiet way back to the last image. Actors get the
   same panel with Submit kills. */
.lightbox__end { margin: auto; width: min(100%, 520px); padding: var(--space-6); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); color: #E4E4E7; }
.lightbox__end .btn { min-width: 220px; justify-content: center; }
/* The panel takes focus on arrival (not its button, which acts at once); no ring for that. */
.lightbox__end:focus { outline: none; }
.lightbox__end-text { margin: 0; font-size: 1rem; line-height: 1.55; color: #E4E4E7; }
.lightbox__end-note { margin: 0; font-size: 0.8125rem; color: #A1A1AA; }
/* Owner 2026-11-14: copy that must be read before acting (an actor's Submit kills
   cannot be undone) is set one sentence per line, the consequence last and bold. */
.lightbox__end-text--lines { display: flex; flex-direction: column; gap: var(--space-2); }
.lightbox__end-text--lines p { margin: 0; }
.lightbox__end-warn { font-weight: 600; color: #fff; }
.lightbox__end-back { background: none; border: 0; padding: 0; color: #D4D4D8; text-decoration: underline; font-size: 0.875rem; cursor: pointer; }
.lightbox__end-back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 2px; }
/* Owner 2026-11-17: the end screen's quiet links side by side (Back to the last image · Back to folder). */
.lightbox__end-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-2) var(--space-6); }
@media (max-width: 639px) { .lightbox__end .btn { width: 100%; } }

/* Single image mobile (round 31) */
/* Details toggle (`.lightbox__details-btn`): a real bordered button — info icon
   plus "Details" on a desktop, icon only on a phone — that looks pressed
   (white fill, dark text) while the panel / sheet is open (`aria-expanded`). */
.lightbox__details-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-width: 40px; height: 40px; padding: 0 var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease);
}
.lightbox__details-btn:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.7); }
.lightbox__details-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__details-btn.is-open,
.lightbox__details-btn[aria-expanded="true"] { background: #f1f5f9; border-color: #f1f5f9; color: #0f172a; } /* 16:1 */
.lightbox__details-btn.is-open:hover { background: #fff; }
@media (pointer: coarse) { .lightbox__details-btn { min-width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .lightbox__details-btn { transition: none; } }

/* Compact phone sheet: an overlay that drops from under the top bar (where the
   details button is) over the stage — opening it never moves the image, and it
   never reaches the sticky decision bar at the bottom of the screen. */
.lightbox--sheet .lightbox__body { position: relative; }
.lightbox.lightbox--sheet .lightbox__drawer {
  position: absolute; left: 0; right: 0; top: 0; bottom: auto; z-index: 2;
  max-height: 50vh; max-height: 50dvh; overflow-y: auto;
  gap: var(--space-2); padding: var(--space-3) var(--space-4) var(--space-4);
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}
.lightbox.lightbox--sheet .lightbox__sheet-handle { display: none; }
.lightbox__sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 32px; }
.lightbox__sheet-add {
  flex: none; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer;
}
.lightbox__sheet-add:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox__sheet-add:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (pointer: coarse) { .lightbox__sheet-add { width: 44px; height: 44px; } }
.lightbox__viewers--compact { gap: 0; }
.lightbox__viewers--compact > li { min-height: 32px; font-size: 0.875rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.lightbox__viewers--compact > li:last-child { border-bottom: 0; }
.lightbox__viewer-glyph--square {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--color-error); color: #fff;
}
.lightbox__sheet-kills { list-style: none; margin: 0; padding: var(--space-2) 0 0; display: flex; flex-direction: column; gap: var(--space-1); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.lightbox__sheet-kill { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: #e2e8f0; }
.lightbox__sheet-kill strong { color: #fff; font-weight: 600; }
.lightbox__sheet-kill.is-excluded .lightbox__viewer-glyph--square { background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5); }
/* Round 32 (owner): the actor's line — "Solo image · 4 of 4 solo kills left" —
   centred, with clear room either side of the dot; `--stack` (landscape column)
   puts the count under the type, left-aligned. */
.lightbox__sheet-line { margin: 0; font-size: 0.875rem; color: #e2e8f0; text-align: center; }
.lightbox__sheet-line strong { color: #fff; font-weight: 700; }
.lightbox__sheet-sep { display: inline-block; margin-inline: var(--space-3); color: rgba(255, 255, 255, 0.55); font-weight: 700; }
.lightbox__sheet-line--stack { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--space-1) 0; font-size: 0.8125rem; }
.lightbox__sheet-line--stack .lightbox__sheet-sep { display: none; }

/* Phone decision bar (production account / root): ‹ · Kill · Kill and exclude · ☆ · ›
   fits 360–390 px — equal flexible buttons, tighter gaps, labels may wrap to two
   lines inside the button; every target stays 44 px+ tall. */
@media (max-width: 767px) {
  .lightbox__actionbar--four { gap: 6px; padding-inline: var(--space-2); }
  .lightbox__actionbar--four .lightbox__nav { flex: 0 0 44px; width: 44px; height: 48px; }
  .lightbox__actionbar--four .lightbox__nav--next { margin-left: 0; }
  .lightbox__actionbar--four .btn {
    flex: 1 1 0; min-width: 0; height: auto; min-height: 48px;
    padding: 4px 6px; font-size: 0.8125rem; line-height: 1.15;
    white-space: normal; text-align: center; text-wrap: balance; overflow-wrap: anywhere;
  }
  .lightbox__actionbar--four .btn.lightbox__select--icon { flex: 0 0 48px; width: 48px; padding: 0; }
}

/* Round 32 — phone held upright (`.lightbox--phone`): the page is exactly one
   screen tall. The image is centred in the stage, the space between the top bar
   and the decision bar (round 49; it sat at the top before) — full width, never
   cropped, 8 px clear above and below — and the decision bar follows the stage, lifted off the bottom
   edge by `--lightbox-lift` into the thumb zone. The bar's position does not
   depend on the image's shape — a tall portrait image simply fills the stage
   down to the bar, a landscape one has equal black above and below — so Kill and
   the arrows never jump between images. The Tagged strip (production account,
   root, viewer; with "+" to tag and who else killed it), or the actor's
   allowance line, fills the lift space under the bar (scrolls inside itself).
   No details sheet on a phone (round 49). Swipe left / right on
   the stage walks (`touch-action: pan-y pinch-zoom` keeps scroll and zoom). */
@media (max-width: 767px) {
  .lightbox.lightbox--phone {
    --lightbox-lift: clamp(48px, 10dvh, 96px);
    height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
  }
  .lightbox.lightbox--phone .lightbox__body { flex: 1 1 auto; min-height: 0; }
  .lightbox.lightbox--phone .lightbox__stage-col { flex: 1 1 auto; min-height: 0; }
  .lightbox.lightbox--phone .lightbox__stage-col .lightbox__stage {
    flex: 1 1 0; height: auto; min-height: 120px;
    align-items: center; padding: var(--space-2) 0;
    touch-action: pan-y pinch-zoom;
  }
  /* Owner 2026-11-14: as large as the stage allows — the <img> box fills the stage
     and the picture is contained in it, so a landscape photo spans the full phone
     width (edge to edge, centred top to bottom) and a portrait one the full stage
     height. Small renditions are scaled up too; nothing is ever cropped. */
  .lightbox.lightbox--phone .lightbox__img {
    width: 100%; height: 100%; max-width: none; max-height: none;
    object-fit: contain; object-position: center;
  }
  .lightbox.lightbox--phone .lightbox__stage > :is(.lightbox__placeholder, .lightbox__failed) { align-self: center; }
  .lightbox.lightbox--phone .lightbox__dock { position: static; }
  .lightbox.lightbox--phone .lightbox__top .lightbox__icon-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; }
  .lightbox.lightbox--phone .lightbox__actionbar { background: transparent; border-top: 0; padding-bottom: var(--space-3); }
  .lightbox.lightbox--phone .lightbox__stage-col > .lightbox__dock:last-child { padding-bottom: calc(var(--lightbox-lift) + env(safe-area-inset-bottom, 0px)); }
  .lightbox.lightbox--phone .lightbox__underbar {
    min-height: calc(var(--lightbox-lift) + env(safe-area-inset-bottom, 0px));
    max-height: calc(128px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  }
  /* Toasts drop into the lift space under the bar, never over Kill. */
  .lightbox.lightbox--phone .toast-stack--gallery { bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-2)); }
}

/* Phone held sideways (`.lightbox--landscape`, orientation landscape and
   ≤ 500 px tall; redesign approved 2026-11-15). The image takes the full screen
   height on the LEFT (`object-position: left`), its width from its own ratio
   (`--ratio`). The panel on the RIGHT (`.lightbox__side`, at least 200 px,
   content capped at 320 px) NEVER scrolls. It holds two groups:
   - `.lightbox__side-top` — quiet information: Back + file name (+ position),
     then `.lightbox__side-actions` (the small "Locked for delivery" chip and the ⋯ menu
     button), the kill badge, the scope bar, then Tagged (`.lightbox__side-tagged`,
     the one part that shrinks: its list scrolls inside its own box);
   - `.lightbox__side-bottom` — the thumb zone: notices, the actor's allowance
     line, Kill / Kill and exclude stacked, then ‹ Select › (`.lightbox__side-nav`).
   The only thing drawn over the image is the zoom button (`.zoom-btn`) on the
   picture's corner. Swipe on the image walks too. */
.lightbox.lightbox--landscape {
  --lightbox-side-min: 200px;
  position: relative; flex-direction: row-reverse;
  height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: #000;
}
.lightbox__side {
  flex: 1 1 auto; min-width: calc(var(--lightbox-side-min, 200px) + env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2) max(var(--space-3), env(safe-area-inset-right, 0px)) calc(var(--space-2) + env(safe-area-inset-bottom, 0px)) var(--space-3);
  overflow: hidden;
  background: #0f172a; border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox__side > * { width: 100%; max-width: 320px; }
/* The top group gives way (its Tagged list scrolls); the thumb zone never does. */
.lightbox__side-top { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.lightbox__side-top > * { flex: none; }
.lightbox__side-bottom { flex: none; display: flex; flex-direction: column; gap: 6px; }
.lightbox__side-head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.lightbox__side-head .lightbox__icon-btn { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.lightbox.lightbox--landscape .lightbox__name { flex: 1 1 auto; min-width: 0; font-size: 0.8125rem; }
.lightbox.lightbox--landscape .lightbox__name-meta { display: block; margin: 2px 0 0; font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }
.lightbox__side-marks { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.lightbox.lightbox--landscape .lightbox__scope-bar { flex-direction: column; align-items: stretch; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius-md); }
.lightbox.lightbox--landscape .lightbox__scope-bar .btn { margin-left: 0; }
/* The long scope explanation is the desktop's; the badge and "Back to all" stay. */
.lightbox.lightbox--landscape .lightbox__scope-bar .lightbox__hint { display: none; }
.lightbox.lightbox--landscape .lightbox__notices { padding: 0; background: transparent; border-top: 0; max-height: 40dvh; overflow-y: auto; }
.lightbox.lightbox--landscape .lightbox__actions-under { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; padding: 0; background: transparent; border-top: 0; }
.lightbox.lightbox--landscape .lightbox__actions-under .btn { width: 100%; min-height: 44px; min-width: 0; padding: 0 var(--space-3); justify-content: center; font-size: 0.875rem; white-space: nowrap; }
.lightbox.lightbox--landscape .lightbox__review-on-day .btn { width: 100%; min-height: 44px; justify-content: center; text-align: center; white-space: normal; }
/* Quiet row: the "Locked for delivery" chip on the left, the ⋯ menu (`.lightbox__details-btn--more`,
   icon only, no container) at the far right. */
.lightbox__side-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); min-height: 36px; }
.lightbox__side-actions .state-pill { margin-right: auto; }
.lightbox__side-actions .lightbox__details-btn--download {
  position: relative; flex: none; min-width: 0; width: 36px; height: 36px; padding: 0;
  border-color: rgba(255, 255, 255, 0.24); background: transparent; color: #cbd5e1;
}
.lightbox__side-actions .lightbox__details-btn--download::after { content: ''; position: absolute; inset: -4px; }
.lightbox__side-actions .lightbox__details-btn--download svg { width: 18px; height: 18px; }
/* Tagged, sideways: quieter than the decisions — 10 px caps title, 12 px names in
   slate-300 (#cbd5e1, 12:1 on the panel), every tagged actor listed; the list
   scrolls inside its own box when it does not fit, never the panel. "+" to tag
   is drawn small (26 px, `.lightbox__sheet-add--quiet`) with a 44 px touch area. */
.lightbox__side-top > .lightbox__side-tagged {
  flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 2px;
  padding-top: var(--space-1); border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1; font-size: 0.75rem;
}
.lightbox__side-tagged .lightbox__sheet-head { flex: none; min-height: 28px; }
.lightbox__side-tagged .lightbox__underbar-title { font-size: 0.625rem; color: #94a3b8; } /* 6.9:1 */
.lightbox__side-tagged-list {
  flex: 0 1 auto; min-height: 18px; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: var(--space-1);
}
.lightbox__side-tagged-list:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__side-tagged .lightbox__viewers { font-size: 0.75rem; gap: 2px; color: #94a3b8; } /* owner 2026-11-15: quieter than the decisions (6.9:1) */
.lightbox__side-tagged .lightbox__viewers--row { gap: 2px 12px; }
.lightbox__side-tagged .lightbox__viewers > li { gap: 4px; min-height: 18px; }
.lightbox__side-tagged .lightbox__viewers > li > strong { font-weight: 500; }
.lightbox__side-tagged .lightbox__viewer-glyph svg { width: 12px; height: 12px; }
.lightbox__side-tagged .lightbox__viewer-glyph--viewed { color: #cbd5e1; }
.lightbox__side-tagged .lightbox__viewer-glyph--unviewed { color: #94a3b8; }
.lightbox__side-tagged .lightbox__hint { margin: 0; font-size: 0.75rem; color: #94a3b8; }
.lightbox__side-tagged .lightbox__sheet-kills { padding-top: var(--space-1); }
.lightbox__side-tagged .lightbox__sheet-kill { font-size: 0.75rem; color: #cbd5e1; }
.lightbox__side-tagged .lightbox__sheet-kill strong { color: #e2e8f0; font-weight: 500; }
/* ‹ Select › — the arrows stay 48 px; Select takes the middle. In a narrow panel
   (the row under 220 px) Select is the star alone; its label stays its name. */
.lightbox__side-nav { display: flex; gap: 6px; container-type: inline-size; }
.lightbox__side-nav .lightbox__nav { position: static; transform: none; flex: 1 1 0; width: auto; height: 44px; border-radius: var(--radius-md); }
.lightbox__side-nav:has(.lightbox__select) .lightbox__nav { flex: 0 0 48px; width: 48px; }
.lightbox__side-nav .lightbox__nav:disabled { opacity: 0.35; cursor: default; }
.lightbox.lightbox--landscape .lightbox__side-nav .btn.lightbox__select--nav {
  flex: 1 1 auto; min-width: 0; min-height: 44px; height: 44px; padding: 0 var(--space-2); gap: 6px; justify-content: center;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; font-size: 0.875rem; font-weight: 600;
}
.lightbox.lightbox--landscape .lightbox__side-nav .btn.lightbox__select--nav.is-starred { color: var(--color-select); border-color: var(--color-select); }
.lightbox__select--nav svg { flex: none; }
@container (max-width: 219px) {
  .lightbox__select-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}
/* The image column never gives way to the side column's content (owner 2026-11-14:
   full phone height): it takes the image's own width at full height, and only an
   image too wide for that (wider than the screen less the 200 px column) is held
   to the space left, at full width. The column takes whatever remains. */
.lightbox.lightbox--landscape > .lightbox__stage {
  flex: 0 0 auto; width: calc(100dvh * var(--ratio, 1.5));
  max-width: calc(100% - var(--lightbox-side-min) - env(safe-area-inset-right, 0px));
  height: 100%; padding: 0; touch-action: pan-y pinch-zoom;
}
.lightbox.lightbox--landscape > .lightbox__stage .lightbox__img {
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; object-position: left center;
}
/* Swipe to walk (owner 2026-11-14; phone upright and sideways). While a finger
   drags sideways the screen sets `.is-swiping` and `--lightbox-swipe-x` on the
   stage and the image follows the finger (a third as far towards an end with
   nowhere to go); let go short of a swipe and it springs back
   (`--duration-slow`, 0 under reduced motion — and the screen does not follow
   the finger at all then). `.is-swipe-jump` drops the spring for the frame the
   walk moves on, so the next image appears in place. `translate`, not
   `transform`, so it never fights a zoom transform. */
.lightbox__stage > :is(.lightbox__img, .lightbox__figure) {
  translate: var(--lightbox-swipe-x, 0px) 0;
  transition: translate var(--duration-slow) var(--ease);
}
.lightbox__stage:is(.is-swiping, .is-swipe-jump) > :is(.lightbox__img, .lightbox__figure) { transition: none; }
/* Round 31: an image opened from the Image summary by an actor is read only —
   one "Review this on <day>" link-button (plus a hint on desktop) in place of the decisions. */
.lightbox__review-on-day { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; min-width: 0; }
.lightbox__actionbar .lightbox__review-on-day { flex: 1; justify-content: center; }
.lightbox__actionbar .lightbox__review-on-day .btn { width: 100%; justify-content: center; text-align: center; }

/* ==========================================================================
   Round 37 — "Next folder" workflow (owner's B1 / B3 + day view)
   The next folder = the first folder after this one, in Shoot days order,
   that the person can see, has not finished and has images (wraps to the
   start). Brand red only on the action; success green on the done states.
   ========================================================================== */

/* B1: the end panel after a confirmed Mark done / Submit kills. A green tick
   heading, a dark "Next folder" card, Open next folder (brand red), and an
   underlined Back to all folders (`.lightbox__end-back`). With no next folder,
   a sentence and a secondary Back to all folders. */
.lightbox__end-success {
  margin: 0; display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: #6EE7B7; /* success on the dark stage */
}
.lightbox__end-success svg { flex: none; }
.lightbox__end-success:focus { outline: none; }
.lightbox__end-success:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 2px; }
.lightbox__next {
  width: 100%; padding: var(--space-4) var(--space-5);
  background: #0B1120; border: 1px solid #334155; border-radius: var(--radius-lg);
}
.lightbox__next-label { margin: 0 0 var(--space-1); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #A1A1AA; }
.lightbox__next-name { margin: 0; font-size: 1.125rem; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.lightbox__next-meta { margin: 2px 0 0; font-size: 0.875rem; color: #A1A1AA; }
.lightbox__end .btn svg { flex: none; }

/* Day view: "Review next day" on the green done card, under the progress bar,
   its right edge on the bar's right end. Phones: full width. */
/* Round 38: the title / hint and Review next day share a head row above the bar. */
.day-progress__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.day-progress__head-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.day-progress__next { display: flex; justify-content: flex-end; }
@media (max-width: 639px) { .day-progress__next { flex: 1 1 100%; } }
.day-progress__next .btn { min-height: 44px; padding-inline: var(--space-6); }
@media (max-width: 639px) { .day-progress__next .btn { width: 100%; justify-content: center; } }
/* Round 38 (owner's E): a done day is one compact row — title with the full bar
   under it · the Done stamp · Review next day. Phones: title + bar beside a
   smaller, straight stamp; the button full width underneath. */
.day-progress--compact { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: var(--space-6); }
.day-progress--compact .progress { margin-top: var(--space-3); }
.day-progress--compact .day-progress__action { align-items: center; }
@media (max-width: 639px) {
  .day-progress.day-progress--compact { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); row-gap: var(--space-4); }
  .day-progress--compact .day-progress__title { font-size: 1rem; }
  .day-progress--compact .day-progress__action { align-items: flex-end; }
  .day-progress--compact .day-card__stamp { margin: 0; padding: 3px 7px 4px; }
  .day-progress--compact .day-card__stamp-word { font-size: 0.8125rem; letter-spacing: 0.1em; }
  .day-progress--compact .day-card__stamp time { font-size: 0.5625rem; }
  .day-progress--compact .day-progress__next { grid-column: 1 / -1; }
}

/* B3: the menu's "Continue reviewing", at the top of the `.side-nav` drawer
   under the logo — a brand-red link with the folder and what is left; once
   nothing is outstanding a green status (`.nav-continue--done`, not a link). */
.nav-continue {
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0.5rem 0.75rem; padding: 0.75rem 1rem;
  border-radius: var(--radius-md); background: var(--color-primary); color: #fff; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--duration-fast) ease;
}
.nav-continue:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }
.nav-continue:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.nav-continue__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-continue__title { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 1rem; font-weight: 700; line-height: 1.25; }
.nav-continue__sub { font-size: 0.8125rem; line-height: 1.35; opacity: 0.92; overflow-wrap: anywhere; }
.nav-continue__arrow { flex: none; display: inline-flex; }
.nav-continue--done {
  flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--color-success-bg); color: var(--color-success-ink); border: 1px solid #A7F3D0; box-shadow: none;
}
.nav-continue--done .nav-continue__sub { opacity: 1; color: #065F46; }
@media (prefers-reduced-motion: reduce) { .nav-continue { transition: none; } }

/* ===================================================================
   Part 2 · Milestones (admin production tab, Flask)
   Five stages in order — sign-off, released to cast, cast approvals, selects,
   locked for delivery. `.milestone--done` (green tick + date + who),
   `.milestone--current` (brand-red left edge + light tint; at most one row),
   `.milestone--later` (muted). `.milestone-days` is the per-day table inside
   the Released-to-cast row; `.milestone-cast` the on-day actor initials
   (grey dashed = not released to them, blue = released and reviewing,
   green + green dot on the left = kills submitted). Status colours only,
   never an action.
   ========================================================================== */
.milestones { padding: 0; overflow: hidden; }
.milestone {
  display: grid; grid-template-columns: 2.5rem minmax(10rem, 14rem) minmax(0, 1fr) auto;
  align-items: start; gap: var(--space-2) var(--space-5);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--color-gray-100);
  border-left: 4px solid transparent;
}
.milestone:first-child { border-top: 0; }
.milestone__marker {
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-gray-300); color: var(--color-gray-500);
  font-size: 0.875rem; font-weight: 700; background: #fff;
}
.milestone__title { margin: 0; font-size: 1rem; font-weight: 600; color: var(--color-gray-900); line-height: 1.3; }
.milestone__state { margin: 2px 0 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-gray-500); }
.milestone__body { min-width: 0; font-size: 0.9375rem; color: var(--color-gray-700); line-height: 1.5; }
.milestone__body strong { color: var(--color-gray-900); font-weight: 600; }
.milestone__body .progress { max-width: 24rem; margin-top: var(--space-2); }
.milestone__action { display: flex; align-items: center; justify-content: flex-end; }
.milestone__note {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2);
  margin-top: var(--space-3); padding: var(--space-2) var(--space-3);
  border: 1px solid #FDE68A; border-radius: var(--radius-md);
  background: var(--color-warning-bg); color: #92400E; font-size: 0.875rem;
}
.milestone__note a { color: #92400E; font-weight: 600; }
.milestone--done .milestone__marker { border-color: var(--color-success); background: var(--color-success); color: #fff; }
.milestone--done .milestone__state { color: var(--color-success); }
.milestone--current { border-left-color: var(--color-primary); background: #FEF6F6; }
.milestone--current .milestone__marker { border-color: var(--color-primary); color: var(--color-primary); }
.milestone--current .milestone__state { color: var(--color-primary); }
.milestone--later .milestone__title,
.milestone--later .milestone__body,
.milestone--later .milestone__body strong,
.milestone--later .milestone__state { color: var(--color-gray-400); }
.milestone--later .milestone__marker { border-color: var(--color-gray-200); color: var(--color-gray-400); }

.milestone-days { margin-top: var(--space-3); background: #fff; border: 1px solid var(--color-gray-200); border-radius: var(--radius-md); overflow-x: auto; }
.milestone-days .table { margin: 0; }
.milestone-days .table td { vertical-align: middle; }
.milestone-days__ok { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-success); font-weight: 600; white-space: nowrap; }
.milestone-days tr.is-released td:first-child { box-shadow: inset 3px 0 0 var(--color-success); }

.milestone-cast { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.milestone-cast__faces { display: inline-flex; }
.milestone-cast__face {
  position: relative; width: 1.5rem; height: 1.5rem; margin-left: -0.375rem; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.625rem; font-weight: 700; color: var(--color-gray-500);
  background: var(--color-gray-100); border: 1px dashed var(--color-gray-300);
}
.milestone-cast__face:first-child { margin-left: 0; }
/* Owner 2026-11-18: released but kills not yet submitted = blue (reviewing);
   submitted = green, with the green dot on the LEFT so the next actor's
   overlapping circle never covers it. */
.milestone-cast__face.is-released { background: var(--color-info); border: 2px solid #fff; color: #fff; }
.milestone-cast__face.is-submitted { background: var(--color-success); border: 2px solid #fff; color: #fff; }
.milestone-cast__face.is-submitted::after {
  content: ""; position: absolute; left: -3px; bottom: -3px; width: 0.625rem; height: 0.625rem;
  border-radius: 9999px; border: 2px solid #fff; background: var(--color-success);
}

@media (max-width: 767px) {
  .milestone { grid-template-columns: 2.25rem minmax(0, 1fr); padding: var(--space-4); }
  .milestone__body, .milestone__action { grid-column: 2 / -1; }
  .milestone__action { justify-content: flex-start; }
}

/* ==========================================================================
   Part 2 · talent app — Sign off, Shoot days design G, Submit selects,
   locked for delivery (docs/ui-refactor/signoff-selects-lock-plan.md,
   "Build spec"; owner mocks r34 1–8). One contiguous block: keep it together.
   Colour rules: brand red only on actions (Sign off, Submit selects); success
   green = approved; slate = signed off / ready for release / locked; blue =
   released to cast; the cast chips' avatars take the categorical palette
   (identity, never an action); selects on a day card are a plain yellow ★ and
   the number (`.day-card__selects`, D1) — never cat.amber.
   ========================================================================== */

/* SIGNED OFF stamp (workflow 2): the `.day-card__stamp` in slate with a pen —
   no padlock, signing off locks nothing. Tilted on desktop, straight on phones
   (the base rule). #334155 on white / the card tint is 10:1. */
.day-card__stamp--signed { border-color: #334155; color: #334155; }

/* Design G day card (`.day-card--g`). Two layouts, chosen by CSS alone —
   both are in the DOM and the one not in use is `display: none`, so screen
   readers meet each piece once and nothing jumps when the page loads:
   - 640 px and wider (desktop, tablet, a phone held sideways): the round-34
     card — ring · day name, "Viewed N of M" + the status line, then the cast
     chips and ★ N · the full stamp on the right (SIGNED OFF · date, APPROVED ·
     All cast, or the viewer's Approved / Unkilled) or Sign off; the padlock in
     the top-right corner while locked. Marked `.day-card__wide`.
   - Under 640 px (a phone held upright), D1 (owner 2026-11-15): ring · day
     name over "Viewed N of M" · the CORNER box top right; then the release
     band (`.day-card__band`) at full card width — status line, cast chips, ★ N
     and the padlock. Marked `.day-card__narrow`; laid out in 8c.
   Selects are the plain yellow ★ and the number in both (`.day-card__selects`),
   never a chip. An approved day keeps the green `.is-submitted` tint. */
.day-card--g { --day-corner-w: 78px; }
@media (min-width: 640px) { .day-card--g .day-card__narrow { display: none; } }
@media (max-width: 639px) { .day-card--g .day-card__wide { display: none; } }
.day-card__figures--g { align-items: center; gap: var(--space-1) var(--space-4); }
/* The corner stamp (`.day-card__corner`, phones, D1): status text, never a
   button, in the Sign off button's own box (`--day-corner-w` × 32 px), so the
   corner moves forward only without moving: Sign off (red `.btn`) → SIGNED
   OFF → APPROVED. 11 px / 800 uppercase in a 2 px border, no icon and no date
   (the date is in the `title` tooltip and in visually-hidden words). Lifted
   over the card's stretched link so its tooltip can be hovered.
   --signed: gray-700 (10:1). --approved: success border, success-ink text
   (5.5:1 on white; the stamp keeps a white fill on the green card).
   --unkilled: a viewer's day not approved yet, blue as `.day-card__stamp--unkilled`.
   --quiet: "Not signed off" on a locked day — no border, secondary grey. */
.day-card__corner {
  position: relative; z-index: 1; box-sizing: border-box; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--day-corner-w, 78px); height: 32px; margin: 0; padding: 0;
  border: 2px solid currentColor; border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  line-height: 1; white-space: nowrap;
}
.day-card__corner--signed { color: var(--color-gray-700); }
.day-card__corner--approved { color: var(--color-success-ink); border-color: var(--color-success); }
.day-card__corner--unkilled { color: #1D4ED8; }
.day-card__corner--quiet {
  width: auto; min-width: var(--day-corner-w, 78px); justify-content: flex-end;
  border-color: transparent; background: none; color: var(--color-text-secondary);
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0; text-transform: none;
}
/* The release band (`.day-card__band`, phones, D1): the status line, then the cast chips
   and selects, in a `--color-surface-sunken` band that runs to the card's
   edges and bottom corners under a 1 px top line. The overlay shade darkens
   white and the green approved tint alike. A locked day's padlock ends the
   band's first row (the status line, or the avatars when there is none). */
.day-card__band {
  grid-area: band; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: var(--space-2);
  margin: var(--space-4) calc(-1 * var(--space-5)) calc(-1 * var(--space-4));
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface-sunken);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom-left-radius: inherit; border-bottom-right-radius: inherit;
  font-size: 0.8125rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums;
}
.day-card.is-submitted > .day-card__band { border-top-color: color-mix(in srgb, var(--color-success) 18%, transparent); }
.day-card__band > :not(.day-card__lock) { grid-column: 1; }
.day-card__band > .day-card__lock { grid-column: 2; grid-row: 1; position: static; }
.day-card__band > .day-card__lock svg { width: 14px; height: 14px; }
.day-card__cast { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.day-card__band > .day-card__cast { margin-top: 0; }
/* Selects on a day card (every width): a plain yellow ★ (`.select-star`) and
   the number in body text — no chip. The words ("6 selects") are visually
   hidden and in the tooltip. */
.day-card__selects {
  display: inline-flex; align-items: center; gap: 3px; margin-left: var(--space-1);
  font-size: 0.875rem; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums;
}
.day-card__selects .select-star { font-size: 1rem; line-height: 1; }
/* A quiet word in the right slot when no action is offered ("Locked", "Not marked done"). */
.day-card__note {
  flex: none; margin: 0 var(--space-2) 0 0; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.875rem; font-weight: 600; color: var(--color-text-secondary);
}
/* Locked for delivery: a padlock in every card's top-right corner (design G
   on a phone: at the end of the release band's first row instead). */
.day-card__lock { position: absolute; top: var(--space-3); right: var(--space-3); display: inline-flex; color: var(--color-text-secondary); }

/* The status line (`.day-status`), one per card: icon + words, coloured by stage. */
.day-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.day-status svg { flex: none; }
.day-status--muted { color: var(--color-text-secondary); }   /* Not released to cast (eye-off) */
.day-status--ready { color: #334155; }                       /* Ready for release (hourglass, slate) */
.day-status--released { color: #1D4ED8; }                    /* Released to cast 8 Nov · 1 of 3 approved (blue text, not a pill) */
.day-status--approved { color: var(--color-success-ink); }                    /* Approved (tick, success one step darker for 4.5:1) */
@media (max-width: 639px) { .day-status__more { display: none; } } /* phones: "Ready for release" only */

/* Cast chips (`.cast-chips` > `.cast-chip.is-<state>`): who is tagged on the
   day and where they are. States: is-unreleased (grey, dashed — the day is
   not released to them), is-reviewing (coloured avatar + blue ring),
   is-submitted (green tint + green tick). Phones: initials only (the name
   stays for screen readers). */
.cast-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cast-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 3px;
  border: 1px solid #BFDBFE; border-radius: var(--radius-full); background: var(--color-surface);
  font-size: 0.8125rem; font-weight: 500; color: var(--color-text); white-space: nowrap;
}
.cast-chip__avatar {
  position: relative; flex: none; width: 24px; height: 24px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: var(--color-gray-400);
}
.cast-chip__avatar.cat-indigo { background: var(--color-cat-indigo-500); }
.cast-chip__avatar.cat-teal   { background: var(--color-cat-teal-500); }
.cast-chip__avatar.cat-amber  { background: var(--color-cat-amber-500); }
.cast-chip__avatar.cat-violet { background: var(--color-cat-violet-500); }
.cast-chip__avatar.cat-pink   { background: var(--color-cat-pink-500); }
.cast-chip__avatar.cat-slate  { background: var(--color-cat-slate-500); }
.cast-chip__badge {
  position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface); border: 2px solid #1D4ED8; color: #fff;
}
.cast-chip.is-submitted { border-color: #A7F3D0; background: var(--color-success-bg); color: var(--color-success-ink); }
.cast-chip.is-submitted .cast-chip__badge { background: var(--color-success-ink); border-color: var(--color-surface); }
.cast-chip.is-unreleased { border-style: dashed; border-color: var(--color-gray-300); background: var(--color-gray-50); color: var(--color-text-secondary); }
.cast-chip.is-unreleased .cast-chip__avatar { background: var(--color-gray-300); }
@media (max-width: 639px) {
  .cast-chip, .cast-chip.is-submitted, .cast-chip.is-unreleased { height: auto; padding: 0; border: 0; background: none; }
  .cast-chip__avatar { width: 30px; height: 30px; font-size: 0.6875rem; }
  .cast-chip.is-unreleased .cast-chip__avatar { background: var(--color-gray-50); color: var(--color-text-secondary); border: 1px dashed var(--color-gray-300); }
  .cast-chip__name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

/* "★ N selects": `.selects-chip` (defined with the select tokens above). */

.next-steps + .alert, .day-list__locked + .alert { margin-top: var(--space-3); }

/* Locked for delivery: the dark banner (`.locked-banner`) on Shoot days and the
   Image summary — padlock, "Locked for delivery · 14 Nov", one line of why. */
.locked-banner {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg);
  background: #1E293B; color: #fff;
}
.locked-banner__icon { flex: none; display: inline-flex; }
.locked-banner__text { min-width: 0; }
.locked-banner__title { margin: 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.locked-banner__body { margin: 2px 0 0; font-size: 0.875rem; color: #E2E8F0; } /* 12:1 on #1E293B */
.day-list__locked { margin: 0 0 var(--space-4); }

/* Day view (mock 4): the progress card when signed off (neutral, not the green
   "done" tint — the day is not approved yet) and when locked (slate, no action). */
.day-progress--signed { background: var(--color-surface); border-color: var(--color-border); }
.day-progress--signed .day-card__stamp { margin: 0 var(--space-2); }
.day-progress--locked { background: #F8FAFC; border-color: #CBD5E1; }

/* Day view, owner 2026-11-15 (option D): a production account's / admin's
   signed-off or cast-approved card (`.day-progress--cast`, on `--compact`).
   The images bar, the "still exclude" note and the "Kills submitted by" line
   give way to the cast's approvals: title + stamp, "Cast approvals · 2 of 3
   submitted" over a bar (`.day-cast__progress`, brand red, green once all
   have submitted), the collapsible CAST list (`.day-cast`), Review next day.
   Wide screens keep the old row (title + bar · stamp · button) with the list
   underneath in two columns; phones stack it, the stamp top-right. */
.day-progress--cast {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "title stamp next" "bar stamp next" "cast cast cast";
  row-gap: var(--space-2);
}
.day-progress--cast > .day-progress__text { grid-area: title; }
.day-progress--cast > .day-progress__action { grid-area: stamp; }
.day-progress--cast > .day-cast__progress,
.day-progress--cast > .day-cast__none { grid-area: bar; }
.day-progress--cast > .day-cast { grid-area: cast; margin-top: var(--space-2); }
.day-progress--cast > .day-progress__next { grid-area: next; }
.day-cast__figures { margin: 0; display: flex; justify-content: space-between; gap: var(--space-3); font-size: 0.875rem; color: var(--color-text-secondary); }
.day-cast__figures strong { color: var(--color-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.day-progress .day-cast__progress .progress { margin-top: var(--space-2); }
.day-cast__progress .progress__fill { background: var(--color-primary); }
/* The CAST header row is the disclosure button (aria-expanded / aria-controls). */
.day-cast__toggle {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 44px; padding: 0;
  background: none; border: 0; border-top: 1px solid var(--color-border-subtle); border-radius: 0;
  font: inherit; text-align: left; color: var(--color-text-secondary); cursor: pointer;
}
.day-cast__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.day-cast__count { margin-left: auto; font-size: 0.875rem; }
.day-cast__count strong { color: var(--color-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.day-cast__chevron { flex: none; color: var(--color-text-tertiary); transition: transform var(--duration-fast, 150ms) var(--ease, ease); }
.day-cast.is-open .day-cast__chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .day-cast__chevron { transition: none; } }
.day-cast__waiting { margin: 0 0 var(--space-1); font-size: 0.875rem; color: var(--color-text-secondary); }
/* Owner 2026-11-17: each actor is ONE chip — avatar, name and status pill held
   tight together inside a hairline pill — and the chips wrap with a wider gap
   between them, so every status pill reads as its actor's (was two columns
   with the pill pushed to the far edge, away from its name). */
.day-cast__list { list-style: none; margin: 0; padding: var(--space-3) 0 var(--space-1); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.day-cast__list[hidden] { display: none; }
.day-cast__row { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; max-width: 100%; padding: 3px 4px 3px 3px; border: 1px solid var(--color-gray-200); border-radius: var(--radius-full); background: var(--color-gray-50); }
.day-cast__avatar {
  flex: none; width: 32px; height: 32px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: var(--color-gray-400);
}
.day-cast__avatar.cat-indigo { background: var(--color-cat-indigo-500); }
.day-cast__avatar.cat-teal   { background: var(--color-cat-teal-500); }
.day-cast__avatar.cat-amber  { background: var(--color-cat-amber-500); }
.day-cast__avatar.cat-violet { background: var(--color-cat-violet-500); }
.day-cast__avatar.cat-pink   { background: var(--color-cat-pink-500); }
.day-cast__avatar.cat-slate  { background: var(--color-cat-slate-500); }
.day-cast__row.is-unreleased .day-cast__avatar { background: var(--color-gray-50); color: var(--color-text-secondary); border: 1px dashed var(--color-gray-300); }
.day-cast__name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; font-weight: 500; color: var(--color-text); }
.day-cast__row.is-unreleased .day-cast__name { color: var(--color-text-secondary); }
.day-cast__skeleton { margin-top: var(--space-3); }
/* Cast status pills (`.cast-status--waiting | --submitted | --unreleased`):
   status, so the warning / success tones — never the categorical palette.
   Text one step darker than the tone token for 4.5:1 (as `.status-badge`). */
.cast-status {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border: 1px solid transparent; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.cast-status svg { flex: none; }
.cast-status--waiting    { background: var(--color-warning-bg); color: #92400E; border-color: #FDE68A; }
.cast-status--submitted  { background: var(--color-success-bg); color: var(--color-success-ink); border-color: #A7F3D0; }
.cast-status--unreleased { background: var(--color-gray-50); color: var(--color-text-secondary); border-color: var(--color-gray-300); border-style: dashed; }
/* On the green approved card the hairlines take the green border tone. */
.day-progress--done .day-cast__toggle,
.day-progress--done .day-cast__row { border-color: #D1FAE5; }
.day-progress--done .day-cast__progress .progress { background: #D1FAE5; }
@media (max-width: 639px) {
  .day-progress.day-progress--cast {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title stamp" "bar bar" "cast cast" "next next";
    row-gap: var(--space-3);
  }
  .day-progress--cast .day-progress__action { align-self: start; }
  .day-progress--cast .day-progress__title { font-size: 1.125rem; }
  .day-progress--cast > .day-cast { margin-top: 0; }
}

/* A quiet state pill (`.state-pill`): "🔒 Locked" in the day view's locked card;
   `--dark` on the black page head and the single image's top bar ("Day signed
   off · 9 Nov", "Locked for delivery", "Selects submitted · 13 Nov"). Status
   only, never a button. */
.state-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-md);
  border: 1px solid #CBD5E1; background: #F1F5F9; color: #1E293B;
  font-size: 0.875rem; font-weight: 600; white-space: nowrap;
}
.state-pill--dark {
  height: 30px; padding: 0 var(--space-3); border-radius: var(--radius-full);
  border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: #E2E8F0; font-size: 0.8125rem;
}

/* Menu: Continue reviewing once the production is locked — neutral, not a link. */
.nav-continue--locked {
  flex-direction: column; align-items: flex-start; gap: 2px;
  background: #F1F5F9; color: #1E293B; border: 1px solid #CBD5E1; box-shadow: none;
}
.nav-continue--locked .nav-continue__sub { opacity: 1; color: #334155; }

/* Image summary: the selects strip above the results (production accounts /
   admins) — "★ 24 selects · 18 on approved images · 6 not approved yet · Show selects". */
.selects-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.selects-strip__text { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 0.875rem; color: var(--color-text-secondary); }
.selects-strip__text strong { color: var(--color-text); }

/* Single image (owner 2026-11-14): Download uses the Details recipe
   (`.lightbox__details-btn`) so both top-bar buttons are one size — icon +
   label on a desktop, a 44 px icon square on a phone. Busy while downloading. */
.lightbox__details-btn:disabled { opacity: 0.6; cursor: progress; }
/* The details panel's Keyboard shortcuts always sits last, pushed to the
   bottom when there is room and ruled off from the image data above. */
.lightbox__fold--last { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid rgba(255, 255, 255, 0.12); }
/* ---------- Day view: views + fluid (round 39) ----------
   The day view's three views — Thumbnails, Cards, Table — and the full-width
   ("fluid") body row. One block; see components.md "Day view: views + fluid".

   1. Big status marks (`.image-grid-card--marks-lg`): the viewed eye and every
      `.thumbnail-overlay__dot` (each carries `.image-grid-card__mark`) are the
      SAME 28 px circle (24 px on phones), so status reads at a glance. Colours
      and meaning are unchanged: kill brand red ✕, excluded black ✕, selected
      yellow ★, caption teal, viewed dark eye.
   2. A killed tile in the day view is NOT greyed: the page renders it without
      `.is-killed` (ImageTile `muteKilled={false}`); the ✕ mark carries it.
   3. Cards (`.image-grid-card--wide`): one card is two thumbnails wide — the
      square thumbnail on the left half, the file name and `.tile-facts` lines
      on the right. Check box and "⋯" menu sit where they do on a tile.
   4. Fluid (`.day-page--fluid`): the rail + grid / table row spans the window
      (normal page gutter); the progress header and alerts stay at 1,120 px.
      Toggled by `.fluid-toggle` beside the `.view-toggle` (hidden on phones). */

/* 1. Big, equal status marks */
.image-grid-card--marks-lg .image-grid-card__mark {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.35);
}
.image-grid-card--marks-lg .thumbnail-overlay__dot--selected.image-grid-card__mark { font-size: 1rem; }
.image-grid-card--marks-lg .image-grid-card__viewed svg { width: 16px; height: 16px; }
.image-grid-card--marks-lg .image-grid-card__viewed { left: 0.5rem; bottom: 0.5rem; }
/* The eye carries `.image-grid-card__mark` for sizing only: never the circle. */
.image-grid-card--marks-lg .image-grid-card__viewed.image-grid-card__mark {
  width: auto; height: auto; min-width: 0; padding: 0; border-radius: 0;
  background: none; box-shadow: none;
}
.image-grid-card--marks-lg .thumbnail-overlay { right: 0.5rem; bottom: 0.5rem; gap: 0.375rem; }
@media (max-width: 639px) {
  .image-grid-card--marks-lg .image-grid-card__mark { width: 24px; height: 24px; min-width: 24px; font-size: 0.75rem; }
  .image-grid-card--marks-lg .image-grid-card__viewed svg { width: 14px; height: 14px; }
}

/* 3. Cards: thumbnail left, details right */
.image-grid-card--wide { height: 100%; }
.image-grid-card--wide > a { height: 100%; align-items: stretch; }
.image-grid-card--wide .image-grid-card__thumb { flex: 0 0 50%; width: 50%; }
.image-grid-card__details {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-left: 1px solid var(--color-border);
  overflow: hidden;
}
/* Owner 2026-11-15: the FULL file name, never an ellipsis — it wraps at
   hyphens / underscores (ImageTile adds a soft break after each `_`), and
   only breaks mid-word when a part is wider than the card. */
.image-grid-card__details .image-grid-card__name {
  flex: none; font-size: 0.875rem; font-weight: 600; line-height: 1.3;
  white-space: normal; overflow: visible; overflow-wrap: anywhere;
}
/* Room for the "⋯" trigger over the top-right corner. */
.image-grid-card--wide:has(.tile-menu-btn) .image-grid-card__name { padding-right: 44px; }

/* The card's detail lines: a glyph that matches the corner mark + words. */
.tile-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
}
.tile-fact { display: flex; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.tile-fact__glyph {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}
.tile-fact__glyph svg { width: 13px; height: 13px; }
.tile-fact__text {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tile-fact--killed,
.tile-fact--excluded,
.tile-fact--selected { color: var(--color-text); }
.tile-fact--killed .tile-fact__glyph { background: var(--color-primary); color: #fff; }
.tile-fact--excluded .tile-fact__glyph { background: #000; color: #fff; }
.tile-fact--selected .tile-fact__glyph { background: var(--color-select); color: var(--color-gray-900); box-shadow: inset 0 0 0 1px var(--color-select-edge); }
/* --color-success-ink (#047857) on white is ~5.5:1 (the success token #059669 is ~3.8:1, too low for small text). */
.tile-fact--approved { color: var(--color-success-ink); }
.tile-fact--approved .tile-fact__glyph { background: var(--color-success-bg); color: var(--color-success-ink); box-shadow: inset 0 0 0 1px #A7F3D0; }
.tile-fact--unkilled .tile-fact__glyph { box-shadow: inset 0 0 0 1.5px var(--color-gray-400); transform: scale(0.67); }

/* 5. Cards on phones — cast chips (owner 2026-11-15, option A)
   `.day-grid--cast` (production accounts, admins, viewers; phones portrait
   and landscape): the details are one `.tag-chip` per tagged actor — the
   `.tag-state` glyph (open eye = seen, crossed eye = not seen, red ✕ =
   killed by them, green ✓ = approved: they submitted the day and did not
   kill it), killed first — then ONLY a kill / exclusion by a non-actor
   (`.tile-facts--staff`, one line). Every card is the same height (the
   thumbnail, 40% of the card; 36% landscape), so the chips stop at two rows
   with a `.tag-chip--more` "+N more" and the staff line at one line
   ("Killed by Demo Agent +1 more"); the file name always shows in full.
   No "⋯" on a touch card: ticking it brings up the `.bulk-toolbar`. */
.day-grid--cast .image-grid-card--wide .image-grid-card__thumb { flex: 0 0 40%; width: 40%; }
.day-grid--land .image-grid-card--wide .image-grid-card__thumb { flex-basis: 36%; width: 36%; }
.day-grid--cast .image-grid-card__details { gap: 6px; padding: var(--space-2) var(--space-3); }
.day-grid--cast .image-grid-card__details .image-grid-card__name { font-size: 0.8125rem; }
.card-cast { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.card-cast__none { margin: 0; font-size: 0.8125rem; color: var(--color-text-secondary); }
.tag-chips {
  list-style: none; margin: 0; padding: 0; position: relative;
  display: flex; flex-wrap: wrap; gap: 4px; min-width: 0;
  max-height: 48px; /* two rows of 22 px chips */
  overflow: hidden;
}
.tag-chips .tag-state + .tag-state { margin-left: 0; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 3px; max-width: 100%; height: 22px; padding: 0 7px 0 5px;
  border: 1px solid var(--color-gray-200); border-radius: var(--radius-full); background: var(--color-surface);
  font-size: 0.71875rem; line-height: 1; white-space: nowrap;
}
.tag-chip .tag-state__icon { width: 13px; height: 13px; }
.tag-chip.tag-state--unviewed { background: var(--color-gray-50); }
.tag-chip.tag-state--killed { border-color: #FECACA; background: var(--color-brand-50); }
.tag-chip.tag-state--approved { border-color: #A7F3D0; background: var(--color-success-bg); }
.tag-chip--more { padding: 0 8px; border-color: var(--color-gray-100); background: var(--color-gray-100); color: var(--color-text-secondary); font-weight: 600; }
.tile-facts--staff { padding-top: 6px; border-top: 1px solid var(--color-border); }
.tile-facts--staff .tile-fact { align-items: center; }
.tile-fact__text--line { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }

/* 6. Landscape phones (owner 2026-11-15, option A) — `.day-page--land`, set by
   the page under (pointer: coarse) and (orientation: landscape) and
   (max-height: 500px), so tablets and desktops never get it. The black bar
   shrinks to 44 px and carries the day title (the bold last crumb); the big
   `.page-head` title band folds away (its h1 stays for screen readers). The
   day summary is one slim row (`.day-progress--slim`): "7 of 18 left to
   review" or the stamp · `.cast-pill` · the action. Thumbnails go 5 / 6 / 7
   across at 667 / 844 / 915 (`.day-grid--land`), cards 2 per row. Tick boxes
   and "⋯" keep their 44 px touch targets. */
#root:has(.day-page--land) .app-bar { min-height: 44px; padding-block: 0; gap: var(--space-2); }
/* An actor's kill rings (title + rings) are taller than 44 px: a little air above and below. */
#root:has(.day-page--land) .app-bar:has(.kill-rings-box) { padding-block: var(--space-1); }
#root:has(.day-page--land) .app-bar .crumbs__here { font-size: 1rem; font-weight: 700; }
#root:has(.day-page--land) .page-head {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.day-page--land .day-progress { margin-top: var(--space-2); }
.day-page--land .day-page__body { margin-top: var(--space-2); }
.day-page--land .gallery-toolbar__controls { margin-bottom: var(--space-2); flex-wrap: nowrap; }
.day-page--land .gallery-search { flex: 1 1 160px; min-width: 120px; }
/* 6b. The Image summary held sideways (owner 2026-11-15: parity with the day
   view) — `.image-summary--land`, same media condition. The rail gives way to
   the "Filters" button and sheet, tiles are the day's `.day-grid--land`
   (same size, gaps and marks), the bar is 44 px and the toolbar one dense row.
   The black title band stays — it carries Recent exports and Download — but
   shrinks to one slim row. */
#root:has(.image-summary--land) .app-bar { min-height: 44px; padding-block: 0; gap: var(--space-2); }
#root:has(.image-summary--land) .app-bar:has(.kill-rings-box) { padding-block: var(--space-1); }
#root:has(.image-summary--land) .page-head__title-row { padding: 0 0 var(--space-2); row-gap: var(--space-2); }
#root:has(.image-summary--land) .page-head__title { font-size: 1.125rem; }
.image-summary--land .gallery-island__body { margin-top: var(--space-2); }
/* The day's gutter only (no second inset), so the tiles are the day's width too. */
.image-summary.image-summary--land .gallery-island__main { padding: 0; }
.image-summary--land .gallery-toolbar__controls { margin-bottom: var(--space-2); }
.image-summary--land .gallery-toolbar__controls:not([role="group"]) { flex-wrap: nowrap; }
.image-summary.image-summary--land .gallery-search { flex: 1 1 160px; max-width: none; width: auto; min-width: 120px; }
.day-progress.day-progress--slim {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  padding: 6px 8px 6px var(--space-4); margin-bottom: 0;
}
.day-progress--slim .day-progress__title { font-size: 0.9375rem; white-space: nowrap; }
.day-progress--slim .day-card__stamp { flex-direction: row; gap: 6px; margin: 0; padding: 2px 8px; transform: none; }
.day-progress--slim .day-card__stamp-word { font-size: 0.75rem; letter-spacing: 0.08em; }
.day-progress--slim .day-card__stamp-word svg { width: 12px; height: 12px; }
.day-progress--slim .day-card__stamp time { font-size: 0.625rem; }
.day-progress__spacer { flex: 1 1 auto; }
.day-progress--slim .btn { min-height: 40px; }
@media (pointer: coarse) { .day-progress--slim .btn { min-height: 44px; } }
/* The cast pill: "Cast approvals 3 of 7", a mini bar (brand red, green once
   everyone has submitted) and a chevron; it opens the `.day-cast__list` rows
   underneath, collapsed by default. */
.cast-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface);
  font: inherit; font-size: 0.8125rem; color: var(--color-text-secondary); white-space: nowrap; cursor: pointer;
}
@media (pointer: coarse) { .cast-pill { min-height: 44px; } }
.cast-pill:hover { background: var(--color-gray-50); }
.cast-pill:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.cast-pill strong { color: var(--color-text); font-variant-numeric: tabular-nums; }
.cast-pill__bar { display: inline-block; width: 64px; height: 6px; margin: 0; }
.cast-pill__bar .progress__fill { display: block; height: 100%; background: var(--color-primary); }
.cast-pill__bar.progress--complete .progress__fill { background: var(--color-success); }
.cast-pill__chevron { flex: none; color: var(--color-text-tertiary); transition: transform var(--duration-fast, 150ms) var(--ease, ease); }
.cast-pill.is-open .cast-pill__chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .cast-pill__chevron { transition: none; } }
.cast-pill__panel { order: 10; flex: 1 0 100%; }
.cast-pill__panel[hidden] { display: none; }
@media (max-width: 700px) {
  .cast-pill__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Dense landscape tiles: smaller status marks, a two-line 11 px file name. */
.day-grid--land .image-grid-card--marks-lg .image-grid-card__mark { width: 20px; height: 20px; min-width: 20px; font-size: 0.625rem; }
.day-grid--land .image-grid-card--marks-lg .thumbnail-overlay__dot--selected.image-grid-card__mark { font-size: 0.75rem; }
.day-grid--land .image-grid-card--marks-lg .image-grid-card__viewed svg { width: 12px; height: 12px; }
.day-grid--land .image-grid-card--marks-lg .image-grid-card__viewed { left: 4px; bottom: 4px; }
.day-grid--land .image-grid-card--marks-lg .thumbnail-overlay { right: 4px; bottom: 4px; gap: 3px; }
.day-grid--land .image-grid-card__foot { flex: 1 1 auto; align-items: flex-start; padding: 3px 6px; }
.day-grid--land .image-grid-card__foot .image-grid-card__name {
  font-size: 0.6875rem; line-height: 1.3; white-space: normal; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* 4. View controls + fluid body row */
.day-view-controls { display: inline-flex; align-items: center; gap: var(--space-2); }
.fluid-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease);
}
.fluid-toggle svg { width: 16px; height: 16px; }
.fluid-toggle:hover { color: var(--color-text); background: var(--color-gray-50); }
.fluid-toggle[aria-pressed="true"] { background: var(--color-gray-900); border-color: var(--color-gray-900); color: #fff; }
.fluid-toggle[aria-pressed="true"]:hover { background: var(--color-gray-800); }
.fluid-toggle:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.day-page--fluid { max-width: none; }
.day-page--fluid > :not(.day-page__body) { max-width: var(--page-max); margin-inline: auto; }
@media (max-width: 639px) {
  .fluid-toggle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fluid-toggle { transition: none; }
}

/* ---------- Owner 2026-11-14: Mark project complete ----------
   Shoot days "next steps" (option B): once every day with cast is approved,
   production accounts / admins see two numbered steps — Mark your selects
   (optional) and Mark project complete (the one red action) — beside what we
   deliver. Phones: the aside stacks under the steps. */
.next-steps { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl, 14px); overflow: hidden; margin-bottom: var(--space-4); }
.next-steps__main { padding: var(--space-5) var(--space-6); }
.next-steps__aside { padding: var(--space-5) var(--space-5); border-left: 1px solid var(--color-border); background: linear-gradient(160deg, #F0FDF4, #ECFDF5 40%, #F8FAFC); }
.next-steps__eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-success-ink); }
.next-steps__title { margin: 6px 0 0; font-size: 1.375rem; line-height: 1.25; font-weight: 700; color: var(--color-text); }
.next-steps__list { list-style: none; margin: var(--space-3) 0 var(--space-4); padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.next-steps__list li { display: flex; gap: var(--space-3); font-size: 0.9375rem; line-height: 1.45; color: var(--color-text-secondary); }
.next-steps__list li strong { color: var(--color-text); }
.next-steps__n { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 9999px; background: var(--color-gray-900); color: #fff; font-size: 0.78rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.next-steps__list li.is-main .next-steps__n { background: var(--color-primary); }
.next-steps__opt { color: var(--color-text-tertiary); }
.next-steps__ctas { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; }
.next-steps__aside-title { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-success-ink); }
.next-steps__aside p { margin: 0; font-size: 0.8125rem; color: var(--color-text-secondary); }
@media (max-width: 767px) {
  .next-steps { grid-template-columns: 1fr; }
  .next-steps__main { padding: var(--space-4); }
  .next-steps__aside { border-left: 0; border-top: 1px solid var(--color-border); padding: var(--space-4); }
  .next-steps__title { font-size: 1.125rem; }
  .next-steps__ctas .btn { width: 100%; }
}
/* What we deliver: four folder chips (Approved / Killed / Key selects / Reports). */
.deliver-folders { list-style: none; margin: var(--space-2) 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.deliver-folder { display: flex; align-items: center; gap: var(--space-2); background: rgba(255, 255, 255, 0.9); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 8px 12px; font-size: 0.8125rem; font-weight: 600; color: var(--color-text); min-width: 0; }
.deliver-folder svg { flex: none; }
.deliver-folder small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--color-text-secondary); }
.deliver-folder--approved svg { color: var(--color-success-ink); }
.deliver-folder--killed svg { color: var(--color-error); }
.deliver-folder--selects svg { color: var(--color-select-strong); stroke: var(--color-select-edge); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke fill; }
.deliver-folder--reports svg { color: #475569; }
/* The confirm modal's optional selects note — an aside, never a demand. */
.complete-selects { display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-3) 0; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--color-select-tint); border: 1px solid #FDE047; font-size: 0.875rem; color: var(--color-select-ink); }
.complete-selects svg { flex: none; margin-top: 2px; color: var(--color-select-strong); stroke: var(--color-select-edge); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke fill; }
.complete-selects__action { margin-left: auto; flex: none; }
/* Image summary guidance: --go (green, the approved-images view this flow
   sends people to) and --nudge (white, any other filters). */
.summary-guide { display: flex; align-items: flex-start; gap: var(--space-3); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3); font-size: 0.9375rem; line-height: 1.5; }
.summary-guide--go { background: #ECFDF5; border: 1px solid #A7F3D0; color: #064E3B; }
.summary-guide--nudge { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-secondary); }
.summary-guide__icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.summary-guide--go .summary-guide__icon { background: var(--color-success-ink); color: #fff; }
.summary-guide--nudge .summary-guide__icon { background: var(--color-select-tint); color: var(--color-select-strong); }
.summary-guide--nudge .summary-guide__icon svg { stroke: var(--color-select-edge); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke fill; }
.summary-guide__text { flex: 1; min-width: 0; }
.summary-guide__title { display: block; margin: 0 0 2px; font-size: 1rem; font-weight: 700; color: var(--color-text); }
.summary-guide__text p { margin: 0; }
.summary-guide__star { display: inline-block; vertical-align: -2px; color: var(--color-select-edge); fill: var(--color-select); }
.summary-guide__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.summary-guide__count { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 800; font-size: 0.9375rem; color: var(--color-text); }
.summary-guide__count svg { color: var(--color-select-strong); stroke: var(--color-select-edge); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke fill; }
/* Phones (owner 2026-11-14: nothing cramped): the icon goes so the words get
   the full width; the count sits on its own line and the button is full width. */
@media (max-width: 639px) {
  .summary-guide { flex-direction: column; gap: var(--space-3); padding: var(--space-3); }
  .summary-guide__icon { display: none; }
  .summary-guide__side { width: 100%; align-items: stretch; }
  .summary-guide__count { justify-content: center; }
  .summary-guide__side .btn { width: 100%; justify-content: center; }
}
@media (max-width: 479px) {
  /* What we deliver: one item per line, name and detail side by side. */
  .deliver-folders { grid-template-columns: 1fr; gap: 6px; }
  .deliver-folder { padding: 7px 10px; }
  .deliver-folder > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
  .deliver-folder small { display: inline; }
  /* The confirmation's optional selects aside: the action under the words. */
  .complete-selects { flex-wrap: wrap; }
  .complete-selects > span:not(.complete-selects__action) { flex: 1 1 0; min-width: 0; }
  .complete-selects__action { margin-left: 22px; flex-basis: 100%; }
}
/* The ☆ / ★ select button on an Image summary tile (production accounts). */
.image-grid-card__star { position: absolute; top: 0.375rem; right: 0.375rem; z-index: 2; width: 30px; height: 30px; border: 0; border-radius: 9999px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); display: inline-flex; align-items: center; justify-content: center; color: var(--color-gray-400); cursor: pointer; }
.image-grid-card__star:hover { color: var(--color-select-edge); }
.image-grid-card__star:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.image-grid-card__star[aria-pressed="true"] { color: var(--color-select-strong); }
.image-grid-card__star[aria-pressed="true"] svg { stroke: var(--color-select-edge); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke fill; }
.image-grid-card__star[disabled] { opacity: 0.6; cursor: progress; }
/* Locked / complete: the dark banner with a green tick (project marked complete). */
.locked-banner--complete .locked-banner__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--color-success-ink); align-items: center; justify-content: center; }

/* ===========================================================================
   Phone layout fixes (owner-approved phone survey, 2026-11-14)
   ---------------------------------------------------------------------------
   Every rule here is scoped to a phone width (≤ 639 px), a short viewport
   (≤ 500 px tall), or `pointer: coarse`, so a desktop at 1440 px renders
   as before. Three deliberate exceptions, broken at every size: the
   selection checkboxes (1b), the `.field__select` chevron (6), and the day
   view's centre column (2), which is never wider than its row.
   =========================================================================== */

/* 1b. Selection checkboxes you can see: the forms reset left them a white
   square with no border. 2 px gray.500 border, rounded-sm, white fill and
   shadow-xs while unticked; brand red with a white tick once ticked. */
.cell-pick input[type="checkbox"],
.image-grid-card__check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  display: inline-block; vertical-align: middle; padding: 0; flex: none;
  border: 2px solid var(--color-gray-500); border-radius: var(--radius-sm);
  background-color: var(--color-surface); background-position: center; background-repeat: no-repeat; background-size: 100% 100%;
  box-shadow: var(--shadow-xs); cursor: pointer;
}
.cell-pick input[type="checkbox"]:checked,
.image-grid-card__check input[type="checkbox"]:checked {
  border-color: var(--color-primary); background-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
}
.cell-pick input[type="checkbox"]:focus-visible,
.image-grid-card__check input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.cell-pick input[type="checkbox"]:disabled,
.image-grid-card__check input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }
@media (pointer: coarse) {
  /* 22 px box; the wrapper's white halo stays around it on a photo. */
  .image-grid-card__check input[type="checkbox"] { width: 22px; height: 22px; box-shadow: var(--shadow-xs), 0 0 0 3px rgba(255, 255, 255, 0.92); }
  .image-grid-card__check input[type="checkbox"]:not(:checked) { background-color: var(--color-surface); }
}

/* 6. `.field__select` keeps its dropdown chevron (the `background` shorthand
   above wiped the forms-plugin arrow, so selects read as text boxes). */
select.field__select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236B7280' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  text-overflow: ellipsis;
}
select.field__select.field__select--inline { padding-right: 1.75rem; background-position: right 6px center; background-size: 16px; }
select.field__select[multiple] { background-image: none; padding-right: 12px; }

/* 6. `.field-pair`: two fields side by side (dialling code + phone number);
   stacked full width on a phone (below). */
.field-pair { display: flex; align-items: flex-start; gap: var(--space-2); }
.field-pair > .field:first-child:not(:only-child) { flex: 0 0 13rem; min-width: 0; }
.field-pair > .field + .field { flex: 1 1 0; min-width: 0; }

/* 2. The day view's centre column is never wider than its row: a wide table
   scrolls inside its own `.table-scroll` and the toolbar stays on screen. */
.day-page__body > .gallery-island__main { width: 100%; max-width: 100%; min-width: 0; }

/* 11. `.section-switcher--phone`: below 640 px the switcher replaces a
   `.tabs` row marked `.tabs--switchable` (Settings). Hidden from 640 px. */
.section-switcher--phone { padding-bottom: var(--space-4); }
.section-switcher--phone .section-switcher__menu { left: 0; right: 0; top: calc(100% - var(--space-4) + 4px); }

@media (max-width: 639px) {
  /* 4. Single image (portrait phone): the position ("All · 4 of 12") gets a
     line of its own under the file name, as in the landscape rail. */
  .lightbox--page:not(.lightbox--landscape) .lightbox__top .lightbox__name { line-height: 1.25; }
  .lightbox--page:not(.lightbox--landscape) .lightbox__top .lightbox__name-meta {
    display: block; margin: 2px 0 0; font-size: 0.8125rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* 5. `.tabs--fill`: on a phone the tabs share the row with tighter padding,
     so three tabs fit 360 px without a hidden scroll. */
  .tabs.tabs--fill { gap: 0; }
  .tabs.tabs--fill > .tab { flex: 1 1 auto; justify-content: center; padding-left: var(--space-2); padding-right: var(--space-2); }

  /* 8 + 8b. Day cards: ring on the left; name and figures in one run on the
     right; the stamp, button or note on a row of its own under them. The
     stamp's date and sub-label use Caption (12 px). */
  .day-card:not(.day-card--stack) {
    display: grid; grid-template-columns: 60px minmax(0, 1fr);
    column-gap: var(--space-3); row-gap: 10px; align-items: center;
  }
  .day-card:not(.day-card--stack) > :is(.progress-circle, .day-card__done-disc, .skeleton) { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .day-card:not(.day-card--stack) > .day-card__main { grid-column: 2; grid-row: 1; }
  .day-card:not(.day-card--stack) > :is(.day-card__stamp, .day-card__action, .day-card__note) { grid-column: 2; grid-row: 2; justify-self: start; margin: 0; }
  .day-card:not(.day-card--stack) > .day-card__action:not(.btn) { align-items: flex-start; }
  .day-card .day-card__figures { flex-direction: row; flex-wrap: wrap; column-gap: var(--space-3); row-gap: 2px; text-align: left; justify-content: flex-start; }

  /* 9. Image summary: one page gutter (no second inset) and a full-width search. */
  .image-summary .gallery-island__main { padding-left: 0; padding-right: 0; }
  .image-summary .gallery-search { flex: 1 1 100%; max-width: none; width: 100%; min-width: 0; }

  /* 13 + 13b. Figure cards: three tiles share one row; with five, the odd
     last tile spans the row instead of sitting beside a gap. */
  .figure-cards:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .figure-cards:has(> :nth-child(3):last-child) > .figure-card { padding: var(--space-3) 10px; min-width: 0; }
  .figure-cards:has(> :nth-child(3):last-child) .figure-card__count { font-size: 1.375rem; }
  .figure-cards:has(> :nth-child(3):last-child) .figure-card__value { flex-wrap: wrap; column-gap: var(--space-1); }
  .figure-cards > .figure-card:last-child:nth-child(2n + 5) { grid-column: 1 / -1; }

  /* 6. Request access: the dialling code and phone number stack full width. */
  .field-pair { flex-direction: column; align-items: stretch; gap: var(--space-5); }
  .field-pair > .field:first-child:not(:only-child),
  .field-pair > .field + .field { flex: none; width: 100%; }

  /* 11. Settings: the switcher replaces the section tabs. */
  .section-switcher--phone { display: block; position: relative; }
  .tabs.tabs--switchable { display: none; }
}

/* 8b. On any phone (portrait, or held sideways on a touch screen) the Done /
   Approved / Signed off stamp's date and sub-label use Caption (12 px), on
   the day cards and in the day view's progress header. */
@media (max-width: 639px), (pointer: coarse) and (max-height: 500px) {
  :is(.day-card, .day-progress) .day-card__stamp time,
  :is(.day-card, .day-progress) .day-card__stamp-sub { font-size: 0.75rem; line-height: 1.4; }
}

/* 8c. Design G day cards (`.day-card--g`: production accounts, viewers, root
   admins) on a phone held upright, D1 (owner 2026-11-15): the 60 px ring; day
   name over "Viewed N of M"; the corner box (Sign off / SIGNED OFF / APPROVED,
   a viewer's Approved / Unkilled) top right, 4 px down; the release band at
   full width underneath, with the card's phone padding. The main column and
   the figures line dissolve (`display: contents`) so their parts take grid
   areas; the DOM still reads name → viewed → corner → band. 640 px and wider
   keep the round-34 card (the `.day-card__wide` parts). */
@media (max-width: 639px) {
  .day-card.day-card--g:not(.day-card--stack) {
    display: grid; grid-template-columns: 60px minmax(0, 1fr) auto;
    grid-template-areas: "ring name side" "ring viewed side" "band band band";
    column-gap: var(--space-3); row-gap: 0; align-items: start;
  }
  .day-card--g > .day-card__main,
  .day-card--g .day-card__figures--g { display: contents; }
  .day-card.day-card--g:not(.day-card--stack) > :is(.progress-circle, .day-card__done-disc, .skeleton) { grid-area: ring; }
  .day-card--g .day-card__name { grid-area: name; align-self: start; margin: 0; min-width: 0; }
  .day-card--g .day-card__viewed { grid-area: viewed; align-self: start; }
  .day-card.day-card--g:not(.day-card--stack) > :is(.day-card__action, .day-card__corner) {
    grid-area: side; justify-self: end; align-self: start; margin: var(--space-1) 0 0 var(--space-2);
  }
  .day-card.day-card--g:not(.day-card--stack) > .day-card__action { align-items: flex-end; }
  /* Sign off: `.btn--sm` drawn at 32 px even under a finger (beats the
     coarse-pointer 44 px growth, 12) with a 44 px `::after` hit area, and at
     least the corner's width so the stamps that replace it sit in its box. */
  .day-card--g > .day-card__action .btn {
    position: relative; height: 32px; min-height: 32px; min-width: var(--day-corner-w);
    padding: 0 14px; font-size: 0.8125rem;
  }
  .day-card--g > .day-card__action .btn::after { content: ""; position: absolute; inset: -6px -4px; }
  .day-card--g > .day-card__band {
    margin: var(--space-3) calc(-1 * var(--space-4)) calc(-1 * var(--space-3));
    padding: var(--space-2) var(--space-4) var(--space-3);
    font-size: 0.75rem; line-height: 1.45;
  }
}

/* 3. The drawer on a short screen (a phone held sideways): the whole drawer
   scrolls, so the page links follow the context block instead of being
   squeezed into a 16 px strip between it and the footer. */
@media (max-height: 500px) {
  .side-nav--drawer { overflow-y: auto; overscroll-behavior: contain; }
  .side-nav--drawer > .side-nav__body { flex: none; overflow: visible; height: auto; }
  .side-nav--drawer > .side-nav__foot { flex: none; }
  /* The head kept its height only while the body could shrink; once the drawer
     scrolls it was squeezed to 45 px with the 44 px logo spilling over its rule. */
  .side-nav--drawer > .side-nav__head { flex: none; }
}

/* 3b. The talent menu on a phone held sideways (owner 2026-11-15: "fit it all
   on the left side without scrolling"). At 360-430 px tall one column of
   48 px rows cannot hold a production account's menu (it overflowed by
   242-282 px), so `.side-nav--overlay` widens (600 px, at least 72 px of the
   page left showing to tap away) and splits in two: logo + Close across the
   top; Continue reviewing, the production block and Sign out on the left; the
   page links on the right. Nothing gets smaller to fit: links stay 48 px tall
   at 16 px, Close 44 px, Change becomes a 40 px target; only the logo (32 px)
   and the paddings tighten. Rule 3 still scrolls the drawer if a screen is
   shorter still. Portrait and desktop are untouched (needs landscape AND
   <= 500 px tall). DOM order is unchanged: head, Continue, production, links,
   Sign out. */
@media (orientation: landscape) and (max-height: 500px) {
  .side-nav--drawer.side-nav--overlay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas: "head head" "lead body" "ctx body" "foot body";
    /* Beats the 260 px `!important` of the < 768 px drawer. */
    width: min(600px, calc(100vw - 72px)) !important;
    max-width: none;
  }
  .side-nav--overlay > .side-nav__head { grid-area: head; height: 52px; padding: 0 0.5rem 0 1rem; }
  .side-nav--overlay > .side-nav__head .side-nav__logo img { height: 32px; }
  .side-nav--overlay > .nav-continue { grid-area: lead; margin: 0.5rem 0.75rem 0.375rem; padding: 0.5rem 0.875rem; }
  .side-nav--overlay > .drawer-context { grid-area: ctx; padding: 0.375rem 0.75rem 0.25rem 1rem; }
  .side-nav--overlay > .drawer-context .drawer-context__label { font-size: 0.6875rem; margin-bottom: 0; }
  .side-nav--overlay > .drawer-context .drawer-context__name { font-size: 1rem; }
  .side-nav--overlay > .drawer-context .drawer-context__change {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.25rem; font-size: 0.9375rem;
  }
  .side-nav--overlay > .side-nav__body {
    grid-area: body; padding: 0.5rem 0.75rem; border-left: 1px solid var(--color-border-subtle);
  }
  .side-nav--overlay > .side-nav__body .side-nav__item { font-size: 1rem; min-height: 48px; padding: 0.625rem 0.875rem; }
  .side-nav--overlay > .side-nav__foot { grid-area: foot; align-self: end; padding: 0; }
  .side-nav--overlay > .side-nav__foot > * { padding: 0.5rem 0.75rem 0.5rem 1rem; }
}

/* 12. Touch targets: buttons, small buttons, the "Don't ask me again" row,
   the tile star and the end-of-folder link are 44 px under a finger. */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.btn--sm { height: auto; min-height: 44px; }
  .modal__check { min-height: 44px; gap: var(--space-3); }
  .modal__check input[type="checkbox"] { width: 22px; height: 22px; }
  .image-grid-card__star { width: 44px; height: 44px; top: 0.25rem; right: 0.25rem; }
  .lightbox__end-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-2); }
  .cell-menu-btn { min-width: 44px; }
}

/* Single image held sideways: the file name wraps in the narrow rail rather
   than being cut, and the state chip ("Day signed off · 14 Nov") wraps
   inside the rail instead of running to its edge. */
.lightbox.lightbox--landscape .lightbox__name { white-space: normal; overflow-wrap: anywhere; }
.lightbox__side-actions .state-pill { height: auto; min-height: 26px; min-width: 0; white-space: normal; padding-top: 3px; padding-bottom: 3px; }

/* Production summary cast card on a small phone: the "N of M days" badge
   moves under the name, so "4 images · 4 solo · 0 group" keeps one line. */
@media (max-width: 479px) {
  .cast-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-3); row-gap: var(--space-1); }
  .cast-card__head > .cast-card__avatar { grid-row: 1 / span 2; }
  .cast-card__head > .status-badge { grid-column: 2; justify-self: start; }
}

/* Production summary cast cards on a phone held SIDEWAYS (owner 2026-11-15,
   `.cast-cards--split` + `.cast-card--split`): one actor per row, full width,
   in two halves, the solo / group / total breakdown always open on the right,
   no "Full breakdown" button. A two-row grid across both halves (round 1116,
   round 1117): row 1 — `.cast-card__head` (avatar, then the name with the
   small days pill right after it on the same line, wrapping under the name
   only when both cannot fit) | an empty cell; row 2 — `.cast-card__summary`
   (figures, viewed, selects, kill allowance) | `.cast-card__detail` (the
   breakdown table, then the access line 8 px under it, no divider). The
   table's top therefore always lines up with the top of the Killed /
   Unkilled / Approved tiles, however the name wraps. A 1 px divider runs down
   the right half beside the table and access line. Compact type and spacing
   so a whole card fits the screen under the app bar (≤ 375 px tall phones):
   figures 18 px, text never under 11 px; the days pill and the access badges
   use `.status-badge--sm`, the access labels 11 px; the breakdown is turned
   on its side (`.table--transpose`). The app switches markup on the same
   query. The grid of halves itself is not tied to the query (round 1121): a
   tablet or desktop uses it for an opened card — see below; the compact type
   stays sideways-phone only. */
.cast-cards.cast-cards--split { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.cast-card.cast-card--split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; align-items: start;
  align-content: start; gap: 0 var(--space-4);
}
.cast-card--split > .cast-card__head { grid-area: 1 / 1; min-width: 0; padding-bottom: var(--space-3); }
.cast-card--split > .cast-card__summary { grid-area: 2 / 1; min-width: 0; }
/* The right half (row 2): the table top-aligned with the figures, the access line under it. */
.cast-card--split > .cast-card__detail {
  grid-area: 2 / 2; min-width: 0; align-self: stretch; overflow-x: visible;
  padding: 0 0 0 var(--space-4); border-top: 0; border-left: 1px solid var(--color-border-subtle);
}

/* Round 1121 (owner 2026-11-15): on a tablet or desktop (the cast grid has two
   or more columns) an OPENED card (`.cast-card--split.is-open`) spans two
   columns in the same two halves — its summary unchanged on the left (the
   "Hide breakdown" toggle at its foot), the breakdown and access line on the
   right — and the cards after it move across, not down. No `dense` packing:
   a card is never drawn ahead of one before it, so the visual order stays the
   reading and tab order (an opened card in the last column moves to the next
   row and leaves that cell empty). The right half is about one card wide, so
   the breakdown turns on its side as on a phone (14 px figures, 13 px row
   labels); the access line keeps its divider and 12 px labels, and drops the
   "·" between its items (they may wrap). */
.cast-card.cast-card--split.is-open { grid-column: span 2; }

/* Owner 2026-11-25: on a production that counts actors' kill allowances over
   released days, ONE "Days: All days · Released days" switch (`.cast-days`: a
   label and a `.view-toggle`) sits beside the Cards / Table icons
   (`.cast-head__controls`) and above the quick summary's cast table. It flips
   every actor's figures in both views and starts on All days; the choice is
   shared by the two places. The note under the head is `.cast-head__note`. The kill allowance follows the switch
   too (owner 2026-11-26), so its heading (`.cast-card__allowance-head`) carries no scope tag. */
.cast-head__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.cast-days { display: inline-flex; align-items: center; gap: var(--space-2); }
.cast-days .view-toggle__btn { white-space: nowrap; }
.cast-card__allowance-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.quick-summary__cast-head { flex-wrap: wrap; }
/* On a phone the Days switch and the Cards / Table icons share one line under the
   "Cast" heading, each option taking its own width. */
@media (max-width: 639px) {
  .cast-head__controls { flex: 1 1 100%; flex-wrap: nowrap; justify-content: space-between; gap: var(--space-3); }
  .cast-head__controls .cast-days .view-toggle { grid-auto-columns: auto; }
  .cast-head__controls .cast-days .view-toggle__btn { padding: 0 0.75rem; }
}

/* The Table view (owner 2026-11-25): in Released days each actor's
   `.cast-table__scope` ("3 of 4 folders released") sits under their name; the
   "Kills used" heading has no note (it follows the switch, owner 2026-11-26). An
   opened row starts under Images — the Actor column stays a list of names — as
   one `.cast-table__panel`: the breakdown, then the kill allowance with the
   access under it (`.cast-table__panel-side`); one column under 900 px. */
.cast-table__scope { display: block; margin-top: var(--space-1); font-size: 0.75rem; font-weight: 400; color: var(--color-text-tertiary); }
.cast-table__panel {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-6); align-items: start;
  padding: var(--space-4) var(--space-5); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.cast-table__panel-main, .cast-table__panel-side { min-width: 0; }
.cast-table__panel-side { display: flex; flex-direction: column; gap: var(--space-3); }
.cast-table__panel-side .cast-card__allowance { margin-top: 0; padding-top: 0; border-top: 0; }
.cast-table__panel-side .cast-table__meta.cast-access { margin-top: 0; }
@media (max-width: 899px) { .cast-table__panel { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } }
@media (max-width: 639px) { .cast-table__panel { padding: var(--space-3); } }

/* Owner 2026-11-25: in every solo / group / total breakdown (cards, the table's
   opened row, the sideways card) the selects sit UNDER their figure, the same
   in every column, so the "·" joining them is dropped. */
.cast-breakdown .cast-table__sub-inline { display: block; white-space: nowrap; }
.cast-breakdown .cast-table__sep { display: none; }
.cast-card--split.is-open .table.table--transpose {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(var(--transpose-rows, 5), auto);
  grid-template-columns: minmax(0, 1.3fr); grid-auto-columns: minmax(0, 1fr);
  width: 100%;
}
.cast-card--split.is-open .table.table--transpose > thead,
.cast-card--split.is-open .table.table--transpose > tbody,
.cast-card--split.is-open .table.table--transpose > thead > tr,
.cast-card--split.is-open .table.table--transpose > tbody > tr { display: contents; }
.cast-card--split.is-open .table.table--transpose th,
.cast-card--split.is-open .table.table--transpose td {
  display: block; min-width: 0;
  padding: var(--space-2) var(--space-3); border: 0; border-top: 1px solid var(--color-border-subtle);
  white-space: normal; font-size: 0.875rem; text-align: right;
}
.cast-card--split.is-open .table.table--transpose > thead th {
  text-align: left; font-size: 0.8125rem; line-height: 1.3; font-weight: 600;
  text-transform: none; letter-spacing: 0; white-space: normal; color: var(--color-gray-600);
}
.cast-card--split.is-open .table.table--transpose > tbody th[scope="row"] { text-align: right; font-size: 0.875rem; font-weight: 700; background: var(--color-gray-50); }
.cast-card--split.is-open .table.table--transpose > thead th:first-child,
.cast-card--split.is-open .table.table--transpose > tbody th[scope="row"] { border-top: 0; }
.cast-card--split.is-open .cast-breakdown.table--transpose .cast-breakdown__total th,
.cast-card--split.is-open .cast-breakdown.table--transpose .cast-breakdown__total td { border-top: 1px solid var(--color-border-subtle); border-left: 1px solid var(--color-border); }
.cast-card--split.is-open .cast-breakdown.table--transpose .cast-breakdown__total th { border-top: 0; }
/* The half is about one card wide, so "Watermark · Image downloads" may wrap:
   no "·" that could start the second line — a wider gap separates the items. */
.cast-card--split.is-open .cast-table__meta.cast-access { column-gap: var(--space-4); }
.cast-card--split.is-open .cast-access__item + .cast-access__item::before { content: none; }

@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .cast-card.cast-card--split { padding: var(--space-3) var(--space-4); }
  .cast-card--split > .cast-card__head { padding-bottom: var(--space-2); }
  .cast-card--split > .cast-card__summary { gap: var(--space-2); }
  .cast-card--split .cast-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-3); align-items: center; }
  /* The name and the days pill share the title line (`.cast-card__title`), tighter here. */
  .cast-card--split .cast-card__title { gap: 2px var(--space-2); }
  .cast-card--split .cast-card__name { font-size: 0.9375rem; line-height: 1.3; }
  .cast-card--split .cast-card__stats,
  .cast-card--split .cast-card__pct,
  .cast-card--split .cast-card__foot,
  .cast-card--split .allowance-rows { font-size: 0.8125rem; }
  .cast-card--split .cast-card__fig { padding: var(--space-1) var(--space-2); }
  .cast-card--split .cast-card__fig dd { font-size: 1.125rem; line-height: 1.25; }
  .cast-card--split .cast-card__allowance { margin-top: 0; padding-top: var(--space-2); gap: var(--space-1); }
  .cast-card--split .allowance-rows { gap: 2px; }
  .cast-card--split .cast-breakdown.table--transpose th,
  .cast-card--split .cast-breakdown.table--transpose td { padding: 0.25rem 0.5rem; font-size: 0.8125rem; line-height: 1.3; }
  .cast-card--split .cast-breakdown.table--transpose > thead th { font-size: 0.75rem; }
  .cast-card--split .cast-breakdown .cast-table__sub-inline { font-size: 0.75rem; white-space: nowrap; }
  /* The half is narrow (≈ 270 px at 667 px), so the two items may wrap: no "·"
     that could start the second line — a wider gap separates them instead. */
  .cast-card--split .cast-table__meta.cast-access {
    margin-top: var(--space-2); padding-top: 0; border-top: 0;
    gap: var(--space-1) var(--space-3); font-size: 0.6875rem;
  }
  .cast-card--split .cast-access > .cast-access__item { gap: var(--space-1); }
  .cast-card--split .cast-access__label { font-size: 0.6875rem; }
  .cast-card--split .cast-access__item + .cast-access__item::before { content: none; }
}

/* Breadcrumb placeholder while the production name loads (`.crumbs__skeleton`). */
.crumbs__skeleton { display: inline-block; width: 6rem; height: 0.75rem; vertical-align: middle; }

/* ---------- Single image on phones: Tagged strip, small state chip, zoom (2026-11-15) ----------
   See components.md "Single image — phone redesign (2026-11-15)". */

/* Phone upright: the Tagged strip right under the file name — names with their
   viewed / not-viewed eye as one wrapping row clamped to two lines, then a
   "+N more" chip (`.lightbox__viewers-more`) that shows them all. "+" to tag and
   the "Signed off" chip sit on the title row. Never taller than 40 % of the
   screen; a long expanded list scrolls inside the strip. */
.lightbox__tagstrip {
  flex: none; display: flex; flex-direction: column; gap: var(--space-1);
  max-height: 40dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--space-1) var(--space-4) var(--space-3);
  background: #0f172a; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0; font-size: 0.8125rem;
}
.lightbox__tagstrip .lightbox__sheet-head { min-height: 44px; }
.lightbox__tagstrip .lightbox__viewers--row { gap: var(--space-1) var(--space-4); }
.lightbox__tagstrip .lightbox__viewers > li { gap: 6px; min-height: 24px; }
.lightbox__tagstrip .lightbox__viewer-glyph svg { width: 14px; height: 14px; }
.lightbox__tagstrip .lightbox__hint { margin: 0; }
.lightbox__viewers-more {
  display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.24); border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06); color: #e2e8f0;
  font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; position: relative;
}
.lightbox__viewers-more::after { content: ''; position: absolute; inset: -10px -4px; } /* 44 px tall to touch */
.lightbox__viewers-more:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox__viewers-more:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* The small state chip (phones): "Signed off" (the word only) or "Locked for delivery". */
.state-pill--dark.state-pill--sm { height: 26px; padding: 0 var(--space-2); gap: 5px; font-size: 0.6875rem; color: #cbd5e1; }
.state-pill--sm svg { width: 13px; height: 13px; flex: none; }

/* Zoom entry (`.zoom-btn`): a 44 px round magnifier on the picture's own top-right
   corner — phones place it from the drawn picture (`--placed`, inline left / top);
   on a desktop it sits in the `.lightbox__figure` corner. */
.zoom-btn {
  position: absolute; z-index: 3; top: var(--space-2); right: var(--space-2);
  width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.72); color: #fff; cursor: zoom-in;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background-color var(--duration-base) var(--ease);
}
.zoom-btn.zoom-btn--placed { right: auto; }
.zoom-btn:hover { background: rgba(15, 23, 42, 0.9); }
.zoom-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.zoom-btn svg { width: 20px; height: 20px; }
/* The swipe moves the picture; the button rides with it. */
.lightbox__stage > .zoom-btn { translate: var(--lightbox-swipe-x, 0px) 0; }

/* Zoom view (`.zoom-view`): a full-screen black overlay, `role="dialog"` with the
   `.modal` contract (focus trap, inert app, Esc, focus back to `.zoom-btn`) — never
   a native <dialog>. Opens at fit; the picture is placed at its fit size and moved
   with one transform (`.zoom-view__img`, origin top-left). Top: the file name and
   ✕ (44 px). Bottom: a hint pill and the level bar [−] Fit / 250% [+]. Zoomed: a
   small overview map (`.zoom-view__map`) under ✕. `touch-action: none` — the view
   owns pinch, pan and double-tap. */
.zoom-view { position: fixed; inset: 0; z-index: 60; background: #000; color: #f1f5f9; overflow: hidden; }
.zoom-view:focus { outline: none; }
.zoom-view__stage { position: absolute; inset: 0; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.zoom-view__stage.is-zoomed { cursor: grab; }
.zoom-view__stage.is-zoomed:active { cursor: grabbing; }
.zoom-view__img {
  position: absolute; max-width: none; max-height: none; transform-origin: 0 0;
  -webkit-user-drag: none; will-change: transform;
}
.zoom-view__img.is-unmeasured { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.zoom-view__img.is-animating { transition: transform var(--duration-slow) var(--ease); }
.zoom-view__top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: max(var(--space-2), env(safe-area-inset-top, 0px)) max(var(--space-3), env(safe-area-inset-right, 0px)) var(--space-6) max(var(--space-4), env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.zoom-view__top > * { pointer-events: auto; }
.zoom-view__name { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; color: #e2e8f0; }
.zoom-view__btn {
  flex: none; width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.78); color: #fff; cursor: pointer;
}
.zoom-view__btn:hover { background: rgba(30, 41, 59, 0.95); }
.zoom-view__btn[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.zoom-view :is(.zoom-view__btn, .zoom-view__level):focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.zoom-view__foot {
  position: absolute; left: 0; right: 0; bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px)); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2); pointer-events: none;
}
.zoom-view__foot > * { pointer-events: auto; }
.zoom-view__hint {
  margin: 0; padding: 6px var(--space-3); border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.78); color: #e2e8f0; font-size: 0.8125rem; white-space: nowrap;
}
.zoom-view__bar {
  display: flex; align-items: center; gap: var(--space-2); padding: 6px; border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.78); border: 1px solid rgba(255, 255, 255, 0.16);
}
.zoom-view__bar .zoom-view__btn { border-color: rgba(255, 255, 255, 0.2); }
.zoom-view__level {
  min-width: 64px; height: 44px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-full);
  background: transparent; color: #fff; cursor: pointer;
  font: inherit; font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.zoom-view__map {
  position: absolute; z-index: 2; right: max(var(--space-3), env(safe-area-inset-right, 0px)); top: calc(max(var(--space-2), env(safe-area-inset-top, 0px)) + 56px);
  width: 96px; overflow: hidden; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 6px; background: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.zoom-view__map img { display: block; width: 100%; height: auto; opacity: 0.6; }
.zoom-view__map-frame { position: absolute; border: 2px solid #fff; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  .zoom-view__img.is-animating, .zoom-btn { transition: none; }
}

/* ==========================================================================
   Watermark card (owner-approved redesign, 2026-11-15)
   - .job-status: a background job's progress in a card header — a spinner,
     "Generating watermarks · 1,240 of 4,000 · about 6 min left" and a slim
     .progress bar; .job-status--ready swaps to a green tick + "… ready".
   - .field__label-row + .field__link: a small text action beside a field's
     label ("Use the default"), shown only when it would do something.
   - .wm-card: the admin Watermark card — form left, a 19rem preview column
     right on desktop (below the form under 1024px); the strength segmented
     control and Save share one row (stacking when narrow).
   ========================================================================== */
.job-status {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  min-width: 15rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.job-status__line { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.job-status__line svg { width: 14px; height: 14px; flex: none; }
.job-status .spinner { width: 12px; height: 12px; border-width: 2px; }
.job-status .progress { width: 15rem; }
.job-status--ready .job-status__line { color: var(--color-success); font-weight: 600; }

.field__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.field__link {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.8125rem; font-weight: 500;
  color: var(--color-primary);
  text-decoration: underline; text-underline-offset: 2px;
  border-radius: var(--radius-sm);
}
.field__link:hover { color: var(--color-primary-dark); }
.field__link:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.field__link[hidden] { display: none; }

.wm-card__head { flex-wrap: wrap; gap: var(--space-4); }
.wm-card__grid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: var(--space-6); align-items: start; }
.wm-card__form { display: flex; flex-direction: column; gap: var(--space-4); }
.wm-card__form .field { margin: 0; }
.wm-card__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.wm-card__preview { margin: 0; }
.wm-card__frame {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-gray-100);
}
.wm-card__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wm-card__caption { margin: 6px 0 0; font-size: 0.75rem; color: var(--color-gray-500); }
@media (max-width: 1023px) {
  .wm-card__grid { grid-template-columns: minmax(0, 1fr); }
  .wm-card__head .job-status { align-items: flex-start; min-width: 0; width: 100%; }
  .wm-card__head .job-status .progress { width: 100%; }
}

/* ---------- Single image on phones: owner tweaks (2026-11-15 b) ----------
   See components.md "Single image — phone redesign (2026-11-15)". */

/* "Tag" at the END of the tagged names (`.lightbox__viewers-add`): a small tag-with-a-
   plus icon and the word, the names' size and a quieter colour (slate-400, 6.9:1 on
   the strip), no box — it wraps like a name. 24 px drawn, 44 px to touch. */
.lightbox__viewers > li.lightbox__viewers-add-item { gap: 0; }
.lightbox__viewers-add {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 var(--space-1); margin: 0 calc(-1 * var(--space-1));
  border: 0; border-radius: var(--radius-sm); background: transparent; color: #94a3b8;
  font: inherit; font-weight: 500; line-height: 1; cursor: pointer;
}
.lightbox__viewers-add::after { content: ''; position: absolute; inset: -10px -6px; }
.lightbox__viewers-add:hover { color: #fff; }
.lightbox__viewers-add:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.lightbox__viewers-add svg { flex: none; }
.lightbox__side-tagged .lightbox__viewers-add { height: 18px; }
.lightbox__side-tagged .lightbox__viewers-add svg { width: 12px; height: 12px; }
.lightbox__side-tagged .lightbox__viewers-add::after { inset: -13px -6px; }

/* "Signed off" as quiet status on the meta line under the file name (phones, both
   ways): "All · 2 of 12 · ✎ Signed off" — the meta's own muted colour, never a chip. */
.lightbox__name-state { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; vertical-align: baseline; }
.lightbox__name-state svg { flex: none; width: 12px; height: 12px; translate: 0 1px; }

/* The phone ⋯ "More actions" button (`.lightbox__details-btn--more`; Download inside a
   `.menu`). Owner 2026-11-15: it is not a primary action, so no square container —
   the three-dot icon alone (slate-300, 12:1 on the bar), pushed to the far right of
   its row (upright top bar and the sideways quiet row alike; a state chip stays
   left), the dots drawn at the box's right edge so they line up with the edge of
   the row (the Kill button below it sideways). Only a faint tint on hover, press
   and while its menu is open. The 44 × 44 box is still the touch target — its
   padding is simply invisible — and the focus ring is drawn inside that box, so
   the panel edge never clips it. */
.lightbox__details-btn.lightbox__details-btn--more {
  flex: none; justify-content: flex-end; width: 44px; min-width: 44px; height: 44px; padding: 0; margin-left: auto;
  border-color: transparent; background: transparent; color: #cbd5e1;
}
.lightbox__details-btn--more svg { width: 20px; height: 20px; }
.lightbox__details-btn.lightbox__details-btn--more:hover { border-color: transparent; background: rgba(255, 255, 255, 0.08); color: #fff; }
.lightbox__details-btn.lightbox__details-btn--more:active,
.lightbox__details-btn.lightbox__details-btn--more[aria-expanded="true"] { border-color: transparent; background: rgba(255, 255, 255, 0.14); color: #fff; }
.lightbox__details-btn.lightbox__details-btn--more:focus-visible { outline-offset: -2px; }
/* Sideways the quiet row stays 36 px tall: the 44 px box overlaps the gaps around it. */
.lightbox__side-actions .lightbox__details-btn.lightbox__details-btn--more { margin-block: -4px; }

/* "Saving…" (`.lightbox__saving`): a small badge floating over the stage's top edge,
   so a decision in flight never moves the image or the buttons. The live region is
   always mounted (empty when idle) so the words are announced. */
.lightbox__saving {
  position: absolute; z-index: 3; top: var(--space-2); left: 50%; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 4px 10px; border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.86); color: #e2e8f0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-size: 0.75rem; font-weight: 600; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity var(--duration-base) var(--ease);
}
.lightbox__saving.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lightbox__saving { transition: none; } }

/* Owner 2026-11-19: "You're now in Day 1" — a floating notice over the top of
   the stage after "… in <folder> →" from the Image summary, with the way back.
   It holds the only "Back to Image summary" link, so it stays until dismissed
   (or the next navigation) — no timer (review on #242). */
.lightbox__arrival {
  position: absolute; z-index: 4; top: var(--space-3); left: 50%; translate: -50% 0;
  display: inline-flex; align-items: center; gap: var(--space-2); max-width: calc(100% - 2 * var(--space-4));
  padding: 6px 8px 6px 12px; border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.92); color: #f1f5f9; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem; animation: lightbox-arrival-in var(--duration-base) var(--ease);
}
.lightbox__arrival svg { flex: none; color: var(--color-cat-amber-500); }
.lightbox__arrival span { min-width: 0; }
.lightbox__arrival a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.lightbox__arrival a:focus-visible, .lightbox__arrival-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: var(--radius-sm); }
.lightbox__arrival-close { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; color: #cbd5e1; font-size: 1rem; cursor: pointer; }
.lightbox__arrival-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lightbox__arrival-close { position: relative; }
/* A 44 px touch target without growing the pill (review on #242), as `.alert__action`. */
.lightbox__arrival-close::after { content: ""; position: absolute; inset: -10px; }
@keyframes lightbox-arrival-in { from { opacity: 0; translate: -50% -6px; } to { opacity: 1; translate: -50% 0; } }
@media (max-width: 640px) { .lightbox__arrival { flex-wrap: wrap; border-radius: var(--radius-lg); justify-content: center; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .lightbox__arrival { animation: none; } }

/* ==========================================================================
   Settings panes (admin production "Image settings", 2026-11-15)
   - .settings-panes: a .card split into side-by-side sections, each a
     bordered tile (.settings-panes__pane) with its own small heading, body
     and right-aligned actions. Responds to the CARD's width (a container
     query), not the viewport, because the admin side-nav takes a share.
   - default: one column. --fw (Featured image | Watermark, owner-approved
     2026-11-15 "Image storage option 1"): Featured 1/3 first, Watermark 2/3
     with its form beside the preview, from 720px of card; the two image
     slots grow into the tile's spare height there. Stacked below 720px.
   - The paragraph / help margins inside panes are zeroed: the flex gap
     already spaces children, so those margins only opened holes.
   - .file-pick--compact: the phone-style "Choose image…" button + file name
     at every width, for a file picker inside a narrow pane.
   - .wm-card--pane: the Watermark card's content inside a pane: preview
     below the form unless the pane itself is 600px+ wide; the job status
     drops under the heading.
   ========================================================================== */
.settings-panes { container: settings-panes / inline-size; }
.settings-panes__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  align-items: stretch;
}
.settings-panes__pane {
  container-type: inline-size;
  min-width: 0;
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.settings-panes__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-2) var(--space-3); flex-wrap: wrap;
}
.settings-panes__title { margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--color-text); }
.settings-panes__lede { margin: 2px 0 0; font-size: 0.8125rem; color: var(--color-text-secondary); }
.settings-panes__body { display: flex; flex-direction: column; gap: var(--space-4); flex: 1; }
.settings-panes__body .field { margin: 0; }
.settings-panes__body .stat-row { margin: 0; }
.settings-panes__body .alert { margin: 0; }
.settings-panes__actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: auto; }
.settings-panes__frame {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-gray-100);
  display: flex; align-items: center; justify-content: center;
}
.settings-panes__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.settings-panes__frame-empty { font-size: 0.8125rem; color: var(--color-gray-500); }
/* Spacing fix: <p class="field__label"> / <p class="field__help"> pick up
   paragraph margins that open ~40px holes inside the flex-gapped bodies. */
.settings-panes__body > p,
.settings-panes__body .field__help { margin-top: 0; margin-bottom: 0; }
.settings-panes__body .field__help { margin-top: 6px; }
.wm-card__form p.field__label { margin: 0 0 6px; }
.wm-card__form .field__help { margin-bottom: 0; }
/* Named container: each pane is itself a size container, so an unnamed
   @container rule on anything inside a pane would query the pane. */
@container settings-panes (min-width: 720px) {
  .settings-panes--fw .settings-panes__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .settings-panes--fw .settings-panes__frame { flex: 1 1 auto; aspect-ratio: auto; min-height: 9rem; }
}
/* The Watermark tile's form | preview split follows the TILE's width (the
   nearest container), so a narrow 2/3 tile keeps the preview below. */
@container (min-width: 520px) {
  .settings-panes--fw .wm-card--pane .wm-card__grid {
    flex: 1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch;
  }
  .settings-panes--fw .wm-card__preview { display: flex; flex-direction: column; min-height: 0; }
  .settings-panes--fw .wm-card__frame { flex: 1 1 auto; aspect-ratio: auto; min-height: 9rem; }
}

/* ---------- Storage controls (admin production storage, 2026-11-15) ----------
   The production's image-storage controls inside the foot-of-page
   `.accordion--quiet` disclosure: backend select + Save | per-backend counts |
   state (drift alert / migration progress / note) + migrate or cancel, one
   row from 760px of panel, stacked below; then the migration history table
   (`__history`, with a small uppercase `__history-title`). */
.storage-controls { container-type: inline-size; }
.storage-controls__grid { display: flex; flex-direction: column; gap: var(--space-4); }
.storage-controls__grid .field,
.storage-controls__grid .alert,
.storage-controls__grid .stat-row { margin: 0; }
.storage-controls__grid .field__help { margin: 6px 0 0; }
.storage-controls__counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.storage-controls__state { display: flex; flex-direction: column; gap: var(--space-3); }
.storage-controls__state > p { margin: 0; }
.storage-controls__actions { display: flex; justify-content: flex-start; gap: var(--space-2); margin-top: auto; }
.storage-controls__history { margin-top: var(--space-5); }
.storage-controls__history-title {
  margin: 0 0 var(--space-2);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-secondary);
}
@container (min-width: 760px) {
  .storage-controls__grid {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
    column-gap: var(--space-6); align-items: stretch;
  }
  .storage-controls__counts { align-self: start; }
}

.file-pick--compact .file-pick__drop.dropzone {
  min-height: 0; padding: 0; border: 0; background: transparent;
  align-items: flex-start; gap: var(--space-2);
}
.file-pick--compact .file-pick__input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.file-pick--compact .file-pick__row { display: flex; align-items: center; gap: var(--space-3); min-width: 0; max-width: 100%; }
.file-pick--compact .file-pick__btn { flex-shrink: 0; }
.file-pick--compact .dropzone__hint { text-align: left; margin: 0; font-size: 0.75rem; }
.file-pick--compact .file-pick__name {
  min-width: 0; font-size: 0.8125rem; color: var(--color-text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-pick--compact .file-pick__input:focus-visible + .file-pick__row .file-pick__btn {
  outline: 2px solid var(--color-primary); outline-offset: 2px;
}

.wm-card--pane .wm-card__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.wm-card--pane .wm-card__head .job-status { align-items: flex-start; min-width: 0; width: 100%; }
.wm-card--pane .wm-card__head .job-status .progress { width: 100%; }
@container (min-width: 600px) {
  .wm-card--pane .wm-card__grid { grid-template-columns: minmax(0, 1fr) 17rem; }
}

/* ---------- Quick summary pop-up (owner 2026-11-17, design option A) ----------
   A "Summary" button in the app bar's end slot (production accounts / admins,
   Shoot days and the day view) opens an anchored panel: total + split bar,
   Excluded · Killed · Unkilled · Approved · Approved selects, the selects
   breakdown, then the cast table. The panel never outgrows the window: the
   figures stay put and only the cast list scrolls (sticky headings). Phones:
   a bottom sheet over a scrim. Colours reuse .split-bar / .t-* status tokens. */
.quick-summary { position: relative; display: inline-flex; }
.quick-summary__toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: var(--radius-md); border: 1px solid var(--color-gray-600); background: var(--color-gray-800);
  color: #fff; font: 600 0.875rem/1 var(--font-sans, Inter, system-ui, sans-serif); cursor: pointer;
}
.quick-summary__toggle:hover { background: var(--color-gray-700); }
.quick-summary__toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.quick-summary__toggle[aria-expanded="true"] { background: var(--color-gray-700); border-color: var(--color-gray-400); }
.quick-summary__chevron { transition: transform 150ms ease; }
.quick-summary__toggle[aria-expanded="true"] .quick-summary__chevron { transform: rotate(180deg); }
.quick-summary__scrim { display: none; }
.quick-summary__panel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 70; width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); display: flex; flex-direction: column;
  background: var(--color-surface, #fff); color: var(--color-gray-900); border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg), var(--shadow-xl); overflow: hidden; text-align: left;
}
.quick-summary__panel:focus { outline: none; }
.quick-summary__head { padding: 16px 18px 12px; border-bottom: 1px solid var(--color-gray-100); flex: none; }
.quick-summary__head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quick-summary__name { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-gray-500); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-summary__full { font-size: 0.8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.quick-summary__total { margin: 6px 0 10px; font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.quick-summary__total span { font-size: 0.875rem; font-weight: 500; color: var(--color-gray-600); }
.quick-summary__panel .split-bar { height: 8px; margin: 0; gap: 2px; }
.quick-summary__figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; padding: 4px 18px 10px; flex: none; }
.quick-summary__list { margin: 0; }
.quick-summary__row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--color-gray-100); }
.quick-summary__row dt { flex: 1; font-size: 0.875rem; color: var(--color-gray-700); }
.quick-summary__row dd { margin: 0; font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.quick-summary__row .quick-summary__pct { width: 36px; text-align: right; font-size: 0.75rem; font-weight: 400; color: var(--color-gray-500); }
.quick-summary__swatch { width: 10px; height: 10px; border-radius: var(--radius-full); flex: none; }
.quick-summary__swatch.status-excluded { background: var(--color-gray-700); }
.quick-summary__swatch.status-killed { background: var(--color-error); }
.quick-summary__swatch.status-unkilled { box-shadow: inset 0 0 0 2px #2563EB; }
.quick-summary__swatch.status-approved { background: #064E3B; }
.quick-summary__selects { align-self: start; margin-top: 7px; border-radius: var(--radius-md); background: var(--color-select-tint); color: var(--color-select-ink); padding: 10px 12px; }
.quick-summary__selects-title { margin: 0 0 6px; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.quick-summary__selects dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.quick-summary__selects dt { font-size: 0.6875rem; }
.quick-summary__selects dd { margin: 0; font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.quick-summary__cast { background: var(--color-gray-50); border-top: 1px solid var(--color-gray-200); display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.quick-summary__cast-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px 6px; flex: none; }
.quick-summary__cast-title { margin: 0; font-size: 0.8125rem; font-weight: 700; }
.quick-summary__cast-title span { font-weight: 500; color: var(--color-gray-500); }
.quick-summary__find { margin-left: auto; width: 200px; }
.quick-summary__find input { width: 100%; height: 32px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--color-gray-300); border-radius: var(--radius-md); font: inherit; font-size: 0.8125rem; background: #fff; }
.quick-summary__find input:focus { outline: none; border-color: var(--color-brand-500, #c00000); box-shadow: var(--shadow-focus); }
.quick-summary__scroll { padding: 0 18px 12px; overflow: auto; min-height: 120px; flex: 1 1 auto; }
.quick-summary__table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.quick-summary__table thead th { position: sticky; top: 0; z-index: 1; background: var(--color-gray-50); padding: 6px 0; text-align: right; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-gray-500); white-space: nowrap; }
.quick-summary__table thead th:first-child { text-align: left; }
.quick-summary__table thead th + th { padding-left: 10px; }
.quick-summary__row > .select-star { width: 10px; flex: none; display: inline-flex; justify-content: center; font-size: 0.75rem; line-height: 1; }
.quick-summary__sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; border-radius: 4px; }
.quick-summary__sort:focus-visible { outline: 2px solid var(--color-brand-500, #c00000); outline-offset: 2px; }
.quick-summary__sort[data-active="true"] { color: var(--color-gray-900); }
.quick-summary__table tbody tr { border-top: 1px solid var(--color-gray-200); }
.quick-summary__table tbody th { text-align: left; padding: 7px 8px 7px 0; font-weight: 500; color: var(--color-gray-900); }
.quick-summary__table td { text-align: right; padding: 7px 0 7px 10px; }
.quick-summary__table .quick-summary__appears { font-weight: 700; }
.quick-summary__viewed--done { color: var(--color-success-ink, #047857); font-weight: 600; }
.quick-summary__viewed--low { color: var(--color-warning); font-weight: 600; }
.quick-summary__empty { margin: 0; padding: 12px 0; font-size: 0.8125rem; color: var(--color-gray-600); }
.quick-summary__state { padding: 24px 18px; }
@media (max-width: 639px) {
  .quick-summary__toggle-word { display: none; }
  .quick-summary__toggle { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .quick-summary__toggle .quick-summary__chevron { display: none; }
  .quick-summary__scrim { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(17, 24, 39, 0.45); }
  .quick-summary__panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 85vh; max-height: 85dvh; border-radius: 18px 18px 0 0; }
  .quick-summary__figures { grid-template-columns: minmax(0, 1fr); }
  .quick-summary__find { width: 140px; }
  .quick-summary__scroll { padding: 0 12px 12px; }
  .quick-summary__table { font-size: 0.75rem; }
  .quick-summary__table thead th { font-size: 0.625rem; letter-spacing: 0; }
  .quick-summary__table thead th + th { padding-left: 6px; }
  .quick-summary__table td { padding-left: 6px; }
}
@media (prefers-reduced-motion: reduce) { .quick-summary__chevron { transition: none; } }

/* ---------- Single image: actors in this image (owner 2026-11-17, idea 2) ----------
   Under the drawer's Image summary, a light card set apart from the image data:
   "Actors in this image", an ⓘ (.tooltip) and one line saying the counts are each
   actor's images still unkilled or approved, across all their images — then a
   table (This folder · All folders, the .lightbox__summary type) of the actors
   tagged on this image. About the actors, not this one image, hence the card. */
.lightbox__actors { margin-top: var(--space-4); padding: 14px; border-radius: var(--radius-md); background: rgba(147, 197, 253, 0.08); border: 1px solid rgba(147, 197, 253, 0.25); display: flex; flex-direction: column; gap: 4px; }
.lightbox__actors-head { display: flex; align-items: center; gap: 8px; }
.lightbox__actors-title { margin: 0; flex: 1; font-size: 0.875rem; font-weight: 700; color: #fff; }
.lightbox__actors-lede { margin: 0 0 8px; font-size: 0.75rem; line-height: 1.45; color: #BFDBFE; }
.lightbox__info { width: 22px; height: 22px; border-radius: var(--radius-full); border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: help; }
.lightbox__info:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Owner 2026-11-18: a smaller ⓘ inside a table heading (Image summary "Live
   images"); its bubble opens to the right of the icon so it never clips. */
.lightbox__info--sm { width: 18px; height: 18px; margin-left: 6px; vertical-align: middle; }
.lightbox__summary .tooltip__bubble { width: 220px; white-space: normal; text-align: left; left: 0; transform: none; text-transform: none; letter-spacing: normal; font-weight: 500; }
.lightbox__actors .tooltip__bubble { width: 260px; white-space: normal; text-align: left; left: auto; right: 0; transform: none; }
.lightbox__actors .lightbox__summary tbody th { color: #fff; font-weight: 500; }
.lightbox__actors .lightbox__summary tbody td:last-child { color: #fff; font-weight: 600; }
.lightbox__actors .lightbox__summary tbody tr + tr { border-top-color: rgba(255, 255, 255, 0.1); }

/* ==========================================================================
   JPG download layout (owner 2026-11-18) — `.zip-layout`
   The "Download JPG images" window: ready-made layout cards (`.layout-card`,
   a real radio in each), a Custom section of ordered splits (`.layout-split`)
   and a live folder preview (`.folder-tree`). Picker left, preview right;
   stacked on narrow screens. `.modal--xl` gives it room.
   ========================================================================== */
.modal--xl { max-width: 980px; width: calc(100vw - 2rem); }
.zip-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
@media (max-width: 860px) { .zip-layout { grid-template-columns: minmax(0, 1fr); } }
.zip-layout__picker { display: grid; gap: var(--space-3); min-width: 0; }
.zip-layout__eyebrow { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-tertiary); margin: 0; }
.zip-layout__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 480px) { .zip-layout__cards { grid-template-columns: minmax(0, 1fr); } }
.zip-layout__remember { font-size: 0.8125rem; color: var(--color-text-secondary); display: inline-flex; gap: var(--space-2); align-items: center; }
.zip-layout__remember input { accent-color: var(--color-primary); }

.layout-card { position: relative; display: grid; gap: var(--space-1); align-content: start; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); cursor: pointer; transition: border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease); }
.layout-card input { position: absolute; opacity: 0; pointer-events: none; }
.layout-card:hover { border-color: var(--color-gray-400); }
.layout-card:has(input:checked) { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); background: var(--color-brand-50); }
.layout-card:has(input:focus-visible) { box-shadow: var(--shadow-focus); }
.layout-card--wide { grid-column: 1 / -1; }
.layout-card__title { font-weight: 600; font-size: 0.875rem; color: var(--color-text); }
.layout-card__hint { font-size: 0.75rem; color: var(--color-text-secondary); }
.layout-card__mini { font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.5; color: var(--color-text-secondary); white-space: pre; overflow: hidden; margin: 0; }

.zip-layout__custom { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-primary); border-radius: var(--radius-lg); background: var(--color-surface); }
.zip-layout__hint { font-size: 0.75rem; color: var(--color-text-secondary); margin: 0; }
.layout-split { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-2) var(--space-3); align-items: center; padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.layout-split.is-on { border-color: var(--color-primary); background: var(--color-brand-50); }
.layout-split__n { width: 22px; height: 22px; border-radius: var(--radius-full); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; background: var(--color-surface-sunken); color: var(--color-text-tertiary); border: 1px solid var(--color-border); }
.layout-split.is-on .layout-split__n { background: var(--color-primary); color: var(--color-text-inverse); border-color: var(--color-primary); }
.layout-split__hint { display: block; font-size: 0.75rem; color: var(--color-text-secondary); font-weight: 400; }
.layout-split__moves { display: flex; gap: var(--space-1); }
.layout-split__modes { grid-column: 2 / -1; display: grid; gap: var(--space-2); border: 0; padding: 0; margin: 0; min-width: 0; }
.layout-mode { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); align-items: start; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); font-size: 0.8125rem; color: var(--color-text-secondary); cursor: pointer; }
.layout-mode:has(input:checked) { border-color: var(--color-primary); }
.layout-mode input { margin-top: 3px; accent-color: var(--color-primary); }
.layout-mode strong { display: block; color: var(--color-text); }

.folder-tree { display: grid; gap: var(--space-3); min-width: 0; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-sunken); }
.folder-tree__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.folder-tree__title { font-size: 0.9375rem; font-weight: 600; margin: 0; }
.folder-tree__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.folder-tree__stat { padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.folder-tree__stat dd { margin: 0; font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text); }
.folder-tree__stat dt { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-tertiary); }
/* The preview is drawn as a file-explorer window (owner 2026-11-18): a title
   bar with the ZIP's name, a path bar with Open all / Close all, Name · Photos
   column heads, folder rows (chevron, folder glyph that opens, name, count on
   the right), guide lines down each level, and a status bar. Generic chrome —
   neither Finder nor Explorer — in the design-language tokens. */
.folder-window { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); overflow: hidden; box-shadow: var(--shadow-sm); min-width: 0; }
.folder-window__bar { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--color-surface-sunken); border-bottom: 1px solid var(--color-border); min-width: 0; }
.folder-window__dots { display: inline-flex; gap: 6px; flex: none; }
.folder-window__dots span { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--color-gray-300); }
.folder-window__title { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; font-size: 0.8125rem; font-weight: 600; color: var(--color-text); }
.folder-window__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-window__title svg { flex: none; color: var(--color-text-secondary); }
.folder-window__toolbar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.folder-window__path { display: inline-flex; align-items: center; gap: var(--space-1); flex: 1 1 12rem; min-width: 0; padding: 4px var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-sunken); font-size: 0.75rem; color: var(--color-text-secondary); }
.folder-window__path span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-window__path svg { flex: none; }
.folder-window__cols { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 6px var(--space-3); border-bottom: 1px solid var(--color-border); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-tertiary); }
.folder-window__body { max-height: 400px; overflow: auto; padding: var(--space-1) var(--space-2); }
.folder-window__status { padding: 6px var(--space-3); border-top: 1px solid var(--color-border); background: var(--color-surface-sunken); font-size: 0.75rem; color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.folder-window__children { margin-left: 13px; padding-left: 6px; border-left: 1px solid var(--color-border); }
.folder-tree summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 14px 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 3px var(--space-2); border-radius: var(--radius-sm); font-size: 0.8125rem; color: var(--color-text); }
.folder-tree summary::-webkit-details-marker { display: none; }
.folder-tree summary:hover { background: var(--color-surface-sunken); }
.folder-tree summary:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.folder-tree__chevron { color: var(--color-text-tertiary); transition: transform var(--duration-fast) var(--ease); }
.folder-tree details[open] > summary .folder-tree__chevron { transform: rotate(90deg); }
.folder-tree__icon { color: var(--color-cat-amber-500); }
.folder-tree__icon--open { display: none; }
.folder-tree details[open] > summary .folder-tree__icon--open { display: block; }
.folder-tree details[open] > summary .folder-tree__icon--shut { display: none; }
.folder-tree__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tree__count { color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; font-size: 0.75rem; }
.folder-tree__files { display: grid; grid-template-columns: 14px 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; margin: 0; padding: 3px var(--space-2); font-size: 0.8125rem; color: var(--color-text-secondary); }
.folder-tree__files svg { color: var(--color-text-tertiary); }
.folder-tree__note { margin: 0; font-size: 0.8125rem; color: var(--color-text-secondary); }
@media (prefers-reduced-motion: reduce) { .folder-tree__chevron, .layout-card { transition: none; } }

/* Welcome window (owner 2026-11-19). The once-per-person window over the
   talent app's Image folders page: logo, personal heading, one card per
   place ("You're here" in brand red, the other a quiet outline), short
   pill list of what you do there, an optional info note, help link + one
   primary button. A `.modal` with `.modal--welcome`; never dismissed by the
   backdrop. */
.modal--welcome { max-width: 640px; }
.welcome__top {
  position: relative;
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  display: grid;
  gap: var(--space-2);
}
.welcome__top .modal__close { position: absolute; top: var(--space-3); right: var(--space-3); }
.welcome__logo { display: block; width: 120px; height: auto; }
.welcome__title { margin: 0; padding-right: var(--space-8); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.welcome__sub { margin: 0; color: var(--color-text-secondary); }
.welcome__body {
  padding: var(--space-4) var(--space-6) var(--space-2);
  display: grid;
  gap: var(--space-3);
  overflow-y: auto;
}
.welcome-place {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.welcome-place--here { border-color: var(--color-primary); background: var(--color-brand-50); }
.welcome-place__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
}
.welcome-place--here .welcome-place__icon { border-color: var(--color-brand-200); color: var(--color-primary); }
.welcome-place__icon svg { width: 20px; height: 20px; }
.welcome-place__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: 2px; }
.welcome-place__name { margin: 0; font-size: 1rem; font-weight: 700; }
.welcome-place__tag {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--color-info-bg); color: var(--color-info);
}
.welcome-place--here .welcome-place__tag { background: var(--color-primary); color: #fff; }
.welcome-place__text { margin: 0; color: var(--color-text-secondary); font-size: 0.875rem; }
.welcome-place__text + .welcome-place__text { margin-top: var(--space-3); }
.welcome-place__do { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.welcome-place__do li {
  font-size: 0.78125rem; font-weight: 600;
  padding: 3px 10px; border-radius: var(--radius-full);
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text);
}
.welcome-place__link { display: inline-block; margin-top: var(--space-2); font-weight: 700; font-size: 0.875rem; color: var(--color-primary); text-decoration: none; }
.welcome-place__link:hover { text-decoration: underline; }
.welcome__footer {
  padding: var(--space-4) var(--space-6) var(--space-5);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4);
}
.welcome__help { margin-right: auto; font-size: 0.8125rem; color: var(--color-text-tertiary); }
.welcome__help a { color: var(--color-text-secondary); font-weight: 600; }
@media (max-width: 640px) {
  .welcome__top, .welcome__body, .welcome__footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .welcome__footer .btn { flex: 1 1 auto; }
}

/* ---------- Quick summary, owner 2026-11-25 (design canvas: Phone D, Desktop C) ----------
   Figures as two lists — Images (status rows) and ★ Selects (All / Unkilled /
   Approved rows) — side by side on a desktop; on a phone the Images list alone
   and the Selects as ONE slim yellow strip ("★ Selects  1 all · 1 unkilled ·
   0 approved"). */
.quick-summary__list-title, .quick-summary__panel .quick-summary__selects-title {
  margin: 0 0 2px; display: flex; align-items: center; gap: 6px;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-gray-500);
}
.quick-summary__panel .quick-summary__selects { margin: 0; padding: 0; border-radius: 0; background: none; color: inherit; align-self: start; }
.quick-summary__panel .quick-summary__selects dl { display: block; }
.quick-summary__panel .quick-summary__selects dl > div { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--color-gray-100); }
.quick-summary__panel .quick-summary__selects dl > div::before { content: "★"; content: "★" / ""; width: 10px; flex: none; text-align: center; font-size: 0.75rem; color: var(--color-select-star, #D97706); }
.quick-summary__panel .quick-summary__selects dt { flex: 1; font-size: 0.875rem; color: var(--color-gray-700); }
.quick-summary__panel .quick-summary__selects dd { margin: 0; font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Desktop C: the pop-up widens to 720 px so every figure column is the same width,
   centred under its heading, and "Kills used" stays one line per bucket. The
   Days switch sits in the table's first row, right-aligned over the columns it
   changes (Unkilled · Approved · ★ Selects); a 1 px divider sets Kills used
   apart — it never follows the switch. */
@media (min-width: 640px) { .quick-summary .quick-summary__panel { width: min(760px, calc(100vw - 32px)); } }
.quick-summary__table { table-layout: fixed; }
.quick-summary__col-name { width: 18%; }
.quick-summary__col-fig { width: 10%; }
.quick-summary__col-allow { width: 22%; }
/* Owner 2026-11-25: breathing room before the Kills used divider. */
.quick-summary__table .quick-summary__last-fig { padding-right: 18px; }
/* The Selects heading's tooltip ("the total of all unkilled and approved selects"):
   opens BELOW the heading, so the scroll area never clips it at the top. */
.quick-summary__tip .tooltip__bubble { bottom: auto; top: calc(100% + 8px); max-width: 220px; }
.quick-summary__tip .tooltip__bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--color-gray-900); }
/* Owner 2026-11-26: the "Kills used" ⓘ (released-days productions only) — the last
   column, so the bubble is anchored to the icon's right edge and the arrow follows. */
.quick-summary__allow-info { width: 16px; height: 16px; margin-left: 4px; vertical-align: -3px; }
.quick-summary__tip--end .tooltip__bubble { left: auto; right: -6px; transform: none; font-weight: 400; }
.quick-summary__tip--end .tooltip__bubble::after { left: auto; right: 10px; transform: none; }
.quick-summary__table thead th { text-align: center; }
.quick-summary__table thead th + th { padding-left: 2px; padding-right: 2px; }
.quick-summary__table thead th:first-child { text-align: left; }
.quick-summary__table td { text-align: center; padding-left: 4px; padding-right: 4px; }
.quick-summary__table .quick-summary__allow-col { text-align: left; padding-left: 14px; border-left: 1px solid var(--color-gray-200); }
.quick-summary__table thead .quick-summary__table-head > td { padding: 0 0 8px; border: 0; vertical-align: middle; }
.quick-summary__table-head .quick-summary__cast-head { padding: 0; }
/* Owner 2026-11-25: no "Cast · N" heading over the desktop table; room above the
   table instead, so it never crowds the figures' divider. */
.quick-summary__cast--table > .quick-summary__scroll { padding-top: 16px; }
.quick-summary__table-head .quick-summary__days-cell { text-align: left; }
.quick-summary__table-head .quick-summary__allow-col { padding-left: 14px; }
.quick-summary__days-cell .view-toggle { height: 28px; }
.quick-summary__days-cell .view-toggle__btn { font-size: 0.75rem; padding: 0 0.625rem; }
.quick-summary__scope { display: block; margin-top: 2px; font-size: 0.71875rem; font-weight: 400; color: var(--color-gray-500); }
.quick-summary__allow { display: flex; flex-direction: column; gap: 4px; }
.quick-summary__allow-line { display: grid; grid-template-columns: 40px minmax(32px, 1fr) auto; align-items: center; gap: 8px; font-size: 0.75rem; white-space: nowrap; color: var(--color-gray-600); }
.quick-summary__allow-fig b { font-weight: 700; color: var(--color-gray-900); }
.quick-summary__allow-line.is-high .quick-summary__allow-fig, .quick-summary__allow-line.is-high b { color: var(--color-error); }
.quick-summary__muted { color: var(--color-gray-500); }

/* The withdrawn-folder notice (owner 2026-11-25), only in Released days and only
   when some actor has one: a dashed grey "1 withdrawn" tag after their scope line
   (a `.tooltip` names the folders), and one line for the cast. Information, never
   a warning: grey, not amber. */
.cast-withdrawn { margin-left: 6px; vertical-align: baseline; }
.cast-withdrawn__tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; height: 18px; border-radius: 999px;
  border: 1px dashed var(--color-gray-400, #9CA3AF); background: var(--color-gray-100); color: var(--color-gray-700);
  font: 600 0.6875rem/1 var(--font-sans, Inter, system-ui, sans-serif); cursor: help;
}
.cast-withdrawn__tag:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.cast-withdrawn .tooltip__bubble { left: 0; transform: none; width: 260px; max-width: 260px; font-weight: 400; }
/* Anchored to the tag's left edge (the tag sits near the left of a card or the name
   column, where a centred bubble would be cut off); the arrow follows. */
.cast-withdrawn .tooltip__bubble::after { left: 16px; transform: none; }

/* Phone D: the cast as one card per actor, A–Z. The Days switch on its own row,
   full width and 36 px (lighter than the 44 px touch default, beside 13 px text),
   with room under it; each card — name, then images · viewed; in Released days
   the scope line (+ withdrawn tag); Kills · Unkilled · Approved · ★ Selects as four
   equal boxes (Selects: unkilled + approved, "N approved" under it); then the
   kills used, one line per bucket. */
.quick-summary__cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quick-summary__days { margin: 2px 0 14px; }
/* Owner 2026-11-26: on a phone (no headings, so no Kills used ⓘ) the note is a line under the switch. */
.quick-summary__allow-note { margin: -6px 0 12px; font-size: 0.75rem; color: var(--color-text-tertiary); }
.quick-summary__days .cast-days, .quick-summary__days .view-toggle { display: grid; width: 100%; }
.quick-summary__days .view-toggle { height: auto; }
.quick-summary__days .view-toggle__btn { min-height: 36px; font-size: 0.8125rem; }
.qs-actor { background: #fff; border: 1px solid var(--color-gray-200); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.qs-actor__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.qs-actor__name { margin: 0; font-size: 0.9375rem; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.qs-actor__meta { font-size: 0.8125rem; color: var(--color-gray-600); white-space: nowrap; }
.qs-actor__meta b { color: var(--color-gray-900); font-variant-numeric: tabular-nums; }
.qs-actor__meta b.quick-summary__viewed--low, .qs-actor__meta b.quick-summary__viewed--done { color: inherit; }
.qs-actor__meta b.quick-summary__viewed--low { color: var(--color-warning); }
.qs-actor__meta b.quick-summary__viewed--done { color: var(--color-success-ink, #047857); }
.qs-actor__scope { margin: -6px 0 0; font-size: 0.75rem; color: var(--color-gray-500); }
.qs-actor__figs { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; text-align: center; }
.qs-actor__figs > div { background: var(--color-gray-50); border-radius: 6px; padding: 6px 2px; }
.qs-actor__figs dt { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-gray-500); white-space: nowrap; }
.qs-actor__figs dd { margin: 2px 0 0; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.qs-actor__sub { display: block; margin-top: 1px; font-size: 0.65625rem; font-weight: 500; color: var(--color-gray-500); }
.qs-actor__allow { border-top: 1px solid var(--color-gray-100); padding-top: 8px; }
.qs-actor__allow .quick-summary__allow-line { grid-template-columns: 44px 1fr auto; gap: 10px; }

@media (max-width: 639px) {
  .quick-summary__list-title { display: none; }
  .quick-summary__panel .quick-summary__selects {
    display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-md);
    background: var(--color-select-tint); color: var(--color-select-ink);
  }
  .quick-summary__panel .quick-summary__selects-title { margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: inherit; }
  .quick-summary__panel .quick-summary__selects dl { display: flex; gap: 14px; margin-left: auto; }
  .quick-summary__panel .quick-summary__selects dl > div { flex-direction: row-reverse; gap: 4px; padding: 0; border: 0; align-items: baseline; }
  .quick-summary__panel .quick-summary__selects dl > div::before { content: none; }
  .quick-summary__panel .quick-summary__selects dt { flex: none; font-size: 0.8125rem; color: inherit; text-transform: lowercase; }
  .quick-summary__panel .quick-summary__selects dd { font-size: 0.9375rem; font-weight: 700; }

  /* The Summary button joins the page title's row, on the right (owner
     2026-11-25), instead of a strip of its own above it — only when a title
     row follows (never over a loading skeleton). The title keeps room for it. */
  .app-bar-strip:has(> .quick-summary):has(~ .page-head) { position: relative; height: 0; padding: 0; z-index: 3; }
  .app-bar-strip:has(> .quick-summary):has(~ .page-head) > .quick-summary { position: absolute; top: var(--space-3); right: var(--space-4); }
  .app-bar-strip:has(> .quick-summary) ~ .page-head .page-head__title-row { padding-right: 56px; min-height: 44px; box-sizing: content-box; }
}

/* Owner 2026-11-25: on a phone the All days · Released days switch stays in view
   while the cast scrolls. Production summary page: the Cast head (heading, switch,
   Cards / Table) sticks under the 57 px app bar for as long as the cast
   (`.summary-cast`) is on screen. Quick summary pop-up: the whole sheet scrolls as
   one (so two full actor cards fit under the switch) and the switch sticks to its
   top. Desktop is unchanged. */
.summary-cast { display: flex; flex-direction: column; gap: var(--space-4); }
@media (max-width: 639px) {
  .summary-cast > .cast-head {
    position: sticky; top: 57px; z-index: 20; margin-bottom: 0;
    padding-block: var(--space-2); background: var(--color-bg);
    box-shadow: 0 0 0 100vmax var(--color-bg); clip-path: inset(0 -100vmax);
  }
  .quick-summary__panel { overflow-y: auto; overscroll-behavior: contain; }
  .quick-summary__panel > .quick-summary__cast { flex: none; min-height: auto; }
  .quick-summary__cast .quick-summary__scroll { overflow: visible; min-height: 0; }
  .quick-summary__scroll > .quick-summary__days {
    position: sticky; top: 0; z-index: 2; margin: 0 0 12px; padding: 8px 0;
    background: var(--color-gray-50);
    box-shadow: 0 0 0 12px var(--color-gray-50); clip-path: inset(0 -12px);
  }
}

/* Owner 2026-11-25: the cast table's phone cards (`.cast-table.table--reflow`)
   breathe more — 20 px between sections, extra room around the
   Killed · Unkilled · Approved bar — and Viewed and Complete each read on one line:
   the label, then the bar and its % (or the folders pill) beside it. */
@media (max-width: 639px) {
  .table.table--reflow.cast-table > tbody > tr.cast-table__row { row-gap: var(--space-5); }
  .table.table--reflow.cast-table > tbody > tr > td.cast-table__decisions { padding-block: var(--space-1); }
  .table.table--reflow.cast-table > tbody > tr > td.cast-table__viewed,
  .table.table--reflow.cast-table > tbody > tr > td.cast-table__complete {
    display: flex; align-items: center; gap: var(--space-3); min-width: 0;
  }
  .table.table--reflow.cast-table > tbody > tr > td.cast-table__viewed::before,
  .table.table--reflow.cast-table > tbody > tr > td.cast-table__complete::before { margin-bottom: 0; flex: none; }
  .cast-table__viewed > .summary-table__progress-in { flex: 1 1 auto; min-width: 0; }
}
