/* ==========================================================================
   ICHOME control plane
   Direction: data-terminal (seed 432100220), redrawn shell: labelled sidebar.
   Ground is lighter than the cards; selection is a 1px accent line; figures
   are monospace and tabular. No gradients, glass, glows or resting shadows.
   ========================================================================== */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/public-sans-latin.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;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/public-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin.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;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #171719;
  --surface: #131217;
  --surface-2: #0f0e12;
  --raised: #212023;
  --border: #222224;
  --rule: #1b1a1f;
  --control: #3a3a3e;
  --text: #ffffff;
  --muted: #8a8c92;
  --muted-2: #7c7e86;
  --accent: #c9f24d;
  --positive: #44a282;
  --negative: #e5566f;
  --warning: #d9a441;
  --radius-card: 6px;
  --radius-control: 6px;
  --row-height: 42px;
  --sidebar-width: 224px;
  --gap: 24px;
  --pad: 32px;
  --control-height: 34px;
  --fs-title: 26px;
  --fs-section: 20px;
  --fs-kpi: 20px;
  --fs-body: 13px;
  --fs-small: 12px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Public Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ground);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, dl, dd, dt, figure {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--text);
  text-decoration-color: var(--control);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--accent);
}

svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: #101010;
}

.is-hidden {
  display: none !important;
}

.only-mobile {
  display: none;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--accent);
  color: #101010;
  border-radius: var(--radius-control);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.mono,
.num,
time,
.kpi-value,
.metric,
.code,
.log,
.table td.num,
.table th.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.hint {
  color: var(--muted);
  font-size: var(--fs-small);
  margin-top: 6px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--control-height);
  padding: 0 14px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}
.btn:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.btn:active {
  background: rgba(255, 255, 255, 0.06);
}
.btn svg {
  width: 14px;
  height: 14px;
}
.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover {
  background: rgba(201, 242, 77, 0.08);
  border-color: var(--accent);
}
.btn-quiet {
  border-color: transparent;
  color: var(--muted);
}
.btn-quiet:hover {
  color: var(--text);
  border-color: var(--control);
  background: transparent;
}
.btn-danger {
  border-color: rgba(229, 86, 111, 0.5);
  color: var(--negative);
}
.btn-danger:hover {
  background: rgba(229, 86, 111, 0.08);
  border-color: var(--negative);
}
.btn-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--control);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ----------------------------------------------------------------- login */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 40px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 56px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--accent);
  flex: none;
}

.brand-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-node {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.auth-panel h1 {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.auth-lede {
  margin-top: 10px;
  max-width: 38ch;
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  margin-top: 36px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 500;
}

.field input,
.field select,
.field textarea,
.input {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}
.field input::placeholder,
.input::placeholder {
  color: var(--muted-2);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  min-height: 18px;
  margin: 0 0 12px;
  color: var(--negative);
  font-size: var(--fs-small);
}

.auth-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 11px;
}

.auth-aside {
  display: flex;
  align-items: flex-end;
  padding: 40px;
  border-left: 1px solid var(--rule);
  background: var(--surface);
}
.auth-aside-inner {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.auth-rule {
  height: 1px;
  margin: 18px 0 24px;
  background: var(--accent);
  width: 64px;
}
.auth-spec {
  display: grid;
  gap: 14px;
}
.auth-spec > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.auth-spec dt {
  color: var(--muted);
  font-size: var(--fs-small);
}
.auth-spec dd {
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}
.auth-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: var(--fs-small);
  max-width: 42ch;
}

/* ----------------------------------------------------------------- shell */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--rule);
  background: var(--ground);
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 20px;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding-top: 4px;
}

.nav-group {
  padding: 16px 10px 6px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-group:first-child {
  padding-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.nav-item span {
  display: inline-block;
}
.nav-item span::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin-top: 2px;
  background: var(--accent);
  transition: width 140ms ease;
}
.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
}
.nav-item[aria-current="page"] {
  color: var(--text);
}
.nav-item[aria-current="page"] span::after {
  width: 100%;
}
.nav-item[aria-current="page"] svg {
  color: var(--accent);
}

