/* Marcatech Publisher — the brand's night and paper, Archivo + IBM Plex Mono, rows instead of cards.
   One blue button per screen at most; everything secondary is a quiet text link. */
@font-face { font-family: "Archivo"; font-weight: 100 900; font-stretch: 62% 125%; src: url(fonts/archivo-latin-wdth-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Mono"; font-weight: 500; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Mono"; font-weight: 600; src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --bg: #0a1522; --surface: #0f1e2f; --raise: #16283b; --rule: #233346;
  --ink: #ece9e2; --muted: #93a1b0; --sky: #4fa3e3; --teal: #4cb9ac; --blue: #0068ac;
  --warn: #e8a15c; --bad: #ef7a6a;
  --grad: linear-gradient(90deg, #4cb9ac, #0068ac 82%);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
h1, h2, h3 { font-stretch: 125%; font-weight: 800; letter-spacing: -0.01em; line-height: 1.05; margin: 0 0 8px; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.4vw, 44px); }
h2 { font-size: 22px; }
.sub, .empty, .note { color: var(--muted); margin: 0 0 14px; }
.note { font-size: 15px; }
.warn { color: var(--warn); }
.err { color: var(--bad); }
code { font-family: var(--mono); font-size: 0.92em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* header: the mark, the gradient line underneath */
.top { display: flex; align-items: center; gap: 12px 28px; padding: 14px clamp(16px, 4vw, 40px); position: relative; flex-wrap: wrap; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 800; font-stretch: 125%; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand .mk { width: 54px; height: auto; }
.top nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 14px; }
.top nav a { color: var(--muted); padding: 4px 0; }
.top nav a[aria-current="page"] { color: var(--ink); }
main { max-width: 1120px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 80px; }
main > section { margin-top: 44px; }

.flash { background: var(--raise); padding: 12px 16px; border-radius: 8px; margin: 0 0 20px; }
.mode { font-family: var(--mono); font-size: 13px; color: var(--warn); margin: 0 0 8px; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 28px; margin-top: 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0; }
.summary p { margin: 0; }
.summary .k { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* rows */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "thumb what status" "thumb what act"; gap: 2px 18px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.thumb { grid-area: thumb; display: block; width: 56px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--surface); }
.thumb.tall { aspect-ratio: 9 / 16; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nothumb { display: grid; place-items: center; height: 100%; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.what { grid-area: what; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.when { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.title { color: var(--ink); font-weight: 700; font-size: 17px; }
.meta { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.status { grid-area: status; font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; padding-top: 2px; text-align: right; }
.row .act { grid-area: act; justify-self: end; align-self: start; margin-top: 6px; }
/* in a list every row is its own to-do: outlined, so a list of them isn't a wall of blue */
.row button.primary { background: none; color: var(--sky); border: 1px solid var(--sky); font-weight: 600; padding: 7px 13px; }
.row button.primary:hover { background: rgba(79, 163, 227, 0.12); }
.s-published .status, .s-done_manual .status, .status-big.s-published, .status-big.s-done_manual { color: var(--teal); }
.s-dry_published .status, .status-big.s-dry_published { color: var(--sky); }
.s-manual .status, .s-missing .status, .s-missed .status, .s-paused .status, .status-big.s-manual, .status-big.s-missing, .status-big.s-missed, .status-big.s-paused { color: var(--warn); }
.s-failed .status, .status-big.s-failed { color: var(--bad); }
.s-publishing .status { color: var(--ink); }
.more { margin-top: 14px; font-family: var(--mono); font-size: 14px; }
.rows.compact .row { padding: 8px 0; grid-template-columns: 30px minmax(0, 1fr) auto; }
.rows.compact .thumb { width: 30px; }
.rows.compact .meta { display: none; }
.rows.compact .title { font-size: 15px; font-weight: 600; }

/* buttons and forms */
.acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.acts.wide { margin-top: 28px; }
form.inline, form.act { display: inline; margin: 0; }
button { font: inherit; font-size: 14px; color: var(--ink); background: var(--raise); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 13px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; padding: 10px 16px; }
button.primary:hover { background: #0b77bf; }
button.quiet { background: none; border: none; color: var(--sky); padding: 2px 0; font-size: 14px; }
button.quiet:hover { text-decoration: underline; }
.row button.quiet { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.row button.quiet:hover { color: var(--ink); }
input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 12px; }
.stack { display: grid; gap: 8px; max-width: 360px; }
.stack button { margin-top: 12px; }
.login { max-width: 420px; margin: 8vh auto 0; }

/* the calendar: a band per week, seven days side by side */
.weeks { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 18px 0 8px; font-family: var(--mono); font-size: 14px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.weeks a { color: var(--muted); }
.weeks a b { color: var(--ink); font-weight: 600; }
.weeks a[aria-current] { color: var(--sky); }
.week { margin-top: 40px; }
.week h2 span { font-family: var(--mono); font-size: 14px; font-weight: 500; font-stretch: 100%; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.day { padding: 10px 8px 14px; border-left: 1px solid var(--rule); min-width: 0; }
.day:first-child { border-left: none; padding-left: 0; }
.day h3 { font-family: var(--mono); font-weight: 500; font-stretch: 100%; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); margin: 0 0 10px; }
.day h3 span { text-transform: uppercase; }
.day h3 em { font-style: normal; color: var(--sky); }
.day.today h3 { color: var(--ink); }
.day.past .pic { opacity: 0.55; }
.day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tile a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--ink); }
.tile a:hover { text-decoration: none; }
.tile a:hover .t { color: var(--sky); }
.pic { display: block; width: 40px; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--surface); }
.pic.tall { aspect-ratio: 9 / 16; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.txt { display: flex; flex-direction: column; min-width: 0; font-family: var(--mono); font-size: 12px; line-height: 1.35; }
.txt .t { font-size: 14px; font-weight: 600; }
.txt .k { color: var(--muted); }
.txt .st { color: var(--muted); }
.tile.s-published .st, .tile.s-done_manual .st { color: var(--teal); }
.tile.s-dry_published .st { color: var(--sky); }
.tile.s-manual .st, .tile.s-missing .st, .tile.s-missed .st, .tile.s-paused .st { color: var(--warn); }
.tile.s-failed .st { color: var(--bad); }

/* one item */
.back { font-family: var(--mono); font-size: 14px; margin: 0 0 18px; }
.item { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 36px; align-items: start; }
.item .preview { grid-column: 1; grid-row: 1; }
.item .info { grid-column: 2; grid-row: 1; }
.preview img, .preview video { width: 100%; display: block; border-radius: 10px; background: var(--surface); outline: 1px solid var(--rule); outline-offset: -1px; }
.preview .strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
.preview .strip img { flex: 0 0 85%; scroll-snap-align: start; }
.preview .note { margin-top: 8px; font-family: var(--mono); font-size: 13px; }
.info > * + * { margin-top: 18px; }
.info h1 { margin-bottom: 0; }
.status-big { font-family: var(--mono); font-size: 15px; margin-top: 10px; }
.hand-box { border-top: 3px solid var(--warn); padding-top: 14px; }
.hand-box h2, .action h2 { font-size: 20px; }
.hand-box p { margin: 0 0 8px; }
.sticker-text { font-size: 19px; font-weight: 700; margin: 4px 0 10px; }
.block { border-top: 1px solid var(--rule); padding-top: 14px; }
.block h2 { font-size: 18px; }
.block p { margin: 0; }
.caption pre { white-space: pre-wrap; font-family: var(--sans); font-size: 15px; margin: 0 0 8px; background: var(--surface); padding: 12px 14px; border-radius: 8px; }
.quiet-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); }
.resched { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.resched label { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.files ul, .log ol, .events { list-style: none; margin: 0; padding: 0; }
.files li, .log li, .events li { padding: 4px 0; font-size: 14px; }
.events a { color: inherit; }
.events .ev-error { color: var(--bad); }
.events .ev-warn { color: var(--warn); }
.action .info > p { font-size: 17px; }

/* highlights */
.steps { margin: 18px 0 8px; padding-left: 22px; max-width: 760px; }
.steps li { margin: 6px 0; color: var(--muted); }
.steps b { color: var(--ink); font-weight: 600; }
.hl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--rule); }
.hl-cover { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.circle { display: block; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--rule); }
.circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-body h2 { margin-top: 4px; }
.hl-body .sub strong { color: var(--warn); font-weight: 600; }

/* settings */
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 20px; margin: 20px 0 0; }
.kv dt { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.problems { color: var(--warn); padding-left: 18px; }
.logout { margin-top: 40px; }

@media (max-width: 860px) {
  .days { grid-template-columns: 1fr; }
  .day, .day:first-child { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; border-left: none; border-top: 1px solid var(--rule); padding: 10px 0; }
  .day:first-child { border-top: none; }
  .day h3 { margin: 2px 0 0; }
  .day.empty { display: none; }
  .day ul { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}
@media (max-width: 760px) {
  .top nav { gap: 4px 14px; font-size: 13px; }
  .item { display: flex; flex-direction: column; gap: 24px; }
  .item.hand .preview, .item.action .preview { order: 2; }
  .preview img, .preview video { width: auto; max-width: 100%; max-height: 62vh; margin: 0 auto; }
  .preview .strip img { max-height: none; width: 100%; }
  .row { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "thumb what" "thumb status" "thumb act"; }
  .rows.compact .row { grid-template-columns: 30px minmax(0, 1fr); }
  .thumb { width: 48px; }
  .status { text-align: left; }
  .row .act { justify-self: start; margin-top: 6px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .hl { grid-template-columns: 1fr; gap: 12px; }
  .hl-cover { flex-direction: row; justify-content: flex-start; gap: 16px; }
  .circle { width: 72px; height: 72px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
