/* ============================================================
   Guide section stylesheet — extends the tokens defined in the
   main site's index.html. Kept as a separate file since the guide
   is multiple static pages with no shared templating system.
   ============================================================ */

:root{
  --ink:#1a1613;
  --ink-soft:#4a4038;
  --cream:#fdf9f0;
  --tile:#fffdf6;
  --tile-edge:#e8dfc8;
  --emerald-950:#052e22;
  --emerald-900:#0a3d2e;
  --emerald-800:#0f5138;
  --emerald-700:#166844;
  --emerald-100:#d6ede1;
  --gold:#c8922a;
  --gold-bright:#e0a83a;
  --red:#b5312a;
  --line: rgba(26,22,19,0.1);
  --shadow-tile: 0 1px 0 rgba(0,0,0,0.05), 0 8px 24px rgba(10,61,46,0.10);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--cream);
  color:var(--ink);
  font-family:'Manrope', sans-serif;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.display{
  font-family:'Fraunces', serif;
  font-weight:700;
  letter-spacing:-0.01em;
  line-height:1.12;
  color:var(--emerald-950);
}
.mono{font-family:'JetBrains Mono', monospace;}
a{color:inherit;}
img{max-width:100%; display:block;}
.wrap{max-width:1180px; margin:0 auto; padding:0 28px;}

