/* =============================================================================
   Everything the pages share: base, buttons, forms, the top bar, the landing bands,
   the account pages. Tokens come from theme.css; nothing here invents a colour or a
   radius. Logical properties throughout: <html dir="rtl"> mirrors the whole site.
   ============================================================================= */

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

html { scroll-behavior: smooth; }
/* Faces come from theme.css: Almarai and El Messiri both carry Arabic and Latin, so one pair serves both languages. */

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Hidden until the dictionary is in, so an Arabic page never flashes English. The animation
   is the way out if the script never runs: a blank page is the worse failure. */
html.i18n-wait body { visibility: hidden; animation: ws-reveal 0s 2.5s forwards; }
@keyframes ws-reveal { to { visibility: visible; } }

[hidden] { display: none !important; }

/* For screen readers only: live regions and headings that are always in the page. */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--panel-2);
  border: 0.8px solid var(--border-soft);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--accent-2);
  /* Isolated: a `.ydr` inside an Arabic sentence otherwise loses its leading dot. */
  unicode-bidi: isolate;
}

/* Letter-spacing pulls Arabic letters apart: the script is joined and tracking breaks the
   joins. File names in mono keep theirs. */
html[lang='ar'] body :is(h1, h2, h3, h4, p, a, b, strong, small, span, li, button, label, em) { letter-spacing: normal; }
html[lang='ar'] .eyebrow, html[lang='ar'] .wd-eyebrow, html[lang='ar'] .wd-label { text-transform: none; letter-spacing: normal; }

/* ------------------------------------------------------------------ buttons
   Pills. The yellow one is the single primary action of a screen. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 0.8px solid transparent;
  cursor: pointer; text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary-grad); color: var(--on-primary);
  border-color: transparent;
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled {
  background: var(--raised); color: var(--text-faint);
  border-color: var(--border); box-shadow: none; cursor: not-allowed; filter: none;
}
.btn-quiet { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.btn-quiet:hover { background: var(--raised); border-color: var(--border-lit); }
.btn-quiet:disabled, .btn-ghost:disabled, .btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-dim); border-color: transparent; padding: 8px 14px; }
.btn-ghost:hover { color: var(--text); background: var(--panel-2); }
.btn-danger { background: oklch(0.68 0.19 20 / 0.14); color: var(--danger); border-color: oklch(0.68 0.19 20 / 0.35); }
.btn-danger:hover { background: oklch(0.68 0.19 20 / 0.24); }
.btn-lg { font-size: 15px; padding: 14px 28px; }
.btn-sm { font-size: 13px; padding: 8px 14px; }
.btn-block { width: 100%; }

.spin {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 2px solid var(--border-lit); border-top-color: var(--accent);
  animation: ws-spin .8s linear infinite;
}
@keyframes ws-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.input {
  font: inherit; font-size: 14px;
  padding: 10px 12px; width: 100%; min-width: 0;
  background: var(--well); color: var(--text);
  border: 0.8px solid var(--border); border-radius: var(--r-control);
}
.input:focus { outline: none; border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled { opacity: 0.55; }
input[dir="ltr"].input { text-align: start; }
html[dir='rtl'] input[dir="ltr"].input { text-align: end; }
textarea.input { resize: vertical; min-height: 70px; }
.help { font-size: 12px; color: var(--text-faint); line-height: 1.5; }
.form-msg { font-size: 13px; line-height: 1.5; padding: 9px 12px; border-radius: var(--r-control); }
.form-msg.is-err { color: var(--danger); background: oklch(0.68 0.19 20 / 0.1); }
.form-msg.is-ok { color: var(--ok); background: oklch(0.75 0.16 155 / 0.1); }

.auth-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-control); background: var(--bg); border: 0.8px solid var(--border-soft); }
.auth-tab {
  flex: 1; font: inherit; font-size: 13.5px; font-weight: 600; padding: 8px 10px;
  border: 0; border-radius: 6px; background: none; color: var(--text-dim); cursor: pointer;
}
.auth-tab.is-on { background: var(--raised); color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

/* ------------------------------------------------------------------ top bar
   One rounded strip: the product, the workspace, the links, then the account
   end (credits, upgrade, notifications, avatar). */
