/* ==========================================================================
   Adswinly — design system (Sky edition)
   Light, sky-blue and white. One stylesheet for the marketing site, the auth
   screens, the member area and the control room.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5fafe;
  --bg-tint: #eaf4fe;
  --surface: #ffffff;
  --surface-2: #f7fbff;
  --surface-3: #eef6ff;
  --line: #dce8f4;
  --line-strong: #c1d6ea;
  --text: #0c1a2b;
  --text-2: #1d3550;
  --muted: #526a86;
  --muted-2: #64748b;
  --sky: #0ea5e9;
  --sky-2: #0369a1;
  --sky-3: #075985;
  --sky-soft: #e0f2fe;
  --sky-line: #bae6fd;
  --jade: #047857;
  --jade-soft: #e7f8f1;
  --warn: #b45309;
  --warn-soft: #fef6e7;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --violet: #7c3aed;
  --slate: #64748b;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(12, 42, 78, 0.06);
  --shadow: 0 18px 40px -26px rgba(9, 58, 112, 0.35), 0 2px 6px rgba(12, 42, 78, 0.04);
  --shadow-lg: 0 30px 70px -34px rgba(9, 58, 112, 0.42), 0 2px 8px rgba(12, 42, 78, 0.05);
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar-w: 250px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: 600; line-height: 1.12; letter-spacing: -0.028em; color: var(--text); }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 600; }
h3 { font-size: 1.06rem; }
h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--sky-2); text-decoration: none; }
a:hover { color: var(--sky-3); }
img { max-width: 100%; display: block; }
code, kbd { font-family: var(--mono); font-size: 0.86em; background: var(--surface-3); color: var(--sky-3); padding: 0.12em 0.45em; border-radius: 6px; }
em { font-style: italic; }
::selection { background: var(--sky-soft); color: var(--sky-3); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.fine { color: var(--muted-2); font-size: 0.8rem; line-height: 1.55; letter-spacing: 0; }
.sm { font-size: 0.85rem; }
.center { text-align: center; }
.pos { color: var(--jade); font-variant-numeric: tabular-nums; }
.neg { color: var(--bad); font-variant-numeric: tabular-nums; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--sky-3); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }

/* ------------------------------------------------------------ typography bits */

