/* 관제 · Console — an operations console for rigs and blocks.
   A side rail instead of a top bar, a telemetry line over the content, boxed panels with title strips,
   compact type and fixed-width semi-condensed figures (Noto Sans Mono, self-hosted Latin subset). */

@font-face { font-family: "Npt Mono"; src: url(../../fonts/noto-sans-mono-semicondensed-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: u+0020-007e, u+00a0-00ff, u+0131, u+0152-0153, u+02c6, u+02da, u+02dc, u+2000-206f, u+2190-2199, u+2212, u+2215, u+2248, u+2260, u+2264-2265, u+25cf; }
@font-face { font-family: "Npt Mono"; src: url(../../fonts/noto-sans-mono-semicondensed-600.woff2) format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap;
  unicode-range: u+0020-007e, u+00a0-00ff, u+0131, u+0152-0153, u+02c6, u+02da, u+02dc, u+2000-206f, u+2190-2199, u+2212, u+2215, u+2248, u+2260, u+2264-2265, u+25cf; }

/* ---- tokens: light (default) ---- */
[data-skin="console"] {
  --font-display: var(--font-body);
  --font-figure: "Npt Mono", ui-monospace, "SFMono-Regular", "Consolas", var(--font-body);
  --font-figure-lg: var(--font-figure);
  --font-code: "Npt Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas", "DejaVu Sans Mono", monospace;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-md: .875rem; --fs-lg: 1rem; --fs-xl: 1.0625rem; --fs-3xl: 1.5rem; --fs-hero: 1.75rem;
  --fs-figure: 1.625rem; --fs-figure-lg: 2.25rem;
  --lh-body: 1.6; --fw-display: 650; --fw-figure: 600; --track-display: 0; --track-figure: -.02em;
  --wrap: 1440px; --section-gap: 20px; --grid-gap: 16px; --panel-pad: 14px; --cell-y: 7px; --cell-x: 10px; --control-h: 34px; --btn-px: 12px;
  --figure-pad: 12px 14px; --figure-gap: 12px; --figure-min: 11rem;
  --r-1: 3px; --r-2: 4px; --r-3: 6px; --r-btn: 3px; --r-chip: 3px; --r-notice: 4px; --r-field: 3px;
  --panel-border: 1px solid var(--line); --mast-h: 52px; --mast-border: 1px solid var(--mast-line);
  --chart-bar-r: 1; --chart-stroke: 1.5px; --band-opacity: .2; --area-opacity: .1; --chart-h: 260px; --step-dot: 26px;

  --bg: #e8ecf0; --bg-2: #f4f6f9; --surface: #ffffff; --surface-2: #f2f5f8;
  --line: #d3dae1; --line-strong: #77828f;
  --text: #0f1720; --text-2: #4a5665;
  --link: #0a6680; --accent: #0b6e8a; --accent-hover: #095a71; --on-accent: #ffffff; --accent-soft: #dcf0f5; --accent-line: #0b6e8a;
  --focus: #0b84a5;
  --ok: #0e7040; --mine: #0e7040; --on-mine: #ffffff; --on-ok: #ffffff; --locked: #6a46b8; --warn: #9a5c00; --danger: #c0262d; --info: #1d5fa8;
  --ok-soft: #e3f3ea; --warn-soft: #fbf0dc; --danger-soft: #fbe6e6; --info-soft: #e5eef9;
  --chip-bg: #eef1f5; --chip-border: #d3dae1; --th-bg: #f2f5f8; --row-hover: #f4f7fa; --field-bg: #ffffff;
  --mast-bg: #17212b; --mast-text: #e8eef4; --mast-text-2: #a9b7c6; --mast-accent: #4cc3e0; --mast-line: #2b3846; --mast-hover: #223040; --mark: #4cc3e0;
  --status-bg: #dfe4e9; --code-bg: #f4f6f9; --code-text: #16202b;
  --c-s1: #0b84a5; --c-s2: #6a46b8; --c-s3: #c4501a; --c-mine: #0e7040; --c-pool: #1d5fa8; --c-other: #7e8a97; --c-grid: #e3e8ed;
}

/* ---- tokens: dark, chosen with the theme button (keep identical to the block below) ---- */
[data-theme="dark"] [data-skin="console"] {
  --bg: #0b1016; --bg-2: #0f151c; --surface: #121a23; --surface-2: #17212c;
  --line: #223041; --line-strong: #5b6f85;
  --text: #dbe5ee; --text-2: #93a4b5;
  --link: #6fd0e8; --accent: #46bfdc; --accent-hover: #74d3ea; --on-accent: #04141a; --accent-soft: #10303a; --accent-line: #46bfdc;
  --focus: #6fd0e8;
  --ok: #38c98a; --mine: #38c98a; --on-mine: #04170e; --on-ok: #04170e; --locked: #a98bf5; --warn: #f0ad3c; --danger: #ff6f6f; --info: #6aa8f0;
  --ok-soft: #0f2a1f; --warn-soft: #2c2210; --danger-soft: #331618; --info-soft: #12243a;
  --chip-bg: #18222d; --chip-border: #2a394b; --th-bg: #151e28; --row-hover: #16202a; --field-bg: #0f151c;
  --mast-bg: #070b10; --mast-text: #dbe5ee; --mast-text-2: #8fa0b2; --mast-accent: #46bfdc; --mast-line: #1a2532; --mast-hover: #121b25; --mark: #46bfdc;
  --status-bg: #0e141b; --code-bg: #0f151c; --code-text: #cfdbe6;
  --c-s1: #46bfdc; --c-s2: #a98bf5; --c-s3: #f0874a; --c-mine: #38c98a; --c-pool: #6aa8f0; --c-other: #5d6c7c; --c-grid: #1a2430;
}
/* ---- tokens: dark, following the system setting (keep identical to the block above) ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-skin="console"] {
    --bg: #0b1016; --bg-2: #0f151c; --surface: #121a23; --surface-2: #17212c;
    --line: #223041; --line-strong: #5b6f85;
    --text: #dbe5ee; --text-2: #93a4b5;
    --link: #6fd0e8; --accent: #46bfdc; --accent-hover: #74d3ea; --on-accent: #04141a; --accent-soft: #10303a; --accent-line: #46bfdc;
    --focus: #6fd0e8;
    --ok: #38c98a; --mine: #38c98a; --on-mine: #04170e; --on-ok: #04170e; --locked: #a98bf5; --warn: #f0ad3c; --danger: #ff6f6f; --info: #6aa8f0;
    --ok-soft: #0f2a1f; --warn-soft: #2c2210; --danger-soft: #331618; --info-soft: #12243a;
    --chip-bg: #18222d; --chip-border: #2a394b; --th-bg: #151e28; --row-hover: #16202a; --field-bg: #0f151c;
    --mast-bg: #070b10; --mast-text: #dbe5ee; --mast-text-2: #8fa0b2; --mast-accent: #46bfdc; --mast-line: #1a2532; --mast-hover: #121b25; --mark: #46bfdc;
    --status-bg: #0e141b; --code-bg: #0f151c; --code-text: #cfdbe6;
    --c-s1: #46bfdc; --c-s2: #a98bf5; --c-s3: #f0874a; --c-mine: #38c98a; --c-pool: #6aa8f0; --c-other: #5d6c7c; --c-grid: #1a2430;
  }
}

/* ---- layout: side rail, telemetry line, boxed panels ---- */
[data-skin="console"]:lang(en) { --label-transform: uppercase; --track-label: .07em; }
[data-skin="console"] .brand { font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
[data-skin="console"] .brand-mark { width: 24px; height: 24px; }
[data-skin="console"] .statusline { font-family: var(--font-figure); }
[data-skin="console"] .statusline-in { max-width: none; gap: 0; padding-block: 0; }
[data-skin="console"] .sl-item { padding: 6px 16px 6px 0; margin-right: 16px; border-right: 1px solid var(--line); }
[data-skin="console"] .sl-item:last-child { border-right: 0; }
[data-skin="console"] .sl-label { font-size: .6875rem; text-transform: var(--label-transform); letter-spacing: var(--track-label); }
[data-skin="console"] .statusline .chip { border-radius: 2px; }
[data-skin="console"] .wrap { max-width: var(--wrap); }
[data-skin="console"] .page { padding-block: 20px 48px; }
[data-skin="console"] .page-head { gap: 6px; max-width: none; }
[data-skin="console"] .page-head h1 { font-size: var(--fs-3xl); }
[data-skin="console"] .lead { font-size: .875rem; max-width: 70em; }
[data-skin="console"] .kicker, [data-skin="console"] .figure-label, [data-skin="console"] thead th, [data-skin="console"] .ctl-label {
  font-family: var(--font-figure); font-size: .6875rem; font-weight: 600; }
[data-skin="console"] .panel { gap: 12px; }
[data-skin="console"] .panel > .section-head:first-child { margin: -14px -14px 0; padding: 8px 14px; min-height: 42px; align-items: center;
  background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: 4px 4px 0 0; }
[data-skin="console"] .panel > .section-head h2 { font-size: .875rem; font-family: var(--font-body); }
[data-skin="console"] .section > .section-head h2 { font-size: 1rem; }
[data-skin="console"] .panel > .table-wrap { margin-inline: -14px; border-left: 0; border-right: 0; border-radius: 0; }
[data-skin="console"] .panel > .table-wrap:last-child { margin-bottom: -14px; border-bottom: 0; border-radius: 0 0 4px 4px; }
[data-skin="console"] .figures { --figure-bg: var(--surface); --figure-border: 1px solid var(--line); }
[data-skin="console"] .figure { border-top: 2px solid var(--line-strong); }
[data-skin="console"] .figure.is-lead { border-top-color: var(--accent-line); }
[data-skin="console"] .figure-value .unit { font-family: var(--font-figure); font-size: .75rem; }
[data-skin="console"] tbody tr:nth-child(even) td { background: var(--bg-2); }
[data-skin="console"] td .mono, [data-skin="console"] td.mono, [data-skin="console"] td.num { font-family: var(--font-figure); font-size: .8125rem; }
[data-skin="console"] .chip { font-size: .6875rem; min-height: 22px; padding: 1px 8px 1px 6px; }
[data-skin="console"] .chip::before { border-radius: 1px; width: 7px; height: 7px; }
[data-skin="console"] .seg button { min-height: 30px; font-size: .75rem; font-family: var(--font-figure); }
[data-skin="console"] .flow { gap: 12px; }
[data-skin="console"] .flow > li { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px; }
[data-skin="console"] .flow > li::before { font-family: var(--font-figure); font-size: .75rem; color: var(--accent); content: "0" counter(flow); }
[data-skin="console"] .steps > li { padding-block: 9px; }
[data-skin="console"] .steps > li::before { border-radius: 3px; font-family: var(--font-figure); font-size: .75rem; }
[data-skin="console"] .notice { border-left-width: 3px; font-size: .8125rem; }
[data-skin="console"] .cmd pre { font-size: .75rem; }
@media (max-width: 640px), (pointer: coarse) { [data-skin="console"] .seg button { min-height: 44px; } }
@media (max-width: 640px) { [data-skin="console"] .is-stack tbody tr:nth-child(even) td { background: transparent; } }

/* the rail: from 1101 px the masthead becomes a full-height column on the left */
@media (min-width: 1101px) {
  [data-skin="console"] .shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); grid-template-rows: auto 1fr auto;
    grid-template-areas: "mast status" "mast main" "mast foot";
    background: linear-gradient(to right, var(--mast-bg) calc(15.5rem - 1px), var(--mast-line) calc(15.5rem - 1px), var(--mast-line) 15.5rem, transparent 15.5rem); }
  [data-skin="console"] .mast { grid-area: mast; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--mast-line); }
  [data-skin="console"] .mast-in { flex-direction: column; align-items: stretch; max-width: none; min-height: 100%; padding: 14px 12px 16px; gap: 18px; }
  /* the rail keeps its menu open from 1101 px: undo the shared collapsed-menu rules (they apply up to 1320 px) */
  [data-skin="console"] .menu-btn { display: none; }
  [data-skin="console"] .nav { display: flex; position: static; padding: 0; border: 0; background: transparent; box-shadow: none; }
  [data-skin="console"] .nav-list a { border-bottom: 0; }
  [data-skin="console"] .brand { padding-inline: 8px; }
  [data-skin="console"] .nav { flex-direction: column; align-items: stretch; flex: 1; gap: 16px; }
  [data-skin="console"] .nav-list { flex-direction: column; justify-content: flex-start; gap: 2px; flex: 0 0 auto; }
  [data-skin="console"] .nav-list a { min-height: 36px; padding-inline: 10px; border-radius: 3px; font-size: .875rem; }
  [data-skin="console"] .nav-list a[aria-current="page"] { background: var(--mast-hover); box-shadow: inset 3px 0 0 var(--mast-accent); }
  [data-skin="console"] .tools { flex-direction: column; align-items: stretch; margin-top: auto; gap: 6px; }
  [data-skin="console"] .tools .btn, [data-skin="console"] .tools button { justify-content: flex-start; }
  [data-skin="console"] .statusline { grid-area: status; position: sticky; top: 0; z-index: 20; }
  [data-skin="console"] .main { grid-area: main; }
  [data-skin="console"] .foot { grid-area: foot; margin-top: 0; }
  [data-skin="console"] .foot-in { max-width: var(--wrap); }
}
@media (min-width: 641px) { [data-skin="console"] { --gutter: 24px; } }

/* home: no marketing hero — the thesis line, the reward statement and the live figures share the first screen */
[data-skin="console"] .hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
[data-skin="console"] .hero-copy { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
[data-skin="console"] .hero h1 { font-size: 1.625rem; }
[data-skin="console"] .hero .lead { font-size: .875rem; }
[data-skin="console"] .sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
[data-skin="console"] .sheet-title { font-size: .6875rem; font-family: var(--font-figure); color: var(--text-2); text-transform: var(--label-transform); letter-spacing: var(--track-label); }
[data-skin="console"] .sheet-note { font-size: .75rem; color: var(--text-2); }
[data-skin="console"] .statement-row { padding-block: 5px; font-size: .8125rem; }
[data-skin="console"] .statement-row dd { font-family: var(--font-figure); }
@media (max-width: 900px) { [data-skin="console"] .hero { grid-template-columns: minmax(0, 1fr); } }
