/* NEXUS/OS — sci-fi HUD command center */
:root {
  --bg: #04060a;
  --bg-2: #070b11;
  --panel: rgba(8, 13, 20, 0.9);
  --panel-2: rgba(14, 22, 32, 0.9);
  --text: #d5e3ec;
  --dim: #8195a5;
  --faint: #4b5d6b;
  --acc: #00e5ff;
  --acc-rgb: 0, 229, 255;
  --acc2: #ffb000;
  --acc2-rgb: 255, 176, 0;
  --line: rgba(var(--acc-rgb), 0.14);
  --line-2: rgba(var(--acc-rgb), 0.32);
  --ok: #3ef08a;
  --err: #ff4d6d;
  --mono: 'JetBrains Mono', 'IBM Plex Sans KR', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'IBM Plex Sans KR', 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
  --top-h: 52px;
  --foot-h: 28px;
  --gap: 8px;
  color-scheme: dark;
}
html[data-theme='amber'] {
  --acc: #ffb000;
  --acc-rgb: 255, 176, 0;
  --acc2: #00e5ff;
  --acc2-rgb: 0, 229, 255;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(var(--acc-rgb), 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(var(--acc2-rgb), 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* fine grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--acc-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--acc-rgb), 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}
/* CRT scanlines + vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
  mix-blend-mode: multiply;
}
::selection { background: rgba(var(--acc-rgb), 0.35); color: #fff; }
a { color: var(--acc); }
button { font: inherit; color: inherit; cursor: pointer; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 3px;
  font: 500 10.5px/1.6 var(--mono);
  color: var(--dim);
  text-align: center;
}
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  background: var(--acc); color: #000; padding: 6px 10px; text-decoration: none;
}
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── boot ─────────────────────────────── */
.boot {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.45s ease, visibility 0.45s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(720px, 92vw); }
.boot-brand { margin: 0 0 14px; font-weight: 800; font-size: 15px; color: var(--acc); letter-spacing: 0.04em; }
.boot-brand em { font-style: normal; color: var(--faint); font-weight: 500; }
.boot-log {
  margin: 0;
  min-height: 15.5em;
  font: 12.5px/1.7 var(--mono);
  color: var(--dim);
  white-space: pre-wrap;
}
.boot-log .ok { color: var(--ok); }
.boot-log .acc { color: var(--acc); }
.boot-log .warn { color: var(--acc2); }
.boot-bar { margin-top: 16px; height: 3px; background: rgba(var(--acc-rgb), 0.12); }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--acc); box-shadow: 0 0 12px var(--acc); transition: width 0.15s; }
.boot-skip { margin: 10px 0 0; font-size: 11px; color: var(--faint); }
.cursor::after { content: '▋'; color: var(--acc); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── top bar ──────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 26px; height: 26px; flex: none;
  border: 1.5px solid var(--acc);
  position: relative;
  clip-path: polygon(0 25%, 25% 0, 100% 0, 100% 75%, 75% 100%, 0 100%);
  background: rgba(var(--acc-rgb), 0.1);
}
.brand-mark::after {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  border: 1.5px solid var(--acc2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(0.6); opacity: 0.5; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text b { font-family: var(--sans); font-weight: 700; font-size: 14px; white-space: nowrap; }
.brand-text small { color: var(--dim); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.telemetry { display: flex; gap: 6px; margin: 0 auto; }
.telemetry > div {
  display: flex; align-items: baseline; gap: 7px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  background: rgba(var(--acc-rgb), 0.03);
}
.telemetry dt { font-size: 9.5px; color: var(--faint); letter-spacing: 0.12em; }
.telemetry dd { margin: 0; font-size: 12px; white-space: nowrap; }
.t-clock dd { color: var(--acc); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 8ch; }

.top-actions { display: flex; gap: 6px; }
.cmd-btn, .icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.cmd-btn:hover, .icon-btn:hover { background: rgba(var(--acc-rgb), 0.1); border-color: var(--acc); }
.icon-btn { width: 30px; justify-content: center; padding: 0; font-size: 14px; }

/* glitch title */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
}
.glitch::before { color: var(--acc); transform: translate(-2px, 0); }
.glitch::after { color: #ff2e88; transform: translate(2px, 0); }
.glitch.is-glitch::before { animation: g1 0.42s steps(2) both; }
.glitch.is-glitch::after { animation: g2 0.42s steps(2) both; }
@keyframes g1 {
  0% { opacity: 0.9; clip-path: inset(10% 0 60% 0); }
  33% { clip-path: inset(55% 0 8% 0); transform: translate(-3px, 1px); }
  66% { clip-path: inset(30% 0 40% 0); transform: translate(2px, -1px); }
  100% { opacity: 0; }
}
@keyframes g2 {
  0% { opacity: 0.9; clip-path: inset(65% 0 5% 0); }
  33% { clip-path: inset(5% 0 70% 0); transform: translate(3px, -1px); }
  66% { clip-path: inset(40% 0 35% 0); transform: translate(-2px, 1px); }
  100% { opacity: 0; }
}

/* ── tabs (mobile only) ──────────────── */
.tabs { display: none; }

/* ── workspace & windows ─────────────── */
.ws {
  position: relative;
  z-index: 1;
  height: max(640px, calc(100vh - var(--top-h) - var(--foot-h)));
  margin: 0 6px;
  outline: none;
}
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  min-height: 120px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  resize: both;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: win-in 0.5s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes win-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
/* corner brackets */
.win::before, .win::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  pointer-events: none;
  border: 2px solid var(--acc);
  opacity: 0.55;
  z-index: 2;
}
.win::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.win::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.win.is-focus { border-color: var(--line-2); box-shadow: 0 14px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(var(--acc-rgb), 0.18), 0 0 30px rgba(var(--acc-rgb), 0.08); }
.win.is-focus::before, .win.is-focus::after { opacity: 1; }
.win.is-drag { opacity: 0.92; transition: none; user-select: none; }
.win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; resize: none; }
.win.is-min { height: 34px !important; min-height: 0; resize: none; }
.win.is-min .win-body { display: none; }
.win.flash { animation: flash 0.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--acc), 0 0 40px rgba(var(--acc-rgb), 0.5); } }

