/* ==========================================================================
 INSTRUMENT: the shared physical-instrument look for Magnum Vault tool pages.

 EXTRACTED from public/calculator/index.html (Liberation Rate Calculator
 V2.3.0) at commit 62fff82. Every declaration below is the calculator's own
 rule, with one change: the page prefix `lr-` is renamed `ins-` so the layer
 can be shared. Where the calculator and the ACF page (public/acf/index.html,
 V3.0.0, prefix `acf-`) differ, the calculator's value is used. Layout
 choices that belong to one tool (device width, printer, keypad, days,
 steppers, tape rows, stage keys, deck) stay inline in that tool's page.

 STATUS: public/calculator/index.html and public/acf/index.html STILL CARRY
 their own inline copies of these rules. They should adopt this file (swap
 `lr-` / `acf-` classes for `ins-`, or alias them) so there is exactly one
 source. Until they do, a change here does not reach them. First consumer:
 public/vox/index.html (Magnum Vox page V2.1.0).

 Contents (third revision: paper tape is a flat panel, fluid .ins-fluid scale replaces zoom): tokens, page reset, shimmer title, device casing and bolts, plate,
 display (screen), rule line, tray, engraved labels, slot, 3D keys, cards,
 video facade, details key, definition list, tool link keys, maker plate,
 phone rules, reduced motion. Pure CSS, no images, no new fonts: Russo One
 and Inter as the shell loads them. No pills, no italics.
 ========================================================================== */

:root {
  --ins-gold: #fabd59;
  --ins-gold-soft: #f0c173;
  --ins-glow: #ffcf70;
  --ins-engrave: #b9ad8f;
  --ins-muted: #a3a3a3;
  --ins-soft: #cfcfcf;
  --ins-body: #e8e8e8;
  --ins-ink: #f1e8d0;
  --ins-err: #DC143C;
  --ins-err-text: #ff8aa0;
  --ins-head: 'Russo One', Impact, 'Arial Narrow', sans-serif;
  --ins-font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ins-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --ins-stick: 60px;
}
.ins-page, .ins-page * { box-sizing: border-box; font-style: normal; }
body.instrument-page { max-width: 100%; overflow-x: hidden; overflow-x: clip; }
.ins-page [hidden] { display: none !important; }
.ins-page { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 14px 20px 30px; font-family: var(--ins-font); font-size: 14px; line-height: 1.4; color: var(--ins-body); }
:where(.ins-page) :is(h1, h2, h3, p, dl, dd, fieldset) { margin: 0; padding: 0; }
.ins-page fieldset { border: 0; min-width: 0; }

