/* Mochi uses warm neutral surfaces with one terracotta action color.
 * Semantic colors are reserved for status, warning, and errors.
 */

:root {
  --ground: #f3f1e9;
  --ground-2: #e8e6dc;
  --ground-3: #d8d5ca;
  --surface: #faf9f5;
  --surface-2: #f7f5ef;

  --ink: #141413;
  --ink-2: #54524c;
  --ink-3: #77746b;

  --line: #dedbd1;
  --line-2: #c8c4b9;

  /* Terracotta is the only brand and action color. */
  --anko: #d97757;
  --anko-deep: #c4684a;
  --anko-text: #93412d;
  --anko-wash: #faece6;
  --anko-edge: #edc5b7;

  /* Matcha is reserved for successful and online states. */
  --matcha: #477456;
  --matcha-text: #31553d;
  --matcha-wash: #e7f0e8;
  --matcha-edge: #bfd3c2;

  --amber: #a96a15;
  --amber-wash: #fbf0dc;
  --amber-edge: #f0dcb4;

  --clay: #b3372f;
  --clay-wash: #fbe8e6;
  --clay-edge: #f3ccc8;

  --r-xs: 6px;
  --r-sm: 10px;
  --r: 12px;
  --r-lg: 12px;
  --r-xl: 12px;
  --pill: 999px;

  --shade-1: 0 1px 2px rgba(20, 20, 19, 0.05);
  --shade-2: 0 8px 24px rgba(20, 20, 19, 0.08);
  --shade-3: 0 18px 48px rgba(20, 20, 19, 0.12);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;

  --shell: 1120px;
  --step: clamp(3.5rem, 8vw, 6rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--anko-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #713120;
}

:focus-visible {
  outline: 2px solid var(--anko);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ============ Type ============ */

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  /* Fraunces ships a real softness axis. A typeface with a SOFT control is the
   * right pick for a product named after a soft round cake. */
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 600;
  letter-spacing: -0.021em;
  line-height: 1.14;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0.5rem 0 0;
}

/* A small label above a heading -- a back link, or whose account this is. */
.eyebrow {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-3);
  margin: 0 0 0.4rem;
}

.eyebrow a {
  text-decoration: none;
  color: var(--ink-3);
}

.eyebrow a:hover {
  color: var(--anko-text);
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.88em;
  font-feature-settings: "zero" 1;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ============ Shell ============ */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
}

main {
  display: block;
}

/* App pages (dashboard, wizard, admin) get a bounded column; the landing page
 * manages its own full-bleed sections. */
body.app main,
body.admin main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2.4rem clamp(1.1rem, 4vw, 2.2rem) 5rem;
}

body.admin {
  background: var(--ground-2);
}

.section {
  padding-block: var(--step);
}

/* Only ever change the ground here -- never padding -- so section modifiers
 * cannot cancel each other's rhythm out. */
.section-tint {
  background: var(--ground-2);
}

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1.1rem, 4vw, 2.2rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

body.admin .site-header {
  background: var(--ground-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 80, "WONK" 1;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.brand-admin {
  font-size: 0.78rem;
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-left: 0.1rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--anko);
}

.site-nav form {
  display: inline;
}

/* ============ Buttons ============ */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--anko);
  border-radius: var(--r-xs);
  background: var(--anko);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.08s ease,
    box-shadow 0.16s ease;
}

button:hover,
.btn:hover {
  background: var(--anko-deep);
  border-color: var(--anko-deep);
  color: var(--ink);
  box-shadow: none;
}

button:active,
.btn:active {
  transform: translateY(1px);
}

button:disabled,
button[disabled] {
  background: var(--line-2);
  border-color: var(--line-2);
  color: var(--ink-2);
  cursor: not-allowed;
  box-shadow: none;
}

button.secondary,
.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: none;
}

button.secondary:hover,
.btn.secondary:hover {
  background: var(--surface);
  border-color: var(--ink-2);
  color: var(--ink);
  box-shadow: var(--shade-1);
}

button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  box-shadow: none;
}

button.ghost:hover {
  background: var(--ground-2);
  border-color: transparent;
  color: var(--ink);
  box-shadow: none;
}

button.danger,
.btn.danger {
  background: var(--clay);
  border-color: var(--clay);
}

button.danger:hover,
.btn.danger:hover {
  background: #8f2b24;
  border-color: #8f2b24;
  box-shadow: 0 4px 14px rgba(179, 55, 47, 0.24);
}

button.danger.secondary,
.btn.danger.secondary {
  background: var(--surface);
  color: var(--clay);
  border-color: var(--clay-edge);
}

button.danger.secondary:hover {
  background: var(--clay-wash);
  border-color: var(--clay);
  color: var(--clay);
}

