:root {
  color-scheme: dark;
  --ink: #0b0a09;
  --ink-2: #131110;
  --line: #2a2622;
  --paper: #efe9df;
  --muted: #9c9287;
  --red: #ff4a24;
  --red-dim: #a5311a;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Helvetica Neue", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 460px at 50% -220px, rgba(255, 74, 36, .16), transparent 70%),
    var(--ink);
  color: var(--paper);
  font: 400 1rem/1.55 var(--sans);
}

::selection {
  background: var(--red);
  color: var(--ink);
}

img { max-width: 100%; }

a { color: var(--red); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  padding: .65rem .95rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-220%);
}
.skip:focus { transform: none; }

.strip {
  height: 14px;
  background:
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(239, 233, 223, .09) 9px 19px),
    var(--ink-2);
  border-block: 1px solid #1c1916;
}

.masthead { background: var(--ink); }

.mast-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 22px max(clamp(16px, 4vw, 40px), env(safe-area-inset-right)) 18px max(clamp(16px, 4vw, 40px), env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px 3px rgba(255, 74, 36, .65);
  flex: none;
}

.brand-name {
  font-weight: 800;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -.035em;
  line-height: 1;
}

.brand-num {
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.brand-sub {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.ig {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .8rem;
  border: 1px solid var(--red-dim);
  border-radius: 2px;
  color: var(--red);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .05em;
  text-decoration: none;
}
.ig:hover { background: rgba(255, 74, 36, .12); border-color: var(--red); }
.ext { width: 11px; height: 11px; flex: none; }

.mast-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nav-link:hover { color: var(--paper); border-bottom-color: var(--red); }

main {
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) max(clamp(16px, 4vw, 40px), env(safe-area-inset-right)) clamp(48px, 8vw, 96px) max(clamp(16px, 4vw, 40px), env(safe-area-inset-left));
}

.section-head {
  display: grid;
  gap: .45rem;
  margin-bottom: clamp(20px, 4vw, 36px);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.03em;
  text-transform: uppercase;
  text-wrap: balance;
}

.kicker {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  margin-right: .65rem;
  vertical-align: middle;
  background: var(--red);
}

.sheet {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 220px;
  column-gap: 14px;
}

.sheet li {
  break-inside: avoid;
  margin: 0 0 14px;
}

.frame {
  display: block;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease;
}
.frame:hover { border-color: var(--red-dim); }

.frame-img { display: block; background: #000; }
.frame img { display: block; width: 100%; height: auto; }

.frame-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .67rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.no { color: var(--paper); }
.frame:hover .no { color: var(--red); }

.date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  max-width: 54ch;
  margin: 0;
  padding: 6px 0 6px 16px;
  border-left: 2px solid var(--red);
  color: var(--muted);
  text-wrap: pretty;
}

.plate-page {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 28px);
}

.back {
  margin: 0;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--paper); }

.plate {
  margin: 0;
  display: grid;
  gap: 14px;
}

.plate-img {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: clamp(4px, 1vw, 10px);
  background: #000;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.plate-img img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78svh;
  margin-inline: auto;
}

figcaption { display: grid; gap: .4rem; }

figcaption h1 {
  font-size: clamp(1.35rem, 3.5vw, 2.2rem);
  text-transform: none;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .69rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.meta span:first-child { color: var(--red); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.pager a,
.pager-off {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem 0;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.pager a { color: var(--paper); }
.pager a:hover { color: var(--red); }
.pager-off { color: #4d473f; }

.foot {
  margin-top: auto;
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}

.foot-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 18px max(clamp(16px, 4vw, 40px), env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(clamp(16px, 4vw, 40px), env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
}

.foot p { margin: 0; }
.foot a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--red-dim);
}
.foot a:hover { color: var(--red); border-color: var(--red); }
.sig { color: var(--paper); }

.letter-page { max-width: 820px; }

.letter { max-width: 66ch; }

.letter-lead {
  margin: 0 0 clamp(30px, 5vw, 48px);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.9vw, 1.34rem);
  line-height: 1.7;
  color: #ded6ca;
  text-wrap: pretty;
}

.letter-lead::first-letter {
  float: left;
  margin: .02em .1em 0 0;
  color: var(--red);
  font-size: 3.5em;
  font-weight: 700;
  line-height: .78;
}

.thanks {
  margin-top: clamp(30px, 5vw, 46px);
  padding-top: clamp(20px, 3vw, 30px);
  border-top: 1px solid var(--line);
}

.thanks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .9rem;
  margin-bottom: .9rem;
}

.thanks-no {
  color: var(--red);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .2em;
}

.thanks-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}

.thanks-label {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.thanks p {
  margin: 0 0 1.05em;
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.78;
  color: #d7cfc3;
  text-wrap: pretty;
}

.thanks p:last-child { margin-bottom: 0; }

.letter-close {
  margin: clamp(36px, 6vw, 58px) 0 0;
  padding-top: clamp(22px, 3.5vw, 32px);
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.06rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  color: var(--paper);
  text-wrap: pretty;
}

.signature {
  margin: 16px 0 0;
  color: var(--red);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
}

.letter-note {
  margin: 26px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
}

@media (min-width: 1600px) {
  .sheet { columns: 280px; }
}

@media (max-width: 520px) {
  .brand-sub { display: none; }
  .ig { min-height: 40px; }
  .plate-img img { max-height: 70svh; }
}

@media (prefers-reduced-motion: reduce) {
  .frame { transition: none; }
}
