/* GERBFLOW 2026: long-form document shell (legal pages, agreements, utility pages).
   Load AFTER css/gf-2026.css. Only restyles the shell and generic content tags
   (h1/h2/h3/p/ul/table/code); the documents' wording and markup stay untouched. */

/* ---------- page ---------- */
body.gf-docpage { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
body.gf-docpage > main, body.gf-docpage > .gf-doc-main { flex: 1 0 auto; }
@media (max-width: 900px) { body.gf-docpage { padding-bottom: 0; } }
[hidden] { display: none !important; }

/* ---------- slim sticky nav ---------- */
.gf-nav.gf-nav--doc { position: sticky; top: 0; height: 60px; --nav-h: 60px; }
.gf-nav--doc .gf-mark { width: 24px; height: 24px; }
.gf-nav--doc .gf-brand-word { font-size: 1.2rem; }
.gf-back {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .9rem;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  font: 600 .75rem/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase;
  color: var(--bone-2); text-decoration: none; white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.gf-back:hover { border-color: var(--gold); color: var(--gold-hi); }
.gf-back svg { width: 14px; height: 14px; transform: scaleX(-1); }
.gf-nav-tag { font: 600 .6875rem/1 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(212, 175, 85, .35); padding: .55rem .8rem; border-radius: var(--radius); white-space: nowrap; }

/* ---------- document column ---------- */
.gf-doc {
  width: 100%; max-width: calc(72ch + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
  color: var(--bone-2); font-size: 1.0625rem; line-height: 1.75;
}
.gf-doc-kicker { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; color: var(--gold); }
.gf-doc-kicker::before { content: ''; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; }
.gf-doc h1 {
  font-family: var(--f-display); font-stretch: 72%; font-weight: var(--w-display);
  font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: .98; letter-spacing: .005em;
  text-transform: uppercase; text-wrap: balance; color: var(--bone); margin: 0 0 1rem;
}
.gf-doc .upd, .gf-doc .updated {
  color: var(--bone-3); font-size: .875rem; line-height: 1.6; margin: 0 0 2.5rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--line-2);
}
.gf-doc h2 {
  display: flex; align-items: baseline; gap: .6rem;
  margin: 3rem 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line);
  font: 600 .8125rem/1.35 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  scroll-margin-top: 80px;
}
.gf-doc h2 .num { color: var(--gold-hi); font: inherit; margin: 0; }
.gf-doc h3 { margin: 1.8rem 0 .5rem; font: 600 1.0625rem/1.4 var(--f-text); color: var(--bone); }
.gf-doc p { margin: 0 0 1rem; color: var(--bone-2); text-wrap: pretty; }
.gf-doc ul, .gf-doc ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.gf-doc li { margin: 0 0 .5rem; color: var(--bone-2); padding-left: .25rem; }
.gf-doc li::marker { color: var(--gold); }
.gf-doc strong, .gf-doc b { color: var(--bone); font-weight: 600; }
.gf-doc a { color: var(--gold-hi); text-decoration: underline; text-decoration-color: rgba(212, 175, 85, .45); text-underline-offset: .2em; }
.gf-doc a:hover { text-decoration-color: currentColor; }
.gf-doc code { font: 500 .875em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--bone); background: var(--ink-2); padding: .1em .35em; border-radius: var(--radius); word-break: break-word; }

/* callouts (.box on terms/refunds, .hl on student terms) */
.gf-doc .box, .gf-doc .hl {
  margin: 1.2rem 0 1.4rem; padding: 1.1rem 1.25rem;
  border-left: 2px solid var(--gold); background: rgba(212, 175, 85, .05);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.gf-doc .box p, .gf-doc .hl p { color: var(--bone); }
.gf-doc .box p:last-child, .gf-doc .hl p:last-child { margin-bottom: 0; }
.gf-doc .addr { color: var(--bone-3); font-size: .875rem; }

/* tables: hairline rows, scroll inside the column on narrow screens */
.gf-doc .tbl { overflow-x: auto; margin: 1rem 0 1.4rem; border-top: 1px solid var(--line-2); -webkit-overflow-scrolling: touch; }
.gf-doc table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.55; }
.gf-doc th, .gf-doc td { text-align: left; vertical-align: top; padding: .75rem .9rem .75rem 0; border-bottom: 1px solid var(--line); color: var(--bone-2); }
.gf-doc th { font: 600 .6875rem/1.3 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: var(--bone-3); }
.gf-doc td:first-child { color: var(--bone); }

/* plain doc button (cookie choice) */
.gf-doc .btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.2rem; border: 0; border-radius: var(--radius);
  background: var(--gold); color: var(--on-gold); cursor: pointer;
  font: 600 .75rem/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase;
  transition: filter .2s, transform .2s var(--ease);
}
.gf-doc .btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ---------- footer (same as index.html) ---------- */
.gf-docpage .gf-footer { padding-top: var(--s-7); }
.gf-docpage .gf-footer .gf-fam { justify-content: flex-start; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.gf-docpage .gf-footer .gf-fam a { font-family: var(--f-text); color: var(--bone-3); font-size: 11px !important; }
.gf-legal a { color: var(--bone-2); }

/* ---------- centered utility layout (404, feedback) ---------- */
.gf-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: clamp(3rem, 10vw, 7rem) var(--gutter); }
.gf-center .gf-label { color: var(--gold); margin-bottom: 1rem; }
.gf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

@media (max-width: 600px) {
  .gf-doc { font-size: 1rem; }
  .gf-nav.gf-nav--doc { height: 56px; --nav-h: 56px; gap: .75rem; }
  .gf-back { padding: 0 .7rem; font-size: .6875rem; }
  .gf-actions .gf-btn { flex: 1 1 100%; }
}
@media (max-width: 380px) {
  .gf-nav--doc .gf-brand-word { font-size: 1.05rem; }
}