.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--sky-2);
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.chip-eyebrow {
  border: 1px solid var(--sky-line);
  border-radius: 999px;
  padding: 6px 14px 6px 12px;
  background: var(--sky-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sky-3);
  font-weight: 600;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.14); display: inline-block; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(180deg, #0277b5 0%, #075985 100%); color: #fff; box-shadow: 0 12px 24px -14px rgba(3, 105, 161, 0.7); }
.btn-primary:hover { color: #fff; box-shadow: 0 16px 30px -12px rgba(3, 105, 161, 0.85); }
.btn-outline { border-color: var(--line-strong); color: var(--text-2); background: #fff; box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--sky); color: var(--sky-2); background: var(--surface-2); }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--sky-2); background: var(--sky-soft); }
.btn-ok { background: var(--jade-soft); color: var(--jade); border-color: #b8e7d4; }
.btn-ok:hover { background: #d8f3e7; }
.btn-bad { background: var(--bad-soft); color: var(--bad); border-color: #f6cccc; }
.btn-bad:hover { background: #fde4e4; }
.btn-lg { padding: 13px 26px; font-size: 0.95rem; }
.btn-sm { padding: 7px 15px; font-size: 0.83rem; }
.btn-xs { padding: 5px 11px; font-size: 0.76rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-arrow { transition: transform 0.2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
.is-on { color: var(--sky-2); border-color: var(--sky-line); background: var(--sky-soft); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-2);
  font-variant-numeric: tabular-nums;
}
.chip-money { color: var(--sky-3); border-color: var(--sky-line); background: var(--sky-soft); font-weight: 600; }
.badge {
  display: inline-block;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.badge.ok { color: var(--jade); border-color: #b8e7d4; background: var(--jade-soft); }
.badge.warn { color: var(--warn); border-color: #f5dcae; background: var(--warn-soft); }
.badge.bad { color: var(--bad); border-color: #f6cccc; background: var(--bad-soft); }
.pill { background: var(--sky-2); color: #fff; border-radius: 999px; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-sm { width: 15px; height: 15px; }

/* --------------------------------------------------------------------- nav */

.nav { position: sticky; top: 0; z-index: 60; backdrop-filter: blur(14px); background: rgba(255, 255, 255, 0.82); border-bottom: 1px solid transparent; transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; }
.nav.is-stuck { border-bottom-color: var(--line); background: rgba(255, 255, 255, 0.95); box-shadow: 0 6px 20px -18px rgba(9, 58, 112, 0.45); }
.nav-inner { display: flex; align-items: center; gap: 26px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; font-size: 1.12rem; color: var(--text); }
.brand:hover { color: var(--sky-2); }
.brand-text { background: linear-gradient(100deg, #0c1a2b 10%, #0284c7 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { flex: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 13px; border-radius: 8px; font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--sky-2); background: var(--sky-soft); }
.nav-links a.nav-verify { color: var(--sky-2); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text); margin: 4px 0; }
.nav-drawer { display: none; flex-direction: column; gap: 2px; padding: 12px 24px 22px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.nav-drawer a { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.nav-drawer a:last-child { border-bottom: 0; }

/* ------------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; padding: clamp(44px, 6.5vw, 88px) 0 clamp(36px, 5vw, 68px); background: linear-gradient(180deg, var(--bg-tint) 0%, #f8fcff 62%, var(--bg) 100%); }
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg .glow { position: absolute; width: 620px; height: 620px; border-radius: 50%; filter: blur(120px); opacity: 0.5; }
.hero-bg .glow.a { background: rgba(56, 189, 248, 0.3); top: -260px; right: -120px; }
.hero-bg .glow.b { background: rgba(14, 165, 233, 0.16); bottom: -300px; left: -180px; }
.grid-lines { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; mask-image: radial-gradient(circle at 62% 18%, #000 8%, transparent 70%); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: start; }
.hero-copy h1 { margin: 4px 0 18px; max-width: 16ch; }
.hero-copy .lede { font-size: 1.08rem; color: var(--muted); max-width: 54ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.hero-note { max-width: 46ch; }
.hero-facts { list-style: none; display: flex; gap: 34px; margin: 34px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; gap: 2px; }
.hero-facts strong { font-size: 1.32rem; font-weight: 700; letter-spacing: -0.03em; color: var(--sky-3); }
.hero-facts span { font-size: 0.78rem; color: var(--muted-2); }

.hero-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.live { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.panel-rows { padding: 6px; }
.panel-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; }
.panel-row:nth-child(odd) { background: var(--surface-2); }
.pv-ico { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(140deg, var(--sky-soft), #dbeafe); border: 1px solid var(--sky-line); }
.pv-meta { display: flex; flex-direction: column; min-width: 0; }
.pv-meta b { font-size: 0.86rem; font-weight: 600; }
.pv-meta i { font-style: normal; font-size: 0.74rem; color: var(--muted-2); }
.pv-amt { font-family: var(--mono); font-size: 0.82rem; color: var(--jade); }
.panel-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); background: var(--surface-2); }
.panel-foot > div { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.panel-foot > div + div { border-left: 1px solid var(--line); }
.panel-foot small { color: var(--muted-2); font-size: 0.74rem; }
.panel-foot strong { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sky-3); }

/* ----------------------------------------------------------------- ticker */

.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; background: var(--surface-2); }
.ticker-track { display: flex; gap: 0; width: max-content; animation: ticker 46s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-right: 1px solid var(--line); font-size: 0.84rem; white-space: nowrap; }
.ticker-item strong { font-weight: 600; }
.ticker-type { color: var(--muted-2); }
.ticker-amount { font-family: var(--mono); font-size: 0.82rem; color: var(--jade); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- sections */

.section { padding: clamp(52px, 6.6vw, 98px) 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 42px; max-width: 64ch; }
.section-head.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; max-width: none; align-items: end; }
.section-head h2 { max-width: 28ch; }
.section-note { color: var(--muted); font-size: 0.96rem; }

.band.stats-band { border-bottom: 1px solid var(--line); background: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-block { padding: 34px 24px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--line); }
.stat-block:last-child { border-right: 0; }
.stat-block strong { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--sky-3); }
.stat-block span { font-size: 0.86rem; color: var(--muted); }
.stat-block small { color: var(--muted-2); font-size: 0.74rem; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 54px; align-items: start; }
.grid-2.wide-left { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.stack { display: flex; flex-direction: column; gap: 15px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }

/* ------------------------------------------------------------------ steps */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.steps.compact { grid-template-columns: 1fr; }
.step { padding: 30px 26px 30px 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.steps.compact .step { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 0; }
.steps.compact .step:last-child { border-bottom: 0; padding-bottom: 0; }
.step-num { display: block; font-family: var(--mono); font-size: 0.78rem; color: var(--sky-2); letter-spacing: 0.08em; margin-bottom: 14px; font-weight: 500; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.step + .step { padding-left: 26px; }
.steps.compact .step + .step { padding-left: 0; }

/* -------------------------------------------------------------- rate table */

.rate-table { width: 100%; border-collapse: collapse; margin: 20px 0 14px; }
.rate-table th, .rate-table td { text-align: left; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.rate-table th { color: var(--muted); font-size: 0.88rem; }
.rate-table td { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.rate-table tr:last-child th, .rate-table tr:last-child td { border-bottom: 0; }

.calc-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 28px; box-shadow: var(--shadow); }
.calc-rows { display: flex; flex-direction: column; gap: 20px; margin: 22px 0; }
.calc-row { display: flex; flex-direction: column; gap: 9px; font-size: 0.87rem; color: var(--muted); }
.calc-row b { color: var(--sky-2); font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: var(--sky-line); outline: none; width: 100%; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; cursor: pointer; border: 4px solid var(--sky); box-shadow: var(--shadow-sm); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 4px solid var(--sky); border-radius: 50%; background: #fff; cursor: pointer; }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 16px; }
.calc-out > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px; background: var(--surface-2); }
.calc-out .hl { border-color: var(--sky-line); background: var(--sky-soft); }
.calc-out small { display: block; color: var(--muted-2); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.calc-out strong { font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sky-3); }
.calc-bars { display: flex; gap: 6px; margin-bottom: 18px; }
.calc-bars span { height: 4px; border-radius: 3px; background: var(--line); width: var(--w); transition: width 0.4s ease; }
.calc-bars span:first-child { background: linear-gradient(90deg, var(--sky), var(--sky-2)); }

/* ------------------------------------------------------------ app preview */

.preview-wrap { display: grid; gap: 0; }
.preview { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.preview-chrome { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.preview-chrome span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.preview-chrome em { margin-left: 12px; font-style: normal; font-family: var(--mono); font-size: 0.74rem; color: var(--muted-2); }
.preview-body { display: grid; grid-template-columns: 190px 1fr; background: #fff; }
.preview-side { border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.pv-logo { font-size: 0.9rem; font-weight: 700; padding: 0 10px 12px; color: var(--sky-3); }
.pv-link { padding: 8px 10px; border-radius: 8px; font-size: 0.83rem; color: var(--muted); }
.pv-link.is-on { background: var(--sky-soft); color: var(--sky-3); font-weight: 600; }
.preview-main { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.pv-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pv-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); }
.pv-card small { color: var(--muted-2); font-size: 0.72rem; }
.pv-card strong { font-size: 1.12rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sky-3); }
.pv-card em { font-style: normal; font-size: 0.72rem; color: var(--jade); }
.pv-chart { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); }
.pv-chart svg { width: 100%; height: 90px; }
.pv-list { display: flex; flex-direction: column; gap: 8px; }
.pv-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; }
.pv-item.is-done { opacity: 0.55; }
.pv-thumb { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(140deg, var(--sky-soft), #dbeafe); border: 1px solid var(--sky-line); }
.pv-btn { font-size: 0.74rem; border: 1px solid var(--sky-line); border-radius: 999px; padding: 4px 12px; color: var(--sky-3); background: var(--sky-soft); font-weight: 600; }

/* ---------------------------------------------------------------- referral */

.check-list { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.check-list li { position: relative; padding-left: 26px; color: var(--muted); font-size: 0.92rem; }
.check-list li strong { color: var(--text); font-weight: 600; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--sky); border-bottom: 2px solid var(--sky); transform: rotate(-45deg); }
.check-list.warn li::before { border-color: var(--warn); width: 8px; height: 8px; border-radius: 50%; background: var(--warn); border-left: 0; border-bottom: 0; top: 8px; }
.tier-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.tier { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 16px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.tier:last-child { border-bottom: 0; }
.tier:nth-child(odd) { background: var(--surface-2); }
.tier-badge { font-family: var(--mono); font-size: 0.76rem; color: var(--sky-2); font-weight: 500; }
.tier-desc { color: var(--muted); font-size: 0.9rem; }
.tier-amt { font-family: var(--mono); font-size: 0.9rem; color: var(--jade); font-weight: 500; }
.tier-note { background: var(--sky-soft); }

.verify-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); gap: 54px; align-items: start; }
.verify-steps { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.verify-steps > div { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.verify-steps span { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--sky-line); background: var(--sky-soft); display: grid; place-items: center; font-size: 0.76rem; font-family: var(--mono); color: var(--sky-3); font-weight: 600; }
.verify-steps p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.price-card { border: 1px solid var(--sky-line); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--sky-soft) 0%, #fff 55%); padding: 30px; box-shadow: var(--shadow-lg); }
.price-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 20px; border-bottom: 1px solid var(--sky-line); }
.price { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -0.035em; color: var(--sky-3); }
.pay-methods { margin: 18px 0; }
.method-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.method-chip { border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; font-size: 0.79rem; color: var(--muted); background: var(--surface-2); font-weight: 500; }
p.fine.center { text-align: center; }

/* -------------------------------------------------------------- testimonials */

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; box-shadow: var(--shadow-sm); }
.quote p { font-family: var(--serif); font-size: 1.16rem; line-height: 1.5; color: var(--text-2); }
.quote footer { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 14px; }
.quote footer strong { font-size: 0.9rem; font-weight: 600; }
.quote footer span { font-size: 0.78rem; color: var(--muted-2); }

/* --------------------------------------------------------------------- faq */

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; font-size: 1.04rem; font-weight: 600; list-style: none; color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; width: 14px; height: 14px; flex: none; }
.faq-mark::before, .faq-mark::after { content: ""; position: absolute; background: var(--sky); transition: transform 0.25s ease; }
.faq-mark::before { left: 0; top: 6px; width: 14px; height: 2px; }
.faq-mark::after { left: 6px; top: 0; width: 2px; height: 14px; }
.faq-item[open] .faq-mark::after { transform: scaleY(0); }
.faq-item p { color: var(--muted); max-width: 76ch; padding-bottom: 22px; margin: 0; }

/* ---------------------------------------------------------------- cta band */

.cta-band { border-top: 1px solid var(--sky-line); background: linear-gradient(120deg, var(--sky-soft), #f0f9ff 55%, #fff); }
.cta-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: 56px 24px; }
.cta-inner h2 { margin-bottom: 6px; }
.cta-inner p { color: var(--muted); margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ footer */

.footer { border-top: 1px solid var(--line); padding: 56px 0 26px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { margin: 14px 0 10px; max-width: 34ch; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--muted); font-size: 0.88rem; }
.footer-col a:hover { color: var(--sky-2); }
.footer-col h4 { margin-bottom: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 0.8rem; flex-wrap: wrap; }
.legal-page h1 { margin-bottom: 6px; }
.prose { margin-top: 26px; }
.prose h2 { font-size: 1.15rem; margin: 26px 0 6px; }
.prose p { color: var(--muted); }

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

.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr); gap: 60px; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 60px 24px 92px; align-items: start; background: linear-gradient(180deg, var(--bg-tint) 0%, #fff 70%); }
.auth-aside h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.auth-aside .lede { color: var(--muted); font-size: 1.02rem; max-width: 46ch; }
.auth-trust { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.auth-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-head { margin-bottom: 22px; }
.auth-switch { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 0.88rem; }
.link-inline { color: var(--sky-2); font-size: 0.82rem; align-self: flex-end; padding-bottom: 10px; font-weight: 600; }

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

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 0.8rem; color: var(--text-2); letter-spacing: 0.02em; font-weight: 600; }
.field-label em { color: var(--bad); font-style: normal; }
.field-hint { font-size: 0.75rem; color: var(--muted-2); }
.field-row { display: flex; gap: 14px; align-items: flex-start; }
.field-row .field { flex: 1; }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"],
input[type="date"], input[type="file"], select, textarea, .share-input, .mini-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 11px 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: var(--shadow-sm);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16); }
textarea { resize: vertical; font-family: var(--mono); font-size: 0.83rem; line-height: 1.65; background: var(--surface-2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type="file"] { padding: 9px 12px; font-size: 0.85rem; }
input[type="file"]::file-selector-button { background: var(--sky-soft); border: 1px solid var(--sky-line); color: var(--sky-3); border-radius: 7px; padding: 6px 12px; margin-right: 12px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.mini-input { padding: 7px 10px; font-size: 0.82rem; width: 210px; }
.mini-input.wide { width: 100%; }
.errors { list-style: none; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #f6cccc; background: var(--bad-soft); border-radius: 10px; }
.errors li { color: var(--bad); font-size: 0.86rem; font-weight: 500; }
.errors li + li { margin-top: 6px; }
.filter-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.filter-row .field { min-width: 160px; }
.filter-row .btn { margin-bottom: 1px; }
.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.inline-row:last-child { border-bottom: 0; }
.decision { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.decision .mini-input { width: 130px; }
.action-stack { display: flex; flex-direction: column; }

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

.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 0.88rem; border: 1px solid var(--line); background: var(--surface-2); box-shadow: var(--shadow-sm); animation: flashIn 0.35s ease; }
.flash.ok { border-color: #b8e7d4; background: var(--jade-soft); color: #04684a; }
.flash.warn { border-color: #f5dcae; background: var(--warn-soft); color: #8a4a08; }
.flash.bad { border-color: #f6cccc; background: var(--bad-soft); color: #b91c1c; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   App shell (member area + control room)
   ========================================================================== */

.app { background: var(--bg-soft); }
.app-frame { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; padding: 22px 16px; gap: 18px; overflow-y: auto; }
.sidebar-top { padding: 0 6px 4px; }
.admin-tag { display: block; margin-top: 10px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--sky-2); font-weight: 700; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.side-group-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-2); padding: 8px 12px 4px; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 0.88rem; font-weight: 500; transition: background 0.15s ease, color 0.15s ease; }
.side-link:hover { background: var(--surface-3); color: var(--sky-2); }
.side-link.is-active { background: var(--sky-soft); color: var(--sky-3); font-weight: 600; }
.side-link .pill { margin-left: auto; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, var(--sky-soft), #cfeaff); border: 1px solid var(--sky-line); display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: var(--sky-3); flex: none; }
.side-user-meta { display: flex; flex-direction: column; min-width: 0; }
.side-user-meta strong { font-size: 0.86rem; font-weight: 600; }
.side-user-meta small { color: var(--muted-2); font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: flex; align-items: center; gap: 18px; padding: 20px 30px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 40; }
.app-title { min-width: 0; }
.app-title h1 { font-size: 1.32rem; margin: 0; font-weight: 600; }
.app-title p { margin: 2px 0 0; font-size: 0.83rem; }
.app-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.icon-btn { display: none; background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--muted); padding: 8px; cursor: pointer; }
.app-body { padding: 28px 30px; display: flex; flex-direction: column; gap: 22px; flex: 1; }
.app-foot { display: flex; justify-content: space-between; gap: 16px; padding: 20px 30px 30px; color: var(--muted-2); font-size: 0.78rem; flex-wrap: wrap; }
.lock-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 20px 30px 0; padding: 16px 20px; border: 1px solid #f5dcae; background: var(--warn-soft); border-radius: var(--radius); }
.lock-banner strong { color: #8a4a08; font-weight: 600; }
.lock-banner span { color: #8a4a08; font-size: 0.88rem; flex: 1; min-width: 220px; opacity: 0.92; }

/* ==========================================================================
   Cards, stats, tables
   ========================================================================== */

.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.card-head h2 { font-size: 0.98rem; margin: 0; font-weight: 600; }
.card-head p { margin: 3px 0 0; }
.card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-grid.small .stat-value { font-size: 1.2rem; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.11em; color: var(--muted-2); font-weight: 700; }
.stat-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--sky-3); }
.stat-delta { font-size: 0.82rem; color: var(--jade); font-weight: 600; }
.stat-hint { font-size: 0.76rem; color: var(--muted-2); }
.stat.good { border-color: #b8e7d4; background: linear-gradient(180deg, var(--jade-soft), #fff); }
.stat.good .stat-value { color: #04684a; }
.stat.warn { border-color: #f5dcae; background: linear-gradient(180deg, var(--warn-soft), #fff); }
.stat.warn .stat-value { color: #8a4a08; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th { text-align: left; font-weight: 700; font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); padding: 11px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 13px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td code { font-size: 0.8rem; }
.tx-type { color: var(--muted); }

.empty { padding: 30px 20px; text-align: center; color: var(--muted-2); font-size: 0.88rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; }
.page-btn { border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 13px; font-size: 0.82rem; color: var(--muted); background: #fff; }
.page-btn:hover { border-color: var(--sky); color: var(--sky-2); }
.page-btn.is-disabled { opacity: 0.4; }
.page-info { font-size: 0.8rem; color: var(--muted-2); }
.progress { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.progress-label { grid-column: 1 / -1; font-size: 0.78rem; color: var(--muted); }
.progress-track { height: 7px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #38bdf8, var(--sky-2)); transition: width 0.5s ease; }
.progress-value { font-size: 0.78rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted-2); font-size: 0.82rem; }
.kv dd { margin: 0; text-align: right; font-size: 0.86rem; max-width: 60%; color: var(--text-2); }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--sky); border-radius: 8px; background: var(--sky-soft); padding: 15px 18px; }
.callout strong { display: block; font-weight: 600; margin-bottom: 3px; color: var(--sky-3); }
.callout p { margin: 0; color: var(--text-2); font-size: 0.87rem; }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout.warn strong { color: #8a4a08; }

/* ==========================================================================
   Charts
   ========================================================================== */

.chart { margin: 0; }
.chart figcaption { font-size: 0.78rem; color: var(--muted-2); margin-bottom: 10px; }
.chart svg { width: 100%; height: 210px; display: block; }
.cgrid { stroke: var(--line); stroke-width: 1; }
.clab { fill: var(--muted-2); font-size: 9px; font-family: var(--font); }
.cline { fill: none; stroke: var(--sky); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.cdot { fill: #fff; stroke: var(--sky); stroke-width: 1.6; }
.chart-scale { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted-2); margin-top: 6px; }
.chart.bars .bars-grid { display: flex; align-items: flex-end; gap: 8px; height: 180px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.bar-fill { width: 100%; background: linear-gradient(180deg, #38bdf8, var(--sky-2)); border-radius: 6px 6px 0 0; }
.bar-label { font-size: 0.7rem; color: var(--muted-2); }

/* ==========================================================================
   Member area widgets
   ========================================================================== */

.tier-progress { display: flex; gap: 22px; align-items: center; }
.tier-ring { width: 106px; height: 106px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--sky) var(--p, 0%), var(--surface-3) 0); position: relative; }
.tier-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.tier-ring span { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; }
.tier-ring strong { font-size: 1.5rem; font-weight: 700; color: var(--sky-3); }
.tier-ring small { font-size: 0.72rem; color: var(--muted-2); }
.tier-progress-meta p { margin: 0 0 4px; font-size: 0.88rem; }
.tier-progress-meta .btn { margin-top: 10px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.mini-stats small { display: block; font-size: 0.74rem; color: var(--muted-2); }
.mini-stats strong { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.ad-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ad-mini { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.ad-mini.done { opacity: 0.6; }
.ad-mini-thumb, .ad-logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 0.76rem; font-weight: 700; color: var(--sky-3); background: linear-gradient(140deg, var(--sky-soft), #d7ecff); border: 1px solid var(--sky-line); flex: none; }
.ad-mini-meta { display: flex; flex-direction: column; min-width: 0; }
.ad-mini-meta strong { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-mini-meta small { color: var(--muted-2); font-size: 0.74rem; }
.ad-mini-reward { font-family: var(--mono); font-size: 0.8rem; color: var(--jade); font-weight: 500; }

.limit-bar { display: flex; flex-direction: column; gap: 10px; }
.limit-track { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.limit-fill { height: 100%; background: linear-gradient(90deg, #38bdf8, var(--sky-2)); transition: width 0.5s ease; }
.limit-meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted-2); }

.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ad-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.ad-card:hover { transform: translateY(-2px); border-color: var(--sky-line); box-shadow: var(--shadow); }
.ad-card.done { opacity: 0.68; }
.ad-card-head { display: flex; align-items: flex-start; gap: 12px; }
.ad-head-meta { flex: 1; min-width: 0; }
.ad-head-meta h3 { font-size: 0.95rem; margin: 0; }
.ad-image { border-radius: 10px; border: 1px solid var(--line); }
.ad-desc { color: var(--muted); font-size: 0.86rem; margin: 0; flex: 1; }
.ad-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ad-meta dt { font-size: 0.72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.09em; }
.ad-meta dd { margin: 2px 0 0; font-size: 0.86rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.ad-action { margin: 0; }

/* Watch page */

.watch-wrap { display: grid; place-items: center; padding: 18px 0 40px; }
.watch-card { width: min(620px, 100%); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 28px; box-shadow: var(--shadow-lg); }
.watch-card header { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.watch-card header h2 { font-size: 1.05rem; margin: 0; }
.watch-card header p { margin: 2px 0 0; }
.watch-reward { margin-left: auto; font-family: var(--mono); font-size: 0.95rem; color: var(--jade); font-weight: 600; }
.watch-rings { display: flex; align-items: center; gap: 26px; padding: 26px 0; }
.ring { width: 128px; height: 128px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--sky) var(--p, 0%), var(--surface-3) 0); position: relative; transition: background 0.3s linear; }
.ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring span { position: relative; z-index: 1; font-family: var(--mono); font-size: 1.6rem; font-weight: 600; color: var(--sky-3); }
.watch-status strong { display: block; margin-bottom: 5px; font-weight: 600; }
.watch-status p { margin: 0; }
.watch-steps { display: flex; flex-direction: column; gap: 9px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.watch-step { font-size: 0.87rem; color: var(--muted); display: flex; align-items: center; gap: 11px; }
.watch-step span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 0.72rem; font-family: var(--mono); }
.watch-step.is-done { color: var(--jade); font-weight: 500; }
.watch-step.is-done span { border-color: #b8e7d4; background: var(--jade-soft); color: var(--jade); }
.watch-actions { display: flex; gap: 12px; align-items: center; padding-top: 22px; flex-wrap: wrap; }
.watch-actions form { margin: 0; }

/* Breakdown, timeline, share */

.breakdown { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; }
.breakdown li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.breakdown li:last-child { border-bottom: 0; }
.bd-swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.bd-label { display: flex; flex-direction: column; flex: 1; font-size: 0.88rem; }
.bd-label small { color: var(--muted-2); font-size: 0.74rem; }
.bd-amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.capacity { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.capacity > div { border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: var(--surface-2); }
.capacity small { display: block; font-size: 0.73rem; color: var(--muted-2); }
.capacity strong { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sky-3); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--jade); margin-top: 6px; }
.timeline p { margin: 2px 0; font-size: 0.86rem; color: var(--muted); }

.share-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share-input { flex: 1; min-width: 240px; font-family: var(--mono); font-size: 0.83rem; background: var(--surface-2); }
.share-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.share-meta small { display: block; font-size: 0.73rem; color: var(--muted-2); }
.share-meta strong { font-size: 0.95rem; font-weight: 600; }

/* Verification */

.verify-panel { align-items: start; }
.methods { display: flex; flex-direction: column; gap: 16px; }
.method { border: 1px solid var(--line); border-radius: 12px; padding: 17px 18px; background: var(--surface-2); }
.method-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.method dl { margin: 0 0 10px; display: flex; flex-direction: column; }
.method dl > div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.method dl > div:last-child { border-bottom: 0; }
.method dt { color: var(--muted-2); font-size: 0.8rem; }
.method dd { margin: 0; font-size: 0.86rem; text-align: right; }
.copyable { cursor: copy; }
.submission { display: flex; flex-direction: column; }
.submission-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.87rem; }
.submission-row:last-child { border-bottom: 0; }
.admin-note { margin-top: 14px; padding: 13px 15px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.admin-note strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); font-weight: 700; }
.admin-note p { margin: 5px 0 0; font-size: 0.87rem; }

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

.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: radial-gradient(circle at 30% 10%, var(--sky-soft), transparent 58%), linear-gradient(180deg, #f7fcff, #fff); }
.admin-login-card { width: min(420px, 100%); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 34px; box-shadow: var(--shadow-lg); }
.admin-login-brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700; margin-bottom: 26px; }
.admin-login-brand em { margin-left: auto; font-style: normal; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--sky-2); }

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

@media (max-width: 1100px) {
  .hero-inner, .grid-2, .grid-2.wide-left, .verify-grid, .auth-wrap { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-block:nth-child(2n) { border-right: 0; }
  .stat-block:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotes { grid-template-columns: 1fr; }
  .section-head.split { grid-template-columns: 1fr; gap: 16px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { padding: 24px 22px 24px 0; }
  .step:nth-child(2n) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-drawer { display: flex; }
  .nav-drawer[hidden] { display: none; }
  .app-frame { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 70; width: min(290px, 84vw); transform: translateX(-102%); transition: transform 0.25s ease; background: #fff; box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: none; }
  .icon-btn { display: inline-flex; }
  .app-topbar { padding: 16px 18px; }
  .app-body { padding: 20px 18px; }
  .lock-banner { margin: 16px 18px 0; }
  .field-row-2, .calc-out, .pv-row, .capacity, .share-meta, .mini-stats { grid-template-columns: 1fr; }
  .preview-body { grid-template-columns: 1fr; }
  .preview-side { display: none; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .ad-mini-grid { grid-template-columns: 1fr; }
  .watch-rings { flex-direction: column; text-align: center; }
  .tier-progress { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .wrap { padding: 0 18px; }
  .stats-grid, .stat-grid, .grid-3, .steps { grid-template-columns: 1fr; }
  .stat-block, .step { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 0; }
  .stat-block:last-child, .step:last-child { border-bottom: 0; }
  .hero-cta .btn { width: 100%; }
  .ad-meta, .method dl > div { grid-template-columns: 1fr; }
  .card-body, .card-head { padding: 16px; }
  td, th { padding: 11px 14px; }
  .mini-input { width: 100%; }
  .decision { flex-direction: column; align-items: stretch; }
}

@media print { .sidebar, .app-topbar, .nav, .footer { display: none; } }

/* ==========================================================================
   Control room — content editor, media library, analytics
   ========================================================================== */

.admin-search { display: flex; align-items: center; gap: 8px; }
.admin-search input { width: 220px; padding: 8px 12px; font-size: 0.85rem; border-radius: 999px; }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.quick-action { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-sm); font-size: 0.87rem; font-weight: 500; color: var(--text-2); }
.quick-action:hover { border-color: var(--sky-line); color: var(--sky-3); background: var(--surface-2); }
.quick-action b { font-size: 1rem; color: var(--sky-3); }
.quick-action .pill { margin-left: 2px; }

.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-step { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.funnel-label { display: flex; align-items: baseline; gap: 8px; font-size: 0.85rem; color: var(--text-2); }
.funnel-label small { color: var(--muted-2); }
.funnel-value { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.9rem; color: var(--sky-3); }
.funnel-bar { grid-column: 1 / -1; height: 7px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--sky-2)); }

.sys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sys-item { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: var(--surface-2); }
.sys-item small { display: block; font-size: 0.72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.09em; }
.sys-item strong { font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.chart-legend { display: flex; gap: 18px; align-items: center; margin-top: 8px; font-size: 0.76rem; color: var(--muted); flex-wrap: wrap; }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend .lg::before { content: ""; width: 10px; height: 3px; border-radius: 2px; }
.chart-legend .lg.a::before { background: var(--sky); }
.chart-legend .lg.b::before { background: var(--jade); }
.chart-legend .lg.max { margin-left: auto; color: var(--muted-2); }
.cline.a { stroke: var(--sky); }
.cline.b { stroke: var(--jade); stroke-dasharray: 4 3; }

/* --------------------------------------------------------------- tabs */

.ct-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.ct-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 10px 10px 0 0; border: 1px solid transparent; border-bottom: none; font-size: 0.87rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.ct-tab em { font-style: normal; font-size: 0.72rem; color: var(--muted-2); background: var(--surface-3); border-radius: 999px; padding: 1px 7px; }
.ct-tab:hover { background: var(--surface-2); color: var(--sky-2); }
.ct-tab.is-on { background: #fff; border-color: var(--line); color: var(--sky-3); font-weight: 600; box-shadow: 0 -2px 0 var(--sky) inset; }
.ct-tab.is-on em { background: var(--sky-soft); color: var(--sky-3); }

.ct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 22px 0 4px; flex-wrap: wrap; }
.ct-head h2 { font-size: 1.12rem; margin: 0 0 2px; }

.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.ct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 22px; box-shadow: var(--shadow-sm); }
.ct-fields .field-wide, .ct-fields .field-media { grid-column: 1 / -1; }
.ct-live { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), #fff); padding: 20px; box-shadow: var(--shadow-sm); }
.ct-live h3 { font-size: 0.9rem; margin: 0 0 4px; }
.ct-live h3 + p { margin-bottom: 14px; }
.ct-live .kv > div { padding: 8px 0; }
.ct-live .check-list { margin: 0; }
.ct-save { position: sticky; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 14px 0 6px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 40%); flex-wrap: wrap; }

/* --------------------------------------------------------- colour picker */

.field-color .color-input { display: flex; align-items: center; gap: 10px; }
input[type="color"] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; cursor: pointer; }
.color-hex { font-size: 0.8rem; padding: 6px 9px; }

.swatch-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.swatch { display: flex; align-items: center; gap: 9px; font-size: 0.74rem; }
.swatch span { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line-strong); flex: none; }
.swatch small { color: var(--muted); min-width: 62px; }
.swatch code { font-size: 0.7rem; padding: 2px 6px; }
.ct-demo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* --------------------------------------------------------- media picker */

.field-media .media-picker { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.media-preview { border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); min-height: 96px; display: grid; place-items: center; padding: 10px; overflow: hidden; }
.media-preview img { max-height: 110px; width: auto; }
.media-controls { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.check input { width: 16px; height: 16px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.media-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.media-thumb { background: var(--surface-2); border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 14px; min-height: 130px; }
.media-thumb img { max-height: 120px; }
.media-card figcaption { padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; }
.media-card figcaption strong { font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card figcaption code { font-size: 0.7rem; cursor: copy; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-live { position: static; }
}
@media (max-width: 720px) {
  .ct-fields { grid-template-columns: 1fr; padding: 16px; }
  .field-media .media-picker { grid-template-columns: 1fr; }
  .sys-grid { grid-template-columns: 1fr; }
  .admin-search { display: none; }
}

/* ==========================================================================
   Announcement banner, uploaded brand assets, footer socials
   ========================================================================== */

.announce { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 20px 30px 0; padding: 13px 18px; border-radius: var(--radius); border: 1px solid var(--sky-line); background: var(--sky-soft); }
.announce strong { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--sky-3); }
.announce span { font-size: 0.88rem; color: var(--text-2); }
.announce.ann-warn { border-color: #f5dcae; background: var(--warn-soft); }
.announce.ann-warn strong { color: #8a4a08; }
.announce.ann-bad { border-color: #f6cccc; background: var(--bad-soft); }
.announce.ann-bad strong { color: #b91c1c; }

.brand-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; }

.footer-socials { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.footer-socials a { font-size: 0.82rem; color: var(--muted); border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.footer-socials a:hover { color: var(--sky-2); border-color: var(--sky); }

@media (max-width: 860px) { .announce { margin: 16px 18px 0; } }

/* Content editor: cross-tab search, match blocks, import drawer */
.ct-search { display: flex; gap: 8px; align-items: center; }
.ct-search input { width: 240px; padding: 8px 12px; border-radius: 999px; font-size: 0.85rem; }
.ct-match { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.ct-match-head { font-size: 0.96rem; display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.ct-match-head em { font-style: normal; font-size: 0.74rem; color: var(--muted-2); background: var(--surface-3); border-radius: 999px; padding: 1px 7px; }
.ct-import { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.ct-import summary { cursor: pointer; font-size: 0.85rem; color: var(--sky-2); font-weight: 600; }
.ct-import form { margin-top: 12px; }
@media (max-width: 720px) { .ct-search { display: none; } }

/* Control room: setup checklist */
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.setup-list li:last-child { border-bottom: 0; }
.setup-list li.is-done { color: var(--muted-2); }
.setup-tick { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 0.72rem; color: #fff; flex: none; }
.setup-list li.is-done .setup-tick { background: var(--jade); border-color: var(--jade); }
.setup-list a { font-weight: 500; }

/* ==========================================================================
   Mobile experience — phones and small tablets
   App-like bottom navigation, card tables, comfortable touch targets.
   ========================================================================== */

.mobile-tabs { display: none; }

.btn, .side-link, .ct-tab, .page-btn, .quick-action, .faq-item summary,
.nav-toggle, .icon-btn, .mobile-tabs a, .mobile-tabs-more, .copyable {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.drawer-open { overflow: hidden; }
body.drawer-open::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(9, 24, 42, 0.42);
  backdrop-filter: blur(2px);
  z-index: 66;
}

@media (max-width: 780px) {
  /* Data tables stack into labelled cards so nothing needs horizontal scrolling. */
  .table-wrap { overflow: visible; }
  .table-wrap table, .table-wrap tbody { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    padding: 4px 0;
  }
  .table-wrap tbody tr:hover { background: #fff; }
  .table-wrap td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border: 0;
    padding: 9px 14px;
    font-size: 0.86rem;
  }
  .table-wrap td::before {
    content: attr(data-label);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-2);
    font-weight: 700;
    padding-top: 2px;
  }
  .table-wrap td.ta-right, .table-wrap td.ta-center { text-align: left; }
  .table-wrap td:empty { display: none; }
}

@media (max-width: 860px) {
  .mobile-tabs {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 62;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 24px -20px rgba(9, 58, 112, 0.5);
  }
  .mobile-tabs a, .mobile-tabs-more {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 4px 8px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 600;
    background: none;
    border: 0;
    position: relative;
    text-align: center;
  }
  .mobile-tabs a.is-active { color: var(--sky-3); }
  .mobile-tabs a.is-active::before {
    content: "";
    position: absolute;
    top: 0; left: 18%; right: 18%;
    height: 2px;
    border-radius: 2px;
    background: var(--sky);
  }
  .mobile-tabs .ic { width: 21px; height: 21px; }
  .mobile-tabs em {
    position: absolute;
    top: 5px; right: 20%;
    background: var(--sky-2);
    color: #fff;
    border-radius: 999px;
    font-style: normal;
    font-size: 0.6rem;
    padding: 0 5px;
    font-weight: 700;
  }
  .mobile-tabs span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .app-body { padding-bottom: 92px; }
  .app-foot { padding-bottom: 84px; }
  .ct-save { bottom: 74px; }
  .sidebar { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }

  .btn { min-height: 42px; }
  .btn-xs { min-height: 38px; padding: 8px 13px; font-size: 0.79rem; }
  .side-link { min-height: 46px; }
  .ct-tab { min-height: 44px; }
  .page-btn { padding: 10px 15px; }
  .nav-drawer a { display: flex; align-items: center; min-height: 48px; }

  /* A 16px control size stops iOS from zooming the page when an input is focused. */
  input[type="text"], input[type="email"], input[type="password"], input[type="number"],
  input[type="tel"], input[type="date"], input[type="search"], select, textarea { font-size: 16px; }
  .mini-input, .ct-search input { width: 100%; }

  .app-topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
  .app-body { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 15px; }
  .section { padding: 46px 0; }
  h1 { font-size: clamp(1.95rem, 8vw, 2.6rem); }
  .hero-facts { gap: 18px 26px; }
  .hero-facts strong { font-size: 1.15rem; }
  .panel-foot { grid-template-columns: 1fr; }
  .panel-foot > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .tier { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .tier-desc { grid-column: 1 / -1; }
  .kv > div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .kv dd { text-align: left; max-width: 100%; }
  .chart svg { height: 168px; }
  .ring { width: 106px; height: 106px; }
  .ring span { font-size: 1.3rem; }
  .tier-ring { width: 92px; height: 92px; }
  .watch-card, .calc-card, .auth-card, .ct-live, .price-card { padding: 18px; }
  .ct-fields { padding: 14px; }
  .stat { padding: 15px 16px; }
  .stat-value { font-size: 1.32rem; }
  .card-head { padding: 14px 15px; }
  .submission-row, .method dl > div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .method dd { text-align: left; }
  .admin-login-card { padding: 24px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ad-meta { grid-template-columns: 1fr 1fr; }
  .timeline p { font-size: 0.82rem; }
  .quick-action { justify-content: space-between; width: 100%; }
}

@media (max-width: 400px) {
  .table-wrap td { grid-template-columns: 1fr; gap: 3px; }
  .table-wrap td::before { padding-top: 0; }
  .app-actions .chip { display: none; }
  .mobile-tabs a, .mobile-tabs-more { font-size: 0.62rem; }
}

/* Small phones: keep the drawer viewport-accurate and stop scroll chaining. */
@supports (height: 100dvh) {
  .sidebar { height: 100dvh; }
  .app-frame { min-height: 100dvh; }
}
@media (max-width: 860px) {
  .sidebar { overscroll-behavior: contain; }
  .mobile-tabs, .table-wrap, .ct-tabs { overscroll-behavior-x: contain; }
}

/* ==========================================================================
   Form feedback — messages sit with the field they belong to
   ========================================================================== */

.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea {
  border-color: var(--bad);
  background: rgba(220, 38, 38, 0.035);
}
.field.is-invalid input:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); border-color: var(--bad); }
.field-error {
  display: block; font-size: 0.79rem; line-height: 1.45; color: var(--bad); font-weight: 500;
}
.field-error::before { content: "▲ "; font-size: 0.6rem; vertical-align: 1px; }
.field-note { display: block; font-size: 0.79rem; line-height: 1.45; color: var(--sky-3); font-weight: 500; }
.callout.note-soft { border-color: var(--sky-line); background: var(--sky-soft); }
.callout.note-soft strong { color: var(--sky-3); }
.errors { margin: 0 0 16px; padding: 14px 16px 14px 30px; border: 1px solid rgba(220, 38, 38, 0.28); background: rgba(220, 38, 38, 0.05); border-radius: var(--r); }
.errors li { font-size: 0.85rem; color: #8f1d1d; margin: 3px 0; }

.form-summary { margin: 0 0 18px; padding: 14px 16px; border: 1px solid rgba(220, 38, 38, 0.3); background: rgba(220, 38, 38, 0.05); border-radius: var(--r); }
.form-summary strong { display: block; font-size: 0.9rem; color: #8f1d1d; margin-bottom: 6px; }
.form-summary .errors { margin: 0; padding: 0 0 0 18px; border: 0; background: none; }
.form-summary .errors li { font-size: 0.83rem; color: #8f1d1d; }
.form-summary-hint { margin: 8px 0 0; font-size: 0.82rem; color: var(--bad); font-weight: 600; }

/* ==========================================================================
   Payment channel editor — boxes and buttons instead of syntax
   ========================================================================== */

.ch-editor { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.ch-note {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
  padding: 13px 16px; border-radius: var(--r); border: 1px solid var(--sky-line);
  background: var(--sky-soft); font-size: 0.88rem;
}
.ch-note strong { color: var(--sky-3); }
.ch-note span { color: var(--muted); font-size: 0.83rem; }

.ch-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ch-chip { text-decoration: none; }
.ch-chip.is-on { border-color: var(--sky); color: var(--sky-3); background: var(--sky-soft); }

.ch-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.ch-card.ch-add { border-style: dashed; border-color: var(--sky-line); }
.ch-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ch-head strong { display: block; font-size: 0.94rem; }
.ch-head .fine { display: block; }
.ch-pos { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--sky-2); color: #fff; font-size: 0.78rem; font-weight: 700; display: grid; place-items: center; }
.ch-pos.ch-plus { background: var(--sky-soft); color: var(--sky-3); }
.ch-badge { margin-left: auto; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--jade); font-weight: 700; }
.ch-form { padding: 15px 16px; }
.ch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.ch-field { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; }
.ch-field > span { font-weight: 600; color: var(--muted); }
.ch-field > span em { color: var(--bad); font-style: normal; }
.ch-field input, .ch-field select, .ch-field textarea { width: 100%; }
.ch-wide { grid-column: 1 / -1; }
.ch-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.ch-remove { color: var(--bad); }
.ch-actions .btn[disabled] { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 720px) {
  .ch-grid { grid-template-columns: 1fr; }
  .ch-actions .btn { flex: 1 1 auto; }
}
