/* ============================================================
   MT Studio — AiOTeam · AIOGW/3
   Zero-content shell. Everything below styles structures that
   are created at runtime from the decrypted manifest.
============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-raised: #0f0f12;
  --bg-hover: #141418;
  --border: #1e1e23;
  --border-strong: #2b2b32;
  --text: #f2f2f5;
  --text-2: #a3a3ae;
  --text-3: #64646e;
  --green: #3fb950;
  --amber: #d29922;
  --red: #f85149;
  --cyan: #58c4dc;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 58px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv05', 'cv11', 'ss01';
}
::selection { background: rgba(242, 242, 245, 0.16); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26262c; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #35353d; }

.mono { font-family: var(--mono); font-size: 0.855em; }
code {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--bg-hover); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; color: var(--text-2);
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ============ BOOT SCREEN ============ */
#boot {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s var(--ease), visibility .5s;
}
#boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-center { display: flex; flex-direction: column; align-items: center; width: min(420px, 86vw); }

.boot-logo { margin-bottom: 36px; }
.boot-logo-path {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: logoDraw 1.4s var(--ease) forwards;
}
.boot-logo-fill {
  opacity: 0;
  animation: logoFill .6s var(--ease) 1.3s forwards;
}
@keyframes logoDraw { to { stroke-dashoffset: 0; } }
@keyframes logoFill { to { opacity: 1; } }

.boot-log {
  width: 100%; font-size: 0.68rem; line-height: 1.9;
  color: var(--text-3); min-height: 128px;
  margin-bottom: 20px;
}
.boot-log .bl-ok { color: var(--green); }
.boot-log .bl-key { color: var(--cyan); }
.boot-log .bl-line { display: flex; justify-content: space-between; gap: 12px; animation: blIn .25s var(--ease); }
.boot-log .bl-line span:last-child { white-space: nowrap; }
@keyframes blIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.boot-bar { width: 100%; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.boot-bar-fill {
  height: 100%; width: 0%;
  background: var(--text);
  transition: width .35s var(--ease);
}

#boot.boot-fail .boot-bar-fill { background: var(--red); }

/* ============ APP REVEAL ============ */
#app { animation: appIn .6s var(--ease); }
@keyframes appIn { from { opacity: 0; } to { opacity: 1; } }

/* staggered section entrance */
.enter { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.enter.in { opacity: 1; transform: none; }

/* ============ HEADER ============ */
#site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-logo {
  width: 26px; height: 26px; flex-shrink: 0;
  transition: transform .4s var(--ease);
}
.brand:hover .brand-logo { transform: rotate(90deg); }
.brand-words { display: flex; align-items: baseline; gap: 8px; font-size: 0.92rem; letter-spacing: -0.01em; }
.brand-org { font-weight: 650; }
.brand-div { color: var(--text-3); font-weight: 400; }
.brand-unit { color: var(--text-2); font-weight: 450; }

.header-nav { display: flex; gap: 2px; }
.hnav-link {
  padding: 7px 13px; border-radius: 7px;
  color: var(--text-2); text-decoration: none;
  font-size: 0.86rem; font-weight: 480;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.hnav-link:hover { color: var(--text); background: var(--bg-hover); }

.conn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--text-3); padding: 5px 11px;
  border: 1px solid var(--border); border-radius: 100px;
  transition: color .3s, border-color .3s;
}
.conn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); transition: background .3s; }
.conn.ok { color: var(--text-2); border-color: var(--border-strong); }
.conn.ok .conn-dot { background: var(--green); box-shadow: 0 0 6px rgba(63,185,80,.5); }
.conn.err .conn-dot { background: var(--red); }

