/* ============================================================
   KIOSK — night edition
   Dark ink canvas · paper-white type · signal-orange accent
   Signature: mono "sign plates" (numbered, bordered, ticked)
   ============================================================ */

@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --ink: #101215;
  --ink-2: #17191d;
  --ink-3: #1e2126;
  --paper: #efeae0;
  --muted: #a7aaa1;
  --line: rgba(239, 234, 224, 0.18);
  --line-strong: rgba(239, 234, 224, 0.36);
  --accent: #ff4d00;
  --accent-ink: #190700;
  --disp: "Oswald", "Arial Narrow", sans-serif;
  --body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --shell: 1280px;
  --gut: 32px;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gut);
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- signature: sign plates ---------- */

.plate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  padding: 7px 12px;
  color: var(--paper);
  white-space: nowrap;
}
.plate .sig {
  width: 9px;
  height: 9px;
  background: var(--accent);
  flex: none;
}
.plate-lg { font-size: 13px; }
.plate .no { color: var(--accent); }

/* ---------- wire strip ---------- */

.wire {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 11px clamp(20px, 3vw, 40px);
  color: var(--muted);
}
.wire .wire-item { margin: 0; display: flex; align-items: center; gap: 10px; }
.wire .sig { width: 8px; height: 8px; background: var(--accent); }
.wire-mid { display: none; }
@media (min-width: 900px) { .wire-mid { display: block; } }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  padding: 56px 0 40px;
}
.mast-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}
.brand {
  margin: 0;
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(84px, 12.5vw, 178px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--paper);
}
.brand-dot {
  display: inline-block;
  width: 0.14em;
  height: 0.14em;
  background: var(--accent);
  margin-left: 0.06em;
}
.mast-side { padding-bottom: 10px; }
.standfirst {
  margin: 0 0 22px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--paper);
  max-width: 44ch;
}
.mast-side .plate { max-width: 100%; }
@media (max-width: 900px) {
  .masthead { padding: 36px 0 28px; }
  .mast-grid { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .standfirst { font-size: 17px; max-width: none; }
}

/* ---------- control bar ---------- */

.controlbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.controls {
  display: grid;
  grid-template-columns: minmax(220px, 380px) minmax(170px, 220px) auto 1fr;
  gap: 24px;
  align-items: end;
  padding-top: 14px;
  padding-bottom: 14px;
}
.lbl {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
}
.field input,
.field select {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 11px 12px;
  border-radius: 0;
}
.field input::placeholder { color: rgba(239, 234, 224, 0.42); }
.selectwrap { position: relative; display: block; }
.selectwrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  pointer-events: none;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 32px; }

.toggle {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-size: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
}
.toggle:hover { border-color: var(--paper); }
.toggle[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.count {
  margin: 0 0 2px;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
  justify-self: end;
}
@media (max-width: 900px) {
  .controls {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .field-search { grid-column: 1 / -1; }
  .count { grid-column: 1 / -1; text-align: left; justify-self: start; margin: 0; }
}

/* ---------- index ---------- */

.index { padding-top: 8px; }

.index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0 18px;
}
.index-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

/* lead story */
.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  padding: 34px 0 56px;
  align-items: start;
}
@media (max-width: 900px) {
  :root { --gut: 20px; }
  .lead { grid-template-columns: 1fr; gap: 20px; padding: 24px 0 40px; }
  .lead-copy .plate { margin-bottom: 18px; }
  .lead-summary { font-size: 17px; margin-top: 16px; }
  .lead-figure .plate { left: 0; bottom: 14px; }
  .plate-lg { font-size: 11px; }
}
.lead-copy .plate { margin-bottom: 26px; }
.lead-title { margin: 0; }
.lead-title .open {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(42px, 4.6vw, 66px);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--paper);
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.lead-title .open:hover { color: var(--accent); }
.lead-summary {
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--paper);
  max-width: 52ch;
}
.lead-meta {
  margin: 22px 0 0;
  color: var(--muted);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.btn {
  margin-top: 30px;
  display: inline-block;
  background: transparent;
  border: 1px solid var(--paper);
  color: var(--paper);
  font-size: 12px;
  padding: 13px 20px;
  cursor: pointer;
  border-radius: 0;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.lead-figure {
  position: relative;
  margin: 0;
}
.lead-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06) brightness(0.94);
}
.lead-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 18, 21, 0) 55%, rgba(16, 18, 21, 0.55));
  pointer-events: none;
}
.lead-figure .plate {
  position: absolute;
  left: -14px;
  bottom: 18px;
  background: var(--ink);
  z-index: 2;
}

