/* ============================================================
   guide.css — styles for guide articles and the /guides/ hub.
   Loaded AFTER theme.css, page.css, and service.css.
   Tokens: same as theme.css, Inter 200/300/400, border-radius: 0.
   ============================================================ */

/* A link inside running text. .btn-line is a button with its own label type;
   in a sentence it needs to read as part of the sentence. */
.guide-body .btn-line {
  display: inline; min-height: 0; padding: 0;
  font-size: inherit; letter-spacing: inherit; text-transform: none; color: var(--ink-9);
  border-bottom: 1px solid var(--accent); text-decoration: none;
}
.guide-body .btn-line:hover { color: var(--accent); }

/* ── Byline, Education Note and Direct Answer Band ── */
.guide-meta-band {
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.guide-byline {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--meta);
  margin-bottom: 1.25rem;
}
/* The note and the answer sit side by side on a wide screen, in the same
   statement left, detail right split as .svc-intro on the service pages. */
.guide-lead {
  display: grid;
  gap: 1.5rem 4rem;
  align-items: start;
}
@media (min-width: 62em) {
  .guide-lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
}
.guide-notice {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--band);
  border-left: 2px solid var(--ink-9);
  padding: 1rem 1.25rem;
}
.guide-answer {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}
.guide-answer .eyebrow {
  margin-bottom: 0.75rem;
  color: var(--accent);
}
.guide-answer p {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  font-weight: var(--w-light);
  line-height: 1.6;
  color: var(--ink-9);
  margin: 0;
}

/* ── Content Sections ── */
.guide-section {
  padding-block: clamp(2rem, 1.5rem + 3vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
.guide-section:last-of-type {
  border-bottom: none;
}
.guide-section h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  font-weight: var(--w-thin);
  line-height: var(--lh-tight);
  margin-bottom: 1.25rem;
  color: var(--ink-9);
}
@media (min-width: 62em) {
  .guide-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    gap: 0 4rem;
    align-items: start;
  }
  .guide-section h2 { margin-bottom: 0; }
}
.guide-body > :last-child { margin-bottom: 0; }
.guide-section p {
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--ink);
  max-width: var(--measure);
  margin-bottom: 1.25rem;
}
.guide-section ul,
.guide-section ol {
  max-width: var(--measure);
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.guide-section li {
  margin-bottom: 0.6rem;
  line-height: var(--lh-body);
}

/* ── Worked Example (Hairline Table) ── */
.guide-example {
  margin-block: 2.5rem;
}
.guide-example-title {
  font-size: var(--t-h3);
  font-weight: var(--w-light);
  color: var(--ink-9);
  margin-bottom: 0.75rem;
}
.guide-example-intro {
  font-size: var(--t-body);
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.guide-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-top: 1px solid var(--ink-9);
  border-bottom: 1px solid var(--ink-9);
}
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  line-height: 1.5;
  text-align: left;
}
.guide-table th,
.guide-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.guide-table th {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--meta);
  font-weight: var(--w-body);
  background: var(--band);
}
.guide-table tr:last-child td {
  border-bottom: none;
}
.guide-table .t-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.guide-table .t-total {
  font-weight: var(--w-body);
  color: var(--ink-9);
  border-top: 1px solid var(--ink-9);
}
.guide-example-closing {
  font-size: 0.9rem;
  color: var(--meta);
  margin-top: 0.75rem;
}

/* ── Video card ── */
/* One framed card, like the guide carousel's: eyebrow and title above the
   reel, a hairline frame round both (Nick, 2026-11-03). The card is at least 28rem wide where space allows; the reel is as large as
   the window allows: its height budget is the window under the fixed header
   (--nav-h) less the title block and the frame (--card-chrome), so the whole
   card fits one screen on a phone and grows on a big one (about 590 px wide at
   Nick's 2560x1273, where the old 26rem cap held it to 414). The transcript
   sits closed under the card. */
