/* Shared components. Page-specific layout is in pages.css; the header is in navigation.css. */

/* ---- Buttons and links ---- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 22px; border: 2px solid var(--crimson); border-radius: var(--radius-button); background: var(--crimson); color: #fff; font-size: 1rem; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.button:hover { background: var(--crimson-dark); border-color: var(--crimson-dark); color: #fff; }
.button.light { background: #fff; border-color: #fff; color: var(--navy); }
.button.light:hover { background: var(--fog-light); border-color: var(--fog-light); color: var(--navy-deep); }
.button.outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.button.outline:hover { background: var(--navy); color: #fff; }
.button.ghost { background: transparent; border-color: var(--fog); color: #fff; }
.button.ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.button.block { width: 100%; }
.text-link { font-weight: 700; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.icon-tile { display: inline-grid; place-items: center; width: 48px; height: 48px; background: var(--fog-light); color: var(--navy); }
.icon-tile .icon { width: 24px; height: 24px; }
.icon-tile.xl { width: 148px; height: 148px; background: var(--paper); border: 1px solid var(--line); }
.icon-tile.xl .icon { width: 72px; height: 72px; stroke-width: 1.2; }

/* ---- Section heads and the two-column split ---- */
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin-bottom: 0; }
.section-head > :last-child, .section-head > div > :last-child { margin-bottom: 0; }
.section-head.with-action { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head.with-action > div { max-width: 720px; }
.section-head.with-action > .text-link { flex: none; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px 72px; align-items: center; }
.split.top { align-items: start; }
.split-intro p { color: var(--muted); max-width: 44ch; }
.split-intro > :last-child { margin-bottom: 0; }

/* ---- Lists ---- */
.check-list, .dash-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon { color: var(--navy); margin-top: .24em; }
.check-list.two-col { grid-template-columns: 1fr 1fr; gap: 14px 48px; }
.dash-list li { padding-left: 18px; position: relative; }
.dash-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; border-top: 2px solid var(--navy); }

/* Label and description rows, separated by lines. */
.commit-list, .focus-list { margin: 0; border-top: 1px solid var(--line); }
.commit-list > div, .focus-list > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.commit-list dt, .focus-list dt { font-weight: 650; font-size: 1.08rem; margin-bottom: 4px; display: flex; gap: 10px; align-items: flex-start; }
.commit-list dt .icon { color: var(--navy); margin-top: .22em; }
.commit-list dd, .focus-list dd { color: var(--muted); max-width: var(--measure); }
.commit-list dd { padding-left: calc(1.15em + 10px); }
.focus-list.wide > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 8px 48px; }
.focus-list.wide dt { margin-bottom: 0; }

/* ---- Notices ---- */
.notice { padding: 14px 18px; margin-bottom: 24px; border-left: 4px solid var(--navy); background: var(--fog-light); }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice.success { border-color: var(--good); background: #E4F4EC; }
.notice.error { border-color: var(--bad); background: #F8E7E9; }
.notice.plain { margin: 24px 0; }

/* ---- Breadcrumb and inner page header ---- */
.breadcrumb { background: var(--warm); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 0; margin: 0; font-size: .85rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.page-hero { background: var(--warm); border-bottom: 1px solid var(--line); padding: 36px 0 56px; }
.page-hero h1 { max-width: 20ch; }
.page-lead { font-size: 1.15rem; line-height: 1.6; color: var(--muted); max-width: 56ch; margin: 0; }
.page-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.page-hero-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }

/* A small white panel beside an inner page header. */
.glance { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--crimson); padding: 24px 26px; }
.glance h2 { font-size: 1.05rem; letter-spacing: 0; margin-bottom: 14px; }
.glance .check-list { margin-bottom: 0; font-size: .96rem; }
.glance-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.glance-list { margin: 0; }
.glance-list > div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .96rem; }
.glance-list > div:first-child { border-top: 0; padding-top: 0; }
.glance-list dt { color: var(--muted); }
.glance-list dd { font-weight: 600; }
.guide-toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .96rem; }

