/* newsprint, one typewriter, one blue ink. layout: a newspaper page cut across by one long tape on a black bed */
:root { --paper: #e6dfcc; --tape: #f3eddd; --ink: #16130f; --soft: #57503f; --blue: #1c3f9e; --rule: #16130f; --pad: clamp(16px, 3.6vw, 60px); --type: "Courier Prime", "Courier New", monospace; --old: "Old Standard TT", Georgia, serif; }
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font: 400 18px/1.35 var(--old); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; background: var(--paper) var(--news, none); }
h1, h2, p, ol, form { margin: 0; padding: 0; font-weight: inherit; }
ol { list-style: none; } a { color: inherit; } canvas { display: block; }
[hidden] { display: none !important; }
.defs { position: absolute; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--blue); color: var(--tape); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button, input { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.ln { min-height: 44px; padding: 0 2px; font-size: 18px; text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; }
.ln:hover { color: var(--blue); } .ln[aria-pressed="true"] { color: var(--blue); text-decoration-thickness: 3px; }
.go { min-height: 50px; padding: 4px 22px 0; background: var(--ink); color: var(--tape); font: 700 19px/1 var(--type); transition: background .14s, transform .14s; }
.go:hover { background: var(--blue); } .go:active { transform: translateY(2px); }

.mast { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 var(--pad); height: 62px; border-bottom: 4px double var(--rule); }
.brand { text-decoration: none; } .brand b { font: 700 30px/1 var(--old); letter-spacing: -.01em; }
.mast p { font: italic 400 18px/1 var(--old); } .mast nav { display: flex; gap: 20px; align-items: center; } .mast nav a { padding: 10px 2px; text-underline-offset: 4px; }

.wire { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); column-gap: 40px; }
.hook { padding: 26px 0 26px var(--pad); font: 700 clamp(56px, min(11.9vw, 21.5svh, (100vw - 600px) / 4.75), 240px)/.84 var(--type); letter-spacing: -.075em; word-spacing: -.2em; filter: url(#ink); align-self: center; }
.hook span { display: block; white-space: nowrap; }
.blank { position: relative; align-self: center; margin: 24px var(--pad) 24px 0; padding: 22px 24px 24px; background: var(--tape); box-shadow: 0 1px 0 #fff8 inset, 2px 5px 0 -1px #0002, 0 14px 30px -18px #000a; transform: rotate(.7deg); background-image: radial-gradient(circle at 6px 0, var(--paper) 3.2px, transparent 3.6px); background-size: 14px 100%; background-repeat: repeat-x; display: grid; gap: 4px; }
.f { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: end; border-bottom: 1px solid var(--ink); min-height: 48px; }
.f > span { font: italic 400 19px/1 var(--old); padding-bottom: 9px; white-space: nowrap; }
.f input { border: 0; background: none; padding: 12px 0 6px; font: 700 19px/1 var(--type); width: 100%; min-width: 0; text-overflow: ellipsis; } .f input::placeholder { color: #6d6553; opacity: 1; }
.f input:focus { outline: 0; } .f:focus-within { border-bottom: 3px solid var(--blue); }
#picks { display: flex; flex-wrap: wrap; gap: 0 14px; padding: 8px 0 4px; min-height: 40px; align-items: center; } #picks button { font: 700 17px/1 var(--type); min-height: 34px; text-decoration: underline; text-underline-offset: 4px; } #picks button:hover, #picks button[aria-pressed="true"] { color: var(--blue); } #picks em { font: italic 400 17px/1 var(--old); color: var(--soft); }
.blank .go { margin-top: 16px; }
#stamp { position: absolute; left: -168px; bottom: -8px; width: 188px; height: 188px; pointer-events: none; mix-blend-mode: multiply; }
.bed { grid-column: 1 / -1; background: #14110d; height: clamp(250px, 33svh, 310px); position: relative; overflow: hidden; }
#tape { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; } #tape:active { cursor: grabbing; } #tape:focus-visible { outline-offset: -6px; outline-color: #f3eddd; }
.desk { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 14px 30px; padding: 12px var(--pad); flex-wrap: wrap; }
#state { font: 400 18px/1.3 var(--type); } .keys { display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; }

section:not(.wire) { padding: clamp(60px, 8vw, 110px) var(--pad) 0; }
h2 { font: 700 clamp(31px, 4.5vw, 68px)/1 var(--type); letter-spacing: -.06em; word-spacing: -.18em; filter: url(#ink2); text-wrap: balance; }
.pile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 30px; }
.sortby { display: flex; gap: 20px; }
#pile { grid-column: 1 / -1; margin: 12px calc(var(--pad) * -1 + 4px) 0; box-shadow: 0 18px 30px -22px #000a; min-height: 120px; }
#pile li { position: relative; display: grid; grid-template-columns: 110px 90px minmax(160px, 1fr) 190px 150px; gap: 18px; align-items: center; padding: 0 calc(var(--pad) + 14px); min-height: 58px; font: 400 18px/1.1 var(--type); background: var(--tape); border-bottom: 1px dashed #0004; }
#pile li:nth-child(even) { background: #e2dac4; }
#pile li::before, #pile li::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px; background: radial-gradient(circle at 7px 14.5px, var(--ink) 4.6px, transparent 5.2px) 0 0 / 14px 29px; } #pile li::before { left: 9px; } #pile li::after { right: 9px; }
#pile .sz { font-weight: 700; font-size: 24px; white-space: nowrap; text-align: right; } #pile .buy { color: var(--blue); } #pile .bar { height: 15px; background: currentColor; min-width: 5px; justify-self: start; } #pile a { text-underline-offset: 3px; text-align: right; } #pile li.now { outline: 3px solid var(--blue); outline-offset: -3px; } #pile li.none { display: block; padding-top: 20px; }
.cardbox { position: relative; margin-top: 28px; height: clamp(260px, 30vw, 420px); touch-action: pan-y; } .cardbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cardbox input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; } .cardbox:focus-within { outline: 3px solid var(--blue); outline-offset: 4px; }
.key2 { display: flex; align-items: center; gap: 10px; margin-top: 14px; font: 400 18px/1.2 var(--type); flex-wrap: wrap; } .key2 i { width: 11px; height: 21px; display: inline-block; } .key2 .b { background: var(--blue); } .key2 .s { background: var(--ink); margin-left: 10px; } .key2 span { margin-left: auto; }
.sender { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 50px; align-items: center; margin-top: 28px; }
#morse { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; width: 100%; height: 230px; } #keyart { width: 100%; height: 100%; }
.se-r .keys { margin-top: 18px; }
.strip { margin: 26px calc(var(--pad) * -1) 0; background: #14110d; overflow-x: auto; padding: 14px 0; } #strip { height: 208px; }
.how canvas { width: calc(100% + var(--pad) * 2); margin: 0 calc(var(--pad) * -1); height: clamp(200px, 22vw, 300px); }
.how ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font: 700 clamp(19px, 2vw, 26px)/1.2 var(--type); letter-spacing: -.03em; text-align: center; padding-top: 22px; }
.foot { padding: clamp(70px, 9vw, 130px) var(--pad) max(44px, env(safe-area-inset-bottom)); display: grid; gap: 26px; } .end { font: 700 clamp(64px, 14.4vw, 260px)/.86 var(--type); letter-spacing: -.08em; word-spacing: -.24em; filter: url(#ink); white-space: nowrap; overflow: hidden; margin-left: -.04em; } .fo { border-top: 4px double var(--rule); padding-top: 14px; display: grid; gap: 4px; } .fo p:first-child { display: flex; gap: 22px; flex-wrap: wrap; } .fo p { max-width: 860px; }

@media (max-width: 1400px) { #stamp { width: 136px; height: 136px; left: -112px; bottom: -20px; } }
@media (max-width: 1180px) { #stamp { width: 122px; height: 122px; left: auto; right: -22px; bottom: auto; top: -66px; } }
@media (max-width: 900px) {
  .mast { height: 52px; margin: 0 16px; } .mast p { display: none; } .brand b { font-size: 25px; } .mast nav { gap: 14px; } .mast .ln { font-size: 17px; }
  .wire { grid-template-columns: minmax(0, 1fr); } .hook { padding: 14px 16px 10px; font-size: min(17.6vw, 92px); } .blank { margin: 4px 16px 16px; padding: 12px 16px 16px; transform: rotate(.4deg); } .f { grid-template-columns: 96px minmax(0, 1fr); min-height: 42px; } .f > span { font-size: 17px; padding-bottom: 7px; } .f input { font-size: 17px; padding: 9px 0 5px; } #picks { padding: 4px 0 2px; min-height: 36px; flex-wrap: nowrap; overflow: hidden; } .blank .go { margin-top: 12px; }
  #stamp { width: 112px; height: 112px; left: auto; right: -12px; bottom: auto; top: -100px; }
  .bed { height: 226px; } .desk { padding: 10px 16px; } #state { font-size: 16px; } .keys { width: 100%; justify-content: space-between; }
  section:not(.wire) { padding: 64px 16px 0; } .pile { grid-template-columns: minmax(0, 1fr); } #pile { margin: 6px -16px 0; } #pile li { grid-template-columns: 78px 50px minmax(20px, 1fr) auto; gap: 10px; padding: 0 30px; min-height: 54px; font-size: 16px; } #pile .px { display: none; } #pile .sz { font-size: 20px; } #pile a { display: none; } #pile li::before { left: 7px; } #pile li::after { right: 7px; }
  .sender { grid-template-columns: minmax(0, 1fr); gap: 18px; } #morse { height: 190px; } .strip { margin: 22px -16px 0; }
  .how ol { grid-template-columns: 1fr; text-align: left; gap: 0; padding: 0; } .how { display: grid; grid-template-columns: 44% 1fr; gap: 16px; } .how canvas { width: 100%; margin: 0; height: 540px; } .how ol { grid-template-rows: repeat(3, 1fr); } .how li { display: flex; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
