/* ReadySWPPP public site. Uses the shared tokens in tokens.css. Phone first, readable in sunlight. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-height: var(--tap); }
.wm { font-size: 1.3rem; letter-spacing: -0.01em; }
.wm b { font-weight: 800; color: var(--brand); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--brand-dark); }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20,24,31,.14); min-width: 240px; z-index: 5; display: flex; flex-direction: column; padding: 6px; }
.menu nav a { display: flex; align-items: center; min-height: var(--tap); padding: 0 12px; text-decoration: none; color: var(--ink); border-radius: 8px; }
.menu nav a:hover { background: var(--brand-soft); }

/* main */
main { padding-bottom: 56px; }
.crumbs { margin-top: 14px; font-size: .85rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 4px; overflow: hidden; }
.crumbs li { margin: 0; flex: none; white-space: nowrap; max-width: none; }
.crumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--muted); }
.crumbs a { color: var(--muted); }
h1 { font-size: 1.85rem; line-height: 1.15; margin: 14px 0 10px; letter-spacing: -0.015em; color: var(--ink); }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 40px 0 10px; color: var(--brand-dark); scroll-margin-top: 12px; }
h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.lead { font-size: 1.2rem; line-height: 1.45; margin: 0 0 18px; }
p, li { max-width: 62ch; }
li { margin: 6px 0; }
ul, ol { padding-left: 1.3em; }
.cta { margin: 0 0 8px; }
.fine { margin: 6px 0 20px; font-size: .9rem; color: var(--muted); }

/* the one primary button: safety yellow, dark text */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; width: 100%; padding: 12px 24px; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 1.1rem; text-decoration: none; border-radius: var(--radius); border: 2px solid var(--accent-dark); }
.btn:hover { background: #FFC933; color: var(--ink); }
@media (min-width: 560px) { .btn { width: auto; min-width: 280px; } }

/* takeaways */
.takeaways { background: var(--brand-soft); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 14px 18px 8px; margin: 22px 0; }
.takeaways h2 { margin: 0 0 6px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; }
.takeaways ul { margin: 0 0 8px; }

.note { background: var(--warn-soft); border-left: 5px solid var(--warn); border-radius: var(--radius); padding: 4px 16px; margin: 18px 0; }
.note p { margin: 10px 0; }

/* tables */
.tablewrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--bg-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); position: sticky; top: 0; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
table.counties { min-width: 0; }

/* cards (guide lists) */
.cards { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.cards li { margin: 0; max-width: none; }
.cards a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: var(--tap); }
.cards a:hover { border-color: var(--brand); background: var(--brand-soft); }
.cards strong { color: var(--brand-dark); }
.cards span { color: var(--muted); font-size: .92rem; }

/* faq, sources */
.faq h3 { margin-top: 20px; }
.sources { margin-top: 44px; border-top: 2px solid var(--line); padding-top: 4px; font-size: .92rem; color: var(--muted); }
.sources h2 { font-size: 1.1rem; color: var(--ink); margin-top: 18px; }
.sources li { overflow-wrap: anywhere; }
.updated { margin-top: 14px; }

/* footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: .95rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 4px; margin: 10px 0; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px 0 0; color: var(--brand-dark); }
.brandline { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.nonaff { color: var(--muted); margin: 8px 0 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; }
@media (min-width: 720px) { h1 { font-size: 2.3rem; } }
@media print { .site-header, .btn, .menu { display: none; } }

/* phones: tables with 3+ columns become stacked cards (no sideways scroll) */
@media (max-width: 640px) {
  table.stack { display: block; }
  table.stack thead { display: none; }
  table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.stack tbody tr:last-child { border-bottom: 0; }
  table.stack th[scope="row"], table.stack td { border: 0; padding: 3px 0; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-top: 6px; }
  table.stack th[scope="row"] { font-size: 1.02rem; color: var(--brand-dark); }
}

mark.todo { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* Stage 1: "checkout opens soon" (static/js/launch-note.js); hidden unless checkout is closed */
.launch-note { background: var(--brand-soft); color: var(--brand-dark); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 18px; font-size: .95rem; }
.launch-note[hidden] { display: none; }