#shell {
  position: sticky; top: 0; z-index: 60;
  padding: 10px 12px 0;
  background: var(--bg);
}
.shell-inner {
  display: flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 8px 0 14px;
  padding-inline: 14px 8px;
  background: var(--bar);
  border: 0.8px solid var(--border-soft);
  border-radius: 22px;
}
.shell-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  flex: none; min-width: 0;
}
.brand-mark { display: block; width: 62px; height: 28px; object-fit: contain; flex: none; }
.shell-name { font-weight: 800; font-size: 16px; letter-spacing: 0.01em; white-space: nowrap; }
.shell-pill {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--panel-2); border: 0.8px solid var(--border-soft);
  font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; text-decoration: none;
}
.shell-pill small {
  font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: var(--r-pill);
  background: var(--raised); color: var(--text-dim);
}
.shell-ws { margin-inline-start: 6px; background: var(--panel-2); }
.shell-nav { display: flex; align-items: center; gap: 2px; min-width: 0; margin-inline-start: clamp(2px, 1vw, 14px); }
.shell-link {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600;
  color: var(--text); text-decoration: none;
  white-space: nowrap;
}
.shell-link:hover { background: var(--panel-2); }
.shell-link.is-here { color: var(--primary); }
.shell-end { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; min-width: 0; }
.lang-toggle {
  display: inline-flex; padding: 2px; gap: 2px; flex: none;
  border-radius: var(--r-pill); background: var(--panel-2); border: 0.8px solid var(--border-soft);
}
.lang-toggle button {
  font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.2;
  padding: 5px 10px; border: 0; border-radius: var(--r-pill); background: none; color: var(--text-faint); cursor: pointer;
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.is-on { background: var(--raised); color: var(--text); }
.rank-badge {
  flex: none; display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; line-height: 1.4;
  padding: 4px 11px; border-radius: var(--r-pill); text-decoration: none;
  color: var(--text-dim); background: var(--panel-2); border: 0.8px solid var(--border-soft);
}
.rank-badge:not(.rank-free) { color: var(--primary); background: rgb(249 207 0 / 0.1); border-color: rgb(249 207 0 / 0.3); }
.shell-credit { padding-inline: 12px 14px; gap: 7px; }
.shell-credit .icon-sm { color: var(--primary); width: 17px; height: 17px; }
.shell-credit b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.shell-ib {
  position: relative; flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel-2); border: 0.8px solid var(--border-soft);
  color: var(--text); cursor: pointer; font: inherit;
}
.shell-ib:hover, .shell-ib[aria-expanded="true"] { background: var(--raised); }
.shell-ib .icon-sm { width: 17px; height: 17px; }
.shell-dot {
  position: absolute; top: 4px; inset-inline-end: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #ef4444; border: 1.5px solid var(--bar);
}
.shell-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(140deg, var(--accent-fill), #8b5cf6);
  border: 0; color: #fff; font: inherit; font-size: 14px; font-weight: 700; text-transform: uppercase;
}
.shell-avatar:hover, .shell-avatar[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 3px var(--accent); }
.shell-avatar .icon-sm { width: 17px; height: 17px; }
.shell-menu { position: relative; flex: none; }
.shell-drop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  min-width: 210px; z-index: 70;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 0.8px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-3);
  padding: 6px;
}
.shell-drop-note { padding: 8px 11px 6px; font-size: 12px; color: var(--text-faint); }
.shell-drop-note b { color: var(--text); font-weight: 600; }
.shell-notes { min-width: 280px; max-height: 320px; overflow-y: auto; }
.shell-note { padding: 9px 11px; font-size: 13px; line-height: 1.45; border-radius: 10px; color: var(--text); overflow-wrap: anywhere; }
.shell-note small { display: block; color: var(--text-faint); font-size: 11px; }
.shell-note.is-err { color: var(--danger); }
.drop-item {
  display: block; width: 100%; text-align: start;
  font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 9px 11px; border-radius: 10px; border: 0; background: none;
  text-decoration: none; color: var(--text); cursor: pointer;
}
.drop-item:hover { background: var(--panel-2); }
.only-narrow, .only-narrow-flex { display: none; }

