/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bf4970bc.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/cb77e21b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/64931c62.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/0737c3b0.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/0e073060.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/7dcb2f02.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/b69948c4.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/16b14ccd.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/b8e8dd75.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/2f431dbb.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/629ace90.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/da60860f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/b69948c4.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/16b14ccd.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/b8e8dd75.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/2f431dbb.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/629ace90.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/da60860f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/b69948c4.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/16b14ccd.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/b8e8dd75.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/2f431dbb.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/629ace90.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/da60860f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/af65f00b.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/b67841ae.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/e7d93e4f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/af65f00b.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/b67841ae.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/e7d93e4f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/af65f00b.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/b67841ae.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/e7d93e4f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/af65f00b.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/b67841ae.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/e7d93e4f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- theme ---- */
:root {
  --bg: #0b0d12;
  --surface: #131720;
  --surface-hover: #191f2c;
  --inset: #0e1118;
  --border: #252c3b;
  --border-strong: #384359;
  --text: #f3f5f8;
  --muted: #94a0b8;
  --orange: #ff5c28;
  --cyan: #22d3ee;
  --emerald: #10b981;
  --amber: #f59e0b;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color-scheme: dark;
  scrollbar-color: var(--border-strong) var(--bg);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.09) 0%, transparent 38%),
    radial-gradient(circle at 88% 18%, rgba(255, 92, 40, 0.08) 0%, transparent 36%);
  background-repeat: no-repeat;
  background-size: 100% 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
::selection { background: rgba(34, 211, 238, 0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h2, h3, p { margin: 0; }

.c-cyan { color: var(--cyan); }
.c-orange { color: var(--orange); }
.c-emerald { color: var(--emerald); }
.c-amber { color: var(--amber); }
.mono { font-family: var(--font-mono); font-size: 0.84rem; }

/* x-ray blueprint mode */
body.xray-mode {
  background-color: #071018;
  background-image:
    linear-gradient(to right, rgba(34, 211, 238, 0.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 211, 238, 0.11) 1px, transparent 1px);
  background-repeat: repeat;
  background-size: 24px 24px;
  cursor: crosshair;
}
body.xray-mode .module { border-color: rgba(34, 211, 238, 0.55); background: rgba(13, 21, 32, 0.8); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15) inset; }
/* notes take no space until the mode is on, so modules keep even padding */
.xray-note { display: none; margin-top: 14px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan); pointer-events: none; }
body.xray-mode .xray-note { display: block; animation: note-in 0.2s ease; }
@keyframes note-in { from { opacity: 0; transform: translateY(-3px); } }

/* shell drawer */
.cli-drawer { position: fixed; top: 0; left: 0; right: 0; z-index: 500; visibility: hidden; transform: translateY(-100%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.25s; background: rgba(10, 12, 18, 0.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--orange); font-family: var(--font-mono); font-size: 0.85rem; }
.cli-drawer.open { visibility: visible; transform: translateY(0); transition-delay: 0s; }
.cli-inner { max-width: 960px; margin: 0 auto; padding: 16px 24px; }
.cli-output { color: var(--muted); max-height: 145px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; margin-bottom: 10px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.cli-output .cmd-echo { color: var(--cyan); }
.cli-input-row { display: flex; align-items: center; gap: 10px; cursor: text; }
.cli-prompt { color: var(--orange); font-weight: 700; user-select: none; }
.cli-input { flex: 1; min-width: 0; padding: 0; background: transparent; border: 0; outline: 0; color: var(--text); caret-color: var(--orange); font: inherit; }
.cli-input::placeholder { color: var(--border-strong); }
.cli-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cli-chip { background: var(--surface); border: 1px solid var(--border-strong); color: var(--muted); padding: 3px 10px; border-radius: 4px; font-size: 0.72rem; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.cli-chip:hover { border-color: var(--cyan); color: var(--cyan); }

/* layout */
.wrap { max-width: 960px; margin: 0 auto; padding: 24px 24px 72px; }
.topbar { position: sticky; top: 12px; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 24px; background: rgba(19, 23, 32, 0.88); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 6px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.sys-trigger { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px; margin-left: -4px; border: 0; border-radius: 4px; background: none; color: var(--text); font-weight: 700; }
.sys-trigger:hover { background: var(--surface-hover); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.cursor-blink { display: inline-block; width: 7px; height: 13px; background: var(--orange); animation: blink 1.05s steps(2, start) infinite; vertical-align: middle; }
@keyframes blink { to { visibility: hidden; } }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--cyan); }
.scope-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 10px; background: var(--inset); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); transition: border-color 0.15s, color 0.15s; }
.scope-wrap:hover { border-color: var(--cyan); }
.scope-wrap.live { color: var(--cyan); }
#scope { width: 72px; height: 20px; display: block; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.module { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 24px; position: relative; overflow: hidden; scroll-margin-top: 76px; transition: border-color 0.2s ease; }
.module:hover { border-color: var(--border-strong); }
.module::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--border-strong), transparent); opacity: 0.6; }
.module-accent-orange::before { background: linear-gradient(90deg, var(--orange), rgba(255, 92, 40, 0.1) 60%, transparent); opacity: 1; }
.module-accent-cyan::before { background: linear-gradient(90deg, var(--cyan), rgba(34, 211, 238, 0.1) 60%, transparent); opacity: 1; }
/* cursor spotlight; --mx/--my are set by app.js */
.module::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.2s; background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.07), transparent 70%); }
.module:hover::after { opacity: 1; }
.module.unbolted { cursor: grab; user-select: none; touch-action: none; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65); border-color: var(--orange); z-index: 100; transition: none; }
.module.unbolted:active { cursor: grabbing; z-index: 200; }
.module.unbolted::after { display: none; }

