:root {
  color-scheme: light;
  /* Clean & light: near-white base, soft-gray surfaces, near-black ink. */
  --bg: #fafbf9;
  --paper: #ffffff;
  --surface: #f2f5f2;
  --surface-2: #e8ede9;
  /* Legacy warm aliases kept so older rules resolve to the new neutral system. */
  --warm: var(--surface);
  --warm-2: var(--surface-2);
  --ink: #171717;
  --text: #393f39;
  --muted: #6d746d;
  --line: #e2e7e2;
  --line-strong: #cbd5cf;
  --accent: #c7375d;
  --accent-dark: #9d2347;
  --accent-light: #f07890;
  --accent-rgb: 199, 55, 93;
  --accent-grad: linear-gradient(135deg, #c7375d 0%, #e05645 100%);
  --blue: #2563a6;
  --green: #28764f;
  --purple: #735aa6;
  --red: #b84433;
  --shadow: 0 24px 70px rgba(23, 23, 23, 0.11);
  --shadow-sm: 0 2px 10px rgba(23, 23, 23, 0.06);
  --shot-shadow: drop-shadow(0 26px 44px rgba(23, 23, 23, 0.18));
  --radius: 10px;
  --radius-sm: 8px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", "IBM Plex Mono", Consolas, monospace;
  --max-w: 1200px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  /* Sync panel palette — a cool blue surface that mirrors the desktop app's
     settings sync card. Global so the account and checkout pages share it. */
  --sync-panel-bg: #eaf2ff;
  --sync-panel-border: rgba(47, 103, 207, 0.24);
  --sync-panel-line: rgba(47, 103, 207, 0.16);
  --sync-ink: #1c2a45;
  --sync-muted: #46587a;
  --sync-cta: #2563eb;
  --sync-cta-dark: #1d4ed8;
  --sync-on-bg: rgba(31, 143, 77, 0.12);
  --sync-on-fg: #176b38;
  --sync-off-bg: rgba(217, 119, 6, 0.14);
  --sync-off-fg: #9a4b00;
  --sync-avail-bg: rgba(47, 103, 207, 0.12);
  --sync-avail-fg: #235ebe;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: var(--bg);
}

body.account-body {
  background: var(--surface);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Topbar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 66px;
  gap: 1rem;
  padding: 0 var(--gutter);
  background: rgba(250, 251, 249, 0.5);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(150%) blur(18px);
  max-width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  color: var(--ink);
  font-weight: 760;
  margin-right: auto;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 0.32rem;
}

.top-links a,
.github-link {
  border-radius: 5px;
  padding: 0.44rem 0.68rem;
  color: var(--text);
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.top-links a:hover,
.github-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.github-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}

body.account-body .topbar {
  background: rgba(246, 246, 244, 0.82);
  border-bottom-color: var(--line);
}

body.account-body .site-footer {
  background: var(--surface);
  border-top-color: var(--line);
}

/* ─── Shared ─── */
.eyebrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Left-aligned section eyebrows get an accent tick; opt-in so the centered
   hero eyebrow stays clean. */
.eyebrow--tick::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 2px;
  margin-right: 0.6rem;
  vertical-align: middle;
  border-radius: 2px;
  background: var(--accent-grad);
}

h1 {
  margin-top: 0.68rem;
  color: var(--ink);
  font-size: 4rem;
  font-weight: 780;
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  color: var(--ink);
  font-size: 2.75rem;
  font-weight: 780;
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.18;
  letter-spacing: 0;
}

p.lead {
  margin-top: 1.5rem;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.45;
}

p.support {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
}

.section-desc {
  margin-top: 1rem;
  color: var(--text);
  line-height: 1.68;
  max-width: 640px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 1.4rem;
  font-weight: 660;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.primary-action {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.26);
}

.primary-action:hover {
  filter: saturate(1.08) brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.32);
}

.primary-action[aria-disabled="true"],
.secondary-action[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
}

.primary-action[aria-disabled="true"]:hover {
  filter: none;
  transform: none;
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.26);
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.secondary-action:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.secondary-action[aria-disabled="true"]:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

/* ─── Home hero gradient ─── */
/* Full-bleed lavender wash behind the landing hero, à la NotePlan: a soft
   radial glow over a vertical tint that fades into the page background.
   Scoped to body.home so inner pages keep the plain neutral backdrop. */
body.home {
  background-color: var(--bg);
  background-image:
    radial-gradient(130% 90% at 50% -18%,
      rgba(139, 110, 224, 0.32) 0%,
      rgba(139, 110, 224, 0.12) 38%,
      rgba(139, 110, 224, 0) 66%),
    linear-gradient(180deg,
      #e8dffb 0%,
      #f1ebfc 34%,
      rgba(250, 251, 249, 0) 72%);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 900px, 100% 900px;
}