.win-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 33px;
  padding: 0 6px 0 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(var(--acc-rgb), 0.09), transparent 70%);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.win-bar:focus-visible { outline-offset: -2px; }
.win.is-drag .win-bar { cursor: grabbing; }
.win-no { font-size: 10px; color: var(--acc); border: 1px solid var(--line-2); padding: 0 4px; }
.win-bar h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-bar h2 span { margin-left: 6px; color: var(--dim); font-weight: 400; letter-spacing: 0; font-family: var(--sans); }
.win-ctl { display: flex; gap: 2px; }
.win-ctl button {
  width: 22px; height: 22px;
  border: 1px solid transparent;
  background: none;
  color: var(--dim);
  font-size: 12px;
  line-height: 1;
}
.win-ctl button:hover { border-color: var(--line-2); color: var(--acc); }
.win-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--acc-rgb), 0.3) transparent;
}

.sub-h {
  display: flex; align-items: baseline; gap: 8px;
  margin: 18px 0 8px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--acc);
}
.sub-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sub-h span { font-family: var(--sans); letter-spacing: 0; color: var(--dim); font-weight: 400; }
.note { margin: 0; color: var(--dim); font-family: var(--sans); font-size: 12.5px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  background: rgba(var(--acc-rgb), 0.04);
  color: var(--text);
  font: 500 12px var(--mono);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--acc); background: rgba(var(--acc-rgb), 0.12); color: #fff; }
