/* CaseReader guide pages: one 680px reading column on paper, numbered like a lease.
   Loaded after brand.css on /guides/*. Generated pages: scripts/build_guides.py. */

.g-page {
  --g-margin: 88px;
  --g-col: 680px;
  --brass-1: #b8955a; --brass-2: #e2c98f; --brass-3: #a8854c;
  --amber-bg: #fbf1dc; --amber-line: #e6cd98; --amber-ink: #4a3510; --amber-bar: #b7791f;
  --counter: #0a1c17;
  background: var(--paper);
}
.g-page main { overflow-x: clip; }

/* ---------- top matter ---------- */
.g-top {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 44px);
  background:
    linear-gradient(180deg, rgba(236, 234, 228, 0.7), rgba(251, 250, 246, 0) 85%);
}
.g-col {
  max-width: calc(var(--g-col) + var(--g-margin) + 2 * var(--gut));
  margin: 0 auto;
  padding: 0 var(--gut) 0 calc(var(--gut) + var(--g-margin));
}
.g-crumb ol { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font: 500 0.74rem/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.g-crumb li + li::before { content: "›"; margin: 0 0.7em; color: var(--brass-3); letter-spacing: 0; }
.g-crumb a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.g-crumb a:hover { border-color: var(--tape-ink); }
.g-title {
  font: 400 clamp(2.15rem, 4.8vw, 3.55rem)/1.04 var(--display);
  letter-spacing: -0.012em; margin: 0 0 22px; text-wrap: balance; max-width: 20ch;
}
.g-title em { display: block; font-family: var(--serif); font-style: italic; letter-spacing: -0.02em; color: var(--green); font-size: 0.86em; margin-top: 0.12em; }
.g-lede { font-size: clamp(1.04rem, 1.4vw, 1.16rem); line-height: 1.62; color: var(--ink-2); max-width: 58ch; }
.g-toc { list-style: none; margin: 26px 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.88rem; }
.g-toc a { color: var(--ink-2); text-decoration: none; padding: 6px 0; display: inline-block; }
.g-toc a::before { content: "§ "; color: var(--brass-3); }
.g-toc a:hover { color: var(--ink); }

/* ---------- numbered sections ---------- */
.g-doc { padding: 0 var(--gut) clamp(48px, 7vw, 88px); }
.g-sec {
  display: grid; grid-template-columns: var(--g-margin) minmax(0, var(--g-col));
  justify-content: center;
  padding-top: clamp(36px, 5vw, 52px);
  scroll-margin-top: 88px;
}
.g-no { position: relative; }
.g-no span {
  display: block; font: 400 2.5rem/1 var(--display); color: var(--ink);
  font-feature-settings: "lnum"; padding-top: 2px;
}
.g-no::after { /* the hairline from the numeral to the clause, as in a lease margin */
  content: ""; position: absolute; top: 18px; left: 34px; right: 14px; height: 1px; background: var(--brass-3); opacity: 0.6;
}
.g-body { border-top: 1px solid var(--rule); padding-top: 14px; min-width: 0; }
.g-h { font: 400 clamp(1.45rem, 2.4vw, 1.8rem)/1.2 var(--serif); margin: 0 0 20px; letter-spacing: -0.005em; }
.g-h3 { font: 500 0.74rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.g-note { color: var(--ink-2); margin: 18px 0 0; max-width: 60ch; }
.g-fine { font-size: 0.86rem; color: var(--ink-3); margin: 14px 0 0; line-height: 1.55; }
.g-src { font-size: 0.86rem; color: var(--ink-3); margin: 10px 0 0; line-height: 1.5; }
.g-src a { color: var(--ink-2); word-break: break-word; }
.g-ret { white-space: nowrap; }

/* 1 · brass nameplates (same finish as The Meter on /) */
.g-plates { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.g-plates li { display: grid; gap: 6px; justify-items: start; }
.g-plate {
  position: relative; display: inline-block;
  padding: 14px 30px 13px 34px;
  background: linear-gradient(135deg, var(--brass-1), var(--brass-2) 45%, var(--brass-3));
  color: #2a2010; border-radius: 2px;
  font: 400 0.98rem/1.25 var(--display); letter-spacing: 0.18em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 8px 16px -10px rgba(42, 32, 16, 0.65);
  max-width: 100%;
}
.g-plate::before, .g-plate::after { /* screw heads */
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f3e4bd, #8a6a32);
  box-shadow: 0 0 0 1px rgba(42, 32, 16, 0.25);
}
.g-plate::before { left: 12px; } .g-plate::after { right: 10px; }
.g-for { font: italic 400 1rem/1.45 var(--serif); color: var(--ink-2); padding-left: 2px; }

/* 2 · counter window */
.g-window {
  background: var(--counter); color: var(--on-night);
  border-radius: 3px; padding: 22px 24px 20px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 20px 40px -30px rgba(14, 38, 32, 0.8);
}
.g-fig { margin: 0 0 14px; font: 600 clamp(2.4rem, 6vw, 3.5rem)/1 var(--sans); font-feature-settings: "tnum", "lnum"; display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px; }
.g-fig > span { display: inline-flex; flex-wrap: wrap; align-items: center; row-gap: 6px; }
.g-fig .d {
  position: relative; display: inline-block; min-width: 0.66em; text-align: center;
  padding: 0.1em 0.04em; margin: 0 1px;
  background: linear-gradient(180deg, #050f0b 0%, #183a30 22%, #1d4438 50%, #183a30 78%, #050f0b 100%);
  border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(201, 168, 106, 0.12);
}
.g-fig .d::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.45); }
.g-fig .s, .g-fig .p { color: var(--brass); padding: 0 0.06em; }
.g-fig .p { margin: 0 -0.04em; }
.g-line { color: var(--on-night-2); font-size: 0.98rem; line-height: 1.55; margin: 0; max-width: 58ch; }
.g-window .g-src { color: var(--on-night-2); }
.g-window .g-src a { color: var(--on-night); text-decoration-color: var(--brass); }
.g-for-tag { margin: 0 0 12px; font: 500 0.7rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.g-window-alt { margin-top: 12px; }
.g-window-alt .g-fig { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.g-quote { border: 1px dashed #b9ab86; border-radius: 3px; padding: 20px 22px; background: rgba(239, 227, 196, 0.25); }
.g-quote > p:first-child { font: italic 400 1.2rem/1.45 var(--serif); color: var(--ink); margin: 0; }

/* 3 · amber time-limit panel */
.g-amber {
  background: var(--amber-bg); border: 1px solid var(--amber-line); border-left: 4px solid var(--amber-bar);
  color: var(--amber-ink); padding: 18px 20px; border-radius: 2px;
}
.g-amber p { margin: 0 0 8px; }
.g-amber p:last-child { margin-bottom: 0; }
.g-amber b { font-weight: 600; }
.g-amber .g-src, .g-amber .g-src a { color: #6b5120; }

/* 4 · free routes */
.g-free { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.g-free li { position: relative; padding-left: 26px; }
.g-free li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 12px; height: 1px; background: var(--brass-3); }
.g-free p { margin: 0; color: var(--ink); }

/* 5 · the pack */
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.g-yes, .g-no-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-yes li, .g-no-list li { position: relative; padding-left: 30px; line-height: 1.5; }
.g-yes li::before {
  content: ""; position: absolute; left: 0; top: 0.2em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.g-no-list li { color: var(--ink-2); }
.g-no-list li::before { content: ""; position: absolute; left: 4px; top: 0.75em; width: 10px; height: 1.5px; background: var(--ink-3); }

/* 6 · example clause */
.g-example { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 22px; align-items: center; }
.g-sheet {
  position: relative; background: #fffdf7; color: #1d241f;
  padding: 26px 28px 24px; border-radius: 1px; transform: rotate(-0.5deg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 22px 40px -26px rgba(14, 38, 32, 0.55), 0 0 0 1px rgba(214, 210, 199, 0.7);
  font: 400 1rem/1.75 var(--serif);
}
.g-sheet-cap { margin: -4px 0 12px; font: italic 400 0.92rem/1.4 var(--serif); color: var(--ink-3); }
.g-sheet-h { margin: 0 0 12px; font: 500 0.66rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: #59625c; }
.g-clause { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.g-cno { font: 600 0.78rem/1.75rem var(--sans); color: #59625c; min-width: 2.2em; }
.g-example .hl { position: relative; }
.g-example .pin {
  position: relative; left: auto; top: -0.12em; display: inline-grid; vertical-align: middle;
  width: 20px; height: 20px; margin: 0 6px 0 2px; font-size: 0.66rem;
}
.g-margin {
  background: var(--night-2); color: var(--on-night); border: 1px solid var(--night-line); border-left: 3px solid #f08b7c;
  padding: 12px 14px; border-radius: 2px; font-size: 0.88rem; line-height: 1.5;
  box-shadow: 0 14px 28px -20px rgba(0, 0, 0, 0.6);
}
.g-margin b { display: flex; align-items: center; gap: 8px; font: 600 0.68rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: #f08b7c; margin-bottom: 7px; }
.g-margin b i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: #f08b7c; color: var(--night); letter-spacing: 0; font-size: 0.66rem; }

/* ---------- CTA band ---------- */
.g-cta { position: relative; overflow: hidden; }
.g-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background:
    radial-gradient(900px 400px at 80% 0%, rgba(201, 168, 106, 0.12), transparent 60%),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(255, 255, 255, 0.025) 31px 32px);
}
.g-cta-in {
  position: relative; max-width: calc(var(--g-col) + var(--g-margin) + 2 * var(--gut)); margin: 0 auto;
  padding: clamp(52px, 7vw, 84px) var(--gut) clamp(52px, 7vw, 84px) calc(var(--gut) + var(--g-margin));
}
.g-cta-h { font: 400 clamp(2rem, 4vw, 2.9rem)/1.06 var(--display); letter-spacing: -0.01em; margin: 0 0 14px; }
.g-cta-h em { font-family: var(--serif); font-style: italic; color: var(--tape); }
.g-cta-sub { color: var(--on-night-2); max-width: 52ch; margin-bottom: 26px; }
.g-scope { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--night-line); display: flex; flex-wrap: wrap; gap: 8px 0; font-size: 0.9rem; color: var(--on-night-2); }
.g-scope > span:not(:last-child)::after { content: "·"; margin: 0 0.8em; color: var(--brass); }

.g-disclaimer {
  max-width: 62ch; margin: 0 auto; padding: 26px var(--gut) 30px; text-align: center;
  font: italic 400 0.94rem/1.55 var(--serif); color: var(--ink-3);
}

/* ---------- /guides/ index ---------- */
.g-finder-sec {
  position: relative;
  background: var(--stone);
  padding: clamp(40px, 6vw, 84px) 0 clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--stone-2);
}
.g-finder-sec::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(20, 32, 27, 0.025) 31px 32px);
}
.g-finder-wrap {
  position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 72px); align-items: start;
}
.g-finder-copy { padding-top: 8px; }
.g-index .g-title { max-width: 12ch; }
.g-aside { font-size: 0.88rem; color: var(--ink-3); border-top: 1px solid var(--stone-2); padding-top: 14px; margin-top: 24px; max-width: 40ch; }
.g-noscript { grid-column: 1 / -1; background: var(--paper); border: 1px solid var(--rule); padding: 16px 18px; border-radius: 2px; }
#finder:empty { display: none; }

.g-table-sec { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 4vw, 48px); }
.g-table-wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--gut); }
.g-h2 { font: 400 clamp(1.9rem, 3.6vw, 2.8rem)/1.08 var(--display); letter-spacing: -0.01em; margin: 0 0 12px; }
.g-table { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 0.96rem; }
.g-table thead th {
  text-align: left; font: 500 0.72rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 16px 12px 0; border-bottom: 1px solid var(--ink);
}
.g-table tbody th, .g-table td { text-align: left; vertical-align: top; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.g-table tbody th { font: 400 1.04rem/1.45 var(--serif); width: 38%; }
.g-table td { color: var(--ink-2); line-height: 1.5; }
.g-table td:last-child { width: 24%; white-space: normal; }
.g-table tbody tr:nth-child(7) th, .g-table tbody tr:nth-child(7) td { border-bottom: 1px solid var(--ink-3); padding-bottom: 20px; }
.g-table tbody tr:nth-child(8) th, .g-table tbody tr:nth-child(8) td { padding-top: 20px; }
.t-src { font-size: 0.84rem; color: var(--ink-3); white-space: nowrap; }
.t-cost { display: block; margin-top: 6px; font-size: 0.88rem; color: var(--ink-3); }
.t-cost b { font-weight: 600; color: var(--ink); font-feature-settings: "tnum", "lnum"; }
.t-yes, .t-no, .t-later {
  display: inline-block; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 8px 4px; border-radius: 2px; margin-right: 6px;
}
.t-yes { background: rgba(47, 122, 85, 0.14); color: var(--green); }
.t-no { background: var(--stone); color: var(--ink-2); text-transform: none; letter-spacing: 0.01em; font-weight: 500; font-size: 0.84rem; }
.t-later { background: var(--amber-bg); color: var(--amber-ink); text-transform: none; letter-spacing: 0.01em; font-weight: 500; font-size: 0.84rem; }
.g-table a { color: var(--ink); }
.g-table-wrap .g-fine a { color: var(--ink-2); }

/* footer: four columns on guide pages */
.g-page .foot .wrap { grid-template-columns: 1.3fr 1fr 1.25fr 1fr; }
.foot-blurb { margin-top: 14px; max-width: 36ch; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .g-finder-wrap { grid-template-columns: 1fr; }
  .g-index .g-title { max-width: 18ch; }
  .g-page .foot .wrap { grid-template-columns: 1fr 1fr; }
  .g-page .foot .wrap > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .g-page { --g-margin: 0px; }
  .g-sec { grid-template-columns: minmax(0, 1fr); }
  .g-no { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
  .g-no span { font-size: 2rem; }
  .g-no::after { position: static; flex: 1; height: 1px; }
  .g-body { border-top: 0; padding-top: 0; }
  .g-two { grid-template-columns: 1fr; }
  .g-example { grid-template-columns: 1fr; }
  .g-margin { margin: -6px 10px 0; }
  .g-window { padding: 18px 16px; }
  .g-plate { letter-spacing: 0.14em; font-size: 0.9rem; }
  .g-table, .g-table tbody, .g-table tr, .g-table th, .g-table td { display: block; width: auto !important; }
  .g-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .g-table tr { border-bottom: 1px solid var(--rule); padding: 14px 0; }
  .g-table tbody th, .g-table td { border: 0; padding: 0 0 8px; }
  .g-table tbody tr:nth-child(7) { border-bottom-color: var(--ink-3); }
  .g-table tbody tr:nth-child(7) th, .g-table tbody tr:nth-child(7) td, .g-table tbody tr:nth-child(8) th, .g-table tbody tr:nth-child(8) td { padding: 0 0 8px; border: 0; }
  .g-table td::before { content: attr(data-label); display: block; font: 500 0.66rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
}
@media (max-width: 420px) {
  .g-fig { font-size: 2.1rem; }
  .g-sheet { padding: 22px 18px 20px; font-size: 0.94rem; }
  .g-clause { grid-template-columns: 1fr; gap: 4px; }
  .g-cno { line-height: 1.2; }
}

@media print {
  .top, .g-cta, .foot, .g-toc { display: none; }
  .g-window { box-shadow: none; }
}
.t-free { display: block; margin-top: 4px; font-size: 0.9rem; color: var(--ink-2); }
