/* acct.one site layout. Brand, type, colour, components, the dot grid, the settle and the dark scheme
   all come from ledger.css (assets.sp.digital); this file only lays the page out, with the same tokens.
   Mobile first. Widths: 1120px content, breakpoints 768 / 960px. Site rules sit outside ledger's
   layer, so keep selectors narrow. */

/* --- Base --- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: var(--text-3xl); line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: var(--text-2xl); line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: var(--text-lg); line-height: 1.3; letter-spacing: -0.02em; }
p { margin: 0; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
@media (min-width: 960px) { h1 { font-size: var(--text-4xl); } }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s6); } }

.skip-link { position: absolute; left: var(--s4); top: -100px; z-index: 10; background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); border-radius: var(--r-md); }
.skip-link:focus { top: var(--s2); }

/* --- Header --- */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: var(--s8); }
.site-lockup { font-size: var(--text-xl); color: var(--ink); }
.site-lockup picture { display: contents; }

/* --- Hero: copy, then the form; side by side from 960px --- */
.hero { position: relative; padding: var(--s6) 0 var(--s7); overflow: hidden; }
/* Dot grid behind the form only: the bottom of the hero on phones, the right half from 960px. */
.hero-texture { position: absolute; left: 0; right: 0; bottom: 0; height: 55%; pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: var(--s6); align-items: start; }
.hero-copy { display: grid; gap: var(--s4); align-content: start; background: var(--paper); }
.hero-mark { width: var(--s8); height: var(--s8); }
.hero .lead { font-size: var(--text-lg); line-height: 1.5; color: var(--slate); max-width: 560px; }
@media (min-width: 960px) {
  .hero { padding: var(--s8) 0; }
  .hero-texture { left: auto; top: 0; height: auto; width: 50%; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: var(--s8); }
  .hero-copy { padding: var(--s5) var(--s5) var(--s5) 0; }
}

/* --- Sign-up card (sits on paper over the dot grid, never under copy) --- */
.signup { display: grid; gap: var(--s5); padding: var(--s5); box-shadow: var(--shadow-md); scroll-margin-top: calc(var(--s8) + var(--s4)); }
.signup-title { font-size: var(--text-lg); line-height: 1.35; }
#signup-form { display: grid; gap: var(--s4); }
#signup-form .field { max-width: none; }
#signup-form .btn { justify-content: center; width: 100%; }
.optional { font-weight: 400; color: var(--cloud); }
.consent { font-size: var(--text-xs); line-height: 1.5; color: var(--cloud); }
.consent a, .prose a, .section-foot a { color: var(--accent); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { font-size: var(--text-sm); }
@media (min-width: 768px) { .signup { padding: var(--s6); } }

/* --- Sections --- */
.section { padding: var(--s7) 0; border-top: 1px solid var(--line); }
.section.tint { background: var(--mist); }
@media (min-width: 768px) { .section { padding: var(--s8) 0; } }
.section-head { display: grid; gap: var(--s3); max-width: 720px; margin-bottom: var(--s6); }
.section .lead { font-size: var(--text-lg); line-height: 1.5; color: var(--slate); max-width: 640px; }
.section-foot { margin-top: var(--s5); max-width: 640px; color: var(--slate); }
.compare-col h3 { margin-bottom: var(--s4); }
.grid-3 { display: grid; gap: var(--s4); }
.grid-3 .card { display: grid; gap: var(--s2); align-content: start; }
.grid-3 p { color: var(--slate); }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* --- Standard Practice (a partial, so it can become its own page) --- */
.engine-grid { display: grid; gap: var(--s4); margin: 0; }
.engine-grid .card { display: grid; gap: var(--s2); align-content: start; }
.engine-grid dt { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.engine-grid dd { margin: 0; color: var(--slate); }
.engine-grid .direction { background: var(--mist); border-style: dashed; }
@media (min-width: 768px) { .engine-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .engine-grid { grid-template-columns: repeat(3, 1fr); } }

/* --- Proven --- */
.proven-list { max-width: 720px; margin-bottom: var(--s6); }
.cta-line { font-weight: 600; color: var(--ink); margin-right: var(--s2); }

/* --- Small pages: privacy, confirm, unsubscribe --- */
.section.narrow { border-top: none; }
.prose { display: grid; gap: var(--s4); max-width: 680px; color: var(--slate); }
.prose h1 { margin-top: var(--s1); }
.prose h2 { margin-top: var(--s4); font-size: var(--text-xl); }
.prose ul { margin: 0; padding-left: var(--s5); display: grid; gap: var(--s2); }
.prose .lead { color: var(--slate); }
.prose form { display: grid; gap: var(--s3); justify-items: start; }
.small { font-size: var(--text-sm); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line); background: var(--mist); padding: var(--s6) 0; }
.footer-inner { display: grid; gap: var(--s3); }
.footer-parent { font-size: var(--text-lg); }
.legal { font-size: var(--text-xs); line-height: 1.6; color: var(--cloud); max-width: 760px; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s5); font-size: var(--text-sm); }
.footer-links a { color: var(--slate); }
.footer-links a:hover { color: var(--ink); }
