/* ── PTG DOCS — shared.css ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500&family=Fraunces:ital,wght@0,300;0,400;0,600;1,300&display=swap');

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

:root {
  --bg:        #03091A;
  --bg2:       #050F24;
  --bg3:       #13161F;
  --bg4:       #191D28;
  --border:    #1C2030;
  --border2:   #252A3A;
  --text:      #D4DCF0;
  --text2:     #7A8BA8;
  --text3:     #3E4A60;
  --accent:    #FF9900;
  --accent2:   #FFB84D;
  --blue:      #3D8EF5;
  --green:     #2ECC8A;
  --red:       #FF4F4F;
  --yellow:    #FFD166;
  --font-head: 'Syne', sans-serif;
  --font-body: 'Fraunces', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --sidebar-w: 268px;
  --header-h:  58px;
  --max-w:     820px;
  --radius:    8px;
}

html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── TOP HEADER ──────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(8,9,13,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  z-index: 200;
  gap: 0;
}

.header-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo-mark {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 800; font-size: 15px;
  color: #000; letter-spacing: -0.5px;
}
.header-logo-text {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.header-logo-sub {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text3);
  font-weight: 400;
}

.header-sep {
  width: 1px; height: 28px;
  background: var(--border);
  margin: 0 18px;
  flex-shrink: 0;
}

.header-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text3); flex: 1;
}
.header-breadcrumb a { color: var(--text3); text-decoration: none; transition: color .15s; }
.header-breadcrumb a:hover { color: var(--text2); }
.header-breadcrumb .bc-sep { color: var(--border2); }
.header-breadcrumb .bc-current { color: var(--accent); }

.header-actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.header-badge {
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid;
}
.badge-version { color: var(--text3); border-color: var(--border); background: var(--bg3); }
.badge-live { color: var(--green); border-color: rgba(46,204,138,.3); background: rgba(46,204,138,.08); display: flex; align-items: center; gap: 5px; }
.badge-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.docs-layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.docs-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: var(--header-h); bottom: 0; left: 0;
  overflow-y: auto;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 28px 0 40px;
}

.nav-section { margin-bottom: 28px; }
.nav-group-label {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--text3);
  padding: 0 22px; margin-bottom: 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 22px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 13px; font-weight: 400;
  color: var(--text2);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.025); }
.nav-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(255,153,0,.05); font-weight: 600; }
.nav-link svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .6; }
.nav-link.active svg { opacity: 1; }
.nav-sub-link {
  display: block;
  padding: 5px 22px 5px 45px;
  font-family: var(--font-mono);
  font-size: 11.5px; color: var(--text3);
  text-decoration: none; transition: color .15s;
}
.nav-sub-link:hover { color: var(--text2); }
.nav-sub-link.active { color: var(--accent); }

/* ── MAIN ────────────────────────────────────────────────────────────────── */
.docs-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 52px 60px 80px;
  max-width: calc(var(--sidebar-w) + var(--max-w) + 80px);
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 10px;
}
h1 {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 36px; font-weight: 800;
  color: #F0F4FF; line-height: 1.15;
  margin-bottom: 18px; letter-spacing: -.5px;
}
h2 {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 19px; font-weight: 700;
  color: #EEF2FF;
  margin: 44px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -.2px;
}
h3 {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  margin: 22px 0 8px;
}
p { color: var(--text2); margin-bottom: 14px; line-height: 1.75; font-size: .95rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text); font-weight: 600; }
code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; color: var(--accent2);
}