/* ─── Hero ─── */
.hero {
  padding: 2.5rem var(--gutter) 3rem;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-copy {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin-top: 0.7rem;
  font-size: 2.6rem;
  line-height: 1.06;
}

.hero .lead {
  margin-top: 1.1rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-actions [data-download-button] {
  min-width: 10.5rem;
}

.hero-meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0;
}

.hero-shot {
  max-width: 720px;
  width: 100%;
  margin: 1.65rem auto 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-shot img {
  width: 100%;
  height: auto;
  display: block;
  filter: var(--shot-shadow);
}

/* ─── Value strip (pitch) ─── */
.pitch {
  padding: clamp(2.5rem, 4.5vw, 4rem) var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.pitch-header {
  max-width: var(--max-w);
  margin: 0 auto clamp(1.75rem, 3vw, 2.5rem);
}

.pitch-header h2 {
  margin-top: 0.8rem;
  max-width: 680px;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  line-height: 1.15;
}

.pitch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* NotePlan-style: roomy, icon-led rows rather than cramped bordered boxes. */
.pitch-tile {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.pitch-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
}

.pitch-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pitch-tile-body {
  min-width: 0;
}

.pitch-grid h3 {
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
}

.pitch-grid p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* Numbered step eyebrow for the three story sections. */
.feature-eyebrow {
  display: flex;
  align-items: center;
}

.feature-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-right: 0.55rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 720;
}

/* ─── Screenshots gallery ─── */
.screens {
  padding: clamp(4rem, 7vw, 7rem) var(--gutter);
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.screens-header {
  max-width: 680px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.screens-header h2 { margin-top: 0.72rem; }

.screenshot-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.screenshot-wide {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.screenshot-wide img {
  width: 100%;
  display: block;
  filter: var(--shot-shadow);
}

.screenshot-wide figcaption,
.screenshot-split figure figcaption {
  padding: 0.72rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
}

.screenshot-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.screenshot-split figure {
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.screenshot-split figure.light-shot {
  background: transparent;
}

.screenshot-split figure.dark-shot {
  background: transparent;
}

.screenshot-split img {
  width: 100%;
  display: block;
  filter: var(--shot-shadow);
}

/* ─── How it works (guide teaser) ─── */
.how-it-works {
  padding: clamp(4rem, 7vw, 7rem) var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.how-header {
  max-width: 680px;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.how-header h2 { margin-top: 0.72rem; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
  max-width: var(--max-w);
}

.how-card {
  padding: clamp(1.4rem, 2.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.how-card .step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 760;
  margin-bottom: 0.9rem;
}

.how-card h3 { margin-bottom: 0.5rem; }

.how-card p {
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.how-cta {
  margin-top: 2rem;
}

/* ─── Sync ─── */
.sync-band {
  padding: clamp(2.5rem, 4.5vw, 4rem) var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.sync-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

.sync-copy {
  max-width: 640px;
}

.sync-copy h2 {
  margin-top: 0.72rem;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  line-height: 1.15;
}

.sync-copy > p:not(.eyebrow) {
  margin-top: 0.9rem;
  color: var(--text);
  line-height: 1.65;
}

.sync-points {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.4rem;
  list-style: none;
}

.sync-points li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text);
  line-height: 1.5;
}

.sync-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sync-cta);
  font-weight: 760;
}

/* Plan card — mirrors the sync card's blue surface and shows pricing. */
.sync-plan-card {
  padding: clamp(1.4rem, 2.5vw, 1.85rem);
  border: 1px solid var(--sync-panel-border);
  border-radius: var(--radius);
  background: var(--sync-panel-bg);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}

.sync-plan-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.sync-plan-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--sync-panel-border);
  box-shadow: 0 1px 2px rgba(28, 42, 69, 0.08);
}

.sync-plan-title strong {
  display: block;
  color: var(--sync-ink);
  font-weight: 720;
}

.sync-plan-title span {
  color: var(--sync-muted);
  font-size: 0.85rem;
}

.sync-plan-price {
  margin-top: 1.15rem;
  color: var(--sync-ink);
}

.sync-plan-amount {
  font-size: 2rem;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.sync-plan-period {
  color: var(--sync-muted);
  font-weight: 600;
}

.sync-plan-note {
  margin-top: 0.2rem;
  color: var(--sync-muted);
  font-size: 0.9rem;
}

.sync-plan-cta {
  width: 100%;
  margin-top: 1.25rem;
}

.sync-plan-link {
  display: block;
  margin-top: 0.75rem;
  text-align: center;
  color: var(--sync-cta);
  font-weight: 600;
  font-size: 0.9rem;
}

.sync-plan-link:hover {
  color: var(--sync-cta-dark);
}

/* ─── Download ─── */
.download-band {
  padding: clamp(2.5rem, 4.5vw, 4rem) var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.download-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.download-inner h2 {
  margin-top: 0.72rem;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  line-height: 1.15;
}

.download-inner p:not(.eyebrow) {
  margin-top: 0.75rem;
  color: var(--text);
  line-height: 1.6;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.platform-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.platform-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.platform-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.platform-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.platform-download {
  min-height: 36px;
  padding-inline: 0.9rem;
  font-size: 0.85rem;
}

.install-command {
  display: block;
  margin: 0;
  padding: 0.68rem 2.7rem 0.68rem 0.72rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(34, 26, 20, 0.05);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: nowrap;
}

.command-copy {
  position: relative;
  margin-top: 0.72rem;
}

.copy-command {
  position: absolute;
  top: 50%;
  right: 0.42rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.copy-command:hover,
.copy-command:focus-visible {
  border-color: var(--accent);
  background: var(--paper);
  color: var(--accent-dark);
}

.copy-command svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-command .check-icon {
  display: none;
}

.copy-command.is-copied {
  border-color: rgba(46, 127, 88, 0.45);
  color: var(--green);
}

.copy-command.is-copied .copy-icon {
  display: none;
}

.copy-command.is-copied .check-icon {
  display: block;
}

/* ─── Footer ─── */
.site-footer {
  padding: 2.75rem var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--ink);
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

/* ─── Feature blocks ─── */
.features {
  border-top: 1px solid var(--line);
}

.features--alt {
  background: var(--surface);
}

.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2.75rem, 5vw, 5rem) var(--gutter);
  gap: clamp(3rem, 6vw, 6rem);
}

.feature-block--flip {
  direction: rtl;
}

.feature-block--flip > * {
  direction: ltr;
}

.feature-shot {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}

.feature-shot img {
  width: 100%;
  display: block;
  filter: var(--shot-shadow);
}

.feature-text {
  max-width: 440px;
}

.feature-text h2 {
  margin-top: 0.7rem;
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  line-height: 1.15;
}

.feature-text p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.feature-text kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--warm);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

/* task type mini-list inside feature block */
.task-mini {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.tt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tt-event   { background: var(--purple); }
.tt-assign  { background: var(--blue); }
.tt-remind  { background: var(--green); }
.tt-proc    { background: var(--line-strong); }

.tt-name {
  font-weight: 660;
  color: var(--ink);
  min-width: 90px;
}

.tt-def {
  color: var(--muted);
}

/* ─── Interior pages ─── */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
}

.page-content h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.page-content .page-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.page-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.page-content h3 {
  font-size: 1.15rem;
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
}

.page-content p {
  color: var(--text);
  line-height: 1.72;
  margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
  color: var(--text);
  line-height: 1.72;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.4rem;
}

.page-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.15em 0.4em;
}

.page-content strong {
  font-weight: 660;
  color: var(--ink);
}

.page-content .info-box {
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--warm);
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.5rem;
}

.page-content .info-box p {
  margin-bottom: 0;
  color: var(--text);
}

/* ─── Account ─── */
.account-shell {
  --account-surface: #ffffff;
  --account-surface-soft: #f3f3f1;
  --account-input: #f7f7f5;
  --account-line: #e4e3de;
  --account-strong-line: #d4d2cb;
  --account-ink: #16150f;
  --account-muted: #6f6d65;
  --account-green: #2d7d59;
  --account-blue: var(--accent-dark);
  --account-plum: #7653a6;
  --paper: var(--account-input);
  --warm: var(--account-surface-soft);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5.5rem) var(--gutter);
}

.account-intro {
  max-width: 740px;
}

.account-intro .lead {
  margin-top: 1rem;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.72fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: start;
}

.account-grid--single {
  grid-template-columns: minmax(0, 500px);
  justify-content: center;
}

/* ─── Account page (account.html) ─── */
.account-page {
  max-width: 660px;
  padding-top: clamp(2rem, 4.5vw, 3.5rem);
}

.account-auth {
  max-width: 430px;
  margin: 0 auto;
}

.account-form-header h1 {
  margin-top: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

/* Sync pitch above the auth card, styled like the desktop app's sync panel. */
.account-sync-promo {
  margin-bottom: 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--sync-panel-border);
  border-radius: 8px;
  background: var(--sync-panel-bg);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.account-sync-promo-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.account-sync-promo-head img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--sync-panel-border);
  box-shadow: 0 1px 2px rgba(28, 42, 69, 0.08);
  flex-shrink: 0;
}

.account-sync-promo-head > div {
  flex: 1;
  min-width: 0;
}

.account-sync-promo-head strong {
  display: block;
  color: var(--sync-ink);
  font-size: 0.98rem;
  font-weight: 720;
}

.account-sync-promo-head p {
  margin-top: 0.15rem;
  color: var(--sync-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.account-sync-points {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
  list-style: none;
}

.account-sync-points li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--sync-ink);
  font-size: 0.86rem;
  line-height: 1.45;
}

.account-sync-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sync-cta);
  font-weight: 760;
}