.guide-section.guide-video { display: block; }
.guide-video {
  --nav-h: var(--nav-height, 4.75rem);
  --card-pad: clamp(0.75rem, 0.5rem + 0.6vw, 1.25rem);
  --card-chrome: 10.5rem;    /* eyebrow, two title lines, frame padding and the 8px under the header */
  /* svh where the browser has it (a phone's toolbars shown), vh where it does
     not: an unknown unit would void the whole width and draw the reel full
     column width. */
  --win-h: 100vh;
  --reel-w: min(40rem, calc((var(--win-h) - var(--nav-h) - var(--card-chrome)) * 0.5625));
}
@supports (height: 100svh) { .guide-video { --win-h: 100svh; } }
@media (max-width: 40em) { .guide-video { --card-chrome: 11rem; } }
.guide-video-card {
  width: min(100%, max(28rem, calc(var(--reel-w) + 2 * var(--card-pad) + 2px)));
  margin-inline: auto;
  padding: var(--card-pad);
  border: 1px solid var(--rule);
  background: var(--paper);
}
.guide-video-head { margin-bottom: 0.9rem; }
.guide-video-head .eyebrow { display: block; margin-bottom: 0.4rem; }
.guide-section .guide-video-head h2 {
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.6rem);
  font-weight: var(--w-light);
  line-height: 1.25;
  letter-spacing: normal;
  margin: 0;
}
.guide-video-wrap {
  position: relative;
  width: min(100%, var(--reel-w));
  margin-inline: auto;
  background: var(--ink-9);
}
.guide-video-wrap video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
}
.guide-transcript {
  width: min(100%, max(28rem, calc(var(--reel-w) + 2 * var(--card-pad) + 2px)));
  margin: 0.75rem auto 0;
}
.guide-watch-link { text-align: center; margin: 0.75rem 0; }
.guide-watch-link a { display: inline-flex; align-items: center; min-height: 44px; }
.guide-transcript summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--ink-9);
}
.guide-transcript summary::-webkit-details-marker { display: none; }
/* a chevron that turns when the transcript opens, the carousel card's own */
.guide-transcript summary::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-0.15rem) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.guide-transcript[open] summary::after { transform: translateY(0.1rem) rotate(-135deg); }
.guide-transcript summary:hover { color: var(--accent); }
.guide-transcript summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-transcript-body { padding: 0.5rem 0 0; }
.guide-transcript-body p {
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
@media (prefers-reduced-motion: reduce) {
  .guide-transcript summary::after { transition: none; }
}

/* ── Interactive NNN Calculator ── */
.calc-card {
  border: 1px solid var(--rule);
  background: #ffffff;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
  margin-block: 2.5rem;
}
.calc-card h2,
.calc-card h3 {
  font-weight: var(--w-light);
  color: var(--ink-9);
}
.calc-card h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  font-weight: var(--w-thin);
  margin-bottom: 1rem;
}
.calc-card .lede {
  font-size: var(--t-body);
  max-width: var(--measure);
  margin-bottom: 1.75rem;
}
.calc-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 48em) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.calc-fieldset {
  border: 1px solid var(--rule);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.calc-grid .calc-fieldset { margin-bottom: 0; }
.calc-fieldset .calc-grid { margin-bottom: 0; }
.calc-fieldset legend {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--ink-9);
  font-weight: var(--w-body);
  padding-inline: 0.5rem;
}
.calc-input-group {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.calc-input-group:last-child {
  margin-bottom: 0;
}
.calc-input-group label {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--meta);
}
.calc-input-group input {
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-9);
  background: #ffffff;
}
.calc-input-group input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.calc-results {
  background: var(--band);
  padding: 1.5rem;
  border: 1px solid var(--rule);
  margin-top: 1.5rem;
}
.calc-results-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 40em) {
  .calc-results-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.calc-result-box {
  background: #ffffff;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
}
.calc-result-box h3 {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--meta);
  margin-bottom: 0.75rem;
}
.calc-result-box p {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: var(--ink);
}
.calc-result-box p strong {
  color: var(--ink-9);
  font-weight: var(--w-body);
  font-variant-numeric: tabular-nums;
}
.calc-diff {
  background: #ffffff;
  padding: 1rem 1.25rem;
  border: 1px solid var(--accent);
  color: var(--ink-9);
  font-weight: var(--w-body);
  line-height: 1.5;
}