/* ── LEAD ────────────────────────────────────────────────────────────────── */
.lead {
  font-size: 1.05rem; color: var(--text);
  line-height: 1.75; margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* ── META STRIP ──────────────────────────────────────────────────────────── */
.meta-strip {
  display: flex; gap: 28px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.meta-item { display: flex; flex-direction: column; gap: 3px; }
.meta-label { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); }
.meta-value { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; font-size: 13px; font-weight: 600; color: var(--text); }

/* ── BADGES ──────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 10px; border-radius: 20px; border: 1px solid;
}
.tag-green { color: var(--green); border-color: rgba(46,204,138,.3); background: rgba(46,204,138,.07); }
.tag-orange { color: var(--accent); border-color: rgba(255,153,0,.3); background: rgba(255,153,0,.07); }
.tag-blue { color: var(--blue); border-color: rgba(61,142,245,.3); background: rgba(61,142,245,.07); }
.tag-red { color: var(--red); border-color: rgba(255,79,79,.3); background: rgba(255,79,79,.07); }

/* ── CALLOUTS ────────────────────────────────────────────────────────────── */
.callout {
  border-left: 3px solid;
  padding: 14px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0; font-size: .9rem;
}
.callout-note   { border-color: var(--blue);   background: rgba(61,142,245,.06); }
.callout-warn   { border-color: var(--yellow);  background: rgba(255,209,102,.06); }
.callout-tip    { border-color: var(--green);   background: rgba(46,204,138,.06); }
.callout-danger { border-color: var(--red);     background: rgba(255,79,79,.06); }
.callout-label  { font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.callout-note   .callout-label { color: var(--blue); }
.callout-warn   .callout-label { color: var(--yellow); }
.callout-tip    .callout-label { color: var(--green); }
.callout-danger .callout-label { color: var(--red); }
.callout p { color: var(--text2); margin: 0; }

/* ── CODE BLOCKS ─────────────────────────────────────────────────────────── */
.code-wrap { background: #050609; border: 1px solid var(--border); border-radius: var(--radius); margin: 16px 0; overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: var(--bg3); border-bottom: 1px solid var(--border); }
.code-lang { font-family: var(--font-mono); font-size: 10.5px; color: var(--text3); text-transform: uppercase; letter-spacing: .1em; }
.copy-btn { font-family: var(--font-mono); font-size: 11px; color: var(--text3); background: none; border: 1px solid var(--border); cursor: pointer; padding: 3px 10px; border-radius: 4px; transition: all .15s; }
.copy-btn:hover { color: var(--text); border-color: var(--border2); }
.copy-btn.ok { color: var(--green); border-color: rgba(46,204,138,.3); }
pre { padding: 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: #C8D3E8; }
.cm { color: #3E4A60; }
.cs { color: var(--green); }
.ck { color: var(--accent); }
.cv { color: var(--blue); }
.cp { color: #C792EA; }

/* ── TABLES ──────────────────────────────────────────────────────────────── */
.table-outer { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 16px 0; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.doc-table th { text-align: left; padding: 10px 14px; background: var(--bg3); color: var(--text2); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--border); }
.doc-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: top; }
.doc-table tbody tr:last-child td { border-bottom: none; }
.doc-table tbody tr:hover td { background: rgba(255,255,255,.018); }
.doc-table td:first-child { color: var(--text); font-family: var(--font-mono); font-size: 12px; }

/* ── STEPS ───────────────────────────────────────────────────────────────── */
.steps { margin: 20px 0; display: flex; flex-direction: column; gap: 20px; }
.step { display: flex; gap: 16px; }
.step-n { width: 30px; height: 30px; flex-shrink: 0; background: rgba(255,153,0,.1); border: 1px solid rgba(255,153,0,.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 2px; }
.step-body h3 { margin: 0 0 6px; }
.step-body p  { margin: 0; }

/* ── FEATURE GRID ────────────────────────────────────────────────────────── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 12px; margin: 20px 0; }
.feat-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: border-color .2s, transform .2s; }
.feat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.feat-icon { font-size: 20px; margin-bottom: 10px; }
.feat-card h4 { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.feat-card p  { font-size: .825rem; color: var(--text2); margin: 0; line-height: 1.55; }

/* ── CHECK LIST ──────────────────────────────────────────────────────────── */
.cl { list-style: none; margin: 12px 0; }
.cl li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: .9rem; color: var(--text2); border-bottom: 1px solid var(--border); }
.cl li:last-child { border-bottom: none; }
.cl li::before { content: "✓"; color: var(--green); font-weight: 700; font-family: var(--font-mono); flex-shrink: 0; margin-top: 1px; }

/* ── SCORE WIDGET ────────────────────────────────────────────────────────── */
.score-widget { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 28px; display: flex; align-items: center; gap: 36px; margin: 20px 0; flex-wrap: wrap; }
.score-big { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; font-size: 64px; font-weight: 800; color: var(--accent); line-height: 1; flex-shrink: 0; letter-spacing: -2px; }
.score-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text3); }
.score-bar-wrap { flex: 1; min-width: 180px; }
.score-bar-label { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 10px; }
.score-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.score-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; transition: width 1.2s cubic-bezier(.16,1,.3,1); }
.score-stats { margin-top: 12px; display: flex; gap: 20px; flex-wrap: wrap; }
.score-stat { font-size: 12px; color: var(--text3); } .score-stat strong { color: var(--text2); }

/* ── REQ GRID ────────────────────────────────────────────────────────────── */
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.req-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.req-card .rl { font-family: var(--font-mono); font-size: 9.5px; color: var(--text3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 5px; }
.req-card .rv { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; font-size: 13px; font-weight: 600; color: var(--text); }
.req-card .rn { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ── PAGE FOOTER ─────────────────────────────────────────────────────────── */
.page-footer { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-footer p { font-family: var(--font-mono); font-size: 11.5px; color: var(--text3); margin: 0; }
.page-footer a { color: var(--text3); }
.page-footer a:hover { color: var(--text2); }

/* ── ANIMATIONS ──────────────────────────────────────────────────────────── */
.fade-in { animation: fadeUp .3s ease both; }
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .docs-sidebar { display: none; }
  .docs-main { margin-left: 0; padding: 32px 24px 60px; }
  h1 { font-size: 28px; }
  .req-grid { grid-template-columns: 1fr; }
  .score-widget { gap: 20px; }
}