/* ---- Questions ---- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; font-weight: 650; font-size: 1.06rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--navy); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq summary:hover { color: var(--navy); }
.faq p { margin: -4px 0 20px; color: var(--muted); max-width: var(--measure); }

/* ---- Forms ---- */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label, .field legend { font-weight: 650; font-size: .94rem; padding: 0; }
.opt { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.field textarea { min-height: 0; resize: vertical; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .88rem; margin: 0; }
.hint { color: var(--muted); font-size: .88rem; margin: 0; }
.field.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.field.checks legend { width: 100%; margin-bottom: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.form .button { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- The three steps (a real sequence, so they are numbered) ---- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--paper); }
.step { counter-increment: step; padding: 28px 28px 30px; border-left: 1px solid var(--line); }
.step:first-child { border-left: 0; }
.step::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--crimson); margin-bottom: 18px; }
.step p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---- The longer walk-through ---- */
.journey { list-style: none; margin: 0; padding: 0; counter-reset: journey; border-top: 1px solid var(--line); }
.journey-step { counter-increment: journey; display: grid; grid-template-columns: 72px 1fr; padding: 28px 0; border-bottom: 1px solid var(--line); }
.journey-step::before { content: counter(journey); font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--crimson); }
.journey-body h3 { font-size: 1.3rem; }
.journey-body p { color: var(--muted); max-width: var(--measure); margin-bottom: 0; }
.journey-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 32px; margin: 18px 0 0; padding: 14px 18px; background: var(--warm); font-size: .92rem; }
.journey-meta dt { color: var(--muted); }
.journey-meta dd { font-weight: 600; }

/* ---- Rule tables (refunds, the price example) ---- */
.rules { width: 100%; background: var(--paper); border: 1px solid var(--line); }
.rules caption { text-align: left; font-weight: 650; padding-bottom: 12px; }
.rules th, .rules td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rules thead th { background: var(--page); font-size: .9rem; font-weight: 650; color: var(--muted); }
.rules tbody th { font-weight: 400; }
.rules tbody td { font-weight: 650; }
.rules tbody tr:last-child th, .rules tbody tr:last-child td { border-bottom: 0; }

/* ---- Subject cards and grade-level cards ---- */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.subject-card, .band-card, .guide-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.subject-card:hover, .band-card:hover, .guide-card:hover { border-color: var(--navy); color: var(--ink); }
.subject-card:hover h3, .band-card:hover h2, .band-card:hover h3, .guide-card:hover h3 { color: var(--navy); }
.subject-card h3 { font-size: 1.3rem; margin: 6px 0 0; }
.subject-card p, .band-card p, .guide-card p { margin: 0; color: var(--muted); font-size: .98rem; }
.band-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.band-card h2, .band-card h3 { font-size: 1.4rem; margin: 0; }
.band-range { font-size: .9rem; font-weight: 650; color: var(--crimson); }
.band-card .dash-list { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .95rem; }
.grid-foot { margin: 28px 0 0; color: var(--muted); max-width: var(--measure); }

/* ---- Guide cards ---- */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide-card h3 { font-size: 1.2rem; margin: 0; }
.guide-card p { flex: 1; }
.guide-tag { font-size: .88rem; font-weight: 700; color: var(--crimson); }
.guide-meta { font-size: .88rem; color: var(--muted); }
.guide-empty { max-width: var(--measure); font-size: 1.06rem; }