.side-foot {
  margin-top: 16px;
  padding: 14px 10px 0;
  border-top: 1px solid var(--rule);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--control);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  flex: none;
}
.side-user-text {
  display: block;
  min-width: 0;
}
#side-user {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-role {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--rule);
  background: var(--ground);
}
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}
.crumb-root {
  color: var(--muted);
}
.crumb-sep {
  color: var(--control);
}
#crumb-node {
  color: var(--text);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.node-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}
.node-state.is-ok .dot,
.dot.is-ok {
  background: var(--positive);
}
.node-state.is-warn .dot,
.dot.is-warn {
  background: var(--warning);
}
.node-state.is-bad .dot,
.dot.is-bad {
  background: var(--negative);
}

#main {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px var(--pad) 80px;
  outline: none;
}

.screen-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 48px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.spinner {
  width: 13px;
  height: 13px;
  border: 1px solid var(--control);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------- screens */

.screen {
  animation: screen-in 160ms ease both;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

.screen-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.screen-head-main {
  min-width: 0;
}
.screen-head h1 {
  margin-top: 4px;
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.screen-lede {
  margin-top: 6px;
  max-width: 72ch;
  color: var(--muted);
  font-size: var(--fs-small);
}
.screen-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-top: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.meta-line .sep {
  color: var(--control);
}

.screen-body {
  padding-top: var(--gap);
}

.stack {
  display: grid;
  gap: var(--gap);
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--gap);
}
.grid-2-even {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

/* ------------------------------------------------------------------ cards */

.card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px 12px;
}
.card-head h2,
.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.card-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--fs-small);
}
.card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-body {
  padding: 0 18px 18px;
}
.card-body.flush {
  padding: 0;
}
.card-rule {
  height: 1px;
  background: var(--rule);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}
.kpi {
  min-width: 0;
  padding: 15px 18px 14px;
  border-right: 1px solid var(--rule);
}
.kpi:last-child {
  border-right: 0;
}
.kpi-label {
  color: var(--muted);
  font-size: 11px;
}
.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
  font-size: var(--fs-kpi);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.kpi-unit {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.kpi-note {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.kpi-note.is-bad {
  color: var(--negative);
}
.kpi-note.is-warn {
  color: var(--warning);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  border-top: 1px solid var(--rule);
}
.fact {
  padding: 12px 18px 13px;
  border-right: 1px solid var(--rule);
}
.fact:last-child {
  border-right: 0;
}
.fact dt {
  color: var(--muted);
  font-size: 10.5px;
}
.fact dd {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.node-card .node-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 18px;
}
.node-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.node-sub {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.node-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- tables */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.table th {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
.table td {
  height: var(--row-height);
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}
.table th:first-child,
.table td:first-child {
  padding-left: 18px;
}
.table th:last-child,
.table td:last-child {
  padding-right: 18px;
}
.table .num {
  text-align: right;
  white-space: nowrap;
}
.cell-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--text);
  font-weight: 500;
}
.cell-name .name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-sub {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
}
.cell-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  flex: none;
}
.cell-icon svg {
  width: 13px;
  height: 13px;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
}
.row-actions .icon-btn {
  width: 26px;
  height: 26px;
}
.row-actions .icon-btn svg {
  width: 14px;
  height: 14px;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}
.state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}
.state-ok::before {
  background: var(--positive);
}
.state-warn::before {
  background: var(--warning);
}
.state-bad::before {
  background: var(--negative);
}
.state-accent::before {
  background: var(--accent);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid var(--control);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  white-space: nowrap;
}
.tag-accent {
  border-color: rgba(201, 242, 77, 0.45);
  color: var(--accent);
}
.tag-bad {
  border-color: rgba(229, 86, 111, 0.45);
  color: var(--negative);
}