/* Status pill, matching the desktop sync card badge: blue = available,
   green = sync on, amber = signed in but not subscribed. */
.account-sync-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 24px;
  border-radius: 999px;
  padding: 0.1rem 0.62rem;
  background: var(--sync-avail-bg);
  color: var(--sync-avail-fg);
  font-size: 0.76rem;
  font-weight: 760;
  white-space: nowrap;
}

.account-sync-pill.is-on {
  background: var(--sync-on-bg);
  color: var(--sync-on-fg);
}

.account-sync-pill.is-off {
  background: var(--sync-off-bg);
  color: var(--sync-off-fg);
}

.account-manage {
  display: grid;
  gap: 1rem;
}

.account-manage[hidden],
.account-auth[hidden],
.account-manage [hidden] {
  display: none !important;
}

.account-card {
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: var(--account-surface);
  box-shadow: 0 1px 3px rgba(20, 18, 12, 0.07);
}

/* Slim signed-in profile bar. */
.account-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 820;
  letter-spacing: 0;
}

.account-profile-info h1 {
  margin-top: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.account-profile-info p {
  margin-top: 0.1rem;
  color: var(--account-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.account-profile .account-signout {
  width: auto;
  min-height: 34px;
  padding-inline: 0.85rem;
  font-size: 0.84rem;
}

/* The sync hero card: same blue panel as the desktop settings sync card. */
.account-sync-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-color: var(--sync-panel-border);
  background: var(--sync-panel-bg);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.account-sync-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.account-sync-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--sync-panel-border);
  box-shadow: 0 1px 2px rgba(28, 42, 69, 0.08);
  flex-shrink: 0;
}

.account-sync-title {
  flex: 1;
  min-width: 0;
}

.account-sync-title h2 {
  color: var(--sync-ink);
  font-size: 1.02rem;
  line-height: 1.25;
}

.account-sync-title p {
  margin-top: 0.18rem;
  color: var(--sync-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* One compact facts strip instead of stacked rows: Plan · Renews · provider. */
.account-sync-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.6rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--sync-panel-line);
  border-bottom: 1px solid var(--sync-panel-line);
}

.account-sync-facts:not(:has(> :not([hidden]))) {
  display: none;
}

.account-sync-meta {
  display: contents;
}

.account-sync-fact {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.account-sync-fact dt {
  color: var(--sync-muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-sync-fact dd {
  display: flex;
  align-items: baseline;
}

.account-sync-fact dd strong {
  color: var(--sync-ink);
  font-size: 0.9rem;
  font-weight: 740;
  overflow-wrap: anywhere;
}

.account-sync-fact dd small {
  color: var(--sync-muted);
  font-size: 0.84rem;
}

.account-sync-fact dd small::before {
  content: "·";
  margin-inline: 0.4rem;
}

.account-sync-facts .account-provider-pill {
  margin-left: auto;
  min-height: 24px;
  border-color: rgba(47, 103, 207, 0.3);
  background: rgba(255, 255, 255, 0.55);
  color: var(--sync-muted);
  font-size: 0.74rem;
}

.account-sync-card .account-card-note {
  margin: 0;
}

.account-card-note {
  margin: 0.9rem 0;
  color: var(--sync-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.account-shell .account-sync-card .primary-action {
  background: var(--sync-cta);
}

.account-shell .account-sync-card .primary-action:hover {
  background: var(--sync-cta-dark);
}

.account-shell .account-sync-card .secondary-action {
  border-color: rgba(47, 103, 207, 0.34);
  background: rgba(255, 255, 255, 0.55);
  color: var(--sync-avail-fg);
}

.account-shell .account-sync-card .secondary-action:hover {
  border-color: var(--sync-cta);
  background: rgba(255, 255, 255, 0.8);
  color: var(--sync-cta-dark);
}

/* Cancelling renewal is a quiet, compact action — not a hero button. */
.account-shell .account-sync-card .account-cancel-subscription {
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
  min-height: 34px;
  padding-inline: 0.85rem;
  font-size: 0.84rem;
}

.account-sync-card .account-confirm {
  margin: 0;
  border-color: rgba(47, 103, 207, 0.3);
  background: rgba(255, 255, 255, 0.55);
}

/* Account settings card: hairline rows like the desktop settings sections. */
.account-section-label {
  margin-bottom: 0.2rem;
  color: var(--account-muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
}

.account-setting-row + .account-setting-row {
  border-top: 1px solid rgba(90, 70, 53, 0.14);
}

.account-settings-card .account-setting-row:last-of-type {
  padding-bottom: 0.2rem;
}

.account-setting-copy strong {
  display: block;
  color: var(--account-ink);
  font-size: 0.92rem;
  font-weight: 720;
}

.account-setting-copy p {
  margin-top: 0.15rem;
  color: var(--account-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.account-setting-row--danger .account-setting-copy strong {
  color: var(--red);
}

.account-setting-row .secondary-action {
  flex-shrink: 0;
  width: auto;
  min-height: 34px;
  padding-inline: 0.85rem;
  font-size: 0.84rem;
}

.account-panel {
  border: 1px solid var(--account-line, var(--line));
  border-radius: 8px;
  background: var(--account-surface, #fffdf9);
  box-shadow: 0 1px 3px rgba(20, 18, 12, 0.07);
}

/* Account pages use the same orange accent as the rest of the site. */
.account-shell {
  --cta-blue: var(--accent);
  --cta-blue-dark: var(--accent-dark);
}

.account-shell .primary-action {
  background: var(--cta-blue);
}

.account-shell .primary-action:hover {
  background: var(--cta-blue-dark);
}

.account-shell .secondary-action {
  border-color: var(--account-strong-line);
  background: var(--account-input);
  color: var(--account-ink);
}

.account-shell .secondary-action:hover {
  border-color: var(--accent);
  background: var(--account-surface-soft);
  color: var(--accent-dark);
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
}

.account-form-header {
  margin-bottom: 0.35rem;
}

.account-form-header h2 {
  font-size: 1.6rem;
}

.account-form-header p {
  margin-top: 0.45rem;
  color: var(--account-muted, var(--muted));
  font-size: 0.95rem;
  line-height: 1.5;
}

.account-form-header a {
  color: var(--account-blue, var(--accent-dark));
  font-weight: 720;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--account-line, var(--line));
  border-radius: 7px;
  background: var(--account-surface-soft);
  margin-bottom: 0.6rem;
}

.account-tab {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--account-muted, var(--text));
  font: inherit;
  font-size: 0.92rem;
  font-weight: 720;
  cursor: pointer;
}

.account-tab.is-active {
  background: var(--account-input);
  color: var(--account-ink, var(--ink));
  box-shadow: 0 1px 3px rgba(20, 18, 12, 0.07);
}

.field-label {
  color: var(--account-ink, var(--ink));
  font-size: 0.88rem;
  font-weight: 720;
}

.account-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--account-strong-line, var(--line-strong));
  border-radius: 6px;
  background: var(--account-input);
  color: var(--account-ink, var(--ink));
  font: inherit;
  padding: 0 0.82rem;
}

.account-form input:focus {
  outline: 3px solid rgba(var(--accent-rgb), 0.2);
  outline-offset: 1px;
  border-color: var(--account-blue, var(--accent));
}

.account-form input[aria-invalid="true"] {
  border-color: var(--red);
  background: #fbeeec;
}

.account-form input[aria-invalid="true"]:focus {
  outline-color: rgba(184, 68, 51, 0.22);
  border-color: var(--red);
}

.account-form input[readonly] {
  background: var(--account-surface-soft);
  color: var(--account-muted, var(--muted));
  cursor: default;
}

.account-submit {
  width: 100%;
  border: 0;
  margin-top: 0.5rem;
  cursor: pointer;
}

.account-submit:disabled {
  opacity: 0.62;
  cursor: progress;
}

.account-status {
  min-height: 1.3rem;
  color: var(--account-green, var(--green));
  font-size: 0.92rem;
  font-weight: 680;
  line-height: 1.4;
}

.account-status:empty {
  min-height: 0;
}

.account-status.is-error {
  color: var(--red);
}

.account-hint {
  margin: 0.1rem 0 0.4rem;
  color: var(--account-muted, var(--muted));
  font-size: 0.88rem;
  line-height: 1.45;
}

.link-button {
  margin-top: 0.45rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--account-blue, var(--accent-dark));
  font: inherit;
  font-size: 0.9rem;
  font-weight: 720;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.account-form [data-credentials],
.account-form [data-code-field],
.account-form [data-created-screen],
.account-form [data-confirm-field] {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.account-form [hidden],
.account-session [hidden] {
  display: none !important;
}

.account-copy {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
  background:
    linear-gradient(135deg, rgba(45, 125, 89, 0.1), rgba(49, 95, 158, 0.1)),
    var(--account-surface);
}

.account-copy h2 {
  margin-top: 0.5rem;
  font-size: 1.6rem;
}

.account-copy p {
  margin-top: 0.85rem;
  color: var(--account-muted, var(--text));
  line-height: 1.62;
}

.account-provider-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(168, 149, 128, 0.62);
  border-radius: 999px;
  padding: 0.25rem 0.62rem;
  background: var(--account-surface-soft);
  color: var(--account-muted, var(--text));
  font-size: 0.8rem;
  font-weight: 720;
  white-space: nowrap;
}

.session-details {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.session-details div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--account-line, var(--line));
}

.session-details dt {
  color: var(--account-muted, var(--muted));
  font-size: 0.78rem;
  font-weight: 720;
  text-transform: uppercase;
}

.session-details dd {
  margin-top: 0.3rem;
  color: var(--account-ink, var(--ink));
  font-size: 0.95rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.account-actions {
  display: grid;
  gap: 0.65rem;
}

.account-billing-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1rem;
  margin-bottom: 0.65rem;
}

/* Inside the sync card the column gap provides the spacing. */
.account-sync-card .account-billing-actions {
  margin: 0;
}

.account-sync-card .billing-status {
  margin-bottom: 0;
}

.account-sync-card .billing-status:empty {
  display: none;
}

.account-billing-actions .account-checkout,
.account-billing-actions .account-cancel-subscription {
  width: auto;
  flex: 1 1 auto;
}

/* The priced toggle, centered. Clicking a plan opens the checkout in a popover. */
.account-subscribe {
  flex: 1 1 100%;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}

/* ─── Checkout popover (a centered sheet holding the embedded checkout) ─── */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 4vw, 2.5rem);
}

.checkout-modal[hidden] {
  display: none;
}

body.checkout-modal-open {
  overflow: hidden;
}

.checkout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.5);
  backdrop-filter: blur(2px);
}

.checkout-modal__sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  height: min(86vh, 820px);
  overflow: hidden;
  background: var(--account-surface, #fff);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(17, 17, 17, 0.4);
}

.checkout-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.6rem 0.55rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.checkout-modal__title {
  font-weight: 720;
  font-size: 0.95rem;
  color: var(--ink);
}

.checkout-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.checkout-modal__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.checkout-modal__frame {
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--account-surface, #fff);
}

/* The sheet is a fixed size and the embed scrolls inside it; pin the iframe so a
   stray resize message can't change its height and make the form flicker. */
.checkout-modal__frame .checkout-frame__iframe {
  width: 100%;
  height: 100% !important;
}

.account-confirm {
  margin: 0.8rem 0;
  padding: 0.9rem;
  border: 1px solid rgba(184, 68, 51, 0.28);
  border-radius: 8px;
  background: #fbf4f2;
}

.account-confirm p {
  margin-bottom: 0.8rem;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.account-confirm input {
  width: 100%;
  min-height: 42px;
  margin-bottom: 0.8rem;
  border: 1px solid var(--account-strong-line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--account-ink);
  font: inherit;
  padding: 0 0.82rem;
}

.account-confirm input:focus {
  outline: 3px solid rgba(184, 68, 51, 0.14);
  outline-offset: 1px;
  border-color: var(--red);
}

.account-confirm input[aria-invalid="true"] {
  border-color: var(--red);
  background: #fbeeec;
}

.account-settings-card .account-confirm {
  margin-top: 0.9rem;
  margin-bottom: 0;
}

.account-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.account-confirm-danger {
  border-color: rgba(184, 68, 51, 0.52);
  color: var(--red);
}

.account-confirm-danger:hover {
  border-color: var(--red);
  color: var(--red);
}

.account-checkout,
.account-signout,
.account-refresh {
  width: 100%;
}

.account-refresh {
  cursor: pointer;
}

.account-refresh:disabled {
  opacity: 0.62;
  cursor: progress;
}

.account-session-status {
  margin-top: 0.25rem;
}

.account-delete {
  border-color: rgba(184, 68, 51, 0.52);
  color: var(--red);
}

.account-delete:hover {
  border-color: var(--red);
  color: var(--red);
}

.billing-status {
  min-height: 0;
  margin-bottom: 0.65rem;
  color: var(--account-green, var(--green));
  font-size: 0.88rem;
  font-weight: 680;
  line-height: 1.4;
}

.billing-status:not(:empty) {
  min-height: 1.3rem;
}

.billing-status.is-error {
  color: var(--red);
}

.signin-shell {
  max-width: 1120px;
}

.signin-frame {
  display: grid;
  grid-template-columns: minmax(0, 500px);
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 62px - 8rem);
}

.signin-intro {
  margin-bottom: 1.5rem;
}

/* ─── Checkout (subscribe) page ─── */
.checkout-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 520px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

/* Left column echoes the account-page sync card: bluish panel, icon, pill, ticks. */
.checkout-pitch {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--sync-panel-border);
  border-radius: var(--radius);
  background: var(--sync-panel-bg);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.checkout-sync-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.9rem;
}

