a[data-link][hidden]{display:none!important}
@font-face { font-family: 'Rubik Bubbles'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/RubikBubbles-normal-400.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Sora-normal-400.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Sora-normal-600.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/Sora-normal-800.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/JetBrainsMono-normal-400.woff2') format('woff2'); }

/* ==========================================================================
   Hypercatculus · calcbook
   A 2003 champagne-chrome graphing calculator and the pop-up book in its box.
   ========================================================================== */

:root {
  --paper: #f7f0e3;
  --paper2: #ede2cf;
  --ink: #302717;
  --ink-soft: #625641;
  --amber: #e9ad49;
  --amber-deep: #8f6114;
  --amber-text: #7a520f;
  --deep: #392d18;
  --night: #18130c;
  --on-night: #f6f1ea;
  --on-night-soft: #cbc2b4;
  --c1: #ffffff;
  --c2: #e9e4dc;
  --c3: #b9b0a2;
  --c4: #8a7f6d;
  --fd: "Rubik Bubbles", "Arial Rounded MT Bold", "Arial Black", sans-serif;
  --fb: "Sora", "Segoe UI", system-ui, sans-serif;
  --fm: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 14px;
  --gap: 32px;
  --wide: 1.16;
  --perl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.4'/%3E%3Cstop offset='.6' stop-color='%23fff' stop-opacity='.06'/%3E%3Cstop offset='.95' stop-color='%23392d18' stop-opacity='.07'/%3E%3Cstop offset='1' stop-color='%23392d18' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='0' cy='0' r='14' fill='url(%23g)'/%3E%3Ccircle cx='28' cy='0' r='14' fill='url(%23g)'/%3E%3Ccircle cx='0' cy='28' r='14' fill='url(%23g)'/%3E%3Ccircle cx='28' cy='28' r='14' fill='url(%23g)'/%3E%3Ccircle cx='14' cy='14' r='14' fill='url(%23g)'/%3E%3C/svg%3E");
  --perl-faint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.5'/%3E%3Cstop offset='.95' stop-color='%23392d18' stop-opacity='.05'/%3E%3Cstop offset='1' stop-color='%23392d18' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='0' cy='0' r='14' fill='url(%23g)'/%3E%3Ccircle cx='28' cy='0' r='14' fill='url(%23g)'/%3E%3Ccircle cx='0' cy='28' r='14' fill='url(%23g)'/%3E%3Ccircle cx='28' cy='28' r='14' fill='url(%23g)'/%3E%3Ccircle cx='14' cy='14' r='14' fill='url(%23g)'/%3E%3C/svg%3E");
  --perl-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.035'/%3E%3Cstop offset='.95' stop-color='%23000' stop-opacity='.07'/%3E%3Cstop offset='1' stop-color='%23000' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='0' cy='0' r='14' fill='url(%23g)'/%3E%3Ccircle cx='28' cy='0' r='14' fill='url(%23g)'/%3E%3Ccircle cx='0' cy='28' r='14' fill='url(%23g)'/%3E%3Ccircle cx='28' cy='28' r='14' fill='url(%23g)'/%3E%3Ccircle cx='14' cy='14' r='14' fill='url(%23g)'/%3E%3C/svg%3E");
  --chrome: linear-gradient(180deg, #fdfbf7 0%, #ebe5da 42%, #cfc5b4 52%, #e2dbcf 70%, #f6f2ea 100%);
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
@media (min-width: 1000px) { html { scroll-padding-top: 84px; } }
html.rm { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-night);
  background-color: var(--night);
  background-image: var(--perl-dark), linear-gradient(160deg, #241c12 0%, var(--night) 55%, #100c07 100%);
  background-size: 28px 28px, 100% 100%;
  background-attachment: scroll, fixed;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--amber); }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--amber-deep); outline-offset: 3px; }
main { overflow-x: clip; }

.wrap { width: min(1240px, 100% - 32px); margin: 0 auto; }

/* ---- texture: engine-turned perlage (fixed light) ---------------------- */
.perlage {
  background-color: var(--c2);
  background-image: var(--perl), var(--chrome);
  background-size: 28px 28px, 100% 100%;
  background-position: 0 0, 0 0;
}

