/* CNC Studio — one design system with the landing page (Apple's, measured from apple.com):
   SF Pro / SF Arabic, #f5f5f7 page, white cards, #1d1d1f ink, #6e6e73 secondary, ONE blue.
   Tokens and components only; page layouts live in each page.
   Older names are kept so every page keeps working: --copper IS the blue accent now. */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --sunk: #f5f5f7;
  --sunk2: #e8e8ed;
  --line: #e8e8ed;
  --line2: #d2d2d7;
  --ink: #1d1d1f;
  --ink2: #000000;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --copper: #0071e3;          /* the accent (Apple blue) */
  --copper-soft: #e8f1fc;
  --copper-line: #c9def7;
  --link: #0066cc;
  --ok: #248a3d;   --ok-soft: #eaf6ec;   --ok-ink: #1b6b2f;
  --warn: #b25000; --warn-soft: #fff4e5; --warn-ink: #8a3d00;
  --bad: #d70015;  --bad-soft: #fff0f0;  --bad-ink: #a50011;
  --info: #0066cc; --info-soft: #eef5fd; --info-ink: #0b4a8b;
  --radius: 18px;
  --font: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "SF Arabic", "IBM Plex Sans Arabic", "Helvetica Neue", Arial, sans-serif;
  --display: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "SF Arabic", "IBM Plex Sans Arabic", "Helvetica Neue", Arial, sans-serif;
  --body: var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .04);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .05), 0 24px 48px -16px rgba(0, 0, 0, .18);
  /* --deep: dark page-level surfaces (wallet); --tile: dark tiles inside cards (price, toast) */
  --deep: #1d1d1f; --tile: #1d1d1f; --solid: #0071e3; --solid-h: #0077ed; --on-solid: #ffffff;
  --btn2: #e8e8ed; --btn2-h: #dcdce1;
  --ring: rgba(0, 113, 227, .15);
  --seg-track: #e8e8ed; --seg-on: #ffffff;
  --nav: rgba(255, 255, 255, .72); --nav-line: rgba(0, 0, 0, .08);
  --mark-bg: #1d1d1f; --mark-fg: #ffffff;
  --hover: #fafafc; --glass: rgba(255, 255, 255, .72);
  --bad-line: #f5c2c7; --warn-line: #f3d3ad;
  --ai-soft: #faf7ff; --ai-soft2: #fff7fb; --ai-line: #eee4ff;
  --view-b: #f5f5f7; --view-c: #e8e8ed;
  color-scheme: light;
  /* the agent is the only loud thing on the page (same as the landing) */
  --ai1: #7c3aed; --ai2: #db2777; --ai3: #f59e0b; --ai4: #06b6d4;
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1d1d1f; --sunk: #2c2c2e; --sunk2: #3a3a3c;
  --line: #38383a; --line2: #424245;
  --ink: #f5f5f7; --ink2: #ffffff; --text: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73;
  --copper: #2997ff; --copper-soft: #0d2440; --copper-line: #1a4170; --link: #2997ff;
  --ok: #30d158; --ok-soft: #0f2a17; --ok-ink: #6ee08b;
  --warn: #ff9f0a; --warn-soft: #2e1f08; --warn-ink: #ffb35c;
  --bad: #ff453a; --bad-soft: #2f1210; --bad-ink: #ff8a80;
  --info: #2997ff; --info-soft: #0d2232; --info-ink: #8cc4ff;
  --deep: #1d1d1f; --tile: #2c2c2e; --solid: #0a84ff; --solid-h: #409cff; --on-solid: #ffffff;
  --btn2: #3a3a3c; --btn2-h: #48484a;
  --ring: rgba(41, 151, 255, .28);
  --seg-track: #2c2c2e; --seg-on: #636366;
  --nav: rgba(22, 22, 23, .8); --nav-line: rgba(255, 255, 255, .08);
  --mark-bg: #f5f5f7; --mark-fg: #000000;
  --hover: #232325; --glass: rgba(29, 29, 31, .78);
  --bad-line: #5c1e1a; --warn-line: #4d3412;
  --ai-soft: #1d1a2b; --ai-soft2: #2a1a24; --ai-line: #3a2f55;
  --view-b: #1d1d1f; --view-c: #000000;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 48px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #000000; --card: #1d1d1f; --sunk: #2c2c2e; --sunk2: #3a3a3c;
  --line: #38383a; --line2: #424245;
  --ink: #f5f5f7; --ink2: #ffffff; --text: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73;
  --copper: #2997ff; --copper-soft: #0d2440; --copper-line: #1a4170; --link: #2997ff;
  --ok: #30d158; --ok-soft: #0f2a17; --ok-ink: #6ee08b;
  --warn: #ff9f0a; --warn-soft: #2e1f08; --warn-ink: #ffb35c;
  --bad: #ff453a; --bad-soft: #2f1210; --bad-ink: #ff8a80;
  --info: #2997ff; --info-soft: #0d2232; --info-ink: #8cc4ff;
  --deep: #1d1d1f; --tile: #2c2c2e; --solid: #0a84ff; --solid-h: #409cff; --on-solid: #ffffff;
  --btn2: #3a3a3c; --btn2-h: #48484a;
  --ring: rgba(41, 151, 255, .28);
  --seg-track: #2c2c2e; --seg-on: #636366;
  --nav: rgba(22, 22, 23, .8); --nav-line: rgba(255, 255, 255, .08);
  --mark-bg: #f5f5f7; --mark-fg: #000000;
  --hover: #232325; --glass: rgba(29, 29, 31, .78);
  --bad-line: #5c1e1a; --warn-line: #4d3412;
  --ai-soft: #1d1a2b; --ai-soft2: #2a1a24; --ai-line: #3a2f55;
  --view-b: #1d1d1f; --view-c: #000000;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 48px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--link); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; margin: 0; color: var(--ink); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.mono { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }

/* ───────── top bar: the landing's nav — 52 px, translucent, blurs what scrolls under it */
header.top { height: 52px; background: var(--nav); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--nav-line); }

/* ───────── buttons: pills. primary = solid blue; secondary = light grey fill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; background: var(--btn2); color: var(--ink); border-radius: 980px; padding: 8px 16px; cursor: pointer; white-space: nowrap; font-weight: 400; line-height: 1.25; text-decoration: none; transition: background .2s, border-color .2s, color .2s, transform .1s, box-shadow .2s; }
.btn:hover { background: var(--btn2-h); }
.btn:active { transform: scale(.97); }
.btn.primary, .btn.copper { background: var(--solid); color: var(--on-solid); }
.btn.primary:hover, .btn.copper:hover { background: var(--solid-h); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--sunk); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 5px 12px; font-size: 12.5px; }
.btn.icon { padding: 7px; }
.btn.small.icon { padding: 6px; }
.btn.wide { width: 100%; padding: 12px 16px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn:focus-visible { box-shadow: 0 0 0 4px var(--ring); outline: none; }

/* ───────── fields: 12 px corners, hairline, blue focus ring */
input, select, textarea { width: 100%; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 9px 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--copper); box-shadow: 0 0 0 4px var(--ring); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 30px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; }
.field > span b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; }
.unit { position: relative; }
.unit input { padding-inline-start: 38px; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.unit.wide input { padding-inline-start: 56px; }
/* the field itself is LTR, so on RTL pages the unit sits on its physical right */
[dir=rtl] .unit input { padding-left: 12px; padding-right: 38px; }
[dir=rtl] .unit.wide input { padding-right: 56px; }
.unit::after { content: attr(data-u); position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 12px; pointer-events: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stack { display: grid; gap: 12px; }

/* range: blue fill, white thumb (Apple's slider) */
input[type=range] { -webkit-appearance: none; appearance: none; padding: 0; border: 0; height: 22px; background: transparent; box-shadow: none; }
input[type=range]:focus { box-shadow: none; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to left, var(--copper) var(--p, 50%), var(--sunk2) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 .5px 4px rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .06); cursor: grab; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--ring), 0 4px 10px rgba(0, 0, 0, .14); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--sunk2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--copper); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 .5px 4px rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .14); }
.slider { display: grid; grid-template-columns: 1fr 104px; gap: 10px; align-items: center; }

/* segmented control — the landing's .seg: grey track, white selected pill */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; background: var(--seg-track); padding: 3px; border-radius: 980px; }
.seg button { border: 0; background: transparent; border-radius: 980px; padding: 7px 10px; cursor: pointer; color: var(--ink); font-weight: 400; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; transition: background .25s, color .25s, box-shadow .25s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); font-weight: 600; }

/* switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; user-select: none; }
.switch .t { display: grid; gap: 1px; }
.switch .t b { font-weight: 500; font-size: 13.5px; }
.switch .t small { color: var(--muted); font-size: 12px; }
.switch input { display: none; }
.switch i { position: relative; width: 40px; height: 24px; border-radius: 24px; background: var(--sunk2); flex: none; transition: background .25s; }
.switch i::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .25s var(--ease-art, ease); }
.switch input:checked + i { background: var(--copper); }
.switch input:checked + i::after { inset-inline-start: 18px; }

/* visual choice tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.tile { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 6px 8px; display: grid; justify-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--muted); transition: border-color .2s, color .2s, box-shadow .2s; }
.tile svg { width: 34px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tile:hover { border-color: var(--line2); color: var(--ink); }
.tile.on { border-color: var(--copper); color: var(--copper); box-shadow: 0 0 0 3px var(--ring); font-weight: 600; }

/* ───────── surfaces: white cards, 18 px, a hairline at most */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.pad-lg { padding: 24px; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.group > h4 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: var(--ink); }
.group > h4 svg { color: var(--copper); }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 980px; padding: 3px 11px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--sunk); color: var(--muted); border: 1px solid transparent; }
.chip.copper { background: var(--copper-soft); color: var(--link); }
.chip.ok { background: var(--ok-soft); color: var(--ok-ink); }
.chip.bad { background: var(--bad-soft); color: var(--bad-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* notes: the checks the engine measured — gentle tints, no borders */
.note { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.6; border: 1px solid transparent; background: var(--sunk); }
.note svg { width: 18px; height: 18px; margin-top: 1px; }
.note.info { background: var(--info-soft); color: var(--info-ink); }
.note.warn { background: var(--warn-soft); color: var(--warn-ink); }
.note.bad { background: var(--bad-soft); color: var(--bad-ink); }
.note.ok { background: var(--ok-soft); color: var(--ok-ink); }

/* tables */
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); font-size: 13px; }
table.t th { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--hover); }
table.t tr:last-child td { border-bottom: 0; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; z-index: 50; padding: 16px; animation: fade .18s ease-out; }
.modal > .sheet { background: var(--card); border: 1px solid var(--line); border-radius: 18px; width: min(460px, 100%); box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.modal .head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .head h3 { font-size: 17px; }
.modal .body { padding: 20px; display: grid; gap: 14px; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0 } }

