/* The standalone pages (guides, how-tos, the cover sheet maker…), built from pages/ by pages/build.mjs.
   They load styles.css first, so the header, footer, buttons, FAQ, cover sheet and colours are the app's own;
   this file adds only what an article needs. */

/* ---------- page top ---------- */
.pg-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.pg-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(21,33,29,.07) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: radial-gradient(ellipse 60% 80% at 20% 20%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 60% 80% at 20% 20%, #000 10%, transparent 70%); pointer-events: none; }
.pg-hero .in { position: relative; max-width: 1080px; margin: 0 auto; padding: 40px 24px 48px; }
.pg-hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.04; font-weight: 600; letter-spacing: -.04em; margin: 18px 0 0; max-width: 820px; }
.pg-hero h1 em { font-size: 1.06em; letter-spacing: -.015em; }
.pg-hero .lead { font-size: 18px; color: var(--body); max-width: 680px; margin-top: 18px; line-height: 1.55; }
.pg-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin-top: 28px; }
.pg-cta .btn { padding: 13px 20px; font-size: 15px; }
.pg-note { font-size: 13px; color: var(--muted); max-width: 420px; }
.pg-updated { margin-top: 22px; font-size: 13px; color: var(--muted); }
.crumbs + .kicker { margin-top: 22px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- article ---------- */
.pg-body .in { max-width: 1080px; margin: 0 auto; padding: 48px 24px 72px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }
.pg-body.wide .in { grid-template-columns: minmax(0, 1fr); }
.pg-body.wide .prose { max-width: none; }
.prose { max-width: 720px; min-width: 0; font-size: 16.5px; line-height: 1.65; color: var(--body); }
.prose > * + * { margin-top: 16px; }
.prose h2 { color: var(--ink); font-size: clamp(24px, 3vw, 30px); line-height: 1.15; font-weight: 600; letter-spacing: -.025em; margin-top: 52px; scroll-margin-top: 84px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--ink); font-size: 18.5px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; margin-top: 30px; }
.prose h2 + p, .prose h3 + p, .prose h2 + ul, .prose h3 + ul, .prose h2 + ol, .prose h3 + ol { margin-top: 10px; }
.prose b, .prose strong { color: var(--ink); font-weight: 600; }
.prose a:not(.btn) { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; font-weight: 500; }
.prose a:not(.btn):hover { text-decoration-color: var(--brand); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; }
.prose li::marker { color: var(--brand); }
.prose code, .prose .mono { font-family: var(--mono); font-size: .92em; color: var(--ink); background: var(--line2); border-radius: 5px; padding: 1px 5px; }

/* The app's pricing card and FAQ, used inside an article */
.prose .price-card { margin-bottom: 8px; }
.prose .pc-r { padding: 36px; list-style: none; }
.prose .pc-r li::marker { content: none; }
.prose .faq summary { color: var(--ink); }
.prose .faq p { font-size: 15.5px; }
.prose h2 + .faq { margin-top: 14px; }

/* Numbered steps */
.steps { list-style: none; counter-reset: s; display: grid; gap: 12px; padding: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding: 18px 20px 18px 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.steps > li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: 13px; }
.steps > li > b:first-child { display: block; color: var(--ink); font-size: 16.5px; margin-bottom: 2px; }
.steps > li p { font-size: 15.5px; }

/* Notes and warnings */
.note { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-ink); font-size: 15px; line-height: 1.55; }
.note.warn { border-color: var(--amber-line); background: var(--amber-soft); color: #5f3a0c; }
.note > svg { flex: none; margin-top: 3px; }
.note b { color: inherit; }
.note a:not(.btn) { color: inherit !important; text-decoration-color: currentColor !important; }

/* Tables */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.tbl th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line2); vertical-align: top; color: var(--body); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { color: var(--ink); font-weight: 500; }
.tbl .yes { color: var(--brand); font-weight: 500; }
.tbl .no { color: var(--muted); }

