/* Tax Weasel site pages (hub, tools index, subscribe, privacy, 404). Loaded after tools.css and built
   only from its tokens, so both themes come for free. Phone width first. */

/* Fallback faces sized to the web fonts' widths (measured against Arial: Source Sans 3 at 93%, condensed Archivo 800 at 79%),
   so text wraps the same before and after the fonts arrive and nothing shifts when they swap in. Local fonts only.
   Site pages only: the tool pages keep their original font stack. */
@font-face { font-family: "Source Sans 3 Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Roboto"); size-adjust: 93%; }
@font-face { font-family: "Archivo Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Roboto Bold"), local("Roboto-Bold"); font-weight: 600 900; size-adjust: 79%; }
:root { --display: "Archivo", "Archivo Fallback", "Helvetica Neue", Arial, sans-serif; --body: "Source Sans 3", "Source Sans 3 Fallback", "Segoe UI", system-ui, sans-serif; }

.wrap.narrow { max-width: 600px; }
main { display: block; }
main a { color: var(--accent); }
main a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Hub header: the weasel sits on the ledger rule. */
.hub-head { flex-wrap: nowrap; align-items: flex-end; padding-bottom: 0; margin-bottom: 24px; }
.hub-head > div { padding-bottom: 14px; }
.weasel { display: block; flex: none; height: auto; }
.weasel-hub { width: clamp(112px, 31vw, 150px); margin-right: -8px; }
.weasel-lost { width: 120px; margin: 0 0 12px; }
.lede { font-size: 1.05rem; color: var(--muted); margin: 6px 0 0; max-width: 46ch; }
main > .lede { margin-bottom: 18px; }

/* Button stack (link-in-bio). */
.stack { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.stack a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 14px 12px 16px; background: var(--surface); color: var(--fg); text-decoration: none; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; }
.stack a:hover { border-color: var(--accent); }
.stack a:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.stack .txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.stack .t { font-family: var(--display); font-stretch: 87.5%; font-weight: 800; font-size: 1.12rem; line-height: 1.2; }
.stack .d { font-size: 0.88rem; color: var(--muted); line-height: 1.35; }
.stack .go { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--accent); flex: none; }
.stack a.alt { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stack a.alt .d, .stack a.alt .go { color: var(--accent-ink); }
.stack a.alt:hover { filter: brightness(1.06); }
.stack #sponsor a { display: block; min-height: 0; padding: 6px 2px; border: 0; background: none; font-size: 0.85rem; color: var(--muted); text-align: center; text-decoration: underline; text-underline-offset: 3px; }

/* Signup form (hub card and /subscribe/). */
.signup-card { position: relative; }
.signup-card > h2:first-child { margin-top: 0; font-size: 1.3rem; }
.signup-line { margin: 0 0 14px; max-width: 52ch; }
.signup { position: relative; }
.signup label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-row input { flex: 1 1 220px; min-height: 46px; }
.signup-row .btn { flex: 0 0 auto; min-height: 46px; padding-inline: 18px; }
.signup .hp { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.signup input[aria-invalid="true"] { border-color: var(--owe); }
.signup-status { margin: 10px 0 0; font-size: 0.92rem; }
.signup-status:empty { display: none; }
.signup-status.ok { padding: 10px 12px; border-radius: 4px; background: var(--refund-bg); border-left: 4px solid var(--refund); }
.signup-status.err { padding: 10px 12px; border-radius: 4px; background: var(--owe-bg); border-left: 4px solid var(--owe); }
.signup-status:focus { outline: none; }
.signup.done > label, .signup.done .signup-row { display: none; }
.signup.sending .btn { opacity: 0.7; cursor: progress; }

/* Tools index. */
.toollist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.toollist li { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 6px; padding: 16px 18px; }
.toollist h2 { margin: 0 0 4px; font-size: 1.2rem; }
.toollist h2 a { color: var(--fg); text-decoration: none; }
.toollist h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.toollist h2 a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toollist p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Long-form text (privacy, 404). */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 28px; }
.prose p, .prose li { font-size: 1rem; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--accent); }
.prose .stamp { display: block; margin-top: 28px; }
