/* PLMS public pages (home, features, about, privacy).
   Plain CSS, no inline styles (the site's Content-Security-Policy blocks them).
   Light and dark follow the same choice as the app: appearance.js puts "wa-dark" on <html>. */
:root {
  --navy: #14213D;
  --ink: #14213D;
  --text: #2B3445;
  --muted: #566072;
  --bg: #FFFFFF;
  --bg-soft: #F4F6FA;
  --line: #DDE3EC;
  --brand: #1F4E8C;
  --brand-hover: #173D6E;
  --brand-ink: #FFFFFF;
  --accent: #2A9D8F;
  --card: #FFFFFF;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .08);
  --radius: 14px;
  color-scheme: light;
}
html.wa-dark {
  --ink: #F1F5F9;
  --text: #D5DCE6;
  --muted: #9AA6B8;
  --bg: #0F172A;
  --bg-soft: #16213A;
  --line: #2A3954;
  --brand: #8FB3E0;
  --brand-hover: #B3CDEE;
  --brand-ink: #0F172A;
  --card: #16213A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.brand-name small { display: block; font-size: .72rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.site-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }
.site-nav .btn { padding: 8px 16px; min-height: 40px; }
.site-nav .btn-primary { color: var(--brand-ink); }
.site-nav .btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: rgba(42, 157, 143, .14); color: #1C6F65; font-weight: 700; font-size: .9rem;
}
html.wa-dark .badge { color: #7DD3C7; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.lead { font-size: 1.2rem; color: var(--text); max-width: 34em; }
.hero .badge { margin-top: 16px; }
.shot { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; background: var(--card); }
.shot-dark { display: none; }
html.wa-dark .shot-light { display: none; }
html.wa-dark .shot-dark { display: block; }

/* Sections */
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section-intro { max-width: 40em; margin-bottom: 32px; color: var(--muted); font-size: 1.1rem; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tile p { margin: 0; color: var(--muted); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); color: var(--brand); margin-bottom: 14px; }
.tile .icon { background: var(--bg-soft); }
.section-soft .tile .icon { background: rgba(31, 78, 140, .1); }
html.wa-dark .section-soft .tile .icon { background: rgba(143, 179, 224, .14); }
.icon svg { width: 24px; height: 24px; }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.why h3 { margin-bottom: .35em; }
.why p { color: var(--muted); margin: 0; }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature ul { padding-left: 1.2em; margin: 0 0 1em; }
.feature-text p:last-child { margin-bottom: 0; }
.feature-plain { grid-template-columns: minmax(0, 1fr); }
.feature-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.feature-trio:first-child { border-top: 0; padding-top: 0; }
.feature-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.quote { border-left: 0; margin: 0 0 1em; padding: 12px 16px; background: var(--bg-soft); border-radius: 10px; font-style: italic; color: var(--ink); }

/* Call to action band */
.cta { background: var(--navy); color: #E2E8F0; padding: 56px 0; }
.cta h2 { color: #FFFFFF; }
.cta p { max-width: 38em; }
.cta .btn-primary { background: #FFFFFF; color: var(--navy); }
.cta .btn-primary:hover { background: #E2E8F0; color: var(--navy); }
.cta .fallback { margin-top: 14px; font-size: .95rem; color: #B9C4D4; }
.cta .fallback a { color: #FFFFFF; }
.fallback { font-size: .95rem; color: var(--muted); margin-top: 12px; }

/* Prose pages */
.page { padding: 56px 0 64px; }
.page h2 { font-size: 1.35rem; margin-top: 1.8em; }
.note { color: var(--muted); font-size: .95rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
.site-foot .copy { margin-left: auto; }

@media (max-width: 900px) {
  .hero .wrap, .feature, .feature.flip, .feature-pair, .feature-trio { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature.flip .feature-text { order: 0; }
  .tiles, .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .tiles, .why { grid-template-columns: minmax(0, 1fr); }
  .site-nav .hide-sm { display: none; }
  .brand-name small { display: none; }
  .site-foot .copy { margin-left: 0; }
  .section { padding: 44px 0; }
}
html.wa-dark .brand img { border-radius: 10px; box-shadow: 0 0 0 1px #3A4E70; }

/* Help: contents page and guides */
.help-hero { padding: 8px 0 8px; max-width: 46em; }
.help-group { margin-top: 36px; }
.help-group h2 { font-size: 1.35rem; margin-bottom: 14px; }
.guide-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
}
.guide-card strong { color: var(--ink); font-size: 1.05rem; }
.guide-card span { color: var(--muted); font-size: .95rem; }
.guide-card:hover { border-color: var(--brand); color: var(--text); }
.help-more p { color: var(--muted); }

.guide { max-width: 820px; padding-top: 40px; padding-bottom: 64px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.guide h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.guide h2 { font-size: 1.4rem; margin-top: 2em; }
.guide h3 { font-size: 1.1rem; margin-top: 1.6em; }
.guide ol.steps { padding-left: 0; list-style: none; counter-reset: step; margin: 0 0 1.4em; }
.guide ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 14px; }
.guide ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--ink); font-weight: 800; font-size: .9rem; border: 1px solid var(--line);
}
.guide ul { padding-left: 1.3em; }
.guide li { margin-bottom: .35em; }
.guide figure { margin: 22px 0 28px; }
.guide figure img { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.guide figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.ui { font-weight: 700; color: var(--ink); }
.tip, .say {
  border-radius: 12px; padding: 14px 18px; margin: 18px 0 22px; background: var(--bg-soft); border: 1px solid var(--line);
}
.tip p:last-child, .say p:last-child { margin-bottom: 0; }
.tip strong:first-child, .say strong:first-child { display: block; color: var(--ink); margin-bottom: 4px; }
.say { border-color: rgba(42, 157, 143, .45); background: rgba(42, 157, 143, .08); }
.say q { font-style: italic; color: var(--ink); quotes: "“" "”"; }
.guide table { border-collapse: collapse; width: 100%; margin: 12px 0 22px; font-size: .95rem; }
.guide th, .guide td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide th { color: var(--ink); }
.table-scroll { overflow-x: auto; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.pager a span { font-size: .85rem; font-weight: 500; color: var(--muted); }
.pager a:hover { border-color: var(--brand); }
.pager-next { text-align: right; }
@media (max-width: 640px) {
  .guide-cards, .pager { grid-template-columns: minmax(0, 1fr); }
  .guide ol.steps > li { padding-left: 40px; }
}
.guide figure.narrow img { max-width: 420px; }
.guide figure.form img { max-width: 600px; }