/* ---- the Sections dropdown (shell.js, sections.js) */
button.shell-link { font: inherit; font-size: 13.5px; font-weight: 600; border: 0; background: none; cursor: pointer; }
.sec-btn[aria-expanded="true"] { background: var(--panel-2); }
.sec-btn .icon-sm:last-child { width: 13px; height: 13px; opacity: 0.7; transition: rotate 0.15s var(--ease); }
.sec-btn[aria-expanded="true"] .icon-sm:last-child { rotate: 180deg; }
.shell-drop-start { inset-inline-end: auto; inset-inline-start: 0; min-width: 240px; }
.sec-item { display: flex; align-items: center; gap: 10px; }
.sec-item.only-narrow-flex { display: none; }
.sec-item .icon-sm { width: 17px; height: 17px; color: var(--text-dim); }
.sec-item .sec-name { flex: 1; min-width: 0; }
.sec-item.is-here { color: var(--primary); background: rgb(249 207 0 / 0.08); }
.sec-item.is-here .icon-sm { color: var(--primary); }
.sec-item.is-soon { color: var(--text-faint); cursor: default; }
.sec-item.is-soon:hover { background: none; }
.sec-item.is-soon .icon-sm { color: var(--text-faint); }
.sec-badge {
  flex: none; font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: 0.02em;
  padding: 4px 8px; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--raised); color: var(--text-dim); border: 0.8px solid var(--border-soft);
}
.sec-badge.is-exp { color: var(--warn); background: oklch(0.80 0.15 75 / 0.12); border-color: oklch(0.80 0.15 75 / 0.35); }
.sec-badge.is-soon { color: var(--text-faint); }

@media (max-width: 1100px) {
  .shell-ws { display: none; }
}
@media (max-width: 760px) {
  .shell-nav, .hide-narrow { display: none; }
  .only-narrow { display: block; }
  .only-narrow-flex, .sec-item.only-narrow-flex { display: flex; }
}
@media (max-width: 520px) {
  #shell { padding: 8px 8px 0; }
  .shell-inner { padding-inline: 10px 6px; gap: 6px; }
  .shell-name { display: none; }
  .rank-badge { display: none; }
  .shell-credit { padding-inline: 9px 11px; }
  .lang-toggle button { padding: 5px 8px; }
}

/* ------------------------------------------------------------------ landing */
.page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
/* The home page's violet light, carried onto the other pages as one soft wash at the top. */
.page:not(.landing) { background: var(--aura) no-repeat, var(--bg); background-size: 100% 620px, auto; }
.page:not(.landing) .shell-inner { background: rgb(15 13 39 / 0.78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.page:not(.landing) #shell { background: transparent; }
.band, .hero, .foot-in { --measure: 1120px; }

.hero {
  position: relative;
  max-width: var(--measure); margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) 24px clamp(48px, 8vw, 80px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
/* One light source behind the headline. */
.glow {
  position: absolute; top: -140px; inset-inline-start: 50%;
  width: min(760px, 92vw); height: 460px;
  translate: -50% 0;
  background: radial-gradient(ellipse at center, rgb(249 207 0 / 0.07) 0%, rgb(108 91 255 / 0.06) 40%, transparent 70%);
  filter: blur(46px);
  pointer-events: none; z-index: 0;
}
html[dir='rtl'] .glow { translate: 50% 0; }
/* :not(.glow): restating position on the decoration turns it into 460px of empty page. */
.hero > *:not(.glow) { position: relative; z-index: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  background: var(--panel-2);
  border: 0.8px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  margin-bottom: 26px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }

h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6.2vw, 62px);
  font-weight: 700;
  letter-spacing: var(--track-display);
  line-height: 1.3;
  max-width: 18ch;
  text-wrap: balance;
}
.lede { margin-top: 20px; max-width: 58ch; font-size: 17px; color: var(--text-dim); }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }
.assurance { margin-top: 16px; font-size: 13px; color: var(--text-faint); }
.formats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; margin-top: 40px; }
.formats li {
  font-family: var(--font-mono); font-size: 12px; direction: ltr; unicode-bidi: isolate;
  color: var(--text-faint);
  background: var(--panel);
  border: 0.8px solid var(--border-soft);
  border-radius: var(--r-control);
  padding: 6px 12px;
}

