@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:wght@400;700&family=Gudea:wght@400;700&family=Ultra&display=swap');

:root {
  --u: calc(100vw / 1920);
  --ground: #2a190d;
  --walnut: #3b2114;
  --walnut-deep: #1b100a;
  --rule: #523522;
  --paper: #f0e5cf;
  --paper-shadow: #cdbb9f;
  --ink: #24160f;
  --text: #f0e5cf;
  --muted: #a89a8b;
  --brass: #b88a43;
  --brass-hi: #e0b768;
  --coral: #e18667;
  --mint: #38efb5;
  --danger: #fd664b;
  --font-display: Ultra, Rockwell, serif;
  --font-body: Gudea, Arial, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --rule-quiet-width: max(1px, calc(1.1 * var(--u)));
  --rule-frame-width: max(1px, calc(2.3 * var(--u)));
  --rule-heavy-width: max(1px, calc(4 * var(--u)));
  --rule-quiet-color: #523522;
  --rule-frame-color: #574436;
  --rule-paper-color: #d6c3ad;
  --motion-ui: 200ms;
  --motion-paper: 620ms;
  --motion-ease: cubic-bezier(.22,.78,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; background: var(--ground); color-scheme: dark; }
body { margin: 0; min-width: 0; min-height: 100vh; overflow-x: hidden; background: var(--ground); color: var(--text); font: 400 calc(16 * var(--u))/1.4 var(--font-body); }
:where(button, input, select, textarea) { border: 0; border-radius: 0; font: inherit; }
:where(button, a) { -webkit-tap-highlight-color: transparent; }
:where(button):not(:disabled), :where(a[href]) { cursor: pointer; }
:where(button):focus-visible, :where(a):focus-visible, :where(input):focus-visible, :where(select):focus-visible, :where(textarea):focus-visible { outline: max(2px, calc(2 * var(--u))) solid var(--mint); outline-offset: max(2px, calc(3 * var(--u))); }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* CHROME — LUAT 62: N9 order tape + compact rail nav; F8 closing statement with hanging tickets */
header[data-chrome="nav"] { position: relative; z-index: 50; width: 100%; background: var(--ground); }
.tape { height: calc(32 * var(--u)); min-height: 26px; display: flex; align-items: stretch; background: var(--walnut-deep); color: var(--muted); font: 400 max(11px, calc(13 * var(--u)))/1 var(--font-mono); }
.tape-tag { flex: none; display: flex; align-items: center; gap: calc(9 * var(--u)); padding: 0 calc(18 * var(--u)) 0 calc(36 * var(--u)); background: var(--brass); color: var(--ink); font: 700 max(11px, calc(12 * var(--u)))/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; }
.tape-window { flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.tape-track { flex: none; display: flex; animation: tape-run 90s linear infinite; }
.tape-window:hover .tape-track { animation-play-state: paused; }
.tape-run { flex: none; margin: 0; display: flex; white-space: nowrap; }
.tick { display: inline-flex; align-items: center; gap: calc(9 * var(--u)); padding-inline: calc(20 * var(--u)); }
.tick + .tick::before { content: "/"; margin-right: calc(20 * var(--u)); color: var(--brass); }
.tick b { color: var(--text); font-weight: 700; letter-spacing: .04em; }
.tick-dot { flex: none; width: max(6px, calc(8 * var(--u))); height: max(6px, calc(8 * var(--u))); border-radius: 50%; background: var(--brass-hi); }
.tick-dot.is-stop { background: var(--coral); }
.tick-dot.is-take { background: var(--mint); }
.tape-tag .tick-dot { background: var(--ink); }
@keyframes tape-run { to { transform: translateX(-50%); } }
.tape-social { flex: none; display: flex; gap: max(1px, calc(2 * var(--u))); }
.tape-social a { display: flex; align-items: center; gap: calc(8 * var(--u)); padding: 0 calc(20 * var(--u)); background: var(--walnut); color: var(--text); font: 700 max(12px, calc(14 * var(--u)))/1 var(--font-body); letter-spacing: .02em; transition: background-color var(--motion-ui) var(--motion-ease), color var(--motion-ui) var(--motion-ease); }
.tape-social a:last-child { padding-right: calc(36 * var(--u)); }
.tape-social a[href]:hover { background: var(--coral); color: var(--ink); }
.tape-social .glyph { font-size: max(13px, calc(16 * var(--u))); }
.social-link.is-soon { cursor: not-allowed; }
.tape-social .social-link.is-soon { color: var(--muted); }
.deck { position: relative; height: calc(64 * var(--u)); min-height: 52px; padding: 0 calc(36 * var(--u)); display: flex; align-items: center; gap: calc(48 * var(--u)); }
.rule-chrome-base { border-bottom: var(--rule-quiet-width) solid #573824; }
.brand { flex: none; display: flex; align-items: center; gap: calc(12 * var(--u)); color: var(--text); font: 400 calc(30 * var(--u))/1 var(--font-display); letter-spacing: .01em; }
.brand img { width: calc(46 * var(--u)); height: calc(46 * var(--u)); min-width: 36px; min-height: 36px; object-fit: contain; }
.rail-nav { position: relative; flex: 1; align-self: stretch; display: flex; justify-content: space-between; padding: 0 calc(40 * var(--u)); }
.rail-nav::before { content: ""; position: absolute; left: 0; right: 0; top: calc(12 * var(--u)); height: max(3px, calc(4 * var(--u))); border-radius: 2px; background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #6d4f22); }
.rail-nav::after { content: ""; position: absolute; left: calc(-6 * var(--u)); right: calc(-6 * var(--u)); top: calc(8 * var(--u)); height: max(10px, calc(12 * var(--u))); background: radial-gradient(circle at calc(6 * var(--u)) 50%, var(--brass-hi) 0 calc(4 * var(--u)), var(--brass) calc(4 * var(--u)) calc(6 * var(--u)), transparent calc(6.5 * var(--u))) left / 50% 100% no-repeat, radial-gradient(circle at calc(100% - 6 * var(--u)) 50%, var(--brass-hi) 0 calc(4 * var(--u)), var(--brass) calc(4 * var(--u)) calc(6 * var(--u)), transparent calc(6.5 * var(--u))) right / 50% 100% no-repeat; pointer-events: none; }
.rail-nav a { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: calc(9 * var(--u)); color: var(--text); font: 700 max(12px, calc(15 * var(--u)))/1 var(--font-body); letter-spacing: .02em; }
.rail-nav a::before { content: ""; position: relative; z-index: 1; width: max(7px, calc(10 * var(--u))); height: max(7px, calc(10 * var(--u))); border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass) 60%, #6d4f22); }
.rail-nav .tag { position: relative; margin-top: calc(9 * var(--u)); padding: calc(6 * var(--u)) calc(14 * var(--u)); border-radius: 2px; background: var(--paper-shadow); color: var(--ink); transform-origin: 50% calc(-10 * var(--u)); transition: transform var(--motion-paper) var(--motion-ease), background-color var(--motion-ui) var(--motion-ease), color var(--motion-ui) var(--motion-ease); }
.rail-nav .tag::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: max(1px, calc(2 * var(--u))); height: calc(9 * var(--u)); background: var(--paper-shadow); transform: translateX(-50%); }
.rail-nav a:hover .tag { transform: rotate(2deg); }
.rail-nav a.is-active .tag { background: var(--paper); box-shadow: inset 0 calc(-3 * var(--u)) 0 var(--coral), calc(2 * var(--u)) calc(3 * var(--u)) 0 rgba(12, 6, 2, .45); transform: rotate(-2deg); }
.nav-toggle { display: none; }

footer[data-chrome="footer"] { position: relative; width: 100%; padding: calc(40 * var(--u)) calc(36 * var(--u)) calc(28 * var(--u)); background: var(--ground); }
.foot-rail { position: relative; height: max(3px, calc(4 * var(--u))); border-radius: 2px; background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #6d4f22); }
.foot-rail::before, .foot-rail::after { content: ""; position: absolute; top: 50%; width: max(10px, calc(14 * var(--u))); height: max(10px, calc(14 * var(--u))); border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass) 60%, #6d4f22); transform: translateY(-50%); }
.foot-rail::before { left: calc(-4 * var(--u)); }
.foot-rail::after { right: calc(-4 * var(--u)); }
.foot-grid { display: grid; grid-template-columns: calc(104 * var(--u)) minmax(0, 1fr) auto; column-gap: calc(40 * var(--u)); align-items: start; padding-top: calc(36 * var(--u)); }
.foot-mark { width: calc(104 * var(--u)); height: calc(104 * var(--u)); min-width: 48px; min-height: 48px; object-fit: contain; }
.foot-close { margin: 0; color: var(--text); font: 400 calc(56 * var(--u))/1.04 var(--font-display); letter-spacing: .005em; }
.foot-close span { display: block; margin-top: calc(16 * var(--u)); color: var(--brass-hi); font-size: calc(40 * var(--u)); }
.foot-tickets { display: flex; gap: calc(24 * var(--u)); margin-top: calc(-38 * var(--u)); }
.hang { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: calc(30 * var(--u)); color: var(--ink); }
.hang::before { content: ""; position: absolute; top: 0; left: 50%; z-index: 1; width: max(7px, calc(10 * var(--u))); height: max(7px, calc(10 * var(--u))); border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass) 60%, #6d4f22); transform: translate(-50%, -30%); }
.hang::after { content: ""; position: absolute; top: calc(4 * var(--u)); left: 50%; width: max(1px, calc(2 * var(--u))); height: calc(26 * var(--u)); background: var(--paper-shadow); transform: translateX(-50%); }
.ticket { width: calc(232 * var(--u)); min-height: calc(128 * var(--u)); padding: calc(16 * var(--u)) calc(20 * var(--u)); display: flex; flex-direction: column; gap: calc(8 * var(--u)); border-radius: 2px; background: var(--paper); box-shadow: calc(3 * var(--u)) calc(4 * var(--u)) 0 rgba(12, 6, 2, .45); transform: rotate(-2deg); transform-origin: 50% calc(-28 * var(--u)); transition: transform var(--motion-paper) var(--motion-ease); }
.hang:nth-child(2) .ticket { transform: rotate(1.5deg); }
.hang:nth-child(3) .ticket { transform: rotate(-1deg); }
.hang[href]:hover .ticket, .hang:focus-visible .ticket { transform: rotate(0deg) translateY(calc(4 * var(--u))); }
.t-kind { color: #7a5f47; font: 700 max(11px, calc(12 * var(--u)))/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.t-big { color: var(--ink); font: 700 max(18px, calc(26 * var(--u)))/1.05 var(--font-body); }
.t-ca { font: 700 max(18px, calc(26 * var(--u)))/1.05 var(--font-mono); }
.t-sub { color: #6e5a48; font-size: max(12px, calc(14 * var(--u))); }
.t-copy { align-self: flex-start; padding: calc(4 * var(--u)) 0; color: var(--ink); font: 700 max(12px, calc(14 * var(--u)))/1 var(--font-body); text-decoration: underline; text-underline-offset: .2em; }
.t-copy:disabled { color: #8c7864; text-decoration: none; }
.hang.is-soon .t-big { color: #5c4838; }
.foot-sources { grid-column: 2 / -1; margin: calc(34 * var(--u)) 0 0; color: #bda995; font: 400 max(12px, calc(13 * var(--u)))/1.4 var(--font-mono); }

main { width: 100%; min-height: calc(100vh - calc(430 * var(--u))); transition: opacity var(--motion-ui) var(--motion-ease), transform var(--motion-ui) var(--motion-ease); }
main.is-leaving { opacity: .72; transform: translateX(calc(-4 * var(--u))); }
.page-frame { width: auto; min-width: 0; margin-inline: calc(36 * var(--u)); background: var(--ground); }


/* Shared border grammar. Route files apply these classes and declare no borders. */
.rule-panel { border: var(--rule-frame-width) solid var(--rule-frame-color); }
.rule-card { border: var(--rule-frame-width) solid #4d4034; }
.rule-input { border: var(--rule-frame-width) solid #645144; padding: calc(12 * var(--u)); }
.rule-row { border-bottom: var(--rule-quiet-width) solid var(--rule-quiet-color); }
.rule-tab-strip { border: var(--rule-frame-width) solid #57483c; }
.rule-paper { border: var(--rule-frame-width) solid var(--rule-paper-color); }
.rule-double { border: max(3px, calc(3 * var(--u))) double var(--rule-frame-color); }

.rule-active-ticket { border: max(1px, calc(3.7 * var(--u))) solid #ff6f4f; }
.rule-replay-inset { border: max(1px, calc(1.4 * var(--u))) solid #251103; }
.rule-settlement-receipt { border: max(1px, calc(1.6 * var(--u))) solid #e5cb91; }
.rule-wallet-control { border: max(1px, calc(2.3 * var(--u))) solid #514338; }
.rule-price-ruler-badge { border: max(1px, calc(2.2 * var(--u))) solid #43352b; }
.rule-amount-field { border: max(3px, calc(3 * var(--u))) double #4b3d33; }
.rule-calldata-and-risks { border: max(1px, calc(2.3 * var(--u))) solid #4a3c32; }
.rule-process-card-1 { border: max(1px, calc(2.3 * var(--u))) solid #4d4034; }
.rule-process-card-2 { border: max(1px, calc(2.2 * var(--u))) solid #4f4136; }
.rule-process-card-3 { border: max(1px, calc(2.3 * var(--u))) solid #504237; }
.rule-process-card-4 { border: max(1px, calc(2.3 * var(--u))) solid #504137; }
.rule-process-card-5 { border: max(1px, calc(2.2 * var(--u))) solid #4f4237; }
.rule-process-card-6 { border: max(1px, calc(2.3 * var(--u))) solid #4c3e33; }
.rule-checklist-action { border: max(1px, calc(2.1 * var(--u))) solid #270300; }
.rule-write-footer-source-plate { border: max(1px, calc(2.3 * var(--u))) solid #45362a; }
.rule-ticket-inspector { border: max(1px, calc(2.3 * var(--u))) solid #402e23; }
.rule-selected-tab { border: max(3px, calc(3.3 * var(--u))) double #fd664b; }
.rule-calldata-tab { border: max(1px, calc(2.3 * var(--u))) solid #57483c; }
.rule-event-ledger-tab { border: max(1px, calc(2.2 * var(--u))) solid #57483c; }
.rule-cancel-action { border: max(1px, calc(2.2 * var(--u))) solid #807a73; }
.rule-history-status { border: max(1px, calc(2.2 * var(--u))) solid #746c65; }
.rule-history-step-1 { border: max(1px, calc(2.3 * var(--u))) solid #4e3d31; }
.rule-history-active-step { border: max(1px, calc(2.3 * var(--u))) solid #d95339; }
.rule-history-step-3 { border: max(1px, calc(2.2 * var(--u))) solid #503e32; }
.rule-flip-ticket-action { border: max(1px, calc(2.3 * var(--u))) solid #4f3e32; }
.rule-copy-action { border: max(1px, calc(2.3 * var(--u))) solid #49372a; }
.rule-ticket-footer-source-plate { border: max(1px, calc(2.1 * var(--u))) solid #9a948d; }
.rule-empty-window-wood-tray { border: max(1px, calc(4.5 * var(--u))) solid #a17254; }
.rule-session-tip-panel { border: max(1px, calc(2.3 * var(--u))) solid #412e22; }
.rule-after-execution-diagram { border: max(1px, calc(2.3 * var(--u))) solid #ddceb7; }
.rule-current-block-note { border: max(1px, calc(2.3 * var(--u))) solid #4c392a; }
.rule-wallet-input { border: max(1px, calc(2.2 * var(--u))) solid #d6c3ad; }
.rule-check-action { border: max(1px, calc(2.3 * var(--u))) solid #d0c2b2; }
.rule-revoke-warning-card { border: max(2px, calc(2.6 * var(--u))) solid #cb5c36; }
.rule-reconciliation-section { border: max(3px, calc(3 * var(--u))) double #564130; }
.rule-orphan-state-section { border: max(3px, calc(3 * var(--u))) double #412e1e; }
.rule-orphan-state-inner-frame { border: max(3px, calc(3 * var(--u))) double #412d1e; }
.rule-exact-means-exact-section { border: max(3px, calc(3 * var(--u))) double #493525; }
.rule-exact-means-exact-inner-frame { border: max(1px, calc(2.3 * var(--u))) solid #422e1f; }
.rule-orphan-outer-frame { border-left: max(1px, calc(2.1 * var(--u))) solid #47331f; border-right: max(1px, calc(2.1 * var(--u))) solid #47331f; pointer-events: none; }
.rule-revoke-action { border: max(1px, calc(2.2 * var(--u))) solid #bcab98; }
.rule-ticket-preview { border: max(1px, calc(2.3 * var(--u))) solid #5c493b; }
.rule-place-order-form { border: max(1px, calc(2.3 * var(--u))) solid #604e3f; }
.rule-tool-list { border: max(1px, calc(2.3 * var(--u))) solid #614f41; }
.rule-tool-row-1 { border: max(3px, calc(3 * var(--u))) double #544132; }
.rule-tool-row-1-inner { border: max(3px, calc(3 * var(--u))) double #6fe3c7; }
.rule-field-1 { border: max(1px, calc(2.3 * var(--u))) solid #645144; }
.rule-tool-row-2 { border: max(3px, calc(3 * var(--u))) double #54e2b6; }
.rule-tool-row-2-inner { border: max(3px, calc(3 * var(--u))) double #4d3c30; }
.rule-field-2 { border: max(1px, calc(2.2 * var(--u))) solid #6b594b; }
.rule-field-3 { border: max(3px, calc(3 * var(--u))) double #69594b; }
.rule-preview-footer { border: max(1px, calc(2.3 * var(--u))) solid #4a3d32; }
.rule-field-4 { border: max(1px, calc(2.3 * var(--u))) solid #675748; }
.rule-json-preview { border: max(1px, calc(2.3 * var(--u))) solid #36322d; }
.rule-field-5 { border: max(3px, calc(3 * var(--u))) double #756556; }
.rule-submit-rail { border: max(3px, calc(3 * var(--u))) double #e3c57b; }
.rule-copy-json { border: max(1px, calc(2.3 * var(--u))) solid #7d6e61; }
.rule-wire-strip { border: max(3px, calc(3 * var(--u))) double #644f40; }
.rule-validation-section { border: max(1px, calc(2.3 * var(--u))) solid #574436; }
.rule-validation-inner { border: max(1px, calc(2.3 * var(--u))) solid #544335; }
.rule-contract-panel { border: max(1px, calc(2.3 * var(--u))) solid #584a3f; }
.rule-response-panel { border: max(1px, calc(2.3 * var(--u))) solid #594b3f; }
.rule-tool-state-panel { border: max(1px, calc(2.3 * var(--u))) solid #514337; }
.rule-validation-state-panel { border: max(1px, calc(2.3 * var(--u))) solid #56483c; }
.rule-contract-code { border: max(1px, calc(2.3 * var(--u))) solid #4e4036; }
.rule-tool-state-row-1 { border: max(1px, calc(2.3 * var(--u))) solid #493b30; }
.rule-tool-state-active { border: max(1px, calc(2.2 * var(--u))) solid #50bfa9; }
.rule-response-body { border: max(1px, calc(2.3 * var(--u))) solid #373a3d; }
.rule-tool-state-row-2 { border: max(1px, calc(2.3 * var(--u))) solid #49d3a8; }
.rule-tool-state-inner { border: max(1px, calc(2.3 * var(--u))) solid #3b3129; }
.rule-response-status { border: max(1px, calc(2.3 * var(--u))) solid #3a3531; }
.rule-response-payload { border: max(1px, calc(2.3 * var(--u))) solid #2f2e2d; }
.rule-validation-action { border: max(1px, calc(2.2 * var(--u))) solid #4fd0b1; }
.rule-how-to-section { border: max(1px, calc(2.3 * var(--u))) solid #3f3025; }
.rule-empty-state-artwork { border: max(1px, calc(2.3 * var(--u))) solid #403125; }
.rule-how-to-row-1 { border: max(1px, calc(1.5 * var(--u))) solid #43342a; }
.rule-empty-state-card { border: max(1px, calc(2.3 * var(--u))) solid #4d3e33; }
.rule-empty-state-inner { border: max(1px, calc(2.3 * var(--u))) solid #373430; }
.rule-how-to-row-2 { border: max(1px, calc(1.5 * var(--u))) solid #45362b; }
.rule-how-to-row-3 { border: max(1px, calc(2.3 * var(--u))) solid #413328; }
.rule-how-to-row-4 { border: max(1px, calc(2.3 * var(--u))) solid #3e2f23; }
.rule-how-to-row-5 { border: max(1px, calc(2.3 * var(--u))) solid #3e3024; }
.rule-agent-footer-source-plate { border: max(1px, calc(2.2 * var(--u))) solid #3d2e23; }
/* pre_send border fix 27/09: edges the mockup draws as hairlines (BORDER_BRIEF) */
.rule-due-table { border-top: max(1px, calc(2.3 * var(--u))) solid #5c412f; }
.rule-due-row { border-bottom: max(1px, calc(2.3 * var(--u))) solid #0f0703; }
.rule-ledger-scroll { border-top: max(1px, calc(2.3 * var(--u))) solid #6a4630; }
.rule-open-ticket { border-top: max(1px, calc(2.3 * var(--u))) solid #120802; }
.rule-recon-row { border-bottom: max(1px, calc(1.6 * var(--u))) solid #d6bfab; }
.rule-paper-sheet { border-top: max(1px, calc(1.6 * var(--u))) solid #fffcf0; border-bottom: max(1px, calc(1.6 * var(--u))) solid #fffcf0; border-right: max(1px, calc(2.3 * var(--u))) solid #120802; }
.rule-due-receipt { border-left: max(1px, calc(2.3 * var(--u))) solid #140600; }

[data-motion="settle"] { transform-origin: 50% 0; }
[data-motion="settle"].motion-ready { animation: ticket-settle var(--motion-paper) var(--motion-ease) both; }
[data-motion="register"].motion-ready { animation: receipt-register 540ms var(--motion-ease) both; }
[data-motion="trace"] { transform-origin: left center; }
[data-motion="trace"].motion-ready { animation: trace-ink 680ms linear both; }
@keyframes trace-ink { from { opacity: .8; } to { opacity: 1; } }
[data-motion="drop"].motion-ready { animation: ticket-drop 680ms cubic-bezier(.2,.74,.18,1) both; }
.ticket-hover { transition: transform var(--motion-ui) var(--motion-ease), opacity var(--motion-ui) var(--motion-ease); }
.ticket-hover:hover, .ticket-hover:focus-within { transform: translateY(calc(-3 * var(--u))); }
@keyframes ticket-settle { 0% { opacity: .82; transform: rotate(1.8deg) translateY(calc(-3 * var(--u))); } 64% { opacity: 1; transform: rotate(-.45deg) translateY(0); } 100% { opacity: 1; transform: rotate(0); } }
@keyframes receipt-register { from { opacity: .85; transform: translateX(calc(-4 * var(--u))) rotate(-.3deg); } to { opacity: 1; transform: translateX(0) rotate(0); } }
@keyframes rule-draw { from { opacity: .5; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes ticket-drop { 0% { opacity: .85; transform: translateY(calc(-18 * var(--u))) rotate(-2deg); } 72% { opacity: 1; transform: translateY(calc(2 * var(--u))) rotate(.35deg); } 100% { opacity: 1; transform: translateY(0) rotate(0); } }

@media (max-width: 1023px) {
  :root { --u: 1px; }
  body { font-size: 16px; }
  .tape { height: 30px; min-height: 30px; }
  .tape-tag { display: none; }
  .tape-social a { padding: 0 12px; font-size: 13px; }
  .tape-social a:last-child { padding-right: 20px; }
  .deck { height: 64px; padding: 0 20px; gap: 12px; justify-content: space-between; }
  .brand { gap: 10px; font-size: 24px; }
  .brand img { width: 38px; height: 38px; }
  .nav-toggle { width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; }
  .nav-toggle span:not(.sr-only) { width: 24px; height: 2px; background: var(--text); transition: transform var(--motion-ui) var(--motion-ease), opacity var(--motion-ui) var(--motion-ease); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .rail-nav { position: absolute; top: 100%; left: 0; right: 0; padding: 14px 20px 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; background: var(--ground); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity var(--motion-ui) var(--motion-ease), transform var(--motion-ui) var(--motion-ease); }
  .rail-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .rail-nav::before { top: 0; left: 20px; right: 20px; }
  .rail-nav::after, .rail-nav a::before, .rail-nav .tag::before { display: none; }
  .rail-nav a { padding-top: 10px; align-items: stretch; font-size: 15px; }
  .rail-nav .tag { margin-top: 0; min-height: 44px; display: flex; align-items: center; }
  footer[data-chrome="footer"] { padding: 28px 20px 24px; }
  .foot-grid { grid-template-columns: 1fr; row-gap: 22px; padding-top: 26px; }
  .foot-mark { width: 56px; height: 56px; }
  .foot-close { font-size: 30px; }
  .foot-close span { margin-top: 10px; font-size: 22px; }
  .foot-tickets { flex-wrap: wrap; gap: 16px; margin-top: 0; }
  .hang { padding-top: 0; }
  .hang::before, .hang::after { display: none; }
  .ticket { width: 160px; min-height: 0; padding: 12px 14px; }
  .foot-sources { grid-column: auto; margin-top: 4px; }
  .page-frame { margin-inline: 20px; }
  main { min-height: 40vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  main.is-leaving, [data-motion] { opacity: 1 !important; transform: none !important; }
}