/* ============ HERO ============ */
#hero { padding: 132px 0 92px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(640px 320px at 18% -10%, rgba(242,242,245,0.045), transparent 60%),
    radial-gradient(480px 260px at 85% 0%, rgba(88,196,220,0.035), transparent 60%);
  pointer-events: none;
}
.hero-wrap { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.kicker {
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 26px;
  display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ''; width: 20px; height: 1px; background: var(--text-3); }
.hero-h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  font-weight: 650; letter-spacing: -0.038em; line-height: 1.04;
  margin-bottom: 26px;
}
.hero-sub { max-width: 600px; color: var(--text-2); font-size: 1.02rem; margin-bottom: 42px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* hero side logo */
.hero-mark {
  width: clamp(160px, 18vw, 230px); height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.6));
}
.hero-mark .hm-ring {
  transform-origin: 50% 50%;
  animation: ringSpin 36s linear infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 19px; border-radius: var(--radius);
  font-family: var(--font); font-size: 0.88rem; font-weight: 520;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .15s var(--ease), border-color .15s var(--ease),
              color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { background: #fff; box-shadow: 0 0 0 4px rgba(242,242,245,0.08); }
.btn-quiet { background: transparent; color: var(--text-2); border-color: var(--border-strong); }
.btn-quiet:hover { color: var(--text); border-color: #3d3d46; background: var(--bg-hover); }
.btn-sm { padding: 6px 13px; font-size: 0.8rem; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ============ STATUS STRIP ============ */
#status-strip { border-bottom: 1px solid var(--border); background: var(--bg-raised); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-cell { display: flex; flex-direction: column; gap: 3px; padding: 18px 20px 18px 0; }
.strip-cell + .strip-cell { padding-left: 20px; border-left: 1px solid var(--border); }
.strip-label { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.13em; color: var(--text-3); }
.strip-value { font-family: var(--mono); font-size: 0.76rem; color: var(--text-2); }
.strip-value.ok { color: var(--green); }
.strip-value.cy { color: var(--cyan); }

/* ============ SECTIONS ============ */
section { scroll-margin-top: calc(var(--header-h) + 16px); }
#registry, #access, #principles { padding: 92px 0; }
#access, #principles { border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-h2 { font-size: 1.55rem; font-weight: 630; letter-spacing: -0.022em; margin-bottom: 8px; }
.section-sub { color: var(--text-2); font-size: 0.94rem; max-width: 600px; }

/* ============ NETLOG (gateway channel log) ============ */
.netlog {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-raised); overflow: hidden; margin-bottom: 26px;
}
.netlog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--text-3);
}
.netlog-live { display: inline-flex; align-items: center; gap: 6px; }
.netlog-live::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.netlog-body {
  padding: 10px 16px; font-family: var(--mono); font-size: 0.7rem; line-height: 2.05;
  max-height: 218px; overflow-y: auto;
}
.nl-row { display: flex; gap: 12px; align-items: baseline; animation: blIn .3s var(--ease); }
.nl-t { color: var(--text-3); flex-shrink: 0; }
.nl-m { color: var(--text-3); flex-shrink: 0; width: 38px; }
.nl-p { color: var(--text-2); word-break: break-all; }
.nl-s { margin-left: auto; flex-shrink: 0; white-space: nowrap; }
.nl-s.ok { color: var(--green); }
.nl-s.err { color: var(--red); }
.nl-s.cy { color: var(--cyan); }
.nl-lock { color: var(--cyan); }

/* ============ REGISTRY TABLE ============ */
.table-wrap {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow-x: auto; background: var(--bg-raised);
  animation: fadeUp .5s var(--ease);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.registry-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 660px; }
.registry-table thead th {
  text-align: left; font-family: var(--mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.11em; color: var(--text-3);
  padding: 11px 18px; border-bottom: 1px solid var(--border); background: var(--bg-hover);
}
.registry-table tbody td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.registry-table tbody tr:last-child td { border-bottom: none; }
.registry-table tbody tr { transition: background .12s var(--ease); cursor: pointer; }
.registry-table tbody tr:hover { background: var(--bg-hover); }
.registry-table tbody tr:focus-visible { outline: 1px solid var(--border-strong); outline-offset: -1px; }

.rt-id { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); white-space: nowrap; }
.rt-name { font-weight: 550; letter-spacing: -0.01em; }
.rt-name .redacted {
  color: var(--text-3);
  background: repeating-linear-gradient(90deg, #232328 0 8px, #1b1b20 8px 16px);
  border-radius: 4px; padding: 1px 8px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  user-select: none;
}
.rt-codename { display: block; font-family: var(--mono); font-size: 0.64rem; color: var(--text-3); margin-top: 2px; }
.rt-status { font-family: var(--mono); font-size: 0.68rem; color: var(--text-2); white-space: nowrap; }
.rt-region { font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 100px; border: 1px solid; white-space: nowrap;
}
.badge-public { color: var(--green); border-color: rgba(63,185,80,.35); background: rgba(63,185,80,.07); }
.badge-sealed { color: var(--amber); border-color: rgba(210,153,34,.32); background: rgba(210,153,34,.06); }

.rt-action { font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); white-space: nowrap; transition: color .15s; }
tr:hover .rt-action { color: var(--text-2); }

.registry-foot {
  margin-top: 14px; font-family: var(--mono); font-size: 0.66rem; color: var(--text-3);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ============ INSPECTOR ============ */
.inspector {
  margin-top: 26px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg-raised); overflow: hidden;
  animation: fadeUp .35s var(--ease);
}
.inspector-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
  font-family: var(--mono); font-size: 0.7rem; color: var(--text-2);
}
.inspector-head .dec-badge {
  color: var(--cyan); border: 1px solid rgba(88,196,220,.3); background: rgba(88,196,220,.06);
  padding: 2px 8px; border-radius: 100px; font-size: 0.58rem; letter-spacing: 0.1em;
}
.inspector-close {
  background: none; border: none; color: var(--text-3); cursor: pointer;
  font-size: 0.8rem; padding: 2px 8px; border-radius: 5px;
  font-family: var(--mono);
  transition: color .15s, background .15s;
}
.inspector-close:hover { color: var(--text); background: var(--bg-raised); }
.inspector-body {
  padding: 18px; font-family: var(--mono); font-size: 0.74rem; line-height: 1.8;
  color: var(--text-2); white-space: pre-wrap; word-break: break-word;
  max-height: 380px; overflow-y: auto;
}
.inspector-body .j-key { color: #79c0ff; }
.inspector-body .j-str { color: #a5d6a7; }
.inspector-body .j-num { color: #d2a8ff; }
.inspector-body .j-err { color: var(--red); }
.inspector-body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ============ ACCESS GRID ============ */
.access-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin-top: 32px;
}
.access-card { background: var(--bg-raised); padding: 30px; transition: background .2s var(--ease); position: relative; }
.access-card:hover { background: var(--bg-hover); }
.access-card:hover .access-num { color: var(--text-2); }
.access-num {
  display: block; font-family: var(--mono); font-size: 0.66rem;
  color: var(--text-3); margin-bottom: 15px; letter-spacing: 0.12em;
  transition: color .2s;
}
.access-card h3 { font-size: 0.98rem; font-weight: 620; letter-spacing: -0.012em; margin-bottom: 8px; }
.access-card p { font-size: 0.86rem; color: var(--text-2); }
.access-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ============ PRINCIPLES ============ */
.principles-grid { display: grid; grid-template-columns: 320px 1fr; gap: 64px; }
.principles-left { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.principles-list { display: flex; flex-direction: column; }
.principle { padding: 26px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 44px 1fr; gap: 18px; }
.principle:first-child { padding-top: 4px; }
.principle:last-child { border-bottom: none; }
.principle-idx { font-family: var(--mono); font-size: 0.66rem; color: var(--text-3); padding-top: 5px; letter-spacing: 0.1em; }
.principle h3 { font-size: 0.98rem; font-weight: 620; letter-spacing: -0.012em; margin-bottom: 6px; }
.principle p { font-size: 0.88rem; color: var(--text-2); max-width: 540px; }

/* ============ FOOTER ============ */
#site-footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-left { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 18px; height: 18px; opacity: 0.6; }
.footer-mono { font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); }
.footer-link { font-family: var(--mono); font-size: 0.68rem; color: var(--text-2); text-decoration: none; transition: color .15s; }
.footer-link:hover { color: var(--text); }
.footer-sep { color: var(--text-3); margin: 0 8px; }
.footer-right { display: flex; align-items: center; }

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
}
@media (max-width: 860px) {
  .header-nav { display: none; }
  #hero { padding: 92px 0 64px; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-cell:nth-child(odd) { padding-left: 0; border-left: none; }
  .strip-cell:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--border); }
  .strip-cell:nth-child(n+3) { border-top: 1px solid var(--border); }
  .access-grid { grid-template-columns: 1fr; }
  .access-card:last-child:nth-child(odd) { grid-column: auto; }
  .principles-grid { grid-template-columns: 1fr; gap: 24px; }
  .principles-left { position: static; }
  #registry, #access, #principles { padding: 64px 0; }
}
@media (max-width: 640px) {
  .container, .header-inner { padding-left: 20px; padding-right: 20px; }
  .hide-sm { display: none; }
  .registry-table { min-width: 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .brand-unit, .brand-div { display: none; }
  .netlog-body { max-height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