.checkout-sync-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--sync-panel-border);
  box-shadow: 0 1px 2px rgba(28, 42, 69, 0.08);
  flex-shrink: 0;
}

.checkout-sync-title {
  flex: 1;
  min-width: 0;
}

.checkout-sync-title h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  color: var(--sync-ink);
}

.checkout-sync-title p {
  margin-top: 0.25rem;
  color: var(--sync-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.checkout-sync-points {
  margin-top: 1.1rem;
  margin-bottom: 1.4rem;
}

.checkout-account {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--sync-panel-border);
  border-radius: 999px;
  background: var(--paper);
}

.checkout-account__label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sync-muted);
}

.checkout-account__email {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sync-ink);
}

/* ─── Plan toggle (monthly / annual) ─── */
.plan-toggle {
  display: flex;
  align-items: stretch;
  width: fit-content;
  gap: 5px;
  margin-bottom: 0.5rem;
  padding: 5px;
  background: var(--paper);
  border: 1px solid var(--sync-panel-border);
  border-radius: 16px;
}

.plan-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.65rem 1.6rem;
  border-radius: 12px;
  color: var(--sync-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.plan-option:hover {
  color: var(--sync-ink);
}

.plan-option.is-active {
  background: var(--sync-cta);
  color: #fff;
  box-shadow: 0 1px 2px rgba(28, 42, 69, 0.18);
}

.plan-option[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

.plan-option__name {
  font-size: 0.98rem;
  font-weight: 700;
}

.plan-option__price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sync-muted);
}

