:root {
  --graphite: #090b0b;
  --panel: #101313;
  --panel-raised: #151918;
  --line: #303635;
  --line-soft: #222726;
  --paper: #eee9d8;
  --muted: #8f9994;
  --acid: #d7ff45;
  --cyan: #45e6ef;
  --alert: #ff655d;
  --shadow: 0 24px 70px rgb(0 0 0 / 38%);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--paper);
  background: var(--graphite);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--graphite); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background:
  radial-gradient(circle at 83% -10%, rgb(69 230 239 / 9%), transparent 31rem),
  radial-gradient(circle at -8% 42%, rgb(215 255 69 / 5%), transparent 25rem), var(--graphite); }
body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .2; background: repeating-linear-gradient(0deg, transparent 0 3px, rgb(255 255 255 / 2%) 3px 4px); mix-blend-mode: screen; }
.ambient-grid { position: fixed; inset: 0; pointer-events: none; opacity: .2; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 76%); }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; padding: .75rem 1rem; color: var(--graphite); background: var(--acid); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.masthead, main, footer { width: min(1280px, calc(100% - 64px)); margin-inline: auto; position: relative; z-index: 1; }
.masthead { height: 112px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand-block { display: flex; align-items: center; gap: 18px; }
.brand-mark { width: 47px; height: 47px; display: grid; grid-template-columns: 1fr 1fr; place-items: center; border: 1px solid var(--paper); transform: rotate(-3deg); font: 800 20px/1 ui-monospace, monospace; }
.brand-mark span:last-child { color: var(--cyan); }
.eyebrow { margin: 0 0 4px; color: var(--muted); font: 700 10px/1.3 ui-monospace, monospace; letter-spacing: .19em; }
h1 { margin: 0; font: 900 clamp(25px, 3vw, 37px)/.9 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; letter-spacing: .055em; }
h1 span { color: var(--acid); }
.phase-stamp { display: grid; grid-template-columns: auto auto; align-items: end; gap: 0 11px; text-align: right; font-family: ui-monospace, monospace; }
.phase-stamp span { color: var(--muted); font-size: 9px; letter-spacing: .2em; }
.phase-stamp strong { grid-row: span 2; color: var(--acid); font-size: 45px; line-height: .8; }
.phase-stamp small { font-size: 10px; letter-spacing: .13em; }

main { padding-block: 28px 72px; }
.safety-ribbon { min-height: 45px; padding: 10px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid rgb(215 255 69 / 45%); background: rgb(215 255 69 / 7%); font: 600 12px/1.4 ui-monospace, monospace; letter-spacing: .04em; }
.safety-ribbon strong { color: var(--acid); font-size: 14px; }
.safety-ribbon > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.safety-icon { color: var(--acid); animation: pulse 2s ease-in-out infinite; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); gap: 18px; margin-top: 18px; }
.instrument { position: relative; border: 1px solid var(--line); background: linear-gradient(135deg, rgb(255 255 255 / 2%), transparent 30%), var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.instrument::before { content: ""; position: absolute; top: 0; left: 0; width: 54px; height: 3px; background: var(--cyan); }
.instrument-label { min-height: 39px; padding: 13px 16px 10px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-soft); color: var(--muted); font: 700 9px/1 ui-monospace, monospace; letter-spacing: .15em; }
.hero-status { min-height: 176px; padding: 34px 30px; display: flex; align-items: center; gap: 28px; }
.health-orbit { width: 76px; aspect-ratio: 1; position: relative; flex: none; border: 1px dashed var(--muted); border-radius: 50%; animation: rotate 12s linear infinite; }
.health-orbit::before, .health-orbit::after { content: ""; position: absolute; border-radius: 50%; }
.health-orbit::before { inset: 11px; border: 1px solid var(--line); }
.health-orbit::after { width: 7px; height: 7px; top: -4px; left: calc(50% - 3px); background: var(--muted); box-shadow: 0 0 14px currentColor; }
.health-orbit i { position: absolute; inset: 26px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 22px rgb(143 153 148 / 45%); }
.health-orbit.healthy { border-color: var(--cyan); color: var(--cyan); }
.health-orbit.healthy::after, .health-orbit.healthy i { background: var(--cyan); box-shadow: 0 0 24px rgb(69 230 239 / 65%); }
.health-orbit.danger { border-color: var(--alert); color: var(--alert); }
.health-orbit.danger::after, .health-orbit.danger i { background: var(--alert); }
.status-title { margin: 0; font-size: clamp(25px, 4vw, 42px); font-weight: 850; letter-spacing: -.045em; }
.status-detail { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.signal-line { height: 27px; position: relative; border-block: 1px solid var(--line-soft); background: repeating-linear-gradient(90deg, transparent 0 12px, var(--line-soft) 12px 13px); overflow: hidden; }
.signal-line i { position: absolute; top: 12px; left: 0; width: 38%; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: scan 2.8s ease-in-out infinite; }
.connection-strip { margin: 0; display: grid; grid-template-columns: 1.2fr 1fr 1fr; }
.connection-strip div { padding: 15px 17px; min-width: 0; border-right: 1px solid var(--line-soft); }
.connection-strip div:last-child { border: 0; }
.connection-strip dt { margin-bottom: 8px; color: var(--muted); font: 700 8px/1 ui-monospace, monospace; letter-spacing: .13em; }
.connection-strip dd { margin: 0; color: var(--cyan); overflow: hidden; text-overflow: ellipsis; font: 700 11px/1.2 ui-monospace, monospace; white-space: nowrap; }

.limit-instrument::before { background: var(--acid); }
.limit-reading { padding: 25px 22px 18px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; border-bottom: 1px solid var(--line-soft); }
.limit-reading span { grid-column: 1 / -1; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.limit-reading strong { font: 800 40px/1 ui-monospace, monospace; letter-spacing: -.07em; }
.limit-reading em { color: var(--acid); font: 700 10px/1 ui-monospace, monospace; font-style: normal; }
.limit-reading.secondary { padding-block: 18px; }
.limit-reading.secondary strong { font-size: 27px; }
.limit-note { margin: 17px 20px 20px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.limit-note span { display: inline-grid; width: 17px; height: 17px; margin-right: 5px; place-items: center; border: 1px solid var(--alert); color: var(--alert); font: 800 10px/1 ui-monospace, monospace; }

.metric-board, .market-section { margin-top: 46px; }
.section-heading { margin-bottom: 14px; display: flex; align-items: end; justify-content: space-between; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.section-heading > p { margin: 0; color: var(--muted); font: 700 9px/1 ui-monospace, monospace; letter-spacing: .09em; }
.runtime-dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--muted); }
.runtime-dot.live { background: var(--acid); box-shadow: 0 0 12px var(--acid); animation: pulse 1.7s ease-in-out infinite; }
.metric-grid { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.metric { min-width: 0; min-height: 142px; padding: 18px 16px 16px; position: relative; border-right: 1px solid var(--line); }
.metric:last-child { border: 0; }
.metric-index { position: absolute; top: 11px; right: 11px; color: var(--line); font: 800 22px/1 ui-monospace, monospace; }
.metric p { min-height: 30px; margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.metric strong { display: block; overflow: hidden; color: var(--paper); font: 750 clamp(21px, 2.5vw, 32px)/1 ui-monospace, monospace; letter-spacing: -.07em; text-overflow: ellipsis; }
.metric small { display: block; margin-top: 10px; color: #5f6965; font: 700 7px/1 ui-monospace, monospace; letter-spacing: .11em; }
.metric.primary { box-shadow: inset 0 3px var(--cyan); }
.metric.acid { box-shadow: inset 0 3px var(--acid); }
.metric.acid strong { color: var(--acid); }

.market-heading { align-items: center; }
.legend { display: flex; gap: 16px; color: var(--muted); font: 700 9px/1 ui-monospace, monospace; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.legend .ready { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.legend .stale { background: var(--alert); }
.table-shell { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 42px; padding: 0 13px; border-bottom: 1px solid var(--line); color: var(--muted); background: #0d1010; text-align: left; font: 700 8px/1 ui-monospace, monospace; letter-spacing: .1em; }
th:first-child { width: 25%; } th:nth-child(5) { width: 13%; } th:nth-child(6) { width: 15%; } th:last-child { width: 17%; }
td { height: 80px; padding: 13px; border-bottom: 1px solid var(--line-soft); color: var(--paper); vertical-align: middle; font: 600 11px/1.45 ui-monospace, monospace; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .25s ease; }
tbody tr:hover { background: rgb(69 230 239 / 3.5%); }
.market-name strong { display: block; overflow: hidden; margin-bottom: 7px; font-family: "Pretendard Variable", Pretendard, sans-serif; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.market-name small, td small { color: var(--muted); font-size: 8px; }
.price-cell { font-size: 18px; font-weight: 800; letter-spacing: -.06em; }
.price-cell.yes { color: var(--cyan); } .price-cell.no { color: var(--paper); }
.pair-sum.good { color: var(--acid); }
.book-badge, .result-badge { display: inline-flex; padding: 5px 7px; align-items: center; gap: 6px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; letter-spacing: .06em; }
.book-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--alert); }
.book-badge.ready { color: var(--cyan); border-color: rgb(69 230 239 / 30%); }
.book-badge.ready::before { background: var(--cyan); }
.result-badge.pass { color: var(--acid); border-color: rgb(215 255 69 / 35%); }
.condition-cell span, .result-cell > span:not(.result-badge) { display: block; color: var(--muted); font-size: 8px; line-height: 1.6; }
.empty-row td { height: 176px; text-align: center; }
.empty-row strong, .empty-row small { display: block; margin-top: 10px; }
.loader-bars { height: 22px; display: inline-flex; align-items: end; gap: 4px; }
.loader-bars i { width: 4px; height: 8px; background: var(--cyan); animation: bars 1s ease-in-out infinite; }
.loader-bars i:nth-child(2) { height: 18px; animation-delay: .12s; }.loader-bars i:nth-child(3) { height: 12px; animation-delay: .24s; }
.market-error { padding: 13px; border: 1px solid rgb(255 101 93 / 40%); color: var(--alert); background: rgb(255 101 93 / 6%); font-size: 11px; }

footer { min-height: 90px; padding-block: 25px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font: 600 9px/1.4 ui-monospace, monospace; letter-spacing: .07em; }
footer p { margin: 0; } footer span { color: var(--acid); }
.reveal { opacity: 0; animation: reveal .55s cubic-bezier(.2,.8,.2,1) forwards; }
.reveal-delay-1 { animation-delay: .08s; }.reveal-delay-2 { animation-delay: .16s; }.reveal-delay-3 { animation-delay: .24s; }

@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(360%); } }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes bars { 50% { height: 4px; opacity: .35; } }

@media (max-width: 960px) {
  .masthead, main, footer { width: min(100% - 34px, 760px); }
  .hero-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric:nth-child(3) { border-right: 0; }.metric:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  th:first-child { width: 230px; } table { min-width: 950px; }
}

@media (max-width: 560px) {
  .masthead, main, footer { width: calc(100% - 26px); }
  .masthead { height: 90px; }.brand-mark { width: 39px; height: 39px; }.brand-block { gap: 11px; }.eyebrow { font-size: 7px; } h1 { font-size: 25px; }
  .phase-stamp span, .phase-stamp small { display: none; }.phase-stamp strong { font-size: 37px; }
  main { padding-top: 16px; padding-bottom: 48px; }
  .safety-ribbon { align-items: flex-start; flex-wrap: wrap; gap: 7px; }.safety-ribbon > span:last-child { width: 100%; margin-left: 24px; }
  .hero-grid { margin-top: 13px; gap: 13px; }
  .hero-status { min-height: 145px; padding: 25px 19px; gap: 18px; }.health-orbit { width: 55px; }.health-orbit i { inset: 19px; }.status-title { font-size: 27px; }
  .connection-strip { grid-template-columns: 1fr 1fr; }.connection-strip div { padding-inline: 12px; }.connection-strip div:last-child { display: none; }
  .limit-reading { padding-inline: 18px; }.limit-note { margin-inline: 17px; }
  .metric-board, .market-section { margin-top: 34px; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.metric { min-height: 126px; }.metric:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.metric:nth-child(2n) { border-right: 0; }.metric:nth-last-child(-n+2) { border-bottom: 0; }
  .section-heading > p { display: none; }.market-heading { align-items: end; }.legend { display: block; line-height: 1.8; }
  .table-shell { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  table, tbody { display: block; min-width: 0; } thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { margin-bottom: 12px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--panel); }
  tbody td { height: auto; min-width: 0; padding: 12px; display: block; border-right: 1px solid var(--line-soft); }
  tbody td::before { content: attr(data-label); display: block; margin-bottom: 7px; color: #66706c; font: 700 7px/1 ui-monospace, monospace; letter-spacing: .1em; }
  tbody td:first-child, tbody td:nth-child(7) { grid-column: 1 / -1; }.market-name strong { white-space: normal; }.price-cell { font-size: 20px; }
  .empty-row { display: block; }.empty-row td { height: 150px; padding-top: 44px; border: 1px solid var(--line); }.empty-row td::before { display: none; }
  footer { min-height: 110px; flex-direction: column; justify-content: center; gap: 10px; }
}

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