/* =====================================================================
   Frame Minion — shared guide chrome
   A consistent top header + guide subnav prepended to every guide page
   (and the hub). Bridges the marketing site (Space Grotesk + flame) onto
   the guides' warm-dark editor surfaces.
   ===================================================================== */

:root {
  --gc-bg:       #1a140e;
  --gc-panel:    #211810;
  --gc-panel-2:  #261c12;
  --gc-text:     #f0e6d4;
  --gc-muted:    #a39581;
  --gc-dim:      #6e6253;
  --gc-border:   #33271a;
  --gc-border-2: #3a2c1d;
  --gc-flame-1:  #ff7a18;
  --gc-flame-2:  #ff3d2e;
  --gc-flame-3:  #e8290b;
  --gc-flame:    linear-gradient(180deg, #ff7a18 0%, #ff3d2e 54%, #e8290b 100%);
  --gc-font-display: 'Space Grotesk', system-ui, sans-serif;
  --gc-font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---- Layout: chrome pinned on top, guide fills the rest ---- */
body.chrome-shell {
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--gc-bg);
}
body.chrome-shell > .gchrome-wrap { flex: 0 0 auto; z-index: 100; }
body.chrome-shell > .groot { flex: 1 1 auto; min-height: 0; height: auto; }
body.chrome-shell > .groot-scroll { overflow-y: auto; }

/* ---- Header bar ---- */
.gchrome {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
  padding: 0 clamp(16px, 3.5vw, 30px);
  background: var(--gc-panel);
  border-bottom: 1px solid var(--gc-border);
  position: relative;
}
.gchrome::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--gc-flame-3) 0%, var(--gc-flame-1) 22%,
    color-mix(in oklab, var(--gc-flame-1) 22%, transparent) 56%, transparent 88%);
  opacity: .9;
}

.gc-brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--gc-text); text-decoration: none;
  flex-shrink: 0;
}
.gc-brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.gc-brand .gc-word {
  font-family: var(--gc-font-display);
  font-weight: 600; font-size: 18px; letter-spacing: -.02em;
}
.gc-brand .gc-word b { font-weight: 600; }
.gc-divider { width: 1px; height: 22px; background: var(--gc-border-2); flex-shrink: 0; }
.gc-kicker {
  font-family: var(--gc-font-mono);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gc-muted); flex-shrink: 0;
}

.gc-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gc-back {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: var(--gc-font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--gc-muted); text-decoration: none;
  padding: 8px 12px; border-radius: 9px;
  border: 1px solid var(--gc-border-2);
  background: rgba(255,255,255,.025);
  transition: color .15s, border-color .15s, background .15s;
}
.gc-back:hover { color: var(--gc-text); border-color: var(--gc-dim); background: rgba(255,255,255,.05); }
.gc-back svg { width: 14px; height: 14px; }
.gc-cta {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--gc-font-display); font-weight: 600; font-size: 13.5px;
  letter-spacing: -.01em;
  color: #fff; text-decoration: none;
  padding: 9px 15px; border-radius: 10px;
  background: var(--gc-flame);
  box-shadow: 0 6px 20px -8px rgba(255,61,46,.6), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .15s, box-shadow .15s;
}
.gc-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(255,61,46,.8), inset 0 1px 0 rgba(255,255,255,.32); }
.gc-cta svg { width: 15px; height: 15px; }

/* ---- Subnav: the four guides + overview ---- */
.gc-sub {
  display: flex; align-items: stretch; gap: 2px;
  height: 46px; padding: 0 clamp(10px, 3vw, 24px);
  background: var(--gc-bg);
  border-bottom: 1px solid var(--gc-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.gc-sub::-webkit-scrollbar { display: none; }
.gc-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px;
  font-family: var(--gc-font-display); font-weight: 500; font-size: 13.5px;
  letter-spacing: -.01em; white-space: nowrap;
  color: var(--gc-muted); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.gc-tab:hover { color: var(--gc-text); }
.gc-tab .gc-n {
  width: 18px; height: 18px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 5px; color: var(--gc-muted);
  background: rgba(255,255,255,.04);
  font-family: var(--gc-font-mono); font-size: 9px;
}
.gc-tab .gc-n svg { width: 12px; height: 12px; }
.gc-tab.is-active {
  color: var(--gc-text);
  border-bottom-color: var(--gc-flame-1);
}
.gc-tab.is-active .gc-n {
  color: #fff;
  background: var(--gc-flame);
  box-shadow: 0 2px 8px -2px rgba(255,61,46,.6);
}

@media (max-width: 720px) {
  .gc-kicker, .gc-divider { display: none; }
  .gc-back span { display: none; }
}
