/* Page chrome taken from the owner's own bleak site: near-black paper, one lit object, a figure strip, grit. */
body {
  --paper: #0A0A09; --paper-2: #141412; --rule: #2B2A26; --rule-2: #1E1D1A; --hair: #3A3833;
  --ink: #EDEBE4; --ink-2: #9E9B93; --hot: #D4553C;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  background: var(--paper); color: var(--ink-2); font-family: var(--serif);
}
.shell { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: 0 var(--s-7) var(--s-5); min-height: 100svh; display: flex; flex-direction: column; }

.bar { display: flex; align-items: center; gap: var(--s-4); padding-top: var(--s-4); flex: none; }
.mark { font-family: var(--mono); font-weight: 600; font-size: var(--t-16); letter-spacing: .3em; color: var(--ink); }
.chip {
  margin-left: auto; min-height: 44px; min-width: 0; display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0 var(--s-4); font-family: var(--mono); font-size: var(--t-12); letter-spacing: .04em;
  color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px; cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover { border-color: #4A4842; color: var(--ink); }
.chip:active { background: var(--rule-2); }
.chip:focus-visible, .how:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.chip[aria-busy="true"] { cursor: progress; }
.chip em { font-style: normal; letter-spacing: .12em; text-transform: uppercase; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xlink { margin-left: 0; width: 44px; padding: 0; justify-content: center; text-decoration: none; flex: none; }

.stage { position: relative; flex: 1 1 auto; min-height: 160px; margin-top: var(--s-1); z-index: 3; user-select: none; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); margin-top: var(--s-4); flex: none; }
.post { font-size: var(--t-24); font-weight: 300; line-height: var(--lh-snug); color: var(--ink); max-width: 30ch; min-height: 2.4em; display: flex; align-items: center; }
.actions { display: flex; gap: var(--s-3); flex: none; }
.how {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-5); white-space: nowrap;
  font-family: var(--mono); font-size: var(--t-12); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-2); border: 1px solid var(--rule); border-radius: 2px;
  transition: color .15s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease);
}
.how:hover { color: var(--ink); border-color: #4A4842; background: var(--paper-2); }
.how:active { background: var(--rule-2); }
.how.solid { color: var(--paper); background: var(--ink); border-color: var(--ink); font-weight: 600; }
.how.solid:hover { color: var(--paper); background: #FFFFFF; border-color: #FFFFFF; }

.strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--s-4); flex: none; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--rule-2); }
.cell { padding: var(--s-3) var(--s-4) var(--s-4); border-right: 1px solid var(--rule-2); }
.cell:last-child { border-right: 0; }
.cell u { display: block; width: 24px; height: 4px; background: var(--ink); margin-bottom: var(--s-3); }
.cell b { display: block; font-family: var(--mono); font-weight: 500; font-size: var(--t-24); line-height: var(--lh-tight); color: var(--ink); font-variant-numeric: tabular-nums; }
.cell span { display: block; margin-top: var(--s-3); font-family: var(--mono); font-size: var(--t-12); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }

.foot { margin-top: var(--s-4); font-size: var(--t-16); font-weight: 300; color: var(--ink-2); flex: none; }

/* grit */
.grain, .scan, .vig, .crt { position: fixed; inset: 0; pointer-events: none; }
.vig { z-index: 4; background: radial-gradient(128% 88% at 50% 24%, rgba(255, 255, 255, .03) 0%, rgba(0, 0, 0, 0) 44%, rgba(0, 0, 0, .58) 100%); }
.scan { z-index: 5; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, rgba(0, 0, 0, 0) 1px 3px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, rgba(0, 0, 0, 0) 1px 148px); }
.grain { z-index: 6; opacity: .3; mix-blend-mode: overlay; background-size: 220px 220px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.crt { z-index: 7; overflow: hidden; opacity: 0; }
.crt b { position: absolute; left: 0; right: 0; top: -6px; height: 2px; background: rgba(255, 255, 255, .5); }
.crt.fire { animation: crtHold 620ms linear 1; }
.crt.fire b { animation: crtSweep 520ms cubic-bezier(.35, 0, .15, 1) 1; }
.scan.fire { animation: scanJolt 90ms steps(2, end) 4; }
@keyframes crtHold { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes crtSweep { from { transform: translateY(0); } to { transform: translateY(101vh); } }
@keyframes scanJolt { 0% { transform: translateY(0); } 50% { transform: translateY(2px); } 100% { transform: translateY(0); } }

@media (max-width: 760px) {
  .shell { padding: 0 var(--s-4) var(--s-4); }
  .stage { flex: 0 0 auto; height: 34vh; min-height: 220px; }
  .row { flex-direction: column; align-items: stretch; gap: var(--s-4); }
  .post { font-size: var(--t-20); min-height: 3.6em; }
  .actions .how { flex: 1; justify-content: center; padding: 0 var(--s-3); letter-spacing: .12em; }
  .cell { padding: var(--s-3) var(--s-2) var(--s-3); }
  .cell b { font-size: var(--t-20); }
  .cell span { letter-spacing: .08em; }
}