.band { max-width: var(--measure); margin: 0 auto; padding: clamp(52px, 8vw, 84px) 24px; width: 100%; }
/* A jump to #plans must not land the heading under the sticky bar. */
.band[id] { scroll-margin-top: 76px; }
.band-alt {
  max-width: none;
  background: rgb(255 255 255 / 0.02);
  border-block: 0.8px solid var(--border-soft);
}
.band-alt > * { max-width: var(--measure); margin-inline: auto; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-2);
  margin-bottom: 10px;
}
.section-h {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800; letter-spacing: var(--track-display);
  line-height: 1.32;
  max-width: 24ch;
  text-wrap: balance;
}
.section-sub { margin-top: 14px; max-width: 62ch; color: var(--text-dim); font-size: 16px; }

.cards {
  margin-top: 36px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.card {
  background: var(--panel);
  border: 0.8px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px 22px;
}
.card-icon {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px;
  border-radius: var(--r-control); background: var(--accent-soft); color: var(--accent-2);
}
.card-icon .icon { width: 20px; height: 20px; }
.card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-dim); }

.styles-strip { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.style-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--panel); border: 0.8px solid var(--border);
}
.style-state { font-size: 11.5px; font-weight: 600; }
.style-state.is-ok { color: var(--ok); }
.style-state.is-exp { color: var(--warn); }

.steps {
  margin-top: 36px; list-style: none;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.steps li { background: var(--panel); border: 0.8px solid var(--border); border-radius: var(--r-card); padding: 24px 22px; }
.step-n {
  display: grid; place-items: center;
  width: 30px; height: 30px; margin-bottom: 14px;
  border-radius: var(--r-control);
  background: var(--accent-soft);
  color: var(--accent-2);
  font-family: var(--font-mono); font-weight: 500; font-size: 14px;
}
.steps h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.steps p { font-size: 14.5px; color: var(--text-dim); }

/* ------------------------------------------------------------------ plans */
.tiers {
  margin-top: 36px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
.tier {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--panel);
  border: 0.8px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px 22px;
}
.tier-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.tier-limits { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--text-dim); }
/* Not the mono face: these can be words, and it breaks Arabic letters apart. */
.tier-limits b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tier-foot { margin-top: auto; padding-top: 4px; }
.plans-ask {
  margin-top: 22px; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-radius: var(--r-card); background: var(--panel); border: 0.8px solid var(--border);
}
.plans-ask p { font-size: 14.5px; color: var(--text-dim); min-width: 0; flex: 1 1 280px; }

.state-note { margin-top: 28px; font-size: 14px; color: var(--text-dim); }

/* ------------------------------------------------------------------ faq */
.faq { margin-top: 32px; display: flex; flex-direction: column; gap: 8px; max-width: 780px; }
.faq details { background: var(--panel); border: 0.8px solid var(--border); border-radius: var(--r-card); }
.faq summary {
  padding: 15px 20px; cursor: pointer; font-weight: 600; font-size: 15px;
  list-style-position: inside;
}
.faq summary:hover { color: var(--accent-2); }
.faq p { padding: 0 20px 16px; font-size: 14.5px; color: var(--text-dim); }

