/* Sonaris site — soft light theme: warm white + honey yellow.
   No frameworks, no build step. All dynamic pages (pricing.js cards,
   sign-in, verify, success) share these tokens. */

:root {
  --bg: #ffffff;
  --bg-soft: #fffbeb;        /* amber-50: gentle tint for bands */
  --panel: #ffffff;
  --panel-raised: #fffbeb;
  --line: #f0e2b6;           /* soft honey border */
  --line-strong: #e0cd93;
  --text: #1c1917;           /* warm near-black for headings */
  --body: #57534e;           /* warm gray for body copy */
  --muted: #78716c;          /* secondary text only, 14px+ */
  --accent: #fbbf24;         /* honey yellow fills */
  --accent-hover: #f59e0b;
  --accent-ink: #1c1917;     /* dark text on honey: high contrast */
  --accent-text: #b45309;    /* amber-700: yellow-hue text that reads on white */
  --good: #15803d;
  --good-bg: #dcfce7;
  --good-ink: #14532d;
  --bad: #b91c1c;
  --radius: 14px;
  --max: 1200px; /* match the landing page's max-w-6xl */
  --shadow-card: 0 1px 2px rgba(28, 25, 23, 0.05), 0 10px 28px -18px rgba(180, 130, 20, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}

h1, h2, h3 { color: var(--text); }

a { color: var(--accent-text); }
a:hover { color: #92400e; }

::selection { background: #fde68a; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- header ---- */
.site-head {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}
.site-head nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-head nav a {
  color: var(--body);
  text-decoration: none;
  font-size: 15px;
}
.site-head nav a:hover { color: var(--text); }
/* Navbar store button (TransParrot-style: text links + one filled CTA).
   Reads as a button but stays an <a> so it works with no JS. Desktop
   shows the pinned top-row button; on phones that button hides and the
   duplicate inside <nav> shows instead, so Install extension lives
   only in the hamburger menu. */
.site-head nav a.nav-cta,
.site-head a.nav-cta {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.08), 0 6px 16px -10px rgba(217, 119, 6, 0.7);
  white-space: nowrap;
  text-decoration: none;
}
.site-head nav a.nav-cta:hover,
.site-head a.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}
/* In-nav duplicate: desktop uses the pinned top-row button. */
.site-head nav a.nav-cta { display: none; }
/* Hamburger toggle: desktop never shows it. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle:hover {
  border-color: var(--accent-hover);
  background: var(--bg-soft);
}
.nav-toggle svg { display: block; }
@media (max-width: 767px) {
  /* Top row stays one line: brand | Install extension | hamburger.
     The text links drop into a full-width stacked panel when open. */
  .site-head .wrap { flex-wrap: wrap; gap: 10px 12px; }
  .site-head .brand { font-size: 16px; margin-right: auto; }
  .site-head a.nav-cta {
    margin-left: auto;
    font-size: 14px;
    padding: 7px 12px;
  }
  .nav-toggle { display: inline-flex; }
  .site-head nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--line);
    /* Below the toggle: brand + hamburger stay on the first row
       while the open menu drops underneath. */
    order: 3;
  }
  .site-head nav.is-open { display: flex; }
  .site-head nav a {
    padding: 10px 2px;
    border-bottom: 1px solid var(--line);
  }
  /* Phones: the pinned top-row button hides; the in-nav duplicate
     shows as a centered pill below the text links. */
  .site-head .wrap > a.nav-cta { display: none; }
  .site-head nav a.nav-cta {
    display: block;
    text-align: center;
    margin: 12px 0 6px;
  }
}

/* ---- hero ---- */
.hero {
  padding: 56px 0 8px;
  max-width: 640px;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 750;
}
.hero p {
  color: var(--body);
  margin: 0 0 8px;
  font-size: 17px;
}
.billing-note {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--accent-text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
}

/* ---- plans ---- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  padding: 32px 0 8px;
}
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
}
.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.featured {
  background: var(--panel-raised);
  border-color: var(--accent-hover);
  border-width: 2px;
}
.plan-flag {
  position: absolute;
  top: -13px;
  left: 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 12px;
}
/* Signed-in account's current plan: same flag treatment, green tint. */
.plan.is-current {
  border-color: var(--good);
  border-width: 2px;
}
.plan-flag--current {
  background: var(--good-bg);
  color: var(--good-ink);
}
/* Disabled plan buttons (current plan, unavailable downgrades,
   unconnected checkout): same ghost look, no pointer. */
.plan .cta .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---- dynamic plans loading / error ---- */
/* Author display rules (flex below) beat the UA `[hidden] -> display:none`
   mapping, so enforce it: hidden must always hide. */
