/* La passe: episodes are tickets moving along the kitchen rail, station by station.
   Porcelain and steel for the surfaces, cobalt enamel for navigation, Dijon mustard for "now". */
:root {
  --porcelain: #f6f7f9; --steel: #e3e7ec; --steel-2: #eef1f4; --paper: #fff;
  --line: #d3d9e1; --line-soft: #e7ebf0; --rail: #aeb7c3;
  --ink: #17213d; --ink-2: #4a5470; --ink-3: #7c849b;
  --cobalt: #1d3a8a; --cobalt-deep: #142b6b; --cobalt-soft: #e5eaf7;
  --mustard: #e3a21a; --mustard-soft: #fcf1d3; --mustard-ink: #6e4b00;
  --tomato: #c8372d; --tomato-soft: #fbe4e1;
  --parsley: #2f7a4c; --parsley-soft: #e1f0e6;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-panel: 12px; --r-ctl: 8px; --r-ticket: 3px;
  --hang: 0 1px 0 var(--line), 0 8px 14px -10px rgb(23 33 61 / .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --porcelain: #0f1730; --steel: #1a2443; --steel-2: #151f3b; --paper: #1d2848;
    --line: #2d3a61; --line-soft: #243055; --rail: #4a5a86;
    --ink: #e9edf8; --ink-2: #b4bdd6; --ink-3: #8590b0;
    --cobalt: #8fa8f0; --cobalt-deep: #0a1228; --cobalt-soft: #26346a;
    --mustard: #f0b43c; --mustard-soft: #3d3112; --mustard-ink: #f6cf7c;
    --tomato: #f0796e; --tomato-soft: #45211f;
    --parsley: #74c795; --parsley-soft: #1e3a2b;
    --hang: 0 1px 0 var(--line), 0 8px 16px -10px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--porcelain); color: var(--ink); font: 15px/1.5 var(--sans); font-feature-settings: "tnum" 0; }
a { color: var(--cobalt); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; color: var(--ink); }
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 .35rem; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 .7rem; }
h3 { font-size: 1.05rem; margin: 1.1rem 0 .45rem; }
p { margin: .45rem 0; }
small, .small { font-size: .84rem; }
.muted { color: var(--ink-3); }
.num, td.num, th.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--mustard); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- shell: cobalt enamel sidebar, bottom tabs on phones ---------- */
.shell { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--cobalt-deep); color: #fff; display: flex; flex-direction: column; padding: 1.2rem .8rem 1rem;
  position: sticky; top: 0; height: 100vh; }
@media (prefers-color-scheme: light) { .side { background: var(--cobalt); } }
.wordmark { font-family: var(--serif); font-size: 1.32rem; line-height: 1.1; color: #fff; text-decoration: none; padding: 0 .55rem;
  display: block; margin-bottom: 1.6rem; }