.foot { margin-top: auto; border-top: 0.8px solid var(--border-soft); }
.foot-in {
  max-width: var(--measure); margin: 0 auto; padding: 22px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--text-faint);
}
.foot a { color: var(--text-dim); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ small pages */
.narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: clamp(24px, 5vw, 44px) 16px 56px; }
.narrow h1 { font-size: clamp(26px, 4vw, 34px); max-width: none; }
.narrow-lead { margin-top: 6px; color: var(--text-dim); font-size: 15px; }

.auth-wrap { flex: 1; display: grid; place-items: center; padding: 24px 16px 48px; }
.auth-card {
  width: min(420px, 100%);
  background: var(--panel); border: 0.8px solid var(--border);
  border-radius: var(--r-card); padding: 26px 24px;
  box-shadow: var(--shadow-2);
}
.auth-card h1 { font-size: 24px; max-width: none; }
.auth-card > p { margin-block: 6px 16px; color: var(--text-dim); font-size: 14px; }

.panel {
  margin-top: 16px; padding: 20px;
  background: var(--panel); border: 0.8px solid var(--border);
  border-radius: var(--r-card);
  display: flex; flex-direction: column; gap: 14px;
}
.panel > h2 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px 18px; }
.kv > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv dt, .kv-k { font-size: 12px; color: var(--text-faint); }
.kv dd, .kv-v { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.code-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--r-control);
  background: var(--bg); border: 0.8px solid var(--border-soft);
}
.code-box code {
  background: none; border: 0; padding: 0;
  font-size: 18px; letter-spacing: 0.1em; color: var(--text);
}

.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.bar-head b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--panel-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--primary); transition: width .3s var(--ease); }
.bar.is-full > i { background: var(--warn); }

.self-start { align-self: flex-start; }
.auth-form.flush { margin-top: 0; }
.kv-stack { display: flex; flex-direction: column; gap: 14px; }
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.recent-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }

.empty { padding: 26px 14px; text-align: center; color: var(--text-dim); font-size: 14px; }
.skeleton { display: block; height: 14px; border-radius: 6px; background: var(--panel-2); animation: ws-pulse 1.2s var(--ease) infinite alternate; }
@keyframes ws-pulse { to { opacity: 0.45; } }

.toast {
  position: fixed; bottom: 20px; inset-inline-start: 50%; translate: -50% 0; z-index: 90;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 16px; border-radius: var(--r-control);
  background: var(--panel); color: var(--text);
  border: 0.8px solid var(--border-lit);
  box-shadow: var(--shadow-3);
  font-size: 13.5px; line-height: 1.45;
}
html[dir='rtl'] .toast { translate: 50% 0; }
.toast.is-ok { border-color: oklch(0.75 0.16 155 / 0.5); }
.toast.is-err { border-color: oklch(0.68 0.19 20 / 0.6); }