.btn.primary { background: var(--acc); color: #001014; border-color: var(--acc); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.15); color: #000; }
.btn::after { content: '↗'; font-size: 10px; opacity: 0.6; }
.btn.no-arrow::after, button.btn::after { content: none; }

/* ── profile ─────────────────────────── */
.eyebrow { margin: 0 0 6px; color: var(--acc2); font-size: 11px; letter-spacing: 0.06em; }
.headline {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(20px, 1.9vw, 30px);
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.headline span { display: block; }
.headline span:last-child { color: var(--acc); text-shadow: 0 0 18px rgba(var(--acc-rgb), 0.45); }
.intro { font-family: var(--sans); font-size: 13px; color: var(--dim); }
.intro p { margin: 0 0 2px; }
.intro b { color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; }
.kpis div { border: 1px solid var(--line); padding: 6px 8px; background: rgba(var(--acc-rgb), 0.03); }
.kpis dt { font-size: 9.5px; letter-spacing: 0.1em; color: var(--faint); }
.kpis dd { margin: 0; font-size: 20px; font-weight: 800; color: var(--acc); font-variant-numeric: tabular-nums; }
.about { margin: 0; font-family: var(--sans); font-size: 12.5px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ── graph ───────────────────────────── */
.graph-body { position: relative; padding: 0; overflow: hidden; }
.graph { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.graph:focus-visible { outline-offset: -3px; }
.graph-hud {
  position: absolute; left: 10px; right: 10px; bottom: 6px;
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 10px; color: var(--faint); pointer-events: none;
}

/* ── detail ──────────────────────────── */
.detail { --c: var(--acc); }
.d-head { position: relative; padding-left: 12px; border-left: 3px solid var(--c); }
.d-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10.5px; color: var(--dim); }
.d-meta b { color: var(--c); font-weight: 500; }
.d-title { margin: 4px 0 0; font-family: var(--sans); font-size: 24px; line-height: 1.2; font-weight: 700; }
.d-kicker { margin: 2px 0 0; color: var(--c); font-family: var(--sans); font-size: 13px; }
.d-desc { margin: 12px 0 0; font-family: var(--sans); font-size: 13px; }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 4px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 92px; display: block; margin: 0 auto; overflow: visible; }
.gauge .track { stroke: rgba(255, 255, 255, 0.07); }
.gauge .val { stroke: var(--c); filter: drop-shadow(0 0 4px var(--c)); transition: stroke-dasharray 1.1s cubic-bezier(.2, .8, .2, 1); }
.gauge .ticks { stroke: rgba(255, 255, 255, 0.18); }
.gauge text { fill: var(--text); font: 700 15px var(--mono); }
.gauge text.u { fill: var(--dim); font: 400 8px var(--mono); }
.gauge figcaption { font-size: 10px; color: var(--dim); }
.langbar { display: flex; height: 6px; margin: 12px 0 4px; gap: 2px; }
.langbar i { display: block; height: 100%; }
.lang-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 0; margin: 0; list-style: none; font-size: 10.5px; color: var(--dim); }
.lang-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.chips li, .chips button {
  padding: 1px 8px;
  border: 1px solid var(--line-2);
  font-size: 11px;
  background: rgba(var(--acc-rgb), 0.04);
}
.chips button:hover, .chips button[aria-pressed='true'] { border-color: var(--acc2); color: var(--acc2); }
.d-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.d-nav { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--line); }
.d-nav button { background: none; border: 0; color: var(--dim); font-size: 11px; padding: 2px 0; }
.d-nav button:hover { color: var(--acc); }
.related { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.related button { width: 100%; display: flex; gap: 8px; align-items: center; background: none; border: 1px solid transparent; padding: 3px 6px; text-align: left; font-size: 11.5px; }
.related button:hover { border-color: var(--line-2); }
.related i { width: 8px; height: 8px; background: var(--rc); flex: none; }
.related small { margin-left: auto; color: var(--faint); }

/* ── index rows ──────────────────────── */
.sorter { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 10px; color: var(--faint); }
.sorter span { margin-right: 4px; letter-spacing: 0.12em; }
.sorter button { padding: 1px 8px; border: 1px solid var(--line); background: none; font-size: 11px; color: var(--dim); }
.sorter button[aria-pressed='true'] { border-color: var(--acc); color: var(--acc); }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.row {
  --c: var(--acc);
  width: 100%;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 6px 8px 6px 0;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.row::before { content: ''; grid-row: 1 / 3; align-self: stretch; background: var(--c); box-shadow: 0 0 8px var(--c); }
.row:hover { background: rgba(var(--acc-rgb), 0.06); transform: translateX(2px); }
.row[aria-current='true'] { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.row-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.row-name b { font-family: var(--sans); font-size: 13px; white-space: nowrap; }
.row-name small { color: var(--dim); font-family: var(--sans); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-stars { font-size: 12px; font-weight: 700; color: var(--acc2); font-variant-numeric: tabular-nums; text-align: right; }
.row-meta { grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; font-size: 10px; color: var(--faint); }
.spark { flex: 1; height: 18px; min-width: 40px; }
.spark path.l { fill: none; stroke: var(--c); stroke-width: 1.3; }
.spark path.a { fill: var(--c); opacity: 0.12; }
.spark circle { fill: var(--c); }
.spark.draw path.l { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s cubic-bezier(.3, .7, .2, 1) forwards; animation-delay: calc(var(--i) * 80ms + 300ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sizebar { width: 46px; height: 4px; background: rgba(255, 255, 255, 0.06); }
.sizebar i { display: block; height: 100%; background: var(--dim); }

/* ── terminal ────────────────────────── */
.term { display: flex; flex-direction: column; padding: 0; background: rgba(0, 0, 0, 0.35); cursor: text; }
.term-out {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 4px;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--acc-rgb), 0.3) transparent;
}
.term-out .cmd { color: var(--text); }
.term-out .cmd::before { content: '$ '; color: var(--acc); }
.term-out .dim { color: var(--dim); }
.term-out .acc { color: var(--acc); }
.term-out .acc2 { color: var(--acc2); }
.term-out .ok { color: var(--ok); }
.term-out .err { color: var(--err); }
.term-out a { color: var(--acc); }
.term-out .blk { display: block; margin-bottom: 6px; }
.term-out button.lnk { background: none; border: 0; padding: 0; color: var(--acc); text-decoration: underline; text-underline-offset: 2px; }
.term-line { display: flex; align-items: center; gap: 8px; padding: 6px 12px 8px; border-top: 1px solid var(--line); }
.prompt { color: var(--ok); white-space: nowrap; font-size: 12.5px; }
.prompt i { color: var(--acc); font-style: normal; }
.term-line input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font: 12.5px var(--mono);
  caret-color: var(--acc);
}

/* ── stack ───────────────────────────── */
.donut-wrap { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.donut { width: 112px; flex: none; overflow: visible; }
.donut path { transition: opacity 0.2s, transform 0.25s; transform-origin: 60px 60px; cursor: pointer; }
.donut.has-hl path:not(.hl) { opacity: 0.25; }
.donut path.hl { transform: scale(1.06); }
.donut text { fill: var(--text); font: 800 15px var(--mono); }
.donut text.u { fill: var(--dim); font: 400 7.5px var(--mono); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 11.5px; flex: 1; }
.legend button { width: 100%; display: flex; align-items: center; gap: 7px; padding: 1px 4px; background: none; border: 1px solid transparent; text-align: left; }
.legend button:hover, .legend button:focus-visible { border-color: var(--line-2); }
.legend i { width: 8px; height: 8px; flex: none; }
.legend b { margin-left: auto; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
.repo-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 11px; }
.repo-bars li { display: grid; grid-template-columns: 9.5em 1fr 4.2em; gap: 8px; align-items: center; }
.repo-bars span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--sans); }
.repo-bars .bar { display: flex; height: 6px; background: rgba(255, 255, 255, 0.04); }
.repo-bars .bar i { height: 100%; }
.repo-bars .kb { text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }
.fw { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px; }
.fw li { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border: 1px solid var(--line); }
.fw .mark { width: 24px; height: 24px; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: var(--acc); border: 1px solid var(--line-2); }
.fw b { display: block; font-size: 11.5px; font-weight: 500; font-family: var(--sans); }
.fw small { display: block; color: var(--dim); font-size: 10.5px; font-family: var(--sans); }

/* ── status bar ──────────────────────── */
.statusbar {
  position: relative;
  z-index: 40;
  height: var(--foot-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  background: rgba(4, 6, 10, 0.92);
  font-size: 10.5px;
  color: var(--dim);
}
.statusbar b { color: var(--faint); font-weight: 500; letter-spacing: 0.08em; }
.sb-log { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.sb-log::before { content: '▸ '; color: var(--acc); }
.sb-log.new { animation: logIn 0.4s ease-out; }
@keyframes logIn { from { opacity: 0; transform: translateX(-8px); } }
.sb-item { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sb-credit { white-space: nowrap; color: var(--faint); }
.online { color: var(--ok); }
.offline { color: var(--err); }

/* ── palette ─────────────────────────── */
.palette {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: 12vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}
.palette[hidden] { display: none; }
.palette-box {
  width: min(620px, calc(100vw - 24px));
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(var(--acc-rgb), 0.12);
  animation: pop 0.18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--acc); font-size: 18px; }
.palette-head input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 15px var(--mono); }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 420px); overflow: auto; }
.palette-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.palette-list li[aria-selected='true'] { background: rgba(var(--acc-rgb), 0.1); border-left-color: var(--acc); }
.palette-list .k { font-size: 9.5px; letter-spacing: 0.1em; color: var(--faint); width: 5.5em; flex: none; }
.palette-list .dot { width: 8px; height: 8px; flex: none; background: var(--c, var(--acc)); }
.palette-list .t { font-family: var(--sans); flex: none; }
.palette-list .s { color: var(--dim); font-family: var(--sans); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-list mark { background: none; color: var(--acc); }
.palette-list .empty { color: var(--dim); cursor: default; }
.palette-foot { margin: 0; padding: 7px 14px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ── responsive: tabbed single column ─ */
@media (max-width: 1100px) {
  .t-date { display: none; }
  .sb-credit { display: none; }
}
@media (max-width: 860px) {
  :root { --top-h: 50px; }
  body { font-size: 13.5px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand-text small { max-width: 40vw; }
  .telemetry { margin: 0 0 0 auto; }
  .telemetry > div:not(.t-clock) { display: none; }
  .telemetry > div { padding: 2px 6px; }
  .telemetry dt { white-space: nowrap; }
  body { display: flex; flex-direction: column; }
  .ws { flex: 1; }
  .cmd-btn span, .cmd-btn kbd { display: none; }
  .cmd-btn { width: 30px; padding: 0; justify-content: center; }
  .cmd-btn::before { content: '⌘'; }
  [data-retile] { display: none; }
  .tabs {
    position: sticky;
    top: var(--top-h);
    z-index: 45;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 6px 12px;
    background: rgba(4, 6, 10, 0.94);
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }
  .tabs button {
    flex: none;
    padding: 6px 10px;
    border: 1px solid var(--line);
    background: none;
    color: var(--dim);
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .tabs button[aria-selected='true'] { color: #001014; background: var(--acc); border-color: var(--acc); font-weight: 700; }
  .ws { height: auto; margin: 10px 12px 16px; }
  .win {
    position: relative;
    left: auto !important; top: auto !important;
    width: auto !important; height: auto !important;
    display: none;
    resize: none;
    animation: none;
  }
  .win.is-active { display: flex; }
  .win.is-min .win-body { display: block; }
  .win.is-min { height: auto !important; }
  .win-bar { cursor: default; }
  .win-ctl { display: none; }
  .win-body { overflow: visible; }
  .graph-body { height: 62vh; min-height: 340px; }
  .term { height: 64vh; min-height: 340px; }
  .term-out { overflow: auto; }
  .statusbar { position: sticky; bottom: 0; gap: 10px; padding: 0 12px; }
  .statusbar .sb-item:nth-of-type(2) { display: none; }
  .headline { font-size: 26px; }
  .repo-bars li { grid-template-columns: 7.5em 1fr 4em; }
}

/* ── reduced motion ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .cursor::after { animation: none; }
  .spark.draw path.l { stroke-dashoffset: 0; }
}

/* ── AI Next 추가: 편집 보조 요소, 연락 폼 ── */
[hidden] { display: none !important; }
.row-dot { width: 7px; height: 7px; flex: none; align-self: center; background: var(--c); box-shadow: 0 0 6px var(--c); }
.contact-form { display: grid; gap: 6px; margin-top: 10px; position: relative; }
.contact-form input:not(.hp), .contact-form textarea {
  width: 100%; padding: 6px 8px; font: inherit; font-size: 12px; color: var(--text);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); border-radius: 0; resize: vertical;
}
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 1px solid var(--acc); outline-offset: 1px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button { justify-self: start; }
.form-status { margin: 0; min-height: 1em; font-size: 11px; color: var(--dim); }
.ai-swatch { display: none; }