/* ------------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
}
.tab {
  position: relative;
  min-height: 38px;
  padding: 0 1px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 500;
  white-space: nowrap;
}
.tab:hover {
  color: var(--text);
}
.tab[aria-selected="true"] {
  color: var(--text);
}
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0;
}
.toolbar .search {
  flex: 1 1 240px;
  max-width: 340px;
}
.toolbar-spacer {
  flex: 1;
}
.toolbar-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.search {
  position: relative;
}
.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px 7px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-small);
}
.search input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------------------------------------------------------------- charts */

.chart-card .card-body {
  padding-top: 4px;
}
.chart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}
.chart .grid-line {
  stroke: var(--rule);
  stroke-width: 1;
}
.chart .axis-line {
  stroke: var(--border);
  stroke-width: 1;
}
.chart .series {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.25;
  stroke-linejoin: round;
}
.chart .series-2 {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.chart .series-area {
  fill: rgba(201, 242, 77, 0.05);
  stroke: none;
}
.chart-legend {
  display: flex;
  gap: 16px;
  padding: 4px 18px 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-line {
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--accent);
}
.legend-line.dashed {
  background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 6px);
}

.progress {
  width: 100%;
  height: 3px;
  border: 0;
  border-radius: 0;
  background: var(--raised);
  overflow: hidden;
  appearance: none;
}
.progress::-webkit-progress-bar {
  background: var(--raised);
}
.progress::-webkit-progress-value {
  background: var(--accent);
}
.progress::-moz-progress-bar {
  background: var(--accent);
}
.progress-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}
.progress-row .label {
  color: var(--muted);
  font-size: 11px;
}
.progress-row .value {
  font-family: var(--mono);
  font-size: 10.5px;
  text-align: right;
}

/* ---------------------------------------------------------------- notices */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-left: 1px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-small);
}
.notice strong {
  color: var(--text);
  font-weight: 600;
}
.notice-warn {
  border-left-color: var(--warning);
}
.notice-bad {
  border-left-color: var(--negative);
}

.empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 56px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  color: var(--muted);
  text-align: center;
}
.empty strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.empty p {
  max-width: 46ch;
  font-size: var(--fs-small);
}

.loading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}

/* ------------------------------------------------------------------ forms */

.form-grid {
  display: grid;
  gap: 16px;
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-small);
}
.check input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

/* ------------------------------------------------------------------ modal */

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-panel {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(86vh, 900px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}
.modal-panel.modal-wide {
  width: min(980px, 100%);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}
.modal-head h2 {
  font-size: 15px;
  font-weight: 600;
}
.modal-sub {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}
.modal-close {
  margin-left: auto;
}
.modal-body {
  padding: 18px;
  overflow: auto;
}
.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--rule);
}
.modal-foot .spacer {
  flex: 1;
}

.editor {
  width: 100%;
  min-height: 52vh;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  tab-size: 2;
}
.editor:focus {
  outline: none;
  border-color: var(--accent);
}