@media (max-width: 560px) {
  .hero, .band { padding-inline: 16px; }
  .foot-in { padding-inline: 16px; }
  .panel { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
  .spin { animation-duration: 1.6s !important; }
}

/* ---- avatar and credit dialog (shell.js, credits.js) */
.shell-ava { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.shell-who { display: flex; align-items: center; gap: 10px; }
.shell-who .shell-ava { width: 28px; height: 28px; flex: none; }
button.shell-credit { font: inherit; color: var(--text); cursor: pointer; }
button.shell-credit:hover { background: var(--raised); }
.cd {
  margin: auto;
  inline-size: min(92vw, 400px); padding: 0; border: 0.8px solid var(--border); border-radius: var(--r-card);
  background: var(--bg-2); color: var(--text); box-shadow: var(--shadow-3);
}
.cd::backdrop { background: rgb(0 0 0 / 0.6); }
.cd-in { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.cd-in h2 { font-size: 18px; font-weight: 800; }
.cd-bal { font-size: 14px; color: var(--text-dim); }
.cd-bal b { font-size: 26px; color: var(--primary); font-variant-numeric: tabular-nums; margin-inline-start: 6px; }
.cd-need { margin: 0; padding: 10px 12px; border-radius: var(--r-control); background: rgb(249 207 0 / 0.1); border: 0.8px solid rgb(249 207 0 / 0.3); font-size: 14px; font-weight: 600; }
.cd-form { display: flex; flex-direction: column; gap: 10px; }
.cd-form .btn { align-self: flex-start; }
.cd-row { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.credit-list { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; font-size: 14px; }
.credit-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-block-end: 0.8px solid var(--border-soft); }
.credit-list .plus { color: var(--ok); } .credit-list .minus { color: var(--danger); }
.credit-list small { color: var(--text-faint); }

/* ---- plans and price list (landing) */
.tier-price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.price-h { margin-top: 40px; font-size: 18px; font-weight: 800; }
.price-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.price-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--panel); border: 0.8px solid var(--border); border-radius: var(--r-control); font-size: 14.5px; }
.price-list b { color: var(--primary); font-variant-numeric: tabular-nums; }
.price-list small { color: var(--text-faint); font-weight: 600; }
.buy-steps { margin-top: 16px; }

.acct-who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.acct-who .narrow-lead { margin: 0; font-weight: 700; color: var(--text); font-size: 18px; }
.acct-ava { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent-fill); font-weight: 700; text-transform: uppercase; }
.acct-ava img { width: 100%; height: 100%; object-fit: cover; }
.acct-bal b { font-size: 34px; color: var(--primary); font-variant-numeric: tabular-nums; }

/* ---- the sections hub (landing.js) */
.band[id="sections"] { padding-block-start: 0; }
.sec-grid {
  margin-top: 28px; list-style: none; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}
.sec-card {
  position: relative; height: 100%;
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 20px 18px;
  background: var(--panel); color: var(--text); text-decoration: none;
  border: 0.8px solid var(--border); border-radius: var(--r-card);
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), translate 0.15s var(--ease);
}
a.sec-card:hover { border-color: var(--border-lit); background: var(--panel-2); translate: 0 -2px; }
a.sec-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sec-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sec-card-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: var(--r-control); background: var(--accent-soft); color: var(--accent-2);
}
.sec-card-icon .icon { width: 21px; height: 21px; }
.sec-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.sec-card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; flex: 1; }
.sec-card-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--primary); margin-top: 6px; }
.sec-card-go .icon-sm { width: 14px; height: 14px; }
html[dir='rtl'] .sec-card-go .icon-sm { scale: -1 1; }
.sec-card.is-soon { background: transparent; border-style: dashed; color: var(--text-faint); }
.sec-card.is-soon .sec-card-icon { background: var(--panel-2); color: var(--text-faint); }
.sec-card.is-soon p { color: var(--text-faint); }
.sec-card .sec-badge { font-size: 11px; padding: 5px 9px; }
.band .formats { justify-content: flex-start; margin-top: 24px; }

/* ---- admin: the prompt denylist (admin.js) */
.adm-denylist { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 0.8px solid var(--border-soft); }
.adm-denylist textarea.input { min-height: 110px; font-family: var(--font-mono); font-size: 13px; }
.adm-denylist .btn { align-self: flex-start; }

/* Touch: the language switch and the footer links were 21-25px tall. */
@media (pointer: coarse) {
  .lang-toggle button { min-height: 32px; }
  .foot a { display: inline-block; padding-block: 8px; }
}

/* 761-980px: the links stay, so the brand's name and the rank pill (also on the account page) give way.
   A staff member's extra Admin link otherwise pushed the avatar off the bar at 768. */
@media (max-width: 980px) {
  .shell-name, .shell-end .rank-badge { display: none; }
}