/* ---- the liquid-metal type --------------------------------------------- */
.metal {
  color: var(--on-night);
  background-image: linear-gradient(180deg, #ffffff 0%, #e6dfd3 30%, #a99f8f 46%, #4a3d27 50%, #cfc6b8 53%, #fff6e6 70%, #b9b0a2 88%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metal--amber {
  background-image: linear-gradient(180deg, #ffffff 0%, #e6dfd3 30%, #8a7f6d 47%, #392d18 50%, #e9ad49 53%, #fff3d9 68%, #b9b0a2 86%, #ffffff 100%);
}
.metal--dark {
  color: var(--on-night);
  background-image: linear-gradient(180deg, #ffffff 0%, #e6dfd3 30%, #a99f8f 46%, #4a3d27 50%, #e9ad49 53%, #fff3d9 68%, #b9b0a2 88%, #ffffff 100%);
}
.metal--slant { display: block; transform: skewX(-9deg); }
.metal--ink {
  color: var(--ink);
  -webkit-text-stroke: 1px var(--deep);
  background-image: linear-gradient(180deg, #6b5c43 0%, #302717 44%, #1e180d 49%, #7a520f 52%, #8f6114 58%, #4a3d27 76%, #302717 100%);
}
.plot__eq { display: none; position: absolute; right: 4%; top: 6%; width: 44%; text-align: right; pointer-events: none; }
.plot__lim { font-family: var(--fd); font-size: clamp(48px, 5.6vw, 84px); line-height: 1; transform: scaleX(var(--wide)); transform-origin: 100% 50%; }
.plot__sub { margin-top: 14px; font-family: var(--fm); font-size: 13px; letter-spacing: .1em; color: var(--ink-soft); }
.plinth__eq { font-family: var(--fm); font-weight: 700; font-size: clamp(56px, 6vw, 88px); line-height: 1; letter-spacing: -.02em; }
.plinth__eq .metal--ink { -webkit-text-stroke: 0; }
.wide { display: block; width: calc(100% / var(--wide)); transform: scaleX(var(--wide)); transform-origin: 0 0; }

/* ---- labels ------------------------------------------------------------ */
.label {
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 14px;
}

/* ---- LCD + command bars ------------------------------------------------- */
.lcd {
  background-color: var(--night);
  background-image: radial-gradient(120% 140% at 20% 0%, #2a2219 0%, var(--night) 60%);
  color: var(--on-night);
  border-radius: 10px;
  box-shadow: 0 0 0 3px #ddd5c7, 0 0 0 4px var(--c4), 0 6px 14px rgba(48, 39, 23, .18), inset 0 2px 10px rgba(0, 0, 0, .65);
}
.cmdbar { padding: 14px 18px 16px; position: relative; }
.cmdbar--slim { padding: 12px 18px; margin: 0 0 40px; max-width: 520px; }
.cmd {
  font-family: var(--fm);
  font-size: 15px;
  line-height: 1.4;
  color: var(--on-night);
  white-space: nowrap;
}
.cmd .t { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; max-width: 100%; }
.cmd::after {
  content: "";
  display: inline-block;
  width: .62em; height: 1.05em;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--amber);
}
html:not(.rm) .cmd::after { animation: caret 1.05s steps(2, jump-none) infinite; }
.cmdbar__out {
  font-family: var(--fm);
  font-size: 13px;
  line-height: 1.6;
  color: var(--on-night-soft);
  margin-top: 8px;
}

/* ---- gel keys (amber = Buy only) --------------------------------------- */
.gel {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--r);
  font-family: var(--fb);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  background-color: var(--amber);
  background-image: linear-gradient(180deg, #ffd99a 0%, #f0b955 46%, #dc9a33 54%, #efb658 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -2px 0 rgba(143, 97, 20, .35), 0 4px 0 var(--amber-deep), 0 10px 20px rgba(57, 45, 24, .28);
  transition: transform .14s ease, box-shadow .14s ease;
  overflow: hidden;
  isolation: isolate;
}
.gel::before {
  content: "";
  position: absolute; left: 6px; right: 6px; top: 3px; height: 46%;
  border-radius: calc(var(--r) - 4px) calc(var(--r) - 4px) 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .08));
  z-index: -1;
  pointer-events: none;
}
.gel::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-120%) skewX(-18deg);
  pointer-events: none;
}
html:not(.rm) .gel:hover::after { animation: gelroll .7s ease both; }
.gel:hover { transform: translateY(-1px); }
.gel:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 0 var(--amber-deep), 0 4px 8px rgba(57, 45, 24, .25); }
.gel--sm { font-size: 13px; min-height: 40px; padding: 8px 14px; font-family: var(--fm); font-weight: 700; }
.gel--enter { min-height: 64px; padding: 14px 26px; font-size: 19px; }
.gel__ret { font-family: var(--fm); font-size: 1.2em; line-height: 1; }

/* ---- header: the calculator's top edge --------------------------------- */
.lid {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 56px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(57, 45, 24, .3);
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(48, 39, 23, .12);
}
.lid__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; margin-right: auto; }
.bezel {
  position: relative; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 200deg, #fff, #8a7f6d, #f4efe6, #6f6452, #fff);
  box-shadow: 0 2px 4px rgba(48, 39, 23, .3);
}
.bezel img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bezel::after {
  content: ""; position: absolute; right: -1px; top: 1px;
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3d9, var(--amber) 55%, var(--amber-deep));
  box-shadow: 0 0 6px rgba(233, 173, 73, .9);
}
.lid__name { font-weight: 700; font-size: 14px; letter-spacing: .01em; white-space: nowrap; }
.lid__model { display: none; font-family: var(--fm); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
@media (max-width: 399px) { .lid__name { display: none; } }

.softkey {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 12px;
  border: 0; border-radius: 9px;
  font-family: var(--fm); font-size: 13px; font-weight: 500;
  color: var(--ink); text-decoration: none; cursor: pointer;
  background-color: #efeae2;
  background-image: linear-gradient(180deg, #fff 0%, #ece6dc 55%, #d9d1c3 100%);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--c4), 0 4px 8px rgba(48, 39, 23, .16);
  transition: transform .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.softkey b { font-weight: 700; color: var(--amber-text); font-size: 11px; letter-spacing: .08em; }
.softkey:hover { transform: translateY(1px); box-shadow: inset 0 1px 0 #fff, 0 1px 0 var(--c4), 0 2px 5px rgba(48, 39, 23, .16); }
.softkey:active { transform: translateY(2px); box-shadow: inset 0 2px 4px rgba(48, 39, 23, .25); }
.softkey img { width: 14px; height: 14px; }

.burger {
  flex: none;
  width: 44px; height: 44px; border: 0; border-radius: 10px;
  display: grid; place-content: center; gap: 4px;
  background-color: #efeae2;
  background-image: linear-gradient(180deg, #fff, #ddd5c7);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--c4);
  cursor: pointer;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

.softkeys {
  display: none;
  position: fixed; top: 64px; left: 8px; right: 8px;
  max-height: calc(100vh - 80px); overflow-y: auto;
  padding: 16px;
  flex-direction: column; gap: 10px;
  background-color: var(--night);
  background-image: radial-gradient(120% 120% at 10% 0%, #2a2219, var(--night) 60%);
  border-radius: 14px;
  box-shadow: 0 0 0 3px #ddd5c7, 0 0 0 4px var(--c4), 0 18px 40px rgba(24, 19, 12, .35);
}
.softkeys.is-open { display: flex; }
.softkeys .softkey { justify-content: flex-start; min-height: 48px; font-size: 15px; }

@media (min-width: 1000px) {
  .lid { height: 72px; padding: 0 28px; gap: 16px; }
  .bezel { width: 44px; height: 44px; }
  .lid__name { display: inline; font-size: 19px; }
  .burger { display: none; }
  .softkeys {
    display: flex; position: static; flex-direction: row; align-items: center; gap: 10px;
    padding: 0; background: none; box-shadow: none; max-height: none; overflow: visible;
  }
  .softkeys .softkey { min-height: 40px; font-size: 13px; }
  .softkey--x img { filter: none; }
}
@media (min-width: 1240px) { .lid__model { display: inline; } }

/* ==========================================================================
   The first screen: the pop-up book
   ========================================================================== */
.book { padding: 64px 0 24px; overflow: clip; }
.book__board {
  position: relative;
  display: flex; flex-direction: column;
  width: min(1380px, 100% - 16px);
  margin: 0 auto;
  padding: 8px 8px 20px;
  border-radius: 8px;
  background-color: #1f1810;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 44%, rgba(0, 0, 0, .35) 47%, rgba(255, 255, 255, .07) 47.4%, rgba(0, 0, 0, 0) 52%), linear-gradient(180deg, #2a2117, #18130c);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 0 0 1px rgba(255, 255, 255, .06), 0 2px 0 #3a3022, 0 24px 50px rgba(0, 0, 0, .55);
}
.book__left { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; padding: 0 8px; --leftw: calc(100vw - 32px); }

.tag { position: relative; z-index: 3; margin: -16px 0 10px 6px; transform: rotate(-2deg); }
.tag span {
  display: inline-block;
  padding: 6px 12px;
  font-family: var(--fm); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
  background: var(--chrome);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(57, 45, 24, .25), 0 3px 6px rgba(48, 39, 23, .18);
}

/* h1: two chrome case badges */
.title { margin: 0 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-weight: 400; }
.badge {
  position: relative;
  display: inline-block;
  font-family: var(--fd);
  font-style: normal;
  font-weight: 400;
  font-size: min(40px, calc((var(--leftw) / var(--wide) - 60px) / 6));
  line-height: 1.04;
  letter-spacing: .01em;
  white-space: nowrap;
  padding: .16em .42em .2em;
  border-radius: 999px;
  background-color: var(--night);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 46%, rgba(255, 255, 255, 0) 50%), radial-gradient(140% 120% at 30% 0%, #3a3022 0%, var(--night) 62%);
  background-size: 100% 100%, 100% 100%;
  box-shadow: 0 0 0 3px #e9e2d6, 0 0 0 4px var(--c4), 0 0 0 5px #fff, 0 8px 0 -2px rgba(48, 39, 23, .22), 0 14px 24px rgba(48, 39, 23, .25);
  filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, .6));
  transform-origin: 0 50%;
}
.badge--a { transform: scaleX(var(--wide)); }
.badge--b { margin: -6px 0 0 12px; transform: scaleX(var(--wide)) skewX(-9deg); z-index: 2; }
.pencil { position: absolute; fill: none; stroke: var(--amber); stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.pencil--ring { left: -4%; top: -22%; width: 52%; height: 150%; opacity: .9; }
.pencil--arrow { display: none; }
@media (min-width: 1000px) { .pencil--arrow { display: block; left: 100%; top: -34%; width: 60px; height: 26px; } }

.cmdbar--hero, .book .cmdbar { width: 100%; max-width: 560px; margin: 10px 0 18px; }
.book .cmdbar__out { display: none; }

.act { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 560px; }
.act .gel--enter { width: 100%; }

/* the ANS readout = CA box */
.ans {
  border-radius: 14px;
  padding: 10px 10px 12px;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(57, 45, 24, .28), 0 10px 22px rgba(48, 39, 23, .16);
  transition: transform .2s ease;
}
.ans__label { font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 4px 8px; }
.ans__label b { color: var(--amber-text); margin-right: 6px; }
#ca-copy {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 10px 10px 10px 14px;
  border: 0; border-radius: 9px; cursor: pointer; text-align: left;
  background-color: var(--night);
  background-image: radial-gradient(120% 140% at 20% 0%, #2a2219 0%, var(--night) 60%);
  color: var(--on-night);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .7), 0 1px 0 #fff;
  transition: box-shadow .25s ease, background-color .3s ease, transform .2s ease;
}
#ca-text { flex: 1; min-width: 0; font-family: var(--fm); font-size: 13px; line-height: 1.4; word-break: break-all; color: var(--on-night); }
.ca__tap {
  flex: none;
  font-family: var(--fm); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 9px; border-radius: 7px;
  color: var(--ink);
  background-color: #efeae2;
  background-image: linear-gradient(180deg, #fff, #d9d1c3);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--c4);
}
#ca-copy:hover .ca__tap { transform: translateY(1px); }
#ca-copy.is-copied { transform: translateY(2px); background-color: #3b2a10; background-image: radial-gradient(120% 140% at 30% 0%, #6a4a17 0%, #2e2010 70%); box-shadow: inset 0 4px 14px rgba(0, 0, 0, .8), 0 0 18px rgba(233, 173, 73, .35); }
html.ca-copied .ans { transform: translateY(1px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 7px 12px;
  border-radius: 9px;
  font-family: var(--fb); font-weight: 600; font-size: 13px;
  color: var(--ink); text-decoration: none;
  background-color: #f4efe6;
  background-image: linear-gradient(180deg, #fff, #e7e0d4);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--c3), 0 4px 8px rgba(48, 39, 23, .12);
  transition: transform .14s ease;
}
.chip:hover { transform: translateY(-2px); }
.chip img { width: 18px; height: 18px; }

/* ---- the diorama ------------------------------------------------------- */
.popup {
  --yaw: -9deg; --pitch: 5deg; --fold: 0; --yaw-n: 0;
  position: relative;
  order: -1;
  width: min(316px, 86vw);
  aspect-ratio: 720 / 760;
  margin: 0 0 0 auto;
  container-type: inline-size;
  perspective: 1400px;
  perspective-origin: 50% 40%;
  pointer-events: none;
}
.popup * { pointer-events: none; }
.popup__stage {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--pitch) + var(--fold) * 18deg)) rotateY(var(--yaw));
}
.plane {
  --z: 0px; --zg: 40;
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--z) * (1 - var(--fold) * .85)));
}
.shade {
  position: absolute;
  background: rgba(0, 0, 0, .55);
  filter: blur(7px);
  transform: translate3d(calc(var(--zg) * (.06 + var(--yaw-n) * .04) * 1px), calc(var(--zg) * .1 * (1 - var(--fold)) * 1px), calc(var(--zg) * -.5px));
}
.p0 { --z: -110px; --zg: 50; }
.p1 { --z: -70px; --zg: 50; }
.p2 { --z: -30px; --zg: 40; }
.p3 { --z: 20px; --zg: 70; }
.p4 { --z: 55px; --zg: 40; }
.p5 { --z: 95px; --zg: 40; }

.graph {
  position: absolute; left: 2%; top: 8%; width: 74%; height: 60%;
  background-color: #fbf6ec;
  background-image: linear-gradient(rgba(143, 97, 20, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 97, 20, .16) 1px, transparent 1px);
  background-size: 4.6cqi 4.6cqi;
  border-radius: 3px 3px 18px 3px;
  box-shadow: 0 0 0 1px rgba(57, 45, 24, .18), inset 0 1px 0 #fff;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 92% 92%, 84% 87%, 76% 94%, 66% 89%, 56% 96%, 45% 90%, 33% 97%, 20% 91%, 9% 97%, 0 92%);
}
.shade--card { left: 3%; top: 9%; width: 72%; height: 58%; }
.graph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph__axis { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.graph__curve { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.graph__lbl { position: absolute; font-family: var(--fm); font-size: 2.3cqi; color: var(--ink); letter-spacing: .06em; }
.graph__lbl--y { left: 12%; top: 6%; }
.graph__lbl--x { right: 6%; bottom: 18%; }

.print {
  position: absolute; left: 34%; top: 4%; width: 60%; margin: 0;
  padding: 1.4cqi;
  border-radius: 2cqi;
  background: var(--chrome);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(57, 45, 24, .3);
  transform: rotate(-4deg);
}
.print img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 66% 55%; border-radius: 1.2cqi; }
.print::before {
  content: "+--- 9/n ---+";
  position: absolute; left: 4cqi; top: 2.4cqi; z-index: 1;
  font-family: var(--fm); font-size: 1.9cqi; color: var(--on-night-soft); letter-spacing: .04em;
}
.shade--print { left: 35%; top: 6%; width: 60%; height: 42%; border-radius: 2cqi; transform: rotate(-4deg) translate3d(calc(var(--zg) * (.06 + var(--yaw-n) * .04) * 1px), calc(var(--zg) * .1 * (1 - var(--fold)) * 1px), -20px); }

.cutlet { position: absolute; font-family: var(--fd); line-height: 1; -webkit-text-stroke: .25cqi rgba(57, 45, 24, .55); filter: drop-shadow(.6cqi 1cqi 0 rgba(48, 39, 23, .25)); }
.cutlet--inf { left: 1%; top: 54%; font-size: 20cqi; color: var(--on-night); }
.cutlet--frac { right: 1%; top: 47%; font-size: 9cqi; transform: rotate(6deg); color: var(--on-night); }

.star {
  position: absolute; display: block;
  width: 7cqi; aspect-ratio: 1;
  background: linear-gradient(135deg, #fff 0%, #cfc6b8 40%, #6f6452 52%, #fff3d9 62%, #b9b0a2 100%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 0 transparent);
}
.star--1 { left: 64%; top: 1%; }
.star--2 { left: 28%; top: 70%; width: 4.5cqi; }
.star--3 { right: 4%; top: 18%; width: 11cqi; filter: blur(1.5px); }
.star--4 { position: absolute; right: 14px; top: 14px; width: 36px; }

.stand {
  position: absolute; left: 18%; bottom: 3%; width: 70%;
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--fold) * 70deg));
}
.stand__img { position: relative; width: 100%; filter: drop-shadow(0 0 .45cqi #fff) drop-shadow(0 0 .2cqi #fff); }
.shade--stand {
  inset: 0;
  background: url("../img/cutout.png") center / contain no-repeat;
  filter: brightness(0) blur(6px);
  opacity: .3;
  transform: translate3d(calc(var(--zg) * (.06 + var(--yaw-n) * .04) * 1px), calc(var(--zg) * .06 * (1 - var(--fold)) * 1px), -30px);
}
.stand__tab {
  position: absolute; left: 6%; right: 6%; bottom: -3%; height: 5%;
  background: linear-gradient(180deg, #e6dccb 0%, #fbf6ec 48%, #d9ccb4 52%, #f4ecdd 100%);
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
  box-shadow: 0 2px 4px rgba(48, 39, 23, .25);
  transform: rotateX(70deg);
  transform-origin: 50% 0;
}

.readout {
  position: absolute; right: 2%; top: 63%;
  padding: 1cqi 2cqi;
  font-family: var(--fm); font-size: 4.2cqi; color: var(--on-night);
  background: var(--night);
  border-radius: 1.4cqi;
  box-shadow: 0 0 0 .5cqi #ddd5c7, 0 0 0 .7cqi var(--c4), .8cqi 1.4cqi 1.4cqi rgba(48, 39, 23, .3);
  transform: rotate(-3deg);
}
.pencil--small { right: -2%; top: 58%; width: 22cqi; height: 14cqi; }

.tape {
  position: absolute; left: -4%; bottom: 10%; display: block;
  width: 36%; height: 6.4cqi;
  background: linear-gradient(180deg, rgba(255, 235, 190, .55), rgba(233, 173, 73, .55) 50%, rgba(255, 220, 150, .5));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
  transform: rotate(-14deg);
  clip-path: polygon(0 8%, 3% 0, 97% 4%, 100% 14%, 98% 92%, 100% 100%, 2% 96%, 0 88%);
}
.hint { display: none; }

@media (min-width: 1000px) {
  .book { padding: 84px 0 20px; }
  .book__board {
    display: grid;
    grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
    align-items: center;
    width: min(1380px, 100% - 56px);
    min-height: min(800px, calc(100vh - 104px));
    padding: 28px 24px 24px 44px;
  }
  .book__left { padding: 0; --leftw: 556px; }
  .tag { margin: 0 0 18px 4px; }
  .tag span { font-size: 12px; }
  .badge { font-size: min(76px, calc((var(--leftw) / var(--wide) - 70px) / 6)); }
  .badge--b { margin: -12px 0 0 24px; }
  .book .cmdbar__out { display: block; }
  .act { flex-direction: row; align-items: flex-start; max-width: 600px; }
  .act .gel--enter { width: auto; flex: none; min-width: 200px; }
  .ans { flex: 1; min-width: 0; }
  .popup { order: 0; width: min(100%, 700px); margin: 0 auto; }
  .hint {
    display: block; position: absolute; left: 4%; top: 2%;
    font-family: var(--fm); font-size: 12px; letter-spacing: .14em; color: var(--on-night-soft);
    transition: opacity .6s ease;
  }
  html.moved .hint { opacity: 0; }
  .p0 { --z: -220px; --zg: 90; }
  .p1 { --z: -140px; --zg: 80; }
  .p2 { --z: -60px; --zg: 60; }
  .p3 { --z: 40px; --zg: 110; }
  .p4 { --z: 110px; --zg: 60; }
  .p5 { --z: 190px; --zg: 60; }
}

/* ==========================================================================
   #story · > lore --nine-lives
   ========================================================================== */
.lore { padding: 72px 0 80px; }
.lore__lede { font-size: 18px; line-height: 1.6; margin: 0 0 28px; max-width: 34ch; color: var(--on-night); }
.big {
  font-family: var(--fd);
  font-weight: 400;
  font-size: clamp(32px, 8vw, 68px);
  line-height: 1.02;
  margin: 0 0 22px;
}
.big .metal { display: block; -webkit-text-stroke: 1px var(--deep); padding-bottom: .04em; }
.big .metal--slant { transform: skewX(-9deg); transform-origin: 0 100%; }
.note { font-family: var(--fm); font-size: 13px; color: var(--on-night-soft); display: flex; gap: 8px; max-width: 36ch; }
.note__arrow { color: var(--amber); font-size: 18px; line-height: 1; }

.fan { display: grid; gap: 20px; margin-top: 40px; }
.card {
  --rot: 0deg; --off: 0px;
  position: relative;
  color: var(--ink);
  padding: 58px 24px 24px;
  border-radius: 6px;
  background-color: #fbf7ef;
  background-image: linear-gradient(180deg, #fffdf8, #f3ecdf);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(57, 45, 24, .14), 0 14px 28px rgba(48, 39, 23, .14);
  transform: rotate(var(--rot)) translateX(var(--off));
}
.card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 14px;
  border-radius: 6px 6px 0 0;
  background-image: var(--perl), var(--chrome);
  background-size: 18px 18px, 100% 100%;
  box-shadow: inset 0 -1px 0 rgba(57, 45, 24, .3);
}
.card:nth-child(1) { --rot: -1deg; }
.card:nth-child(2) { --rot: .8deg; }
.card:nth-child(3) { --rot: -.6deg; }
.card__num {
  position: absolute; left: 22px; top: 22px;
  min-width: 46px; height: 30px; padding: 0 10px;
  display: inline-grid; place-items: center;
  font-family: var(--fd); font-size: 18px; line-height: 1;
  color: var(--on-night);
  background: var(--night);
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ddd5c7, 0 0 0 3px var(--c4);
}
.card h3 { font-family: var(--fb); font-weight: 700; font-size: 22px; line-height: 1.2; margin: 6px 0 8px; }
.card p { font-size: 16px; color: var(--ink-soft); }

@media (min-width: 1000px) {
  .lore { padding: 120px 0 130px; }
  .lore__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .lore__lede { display: none; }
  .big { font-size: 64px; }
  .fan { margin-top: 0; gap: 26px; }
  .card { padding: 30px 32px 30px 112px; }
  .card__num { top: 30px; left: 28px; }
  .card:nth-child(1) { --rot: -2deg; --off: 0px; }
  .card:nth-child(2) { --rot: 1deg; --off: 48px; }
  .card:nth-child(3) { --rot: -1deg; --off: 16px; }
}

/* ==========================================================================
   Gallery · > plot(9/n)
   ========================================================================== */
.plot { padding: 40px 0 90px; overflow-x: clip; counter-reset: pt; }
.plot__label { color: var(--on-night-soft); }
.plot__field {
  position: relative;
  padding: 24px 12px 24px 28px;
  border-radius: 6px;
  background-color: #fbf6ec;
  background-image: linear-gradient(rgba(143, 97, 20, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 97, 20, .12) 1px, transparent 1px);
  background-size: 32px 32px;
  box-shadow: 0 0 0 1px rgba(57, 45, 24, .14), 0 20px 40px rgba(48, 39, 23, .1);
  overflow: clip;
}
.plot__curve { position: absolute; left: 14px; top: 0; width: 10px; height: 100%; }
.plot__curve polyline, .plot__curve circle, .plot__axis { display: none; }
.plot__field::before {
  content: ""; position: absolute; left: 14px; top: 16px; bottom: 16px; width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--amber), rgba(233, 173, 73, .25));
}
.plot__pts { display: flex; flex-direction: column; align-items: flex-end; gap: 28px; }
.plot figure {
  --dx: 30px; --dy: 10px;
  counter-increment: pt;
  position: relative;
  margin: 0;
  padding: 26px 10px 10px;
  border-radius: 10px;
  background-color: var(--night);
  background-image: linear-gradient(var(--amber), var(--amber)), linear-gradient(var(--amber), var(--amber));
  background-size: 1px calc(100% - 44px), 1px calc(100% - 44px);
  background-position: 4px 26px, calc(100% - 4px) 26px;
  background-repeat: no-repeat;
  color: var(--on-night-soft);
  box-shadow: 0 0 0 3px #ddd5c7, 0 0 0 4px var(--c4), 0 14px 26px rgba(48, 39, 23, .2);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
.plot figure::before {
  content: "+--- n = " counter(pt) " ---+";
  position: absolute; left: 12px; top: 6px;
  font-family: var(--fm); font-size: 12px; letter-spacing: .04em; color: var(--amber);
}
.plot figure::after {
  content: "●";
  position: absolute; left: -26px; top: 22px;
  font-size: 14px; line-height: 1; color: var(--amber-deep);
}
.plot figure img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; border: 1px dashed rgba(246, 241, 234, .35); }
.plot figcaption {
  font-family: var(--fm); font-size: 12px; line-height: 1.5;
  padding: 8px 4px 2px;
  color: var(--on-night-soft);
}
.plot figcaption::before { content: "+-- "; color: var(--amber); }
.plot figcaption::after { content: " --+"; color: var(--amber); }
.plot figure:nth-child(1) { width: 100%; }
.plot figure:nth-child(2) { width: 92%; }
.plot figure:nth-child(3) { width: 84%; }
.plot figure:nth-child(4) { width: 76%; }
.plot figure:nth-child(5) { width: 70%; }
.plot figure:nth-child(6) { width: 64%; }
.plot figure:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 0 0 3px #ddd5c7, 0 0 0 4px var(--c4), 0 26px 40px rgba(48, 39, 23, .3); }

@media (min-width: 1000px) {
  .plot { padding: 60px 0 80px; }
  .plot__eq { display: block; }
  .plot__field { padding: 0; aspect-ratio: 1240 / 980; overflow: visible; }
  .plot__field::before { display: none; }
  .plot__curve { left: 0; top: 0; width: 100%; height: calc(100% * 960 / 980); }
  .plot__curve polyline { display: inline; fill: none; stroke: var(--amber); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .plot__curve circle { display: inline; fill: var(--amber-deep); }
  .plot__axis { display: inline; fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
  .plot__pts { display: block; position: absolute; inset: 0; }
  .plot figure { position: absolute; padding: 24px 8px 8px; }
  .plot figure::after { display: none; }
  .plot figcaption { font-size: 11px; }
  .plot figure:nth-child(1) { left: 1%; top: 1.4%; width: 23%; --dx: 90px; --dy: 40px; }
  .plot figure:nth-child(2) { left: 24.6%; top: 33%; width: 19.2%; --dx: 110px; --dy: 30px; }
  .plot figure:nth-child(3) { left: 44.6%; top: 48%; width: 16%; --dx: 130px; --dy: 18px; }
  .plot figure:nth-child(4) { left: 61.4%; top: 56.5%; width: 13.8%; --dx: 150px; --dy: 10px; }
  .plot figure:nth-child(5) { left: 76.2%; top: 61.5%; width: 12%; --dx: 170px; --dy: 6px; }
  .plot figure:nth-child(6) { left: 89%; top: 65%; width: 10.6%; --dx: 190px; --dy: 4px; }
  .plot figure:nth-child(5) figcaption, .plot figure:nth-child(6) figcaption { font-size: 10px; }
}

/* ==========================================================================
   #play · > run naptest
   ========================================================================== */
.naptest { padding: 60px 0 90px; }
.naptest__how { font-size: 16px; color: var(--on-night-soft); max-width: 34ch; margin-bottom: 32px; }
.pad {
  border-radius: 28px;
  padding: 16px 16px 20px;
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(57, 45, 24, .18), 0 0 0 1px rgba(57, 45, 24, .3), 0 30px 60px rgba(48, 39, 23, .22);
  max-width: 560px;
}
.pad__lcd { padding: 16px 18px; margin-bottom: 18px; border-radius: 14px; }
.pad__read { display: flex; justify-content: space-between; gap: 12px; font-family: var(--fm); font-size: 14px; color: var(--on-night-soft); }
.pad__read b { color: var(--on-night); font-weight: 700; }
.pad__ans { font-family: var(--fm); font-weight: 700; letter-spacing: -.02em; font-size: 56px; line-height: 1.1; color: var(--amber); text-shadow: 0 0 18px rgba(233, 173, 73, .35); text-align: right; margin: 4px 0; overflow: hidden; white-space: nowrap; text-overflow: clip; }
.pad__msg { font-family: var(--fm); font-size: 13px; color: var(--on-night); min-height: 1.5em; }
.pad__count { font-family: var(--fm); font-size: 12px; letter-spacing: .08em; color: var(--on-night-soft); margin-top: 4px; }
.pad__count b { color: var(--amber); }
.pad__keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.pkey {
  position: relative;
  aspect-ratio: 1;
  border: 0; border-radius: 16px;
  padding: 0;
  cursor: pointer;
  background-color: #ece6dc;
  background-image: linear-gradient(180deg, #fff 0%, #ebe5da 50%, #d6cdbd 100%);
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 var(--c4), 0 8px 14px rgba(48, 39, 23, .2);
  transition: transform .1s ease, box-shadow .1s ease;
  perspective: 400px;
  touch-action: manipulation;
}
.pkey:active, .pkey.is-hit { transform: translateY(3px); box-shadow: inset 0 2px 6px rgba(48, 39, 23, .3), 0 1px 0 var(--c4); }
.pkey__win {
  position: absolute; left: 14%; right: 14%; top: 12%; bottom: 26%;
  border-radius: 10px;
  background-color: var(--night);
  background-image:
    linear-gradient(155deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .03) 38%, rgba(255, 255, 255, 0) 40%),
    radial-gradient(circle, rgba(246, 241, 234, .09) 1px, transparent 1.4px),
    radial-gradient(120% 120% at 50% 0%, #2a2219, var(--night) 70%);
  background-size: 100% 100%, 6px 6px, 100% 100%;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .7), 0 1px 0 #fff;
  transform-style: preserve-3d;
  overflow: visible;
}
.pkey__n { position: absolute; left: 0; right: 0; bottom: 6%; font-family: var(--fm); font-size: 12px; color: var(--ink-soft); }
.pkey__tab, .pkey__err {
  position: absolute; left: 8%; right: 8%; bottom: 4%; top: 4%;
  display: grid; place-items: center;
  border-radius: 8px;
  transform-origin: 50% 100%;
  transform: rotateX(88deg);
  opacity: 0;
  transition: transform .14s cubic-bezier(.2, 1.4, .4, 1), opacity .1s linear;
}
.pkey__tab { background: #fbf6ec; padding: 3px; box-shadow: 0 3px 6px rgba(0, 0, 0, .45); }
.pkey__tab img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.pkey__err { font-family: var(--fm); font-size: 12px; font-weight: 700; color: var(--night); background: var(--c2); box-shadow: inset 0 0 0 2px var(--amber-deep); }
.pkey.is-up .pkey__tab, .pkey.is-up .pkey__err { transform: rotateX(0deg); opacity: 1; }
.gel--run { width: 100%; font-family: var(--fm); letter-spacing: .2em; }
.gel--run {
  color: var(--ink);
  background-color: #efeae2;
  background-image: linear-gradient(180deg, #fff 0%, #ece6dc 50%, #d3cab9 100%);
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 var(--c4), 0 10px 20px rgba(57, 45, 24, .2);
}
.gel--run:active { box-shadow: inset 0 2px 5px rgba(48, 39, 23, .3), 0 1px 0 var(--c4); }

@media (min-width: 1000px) {
  .naptest { padding: 40px 0 90px; }
  .naptest__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .naptest__head { padding-top: 24px; }
  .pad { max-width: 620px; padding: 22px 26px 26px; justify-self: end; width: 100%; }
  .pad__keys { gap: 16px; }
  .pad__ans { font-size: 68px; }
}

/* ==========================================================================
   #buy · > buy --steps
   ========================================================================== */
.buy { padding: 40px 0 100px; }
.buy__grid { display: grid; gap: 28px; }
.listing { list-style: none; margin: 0; padding: 22px 20px; display: grid; gap: 18px; }
.listing li { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 14px; align-items: baseline; padding-bottom: 16px; border-bottom: 1px dashed rgba(246, 241, 234, .2); }
.listing li:last-child { border-bottom: 0; padding-bottom: 0; }
.ln { font-family: var(--fm); font-size: 13px; color: var(--amber); }
.op { font-family: var(--fm); font-size: 13px; letter-spacing: .14em; color: var(--on-night); }
.listing p { grid-column: 1 / -1; font-size: 16px; color: var(--on-night); }
.mini { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 0 6px 0 2px; vertical-align: -7px; border-radius: 7px; background: #f4efe6; }
.plinth {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px;
  padding: 28px 24px;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(57, 45, 24, .3), 0 24px 44px rgba(48, 39, 23, .18);
}
.plinth__label { font-family: var(--fm); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); }
.plinth__note { font-size: 14px; color: var(--ink-soft); }
.gel--big { width: 100%; }

@media (min-width: 1000px) {
  .buy { padding: 40px 0 110px; }
  .buy__grid { grid-template-columns: 7fr 4fr; gap: 40px; align-items: stretch; }
  .listing { padding: 32px 36px; }
  .listing p { grid-column: 3; }
  .gel--big { min-height: 88px; font-size: 24px; }
}

/* ==========================================================================
   Footer · the back plate
   ========================================================================== */
.backplate { padding: 0 8px 8px; }
.backplate__plate {
  position: relative;
  max-width: 1380px; margin: 0 auto;
  padding: 10px;
  border-radius: 26px;
  background-image: var(--perl), var(--chrome);
  background-size: 28px 28px, 100% 100%;
  background-color: var(--c2);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(57, 45, 24, .3), 0 -10px 30px rgba(48, 39, 23, .1);
}
.backplate__in {
  display: grid; gap: 28px;
  padding: 40px 24px 36px;
  border-radius: 18px;
  background-color: var(--night);
  background-image: radial-gradient(100% 120% at 0% 0%, #2a2219, var(--night) 60%);
  color: var(--on-night);
  box-shadow: inset 0 3px 14px rgba(0, 0, 0, .7);
}
.backplate__name { font-family: var(--fd); font-size: clamp(30px, 9vw, 64px); line-height: 1.05; margin-bottom: 10px; }
.serial { font-family: var(--fm); font-size: 11px; letter-spacing: .22em; color: var(--on-night-soft); margin-bottom: 18px; }
.cmd--foot { font-size: 14px; }
.backplate__links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.backplate__links a { color: var(--on-night); font-weight: 600; text-underline-offset: 3px; }
.backplate__links a:hover { color: var(--amber); }
.legal { font-size: 14px; line-height: 1.6; color: var(--on-night-soft); max-width: 60ch; }
.screw {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #fff, #b9b0a2 55%, #6f6452);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
}
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 6px; height: 2px; background: #4a3d27; border-radius: 1px; }
.screw--1 { left: 14px; top: 14px; } .screw--2 { right: 14px; top: 14px; }
.screw--3 { left: 14px; bottom: 14px; } .screw--4 { right: 14px; bottom: 14px; }
.screw--2::after { transform: rotate(40deg); } .screw--3::after { transform: rotate(-30deg); } .screw--4::after { transform: rotate(80deg); }

@media (min-width: 1000px) {
  .backplate { padding: 0 28px 28px; }
  .backplate__in { grid-template-columns: 1.1fr 1fr; gap: 56px; padding: 56px 64px 52px; align-items: end; }
}

/* ---- 404 ------------------------------------------------------------------ */
.lost__main { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.lost__card {
  width: min(560px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 32px 20px 26px;
  border-radius: 28px;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(57, 45, 24, .3), 0 30px 60px rgba(48, 39, 23, .2);
  text-align: center;
}
.bezel--lost { width: 84px; height: 84px; padding: 5px; }
.lost__lcd { width: 100%; padding: 20px 18px 24px; text-align: left; }
.lost__title { font-family: var(--fb); font-weight: 700; font-size: clamp(22px, 6vw, 30px); line-height: 1.25; color: var(--on-night); margin-top: 12px; }
.lost__err { font-family: var(--fm); color: var(--amber); }
.lost__title em { display: block; color: var(--amber); font-family: var(--fd); font-style: normal; font-weight: 400; font-size: clamp(30px, 9vw, 48px); line-height: 1.1; margin-top: 8px; transform: skewX(-9deg); transform-origin: 0 100%; }
.lost__name { font-family: var(--fm); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- the mercury overlay (CA copy) -------------------------------------- */
.merc { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; overflow: visible; }

/* ==========================================================================
   Motion (only with js/site.js running and motion on)
   ========================================================================== */
[data-slam="1"] { --k: 0; } [data-slam="2"] { --k: 1; } [data-slam="3"] { --k: 2; }
[data-slam="4"] { --k: 3; } [data-slam="5"] { --k: 4; } [data-slam="6"] { --k: 5; }
[data-slam="7"] { --k: 6; } [data-slam="8"] { --k: 7; } [data-slam="9"] { --k: 8.4; }
[data-slam="10"] { --k: 9.4; } [data-slam="11"] { --k: 10.2; } [data-slam="12"] { --k: 10.8; }

html.js.sj:not(.rm) [data-slam] {
  animation: clunk .32s cubic-bezier(.2, 1.5, .35, 1) both;
  animation-delay: calc(var(--k) * 150ms + 120ms);
}
html.js.sj:not(.rm) .stand[data-slam] { animation-name: hingeup; animation-duration: .5s; }
html.js.sj:not(.rm) [data-slam="11"], html.js.sj:not(.rm) [data-slam="12"] { animation-name: seat; animation-duration: .36s; }

@media (prefers-reduced-motion: no-preference) {
  html.js.sj:not(.rm) .cmd[data-type] .t { width: 0; }
}
html.js.sj:not(.rm) .cmd[data-type].is-typing .t { animation: typeon calc(var(--len, 16) * 28ms) steps(var(--len, 16), end) forwards; }

html.js.sj:not(.rm) .fan:not(.is-out) .card { opacity: 0; }
html.js.sj:not(.rm) .fan.is-out .card { animation: fanout .75s cubic-bezier(.2, .9, .25, 1) both; }
html.js.sj:not(.rm) .fan.is-out .card:nth-child(2) { animation-delay: .07s; }
html.js.sj:not(.rm) .fan.is-out .card:nth-child(3) { animation-delay: .14s; }

html.js.sj:not(.rm) .plot figure {
  translate: calc((1 - var(--t, 1)) * var(--dx)) calc((1 - var(--t, 1)) * var(--dy));
  opacity: clamp(0, calc(var(--t, 1) * 1.8 - .3), 1);
}

html.js.sj:not(.rm) .pad:not(.is-in) .pkey { opacity: 0; }
html.js.sj:not(.rm) .pad.is-in .pkey { animation: seat .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.pkey:nth-child(2), .pkey:nth-child(4) { --d: 1; }
.pkey:nth-child(3), .pkey:nth-child(5), .pkey:nth-child(7) { --d: 2; }
.pkey:nth-child(6), .pkey:nth-child(8) { --d: 3; }
.pkey:nth-child(9) { --d: 4; }
html.js.sj:not(.rm) .pad.is-in .pkey { animation-delay: calc(var(--d, 0) * 70ms); }

html.js.sj:not(.rm) .listing:not(.is-in) li { opacity: 0; }
html.js.sj:not(.rm) .listing.is-in li { animation: seat .4s ease both; }
html.js.sj:not(.rm) .listing.is-in li:nth-child(2) { animation-delay: .25s; }
html.js.sj:not(.rm) .listing.is-in li:nth-child(3) { animation-delay: .5s; }

html.js.sj:not(.rm) .backplate.is-in .screw { animation: screw .9s cubic-bezier(.3, 1.3, .5, 1) both; }

@keyframes clunk {
  from { translate: 0 0 420px; scale: 1.3; opacity: 0; }
  60% { opacity: 1; }
  to { translate: 0 0 0; scale: 1; opacity: 1; }
}
@keyframes hingeup {
  from { rotate: x 88deg; opacity: 0; }
  30% { opacity: 1; }
  to { rotate: x 0deg; opacity: 1; }
}
@keyframes seat {
  from { translate: 0 -6px; opacity: 0; }
  70% { translate: 0 1px; opacity: 1; }
  to { translate: 0 0; opacity: 1; }
}
@keyframes typeon { to { width: calc(var(--len, 16) * 1ch); } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes fanout {
  0% { transform: translateY(90px) rotate(0deg) translateX(0); opacity: 0; }
  45% { transform: translateY(0) rotate(0deg) translateX(0); opacity: 1; }
  100% { transform: rotate(var(--rot)) translateX(var(--off)); opacity: 1; }
}
@keyframes gelroll { to { transform: translateX(560%) skewX(-18deg); } }
@keyframes screw { from { rotate: -90deg; } to { rotate: 0deg; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
html.rm *, html.rm *::before, html.rm *::after { animation: none !important; transition: none !important; }
