/* Guides hub: long-form articles, printable downloads and training. */
body { background: #fff; font-size: 17px; line-height: 1.6; }
a { color: var(--accent); }
.g-top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 3; }
.g-top .in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.g-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; }
.g-brand .logo { width: 28px; height: 28px; border-radius: 7px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.g-nav { display: flex; gap: 18px; font-size: 15px; }
.g-nav a { color: var(--ink); text-decoration: none; }
.g-nav a:hover { color: var(--accent); }
.g-btn { display: inline-flex; font-family: inherit; cursor: pointer; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; border: 1px solid var(--accent); font-size: 15px; }
.g-btn.ghost { background: #fff; color: var(--accent); }
.g-btn:hover { background: var(--accent-dark); color: #fff; }

.g-wrap { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
.g-wrap.single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.g-toc { position: sticky; top: 84px; align-self: start; font-size: 14px; max-height: calc(100vh - 100px); overflow: auto; }
.g-toc ol { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.g-toc a:not(.g-btn) { color: var(--muted); text-decoration: none; }
.g-toc a:not(.g-btn):hover { color: var(--accent); }
article { max-width: 760px; min-width: 0; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
article h1 { font-size: 40px; line-height: 1.15; margin: 8px 0 12px; letter-spacing: -.01em; }
article h2 { font-size: 28px; line-height: 1.25; margin: 48px 0 12px; scroll-margin-top: 80px; }
article h3 { font-size: 20px; margin: 28px 0 8px; scroll-margin-top: 80px; }
article p, article li { max-width: 72ch; }
.byline { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.answer { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.answer p { margin: 0; }
.draft-note { background: var(--stale-bg); color: var(--stale); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.tbl-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; }
table.g { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
table.g th, table.g td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
table.g th { background: var(--panel); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
table.g tr:last-child td { border-bottom: 0; }
.callout { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin: 20px 0; }
.callout.warn { background: var(--stale-bg); border-color: #F0D6AE; }
.callout h3 { margin-top: 0; }
.kbd { font-family: 'IBM Plex Mono', monospace; font-size: 14px; background: var(--page); padding: 1px 6px; border-radius: 4px; }

/* Calls to action, on every page. */
.cta { border-radius: 14px; padding: 24px; margin: 32px 0; display: grid; gap: 12px; }
.cta.main { background: var(--ink); color: #fff; }
.cta.main p { color: #D5D9E0; margin: 0; }
.cta.form { background: var(--accent-soft); border: 1px solid #C9D2F5; }
.cta.form p { margin: 0; }
.cta h2, .cta h3 { margin: 0; font-size: 22px; }
.cta .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cta.main .g-btn.ghost { background: transparent; color: #fff; border-color: #6B7484; }
.cta-rail { display: grid; gap: 12px; margin-top: 24px; }
.cta-rail .cta { margin: 0; padding: 16px; }
.cta-rail .cta h3 { font-size: 16px; }
.cta-rail .cta p { font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.cards a { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.cards a:hover { border-color: var(--accent); }
.cards a span { font-size: 14px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .03em; }

.calc { border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 20px 0; display: grid; gap: 14px; }
.calc .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.calc label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.calc input, .calc select { min-height: 42px; padding: 0 10px; border: 1px solid var(--field); border-radius: 8px; font: inherit; font-size: 15px; }
.calc .out { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.calc .big { font-size: 32px; font-weight: 700; }

.g-foot { border-top: 1px solid var(--line); background: var(--panel); font-size: 14px; color: var(--muted); }
.g-foot .in { max-width: 1120px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Printable downloads: what the browser prints is the PDF. */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body { font-size: 11pt; }
  .g-top, .g-toc, .g-foot, .cta-rail, .no-print, .draft-note { display: none !important; }
  .print-only { display: block; }
  .g-wrap { display: block; padding: 0; }
  article { max-width: none; }
  article h1 { font-size: 22pt; }
  article h2 { font-size: 15pt; margin-top: 18pt; break-after: avoid; }
  table.g { font-size: 9.5pt; }
  tr, .callout { break-inside: avoid; }
  .cta { border: 1px solid #999; background: none !important; color: #000 !important; padding: 10pt; }
  .cta p { color: #000 !important; }
  .cta .row { display: none; }
  a { color: #000; text-decoration: none; }
}

@media (max-width: 900px) {
  .g-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .g-toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
  .g-nav { display: none; }
  article h1 { font-size: 30px; }
  article h2 { font-size: 23px; }
}

/* Small phones: keep the longer brand name and the Sign in button on one line. */
@media (max-width: 420px) {
  .g-top .in { padding: 0 16px; gap: 10px; }
  .g-brand { font-size: 15px; gap: 6px; min-width: 0; }
  .g-brand .logo { width: 24px; height: 24px; font-size: 11px; flex: 0 0 auto; }
  .g-top .g-btn { min-height: 36px; padding: 0 12px; font-size: 14px; flex: 0 0 auto; }
}

/* Phones and narrow tablets: the article comes first; the contents list follows it.
   The rail's cards repeat the article's own calls to action, so they're dropped. */
@media (max-width: 900px) {
  .g-wrap:not(.single) { display: flex; flex-direction: column; }
  .g-wrap:not(.single) > article { order: 1; }
  .g-wrap:not(.single) > .g-toc { order: 2; margin-top: 24px; }
  .cta-rail { display: none; }
}
