/*
 * billing.monitoragent.app — Paddle's default payment link (O1, 2026-10-20).
 *
 * Plain CSS on purpose: this site is not part of the Next build. The values
 * are the Sapiens light-theme tokens stamped by hand from app/globals.css
 * (bg-base stone-50, bg-surface white, bg-element stone-100, border-default
 * stone-200, fg-primary ink-900, fg-secondary ink-700, fg-muted ink-500,
 * accent slate-500 / accent-hover slate-700, accent-tint slate-50, on-accent
 * cream-50; radius 10/14/18/9999; spacing 4/8/12/16/24/32/48). Keep them in
 * step with the inventory if the palette moves.
 */
:root {
  --bg-base: #f5f4f2;
  --bg-surface: #ffffff;
  --bg-element: #efefed;
  --border-default: #d9d9d7;
  --fg-primary: #191817;
  --fg-secondary: #484846;
  --fg-muted: #656563;
  --accent: #5187ab;
  --accent-hover: #2b6083;
  --on-accent: #fbf7f1;
  --font-sans:
    "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-serif: Literata, Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  color: var(--fg-primary);
  font:
    16px/1.55 var(--font-sans),
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 14px;
}

.site-header nav a,
.site-footer nav a {
  color: var(--fg-secondary);
  text-decoration: none;
}

.site-header nav a:hover,
.site-footer nav a:hover {
  color: var(--fg-primary);
  text-decoration: underline;
}

/* ── Card ───────────────────────────────────────────────── */
main {
  flex: 1;
  display: grid;
  place-items: start center;
  padding: 16px 16px 48px;
}

@media (min-width: 768px) {
  main {
    padding-top: 48px;
  }
}

.card {
  width: 100%;
  max-width: 560px;
  padding: 32px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(25, 24, 23, 0.04);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.lead {
  margin: 0 0 24px;
  color: var(--fg-secondary);
}

.features {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.features li {
  position: relative;
  padding-left: 24px;
}

.features li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--accent);
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.plan {
  padding: 16px;
  background: var(--bg-element);
  border-radius: 14px;
}

.plan h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.price {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-muted);
}

.alt {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--fg-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
}

.button:focus-visible {
  outline: 2px solid var(--fg-primary);
  outline-offset: 2px;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  border-top: 1px solid var(--border-default);
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
}

.site-footer p {
  margin: 0 0 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 0 0 12px;
}

.site-footer .fine {
  margin: 0;
  font-size: 12px;
}

/* ── States: one card at a time; billing.js sets data-state on <html>. ── */
[data-msg] {
  display: none;
}
html:not([data-state]) [data-msg="idle"],
html[data-state="idle"] [data-msg="idle"],
html[data-state="open"] [data-msg="open"],
html[data-state="done"] [data-msg="done"],
html[data-state="closed"] [data-msg="idle"],
html[data-state="error"] [data-msg="error"] {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