/* title: the Social page's shimmer recipe, kept small */
.ins-title { text-align: center; margin: 0 0 16px; font-family: var(--ins-head); font-weight: 400; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.1; letter-spacing: 3px; text-transform: uppercase;
  background: linear-gradient(100deg, #b8862b 0%, #fabd59 35%, #fff2c9 50%, #fabd59 65%, #b8862b 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: ins-shimmer 6s linear infinite; }
@keyframes ins-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.ins-wrap { width: 908px; max-width: 100%; margin: 0 auto; }

/* ================= THE DEVICE ================= */
.ins-device { border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.075) 0, rgba(255,255,255,0) 36px) padding-box,
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px) padding-box,
    linear-gradient(150deg, #36363d 0%, #1e1e23 40%, #121215 100%) padding-box,
    linear-gradient(145deg, #ffe7b0 0%, #fabd59 22%, #8a6420 55%, #fabd59 80%, #ffe3a6 100%) border-box; }
.ins-device { position: relative; width: 100%; min-width: 0; padding: 14px 16px 30px; border-radius: 10px;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.17),
    inset 0 -3px 6px rgba(0,0,0,0.5),
    1px 2px 0 #7a5a1a, 2px 4px 0 #5c4413, 3px 6px 0 #45330e, 3px 8px 0 #2e220a, 4px 10px 0 #1d1506, 4px 12px 0 #120d04, 4px 14px 0 #0a0702,
    0 22px 16px -4px rgba(0,0,0,0.75), 0 40px 70px rgba(0,0,0,0.55);
  margin-bottom: 18px; }
.ins-bolt { position: absolute; width: 9px; height: 9px; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: linear-gradient(135deg, #ffe3a6, #8a6420); }
.ins-bolt.a { top: 6px; left: 7px; } .ins-bolt.b { top: 6px; right: 7px; } .ins-bolt.c { bottom: 6px; left: 7px; } .ins-bolt.d { bottom: 6px; right: 7px; }
.ins-plate { text-align: center; font-family: var(--ins-head); font-size: 10.5px; letter-spacing: 4px; text-transform: uppercase; color: var(--ins-gold); text-shadow: 0 -1px 0 rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.1); margin: 0 0 9px; opacity: 0.9; }

/* ---- display: recessed dark-amber glass ---- */
.ins-screen { position: relative; z-index: 6; overflow: hidden; border-radius: 8px; padding: 10px 16px 9px; background: linear-gradient(180deg, #0a0804 0%, #15100a 100%); border: 1px solid #000;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.95), inset 0 0 0 2px #1d1911, 0 0 0 3px #09090b, 0 1px 0 3px rgba(255,255,255,0.1); }
.ins-screen::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px); }
.ins-screen::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46%; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0)); border-radius: 8px 8px 60% 60% / 8px 8px 14px 14px; }
.ins-scr-tag { position: relative; z-index: 1; font-family: var(--ins-head); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: rgba(250,189,89,0.55); }
.ins-reads { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 4px; border-top: 1px solid rgba(250,189,89,0.16); }
.ins-cell { padding: 6px 4px 0 12px; border-left: 1px solid rgba(250,189,89,0.16); min-width: 0; }
.ins-cell:first-child { border-left: 0; padding-left: 0; }
.ins-lbl { display: block; font-family: var(--ins-head); font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(250,189,89,0.6); }
.ins-val { display: block; font-family: var(--ins-head); font-size: 21px; line-height: 1.2; color: var(--ins-glow); text-shadow: 0 0 5px rgba(250,189,89,0.28); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ins-val.is-dim { color: rgba(250,189,89,0.22); text-shadow: none; }
.ins-scr-msg { position: relative; z-index: 1; min-height: 17px; margin-top: 6px; font-size: 12px; line-height: 1.35; color: rgba(250,189,89,0.62); }
.ins-scr-msg.is-bad { color: var(--ins-err-text); }

.ins-rule { margin: 11px 2px 0; padding-left: 9px; border-left: 2px solid var(--ins-gold); font-size: 12.5px; color: #d8cfb8; text-shadow: 0 1px 0 rgba(0,0,0,0.8); }

/* ---- tray: inset panel the controls sit in ---- */
.ins-tray { margin-top: 11px; padding: 12px 12px 10px; border-radius: 10px; background: linear-gradient(180deg, rgba(0,0,0,0.38), rgba(0,0,0,0.2)); box-shadow: inset 0 3px 8px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.07); display: grid; gap: 13px; }
.ins-eng { display: block; font-family: var(--ins-head); font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ins-engrave); text-shadow: 0 1px 0 rgba(0,0,0,0.9), 0 -1px 0 rgba(255,255,255,0.05); margin: 0 0 4px; padding: 0; }
.ins-cap { display: block; font-family: var(--ins-font); font-size: 10.5px; letter-spacing: 0.2px; text-transform: none; color: #8f8873; margin-top: 1px; }
.ins-field { min-width: 0; }
.ins-slot { display: flex; align-items: center; min-height: 42px; border-radius: 6px; background: linear-gradient(180deg, #060503, #0f0c07); border: 1px solid #000; box-shadow: inset 0 3px 7px rgba(0,0,0,0.95), 0 1px 0 rgba(255,255,255,0.1); }
.ins-slot:focus-within { outline: 2px solid var(--ins-gold); outline-offset: 1px; }

/* ---- 3D keys ---- */
.ins-key { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid #000; margin: 0;
  background: linear-gradient(180deg, #4a4a52 0%, #303036 52%, #26262b 100%); color: #ece4cf; font-family: var(--ins-head); font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; text-decoration: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.26), inset 0 -2px 3px rgba(0,0,0,0.4), 0 4px 0 #09090b, 0 5px 0 rgba(0,0,0,0.55), 0 9px 10px rgba(0,0,0,0.5);
  transition: transform 0.06s ease, box-shadow 0.06s ease, filter 0.15s ease; }
.ins-key:hover:not(:disabled) { filter: brightness(1.12); }
.ins-key:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -1px 2px rgba(0,0,0,0.4), 0 1px 0 #09090b, 0 2px 3px rgba(0,0,0,0.5); }
.ins-key:focus-visible { outline: 2px solid var(--ins-gold); outline-offset: 3px; }
.ins-key:disabled { opacity: 0.4; cursor: not-allowed; }
.ins-primary { background: linear-gradient(180deg, #e8b255 0%, #d09a3e 50%, #b8802c 100%); color: #1a1204; text-shadow: 0 1px 0 rgba(255,236,190,0.35); box-shadow: inset 0 1px 0 rgba(255,238,198,0.85), inset 0 2px 0 rgba(255,214,140,0.25), inset 0 -2px 3px rgba(90,50,0,0.4), 0 4px 0 #6e4a10, 0 5px 0 rgba(0,0,0,0.6), 0 10px 14px rgba(0,0,0,0.5); }
.ins-primary:active:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,238,198,0.6), inset 0 -1px 2px rgba(90,50,0,0.4), 0 1px 0 #6e4a10, 0 2px 3px rgba(0,0,0,0.5); }
.ins-sub { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 28px; font-size: 12px; color: #a39c86; }

/* ---- maker plate ---- */
.ins-ver { position: absolute; left: 24px; right: 24px; bottom: 8px; text-align: center; font-family: var(--ins-head); font-size: 8.5px; letter-spacing: 2.2px; text-transform: uppercase; color: rgba(250,189,89,0.68); text-shadow: 0 -1px 0 rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.08); pointer-events: none; }

/* ---- text link ---- */
.ins-link { color: var(--ins-gold); }
.ins-link:hover { color: #ffd99b; }
.ins-link:focus-visible { outline: 2px solid var(--ins-gold); outline-offset: 2px; border-radius: 4px; }

/* ================= CARDS ================= */
.ins-card { border: 1px solid rgba(250,189,89,0.4); border-radius: 8px; padding: 11px 12px 12px; background: linear-gradient(150deg, #2b2b31, #17171b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 3px 0 #09090b, 0 4px 0 rgba(0,0,0,0.5), 0 10px 14px rgba(0,0,0,0.45); }
.ins-card-h { margin: 0; font-family: var(--ins-head); font-weight: 400; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ins-gold); text-shadow: 0 -1px 0 #000; }
.ins-card-sub { margin: 2px 0 9px; font-size: 12.5px; color: #cfc6ae; }
.ins-vid { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 1px solid #000; background: linear-gradient(180deg, rgba(8,8,10,0.45), rgba(8,8,10,0.72)), #0c0a07; box-shadow: inset 0 3px 10px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.1); }
.ins-vid video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.ins-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ins-playkey { display: flex; align-items: center; justify-content: center; width: 64px; height: 46px; border-radius: 8px; border: 1px solid #000; background: linear-gradient(180deg, #4a4a52 0%, #303036 52%, #26262b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.26), inset 0 -2px 3px rgba(0,0,0,0.4), 0 4px 0 #09090b, 0 5px 0 rgba(0,0,0,0.55), 0 9px 10px rgba(0,0,0,0.5); transition: transform 0.06s ease, box-shadow 0.06s ease; }
.ins-playkey::before { content: ''; width: 0; height: 0; margin-left: 4px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--ins-gold); }
.ins-play:hover .ins-playkey { filter: brightness(1.12); }
.ins-play:active .ins-playkey { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 0 #09090b, 0 2px 3px rgba(0,0,0,0.5); }
.ins-play:focus-visible { outline: 2px solid var(--ins-gold); outline-offset: -4px; }
.ins-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid #000; cursor: pointer; user-select: none;
  background: linear-gradient(180deg, #4a4a52 0%, #303036 52%, #26262b 100%); color: #ece4cf; font-family: var(--ins-head); font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.26), inset 0 -2px 3px rgba(0,0,0,0.4), 0 4px 0 #09090b, 0 5px 0 rgba(0,0,0,0.55), 0 9px 10px rgba(0,0,0,0.5); transition: transform 0.06s ease, box-shadow 0.06s ease; }
.ins-details summary::-webkit-details-marker { display: none; }
.ins-details summary::after { content: '+'; display: flex; align-items: center; justify-content: center; flex: none; width: 1.5em; height: 1.5em; margin: 0 -0.6em 0 0.8em; padding-bottom: 0.1em; font-family: var(--ins-font); font-size: 1.7em; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none; color: var(--ins-gold); background: rgba(0,0,0,0.35); border: 1px solid rgba(250,189,89,0.75); border-radius: 8px; }
.ins-details[open] summary { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(250,189,89,0.7), inset 0 0 12px rgba(250,189,89,0.12), 0 2px 0 #09090b, 0 3px 4px rgba(0,0,0,0.45); }
.ins-details[open] summary::after { content: '\2212'; }
.ins-details summary:focus-visible { outline: 2px solid var(--ins-gold); outline-offset: 3px; }
.ins-defs { margin: 14px 2px 2px; display: grid; gap: 9px; font-size: 12.5px; color: #d8cfb8; line-height: 1.4; }
.ins-defs b { display: block; font-family: var(--ins-head); font-weight: 400; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ins-gold); }
.ins-defs p { margin: 0; }
.ins-tools { display: grid; gap: 10px; margin-top: 9px; }
.ins-tool { display: block; padding: 8px 12px 9px; border-radius: 8px; border: 1px solid #000; text-decoration: none; background: linear-gradient(180deg, #44444b 0%, #2d2d33 55%, #26262b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -2px 3px rgba(0,0,0,0.4), 0 3px 0 #09090b, 0 4px 0 rgba(0,0,0,0.55), 0 8px 10px rgba(0,0,0,0.45); transition: transform 0.06s ease, box-shadow 0.06s ease; }
.ins-tool:hover { filter: brightness(1.1); }
.ins-tool:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 0 0 #09090b, 0 2px 3px rgba(0,0,0,0.5); }
.ins-tool:focus-visible { outline: 2px solid var(--ins-gold); outline-offset: 2px; border-radius: 4px; }
.ins-tool b { display: block; font-family: var(--ins-head); font-weight: 400; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #ece4cf; }
.ins-tool span { display: block; margin-top: 2px; font-size: 12px; color: #bdb6a3; }


/* ================= PAPER TAPE (flat paper inside a panel) ================= */
/* The paper fills the rest of its panel, so a tape panel and a pad panel in one grid row share
   top edge and height. No rotation, no slot bar. */
.ins-tape { position: relative; margin: 0; padding: 1.1em 1.25em 1.1em; color: #1b1914; font-family: var(--ins-font); font-size: 0.95em; line-height: 1.45;
  background: linear-gradient(180deg, #d9d3c2 0, #f5f0e3 1.2em, #f5f0e3 100%); border-radius: 6px; }
.ins-tape-end { margin-top: 0.9em; border-top: 1px dashed rgba(27,25,20,0.55); padding-top: 0.7em; text-align: center; font-weight: 700; color: #1b1914; }

/* ================= SCALE AND PHONE ================= */
/* Fluid scale (replaces the old zoom rule). Add .ins-fluid to the .ins-page container: all type
   and spacing written in em then grows with the viewport. 1.25vw is 18px at 1440, 32px at 2560,
   48px at 3840. Nothing is zoomed on html or body. */
.ins-page.ins-fluid { font-size: clamp(18px, 1.25vw, 96px); line-height: 1.5; width: min(100%, 72em); max-width: none; padding: 0.8em 1.1em 2em; }
@media (max-width: 919px) {
  .ins-page { padding: 10px 16px 24px; }
  .ins-page.ins-fluid { padding: 0.6em 0.8em 1.6em; }
}
@media (prefers-reduced-motion: reduce) {
  .ins-title { animation: none; }
  .ins-page *, .ins-page *::before, .ins-page *::after { transition: none !important; }
}
