/* ramtt-drawings.css · shared by the components of sources/ramtt-drawings.mjs: RAMTT's line drawings,
   the login door's scenes, the identity pieces and the instruments. Each stands in a frame of its own.
   The surfaces and inks are RAMTT's paper and ink as the drawings were delivered (#fcfcfb, #0b0b0b), and
   what moves takes the accent, violet-500 of exilinar III (#6250d6); the controls follow Tau: Inter, weights
   450 and 500, a press is a capsule, a field has a radius of 8, a panel 12, and a first-order response of 50 ms on every state. */
:root {
  --rd-paper: #fcfcfb; --rd-ground: #f4f3f0; --rd-well: #f1f0ed; --rd-raised: #ffffff; --rd-rule: #e9e8e4;
  --rd-ink: #0b0b0b; --rd-ink2: #52514e; --rd-ink3: #6c6b69; --rd-line: rgb(11 11 11 / 10%); --rd-line-strong: rgb(11 11 11 / 20%);
  --rd-hover: rgb(11 11 11 / 5%); --rd-accent: #6250d6; --rd-glass: rgb(252 252 251 / 82%);
  --rd-e2: 0 0 0 .5px rgb(0 0 0 / .06), 0 6px 18px rgb(0 0 0 / .03), 0 3px 9px rgb(0 0 0 / .05), 0 1px 1px rgb(0 0 0 / .04);
  --rd-w-ui: 450; --rd-w-label: 500;
  --rd-ease: linear(0, 0.0234 0.39%, 0.0740 1.28%, 0.1420 2.54%, 0.2210 4.15%, 0.3058 6.06%, 0.3921 8.27%, 0.4764 10.75%, 0.5561 13.48%, 0.6294 16.47%, 0.6951 19.70%, 0.7528 23.17%, 0.8025 26.86%, 0.8443 30.78%, 0.8791 34.91%, 0.9074 39.26%, 0.9301 43.81%, 0.9481 48.56%, 0.9621 53.52%, 0.9728 58.67%, 0.9810 64.02%, 0.9870 69.55%, 0.9915 75.28%, 0.9948 81.19%, 0.9972 87.28%, 0.9988 93.55%, 1);
  color-scheme: light;
}
html[data-theme="dark"] {
  --rd-paper: #0f0f0e; --rd-ground: #131313; --rd-well: #151515; --rd-raised: #1a1a19; --rd-rule: #2a2a28;
  --rd-ink: #f2f1ee; --rd-ink2: #c3c2b7; --rd-ink3: #8f8e89; --rd-line: rgb(255 255 255 / 10%); --rd-line-strong: rgb(255 255 255 / 20%);
  --rd-hover: rgb(255 255 255 / 6%); --rd-glass: rgb(26 26 25 / 80%);
  --rd-e2: 0 0 0 .5px rgb(255 255 255 / 8%), 0 6px 18px rgb(0 0 0 / .3), 0 3px 9px rgb(0 0 0 / .3), 0 1px 1px rgb(0 0 0 / .3);
  --rd-w-ui: 420; --rd-w-label: 470;
  color-scheme: dark;
}
html, body { background: var(--rd-paper); color: var(--rd-ink); }
body { font: var(--rd-w-ui) 13px/18px var(--font); font-feature-settings: "ss01", "ss04", "cv01", "cv02"; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }

/* ── controls ── */
.rd-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: 9999px; background: transparent; box-shadow: inset 0 0 0 .5px var(--rd-line-strong); color: var(--rd-ink); font: var(--rd-w-label) 13px/18px var(--font); white-space: nowrap; cursor: default; transition: background-color 50ms var(--rd-ease); }
.rd-btn:hover { background: var(--rd-hover); }
.rd-btn:active { transform: translateY(1px); }
.rd-btn[aria-pressed="true"] { background: var(--rd-ink); color: var(--rd-paper); box-shadow: none; }
.rd-btn:focus-visible, .rd-field input:focus-visible { outline: 2px solid var(--rd-accent); outline-offset: 2px; }
.rd-field { display: grid; gap: 4px; min-width: 0; }
.rd-field label { font: var(--rd-w-label) 12px/16px var(--font); color: var(--rd-ink2); }
.rd-field label i { font-style: normal; color: var(--rd-ink3); font-weight: var(--rd-w-ui); }
.rd-field input { width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--rd-raised); box-shadow: inset 0 0 0 .5px var(--rd-line-strong); color: var(--rd-ink); font: var(--rd-w-ui) 13px/18px var(--font); font-variant-numeric: tabular-nums; outline: none; }
.rd-field input::placeholder { color: var(--rd-ink3); }
.rd-field input:focus { box-shadow: inset 0 0 0 1px var(--rd-ink2); }
.rd-dot { display: inline-block; width: .62em; height: .62em; border-radius: 50%; background: var(--rd-accent); flex: none; }
.rd-dot.ring { background: none; box-shadow: inset 0 0 0 .14em var(--rd-accent); }
.rd-dot.small { width: .38em; height: .38em; }
.rd-dot.ink { background: currentColor; width: .36em; height: .36em; }
.rd-dot.cell { border-radius: 40%; width: .8em; height: .5em; }

/* ── one drawing on paper, with its caption ── */
.fig-page { min-height: 100vh; display: grid; place-items: center; padding: clamp(16px, 3.4vw, 48px); }
.fig { margin: 0; width: min(100%, calc((100vh - 2 * clamp(16px, 3.4vw, 48px) - 92px) * 2.26)); }
.fig-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--rd-ink3); font-size: 12px; line-height: 16px; }
.fig-head b { color: var(--rd-ink); font-weight: var(--rd-w-label); }
.fig canvas { display: block; width: 100%; aspect-ratio: 2.26 / 1; color: var(--rd-ink); --glyko-accent: var(--rd-accent); }
.fig-cap { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rd-rule); font-size: 12px; line-height: 16px; color: var(--rd-ink3); }
.fig-cap .n { color: var(--rd-ink); font-weight: var(--rd-w-label); }
.fig-cap .k { display: inline-flex; align-items: center; gap: .45em; }
.fig-cap p { margin: 0; flex: 1 1 360px; max-width: 72ch; text-wrap: pretty; }
.fig-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.fig-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-right: 6px; }
.fig-opts .rd-btn { height: 24px; padding: 0 10px; font-size: 12px; }
@media (max-width: 600px) { .fig-cap p { flex-basis: 100%; } .fig-head { align-items: flex-start; } .fig-opts { margin-right: 0; } }

/* ── a scene from the door: the stage fills the frame, its inputs float on a glass panel ── */
html.rd-scene, html.rd-scene body { height: 100%; overflow: hidden; }
.sc { position: relative; height: 100vh; overflow: hidden; background: var(--sc-bg, #fcfcfb); }
.sc-stage { position: absolute; inset: 0; }
.sc-stage canvas { display: block; }
/* a scene drawn in ink on paper turns into its negative when the page is dark; a dark scene keeps its own night */
html[data-theme="dark"] .sc:not(.is-dark) { background: #030304; }
html[data-theme="dark"] .sc:not(.is-dark) .sc-stage canvas { filter: invert(1) hue-rotate(180deg); }
.sc-panel { position: absolute; left: 20px; bottom: 20px; width: min(360px, calc(100% - 40px)); display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--rd-glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--rd-e2); }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-head > span { color: var(--rd-ink3); font-size: 12px; }
.sc-head b { color: var(--rd-ink); font-size: 13px; font-weight: var(--rd-w-label); }
.sc-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.sc-in .rd-btn { justify-self: start; align-self: end; }
.sc-cap { margin: 0; font-size: 12px; line-height: 16px; color: var(--rd-ink2); text-wrap: pretty; }
.sc-cap:empty { display: none; }
/* a scene standing alone takes text from the keyboard (scene-stage.js opt.keys); a phone has no keyboard to offer */
.sc-keys { margin: 0; font-size: 11px; line-height: 15px; color: var(--rd-ink3, var(--rd-ink2)); }
@media (hover: none) { .sc-keys { display: none; } }
@media (max-width: 600px) { .sc-panel { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 12px; gap: 10px; } .sc-cap { font-size: 11px; line-height: 15px; } }
