/* Alura Capital standalone pages. Loads after main.css and uses its design tokens.
   Mobile first. md >= 768px, lg >= 1080px, same as main.css. */

/* ---------- Breadcrumb ---------- */
.crumbs { padding: 12px 0; border-top: 1px solid #E6E6E6; font-size: 14px; line-height: 20px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; }
/* The slash trails the item before it, so a long name that wraps on a narrow phone never starts its line with a slash. */
.crumbs li:not(:last-child)::after { content: "/"; margin: 0 8px; color: var(--line); }
.crumbs a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { text-decoration: none; }
/* On a phone the third level takes its own line, so the trail is the same height before and after the web font arrives. */
@media (max-width: 479.98px) {
  .crumbs li:nth-child(3):last-child { flex-basis: 100%; }
  .crumbs li:nth-child(2):nth-last-child(2)::after { display: none; }
}

/* ---------- Page hero ---------- */
.page-hero { padding-top: 12px; }
.page-hero-inner {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center;
  width: min(1280px, 100% - 2 * var(--gut)); margin: 0 auto; padding: 32px 24px;
  border-radius: 16px; background: var(--promo);
}
.page-hero h1 { margin: 0; font-size: 36px; font-weight: 500; line-height: 44px; letter-spacing: -1px; color: var(--ink); text-wrap: balance; }
.page-hero .badge { margin-bottom: 12px; background: rgba(17, 17, 17, .08); }
.page-hero .lede { margin: 16px 0 0; }
.page-hero .btn-row { margin-top: 24px; }
.lede { font-size: 18px; line-height: 28px; color: #333; }
.page-hero--plain .page-hero-inner { width: min(880px, 100% - 2 * var(--gut)); padding-left: 0; padding-right: 0; background: none; }
.page-hero--dusk .page-hero-inner { background: var(--dusk); color: #fff; }
.page-hero--dusk h1, .page-hero--dusk .lede { color: #fff; }
.page-hero--dusk .badge { background: rgba(255, 255, 255, .14); }
.page-hero--dusk .lede a { color: #fff; }
.page-hero--dusk :focus-visible { outline-color: #fff; }
.page-hero--dusk .btn--dark { background: #fff; color: var(--ink); }
.page-hero--dusk .btn--dark:hover { background: var(--gold); color: var(--ink-warm); }
.page-hero--dusk .btn--outline { border-color: #fff; color: #fff; }
.page-hero--dusk .btn--outline:hover { background: #fff; color: var(--ink); }
.page-hero-media { margin: 0; }
.page-hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #D9D4CA; }
.page-hero-media figcaption { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--muted); }

/* ---------- Reading column ---------- */
.page-wrap { width: min(880px, 100% - 2 * var(--gut)); margin: 32px auto 0; }
.page-wrap--toc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.prose { min-width: 0; overflow-wrap: break-word; font-size: 16px; line-height: 26px; color: #333; }
.prose > :first-child { margin-top: 0; }
.prose h2, .sec-title { margin: 48px 0 12px; font-size: 28px; font-weight: 500; line-height: 36px; letter-spacing: -.5px; color: var(--ink); text-wrap: balance; }
.prose h3 { margin: 32px 0 8px; font-size: 21px; font-weight: 500; line-height: 28px; color: var(--ink); }
.prose h4 { margin: 24px 0 4px; font-size: 17px; font-weight: 600; line-height: 24px; color: var(--ink); }
.prose p { margin: 12px 0; }
.prose ul:not([class]), .prose ol:not([class]) { margin: 12px 0; padding-left: 22px; }
.prose ul:not([class]) li, .prose ol:not([class]) li { margin: 6px 0; }
.prose a:not([class]) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prose a:not([class]):hover { color: var(--gold-ink); }
.prose strong, .prose b { font-weight: 600; color: var(--ink); }
.prose .btn-row { margin: 20px 0; }
.btn .dl-f { margin: 0; color: inherit; font-size: 13px; font-weight: 400; line-height: inherit; }
/* A file label ("PDF · 114 KB") stays whole and drops under the button words on a narrow phone. */
.btn .dl-f { white-space: nowrap; }
.btn:has(.dl-f) { flex-wrap: wrap; justify-content: center; }
.prose .btn, .page-hero .btn, .cta-band .btn { padding-top: 8px; padding-bottom: 8px; text-align: center; }

/* Plain link with an arrow */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.link-arrow svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Formula block */
.formula {
  margin: 16px 0; padding: 16px 18px; border: 1px solid #E6E6E6; border-radius: 12px; background: var(--gray-50);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace; font-size: 14px; line-height: 22px; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- Table of contents ---------- */
.toc { padding: 16px 20px; border: 1px solid #E6E6E6; border-radius: 16px; background: var(--gray-50); font-size: 15px; line-height: 22px; }
.toc-h { margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--muted); }
.toc ol, .toc ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Callout ---------- */
.callout { margin: 24px 0; padding: 20px 24px; border-radius: 16px; background: var(--promo); color: var(--ink); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-t { margin: 0 0 6px; font-size: 18px; font-weight: 600; line-height: 26px; color: var(--ink); }
.callout--gray { border: 1px solid #E6E6E6; background: var(--gray-50); }
.callout--sand { background: var(--stats); }
.callout--dusk { background: var(--dusk); color: #fff; }
.callout--dusk .callout-t, .callout--dusk strong { color: #fff; }
.callout--dusk a, .prose .callout--dusk a:not([class]), .prose .callout--dusk a:not([class]):hover { color: #fff; }
.callout--dusk :focus-visible { outline-color: #fff; }

/* ---------- Key facts ---------- */
.key-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 24px 0; }
.key-facts > div { padding: 16px; border: 1px solid #E6E6E6; border-radius: 16px; background: var(--gray-50); }
.key-facts dt { font-size: 14px; line-height: 20px; color: var(--muted); }
.key-facts dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; line-height: 24px; color: var(--ink); }

/* ---------- Tables ---------- */
.table-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid #E6E6E6; border-radius: 16px; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; color: var(--ink); }
.table caption { padding: 14px 16px 10px; text-align: left; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--muted); }
.table th, .table td { padding: 12px 16px; border-top: 1px solid #E6E6E6; text-align: left; vertical-align: top; }
.table thead th { background: var(--gray-50); font-size: 14px; font-weight: 600; line-height: 20px; }
.table tbody th { font-weight: 500; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--wide { min-width: 760px; }
.table tr.example td, .table tr.example th { color: var(--muted); }
.table tr.total td, .table tr.total th { font-weight: 600; }
.table-note { margin: -12px 0 24px; font-size: 13px; line-height: 20px; color: var(--muted); }
/* pages.js hides the hint on a table that fits its box at the current width. */
.table-hint { display: block; margin: -16px 0 24px; font-size: 13px; line-height: 20px; color: var(--muted); }
/* A long column heading wraps between its words, so the money columns of a stacking table fit its box from 600px up. */
.table-stack thead .num { white-space: normal; }
/* For a table with six or more columns, which needs the room at 600px. */
@media (min-width: 600px) { .table--tight th, .table--tight td { padding-left: 10px; padding-right: 10px; } }
/* From 1080px the reading column sits beside the contents list, and two tables fit side by side in it from 1191px of
   page width. A classic scrollbar (15 to 17px) is part of the width a media query sees, so they pair up from 1210px. */
@media (max-width: 1209.98px) { .card-grid.card-grid--tables { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599.98px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .table-stack, .table-stack caption, .table-stack tbody, .table-stack tr, .table-stack td, .table-stack tbody th { display: block; width: 100%; }
  .table-stack tr { padding: 8px 16px; border-top: 1px solid #E6E6E6; }
  .table-stack tbody tr:first-child { border-top: 0; }
  .table-stack td, .table-stack tbody th { padding: 6px 0; border: 0; }
  .table-stack td:empty { display: none; }  /* no column name with nothing under it */
  .table-stack td[data-label]::before, .table-stack tbody th[data-label]::before {
    content: attr(data-label); display: block; font-size: 13px; font-weight: 500; line-height: 18px; color: var(--muted);
  }
  .table-stack .num { text-align: left; white-space: normal; }
}
/* The stacked layout sets captions to 100% wide, which would widen a screen-reader-only caption past the box. */
.table-stack caption.sr-only { width: 1px; }

/* ---------- Step list ---------- */
.step-list { display: grid; gap: 20px; margin: 24px 0; padding: 0; list-style: none; counter-reset: step; }
.step-list > li { position: relative; min-height: 40px; padding-left: 56px; counter-increment: step; }
.step-list > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600;
}
.step-list strong { color: var(--ink); }
.step-list p { margin: 4px 0 0; }
.prose .steps { margin: 24px 0; }
.prose .step h3 { margin: 0; font-size: 20px; font-weight: 500; line-height: normal; }
.prose .step p { margin: 8px 0 0; color: var(--muted); }

/* ---------- Checklist ---------- */
.check-list { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.check-list > li { position: relative; padding-left: 32px; }
.check-list > li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border: 1.5px solid var(--gold-ink); border-radius: 5px; background: #fff; }
.check-list--form > li { padding-left: 0; }
.check-list--form > li::before { content: none; }
.check-list--form label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-list--form input { flex-shrink: 0; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ink); }
.check-list .check-list { margin: 10px 0 0 32px; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; color: var(--ink); text-decoration: none; transition: background-color .15s;
}
a.card:hover { background: var(--hover); }
.card-t { font-size: 20px; font-weight: 500; line-height: 26px; color: var(--ink); }
.card-d { font-size: 16px; line-height: 24px; color: var(--muted); }
.card-go { margin-top: auto; padding-top: 8px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a.card:hover .card-go { text-decoration: none; }

/* ---------- Link list ---------- */
.link-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 32px; margin: 16px 0; padding: 0; list-style: none; }
.link-list a { display: block; padding: 8px 0; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.link-list a:hover { color: var(--gold-ink); }

/* ---------- FAQ ---------- */
.faq { margin-top: 48px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq h2 + .faq-item, .faq .faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { flex-shrink: 0; width: 24px; height: 24px; transition: transform .2s; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item h3 { margin: 0; font-size: 18px; font-weight: 500; line-height: 26px; color: var(--ink); }
.faq-a p, .faq-item--static p { margin: 0 0 18px; font-size: 16px; line-height: 26px; color: #333; }
.faq-item--static { padding-top: 18px; }
.faq-item--static h3 { margin-bottom: 8px; }

/* ---------- Download tile ---------- */
.dl-tile { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.dl-tile .dl-ico { grid-row: auto; }
.dl-tile-body p { margin: 0; }
.dl-tile-body .dl-t { color: var(--ink); }
.dl-tile .btn { grid-column: 1 / -1; }
.prose .dl-list { margin: 24px 0; }
.prose .dl-list a:not([class]), .prose .dl-list a:not([class]):hover { color: var(--ink); text-decoration: none; }

/* ---------- Calculator ---------- */
.prose .calc { margin: 24px 0; }
.calc--single .panel { margin-top: 0; }
/* Inside the reading column the calculator keeps the homepage's spacing. */
.prose .calc .big { margin: 0 0 16px; }
.prose .calc .verdict { margin: 12px 0 0; }
.prose .calc .note, .prose .calc .calc-disc { margin: 0; }
/* From 1080px the results column here is about 270px wide at any screen width, too narrow for "Days left" and its
   answer on one line. The answer stops at 62% of the row, as on phones (main.css), so the label keeps one line. */
@media (min-width: 1080px) { .calc--single .panel[data-calc="x1031"] dd[data-o="left"] { max-width: 62%; } }

/* ---------- Licensing block in the body ---------- */
.license-block { margin: 32px 0 0; padding: 20px 24px; border-radius: 16px; background: var(--gray-50); }
.license-block p { margin: 0 0 10px; font-size: 13px; line-height: 20px; color: var(--muted); }
.license-block p:last-child { margin-bottom: 0; }
.license-block a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
/* The Equal Housing mark is white in the black footer. In the body it takes the text color. */
.prose .foot-eho svg, .license-block .foot-eho svg { color: inherit; }

/* ---------- Figure ---------- */
.page-figure { margin: 24px 0; }
.page-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; background: #D9D4CA; }
.page-figure figcaption { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--muted); }

/* ---------- Related links ---------- */
.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid #E6E6E6; }
.related-h { margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--muted); }
.related ul, .prose .related ul:not([class]) { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.prose .related ul:not([class]) li { margin: 0; }
.related a { font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.related a:hover { text-decoration: none; }

/* ---------- Sources ---------- */
.sources { margin-top: 40px; font-size: 14px; line-height: 22px; color: var(--muted); }
.sources h2 { margin: 0 0 8px; font-size: 20px; font-weight: 500; line-height: 28px; letter-spacing: 0; color: var(--ink); }
.sources ol { margin: 0; padding-left: 20px; }
.sources li { margin: 6px 0; }
.sources a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- CTA band ---------- */
.cta-band { margin-top: 64px; padding: 40px 0; background: var(--stats); }
.cta-band-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.cta-h { margin: 0; font-size: 28px; font-weight: 500; line-height: 36px; letter-spacing: -.5px; color: var(--ink); }
.cta-text { max-width: 640px; margin: 0; font-size: 16px; line-height: 24px; color: #333; }
.cta-band .btn-row { justify-content: center; margin: 8px 0; }
.cta-note { max-width: 640px; margin: 0; font-size: 13px; line-height: 20px; color: var(--muted); }
@media (max-width: 479.98px) {
  .cta-band .btn-row { width: 100%; }
  .cta-band .btn { width: 100%; }
}

/* ---------- md >= 768px ---------- */
@media (min-width: 768px) {
  .page-hero-inner { padding: 48px; border-radius: 20px; }
  .page-hero h1 { font-size: 48px; line-height: 56px; }
  .page-hero--media .page-hero-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; }
  .lede { font-size: 20px; line-height: 30px; }
  .page-wrap { margin-top: 48px; }
  .prose h2, .sec-title { margin-top: 56px; font-size: 32px; line-height: 40px; }
  .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .link-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-tile { grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; padding: 20px; }
  .dl-tile .btn { grid-column: auto; }
  .prose .dl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { padding: 56px 0; }
  .cta-h { font-size: 36px; line-height: 44px; letter-spacing: -1px; }
}

/* ---------- lg >= 1080px ---------- */
@media (min-width: 1080px) {
  /* Hero copy lines up with the 880px reading column below it. */
  .page-hero-inner { padding: 64px max(64px, calc((min(1280px, 100% - 2 * var(--gut)) - 880px) / 2)); }
  .page-hero--media .page-hero-inner { padding: 64px; }
  .page-hero--plain .page-hero-inner { padding: 48px 0 16px; }
  .page-hero h1 { font-size: 56px; line-height: 64px; }
  .page-wrap--toc { width: min(1136px, 100% - 2 * var(--gut)); grid-template-columns: 256px minmax(0, 1fr); gap: 64px; align-items: start; }
  .page-wrap--toc .toc { position: sticky; top: 128px; max-height: calc(100vh - 152px); overflow-y: auto; }
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .key-facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prose .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-band { margin-top: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary svg, .link-arrow svg { transition: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .skip, .gh, .crumbs, .toc, .cta-band, .related, .foot-top, .foot-mid, .table-hint { display: none !important; }
  body { font-size: 11pt; line-height: 1.4; }
  .page-hero-inner { padding: 0; background: none; }
  .page-hero h1 { font-size: 22pt; line-height: 1.2; }
  .page-wrap { width: 100%; margin: 12px 0 0; }
  .table-wrap { overflow: visible; border: 0; }
  .table--wide { min-width: 0; }
  .check-list > li, .table tr, .faq-item { break-inside: avoid; }
  .foot { padding: 12px 0 0; background: none; color: #000; }
  .foot-legal { margin-top: 0; }
  .foot-legal p, .foot-legal a, .foot-eho svg { color: #000; }
}