.qr-wrap {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.qr {
  width: 176px;
  height: 176px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  image-rendering: pixelated;
}
.secret {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
}
.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.recovery-code {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------- chat/log */

.chat-log {
  display: grid;
  gap: 14px;
  max-height: 460px;
  overflow-y: auto;
  padding: 4px 2px 12px;
}
.chat-msg {
  border-left: 1px solid var(--border);
  padding-left: 12px;
}
.chat-msg.user {
  border-left-color: var(--accent);
}
.chat-role {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chat-text {
  margin-top: 4px;
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}
.chat-text p {
  margin: 0 0 8px;
}
.chat-text p:last-child {
  margin-bottom: 0;
}
.chat-text code {
  padding: 1px 4px;
  border-radius: 2px;
  background: var(--raised);
  font-family: var(--mono);
  font-size: 11px;
}
.chat-text pre {
  margin: 8px 0;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
}
.chat-text ul,
.chat-text ol {
  margin: 6px 0;
  padding-left: 18px;
}
.chat-input {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.chat-input .input {
  flex: 1;
}

.log {
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------- media UI */

.media-list {
  display: grid;
}
.media-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--rule);
}
.media-row:last-child {
  border-bottom: 0;
}
.media-row:hover {
  background: rgba(255, 255, 255, 0.018);
}
.media-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  flex: none;
}
.media-thumb svg {
  width: 15px;
  height: 15px;
}
.media-main {
  min-width: 0;
  flex: 1;
}
.media-name {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-sub {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.media-size {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.player-bar .player-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-bar audio {
  width: min(420px, 55vw);
  height: 32px;
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(380px, calc(100vw - 36px));
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-left: 1px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-small);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.is-visible {
  opacity: 1;
  transform: none;
}
.toast.is-bad {
  border-left-color: var(--negative);
}

/* -------------------------------------------------------------- bottom nav */

.bottom-nav {
  display: none;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --pad: 16px;
    --gap: 16px;
  }

  .only-mobile {
    display: inline-flex;
  }

  .auth {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-aside {
    display: none;
  }
  .auth-panel {
    padding: 32px 22px;
  }
  .auth-brand {
    margin-bottom: 36px;
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 82vw);
    height: 100vh;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    border-right: 1px solid var(--border);
    background: var(--surface);
  }
  body.nav-open .sidebar {
    transform: none;
  }
  body.nav-open .scrim {
    display: block;
  }

  .topbar {
    height: 52px;
    gap: 10px;
  }
  .topbar .btn-small svg {
    display: none;
  }
  .node-state {
    display: none;
  }

  #main {
    padding-top: 20px;
    padding-bottom: 88px;
  }

  .screen-head {
    flex-direction: column;
    gap: 12px;
  }
  .screen-actions {
    margin-left: 0;
    justify-content: flex-start;
  }
  .screen-head h1 {
    font-size: 23px;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi:nth-child(2) {
    border-right: 0;
  }
  .kpi:nth-child(1),
  .kpi:nth-child(2) {
    border-bottom: 1px solid var(--rule);
  }

  .grid-2-even,
  .grid-3,
  .form-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .table .col-hide-mobile {
    display: none;
  }
  .table th,
  .table td {
    padding-left: 10px;
    padding-right: 10px;
  }
  .table th:first-child,
  .table td:first-child {
    padding-left: 14px;
  }
  .table th:last-child,
  .table td:last-child {
    padding-right: 14px;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: 58px;
    border-top: 1px solid var(--border);
    background: var(--ground);
  }
  .bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 9.5px;
  }
  .bottom-item svg {
    width: 17px;
    height: 17px;
  }
  .bottom-item[aria-current="page"] {
    color: var(--text);
  }
  .bottom-item[aria-current="page"] svg {
    color: var(--accent);
  }

  .player-bar {
    bottom: 58px;
  }
  .player-bar audio {
    width: 100%;
  }
  .player-bar .player-title {
    display: none;
  }

  .modal {
    padding: 10px;
  }
  .modal-panel {
    max-height: 92vh;
  }
  .recovery-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .screen-head h1 {
    font-size: 21px;
  }
  .kpi-value {
    font-size: 18px;
  }
  .card-head,
  .card-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .table .col-optional {
    display: none;
  }
  .toolbar .search {
    max-width: none;
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #b9bbc2;
    --border: #3a3a3e;
    --rule: #2c2c30;
  }
}

.noscript {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 1px solid var(--warning);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

/* ------------------------------------------------------- screen utilities */

.hint-flush { margin-top: 0; }
.hint-spaced { margin-top: 14px; }
.field-spaced { margin-top: 12px; }
.empty-chart { border: 0; padding: 38px 0; }
.legend-right { margin-left: auto; }

.video-player {
  width: 100%;
  max-height: 68vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #000;
}
.audio-preview {
  width: 100%;
  margin-top: 4px;
}
.editor-short {
  min-height: 118px;
}
.search-wide {
  max-width: none;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.crumb-btn {
  padding: 2px 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.crumb-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.crumb-sep {
  color: var(--control);
  font-family: var(--mono);
  font-size: 10px;
}

.row-link {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.row-link:hover .name-text {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------- check list */

.check-list {
  display: grid;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 7px 18px;
  border-bottom: 1px solid var(--rule);
}
.check-row:last-child {
  border-bottom: 0;
}
.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: none;
}
.check-icon svg {
  width: 14px;
  height: 14px;
}
.check-icon.is-ok {
  color: var(--positive);
}
.check-icon.is-bad {
  color: var(--negative);
}
.check-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.check-label {
  font-size: var(--fs-small);
}
.check-value {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ fact layouts */

.facts-stack {
  grid-template-columns: minmax(0, 1fr);
  border-top: 0;
}
.facts-stack .fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
  border-right: 0;
  border-bottom: 1px solid var(--rule);
}
.facts-stack .fact:last-child {
  border-bottom: 0;
}
.facts-stack .fact dd {
  margin-top: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.facts-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 0;
}
.facts-inline .fact {
  padding: 0 0 10px;
  border-right: 0;
}
.facts-inline .fact dt {
  margin-bottom: 2px;
}

/* ------------------------------------------------------------------ skills */

.skill-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--rule);
}
.skill {
  border-bottom: 1px solid var(--rule);
}
.skill-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 2px;
  cursor: pointer;
  list-style: none;
}
.skill-summary::-webkit-details-marker {
  display: none;
}
.skill-summary::before {
  content: "+";
  width: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.skill[open] .skill-summary::before {
  content: "−";
  color: var(--accent);
}
.skill-name {
  font-size: var(--fs-small);
  font-weight: 500;
}
.skill-id {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  overflow-wrap: anywhere;
}
.skill-desc {
  padding: 0 2px 12px 22px;
  color: var(--muted);
  font-size: var(--fs-small);
  max-width: 84ch;
}

/* ---------------------------------------------------------------- settings */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.setting {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
}
.setting-label {
  color: var(--muted);
  font-size: 10.5px;
}
.setting-value {
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- tweaks */

.modal .hint {
  margin-top: 0;
}
.modal .hint + .recovery-grid {
  margin-top: 12px;
}
.media-list .empty {
  border: 0;
}
.qr-side {
  flex: 1 1 260px;
  min-width: 0;
}
.secret + .form-actions {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .facts-inline {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts-inline .fact {
    padding: 7px 0;
    border-bottom: 1px solid var(--rule);
  }
  .facts-inline .fact:last-child {
    border-bottom: 0;
  }
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* ===========================================================================
   OPUSJAKE-STYLE SOVEREIGN SHOWCASE & ULTRON GOLDEN CANVAS
   Tokens based on opusjake.ai (Oatmeal & Indigo + Ultron Gold & Obsidian)
   =========================================================================== */

:root {
  --showcase-paper: #EDE9DE;
  --showcase-card: #F5F2EA;
  --showcase-muted: #E4DFD1;
  --showcase-ink: #2F2B25;
  --showcase-ink-2: #6C6659;
  --showcase-ink-3: #A8A294;
  --showcase-rule: rgba(47, 43, 37, 0.14);
  --showcase-indigo: #4B4AEF;

  /* Ultron Ground Theme (Dark & Gold) */
  --ground-bg: #0D0C0A;
  --ground-surface: #141310;
  --ground-card: #1A1814;
  --ground-elevated: #24211B;
  --ground-text: #EDE9DE;
  --ground-text-dim: #9E988A;
  --ground-border: rgba(255, 184, 0, 0.16);

  --ultron-gold: #FFB800;
  --ultron-gold-bright: #FFE066;
  --ultron-gold-glow: rgba(255, 184, 0, 0.38);
  --ultron-gold-dim: #996F00;
  --ultron-ember: #FF7700;
  --ultron-gold-bg: rgba(255, 184, 0, 0.08);

  --u: 8px;
  --r-xs: 6px;
  --r-s: 10px;
  --r-m: 8px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24), 0 12px 28px -8px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 0 24px rgba(255, 184, 0, 0.25);
}

.showcase {
  background-color: var(--ground-bg);
  color: var(--ground-text);
  font-family: -apple-system, BlinkMacSystemFont, "Public Sans", system-ui, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.showcase .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nv-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(13, 12, 10, 0.85);
  border-bottom: 1px solid var(--ground-border);
}

.nv-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.nv-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.nv-glyph {
  color: var(--ultron-gold);
  text-shadow: 0 0 10px var(--ultron-gold);
}

.nv-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--ultron-gold-bg);
  border: 1px solid var(--ground-border);
  color: var(--ultron-gold-bright);
}

.nv-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 184, 0, 0.08);
  border: 1px solid rgba(255, 184, 0, 0.25);
  color: var(--ultron-gold-bright);
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ultron-gold);
  box-shadow: 0 0 8px var(--ultron-gold);
  animation: pulse-glow 2s infinite ease-in-out;
}

.pulse-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.nv-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nv-link {
  color: var(--ground-text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nv-link:hover {
  color: var(--ultron-gold-bright);
}

.btn-nv-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #FFB800, #E69D00);
  color: #0D0C0A;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 184, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-nv-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.5);
}

/* Hero */
.hr-hero {
  padding: 64px 0 80px;
  position: relative;
}

.gl-hero {
  background-image: 
    linear-gradient(rgba(255, 184, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 184, 0, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hr-canvas-frame {
  position: relative;
  background: radial-gradient(circle at center, rgba(255, 184, 0, 0.06) 0%, rgba(13, 12, 10, 0.8) 70%);
  border: 1px solid var(--ground-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(255, 184, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#ultron-canvas {
  width: 100%;
  height: 480px;
  display: block;
  cursor: crosshair;
}

.hr-canvas-status {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 12, 10, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 184, 0, 0.2);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.tag-gold {
  color: var(--ultron-gold);
  font-weight: 700;
}

.tag-sub {
  color: var(--ground-text-dim);
}

.hr-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--ultron-gold);
  margin-bottom: 16px;
}

.eyebrow-accent {
  color: #fff;
}

.hr-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #fff;
}

.hr-wm {
  background: linear-gradient(135deg, #FFF4B8 0%, #FFB800 50%, #FF7700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(255, 184, 0, 0.4));
}

.hr-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ground-text-dim);
  margin-bottom: 24px;
  max-width: 520px;
}

.hr-sub strong {
  color: var(--ground-text);
}

.hr-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--ground-surface);
  border: 1px solid var(--ground-border);
  color: var(--ground-text);
}

.hr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hr-btn-gold {
  background: linear-gradient(135deg, #FFB800, #E69D00);
  color: #0D0C0A;
  border: none;
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.35);
}

.hr-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 184, 0, 0.55);
}

