/* GeoMan ANZ site template (WEB-T-002).
   Palette: Geoman Website Base/Logos and Colour Scheme/Colours for Geoman.png
   plus #614806 from the gold gradient in sheet-generator/Geoman-115.svg.
   Contrast rules: website/DESIGN.md. No white text on gold; khaki is for rules
   and large display text only. GeosansLight has one weight: never bold it.
   Fonts: Jost 400 (OFL, self-hosted) for body and long text; GeosansLight for
   headings, navigation, the title block and other display text. */

@font-face {
  font-family: 'GeosansLight';
  src: url('/static/fonts/GeosansLight.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('/static/fonts/Jost-Latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000000;
  --ink: #232B2B;
  --ink-soft: #4A5454;
  --paper: #FFFFFF;
  --gold: #BF910C;
  --gold-dark: #614806;
  --rust: #914604;
  --khaki: #9B8C60;
  --steel: #32668C;
  --desk: #111616;
  --sheet-grey: #E8E6E1;
  --geo: 'GeosansLight', 'Segoe UI', system-ui, sans-serif;
  --body: 'Jost', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --frame: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }

body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--desk);
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--paper); color: var(--ink); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }

/* the sheet: paper on the desk, max 1280 px */
.sheet {
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--khaki);
  border-right: 1px solid var(--khaki);
}

/* drawing window: 3 px black frame with a 1 px rule 6 px inside */
.window {
  position: relative;
  flex: 1;
  margin: var(--frame) var(--frame) 0 var(--frame);
  border: 3px solid var(--black);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.window::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--black);
  pointer-events: none;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--black);
  margin: 1px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
  min-height: 44px;
}
.brand { font-family: var(--geo); }
.brand-name { font-size: 22px; letter-spacing: 0.14em; }
.brand-mark { display: block; width: auto; height: 72px; } /* v3 horizontal lockup, WEB-T-019 */

.nav { font-family: var(--geo); }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink); text-decoration: none; letter-spacing: 0.12em; font-size: 16px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--gold); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.content {
  flex: 1;
  padding: clamp(24px, 5vw, 56px) clamp(18px, 5vw, 64px);
}

h1, h2, h3 { font-family: var(--geo); font-weight: normal; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: 0.08em; margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3.2vw, 32px); letter-spacing: 0.06em; margin: 48px 0 12px; }
h3 { font-size: 22px; letter-spacing: 0.04em; margin: 32px 0 8px; }
p { margin: 0 0 16px; }
.lede { font-size: clamp(19px, 2.2vw, 22px); color: var(--ink-soft); max-width: 40em; }

/* long-form text: Jost 400 (Chris's pick, 30 Oct 2026) */
.prose { font-family: var(--body); font-weight: 400; font-size: 17px; line-height: 1.7; max-width: 40em; }

a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }

.site-footer {
  border-top: 1px solid var(--black);
  margin: 1px;
  padding: 18px 24px;
  font-size: 16px;
  color: var(--ink-soft);
}
.site-footer .follow { margin: 0; }
.signup-slot:empty { display: none; }

/* ---------------- title block ---------------- */
.titleblock {
  font-family: var(--geo);
  margin: 0 var(--frame) var(--frame) var(--frame);
  border: 3px solid var(--black);
  border-top-width: 0;
  background: var(--black);
}
.titleblock dl {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.6fr 0.8fr 0.5fr;
  grid-template-areas: "project ref title date rev";
  gap: 1.5px;
  margin: 0;
}
.titleblock.has-sheet dl {
  grid-template-columns: 1.1fr 1fr 0.9fr 1.6fr 0.8fr 0.5fr;
  grid-template-areas: "project ref sheet title date rev";
}
.cell {
  position: relative;
  background: var(--paper);
  min-height: 124px; /* was 92px; taller row for the level wordmark, WEB-T-019 option C */
  padding: 26px 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}