[hidden] {
  display: none !important;
}
.plans-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  padding: 32px 0 8px;
}
.plans-loading p { margin: 0; }
#plans-error { margin-top: 32px; }
.plan h2 {
  margin: 0;
  font-size: 20px;
}
.plan .price {
  margin: 10px 0 2px;
  font-size: 30px;
  font-weight: 750;
  color: var(--text);
}
.plan .price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.plan .tagline {
  color: var(--body);
  font-size: 14.5px;
  margin: 0 0 14px;
}
.plan ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 14.5px;
}
.plan li {
  padding: 6px 0 6px 26px;
  position: relative;
  border-top: 1px solid var(--line);
}
.plan li::before {
  content: "✓";
  position: absolute;
  left: 6px;
  color: var(--good);
  font-weight: 700;
}
.plan li.dim { color: var(--muted); }
.plan li.dim::before {
  content: "–";
  color: var(--muted);
}
.plan .cta { margin-top: auto; }

/* ---- buttons ---- */
.btn {
  display: block;
  text-align: center;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.08), 0 6px 16px -10px rgba(217, 119, 6, 0.7);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}
.btn-ghost {
  background: var(--bg);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent-hover); background: var(--bg-soft); }
/* Google sign-in: brand icon + label centered as one row. The SVG file
   carries width/height attributes, so pin the rendered size here. */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google img {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---- account bar (pricing) ---- */
.account-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--body);
}
.account-bar > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-bar a {
  margin-left: auto;
  font-weight: 650;
  white-space: nowrap;
}

/* ---- auth form (sign-in page) ---- */
.field {
  display: block;
  margin: 0 0 14px;
}
.field span {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--body);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 15px;
}
.field input:focus {
  outline: none;
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35);
}
.field input:disabled {
  opacity: 0.5;
}
#signin-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-error {
  color: var(--bad);
  font-size: 14px;
  margin: 0 0 14px;
}
.switch-line {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--body);
}
.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-text);
  font-size: inherit;
  font-weight: 650;
  cursor: pointer;
}
#signin-subtitle { margin-top: -6px; color: var(--body); }

/* ---- fine print / faq ---- */
.fineprint {
  color: var(--body);
  font-size: 14px;
  padding: 18px 0 8px;
}
.fineprint h2, .faq h2 {
  color: var(--text);
  font-size: 19px;
  margin: 26px 0 8px;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.faq p {
  color: var(--body);
  font-size: 14.5px;
  margin: 6px 0 4px;
}

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}
/* Same layout as the landing footer (index.html, Tailwind):
   tagline left, link group right, wrapping on narrow screens.
   --line is honeyline #f0e2b6, --muted is stone-500 #78716c,
   --text is cocoa #1c1917. Plain CSS here because these pages
   load styles.css, not the Tailwind CDN. */
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-foot .foot-links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-foot a {
  color: var(--muted);
  text-decoration: none;
}
.site-foot a:hover { color: var(--text); }

/* ---- status cards (verify / success pages) ---- */
.status-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 30px;
  margin: 56px auto;
  max-width: 560px;
}
.status-card h1 {
  font-size: 24px;
  margin: 0 0 10px;
}
.status-card p { color: var(--body); }
.status-card .ok { color: var(--good); font-weight: 700; }
.status-card .err { color: var(--bad); font-weight: 700; }
.status-card .actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.status-card .actions .btn { width: auto; }
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent-hover);
  animation: spin 0.9s linear infinite;
  margin: 6px 0 12px;
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
code.addr {
  display: block;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 10px;
  word-break: break-all;
  color: var(--text);
  font-size: 13px;
}

/* ---- account page ---- */
.account {
  padding-bottom: 24px;
}
.hero-narrow {
  padding: 40px 0 4px;
}
.hero-narrow h1 {
  font-size: 30px;
  margin: 0 0 8px;
}
.hero-narrow p {
  margin: 0;
  font-size: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
  margin-top: 18px;
}
.card h2 {
  margin: 0;
  font-size: 21px;
}
.card-kicker {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.card .actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.card .actions .btn { width: auto; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.account-identity h2 { overflow-wrap: anywhere; }
.account-email {
  margin: 2px 0 0;
  color: var(--body);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
.avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 22px;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(28, 25, 23, 0.12);
}
.pill {
  margin-left: auto;
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 12px;
  border: 1px solid var(--line-strong);
  color: var(--body);
  background: var(--bg-soft);
  white-space: nowrap;
}
.pill-ok {
  background: var(--good-bg);
  border-color: var(--good-bg);
  color: var(--good-ink);
}
.pill-warn {
  background: #fef3c7;
  border-color: #f0e2b6;
  color: #92400e;
}
.account-rows {
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.account-rows > div {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.account-rows dt {
  flex: none;
  width: 130px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--body);
}
.account-rows dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
  overflow-wrap: anywhere;
  min-width: 0;
}
.account-rows dd code {
  font-size: 12.5px;
  word-break: break-all;
}
.plan-price {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.quota-numbers {
  font-size: 17px;
  color: var(--body);
  margin: 0 0 12px;
}
.quota-numbers strong {
  font-size: 30px;
  font-weight: 750;
  color: var(--text);
}
.quota-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.quota-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.quota-bar > span.quota-fill--low { background: var(--bad); }
.quota-low { color: var(--bad); font-weight: 600; }
.account-signout {
  margin-top: 22px;
}
.account-signout .btn { width: auto; }