/* ---------- top bar ---------- */
.gtopbar{
  position:sticky; top:0; z-index:60;
  background:rgba(253,249,240,0.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.gtopbar .wrap{
  display:flex; align-items:center; justify-content:space-between;
  height:64px; gap:20px;
}
.gtopbar .brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800; font-size:15.5px; color:var(--emerald-950);
  text-decoration:none; white-space:nowrap;
}
.gtopbar .brand-tile{
  width:28px; height:34px; flex-shrink:0;
  border-radius:6px;
  box-shadow:var(--shadow-tile);
}
.gtopbar .gtitle{
  font-family:'JetBrains Mono',monospace; font-size:11.5px; font-weight:600;
  letter-spacing:0.1em; text-transform:uppercase; color:var(--gold);
  padding-left:14px; border-left:1px solid var(--line);
  display:none;
}
@media(min-width:640px){ .gtopbar .gtitle{display:inline-block;} }
.gtopbar .back{
  font-size:13.5px; font-weight:700; color:var(--emerald-900);
  text-decoration:none; display:flex; align-items:center; gap:6px;
  white-space:nowrap; flex-shrink:0;
}
.gtopbar .back:hover{text-decoration:underline;}
.gtopbar .brand{overflow:hidden;}
.gtopbar .brand-label{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
@media(max-width:480px){
  .gtopbar .brand-label{display:none;}
}

/* ---------- mobile topic scroller ---------- */
.gmobile-topics{
  display:flex; gap:8px; overflow-x:auto;
  padding:14px 20px; -webkit-overflow-scrolling:touch;
  background:var(--tile); border-bottom:1px solid var(--line);
}
.gmobile-topics::-webkit-scrollbar{display:none;}
.gmobile-topics a{
  flex-shrink:0; font-size:13px; font-weight:700; color:var(--ink-soft);
  background:var(--cream); border:1px solid var(--tile-edge);
  padding:8px 14px; border-radius:20px; text-decoration:none; white-space:nowrap;
}
.gmobile-topics a.active{background:var(--emerald-900); color:#fff9ea; border-color:var(--emerald-900);}
@media(min-width:960px){ .gmobile-topics{display:none;} }

/* ---------- shell layout ---------- */
.gshell{
  max-width:1180px; margin:0 auto; padding:0 28px;
  display:grid; grid-template-columns:1fr; gap:0;
}
@media(min-width:960px){
  .gshell{grid-template-columns:230px 1fr; gap:56px; align-items:start;}
}

/* ---------- sidebar ---------- */
.gsidebar{
  display:none;
  position:sticky; top:88px;
  padding:44px 0 60px;
}
@media(min-width:960px){ .gsidebar{display:block;} }
.gsidebar .glabel{
  font-family:'JetBrains Mono',monospace; font-size:11px; font-weight:600;
  letter-spacing:0.1em; text-transform:uppercase; color:var(--gold);
  margin-bottom:16px; display:block;
}
.gsidebar ul{list-style:none; display:flex; flex-direction:column; gap:2px;}
.gsidebar a{
  display:block; padding:9px 12px; border-radius:8px;
  font-size:14.5px; font-weight:600; color:var(--ink-soft);
  text-decoration:none; border-left:2px solid transparent;
}
.gsidebar a:hover{background:rgba(10,61,46,0.05); color:var(--emerald-900);}
.gsidebar a.active{
  background:var(--emerald-100); color:var(--emerald-900);
  border-left:2px solid var(--emerald-700);
}
.gsidebar .gsep{height:1px; background:var(--line); margin:18px 0;}

/* ---------- content column ---------- */
.gcontent{padding:44px 0 90px; min-width:0;}
.gcontent .geyebrow{
  font-family:'JetBrains Mono',monospace; font-size:12.5px; font-weight:600;
  letter-spacing:0.14em; text-transform:uppercase; color:var(--gold);
  display:inline-flex; align-items:center; gap:8px; margin-bottom:14px;
}
.gcontent .geyebrow::before{content:''; width:6px; height:6px; background:var(--gold); border-radius:50%;}
.gcontent h1{font-size:clamp(32px,4.6vw,46px); margin-bottom:16px;}
.gcontent .glede{font-size:17.5px; color:var(--ink-soft); max-width:640px; margin-bottom:36px;}
.gcontent h2{font-size:clamp(22px,3vw,27px); margin:52px 0 16px;}
.gcontent h2:first-of-type{margin-top:8px;}
.gcontent h3{font-size:18.5px; margin:26px 0 10px; color:var(--emerald-900);}
.gcontent p{font-size:15.5px; color:var(--ink-soft); margin-bottom:14px; max-width:680px;}
.gcontent p strong{color:var(--ink);}
.gcontent a.inline-link{color:var(--emerald-800); font-weight:700; text-decoration:underline; text-decoration-color:var(--tile-edge); text-underline-offset:3px;}

/* ---------- step list ---------- */
.steps{list-style:none; counter-reset:step; margin:22px 0 30px; max-width:680px;}
.steps li{
  counter-increment:step;
  position:relative;
  padding:0 0 28px 44px;
  border-left:1.5px solid var(--tile-edge);
  margin-left:15px;
}
.steps li:last-child{border-left-color:transparent; padding-bottom:2px;}
.steps li::before{
  content:counter(step);
  position:absolute; left:-15.5px; top:0;
  width:30px; height:30px; border-radius:50%;
  background:var(--emerald-900); color:#fff9ea;
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:13px;
  display:flex; align-items:center; justify-content:center;
}
.steps li h4{font-family:'Manrope',sans-serif; font-weight:800; font-size:15.5px; color:var(--ink); margin-bottom:4px;}
.steps li p{font-size:14.5px; margin-bottom:0;}

/* ---------- callouts ---------- */
.callout{
  border-radius:14px; padding:18px 20px; margin:22px 0;
  max-width:680px; font-size:14.5px;
  display:flex; gap:12px; align-items:flex-start;
}
.callout .cicon{font-size:17px; line-height:1; flex-shrink:0; margin-top:1px;}
.callout p{margin-bottom:0; font-size:14.5px;}
.callout strong{display:block; font-size:13px; text-transform:uppercase; letter-spacing:0.04em; margin-bottom:4px; font-family:'JetBrains Mono',monospace; font-weight:700;}
.callout.tip{background:var(--emerald-100); color:var(--emerald-900);}
.callout.tip strong{color:var(--emerald-800);}
.callout.note{background:#fbf1de; color:#5a4520;}
.callout.note strong{color:var(--gold);}
.callout.warn{background:#fbe7e5; color:#7a2620;}
.callout.warn strong{color:var(--red);}

/* ---------- screenshot frame ---------- */
.gshot{
  margin:28px 0 34px; border-radius:16px; overflow:hidden;
  border:1px solid var(--tile-edge);
  box-shadow:0 20px 46px -18px rgba(5,30,20,0.28), 0 0 0 1px rgba(0,0,0,0.03);
  max-width:520px;
}
.gshot img{width:100%; display:block;}
.gshot figcaption{
  font-size:12.5px; color:var(--ink-soft); padding:10px 16px;
  background:var(--tile); border-top:1px solid var(--tile-edge);
  font-family:'JetBrains Mono',monospace;
}

/* ---------- tag pills ---------- */
.gtags{display:flex; gap:8px; flex-wrap:wrap; margin:14px 0 6px;}
.gtag{
  font-family:'JetBrains Mono',monospace; font-size:11px; font-weight:600;
  background:var(--emerald-100); color:var(--emerald-800);
  padding:5px 10px; border-radius:20px;
}

/* ---------- hub cards (guide index) ---------- */
.ghub-grid{
  display:grid; grid-template-columns:1fr; gap:16px; margin-top:8px;
}
@media(min-width:700px){ .ghub-grid{grid-template-columns:1fr 1fr;} }
.ghub-card{
  background:var(--tile); border:1px solid var(--tile-edge); border-radius:16px;
  padding:26px; text-decoration:none; display:block;
  box-shadow:var(--shadow-tile);
  transition:transform .15s ease, box-shadow .15s ease;
}
.ghub-card:hover{transform:translateY(-2px); box-shadow:0 14px 32px -12px rgba(10,61,46,0.22);}
.ghub-card .ghub-num{
  font-family:'JetBrains Mono',monospace; font-size:12px; font-weight:700; color:var(--gold);
  margin-bottom:10px; display:block;
}
.ghub-card h3{font-size:19px; margin-bottom:8px; color:var(--emerald-950);}
.ghub-card p{font-size:14px; color:var(--ink-soft); margin-bottom:0;}

/* ---------- prev/next footer nav ---------- */
.gpagenav{
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-top:60px; padding-top:28px; border-top:1px solid var(--line); max-width:680px;
}
.gpagenav a{
  text-decoration:none; padding:14px 18px; border-radius:12px;
  background:var(--tile); border:1px solid var(--tile-edge);
  font-size:14px; max-width:270px;
  transition:border-color .15s ease;
}
.gpagenav a:hover{border-color:var(--emerald-700);}
.gpagenav .gnav-label{
  display:block; font-family:'JetBrains Mono',monospace; font-size:11px; font-weight:600;
  letter-spacing:0.06em; text-transform:uppercase; color:var(--gold); margin-bottom:4px;
}
.gpagenav .gnav-title{font-weight:800; color:var(--emerald-950); font-size:14.5px;}
.gpagenav .next{margin-left:auto; text-align:right;}

/* ---------- footer (reuses main footer look, simplified) ---------- */
.gfooter{background:var(--emerald-950); color:rgba(255,255,255,0.55); padding:36px 0; margin-top:40px;}
.gfooter .wrap{display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:13px;}
.gfooter a{color:rgba(255,255,255,0.65); text-decoration:none;}
.gfooter a:hover{color:#fff;}

/* ---------- simple data table (rulesets page) ---------- */
.gtable{width:100%; border-collapse:collapse; margin:20px 0 34px; font-size:14px; max-width:680px;}
.gtable th{
  text-align:left; font-family:'JetBrains Mono',monospace; font-size:11.5px;
  text-transform:uppercase; letter-spacing:0.05em; color:var(--gold);
  padding:10px 14px; border-bottom:2px solid var(--emerald-900);
}
.gtable td{padding:12px 14px; border-bottom:1px solid var(--line); color:var(--ink-soft); vertical-align:top;}
.gtable tr:last-child td{border-bottom:none;}
.gtable td strong{color:var(--ink); display:block; margin-bottom:2px;}