/* ── Sources and Related Links ── */
.guide-sources {
  margin-block: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.guide-sources h3 {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--meta);
  margin-bottom: 1rem;
}
.guide-sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.guide-sources li {
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink);
}
.guide-sources a {
  color: var(--ink-9);
  border-bottom: 1px solid var(--accent);
  text-decoration: none;
}
.guide-sources a:hover {
  color: var(--accent);
}

.guide-related {
  margin-block: 2rem;
  max-width: var(--measure);
}
.guide-related h3 {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  color: var(--meta);
  margin-bottom: 1rem;
}
.guide-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.guide-related li {
  margin: 0;
}
.guide-related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-9);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  width: 100%;
  padding-block: 0.5rem;
  font-size: 0.95rem;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.guide-related a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Closing Route Bands ── */
.route-closing {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}
.route-closing h2 {
  font-size: var(--t-h2);
  font-weight: var(--w-thin);
  margin-bottom: 1rem;
  color: #ffffff;
}
.route-closing p {
  color: var(--band);
  max-width: var(--measure);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.route-closing .cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.route-closing .cta-primary {
  min-height: 44px;
}

/* ── Hub Page (/guides/) ── */
.hub-intro {
  margin-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  max-width: var(--measure);
}
.hub-group {
  margin-bottom: clamp(3rem, 2rem + 4vw, 5rem);
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.hub-group:last-child {
  border-bottom: none;
}
.hub-group-header {
  margin-bottom: 1.5rem;
}
.hub-group-header h2 {
  font-size: var(--t-h2);
  font-weight: var(--w-thin);
  color: var(--ink-9);
  margin-bottom: 0.5rem;
}
.hub-group-link {
  display: inline-block;
  margin-bottom: 1.5rem;
}
.hub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.hub-item {
  border-top: 1px solid var(--rule);
  padding-top: 0.5rem;
}
.hub-item:first-child {
  border-top: none;
  padding-top: 0;
}
/* Each row reads as one target: a light ground under the whole row, the
   title underlined in the accent, and a chevron that steps right. The color
   change alone was too quiet to say "click me" (Nick, 2026-11-02). The
   chevron is two borders, not an icon, so the site keeps one icon set. */
.hub-item-link {
  position: relative;
  display: block;
  text-decoration: none;
  min-height: 44px;
  padding: 1rem 3.5rem 1rem 0.75rem;
  margin-inline: -0.75rem;
  transition: background-color var(--dur-fast) ease;
}
.hub-item-link::after {
  content: '';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-top: 1px solid var(--ink-9);
  border-right: 1px solid var(--ink-9);
  opacity: 0.4;
  transform: translateY(-50%) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}
.hub-item-link:hover,
.hub-item-link:focus-visible {
  background: color-mix(in srgb, var(--band) 55%, var(--paper));
}
.hub-item-link:hover::after,
.hub-item-link:focus-visible::after {
  opacity: 1;
  border-color: var(--accent);
  transform: translate(0.4rem, -50%) rotate(45deg);
}
.hub-item-link:hover .hub-item-title,
.hub-item-link:focus-visible .hub-item-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
@media (prefers-reduced-motion: reduce) {
  .hub-item-link::after { transition: none; }
}
.hub-item-title {
  display: block;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
  font-weight: var(--w-light);
  color: var(--ink-9);
  margin-bottom: 0.4rem;
  transition: color var(--dur-fast) ease;
}
.hub-item-link:hover .hub-item-title {
  color: var(--accent);
}
.hub-item-dek {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.5;
}

/* ── Accessibility & Viewport Tweaks ── */
@media (max-width: 47.98em) {
  .guide-table th,
  .guide-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }
}