.cell dt {
  position: absolute; top: 6px; left: 10px;
  font-size: 11px; letter-spacing: 0.18em; line-height: 1;
  color: var(--ink-soft);
}
.cell dd {
  margin: 0;
  font-size: clamp(15px, 1.8vw, 21px);
  letter-spacing: 0.12em;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
}
.cell-project { grid-area: project; background: var(--gold); padding: 24px 20px 16px; }
.cell-project dd { display: block; width: 100%; color: var(--ink); white-space: normal; }
.cell-project dt { color: var(--ink); }
.tb-wordmark { display: block; width: 100%; max-width: 216px; height: auto; margin: 0 auto; } /* v3 white level wordmark (05-wordmark-mono-reverse) on the gold cell, 216 x 84, option C, Chris 30 Oct 2026 */
.cell-ref { grid-area: ref; }
.cell-sheet { grid-area: sheet; }
.cell-title { grid-area: title; }
.cell-title dd { white-space: normal; letter-spacing: 0.14em; }
.cell-date { grid-area: date; }
.cell-rev { grid-area: rev; }

@media (max-width: 720px) {
  :root { --frame: 10px; }
  .titleblock dl {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "project ref" "title title" "date rev";
  }
  .titleblock.has-sheet dl {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "project project" "ref sheet" "title title" "date rev";
  }
  .cell dd { font-size: 16px; letter-spacing: 0.08em; }
  .cell { min-height: 72px; }
  .cell-project { padding: 24px 12px 12px; } /* wordmark: full cell width minus 12px each side */
  .tb-wordmark { max-width: 240px; } /* only bites when PROJECT spans both columns (has-sheet) */
  .masthead { padding: 12px 16px; }
  .brand-mark { height: 56px; }
  .site-footer { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------- style guide helpers (WEB-021) ---------------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin: 16px 0; padding: 0; list-style: none; }
.swatch { border: 1px solid var(--black); }
.swatch-chip { height: 72px; border-bottom: 1px solid var(--black); }
.swatch-info { padding: 8px 10px; font-family: var(--body); font-size: 14px; line-height: 1.5; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.contrast { border-collapse: collapse; font-family: var(--body); font-size: 15px; margin: 16px 0; }
.contrast th, .contrast td { border: 1px solid var(--black); padding: 6px 10px; text-align: left; }
@media (max-width: 480px) { .contrast { font-size: 13px; } .contrast th, .contrast td { padding: 4px 6px; } }
.contrast th { background: var(--sheet-grey); font-weight: normal; }
.demo-tb { margin: 16px 0 8px; }
.demo-tb .titleblock { margin: 0; border-top-width: 3px; }
.note { font-family: var(--body); font-size: 15px; color: var(--ink-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.chip { font-family: var(--geo); display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--black); font-size: 16px; letter-spacing: 0.1em; }
.chip-gold { background: var(--gold); color: var(--ink); }
.chip-dark { background: var(--gold-dark); color: var(--paper); }
.chip-ink { background: var(--ink); color: var(--paper); }

/* ---------------- shared content pieces (WEB-T-008, 012, 005, 014) ---------------- */
.draft-banner {
  font-family: var(--geo); letter-spacing: 0.1em; font-size: 15px;
  background: var(--gold); color: var(--ink); border: 1px solid var(--black);
  padding: 10px 14px; margin: 0 0 24px;
}
.label { font-weight: 500; }
.src { color: var(--ink-soft); font-size: 0.92em; }
.case-meta { font-family: var(--geo); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); font-size: 15px; margin: 0 0 8px; }
.status-chip { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--black); background: var(--gold); color: var(--ink); letter-spacing: 0.1em; }
.mech-label { font-family: var(--geo); letter-spacing: 0.1em; text-transform: uppercase; font-size: 14px; color: var(--ink-soft); margin: 0 0 4px; }
.prose ul, .prose ol, ul.prose, ol.prose { padding-left: 1.3em; }
.facts li, .sources li, .outline li { margin: 0 0 10px; }
.note .label { font-weight: 500; }
.related { font-family: var(--body); padding-left: 1.3em; }
.related li { margin: 0 0 6px; }

.case-list { list-style: none; padding: 0; margin: 24px 0 0; max-width: 46em; }
.case-item { border-top: 1px solid var(--black); padding: 18px 0 8px; }
.case-item h2 { margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 28px); }
.case-item h2 a { color: var(--ink); text-decoration: none; }
.case-item h2 a:hover { color: var(--rust); text-decoration: underline; }
.case-item p { font-size: 17px; margin: 0 0 8px; }