.hr-btn-soft {
  background: var(--ground-surface);
  color: var(--ground-text);
  border: 1px solid var(--ground-border);
}

.hr-btn-soft:hover {
  background: var(--ground-elevated);
  border-color: var(--ultron-gold);
}

.hr-btn-ghost {
  background: transparent;
  color: var(--ultron-gold-bright);
  border: 1px solid rgba(255, 184, 0, 0.25);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.hr-btn-ghost:hover {
  background: rgba(255, 184, 0, 0.08);
}

/* Figures */
.fg-fig {
  padding: 80px 0;
  border-top: 1px solid rgba(255, 184, 0, 0.1);
}

.fg-head {
  margin-bottom: 40px;
}

.fg-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ultron-gold);
  display: block;
  margin-bottom: 8px;
}

.fg-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 12px;
}

.fg-sub {
  font-size: 16px;
  color: var(--ground-text-dim);
  max-width: 600px;
}

.fg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.fg-card {
  background: var(--ground-card);
  border: 1px solid var(--ground-border);
  border-radius: var(--r-m);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 184, 0, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 184, 0, 0.1);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ground-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ground-text-dim);
}

.chip-gold {
  background: var(--ultron-gold-bg);
  border-color: rgba(255, 184, 0, 0.3);
  color: var(--ultron-gold-bright);
}