/* ---- Article layout: text column and sidebar ---- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: start; }
.prose > p { font-size: 1.06rem; line-height: 1.75; max-width: var(--measure); }
.prose h2 { font-size: 1.5rem; margin: 44px 0 16px; }
.prose > :first-child { margin-top: 0; }
.prose .check-list, .prose .dash-list { max-width: var(--measure); }
.side-card { position: sticky; top: 24px; background: var(--warm); border: 1px solid var(--line); border-top: 3px solid var(--crimson); padding: 26px; display: grid; gap: 12px; }
.side-card h2 { font-size: 1.3rem; margin: 0; }
.side-card h3 { font-size: .92rem; letter-spacing: 0; color: var(--muted); margin: 12px 0 0; }
.side-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.side-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .95rem; }

.topic-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border: 1px solid var(--line); margin-bottom: 14px; }
.topic-band { padding: 20px 22px; border-left: 1px solid var(--line); margin-left: -1px; }
.topic-band h3 { margin-bottom: 14px; }
.topic-band h3 span { display: block; font-size: .86rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.topic-band .dash-list { margin: 0; font-size: .95rem; }

/* Guide bodies (trusted HTML from app/content/articles). */
.guide-body h3 { margin: 28px 0 8px; }
.guide-body > ul, .guide-body > ol { padding-left: 1.3em; line-height: 1.7; max-width: var(--measure); }
.guide-body li { margin: 8px 0; }
.guide-body table { width: 100%; margin: 20px 0; font-size: .96rem; }
.guide-body th, .guide-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.guide-body thead th { background: var(--page); }
.guide-body .answer { font-size: 1.14rem; border-left: 4px solid var(--navy); padding-left: 18px; }
.guide-body .local-box { background: var(--page); border: 1px solid var(--line); padding: 20px 24px; margin: 28px 0; max-width: var(--measure); }
.guide-body .local-box h3 { margin-top: 0; }
.guide-body .local-box ul { margin: 0; padding-left: 1.2em; }
.guide-sources { font-size: .94rem; }
.guide-note { font-size: .9rem; color: var(--muted); margin-top: 32px; }

/* ---- Closing band ---- */
.final-cta { background: var(--navy); color: #fff; }
.final-cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.final-cta-copy { align-self: center; padding: 72px 64px 72px max(24px, calc((100vw - var(--wrap)) / 2)); }
.final-cta h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.08; }
.final-cta p { color: var(--fog); font-size: 1.1rem; margin: 0 0 28px; max-width: 46ch; }
.final-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.final-cta-photo { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.final-cta a:focus-visible { outline-color: #fff; }

/* ---- Footer ---- */
.footer { background: var(--navy-deep); color: var(--fog); padding: 56px 0 24px; }
.footer a { color: var(--fog); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer a:focus-visible { outline-color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.1fr; gap: 40px 48px; }
.footer-brand p { font-size: .96rem; max-width: 34ch; margin: 18px 0 0; }
.footer-contact { display: grid; gap: 6px; justify-items: start; }
.footer-contact a { color: #fff; font-weight: 650; display: inline-flex; gap: 8px; align-items: center; }
.footer-head { font-size: 1rem; font-weight: 650; letter-spacing: 0; color: #fff; margin: 4px 0 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .96rem; }
.copyright { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; border-top: 1px solid rgba(199, 217, 232, .25); margin-top: 40px; padding-top: 18px; font-size: .86rem; }
.legal-links { display: inline-flex; gap: 20px; }
.copyright-status { flex-basis: 100%; }

/* ---- Narrow screens ---- */
@media (max-width: 1000px) {
  .split, .page-hero-split { grid-template-columns: 1fr; gap: 32px; }
  .final-cta-inner { grid-template-columns: 1fr; }
  .final-cta-copy { padding: 56px 24px; }
  .final-cta-photo { min-height: 0; aspect-ratio: 16 / 9; }
  .article-grid { grid-template-columns: 1fr; gap: 40px; }
  .side-card { position: static; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .focus-list.wide > div { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .section-head.with-action { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-hero { padding: 28px 0 40px; }
  .page-hero-grid { grid-template-columns: 1fr; }
  .icon-tile.xl { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step { border-left: 0; border-top: 1px solid var(--line); padding: 22px; }
  .step:first-child { border-top: 0; }
  .journey-step { grid-template-columns: 44px 1fr; }
  .journey-meta { grid-template-columns: 1fr; gap: 10px; }
  .check-list.two-col, .field-row, .guide-grid { grid-template-columns: 1fr; }
  .rules th, .rules td { padding: 12px 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