.plan-option:hover .plan-option__price {
  color: var(--sync-ink);
}

.plan-option.is-active .plan-option__price {
  color: rgba(255, 255, 255, 0.82);
}

.plan-option__save {
  margin-top: 0.2rem;
  padding: 0.06rem 0.5rem;
  border-radius: 999px;
  background: var(--sync-on-bg);
  color: var(--sync-on-fg);
  font-size: 0.68rem;
  font-weight: 760;
}

.plan-option.is-active .plan-option__save {
  background: rgba(255, 255, 255, 0.92);
  color: var(--sync-cta-dark);
}

/* ─── Inline checkout iframe ─── */
.checkout-frame {
  position: relative;
  min-height: 520px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Fixed-size box that scrolls its own content (scrolling="auto" on the iframe). Bound
   the height to the viewport so the whole embed — including its scrollbar — stays
   reachable on laptops; the embed scrolls internally to reveal its lower fields.
   The height is pinned with !important so an active lemon.js can't grow the iframe via
   its inline style: that resize otherwise loops (the embed re-lays-out, re-applies its
   own email autofill, and the field flickers). Same pin as the modal frame above. */
.checkout-frame__iframe {
  display: block;
  width: 100%;
  height: clamp(520px, calc(100vh - 220px), 760px) !important;
  border: 0;
}

.checkout-frame__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.checkout-frame.is-loaded .checkout-frame__placeholder {
  display: none;
}

.checkout-secondary {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--sync-cta);
  font-weight: 600;
}