.card-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ground-text-dim);
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ground-text-dim);
  flex-grow: 1;
  margin-bottom: 16px;
}

.card-code {
  background: var(--ground-surface);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ultron-gold-bright);
  overflow-x: auto;
}

.card-stat {
  border-top: 1px solid var(--ground-border);
  padding-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  font-weight: 800;
  color: var(--ultron-gold-bright);
}

.stat-lbl {
  font-size: 12px;
  color: var(--ground-text-dim);
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.tel-card {
  background: var(--ground-card);
  border: 1px solid var(--ground-border);
  border-radius: var(--r-m);
  padding: 22px;
}

.tel-lab {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ultron-gold);
  margin-bottom: 8px;
}

.tel-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.meter-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}

.meter-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #FFB800, #FFE066);
  transition: width 0.5s ease;
}

.tel-sub {
  font-size: 12px;
  color: var(--ground-text-dim);
  font-family: "JetBrains Mono", monospace;
}

.tel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.t-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.t-badge.green {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* Mail Section */
.mail-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  background: var(--ground-card);
  border: 1px solid var(--ground-border);
  border-radius: 12px;
  padding: 36px;
}

.mail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 12px;
}

.mail-address {
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--ultron-gold-bright);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.mail-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ground-text-dim);
  margin-bottom: 20px;
}