button.on-ink,
.btn.on-ink {
  background: var(--ground);
  border-color: var(--ground);
  color: var(--ink);
}

button.on-ink:hover,
.btn.on-ink:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.btn-lg {
  padding: 0.82rem 1.75rem;
  font-size: 1rem;
}

.btn-block {
  display: flex;
  width: 100%;
  padding: 0.82rem 1.25rem;
  font-size: 1rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

/* ============ Forms ============ */

input,
select,
textarea,
button {
  font-family: inherit;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-3);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--anko);
  box-shadow: 0 0 0 3px var(--anko-wash);
}

textarea {
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.65;
}

form.stack {
  display: grid;
  gap: 1rem;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

/* ============ Cards ============ */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shade-1);
  padding: 1.5rem;
  margin-bottom: 1.35rem;
}

.panel > :last-child {
  margin-bottom: 0;
}

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

.panel-head h2,
.panel-head h3 {
  margin: 0;
}

.panel.empty {
  text-align: center;
  padding: 3.2rem 1.6rem;
}

.panel.empty .lead {
  margin-inline: auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

/* ============ Status: dots and pills ============ */

/* The product's truest glyph: one dot per bot. */
.dot {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--line-2);
  flex-shrink: 0;
}

.dot-ok {
  background: var(--matcha);
  box-shadow: 0 0 0 3px var(--matcha-wash);
}

.dot-warn {
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-wash);
  animation: breathe 1.7s ease-in-out infinite;
}

.dot-err {
  background: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-wash);
}

.dot-off {
  background: var(--line-2);
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.32;
  }
}

.dot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 0 0.2rem;
  min-height: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.2rem 0.68rem;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.pill-live {
  color: var(--matcha-text);
  background: var(--matcha-wash);
  border-color: var(--matcha-edge);
}

.pill-stopped,
.pill-draft {
  color: var(--ink-2);
  background: var(--ground-2);
  border-color: var(--line-2);
}

.pill-expired {
  color: var(--clay);
  background: var(--clay-wash);
  border-color: var(--clay-edge);
}

.pill-pending {
  color: var(--amber);
  background: var(--amber-wash);
  border-color: var(--amber-edge);
}

/* ============ Flash ============ */

.flash {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.65rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shade-1);
  font-size: 0.94rem;
  margin-bottom: 1.35rem;
}

.flash.ok {
  color: var(--matcha-text);
  background: var(--matcha-wash);
  border-color: var(--matcha-edge);
}

.flash.err {
  color: var(--clay);
  background: var(--clay-wash);
  border-color: var(--clay-edge);
}

.flash.pending {
  color: var(--amber);
  background: var(--amber-wash);
  border-color: var(--amber-edge);
}

.flash-link {
  font-weight: 700;
  white-space: nowrap;
}

/* ============ Landing ============ */

.hero {
  padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 7vw, 5rem);
}

.hero h1 {
  max-width: 16ch;
  margin-bottom: 1.4rem;
}

.hero .lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  margin-bottom: 2rem;
}

/* A readable measure for anything that is mostly sentences. */
.prose {
  max-width: 58ch;
}

.prose h2 {
  margin-bottom: 1.2rem;
}

.prose p {
  color: var(--ink-2);
}

table.prices {
  width: 100%;
  max-width: 30rem;
  border-collapse: collapse;
  margin: 1.6rem 0 1.2rem;
  font-variant-numeric: tabular-nums;
}

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

table.prices thead th {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

table.prices td:first-child {
  font-weight: 600;
}

table.prices td:last-child,
table.prices th:last-child {
  color: var(--ink-3);
  padding-right: 0;
}

.faq {
  display: grid;
  gap: 0;
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 0.95rem 0;
  font-weight: 600;
  font-size: 0.97rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--ink-3);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq p {
  margin: 0 0 1rem;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.steps-mini {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.7rem;
  padding: 0;
  margin: 0 auto 1.8rem;
  max-width: 44rem;
  text-align: left;
}

.steps-mini li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 0.88rem;
}

.steps-mini span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--ground-3);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ============ Auth ============ */

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 58rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: none;
  padding: 1.75rem;
}

.auth-card h2 {
  font-size: 1.3rem;
}

.auth-card .note {
  margin-top: 0.9rem;
}

/* ============ Dashboard ============ */

.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.dash-head h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  margin-bottom: 0.25rem;
}

.dash-head .lead {
  margin-bottom: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.9rem;
}

.metric {
  padding: 1.05rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shade-1);
}

.metric .label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.metric .value {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.15;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(302px, 1fr));
  gap: 1.1rem;
}

.squad-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.35rem 1.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shade-1);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.squad-card:hover {
  box-shadow: var(--shade-2);
  transform: translateY(-2px);
}

.squad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.squad-head h2 {
  margin: 0;
  font-size: 1.16rem;
  overflow-wrap: anywhere;
}

.squad-meta {
  margin: 0;
  font-size: 0.87rem;
  color: var(--ink-2);
}

.squad-health {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--matcha-text);
}

.squad-runtime {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.87rem;
  font-weight: 600;
}

.squad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.95rem;
}

.squad-actions button {
  padding: 0.45rem 0.95rem;
  font-size: 0.86rem;
}

.card-link {
  margin: 0.7rem 0 0;
  font-size: 0.89rem;
  font-weight: 600;
}

/* Helper: one per account, so it gets its own distinct surface rather than
 * sitting in the squad grid pretending it is a squad. */
.helper-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 1.3rem 1.45rem;
  background: linear-gradient(135deg, var(--anko-wash), var(--surface) 62%);
  border: 1px solid var(--anko-edge);
  border-radius: var(--r);
  box-shadow: var(--shade-1);
  margin-bottom: 1.35rem;
}

.helper-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.14rem;
}

.helper-card p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--ink-2);
}

.helper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.helper-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Indeterminate bar while a helper (or squad) is still coming online. */
.progress-indeterminate {
  position: relative;
  overflow: hidden;
  width: min(100%, 18rem);
  height: 0.35rem;
  margin: 0.65rem 0 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--anko) 16%, var(--surface));
}

.progress-indeterminate > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: var(--anko);
  animation: progress-slide 1.25s ease-in-out infinite;
}

@keyframes progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ============ Squad manage ============ */

/* A squad is up to thirty bots, so a bot is a line, not a card. Everything
   needed to judge one at a glance sits on that line; the token form is behind
   the disclosure so thirty of them do not become thirty password fields. */
.bot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.bot {
  border-bottom: 1px solid var(--line);
}

.bot details > summary {
  display: grid;
  grid-template-columns: auto 2rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.2rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
}

.bot details > summary::-webkit-details-marker {
  display: none;
}

.bot details > summary:hover {
  background: var(--surface-2);
}

.bot-slot {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-3);
}

.bot-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Marks the one bot that takes commands for the whole squad. */
.bot-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--anko-text);
  background: var(--anko-wash);
  border: 1px solid var(--anko-edge);
  border-radius: var(--pill);
  padding: 0.05rem 0.45rem;
  margin-left: 0.35rem;
  vertical-align: 0.05rem;
}

.bot-state {
  font-size: 0.8rem;
  color: var(--matcha-text);
}

.bot-down .bot-state {
  color: var(--ink-3);
}

.bot-token {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.bot-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 0.3rem 0.2rem 1rem;
}

.bot-form label {
  flex: 1 1 16rem;
  font-size: 0.82rem;
}

.bot-form button {
  padding: 0.5rem 1rem;
  font-size: 0.86rem;
}

/* The one action a new customer needs to find. */
.onboard-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, var(--matcha-wash), var(--surface) 62%);
  border-color: var(--matcha-edge);
}

.onboard-panel h2 {
  margin: 0 0 0.2rem;
  font-size: 1.14rem;
}

.onboard-panel .note {
  margin: 0;
  max-width: 46ch;
}

@media (max-width: 640px) {
  .bot details > summary {
    grid-template-columns: auto 2rem minmax(0, 1fr) auto;
  }

  .bot-token {
    display: none;
  }
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.1rem;
}

.event-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.event-list li:last-child {
  border-bottom: 0;
}

.event-list time,
.event-list .when {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
}

/* ============ Friend ticket ============ */

.ticket {
  max-width: 40rem;
}

.ticket-link {
  display: block;
  padding: 1.1rem 1.2rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 0.86rem;
  word-break: break-all;
  text-decoration: none;
  transition: background 0.16s ease;
}

.ticket-link:hover {
  background: #2a2135;
  color: #fff;
}

/* ============ Wizard ============ */

.wizard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.3rem;
  align-items: start;
}

.wizard-main {
  display: grid;
  gap: 1.2rem;
}

.panel.step {
  margin-bottom: 0;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.step-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.step-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 50%;
  background: var(--anko);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.4rem, 1fr));
  gap: 0.7rem;
}

.tier,
.duration {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0.95rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
  font-weight: 400;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tier:hover,
.duration:hover {
  border-color: var(--ink-3);
}

.tier:has(input:checked),
.duration:has(input:checked) {
  border-color: var(--anko);
  background: var(--anko-wash);
  box-shadow: 0 0 0 1px var(--anko);
}

.tier input,
.duration input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tier-bots,
.duration-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.tier-price {
  font-size: 1.06rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tier-price small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-3);
}

.tier-each {
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--ink-3);
}

.durations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.token-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.summary {
  position: sticky;
  top: 5.2rem;
  margin-bottom: 0;
}

.summary-rows {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.summary-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.91rem;
}

.summary-rows dt {
  color: var(--ink-2);
}

.summary-rows dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
}

.summary-total strong {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
}

.promo-field {
  margin-top: 0.9rem;
}

.summary .btn-block {
  margin-top: 0.9rem;
}

/* ============ Checkout ============ */

.big-check {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: var(--matcha-wash);
  border: 1px solid var(--matcha-edge);
  color: var(--matcha-text);
  font-size: 1.7rem;
  font-weight: 700;
}

pre.code-block {
  margin: 0.85rem 0;
  padding: 0.95rem 1.1rem;
  background: var(--ground-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--ink);
  word-break: break-all;
  white-space: pre-wrap;
}

/* ============ Admin ============ */

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.admin-head h1 {
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  margin: 0;
}

.admin-head p {
  margin: 0.3rem 0 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.7rem;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shade-1);
  width: fit-content;
  max-width: 100%;
}

.tabs a {
  padding: 0.42rem 0.95rem;
  border-radius: var(--pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.tabs a:hover {
  background: var(--ground-2);
  color: var(--ink);
}

.tabs a.active {
  background: var(--anko);
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-sm);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data thead th {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom-color: var(--line-2);
  white-space: nowrap;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover td {
  background: var(--surface-2);
}

table.data code {
  color: var(--ink-2);
}

.empty-row td {
  color: var(--ink-3);
  font-style: italic;
  padding-block: 1.6rem;
  text-align: center;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.inline-actions button {
  padding: 0.34rem 0.8rem;
  font-size: 0.82rem;
}

.status-active,
.status-succeeded {
  color: var(--matcha-text);
  font-weight: 600;
}

.status-failed {
  color: var(--clay);
  font-weight: 700;
}

.status-suspended,
.status-draft,
.status-queued,
.status-running {
  color: var(--amber);
  font-weight: 600;
}

.status-unknown {
  color: var(--ink-3);
}

tr.build-failed td {
  background: var(--clay-wash);
}

.panel.build-failed {
  border-color: var(--clay-edge);
  border-left: 3px solid var(--clay);
}

pre.build-log {
  max-height: 32rem;
  overflow: auto;
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--ink);
  color: #ded7e6;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

pre.build-log .log-err {
  color: #f2a8a2;
}

/* ============ Footer ============ */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ground-2);
  padding-block: 2.2rem;
  font-size: 0.87rem;
  color: var(--ink-3);
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--anko-text);
}

/* ============ Responsive ============ */

@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

  .summary {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .site-nav {
    width: 100%;
    gap: 0.25rem 1rem;
  }

  .site-nav a,
  .site-nav button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .console-dots {
    grid-template-columns: repeat(8, 1fr);
  }

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

  .dash-head,
  .helper-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer .shell {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============ Quality floor ============ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  /* The squad must still read as online when motion is off. */
  .console-dots i {
    opacity: 1;
    background: #46c77e;
  }

  .console-log span {
    opacity: 1;
  }
}

@media print {
  .site-header,
  .site-footer,
  .squad-actions {
    display: none;
  }
}

/* Long strings in a metric tile are text, not a number, so they do not take
   the display face's number size. */
.metric .value.small {
  font-size: 1.05rem;
}

form.stack.narrow {
  max-width: 22rem;
}

/* .site-nav a is more specific than .btn, so keep the CTA label on the
   accessible ink color used by other primary buttons. */
.site-nav a.btn {
  color: var(--ink);
  border-bottom-color: transparent;
  padding: 0.5rem 1.05rem;
}

.site-nav a.btn:hover {
  color: var(--ink);
  border-bottom-color: transparent;
}

/* The public page is text-led, so it reads in a narrower column than the
   dashboard's card grids need. */
body.landing .shell {
  max-width: 860px;
}

/* ============ Auth pages ============ */

body.auth { background: var(--surface); }
body.auth .site-header { position: static; padding: 24px 48px; background: var(--surface); }
body.auth .brand { font-size: 24px; min-height: 44px; }
body.auth .site-nav { font-size: 14px; }
body.auth .site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
body.auth main { max-width: 1120px; margin: auto; padding: 64px 48px; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: center; min-height: 520px; }
.auth-intro { padding: 32px 0; }
.auth-kicker { font: 500 12px/1.5 var(--body); letter-spacing: .12em; color: var(--ink-2); margin: 0 0 24px; }
.auth-intro h2 { font-size: 40px; line-height: 1.2; font-weight: 500; margin: 0 0 24px; }
.auth-intro > p:not(.auth-kicker) { max-width: 30ch; font-size: 16px; color: var(--ink-2); }
.auth-form-panel { width: 100%; max-width: 400px; padding: 32px 0; }
.auth-form-panel .auth-kicker { margin-bottom: 16px; }
.auth-form-panel h1 { font-size: 32px; font-weight: 500; line-height: 1.2; margin: 0 0 16px; }
.auth-description { font-size: 16px; color: var(--ink-2); margin: 0 0 32px; }
#auth-form { display: grid; gap: 24px; }
.auth-field > label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.auth-field .optional { font-weight: 400; color: var(--ink-2); }
.auth-field input { width: 100%; min-height: 56px; padding: 16px; background: var(--surface); border: 1px solid var(--ink-3); border-radius: 8px; font-size: 16px; line-height: 1.5; color: var(--ink); margin: 0; }
.auth-field input:focus-visible { outline: 2px solid var(--anko-text); outline-offset: 2px; border-color: var(--anko-text); box-shadow: none; }
.auth-field input[aria-invalid="true"] { border-color: var(--clay); }
.password-field { position: relative; }
.password-field input { padding-right: 80px; }
button.password-toggle { position: absolute; right: 8px; top: 6px; min-width: 56px; min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--ink-2); font-size: 12px; border-radius: 6px; box-shadow: none; }
button.password-toggle:hover { color: var(--ink); background: var(--ground); }
button.password-toggle[hidden] { display: none; }
.field-hint { font-size: 12px; line-height: 1.5; color: var(--ink-2); margin: 8px 0 0; }
.field-error { font-size: 14px; line-height: 1.5; color: var(--clay); margin: 8px 0 0; }
.field-error:empty { display: none; }
.auth-feedback { border-left: 2px solid var(--clay); padding: 8px 16px; color: var(--clay); font-size: 14px; margin-bottom: 24px; }
.auth-submit { min-height: 56px; border-radius: 8px; margin-top: 8px; padding: 16px 24px; justify-content: space-between; font-size: 16px; }
.auth-fine-print { margin: 16px 0 0; color: var(--ink-2); font-size: 12px; text-align: center; }
.auth-alt { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.auth-alt a { font-weight: 600; margin-left: 8px; display: inline-flex; align-items: center; min-height: 44px; }
body.auth .site-footer { background: var(--surface); }
body.auth .site-footer .shell { padding: 24px 48px; font-size: 12px; }
body.auth .site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 1024px) {
  body.auth { min-height: 100svh; display: flex; flex-direction: column; }
  body.auth main { flex: 1; display: flex; align-items: center; width: 100%; }
  .auth-layout { width: 100%; }
}
@media (max-width: 1023px) {
  .auth-layout { gap: 48px; }
  body.auth main { padding: 48px 32px; }
  body.auth .site-header { padding: 16px 32px; }
  .auth-intro h2 { font-size: 32px; }
}
@media (max-width: 767px) {
  body.auth .site-header { padding: 16px 24px; flex-direction: row; align-items: center; }
  body.auth .site-nav { width: auto; }
  body.auth main { padding: 32px 24px 64px; }
  .auth-layout { display: block; min-height: 0; }
  .auth-intro { display: none; }
  .auth-form-panel { max-width: 400px; margin: auto; padding: 16px 0; }
  .auth-form-panel .auth-kicker { font-size: 12px; }
  .auth-description, .auth-alt, .auth-field > label, .field-error { font-size: 16px; }
  .auth-fine-print, .field-hint, button.password-toggle, body.auth .site-nav { font-size: 16px; }
  body.auth .site-footer .shell { padding: 24px; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.promo-status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  min-height: 1.2rem;
  color: var(--ink-3);
}

.payment-methods { border: 0; padding: 0; margin: 24px 0; min-width: 0; }
.payment-methods legend { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.payment-option { display: flex; gap: 16px; padding: 16px; margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: 8px; align-items: flex-start; cursor: pointer; }
.payment-option input { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--anko-text); }
.payment-option:has(input:checked) { border-color: var(--anko-text); }
.payment-option:has(input:disabled) { color: var(--ink-2); background: var(--ground); cursor: default; }
.payment-option strong { display: block; font-size: 16px; font-weight: 600; }
.payment-option small { display: block; color: var(--ink-2); font-size: 14px; font-weight: 400; line-height: 1.5; margin-top: 8px; }
.purchase-choices { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.purchase-choices legend { font-size: 16px; font-weight: 500; margin-bottom: 16px; }
.purchase-choice { display: flex; align-items: flex-start; gap: 16px; min-height: 56px; padding: 16px; margin: 0 0 8px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; }
.purchase-choice input { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 0; accent-color: var(--anko-text); }
.purchase-choice:has(input:checked) { border-color: var(--anko-text); }
.purchase-choice:has(input:focus-visible) { outline: 2px solid var(--anko-text); outline-offset: 4px; }
.purchase-choice strong { display: block; font-size: 16px; font-weight: 600; }
.purchase-choice small { display: block; color: var(--ink-2); font-size: 16px; font-weight: 400; line-height: 1.5; margin-top: 8px; }
#customer-server-fields label + label { margin-top: 16px; }
#customer-server-fields label > .note { display: inline; margin: 0; font-size: inherit; }
.setup-request { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.setup-request code { overflow-wrap: anywhere; }
.availability { font-size: 12px; font-weight: 400; margin-left: 8px; }
.renewal-disclosure { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.renewal-consent { display: flex; gap: 16px; align-items: flex-start; margin: 24px 0; font-size: 14px; font-weight: 400; }
.renewal-consent input { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--anko-text); }
.renewal-consent[hidden], .renewal-disclosure[hidden] { display: none; }
.billing-list { display: grid; gap: 16px; margin: 32px 0; }
.billing-item { display: grid; grid-template-columns: minmax(160px,1fr) auto auto; gap: 24px 32px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); align-items: center; }
.billing-item h2 { font-size: 20px; margin: 0 0 8px; }
.billing-item .eyebrow { font-size: 12px; }
.billing-status { margin: 0; font-size: 14px; color: var(--ink-2); }
.billing-amount { text-align: right; }
.billing-amount strong { display: block; font-size: 20px; }
.billing-amount span, .billing-next span { display: block; color: var(--ink-2); font-size: 14px; }
.billing-next time { font-size: 16px; }
.billing-action { grid-column: 1/-1; }
@media (max-width: 767px) {
  .billing-item { grid-template-columns: 1fr auto; padding: 24px 16px; gap: 24px 16px; }
  .billing-next { grid-column: 1/-1; }
  .billing-action a { min-height: 44px; }
  .payment-option small, .renewal-disclosure, .renewal-consent { font-size: 16px; }
}

.promo-status.is-ok {
  color: var(--matcha-text);
  font-weight: 600;
}

.promo-status.is-error {
  color: var(--clay);
  font-weight: 600;
}

/* display:flex on a row beats the hidden attribute's default display:none,
   which left the discount rows showing an em dash before anything applied. */
[hidden] {
  display: none !important;
}

/* ============ One-time secret reveal ============ */

.secret-page {
  max-width: 42rem;
}

.secret-block {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  margin: 1rem 0 0.5rem;
}

.secret-block .code-block {
  flex: 1 1 auto;
  margin: 0;
  /* One click selects the whole value even when the clipboard is unavailable. */
  user-select: all;
}

.secret-block button {
  flex: 0 0 auto;
  align-self: stretch;
}

@media (max-width: 560px) {
  .secret-block {
    flex-direction: column;
  }
}

/* Guided setup keeps one decision group visible and carries its price forward. */
.setup-heading { margin:0 0 24px; max-width:680px; }
.setup-heading h1 { font-size:32px; line-height:1.2; margin:8px 0; font-weight:500; }
.setup-heading p { color:var(--ink-2); margin:0; font-size:16px; }
.quiet-link { font-size:14px; color:var(--ink-2); text-decoration:none; }
.quiet-link:hover { color:var(--anko-text); text-decoration:underline; }
.setup-progress { margin:0 0 32px; scroll-margin-top:88px; }
.setup-progress ol { display:grid; grid-template-columns:repeat(4,1fr); list-style:none; margin:0; padding:0; border-bottom:1px solid var(--line); }
.setup-progress li { min-width:0; }
.setup-progress button,.setup-progress-future { display:flex; align-items:center; gap:8px; width:100%; padding:16px 8px; min-height:56px; font:500 14px var(--body); border:0; border-radius:0; border-bottom:2px solid transparent; color:var(--ink-2); background:transparent; box-shadow:none; text-align:left; }
.setup-progress button:hover { color:var(--ink); background:transparent; box-shadow:none; }
.setup-progress button[aria-current="step"],.setup-progress .is-current { color:var(--anko-text); border-bottom-color:var(--anko-text); }
.setup-progress button:disabled,.setup-progress-future { color:var(--ink-3); opacity:1; cursor:default; }
.setup-progress span { font-variant-numeric:tabular-nums; }
.setup-progress button.is-complete { color:var(--ink); }
.setup-flow .wizard,.checkout-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:32px; align-items:start; }
.setup-flow .wizard-main { display:grid; gap:24px; min-width:0; }
.setup-step { padding:32px; margin:0; }
.setup-step h2,.checkout-section h2 { font-size:24px; line-height:1.2; font-weight:500; margin:0 0 16px; }
.setup-step h2:focus { outline:none; }
.setup-step .eyebrow { font-size:12px; margin-bottom:16px; }
.setup-intro { margin:0 0 24px; color:var(--ink-2); font-size:16px; }
.setup-field { padding:0; margin:0 0 24px; border:0; min-width:0; }
.setup-field>label,.setup-field>legend { display:block; float:none; width:auto; font-weight:600; margin-bottom:8px; font-size:16px; }
.setup-field input,.setup-field textarea { margin:0; }
.setup-field textarea { resize:vertical; font-family:var(--mono); font-size:14px; }
.setup-flow .field-hint { font-size:14px; line-height:1.6; margin:8px 0 0; color:var(--ink-2); }
.setup-flow .duration:has(input:checked) { border-color:var(--anko-text); background:var(--surface); box-shadow:inset 0 0 0 1px var(--anko-text); }
.setup-flow .duration:has(input:focus-visible) { outline:2px solid var(--anko-text); outline-offset:4px; }
.setup-flow .durations { gap:8px; margin:0; }
.setup-flow .duration { background:var(--surface); padding:16px 8px; box-shadow:none; border-radius:8px; }
.setup-extra { margin:16px 0; }
.setup-extra>summary { color:var(--ink-2); font-size:14px; cursor:pointer; padding:8px 0; min-height:44px; }
.setup-extra[open]>summary { margin-bottom:16px; }
.setup-extra>p { font-size:16px; color:var(--ink-2); }
.setup-extra .purchase-choices { margin:0; }
.setup-flow .purchase-choices { margin-bottom:32px; }
.setup-flow .purchase-choices legend { font-weight:600; }
.setup-flow .purchase-choice { background:var(--surface); margin-bottom:8px; }
.setup-flow .purchase-choice small { margin-top:8px; font-size:14px; }
.setup-flow .purchase-choice strong { font-weight:600; }
.setup-notice { padding:16px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); color:var(--ink-2); margin:0 0 32px; font-size:14px; }
.setup-helper { margin-top:32px; padding-top:24px; border-top:1px solid var(--line); }
.setup-check { display:flex; gap:16px; cursor:pointer; align-items:flex-start; min-height:44px; }
.setup-check input { width:20px; height:20px; min-height:20px; flex:0 0 20px; margin:0; accent-color:var(--anko-text); }
.setup-check strong,.setup-check small { display:block; }
.setup-check strong { font-size:16px; font-weight:600; }
.setup-check small { margin-top:8px; font-size:14px; color:var(--ink-2); line-height:1.6; font-weight:400; }
.setup-helper>.setup-field { margin:24px 0; }
.setup-actions { display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; padding:0; }
.setup-actions>button:not(.secondary) { margin-left:auto; }
.setup-actions>.field-error { flex-basis:100%; }
.setup-actions>button { min-height:48px; font-size:16px; }
.setup-summary { padding:24px; top:88px; border-radius:8px; }
.setup-summary .eyebrow { margin-bottom:16px; }
.setup-cost-details>summary { padding:8px 0 16px; font-size:14px; cursor:pointer; color:var(--ink-2); }
.setup-cost-details .summary-rows { margin-top:8px; }
.setup-summary .summary-rows { gap:16px; }
.setup-summary .summary-rows>div { font-size:14px; }
.setup-summary .summary-total { padding:24px 0 8px; font-size:16px; }
.setup-summary .summary-total strong { font-size:32px; line-height:1.2; }
.setup-summary #sum-min:empty { display:none; }
.setup-summary .setup-promo { margin:16px 0 0; padding-top:8px; border-top:1px solid var(--line); }
.setup-promo label { font-size:14px; }
.setup-price-status button { margin:8px 0; min-height:44px; }
.price-loading { display:inline-block; min-width:80px; border-radius:6px; background:var(--ground-2); color:transparent; user-select:none; }
.setup-flow [hidden],.setup-progress[hidden],.checkout-layout [hidden] { display:none!important; }
.checkout-layout { margin-bottom:32px; }
.checkout-main { display:grid; gap:24px; }
.checkout-section { padding:32px; margin:0; }
.checkout-section .setup-intro { margin-bottom:24px; }
.checkout-section .payment-methods { margin:0; }
.checkout-section .payment-methods legend { font-size:16px; font-weight:600; margin-bottom:16px; }
.checkout-section .payment-option { margin-bottom:8px; border-radius:8px; padding:16px; background:var(--surface); }
.checkout-section .payment-option:has(input:checked) { border-color:var(--anko-text); }
.checkout-section .payment-option strong { font-weight:600; }
.checkout-section .payment-option small { display:block; margin-top:8px; line-height:1.6; }
.checkout-section .payment-option:has(input:disabled) { cursor:default; color:var(--ink-3); background:var(--ground); }
.checkout-section .renewal-disclosure,.checkout-section .crypto-disclosure { padding:16px 0; margin:16px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); font-size:16px; color:var(--ink-2); }
.checkout-section .renewal-disclosure strong,.checkout-section .crypto-disclosure strong { color:var(--ink); }
.checkout-section .renewal-consent { display:flex; gap:16px; align-items:flex-start; font-size:14px; margin:24px 0; font-weight:400; }
.checkout-section .renewal-consent input { flex:0 0 20px; width:20px; height:20px; min-height:20px; margin:0; }
.checkout-section .btn-block { margin-top:24px; min-height:48px; }
.checkout-section .field-hint { margin:16px 0 0; }
.checkout-status { border:1px solid var(--line-2); padding:16px; border-radius:8px; margin:0 0 24px; background:var(--surface); }
.checkout-status strong { display:block; margin-bottom:8px; font-weight:600; }
.checkout-status p { margin:0; font-size:14px; color:var(--ink-2); }
.checkout-order-name { font:500 20px/1.2 var(--display); margin:0 0 16px; overflow-wrap:anywhere; }
.checkout-order .summary-rows { gap:16px; }
.checkout-order-details>summary { min-height:44px; padding:8px 0; color:var(--ink-2); font-size:14px; cursor:pointer; }
.checkout-order-details[open]>summary { margin-bottom:16px; }
.checkout-order .summary-rows>div { font-size:14px; }
.checkout-order .summary-rows dd { max-width:60%; overflow-wrap:anywhere; }
.checkout-order .summary-total { padding-top:24px; font-size:16px; }
.checkout-order .field-hint,.checkout-order .note { font-size:14px; }
.checkout-edit { display:inline-block; padding:8px 0; min-height:44px; font-size:14px; margin-top:16px; }
.checkout-next { margin-top:24px; padding-top:24px; border-top:1px solid var(--line); }
.checkout-next h3 { font-size:16px; font-weight:600; margin:0 0 8px; }
.checkout-next p { font-size:14px; color:var(--ink-2); margin:0; }
@media(max-width:940px) {
 .setup-flow .wizard { display:flex; flex-direction:column; gap:24px; }
 .setup-flow .wizard-main { display:contents; }
 .setup-flow .setup-step { order:0; width:100%; }
 .setup-flow .setup-summary { order:1; width:100%; position:static; }
 .setup-flow .setup-actions { order:2; width:100%; padding:16px 0; }
 .setup-flow .setup-summary .eyebrow { display:none; }
 .setup-cost-details>summary { padding:0 0 8px; }
 .setup-summary .summary-total { padding:16px 0 0; }
 .setup-summary .summary-total strong { font-size:24px; }
 .checkout-layout { grid-template-columns:1fr; gap:24px; }
 .checkout-order { position:static; order:0; }
 .checkout-main { order:1; }
}
@media(max-width:767px) {
 .setup-heading { margin:0 0 24px; }
 .setup-heading h1 { font-size:32px; }
 .setup-progress { margin-bottom:24px; }
 .setup-progress button,.setup-progress-future { flex-direction:column; align-items:flex-start; gap:8px; padding:8px 0 16px; font-size:12px; min-height:64px; }
 .setup-step,.checkout-section { padding:24px 16px; }
 .setup-flow .field-hint,.setup-extra>summary,.setup-flow .purchase-choice small,.setup-check small,.setup-notice,.checkout-section .field-hint,.checkout-section .renewal-consent,.checkout-order .field-hint,.checkout-next p { font-size:16px; }
 .setup-field textarea { font-size:16px; }
 .setup-actions { position:sticky; bottom:0; background:var(--ground); border-top:1px solid var(--line); z-index:5; padding-bottom:max(16px,env(safe-area-inset-bottom)); }
 .setup-actions>button:not(.secondary) { flex:1; }
 .setup-summary { padding:16px; }
 .checkout-section .payment-option small { font-size:16px; }
}
.setup-progress .is-complete { color:var(--ink); }
.setup-field input:not([type="radio"]):not([type="checkbox"]),.setup-field select,.setup-promo input { font-size:16px; min-height:48px; padding:8px 16px; border-radius:8px; }

/* The secure form owns its card fields. Match its surrounding spacing to setup. */
#mochi-card-checkout { min-height: 320px; }
.checkout-loading { display: grid; gap: 16px; padding: 24px 0; color: var(--muted); }
.checkout-loading[hidden] { display: none; }
.checkout-loading span { display: block; height: 48px; border-radius: 8px; background: #e8e6dc; }
.checkout-loading span:last-of-type { width: 60%; }
.billing-action form + form { margin-top: 16px; }