/* toast */
#toasts { position: fixed; bottom: 18px; inset-inline-end: 18px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--tile); color: #f5f5f7; padding: 11px 16px; border-radius: 14px; font-size: 13px; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center; animation: pop .25s ease-out; }
.toast.bad { background: var(--bad); color: #fff; }

/* brand mark: a router bit cutting a curve — #1d1d1f tile (light), #f5f5f7 tile (dark) */
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--mark-bg); display: grid; place-items: center; color: var(--mark-fg); flex: none; }
.mark svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--ink); }
.brand b span { color: inherit; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* ───────── languages */
html[data-lang="en"] { --body: "SF Pro Text", -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif; --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif; }
html[data-lang="bn"] { --body: 'Noto Sans Bengali', -apple-system, 'Inter', sans-serif; --display: 'Noto Sans Bengali', -apple-system, sans-serif; }
html[data-lang="hi"] { --body: 'Noto Sans Devanagari', -apple-system, 'Inter', sans-serif; --display: 'Noto Sans Devanagari', -apple-system, sans-serif; }
.langpick { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 980px; padding: 0 4px 0 10px; height: 32px; background: transparent; color: var(--muted); transition: background .2s, color .2s; }
.langpick:hover { background: var(--sunk); color: var(--ink); }
.langpick select { border: 0; background: transparent; box-shadow: none; padding: 0 6px; height: 30px; font-size: 13px; color: var(--ink); width: auto; cursor: pointer; }
.langpick select:focus { box-shadow: none; }

/* ───────── top-up sheet (shared by every page) */
.tu-need { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tu-need div { background: var(--sunk); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.tu-need span { font-size: 11.5px; color: var(--muted); }
.tu-need b { font-family: var(--display); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.tu-need .short { background: var(--warn-soft); } .tu-need .short b { color: var(--warn-ink); }
.pkgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.pkg { border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; background: var(--card); cursor: pointer; display: grid; gap: 2px; text-align: center; transition: border-color .2s, background .2s, box-shadow .2s; }
.pkg:hover { border-color: var(--line2); }
.pkg b { font-family: var(--display); font-weight: 600; font-size: 18px; }
.pkg small { color: var(--muted); font-size: 11.5px; }
.pkg .bonus { color: var(--ok); font-weight: 600; font-size: 11.5px; }
.pkg.on { border-color: var(--copper); background: var(--card); box-shadow: 0 0 0 3px var(--ring); }
.tu-sum { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--sunk); }
.tu-sum .row { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.tu-sum .row b { font-variant-numeric: tabular-nums; }
.tu-sum .row.total { border-top: 1px solid var(--line2); padding-top: 6px; font-size: 15px; }
.tu-steps { display: grid; gap: 10px; }
.tu-bank { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.tu-bank .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.tu-bank code { font-family: var(--mono); direction: ltr; background: var(--sunk); padding: 3px 8px; border-radius: 8px; font-size: 13px; }
.tu-back { justify-self: start; }
.tu-orders { display: grid; gap: 6px; }
.tu-orders .o { display: flex; justify-content: space-between; font-size: 12.5px; padding: 8px 12px; border-radius: 10px; background: var(--sunk); }

/* ───────── theme toggle */
.themebtn { width: 32px; height: 32px; border-radius: 980px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; transition: color .2s, background .2s, transform .3s; }
.themebtn:hover { color: var(--ink); background: var(--sunk); transform: rotate(-15deg); }
.themebtn .sun { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: block; } :root[data-theme="dark"] .themebtn .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .themebtn .sun { display: block; } :root:not([data-theme="light"]) .themebtn .moon { display: none; } }
html { transition: background-color .25s; }

/* ───────── motion — Bayn's values (see motion.js) */
:root { --ease-art: cubic-bezier(.16, 1, .3, 1); --ease-soft: cubic-bezier(.22, 1, .36, 1);
        /* Bayn's hover spring (stiffness 90, damping 16), sampled */
        --spring: linear(0, 0.019, 0.067, 0.135, 0.214, 0.298, 0.382, 0.464, 0.541, 0.611, 0.675, 0.732, 0.782, 0.825, 0.861, 0.892, 0.918, 0.939, 0.956, 0.969, 0.98, 0.988, 0.995, 0.999, 1.002, 1.005, 1.006, 1.007, 1.007, 1.007, 1.007, 1.006, 1.006, 1.005, 1.005, 1.004, 1.004, 1.003, 1.002, 1.002, 1); }
/* reveal: the move uses `translate`, so an element's own hover `transform` keeps working */
.rv { opacity: .001; translate: 0 20px; filter: blur(8px);
      transition-property: opacity, translate, filter, transform, box-shadow, border-color, background-color;
      transition-duration: 1.1s, 1.1s, 1.1s, .25s, .25s, .25s, .25s;
      transition-timing-function: var(--ease-art), var(--ease-art), var(--ease-art), var(--ease-soft), ease, ease, ease;
      transition-delay: var(--rv-d, 0ms), var(--rv-d, 0ms), var(--rv-d, 0ms), 0s, 0s, 0s, 0s; }
.rv.soft { filter: blur(4px); transition-duration: 1.6s, 1.6s, 1.6s, .25s, .25s, .25s, .25s; }
.rv.in { opacity: 1; translate: 0 0; filter: blur(0); }
.rv.out { opacity: .35; translate: 0 8px; filter: blur(8px); transition-delay: 0s; }
.rv.soft.out { filter: blur(4px); }
/* entrance on load: hero lines and the nav bar */
@keyframes enter { from { opacity: .001; translate: 0 20px; filter: blur(8px); } }
@keyframes nav-in { from { opacity: .001; translate: 0 -32px; filter: blur(6px); } }
.enter { animation: enter 1.1s var(--ease-art) both; animation-delay: var(--d, 0ms); }
.nav-in { animation: nav-in 1.1s var(--ease-art) both; }
.rise { animation: enter 1.1s var(--ease-art) both; animation-delay: var(--d, 0ms); }
@keyframes enter-fast { from { opacity: .001; translate: 0 12px; filter: blur(4px); } }
.enter-fast { animation: enter-fast .7s var(--ease-art) both; animation-delay: var(--d, 0ms); }
/* hover lift — Bayn: cards 3 px, feature cards 6 px with the icon tilting -8° */
.lift { transition: transform .35s var(--ease-art), box-shadow .35s var(--ease-art), border-color .25s; }
.lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line2); }
.lift .ic, .lift .fi { transition: transform .35s var(--ease-art); }
.lift:hover .ic, .lift:hover .fi { transform: rotate(-8deg) scale(1.08); }
/* the progress line */
.scroll-progress { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 70; transform: scaleX(0); transform-origin: 0 50%;
                   background: linear-gradient(90deg, #0071e3, #2997ff); pointer-events: none; }
[dir=rtl] .scroll-progress { transform-origin: 100% 50%; background: linear-gradient(270deg, #0071e3, #2997ff); }
html.lenis, html.lenis body { height: auto; }
/* self-drawing icons */
svg.draw { transition: transform .87s var(--spring); }
svg.draw > * { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
               transition: stroke-dashoffset 2s var(--ease-soft) var(--dd, 0ms), opacity .5s ease var(--dd, 0ms); }
svg.draw.on > * { stroke-dashoffset: 0; opacity: 1; }
svg.draw.quick > * { transition-duration: 1.1s, .3s; }
svg.draw.reset > * { transition: none !important; }
:is(a, button, label, .draw-host):hover > svg.draw.on { transform: rotate(6deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .rv, .lift, .rise, .enter, .enter-fast, .nav-in { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; translate: none !important; filter: none !important; }
  svg.draw > * { stroke-dashoffset: 0 !important; opacity: 1 !important; transition: none !important; } }

/* ───────── notification bell */
.bell { position: relative; display: inline-flex; }
.bellbtn { width: 32px; height: 32px; border-radius: 980px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; position: relative; transition: color .2s, background .2s; }
.bellbtn:hover { color: var(--ink); background: var(--sunk); }
.bellbtn .dot { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 17px; height: 17px; border-radius: 980px; background: var(--bad); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; display: grid; place-items: center; padding: 0 4px; animation: pop .3s; }
.bellpop { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: min(360px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; animation: pop .2s; }
.bellhead { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.belllist { max-height: 60vh; overflow-y: auto; }
.note-it { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); cursor: pointer; }
.note-it:hover { background: var(--hover); }
.note-it.new { background: var(--copper-soft); }
.note-it .ni { width: 28px; height: 28px; border-radius: 8px; background: var(--sunk); color: var(--copper); display: grid; place-items: center; flex: none; }
.note-it .nt { display: grid; gap: 2px; min-width: 0; }
.note-it .nt b { font-size: 13px; font-weight: 600; }
.note-it .nt small { color: var(--muted); font-size: 12px; }
.note-it .nt em { color: var(--faint); font-size: 11px; font-style: normal; }
.bellempty { padding: 26px 12px; text-align: center; color: var(--muted); display: flex; gap: 6px; justify-content: center; align-items: center; }

/* ───────── plans (shared: landing, top-up sheet) — the landing's plan cards */
.periods { display: inline-grid; grid-auto-flow: column; gap: 2px; background: var(--seg-track); padding: 3px; border-radius: 980px; }
.periods button { border: 0; background: transparent; border-radius: 980px; padding: 7px 16px; cursor: pointer; color: var(--ink); font-weight: 400; display: inline-flex; gap: 6px; align-items: center; transition: background .25s, box-shadow .25s; }
.periods button.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); font-weight: 600; }
.periods .save { color: var(--ok); font-weight: 600; padding: 0; font-size: 12px; background: none; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px; background: var(--card); display: grid; gap: 6px; cursor: pointer; align-content: start; transition: border-color .2s, transform .25s, box-shadow .25s; }
.plan:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.plan.on { border-color: transparent; box-shadow: inset 0 0 0 2px var(--copper); }
.plan .badge { position: absolute; top: -10px; inset-inline-start: 14px; background: var(--copper); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 980px; }
.plan h4 { font-size: 17px; }
.plan .pr { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.005em; font-variant-numeric: tabular-nums; }
.plan .pr small { font-size: 12px; color: var(--muted); font-weight: 400; }
.plan .pts { font-size: 14px; color: var(--ink); font-weight: 600; }
.plan .pp { font-size: 12px; color: var(--muted); }
.plan ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; font-size: 12.5px; color: var(--ink); }
.plan ul li::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); margin-inline-end: 8px; vertical-align: 2px; }
.tabs3 { display: grid; grid-auto-flow: column; gap: 2px; background: var(--seg-track); padding: 3px; border-radius: 980px; }
.tabs3 button { border: 0; background: transparent; padding: 7px 10px; border-radius: 980px; cursor: pointer; color: var(--ink); font-weight: 400; display: inline-flex; gap: 6px; justify-content: center; align-items: center; transition: background .25s, box-shadow .25s; }
.tabs3 button.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); font-weight: 600; }
.modal > .sheet.wide { width: min(720px, 100%); }
.modal .body { max-height: calc(100vh - 120px); overflow-y: auto; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.hint-up { display: flex; gap: 8px; align-items: center; width: 100%; border: 1px solid transparent; background: var(--copper-soft); color: var(--link); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 500; font-size: 13px; text-align: start; transition: border-color .2s; }
.hint-up:hover { border-color: var(--copper-line); }

/* ───────── verdict + payment tiles (studio result, top-up sheet on every page) */
.verdict { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; border-radius: 14px; padding: 12px; }
.verdict .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.verdict b { display: block; font-family: var(--display); font-weight: 600; font-size: 15px; }
.verdict small { font-size: 12px; }
.verdict.ok { background: var(--ok-soft); color: var(--ok-ink); } .verdict.ok .ic { background: var(--ok); }
.verdict.bad { background: var(--bad-soft); color: var(--bad-ink); } .verdict.bad .ic { background: var(--bad); }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.paytile { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px 10px; display: grid; justify-items: center; gap: 3px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.paytile:hover { border-color: var(--copper); box-shadow: 0 0 0 3px var(--ring); }
.paytile span { color: var(--copper); }
.paytile b { font-weight: 600; }
.paytile small { color: var(--muted); font-size: 12px; }
.bankbox { background: var(--sunk); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; font-size: 13px; }
.bankbox .row { display: flex; justify-content: space-between; gap: 8px; }
.bankbox code { font-family: var(--mono); direction: ltr; color: var(--ink); font-weight: 600; }
.paytile:disabled { opacity: .5; cursor: default; }
.paytile { display: grid; justify-items: center; gap: 3px; }

/* ───────── «ربط Claude» (MCP keys) */
#connect .body { max-height: calc(100vh - 110px); overflow-y: auto; }
.modal .body > * { min-width: 0; }
.cn-tabs { max-width: 100%; overflow-x: auto; }
.cn-tabs button { white-space: nowrap; padding-inline: 12px; }
@media (max-width: 520px) { .cn-new { flex-wrap: wrap; } .cn-new .btn { flex: 1; justify-content: center; } }
.cn-code pre.wrap { white-space: pre-wrap; word-break: break-all; }
.cn-lead { margin: 0; color: var(--muted); font-size: 13.5px; }
.cn-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.cn-step > div { display: grid; gap: 8px; min-width: 0; }
.cn-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--copper-soft); color: var(--link); border: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 13px; }
.cn-keys { display: grid; gap: 6px; }
.cn-k { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--card); }
.cn-k .ki { color: var(--copper); display: grid; }
.cn-k .kt { display: grid; min-width: 0; }
.cn-k .kt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-none { color: var(--muted); font-size: 13px; padding: 4px 0; }
.cn-new { display: flex; gap: 8px; }
.cn-new input { flex: 1; min-width: 0; }
.cn-fresh { border: 1px solid var(--copper-line); background: var(--copper-soft); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.cn-fresh b { display: flex; gap: 6px; align-items: center; font-size: 13.5px; }
.cn-key { display: flex; gap: 8px; align-items: center; }
.cn-key code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; direction: ltr; text-align: left; }
.cn-tabs { justify-self: start; }
.cn-hint { color: var(--muted); font-size: 12.5px; }
.cn-code { display: grid; gap: 6px; }
.cn-code pre { margin: 0; background: var(--tile); color: #f5f5f7; border-radius: 12px; padding: 14px; font-size: 12px; line-height: 1.55; overflow-x: auto; direction: ltr; text-align: left; white-space: pre; }
.cn-code .btn { justify-self: end; order: -1; }
.cn-doc { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--link); text-decoration: none; }
.cn-doc:hover { text-decoration: underline; }

/* Tap: the online payment tile spans the row and shows the methods the account accepts */
.pay .paytile.tap { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; text-align: start; gap: 6px 12px; padding: 14px 16px; border-color: var(--copper-line); background: var(--copper-soft); }
.pay .paytile.tap > svg { grid-row: span 2; align-self: center; color: var(--copper); }
.pay .paytile.tap .tt { display: grid; gap: 2px; }
.pay .paytile.tap .pay-chips { grid-column: 2; }