/* Key facts: a short definition list in a card */
.facts-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.facts-card > div { padding: 16px 18px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); margin: 0 -1px -1px 0; }
.facts-card dt { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts-card dd { color: var(--ink); font-weight: 500; font-size: 16px; margin-top: 4px; line-height: 1.35; }

/* Fax numbers (IRS and similar): big, copyable, monospaced */
.faxnums { display: grid; gap: 10px; }
.faxnum { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.faxnum span { font-size: 14.5px; color: var(--body); }
.faxnum b { font-family: var(--mono); font-size: 19px; font-weight: 500; letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
.faxnum small { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.source { font-size: 13.5px; color: var(--muted); }

/* Example fax number, as typed into FaxN */
.dial { display: inline-flex; align-items: stretch; border: 1px solid var(--field); border-radius: 10px; overflow: hidden; font-family: var(--mono); font-size: 16px; background: var(--surface); }
.dial span { padding: 8px 12px; color: var(--ink); }
.dial span:first-child { border-right: 1px solid var(--line2); color: var(--muted); background: var(--paper); }

/* "On this page" and the side card */
.pg-side { position: sticky; top: 88px; display: grid; gap: 18px; }
.toc { font-size: 14px; }
.toc .mini-label { margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--body); line-height: 1.35; }
.toc a:hover { color: var(--ink); border-left-color: var(--brand); }
.side-cta { padding: 20px; }
.side-cta h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin: 8px 0 6px; }
.side-cta p { font-size: 13.5px; color: var(--body); margin-bottom: 14px; }
.side-cta small { display: block; font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- cards (hubs and "related") ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cards a { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.cards a:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.cards b { color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -.01em; line-height: 1.3; }
.cards span { color: var(--body); font-size: 14px; line-height: 1.5; }
.cards .go { margin-top: auto; padding-top: 6px; color: var(--brand); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.prose .cards a { text-decoration: none; font-weight: 400; }
.hub-group + .hub-group { margin-top: 48px; }
.hub-group h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; }
.hub-group > p { color: var(--body); margin-bottom: 18px; max-width: 640px; }
.pg-related { padding: 64px 0; border-top: 1px solid var(--line); }
.pg-related .in { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.pg-related h2 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; margin-bottom: 20px; }
.pg .sec { padding: 72px 0; }
.pg .sec h2 { font-size: clamp(28px, 3.6vw, 40px); }

/* ---------- cover sheet maker ---------- */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.tool .block { padding: 26px; }
.tool form > .two:first-child .fl { margin-top: 0; }
.tool .actions { flex-wrap: wrap; margin-top: 22px; }
.tool-prev { position: sticky; top: 88px; background: #E9E6DE; border-radius: var(--r); padding: 20px; }
.tool-prev .mini-label { margin-bottom: 12px; }
.tool-prev .sheet { background: #fff; box-shadow: 0 10px 24px -10px rgba(0,0,0,.25); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 14px; font-size: 13.5px; color: var(--body); }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.tool .fine { margin-top: 14px; }
.tool-after { margin-top: 56px; }

/* ---------- 404 ---------- */
.notfound { max-width: 640px; margin: 0 auto; padding: 88px 24px 96px; text-align: center; }
.notfound h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; margin: 14px 0 12px; }
.notfound p { color: var(--body); }
.notfound .pg-cta { justify-content: center; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .pg-body .in { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .pg-side { position: static; }
  .toc { display: none; }
  .tool { grid-template-columns: minmax(0, 1fr); }
  .tool-prev { position: static; }
}
@media (max-width: 760px) {
  .pg-hero .in { padding: 28px 16px 36px; }
  .pg-hero .lead { font-size: 16.5px; }
  .pg-body .in { padding: 36px 16px 56px; }
  .pg-related .in { padding: 0 16px; }
  .prose { font-size: 16px; }
  .steps > li { padding: 16px 16px 16px 56px; }
  .steps > li::before { left: 16px; top: 16px; }
  .faxnum { grid-template-columns: minmax(0, 1fr); }
  .faxnum b { font-size: 18px; }
  .tool .block { padding: 18px; }
  .prose .pc-r { padding: 26px; }
  .pg .sec { padding: 56px 0; }
}