.wordmark span { display: block; font-family: var(--sans); font-size: .78rem; color: rgb(255 255 255 / .65); margin-top: .3rem; }
.nav { display: grid; gap: .15rem; }
.nav a { display: flex; gap: .7rem; align-items: center; color: rgb(255 255 255 / .82); text-decoration: none; padding: .5rem .6rem;
  border-radius: var(--r-ctl); font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.nav a.on { background: rgb(255 255 255 / .12); color: #fff; box-shadow: inset 3px 0 0 var(--mustard); }
.side .me { margin-top: auto; display: flex; gap: .55rem; align-items: center; padding: .6rem .55rem 0; border-top: 1px solid rgb(255 255 255 / .15); font-size: .88rem; }
.side .me .avatar { background: var(--mustard); color: #1a1300; }
.side .me form { margin: 0 0 0 auto; }
.side .me button { background: none; border: 0; color: rgb(255 255 255 / .75); padding: .2rem; min-height: 0; text-decoration: underline; font-size: .82rem; }
.content { padding: 1.6rem 2rem 3rem; max-width: 1320px; width: 100%; }
.content.wide { max-width: none; }
.mobile-top, .tabbar { display: none; }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; background: var(--cobalt);
    color: #fff; position: sticky; top: 0; z-index: 20; }
  .mobile-top .wordmark { margin: 0; padding: 0; font-size: 1.1rem; }
  .mobile-top form { margin: 0; } .mobile-top button { background: none; border: 0; color: #fff; text-decoration: underline; min-height: 0; padding: 0; font-size: .82rem; }
  .tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: .1rem; padding: .45rem 0 .4rem; font-size: .66rem; color: var(--ink-3); text-decoration: none; }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a.on { color: var(--cobalt); font-weight: 600; }
  .content { padding: 1rem 1rem 5.5rem; }
  h1 { font-size: 1.6rem; }
}

/* ---------- layout helpers ---------- */
.page-head { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head p { margin: 0; color: var(--ink-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.5rem; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1080px) {
  .cols, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .cols > aside.stage-first { order: -1; }  /* on small screens the stage ticket comes before the tabs */
}
@media (max-width: 700px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 9rem; }
.row > .shrink { flex: 0 0 auto; }
.stack > * + * { margin-top: 1rem; }
.sticky { position: sticky; top: 1.2rem; }
.meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; color: var(--ink-3); font-size: .84rem; }

/* ---------- surfaces ---------- */
.card, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 1.1rem 1.2rem; }
.card > h2:first-child, .panel > h2:first-child, .card > h3:first-child { margin-top: 0; }
.well { background: var(--steel-2); border-radius: var(--r-ctl); padding: .8rem .9rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.section-title h2 { margin-bottom: .5rem; }
.count { font-family: var(--sans); font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: .5rem .65rem; width: 100%; min-height: 2.5rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
input[type=checkbox] { width: 1rem; height: 1rem; min-height: 0; accent-color: var(--cobalt); }
input[type=file] { padding: .35rem; font-size: .88rem; }
textarea { field-sizing: content; min-height: 5rem; resize: vertical; line-height: 1.55; }
textarea.tall { min-height: 26rem; font-size: 1rem; line-height: 1.65; max-width: 72ch; }
textarea.short { min-height: 2.6rem; }
label { display: block; font-size: .84rem; font-weight: 500; color: var(--ink-2); margin: .8rem 0 .3rem; }
label.inline { display: inline-flex; gap: .45rem; align-items: center; margin: 0; color: var(--ink); font-weight: 400; font-size: .92rem; }
button, .button { background: var(--cobalt); color: #fff; border: 1px solid var(--cobalt); border-radius: var(--r-ctl);
  padding: .5rem .95rem; cursor: pointer; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center;
  justify-content: center; white-space: nowrap; min-height: 2.5rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { button, .button { color: #0f1730; } }
button:hover, .button:hover { filter: brightness(1.08); }
button.secondary, .button.secondary { background: var(--paper); color: var(--cobalt); border-color: var(--line); }
button.ghost, .button.ghost { background: transparent; color: var(--ink-2); border-color: transparent; font-weight: 500; }
button.ghost:hover { background: var(--steel-2); filter: none; }
button.danger, .button.danger { background: transparent; color: var(--tomato); border-color: transparent; font-weight: 500; }
button.danger:hover { background: var(--tomato-soft); filter: none; }
button.small, .button.small { padding: .2rem .6rem; min-height: 2rem; font-size: .84rem; }
button.block { width: 100%; }
button:disabled { opacity: .5; cursor: default; filter: none; }
form.inline { display: inline; margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; }

/* ---------- chips, people, banners ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 500; padding: .08rem .5rem; border-radius: 999px;
  background: var(--steel); color: var(--ink-2); white-space: nowrap; line-height: 1.55; text-decoration: none; }
.badge.accent { background: var(--mustard-soft); color: var(--mustard-ink); }
.badge.ok { background: var(--parsley-soft); color: var(--parsley); }
.badge.warn { background: var(--mustard-soft); color: var(--mustard-ink); }
.badge.err { background: var(--tomato-soft); color: var(--tomato); }
.badge.info { background: var(--cobalt-soft); color: var(--cobalt); }
.badge.code { font-weight: 700; letter-spacing: .02em; }
.avatar { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--cobalt-soft);
  color: var(--cobalt); font-size: .7rem; font-weight: 700; flex: none; }
.banner { padding: .8rem 1rem; border-radius: var(--r-ctl); margin: 0 0 1.2rem; border-left: 4px solid var(--line); background: var(--paper); }
.banner.warn { border-color: var(--mustard); background: var(--mustard-soft); }
.banner.err { border-color: var(--tomato); background: var(--tomato-soft); }
.banner.ok { border-color: var(--parsley); background: var(--parsley-soft); }
.banner.info { border-color: var(--cobalt); background: var(--cobalt-soft); }
.banner ul { margin: .35rem 0 .5rem; padding-left: 1.2rem; }

/* ---------- checkboxes (manual: a button; automatic: a dashed box the app ticks) ---------- */
ul.checks { list-style: none; padding: 0; margin: .2rem 0; }
ul.checks li { display: flex; gap: .65rem; align-items: flex-start; padding: .45rem 0; }
ul.checks li + li { border-top: 1px solid var(--line-soft); }
ul.checks .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
ul.checks li.done .label { color: var(--ink-3); }
ul.checks .hint { display: block; font-size: .8rem; color: var(--ink-3); }
ul.checks .auto { font-size: .74rem; color: var(--ink-3); white-space: nowrap; margin-left: auto; padding-top: .1rem; }
.box { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; border: 1.5px solid var(--ink-3); border-radius: 4px; background: var(--paper);
  display: inline-grid; place-items: center; padding: 0; min-height: 0; cursor: pointer; position: relative; }
button.box:hover { border-color: var(--cobalt); filter: none; }
.box.auto { border-style: dashed; cursor: default; }
li.done .box { background: var(--parsley); border-color: var(--parsley); border-style: solid; }
li.done .box::after { content: ""; width: .32rem; height: .6rem; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(0, -1px) rotate(45deg); }
button.remove { background: none; border: 0; color: var(--ink-3); padding: 0 .2rem; min-height: 0; font-weight: 400; font-size: 1.1rem; line-height: 1; }
button.remove:hover { color: var(--tomato); filter: none; }

/* ---------- the rail (board) and its tickets ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15.5rem, 1fr); gap: 1rem; overflow-x: auto; padding: 0 0 1rem;
  align-items: start; scroll-snap-type: x proximity; }
.column { scroll-snap-align: start; min-height: 10rem; }
.column > header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 .2rem .55rem; }
.column > header h2 { font-size: 1.1rem; margin: 0; }
.column .rail { height: 7px; border-radius: 4px; background: var(--rail); box-shadow: inset 0 2px 0 rgb(255 255 255 / .35); margin-bottom: .1rem; }
.column .cards { display: grid; gap: .7rem; padding: .6rem .35rem 1rem; min-height: 6rem; border-radius: 0 0 var(--r-panel) var(--r-panel);
  max-height: calc(100vh - 13rem); overflow-y: auto; }
.column.over .cards { background: var(--mustard-soft); }
.column.ideas .rail { background: none; border-top: 2px dashed var(--rail); height: 0; box-shadow: none; }
.tile { background: var(--paper); border-radius: var(--r-ticket); box-shadow: var(--hang); padding: .75rem .75rem .6rem; position: relative;
  cursor: grab; border-top: 3px solid transparent; }
.cards > .tile:first-child::before { content: ""; position: absolute; top: -.6rem; left: 50%; width: 2px; height: .6rem; background: var(--rail); }  /* clipped to the rail */
.column.ideas .tile::before { display: none; }
.tile.late { border-top-color: var(--tomato); }
.tile.dragging { opacity: .45; }
.tile .stub { display: flex; justify-content: space-between; gap: .5rem; font-size: .74rem; color: var(--ink-3); font-variant-numeric: tabular-nums;
  padding-bottom: .4rem; margin-bottom: .45rem; border-bottom: 1px dashed var(--line); }
.tile .stub .due.late { color: var(--tomato); font-weight: 600; }
.tile a.title { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; line-height: 1.35; display: block; overflow-wrap: anywhere; }
.tile a.title:hover { color: var(--cobalt); }
.tile .foot { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; margin-top: .55rem; }
.tile .foot .avatar { margin-left: auto; width: 1.45rem; height: 1.45rem; font-size: .62rem; }
.quick-add { display: flex; gap: .35rem; margin: 0 .35rem .3rem; }
.quick-add input { min-height: 2.2rem; }
.quick-add button { min-height: 2.2rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.filters > * { flex: 0 1 auto; width: auto; }
.filters input[name=q] { flex: 1 1 14rem; }
.segmented { display: inline-flex; background: var(--steel); border-radius: var(--r-ctl); padding: 3px; }
.segmented a { padding: .35rem .8rem; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .9rem; }
.segmented a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgb(23 33 61 / .12); }

/* ---------- station line (episode stage progress) ---------- */
.stations { display: flex; overflow-x: auto; margin: 1.1rem 0 1.6rem; padding: .2rem 0 .3rem; scrollbar-width: thin; }
.station { flex: 1 0 6.5rem; position: relative; padding-top: 1.35rem; font-size: .82rem; color: var(--ink-3); text-align: center; }
.station::before { content: ""; position: absolute; top: .5rem; left: 0; right: 0; height: 3px; background: var(--line); }
.station:first-child::before { left: 50%; } .station:last-child::before { right: 50%; }
.station::after { content: ""; position: absolute; top: .15rem; left: 50%; width: .8rem; height: .8rem; margin-left: -.4rem; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line); }
.station.done { color: var(--ink-2); }
.station.done::before { background: var(--parsley); }
.station.done::after { background: var(--parsley); border-color: var(--parsley); }
.station.now { color: var(--ink); font-weight: 700; }
.station.now::before { background: linear-gradient(90deg, var(--parsley) 50%, var(--line) 50%); }
.station:first-child.now::before { background: var(--line); }
.station.now::after { width: 1.15rem; height: 1.15rem; margin-left: -.575rem; top: -.02rem; background: var(--mustard); border-color: var(--mustard);
  box-shadow: 0 0 0 4px var(--mustard-soft); }
.station .due { display: block; font-weight: 400; font-size: .74rem; font-variant-numeric: tabular-nums; }
.station.late .due { color: var(--tomato); font-weight: 600; }

/* ---------- episode page ---------- */
.ep-head .kicker { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: .5rem; }
.ep-head .back { font-size: .86rem; color: var(--ink-3); text-decoration: none; }
.ep-head .back:hover { color: var(--cobalt); }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: .55rem .8rem; color: var(--ink-2); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent;
  margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--cobalt); font-weight: 600; }
.tabs a .count { margin-left: .25rem; }
.tabs a.stage-tab::after { content: ""; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--mustard); margin-left: .4rem; vertical-align: middle; }
.js .pane { display: none; }
.js .pane.on { display: block; }
.pane > .panel + .panel { margin-top: 1rem; }
.fiche { background: var(--paper); border-radius: var(--r-ticket); box-shadow: var(--hang); padding: 1.1rem 1.15rem 1rem; position: relative; }
.fiche::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: radial-gradient(circle at 6px -2px, transparent 5px, var(--mustard) 5.5px) 0 0 / 12px 6px repeat-x; }  /* torn ticket edge */
.fiche h2 { margin: .3rem 0 .2rem; font-size: 1.45rem; }
.fiche .when { font-size: .84rem; color: var(--ink-3); margin-bottom: .6rem; }
.fiche .when b.late { color: var(--tomato); }
.side-block { padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--paper); }
.side-block h3 { margin-top: 0; }
.ai-action { margin-bottom: .7rem; }
.ai-action p { margin: .25rem 0 0; font-size: .8rem; color: var(--ink-3); }
details.more > summary { cursor: pointer; font-size: .88rem; color: var(--ink-2); list-style: none; padding: .2rem 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; color: var(--ink-3); }
details.more[open] > summary::before { content: "− "; }

/* ---------- lists ---------- */
.list { list-style: none; padding: 0; margin: 0; }
.list > li { display: flex; gap: .75rem; align-items: center; padding: .65rem 0; flex-wrap: wrap; }
.list > li + li { border-top: 1px solid var(--line-soft); }
.list > li .grow { flex: 1 1 12rem; min-width: 0; }
.list > li a.title { font-weight: 600; text-decoration: none; color: var(--ink); }
.list > li a.title:hover { color: var(--cobalt); }
.list .sub { font-size: .84rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .1rem .7rem; margin-top: .1rem; }
.empty { color: var(--ink-3); font-size: .92rem; padding: .3rem 0; }

/* ---------- home ---------- */
.pipeline { display: flex; height: 2.2rem; border-radius: var(--r-ctl); overflow: hidden; margin: .2rem 0 .45rem; background: var(--steel); }
.pipeline a { display: grid; place-items: center; text-decoration: none; color: var(--ink); font-size: .78rem; font-weight: 600; min-width: 1.6rem;
  border-right: 2px solid var(--porcelain); font-variant-numeric: tabular-nums; }
.pipeline a:last-child { border-right: 0; }
.pipeline-legend { display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .8rem; color: var(--ink-3); margin-bottom: 1.6rem; }
.pipeline-legend i { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; margin-right: .35rem; vertical-align: baseline; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
td.num, th.num { text-align: right; }
.table-wrap { overflow-x: auto; }
.bar { height: .5rem; background: var(--cobalt); border-radius: 3px; min-width: 2px; }

/* ---------- calendar ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.calendar .head { font-size: .8rem; color: var(--ink-3); font-weight: 600; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.calendar .day { min-height: 7rem; padding: .4rem .45rem; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); font-size: .78rem; }
.calendar .day:nth-child(7n) { border-right: 0; }
.calendar .day.other { background: var(--steel-2); }
.calendar .day.other .num { color: var(--ink-3); opacity: .6; }
.calendar .num { font-weight: 600; color: var(--ink-2); display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: 50%; }
.calendar .day.today .num { background: var(--mustard); color: #1a1300; }
.entry { display: block; margin-top: .25rem; padding: .12rem .4rem; border-radius: 4px; text-decoration: none; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--line); background: var(--steel-2); }
.entry.target { border-color: var(--mustard); background: var(--mustard-soft); }
.entry.published { border-color: var(--parsley); background: var(--parsley-soft); }
.entry.shoot { border-color: var(--cobalt); background: var(--cobalt-soft); }
.entry.event { border-color: var(--tomato); background: transparent; color: var(--ink-2); font-style: italic; }
.entry.due { border-color: var(--rail); background: transparent; color: var(--ink-3); }
.legend { display: flex; gap: .4rem 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.legend .entry { display: inline-block; margin: 0; }
@media (max-width: 760px) {
  .calendar { grid-template-columns: minmax(0, 1fr); }
  .calendar .head, .calendar .day.blank { display: none; }
  .calendar .day { min-height: 0; border-right: 0; display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
  .calendar .day .entry { margin: 0; }
}

/* ---------- media, review ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .7rem; }
.gallery figure { margin: 0; }
.gallery img, img.thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; background: var(--steel); }
.gallery figcaption { font-size: .76rem; display: flex; gap: .3rem; align-items: center; margin-top: .3rem; color: var(--ink-2); }
.gallery figcaption span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variant { display: grid; gap: .1rem; align-content: start; background: var(--steel-2); border-radius: var(--r-ctl); padding: .8rem; border: 2px solid transparent; }
.variant.winner { border-color: var(--parsley); }
.variant .slot { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.video { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--r-ctl); background: #000; margin-top: .8rem; }
.version + .version { margin-top: 1rem; }
.comment { padding: .55rem 0 .55rem .8rem; border-left: 3px solid var(--line); margin: .5rem 0; }
.comment.resolved { opacity: .55; }
.comment .who { font-size: .8rem; color: var(--ink-3); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.tc { font-variant-numeric: tabular-nums; font-weight: 700; text-decoration: none; background: var(--cobalt-soft); padding: 0 .35rem; border-radius: 4px; }
.journal { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.journal li { padding: .5rem 0; }
.journal li + li { border-top: 1px solid var(--line-soft); }
.journal .when { color: var(--ink-3); font-size: .78rem; display: block; }

.login { max-width: 23rem; margin: 14vh auto; padding: 0 1rem; }
.login .wordmark { color: var(--cobalt); padding: 0; font-size: 2rem; margin-bottom: .4rem; }
.login .wordmark span { color: var(--ink-3); font-size: .9rem; }

@media print {
  .side, .mobile-top, .tabbar, .noprint { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .content { padding: 0; max-width: none; }
  .card, .panel { border-color: #999; break-inside: avoid; }
  .js .pane { display: block; }
  a { color: #000; text-decoration: none; }
}