h1 { font-size: 1.95rem; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 12px; line-height: 1.2; text-wrap: balance; }
.highlight-word { color: var(--orange); }
.lead { color: var(--muted); font-size: 0.98rem; max-width: 54ch; text-wrap: pretty; }
.lead + .lead { margin-top: 12px; }
.lead-sm { font-size: 0.9rem; }
.typed-row { font-family: var(--font-mono); font-size: 0.92rem; color: var(--cyan); min-height: 1.6em; margin-bottom: 14px; }
.typed-row .prompt { color: var(--muted); }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; padding: 9px 18px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--inset); color: var(--text); text-decoration: none; transition: border-color 0.15s, color 0.15s, box-shadow 0.15s; }
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--bg); }
.btn-primary:hover { border-color: var(--orange); color: var(--bg); box-shadow: 0 0 18px rgba(255, 92, 40, 0.45); }

.label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.label h2 { font: inherit; letter-spacing: inherit; }
.label-accent { color: var(--cyan); }
#name { cursor: default; color: var(--text); }

/* loose bolt */
.bolt { width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid var(--orange); background: rgba(255, 92, 40, 0.1); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s; }
.bolt::after { content: ""; width: 9px; height: 1.5px; background: var(--orange); display: block; }
.bolt:hover { box-shadow: 0 0 10px rgba(255, 92, 40, 0.5); }
.bolt[data-clicks="1"] { transform: rotate(35deg); }
.bolt[data-clicks="2"] { transform: rotate(-72deg) translateY(1px); box-shadow: 0 0 12px var(--orange); }
/* while unbolted every module carries a loose bolt; clicking it fastens that module back into its slot */
.bolt-back { position: absolute; top: 6px; right: 6px; }
.module.unbolted .bolt { transform: rotate(-72deg); box-shadow: 0 0 12px var(--orange); }
.module.fastening .bolt { transform: rotate(0deg); box-shadow: none; }
.slot { border: 1px dashed var(--border-strong); border-radius: 6px; }