/* index rows */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 216px;
  gap: 36px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.row .plate { align-self: start; margin-top: 5px; }
.row-title { margin: 0; }
.row-title .open {
  font-family: var(--disp);
  font-weight: 500;
  font-size: 29px;
  line-height: 1.12;
  text-transform: uppercase;
  color: var(--paper);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}
.row-title .open:hover,
.row-title .open:focus-visible {
  text-decoration-color: var(--accent);
}
.row-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 62ch;
}
.row-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.row-meta .saved-flag { color: var(--accent); }
.row-figure { margin: 0; }
.row-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06) brightness(0.94);
}

@media (max-width: 1020px) {
  .row { grid-template-columns: 120px minmax(0, 1fr) 180px; gap: 24px; }
  .row-title .open { font-size: 24px; }
}
@media (max-width: 700px) {
  .row {
    grid-template-columns: minmax(0, 1fr) 108px;
    grid-template-areas: "plate thumb" "title thumb" "meta thumb";
    gap: 0 16px;
    padding: 24px 0;
  }
  .row .plate { grid-area: plate; margin: 0 0 12px; }
  .row-title { grid-area: title; }
  .row-meta { grid-area: meta; }
  .row-figure { grid-area: thumb; }
  .row-summary { font-size: 15px; }
}

/* ---------- empty state ---------- */

.empty {
  padding: 88px 0 120px;
  max-width: 560px;
}
.empty-title {
  margin: 26px 0 0;
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
}
.empty-copy { color: var(--muted); margin: 14px 0 0; }

/* ---------- footer ---------- */

.footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  background: var(--ink-2);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.foot-brand {
  margin: 0;
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
}
.foot-line { color: var(--accent); margin: 4px 0 14px; }
.foot-copy { margin: 0 0 18px; color: var(--muted); font-size: 15px; max-width: 52ch; }
.foot-small { color: var(--muted); font-size: 11px; margin: 0; }
@media (max-width: 700px) {
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer { margin-top: 56px; padding: 36px 0 44px; }
}

/* ---------- detail view ---------- */

.detail {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  overflow-y: auto;
  border-top: 4px solid var(--accent);
}
.detail-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--gut) 96px;
}
.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-inline: calc(var(--gut) * -1);
  padding-inline: var(--gut);
}
.detail-topbar .plate { min-width: 0; }
.detail-actions { display: flex; gap: 12px; flex-shrink: 0; }

.detail-title {
  margin: 44px 0 0;
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.0;
  text-transform: uppercase;
}
.detail-meta {
  margin: 20px 0 0;
  color: var(--muted);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.detail-figure { margin: 36px 0 8px; }
.detail-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06) brightness(0.94);
}
.detail-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.detail-body { margin-top: 30px; }
.detail-body p {
  margin: 0 0 1.35em;
  font-size: 18px;
  line-height: 1.68;
  color: var(--paper);
  max-width: 66ch;
}
.detail-body p:first-of-type::first-letter {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 58px;
  line-height: 0.82;
  float: left;
  padding: 8px 12px 0 0;
  color: var(--accent);
}
.detail-body p:last-of-type::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  margin-left: 10px;
}
.detail-end {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.btn-close, .btn-save {
  font-size: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-radius: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  font-family: var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-close:hover { border-color: var(--paper); }
.btn-save .sq {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--paper);
  margin-right: 9px;
  vertical-align: baseline;
}
.btn-save[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-save[aria-pressed="true"] .sq { background: var(--accent-ink); border-color: var(--accent-ink); }

@media (max-width: 700px) {
  .detail-topbar { flex-wrap: wrap; }
  .detail-topbar .plate { font-size: 10px; padding: 6px 8px; }
  .detail-title { margin-top: 30px; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
