/* smsBanana design system — single source of truth for landing, admin,
   policy, opt-in, and login pages.
   Spec: docs/superpowers/specs/2026-07-27-design-system-design.md
   Token values are WCAG-validated against both dark surfaces — do not
   change one without re-checking contrast. */

/* ---------- tokens ---------- */
:root {
  --bg: #171310;            /* page background (dark chocolate) */
  --card: #211B16;          /* cards, inputs, table heads, chart surface */
  --rule: #35291F;          /* borders, dividers */
  --ink: #F5EFE6;           /* primary text */
  --ink-dark: #171310;      /* text on banana surfaces */
  --muted: #A89E90;         /* secondary text */
  --banana: #FFE135;        /* THE brand color */
  --banana-tint: rgba(255, 225, 53, .08);
  --ok: #7ED491;
  --bad: #FF8A66;
}

/* ---------- reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1 { font-family: "Baloo 2", "Inter", sans-serif; font-weight: 700; }

a { color: var(--banana); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--banana); outline-offset: 2px; }

code {
  font: 0.8rem/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--muted);
  word-break: break-all;
}

/* ---------- buttons ---------- */
button {
  font: 600 0.9rem "Inter", sans-serif;
  background: var(--banana);
  color: var(--ink-dark);
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
}
button:hover { filter: brightness(1.06); text-decoration: none; }

/* ---------- forms ---------- */
input, select {
  font: inherit;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
}
input::placeholder { color: var(--muted); }
input:focus, select:focus { outline: none; border-color: var(--banana); }
form.inline { display: flex; gap: 0.6rem; margin-bottom: 1.25rem; }

.field { margin-bottom: 0.9rem; display: flex; flex-direction: column; gap: 0.25rem; max-width: 20rem; }
.field label { color: var(--muted); font-size: 0.8rem; }
.field.check { flex-direction: row; align-items: center; gap: 0.5rem; }
.field.check label { color: var(--ink); font-size: 0.87rem; }
input[type="checkbox"] { accent-color: var(--banana); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  font-size: 0.87rem;
}
th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--banana-tint); }
td.empty { color: var(--muted); padding: 1.5rem 0.75rem; }

/* ---------- status (dot always paired with its text label) ---------- */
.status { white-space: nowrap; font-size: 0.85rem; }
.status::before { content: "●"; margin-right: 0.4em; font-size: 0.7em; vertical-align: 0.1em; }
.status.active::before { color: var(--ok); }
.status.pending_optin::before, .status.pending_referral::before { color: var(--banana); }
.status.stopped::before, .status.deleted::before { color: var(--bad); }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem 2rem;
}
.stat .num {
  font-family: "Baloo 2", "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.2;
}
.stat .lbl { color: var(--muted); font-size: 0.82rem; }

/* ---------- misc shared ---------- */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
dl.meta { font-size: 0.87rem; }
dl.meta div { display: grid; grid-template-columns: 11rem 1fr; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
dl.meta dt { color: var(--muted); }
dl.meta dd { font-variant-numeric: tabular-nums; }

.flash {
  display: inline-block;
  color: var(--ok);
  background: var(--banana-tint);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.87rem;
  margin-bottom: 1rem;
}
.error { color: var(--bad); font-size: 0.87rem; margin-top: 0.75rem; }

/* ---------- dashboard charts (single-series, banana on card) ---------- */
.chartgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.chartcard { border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.1rem 0.8rem; background: var(--card); }
.charthead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; }
.charttitle { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.charttotal { font-family: "Baloo 2", "Inter", sans-serif; font-weight: 600; font-size: 1.5rem; color: var(--ink); }
.chartplot { display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid var(--rule); }
.barslot { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; cursor: default; }
.barslot .bar { width: 100%; max-width: 24px; margin: 0 auto; background: var(--banana); border-radius: 4px 4px 0 0; min-height: 0; }
.barslot:hover .bar, .barslot:focus .bar { filter: brightness(1.12); }
.chartempty { height: 118px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.85rem; }
.chartaxis { display: flex; gap: 2px; margin-top: 0.3rem; }
.chartaxis span { flex: 1; font-size: 0.68rem; color: var(--muted); text-align: center; overflow: visible; white-space: nowrap; min-width: 0; }
#tooltip { position: fixed; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--rule); padding: 0.35rem 0.6rem; border-radius: 8px; font-size: 0.8rem; z-index: 10; display: none; }
#tooltip .v { font-weight: 600; }

/* ---------- landing page ---------- */
.eyebrow {
  font-family: "Baloo 2", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--banana);
  margin-bottom: 2rem;
}
.eyebrow .nana { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .eyebrow:hover .nana { animation: wobble 0.6s ease-in-out; }
  @keyframes wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-12deg); }
    75% { transform: rotate(12deg); }
  }
}

.hero-title { font-size: 3.2rem; line-height: 1.08; letter-spacing: -0.01em; margin-bottom: 1.5rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 30rem; margin-bottom: 3rem; }

.cta {
  display: inline-block;
  font-family: "Baloo 2", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--banana);
  color: var(--ink-dark);
  border-radius: 999px;
  padding: 0.85rem 2.2rem;
  white-space: nowrap;
}
.cta:hover { filter: brightness(1.06); text-decoration: none; }
.cta-hint { margin-top: 0.9rem; font-size: 0.9rem; color: var(--muted); }

.steps { list-style: none; border-top: 1px solid var(--rule); margin-bottom: 4.5rem; }
.steps li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.steps .n {
  font-family: "Baloo 2", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--banana);
  color: var(--ink-dark);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.steps p { font-size: 0.95rem; color: var(--muted); }

.pricing { font-size: 1.05rem; max-width: 30rem; margin-bottom: 1rem; }
.pricing em { font-family: "Baloo 2", "Inter", sans-serif; font-style: normal; font-weight: 700; color: var(--banana); }
.pricing-note { font-size: 0.95rem; color: var(--muted); max-width: 30rem; }
.pricing-note strong { font-weight: 600; color: var(--ink); }

/* ---------- policy pages ---------- */
.policy main { max-width: 40rem; margin: 0 auto; padding: 4rem 1.5rem 3rem; }
.policy .home { font-family: "Baloo 2", "Inter", sans-serif; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.policy .home:hover { color: var(--banana); text-decoration: none; }
.policy h1 { font-size: 2.1rem; margin: 1rem 0 0.4rem; }
.policy .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2.5rem; }
.policy h2 { font-family: "Baloo 2", "Inter", sans-serif; font-weight: 600; font-size: 1.2rem; margin: 2.2rem 0 0.6rem; }
.policy p, .policy li { font-size: 0.98rem; margin-bottom: 0.8rem; }
.policy ul { padding-left: 1.3rem; margin-bottom: 0.8rem; }
.policy li { margin-bottom: 0.35rem; }
.policy blockquote {
  border-left: 3px solid var(--banana);
  padding: 0.6rem 1rem;
  margin: 1rem 0;
  background: var(--card);
  font-size: 0.93rem;
  border-radius: 0 10px 10px 0;
}
.policy img.proof { max-width: 100%; border: 1px solid var(--rule); border-radius: 12px; margin: 1rem 0; }
.policy footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
}
.policy footer a { color: var(--muted); margin-right: 1rem; }
