/* jdf-it.com — one stylesheet. Colours mirror src/brand.ts (change both together). No inline styles anywhere (strict CSP). */
:root {
  --ink: #16181d;
  --muted: #555b66;
  --paper: #fbfaf7;
  --soft: #f1ece4;
  --line: #ddd5c8;
  --accent: #c2410c;      /* 5.2:1 on paper — AA for text */
  --accent-strong: #9a3412;
  --deep: #1f2a44;
  --good: #166534;
  --warn: #92400e;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(20, 24, 40, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin: 0 0 .4em; }
h3, .h3 { font-size: 1.15rem; margin: 0 0 .4em; }
code { background: var(--soft); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
pre { white-space: pre-wrap; word-break: break-word; }
.small { font-size: .9rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(640px, 100% - 32px); }
.section { padding: clamp(40px, 7vw, 84px) 0; }
.section-lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; font-weight: 700; color: var(--accent-strong); margin: 0; }
.accent { color: var(--accent); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 56ch; color: #2d313a; }
.notice { background: #fff7e6; border: 1px solid #f3d29a; padding: 12px 16px; border-radius: 10px; }
.flash { background: #ecfdf3; border: 1px solid #a7e3bf; padding: 10px 14px; border-radius: 10px; margin: 14px 0; }
.error-box { background: #fef2f2; border: 1px solid #f5b5b5; color: #7f1d1d; padding: 10px 14px; border-radius: 10px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--soft); color: var(--accent-strong); padding: 2px 8px; border-radius: 99px; vertical-align: middle; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent); color: #fff; font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--accent-strong); }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }

/* header / footer */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(251, 250, 247, .94); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-head { backdrop-filter: blur(8px); background: rgba(251, 250, 247, .82); } }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; margin: 0; }
.logo-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--deep); color: #fff; font-weight: 800; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.main-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 0; }
.main-nav a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 720px) {
  .site-head { position: static; }
  .head-row { min-height: 56px; padding: 6px 0; }
  .main-nav { gap: 2px 12px; }
  .main-nav .nav-extra { display: none; }
  .main-nav a:not(.btn) { font-size: .9rem; padding: 6px 0; }
}
@media (max-width: 420px) {
  .logo { font-size: 1rem; }
  .main-nav { gap: 2px 10px; }
  .main-nav a:not(.btn) { font-size: .86rem; }
  .main-nav .btn-small { padding: 4px 10px; min-height: 34px; font-size: .86rem; }
}
.site-foot { background: var(--deep); color: #e7e9f0; padding: 48px 0; margin-top: 0; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-foot .logo { color: #fff; }
.site-foot .logo-mark { background: var(--accent); }
.foot-h { font-size: 1rem; margin: 0 0 .5em; color: #fff; }

/* ── the story hero with the 3D phone ── */
.story { background: radial-gradient(1200px 500px at 80% 0%, #f6e3d3 0%, transparent 60%), var(--paper); }
.story-intro { padding: clamp(36px, 7vw, 80px) 0 12px; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; padding-bottom: 40px; }
.phone-col { position: sticky; top: 90px; height: calc(100vh - 110px); max-height: 760px; display: grid; place-items: center; perspective: 1400px; }
.phone-stage { position: relative; transform-style: preserve-3d; }
.phone {
  --ry: -18deg; --rx: 6deg; --rz: 0deg;
  position: relative; width: min(300px, 60vw); aspect-ratio: 390 / 844; border-radius: 44px; padding: 12px;
  background: linear-gradient(145deg, #2b2f3a, #0d0f14 60%); box-shadow: var(--shadow), inset 0 0 0 2px #3a3f4c;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz)); transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform;
}
.phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255,255,255,.18), transparent 35%); pointer-events: none; }
.phone-notch { position: absolute; top: 18px; left: 50%; width: 30%; height: 22px; transform: translateX(-50%); background: #0d0f14; border-radius: 0 0 14px 14px; z-index: 3; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #111; }
.screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .45s ease; }
.screen.is-on { opacity: 1; }
.phone-shadow { position: absolute; left: 10%; right: 10%; bottom: -36px; height: 30px; background: radial-gradient(closest-side, rgba(0,0,0,.28), transparent); filter: blur(6px); transform: translateZ(-60px); }
.story-steps { list-style: none; margin: 0; padding: 0; }
.story-step { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; opacity: .45; transition: opacity .3s; }
.story-step.is-on, .no-js .story-step { opacity: 1; }
.story-step h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.story-step p { font-size: 1.12rem; max-width: 44ch; }
.step-no { font-weight: 800; color: var(--accent-strong); margin: 0 0 6px; font-size: .9rem; letter-spacing: .06em; }
.step-shot { display: none; }
/* without JavaScript: every step shows its own screen; the phone keeps the first */
.no-js .step-shot { display: block; width: min(260px, 70%); border-radius: 24px; box-shadow: var(--shadow); margin-top: 12px; }

@media (max-width: 860px) {
  /* phones: a smaller sticky phone at the top, steps scroll beneath it */
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .phone-col { top: 0; height: auto; max-height: none; padding: 10px 0; z-index: 2; background: linear-gradient(var(--paper) 85%, transparent); perspective: 900px; }
  .phone { width: 148px; border-radius: 26px; padding: 7px; }
  .phone-screen { border-radius: 20px; }
  .phone-notch { top: 9px; height: 11px; }
  .phone-shadow { display: none; }
  .story-step { min-height: 52vh; padding: 12px 0 24px; text-align: center; align-items: center; }
  .no-js .phone-col { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .phone { transition: none; transform: none !important; }
  .screen { transition: none; }
  .story-step { transition: none; }
}
.reduced .phone { transform: none !important; transition: none; }

/* bands, cards */
.band { background: var(--soft); padding: clamp(40px, 7vw, 84px) 0; }
.band-dark { background: var(--deep); color: #fff; }
.final-cta { text-align: center; }
.final-cta .cta-row { justify-content: center; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 24px 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { margin: .3em 0 0; }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 20px; }
.calc-inputs { display: grid; gap: 12px; }
.calc label { display: grid; gap: 4px; font-weight: 600; }
.calc input { font: inherit; padding: 10px 12px; border: 1px solid #b9b0a2; border-radius: 10px; background: #fff; min-height: 44px; width: 100%; }
.calc-out { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.calc-out p { margin: 0 0 10px; }
.calc-big { font-size: 1.35rem; color: var(--good); }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }

/* gallery */
.gallery { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gallery li.wide { grid-column: span 2; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 16px; border: 1px solid var(--line); background: #fff; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.gallery li.wide img { aspect-ratio: 16 / 9; }
.gallery figcaption { font-size: .9rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 480px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gallery li.wide { grid-column: 1 / -1; } }

/* how it works */
.how { counter-reset: how; list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.how li { counter-increment: how; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how li::before { content: counter(how); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 10px; }

/* pricing */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 20px 0; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.plan .price { font-size: 2rem; font-weight: 800; margin: .2em 0; }
.plan .price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan ul { padding-left: 1.2em; flex: 1; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; min-height: 32px; }
.faq p { max-width: 70ch; }

/* forms */
.form { display: grid; gap: 14px; margin-top: 18px; }
.fld { display: grid; gap: 4px; }
.fld label { font-weight: 600; }
.fld input, .fld select, .form textarea, .act input, .act select, .act textarea, .filters input, .filters select, .inline-form input {
  font: inherit; padding: 10px 12px; border: 1px solid #8f8778; border-radius: 10px; background: #fff; min-height: 44px; width: 100%; color: var(--ink);
}
.fld.has-error input, .fld.has-error select { border-color: var(--bad); }
.fld-err { color: var(--bad); margin: 0; font-size: .92rem; }
.check label { font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: 3px; }
.plan-pick { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 10px; }
.plan-opt { display: flex; gap: 10px; align-items: flex-start; }
.plan-opt input { width: 22px; height: 22px; margin-top: 4px; }

/* account */
.acct-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.restaurant-card { margin: 18px 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 18px; margin: 12px 0; }
.facts div { min-width: 0; }
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.key-label { font-weight: 700; display: block; margin-top: 10px; }
.key { width: 100%; font: 13px/1.4 ui-monospace, Consolas, monospace; padding: 10px; border-radius: 10px; border: 1px solid #8f8778; background: #faf8f4; word-break: break-all; resize: vertical; }
.steps summary { font-weight: 700; cursor: pointer; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; vertical-align: middle; background: var(--soft); color: var(--ink); white-space: nowrap; }
.pill-trial { background: #e0ecff; color: #1e3a8a; }
.pill-active { background: #dcfce7; color: var(--good); }
.pill-grace { background: #fef3c7; color: var(--warn); }
.pill-expired, .pill-revoked { background: #fee2e2; color: var(--bad); }
.pill-suspended { background: #fde4e4; color: #7f1d1d; }
.pill-silent { background: #ede9fe; color: #5b21b6; }
/* position: relative keeps absolutely placed children (the .sr-only labels in table forms) inside the scroll box,
   so a wide table never makes the whole page scroll sideways on a phone. */
.table-wrap { overflow-x: auto; max-width: 100%; position: relative; }
.table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: 10px 0 18px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.mail-text { background: #faf8f4; padding: 10px; border-radius: 8px; font-size: .88rem; }
.prose { max-width: 70ch; }
.plain { list-style: none; padding: 0; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* ── control centre ── */
.cc { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.cc-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: var(--deep); color: #fff; gap: 12px; }
.cc-top .logo { color: #fff; }
.cc-top .logo-mark { background: var(--accent); }
.cc-top .btn-ghost { color: #fff; border-color: #fff; }
.cc-tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #f6c9a8; }
.cc-nav { background: #f3efe8; border-right: 1px solid var(--line); padding: 16px 12px; }
.cc-nav-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 14px 8px 4px; }
.cc-nav ul { list-style: none; padding: 0; margin: 0; }
.cc-nav a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.cc-nav a:hover { background: #e8e1d6; }
.cc-nav a[aria-current="page"] { background: var(--deep); color: #fff; }
.cc-main { padding: 20px clamp(16px, 3vw, 32px) 60px; min-width: 0; }
.cc-main h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cc-main h2 { font-size: 1.25rem; margin-top: 1.4em; }
@media (max-width: 820px) {
  .cc { grid-template-columns: 1fr; }
  .cc-nav { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 0 14px; }
  .cc-nav-h { display: none; }
  .cc-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .cc-nav a { padding: 6px 8px; font-size: .9rem; }
}
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 16px 0 8px; }
.tile { display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--deep); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.tile:hover { background: #fffdf9; color: var(--ink); }
.tile-good { border-left-color: var(--good); }
.tile-bad { border-left-color: var(--bad); }
.tile-warn { border-left-color: #7c3aed; }
.tile-n { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.tile-l { color: var(--muted); font-size: .92rem; }
.tile-n-money { font-size: 1.35rem; line-height: 1.5; overflow-wrap: anywhere; }
.bar.bar-sales { fill: var(--good); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 10px 0; }
.filters label { display: grid; gap: 2px; font-size: .85rem; font-weight: 600; min-width: 140px; max-width: 320px; flex: 1 1 140px; }
.filters label.inline, label.inline { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 0 auto; font-weight: 600; font-size: .9rem; }
label.inline input { width: 20px; height: 20px; min-height: 0; }
.spark { color: var(--deep); display: block; }
.chart { margin: 8px 0; }
.bars { width: 100%; height: 140px; color: var(--ink); }
.bar { fill: var(--accent); }
.actions { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.act { display: grid; gap: 8px; align-content: start; }
.act label { display: grid; gap: 2px; font-size: .9rem; font-weight: 600; }
.act-danger { border-color: #f5b5b5; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form input[name="reason"] { width: 130px; min-height: 36px; padding: 4px 8px; }
.secret { font-size: 1.05rem; letter-spacing: .05em; }
.wrapcode { word-break: break-all; }

/* AI switch, settings cards and usage */
.ai-switch-form { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: #ece7df; color: var(--muted); font: 700 .85rem/1 var(--font); cursor: pointer; }
.switch-knob { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch.is-on { background: #dcfce7; border-color: #9fd9b4; color: var(--good); flex-direction: row-reverse; padding: 3px 3px 3px 10px; }
.switch.is-on .switch-knob { background: var(--good); }
.switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.provider-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin: 18px 0; }
.provider-cards .card { display: grid; gap: 10px; align-content: start; }
.provider-cards h2 { margin: 0; font-size: 1.1rem; }
.provider-form label { display: grid; gap: 3px; font-size: .9rem; font-weight: 600; }
.provider-cards input[type="password"], .provider-cards input[type="text"], .links-form input { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.key-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { margin: 0; }
.cap-list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 8px 0 0; }
.links-form { display: grid; gap: 14px; max-width: 640px; margin-top: 18px; }
.links-form label { display: grid; gap: 4px; font-weight: 600; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin: 16px 0; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font-size: 1.5rem; }
.kpi span { font-size: .85rem; color: var(--muted); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.pill-off { background: #fee2e2; color: var(--bad); }
.pill-on { background: #dcfce7; color: var(--good); }
.provider-form { display: grid; gap: 10px; }
.provider-form p { margin: 0; }
[data-ai-month] { white-space: nowrap; }
.btn-row .inline-form { gap: 10px; }

/* free months not started yet / setup by us / test-only confirm link */
.pill-waiting { background: #e0ecff; color: #1e3a8a; }
.checklist { list-style: none; padding: 0; margin: .4em 0 0; }
.checklist li::before { content: "\2610"; margin-right: .5em; }
.checklist li.done::before { content: "\2611"; color: var(--good); }
.domain-form { margin: 14px 0; max-width: 520px; }
.setup-box { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.stages { display: grid; gap: 4px; padding-left: 1.6em; margin: .5em 0; }
.stages li { color: var(--muted); }
.stages li.done { color: var(--good); }
.stages li.now { color: var(--ink); }
.setup-tracker { margin-bottom: 10px; }
.extend-card { max-width: 560px; margin-bottom: 14px; }
.test-box { border: 2px dashed var(--bad); background: #fff; border-radius: 10px; padding: 10px 14px; margin: 14px 0; overflow-wrap: anywhere; }
.test-box-h { font-weight: 800; color: var(--bad); margin: 0; }

/* Pay by bank transfer (views/partials/bank-box.ejs) */
.bank-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 14px 0; background: #fafbff; }
.bank-box .h3 { margin-top: 0; }
.bank-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 18px; margin: 10px 0; }
.bank-facts dt { font-size: .85rem; color: var(--muted); }
.bank-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.bank-ref dd { font-size: 1.15rem; letter-spacing: .04em; }
.nowrap { white-space: nowrap; }

/* AI credits: the owner's credits page (views/credits.ejs) and the control centre price list */
.credit-balance { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 14px 0 22px; background: #fff; }
.credit-n { font-size: 1.15rem; margin: 0 0 .3em; }
.credit-n strong { font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.packs { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pack { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; display: grid; gap: 4px; align-content: start; }
.pack p { margin: 0; }
.pack-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pack-credits { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pack-price { color: var(--muted); margin-bottom: 6px !important; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 18px; margin: 10px 0; }
.price-grid label { display: grid; gap: 4px; font-size: .95rem; }
.price-grid input { max-width: 140px; }

/* the owner's logo on the account page (uploaded in the wizard, /start/logo) */
.acct-logo { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.acct-logo img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; }

/* ── the owner's account (views/account.ejs): one next step first, three tiles, the rest folded away ── */
.ac-eyebrow { margin: 0 0 2px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); }
.ac .acct-head h1 { margin: 0; }
.ac-card { padding: 0; overflow: hidden; border-radius: 18px; box-shadow: 0 10px 30px rgba(31, 42, 68, .06); }
.ac-card > * { margin-left: 24px; margin-right: 24px; }
.ac-card > .ac-top, .ac-card > .ac-fold { margin-left: 0; margin-right: 0; }
.ac-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 0; padding: 20px 24px; border-bottom: 1px solid var(--line); background: #fdfcf9; }
.ac-top h2 { margin: 0 0 2px; font-size: 1.3rem; overflow-wrap: anywhere; }
.ac-top p { margin: 0; }
.ac-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.ac-logo-none { display: inline-grid; place-items: center; background: #1f2a44; color: #fff; border: 0; font-weight: 800; font-size: 1.4rem; }
.ac-card > .error-box { margin-top: 16px; }
.ac-next { margin-top: 20px; padding: 20px 22px; border-radius: 16px; background: #fff4ec; border: 1px solid #f6d3bd; }
.ac-next h3 { margin: 0 0 4px; font-size: 1.35rem; line-height: 1.25; }
.ac-next > p { margin: 0 0 4px; max-width: 62ch; }
.ac-next-k { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); }
.ac-next-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 14px 0 0 !important; }
.ac-next-setup { background: #eef3ff; border-color: #cfdcfb; }
.ac-next-setup .ac-next-k { color: #1e3a8a; }
.ac-next-running { background: #edfaf2; border-color: #b7e4c7; }
.ac-next-ok { color: var(--good); }
.ac-next-stopped { background: #fef2f2; border-color: #f5b5b5; }
.ac-next-stopped .ac-next-k { color: var(--bad); }
.ac-missing { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #eec4a8; }
.ac-missing p { margin: 0; }
.ac-next .domain-form { margin-top: 14px; max-width: 520px; }
.ac-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 16px; margin-bottom: 22px; }
.ac-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; min-width: 0; }
.ac-tile p { margin: 0; }
.ac-tile-k { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ac-tile-big { font-size: 1.7rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.ac-tile-big span { font-size: .92rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ac-tile-go { margin: 10px 0 2px !important; }
.ac-tile form.ac-tile-go { margin: 10px 0 2px; }
.ac-card > .setup-box { margin-top: 0; margin-bottom: 20px; }
.ac-fold { border-top: 1px solid var(--line); margin-left: 0; margin-right: 0; padding: 0 24px; }
.ac-fold summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ac-fold summary::-webkit-details-marker { display: none; }
.ac-fold summary::after { content: "+"; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--soft); font-weight: 800; color: var(--accent-strong); flex: none; }
.ac-fold[open] summary::after { content: "–"; }
.ac-fold[open] { padding-bottom: 18px; }
.ac-fold .key-label { margin-top: 0; }
@media (max-width: 600px) {
  .ac-card > * { margin-left: 16px; margin-right: 16px; }
  .ac-top { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .ac-top .acct-logo { grid-column: 1 / -1; }
  .ac-next { padding: 16px; }
  .ac-next-go .btn { width: 100%; }
  .ac-fold { padding: 0 16px; }
}
.pre-line { white-space: pre-line; }

/* the eye in a password box: show / hide what is typed */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 48px; }
.pw-eye { position: absolute; top: 0; right: 0; bottom: 0; width: 46px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; border-radius: 0 8px 8px 0; }
.pw-eye:hover, .pw-eye:focus-visible { opacity: 1; }
.pw-eye[aria-pressed="true"] .pw-eye-off { display: none; }

/* partner pages (views/partners.ejs, partner-account.ejs) */
.pt-form { max-width: 640px; }
.pt-num { font-size: 1.7rem; font-weight: 800; margin: .1em 0; font-variant-numeric: tabular-nums; }
.form textarea { resize: vertical; }
.plan-pick legend { padding: 0 6px; }
.plan-pick.has-error { border-color: var(--bad); }