.checkout-secondary:hover {
  color: var(--sync-cta-dark);
}

.admin-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.admin-header > div:first-child {
  max-width: 720px;
}

.admin-header .lead {
  margin-top: 1rem;
}

.admin-session {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-session span {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.admin-signout {
  min-height: 38px;
}

.admin-login-panel {
  max-width: 520px;
  padding: clamp(1.25rem, 2.5vw, 1.8rem);
}

.admin-login-form {
  padding: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 1rem;
  align-items: start;
}

.admin-panel {
  padding: clamp(1.25rem, 2.5vw, 1.8rem);
}

.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.admin-panel-heading h2 {
  margin-top: 0.4rem;
  font-size: 1.55rem;
}

.admin-health-panel {
  grid-column: 1 / -1;
}

.admin-health-summary,
.admin-metrics,
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.admin-health-summary {
  margin-bottom: 1rem;
}

.admin-health-summary dt,
.admin-metrics dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-health-summary dd,
.admin-metrics dd {
  margin-top: 0.2rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-metrics {
  margin: 1rem 0;
}

.admin-service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-service-list > div {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.85rem;
  background: var(--paper);
}

.admin-service-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-service-heading strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.admin-service-list p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 0.58rem;
  background: var(--warm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 760;
}

.admin-pill.is-ok {
  border-color: rgba(46, 127, 88, 0.36);
  background: rgba(46, 127, 88, 0.1);
  color: var(--green);
}

.admin-pill.is-degraded {
  border-color: rgba(217, 119, 6, 0.42);
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
}

.admin-pill.is-down {
  border-color: rgba(184, 68, 51, 0.42);
  background: rgba(184, 68, 51, 0.1);
  color: var(--red);
}

.admin-search-form,
.admin-login-form [data-admin-credentials],
.admin-login-form [data-admin-code-field] {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.admin-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.admin-search-form input,
.admin-notes textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.admin-search-form input {
  min-height: 44px;
  padding: 0 0.78rem;
}

.admin-notes textarea {
  display: block;
  min-height: 82px;
  margin-top: 0.45rem;
  padding: 0.7rem 0.78rem;
  resize: vertical;
}

.admin-search-form input:focus,
.admin-notes textarea:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.3);
  outline-offset: 1px;
  border-color: var(--accent);
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-user-table th,
.admin-user-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-user-table th {
  background: var(--warm);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-user-table tr:last-child td {
  border-bottom: 0;
}

.admin-user-table td:nth-child(2) {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.admin-table-action {
  min-height: 34px;
  padding: 0 0.75rem;
}

.admin-detail-panel {
  grid-column: 1 / -1;
}

.admin-detail-grid {
  margin: 1.1rem 0;
}

.admin-notes {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.admin-action-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.admin-action-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1rem;
  background: var(--paper);
}

.admin-action-group h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.admin-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.admin-button-row .primary-action,
.admin-button-row .secondary-action {
  width: 100%;
}

.admin-danger-action {
  border-color: rgba(184, 68, 51, 0.52);
  color: var(--red);
}

.admin-danger-action:hover {
  border-color: var(--red);
  color: var(--red);
}

.admin-shell [hidden],
.admin-login-form [hidden] {
  display: none !important;
}

.admin-shell button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.admin-shell button[aria-busy="true"] {
  cursor: progress;
}

.account-note-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
  color: var(--text);
  list-style: none;
}

.account-note-list li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.45;
}

.account-note-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Guide-specific: task type table */
.task-type-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.task-type-table th,
.task-type-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.task-type-table th {
  background: var(--warm);
  font-weight: 660;
  color: var(--ink);
}

.task-type-table td {
  color: var(--text);
}

/* Guide screenshot inline */
.guide-screenshot {
  margin: 1.75rem 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.guide-screenshot img {
  width: 100%;
  display: block;
  filter: var(--shot-shadow);
}

/* ─── Responsive ─── */
@media (max-width: 1020px) {
  .hero {
    padding-top: 2.75rem;
  }

  .hero-copy { max-width: 780px; }

  .hero h1 {
    font-size: 2.4rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .feature-block,
  .feature-block--flip {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .feature-text { max-width: 100%; }

  .pitch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screenshot-split {
    grid-template-columns: 1fr;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .sync-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .signin-frame {
    grid-template-columns: 1fr;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .admin-session {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-dashboard,
  .admin-health-summary,
  .admin-metrics,
  .admin-detail-grid,
  .admin-service-list,
  .admin-action-groups {
    grid-template-columns: 1fr;
  }

  .top-links { display: none; }
}

@media (max-width: 680px) {
  h1,
  .hero h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  p.lead {
    font-size: 1.08rem;
  }

  .hero {
    padding-top: 2.25rem;
  }

  .hero-copy {
    max-width: 360px;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-actions .primary-action,
  .hero-actions .secondary-action {
    width: 100%;
  }

  .pitch-grid {
    grid-template-columns: 1fr;
  }

  .account-shell {
    padding-inline: 1rem;
  }

  .account-profile {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .account-profile .account-signout {
    grid-column: 1 / -1;
  }

  .account-sync-facts {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .account-sync-facts .account-provider-pill {
    margin-left: 0;
  }

  .account-setting-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .account-confirm-actions {
    grid-template-columns: 1fr;
  }

  .hero-shot,
  .feature-shot,
  .screenshot-wide,
  .screenshot-split figure {
    margin-inline: 0;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .hero-shot {
    max-width: 360px;
    margin-left: 0;
    margin-right: 0;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }

  .admin-panel-heading,
  .admin-search-row,
  .admin-button-row {
    grid-template-columns: 1fr;
  }

  .admin-panel-heading {
    display: grid;
  }
}
