/* WorryOrNot: one stylesheet, system fonts only, no external requests. */
:root {
  --ink: #13232f;
  --muted: #4d6170;
  --navy: #0f2a3d;
  --green: #1f8f6d;
  --green-bg: #e7f6f0;
  --amber: #a85d00;
  --amber-bg: #fff3e0;
  --bg: #ffffff;
  --alt: #f4f7f9;
  --line: #d9e2e8;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 42, 61, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--ink); background: var(--bg); }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--green); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #f2b705; outline-offset: 2px;
}
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--navy); text-decoration: none; letter-spacing: -.02em; }
.brand span { color: var(--green); }
.brand-small { font-size: 1rem; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--green); }
.topbar nav a[aria-current="page"] { font-weight: 700; color: var(--green); }
@media (max-width: 640px) { .topbar nav a:not(.btn) { display: none; } .admin .topbar nav a { display: inline; } }

/* Buttons */
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px;
  padding: .6em 1.2em; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { border-color: var(--green); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: #18765a; }
.topbar nav a.btn-primary { color: #fff; }
.btn-ghost { background: transparent; }
.btn-large { padding: .85em 1.5em; font-size: 1.05rem; }
.btn-small { padding: .35em .9em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-danger { color: #a3261b; }
.btn:disabled { opacity: .6; cursor: progress; }
.linkbtn { background: none; border: 0; color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; padding: 0; text-decoration: underline; }

/* Hero */
.hero { background: linear-gradient(180deg, #eef6f3 0%, #fff 100%); padding: 48px 0 56px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.35fr 1fr; } .hero { padding: 80px 0; } }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--green); margin-bottom: .8em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.fineprint { font-size: .85rem; color: var(--muted); }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; }
.mini-alert { border-radius: 10px; padding: 14px 16px; }
.mini-alert p { margin: .5em 0 0; font-size: .95rem; }
.mini-alert.ok { background: var(--green-bg); }
.mini-alert.act { background: var(--amber-bg); }
.hero-card-note { margin: 0; font-size: .75rem; color: var(--muted); text-align: right; text-transform: uppercase; letter-spacing: .06em; }

/* Badges */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 999px; padding: .25em .75em; }
.badge-ok { background: var(--green); color: #fff; }
.badge-act { background: #c26a00; color: #fff; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--alt); }
.section-lead { color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 0; }
.callout { background: var(--green-bg); border-radius: var(--radius); padding: 14px 18px; font-weight: 600; color: var(--navy); }

/* Sample alerts */
.alerts { display: grid; gap: 20px; }
@media (min-width: 860px) { .alerts { grid-template-columns: 1fr 1fr; } }
.alert { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border-top: 6px solid; position: relative; }
.alert-act { border-color: #c26a00; }
.alert-ok { border-color: var(--green); }
.alert h3 { margin-top: .7em; }
.sample-tag { position: absolute; top: 14px; right: 16px; margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: var(--muted);
  border: 1px dashed var(--muted); border-radius: 6px; padding: 2px 6px; }
.alert dl { margin: 0; }
.alert dt { font-weight: 700; color: var(--navy); margin-top: .8em; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.alert dd { margin: .2em 0 0; }
.alert dd ol { margin: .3em 0 0; padding-left: 1.2em; }
.alert-foot { margin: 1em 0 0; padding-top: .8em; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

/* Pricing */
.pricing { display: grid; gap: 28px; }
@media (min-width: 860px) { .pricing { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.price { font-size: 1.6rem; font-weight: 800; color: var(--green); margin-bottom: .4em; }
.checks { list-style: none; padding: 22px; margin: 0; background: var(--alt); border-radius: var(--radius); }
.checks li { padding: .35em 0 .35em 1.8em; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* About */
.about { max-width: 720px; }

/* Join form */
.join { display: grid; gap: 28px; }
@media (min-width: 860px) { .join { grid-template-columns: 1fr 1.1fr; } }
.privacy-note { background: var(--alt); border-radius: var(--radius); padding: 14px 18px; font-size: .95rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .9em; }
input, select, textarea { width: 100%; font: inherit; padding: .65em .8em; border: 1px solid #b9c7d1; border-radius: 10px; background: #fff; color: var(--ink); min-height: 46px; }
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 0 0 2px #f9d7d4; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--muted); margin-top: 10px; }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.4em; margin: 0 0 12px; font-weight: 600; }
.form-msg.ok, .form-ok { color: #0f6b4f; background: var(--green-bg); padding: 10px 14px; border-radius: 10px; }
.form-msg.error, .form-error { color: #8c1d14; background: #fdecea; padding: 10px 14px; border-radius: 10px; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; color: var(--navy); }
.faq details p { color: var(--muted); }

/* Footer */
.footer { background: var(--navy); color: #d6e2ea; padding: 32px 0; }
.footer a { color: #fff; }
.footer .brand { color: #fff; }
.footer .brand span { color: #6fd8b5; }
.footer .fineprint { color: #a9bccb; }
.footer p { margin: .3em 0; }

/* Simple pages (thanks, legal, confirm, admin login) */
.simple { max-width: 720px; margin: 0 auto; padding: 40px 20px 64px; }
.simple .brand { display: inline-block; margin-bottom: 28px; }
.legal h2 { font-size: 1.25rem; margin-top: 1.6em; }
.stack { display: grid; gap: 10px; }
.counter { margin: 6px 0 0; font-size: .85rem; }
.simple .card { margin: 20px 0; }

/* Admin */
.admin-main { padding-top: 24px; padding-bottom: 48px; }
.admin .topbar nav { gap: 14px; flex-wrap: wrap; }
@media (max-width: 640px) { .admin .topbar-inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; } .admin .topbar nav { width: 100%; gap: 8px 16px; } .admin .topbar { position: static; } }
.inline { display: inline; margin: 0; }
.stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stats li { background: var(--alt); border-radius: 10px; padding: 8px 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
th { background: var(--alt); }
td.actions { display: flex; gap: 6px; }
.pill { font-size: .78rem; border-radius: 999px; padding: 2px 8px; background: var(--alt); }
.pill-confirmed { background: var(--green-bg); color: #0f6b4f; }
.pill-pending { background: var(--amber-bg); color: #7a4400; }
.pill-unsubscribed { background: #eceff1; color: #555; }
.pill-new { background: var(--amber-bg); color: #7a4400; }
.pill-handled { background: #eceff1; color: #555; }
.nav-count { display: inline-block; min-width: 1.5em; text-align: center; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 1px 6px; background: var(--amber-bg); color: #7a4400; }
.messages { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; }
.message-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.message-card.is-handled { background: var(--alt); }
.message-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .88rem; color: var(--muted); margin: 0 0 6px; }
.message-from { margin: 0 0 8px; overflow-wrap: anywhere; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 10px; }
.code-form { margin: 18px 0 24px; }
.code-form h2 { font-size: 1.2rem; }
.grid { display: grid; gap: 12px; margin-bottom: 14px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, 1fr); } .span2 { grid-column: span 2; } }

/* Alerts: "Mild worry" verdict, public alerts page, admin review queue */
.alert-mild { border-color: #d9a400; }
.badge-mild { background: #fdf0c4; color: #6b4e00; }
.alert h2 { font-size: 1.3rem; margin-top: .7em; }
.alert-foot a { overflow-wrap: anywhere; }
.alerts-list { display: grid; gap: 20px; margin: 24px 0; }
.alerts-intro { background: var(--alt); border-radius: var(--radius); padding: 14px 18px; font-size: .95rem; }
.simple.wide { max-width: 860px; }
.pill-approved { background: var(--green-bg); color: #0f6b4f; }
.pill-rejected { background: #eceff1; color: #555; }
.subtabs a { color: var(--ink); text-decoration: none; }
.subtabs li.is-current { background: var(--green-bg); }
.subtabs li.is-current a { color: #0f6b4f; font-weight: 700; }
.review-list { display: grid; gap: 22px; margin: 18px 0; }
.review-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--alt); }
.review-preview { margin: 10px 0 14px; }
.review-edit { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 12px; }
.review-edit summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--navy); }
.review-edit form { padding-bottom: 14px; }
.review-edit label { font-weight: 700; font-size: .9rem; margin-top: 6px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }

/* Admin: email sending (v6) */
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.send-step { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 16px 0; background: #fff; }
.send-step h3 { margin-top: 0; }
.send-step form.stack { max-width: 460px; }
.actions-row form.stack { display: inline-block; }
div.form-error ul { margin: 6px 0 0; padding-left: 20px; }