/* telemetry rows */
.spec-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.spec-row:last-of-type { border-bottom: none; }
.spec-key { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.run-row { display: grid; grid-template-columns: 104px 1fr auto; }
.run-row .spec-key { text-transform: none; letter-spacing: 0; color: var(--text); }
.run-row > :nth-child(2) { color: var(--muted); }

/* projects */
.work-list { display: flex; flex-direction: column; }
.work-item { display: grid; grid-template-columns: 44px 72px 1fr auto; gap: 16px; align-items: center; padding: 14px 12px; margin: 0 -12px; border-bottom: 1px solid var(--border); border-radius: 6px; text-decoration: none; transition: background 0.15s ease; }
.work-item:last-child { border-bottom: none; }
.work-item:hover { background: var(--surface-hover); }
.work-thumb { width: 40px; height: 40px; border-radius: 5px; background: var(--inset); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; transition: border-color 0.15s, transform 0.15s; }
.work-thumb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.work-thumb img { width: 28px; height: 28px; }
.work-item:hover .work-thumb { border-color: var(--cyan); transform: scale(1.05); }
.work-hex { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); transition: color 0.15s; }
.work-item:hover .work-hex { color: var(--orange); }
.work-title { font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.work-desc { font-size: 0.87rem; color: var(--muted); text-wrap: pretty; }
.work-stack { font-family: var(--font-mono); font-size: 0.72rem; color: #6b7890; margin-top: 6px; transition: color 0.15s; }
.work-item:hover .work-stack { color: var(--muted); }
.work-tag { font-family: var(--font-mono); font-size: 0.72rem; padding: 3px 9px; border-radius: 3px; white-space: nowrap; border: 1px solid transparent; text-transform: uppercase; }
.tag-cyan { color: var(--cyan); background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.25); }
.tag-orange { color: var(--orange); background: rgba(255, 92, 40, 0.08); border-color: rgba(255, 92, 40, 0.25); }
.tag-emerald { color: var(--emerald); background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.25); }
.tag-amber { color: var(--amber); background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.25); }

/* skills, sponsor tiers, contact */
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.cells-tight { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.cells-wide { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.cell { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--inset); border: 1px solid var(--border); border-radius: 5px; text-align: left; text-decoration: none; transition: border-color 0.15s; }
a.cell, button.cell { cursor: pointer; }
a.cell:hover, button.cell:hover { border-color: var(--cyan); }
.cell-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 1.6rem; }
.cell-value { font-family: var(--font-mono); font-size: 0.82rem; color: var(--cyan); overflow-wrap: anywhere; }
.price { font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.price small { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1.7fr; gap: 28px; align-items: start; }

footer { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); flex-wrap: wrap; gap: 12px; }
.footer-action { cursor: pointer; padding: 0; background: none; border: 0; border-bottom: 1px dotted var(--border-strong); color: var(--text); transition: color 0.15s, border-color 0.15s; }
.footer-action:hover, .footer-action.on { color: var(--cyan); border-color: var(--cyan); }
.footer-sep { margin: 0 10px; }

.reassemble-pill { position: fixed; bottom: 24px; left: 50%; z-index: 400; visibility: hidden; transform: translateX(-50%) translateY(80px); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s 0.25s; background: var(--orange); border: 1px solid var(--orange); color: var(--bg); font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; padding: 10px 20px; border-radius: 4px; cursor: pointer; box-shadow: 0 10px 30px rgba(255, 92, 40, 0.35); }
.reassemble-pill.visible { visibility: visible; transform: translateX(-50%) translateY(0); opacity: 1; transition-delay: 0s; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s, transform 0.6s, border-color 0.2s; }
  .reveal.in { opacity: 1; transform: none; }
}

/* easter egg: cat /dev/input/mouse0 */
.egg-cat, .egg-prey { position: fixed; left: 0; top: 0; z-index: 450; display: none; pointer-events: none; font-family: var(--font-mono); font-weight: 700; white-space: pre; }
.egg-cat { font-size: 20px; color: var(--orange); text-shadow: 0 0 12px rgba(255, 92, 40, 0.7); }
.egg-prey { font-size: 14px; color: var(--text); }
.hunt .egg-cat, .hunt .egg-prey { display: block; }
.hunt, .hunt * { cursor: none !important; }
/* sits above the reassemble pill, which shares the bottom centre */
.egg-toast { position: fixed; left: 50%; bottom: 76px; z-index: 450; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); background: rgba(10, 12, 18, 0.96); border: 1px solid var(--border-strong); border-radius: 4px; padding: 10px 16px; white-space: pre; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.egg-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .wrap { padding: 16px 16px 56px; }
  .nav { display: none; }
  .col-4, .col-6, .col-8 { grid-column: span 12; }
  .module { padding: 20px; }
  h1 { font-size: 1.6rem; }
  .work-item { grid-template-columns: 40px 1fr; gap: 10px; align-items: start; }
  .work-hex { display: none; }
  .work-tag { grid-column: 2; width: fit-content; }
  .split { grid-template-columns: 1fr; }
  .run-row { grid-template-columns: 1fr auto; }
  .run-row .spec-key { grid-column: 1 / -1; }
  .cli-input { font-size: 16px; } /* below 16px iOS zooms the page on focus */
}