.mail-protocols {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--ground-text);
}

.mail-dns-card {
  background: var(--ground-surface);
  border: 1px solid rgba(255, 184, 0, 0.2);
  border-radius: 8px;
  padding: 20px;
  font-family: "JetBrains Mono", monospace;
}

.dns-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--ultron-gold);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.dns-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.dns-row span {
  color: var(--ground-text-dim);
}

.dns-row code {
  color: var(--ultron-gold-bright);
}

/* FAQ */
.fq-wrap {
  padding: 80px 0;
  border-top: 1px solid rgba(255, 184, 0, 0.1);
}

.fq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
}

.fq-item {
  background: var(--ground-card);
  border: 1px solid var(--ground-border);
  border-radius: var(--r-m);
  padding: 20px 24px;
  transition: border-color 0.2s ease;
}

.fq-item[open] {
  border-color: rgba(255, 184, 0, 0.4);
}

.fq-q {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fq-q::-webkit-details-marker {
  display: none;
}

.fq-q::after {
  content: "+";
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  color: var(--ultron-gold);
  transition: transform 0.2s ease;
}

.fq-item[open] .fq-q::after {
  content: "−";
  transform: rotate(180deg);
}

.fq-a {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ground-text-dim);
}

.fq-a code {
  background: var(--ground-surface);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ultron-gold-bright);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

/* Footer */
.ft {
  position: relative;
  background: #080706;
  border-top: 1px solid var(--ground-border);
  padding: 64px 0 32px;
  overflow: hidden;
}

.ft-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ft-sky i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--ultron-gold);
  box-shadow: 0 0 4px var(--ultron-gold);
  top: var(--h);
  left: calc(10% + var(--d) * -7%);
  animation: twinkle 4s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; transform: scale(1.4); }
}

.ft-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.ft-brand {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.ft-bio {
  font-size: 14px;
  color: var(--ground-text-dim);
  line-height: 1.6;
  max-width: 380px;
}

.ft-lab {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ultron-gold);
  margin-bottom: 14px;
  display: block;
}

.ft-col a, .ft-link-btn {
  display: block;
  color: var(--ground-text-dim);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
}

.ft-col a:hover, .ft-link-btn:hover {
  color: var(--ultron-gold-bright);
}

.ft-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ground-text-dim);
}

.ft-tagline {
  color: var(--ultron-gold);
}

/* Auth Modal Dialog */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal.is-hidden {
  display: none !important;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 6, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-modal-card {
  position: relative;
  z-index: 2;
  background: #141310;
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 184, 0, 0.15);
  animation: modal-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--ground-text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hr-grid {
    grid-template-columns: 1fr;
  }
  .mail-banner {
    grid-template-columns: 1fr;
  }
  .ft-cols {
    grid-template-columns: 1fr;
  }
  .nv-links {
    display: none;
  }
}