/* signup partial: disabled while no provider is chosen */
.signup { border: 1px solid var(--black); padding: 16px 18px; margin: 24px 0; max-width: 40em; }
.signup-h { margin: 0 0 6px; font-size: 24px; }
.signup-blurb { margin: 0 0 12px; font-size: 16px; }
.signup-form label { display: block; font-size: 15px; margin: 0 0 4px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-row input { flex: 1 1 14em; min-width: 0; min-height: 44px; padding: 8px 10px; font: inherit; font-size: 16px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); }
.signup-row button { min-height: 44px; padding: 0 20px; font-family: var(--geo); font-size: 17px; letter-spacing: 0.1em; border: 1px solid var(--black); background: var(--ink); color: var(--paper); cursor: pointer; }
.signup-row input:disabled, .signup-row button:disabled { background: var(--sheet-grey); color: var(--ink-soft); border-color: var(--ink-soft); cursor: not-allowed; }
.signup-status { margin: 8px 0 0; font-size: 15px; color: var(--ink); }
.signup-status:empty { display: none; }
.footer-links { margin: 8px 0 0; font-size: 15px; }

/* sheet page */
.sheet-figure { margin: 8px 0 24px; border: 1px solid var(--black); max-width: 900px; }
.sheet-figure img { display: block; width: 100%; height: auto; }
.sheet-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 24px; font-size: 17px; max-width: 46em; }
.sheet-facts div { display: contents; }
.sheet-facts dt { font-family: var(--geo); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); font-size: 15px; padding-top: 2px; }
.sheet-facts dd { margin: 0; }
.prevnext { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 32px 0 0; font-family: var(--geo); letter-spacing: 0.08em; font-size: 17px; }
.prevnext a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 480px) {
  .sheet-facts { grid-template-columns: 1fr; gap: 2px; }
  .sheet-facts dd { margin-bottom: 8px; }
}

/* reading pages (31 Oct 2026, grok; owner review: body text looked cut off and left aligned).
   Text-led pages (privacy, email, thanks, work with me, casebook case pages) get
   main.content-reading from build_site.py page(reading=True). Every block on them, headings,
   draft banner and notes included, shares one centred column, so the drawing window keeps
   equal margins left and right instead of a blank strip on the right. The measure stays
   42.5rem (680 px = the old 40em of 17 px Jost, about 90 characters a line): wider would
   hurt reading. Below about 760 px the column is the full content width, so phones are
   unchanged. Update 31 Oct 2026 (grok, owner review: text left aligned again on some pages):
   pages with wide parts (mentoring, casebook index, sheet pages, the library) use the same
   centred column, and only the wide parts break out, centred: mentoring tier grid and fee
   table, casebook globe, sheet figure (900 px). Only the style guide keeps the old layout. */
:root { --measure: 42.5rem; }
.content-reading > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
/* main.content-reading (0,1,1) so a page's own one-class rules (margin: 16px 0) cannot pull a
   block back to the left edge. */
main.content-reading > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
main.content-reading > :is(.tiers, .fee-table) { max-width: none; }
main.content-reading > .detail-globe { max-width: 1040px; }
main.content-reading > .sheet-figure { max-width: 900px; }

/* HOME (WEB-002): front door. Phone-first; one column under 640 px. */
.home-hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; margin: 8px 0 12px; }
.home-lede { font-size: 1.05rem; color: var(--ink-soft); max-width: 36rem; }
.home-actions a {
  display: inline-block; margin-top: 8px; padding: 12px 22px;
  border: 2px solid var(--gold-dark); color: var(--ink);
  font-family: GeosansLight, Jost, sans-serif; font-size: 1.1rem;
  letter-spacing: 0.04em; text-decoration: none;
}
.home-actions a:hover, .home-actions a:focus { background: var(--gold); color: var(--ink); }
.home-groups {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .home-groups { grid-template-columns: 1fr 1fr; } }
.home-groups a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 12px 14px; border: 1px solid #D8D2C0; text-decoration: none;
}
.home-groups a:hover, .home-groups a:focus { border-color: var(--gold-dark); }
.home-groups .hg-name { font-family: GeosansLight, Jost, sans-serif; font-size: 1.05rem; color: var(--ink); }
.home-groups .count { color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }
