/* ==========================================================================
   theme-4 — "solid"
   Simple, flat and tactile: warm paper background, crisp ink outlines and
   hard offset shadows that press in when clicked. Brand colours from the logo:
   cobalt (blue) as primary, lime and red-orange as accents. Compact scale.
   ========================================================================== */

:root {
  --paper: #faf8f3;
  --paper-2: #f3f0e7;
  --surface: #ffffff;
  --ink: #14161c;
  --ink-2: #2a2e37;
  --muted: #5a606c;
  --subtle: #858a94;
  --line: #e6e2d8;

  --blue: #2f3cf2;
  --blue-dark: #1d27c9;
  --blue-soft: #eceeff;
  --lime: #c8f135;
  --lime-soft: #f2fad6;
  --lime-ink: #3d5300;
  --coral: #ff5b3d;
  --coral-soft: #ffefea;

  --border: 1.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);

  --font-head: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --wrap: 1120px;
  --gutter: clamp(16px, 3.5vw, 28px);
  --section: clamp(52px, 6.5vw, 84px);
  --nav-h: 62px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 0.9375rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); color: var(--ink); letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
/* the hidden attribute must win over component display rules (grid/flex blocks toggled by JS) */
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 100; padding: 8px 12px; border: var(--border); border-radius: var(--radius-sm); background: var(--lime); color: var(--ink); font-weight: 600; }
.skip:focus { top: 10px; }

/* ---------- buttons: solid blocks that press in ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font: 600 0.875rem/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s;
}
.btn:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn i { font-size: 0.8em; transition: transform 0.2s var(--ease); }
.btn:hover i.fa-arrow-right { transform: translateX(2px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--sm { min-height: 36px; padding: 7px 13px; font-size: 0.84rem; }
.btn--lg { min-height: 44px; padding: 10px 18px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ---------- small shared pieces ---------- */
.eyebrow {
  display: inline-block;
  padding: 4px 10px;
  border: var(--border);
  border-radius: 999px;
  background: var(--lime);
  font: 700 0.68rem/1.2 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  flex: none;
}
.icon--lime { background: var(--lime); color: var(--ink); }
.icon--coral { background: var(--coral-soft); color: var(--coral); }
.icon--blue { background: var(--blue-soft); color: var(--blue); }

.tag { padding: 3px 7px; border-radius: 6px; font: 700 0.62rem/1 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; }
.tag--done { background: var(--lime-soft); color: var(--lime-ink); }
.tag--run { background: var(--blue-soft); color: var(--blue-dark); }
.tag--new { background: var(--coral-soft); color: #c53a1f; }

/* ---------- navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--border);
  transition: box-shadow 0.2s;
}
.nav.is-scrolled { box-shadow: 0 3px 0 var(--ink); }
.nav__bar { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }

.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); flex: none; }
.logo:hover { text-decoration: none; }
.logo img { width: 28px; height: 28px; }
.logo span { font: 800 1.05rem/1 var(--font-head); letter-spacing: -0.03em; }
.logo b { color: var(--blue); font-weight: 800; }
.logo--invert { color: #fff; }
.logo--invert b { color: var(--lime); }

.nav__menu { display: flex; align-items: center; gap: 2px; margin-right: auto; }
.nav__menu > a {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.875rem;
}
.nav__menu > a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.nav__mobile-cta { display: none; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__login { color: var(--ink); font-weight: 600; font-size: 0.875rem; padding: 7px 8px; }
.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  margin-left: auto;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  cursor: pointer;
}
.nav.is-open .nav__toggle i::before { content: "\f00d"; } /* fa-xmark */

/* ---------- hero ---------- */
.hero { padding-top: clamp(32px, 5vw, 64px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}
.hero__copy { display: grid; gap: 18px; justify-items: start; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 12px 4px 4px;
  border: var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pill__tag { padding: 3px 8px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hl {
  display: inline-block;
  padding: 0 0.18em;
  border: var(--border);
  border-radius: 10px;
  background: var(--lime);
  box-shadow: var(--shadow-sm);
  transform: rotate(-1.5deg);
}
.hero__lead { max-width: 30rem; color: var(--muted); font-size: 1rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 0.84rem; font-weight: 500; }
.hero__trust i { color: var(--blue); margin-right: 4px; }

/* product preview card */
.mock { position: relative; padding: 18px 18px 26px 0; }
.mock__window {
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 0.8rem;
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: var(--border);
  background: var(--paper-2);
}
.mock__dots { display: inline-flex; gap: 5px; }
.mock__dots i { width: 10px; height: 10px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--coral); }
.mock__dots i:nth-child(2) { background: #ffd23f; }
.mock__dots i:nth-child(3) { background: var(--lime); }
.mock__url { flex: 1; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 0.72rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mock__url i { margin-right: 4px; color: var(--blue); font-size: 0.65rem; }
.mock__tag { padding: 3px 7px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.mock__body { display: grid; gap: 10px; padding: 12px; }
.mock__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mock__kpis div { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); min-width: 0; }
.mock__kpis small { color: var(--subtle); font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.mock__kpis strong { font: 800 1.05rem/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.mock__kpis em { justify-self: start; font-style: normal; font-size: 0.64rem; font-weight: 700; color: var(--subtle); }
.mock__kpis em.up { color: var(--lime-ink); }
.mock__chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: repeating-linear-gradient(var(--surface) 0 18px, var(--line) 18px 19px);
}
.mock__chart span {
  flex: 1;
  height: var(--h);
  border: 1.5px solid var(--ink);
  border-radius: 4px 4px 2px 2px;
  background: var(--blue);
  transform-origin: bottom;
  animation: grow 0.8s var(--ease) both;
}
.mock__chart span:nth-child(odd) { background: var(--lime); }
.mock__chart span:nth-child(1) { animation-delay: 0.2s; } .mock__chart span:nth-child(2) { animation-delay: 0.24s; }
.mock__chart span:nth-child(3) { animation-delay: 0.28s; } .mock__chart span:nth-child(4) { animation-delay: 0.32s; }
.mock__chart span:nth-child(5) { animation-delay: 0.36s; } .mock__chart span:nth-child(6) { animation-delay: 0.4s; }
.mock__chart span:nth-child(7) { animation-delay: 0.44s; } .mock__chart span:nth-child(8) { animation-delay: 0.48s; }
.mock__chart span:nth-child(9) { animation-delay: 0.52s; } .mock__chart span:nth-child(10) { animation-delay: 0.56s; }
.mock__chart span:nth-child(11) { animation-delay: 0.6s; } .mock__chart span:nth-child(12) { animation-delay: 0.64s; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.mock__orders { display: grid; }
.mock__orders li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
}
.mock__orders li:first-child { border-top: 0; }
.mock__orders i { color: var(--muted); text-align: center; }
.mock__orders span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }

.sticker {
  position: absolute;
  top: 0; right: 0;
  z-index: 3;
  padding: 7px 12px;
  border: var(--border);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  box-shadow: var(--shadow-sm);
  font: 700 0.75rem/1 var(--font-body);
  transform: rotate(6deg);
}
.float {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  animation: bob 4s ease-in-out infinite;
}
.float i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 0.62rem; }
.float--a { left: -18px; top: 38%; }
.float--a i { background: var(--lime); color: var(--ink); }
.float--b { right: -6px; bottom: 0; animation-delay: -2s; }
.float--b i { background: var(--blue-soft); color: var(--blue); }
.float b { color: var(--lime-ink); }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* platforms strip */
.platforms {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: clamp(40px, 5vw, 60px);
  padding-block: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.platforms p { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.platforms ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.platforms li { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font: 700 0.9rem/1 var(--font-head); }
.platforms li i { font-size: 1rem; }

/* ---------- sections ---------- */
.section { padding-block: var(--section); }
.section--tint { background: var(--paper-2); border-block: 1px solid var(--line); }
.head { display: grid; gap: 10px; justify-items: center; max-width: 600px; margin: 0 auto clamp(26px, 3.5vw, 40px); text-align: center; }
.head h2, .faq__intro h2 { font-size: clamp(1.5rem, 2.5vw, 2.05rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.head p:not(.eyebrow) { color: var(--muted); font-size: 0.98rem; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 20px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.card h3 { font-size: 1rem; font-weight: 700; margin-top: 6px; }
.card p { color: var(--muted); font-size: 0.88rem; }
.card--wide { grid-column: span 2; grid-row: span 2; align-content: end; padding: 24px; }
.card--blue { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.card--blue:hover { box-shadow: var(--shadow-lg); }
.card--blue h3 { color: #fff; font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.card--blue p { color: rgba(255, 255, 255, 0.82); max-width: 30rem; font-size: 0.92rem; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 0.76rem; font-weight: 600; }
.flow span { padding: 6px 10px; border: 1.5px solid #fff; border-radius: 999px; }
.flow > i { font-size: 0.7rem; opacity: 0.8; }
.flow .flow__done { border-color: var(--ink); background: var(--lime); color: var(--ink); }

/* steps */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps::before {
  /* dashed connector behind the numbers */
  content: "";
  position: absolute;
  top: 37px; left: 12%; right: 12%;
  border-top: 2px dashed var(--ink);
  opacity: 0.25;
}
.step {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 20px 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.step__num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 6px;
  border: var(--border);
  border-radius: 50%;
  background: var(--lime);
  box-shadow: var(--shadow-sm);
  font: 800 0.95rem/1 var(--font-head);
}
.step h3 { font-size: 0.98rem; font-weight: 700; }
.step p { color: var(--muted); font-size: 0.86rem; max-width: 18rem; }

/* stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 28px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stats div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 16px 18px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dt { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.stats dd { font: 800 clamp(1.3rem, 2vw, 1.6rem)/1.1 var(--font-head); letter-spacing: -0.02em; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 980px; margin-inline: auto; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.plan:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.plan h3 { font-size: 1.02rem; font-weight: 700; }
.plan__desc { color: var(--muted); font-size: 0.86rem; }
.plan__price { display: flex; align-items: baseline; gap: 6px; padding: 10px 0 12px; border-bottom: 1px dashed var(--line); }
.plan__price strong { font: 800 2rem/1 var(--font-head); letter-spacing: -0.04em; }
.plan__price span { color: var(--subtle); font-size: 0.85rem; font-weight: 500; }
.plan ul { display: grid; gap: 7px; flex: 1; padding: 4px 0 8px; font-size: 0.88rem; }
.plan li { position: relative; padding-left: 24px; }
.plan li::before {
  content: "\f00c"; /* fa-check */
  position: absolute;
  left: 0; top: 0.2em;
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 900 0.55rem/1 "Font Awesome 6 Free";
}
.plan--featured { background: var(--blue); color: #fff; box-shadow: var(--shadow); transform: translateY(-8px); }
.plan--featured:hover { transform: translate(-2px, -10px); box-shadow: var(--shadow-lg); }
.plan--featured h3 { color: #fff; }
.plan--featured .plan__desc, .plan--featured .plan__price span { color: rgba(255, 255, 255, 0.78); }
.plan--featured .plan__price { border-bottom-color: rgba(255, 255, 255, 0.28); }
.plan--featured .plan__price strong { color: var(--lime); }
.plan__badge {
  position: absolute;
  top: -12px; right: 16px;
  padding: 5px 10px;
  border: var(--border);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font: 700 0.66rem/1 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(3deg);
}

/* reviews */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 20px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.review blockquote { margin: 0; font-size: 0.92rem; line-height: 1.6; }
.review blockquote::before { content: "\201C"; display: block; height: 22px; font: 800 2.4rem/1 var(--font-head); color: var(--blue); }
.review figcaption { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8rem; }
.review figcaption strong { display: block; color: var(--ink); font-size: 0.9rem; }
.avatar {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: var(--border);
  border-radius: 50%;
  background: var(--lime);
  font: 800 0.85rem/1 var(--font-head);
  color: var(--ink);
  flex: none;
}
.avatar--coral { background: var(--coral); color: #fff; }
.avatar--blue { background: var(--blue); color: #fff; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 60px); align-items: start; }
.faq__intro { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 12px; justify-items: start; }
.faq__intro > p:not(.eyebrow) { color: var(--muted); }
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin-top: 6px;
  padding: 12px 14px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.contact-card:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.contact-card strong { display: block; font-size: 0.9rem; }
.contact-card small { color: var(--muted); font-size: 0.78rem; }
.contact-card > i { margin-left: auto; font-size: 0.8rem; }
.faq__list { display: grid; gap: 10px; }
.qa { border: var(--border); border-radius: var(--radius); background: var(--surface); transition: box-shadow 0.2s var(--ease); }
.qa[open] { box-shadow: var(--shadow-sm); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border: var(--border);
  border-radius: 7px;
  background: var(--paper-2);
  font: 700 1rem/1 var(--font-body);
  flex: none;
  transition: transform 0.25s var(--ease), background-color 0.2s;
}
.qa[open] summary::after { content: "\2212"; background: var(--lime); }
.qa p { padding: 0 16px 14px; color: var(--muted); font-size: 0.88rem; }

/* CTA */
.section--cta { padding-top: 0; }
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding: clamp(22px, 4vw, 36px);
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--lime);
  box-shadow: var(--shadow-lg);
}
.cta h2 { font-size: clamp(1.4rem, 2.6vw, 1.95rem); font-weight: 800; letter-spacing: -0.03em; }
.cta p { margin-top: 4px; color: var(--ink-2); font-size: 0.92rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* footer */
.footer { background: var(--ink); color: #c9ccd3; font-size: 0.875rem; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 28px; padding-block: 44px 28px; }
.footer__brand { display: grid; gap: 12px; align-content: start; }
.footer__brand p { max-width: 20rem; color: #9ba0aa; }
.footer__social { display: flex; gap: 8px; }
.footer__social a {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1.5px solid #3a3f4a;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.footer__social a:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); text-decoration: none; }
.footer__col { display: grid; gap: 8px; align-content: start; }
.footer__col h2 { margin-bottom: 4px; color: #fff; font: 700 0.78rem/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.footer__col a { color: #9ba0aa; }
.footer__col a:hover { color: #fff; }
.footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-block: 16px; border-top: 1px solid #2a2e37; color: #7d828c; font-size: 0.8rem; }

/* ---------- checklist ---------- */
.ticks { display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 24px; color: var(--ink-2); font-size: 0.9rem; }
.ticks li::before {
  content: "\f00c";
  position: absolute;
  left: 0; top: 0.22em;
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 900 0.55rem/1 "Font Awesome 6 Free";
}

/* ---------- product tour tabs ---------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 26px;
  padding: 5px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: 600 0.85rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.tabs__tab:hover { color: var(--ink); background: var(--paper-2); }
.tabs__tab[aria-selected="true"] { border-color: var(--ink); background: var(--lime); color: var(--ink); }
.tabs__panel[hidden] { display: none; }
.tabs__panel:not([hidden]) { animation: fade-up 0.4s var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html:not(.js) .tabs__panel + .tabs__panel { margin-top: 32px; }

.tour {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  max-width: 960px;
  margin-inline: auto;
}
.tour__copy { display: grid; gap: 14px; justify-items: start; }
.tour__copy h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 800; }

.screen {
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 0.8rem;
}
.screen__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: var(--border);
  background: var(--paper-2);
  font-weight: 700;
  font-size: 0.78rem;
}
.screen__chip { padding: 3px 8px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--lime); font-size: 0.7rem; }
.screen__body { padding: 14px; }

.form-mock { display: grid; gap: 9px; }
.form-mock__row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink-2);
  overflow: hidden;
  white-space: nowrap;
}
.field i { color: var(--subtle); flex: none; }
.field i.fa-chevron-down { margin-left: auto; }
.field b { padding: 2px 6px; border-radius: 5px; background: var(--blue-soft); color: var(--blue-dark); font-size: 0.68rem; flex: none; }
.field b.plain { padding: 0; background: none; color: var(--ink); font-size: inherit; }
.field__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.field--focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field--accent { color: var(--blue-dark); font-weight: 700; }
.form-mock .btn { pointer-events: none; }

.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th { padding: 0 8px 8px; color: var(--subtle); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.mini-table td { padding: 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.mini-table td:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-table td i { width: 16px; margin-right: 5px; color: var(--muted); }
.switch { position: relative; display: inline-block; width: 30px; height: 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper-2); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--subtle); }
.switch.is-on { background: var(--lime); }
.switch.is-on::after { left: 14px; background: var(--ink); }

.mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.mini-kpis div { display: grid; gap: 2px; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.mini-kpis small { color: var(--subtle); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mini-kpis strong { font: 800 1rem/1.1 var(--font-head); }
.mini-kpis .is-blue { color: var(--blue); }
.line { width: 100%; height: 120px; }
.line__path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s 0.15s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- built for ---------- */
.personas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.persona {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.persona:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.persona h3 { margin-top: 6px; font-size: 0.98rem; font-weight: 700; }
.persona p { color: var(--muted); font-size: 0.86rem; }

/* ---------- profit calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: center;
  padding: clamp(20px, 3.5vw, 32px);
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.calc__intro { display: grid; gap: 10px; justify-items: start; }
.calc__intro h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
.calc__intro > p:not(.eyebrow) { color: var(--muted); font-size: 0.9rem; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; padding: 4px; border: var(--border); border-radius: var(--radius-sm); background: var(--paper-2); }
.segmented label { position: relative; padding: 6px 11px; border-radius: 6px; color: var(--muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--ink); color: #fff; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

.calc__inputs { display: grid; gap: 18px; }
.range { display: grid; gap: 8px; }
.range__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.range__head label { font-size: 0.86rem; font-weight: 600; }
.range__head output { font: 800 0.95rem/1 var(--font-head); color: var(--blue); font-variant-numeric: tabular-nums; }
.range input[type="range"] {
  --fill: 50%;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
          appearance: none;
  cursor: pointer;
}
.range input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--fill), var(--paper-2) var(--fill));
}
.range input[type="range"]::-moz-range-track { height: 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper-2); }
.range input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--blue); }
.range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -7.5px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 2px 2px 0 var(--ink);
}
.range input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 50%; background: var(--lime); box-shadow: 2px 2px 0 var(--ink); }
.range input[type="range"]:focus-visible { outline: none; }
.range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--blue); }

.calc__result {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}
.calc__label { color: #a5aab4; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.calc__profit { font: 800 clamp(1.7rem, 2.8vw, 2.2rem)/1 var(--font-head); color: var(--lime); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.calc__result dl { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid #333844; font-size: 0.82rem; }
.calc__result dl div { display: flex; justify-content: space-between; gap: 10px; }
.calc__result dt { color: #a5aab4; }
.calc__result dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.calc__note { color: #7d828c; font-size: 0.7rem; line-height: 1.45; }

/* ---------- payments + API ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: stretch; }
.box {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.box h3 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 800; }
.box h3 i { color: var(--blue); font-size: 0.9rem; }
.box > p { color: var(--muted); font-size: 0.88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 0.8rem;
  font-weight: 600;
}
.chips li i { color: var(--blue); font-size: 0.85rem; }
.chips .chips__more { border-style: dashed; color: var(--muted); }

.box--code { background: var(--ink); color: #e6e8ec; padding: 0; overflow: hidden; gap: 0; }
.code__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #2c313b; }
.code__head h3 { color: #fff; margin-right: auto; }
.code__head h3 i { color: var(--lime); }
.code__tabs { display: flex; gap: 4px; }
.code__tab {
  padding: 5px 10px;
  border: 1.5px solid #3a3f4a;
  border-radius: 6px;
  background: transparent;
  color: #a5aab4;
  font: 600 0.74rem/1 var(--font-body);
  cursor: pointer;
}
.code__tab[aria-selected="true"] { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.code__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1.5px solid #3a3f4a;
  border-radius: 6px;
  background: transparent;
  color: #e6e8ec;
  font: 600 0.74rem/1 var(--font-body);
  cursor: pointer;
}
.code__copy:hover { border-color: #fff; }
.code__copy.is-done { border-color: var(--lime); color: var(--lime); }
.code__pane {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font: 500 0.76rem/1.7 ui-monospace, "Cascadia Code", Consolas, monospace;
  color: #e6e8ec;
}
.code__pane[hidden] { display: none; }
.code__pane .s { color: var(--lime); }
.code__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #2c313b;
  font-size: 0.76rem;
}
.code__foot span { padding: 2px 7px; border-radius: 5px; background: var(--blue); color: #fff; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.code__foot code, .code__actions code { font: 500 0.76rem/1.4 ui-monospace, Consolas, monospace; }
.code__actions { padding: 0 16px 14px; color: #a5aab4; font-size: 0.76rem; }
.code__actions code { margin-left: 4px; padding: 2px 6px; border-radius: 5px; background: #262a33; color: #e6e8ec; }

/* ---------- what's new ---------- */
.updates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.update {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.update:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.update time {
  justify-self: start;
  margin-bottom: 4px;
  padding: 3px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.68rem;
  font-weight: 700;
}
.update h3 { font-size: 0.98rem; font-weight: 700; }
.update p { color: var(--muted); font-size: 0.86rem; }

/* ---------- responsive for the sections above ---------- */
@media (max-width: 1024px) {
  .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .calc__intro { grid-column: 1 / -1; }
  .personas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .tour, .duo { grid-template-columns: minmax(0, 1fr); }
  .updates { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tabs__list { width: 100%; }
  .tabs__tab { flex: 1 1 auto; justify-content: center; padding: 7px 10px; }
  .form-mock__row { grid-template-columns: 1fr; }
  .mini-table th:nth-child(3), .mini-table td:nth-child(3) { display: none; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .personas { grid-template-columns: 1fr; }
  .code__head { flex-wrap: wrap; }
}

/* ==========================================================================
   Auth pages (login / signup)
   ========================================================================== */
.auth-page { min-height: 100vh; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); min-height: 100vh; }
.auth__main { display: flex; flex-direction: column; gap: 22px; padding: 22px clamp(16px, 4vw, 48px); }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth__back { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 0.84rem; font-weight: 600; }
.auth__back i { font-size: 0.75rem; transition: transform 0.2s var(--ease); }
.auth__back:hover { color: var(--ink); text-decoration: none; }
.auth__back:hover i { transform: translateX(-2px); }

.auth__card {
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: clamp(20px, 3vw, 28px);
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.auth__card--wide { max-width: 520px; }
.auth__head { display: grid; gap: 6px; margin-bottom: 18px; }
.auth__head h1 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); font-weight: 800; letter-spacing: -0.03em; }
.auth__head p { color: var(--muted); font-size: 0.88rem; }
.auth__switch { margin-top: 16px; color: var(--muted); font-size: 0.86rem; text-align: center; }
.auth__switch a { font-weight: 700; }
.auth__divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--subtle); font-size: 0.78rem; font-weight: 600; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; color: var(--subtle); font-size: 0.78rem; }
.auth__legal a { color: var(--muted); }

/* brand panel */
.auth__side {
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(24px, 4vw, 52px);
  border-left: var(--border);
  background: var(--blue);
  color: #fff;
  overflow: hidden;
}
.auth__side::before {
  /* subtle dotted texture */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}
.auth__side-inner { position: relative; display: grid; gap: 18px; max-width: 420px; margin-inline: auto; }
.auth__side .eyebrow { justify-self: start; color: var(--ink); }
.auth__side h2 { color: #fff; font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; }
.auth__perks { display: grid; gap: 9px; font-size: 0.9rem; }
.auth__perks li { display: flex; align-items: center; gap: 10px; }
.auth__perks i {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.6rem;
  flex: none;
}
.auth__price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.auth__price span { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.auth__price strong { font: 800 1.6rem/1 var(--font-head); color: var(--blue); }
.auth__price small { color: var(--subtle); font: 500 0.8rem var(--font-body); }
.auth__quote { margin: 0; padding: 16px; border: 1.5px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius); background: rgba(255, 255, 255, 0.08); }
.auth__quote blockquote { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.55; }
.auth__quote figcaption { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.75); font-size: 0.78rem; }
.auth__quote strong { display: block; color: #fff; font-size: 0.86rem; }

/* reset password: icon badge, success state, side-panel steps + help card */
.auth__badge {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 6px;
  border: var(--border);
  border-radius: 12px;
  background: var(--lime);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 1.05rem;
  transform: rotate(-4deg);
}
.auth__badge--ok { background: var(--blue-soft); color: var(--blue); }
.auth__done { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 6px 0 2px; }
.auth__done h1 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); font-weight: 800; letter-spacing: -0.03em; }
.auth__done p { color: var(--ink-2); font-size: 0.9rem; }
.auth__done .btn { margin-top: 8px; }
.auth__muted { color: var(--subtle) !important; font-size: 0.8rem !important; }

.auth__steps { display: grid; gap: 10px; counter-reset: none; }
.auth__steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
}
.auth__steps strong { display: block; color: #fff; font-size: 0.92rem; }
.auth__step-num {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border: var(--border);
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 800 0.8rem/1 var(--font-head);
  flex: none;
}
.auth__help {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow);
  font-size: 0.84rem;
}
.auth__help strong { display: block; color: var(--ink); font-size: 0.9rem; }

/* alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 500;
}
.alert i { margin-top: 2px; }
.alert--error { background: var(--coral-soft); color: #9c2a14; }
.alert--success { background: var(--lime-soft); color: var(--lime-ink); }

/* form controls */
.form { display: grid; gap: 14px; }
.form__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
/* a field is always: label row + one input. align-content:start stops the grid row from
   stretching the input when the neighbouring column is taller. */
.form__group { display: grid; gap: 6px; align-content: start; }
.form__label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.form__label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; }
.form__link { font-size: 0.8rem; font-weight: 600; }
.form__badge {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--subtle);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.3;
}
.form__hint { color: var(--subtle); font-size: 0.72rem; white-space: nowrap; }
.form__captcha { overflow-x: auto; }

.input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 4px 0 12px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: box-shadow 0.15s, transform 0.15s var(--ease);
}
.input > i { color: var(--subtle); font-size: 0.85rem; width: 14px; text-align: center; flex: none; }
.input input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 500 0.9rem/1 var(--font-body);
}
.input input::placeholder { color: #a4a8b0; font-weight: 400; }
.input:focus-within { box-shadow: var(--shadow-sm); transform: translate(-1px, -1px); }
.input:focus-within > i { color: var(--blue); }
/* show the invalid state only after the visitor has interacted with the field */
.input:has(input:user-invalid) { background: var(--coral-soft); }
.input__eye {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}
.input__eye:hover { background: var(--paper-2); color: var(--ink); }
.input__state { width: 28px; text-align: center; font-size: 0.85rem; flex: none; }
.input__state.is-ok { color: #3f7d00; }
.input__state.is-bad { color: var(--coral); }

.strength { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; }
.strength__bars i { height: 5px; border-radius: 3px; background: var(--line); transition: background-color 0.2s; }
.strength__text { min-width: 110px; color: var(--subtle); font-size: 0.74rem; font-weight: 600; text-align: right; }
.strength[data-level="1"] .strength__bars i:nth-child(-n + 1) { background: var(--coral); }
.strength[data-level="2"] .strength__bars i:nth-child(-n + 2) { background: #ffb02e; }
.strength[data-level="3"] .strength__bars i:nth-child(-n + 3) { background: var(--blue); }
.strength[data-level="4"] .strength__bars i { background: #4f9d00; }

.check { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border: var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  font-size: 0.62rem;
  flex: none;
  transition: background-color 0.15s, color 0.15s;
}
.check input:checked + .check__box { background: var(--lime); color: var(--ink); }
.check input:focus-visible + .check__box { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn[data-submit].is-loading { pointer-events: none; opacity: 0.85; }
.btn[data-submit].is-loading i { animation: spin 0.8s linear infinite; }
.btn[data-submit].is-loading i::before { content: "\f110"; } /* fa-spinner */
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__side { border-left: 0; border-top: var(--border); }
}
@media (max-width: 520px) {
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .auth__card { box-shadow: var(--shadow); }
}

/* ==========================================================================
   App (logged-in) layout + dashboard  — calm version
   Flat sidebar, balance chip in the top bar, slim stats strip, quiet tables.
   ========================================================================== */
.app-page { background: var(--paper); }
.hide-sm { display: inline-flex; }
.muted { color: var(--subtle); }

.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }

/* ---------- sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow-y: auto;
}
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.side__head .logo span { font-size: 1rem; }
.side__close { display: none; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }

.side__nav, .side__foot { display: grid; gap: 2px; }
.side__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.side__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.side__link i { width: 16px; font-size: 0.82rem; text-align: center; }
.side__link:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.side__link.is-active { background: var(--paper-2); color: var(--ink); font-weight: 650; }
.side__link.is-active::before {
  /* slim lime marker */
  content: "";
  position: absolute;
  left: -12px; top: 8px; bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--lime);
  box-shadow: 1px 0 0 var(--ink);
}
.side__count { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 0.66rem; font-weight: 700; }
.side__overlay { position: fixed; inset: 0; z-index: 59; background: rgba(20, 22, 28, 0.4); }

/* ---------- top bar ---------- */
.app__main { display: flex; flex-direction: column; min-width: 0; }
.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.appbar__menu { display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.appbar__title { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.appbar__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.appbar__avatar:hover { text-decoration: none; }
.appbar__avatar .avatar { width: 34px; height: 34px; font-size: 0.8rem; }

.balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 4px 0 12px;
  border: var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}
.balance:hover { text-decoration: none; box-shadow: var(--shadow-sm); }
.balance__label { color: var(--subtle); font-size: 0.72rem; font-weight: 600; }
.balance strong { font: 800 0.95rem/1 var(--font-head); font-variant-numeric: tabular-nums; }
.balance__add { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); font-size: 0.7rem; }
.balance.is-low { background: var(--coral-soft); }
.balance.is-low .balance__add { background: var(--coral); color: #fff; }

.app__content { display: grid; gap: 16px; align-content: start; width: 100%; max-width: 1120px; padding: clamp(16px, 3vw, 28px); padding-bottom: 40px; }

/* ---------- notice (one at a time) ---------- */
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #f3c2b5;
  border-radius: var(--radius);
  background: var(--coral-soft);
  color: var(--ink-2);
  font-size: 0.86rem;
}
.notice > i { color: var(--coral); }
.notice:hover { text-decoration: none; border-color: var(--coral); }
.notice__go { margin-left: auto; color: #c53a1f; font-weight: 700; white-space: nowrap; }
.notice__go i { font-size: 0.7rem; }

/* ---------- stats strip ---------- */
.strip {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.strip div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 14px 18px; border-left: 1px solid var(--line); }
.strip div:first-child { border-left: 0; }
.strip dt { color: var(--subtle); font-size: 0.76rem; font-weight: 600; }
.strip dd { font: 800 1.3rem/1.15 var(--font-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.strip dd.is-alert { color: #c53a1f; }

/* ---------- content block + table ---------- */
.block { border: var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.block__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.block__head h2 { font-size: 1rem; font-weight: 800; }
.block__tools { display: flex; align-items: center; gap: 8px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 200px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.search i { color: var(--subtle); font-size: 0.75rem; }
.search input { width: 100%; height: 32px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 0.84rem var(--font-body); }
.search:focus-within { border-color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.filters__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}
.filters__item span { padding: 0 6px; border-radius: 999px; background: var(--paper-2); color: var(--subtle); font-size: 0.7rem; line-height: 1.6; }
.filters__item:hover { color: var(--ink); text-decoration: none; background: var(--paper); }
.filters__item.is-active { border-color: var(--ink); background: var(--lime); color: var(--ink); }
.filters__item.is-active span { background: rgba(20, 22, 28, 0.12); color: var(--ink); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.table th {
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:not(.ns-row):hover td { background: #fdfcf9; }
.table__actions { text-align: right; white-space: nowrap; }
.table__actions > * + * { margin-left: 6px; }
.table__none { padding: 16px; color: var(--muted); font-size: 0.86rem; text-align: center; }

.cell-title { display: block; overflow: hidden; max-width: 260px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.cell-title--plain { font-weight: 600; }
.cell-sub { display: block; margin-top: 1px; color: var(--subtle); font-size: 0.75rem; white-space: nowrap; }
.cell-sub.is-warn { color: #a36a00; font-weight: 600; }
.cell-sub.is-bad { color: #c53a1f; font-weight: 600; }
.cell-text { display: block; overflow: hidden; max-width: 220px; white-space: nowrap; text-overflow: ellipsis; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.status--active { background: var(--lime-soft); color: var(--lime-ink); }
.status--active::before { background: #4f9d00; }
.status--pending { background: var(--coral-soft); color: #b3331a; }
.status--pending::before { background: var(--coral); }
.status--under-construction { background: var(--blue-soft); color: var(--blue-dark); }
.status--under-construction::before { background: var(--blue); }
.status--frozen { background: #e8f1ff; color: #2c5fa8; }
.status--frozen::before { background: #5aa0ff; }
.status--inactive, .status--removed { color: var(--subtle); }

.icon-btn {
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font: 700 0.68rem/1 var(--font-body);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { border-color: var(--ink); color: var(--ink); }
.ns-row td { padding: 10px 16px; background: var(--paper); }
.ns-row td { display: table-cell; }
.ns-row__label { margin-right: 10px; color: var(--subtle); font-size: 0.76rem; font-weight: 600; }
.ns__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 6px 2px 0;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.ns__item code { font: 500 0.76rem/1.4 ui-monospace, Consolas, monospace; }
.ns__item i { color: var(--subtle); font-size: 0.7rem; }
.ns__item:hover { border-color: var(--ink); }
.ns__item.is-done { border-color: #4f9d00; background: var(--lime-soft); }
.ns__item.is-done i::before { content: "\f00c"; }

.empty { display: grid; justify-items: center; gap: 6px; padding: 36px 20px; text-align: center; }
.empty__art {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 6px;
  border: var(--border);
  border-radius: 14px;
  background: var(--lime);
  font-size: 1.1rem;
  transform: rotate(-6deg);
}
.empty h3 { font-size: 1rem; font-weight: 800; }
.empty p { max-width: 24rem; margin-bottom: 6px; color: var(--muted); font-size: 0.86rem; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; padding: 12px; border-top: 1px solid var(--line); }
.pager a, .pager span {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}
.pager a:hover { border-color: var(--ink); text-decoration: none; }
.pager a.is-current { border-color: var(--ink); background: var(--lime); }
.pager span { border-color: transparent; color: var(--subtle); }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed;
    top: 0; left: 0;
    z-index: 60;
    width: min(280px, 84vw);
    border-right: var(--border);
    transform: translateX(-105%);
    transition: transform 0.25s var(--ease);
  }
  .side.is-open { transform: none; }
  .side__close { display: grid; place-items: center; }
  .appbar__menu { display: grid; place-items: center; }
  .app__content { padding-bottom: 92px; }

  .tabbar {
    position: fixed;
    left: 10px; right: 10px; bottom: 10px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 5px;
    border: var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }
  .tabbar a, .tabbar button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 6px 2px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--subtle);
    font: 600 0.64rem/1 var(--font-body);
    cursor: pointer;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar i { font-size: 0.95rem; }
  .tabbar .is-active { color: var(--ink); background: var(--paper-2); }
  .tabbar b { position: absolute; top: 2px; right: 22%; min-width: 15px; padding: 1px 4px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 0.56rem; }
  .tabbar .tabbar__main {
    justify-self: center;
    place-items: center;
    width: 42px; height: 42px;
    border: var(--border);
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
  }
}

/* tables become stacked rows on small screens */
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .balance__label { display: none; }
  .strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip div { border-left: 1px solid var(--line); border-top: 1px solid var(--line); padding: 12px 14px; }
  .strip div:nth-child(odd) { border-left: 0; }
  .strip div:nth-child(-n + 2) { border-top: 0; }
  .strip dd { font-size: 1.15rem; }
  .block__tools, .search { width: 100%; }
  .block__tools .search { flex: 1; }
  .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .table td[data-label]::before { content: attr(data-label); color: var(--subtle); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; flex: none; }
  .table td:first-child { display: block; padding-bottom: 6px; }
  .table td:first-child::before { display: none; }
  .table td > .cell-title, .table td > .cell-sub { text-align: right; }
  .table td:first-child > .cell-title, .table td:first-child > .cell-sub { text-align: left; }
  .table td.table__actions { justify-content: flex-end; gap: 6px; padding-top: 8px; }
  .table__actions > * + * { margin-left: 0; }
  .ns-row { padding: 0 !important; }
  .ns-row td { display: block; padding: 10px 16px; }
  .cell-title { max-width: 100%; }
}

/* ==========================================================================
   Invoice detail (view_invoice)
   ========================================================================== */
.back-link { display: inline-flex; align-items: center; gap: 7px; justify-self: start; color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.back-link i { font-size: 0.72rem; }
.back-link:hover { color: var(--ink); text-decoration: none; }

.invoice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }

/* the document */
.invoice {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 32px);
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: 0.88rem;
}
.invoice__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.invoice__title { display: flex; align-items: center; gap: 10px; }
.invoice__title h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }

.invoice__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.invoice__meta div { display: grid; gap: 3px; min-width: 0; }
.invoice__meta dt { color: var(--subtle); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.invoice__meta dd { font-weight: 650; }
.invoice__meta dd.is-bad { color: #c53a1f; }
.invoice__domain { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.invoice__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--paper); }
.invoice__parties h3 { margin-bottom: 4px; color: var(--subtle); font: 700 0.7rem/1.2 var(--font-body); letter-spacing: 0.05em; text-transform: uppercase; }
.invoice__parties p { color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere; }

.invoice__items { width: 100%; border-collapse: collapse; }
.invoice__items th { padding: 8px 0; border-bottom: 1.5px solid var(--ink); color: var(--subtle); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; }
.invoice__items td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.invoice__items td:first-child { padding-right: 16px; }
.invoice__items .num { width: 120px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.invoice__totals { display: grid; gap: 6px; width: min(320px, 100%); margin-left: auto; }
.invoice__totals div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.invoice__totals dt { color: var(--muted); }
.invoice__totals dd { font-weight: 650; font-variant-numeric: tabular-nums; }
.invoice__totals .is-discount dd { color: #3f7d00; }
.invoice__totals code { padding: 1px 6px; border-radius: 5px; background: var(--lime-soft); color: var(--lime-ink); font: 600 0.74rem ui-monospace, Consolas, monospace; }
.invoice__grand { margin-top: 6px; padding-top: 10px; border-top: 1.5px solid var(--ink); }
.invoice__grand dt { color: var(--ink); font-weight: 700; }
.invoice__grand dd { font: 800 1.35rem/1 var(--font-head); letter-spacing: -0.02em; }
.invoice__approx dd { color: var(--subtle); font-size: 0.78rem; font-weight: 500; }
.invoice__foot { padding-top: 16px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 0.78rem; }
.link-btn { margin-left: 6px; padding: 0; border: 0; background: none; color: #c53a1f; font: 600 0.74rem var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* the payment card */
.pay {
  position: sticky;
  top: 74px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.pay__amount { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pay__amount span { color: var(--subtle); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.pay__amount strong { font: 800 1.9rem/1.1 var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pay__amount small { color: var(--muted); font-size: 0.8rem; }
.pay__amount small.is-bad { color: #c53a1f; font-weight: 600; }
.pay__form { display: grid; gap: 12px; }
.pay__hint, .pay__none { color: var(--muted); font-size: 0.8rem; }
.pay__secure { color: var(--subtle); font-size: 0.74rem; }
.pay__secure i { margin-right: 4px; }

.methods { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.methods legend { margin-bottom: 8px; padding: 0; font-size: 0.82rem; font-weight: 700; }
.method { display: block; cursor: pointer; }
.method input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.method__box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s, background-color 0.15s;
}
.method:hover .method__box { border-color: var(--subtle); }
.method input:checked + .method__box { border-color: var(--ink); background: var(--lime-soft); box-shadow: 2px 2px 0 var(--ink); }
.method input:focus-visible + .method__box { outline: 2px solid var(--blue); outline-offset: 2px; }
.method__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); font-size: 0.8rem; flex: none; }
.method input:checked + .method__box .method__icon { background: var(--lime); color: var(--ink); }
.method__text { display: grid; min-width: 0; line-height: 1.3; }
.method__text strong { overflow: hidden; font-size: 0.86rem; white-space: nowrap; text-overflow: ellipsis; }
.method__text small { color: var(--subtle); font-size: 0.74rem; }
.method__text em { color: #c53a1f; font-style: normal; font-weight: 600; }

.coupon { border-top: 1px solid var(--line); padding-top: 12px; }
.coupon summary { color: var(--blue); font-size: 0.84rem; font-weight: 600; cursor: pointer; list-style: none; }
.coupon summary::-webkit-details-marker { display: none; }
.coupon summary::before { content: "+ "; }
.coupon[open] summary::before { content: "\2212  "; }
.coupon__form { display: flex; gap: 8px; margin-top: 10px; }
.coupon__form input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 600 0.86rem var(--font-body);
  text-transform: uppercase;
  outline: 0;
}
.coupon__form input:focus { box-shadow: var(--shadow-sm); }
.coupon__msg { margin-top: 8px; font-size: 0.8rem; font-weight: 600; }
.coupon__msg.is-ok { color: #3f7d00; }
.coupon__msg.is-bad { color: #c53a1f; }
.coupon__applied { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--lime-soft); color: var(--lime-ink); font-size: 0.8rem; }
.coupon__applied code { font: 700 0.78rem ui-monospace, Consolas, monospace; }

.pay__done { display: grid; gap: 10px; justify-items: center; text-align: center; }
.pay__done-icon { display: grid; place-items: center; width: 46px; height: 46px; border: var(--border); border-radius: 50%; background: var(--lime); font-size: 1.1rem; box-shadow: var(--shadow-sm); }
.pay__done h3 { font-size: 1.1rem; font-weight: 800; }
.pay__done p { color: var(--muted); font-size: 0.86rem; margin-bottom: 4px; }

@media (max-width: 1024px) {
  .invoice-layout { grid-template-columns: minmax(0, 1fr); }
  .pay { position: static; order: -1; }   /* pay box first on smaller screens */
}
@media (max-width: 600px) {
  .invoice__meta { grid-template-columns: 1fr 1fr; }
  .invoice__parties { grid-template-columns: 1fr; }
  .invoice__items .num { width: 90px; }
}

/* print: only the invoice document, plain and flat */
@media print {
  @page { margin: 14mm; }
  body, .app-page { background: #fff !important; }
  .side, .side__overlay, .appbar, .tabbar, .no-print, .back-link, .alert, .skip { display: none !important; }
  .app { display: block; }
  .app__content { padding: 0; max-width: none; }
  .invoice-layout { display: block; }
  .invoice { border: 0; padding: 0; box-shadow: none; }
  .invoice__parties { background: none; padding: 0; }
  .status { border: 1px solid #999; }
  a { color: inherit; text-decoration: none; }
}

/* ==========================================================================
   Add funds
   ========================================================================== */
.funds { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.funds__form { display: grid; gap: 16px; padding: 16px; }
.methods__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }

/* money input: currency symbol in front, code at the end */
.input--money { padding-right: 12px; }
.input__prefix { color: var(--subtle); font: 700 1rem/1 var(--font-head); flex: none; }
.input--money input { font: 700 1.05rem/1 var(--font-head); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.input__suffix { padding: 3px 7px; border-radius: 6px; background: var(--paper-2); color: var(--muted); font-size: 0.72rem; font-weight: 700; flex: none; }
/* hide the number spinners: the quick amounts do that job */
.input--money input::-webkit-outer-spin-button,
.input--money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input--money input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.amounts { display: flex; flex-wrap: wrap; gap: 6px; }
.amounts__btn {
  min-height: 30px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: 600 0.8rem var(--font-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.amounts__btn:hover { border-color: var(--ink); }
.amounts__btn.is-active { border-color: var(--ink); background: var(--lime); color: var(--ink); }
.amounts__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.funds__note { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--ink-2); font-size: 0.82rem; line-height: 1.55; }
.funds__note > i { margin-top: 3px; color: var(--blue); }
.funds__note img { max-width: 100%; height: auto; border-radius: 6px; }
.funds__note p { margin: 0; }

.funds__summary { display: grid; gap: 4px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--paper); font-size: 0.84rem; }
.funds__summary div { display: flex; justify-content: space-between; gap: 12px; }
.funds__summary dt { color: var(--muted); }
.funds__summary dd { font-weight: 700; font-variant-numeric: tabular-nums; }

/* side column */
.funds__side { display: grid; gap: 12px; }
.wallet {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
}
.wallet__label { color: rgba(255, 255, 255, 0.75); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.wallet__amount { font: 800 1.9rem/1.15 var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wallet__sub { color: rgba(255, 255, 255, 0.75); font-size: 0.78rem; }
.funds__help { display: grid; gap: 6px; justify-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 0.82rem; }
.funds__help p { color: var(--muted); line-height: 1.5; }

@media (max-width: 1024px) {
  .funds { grid-template-columns: minmax(0, 1fr); }
  .funds__side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* payment history on phones: two compact lines per payment (id + amount, method + date) */
@media (max-width: 760px) {
  .table.table--ledger tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 10px 16px; }
  .table.table--ledger td { display: block; width: auto; padding: 0; }
  .table.table--ledger td::before { display: none; }
  .table.table--ledger td[data-label="Amount"] { grid-column: 2; grid-row: 1; }
  .table.table--ledger td[data-label="Method"] { grid-column: 1; grid-row: 2; color: var(--subtle); font-size: 0.78rem; }
  .table.table--ledger td[data-label="Date"] { grid-column: 2; grid-row: 2; color: var(--subtle); font-size: 0.78rem; text-align: right; }
  .table.table--ledger td[data-label="Date"] .cell-title { font-weight: 500; }
  .table.table--ledger td .cell-sub { display: none; }
}

/* ==========================================================================
   Support: ticket list, new ticket, conversation
   ========================================================================== */
.notice--info { border-color: #cfd3ff; background: var(--blue-soft); }
.notice--info > i { color: var(--blue); }

.support { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.support__new { position: sticky; top: 74px; }

/* ticket rows */
.tickets li + li { border-top: 1px solid var(--line); }
.ticket { display: flex; align-items: center; gap: 12px; padding: 11px 16px; color: var(--ink); transition: background-color 0.15s; }
.ticket:hover { background: #fdfcf9; text-decoration: none; }
.ticket__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); font-size: 0.8rem; flex: none; }
.ticket__main { display: grid; gap: 1px; min-width: 0; flex: 1; }
.ticket__subject { overflow: hidden; font-size: 0.9rem; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.ticket__preview { overflow: hidden; color: var(--muted); font-size: 0.8rem; white-space: nowrap; text-overflow: ellipsis; }
.ticket__preview b { color: var(--blue-dark); font-weight: 700; }
.ticket__id { color: var(--subtle); font-size: 0.76rem; font-weight: 500; }
.ticket__side { display: grid; justify-items: end; gap: 3px; flex: none; }
.ticket__time { color: var(--subtle); font-size: 0.72rem; white-space: nowrap; }
.ticket__go { color: var(--subtle); font-size: 0.7rem; flex: none; }
.ticket.is-unread { box-shadow: inset 3px 0 0 var(--blue); }
.ticket.is-unread .ticket__icon { background: var(--lime); color: var(--ink); }
.ticket.is-unread .ticket__subject { font-weight: 800; }

/* new ticket form */
.support__form { display: grid; gap: 14px; padding: 16px; }
.topics { margin: 0; padding: 0; border: 0; }
.topics legend { margin-bottom: 8px; padding: 0; font-size: 0.82rem; font-weight: 600; }
.topics__grid { display: flex; flex-wrap: wrap; gap: 6px; }
.topic { cursor: pointer; }
.topic input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topic span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.15s, background-color 0.15s;
}
.topic span i { color: var(--subtle); font-size: 0.74rem; }
.topic:hover span { border-color: var(--subtle); }
.topic input:checked + span { border-color: var(--ink); background: var(--lime); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.topic input:checked + span i { color: var(--ink); }
.topic input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 400 0.9rem/1.55 var(--font-body);
  resize: vertical;
  outline: 0;
  transition: box-shadow 0.15s, transform 0.15s var(--ease);
}
.textarea::placeholder { color: #a4a8b0; }
.textarea:focus { box-shadow: var(--shadow-sm); transform: translate(-1px, -1px); }
.form__hint.is-ok { color: #3f7d00; }
.support__limit { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px 16px; background: var(--paper); color: var(--muted); font-size: 0.84rem; line-height: 1.5; }
.support__limit > i { margin-top: 3px; color: var(--subtle); }

/* conversation */
.convo__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.convo__head h2 { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.convo__meta { margin-top: 2px; color: var(--subtle); font-size: 0.78rem; }
.thread { display: grid; gap: 14px; padding: 18px 16px; background: var(--paper); }
.thread__none { color: var(--muted); font-size: 0.86rem; text-align: center; }
.msg { display: flex; align-items: flex-start; gap: 10px; max-width: min(640px, 88%); }
.msg--me { flex-direction: row-reverse; margin-left: auto; }
.msg__avatar { display: grid; place-items: center; width: 30px; height: 30px; border: var(--border); border-radius: 50%; background: var(--lime); font: 700 0.78rem/1 var(--font-head); flex: none; }
.msg--support .msg__avatar { background: var(--blue); color: #fff; font-size: 0.72rem; }
.msg__body { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border-radius: 12px; }
.msg--me .msg__body { border: 1.5px solid #cfd3ff; border-top-right-radius: 4px; background: var(--blue-soft); }
.msg--support .msg__body { border: var(--border); border-top-left-radius: 4px; background: var(--surface); box-shadow: var(--shadow-sm); }
.msg__who { display: flex; align-items: baseline; gap: 8px; font-size: 0.74rem; }
.msg--me .msg__who { justify-content: flex-end; }
.msg__who strong { font-size: 0.78rem; }
.msg__who time { color: var(--subtle); }
.msg__text { font-size: 0.88rem; line-height: 1.55; overflow-wrap: anywhere; }
.msg__text a { color: var(--blue); text-decoration: underline; }
.msg__file { font-size: 0.78rem; font-weight: 600; }
.convo__wait { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 0.8rem; }
.convo__wait i { margin-right: 4px; }
.convo__reply { padding: 14px 16px; border-top: 1px solid var(--line); }
.convo__reply .alert { margin-bottom: 10px; }
.convo__reply .support__limit { margin: -14px -16px; }
.reply { display: grid; gap: 8px; }
.reply__input { min-height: 84px; max-height: 260px; }
.reply__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-2); font: 600 0.66rem ui-monospace, Consolas, monospace; }

@media (max-width: 1024px) {
  .support { grid-template-columns: minmax(0, 1fr); }
  .support__new { position: static; order: -1; }   /* stacked: the form comes first, then the list */
}
@media (max-width: 600px) {
  .msg { max-width: 94%; }
  .reply__bar .form__hint { display: none; }
  .reply__bar .btn { width: 100%; }
  .ticket { padding: 12px 14px; }
  .ticket__go { display: none; }
}

/* ==========================================================================
   Account
   ========================================================================== */
.account { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.account__main, .account__side { display: grid; gap: 16px; min-width: 0; }
.account__form { display: grid; gap: 14px; padding: 16px; }
.account__actions { display: flex; justify-content: flex-end; }
.block__foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 0.8rem; }
.form__note { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.form__note i { margin-right: 4px; }

/* profile header + details list */
.profile { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.profile__avatar { display: grid; place-items: center; width: 52px; height: 52px; border: var(--border); border-radius: 50%; background: var(--lime); font: 800 1.3rem/1 var(--font-head); box-shadow: var(--shadow-sm); flex: none; }
.profile__who { min-width: 0; }
.profile__who h2 { overflow: hidden; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; text-overflow: ellipsis; }
.profile__who p { color: var(--subtle); font-size: 0.82rem; overflow-wrap: anywhere; }
.details { display: grid; }
.details div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 16px; }
.details div + div { border-top: 1px solid var(--line); }
.details dt { color: var(--subtle); font-size: 0.78rem; font-weight: 600; }
.details dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; font-size: 0.88rem; font-weight: 500; }
.details__value { overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.chip--ok { border-color: transparent; background: var(--lime-soft); color: var(--lime-ink); }

/* select with the theme's input look */
.select { position: relative; }
.select select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 500 0.86rem var(--font-body);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: 0;
  transition: box-shadow 0.15s;
}
.select select:focus { box-shadow: var(--shadow-sm); }
.select > i { position: absolute; top: 50%; right: 12px; color: var(--subtle); font-size: 0.7rem; transform: translateY(-50%); pointer-events: none; }
.account__form > .btn { justify-self: start; }

/* copyable values (API URL / key) */
.copyline { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.copyline code { flex: 1; min-width: 0; overflow: hidden; font: 600 0.78rem/1.9 ui-monospace, Consolas, monospace; white-space: nowrap; text-overflow: ellipsis; }
.copyline .icon-btn { flex: none; }
[data-copy-text].is-done { border-color: #4f9d00; color: #3f7d00; }

/* one-time "new API key" box */
.keybox { display: grid; gap: 10px; padding: 14px 16px; border: var(--border); border-radius: var(--radius); background: var(--lime-soft); box-shadow: var(--shadow-sm); }
.keybox strong { font-size: 0.92rem; }
.keybox p { color: var(--lime-ink); font-size: 0.8rem; }
.keybox__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.keybox__row code { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font: 600 0.82rem ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }

/* recent activity */
.activity li { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.activity li + li { border-top: 1px solid var(--line); }
.activity__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); font-size: 0.72rem; flex: none; }
.activity__main { display: grid; min-width: 0; }
.activity__what { font-size: 0.84rem; font-weight: 600; }
.activity__count { margin-left: 2px; padding: 0 5px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: 0.68rem; font-weight: 700; }
.activity__meta { overflow: hidden; color: var(--subtle); font-size: 0.74rem; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 1024px) {
  .account { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .details div { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 9px 14px; }
  .account__form .form__grid { grid-template-columns: minmax(0, 1fr); }
  .account__actions .btn { width: 100%; }
}

/* ==========================================================================
   Reseller (referral link, earnings, payouts)
   ========================================================================== */
.refer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: center;
  padding: 20px;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--lime);
  box-shadow: var(--shadow);
}
.refer__tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--surface); font-size: 0.74rem; font-weight: 700; }
.refer__copy h2 { margin: 10px 0 6px; font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.refer__copy p { color: var(--lime-ink); font-size: 0.86rem; line-height: 1.5; }
.refer__link { display: grid; gap: 8px; padding: 14px; border: var(--border); border-radius: var(--radius); background: var(--surface); }
.copyline--lg { padding: 4px 4px 4px 12px; background: var(--paper); }
.copyline input { flex: 1; min-width: 0; height: 32px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 600 0.8rem ui-monospace, Consolas, monospace; }
.copyline .btn { flex: none; }
.refer__share { display: flex; align-items: center; gap: 6px; color: var(--subtle); font-size: 0.78rem; font-weight: 600; }
.refer__share .icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; font-size: 0.92rem; text-decoration: none; }
.refer__warn { margin: 0; color: #c53a1f; font-size: 0.8rem; font-weight: 600; }

.refer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* earnings card */
.earn { display: grid; gap: 12px; padding: 16px; }
.earn__now { display: grid; gap: 2px; }
.earn__now span { color: var(--subtle); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.earn__now strong { font: 800 2rem/1.1 var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.meter { height: 10px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper-2); }
.meter span { display: block; height: 100%; background: var(--blue); }
.earn__hint { margin: 0; color: var(--muted); font-size: 0.82rem; }
.btn[disabled] { opacity: 0.55; box-shadow: none; cursor: not-allowed; transform: none; }
.earn__list { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.84rem; }
.earn__list div { display: flex; justify-content: space-between; gap: 12px; }
.earn__list dt { color: var(--muted); }
.earn__list dd { font-weight: 650; font-variant-numeric: tabular-nums; }

/* how it works + rules */
.how { display: grid; gap: 12px; margin: 0; padding: 16px; list-style: none; }
.how li { display: flex; gap: 12px; align-items: flex-start; }
.how li > span { display: grid; place-items: center; width: 28px; height: 28px; border: var(--border); border-radius: 50%; background: var(--lime); font: 800 0.8rem/1 var(--font-head); flex: none; }
.how strong { display: block; font-size: 0.88rem; }
.how p { color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.rules { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.rules h3 { margin-bottom: 6px; font-size: 0.82rem; font-weight: 800; }
.rules ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; list-style: disc; color: var(--ink-2); font-size: 0.8rem; line-height: 1.5; }

@media (max-width: 1024px) {
  .refer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .refer-grid { grid-template-columns: minmax(0, 1fr); }
  .refer { padding: 16px; }
}

/* ==========================================================================
   Updates (changelog)
   ========================================================================== */
.intro h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; }
.intro p { margin-top: 2px; color: var(--muted); font-size: 0.86rem; }

.changelog { position: relative; display: grid; gap: 16px; max-width: 820px; margin: 0; padding: 0; list-style: none; }
/* the timeline runs down the gap between the date column and the cards */
.changelog::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 104px; width: 2px; border-radius: 2px; background: var(--line); }
.change { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; align-items: start; }
.change__date { display: grid; justify-items: end; padding-top: 12px; text-align: right; }
.change__day { font: 800 1.5rem/1 var(--font-head); letter-spacing: -0.03em; }
.change__month { margin-top: 2px; color: var(--subtle); font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.change__card { position: relative; display: grid; gap: 8px; padding: 16px 18px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.change__card::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -18px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}
.change.is-latest .change__card { box-shadow: var(--shadow); }
.change.is-latest .change__card::before { background: var(--lime); }
.change__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.change__head h2 { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.change__head h2 a { color: var(--ink); }
.change__head h2 a:hover { color: var(--blue); text-decoration: none; }
.change__head .status { flex: none; }
.change:target .change__card { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

/* admin HTML: keep it in the theme's type, whatever the editor pasted */
.change__body { color: var(--ink-2); font-size: 0.9rem; line-height: 1.65; overflow-wrap: anywhere; }
.change__body font, .change__body span[style] { color: inherit !important; font-family: inherit !important; font-size: inherit !important; }
.change__body p { margin: 0; }
.change__body p + p, .change__body ul, .change__body ol { margin-top: 8px; }
.change__body p:has(> br:only-child) { display: none; }
.change__body ul { padding-left: 20px; list-style: disc; }
.change__body ol { padding-left: 20px; list-style: decimal; }
.change__body a { color: var(--blue); text-decoration: underline; }
.change__body img { max-width: 100%; height: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.change__body.is-clamped { max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.change__more { justify-self: start; padding: 0; border: 0; background: none; color: var(--blue); font: 600 0.82rem var(--font-body); cursor: pointer; }
.change__more i { margin-left: 3px; font-size: 0.66rem; transition: transform 0.2s; }
.change__more[aria-expanded="true"] i { transform: rotate(180deg); }

@media (max-width: 600px) {
  .changelog::before, .change__card::before { display: none; }
  .change { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .change__date { display: flex; align-items: baseline; justify-items: start; gap: 5px; padding: 0 2px; text-align: left; }
  .change__day, .change__month { font: 700 0.78rem var(--font-body); letter-spacing: 0; color: var(--subtle); margin: 0; }
  .change__card { padding: 14px; }
}

/* ==========================================================================
   Domains: search + order, my domains, owner details
   ========================================================================== */
.finder { display: grid; gap: 12px; padding: 18px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.finder h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.finder__box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 5px 14px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  transition: box-shadow 0.15s;
}
.finder__box:focus-within { box-shadow: var(--shadow-sm); background: var(--surface); }
.finder__box > i { color: var(--subtle); flex: none; }
.finder__box input { flex: 1 1 0; width: 0; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 600 1rem var(--font-body); }
.finder__box input::placeholder { color: #a4a8b0; font-weight: 500; }
.finder__box .btn { flex: none; }
.tld-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tld-list li { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.tld-list b { font-weight: 700; }
.tld-list span { color: var(--subtle); }
.finder__results { display: grid; gap: 8px; }
.finder__results:empty { display: none; }
.finder__msg { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--paper); color: var(--muted); font-size: 0.84rem; }
.finder__msg.is-bad { background: var(--coral-soft); color: #9c2a14; }
.finder__owner { margin: 0; color: var(--muted); font-size: 0.8rem; }
.finder__owner i { margin-right: 4px; color: var(--subtle); }
.finder__owner.is-missing { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--coral-soft); color: #9c2a14; }
.finder__owner.is-missing i { color: var(--coral); }

/* one search result */
.hit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.hit.is-exact { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.hit__name { flex: 1 1 180px; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.hit__info { color: var(--subtle); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.hit__info b { color: var(--ink); font-size: 0.86rem; }
.hit.is-taken .hit__name { color: var(--subtle); font-weight: 600; text-decoration: line-through; text-decoration-color: var(--line); }
.hit__order { display: flex; align-items: center; gap: 6px; }
.hit__order select { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 500 0.78rem var(--font-body); }

/* my domains */
.domains > li + li { border-top: 1px solid var(--line); }
.dom { display: grid; gap: 8px; padding: 12px 16px; }
.dom__row { display: flex; align-items: center; gap: 12px; }
.dom__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); font-size: 0.8rem; flex: none; }
.dom__main { display: grid; flex: 1; min-width: 0; }
.dom__name { font-weight: 700; overflow-wrap: anywhere; }
.dom__meta { color: var(--subtle); font-size: 0.76rem; }
.dom__meta.is-bad { color: #c53a1f; font-weight: 600; }
.dom__row .status { flex: none; }
.dom__note { margin: 0 0 0 44px; color: var(--muted); font-size: 0.78rem; }
.dom__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-left: 44px; }
.dom__ns { min-width: 0; color: var(--subtle); font: 500 0.74rem ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.dom__ns i { margin-right: 4px; font-size: 0.68rem; }
.dom__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.dom__actions form { margin: 0; }
.dom__nsform { display: grid; gap: 10px; margin-left: 44px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.dom__nsgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dom__nsgrid .input { min-height: 38px; padding-left: 10px; }
.dom__nsgrid .input input { height: 36px; font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; }
.dom__nsbar { display: flex; justify-content: flex-end; gap: 6px; }

/* owner details form */
.owner { max-width: 760px; }
.owner__form { display: grid; gap: 14px; padding: 16px; }
.owner__grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.phone-pair { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.input--cc { padding-left: 10px; gap: 2px; }
.owner__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

@media (max-width: 600px) {
  .finder { padding: 14px; }
  .finder__box { padding-left: 10px; }
  .finder__box > i { display: none; }
  .dom { padding: 12px 14px; }
  .dom__icon { display: none; }   /* room for the name next to the status pill */
  .dom__note, .dom__foot, .dom__nsform { margin-left: 0; }
  .dom__nsgrid, .owner__grid3 { grid-template-columns: minmax(0, 1fr); }
  .hit__order { width: 100%; }
  .hit__order select { flex: 1; }
  .owner__actions .btn { flex: 1; }
}

/* ==========================================================================
   Child panels: list extras + order page
   ========================================================================== */
.dom__when { color: var(--subtle); font-size: 0.76rem; }
.dom__when i { margin-right: 4px; }
.dom__when.is-bad { color: #c53a1f; font-weight: 600; }

.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.order-side { display: grid; gap: 16px; position: sticky; top: 74px; }
.order-side .ticks li { font-size: 0.84rem; }
.earn__now strong small { margin-left: 2px; color: var(--subtle); font: 600 0.8rem var(--font-body); letter-spacing: 0; }
.order-layout .check { align-items: flex-start; font-size: 0.82rem; line-height: 1.45; }
.order-layout .check__box { margin-top: 1px; }

@media (max-width: 1024px) {
  .order-layout { grid-template-columns: minmax(0, 1fr); }
  .order-side { position: static; }
}

/* ==========================================================================
   New panel order
   ========================================================================== */
.input--action { padding-right: 4px; }
.input--action .btn { flex: none; min-height: 32px; }
.order-side .how { padding: 14px 16px; }

/* ==========================================================================
   Manage panel
   ========================================================================== */
.pm { display: grid; gap: 14px; padding: 18px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.pm__top { display: flex; align-items: center; gap: 14px; }
.pm__icon { display: grid; place-items: center; width: 46px; height: 46px; border: var(--border); border-radius: 12px; background: var(--lime); font-size: 1.05rem; flex: none; }
.pm__who { flex: 1; min-width: 0; }
.pm__who h2 { overflow: hidden; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; text-overflow: ellipsis; }
.pm__who p { margin-top: 2px; color: var(--subtle); font-size: 0.8rem; }
.pm__who p .is-bad { color: #c53a1f; font-weight: 600; }
.pm__top .status { flex: none; }
.pm__links { display: flex; flex-wrap: wrap; gap: 8px; }
.pm__ns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pm__ns .form__label { grid-column: 1 / -1; }
.pm__avatar { display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--lime-soft); font: 800 0.8rem/1 var(--font-head); flex: none; }
.pm__avatar.is-dev { border-color: var(--line); background: var(--paper-2); color: var(--subtle); font-size: 0.72rem; }
.dom__nsform input[type="password"], .dom__nsform input[type="text"][name="password"], .dom__nsform input[name="confirm_password"] { font-family: var(--font-body); font-size: 0.86rem; }

@media (max-width: 600px) {
  .pm { padding: 14px; }
  .pm__icon { display: none; }
  .pm__ns { grid-template-columns: minmax(0, 1fr); }
  .pm__links .btn { flex: 1; }
  .pm__avatar { display: none; }
}

/* ---------- reveal on scroll (only with JS) ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .plan--featured.reveal.is-visible { transform: translateY(-8px); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { justify-items: center; text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__cta, .hero__trust { justify-content: center; }
  .mock { max-width: 560px; width: 100%; margin-inline: auto; }
  .platforms { justify-content: center; text-align: center; }
  .platforms ul { justify-content: center; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats div:nth-child(4) { border-left: 0; }
  .stats div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .nav__toggle { display: grid; place-items: center; }
  .nav__actions { display: none; }
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px var(--gutter) 16px;
    border-bottom: var(--border);
    background: var(--paper);
    box-shadow: 0 6px 0 var(--ink);
  }
  .nav.is-open .nav__menu { display: flex; }
  .nav__menu > a { padding: 12px 10px; font-size: 0.95rem; }
  .nav__mobile-cta { display: grid; gap: 10px; margin-top: 8px; }

  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .reviews { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .plans { grid-template-columns: 1fr; max-width: 440px; }
  .plan--featured, html.js .plan--featured.reveal.is-visible { transform: none; }
  .plan--featured:hover { transform: translate(-2px, -2px); }
  .faq { grid-template-columns: 1fr; }
  .faq__intro { position: static; }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn { width: 100%; }
  .mock { padding-right: 0; }
  .float--a { left: 6px; top: auto; bottom: 46px; }
  .float--b { right: 6px; }
  .sticker { right: 8px; }
  .mock__kpis { gap: 6px; }
  .mock__kpis div { padding: 8px; }
  .mock__kpis small { font-size: 0.56rem; }
  .features { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; grid-row: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .stats div:nth-child(odd) { border-left: 0; }
  .stats div:nth-child(-n + 2) { border-top: 0; }
  .stats div:last-child { grid-column: 1 / -1; border-left: 0; }
  .cta__actions { width: 100%; }
  .cta__actions .btn { flex: 1 1 auto; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Document pages (terms, privacy, seller API): tinted header, sticky "on this page" card, readable text
   ========================================================================== */
.doc-hero { padding: clamp(26px, 4vw, 44px) 0 clamp(22px, 3vw, 32px); border-bottom: var(--border); background: var(--paper-2); }
.doc-hero .eyebrow i { margin-right: 4px; }
.doc-hero h1 { margin-top: 10px; font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; }
.doc-hero p:not(.eyebrow) { max-width: 600px; margin-top: 6px; color: var(--muted); font-size: 0.94rem; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: clamp(20px, 3vw, 40px); padding-top: clamp(22px, 3vw, 36px); padding-bottom: var(--section); }
.doc__toc { position: sticky; top: calc(var(--nav-h) + 16px); display: grid; gap: 8px; padding: 14px; border: var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.82rem; }
.doc__toc-title { color: var(--muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.doc__toc ol { display: grid; gap: 1px; counter-reset: toc; }
.doc__toc ol a { display: flex; gap: 8px; padding: 4px 6px; border-radius: 6px; color: var(--ink-2); counter-increment: toc; }
.doc__toc ol a::before { content: counter(toc, decimal-leading-zero); color: var(--subtle); font: 700 0.7rem/1.9 var(--font-body); }
.doc__toc ol a:hover { background: var(--lime-soft); color: var(--ink); text-decoration: none; }
.doc__toc-alt { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; padding: 7px 10px; border: var(--border); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); font-weight: 600; }
.doc__toc-alt:hover { background: var(--lime); text-decoration: none; }
.doc__body { min-width: 0; max-width: 760px; color: var(--ink-2); font-size: 0.92rem; line-height: 1.7; }
.doc__body section { scroll-margin-top: calc(var(--nav-h) + 16px); }
.doc__body section + section { margin-top: 24px; padding-top: 22px; border-top: 1.5px dashed var(--line); }
.doc__body > p + section { margin-top: 20px; }
.doc__body h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.2rem; font-weight: 800; }
.doc__body h2::before { content: ""; width: 10px; height: 10px; border: var(--border); border-radius: 3px; background: var(--lime); flex: none; }
.doc__body .endpoint h2::before { display: none; }
.doc__body h3 { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; font-size: 0.98rem; font-weight: 700; }
.doc__body h3 i { color: var(--blue); font-size: 0.85rem; }
.doc__body p + p { margin-top: 8px; }
.doc__body ul { display: grid; gap: 8px; margin: 8px 0; padding-left: 20px; list-style: square; }
.doc__body li::marker { color: var(--blue); }
.doc__body strong { color: var(--ink); }
.doc__body code { padding: 1px 6px; border-radius: 5px; background: var(--paper-2); color: var(--ink); font: 600 0.82em ui-monospace, Consolas, monospace; }
.doc__lead { margin-bottom: 18px; padding: 14px 16px; border: var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); font-size: 0.96rem; }
.doc__closing { margin-top: 22px; padding-top: 16px; border-top: 1.5px dashed var(--line); color: var(--muted); font-size: 0.84rem; }
.doc__note { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0; padding: 10px 12px; border: 1.5px solid #cfd3ff; border-radius: var(--radius); background: var(--blue-soft); color: var(--ink); font-size: 0.86rem; }
.doc__note i { margin-top: 4px; color: var(--blue); }
.doc__small { margin-top: 8px; color: var(--muted); font-size: 0.8rem; }
.doc__contact { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding: 12px 14px; border: var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink-2); font-size: 0.86rem; line-height: 1.45; transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.doc__contact:hover { text-decoration: none; transform: translate(2px, 2px); box-shadow: var(--shadow-sm); }
.doc__contact b { display: block; color: var(--ink); font-size: 0.92rem; }
.doc__contact > i:last-child { margin-left: auto; color: var(--blue); }
/* seller API */
.doc__body .facts { display: grid; margin: 4px 0 10px; padding: 0; border: var(--border); border-radius: var(--radius); background: var(--surface); list-style: none; overflow: hidden; }
.facts li { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.facts li:last-child { border-bottom: 0; }
.facts__label { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.facts .copyline code { padding: 0; background: none; }
.doc__body .code { position: relative; margin: 8px 0 0; padding: 12px 14px; overflow-x: auto; border: var(--border); border-radius: var(--radius); background: var(--ink); color: #e6e8ec; font: 500 0.78rem/1.65 ui-monospace, "Cascadia Code", Consolas, monospace; }
.doc__body .code code, .doc__body .code pre { margin: 0; padding: 0; background: none; color: inherit; font: inherit; white-space: pre; }
.doc__body div.code { padding-right: 48px; }
.doc__body .code .code__copy { position: absolute; top: 8px; right: 8px; padding: 5px 8px; }
.endpoint h2 { flex-wrap: wrap; }
.endpoint__action { padding: 3px 9px; border: var(--border); border-radius: 7px; background: var(--lime); color: var(--ink); font: 700 0.78rem ui-monospace, Consolas, monospace; letter-spacing: 0; }
.endpoint__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.endpoint__label { margin-bottom: -2px; color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.params { width: 100%; margin: 10px 0 0; border-collapse: separate; border-spacing: 0; overflow: hidden; border: var(--border); border-radius: var(--radius); background: var(--surface); font-size: 0.86rem; }
.params th { padding: 7px 12px; border-bottom: var(--border); background: var(--paper-2); color: var(--ink-2); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.params td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.params tr:first-child td { border-top: 0; }
.params td:first-child { width: 130px; white-space: nowrap; }
/* confirm email (auth layout) */
.form__msg { padding: 8px 10px; border-radius: var(--radius-sm); font-size: 0.84rem; font-weight: 600; }
.form__msg.is-ok { border: 1.5px solid var(--lime-ink); background: var(--lime-soft); color: var(--lime-ink); }
.form__msg.is-bad { border: 1.5px solid #f2b8aa; background: var(--coral-soft); color: #b0331a; }
.auth__more { margin-top: 12px; padding: 14px; border: var(--border); border-radius: var(--radius); background: var(--paper); }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc__toc { position: static; }
  .doc__toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .endpoint__grid { grid-template-columns: minmax(0, 1fr); }
  }
@media (max-width: 600px) {
  .doc__toc ol { grid-template-columns: minmax(0, 1fr); }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .params td:first-child { width: auto; }
}

/* signup: the terms line under the button (submitting the form is the agreement) */
.auth__agree { margin-top: -2px; color: var(--muted); font-size: 0.78rem; line-height: 1.5; text-align: center; }
.auth__agree a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.form__optional { margin-left: 4px; color: var(--subtle); font-size: 0.74rem; font-weight: 500; }
@media (max-width: 600px) {
  .input input, .select select, .textarea, textarea { font-size: 16px; } /* 16px+ stops iOS zooming in when a field is tapped */
}

/* ==========================================================================
   Blog (list + single post)
   Reuses the theme system: wrap, eyebrow, intro, changelog/change cards,
   status pills, pager, empty state, buttons and inputs.
   ========================================================================== */
.blog-search { display: flex; gap: 8px; max-width: 420px; margin-top: 14px; }
.blog-search .input { flex: 1; }
.blog-search .input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; color: var(--ink); }

.blog-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 16px 0 4px; font-size: 0.82rem; }
.blog-filters__label { color: var(--subtle); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.blog-filters a, .blog-filters__active { display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; }
.blog-filters a:hover { border-color: var(--ink); text-decoration: none; }
.blog-filters__active { border-color: var(--ink); background: var(--lime); color: var(--ink); }
.blog-filters__clear { border-color: transparent !important; background: none !important; color: var(--blue) !important; }

.blog-card__media { display: block; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.blog-card__media img { display: block; width: 100%; height: 180px; object-fit: cover; }
.blog-card__media:hover img { transform: scale(1.02); }
.blog-card__media img { transition: transform 0.25s var(--ease); }
.blog-card__cat { font-size: 0.74rem; font-weight: 700; }
.blog-card__cat a { color: var(--blue-dark); }
.blog-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.blog-card__tags a { padding: 1px 8px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.blog-card__tags a:hover { background: var(--lime); color: var(--ink); text-decoration: none; }

.blog-list { list-style: none; }
.blog-post__cover { margin: 14px 0 4px; }
.blog-post__cover img { display: block; width: 100%; max-height: 360px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.blog-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.8rem; }
.blog-post__nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.blog-post__nav .pager__btn { flex: 1 1 200px; justify-content: center; }
.pager__btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.84rem; }
.pager__btn:hover { text-decoration: none; border-color: var(--ink); }

/* Blog polish: search sits beside the button, filter pills never overlap the timeline */
@media (min-width: 640px) {
  .blog-search { align-items: center; }
  .blog-search .btn { flex: none; }
}
.blog-filters { padding: 12px 16px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.blog-filters + .intro { margin-top: 14px; }
.changelog.blog-list { margin-top: 14px; }
.blog-card__tags { gap: 6px; margin-top: 2px; }

/* Blog clean-up: hero search inline, single tidy toolbar, roomy cards */
.blog-hero__form { margin-top: 16px; }
.blog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 18px 0 4px; padding: 12px 16px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.82rem; }
.blog-toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.blog-toolbar__sep { width: 1px; align-self: stretch; background: var(--line); }
.blog-toolbar .blog-filters { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; display: contents; }
.changelog.blog-list { gap: 20px; margin-top: 18px; }
.changelog.blog-list .change__card { gap: 10px; padding: 20px 22px; }
.changelog.blog-list .change__body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-result { margin: 16px 0 0; }
.blog-card__tags { gap: 6px; margin-top: 2px; }
.blog-card__tags a { margin-right: 2px; }

/* Blog list v2: hero, pill bar, featured post + card grid (replaces the changelog timeline) */
.blog-hero__inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; }
.blog-hero__inner > div { min-width: 0; }
.blog-hero .blog-search { margin-top: 0; min-width: min(420px, 100%); }
.blog-wrap { padding-top: clamp(20px, 3vw, 32px); padding-bottom: var(--section); }
.blog-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.blog-pill { display: inline-flex; align-items: center; padding: 6px 14px; border: var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 0.8rem; font-weight: 650; box-shadow: var(--shadow-sm); }
.blog-pill:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.blog-pill.is-on { background: var(--lime); color: var(--ink); }
.blog-result { margin: 14px 0 0; }
.blog-result h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.blog-result p { margin-top: 2px; color: var(--muted); font-size: 0.86rem; }
.blog-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); margin-top: 18px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.blog-feature__media { display: block; min-height: 100%; }
.blog-feature__media img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.blog-feature__body { display: grid; gap: 10px; align-content: center; padding: clamp(20px, 3vw, 34px); }
.blog-feature__body h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.blog-feature__body h2 a { color: var(--ink); }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--subtle); font-size: 0.76rem; font-weight: 600; }
.blog-cat { padding: 2px 10px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-ink); font-weight: 700; }
.blog-cat:hover { text-decoration: none; }
.blog-standfirst { color: var(--ink-2); font-size: 0.95rem; line-height: 1.6; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.blog-card { display: grid; grid-template-rows: auto 1fr; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.blog-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.blog-card__media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--paper-2); }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s var(--ease); }
.blog-card:hover .blog-card__media img { transform: scale(1.03); }
.blog-card__body { display: grid; gap: 8px; align-content: start; padding: 16px 18px 18px; }
.blog-card__body h3 { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; }
.blog-card__body h3 a { color: var(--ink); }
.blog-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.blog-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.blog-tags a { padding: 1px 9px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: 0.72rem; font-weight: 650; }
.blog-tags a:hover { background: var(--lime); color: var(--ink); text-decoration: none; }
.blog-pager { margin-top: 22px; border: 0; padding: 0; }
@media (max-width: 760px) {
  .blog-feature { grid-template-columns: minmax(0, 1fr); }
  .blog-feature__media img { min-height: 0; max-height: 220px; }
}

/* Blog post v2: centered article, drop cap, pull-out cover, tidy pager */
.blog-hero__byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.blog-hero__author { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; color: var(--ink-2); }
.blog-hero__avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border: var(--border); border-radius: 50%; background: var(--lime); color: var(--ink); font: 800 0.72rem/1 var(--font-head); }
.blog-article { max-width: 760px; margin: 0 auto; }
.blog-article__cover { margin: 0 0 6px; }
.blog-article__cover img { display: block; width: 100%; max-height: 380px; object-fit: cover; border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.blog-article__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.blog-article__tags a { padding: 2px 10px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: 0.74rem; font-weight: 650; }
.blog-article__tags a:hover { background: var(--lime); color: var(--ink); text-decoration: none; }
.blog-article__body { margin-top: 16px; color: var(--ink-2); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.blog-article__body > p:first-of-type::first-letter { float: left; margin: 4px 8px 0 0; font: 800 2.6rem/0.9 var(--font-head); color: var(--ink); }
.blog-article__body font, .blog-article__body span[style] { color: inherit !important; font-family: inherit !important; font-size: inherit !important; }
.blog-article__body p { margin: 0 0 12px; }
.blog-article__body p:has(> br:only-child) { display: none; }
.blog-article__body h2 { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.blog-article__body h2::before { content: ""; width: 10px; height: 10px; border: var(--border); border-radius: 3px; background: var(--lime); flex: none; }
.blog-article__body h3 { margin: 20px 0 8px; font-size: 1.02rem; font-weight: 750; color: var(--ink); }
.blog-article__body ul { margin: 0 0 12px; padding-left: 22px; list-style: disc; }
.blog-article__body ol { margin: 0 0 12px; padding-left: 22px; list-style: decimal; }
.blog-article__body li { margin-bottom: 4px; }
.blog-article__body li::marker { color: var(--blue); font-weight: 700; }
.blog-article__body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.blog-article__body img { max-width: 100%; height: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.blog-article__body blockquote { margin: 0 0 12px; padding: 12px 16px; border-left: 4px solid var(--lime); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface); box-shadow: var(--shadow-sm); }
.blog-article__body code { padding: 1px 6px; border-radius: 5px; background: var(--paper-2); color: var(--ink); font: 600 0.85em ui-monospace, Consolas, monospace; }
.blog-article__body pre { margin: 0 0 12px; padding: 14px 16px; border: var(--border); border-radius: var(--radius-sm); background: var(--ink); color: #f4f4f5; overflow-x: auto; }
.blog-article__body pre code { padding: 0; background: none; color: inherit; }
.blog-article__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.blog-article__pager { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-article__pager .btn { flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: 10px 14px; max-width: 260px; }
.blog-article__pager-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); }
@media (max-width: 640px) {
  .blog-article__body { font-size: 0.95rem; }
  .blog-article__foot { flex-direction: column; align-items: stretch; }
  .blog-article__pager .btn { max-width: none; }
}

/* Blog post content: styled tables, first-heading trim, breathing room */
.blog-article__body table { width: 100%; margin: 0; border: 0; background: none; border-collapse: separate; border-spacing: 0; font-size: 0.88rem; }
.blog-article__body thead th { background: var(--ink); color: #fff; font-weight: 750; text-align: left; }
.blog-article__body th, .blog-article__body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.blog-article__body thead th:first-child { border-top-left-radius: var(--radius-sm); }
.blog-article__body thead th:last-child { border-top-right-radius: var(--radius-sm); }
.blog-article__body tbody tr:last-child th, .blog-article__body tbody tr:last-child td { border-bottom: 0; }
.blog-article__body tbody tr:nth-child(even) td { background: var(--paper-2); }
.blog-article__body { overflow-x: visible; }
/* Wide tables scroll inside the content card (wrapper added on save): the card keeps its
   width on every screen, only the table area scrolls. */
.blog-table-scroll { margin: 14px calc(clamp(20px, 3.5vw, 36px) * -1); padding: 0 clamp(20px, 3.5vw, 36px) 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.blog-table-scroll table { min-width: 560px; }
@media (max-width: 640px) {
  .blog-table-scroll { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
}

/* Blog post v3: cover on top, content inside a card, tables scroll within the card */
.blog-article__cover { margin: 0; }
.blog-article__cover img { display: block; width: 100%; max-height: 420px; object-fit: cover; border: var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 0; box-shadow: none; }
.blog-article__card { border: var(--border); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); padding: clamp(20px, 3.5vw, 36px); overflow: hidden; }
.blog-article:not(:has(.blog-article__cover)) .blog-article__card { border-top: var(--border); border-radius: var(--radius-lg); }
.blog-article__tags { margin: 0 0 4px; }
.blog-article__body { margin-top: 10px; overflow-x: visible; }
