/* =========================================================================
   Raymon — Design System
   Dark, glass-surfaced, RTL-first. Every screen (site, user panel, admin
   panel) is built from the tokens and primitives defined here.
   ========================================================================= */

/* Self-hosted fonts: this app is entirely Persian-audience, and Google's
   font CDN (fonts.googleapis.com/fonts.gstatic.com) is frequently slow or
   unreachable from Iran. Every page here is a full server-rendered
   navigation (no SPA routing), so a render-blocking <link> to an external,
   unreliable stylesheet meant every single click could hang for seconds —
   this is that exact stylesheet's @font-face rules, vendored locally so
   navigation never depends on a third-party CDN being reachable. Both
   families ship as variable fonts, so one file per script covers every
   weight (400-800 for Vazirmatn, 400-700 for JetBrains Mono) — no per-weight
   files needed. */
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/vazirmatn-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/vazirmatn-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}

:root {
  /* --- Color: base --- */
  color-scheme: dark;
  /* Theme helpers: every translucent white/navy used for glass, tints and hairlines is written as rgb(var(--fg-rgb) / a) or
     rgb(var(--glass-rgb) / a), so the light theme only has to swap these two triplets. */
  --fg-rgb: 255 255 255;
  --glass-rgb: 13 21 38;
  --pill-bg: #e9edf6;        /* the light "pill" button of the dark theme (inverts in the light one) */
  --pill-ink: #0f1626;
  --scene-base: #08111f;     /* chat scene */
  --scene-a: rgba(80, 140, 255, .30);
  --scene-b: rgba(139, 199, 75, .24);
  --bg: #0b1320;
  --bg-elevated: #0d1424;
  --bg-soft: #111a2e;
  --vignette: linear-gradient(180deg, #17304f 0%, #0d1a2c 32%, var(--bg) 55%);

  --surface: rgb(var(--fg-rgb) / 0.065);
  --surface-2: rgb(var(--fg-rgb) / 0.1);
  --surface-hover: rgb(var(--fg-rgb) / 0.13);
  --border: rgb(var(--fg-rgb) / 0.11);
  --border-strong: rgb(var(--fg-rgb) / 0.2);

  --text: #eef1f8;
  --text-muted: #93a0b8;
  --text-faint: #5c6786;

  /* --- Color: accents --- */
  --accent: #dcb679;         /* warm gold — CTA / highlight copy */
  --accent-soft: rgba(220, 182, 121, 0.14);
  --accent-border: rgba(220, 182, 121, 0.35);
  --accent-ink: #12100a;

  --accent-2: #8bc74b;       /* lime green — active states / secondary accent */
  --accent-2-soft: rgba(139, 199, 75, 0.14);
  --accent-2-border: rgba(139, 199, 75, 0.35);

  --btn-light: #c3c9d9;      /* light lavender-grey — primary CTA fill on the marketing site */
  --btn-light-hover: #d4d9e6;

  --danger: #e08585;

  /* --- Type --- */
  --font-display: "Vazirmatn", system-ui, sans-serif;
  --font-body: "Vazirmatn", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* --- Layout --- */
  --container: 1160px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 20px 60px -25px rgba(0, 0, 0, 0.55);
  --shadow-lift: 0 24px 70px -20px rgba(0, 0, 0, 0.6);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.18s;
  --dur: 0.35s;
  --dur-slow: 0.7s;

  --header-h: 104px;

  /* Height of the OS status bar / notch / Dynamic Island. Every page sets
     viewport-fit=cover, and an installed PWA (standalone) then draws edge to
     edge underneath it: anything pinned to the top edge sits under the system
     bar and its taps are swallowed. 0 in a normal browser tab and on desktop. */
  --safe-top: env(safe-area-inset-top, 0px);

  /* --- live-box (wwwroot/css/live-box.css) ---
     That file is shared verbatim with the tenant template apps, which have
     their own light palettes, so it reads colours from these variables
     rather than from this app's tokens directly. This is where the dark
     theme plugs itself in. */
  --live-box-accent: var(--accent);
  --live-box-track: rgb(var(--fg-rgb) / 0.1);
  --live-box-surface: var(--surface);
  --live-box-border: var(--border);
  --live-box-text: var(--text-muted);
  --live-box-radius: var(--radius-pill);
  --live-box-ease: var(--ease);
}

/* ===== Light theme: same tokens, a calm cool-white scene; accents darkened so text on white keeps contrast ===== */
:root[data-theme="light"] {
  color-scheme: light;
  --fg-rgb: 15 23 42;
  --glass-rgb: 255 255 255;
  --pill-bg: #0f172a;
  --pill-ink: #ffffff;
  --scene-base: #e8eef8;
  --scene-a: rgba(80, 140, 255, .22);
  --scene-b: rgba(139, 199, 75, .26);
  --bg: #f2f5fb;
  --bg-elevated: #ffffff;
  --bg-soft: #e8edf6;
  --vignette: linear-gradient(180deg, #dbe6f6 0%, #e9eff9 32%, var(--bg) 55%);
  --surface: rgba(255, 255, 255, .78);
  --surface-2: rgb(15 23 42 / .05);
  --surface-hover: rgb(15 23 42 / .08);
  --border: rgb(15 23 42 / .1);
  --border-strong: rgb(15 23 42 / .2);
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #7b8aa0;
  --accent: #96660f;
  --accent-soft: rgba(150, 102, 15, .1);
  --accent-border: rgba(150, 102, 15, .32);
  --accent-ink: #ffffff;
  --accent-2: #4a8a1c;
  --accent-2-soft: rgba(74, 138, 28, .11);
  --accent-2-border: rgba(74, 138, 28, .38);
  --btn-light: #1e293b;
  --btn-light-hover: #334155;
  --danger: #c0392b;
  --shadow-soft: 0 20px 50px -28px rgba(15, 23, 42, .28);
  --shadow-lift: 0 24px 60px -26px rgba(15, 23, 42, .34);
}

/* =========================================================================
   Page transitions
   Every navigation here is a real cross-document (full page) request, not a
   client-rendered route change, so a JS-driven fade would mean intercepting
   every link/form and re-implementing routing just for an animation. The
   native View Transitions API does this for free at the browser level:
   `navigation: auto` opts every same-origin navigation into an automatic
   crossfade between the old and new page's screenshots, with zero JS and
   zero risk of hijacking a navigation the app doesn't control (a download
   link, an external redirect, browser back/forward all still just work).
   Unsupported browsers (anything that doesn't recognize `@view-transition`)
   simply ignore this block and navigate exactly as before — no fallback
   code needed, this can't make anything worse. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* =========================================================================
   Reset
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  direction: rtl;
  /* Belt-and-suspenders on top of the viewport meta tag: some mobile
     browsers still allow double-tap-to-zoom even with user-scalable=no. */
  touch-action: manipulation;
  /* <body> paints the real gradient, but mobile rubber-band overscroll
     (pulling past the top/bottom edge) reveals whatever's behind it — the
     <html> background, which without this was the browser default (white),
     flashing a mismatched color at the top of the screen. Match the app's
     base tone so an overscroll bounce blends in instead of standing out. */
  background: var(--bg);
}
body.site-body { padding-top: var(--safe-top); }
body {
  background: var(--vignette), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;   /* no scroll container on body: fixed bars (top on PC, bottom on phone) never drift, even on iOS Safari */
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--accent); }

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
}

.ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--font-mono); }

.visually-hidden-focusable {
  position: absolute; right: 12px; top: -60px; z-index: 300;
  background: var(--accent-2); color: var(--accent-ink);
  padding: 10px 18px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  transition: top var(--dur-fast) var(--ease);
}
.visually-hidden-focusable:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.idea-error, .field-validation-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; display: block; }
input.input-validation-error, textarea.input-validation-error { border-color: var(--danger) !important; }

/* =========================================================================
   Layout helpers
   ========================================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding-top: 10px; padding-bottom: 64px; }

/* The desktop header is a floating pill (position: fixed; top: 18px —
   see .desktop-topbar), so it never pushes page content down through
   normal flow. A page whose very first block is a plain .section
   (Magazine, Portfolio, Audit, …) had nothing to leave room for it, so its
   heading rendered right underneath the pill. Scoped to main > .section:
   first-child so every other stacked section on a page keeps its normal
   tight rhythm. The homepage's .hero gets the same clearance for the same
   reason: it used to be a bare image the header could float over on
   purpose, but now leads with a real H1/CTA row (see Index.cshtml), and
   without this the pill sat directly on top of that heading. */
@media (min-width: 900px) {
  main#main > .section.container:first-of-type { padding-top: 100px; }   /* first-of-type: a script or link tag may come before the section */
  main#main > .hero:first-child { padding-top: 100px; }
  main#main > #about{padding-top: 0;}
}
@media (min-width: 768px) { .section { padding-top: 10px; padding-bottom: 35px; } }

.section-head { text-align: right; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(22px, 3vw, 28px); }
.section-head p { color: var(--text-muted); max-width: 520px; font-size: 15px; }

/* The product landing pages (online-store, restaurant-menu, cafe-menu,
   personal-website, pwa) each have 1-2 sections that are a .section-head
   alone — a heading plus one narrow (max-width:520px) paragraph — with
   nothing else in the <section>. Against a full-width container and the
   section's own vertical padding, that reads as a mostly-empty block
   between the denser feature-grid/FAQ sections around it. Wrapping just
   these in a bordered/glass panel gives the lone paragraph the same
   "card" visual weight as every other block on the page. */
.prose-panel {
  max-width: 720px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
}
.prose-panel p:last-child { margin-bottom: 0; }

/* A plain "see more" link banner (currently: the portfolio teaser on
   online-store/personal-website) — was misusing .cta-banner, whose
   min-height:306px exists to make room for a background image (see the
   homepage's CTA banners). With no image supplied, that forced a large,
   near-empty box. This is the same idea sized for text alone. */
.portfolio-teaser-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  font-size: 16.5px;
  font-weight: 700;
  text-align: center;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.portfolio-teaser-link:hover { border-color: var(--accent-2-border); transform: translateY(-2px); }

/* Shared by the custom-services grid on both Index and Pricing (see
   _CustomServicesGrid.cshtml). Richer than the homepage's plain
   icon+label service-card: each tile here carries a one-line description
   and a quote-based CTA, so it needs a visible surface/border to read as
   a card rather than float loosely, and the CTA stays always-visible
   (not hover-only) since "قیمت‌گذاری بعد از بررسی" is information, not a
   throwaway hint. */
.custom-service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 16px 18px;
  gap: 8px;
}
.custom-service-card:hover { border-color: var(--accent-2-border); }
.custom-service-card .service-icon { max-width: 84px; }
.custom-service-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; margin: 0; min-height: 34px; }
.custom-service-card .service-cta { opacity: 0.85 !important; }

.section-head-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1px;
}
.section-head-row h2 { font-size: clamp(22px, 3vw, 28px); }

.carousel-arrow {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-muted); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.carousel-arrow:hover { color: var(--text); border-color: var(--accent-2-border); }
.carousel-arrow svg { width: 18px; height: 18px; }

/* =========================================================================
   Glass primitives
   ========================================================================= */
.glass {
  background: linear-gradient(180deg, var(--surface), rgb(var(--fg-rgb) / 0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(30px) saturate(165%);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  /* Safari/WebKit has a long-standing bug where backdrop-filter + overflow:
     hidden + border-radius on the same element stops clipping its content
     (content quietly pokes out past the rounded corners on iOS specifically).
     A no-op mask forces it into a compositing path that clips correctly. */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.glass-interactive:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
/* Primary action = a bordered pill with no fill (the filled lime gradient was loud next to long forms and panels). */
.btn-primary {
  background: transparent;
  border: 1.5px solid var(--accent-2);
  color: var(--accent-2);
  box-shadow: none;
}
.btn-primary:hover { background: var(--accent-2-soft); box-shadow: none; transform: translateY(-2px); }
.btn-primary:disabled, .btn-primary[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent-2-border); }
.btn-light {
  background: var(--btn-light);
  color: #16202f;
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.5);
}
.btn-light:hover { background: var(--btn-light-hover); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border-color: rgb(var(--fg-rgb) / 0.4);
  color: var(--text);
}
.btn-outline:hover { background: rgb(var(--fg-rgb) / 0.06); border-color: rgb(var(--fg-rgb) / 0.6); }
.btn-block { width: 100%; }

/* =========================================================================
   Header — desktop only: a floating centered glass pill mirroring the
   mobile bottom tab bar's visual language (same brand mark, same icon
   items) instead of a traditional full-width bar. Hidden on mobile, where
   the floating bottom tab bar is the sole nav.
   ========================================================================= */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-2);
}

.header-icons { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  color: var(--text-muted); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.desktop-topbar { display: none; }
@media (min-width: 900px) {
  .desktop-topbar {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    z-index: 100;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 11px 8px 20px;
    border-radius: var(--radius-pill);
    background: rgb(var(--glass-rgb) / 0.55);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%);
    box-shadow: var(--shadow-lift);
  }
}
.desktop-topbar-links {
  display: flex; align-items: center; gap: 26px;
  font-size: 14px; color: var(--text-muted);
  padding-inline: 22px;
  border-inline-end: 1px solid var(--border);
}
.desktop-topbar-links a { position: relative; padding: 6px 0; white-space: nowrap; transition: color var(--dur-fast) var(--ease); }
.desktop-topbar-links a:hover, .desktop-topbar-links a.active { color: var(--text); }
.desktop-topbar-links a.active::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: -4px; height: 2px;
  background: var(--accent-2); border-radius: 2px;
}
.desktop-topbar-icons { display: flex; align-items: center; gap: 8px; padding-inline-start: 4px; }

/* Bottom floating pill tab bar (mobile only, app-like primary nav) */
.mobile-tabbar {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 90;
  max-width: 220px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-around;
  background: rgb(var(--glass-rgb) / 0.52);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(32px) saturate(170%);
  -webkit-backdrop-filter: blur(32px) saturate(170%);
  box-shadow: var(--shadow-lift);
  padding: 8px;
}
.mobile-tabbar.has-4 { max-width: 280px; }
.mobile-tabbar.has-5 { max-width: 340px; }
.mobile-tabbar a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  height: 46px; border: none; background: none;
  color: var(--text-muted); cursor: pointer;
}
.mobile-tabbar a svg { width: 21px; height: 21px; }
.mobile-tabbar a:active .nav-circle { transform: scale(0.88); }
@media (min-width: 900px) { .mobile-tabbar { display: none; } }

/* Shared active-tab indicator: a true circle sized to the icon, not the
   whole (wider) flex cell, so it pops in as a real dot instead of a pill. */
.nav-circle {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
a.active .nav-circle {
  background: var(--accent-2); color: var(--accent-ink);
  animation: nav-circle-pop 0.35s var(--ease);
}
@keyframes nav-circle-pop {
  from { transform: scale(0.5); opacity: 0.5; }
  to { transform: scale(1); opacity: 1; }
}
@media (max-width: 899px) { body.site-body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* =========================================================================
   Hero
   ========================================================================= */
.hero { position: relative; overflow: hidden; text-align: center; }
.hero-img { width: 100%; max-width: 800px; height: auto; display: inline-block; }

@keyframes float-bot { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* =========================================================================
   Services
   ========================================================================= */
/* Six services, three per row from the smallest screen up — two tidy rows
   of three at every width below the desktop single-row layout. Two columns
   made it three rows and a longer scroll for no gain: these cards are an
   icon and two or three words, and they stay legible at a third of a phone
   width. Column counts also always divide evenly, so no card is ever
   stranded alone on a last row. */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (min-width: 980px) { .services-grid { grid-template-columns: repeat(6, 1fr); gap: 8px; } }

/* Now an <a>, not a div: it needs link resets, a pointer cursor, and a
   focus ring. cursor:default actively told people it was not clickable. */
.service-card {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  padding: 10px 6px 12px;
  border-radius: var(--radius-md);
  border: none;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
/* No border, in any state. These sit on the page as icons with labels
   rather than as boxes, and outlining them on hover drew a frame around
   something that reads better without one. The lift and the icon's own
   scale carry the hover. */
.service-card:hover { background: var(--surface); transform: translateY(-2px); }
.service-card:focus-visible {
  outline: 2px solid var(--accent-2-border);
  outline-offset: 2px;
}
/* No card/box behind the icon at all — just the icon itself, bigger, with
   the label sitting close beneath it directly on the page background. */
.service-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 150px;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur) var(--ease);
}
.service-icon img { width: 100%; height: 100%; object-fit: contain; }
.service-card:hover .service-icon { transform: scale(1.05); }
.service-card h3 { font-size: 13.5px; font-weight: 600; }

/* The "what happens if I click" line. Kept quiet until hover/focus on
   pointer devices so the grid stays calm, but ALWAYS visible on touch,
   where there is no hover to reveal it and the hint is the only thing
   telling a thumb the tile leads somewhere. */
.service-cta {
  font-size: 11.5px;
  color: var(--accent-2);
  font-weight: 600;
  opacity: 0.85;
}
@media (hover: hover) and (pointer: fine) {
  .service-cta { opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
  .service-card:hover .service-cta,
  .service-card:focus-visible .service-cta { opacity: 1; }
}

/* =========================================================================
   CTA banner
   ========================================================================= */
.cta-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 306px;
  display: flex;
  align-items: center;
}
.cta-banner .cta-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; z-index: 0;
}
.cta-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to left, transparent 40%, rgba(6, 10, 20, 0.65) 78%);
}
.cta-content { position: relative; z-index: 2; padding: 40px 32px; max-width: 560px; margin-inline-start: auto; }
.cta-banner h3 {
  font-size: clamp(19px, 2.6vw, 25px);
  color: var(--text);
  margin-bottom: 20px;
}
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* The left/right overlay fade is tuned for the wide desktop crop; on a
   narrow banner the see-through zone lands right under the text and the
   art behind it (the swing rope) fights for contrast. Below that width,
   darken the full banner from the bottom instead. */
@media (max-width: 640px) {
  .cta-overlay {
    background: linear-gradient(180deg, rgba(6, 10, 20, 0.12) 0%, rgba(6, 10, 20, 0.58) 42%, rgba(6, 10, 20, 0.88) 74%, rgba(6, 10, 20, 0.94) 100%);
  }
  .cta-content { max-width: 90%; }
}

/* =========================================================================
   Portfolio / Showcase
   ========================================================================= */
.tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: 5px 9px;
  font-size: 13.5px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.tab-btn:hover { color: var(--text); border-color: var(--accent-2-border); background: var(--surface-2); transform: translateY(-2px); }
.tab-btn:active { transform: scale(0.94); }
.tab-btn.active {
  color: var(--accent-ink); background: var(--accent-2); border-color: var(--accent-2);
  box-shadow: 0 8px 20px -10px rgba(139, 199, 75, 0.55);
}

.portfolio-track {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 20px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.portfolio-track::-webkit-scrollbar { display: none; }
.portfolio-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
/* Every card here is an <a> wrapping an <img> — both natively draggable
   (drag-out-to-bookmark / drag-out-to-save-image) by default in every
   browser. That native drag gesture starts on the same few pixels of
   mouse movement the custom scroll-drag above needs, wins the pointer
   capture race, and fires pointercancel — which silently ends our drag
   before a single pixel of scroll happens. -webkit-user-drag disables
   just that native gesture; it doesn't touch clicking, scrolling, or
   the custom drag-to-scroll handlers at all. */
.portfolio-track a,
.portfolio-track img { -webkit-user-drag: none; user-drag: none; }

.work-card {
  flex: 0 0 78%;
  scroll-snap-align: start;
  overflow: hidden;
}
@media (min-width: 560px) { .work-card { flex-basis: 46%; } }
@media (min-width: 900px) { .work-card { flex-basis: 26%; } }

.work-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, var(--bg-soft), var(--bg-elevated));
  position: relative;
  overflow: hidden;
}
.work-thumb svg, .work-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* /Portfolio/Index — a real grid rather than the homepage's horizontal
   scroll-track, since this page's whole job is to list every published
   item at once. .work-card's flex-basis rules are simply inert inside a
   grid container, so the card/thumb/badge markup is reused as-is. */
.portfolio-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px) {
  .portfolio-overview-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
}
.portfolio-overview-grid .work-card { flex: none; }
.portfolio-filter { margin-bottom: 24px; }

.portfolio-detail-summary { font-size: 16px; color: var(--text-muted); line-height: 1.8; margin-bottom: 24px; }

/* The category, as a badge on the artwork — the text block that used to
   sit under it (.work-body/.work-meta) is gone, so the image is the whole
   card. Its own translucent backing rather than a gradient over the whole
   image: portfolio artwork is admin-uploaded and some of it is light, so
   the badge has to stay readable without assuming a dark corner. */
.work-badge {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-start: 10px;
  z-index: 1;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  background: rgb(var(--glass-rgb) / 0.66);
  border: 1px solid var(--border-strong);
  /* Reads over busy artwork without needing a full-image scrim. Degrades
     to the flat background above where backdrop-filter is unsupported. */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* =========================================================================
   Idea card
   ========================================================================= */
/* The card is now a single link to the configurator — the collapsible
   toggle, the inline form and their styles are gone with it. .idea-error
   and .idea-success below stay: both are reused as the generic form
   error/success styles across the admin and account pages. */
.idea-card { padding: 34px 26px; }
.idea-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.idea-card-link:hover { transform: translateY(-3px); border-color: var(--accent-2-border); }
.idea-card-link:focus-visible {
  outline: 2px solid var(--accent-2-border); outline-offset: 4px;
}
.idea-card-text h2 { color: var(--accent-2); font-size: clamp(20px, 3vw, 25px); margin: 0 0 12px; }
.idea-card-text > p { color: var(--text-muted); font-size: 14px; max-width: 640px; margin: 0 0 18px; }
.idea-card-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--accent-2);
}
.idea-card-cta svg { width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease); }
/* Nudges along the reading direction — RTL, so leftward. */
.idea-card-link:hover .idea-card-cta svg { transform: translateX(-4px); }

/* Collapse-by-grid-row, generically named for any "button reveals a form"
   spot (e.g. the new-ticket form). */
.collapse-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur) var(--ease); }
.collapse-panel.open { grid-template-rows: 1fr; }
.collapse-panel-inner { overflow: hidden; min-height: 0; padding-top: 20px; }

.field { display: flex; flex-direction: column; }
.field textarea, .field input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 14px 16px;
  resize: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.field textarea { min-height: 96px; }
.field textarea:focus, .field input:focus { outline: none; border-color: var(--accent-2-border); }

.custom-section-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}
.custom-section-boxes { display: flex; flex-direction: column; gap: 14px; }
.custom-section-code { font-family: var(--font-mono, monospace); font-size: 13px; min-height: 160px; resize: vertical; }
.custom-section-preview-pane { position: sticky; top: 18px; }
.custom-section-preview-frame {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}
@media (max-width: 900px) {
  .custom-section-editor { grid-template-columns: 1fr; }
  .custom-section-preview-pane { position: static; }
}

.field input[type="range"] {
  -webkit-appearance: none; appearance: none;
  background: transparent; border: none; padding: 12px 0; cursor: pointer;
}
.field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: var(--surface-2);
}
.field input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--surface-2);
}
.field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; margin-top: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-2); border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent-2-border);
}
.field input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--bg);
  background: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2-border);
}

.idea-success { display: none; align-items: center; gap: 10px; color: var(--accent-2); font-size: 13.5px; margin-top: 12px; }
.idea-success.show { display: flex; }

.chat-color-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.chat-color-fields .field label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.field input[type="color"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 42px; padding: 3px; border-radius: var(--radius-md);
  background: var(--bg); border: 1px solid var(--border); cursor: pointer;
}
.field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.field input[type="color"]::-webkit-color-swatch { border: none; border-radius: calc(var(--radius-md) - 3px); }
.field input[type="color"]::-moz-color-swatch { border: none; border-radius: calc(var(--radius-md) - 3px); }

.chat-preview-box {
  margin-top: 14px; padding: 20px 16px; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.chat-preview-box .chat-bubble { max-width: 78%; border-radius: 16px; padding: 10px 14px; font-size: 14px; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.chat-preview-box .chat-bubble p { margin: 0; }

/* =========================================================================
   Magazine carousel
   ========================================================================= */
.mag-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 20px 2px 8px; margin: 0 -2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.mag-track::-webkit-scrollbar { display: none; }
.mag-card { flex: 0 0 72%; scroll-snap-align: start; overflow: hidden; }
@media (min-width: 560px) { .mag-card { flex-basis: 44%; } }
@media (min-width: 900px) { .mag-card { flex-basis: 23%; } }
.mag-thumb { aspect-ratio: 1/1; background: linear-gradient(160deg, var(--bg-soft), var(--bg-elevated)); position: relative; overflow: hidden; }
.mag-thumb svg, .mag-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mag-body { padding: 14px 16px 18px; font-size: 13.5px; color: var(--text-muted); }

.carousel-nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: -6px; }
.carousel-nav .icon-btn { width: 34px; height: 34px; }

/* =========================================================================
   Magazine — standalone list + detail pages
   ========================================================================= */
.magazine-filter { margin-bottom: 24px; }
.magazine-filter .tab-btn { text-decoration: none; }

/* Vertical list of horizontal (landscape) cards on mobile — a compact,
   thumb-left/text-right row like a news-app list; becomes an upright-card
   grid once there's room for it. */
.magazine-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.magazine-card { display: flex; flex-direction: row; overflow: hidden; }
.magazine-card .mag-thumb { flex: 0 0 112px; width: 112px; aspect-ratio: 1/1; align-self: flex-start; }
.magazine-card .mag-body { flex: 1; min-width: 0; padding: 10px 14px 10px 2px; display: flex; flex-direction: column; justify-content: center; }
.magazine-card .mag-body .tag-chip-row { flex-wrap: nowrap; overflow: hidden; margin-top: 2px; }
.magazine-card .mag-body .tag-chip-row .tag-chip { font-size: 10px; padding: 3px 8px; flex-shrink: 0; }
.magazine-card .magazine-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.magazine-card .magazine-card-date { margin-bottom: 4px; }
@media (min-width: 640px) {
  .magazine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .magazine-card { flex-direction: column; }
  .magazine-card .mag-thumb { flex-basis: auto; width: auto; align-self: auto; }
  .magazine-card .mag-body { display: block; padding: 14px 16px 18px; }
  .magazine-card .mag-body .tag-chip-row { flex-wrap: wrap; overflow: visible; margin-top: 0; }
  .magazine-card .mag-body .tag-chip-row .tag-chip { font-size: 11px; padding: 4px 10px; }
  .magazine-card .magazine-card-date { margin-bottom: 8px; }
  .magazine-card .magazine-card-title { -webkit-line-clamp: unset; overflow: visible; }
}
@media (min-width: 960px) { .magazine-grid { grid-template-columns: repeat(4, 1fr); } }
.magazine-card-title { font-size: 14.5px; color: var(--text); margin-bottom: 6px; }
.magazine-card-date { display: block; font-size: 11.5px; color: var(--text-faint); margin-bottom: 8px; }

/* Was a bare inline-block text link ("← بازگشت به ...") with no box of
   its own — on the portfolio/magazine detail pages that meant it just sat
   flush at the very top of the content column with nothing to visually
   separate it from the page's own floating header pill above it. Now a
   proper pill button matching the site's other secondary actions. */
.magazine-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13.5px; font-weight: 600;
  margin-bottom: 24px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.magazine-back svg { width: 15px; height: 15px; flex-shrink: 0; }
/* On an article / project page the pill lines up with the article's own edge (a 720px column in the middle), not with the
   page container's edge 200px further out on PC; the gap under it is the same 24px on every screen. The general
   ".panel-link[data-smart-back]" rule further down would also squeeze its padding to 4px, so the pill keeps its own. */
.magazine-back:has(+ .magazine-article) { display: flex; width: fit-content; margin-inline-start: max(0px, calc((100% - 720px) / 2)); }
.magazine-back.panel-link[data-smart-back] { padding: 9px 16px; min-height: 40px; }
.magazine-back:hover { color: var(--text); border-color: var(--accent-2-border); transform: translateX(-2px); }

/* Article detail: only the banner image lives in a box — everything else
   (title, meta, body, source) flows in the open like a real editorial page. */
.magazine-article { max-width: 720px; margin: 0 auto; }
.magazine-article-banner {
  aspect-ratio: 16/9; overflow: hidden; margin-bottom: 28px;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
}
.magazine-article-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.magazine-article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.magazine-article-meta .magazine-card-date { margin-bottom: 0; }
.magazine-article-title { font-size: clamp(22px, 4vw, 34px); line-height: 1.35; margin-bottom: 28px; }
.magazine-article-content { color: var(--text-muted); font-size: 16px; line-height: 2; }
.magazine-article-content p { margin-bottom: 18px; }
.magazine-article-content p:last-child { margin-bottom: 0; }
.magazine-article-content img { display: block; width: 100%; border-radius: var(--radius-md); margin: 6px 0 22px; }
.magazine-article-content strong { color: var(--text); }
.magazine-article-content a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.magazine-article-content h2 { font-size: 24px; line-height: 1.4; color: var(--text); margin: 8px 0 16px; }
.magazine-article-content h3 { font-size: 19px; line-height: 1.4; color: var(--text); margin: 6px 0 14px; }
.magazine-article-content ul,
.magazine-article-content ol { margin: 0 0 18px; padding-inline-start: 26px; }
.magazine-article-content li { margin-bottom: 8px; }
.magazine-article-content li:last-child { margin-bottom: 0; }
.magazine-article-content blockquote {
  margin: 0 0 18px; padding: 4px 20px;
  border-inline-start: 3px solid var(--accent-2);
  color: var(--text-muted); font-style: italic;
}
.magazine-article-content blockquote p { margin-bottom: 0; }

/* The [[cta:Title|Url|ButtonText]] shortcode's rendered form — a
   full-width call-to-action banner an admin can drop mid-article to
   promote something without leaving the content editor.

   Selector is "a.content-cta", not just ".content-cta": the banner always
   renders inside .magazine-article-content, whose own "a" rule above
   (.magazine-article-content a, specificity 0-1-1) would otherwise beat a
   bare ".content-cta" (0-1-0) and re-underline this in the general link
   color regardless of source order. Adding the tag brings it to 0-1-1,
   which then wins on being the more specific match for text-decoration. */
.content-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 20px 24px; margin-bottom: 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
a.content-cta { text-decoration: none; }
.content-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(0,0,0,0.4); }
/* .content-cta span/strong (two classes) beats .magazine-article-content
   a/strong (one class + tag) on specificity, but only because both are
   named explicitly here — without it the article-content color rules
   above win instead (a direct rule always beats inherited color,
   regardless of the ancestor's own specificity), leaving the banner's
   button text unreadable against its own gradient background. */
.content-cta span { font-size: 15px; font-weight: 600; color: var(--accent-ink); }
.content-cta strong { font-size: 14px; padding: 8px 16px; border-radius: 999px; background: rgba(0,0,0,0.18); white-space: nowrap; color: var(--accent-ink); }
.magazine-article-source {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-faint);
}
.magazine-article-source a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) {
  .magazine-article-banner { margin-bottom: 20px; border-radius: var(--radius-md); }
  .magazine-article-title { margin-bottom: 20px; }
  .magazine-article-content { font-size: 15px; }
}

/* =========================================================================
   Compact mobile pass — tighter card padding so boxes don't dwarf small
   screens, plus a touch more breathing room from the viewport edge.
   ========================================================================= */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .section { padding-top: 20px; padding-bottom: 20px; }
  .service-icon{  max-height: 120px;}
  /* Three across a 360px screen: the gutters and padding come down so the
     icon keeps its size rather than the label wrapping mid-word. */
  .services-grid { gap: 6px; }
  .service-card { padding: 0 1px 10px; }
  .cta-banner { min-height: 128px; border-radius: var(--radius-md); }
  .cta-content { max-width: 70%; padding: 20px 16px; }
  .cta-banner h3 { font-size: 15.5px; margin-bottom: 12px; }
  .cta-actions { gap: 8px; }
  .cta-actions .btn { padding: 9px 16px; font-size: 12.5px; }
  .idea-card { padding: 22px 16px; }
  .work-card { flex: 0 0 calc(55% - 8px); }
  .mag-card { flex: 0 0 calc(50% - 8px); }
  .mag-body { padding: 10px 12px 14px; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 20px; margin-bottom: 40px; }
.footer-grid .footer-col:first-child { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
  .footer-grid .footer-col:first-child { grid-column: auto; }
}
.footer-col h5 { font-size: 14px; margin-bottom: 0; color: var(--text); }
.footer-col-list { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.footer-col a { font-size: 13.5px; color: var(--text-muted); transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--accent-2); }
.footer-col p { font-size: 13.5px; color: var(--text-muted); }

/* The h5 header for the 3 link columns (not the plain-text "رایمون" blurb
   column) is a <button> so it can double as a mobile accordion toggle —
   see [data-footer-toggle] in site.js. Reset to look identical to a bare
   h5 either way; only the collapse/expand behavior differs by viewport. */
.footer-col-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; background: none; border: none; padding: 0;
  font: inherit; color: inherit; text-align: inherit; cursor: pointer;
}
.footer-col-chevron { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; transition: transform var(--dur-fast) var(--ease); }
@media (max-width: 767px) {
  .footer-col-list { display: none; }
  .footer-col.is-open .footer-col-list { display: flex; }
  .footer-col.is-open .footer-col-chevron { transform: rotate(180deg); }
}
@media (min-width: 768px) {
  .footer-col-head { pointer-events: none; }
  .footer-col-chevron { display: none; }
  .footer-col-list { display: flex !important; }
}

/* ── Site footer (SEO-first): products first, one swipe row on phones, hinted columns on desktop ── */
.sf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }
.sf-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 1.1rem; color: var(--text); }
.sf-brand img { width: 36px; height: 36px; object-fit: contain; }
.sf-about { display: grid; gap: 4px; } .sf-about p { font-size: 13.5px; line-height: 1.95; color: var(--text-muted); max-width: 52ch; }
.sf-prods { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sf-prod { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 22px; border: 1px solid var(--border-strong, var(--border)); background: linear-gradient(160deg, rgb(var(--fg-rgb) / .08), rgb(var(--fg-rgb) / .02)); color: var(--text); transition: transform .4s var(--spring, cubic-bezier(.34,1.4,.5,1)), border-color .25s; }
.sf-prod:hover { transform: translateY(-3px); border-color: var(--accent-2-border); }
.sf-prod svg { width: 26px; height: 26px; color: var(--accent-2); margin-bottom: 4px; }
.sf-prod strong { font-size: 1.02rem; line-height: 1.5; }
.sf-prod span { color: var(--text-muted); font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-prod em { font-style: normal; font-size: 12.5px; color: var(--accent-2); font-weight: 700; margin-top: 2px; }
.sf-groups { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 0 4px; -webkit-mask: linear-gradient(to left, #000 88%, transparent); mask: linear-gradient(to left, #000 88%, transparent); }
.sf-groups::-webkit-scrollbar { display: none; }
.sf-grp, .sf-grp ul { display: contents; }
.sf-grp h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sf-grp li { flex: none; scroll-snap-align: start; }
.sf-grp a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: rgb(var(--fg-rgb) / .03); font-size: 14px; white-space: nowrap; color: var(--text); transition: border-color .2s, color .2s; }
.sf-grp a:hover { border-color: var(--accent-2-border); color: var(--accent-2); }
.sf-grp small { display: none; }
@media (min-width: 820px) {
  .sf-grid { grid-template-columns: 1.1fr 1.4fr; grid-template-areas: "about prods" "groups groups"; gap: 28px 40px; margin-bottom: 32px; align-items: start; }
  .sf-about { grid-area: about; } .sf-prods { grid-area: prods; } .sf-groups { grid-area: groups; }
  .sf-prod { padding: 20px; } .sf-prod strong { font-size: 1.2rem; } .sf-prod span { font-size: 14px; }
  .sf-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; overflow: visible; -webkit-mask: none; mask: none; padding-top: 20px; border-top: 1px solid var(--border); }
  .sf-grp { display: block; } .sf-grp ul { display: grid; gap: 0; margin-top: 8px; }
  .sf-grp h2 { position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; font-size: 14px; color: var(--text); margin: 0; }
  .sf-grp a { display: grid; min-height: 40px; padding: 6px 0; border: 0; background: none; border-radius: 0; white-space: normal; font-size: 14px; }
  .sf-grp b { font-weight: 600; } .sf-grp small { display: block; color: var(--text-faint); font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { .sf-prod, .sf-grp a { transition: none; } }

.footer-bottom {
  display: flex; flex-direction: column-reverse; gap: 18px;
  align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-faint);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.social-row { display: flex; gap: 10px; }

/* Each footer social icon gets its own platform's brand color as a ring,
   rather than the generic neutral .icon-btn border — otherwise the row
   reads as four identical gray circles instead of real social links.
   LinkedIn/Telegram/Gmail are solid brand colors; Instagram genuinely is
   a gradient in its own branding, done here with the "gradient background
   + inset pseudo-element" trick since border-image doesn't respect
   border-radius on a circle. */
.icon-btn.social-linkedin { color: #0A66C2; border-color: #0A66C2; }
.icon-btn.social-telegram { color: #26A5E4; border-color: #26A5E4; }
.icon-btn.social-gmail { color: #EA4335; border-color: #EA4335; }
.icon-btn.social-instagram {
  position: relative;
  border-color: transparent;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.icon-btn.social-instagram::before {
  content: ""; position: absolute; inset: 2px; border-radius: 50%;
  background: var(--bg);
}
.icon-btn.social-instagram svg { position: relative; z-index: 1; color: #dc2743; }
.icon-btn.social-linkedin:hover,
.icon-btn.social-telegram:hover,
.icon-btn.social-gmail:hover,
.icon-btn.social-instagram:hover { filter: brightness(1.15); }

@media (max-width: 480px) {
  .site-footer { padding: 36px 0 18px; margin-top: 24px; }
  .footer-grid { gap: 18px 14px; margin-bottom: 24px; }
  .footer-col-list { gap: 8px; margin-top: 12px; }
  .footer-bottom { padding-top: 18px; gap: 12px; }
}

/* =========================================================================
   Auth pages
   ========================================================================= */
.auth-shell {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 30px;
  text-align: center;
}
.auth-mark {
  width: 52px; height: 52px; border-radius: 16px;
  margin: 0 auto 18px;
  background: var(--accent-2-soft);
  border: 1px solid var(--accent-2-border);
  color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
}
.auth-mark svg { width: 24px; height: 24px; }
.auth-card h1 { font-size: 21px; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 26px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: right; }
.auth-form .field label { font-size: 13px; color: var(--text-muted); margin-bottom: 7px; }
.auth-form .field input { min-height: auto; }
.auth-form input.ltr-input { direction: ltr; text-align: left; font-family: var(--font-mono); }
.auth-switch { margin-top: 22px; font-size: 13.5px; color: var(--text-muted); }
.auth-switch a { color: var(--accent-2); font-weight: 600; }
.otp-input { width: 100%; min-height: 56px; text-align: center; font-size: 28px; font-weight: 800; letter-spacing: .5em; padding-inline-start: .5em; border-radius: 14px; border: 1px solid var(--border-strong, var(--border)); background: var(--surface); color: var(--text); font-family: inherit; }
.otp-input:focus { outline: 0; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-soft); }
.otp-input::placeholder { letter-spacing: .5em; color: var(--text-faint); }
.auth-resend { margin-top: 10px; }
.hp-field { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-step-title { margin: 0 0 6px; font-size: 20px; }
.order-done { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--accent-2-border); background: var(--accent-2-soft); }
.order-done-ic { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-2); color: #0b1320; font-weight: 800; }
.order-done b { display: block; font-size: 16px; } .order-done small { display: block; color: var(--text-muted); font-size: 13.5px; line-height: 1.7; overflow-wrap: anywhere; }
.detail-text { margin: 0; white-space: pre-wrap; line-height: 1.9; overflow-wrap: anywhere; }
.ib-proj h1 { margin: 0; font-size: 22px; }
.auth-hint { margin-top: 14px; font-size: 12.5px; color: var(--text-faint); text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-faint); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.btn-google { gap: 10px; }
.auth-error { color: #f2a3a3; font-size: 13.5px; text-align: center; margin: 0 0 14px; }

/* Without the boxed card, nothing shrank about the actual FORM content —
   four fields plus heading/hint/switch text is simply taller than one
   mobile screen (measured ~800px against ~740px of usable height below the
   header), so centering never had room to do anything and the page just
   flowed top-down until the switch-link line landed under the fixed
   .mobile-tabbar. Fixing the vertical-centering math doesn't help when
   content overflows regardless — the actual fix is a tighter mobile
   rhythm so the whole form fits above the tabbar's reserved zone without
   needing to scroll past it first. Placed after the base rules above (not
   before), since equal-specificity class selectors resolve by source
   order regardless of which one sits inside an @media block — declared
   earlier, this block was silently losing to the unconditional rules. */
@media (max-width: 899px) {
  .auth-shell { min-height: auto; align-items: flex-start; padding: 20px 20px calc(20px + 84px + env(safe-area-inset-bottom)); }
  .auth-card { padding: 0; }
  .auth-mark { width: 44px; height: 44px; margin-bottom: 10px; }
  .auth-mark svg { width: 20px; height: 20px; }
  .auth-sub { margin-bottom: 16px; }
  .auth-form { gap: 10px; }
  .auth-hint { margin-top: 10px; }
  .auth-switch { margin-top: 14px; }
}

/* =========================================================================
   Auth layout (Login/Register only) — see _AuthLayout.cshtml
   ========================================================================= */
/* No fixed bottom tabbar on this layout (that's the whole point — see the
   layout's own comment), so .auth-shell's tabbar-reserving bottom padding
   would just be dead space here. Scoped to .auth-body so ForgotPassword/
   ResetPassword/etc, which still render through the full _Layout and its
   tabbar, keep that padding. */
.auth-topbar { padding: 16px 20px 0; }
/* align-items was "center" — a flex item with no explicit width defaults
   to shrink-to-fit under center alignment (rather than stretch, flex's
   own default), so .auth-shell (which relies on filling the row and
   centering ITSELF via .container's margin:auto) collapsed to its
   content's natural width instead. That left a large uncounted gap on
   both sides, on top of .auth-shell's own padding — the back button
   above it (a separate element, sibling of <main>, unaffected by this)
   ended up sitting well past where the card/form actually starts,
   reading as "stuck" against the edge relative to everything below it.
   Default (stretch) fixes .auth-shell; .auth-logo-link centers its own
   content explicitly instead of relying on the parent for it. */
.auth-page-main { display: flex; flex-direction: column; }
.auth-logo-link { display: flex; justify-content: center; margin: 4px 0 14px; }
/* Was 44px — too small above a ~420px-wide card to read as the page's
   actual brand mark rather than a decorative dot. */
.auth-logo-img { width: 68px; height: 68px; object-fit: contain; border-radius: 14px; }
@media (max-width: 899px) {
  .auth-logo-img { width: 56px; height: 56px; }
}
@media (max-width: 899px) {
  .auth-body .auth-shell { padding: 8px 20px 32px; }
}

.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-muted); cursor: pointer; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--accent-2); }

.auth-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.auth-forgot-link { font-size: 12.5px; color: var(--accent-2); font-weight: 600; }

.permission-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
@media (min-width: 640px) { .permission-grid { grid-template-columns: repeat(3, 1fr); } }

.user-role-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.user-role-pill-form { display: inline-block; }
.user-role-assign-form { display: inline-flex; align-items: center; gap: 6px; }
.user-role-assign-form .select-field { width: auto; min-width: 120px; }

/* =========================================================================
   Article editor: wide two-column layout + SEO panel + live preview
   ========================================================================= */
.editor-layout { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
@media (min-width: 1100px) {
  .editor-layout { flex-direction: row; }
  .editor-main { flex: 1.4; min-width: 0; }
  .editor-side { flex: 1; min-width: 0; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; max-height: calc(100vh - 108px); overflow-y: auto; }
}
.editor-side { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.editor-main { width: 100%; max-width: none; }
.editor-main textarea#articleContent { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.9; }

.seo-char-count { display: block; margin-top: 4px; font-size: 11.5px; font-family: var(--font-mono); color: var(--text-faint); }
.seo-char-count.ok { color: var(--accent-2); }
.seo-char-count.warn { color: var(--accent); }
.seo-char-count.bad { color: #e0687a; }

.seo-snippet {
  padding: 14px 16px; border-radius: 12px; background: var(--bg);
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px;
  direction: ltr; text-align: left;
}
.seo-snippet-url { font-size: 12px; color: #6b9e6b; font-family: Arial, sans-serif; direction: rtl; text-align: right; }
.seo-snippet-crumb { color: var(--text-faint); }
.seo-snippet-title { font-size: 17px; color: #7fb2f0; font-family: Arial, sans-serif; direction: rtl; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-snippet-desc { font-size: 13px; color: #c4c9d4; font-family: Arial, sans-serif; direction: rtl; text-align: right; line-height: 1.5; }

.editor-preview-panel { max-width: none; }
.magazine-article-preview .magazine-article-title { font-size: 19px; margin-bottom: 14px; }
.magazine-article-preview .magazine-article-content { font-size: 14px; }
.magazine-article-preview .magazine-article-content:empty::before { content: "همین‌جا پیش‌نمایش مقاله‌ات رو می‌بینی — کافیه شروع کنی به نوشتن."; color: var(--text-faint); font-size: 13px; }

/* =========================================================================
   Markdown-lite editor toolbar (admin article/portfolio content fields)
   ========================================================================= */
.md-toolbar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.md-toolbar button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; font-size: 12.5px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: background var(--dur) var(--ease);
}
.md-toolbar button:hover { background: var(--bg-elevated); }
.md-toolbar button svg { width: 14px; height: 14px; }

/* The in-page popover a toolbar button opens (link/image/CTA) — replaces
   window.prompt(), which a lot of mobile in-app browsers and installed
   PWAs silently block, making the old editor look broken with no error. */
.md-popover {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; margin-bottom: 8px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.md-popover-field { display: flex; flex-direction: column; gap: 4px; }
.md-popover-field label { font-size: 12px; color: var(--text-muted); }
.md-popover-field input { width: 100%; }
.md-popover-actions { display: flex; gap: 8px; }
.md-popover-status { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* =========================================================================
   Scroll reveal
   ========================================================================= */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* =========================================================================
   Panel shell — shared by the user panel and the admin panel
   ========================================================================= */
.panel-body { background: var(--vignette), var(--bg); background-attachment: fixed; }
.panel-shell { display: flex; min-height: 100vh; }

/* Scrolling stays fully functional (wheel, touch, keyboard, drag) — this
   only hides the visible scrollbar track/thumb, which read as a stray
   gray bar against the panel's own glass/blur chrome. Applied to every
   scroll container in the admin shell, not just the two obvious ones. */
.panel-body,
.panel-sidebar,
.panel-content,
.ticket-thread,
.editor-side {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.panel-body::-webkit-scrollbar,
.panel-sidebar::-webkit-scrollbar,
.panel-content::-webkit-scrollbar,
.ticket-thread::-webkit-scrollbar,
.editor-side::-webkit-scrollbar {
  display: none;
}

/* position: sticky + its own height/overflow is what makes this scroll
   independently of the main content column. Without it, .panel-sidebar
   is just a flex item that stretches to match .panel-shell's height —
   on any admin page long enough to scroll, the sidebar (and its nav
   links) scrolled away with the page instead of staying put. Mobile's
   position: fixed (below) is already independent of page scroll on its
   own, but still needed its own overflow-y so a nav list taller than the
   screen has somewhere to go instead of just being clipped. */
.panel-sidebar {
  width: 260px; flex-shrink: 0;
  background: rgb(var(--glass-rgb) / 0.55);
  backdrop-filter: blur(26px) saturate(150%); -webkit-backdrop-filter: blur(26px) saturate(150%);
  border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.panel-brand { padding: 0 6px; }
.panel-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.panel-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  color: var(--text-muted); font-size: 14px;
  transition: all var(--dur-fast) var(--ease);
}
.panel-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.panel-nav a:hover { background: var(--surface); color: var(--text); }
.panel-nav .nav-group > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); color: var(--text-muted); cursor: pointer; list-style: none; font-weight: 600; }
.panel-nav .nav-group > summary::-webkit-details-marker { display: none; }
.panel-nav .nav-group > summary:hover { background: var(--surface); color: var(--text); }
.panel-nav .nav-group > summary svg { width: 18px; height: 18px; flex-shrink: 0; }
.panel-nav .nav-group .nav-group-caret { margin-inline-start: auto; width: 14px; height: 14px; transition: transform var(--dur-fast) var(--ease); }
.panel-nav .nav-group[open] .nav-group-caret { transform: rotate(180deg); }
.panel-nav .nav-group > a { margin-inline-start: 18px; padding-inline-start: 14px; border-inline-start: 1px solid var(--border); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.panel-nav a.active { background: var(--accent-2-soft); color: var(--accent-2); border: 1px solid var(--accent-2-border); }

.panel-sidebar-footer { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.panel-link-muted {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px;
  color: var(--text-faint); background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: right;
}
.panel-link-muted svg { width: 16px; height: 16px; }
.panel-link-muted:hover { color: var(--text-muted); background: var(--surface); }

.panel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-topbar {
  height: calc(68px + var(--safe-top)); flex-shrink: 0; position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; padding: var(--safe-top) 20px 0;
  border-bottom: 1px solid var(--border);
  background: rgb(var(--glass-rgb) / 0.62);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.panel-topbar h1 { font-size: 16.5px; flex: 1; }
.panel-drawer-toggle { display: flex; }

.panel-content { padding: 22px 16px 32px; flex: 1; }
@media (min-width: 700px) { .panel-content { padding: 30px 32px; } }

.panel-backdrop {
  position: fixed; inset: 0; z-index: 239;
  background: rgba(6, 9, 17, 0.7); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease);
}
.panel-backdrop.show { opacity: 1; pointer-events: auto; }

@media (max-width: 959px) {
  .panel-sidebar {
    position: fixed; inset-inline-start: 0; top: 0; bottom: 0; z-index: 240;
    width: min(80vw, 300px);
    padding-top: calc(22px + var(--safe-top));
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
  }
  .panel-sidebar.open { transform: translateX(0); }
}
@media (min-width: 960px) {
  .panel-drawer-toggle { display: none; }
  .panel-backdrop { display: none; }
}

/* Bottom app-nav — user panel only ("Liquid Pill", chosen from the nav lab). A floating glass pill; a
   light blob under the active tab slides with a spring and stretches slightly while it travels.
   "بیشتر" opens a floating glass card of six tiles. Only transform/opacity animate (smooth on phones),
   and everything stops under prefers-reduced-motion. */
.panel-bottomnav {
  --spring: cubic-bezier(.34, 1.4, .5, 1); --soft: cubic-bezier(.22, 1, .36, 1);
  position: fixed; inset-inline: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 161;
  --n: 5; max-width: 460px; margin: 0 auto; height: 70px; padding: 0 6px;
  display: grid; grid-template-columns: repeat(var(--n), 1fr);
  background: rgb(var(--glass-rgb) / .62); border: 1px solid var(--border-strong); border-radius: 28px;
  backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.8), inset 0 1px 0 rgb(var(--fg-rgb) / .14);
}
.pnav-blob {
  position: absolute; z-index: 0; top: 7px; bottom: 7px; width: calc((100% - 12px) / var(--n, 5));
  inset-inline-start: calc(6px + var(--i, 0) * (100% - 12px) / var(--n, 5));
  border-radius: 22px; background: linear-gradient(160deg, rgba(139,199,75,.30), rgba(139,199,75,.10));
  border: 1px solid var(--accent-2-border); box-shadow: 0 8px 22px -10px rgba(139,199,75,.7);
  transition: inset-inline-start .6s var(--spring), transform .35s var(--soft), opacity .3s;
}
.pnav-blob.stretch { transform: scaleX(1.22) scaleY(.92); }
.panel-bottomnav.pnav-none .pnav-blob { opacity: 0; }
.panel-bottomnav a, .panel-bottomnav button {
  position: relative; z-index: 1; min-height: 56px; display: grid; justify-items: center; align-content: center; gap: 3px;
  padding: 0; color: var(--text-faint); font-size: 11px; line-height: 1.2; background: none; border: 0; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: color .3s;
}
.panel-bottomnav .nav-circle, .panel-bottomnav a.active .nav-circle { width: 28px; height: 28px; display: grid; place-items: center; position: relative; background: none; color: inherit; animation: none; border-radius: 0; transition: transform .5s var(--spring); }
.panel-bottomnav svg { width: 22px; height: 22px; }
.panel-bottomnav a.active, .panel-bottomnav button.active, .panel-bottomnav button[aria-expanded="true"] { color: var(--accent-2); }
.panel-bottomnav a.active .nav-circle, .panel-bottomnav button.active .nav-circle, .panel-bottomnav button[aria-expanded="true"] .nav-circle { transform: translateY(-1px) scale(1.08); }
.panel-bottomnav a:active .nav-circle, .panel-bottomnav button:active .nav-circle { transform: scale(.88); }
.panel-bottomnav :is(a, button):focus-visible { outline: 2px solid var(--accent-2); outline-offset: -4px; border-radius: 20px; }
/* dots morph into a cross while the sheet is open */
.pnav-x { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: rotate(-90deg) scale(.5); transition: opacity .3s, transform .5s var(--spring); }
.pnav-dots { display: grid; place-items: center; transition: opacity .3s, transform .5s var(--spring); }
.panel-bottomnav button[aria-expanded="true"] .pnav-x { opacity: 1; transform: none; }
.panel-bottomnav button[aria-expanded="true"] .pnav-dots { opacity: 0; transform: rotate(90deg) scale(.5); }
@media (min-width: 960px) { .panel-bottomnav { display: none; } }
body.has-bottom-nav .panel-content { padding-bottom: 112px; }

.more-sheet-backdrop {
  position: fixed; inset: 0; z-index: 159; background: rgba(5, 8, 16, .55);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none; transition: opacity .45s var(--soft, ease);
}
.more-sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.more-sheet {
  position: fixed; inset-inline: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 160;
  max-width: 420px; margin: 0 auto; padding: 14px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: rgb(var(--glass-rgb) / .72); border: 1px solid var(--border-strong); border-radius: 28px;
  backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.85), inset 0 1px 0 rgb(var(--fg-rgb) / .14);
  transform-origin: 85% 100%; opacity: 0; visibility: hidden; transform: translateY(20px) scale(.9);
  transition: opacity .35s var(--soft, ease), transform .6s var(--spring, ease), visibility 0s .6s;
}
.more-sheet.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.more-sheet-handle { display: none; }
.more-sheet-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 92px; padding: 10px 4px; border-radius: 20px; background: rgb(var(--fg-rgb) / .05);
  color: var(--text); font-size: 13px; text-align: center; width: 100%; border: 0; font-family: inherit; cursor: pointer;
  opacity: 0; transform: translateY(14px) scale(.96);
  transition: opacity .35s var(--soft, ease), transform .55s var(--spring, ease), background .2s;
}
.more-sheet.open .more-sheet-item { opacity: 1; transform: none; transition-delay: calc(var(--k, 0) * 45ms + 60ms); }
.more-sheet-item svg { width: 44px; height: 44px; padding: 11px; border-radius: 16px; background: var(--accent-2-soft); color: var(--accent-2); flex-shrink: 0; }
.more-sheet-item:hover, .more-sheet-item:active { background: rgb(var(--fg-rgb) / .1); }
.more-sheet-item.active { color: var(--accent-2); }
.more-sheet-item-form { display: contents; }
.more-sheet-logout, .more-sheet-logout svg { color: #e8798a; }
.more-sheet-logout svg { background: rgba(232,121,138,.12); }
.more-sheet-item:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .pnav-blob, .panel-bottomnav .nav-circle, .pnav-x, .pnav-dots, .more-sheet, .more-sheet-item, .more-sheet-backdrop { transition-duration: .01ms !important; transition-delay: 0s !important; }
}
@media (min-width: 960px) { .more-sheet, .more-sheet-backdrop { display: none; } }

/* Section building blocks */
.panel-hello { margin-bottom: 20px; }
.panel-hello h2 { font-size: 19px; margin-bottom: 4px; }
.panel-hello p { color: var(--text-muted); font-size: 13.5px; }

.panel-section { padding: 22px; margin-bottom: 20px; }
.panel-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-section-head h3 { font-size: 15px; }
.panel-link { font-size: 13px; color: var(--accent-2); }
.panel-grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .panel-grid-2 { grid-template-columns: 1fr 1fr; } }

/* Profile: read-only summary by default, form only appears once the user
   asks to edit — instead of exposed always-editable inputs. */
.profile-edit-toggle summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  cursor: pointer; list-style: none; padding: 2px; min-width: 0;
  border-radius: 12px; transition: background var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.profile-edit-toggle summary::-webkit-details-marker { display: none; }
.profile-edit-toggle summary::marker { content: ""; }
.profile-edit-toggle summary:hover { background: var(--surface); }
.profile-edit-toggle summary:focus-visible {
  outline: 2px solid var(--accent-2-border); outline-offset: 2px;
}
.profile-summary-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.profile-summary-row { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; min-width: 0; }
.profile-summary-row span { color: var(--text-muted); flex-shrink: 0; min-width: 108px; }
.profile-summary-row strong {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* THE fix for this page pushing past its card on a phone.
     A flex item defaults to min-width:auto, which refuses to shrink below
     its content's intrinsic width — so a long email forced this <strong>
     to its full natural width and shoved the row past the card's edge.
     `overflow: hidden` only clipped the TEXT; the box was still too wide.
     min-width:0 is what actually lets it shrink, and is what makes the
     ellipsis above do anything at all. */
  min-width: 0;
  flex: 1;
}

/* On a phone the label eats 108px of a ~330px row, leaving an email
   ellipsised down to almost nothing — the value is the part worth reading,
   so it gets its own line and the full width. */
@media (max-width: 560px) {
  /* The info block is taller once rows stack, so the edit affordance lines
     up with the first row instead of floating at its vertical centre. */
  .profile-edit-toggle summary { align-items: flex-start; }
  .profile-summary-row { flex-direction: column; align-items: stretch; gap: 2px; }
  .profile-summary-row span { min-width: 0; font-size: 12px; }
  .profile-summary-row strong { white-space: normal; overflow-wrap: anywhere; }
}
.profile-summary-edit {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 13px; color: var(--accent-2); font-weight: 600;
}
.profile-summary-edit svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.profile-edit-toggle[open] .profile-summary-edit svg { transform: rotate(180deg); }
.profile-edit-toggle form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-bottom: 22px; }
@media (max-width: 639px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } .stat-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.stat-tile { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-tile.accent { border-color: var(--accent-border); background: linear-gradient(180deg, var(--accent-soft), rgb(var(--fg-rgb) / 0.015)); }
.stat-value { font-family: var(--font-mono); font-size: 25px; font-weight: 700; }
.stat-label { font-size: 12.5px; color: var(--text-muted); }

/* /Admin/Analytics — bar chart and ranked lists for daily visits, top
   referrer sources and top pages. */
.analytics-period-tabs { margin-bottom: 18px; }
.analytics-chart-wrap { padding-top: 6px; }
.analytics-linechart { width: 100%; height: auto; display: block; overflow: visible; }
.analytics-linechart-area { fill: url(#analyticsLineFill); stroke: none; }
.analytics-linechart-line {
  fill: none; stroke: var(--accent-2); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.analytics-linechart-dot { fill: var(--accent-2); stroke: var(--bg); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.analytics-linechart-dot.is-emphasized { stroke-width: 2; }
.analytics-linechart-value { fill: var(--text-muted); font-size: 20px; font-family: var(--font-mono); }
/* The chart above is an SVG, whose x-coordinates always run left-to-right
   regardless of page direction (oldest day at x=left, today at x=right) —
   but this label row is plain HTML, which the page's dir="rtl" would
   otherwise mirror (first DOM child, the oldest day, rendered on the
   right). Forcing ltr here keeps the same oldest→newest DOM order laid
   out left-to-right too, so each label still sits under its own point. */
.analytics-chart-labels { display: flex; gap: 0; margin-top: 8px; direction: ltr; }
.analytics-chart-label { flex: 1; text-align: center; font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }

.analytics-cols { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .analytics-cols { grid-template-columns: 1fr 1fr; } }

.analytics-bar-list { display: flex; flex-direction: column; gap: 12px; }
.analytics-bar-list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.analytics-bar-list-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.analytics-bar-list-fill { height: 100%; border-radius: 999px; background: var(--accent-2); }

.wallet-balance-card { text-align: center; padding: 32px 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; margin-bottom: 20px; }
.wallet-balance-amount { font-family: var(--font-mono); font-size: clamp(30px, 6vw, 42px); font-weight: 700; color: var(--accent-2); }
.wallet-balance-amount small { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-inline-start: 6px; }

.empty-state { text-align: center; padding: 34px 12px; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--text-muted); font-size: 13.5px; }

.order-list { display: flex; flex-direction: column; }
.order-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.order-list li:last-child { border-bottom: none; }
.order-list strong { display: block; font-size: 14px; margin-bottom: 3px; }
.order-meta { font-size: 12px; color: var(--text-faint); }

/* A site build in progress (User/Dashboard) — its progress panel and
   credentials-reveal block always take the full row width, stacked below
   the subdomain/status row above them, never squeezed into it. */
.order-list li > .provision-panel,
.order-list li > .provision-credentials-reveal,
.order-list li > .provision-status-message,
.order-list li > .provision-stats-row {
  flex-basis: 100%;
}

/* The action cluster on a site row: status pills plus the two external
   links. Wraps rather than overflowing on a narrow phone. */
.site-row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.provision-stats-row { display: flex; gap: 18px; margin-top: 8px; }

.provision-credentials-reveal {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.provision-credentials-pair { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---- "your site is being built" panel ----
   Grouping the step ribbon, the countdown and the status line into one
   surface, rather than leaving them as three loose rows, is what makes this
   read as a single piece of reassurance instead of scattered debug output. */
.provision-panel {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provision-eta { display: flex; flex-direction: column; gap: 7px; }

/* Determinate bar, because here we genuinely do have a number: share of
   the estimate elapsed. It's an estimate, so it's styled as a soft hint
   rather than a precise gauge. */
.provision-eta-bar {
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgb(var(--fg-rgb) / 0.1);
  overflow: hidden;
}
.provision-eta-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  /* Matches the poll interval so the bar glides between server updates
     instead of stepping. */
  transition: width 2.5s linear;
}

.provision-eta-text { margin: 0; font-size: 13px; color: var(--text); }
.provision-eta-count {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  /* Fixed width so a 3-to-2-digit drop doesn't shift the words after it
     sideways once a second. */
  display: inline-block;
  min-width: 2.2ch;
  text-align: center;
}
.provision-eta-note { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.7; }

.provision-steps { display: flex; align-items: center; gap: 8px; flex-basis: 100%; }
.provision-step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); }
.provision-step:not(:last-child)::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--border);
  margin-inline-start: 6px;
}
.provision-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; transition: background var(--dur-fast) var(--ease); }
.provision-step.done { color: var(--text-muted); }
.provision-step.done .provision-dot { background: var(--accent-2); }
.provision-step.active { color: var(--text); font-weight: 600; }
.provision-step.active .provision-dot { background: var(--accent); animation: provisionPulse 1.1s ease-in-out infinite; }

@keyframes provisionPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 5px transparent; }
}
.ticket-link { display: block; }

.idea-list { display: flex; flex-direction: column; }
.idea-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.idea-list li:last-child { border-bottom: none; }
.idea-list li.reviewed { opacity: 0.55; }
.idea-list p { font-size: 13.5px; margin: 0 0 6px; max-width: 520px; }

.ticket-thread { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding-inline-end: 4px; }
.ticket-message { padding: 12px 16px; border-radius: 14px; max-width: 80%; background: var(--surface); border: 1px solid var(--border); }
.ticket-message.from-user { align-self: flex-start; }
.ticket-message.from-admin { align-self: flex-end; background: var(--accent-2-soft); border-color: var(--accent-2-border); }
.ticket-message-author { font-size: 11.5px; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 4px; }
.ticket-message p { font-size: 13.5px; margin: 0; }
.ticket-message-time { font-size: 10.5px; color: var(--text-faint); display: block; margin-top: 6px; font-family: var(--font-mono); }

.alert-success { background: var(--accent-2-soft); border: 1px solid var(--accent-2-border); color: var(--accent-2); padding: 12px 18px; border-radius: 12px; font-size: 13.5px; margin-bottom: 18px; }
.alert-warning { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent); padding: 12px 18px; border-radius: 12px; font-size: 13.5px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.alert-warning form { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.table-wrap::-webkit-scrollbar { display: none; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { text-align: right; color: var(--text-faint); font-weight: 600; font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
.table-subtext { color: var(--text-faint); font-size: 12px; margin: 4px 0 0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-actions { display: flex; gap: 8px; }

/* Form controls used in panels */
.select-field {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text); font-family: var(--font-body); font-size: 13.5px;
  padding: 12px 14px; width: 100%; cursor: pointer;
}
.select-field:focus { outline: none; border-color: var(--accent-2-border); }
.select-sm { padding: 7px 10px; font-size: 12.5px; border-radius: 10px; width: auto; }
.status-form { display: inline-block; }
.field-hint { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }

/* Admin/DesignPresets/Edit's ListItems/ProductCards repeater rows — plain
   add/remove-a-row rows, no drag-and-drop (matches the "manual SortOrder,
   no reordering UI" convention used everywhere else in this codebase). */
.preview-repeater-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.preview-repeater-row input { flex: 1; min-width: 0; }
.preview-repeater-row-wide input { flex: 1 1 33%; }
.preview-repeater-row .preview-row-remove { flex: 0 0 auto; white-space: nowrap; }

.custom-section-field-row .custom-section-field-key { flex: 1 1 140px; }
.custom-section-field-row select { flex: 1 1 140px; min-width: 0; }
.custom-section-field-row .custom-section-field-default { flex: 2 1 200px; }

.tag-editor { display: flex; flex-direction: column; gap: 10px; }
.tag-editor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-editor-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 12.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 6px 8px 6px 12px; cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.tag-editor-chip svg { width: 13px; height: 13px; color: var(--text-faint); }
.tag-editor-chip:hover { border-color: var(--danger); color: var(--danger); background: rgba(224, 133, 133, 0.1); }
.tag-editor-chip:hover svg { color: var(--danger); }
.tag-editor-input-row { display: flex; gap: 8px; }
.tag-editor-input-row input { flex: 1; }

.btn-sm { padding: 8px 16px; font-size: 12.5px; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: rgba(224, 133, 133, 0.5); background: rgba(224, 133, 133, 0.1); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap;
}
.pill-ok { color: var(--accent-2); background: var(--accent-2-soft); border-color: var(--accent-2-border); }
.pill-warn { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.pill-info { color: var(--text-muted); background: var(--surface); border-color: var(--border-strong); }
.pill-button {
  cursor: pointer; font-family: inherit; border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}
.pill-button:hover { filter: brightness(1.15); }
.pill-button:active { transform: scale(0.96); }
.pill-danger { color: var(--danger); background: rgba(224, 133, 133, 0.12); border-color: rgba(224, 133, 133, 0.35); }
/* Companions to .pill-danger, for the tenant health badge (see
   Provisioning/TenantHealth.cs). --accent-2 is the lime already used for
   active/positive states elsewhere; muted reads as "no signal" rather
   than as a fourth severity, which is the whole point of Unknown. */
.pill-success { color: var(--accent-2); background: var(--accent-2-soft); border-color: var(--accent-2-border); }
.pill-muted { color: var(--text-muted); background: var(--surface); border-color: var(--border); }

.text-muted { color: var(--text-muted); font-size: 0.9em; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }

/* Icon-only "back to home" button used inside the configurator's panel
   (the React wizard and the server-rendered gate cards). The arrow is drawn
   pointing right for the site's RTL default and mirrored for LTR. */
.cfg-back {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cfg-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cfg-back:hover { background: var(--surface-hover); border-color: var(--accent-2-border); color: var(--accent-2); }
.cfg-back:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
html[dir='ltr'] .cfg-back svg { transform: scaleX(-1); }
.cfg-card-top { display: flex; align-items: center; margin-bottom: 14px; }

/* Shared pager (Pages/Shared/_Pager.cshtml) — used by every paginated admin list. */
.pager { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.pager-summary { margin: 0; font-size: 13px; color: var(--text-muted); }
.pager-summary strong { color: var(--text); font-weight: 600; }
.pager-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 38px; height: 38px; padding: 0 12px; box-sizing: border-box;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13.5px; font-weight: 500; line-height: 1; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pager-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a.pager-btn:hover { background: var(--surface-hover); border-color: var(--accent-2-border); }
a.pager-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.pager-btn.is-current { background: var(--accent-2-soft); border-color: var(--accent-2-border); color: var(--accent-2); font-weight: 700; }
.pager-btn.is-disabled { opacity: .4; cursor: not-allowed; }
.pager-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; color: var(--text-faint); user-select: none; }
.pager-compact { display: none; }

@media (max-width: 640px) {
  .pager-num, .pager-edge { display: none; }
  .pager-compact { display: block; }
  .pager-list { flex-wrap: nowrap; }
  .pager-btn { height: 42px; }
}

.audit-filter-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.audit-filter-row .field { flex: 1; min-width: 180px; margin-bottom: 0; }

.tag-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  display: inline-flex; align-items: center;
  font-size: 11px; color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}

.admin-image-preview {
  width: 100%; max-width: 220px; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 10px;
}

/* =========================================================================
   Chat — user-facing widget and admin conversation list/thread
   ========================================================================= */
/* Full-screen Telegram-style chat page — its own minimal layout (_ChatLayout),
   no panel chrome; a slim glass topbar, a scrolling message area that fills
   the rest of the viewport, and a glass input bar pinned to the bottom. */

/* The page is full-bleed, the CONTENT is a centred column — the same shape
   ChatGPT and every other chat that has to work on a desktop uses. Built
   mobile-first, it ran edge to edge at every width, so on a 1440px monitor
   the composer stretched the whole screen with the send button pinned to
   one far corner and the attach button to the other, and a two-word reply
   floated alone in a very wide row. Nothing is wrong with that at 390px;
   it just never stopped.

   Every strip of content uses the one --chat-gutter expression below rather
   than its own padding, so the topbar, the messages and the composer stay
   in the same column as each other. max() is what keeps this a pure
   desktop change: below the column width it collapses to exactly the 16px
   the phone layout already had.

   The gutter goes on the padding of full-width elements, not on a wrapper
   with a max-width, so the scroll container and the pinned footer still
   span the viewport — the scrollbar stays at the screen edge where it
   belongs, and the footer's backdrop isn't cut into a floating slab. */
:root {
  --chat-col: 760px;
  --chat-gutter: max(16px, calc((100% - var(--chat-col)) / 2));
}
/* The keyboard-opening bug wasn't really about body's own height — it was
   that html/body still had scrollable overflow available, so the mobile
   browser's "scroll the focused input into view" behavior would scroll the
   whole document, dragging the topbar off the top edge. Nothing above
   .chat-messages is allowed to scroll at all; only that one element is. */
html.chat-page-html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.chat-page-body {
  display: flex; flex-direction: column;
  /* Layered height strategy, safest-first:
     1) 100vh   — universal fallback.
     2) 100svh  — the SMALLEST the viewport can ever be (toolbars fully
        shown). Content sized to this can never be taller than what's
        actually visible, so the input bar can never be pushed off-screen —
        this is the guaranteed floor, not just a nicety.
     3) 100dvh  — adapts to the toolbar hiding for a snugger fit once the
        browser reports it, only ever *shrinking* toward svh or growing
        toward lvh, never breaking the svh guarantee in practice.
     4) --chat-vh — JS-measured visualViewport height, for keyboard-open
        scenarios dvh doesn't always track well. Falls back to svh (not
        dvh) so a stale/late JS read can't regress past the safe floor. */
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  height: var(--chat-vh, 100svh);
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--vignette), var(--bg);
  background-attachment: fixed;
}
.chat-topbar {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
  padding-block: 14px; padding-inline: var(--chat-gutter);
  padding-top: calc(14px + var(--safe-top));
  border-radius: 0; border-width: 0 0 1px;
  position: relative; z-index: 20;
}
.chat-topbar h1 { font-size: 15.5px; margin: 0; }
.chat-back-btn { flex-shrink: 0; }
.chat-fullscreen { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* padding-bottom reserves room for .chat-footer, which is pinned with
   position: fixed below (see comment there) and so no longer occupies
   layout space of its own — without this, its last messages would sit
   underneath it. --chat-footer-h is kept in sync with the footer's real,
   possibly-animating height by a ResizeObserver in chat.js; the fallback
   covers the instant before that first measurement lands. */
.chat-messages {
  flex: 1; overflow-y: auto;
  padding-block: 18px; padding-inline: var(--chat-gutter);
  padding-bottom: calc(var(--chat-footer-h, 130px) + 20px);
  /* Keeps this padding shrinking in step with the FAQ-collapse transition
     below (same duration/easing) instead of jumping the instant JS updates
     --chat-footer-h, which is what let the last message sit exposed under
     the fixed footer's fade scrim for a moment mid-animation. */
  transition: padding-bottom var(--dur) var(--ease);
  display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble-row { display: flex; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble-row.theirs { justify-content: flex-start; }
.chat-bubble {
  /* Two caps, and the smaller wins. 78% keeps short replies from looking
     stranded on a phone; the ch cap keeps a long paragraph from running to
     a line length nobody can comfortably read back on a desktop. */
  max-width: min(78%, 62ch);
  background: var(--surface);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
}
/* Both colors are admin-controlled (/Admin/Settings), inlined per-request
   as CSS variables by _ChatLayout — the fallbacks here are only for the
   (never normally hit) case that style tag is missing. Flat colors, not a
   gradient: a gradient needs a second, hand-picked stop, which would look
   broken the moment the admin picks a color it wasn't tuned for. */
.chat-bubble-row.mine .chat-bubble {
  background: var(--chat-mine-color, #dcb679);
  color: var(--chat-mine-ink, #111111);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chat-bubble-row.theirs .chat-bubble {
  background: var(--chat-theirs-color, var(--surface));
  color: var(--chat-theirs-ink, var(--text));
}
.chat-bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.chat-bubble-time { display: flex; align-items: center; gap: 3px; margin-top: 4px; font-size: 10.5px; opacity: 0.65; }
.chat-status { display: inline-flex; }
.chat-status svg { width: 13px; height: 13px; }
.chat-status[data-status="sending"] svg { animation: chat-status-spin 1.4s linear infinite; }
.chat-status[data-status="sent"] svg { animation: chat-status-pop 0.35s var(--ease); }
.chat-status[data-status="failed"] { color: var(--danger); }
@keyframes chat-status-spin { to { transform: rotate(360deg); } }
@keyframes chat-status-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* Every new bubble — mine, theirs, or the FAQ auto-reply — eases in the
   same way, so the chat never "pops" text in abruptly. */
.chat-bubble-enter { animation: chat-bubble-enter 0.32s var(--ease); }
@keyframes chat-bubble-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-attachment-image { display: block; border-radius: 12px; overflow: hidden; margin-bottom: 6px; max-width: 220px; transition: transform var(--dur-fast) var(--ease); }
.chat-attachment-image:hover { transform: scale(1.02); }
.chat-attachment-image img { width: 100%; display: block; }
.chat-attachment-file {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgb(var(--fg-rgb) / 0.08); margin-bottom: 6px; color: inherit; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.chat-attachment-file:hover { background: rgb(var(--fg-rgb) / 0.14); }
.chat-attachment-file:active { transform: scale(0.98); }
.chat-attachment-file svg { width: 22px; height: 22px; flex-shrink: 0; }
.chat-attachment-file span { font-size: 13px; word-break: break-all; }

/* Footer: FAQ suggestions + composer, pinned to the real visual viewport
   bottom the same way .mobile-tabbar is (position: fixed + a safe-area-
   aware offset) instead of being laid out as the last flex child of a
   container whose total height is computed from svh/dvh/JS. That total-
   height math is what let the composer drift down past the visible screen
   on some real devices — position: fixed can't drift, it's always relative
   to the actual viewport. --keyboard-offset (set in chat.js from
   visualViewport) lifts it clear of an on-screen keyboard, which otherwise
   covers a plain "bottom: 0" without moving it.
   It used to have no background at all — Telegram-style, only the input
   pill and the round buttons carrying their own surface colour, so chat
   history stayed visible scrolling underneath the bar. That reads fine
   behind a slim composer and badly behind anything taller: with the
   suggestions panel open the bar is four rows of chips, and messages
   scrolling up ran straight into them with nothing to separate the two.
   Text over text is not transparency, it's collision.

   A scrim fixes it without going back to a solid slab: transparent at the
   top, opaque at the bottom, so content fades out as it passes behind
   rather than tangling with the controls. The gradient is on a pseudo-
   element so it can extend ABOVE the bar — the fade has to start before
   the first chip, or the topmost row still collides. */
.chat-footer {
  position: fixed; left: 0; right: 0; bottom: var(--keyboard-offset, 0px); z-index: 25;
  display: flex; flex-direction: column;
}
.chat-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  /* Starts above the bar's own box so the fade is already underway by the
     time content reaches the controls. */
  top: -5px;
  bottom: 0;
  /* A fixed-length fade, not a percentage. The bar's height changes a lot —
     120px with the suggestions collapsed, 314px with them open — and a
     percentage stop would leave the gradient still half-transparent at the
     bar's own top edge in the tall case, which is exactly where the first
     row of controls sits. Ending the fade at 32px means it is fully opaque
     the moment content reaches any control, at any footer height. */
  background: linear-gradient(to bottom, transparent 0, var(--bg) 32px, var(--bg));
  pointer-events: none;
  z-index: -1;
}
.chat-faq-bar { display: flex; justify-content: center; flex-shrink: 0; }
.chat-faq-bar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-faint);
  font-family: inherit; font-size: 12px; cursor: pointer; padding: 2px 10px 2px;
  transition: color var(--dur-fast) var(--ease);
}
.chat-faq-bar-btn:hover, .chat-faq-bar-btn[aria-expanded="true"] { color: var(--accent-2); }
/* Two chevrons nudging upward in sequence — a wordless "there's something
   here, tap it" cue, replacing the old static question-mark icon. */
.chat-faq-nudge { display: inline-flex; flex-direction: column; align-items: center; height: 15px; overflow: hidden; }
.chat-faq-nudge svg { width: 15px; height: 11px; margin-top: -3px; animation: chat-faq-nudge-bounce 1.6s ease-in-out infinite; }
.chat-faq-nudge svg:last-child { margin-top: -7px; animation-delay: 0.18s; }
@keyframes chat-faq-nudge-bounce {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(2px); }
  25% { opacity: 1; transform: translateY(-2px); }
}
.chat-faq-collapse .collapse-panel-inner { padding-block: 2px 0px; padding-inline: var(--chat-gutter); }
.chat-faq-collapse .chat-faq { max-width: none; }

.chat-faq { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 420px; }
.chat-faq-chip {
  font-family: inherit; font-size: 12.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 9px 16px; cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.chat-faq-chip:hover { background: var(--surface-2); border-color: var(--accent-2-border); color: var(--accent-2); }
.chat-faq-chip:active { transform: scale(0.96); }

.chat-input-row {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding-block: 12px; padding-inline: var(--chat-gutter);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
/* DOM order stays attach -> text -> send (a sane tab order regardless of
   layout direction); `order` alone repositions them visually. In a
   flex row under dir="rtl", the lowest `order` value lands at the visual
   RIGHT (main-start), so send (-1) sits on the right and attach (1) on
   the left, with the text field between them. */
.chat-input-row input[type="text"] {
  order: 0;
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font-family: var(--font-body); font-size: 14px; padding: 11px 16px;
}
.chat-input-row input[type="text"]:focus { outline: none; border-color: var(--accent-2-border); }
.chat-attach-btn {
  order: 1;
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer; transition: all var(--dur-fast) var(--ease);
}
.chat-attach-btn:hover { color: var(--text); border-color: var(--border-strong); transform: scale(1.06); }
.chat-attach-btn:active { transform: scale(0.9); }
.chat-attach-btn svg { width: 18px; height: 18px; }
.chat-send-btn {
  order: -1;
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-2); color: var(--accent-ink); border: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}
.chat-send-btn svg { width: 19px; height: 19px; }
.chat-send-btn:hover { transform: scale(1.06); filter: brightness(1.08); }
.chat-send-btn:active { transform: scale(0.9); }

.chat-conv-list { display: flex; flex-direction: column; }
.chat-conv-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 6px; border-bottom: 1px solid var(--border);
  color: var(--text);
}
.chat-conv-row:last-child { border-bottom: none; }
.chat-conv-row:hover { background: var(--surface); }
.chat-conv-row.unread strong { color: var(--accent-2); }
.chat-conv-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.chat-conv-info strong { font-size: 14px; }
.chat-conv-info span { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.chat-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.chat-conv-meta > span:first-child { font-size: 11px; color: var(--text-faint); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; transition-delay: 0ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   PWA update toast
   ========================================================================= */
.update-toast {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  z-index: 400;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  max-width: calc(100vw - 32px);
}
.update-toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.update-toast span { font-size: 13.5px; white-space: nowrap; }
.update-toast-btn { padding: 8px 16px; font-size: 12.5px; flex-shrink: 0; }
@media (max-width: 899px) { .update-toast { bottom: calc(86px + env(safe-area-inset-bottom)); } }

/* =========================================================================
   Push permission prompt
   ========================================================================= */
.push-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  z-index: 401;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px;
  width: min(380px, calc(100vw - 32px));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.push-prompt.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.push-prompt-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-2-soft); color: var(--accent-2);
}
.push-prompt-icon svg { width: 19px; height: 19px; }
.push-prompt-body strong { display: block; font-size: 14px; margin-bottom: 6px; }
.push-prompt-body p { font-size: 12.5px; color: var(--text-muted); line-height: 1.8; margin-bottom: 14px; }
.push-prompt-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 899px) { .push-prompt { bottom: calc(86px + env(safe-area-inset-bottom)); } }

/* =========================================================================
   Notification bell
   ========================================================================= */
.notif-bell { position: relative; }
.notif-badge {
  position: absolute; top: -2px; left: -2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px;
  background: var(--danger); color: #2a0a0a;
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
  font-family: var(--font-mono);
  border: 2px solid var(--bg);
}
/* position/top/left/right/width are all set inline by JS (see
   site.js) once the dropdown is opened, computed from the bell button's
   actual on-screen position at that moment. It can't be pinned with plain
   CSS: the topbars it lives in (.panel-topbar, .desktop-topbar) use
   backdrop-filter, which — per spec — makes them a new containing block
   for `position: fixed` descendants, silently turning "fixed to the
   viewport" into "fixed to this 68px bar" and sending the dropdown
   off-screen. JS instead moves the element to be a direct child of
   <body>, clear of that trap, and positions it itself. */
.notif-dropdown {
  position: fixed;
  max-height: 70vh; overflow-y: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  z-index: 300;
  padding: 6px;
}
.notif-dropdown[hidden] { display: none; }
.notif-dropdown-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; font-size: 13.5px; font-weight: 600;
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.notif-dropdown-head a { font-size: 12px; font-weight: 500; color: var(--accent-2); }
.notif-dropdown-list { display: flex; flex-direction: column; }
.notif-dropdown-item {
  display: block; padding: 10px; border-radius: 10px;
  transition: background var(--dur-fast) var(--ease);
}
.notif-dropdown-item:hover { background: var(--surface); }
.notif-dropdown-item strong { display: block; font-size: 13px; margin-bottom: 3px; }
.notif-dropdown-item p { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-dropdown-item span { font-size: 10.5px; color: var(--text-faint); font-family: var(--font-mono); }
.notif-dropdown .empty-state { padding: 24px 12px; }

.notif-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.notif-page-head h2 { font-size: 19px; margin: 0; }
.notif-page-count { font-size: 12.5px; color: var(--text-muted); background: var(--surface-2); border-radius: 999px; padding: 4px 12px; }

.notif-page-list { display: flex; flex-direction: column; }
.notif-page-row { border-bottom: 1px solid var(--border); position: relative; }
.notif-page-row:last-child { border-bottom: none; }
.notif-page-row.unread::before {
  content: ""; position: absolute; right: -2px; top: 24px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
}
.notif-page-link {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 16px 16px 4px; border-radius: 14px;
  transition: background var(--dur) var(--ease);
}
.notif-page-link:hover, .notif-page-link:focus-visible { background: var(--surface-2); }
.notif-page-icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-muted);
}
.notif-page-icon svg { width: 18px; height: 18px; }
.notif-page-row.unread .notif-page-icon { background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); }
.notif-page-body { flex: 1; min-width: 0; }
.notif-page-body strong { display: block; font-size: 14px; margin-bottom: 4px; }
.notif-page-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.notif-page-date { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); }

/* =========================================================================
   Accessibility helpers
   ========================================================================= */

/* Visually hidden but still read by screen readers and still indexed —
   used by the homepage <h1>, whose text is baked into the hero artwork.
   The clip-path/1px-box combination (rather than display:none or
   visibility:hidden) is what keeps it in the accessibility tree. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip link: off-screen until it takes keyboard focus, then it drops into
   the top-right (RTL) corner as a normal button. Without it, a keyboard
   user had to tab through the entire header on every single page before
   reaching content. */
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 16px;
  z-index: 999;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible,
.skip-link:focus {
  top: 0;
}

/* <main tabindex="-1"> is only focusable so the skip link can move focus
   into it; it should never draw a focus ring of its own when it does. */
main:focus {
  outline: none;
}

/* =========================================================================
   Order create
   ========================================================================= */
/* The page was a bare 560px box with no heading and no explanation of what
   happens after submitting. On a phone that box ran edge to edge with a
   full-bleed button; on a desktop it left most of the screen empty and
   gave no clue what the page was. */
.order-create { max-width: 720px; margin-inline: auto; }
.order-create-head { margin-bottom: 20px; }
.order-create-head h1, .order-create-head h2 { font-size: clamp(21px, 3vw, 27px); margin: 0 0 10px; }
.order-create-head p { color: var(--text-muted); font-size: 14px; line-height: 1.85; margin: 0; }
.order-create-card { padding: 26px 24px; }

.order-create-actions { display: flex; gap: 10px; margin-top: 22px; }
.order-create-actions .btn { flex: 0 0 auto; }

@media (max-width: 560px) {
  .order-create-card { padding: 20px 16px; }
  /* Stacked and full width, because at this size each control owns its own
     row anyway and a thumb-sized target beats a tidy one. Primary stays
     first in the DOM so it is also first for a screen reader and for
     keyboard order. */
  .order-create-actions { flex-direction: column; }
  .order-create-actions .btn { width: 100%; }
}

/* =========================================================================
   Audit page (/Audit)
   ========================================================================= */
/* The one owner of this page's spacing. It used to be split between the
   React app (which set its own top padding) and nothing at all (for the
   quota card rendered above it), which is how the card ended up under the
   floating desktop header and flush against both phone edges. */
.audit-page {
  max-width: 1000px;
  /* Side gutters at every width. The inline padding is never folded into a
     `padding` shorthand below, so a breakpoint that changes the vertical
     rhythm can't accidentally zero the gutters out. */
  margin: 0 auto;
  padding-inline: 20px;
  padding-block-start: 28px;
  /* Clears the fixed mobile tab bar, which otherwise covers the last rows
     of a long findings list. */
  padding-block-end: calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* .desktop-topbar (above) is a floating pill — `position: fixed; top: 18px`,
   ~56px tall, only at >=900px — so it takes up no space in document flow
   and sits on top of whatever renders at the top of the page. Other pages
   get away with ignoring that because their first section is a tall hero;
   this page's first element is a heading, which would land underneath it. */
@media (min-width: 900px) {
  .audit-page { padding-block-start: calc(var(--header-h) + 8px); }
}

@media (max-width: 480px) {
  .audit-page { padding-inline: 16px; gap: 12px; }
}

.audit-page-head h1 {
  font-size: 24px;
  margin: 0 0 6px;
  line-height: 1.5;
}
.audit-page-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.9;
  max-width: 62ch;
}
@media (max-width: 480px) {
  .audit-page-head h1 { font-size: 20px; }
  .audit-page-head p { font-size: 13px; }
}

/* "How to use this" — below the tool and collapsed by default. It's
   reference material you read once, so it shouldn't stand between someone
   and the input they came here to fill in, and it shouldn't cost them a
   scroll on every later visit either. */
.audit-howto {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.audit-howto > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  /* The default triangle marker renders on the wrong side in RTL and can't
     be positioned; the chevron in the markup replaces it. */
  list-style: none;
}
.audit-howto > summary::-webkit-details-marker { display: none; }
.audit-howto > summary:hover { color: var(--accent); }
.audit-howto-chevron {
  color: var(--text-faint);
  transition: transform var(--dur-fast) var(--ease);
}
.audit-howto[open] .audit-howto-chevron { transform: rotate(180deg); }
.audit-howto-body {
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.audit-howto-body ol { margin: 0; padding-inline-start: 20px; }
.audit-howto-body li { color: var(--text-muted); font-size: 13px; line-height: 2; }

.audit-build-missing {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.audit-build-missing h2 { font-size: 17px; margin: 0 0 10px; }
.audit-build-missing p { color: var(--text-muted); margin: 0; font-size: 13.5px; }

/* =========================================================================
   Audit quota bar
   ========================================================================= */
/* The account's remaining allowance, rendered above the audit SPA (see
   Pages/Audit.cshtml and _AuditQuotaCard.cshtml) — the tool previously had
   nowhere to show this: a visitor learned the limit existed only by hitting
   it. Wrapped in a live-box, so it re-renders the moment a scan is spent. */
.audit-quota-bar {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.audit-quota-counts { display: flex; gap: 12px; flex-wrap: wrap; }
.audit-quota-item {
  flex: 1 1 160px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}
/* Zero is the one state worth colouring — it changes what the person can
   do next. Anything above zero is just information. */
.audit-quota-item.is-empty { border-color: rgba(224, 133, 133, 0.35); }
.audit-quota-item.is-empty .audit-quota-num { color: var(--danger); }
.audit-quota-num { display: block; font-size: 26px; font-weight: 700; color: var(--accent-2); line-height: 1.2; }
.audit-quota-of { font-size: 14px; font-weight: 600; color: var(--text-faint); }
.audit-quota-label { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.audit-quota-hint { color: var(--text-muted); font-size: 12.5px; line-height: 1.95; margin: 10px 0 0; }
.audit-quota-exhausted { margin: 10px 0 0; color: var(--danger); font-weight: 600; font-size: 12.5px; }

@media (max-width: 560px) {
  .audit-quota-bar { padding: 12px; border-radius: var(--radius-md); }
  /* Side by side even on the narrowest screens: two short numbers fit,
     and stacking them pushes the tool itself below the fold. */
  .audit-quota-item { flex: 1 1 0; min-width: 0; padding: 10px; }
  .audit-quota-num { font-size: 22px; }
  .audit-quota-label { font-size: 11px; }
}

/* =========================================================================
   Configurator — the "you already have a site" screen
   ========================================================================= */
/* Someone lands here to build a site and is told they already have one.
   That's a fine answer, but the screen has to be about THEIR site — what
   it is, how it's doing, and the way into it — not a paragraph explaining
   a rule. The rule is one line at the bottom. */
.cfg-existing {
  display: flex;
  justify-content: center;
  padding-inline: 20px;
  padding-block-start: 28px;
  padding-block-end: calc(96px + env(safe-area-inset-bottom));
}
/* Clears the floating pill header, which only exists at this width and
   takes up no space in document flow. */
@media (min-width: 900px) {
  .cfg-existing { padding-block-start: calc(var(--header-h) + 8px); }
}
@media (max-width: 480px) {
  .cfg-existing { padding-inline: 16px; }
}

.cfg-existing-card {
  width: 100%;
  max-width: 560px;
  padding: 26px;
  border-radius: var(--radius-lg);
}
@media (max-width: 480px) {
  .cfg-existing-card { padding: 20px 16px; }
}

.cfg-existing-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  margin-bottom: 12px;
}
.cfg-existing-card h1 { font-size: 21px; margin: 0 0 8px; line-height: 1.55; }
.cfg-existing-lead { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.9; }
@media (max-width: 480px) {
  .cfg-existing-card h1 { font-size: 18px; }
}

.cfg-site-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.cfg-site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cfg-site-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfg-site-domain {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  /* A long subdomain must wrap rather than push the status pill off the
     card — this is the one element here with unbounded length. */
  overflow-wrap: anywhere;
}
.cfg-site-template { font-size: 12px; color: var(--text-faint); }

.cfg-site-warning { margin: 12px 0 0; font-size: 12.5px; color: var(--danger); line-height: 1.85; }

.cfg-site-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
/* On a phone each action gets its own full-width row. Three buttons
   wrapping mid-line reads as a jumble, and these are the whole point of
   the screen. */
@media (max-width: 480px) {
  .cfg-site-actions { flex-direction: column; }
  .cfg-site-actions .btn { width: 100%; justify-content: center; }
}

.cfg-site-pending-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.85;
}

.cfg-existing-footnote {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.9;
}

/* =========================================================================
   Email confirmation card (User/Dashboard)
   ========================================================================= */
/* Replaces a one-line warning strip whose only action was "send the email
   again". The email has already been sent; the person is looking at their
   inbox holding a code. So this leads with the code field, demotes
   resending to a quiet secondary link, and says the spam-folder part out
   loud instead of leaving them to guess it. */
.verify-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-border);
  background: linear-gradient(180deg, var(--accent-soft), rgb(var(--fg-rgb) / 0.015));
  margin-bottom: 18px;
}
@media (max-width: 480px) {
  .verify-card { padding: 16px 14px; border-radius: var(--radius-md); }
}

.verify-card-head { display: flex; gap: 13px; align-items: flex-start; }
.verify-card-icon { font-size: 22px; line-height: 1.5; flex-shrink: 0; }
.verify-card h3 { margin: 0 0 5px; font-size: 15.5px; }
.verify-card-lead { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.95; }
/* The address can be long and has no spaces to break at, so it must be
   allowed to wrap or it pushes the card wider than the screen. */
.verify-card-email { overflow-wrap: anywhere; color: var(--text); }

.verify-card-error {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(224, 133, 133, 0.12);
  border: 1px solid rgba(224, 133, 133, 0.35);
  color: var(--danger);
  font-size: 12.5px;
}

.verify-form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* One wide field rather than six boxes: six inputs look the part and then
   fight paste, backspace-across-boundary, and the OS autofill that offers
   the code straight from the notification (which only targets a single
   input carrying autocomplete="one-time-code"). The letter-spacing is what
   gives it the "enter a code" look the boxes were for. */
.verify-code-input {
  flex: 1 1 190px;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-mono);
  /* 18px also clears the 16px floor below which iOS zooms the page on
     focus — on a dashboard that reflow is especially disorienting. */
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 12px 14px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.verify-code-input::placeholder { letter-spacing: 0.4em; color: var(--text-faint); font-weight: 400; }
.verify-code-input:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.verify-submit { flex: 0 0 auto; }
@media (max-width: 480px) {
  .verify-form { flex-direction: column; }
  /* In a column the 190px flex-basis becomes a HEIGHT: the field rendered ~190px tall on phones. */
  .verify-code-input { flex: 0 0 auto; }
  .verify-submit { width: 100%; }
}

.verify-card-hint {
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.9;
}
.verify-card-spam strong { color: var(--text); }

/* A button that reads as a link. It IS a button — it submits the resend
   form — but it's the secondary path here, and styling it as a second
   real button would put it in competition with "confirm". */
.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--text); }

/* Standalone confirm-your-email page (/Account/VerifyEmail) — the card it
   hosts is the dashboard's, so this only supplies the page frame. */
.verify-page {
  display: flex;
  justify-content: center;
  padding-inline: 20px;
  padding-block-start: 28px;
  padding-block-end: calc(96px + env(safe-area-inset-bottom));
}
@media (min-width: 900px) {
  .verify-page { padding-block-start: calc(var(--header-h) + 8px); }
}
@media (max-width: 480px) {
  .verify-page { padding-inline: 16px; }
}
.verify-page-inner { width: 100%; max-width: 560px; }
.verify-page-actions { margin-top: 16px; }
.verify-page-back { margin: 16px 0 0; font-size: 13px; }
.verify-page-back a { color: var(--text-muted); }
.verify-page-back a:hover { color: var(--text); }

/* =========================================================================
   Site billing — header chip and dashboard card
   ========================================================================= */

/* The header's money chip. A plain button, not a link: it only ever shows
   the balance, so what it means (cost, runway, how billing works) lives in
   the popover it opens rather than in a shifting sentence next to the
   number. Colour alone carries the state at a glance. */
.billing-chip-wrap { position: relative; display: inline-flex; }
.billing-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.billing-chip:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.billing-chip-balance { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 800; }
.billing-chip-unit { font-size: 10.5px; color: var(--text-faint); }

/* Three states worth colouring: healthy, running out, and already stopped.
   No site yet stays neutral — there's nothing to be healthy about. */
.billing-chip.is-ok {
  border-color: var(--accent-2-border);
  background: var(--accent-2-soft);
}
.billing-chip.is-ok .billing-chip-balance { color: var(--accent-2); }
.billing-chip.is-low {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.billing-chip.is-low .billing-chip-balance { color: var(--accent); }
.billing-chip.is-suspended {
  border-color: rgba(224, 133, 133, 0.45);
  background: rgba(224, 133, 133, 0.12);
}
.billing-chip.is-suspended .billing-chip-balance { color: var(--danger); }

/* The panel topbar is tight on a phone — shrink the chip rather than
   letting it squeeze the page title out. */
@media (max-width: 560px) {
  .billing-chip { padding: 5px 10px; font-size: 12px; }
}

/* position/top/left/right/width are all set inline by JS (see site.js),
   for the same containing-block reason documented on .notif-dropdown
   above: the topbars this lives in use backdrop-filter, which traps
   position:fixed descendants unless JS moves it to be a child of <body>. */
.billing-popover {
  position: fixed; z-index: 300; padding: 16px; display: grid; gap: 12px;
  border-radius: 24px; border: 1px solid var(--accent-2-border);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.7), 0 0 0 1px rgb(var(--fg-rgb) / .04) inset;
  background: radial-gradient(120% 90% at 100% 0%, var(--accent-2-soft), transparent 60%), linear-gradient(180deg, rgb(var(--glass-rgb) / .97), rgb(var(--glass-rgb) / .95));
  transform-origin: top center; animation: bp-in .32s cubic-bezier(.22, 1, .36, 1) both;
}
.billing-popover[hidden] { display: none; }
@keyframes bp-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.billing-popover.is-low { border-color: rgba(242,196,109,.5); background: radial-gradient(120% 90% at 100% 0%, rgba(242,196,109,.14), transparent 60%), linear-gradient(180deg, rgb(var(--glass-rgb) / .97), rgb(var(--glass-rgb) / .95)); }
.billing-popover.is-suspended { border-color: rgba(255,107,107,.5); background: radial-gradient(120% 90% at 100% 0%, rgba(255,107,107,.14), transparent 60%), linear-gradient(180deg, rgb(var(--glass-rgb) / .97), rgb(var(--glass-rgb) / .95)); }
.bp-top { display: flex; align-items: center; gap: 12px; }
.bp-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; color: var(--accent-2); background: var(--accent-2-soft); border: 1px solid var(--accent-2-border); } .bp-ic svg { width: 22px; height: 22px; }
.is-low .bp-ic { color: #f2c46d; background: rgba(242,196,109,.14); border-color: rgba(242,196,109,.4); } .is-suspended .bp-ic { color: #ff8a8a; background: rgba(255,107,107,.14); border-color: rgba(255,107,107,.4); }
.bp-bal { display: grid; gap: 0; min-width: 0; } .bp-bal small { color: var(--text-muted); font-size: 12px; }
.bp-bal b { font-family: var(--font-mono); font-size: 1.55rem; line-height: 1.25; font-weight: 800; color: var(--text); } .bp-bal em { font-family: var(--font-body); font-style: normal; font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.bp-msg { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--text-muted); padding: 10px 12px; border-radius: 14px; background: var(--surface); } .bp-msg strong { color: var(--text); }
.bp-msg.bp-warn { color: #f2c46d; background: rgba(242,196,109,.1); } .bp-msg.bp-bad { color: #ff9a9a; background: rgba(255,107,107,.1); }
.bp-runway { display: grid; gap: 6px; } .bp-runway-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); } .bp-runway-top b { color: var(--text); }
.bp-bar { height: 8px; border-radius: 99px; background: rgb(var(--fg-rgb) / .08); overflow: hidden; } .bp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 60%, #fff)); transition: width .8s cubic-bezier(.22, 1, .36, 1); }
.is-low .bp-bar i { background: #f2c46d; }
.bp-stats { display: grid; } .bp-stats div { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface); } .bp-stats span { font-size: 12px; color: var(--text-muted); } .bp-stats b { font-family: var(--font-mono); font-size: 14px; } .bp-stats small { font-family: var(--font-body); font-size: 10.5px; color: var(--text-muted); font-weight: 500; }
.bp-actions { display: grid; gap: 4px; }
.bp-cta { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 99px; border: 1.5px solid var(--accent-2); color: var(--accent-2); font-weight: 700; font-size: 13.5px; text-decoration: none; transition: background .25s, transform .3s; } .bp-cta:hover { background: var(--accent-2-soft); transform: translateY(-1px); }
.bp-link { display: flex; align-items: center; justify-content: center; min-height: 40px; font-size: 12.5px; color: var(--text-muted); text-decoration: none; } .bp-link:hover { color: var(--text); }
.bp-note { margin: 0; font-size: 11px; line-height: 1.8; color: var(--text-faint, var(--text-muted)); text-align: center; } .bp-note strong { color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .billing-popover { animation: none; } .bp-bar i { transition: none; } }

/* =========================================================================
   Site sharing — short link + QR (User/Dashboard sites card)
   ========================================================================= */
.site-share {
  flex-basis: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}
.site-share-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

.site-share-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }

.site-share-url {
  flex: 1 1 200px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  /* 16px keeps iOS from zooming the page when this gets focus — which it
     does on tap, because selecting the text by hand is the fallback path
     when the clipboard API isn't available (see site.js). */
  font-size: 16px;
  padding: 9px 11px;
  /* Read-only, but selectable: copying by hand has to stay possible. */
  cursor: text;
  text-overflow: ellipsis;
}
.site-share-url:focus { outline: none; border-color: var(--accent-2-border); }

.site-share-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.site-share-btn:hover { background: var(--surface-hover); border-color: var(--accent-2-border); color: var(--accent-2); }
.site-share-btn.is-copied {
  background: var(--accent-2-soft);
  border-color: var(--accent-2-border);
  color: var(--accent-2);
}

.site-share-hint { margin: 9px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.8; }

/* On a phone the field takes its own row and the two actions share the
   next one — three items on one line leaves the URL too narrow to read
   any of. */
@media (max-width: 560px) {
  .site-share-url { flex: 1 1 100%; }
  .site-share-btn { flex: 1 1 0; }
}

/* =========================================================================
   Dashboard: clickable stat tiles, billing alert, site rows
   ========================================================================= */

/* Every tile is an <a> now. A number with no destination invites a click
   that does nothing, and each of these has an obvious place to go. */
a.stat-tile {
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
a.stat-tile:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
a.stat-tile:active { transform: translateY(0); }

.stat-value-muted { color: var(--text-faint); }
.stat-value-free { color: var(--accent-2); font-family: var(--font-body); font-size: 21px; }
/* The one tile whose number changes what you should do next. */
.stat-tile.is-warning { border-color: var(--accent-border); }
.stat-tile.is-warning .stat-value { color: var(--accent); }

/* ---- Billing alert strip ----
   Shown only when something needs doing (see _BillingAlert.cshtml). */
.billing-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 18px;
}
.billing-alert-icon { font-size: 17px; line-height: 1; flex-shrink: 0; }
.billing-alert-text {
  flex: 1 1 240px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.9;
}
.billing-alert-text strong { color: var(--text); }
.billing-alert.is-danger { border-color: rgba(224, 133, 133, 0.45); background: rgba(224, 133, 133, 0.1); }
.billing-alert.is-danger .billing-alert-text strong { color: var(--danger); }
.billing-alert.is-warning { border-color: var(--accent-border); background: var(--accent-soft); }
.billing-alert.is-info { border-color: var(--accent-2-border); background: var(--accent-2-soft); }
@media (max-width: 480px) {
  .billing-alert .btn { width: 100%; justify-content: center; }
}

/* ---- Site rows ----
   The whole row is the link: a card with one obvious destination shouldn't
   make people hunt for a small "details" link in the corner of it. */
.site-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.site-list > li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.site-list > li:last-child { border-bottom: none; }

.site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 6px;
  border-radius: var(--radius-sm);
  color: inherit;
  transition: background var(--dur-fast) var(--ease);
}
.site-row:hover { background: var(--surface); }
.site-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.site-row-name {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.site-row-meta { font-size: 12px; color: var(--text-faint); }
.site-row-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-row-chevron { color: var(--text-faint); font-size: 19px; line-height: 1; }
.site-row:hover .site-row-chevron { color: var(--accent-2); }

/* A pointer to the credential, never the credential itself. */
.site-row-nudge {
  display: block;
  margin: 0 6px 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.7;
}
.site-row-nudge:hover { background: var(--accent-soft); border-color: var(--accent); }

.site-list .provision-panel { margin: 0 6px 12px; }

/* =========================================================================
   Site detail page (User/Sites/Details)
   ========================================================================= */
.panel-back { margin: 0 0 14px; font-size: 13px; }
.panel-back a { color: var(--text-muted); }
.panel-back a:hover { color: var(--text); }

.site-detail-title { font-family: var(--font-mono); overflow-wrap: anywhere; }

.site-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 4px 0 0;
}
.site-detail-facts div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.site-detail-facts dt { font-size: 12px; color: var(--text-muted); }
.site-detail-facts dd { margin: 0; font-size: 14.5px; font-weight: 600; }

.site-detail-warning {
  margin: 14px 0 0;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(224, 133, 133, 0.35);
  background: rgba(224, 133, 133, 0.1);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.85;
}

.site-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 480px) {
  .site-detail-actions .btn { width: 100%; justify-content: center; }
}

/* ---- Credentials panel ----
   The one place in the app that shows a live credential. Every choice here
   is deliberate — see the Razor comment in Details.cshtml. */
.credentials-panel { border-color: var(--accent-border); }
.credentials-intro { margin-bottom: 14px; }

.credentials-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.credentials-row:last-of-type { border-bottom: none; }
.credentials-label { font-size: 12.5px; color: var(--text-muted); flex: 0 0 78px; }
.credentials-value {
  flex: 1 1 150px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
  /* Masked and revealed states are the same box, so revealing doesn't make
     the layout jump under the finger that just tapped it. */
  letter-spacing: 0.08em;
}
.credentials-value.is-revealed { border-color: var(--accent-border); color: var(--accent); }
.credentials-actions { display: flex; gap: 8px; flex-shrink: 0; }
.credentials-actions .btn.is-copied { background: var(--accent-2); color: var(--accent-ink); }

.credentials-reveal-note { margin: 6px 0 0; font-size: 11.5px; color: var(--text-faint); }

.credentials-warning {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(224, 133, 133, 0.35);
  background: rgba(224, 133, 133, 0.08);
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--text-muted);
}
.credentials-warning > strong { display: block; color: var(--danger); margin-bottom: 8px; }
.credentials-warning ul { margin: 0; padding-inline-start: 18px; }
.credentials-warning li { margin-bottom: 5px; }
.credentials-warning li:last-child { margin-bottom: 0; }
.credentials-warning strong { color: var(--text); }

.credentials-dismiss { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.credentials-dismiss button:disabled { opacity: 0.45; cursor: not-allowed; }
.credentials-dismiss-hint { font-size: 11.5px; color: var(--text-faint); }
/* Once the button can actually be pressed, its hint stops being an
   instruction and starts being a consequence. */
.credentials-dismiss-hint.is-armed { color: var(--danger); }

@media (max-width: 480px) {
  .credentials-label { flex: 1 1 100%; }
  .credentials-value { flex: 1 1 100%; }
  .credentials-actions { flex: 1 1 100%; }
  .credentials-actions .btn { flex: 1 1 0; justify-content: center; }
}

/* =========================================================================
   Loading feedback — top progress bar and busy controls
   Behaviour lives in wwwroot/js/loading.js.
   ========================================================================= */

/* A thin bar across the very top of the viewport while a navigation or a
   form post is in flight. Fixed to the viewport rather than placed in the
   document so it survives whatever the page's own layout is doing, and
   sits above every panel, drawer and sheet. */
.page-progress {
  position: fixed;
  top: var(--safe-top);
  inset-inline: 0;
  height: 3px;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.page-progress.is-active { opacity: 1; }

.page-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform-origin: 100% 50%;   /* RTL: grows from the right edge */
  transform: scaleX(0);
}
/* Eases toward "nearly done" and waits there. The real duration is unknown
   — it ends when the server answers — so the honest shape is one that
   approaches the end without ever claiming to reach it, rather than a fake
   percentage or a loop that suggests no progress at all. */
.page-progress.is-active .page-progress-fill {
  animation: page-progress-grow 8s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}
@keyframes page-progress-grow {
  0%   { transform: scaleX(0); }
  40%  { transform: scaleX(0.65); }
  75%  { transform: scaleX(0.86); }
  100% { transform: scaleX(0.96); }
}

/* The control that was clicked. Pointer events are blocked here rather than
   by disabling the button — a button disabled during its own submit drops
   its name and value from the payload (see loading.js). */
.is-busy {
  pointer-events: none;
  position: relative;
}

/* A spinner inside the button, with the label still readable beside it, so
   the button doesn't change width and shift the layout under the finger
   that just pressed it. */
button.is-busy::after,
a.is-busy::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-inline-start: 8px;
  vertical-align: -1px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  opacity: 0.75;
  animation: page-busy-spin 0.7s linear infinite;
}
@keyframes page-busy-spin { to { transform: rotate(360deg); } }

/* Links that are whole cards or rows shouldn't sprout a spinner in the
   corner of themselves — a gentle dim reads better at that size. */
a.is-busy.stat-tile::after,
a.is-busy.site-row::after,
a.is-busy.service-card::after,
a.is-busy.work-card::after,
a.is-busy.idea-card-link::after { content: none; }
a.is-busy.stat-tile,
a.is-busy.site-row,
a.is-busy.service-card,
a.is-busy.work-card,
a.is-busy.idea-card-link { opacity: 0.6; }

form.is-busy { opacity: 0.85; }

/* Full-page block while a navigation or submit is in flight — see the
   comment in loading.js for the double-click race this closes. Sits above
   the notification dropdown, drawers and everything else (z-index above
   .page-progress's 500), and its own background is what actually stops a
   second click from reaching anything underneath. */
.page-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--glass-rgb) / 0.45);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.page-loading-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.page-loading-spinner {
  width: 42px;
  height: 42px;
  color: var(--accent);
  animation: page-loading-spin 0.8s linear infinite;
}
@keyframes page-loading-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .page-progress.is-active .page-progress-fill { animation: none; transform: scaleX(0.9); }
  button.is-busy::after, a.is-busy::after { animation: none; }
  .page-loading-spinner { animation-duration: 1.6s; }
}

/* =========================================================================
   Detail pages — shared facts/body blocks (orders, and anything like them)
   ========================================================================= */
.panel-back-link { display: inline-block; margin-bottom: 14px; }

.detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 4px 0 0;
}
.detail-facts div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-facts dt { font-size: 12px; color: var(--text-muted); }
.detail-facts dd { margin: 0; font-size: 14px; font-weight: 600; min-width: 0; }
/* An email or phone number has no spaces to wrap at, and is the one value
   here that can be longer than its column. */
.detail-wrap { overflow-wrap: anywhere; }

.detail-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.detail-block h4 { margin: 0 0 8px; font-size: 13.5px; color: var(--text-muted); font-weight: 600; }
.detail-body {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  /* Their own writing, read back: the line breaks they typed are part of
     what they wrote. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-footnote {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.9;
}
.detail-footnote a { color: var(--accent-2); }

/* Order rows reuse the site-row shape; only the title differs — an order
   title is prose, not a hostname. */
.order-row-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* ============================= Recipient picker (Admin/Notifications) ============================= */

.recipient-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.recipient-choice-option { position: relative; cursor: pointer; }
.recipient-choice-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.recipient-choice-option span {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 12px; border-radius: 10px;
  color: var(--text-muted); font-size: 13.5px; font-weight: 600; text-align: center;
  transition: background .15s ease, color .15s ease;
}
.recipient-choice-option input:checked + span { background: var(--accent-2-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2-border); }
.recipient-choice-option input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 1px; }

.recipient-picker { margin-top: 10px; }
.recipient-search { position: relative; }
/* In flow (not a floating popover): the panel is a clipped glass card, so an
   absolutely positioned list would be cut off at its edge on small screens. */
.recipient-results {
  margin: 6px 0 0; padding: 6px; list-style: none; max-height: 280px; overflow-y: auto;
  border: 1px solid var(--border-strong); border-radius: 14px;
  background: var(--bg-elevated); box-shadow: var(--shadow-lift);
}
.recipient-option {
  display: flex; flex-direction: column; gap: 1px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
}
.recipient-option:hover, .recipient-option.is-active { background: var(--surface-2); }
.recipient-option-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.recipient-option-sub { font-size: 12px; color: var(--text-muted); direction: ltr; text-align: start; unicode-bidi: plaintext; }

.recipient-selected {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 14px; border: 1px solid var(--accent-2-border); border-radius: 12px;
  background: var(--accent-2-soft);
}
.recipient-selected-name { font-size: 13.5px; font-weight: 600; color: var(--accent-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient-selected-clear {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--surface-2); color: var(--text-muted); cursor: pointer; font-size: 12px;
}
.recipient-selected-clear:hover { color: var(--text); }
.recipient-selected-clear:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.recipient-status-error { color: #e08585; }
.recipient-picker[hidden], .recipient-results[hidden], .recipient-selected[hidden], .recipient-search[hidden] { display: none; }

/* Half-width panels (e.g. Admin/Notifications' history) are too narrow for
   first/last buttons next to the numbers; prev/next + numbers are enough. */
.panel-grid-2 .pager-edge { display: none; }

/* ============================= Admin/ProvisionedSites/Details ============================= */

.psd { display: flex; flex-direction: column; gap: 16px; }
.psd .panel-section { margin-bottom: 0; }
.psd-back { display: inline-block; margin-bottom: 14px; }

.psd-tone-ok { --tone: var(--accent-2); --tone-soft: var(--accent-2-soft); --tone-border: var(--accent-2-border); }
.psd-tone-warn { --tone: var(--accent); --tone-soft: var(--accent-soft); --tone-border: var(--accent-border); }
.psd-tone-danger { --tone: var(--danger); --tone-soft: rgba(224, 133, 133, 0.12); --tone-border: rgba(224, 133, 133, 0.35); }
.psd-tone-info { --tone: #8fb4ff; --tone-soft: rgba(143, 180, 255, 0.1); --tone-border: rgba(143, 180, 255, 0.3); }
.psd-tone-muted { --tone: var(--text-faint); --tone-soft: var(--surface); --tone-border: var(--border-strong); }

.psd-muted { color: var(--text-muted); font-size: 12.5px; line-height: 1.9; margin: 4px 0 0; }
.psd-dim { color: var(--text-faint); }
.psd-neg { color: var(--danger); }
.psd-pos { color: var(--accent-2); }
.psd-footnote { margin: 0; font-size: 12px; line-height: 1.9; color: var(--text-faint); }
.psd-subhead { margin: 20px 0 8px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); }

/* --- hero --- */
.psd-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.psd-hero-main { display: flex; gap: 16px; flex: 1 1 340px; min-width: 0; }
.psd-avatar {
  flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  font-family: var(--font-mono); font-size: 24px; font-weight: 800;
  color: var(--tone); background: var(--tone-soft); border: 1px solid var(--tone-border);
}
.psd-hero-titles { min-width: 0; }
.psd-title { margin: 0; font-family: var(--font-mono); font-size: 22px; line-height: 1.25; word-break: break-all; }
.psd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.psd-url { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-width: 0; }
.psd-url a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-2); font-size: 13.5px; }
.psd-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .psd-hero-actions { width: 100%; }
  .psd-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* --- copy buttons --- */
.psd-copy:not(.btn) {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 5px 11px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  font: inherit; font-size: 12px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.psd-copy svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.psd-copy:not(.btn):hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.psd-copy:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.psd-copy.is-copied:not(.btn) { color: var(--accent-2); border-color: var(--accent-2-border); }
.psd-copy-mini:not(.btn) { padding: 0; width: 26px; height: 26px; justify-content: center; border-radius: 8px; }

/* --- state banner --- */
.psd-notice {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--tone-border); border-radius: var(--radius-lg); background: var(--tone-soft);
}
.psd-notice-icon { flex: none; }
.psd-notice-icon svg { display: block; width: 26px; height: 26px; fill: none; stroke: var(--tone); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.psd-notice-body { flex: 1; min-width: 0; }
.psd-notice-body strong { display: block; font-size: 15px; color: var(--text); }
.psd-notice-body p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.9; color: var(--text-muted); }
.psd-notice-hint { color: var(--text) !important; }
.psd-notice-hint::before { content: "پیشنهاد: "; font-weight: 700; color: var(--tone); }
.psd-agent-message {
  margin-top: 8px !important; padding: 9px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.28);
  color: var(--text) !important; font-family: var(--font-mono); font-size: 12.5px !important; white-space: pre-wrap; word-break: break-word;
}
.psd-notice-action { flex: none; }
@media (max-width: 640px) {
  .psd-notice { flex-wrap: wrap; }
  .psd-notice-action { width: 100%; }
  .psd-notice-action .btn { width: 100%; justify-content: center; }
}

/* --- build progress --- */
.psd-progress-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.psd-progress-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .6s cubic-bezier(.22, .8, .24, 1); }
.psd-progress-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text-muted); }

/* --- stat tiles --- */
.psd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.psd-stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.psd-stat.is-warning { border-color: var(--accent-border); }
.psd-stat.is-warning .psd-stat-value { color: var(--accent); }
.psd-stat-label { font-size: 12px; color: var(--text-muted); }
.psd-stat-value { font-size: 19px; font-weight: 700; line-height: 1.4; color: var(--text); word-break: break-word; }
.psd-stat-sub { font-size: 11.5px; line-height: 1.7; color: var(--text-faint); }
.psd-meter { display: block; height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; }
.psd-meter > span { display: block; height: 100%; background: var(--accent-2); transition: width .5s cubic-bezier(.22, .8, .24, 1); }
@media (max-width: 520px) {
  .psd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psd-stat { padding: 12px 13px; }
  .psd-stat-value { font-size: 16px; }
}

/* --- layout --- */
.psd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.psd-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1100px) { .psd-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.psd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.psd-card-head h3 { margin: 0; font-size: 15px; }

/* --- definition lists --- */
.psd-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.psd-dl > div { min-width: 0; }
.psd-dl dt { margin-bottom: 2px; font-size: 12px; color: var(--text-muted); }
.psd-dl dd { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 13.5px; word-break: break-word; }
.psd-dl-stack { grid-template-columns: 1fr; gap: 0; }
.psd-dl-stack > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.psd-dl-stack > div:last-child { border-bottom: 0; }
.psd-dl-stack dt { flex: none; margin: 0; }
.psd-dl-stack dd { justify-content: flex-end; min-width: 0; text-align: end; }
.psd-trunc { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- timeline --- */
.psd-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.psd-tl { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.psd-tl:last-child { padding-bottom: 0; }
.psd-tl::before { content: ""; position: absolute; inset-inline-start: 6px; top: 20px; bottom: -2px; width: 2px; background: var(--border); }
.psd-tl:last-child::before { display: none; }
.psd-tl-dot { flex: none; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px var(--tone-soft); }
.psd-tl.is-upcoming .psd-tl-dot { background: transparent; border: 2px dashed var(--tone); box-shadow: none; }
.psd-tl-body { min-width: 0; }
.psd-tl-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.psd-tl-rel { font-size: 12px; font-weight: 400; color: var(--text-faint); }
.psd-tl-detail { margin-top: 1px; font-size: 12.5px; line-height: 1.8; color: var(--text-muted); }
.psd-tl-abs { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* --- request / features --- */
.psd-features-head { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.psd-more { margin-top: 10px; }
.psd-more summary { cursor: pointer; font-size: 12.5px; color: var(--accent-2); list-style: none; padding: 4px 0; }
.psd-more summary::-webkit-details-marker { display: none; }
.psd-more summary::before { content: "+ "; }
.psd-more[open] summary::before { content: "− "; }
.psd-more .tag-chip-row { margin-top: 8px; }

/* --- billing --- */
.psd-table { margin-top: 0; }
.psd-wallet { list-style: none; margin: 0; padding: 0; }
.psd-wallet li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.psd-wallet li:last-child { border-bottom: 0; }
.psd-wallet-desc { min-width: 0; }
.psd-wallet-amt { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- management --- */
.psd-plan-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.psd-plan-form .select-field { width: auto; min-width: 120px; }
.psd-danger { margin-top: 22px; padding: 14px 16px; border: 1px solid rgba(224, 133, 133, 0.35); border-radius: 14px; background: rgba(224, 133, 133, 0.06); }
.psd-danger .psd-subhead { margin-top: 0; color: var(--danger); }
.psd-danger form { margin-top: 10px; }
.psd-live { margin: 0; text-align: center; font-size: 11.5px; color: var(--text-faint); }

.psd-charges { list-style: none; margin: 0; padding: 0; }
.psd-charges li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.psd-charges li:last-child { border-bottom: 0; }
.psd-charge-date { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.psd-charge-amt { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
/* Technical values are long identifiers: label above, value below, so they get the full width. */
.psd-dl-tech > div { flex-direction: column; align-items: stretch; gap: 2px; }
.psd-dl-tech dd { justify-content: flex-start; text-align: start; font-size: 12.5px; }
.psd-dl-tech dd.ltr { font-family: var(--font-mono); word-break: break-all; }
.psd-dl-tech dt { font-size: 11.5px; }
@media (min-width: 700px) {
  .psd-dl-tech { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
  /* the id is the longest value; give it a full row so it never wraps */
  .psd-dl-tech > div:first-child { grid-column: 1 / -1; }
}

/* ---- User-panel polish (audit pass): Persian list numbers, full-width contact facts, 44px back/“all” links,
   a file input that matches the form instead of the browser default ---- */
.fa-ol { list-style-type: persian; }
.detail-facts .detail-wide { grid-column: 1 / -1; }
.detail-wide .detail-wrap { overflow-wrap: break-word; word-break: normal; }
.panel-back-link, .panel-back a, .panel-link[data-smart-back], .ud-head > a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }
.auth-form input[type="file"], .ticket-reply input[type="file"] { width: 100%; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text-muted); font: inherit; font-size: 13.5px; }
.auth-form input[type="file"]::file-selector-button { margin-inline-end: 12px; min-height: 36px; padding: 0 16px; border: 1.5px solid var(--accent-2); border-radius: 99px; background: transparent; color: var(--accent-2); font: inherit; font-weight: 700; cursor: pointer; }
.auth-form input[type="file"]::file-selector-button:hover { background: var(--accent-2-soft); }
.billing-chip { min-height: 40px; align-items: center; }

/* ---- Delete-site page ---- */
.sd-danger { border-color: rgba(224, 108, 108, .45); }
.sd-list { margin: 10px 0; padding-inline-start: 20px; display: grid; gap: 8px; line-height: 1.9; }
.sd-hint { color: var(--text-muted); font-size: 13.5px; line-height: 1.9; margin: 8px 0 16px; }
.sd-code { padding: 2px 8px; border-radius: 8px; background: rgb(var(--fg-rgb) / .07); font-family: var(--font-mono); }
.sd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 99px; border: 1.5px solid #e06c6c; background: transparent; color: #f08a8a; font: inherit; font-weight: 700; cursor: pointer; }
.btn-danger:hover { background: rgba(224, 108, 108, .14); }

/* ---- Notifications page: day groups, kind icons, compact on phones ---- */
.nt { display: grid; gap: 14px; max-width: 760px; margin-inline: auto; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nt-head h2 { font-size: 19px; margin: 0; }
.nt-new, .nt-count { font-size: 12.5px; padding: 3px 12px; border-radius: 99px; border: 1px solid var(--border-strong); color: var(--text-muted); }
.nt-new { color: var(--accent-2); border-color: var(--accent-2-border); background: var(--accent-2-soft); font-weight: 700; }
.nt-day { margin: 6px 0 8px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.nt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nt-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none; transition: border-color .2s var(--ease), transform .3s var(--ease), background .2s; }
a.nt-row:hover { border-color: var(--accent-2-border); transform: translateY(-1px); } a.nt-row:active { transform: scale(.992); }
a.nt-row:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.nt-item.is-new .nt-row { border-color: var(--accent-2-border); background: var(--accent-2-soft); }
.nt-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--text-muted); } .nt-ic svg { width: 19px; height: 19px; }
.nt-item[data-kind="billing"] .nt-ic { color: #f2c46d; } .nt-item[data-kind="order"] .nt-ic { color: #8ab4ff; } .nt-item[data-kind="ticket"] .nt-ic { color: #b69cff; } .nt-item[data-kind="site"] .nt-ic { color: var(--accent-2); } .nt-item[data-kind="security"] .nt-ic { color: #7ee0a0; }
.nt-body { display: grid; gap: 2px; min-width: 0; } .nt-body strong { font-size: 14.5px; line-height: 1.6; } .nt-text { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.nt-meta { display: flex; gap: 6px; font-size: 11.5px; color: var(--text-faint); } .nt-meta time { font-variant-numeric: tabular-nums; }
.nt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; margin-inline-start: 7px; vertical-align: middle; }
.nt-go { display: inline-flex; align-items: center; gap: 4px; align-self: center; color: var(--accent-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.nt-empty { display: grid; justify-items: center; gap: 6px; padding: 48px 12px; text-align: center; color: var(--text-muted); } .nt-empty small { font-size: 12.5px; max-width: 32ch; line-height: 1.8; }
/* Phones: tighter rows — smaller icon and padding, 2-line body, the action collapses to a chevron. */
@media (max-width: 640px) {
  .nt-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .nt-head { justify-content: flex-start; }
  .nt { gap: 10px; } .nt-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; border-radius: 16px; }
  .nt-ic { width: 32px; height: 32px; border-radius: 10px; } .nt-ic svg { width: 17px; height: 17px; }
  .nt-body strong { font-size: 13.5px; line-height: 1.5; } .nt-text { font-size: 12.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .nt-go-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nt-go { align-self: center; min-width: 24px; justify-content: center; } .nt-list { gap: 6px; } .nt-day { margin: 2px 0 6px; }
}
@media (prefers-reduced-motion: reduce) { .nt-row { transition: none; } }

/* Two settings-style cards side by side when there is room (instead of one narrow column hugging the rail). */
.panel-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1000px) { .panel-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Attention: colour = urgency (red now · amber soon · blue FYI · green new message) ===== */
.notif-badge { background: var(--accent-2); color: #0b1320; }
.notif-badge[data-level="danger"] { background: #ff6b6b; color: #2a0a0a; }
.notif-badge[data-level="warn"] { background: #f2c46d; color: #2a1e05; }
.notif-badge[data-level="info"] { background: #8ab4ff; color: #0a1a3a; }
.notif-badge[data-level="danger"]:not([hidden]) { animation: notif-pulse 2.4s ease-in-out infinite; }
@keyframes notif-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,.45); } 50% { box-shadow: 0 0 0 6px rgba(255,107,107,0); } }
.notif-attn { border-inline-start: 3px solid var(--lv, var(--border-strong)); border-radius: 6px 10px 10px 6px; margin-bottom: 4px; background: color-mix(in srgb, var(--lv, transparent) 8%, transparent); }
.notif-attn[data-level="danger"], .at-item[data-level="danger"], .at-legend [data-level="danger"] { --lv: #ff6b6b; }
.notif-attn[data-level="warn"], .at-item[data-level="warn"], .at-legend [data-level="warn"] { --lv: #f2c46d; }
.notif-attn[data-level="info"], .at-item[data-level="info"], .at-legend [data-level="info"] { --lv: #8ab4ff; }
.notif-attn span { color: var(--lv); font-family: inherit; font-size: 11.5px; font-weight: 600; }
.at { display: grid; gap: 10px; }
.at-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .at-head h3 { margin: 0; font-size: 1rem; }
.at-legend { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: .74rem; color: var(--text-muted); } .at-legend li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lv); margin-inline-end: 5px; }
.at-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.at-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--lv) 40%, transparent); background: color-mix(in srgb, var(--lv) 9%, var(--surface)); }
.at-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--lv); background: color-mix(in srgb, var(--lv) 16%, transparent); } .at-ic svg { width: 20px; height: 20px; }
.at-body { min-width: 0; } .at-body b { font-size: .95rem; } .at-body p { margin: 2px 0 0; color: var(--text-muted); font-size: .84rem; line-height: 1.7; }
.at-cta { grid-column: 1 / -1; min-height: 44px; justify-content: center; }
@media (min-width: 640px) { .at-item { grid-template-columns: auto minmax(0, 1fr) auto; } .at-cta { grid-column: auto; } }

/* The dropdown can open over busy content; a solid-ish surface keeps its text readable. */
.notif-dropdown { background: linear-gradient(180deg, rgb(var(--glass-rgb) / .98), rgb(var(--glass-rgb) / .96)); border: 1px solid var(--border-strong, var(--border)); border-radius: 22px; animation: bp-in .3s cubic-bezier(.22, 1, .36, 1) both; }
@media (prefers-reduced-motion: reduce) { .notif-dropdown { animation: none; } }

/* Configurator "you already have a site" (lab model 4): banner with one action, next steps, collapsed one-site rule */
.cfgx-banner { display: grid; gap: 10px 14px; align-items: center; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--border-strong); background: var(--surface); margin-block: 12px; }
.cfgx-banner b { font-size: 1rem; } .cfgx-banner p { margin: 2px 0 0; color: var(--text-muted); font-size: .88rem; line-height: 1.8; }
.cfgx-banner .btn { min-height: 48px; justify-content: center; }
.cfgx-ok { border-color: var(--accent-2-border); background: var(--accent-2-soft); } .cfgx-bad { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.08); } .cfgx-warn { border-color: rgba(242,196,109,.5); background: rgba(242,196,109,.08); }
@media (min-width: 560px) { .cfgx-banner { grid-template-columns: minmax(0, 1fr) auto; } }
.cfgx-next { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.cfgx-next a { display: grid; gap: 2px; padding: 12px 16px; min-height: 56px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .3s, transform .3s; }
.cfgx-next a:hover { border-color: var(--accent-2-border); transform: translateY(-2px); } .cfgx-next span { color: var(--text-muted); font-size: .84rem; }
.cfgx-rule { margin-top: 14px; border-radius: 16px; border: 1px dashed var(--border-strong); padding: 0 14px; }
.cfgx-rule summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; color: var(--text-muted); list-style: none; } .cfgx-rule summary::-webkit-details-marker { display: none; }
.cfgx-rule[open] { padding-bottom: 14px; } .cfgx-rule p { margin: 0 0 10px; color: var(--text-muted); line-height: 1.85; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .cfgx-next a { transition: none; } }

/* Admin: price quote cell on the orders table */
.oq-cell { min-width: 220px; } .oq-cur { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; } .oq-cur b { font-family: var(--font-mono); }
.oq-form summary { cursor: pointer; color: var(--accent-2); min-height: 36px; display: flex; align-items: center; }
.oq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 0; } .oq-grid label { display: grid; gap: 4px; font-size: .78rem; color: var(--text-muted); } .oq-wide { grid-column: 1 / -1; } .oq-grid .btn { grid-column: 1 / -1; }

/* Attention: compact + folded; notifications: delete, repeat count, older fold, clear-read */
.at-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-inline-start: 6px; border-radius: 99px; background: var(--surface-2, rgb(var(--fg-rgb) / .1)); font-size: .74rem; font-weight: 700; vertical-align: middle; }
.at-more { margin-top: 8px; } .at-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--text-muted); font-size: .86rem; list-style: none; } .at-more summary::-webkit-details-marker { display: none; } .at-more summary::after { content: " ›"; margin-inline-start: 4px; } .at-more[open] summary::after { content: " ‹"; }
@media (max-width: 639px) {
  .at-item { padding: 10px 12px; gap: 2px 10px; } .at-ic { width: 32px; height: 32px; border-radius: 10px; } .at-ic svg { width: 17px; height: 17px; }
  .at-body b { font-size: .9rem; } .at-body p { font-size: .8rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .at-cta { min-height: 40px; font-size: .84rem; }
}
.nt-item { position: relative; }
.nt-del-form { position: absolute; top: 4px; inset-inline-end: 4px; margin: 0; }
.nt-del { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-faint, var(--text-muted)); cursor: pointer; opacity: .55; transition: opacity .2s, background .2s, color .2s; }
.nt-del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nt-del:hover, .nt-del:focus-visible { opacity: 1; background: rgba(255,107,107,.12); color: #ff8a8a; }
.nt-row { padding-inline-end: 38px; }
.nt-x { display: inline-block; margin-inline-start: 8px; padding: 0 8px; border-radius: 99px; background: var(--surface-2, rgb(var(--fg-rgb) / .1)); color: var(--text-muted); font-size: .72rem; font-weight: 700; }
.nt-clear { margin-inline-start: auto; } .nt-clear-btn { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border-strong, var(--border)); background: transparent; color: var(--text-muted); font: inherit; font-size: .8rem; cursor: pointer; } .nt-clear-btn:hover { color: var(--text); border-color: var(--accent-2-border); }
.nt-older { margin-top: 6px; } .nt-older summary { min-height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--accent-2); font-size: .88rem; list-style: none; border-radius: 14px; border: 1px dashed var(--border-strong, var(--border)); } .nt-older summary::-webkit-details-marker { display: none; } .nt-older[open] summary { margin-bottom: 8px; }
@media (max-width: 640px) { .nt-head { flex-wrap: wrap; } .nt-clear-btn { font-size: .76rem; padding: 0 10px; } }

/* Sign-in / sign-up / password screens (the chrome-free _AuthLayout): one centred column that fits the screen without
   scrolling — the back button floats in the corner instead of taking a row, the logo is compact, and on short screens
   the subtitle gives way. */
.auth-body .auth-page-main { min-height: 100vh; min-height: 100dvh; justify-content: center; padding-block: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-bottom)); }
.auth-body .auth-topbar { position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline-start: 14px; padding: 0; z-index: 2; }
.auth-body .auth-shell { min-height: 0; padding: 0 20px; align-items: center; }
.auth-body .auth-logo-link { margin: 0 0 clamp(6px, 1.6vh, 14px); }
.auth-body .auth-logo-img { width: clamp(40px, 7vh, 56px); height: clamp(40px, 7vh, 56px); }
.auth-body .auth-card { padding: 0; }
.auth-body .auth-card h1 { font-size: clamp(1.1rem, 4.4vw, 1.35rem); margin-bottom: 4px; }
.auth-body .auth-sub { margin-bottom: clamp(10px, 2vh, 20px); }
.auth-body .auth-form { gap: clamp(8px, 1.5vh, 14px); }
.auth-body .auth-switch { margin-top: clamp(8px, 1.6vh, 14px); }
@media (max-height: 640px) { .auth-body .auth-sub { display: none; } .auth-body .auth-form .field input { min-height: 42px; } }
/* …and no bottom tabbar here, so none of the space the site body reserves for it. */
body.site-body.auth-body { padding: 0; }

/* Admin lists: filter bar + "table becomes cards" on phones. Rows are real <tr>s with data-label cells, so the
   markup stays a normal table on desktop and for assistive tech. */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-search { flex: 1 1 260px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.filter-search input { flex: 1; min-width: 0; min-height: 44px; }
.filter-status { flex: 0 1 200px; }
.filter-status select { width: 100%; min-height: 44px; }
.filter-clear { white-space: nowrap; }
.list-count { margin: 0 0 10px; color: var(--text-muted); font-size: 13px; }
@media (max-width: 720px) {
  table.tbl-cards, table.tbl-cards tbody, table.tbl-cards tr, table.tbl-cards td { display: block; width: 100%; }
  table.tbl-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.tbl-cards tr { margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 18px; background: rgb(var(--fg-rgb) / .03); }
  table.tbl-cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border: 0; text-align: end; min-width: 0; }
  table.tbl-cards td::before { content: attr(data-label); flex: none; color: var(--text-muted); font-size: 12.5px; text-align: start; }
  table.tbl-cards td[data-label=""]::before, table.tbl-cards td:not([data-label])::before { content: none; }
  table.tbl-cards td > * { max-width: 100%; }
  table.tbl-cards td.tbl-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 4px; }
  table.tbl-cards td.tbl-actions .btn { min-height: 44px; }
  table.tbl-cards td.tbl-title { display: block; text-align: start; font-size: 15px; }
  table.tbl-cards td.tbl-title::before { content: none; }
  table.tbl-cards form.status-form, table.tbl-cards .select-field { max-width: 100%; }
}
@media (max-width: 720px) { table.tbl-cards td.tbl-actions + td.tbl-actions { border-top: 0; margin-top: 0; padding-top: 0; } }

/* ---- password fields (js/pw-assist.js): eye toggle, rule checklist, strength meter ---- */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-left: 46px; padding-right: 46px; }   /* the eye sits on one side whatever the field's direction */
.pw-eye { position: absolute; inset-block: 0; inset-inline-end: 4px; width: 42px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-muted, #93a0b8); cursor: pointer; border-radius: 10px; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--text, #eef1f8); }
.pw-eye svg { width: 20px; height: 20px; }
.pw-rules:not(.pw-open) { display: none; }
.pw-rules { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: .82rem; color: var(--text-muted, #93a0b8); }
.pw-rules li { display: flex; align-items: center; gap: 8px; transition: color .2s; }
.pw-rules li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong, rgb(var(--fg-rgb) / .28)); transition: background .2s, border-color .2s; }
.pw-rules li[data-ok="true"] { color: #8bc74b; }
.pw-rules li[data-ok="true"]::before { background: #8bc74b; border-color: #8bc74b; box-shadow: inset 0 0 0 3px var(--surface-solid, #0d1424); }
.pw-meter { height: 4px; border-radius: 4px; background: var(--border, rgb(var(--fg-rgb) / .14)); overflow: hidden; margin-top: 8px; }
.pw-meter i { display: block; height: 100%; width: 0; background: #e08585; transition: width .25s, background .25s; }
.pw-meter[data-level="0"] { display: none; }
.pw-meter[data-level="1"] i { width: 33%; }
.pw-meter[data-level="2"] i { width: 66%; background: #dcb679; }
.pw-meter[data-level="3"] i { width: 100%; background: #8bc74b; }
@media (max-width: 420px) { .pw-rules { grid-template-columns: 1fr; } }

/* Chat: what the conversation is about and how fast the team usually answers sit in the header, under the title. */
.chat-topbar-text { display: grid; gap: 2px; min-width: 0; }
.chat-sub { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.chat-sub b { color: var(--text); font-weight: 700; }
.chat-sub-reply b { color: var(--accent); }
.chat-sub-topic::before, .chat-sub-reply::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; background: var(--accent-2); }
.chat-sub-reply::before { background: var(--accent); }
.chat-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 8px; }
.chat-shortcut { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent-2); text-decoration: none; }
.chat-shortcut:hover { filter: brightness(1.08); }

/* ── Chat: conversations menu, visitor contact card ── */
.chat-topbar { position: relative; z-index: 40; }
.chat-topbar-text { flex: 1; }
.chat-menu { position: fixed; z-index: 50; top: calc(14px + var(--safe-top)); inset-inline-end: var(--chat-gutter); }
.chat-menu-btn { position: relative; list-style: none; cursor: pointer; }
.chat-menu-btn::-webkit-details-marker { display: none; }
.chat-menu-dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); border: 2px solid #0b1320; }
.chat-menu-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: min(380px, calc(100vw - 20px)); max-height: min(70vh, 520px); overflow: auto; padding: 14px; border-radius: 20px; border: 1px solid var(--border-strong, var(--border)); background: rgb(var(--glass-rgb) / .97); box-shadow: 0 24px 60px -20px rgba(0,0,0,.8); }
.chat-menu-panel h2 { margin: 4px 4px 8px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.chat-menu-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.chat-menu-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 12px; border-radius: 14px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.chat-menu-list a:hover, .chat-menu-list a:focus-visible { background: var(--surface-2); }
.chat-menu-list a.on { background: var(--accent-2-soft); border-color: var(--accent-2-border); }
.chat-menu-list b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-menu-list em { font-style: normal; flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; background: var(--accent-2); color: #0b1320; font-weight: 800; }
.chat-menu-new a { color: var(--accent); font-size: 14px; }
.chat-contact { margin: 0 var(--chat-gutter) 6px; padding: 0 14px; border-radius: 16px; border: 1px dashed var(--accent-border); background: var(--accent-soft); font-size: 13.5px; }
.chat-contact summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none; color: var(--accent); }
.chat-contact summary::-webkit-details-marker { display: none; }
.chat-contact-body { display: grid; gap: 8px; padding-bottom: 12px; } .chat-contact-body p { margin: 0; color: var(--text-muted); line-height: 1.8; }
.chat-contact-form { display: flex; gap: 8px; } .chat-contact-form[hidden] { display: none; }
.chat-contact-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border-strong, var(--border)); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.chat-contact-form .otp-input { min-height: 44px; font-size: 20px; }
.chat-contact-form .btn { min-height: 44px; flex: none; }
.chat-contact-msg.is-bad { color: #ff9b9b; }
.chat-contact-done { margin: 0 var(--chat-gutter) 6px; padding: 8px 14px; font-size: 12.5px; color: var(--text-muted); text-align: center; }
.order-chat-btn { margin: 0 0 14px; min-height: 46px; }

/* ── Order: one small card, nothing else ── */
.oc { max-width: 520px; margin-inline: auto; padding: 20px 16px 28px; display: grid; gap: 10px; }
@media (min-width: 900px) { .oc { padding-top: 112px; padding-bottom: 56px; } }
.oc-card { display: grid; gap: 12px; padding: 20px; border-radius: 24px; border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), rgb(var(--fg-rgb) / .015)); }
.oc-h { margin: 0; font-size: 20px; line-height: 1.5; }
.oc-sub { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.8; overflow-wrap: anywhere; }
.oc-err { margin: 0; font-size: 13.5px; color: #ff9b9b; line-height: 1.8; } .oc-err:empty { display: none; } .oc-err ul { margin: 0; padding-inline-start: 18px; }
.oc-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oc-chip { position: relative; display: block; cursor: pointer; }
.oc-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.oc-chip span { display: grid; place-items: center; min-height: 44px; padding: 0 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; text-align: center; transition: background .2s, border-color .2s, color .2s; }
.oc-chip input:checked + span { background: var(--accent-2-soft); border-color: var(--accent-2); color: var(--accent-2); font-weight: 700; }
.oc-chip input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.oc-card textarea, .oc-card input:not([type=radio]):not([type=hidden]):not(.otp-input) { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-strong, var(--border)); background: rgba(8,13,22,.55); color: var(--text); font: inherit; font-size: 16px; }
.oc-card textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
.oc-card textarea:focus, .oc-card input:focus { outline: 0; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-soft); }
.oc-row { display: grid; grid-template-columns: 1fr; gap: 10px; } @media (min-width: 560px) { .oc-row { grid-template-columns: 1.3fr 1fr; } }
.oc-go { min-height: 50px; width: 100%; }
.oc-aux { display: flex; justify-content: space-between; gap: 12px; padding-inline: 6px; }
.oc-link { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13.5px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; } .oc-link:disabled { opacity: .55; cursor: default; }
.oc .otp-input { width: 100%; }

/* ── Chat: a calm, minimal page; a round launcher + panel on a wide screen ── */
.chat-topbar { background: #0e1624; border-bottom: 1px solid var(--border); padding-block: 10px; gap: 10px; backdrop-filter: none; -webkit-backdrop-filter: none; -webkit-mask-image: none; }
.chat-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), #3d7a2c); color: #0b1320; font-weight: 800; font-size: 17px; }
.chat-topbar h1 { font-size: 15px; font-weight: 700; }
.chat-sub-online::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: var(--accent-2); }
.chat-menu { top: calc(11px + var(--safe-top)); }
.chat-faq-collapse { padding: 0 var(--chat-gutter) 8px; flex-shrink: 0; } .chat-faq-collapse:not(.open) { display: none; }
.chat-faq-collapse .chat-faq { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; max-width: none; scrollbar-width: none; padding-bottom: 2px; }
.chat-faq-collapse .chat-faq::-webkit-scrollbar { display: none; }
.chat-faq-collapse .chat-faq-chip { flex: none; white-space: nowrap; }
.chat-embed { background: #0b1320; } .chat-embed .chat-topbar { padding-top: 10px; } .chat-embed .chat-menu { top: 11px; inset-inline-end: 62px; }
.chat-close-btn { margin-inline-start: auto; flex: none; }
.rvw-btn { display: none; position: fixed; z-index: 70; inset-inline-end: 24px; bottom: 24px; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; place-items: center; background: linear-gradient(135deg, var(--accent-2), #5ea03a); color: #0b1320; box-shadow: 0 14px 34px -10px rgba(0,0,0,.7), 0 0 0 1px rgb(var(--fg-rgb) / .12) inset; transition: transform .2s; }
.rvw-btn:hover { transform: scale(1.06); }
.rvw-btn svg { width: 26px; height: 26px; grid-area: 1 / 1; transition: opacity .2s, transform .25s; }
.rvw-btn .rvw-ic-x { opacity: 0; transform: rotate(-60deg); } .rvw-btn.open .rvw-ic-x { opacity: 1; transform: none; } .rvw-btn.open .rvw-ic-chat { opacity: 0; transform: rotate(60deg); }
.rvw-panel { display: none; position: fixed; z-index: 70; inset-inline-end: 24px; bottom: 96px; width: 380px; height: min(620px, calc(100vh - 124px)); border-radius: 22px; overflow: hidden; border: 1px solid var(--border-strong, rgb(var(--fg-rgb) / .2)); background: #0b1320; box-shadow: 0 30px 80px -20px rgba(0,0,0,.85); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .2s, transform .25s cubic-bezier(.3,.9,.3,1); }
.rvw-panel.on { opacity: 1; transform: none; }
.rvw-panel iframe { width: 100%; height: 100%; border: 0; display: block; background: #0b1320; }
@media (min-width: 900px) { .rvw-btn { display: grid; } .rvw-panel { display: block; } .rvw-panel[hidden] { display: none; } }
@media (prefers-reduced-motion: reduce) { .rvw-btn, .rvw-panel, .rvw-btn svg { transition: none; } }

/* chat: nothing may be wider than the screen (the contact card and the composer overflowed on 320–360px phones) */
.chat-input-row input[type="text"] { min-width: 0; }
.chat-contact { box-sizing: border-box; min-width: 0; max-height: 52svh; overflow-y: auto; }
.chat-contact-body { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.chat-contact-body p { font-size: 12.5px; line-height: 1.7; overflow-wrap: anywhere; }
.chat-contact-form { flex-wrap: wrap; min-width: 0; }
.chat-contact-form input { flex: 1 1 140px; }
.chat-contact-form .btn { flex: 1 1 auto; }
/* the floating panel stays below the site's own floating header, whatever the window height */
.rvw-panel { height: min(620px, calc(100vh - 96px - 96px)); height: min(620px, calc(100dvh - 96px - 96px)); min-height: 320px; }

/* The phone bottom bar on public pages is the user panel's liquid pill, for visitors, members and the admin alike. */
.pub-bottomnav { z-index: 90; max-width: 420px; }
.pub-bottomnav a { text-decoration: none; }
.pub-bottomnav .nav-circle .notif-badge { position: absolute; top: -4px; inset-inline-end: -6px; }
@media (min-width: 900px) { .pub-bottomnav { display: none; } }
@media (max-width: 899px) { body.site-body { padding-bottom: calc(100px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .pub-bottomnav .pnav-blob { transition: none; } }

/* Page changes keep the bottom bar in place: with cross-document view transitions the pill stays put, its tabs cross-fade and the
   highlight glides from the old tab to the new one, even though every tap loads a new page (user panel and public site alike).
   Browsers without support just load the page as before (site.js then fakes the glide). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .panel-bottomnav { view-transition-name: pnav; }
  .panel-bottomnav .pnav-blob { view-transition-name: pnav-blob; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
  ::view-transition-group(pnav) { animation-duration: .01s; }
  ::view-transition-old(pnav), ::view-transition-new(pnav) { animation-duration: .3s; }
  ::view-transition-group(pnav-blob) { animation-duration: .6s; animation-timing-function: cubic-bezier(.34, 1.3, .5, 1); }
  ::view-transition-old(pnav-blob), ::view-transition-new(pnav-blob) { height: 100%; animation: none; mix-blend-mode: normal; }
  ::view-transition-old(pnav-blob) { opacity: 0; }
}

/* The installed app draws under the status bar: the chat header keeps its own clearance (the compact header rule above
   used to reset it, so the header sat under the system bar and could not be tapped). */

/* While a page is loading, the bottom bar rises above the dimmed page and shows it: the tapped tab swaps its icon for a ring,
   the highlight breathes and a light sweeps along the pill. Taps are still ignored by the page lock. */
html.is-page-loading .panel-bottomnav { z-index: 2001; }
html.is-page-loading .panel-bottomnav .pnav-blob { animation: pnav-breathe 1.1s ease-in-out infinite; }
html.is-page-loading .panel-bottomnav::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgb(var(--fg-rgb) / .18) 50%, transparent 70%); background-size: 250% 100%; animation: pnav-sweep 1.2s linear infinite; }
html.is-page-loading .panel-bottomnav a:not(.is-busy):not(.active) { opacity: .55; transition: opacity .3s; }
.panel-bottomnav a.is-busy::after { display: none; }
.panel-bottomnav a.is-busy { opacity: 1; color: var(--accent-2); }
.panel-bottomnav a.is-busy .nav-circle svg { opacity: 0; transition: opacity .2s; }
.panel-bottomnav a.is-busy .nav-circle::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; animation: page-busy-spin .7s linear infinite; }
@keyframes pnav-breathe { 50% { transform: scale(1.06); box-shadow: 0 8px 28px -6px rgba(139, 199, 75, .8); } }
@keyframes pnav-sweep { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { html.is-page-loading .panel-bottomnav .pnav-blob, html.is-page-loading .panel-bottomnav::after, .panel-bottomnav a.is-busy .nav-circle::before { animation: none; } }

/* Sign in with Bale: one button, then three steps and a calm waiting state. */
.bale { margin-top: 14px; display: grid; gap: 10px; }
.bale-or { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 12.5px; }
.bale-or::before, .bale-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.bale-btn { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 16px; border: 1px solid rgba(46, 204, 154, .5); background: rgba(46, 204, 154, .1); color: #7be7c0; font: inherit; font-weight: 700; cursor: pointer; transition: transform .35s cubic-bezier(.34, 1.4, .5, 1), background .2s; }
.bale-btn:hover { background: rgba(46, 204, 154, .18); transform: translateY(-2px); } .bale-btn:disabled { opacity: .6; cursor: wait; }
.bale-btn svg { width: 24px; height: 24px; }
.bale-hint { margin: 0; text-align: center; color: var(--text-muted); font-size: 12.5px; }
.bale-panel { padding: 14px; border-radius: 18px; border: 1px solid var(--border-strong); background: rgb(var(--fg-rgb) / .04); display: grid; gap: 12px; animation: bale-in .5s cubic-bezier(.34, 1.4, .5, 1); }
@keyframes bale-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.bale-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bale-steps li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: 14px; color: var(--text-muted); border: 1px solid transparent; transition: background .3s, color .3s, border-color .3s; }
.bale-steps li > b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2, rgb(var(--fg-rgb) / .08)); font-size: 13px; transition: background .3s, color .3s; }
.bale-steps li > div { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bale-steps li.on { color: var(--text); background: rgba(46, 204, 154, .1); border-color: rgba(46, 204, 154, .4); }
.bale-steps li.on > b { background: #2ecc9a; color: #04201a; animation: bale-pulse 1.8s ease-in-out infinite; }
.bale-steps li.done { color: var(--text-faint); } .bale-steps li.done > b { background: rgba(46, 204, 154, .25); color: #7be7c0; font-size: 0; } .bale-steps li.done > b::after { content: "✓"; font-size: 14px; }
@keyframes bale-pulse { 50% { box-shadow: 0 0 0 7px rgba(46, 204, 154, 0); } 0% { box-shadow: 0 0 0 0 rgba(46, 204, 154, .55); } }
.bale-status { margin: 0; text-align: center; font-size: 13.5px; color: var(--text-muted); } .bale-status[data-tone="ok"] { color: #7be7c0; } .bale-status[data-tone="bad"] { color: #ff9b9b; }
.bale-time { height: 4px; border-radius: 99px; background: rgb(var(--fg-rgb) / .08); overflow: hidden; } .bale-time i { display: block; height: 100%; transform-origin: right; background: #2ecc9a; }
@keyframes bale-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.bale-actions { display: flex; gap: 8px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .bale-panel, .bale-steps li.on > b { animation: none; } }
.bale [hidden] { display: none !important; }
@media (max-height: 700px) { .bale { margin-top: 6px; gap: 6px; } .bale-hint { display: none; } .bale-btn { min-height: 46px; } .bale-or { font-size: 11.5px; } }

/* ====================================================================================================
   Chat v3 — the site's glass: gradient scene, floating header pill, glass bubbles, floating composer pill.
   Same markup as before; the admin's chat page (same layout) gets the same look.
   ==================================================================================================== */
.chat-page-body { --spring: cubic-bezier(.34, 1.4, .5, 1); --soft: cubic-bezier(.22, 1, .36, 1);
  background: radial-gradient(120% 80% at 80% 0%, var(--scene-a), transparent 55%), radial-gradient(100% 70% at 0% 100%, var(--scene-b), transparent 55%), var(--scene-base); background-attachment: fixed; }
.chat-embed { background: radial-gradient(120% 80% at 80% 0%, var(--scene-a), transparent 55%), radial-gradient(100% 70% at 0% 100%, var(--scene-b), transparent 55%), var(--scene-base); }
.chat-page-body .chat-topbar { margin: calc(10px + var(--safe-top)) 10px 0; padding: 7px 12px 7px 8px; padding-inline-end: 64px; border: 1px solid rgb(var(--fg-rgb) / .16); border-radius: 999px; background: rgb(var(--glass-rgb) / .5); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 14px 34px -18px #000, inset 0 1px 0 rgb(var(--fg-rgb) / .12); animation: chat-top-in .6s var(--spring) both; }
@keyframes chat-top-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@media (min-width: 900px) { .chat-page-body:not(.chat-embed) .chat-topbar { max-width: 760px; width: calc(100% - 20px); margin-inline: auto; } }
.chat-page-body .chat-topbar h1 { font-size: 15px; }
.chat-page-body .chat-avatar { box-shadow: 0 0 0 0 rgba(139, 199, 75, .5); animation: chat-av 3s ease-in-out infinite; }
@keyframes chat-av { 50% { box-shadow: 0 0 0 7px rgba(139, 199, 75, 0); } }
.chat-page-body .chat-menu { top: calc(10px + var(--safe-top) + 8px); inset-inline-end: 18px; }
@media (min-width: 900px) { .chat-page-body:not(.chat-embed) .chat-menu { inset-inline-end: max(18px, calc((100% - 760px) / 2 + 8px)); } }
.chat-embed .chat-menu { top: 18px; inset-inline-end: 18px; }
.chat-page-body .chat-menu-btn { background: rgb(var(--fg-rgb) / .06); transition: transform .35s var(--spring), background .2s; } .chat-page-body .chat-menu-btn:hover { transform: scale(1.08); } .chat-page-body .chat-menu-btn:active { transform: scale(.9); }
.chat-page-body .chat-menu[open] .chat-menu-btn { background: var(--accent-2-soft); color: var(--accent-2); }
.chat-page-body .chat-menu-panel { position: fixed; inset-inline: 10px; top: calc(10px + var(--safe-top) + 62px); width: auto; max-width: 380px; margin-inline-start: auto; max-height: min(72dvh, calc(100dvh - 160px)); border-radius: 22px; background: rgb(var(--glass-rgb) / .92); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); border-color: rgb(var(--fg-rgb) / .16); transform-origin: top left; animation: chat-pop .4s var(--spring); }
[dir="rtl"] .chat-page-body .chat-menu-panel { margin-inline-start: auto; margin-inline-end: 0; transform-origin: top right; }
@media (min-width: 900px) { .chat-page-body:not(.chat-embed) .chat-menu-panel { inset-inline-end: max(10px, calc((100% - 760px) / 2)); inset-inline-start: auto; } }
.chat-embed .chat-menu-panel { top: 70px; }
@keyframes chat-pop { from { opacity: 0; transform: scale(.9) translateY(-8px); } }
.chat-menu-list a { transition: background .2s, transform .3s var(--spring); } .chat-menu-list a:hover { transform: translateX(-3px); }

.chat-page-body .chat-messages { padding-top: 16px; scroll-behavior: smooth; scrollbar-width: none; } .chat-page-body .chat-messages::-webkit-scrollbar { display: none; }
.chat-page-body .chat-bubble { border-radius: 20px; padding: 9px 14px; line-height: 1.85; box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .9); }
.chat-page-body .chat-bubble-row.theirs .chat-bubble { background: rgb(var(--fg-rgb) / .1); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border: 1px solid rgb(var(--fg-rgb) / .16); border-end-start-radius: 6px; }
.chat-page-body .chat-bubble-row.mine .chat-bubble { border-end-end-radius: 6px; }
.chat-bubble-enter { animation: chat-bubble-spring .55s var(--spring); transform-origin: bottom; }
.chat-bubble-row.mine.chat-bubble-enter { transform-origin: bottom right; } .chat-bubble-row.theirs.chat-bubble-enter { transform-origin: bottom left; }
@keyframes chat-bubble-spring { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
.chat-bubble-row.leaving { opacity: 0; transition: opacity .2s; }

/* the composer: one floating glass pill */
.chat-footer::before { background: linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--scene-base) 78%, transparent) 40px, color-mix(in srgb, var(--scene-base) 90%, transparent)); }
.chat-page-body .chat-input-row { margin-inline: 10px; margin-bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; gap: 6px; border: 1px solid rgb(var(--fg-rgb) / .16); border-radius: 999px; background: rgb(var(--glass-rgb) / .55); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 16px 36px -18px #000, inset 0 1px 0 rgb(var(--fg-rgb) / .12); transition: box-shadow .3s, border-color .3s; animation: chat-foot-in .6s .1s var(--spring) both; }
.chat-page-body .chat-input-row:focus-within { border-color: var(--accent-2-border); box-shadow: 0 16px 36px -18px #000, 0 0 0 3px var(--accent-2-soft); }
@keyframes chat-foot-in { from { opacity: 0; transform: translateY(20px); } }
@media (min-width: 900px) { .chat-page-body:not(.chat-embed) .chat-input-row, .chat-page-body:not(.chat-embed) .chat-pending { max-width: 740px; margin-inline: auto; width: calc(100% - 20px); } }
.chat-page-body .chat-input-row { padding-block: 6px; }
.chat-page-body .chat-input-row input[type="text"] { border: 0; background: transparent; padding: 0 10px; height: 44px; font-size: 15px; }
.chat-page-body .chat-input-row input[type="text"]:focus { box-shadow: none; }
.chat-page-body .chat-attach-btn, .chat-page-body .chat-send-btn { width: 44px; height: 44px; transition: transform .4s var(--spring), background .2s, color .2s; }
.chat-page-body .chat-attach-btn { background: rgb(var(--fg-rgb) / .06); border-color: transparent; }
.chat-attach-btn.has-file { background: var(--accent-2-soft) !important; color: var(--accent-2); animation: chat-av 1.6s ease-in-out infinite; }
.chat-page-body .chat-send-btn:hover { transform: scale(1.1) rotate(-8deg); }

/* picked file, before sending */
.chat-pending { margin: 0 10px 8px; animation: chat-pop .4s var(--spring); } .chat-pending[hidden] { display: none; }
.chat-pending-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; border: 1px solid rgb(var(--fg-rgb) / .16); background: rgb(var(--glass-rgb) / .6); backdrop-filter: blur(20px); }
.chat-pending-chip img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; }
.chat-pending-text { flex: 1; min-width: 0; display: grid; } .chat-pending-text b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chat-pending-text small { color: var(--text-muted); font-size: 11.5px; }
.chat-pending-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(var(--fg-rgb) / .06); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform .35s var(--spring); } .chat-pending-x:hover { transform: rotate(90deg); } .chat-pending-x svg { width: 18px; height: 18px; }

/* attachments in bubbles */
.chat-attachment-image { position: relative; display: block; max-width: min(240px, 100%); margin-bottom: 6px; border-radius: 14px; overflow: hidden; background: rgb(var(--fg-rgb) / .08); min-height: 60px; cursor: zoom-in; }
.chat-attachment-image.loading::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgb(var(--fg-rgb) / .18) 50%, transparent 80%); background-size: 200% 100%; animation: chat-shimmer 1.2s linear infinite; }
@keyframes chat-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.chat-attachment-image img { width: 100%; max-height: 300px; object-fit: cover; opacity: 1; transition: opacity .4s, transform .5s var(--soft); } .chat-attachment-image.loading img { opacity: 0; } .chat-attachment-image:hover img { transform: scale(1.04); }
.chat-attachment-file { display: flex; align-items: center; gap: 10px; min-width: 190px; max-width: 280px; margin-bottom: 6px; padding: 8px 10px; border-radius: 14px; background: rgba(0, 0, 0, .18); color: inherit; text-decoration: none; transition: background .2s, transform .3s var(--spring); } .chat-attachment-file:hover { background: rgba(0, 0, 0, .28); transform: translateY(-2px); }
.chat-attachment-file.broken { opacity: .7; }
.chat-file-ext { flex: none; min-width: 40px; height: 40px; padding: 0 4px; display: grid; place-items: center; border-radius: 11px; background: rgb(var(--fg-rgb) / .22); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.chat-file-ext svg { width: 20px; height: 20px; }
.chat-file-ext[data-ext="pdf"] { background: #e5584f; color: #fff; } .chat-file-ext[data-ext="doc"], .chat-file-ext[data-ext="docx"] { background: #4a7cf0; color: #fff; } .chat-file-ext[data-ext="xls"], .chat-file-ext[data-ext="xlsx"] { background: #2f9e5b; color: #fff; } .chat-file-ext[data-ext="zip"] { background: #b8862e; color: #fff; } .chat-file-ext[data-ext="txt"] { background: #7b8697; color: #fff; }
.chat-file-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.5; } .chat-file-size { flex: none; font-size: 11px; opacity: .7; }
.chat-file-dl { flex: none; width: 20px; height: 20px; opacity: .7; } .chat-file-dl svg { width: 20px; height: 20px; }
.chat-upload { position: relative; width: fit-content; }
.chat-upload-ring { position: absolute; inset: 0 0 6px; border-radius: 14px; display: none; place-items: center; background: rgba(0, 0, 0, .45); }
.uploading .chat-upload-ring { display: grid; }
.chat-upload-ring svg { width: 48px; height: 48px; transform: rotate(-90deg); fill: none; stroke-width: 3; } .chat-upload-ring circle { stroke: rgb(var(--fg-rgb) / .25); } .chat-upload-ring .arc { stroke: #fff; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: calc(94.25 - 94.25 * var(--p, 0) / 100); transition: stroke-dashoffset .25s; }
.chat-upload-ring b { position: absolute; font-size: 11px; color: #fff; }
.chat-retry { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255, 120, 120, .6); border-radius: 12px; background: rgba(255, 90, 90, .12); color: #ffb3b3; font: inherit; font-size: 12.5px; cursor: pointer; } .chat-retry svg { width: 16px; height: 16px; }
.chat-bubble-row.failed .chat-bubble { border-color: rgba(255, 120, 120, .6); animation: chat-shake .4s; }
@keyframes chat-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* typing */
.chat-typing { display: inline-flex !important; gap: 5px; padding: 14px 16px !important; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: chat-wave 1.1s ease-in-out infinite; } .chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-wave { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat-typing-row.leaving { opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s; }

/* welcome: the empty chat — pick a question or just write */
.chat-welcome { margin: auto; width: min(560px, 100%); display: grid; justify-items: center; gap: 10px; text-align: center; padding: 8px 0 4px; transition: opacity .3s, transform .3s var(--soft); }
.chat-welcome.leaving { opacity: 0; transform: translateY(-14px) scale(.96); pointer-events: none; }
.chat-welcome-av { position: relative; width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 4px; animation: chat-rise .7s var(--spring) both; }
.chat-welcome-av span { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #0b1320; background: linear-gradient(145deg, #a6e05a, #4f9a35); box-shadow: 0 16px 34px -14px rgba(139, 199, 75, .8); }
.chat-welcome-av i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent-2); opacity: 0; animation: chat-ring 3s ease-out infinite; } .chat-welcome-av i:nth-of-type(2) { animation-delay: 1.5s; }
@keyframes chat-ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes chat-rise { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: none; } }
.chat-welcome h2 { margin: 0; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.7rem); animation: chat-rise .6s .1s var(--spring) both; }
.chat-welcome p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.9; max-width: 42ch; animation: chat-rise .6s .18s var(--spring) both; }
.chat-welcome-cards { width: 100%; display: grid; gap: 8px; margin-top: 8px; transition: opacity .3s, transform .4s var(--soft); }
.chat-faq-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; border-radius: 18px; border: 1px solid rgb(var(--fg-rgb) / .16); background: rgb(var(--fg-rgb) / .08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--text); font: inherit; font-size: 14px; text-align: start; cursor: pointer; animation: chat-rise .6s calc(.28s + var(--i, 0) * .07s) var(--spring) both; transition: transform .35s var(--spring), border-color .2s, background .2s; }
.chat-faq-card svg { width: 18px; height: 18px; flex: none; color: var(--accent-2); transition: transform .35s var(--spring); }
.chat-faq-card:hover { transform: translateY(-3px); border-color: var(--accent-2-border); background: var(--accent-2-soft); } .chat-faq-card:hover svg { transform: translateX(-4px); } .chat-faq-card:active { transform: scale(.97); }
.chat-welcome.is-typing .chat-welcome-cards { opacity: .28; transform: scale(.97); filter: saturate(.6); }
.chat-welcome-or { display: inline-flex !important; align-items: center; gap: 8px; margin-top: 6px !important; color: var(--text-faint) !important; font-size: 12.5px !important; animation: chat-rise .6s .7s var(--spring) both; }
.chat-welcome-or svg { width: 18px; height: 18px; animation: chat-bounce 1.6s ease-in-out infinite; }
@keyframes chat-bounce { 50% { transform: translateY(5px); } }
@media (max-height: 640px) { .chat-welcome-av, .chat-welcome > p:not(.chat-welcome-or) { display: none; } .chat-faq-card:nth-child(n+4) { display: none; } }

/* toast, connection banner, new-message pill, picture viewer */
.chat-toast { position: fixed; z-index: 90; inset-inline: 14px; top: calc(76px + var(--safe-top)); max-width: 420px; margin-inline: auto; padding: 12px 16px; border-radius: 16px; background: rgba(60, 20, 24, .92); border: 1px solid rgba(255, 120, 120, .5); color: #ffd5d5; font-size: 13.5px; line-height: 1.7; text-align: center; backdrop-filter: blur(18px); opacity: 0; transform: translateY(-12px); transition: opacity .3s, transform .4s var(--spring); }
.chat-toast.on { opacity: 1; transform: none; } .chat-toast[hidden] { display: none; }
.chat-conn { position: fixed; z-index: 85; top: calc(70px + var(--safe-top)); inset-inline-start: 50%; transform: translate(-50%, -10px); padding: 6px 16px; border-radius: 999px; font-size: 12.5px; background: rgba(40, 44, 60, .92); border: 1px solid var(--border-strong); opacity: 0; transition: opacity .3s, transform .4s var(--spring); white-space: nowrap; }
[dir="rtl"] .chat-conn { inset-inline-start: auto; left: 50%; }
.chat-conn.on { opacity: 1; transform: translate(-50%, 0); } .chat-conn[hidden] { display: none; } .chat-conn[data-tone="bad"] { color: #ffd2a8; } .chat-conn[data-tone="bad"]::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-start: 8px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; vertical-align: -1px; animation: page-busy-spin .8s linear infinite; } .chat-conn[data-tone="ok"] { color: #9be8b0; }
.chat-new-pill { position: absolute; inset-inline: 0; bottom: calc(100% + 8px); margin-inline: auto; width: fit-content; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--accent-2-border); background: rgb(var(--glass-rgb) / .85); color: var(--accent-2); font: inherit; font-size: 13px; cursor: pointer; backdrop-filter: blur(16px); animation: chat-pop .4s var(--spring); } .chat-new-pill[hidden] { display: none; } .chat-new-pill svg { width: 16px; height: 16px; }
.chat-footer { position: fixed; }
.chat-lightbox { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(5, 8, 16, .0); backdrop-filter: blur(0); transition: background .3s, backdrop-filter .3s; }
.chat-lightbox.on { background: rgba(5, 8, 16, .82); backdrop-filter: blur(10px); }
.chat-lightbox img { max-width: min(96vw, 1000px); max-height: 82dvh; border-radius: 18px; box-shadow: 0 30px 80px -20px #000; transform: scale(.85); opacity: 0; transition: transform .45s var(--spring), opacity .3s; } .chat-lightbox.on img { transform: none; opacity: 1; }
.chat-lightbox-x, .chat-lightbox-dl { position: absolute; top: calc(14px + var(--safe-top)); min-width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgb(var(--fg-rgb) / .25); background: rgb(var(--glass-rgb) / .7); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; cursor: pointer; text-decoration: none; font: inherit; font-size: 13px; }
.chat-lightbox-x { inset-inline-start: 14px; } .chat-lightbox-dl { inset-inline-end: 14px; } .chat-lightbox svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .chat-page-body *, .chat-page-body *::before, .chat-page-body *::after, .chat-lightbox, .chat-lightbox img { animation: none !important; transition: none !important; }
  .chat-faq-card, .chat-welcome h2, .chat-welcome p, .chat-welcome-av { opacity: 1; }
}

/* /order: the whole page is the form — no box, no footer, the site's glass and a little motion */
.oc { max-width: 600px; min-height: 100svh; align-content: center; gap: 14px; padding: 28px 18px 120px; }
@media (min-width: 900px) { .oc { padding-top: 110px; padding-bottom: 64px; min-height: 100svh; } }
.oc-card { gap: 16px; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
.oc-h { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.2rem); font-weight: 800; animation: oc-rise .6s var(--soft, cubic-bezier(.22, 1, .36, 1)) both; }
.oc-card > * { animation: oc-rise .6s cubic-bezier(.34, 1.4, .5, 1) both; } .oc-card > :nth-child(2) { animation-delay: .06s; } .oc-card > :nth-child(3) { animation-delay: .12s; } .oc-card > :nth-child(4) { animation-delay: .18s; } .oc-card > :nth-child(5) { animation-delay: .24s; } .oc-card > :nth-child(6) { animation-delay: .3s; } .oc-card > :nth-child(7) { animation-delay: .36s; }
@keyframes oc-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.oc-chips { gap: 10px; }
.oc-chip span { min-height: 54px; border-radius: 18px; border: 1px solid rgb(var(--fg-rgb) / .16); background: rgb(var(--fg-rgb) / .07); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-weight: 600; transition: transform .4s cubic-bezier(.34, 1.4, .5, 1), background .2s, border-color .2s; }
.oc-chip:hover span { transform: translateY(-2px); } .oc-chip input:checked + span { transform: scale(1.04); box-shadow: 0 10px 26px -14px var(--accent-2); }
.oc-card textarea, .oc-card input:not([type=radio]):not([type=hidden]):not(.otp-input) { min-height: 56px; border-radius: 18px; border: 1px solid rgb(var(--fg-rgb) / .16); background: rgb(var(--fg-rgb) / .06); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color .2s, box-shadow .3s, background .2s; }
.oc-card textarea { min-height: 150px; }
.oc-go { min-height: 56px; border-radius: 18px; transition: transform .4s cubic-bezier(.34, 1.4, .5, 1), box-shadow .3s; } .oc-go:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px var(--accent-2); }
@media (prefers-reduced-motion: reduce) { .oc-h, .oc-card > * { animation: none; } }
/* Chat v3: your own messages sit at the start side (right in Persian) like every messenger people know; the team's at the other */
.chat-page-body .chat-bubble-row.mine { justify-content: flex-start; }
.chat-page-body .chat-bubble-row.theirs { justify-content: flex-end; }
.chat-page-body .chat-bubble-row.mine .chat-bubble { border-end-end-radius: 20px; border-end-start-radius: 6px; }
.chat-page-body .chat-bubble-row.theirs .chat-bubble { border-end-start-radius: 20px; border-end-end-radius: 6px; }
.chat-bubble-row.mine.chat-bubble-enter { transform-origin: bottom left; } .chat-bubble-row.theirs.chat-bubble-enter { transform-origin: bottom right; }
.oc { box-sizing: border-box; }
@media (max-width: 899px) { .oc { min-height: calc(100svh - 100px - env(safe-area-inset-bottom)); padding-bottom: 24px; padding-top: 36px; } }
.oc, .oc-card, .oc-card > *, .oc-row > * { min-width: 0; }
.oc-card { grid-template-columns: minmax(0, 1fr); } .oc-row { grid-template-columns: minmax(0, 1fr); } @media (min-width: 560px) { .oc-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }


/* ====== Theme toggle and the switch animation ====== */
.theme-toggle { position: relative; display: inline-grid; place-items: center; cursor: pointer; overflow: hidden; }
.theme-toggle svg { grid-area: 1 / 1; width: 20px; height: 20px; transition: transform .7s cubic-bezier(.34, 1.4, .5, 1), opacity .4s; }
:root:not([data-theme="light"]) .theme-toggle .tt-moon { opacity: 0; transform: rotate(-120deg) scale(.3); }
:root[data-theme="light"] .theme-toggle .tt-sun { opacity: 0; transform: rotate(120deg) scale(.3); }
.theme-toggle:hover svg { transform: rotate(18deg); } .theme-toggle:active svg { transform: scale(.8); }
:root[data-theme="light"] .theme-toggle:hover .tt-moon { transform: rotate(-14deg) scale(1.08); }
.theme-float { display: none; }
@media (max-width: 899px) { .theme-float { display: block; position: fixed; z-index: 85; top: calc(10px + var(--safe-top)); inset-inline-end: 12px; }
  .theme-float .theme-toggle { width: 40px; height: 40px; background: rgb(var(--glass-rgb) / .55); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); box-shadow: var(--shadow-soft); } }
html.is-page-loading .theme-float { opacity: .4; }

/* the switch itself: a circle of the new theme grows out of the button that was pressed */
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-old(root) { z-index: 1; }
html.theme-vt::view-transition-new(root) { z-index: 2; animation: theme-reveal .75s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes theme-reveal { from { clip-path: circle(0 at var(--vt-x) var(--vt-y)); } to { clip-path: circle(var(--vt-r) at var(--vt-x) var(--vt-y)); } }
html.theme-vt .panel-bottomnav, html.theme-vt .pnav-blob { view-transition-name: none; }
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after { transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, fill .4s ease, stroke .4s ease !important; }
@media (prefers-reduced-motion: reduce) { .theme-toggle svg { transition: none; } html.theme-vt::view-transition-new(root) { animation: none; } }

/* The logo is a light mark made for the dark theme; on the light one it is darkened. */
:root[data-theme="light"] img[src*="Raymon-Logo"] { filter: invert(.82) brightness(.9) contrast(1.1); }

/* ===== Chat header v2: one short sub line; every action in one aligned row at the end ===== */
.chat-page-body .chat-topbar { padding: 6px 8px 6px 6px; padding-inline-end: 6px; gap: 10px; align-items: center; min-height: 56px; }
.chat-page-body .chat-topbar > * { align-self: center; }
.chat-topbar-text { flex: 1; min-width: 0; }
.chat-topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.chat-sub { flex-wrap: nowrap; gap: 0 8px; align-items: center; overflow: hidden; line-height: 1.4; }
.chat-sub > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chat-sub-topic { flex: 0 1 auto; }
.chat-sub-topic::before { content: "·"; display: inline; width: auto; height: auto; background: none; margin-inline-end: 8px; border-radius: 0; }
.chat-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-inline-start: auto; }
.chat-actions > *, .chat-actions .icon-btn { flex: none; }
.chat-actions .icon-btn, .chat-actions .chat-menu-btn, .chat-back-btn { width: 44px; height: 44px; min-width: 44px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }
.chat-page-body .chat-menu, .chat-embed .chat-menu { position: static; inset: auto; top: auto; }
.chat-page-body .chat-menu-panel, .chat-embed .chat-menu-panel { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; inset-inline-start: auto; width: min(380px, calc(100vw - 20px)); max-width: none; margin: 0; max-height: min(72dvh, calc(100dvh - 140px)); }
@media (max-width: 380px) { .chat-actions { gap: 4px; } .chat-page-body .chat-topbar { gap: 6px; } .chat-avatar { width: 36px; height: 36px; } }
@media (max-width: 340px) { .chat-page-body .chat-avatar { display: none; } }
.chat-reply-note { margin: 4px auto 8px; padding: 4px 14px; border-radius: 999px; background: rgb(var(--fg-rgb) / .06); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); text-align: center; width: fit-content; max-width: 100%; }
.chat-reply-note b { color: var(--accent); }
.chat-reply-note::before { content: none; }

/* Messenger sign-in: one or two buttons (Bale, Telegram), one panel below */
.msgr-btns { display: grid; grid-template-columns: 1fr; gap: 10px; }
.msgr-btns[data-n="2"] { grid-template-columns: 1fr 1fr; }
.msgr-btns .bale-btn { padding-inline: 8px; white-space: nowrap; font-size: 14px; min-width: 0; }
.msgr-telegram { border-color: rgba(64, 169, 255, .5); background: rgba(64, 169, 255, .1); }
.msgr-telegram:hover { background: rgba(64, 169, 255, .18); }
@media (max-width: 360px) { .msgr-btns[data-n="2"] .bale-btn { font-size: 12.5px; gap: 6px; } .msgr-btns[data-n="2"] .bale-btn svg { width: 20px; height: 20px; } }

/* admin money inputs: the Persian grouped number shown under the field */
.money-hint { display: block; margin-top: 4px; color: var(--accent-2); font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.money-hint[hidden] { display: none; }

/* three ways in, one row: Telegram · Bale · Google — icon above its name so three fit the narrowest phone */
.msgr-btns[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.msgr-btns[data-n="3"] .bale-btn { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px 4px; font-size: 13px; }
.msgr-btns[data-n="3"] .bale-btn svg { width: 24px; height: 24px; }
.msgr-google { border-color: rgb(var(--fg-rgb) / .28); background: rgb(var(--fg-rgb) / .06); color: var(--text); text-decoration: none; }
.msgr-google:hover { background: rgb(var(--fg-rgb) / .12); }
.msgr-btns[data-n="1"] .bale-btn, .msgr-btns[data-n="2"] .bale-btn { flex-direction: row; }
/* login / register: the top bar is one row — back at the start edge, theme at the end edge — not two stacked circles */
.auth-body .auth-topbar { position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline: 14px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 2; }
@media (min-width: 900px) { .auth-body .auth-topbar { inset-inline: 24px; top: 20px; } }

/* wizard (desktop): the last step was 4px taller than a 800px-high screen, so the page scrolled; a slightly tighter button row absorbs it */
@media (min-width: 980px) { .cfg-shell .wizard-nav { padding-top: 8px; } }

/* Short screens (small laptops, landscape phones): the sign-up form (4 fields + messenger row) must still fit without scrolling. */
@media (max-height: 820px) {
  .auth-logo-link { margin: 0 0 4px; }
  .auth-logo-img { width: 44px; height: 44px; }
  .auth-card h1 { margin-bottom: 8px; font-size: 19px; line-height: 1.3; }
  .auth-sub { margin-bottom: 12px; }
  .auth-form { gap: 6px; }
  .auth-form .field label { margin-bottom: 4px; }
  .auth-divider { margin: 10px 0; }
  .auth-hint { margin-top: 8px; }
  .auth-body .auth-shell { padding-top: 0; padding-bottom: 12px; }
  .auth-form .field label { line-height: 1.2; }
  .auth-form .field input:not([type=checkbox]) { min-height: 44px; padding-block: 8px; }
  .auth-form .pw-eye { min-height: 44px; }
  .auth-form .btn-block { min-height: 46px; }
  .msgr .bale-or { margin: 4px 0; }
  .msgr .bale-hint { margin: 4px 0 0; line-height: 1.5; }
  .msgr-btns button { min-height: 44px; }
  .auth-switch { margin-top: 8px; }
  .auth-card .auth-sub { display: none; }   /* decorative line under the title: the form matters more than a sentence on a short screen */
  .auth-hint { margin-top: 6px; line-height: 1.5; }
}

/* view counter (magazine + portfolio): an eye and a short number, same tone as the date beside it */
.cv-views { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: .82rem; white-space: nowrap; }
.cv-views[hidden] { display: none; }
.cv-views svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.cv-views b { font-weight: 600; color: inherit; font-variant-numeric: tabular-nums; }
.pl-sub .cv-views { margin-inline-start: 10px; font-size: inherit; color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.audit-page.audit-panel { width: min(100%, 1100px); margin-inline: auto; padding: 0; min-width: 0; }
.audit-panel .audit-page-head { min-width: 0; }
.audit-panel .audit-quota-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#configurator-root {
  min-height: 100vh;
}

/* ===================== Subdomain field ===================== */

/* The row is forced LTR, and that's the fix for the status icon landing on
   top of the text.
   
   The page is RTL, so the row's inline-end was the LEFT edge and the icon
   was absolutely positioned there. The input, though, carries dir="ltr"
   (it holds a hostname), so ITS inline-end was the RIGHT edge — meaning the
   padding that was supposed to keep text clear of the icon was reserved on
   the opposite side from the icon, and left-aligned LTR text ran straight
   underneath it. Two logical properties on two elements resolving against
   two different directions is a trap; making the whole row LTR means both
   now agree, and the icon sits after the text the way it does in any
   address field. */
.subdomain-input-row {
  position: relative;
  display: flex;
  align-items: center;
  direction: ltr;
}
.subdomain-input-row input {
  flex: 1;
  min-width: 0;
  padding-inline-end: 38px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.subdomain-status-icon {
  position: absolute;
  inset-inline-end: 13px;
  display: flex;
  align-items: center;
  font-size: 13px;
  pointer-events: none;
}

/* The border now carries the same state the message below does. It used to
   stay neutral while the text underneath said the address was taken, so the
   field that was wrong was the only thing on screen not saying so. */
/* :focus is included in every one of these on purpose. site.css has a
   global `.field input:focus { border-color: var(--accent-2-border) }`, and
   this field is focused for the entire time someone is typing into it — so
   without matching the focus state too, the green focus ring sat on top of
   the rejection and the border stayed green while the message underneath
   said the address was taken. The state has to win over focus here, because
   the whole point is to be visible exactly while they're still typing. */
.subdomain-available input,
.subdomain-available input:focus { border-color: var(--accent-2-border); }
.subdomain-taken input,
.subdomain-taken input:focus,
.subdomain-invalid input,
.subdomain-invalid input:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(224, 133, 133, 0.12);
}
.subdomain-available .subdomain-status-icon { color: var(--accent-2); }
.subdomain-taken .subdomain-status-icon, .subdomain-invalid .subdomain-status-icon { color: var(--danger); }
.subdomain-checking .subdomain-status-icon { color: var(--text-faint); }

/* The message was --text-faint in every state, so a rejection was the same
   dim grey as a neutral hint — the one line that needed to be noticed was
   styled to be ignored. */
.subdomain-hint-available { color: var(--accent-2); }
.subdomain-hint-taken, .subdomain-hint-invalid { color: var(--danger); }
.subdomain-hint-checking { color: var(--text-muted); }

/* A spinning ring rather than a static "…", which was indistinguishable
   from a field that had simply stopped responding. */
.subdomain-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: subdomain-spin 0.7s linear infinite;
}
@keyframes subdomain-spin { to { transform: rotate(360deg); } }

.subdomain-field { margin-bottom: 20px; }

.subdomain-what {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.9;
}

/* Turns the abstract word into the real address as it's typed. This is the
   part that actually explains what the field is for — a box labelled "your
   site address" says what it holds without saying what it becomes. */
.subdomain-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 9px 0 0;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
}
.subdomain-preview-label { color: var(--text-faint); flex-shrink: 0; }
.subdomain-preview-url {
  font-family: var(--font-mono);
  color: var(--text-muted);
  overflow-wrap: anywhere;
  min-width: 0;
}
.subdomain-preview-slug { color: var(--accent); font-weight: 700; }
.subdomain-preview-slug.is-placeholder { color: var(--text-faint); font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  .subdomain-spinner { animation: none; }
}

/* site.css hardcodes `html { direction: rtl }` for the rest of the (RTL-only)
   site — this page is the one place that needs to actually flip for English,
   so override it here. Higher specificity than the plain `html` selector,
   so this wins regardless of CSS load order. */
html[dir='ltr'] {
  direction: ltr;
}

.lang-switcher-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.lang-switcher {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.lang-switcher button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.lang-switcher button.active {
  background: var(--accent);
  color: var(--accent-ink);
}

:root[dir='ltr'] .auth-form {
  text-align: left;
}

.wizard-stepper {
  display: flex;
  list-style: none;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  overflow-x: auto;
}

.wizard-step {
  flex: 1;
  min-width: 0;
}

.wizard-step-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: not-allowed;
  padding: 4px 2px;
  font-family: inherit;
}

.wizard-step:not(.wizard-step-upcoming) .wizard-step-btn {
  cursor: pointer;
  color: var(--text-muted);
}

.wizard-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  background: var(--surface);
}

.wizard-step-active .wizard-step-num {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.wizard-step-done .wizard-step-num {
  border-color: var(--accent-2-border);
  color: var(--accent-2);
  background: var(--accent-2-soft);
}

.wizard-step-active .wizard-step-label {
  color: var(--text);
}

.wizard-step-label {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .option-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .wizard-main-narrow .option-grid { grid-template-columns: repeat(3, 1fr); }
}

.wizard-step-anim {
  animation: wizardStepIn 0.32s var(--ease);
}

@keyframes wizardStepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.option-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.option-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.option-card.selected {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  animation: optionPulse 0.28s var(--ease);
  position: relative;
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: optionCheckIn 0.22s var(--ease);
}

@keyframes optionPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes optionCheckIn {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

.option-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.option-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.option-card-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.option-card-disabled:hover {
  background: var(--surface);
  border-color: var(--border);
}

.option-card-badge {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

.feature-header-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Color language for the feature-relationship tags — each one carries a
   distinct meaning and needs a distinct color, not one green for
   everything: gold = "on by default", grey = neutral prerequisite info,
   green = "something you picked actively needs this" / "this got added
   automatically", red = "this got turned off as a side effect". See the
   in-panel legend (feature-legend-*) for the same mapping spelled out. */
.feature-legend-wrap {
  position: relative;
}

.feature-legend-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
}

.feature-legend-trigger:hover {
  background: var(--surface-2);
}

.feature-legend-popover {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 30;
  width: 290px;
  max-width: 82vw;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  padding: 14px;
  animation: featureAutoNoteIn 0.2s var(--ease);
}

.feature-legend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.feature-legend-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
}

.feature-legend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-legend-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-legend-swatch {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  margin-top: 2px;
  border: 1px solid;
}

.feature-legend-swatch-default { background: var(--accent-soft); border-color: var(--accent-border); }
.feature-legend-swatch-requires { background: var(--surface-2); border-color: var(--border-strong); }
.feature-legend-swatch-requiredby { background: var(--accent-2-soft); border-color: var(--accent-2-border); }
.feature-legend-swatch-added { background: var(--accent-2-soft); border-color: var(--accent-2-border); }
.feature-legend-swatch-removed { background: rgba(224, 133, 133, 0.12); border-color: rgba(224, 133, 133, 0.35); }

/* A feature card explains its own dependency chain up front — "requires X"
   before you toggle it on, "needed by X" while it's on and something else
   selected relies on it — instead of the cascade only showing up as a
   silent change elsewhere in the list. Each related feature gets its own
   small chip rather than a comma-joined sentence, so a two- or three-item
   dependency (several catalog rules need more than one feature) stays easy
   to scan instead of running together as prose. */
.feature-relation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
  line-height: 1.5;
}

.feature-relation svg {
  flex-shrink: 0;
}

.feature-relation-label {
  color: var(--text-faint);
}

.feature-relation-chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid;
  font-weight: 500;
}

.feature-relation-requires svg {
  opacity: 0.8;
  color: var(--text-muted);
}

.feature-relation-requires .feature-relation-chip {
  color: var(--text-muted);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.feature-relation-required-by svg {
  color: var(--accent-2);
}

.feature-relation-required-by .feature-relation-label {
  color: var(--accent-2);
}

.feature-relation-required-by .feature-relation-chip {
  color: var(--accent-2);
  background: var(--accent-2-soft);
  border-color: var(--accent-2-border);
}

/* Toggling a feature can cascade (auto-add what it needs, auto-drop what
   needed it) — this banner names exactly what changed as a side effect, and
   the matching cards briefly flash so the cascade is visible where it
   happened, not just described in text. */
.feature-auto-note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--accent-2-soft);
  border: 1px solid var(--accent-2-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
  animation: featureAutoNoteIn 0.24s var(--ease);
}

/* A single toggle either cascades additions or cascades removals, never
   both at once (resolveDependencies vs. removeWithDependents run
   exclusively) — so the whole banner can safely swap to a "something got
   turned off" tone instead of always reading as the same positive green. */
.feature-auto-note-negative {
  background: rgba(224, 133, 133, 0.12);
  border-color: rgba(224, 133, 133, 0.35);
}

@keyframes featureAutoNoteIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.feature-auto-note-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-auto-note-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.6;
}

.feature-auto-note-line svg {
  flex-shrink: 0;
}

.feature-auto-note-added svg {
  color: var(--accent-2);
}

.feature-auto-note-removed svg {
  color: var(--danger);
}

.feature-auto-note-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
}

.feature-card-flash {
  animation: featureCardFlash 1.4s var(--ease);
}

@keyframes featureCardFlash {
  0% { box-shadow: 0 0 0 2px var(--accent-2-border); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ============================= Features step ============================= */

/* Smooth open/close without measuring the content: a grid row that goes
   0fr -> 1fr animates to the natural height. Once closed the inner wrapper
   is visibility:hidden (after the transition), which takes the collapsed
   controls out of the tab order and the accessibility tree. */
.collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.collapse.is-open { grid-template-rows: 1fr; }
.collapse-inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.26s var(--ease), visibility 0s linear 0.38s;
}
.collapse.is-open > .collapse-inner {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.32s var(--ease) 0.06s, visibility 0s;
}

/* Core features that are simply part of the site — not a choice, so it is
   one quiet line instead of a wall of cards. */
.feature-base {
  margin-bottom: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.feature-base-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  border-radius: var(--radius-lg);
}
.feature-base-head:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.feature-base-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-2-soft);
  color: var(--accent-2);
}
.feature-base-text { flex: 1; font-size: 13.5px; font-weight: 600; }
.feature-base-toggle { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.feature-base-toggle svg { transition: transform var(--dur) var(--ease); }
.feature-base-head[aria-expanded='true'] .feature-base-toggle svg { transform: rotate(180deg); }
.feature-base-chips { padding: 2px 14px 14px; }

/* A collapsible section: title, hint, "n of m on" count and a thin progress
   bar in one tappable header. */
.feature-priority-group {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.feature-priority-group.is-open { border-color: var(--border-strong); }

.feature-group-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px 18px 19px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  border-radius: var(--radius-lg);
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease);
}
.feature-group-toggle:hover { background: var(--surface-2); }
.feature-group-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }

.feature-group-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-priority-title { font-size: 15.5px; font-weight: 700; color: var(--text); }
.feature-group-recommended .feature-priority-title { color: var(--accent-2); }
.feature-group-hint { font-size: 12.5px; color: var(--text-muted); }

.feature-group-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.feature-group-count {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.feature-group-count.has-active {
  background: var(--accent-2-soft);
  border-color: var(--accent-2-border);
  color: var(--accent-2);
}
.feature-group-chevron {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  transition: transform 0.38s cubic-bezier(0.22, 0.8, 0.24, 1), background var(--dur) var(--ease);
}
.feature-priority-group.is-open .feature-group-chevron { transform: rotate(180deg); background: var(--accent-2-soft); color: var(--accent-2); }

.feature-group-progress {
  position: absolute;
  inset-inline: 18px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.feature-group-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-2);
  transition: width 0.45s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.feature-group-body { padding: 4px 18px 18px; }

.feature-category-subsection { margin-top: 14px; }
.feature-category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.feature-category-title { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.feature-category-count { font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* One switch card per feature. The whole card is the control; the details
   toggle is a separate, secondary control underneath. */
.feature-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .feature-card-grid { grid-template-columns: 1fr; } }

.feature-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.feature-card:hover { border-color: var(--border-strong); }
.feature-card.is-on { border-color: var(--accent-2-border); background: var(--accent-2-soft); }

.feature-card-hit {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 66px;
  padding: 14px 16px;
  background: none;
  border: 0;
  border-radius: 16px;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feature-card-hit:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }

.feature-card-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.feature-card-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.5; }
.feature-card-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.feature-switch-knob {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: inset-inline-start 0.24s cubic-bezier(0.22, 0.8, 0.24, 1), background var(--dur) var(--ease);
}
.feature-card.is-on .feature-switch { background: var(--accent-2); border-color: var(--accent-2); }
.feature-card.is-on .feature-switch-knob { inset-inline-start: 20px; background: #fff; }

.feature-card-more {
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 0 16px 12px;
  background: none;
  border: 0;
  color: var(--text-faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.feature-card-more:hover { color: var(--text-muted); }
.feature-card-more:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
.feature-card-more svg { transition: transform var(--dur) var(--ease); }
.feature-card-more.expanded svg { transform: rotate(180deg); }

.feature-card-details { display: flex; flex-direction: column; gap: 6px; padding: 0 16px 14px; }
.feature-card-full-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }

@media (prefers-reduced-motion: reduce) {
  .collapse, .collapse-inner, .feature-group-chevron, .feature-group-progress > span,
  .feature-switch, .feature-switch-knob, .feature-card { transition: none; }
}

/* (category subsection rules live in the Features step block above) */
.wizard-lead-text {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.9;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

/* ============================= Preview layout ============================= */

.wizard-body {
  display: block;
}

@media (min-width: 980px) {
  .wizard-body.has-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
    gap: 28px;
    /* Deliberately no align-items: start here — the preview track is left
       at the default stretch so its box spans the full row height (as
       tall as the feature list next to it) and can paint a background
       that matches the page. Without that, the sticky column's own
       (much shorter) box only covers part of the row, and the empty
       leftover strip shows the glass panel's translucent tint instead
       of the page's solid background — reading as a mismatched color
       block down the left side. */
  }
}

.wizard-main {
  min-width: 0;
}

.preview-backdrop {
  display: none;
}

.preview-mobile-trigger {
  display: none;
}

/* Unwraps on mobile — the sticky trick and its full-height backdrop are
   desktop-only concerns, see the media query below. */
.wizard-preview-track {
  display: contents;
}

.wizard-preview-col {
  display: none;
}

.preview-sheet-close {
  display: none;
}

@media (min-width: 980px) {
  .wizard-body.has-preview .wizard-preview-track {
    display: block;
  }

  .wizard-body.has-preview .wizard-preview-col {
    display: block;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    align-self: start;
  }
}

/* Mobile: the preview lives in a full-screen sheet. A sticky bar at the
   very top of the wizard (mirroring the site's own bottom tab bar, just
   flipped to the top since this page only needs one action, not several)
   keeps the trigger reachable at any scroll position instead of a
   floating button that could drift out of thumb reach or get lost behind
   content. */
.preview-mobile-topbar {
  display: none;
}

@media (max-width: 979px) {
  .preview-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: calc(var(--safe-top, 0px) + 8px);
    z-index: 40;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgb(var(--glass-rgb) / 0.72);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow: var(--shadow-lift);
  }

  .preview-mobile-topbar-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .preview-mobile-trigger {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: var(--accent-ink);
    border: none;
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
  }

  .preview-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.6);
    z-index: 45;
  }

  /* Full screen, not a partial bottom sheet — no page content is reachable
     (or scrollable) behind it while open; only the preview frame's own
     internal scroll (see .preview-frame) moves. */
  .wizard-preview-col {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--bg-elevated);
    z-index: 50;
    overflow-y: auto;
    padding: calc(14px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform var(--dur) var(--ease);
  }

  .wizard-preview-col.open {
    transform: translateY(0);
  }

  .preview-sheet-close {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-block-end: 12px;
    margin-inline-start: auto;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
  }
}

/* ============================= Preview panel chrome ============================= */

.preview-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.preview-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.preview-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 var(--accent-2-soft);
  animation: previewLivePulse 2s infinite;
}

@keyframes previewLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 199, 75, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(139, 199, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 199, 75, 0); }
}

.preview-theme-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.preview-theme-toggle button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.preview-theme-toggle button.active {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ============================= Preview frame + tokens ============================= */

/* Fixed-size "device screen": however many feature-driven sections a
   layout renders, the frame itself never grows — it keeps this exact
   height and only its own inside scrolls, so the panel around it (and the
   page it sits in) never gets pushed out of view. */
.preview-frame {
  border-radius: 0;
  border: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  font-family: var(--pv-font, var(--font-body));
  height: min(640px, calc(100vh - 230px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--pv-border, rgb(var(--fg-rgb) / 0.25)) transparent;
}

.preview-frame::-webkit-scrollbar {
  width: 6px;
}

.preview-frame::-webkit-scrollbar-track {
  background: transparent;
}

.preview-frame::-webkit-scrollbar-thumb {
  background: var(--pv-border, rgb(var(--fg-rgb) / 0.25));
  border-radius: 999px;
}

.preview-frame[data-theme='dark'], .design-swatch[data-theme='dark'] {
  --pv-bg: #10182a;
  --pv-surface: rgb(var(--fg-rgb) / 0.06);
  --pv-surface-2: rgb(var(--fg-rgb) / 0.1);
  --pv-border: rgb(var(--fg-rgb) / 0.13);
  --pv-text: #eef1f8;
  --pv-text-muted: #93a0b8;
  --pv-danger: #e08585;
}

.preview-frame[data-theme='light'], .design-swatch[data-theme='light'] {
  --pv-bg: #f7f5f1;
  --pv-surface: #ffffff;
  --pv-surface-2: #f0eee9;
  --pv-border: rgba(20, 20, 20, 0.1);
  --pv-text: #17181c;
  --pv-text-muted: #6b6f7a;
  --pv-danger: #c24949;
}

/* Glass preset: a genuine glassmorphism material, not just a palette swap —
   translucent, blurred surfaces instead of the usual flat pv-surface. */
.preview-frame[data-preset='design.glass'] .pv-header,
.preview-frame[data-preset='design.glass'] .pv-footer,
.preview-frame[data-preset='design.glass'] .pv-product-card,
.preview-frame[data-preset='design.glass'] .pv-icon-btn,
.preview-frame[data-preset='design.glass'] .pv-category-chip:not(.active) {
  background: color-mix(in srgb, var(--pv-surface) 55%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--pv-text) 12%, transparent);
}

.design-swatch.design-swatch-glass {
  background: color-mix(in srgb, var(--pv-surface, var(--surface)) 55%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Creative preset: a two-tone accent gradient instead of a flat fill, to
   match its "expressive" typography personality. */
.preview-frame[data-preset='design.creative'] .pv-hero-cta {
  background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2));
}

/* ============================= Design step: swatch cards ============================= */

/* Two per row from the narrowest screen up. One per row turned eleven
   design options into eleven full-width blocks and a very long scroll —
   and these are cards you compare against each other, which you cannot do
   when only one is ever on screen. The swatch stays legible at half a
   phone's width; the description is what gives, and it's the least
   important part of a card whose point is the picture. */
.design-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 1040px) {
  .wizard-body:not(.has-preview) .design-grid { grid-template-columns: repeat(3, 1fr); }
}

.design-card-badge {
  margin-inline-start: 8px;
}

.design-swatch {
  height: 100%;
  min-height: 0;
  background: var(--pv-bg);
  padding: 10px 12px 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: calc(var(--pv-gap) * 0.7);
  position: relative;
  overflow: hidden;
  color: var(--pv-text);
  font-family: var(--pv-font);
}
.ds-head { display: flex; align-items: center; justify-content: space-between; }
.ds-title { font-size: 18px; line-height: 1; font-weight: var(--pv-heading-weight); letter-spacing: var(--pv-tracking); color: var(--pv-text); }
.ds-nav { display: inline-flex; gap: 4px; }
.ds-nav i { width: 14px; height: 4px; border-radius: 99px; background: var(--pv-text); opacity: .35; }
.ds-cards { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--pv-gap) * 0.8); min-height: 0; }
.ds-card {
  display: flex; flex-direction: column; gap: calc(var(--pv-gap) * 0.45); min-height: 0;
  padding: calc(var(--pv-pad) * 0.55);
  background: var(--pv-card-background, var(--pv-surface));
  border: var(--pv-card-border, 1px solid var(--pv-border));
  border-radius: var(--pv-radius);
  box-shadow: var(--pv-shadow);
  overflow: hidden;
}
.ds-img { flex: 1 1 0; min-height: 14px; border-radius: calc(var(--pv-radius) * 0.55); background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2)); opacity: .85; }
.ds-line { height: 5px; width: 80%; border-radius: 3px; background: var(--pv-text-color, var(--pv-text)); opacity: .75; }
.ds-line-short { width: 46%; opacity: .35; height: 4px; }
.ds-btn { height: 9px; width: 56%; border-radius: min(var(--pv-radius), 99px); background: var(--pv-accent); }

.pv-page {
  background: var(--pv-bg);
  color: var(--pv-text);
}

.pv-header {
  padding: var(--pv-pad);
  border-bottom: 1px solid var(--pv-border);
}

.pv-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pv-brand {
  font-weight: var(--pv-heading-weight);
  letter-spacing: var(--pv-tracking);
  font-size: 15px;
}

.pv-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pv-surface);
  color: var(--pv-text-muted);
  animation: pvFadeIn 0.25s var(--ease);
  transition: all var(--dur-fast) var(--ease);
  cursor: pointer;
  border: none;
}

.pv-icon-btn:hover {
  background: var(--pv-accent);
  color: var(--pv-bg);
  transform: scale(1.1);
}

.pv-icon-btn:focus {
  outline: 2px solid var(--pv-accent);
  outline-offset: 2px;
}

.pv-cart-badge {
  position: absolute;
  top: -4px;
  inset-inline-start: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 50%;
  background: var(--pv-accent);
  color: var(--pv-bg);
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-category-nav {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.pv-category-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--pv-radius);
  background: var(--pv-surface);
  color: var(--pv-text-muted);
  font-size: 11.5px;
  font-weight: var(--pv-body-weight);
  animation: pvFadeIn 0.25s var(--ease);
}

.pv-category-chip.active {
  background: var(--pv-accent);
  color: var(--pv-bg);
}

.pv-realestate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pv-realestate-toolbar .pv-category-nav {
  margin-top: 0;
}

.pv-map-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--pv-radius);
  border: 1px solid var(--pv-border);
  color: var(--pv-text-muted);
  font-size: 11px;
  font-weight: var(--pv-body-weight);
  white-space: nowrap;
}

.pv-hero {
  padding: calc(var(--pv-pad) * 1.6) var(--pv-pad);
  text-align: center;
}

.pv-hero-image {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--pv-radius);
  margin-bottom: 12px;
}

/* DesignPreset previewContent's Banner/ListItems blocks — only rendered
   when the selected preset actually sets them (see StorefrontLayout.tsx),
   so a preset without them adds zero markup here. */
.pv-banner {
  position: relative;
  margin: 0 var(--pv-pad) var(--pv-pad);
  border-radius: var(--pv-radius);
  overflow: hidden;
  box-shadow: var(--pv-shadow);
}
.pv-banner-image { display: block; width: 100%; height: 90px; object-fit: cover; }
.pv-banner-text {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  padding: 8px var(--pv-pad);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: #fff;
  font-size: 12px;
  font-weight: var(--pv-heading-weight);
}

.pv-list-items {
  margin: 0 var(--pv-pad) var(--pv-pad);
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pv-list-item {
  padding: 8px 12px;
  border-radius: var(--pv-radius);
  background: var(--pv-surface);
  color: var(--pv-text);
  font-size: 12px;
  font-weight: var(--pv-body-weight);
}

.pv-hero-title {
  font-weight: var(--pv-heading-weight);
  letter-spacing: var(--pv-tracking);
  font-size: 19px;
  margin: 0 0 6px;
}

.pv-hero-subtitle {
  color: var(--pv-text-muted);
  font-size: 12px;
  font-weight: var(--pv-body-weight);
  margin: 0 0 14px;
}

.pv-hero-cta {
  display: inline-block;
  background: var(--pv-accent);
  color: var(--pv-bg);
  border-radius: var(--pv-radius);
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
}

.pv-generic-note {
  margin: 0 var(--pv-pad) var(--pv-pad);
  padding: 12px;
  border-radius: var(--pv-radius);
  background: var(--pv-surface);
  color: var(--pv-text-muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.pv-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--pv-gap);
  padding: 0 var(--pv-pad) var(--pv-pad);
}

.pv-product-card {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  overflow: hidden;
  box-shadow: var(--pv-shadow);
  transform: rotate(var(--pv-card-tilt));
  animation: pvFadeIn 0.3s var(--ease);
  transition: transform var(--dur-fast) var(--ease);
}

.pv-product-card:nth-child(even) {
  transform: rotate(calc(var(--pv-card-tilt) * -1));
}

/* Same fix as .pv-entity-media above: a flat muted icon on a flat muted
   background read as a stuck loading spinner rather than a placeholder.
   Only applies when there's no real imageUrl (see ProductCard.tsx) — a
   real photo still fills this box edge-to-edge via .pv-product-photo-img. */
.pv-product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.pv-product-photo svg { width: 34px; height: 34px; opacity: 0.9; }

.pv-product-photo-img { width: 100%; height: 100%; object-fit: cover; }

.pv-wishlist-btn {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgb(var(--fg-rgb) / 0.85);
  color: #d9527a;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pvPopIn 0.22s var(--ease);
  cursor: default;
}

.pv-discount-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  background: var(--pv-danger);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  animation: pvPopIn 0.22s var(--ease);
}

.pv-product-body {
  padding: calc(var(--pv-pad) * 0.6);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pv-product-name {
  font-size: 12px;
  font-weight: var(--pv-body-weight);
}

.pv-product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #e0a83e;
  font-size: 10.5px;
  animation: pvFadeIn 0.25s var(--ease);
}

.pv-product-review-count {
  color: var(--pv-text-muted);
}

.pv-product-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.pv-product-price {
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-product-price-old {
  color: var(--pv-text-muted);
  font-size: 10.5px;
  text-decoration: line-through;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-product-price-unit {
  color: var(--pv-text-muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}

.pv-footer {
  padding: var(--pv-pad);
  border-top: 1px solid var(--pv-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--pv-text-muted);
  font-size: 10.5px;
  flex-wrap: wrap;
  gap: 8px;
}

.pv-footer-links {
  display: flex;
  gap: 12px;
}

@keyframes pvFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pvPopIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================= Shared: sections + entity grid ============================= */

.pv-section {
  padding: 0 var(--pv-pad) var(--pv-pad);
}

.pv-entity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--pv-gap);
  padding: 0 var(--pv-pad) var(--pv-pad);
}

.pv-entity-card {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  overflow: hidden;
  box-shadow: var(--pv-shadow);
  animation: pvFadeIn 0.3s var(--ease);
}

/* A flat muted-gray box behind a thin, same-tone outline icon used to read
   as a stuck loading spinner rather than a placeholder — nothing was
   actually loading, but pale-icon-on-pale-background is exactly what a
   spinner looks like at card size. An accent gradient (the same "no photo
   yet" fallback idiom used by the real templates this preview stands in
   for) plus a bigger, white, fully-opaque icon reads unambiguously as a
   deliberate placeholder instead. */
.pv-entity-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.pv-entity-media svg {
  width: 34px;
  height: 34px;
  opacity: 0.9;
}

.pv-entity-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  background: var(--pv-accent);
  color: var(--pv-bg);
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
}

.pv-entity-body {
  padding: calc(var(--pv-pad) * 0.6);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pv-entity-name {
  font-size: 12px;
  font-weight: var(--pv-body-weight);
}

.pv-entity-meta {
  font-size: 10.5px;
  color: var(--pv-text-muted);
}

/* ============================= Location block ============================= */

.pv-location {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  padding: var(--pv-pad);
}

.pv-location-map {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pv-surface-2);
  color: var(--pv-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-location-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
}

.pv-location-hours {
  color: var(--pv-text-muted);
  font-size: 10.5px;
}

/* ============================= Booking calendar ============================= */

.pv-booking-calendar {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  padding: var(--pv-pad);
}

.pv-calendar-days {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.pv-calendar-day {
  flex: 1;
  text-align: center;
  padding: 6px 2px;
  border-radius: calc(var(--pv-radius) * 0.5);
  background: var(--pv-surface-2);
  color: var(--pv-text-muted);
  font-size: 10.5px;
}

.pv-calendar-day.active {
  background: var(--pv-accent);
  color: var(--pv-bg);
  font-weight: 700;
}

.pv-calendar-slots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pv-calendar-slot {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--pv-border);
  color: var(--pv-text-muted);
  font-size: 10.5px;
}

.pv-calendar-slot.active {
  background: var(--pv-accent);
  border-color: transparent;
  color: var(--pv-bg);
  font-weight: 700;
}

/* ============================= Testimonials ============================= */

.pv-testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--pv-gap);
}

.pv-testimonial-card {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  padding: var(--pv-pad);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pv-testimonial-quote {
  font-size: 11.5px;
  line-height: 1.7;
  margin: 0 0 4px;
}

.pv-testimonial-name {
  font-size: 11px;
  font-weight: var(--pv-heading-weight);
}

.pv-testimonial-role {
  font-size: 10px;
  color: var(--pv-text-muted);
}

/* ============================= Pricing table ============================= */

.pv-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pv-pricing-card {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  padding: calc(var(--pv-pad) * 0.8);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid transparent;
}

.pv-pricing-card.highlighted {
  border-color: var(--pv-accent);
}

.pv-pricing-name {
  font-size: 11px;
  color: var(--pv-text-muted);
}

.pv-pricing-price {
  font-size: 13px;
  font-weight: var(--pv-heading-weight);
}

.pv-pricing-features {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 9.5px;
  color: var(--pv-text-muted);
}

/* ============================= FAQ ============================= */

.pv-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-faq-item {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  padding: calc(var(--pv-pad) * 0.7);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pv-faq-q {
  font-size: 11.5px;
  font-weight: var(--pv-body-weight);
}

.pv-faq-a {
  font-size: 10.5px;
  color: var(--pv-text-muted);
}

/* ============================= Contact form ============================= */

.pv-contact-form {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  padding: var(--pv-pad);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.pv-contact-title {
  font-size: 13px;
  font-weight: var(--pv-heading-weight);
}

.pv-contact-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.pv-contact-input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: calc(var(--pv-radius) * 0.6);
  background: var(--pv-surface-2);
  color: var(--pv-text-muted);
  font-size: 10.5px;
}

.pv-contact-textarea {
  height: 40px;
}

/* ============================= App shell (dashboard / web app) ============================= */

.pv-app-shell {
  display: flex;
  min-height: 320px;
  background: var(--pv-bg);
  color: var(--pv-text);
}

.pv-app-sidebar {
  flex-shrink: 0;
  width: 96px;
  padding: 14px 8px;
  border-inline-end: 1px solid var(--pv-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pv-app-brand {
  font-size: 10.5px;
  font-weight: var(--pv-heading-weight);
  color: var(--pv-text-muted);
  padding: 0 4px;
}

.pv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pv-sidebar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border-radius: calc(var(--pv-radius) * 0.6);
  color: var(--pv-text-muted);
  font-size: 10px;
}

.pv-sidebar-item.active {
  background: var(--pv-accent);
  color: var(--pv-bg);
  font-weight: 700;
}

.pv-sidebar-icon {
  display: flex;
  flex-shrink: 0;
}

.pv-app-main {
  flex: 1;
  min-width: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================= KPI grid ============================= */

.pv-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pv-kpi-card {
  background: var(--pv-surface);
  border-radius: calc(var(--pv-radius) * 0.7);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pv-kpi-label {
  font-size: 9.5px;
  color: var(--pv-text-muted);
}

.pv-kpi-value {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pv-kpi-trend-up { color: #4ade80; }
.pv-kpi-trend-down { color: #e08585; }

/* ============================= Data table ============================= */

.pv-table-wrap {
  overflow-x: auto;
  background: var(--pv-surface);
  border-radius: calc(var(--pv-radius) * 0.7);
}

.pv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  white-space: nowrap;
}

.pv-table th {
  text-align: start;
  color: var(--pv-text-muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--pv-border);
}

.pv-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--pv-border);
}

.pv-table tr:last-child td {
  border-bottom: none;
}

/* ============================= Bar chart ============================= */

.pv-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
  background: var(--pv-surface);
  border-radius: calc(var(--pv-radius) * 0.7);
  padding: 10px;
}

.pv-bar-chart-bar {
  flex: 1;
  background: var(--pv-accent);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  animation: pvBarGrow 0.4s var(--ease);
}

@keyframes pvBarGrow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

/* ============================= Status chips (web app) ============================= */

.pv-status-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pv-status-chip {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--pv-surface);
  color: var(--pv-text-muted);
  font-size: 10px;
}

.pv-status-chip::before {
  content: '●';
  color: #4ade80;
  margin-inline-end: 4px;
}


/* ===================== Step bar: primary action on mobile ===================== */

/* The sticky bar at the top of the wizard carries the step's continue
   action on mobile (see App.tsx). A long feature list or design grid buries
   the bottom button under a lot of scrolling, and on steps where nothing is
   required, people genuinely fail to find it. */
.step-bar-next {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--accent-2);
  color: var(--accent-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.step-bar-next:active:not(:disabled) { transform: scale(0.95); }
.step-bar-next:disabled { opacity: 0.45; cursor: not-allowed; }

/* Exactly one continue button per screen. Below the bar's breakpoint the
   step's own bottom button is the only one; above it, the bar is gone and
   the bottom button takes over. */
@media (max-width: 979px) {
  .wizard-nav-next { display: none; }
  /* With continue gone, "back" shouldn't sit alone against one edge
     pretending the other half is still coming. */
  .wizard-nav { justify-content: flex-start; }
}

/* ===================== Design step: change confirmation ===================== */

/* Picking a design on mobile changed something behind a sheet, so the only
   feedback was a border on the card — which reads as nothing having
   happened. This says what changed and offers the obvious next move.

   Pinned to the viewport rather than placed in the grid: the card that was
   tapped can be anywhere in a long scroll, and a confirmation you have to
   go looking for is not a confirmation. */
.design-changed-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  /* Clears the site's own floating bottom tab bar. */
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgb(var(--glass-rgb) / 0.9);
  border: 1px solid var(--accent-2-border);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-lift);
  animation: design-toast-in 0.32s var(--ease);
}
/* Desktop shows a live preview panel that visibly redraws, so there is
   nothing here to announce. */
@media (min-width: 980px) {
  .design-changed-toast { display: none; }
}
@keyframes design-toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* DesignSwatch is drawn for a full-width card, so it needs its aspect
   pinned here or it stretches to whatever height the toast row happens to
   be. Scaling the whole thing keeps its internal proportions instead of
   squashing them. */
.design-changed-swatches {
  flex-shrink: 0;
  width: 46px;
  height: 34px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  line-height: 0;
}
.design-changed-swatches > * {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.design-changed-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.design-changed-text strong { color: var(--text); }
.design-changed-btn {
  flex-shrink: 0;
  border: 1px solid var(--accent-2-border);
  background: var(--accent-2-soft);
  color: var(--accent-2);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.design-changed-btn:active { transform: scale(0.95); }

/* A brief pulse on the card itself, so the tap and the toast are visibly
   the same event rather than two unrelated things happening at once. */
.design-card-flash {
  animation: design-card-flash 0.55s var(--ease);
}
@keyframes design-card-flash {
  0% { box-shadow: 0 0 0 0 var(--accent-2-soft); }
  40% { box-shadow: 0 0 0 6px var(--accent-2-soft); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* A card mid-confirmation on the project-type step (see ProjectTypeStep):
   the brief beat between tapping and the step changing. */
.option-card-committing {
  animation: design-card-flash 0.4s var(--ease);
}

/* Design step theme toggle */
.design-theme-toggle {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.theme-toggle-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}

.theme-toggle-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.theme-toggle-btn.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* Larger design card preview swatch */
.design-card-swatch-large {
  width: 100%;
  height: 170px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--pv-bg);
  border: 1px solid var(--pv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.design-card-swatch-large .design-swatch { width: 100%; }

.option-card:hover .design-card-swatch-large {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Recommended badge styling */
.design-card-recommended {
  position: relative;
}

.design-card-recommended-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: 0 2px 6px var(--shadow-soft);
}

/* Design card category and short description */
.design-card-category {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.design-card-short-desc {
  display: block;
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  white-space: normal;
  overflow: hidden;
}

/* The summary step's estimate footnote — see engine/buildEstimate.ts. */
.summary-estimate-note {
  margin: -8px 0 20px;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.9;
}

/* Design System Classes — Complete Design Differentiation */

/* Minimal Design: Clean, spacious, minimal styling */
.design-preset-minimal {
  --pv-radius: 4px;
  --pv-gap: 24px;
  --pv-pad: 24px;
  --pv-shadow: none;
}

.design-preset-minimal .card,
.design-preset-minimal [class*="section"] {
  border: none;
  box-shadow: none;
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-minimal h1,
.design-preset-minimal h2,
.design-preset-minimal h3 {
  font-size: var(--pv-heading-size);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-minimal p,
.design-preset-minimal span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

/* Modern Design: Grid-based, balanced, clear styling */
.design-preset-modern {
  --pv-radius: 8px;
  --pv-gap: 16px;
  --pv-pad: 16px;
  --pv-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.design-preset-modern .card,
.design-preset-modern [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-modern h1,
.design-preset-modern h2,
.design-preset-modern h3 {
  font-size: var(--pv-heading-size);
  font-weight: 700;
  letter-spacing: normal;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-modern p,
.design-preset-modern span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-modern button {
  padding: var(--pv-button-padding);
  border-radius: var(--pv-radius);
  border: none;
}

/* Luxury Design: Gold accents, refined styling */
.design-preset-luxury {
  --pv-radius: 12px;
  --pv-gap: 20px;
  --pv-pad: 20px;
  --pv-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.design-preset-luxury .card,
.design-preset-luxury [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-luxury h1,
.design-preset-luxury h2,
.design-preset-luxury h3 {
  font-size: var(--pv-heading-size);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-luxury p,
.design-preset-luxury span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

/* Corporate Design: Professional, structured */
.design-preset-corporate {
  --pv-radius: 6px;
  --pv-gap: 16px;
  --pv-pad: 16px;
  --pv-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.design-preset-corporate .card,
.design-preset-corporate [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-corporate h1,
.design-preset-corporate h2,
.design-preset-corporate h3 {
  font-size: var(--pv-heading-size);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-corporate p,
.design-preset-corporate span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

/* Glass Design: Translucent, blurred surfaces */
.design-preset-glass {
  --pv-radius: 16px;
  --pv-gap: 16px;
  --pv-pad: 16px;
  --pv-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.design-preset-glass .card,
.design-preset-glass [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
  backdrop-filter: blur(10px);
}

.design-preset-glass h1,
.design-preset-glass h2,
.design-preset-glass h3 {
  font-size: var(--pv-heading-size);
  font-weight: 600;
  letter-spacing: normal;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-glass p,
.design-preset-glass span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

/* Dark Design: High contrast, tech-forward */
.design-preset-dark {
  --pv-radius: 8px;
  --pv-gap: 14px;
  --pv-pad: 14px;
  --pv-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.design-preset-dark .card,
.design-preset-dark [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-dark h1,
.design-preset-dark h2,
.design-preset-dark h3 {
  font-size: var(--pv-heading-size);
  font-weight: 700;
  letter-spacing: normal;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-dark p,
.design-preset-dark span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

/* Editorial Design: Serif, generous spacing, readable */
.design-preset-editorial {
  --pv-radius: 0;
  --pv-gap: 32px;
  --pv-pad: 32px;
  --pv-shadow: none;
}

.design-preset-editorial .card,
.design-preset-editorial [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-editorial h1,
.design-preset-editorial h2,
.design-preset-editorial h3 {
  font-size: var(--pv-heading-size);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
  font-family: Georgia, serif;
}

.design-preset-editorial p,
.design-preset-editorial span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
  font-family: Georgia, serif;
}

/* Creative Design: Colorful, dynamic */
.design-preset-creative {
  --pv-radius: 12px;
  --pv-gap: 16px;
  --pv-pad: 16px;
  --pv-shadow: 0 6px 16px rgba(232, 87, 138, 0.2);
}

.design-preset-creative .card,
.design-preset-creative [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-creative h1,
.design-preset-creative h2,
.design-preset-creative h3 {
  font-size: var(--pv-heading-size);
  font-weight: 700;
  letter-spacing: normal;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-creative p,
.design-preset-creative span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

/* Soft Design: Warm, approachable */
.design-preset-soft {
  --pv-radius: 10px;
  --pv-gap: 18px;
  --pv-pad: 18px;
  --pv-shadow: 0 4px 12px rgba(224, 133, 90, 0.15);
}

.design-preset-soft .card,
.design-preset-soft [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
}

.design-preset-soft h1,
.design-preset-soft h2,
.design-preset-soft h3 {
  font-size: var(--pv-heading-size);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

.design-preset-soft p,
.design-preset-soft span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
}

/* Tech Design: Compact, monospace, data-dense */
.design-preset-tech {
  --pv-radius: 4px;
  --pv-gap: 8px;
  --pv-pad: 10px;
  --pv-shadow: none;
}

.design-preset-tech .card,
.design-preset-tech [class*="section"] {
  border: var(--pv-card-border);
  box-shadow: var(--pv-shadow);
  background: var(--pv-card-background);
  padding: var(--pv-pad);
  margin-bottom: var(--pv-gap);
  border-radius: var(--pv-radius);
  font-family: var(--pv-font);
}

.design-preset-tech h1,
.design-preset-tech h2,
.design-preset-tech h3 {
  font-size: var(--pv-heading-size);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
  font-family: var(--pv-font);
}

.design-preset-tech p,
.design-preset-tech span {
  font-size: var(--pv-body-size);
  color: var(--pv-text-color);
  line-height: var(--pv-line-height);
  font-family: var(--pv-font);
}

.design-preset-tech button {
  padding: var(--pv-button-padding);
  border-radius: var(--pv-radius);
  border: 1px solid var(--pv-border-color);
}

/* Enhanced design differentiation: Button styles per design */
.design-preset-minimal button {
  background: transparent;
  border: 1px solid var(--pv-border-color);
  padding: 8px 16px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.design-preset-modern button {
  background: var(--pv-accent);
  border: none;
  padding: var(--pv-button-padding);
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.design-preset-luxury button {
  background: var(--pv-accent);
  border: 2px solid var(--pv-accent);
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.design-preset-corporate button {
  background: var(--pv-accent);
  border: none;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 3px;
}

.design-preset-glass button {
  background: color-mix(in srgb, var(--pv-accent) 90%, transparent);
  border: 1px solid var(--pv-accent);
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

.design-preset-dark button {
  background: var(--pv-accent);
  border: 1px solid var(--pv-border-color);
  padding: 10px 18px;
  font-weight: 700;
  border-radius: 6px;
}

.design-preset-editorial button {
  background: transparent;
  border: 2px solid var(--pv-border-color);
  padding: 12px 24px;
  font-weight: 400;
  letter-spacing: 0.03em;
  font-family: Georgia, serif;
}

.design-preset-creative button {
  background: var(--pv-accent);
  border: none;
  padding: 10px 18px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(232, 87, 138, 0.3);
}

.design-preset-soft button {
  background: var(--pv-accent);
  border: none;
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(224, 133, 90, 0.2);
}

.design-preset-tech button {
  background: transparent;
  border: 1px solid var(--pv-border-color);
  padding: 6px 12px;
  font-weight: 700;
  font-family: var(--pv-font);
  font-size: 11px;
  letter-spacing: -0.01em;
}

/* Product card design-specific styling */
.design-preset-minimal .pv-product-card {
  border: none;
  box-shadow: none;
  border-bottom: 1px solid #e0e0e0;
}

.design-preset-modern .pv-product-card {
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.design-preset-luxury .pv-product-card {
  border: 1px solid var(--pv-accent);
  box-shadow: 0 4px 12px rgba(184, 134, 63, 0.15);
}

.design-preset-editorial .pv-product-card {
  border: none;
  box-shadow: none;
  border-top: 2px solid #2c2c2c;
}

.design-preset-creative .pv-product-card {
  border: 2px solid var(--pv-accent);
  box-shadow: 0 4px 12px rgba(232, 87, 138, 0.2);
}

.design-preset-tech .pv-product-card {
  border: 1px solid #333;
  box-shadow: none;
}

.design-preset-corporate .pv-product-card {
  border: 1px solid #d0d0d0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.design-preset-glass .pv-product-card {
  border: 1px solid rgb(var(--fg-rgb) / 0.2);
  backdrop-filter: blur(10px);
}

.design-preset-dark .pv-product-card {
  border: 1px solid #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.design-preset-soft .pv-product-card {
  border: none;
  box-shadow: 0 2px 8px rgba(224, 133, 90, 0.12);
}

/* Category chip design-specific styling */
.design-preset-minimal .pv-category-chip {
  border: 1px solid #ddd;
  background: transparent;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.design-preset-minimal .pv-category-chip.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

.design-preset-modern .pv-category-chip {
  border: 1px solid #e0e0e0;
  background: #fff;
}

.design-preset-modern .pv-category-chip.active {
  background: var(--pv-accent);
  border-color: var(--pv-accent);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.design-preset-luxury .pv-category-chip {
  border: 1px solid var(--pv-accent);
  background: transparent;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.design-preset-luxury .pv-category-chip.active {
  background: var(--pv-accent);
  color: #fff;
}

.design-preset-editorial .pv-category-chip {
  border: none;
  background: transparent;
  font-weight: 400;
  letter-spacing: 0.03em;
  font-family: Georgia, serif;
}

.design-preset-editorial .pv-category-chip.active {
  border-bottom: 2px solid #2c2c2c;
  background: transparent;
  color: #2c2c2c;
}

.design-preset-creative .pv-category-chip {
  border: 2px solid var(--pv-accent-2);
  background: transparent;
  color: var(--pv-accent);
  font-weight: 700;
}

.design-preset-creative .pv-category-chip.active {
  background: var(--pv-accent);
  border-color: var(--pv-accent);
  color: #fff;
}

.design-preset-tech .pv-category-chip {
  border: 1px solid #555;
  background: #1a1a1a;
  color: #ddd;
  font-family: var(--pv-font);
  font-size: 10px;
  font-weight: 700;
}

.design-preset-tech .pv-category-chip.active {
  background: var(--pv-accent);
  border-color: var(--pv-accent);
  color: #1a1a1a;
}

.design-preset-corporate .pv-category-chip {
  border: 1px solid #d0d0d0;
  background: #f8f9fa;
}

.design-preset-corporate .pv-category-chip.active {
  background: var(--pv-accent);
  border-color: var(--pv-accent);
}

.design-preset-glass .pv-category-chip {
  border: 1px solid rgb(var(--fg-rgb) / 0.3);
  background: rgb(var(--fg-rgb) / 0.1);
  backdrop-filter: blur(4px);
}

.design-preset-glass .pv-category-chip.active {
  background: var(--pv-accent);
  border-color: var(--pv-accent);
  backdrop-filter: blur(0);
}

.design-preset-dark .pv-category-chip {
  border: 1px solid #555;
  background: #1a1a1a;
}

.design-preset-dark .pv-category-chip.active {
  background: var(--pv-accent);
  border-color: var(--pv-accent);
}

.design-preset-soft .pv-category-chip {
  border: 1px solid #f0d9a8;
  background: #fffaf5;
  color: #2c2410;
}

.design-preset-soft .pv-category-chip.active {
  background: var(--pv-accent);
  border-color: var(--pv-accent);
  color: #fff;
}

/* Hero section design-specific styling */
.design-preset-minimal .pv-hero {
  padding: 32px var(--pv-pad);
  text-align: center;
  background: transparent;
}

.design-preset-modern .pv-hero {
  padding: 24px var(--pv-pad);
  background: linear-gradient(135deg, rgba(79, 109, 245, 0.05), rgba(34, 195, 166, 0.05));
  border-radius: 12px;
  margin: 0 var(--pv-pad) var(--pv-pad);
}

.design-preset-luxury .pv-hero {
  padding: 32px var(--pv-pad);
  background: rgba(184, 134, 63, 0.03);
  border: 1px solid rgba(184, 134, 63, 0.2);
  border-radius: 8px;
  margin: 0 var(--pv-pad) var(--pv-pad);
}

.design-preset-editorial .pv-hero {
  padding: 48px var(--pv-pad) 32px;
  text-align: center;
  background: transparent;
}

.design-preset-editorial .pv-hero-title {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.design-preset-tech .pv-hero {
  padding: 16px var(--pv-pad);
  background: #0a0a0a;
  border-bottom: 1px solid #333;
}

.design-preset-tech .pv-hero-title {
  font-family: var(--pv-font);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.design-preset-creative .pv-hero {
  padding: 28px var(--pv-pad);
  background: linear-gradient(135deg, rgba(232, 87, 138, 0.08), rgba(255, 165, 61, 0.08));
  border-radius: 12px;
  margin: 0 var(--pv-pad) var(--pv-pad);
  border: 2px solid var(--pv-accent-2);
}

.design-preset-soft .pv-hero {
  padding: 24px var(--pv-pad);
  background: rgba(224, 133, 90, 0.05);
  border-radius: 10px;
  margin: 0 var(--pv-pad) var(--pv-pad);
}

.design-preset-corporate .pv-hero {
  padding: 20px var(--pv-pad);
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin: 0 var(--pv-pad) var(--pv-pad);
}

.design-preset-glass .pv-hero {
  padding: 24px var(--pv-pad);
  background: rgb(var(--fg-rgb) / 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgb(var(--fg-rgb) / 0.2);
  border-radius: 16px;
  margin: 0 var(--pv-pad) var(--pv-pad);
}

.design-preset-dark .pv-hero {
  padding: 24px var(--pv-pad);
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  margin: 0 var(--pv-pad) var(--pv-pad);
}

/* Header and layout styling per design */
.design-preset-minimal .pv-header {
  border: none;
  box-shadow: none;
  border-bottom: 1px solid #f0f0f0;
  padding: 16px var(--pv-pad);
}

.design-preset-modern .pv-header {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 16px var(--pv-pad);
}

.design-preset-luxury .pv-header {
  border-bottom: 2px solid var(--pv-accent);
  box-shadow: none;
  padding: 20px var(--pv-pad);
}

.design-preset-editorial .pv-header {
  border: none;
  box-shadow: none;
  padding: 32px var(--pv-pad);
  text-align: center;
}

.design-preset-tech .pv-header {
  border-bottom: 1px solid #333;
  box-shadow: none;
  padding: 12px var(--pv-pad);
  background: #0a0a0a;
}

.design-preset-tech .pv-header h1 {
  font-family: var(--pv-font);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.design-preset-creative .pv-header {
  border: none;
  box-shadow: 0 4px 12px rgba(232, 87, 138, 0.15);
  padding: 16px var(--pv-pad);
}

.design-preset-soft .pv-header {
  border: none;
  box-shadow: 0 2px 8px rgba(224, 133, 90, 0.1);
  padding: 16px var(--pv-pad);
}

/* ============ Accessibility & UX Improvements ============ */

/* Ensure minimum touch target size (44x44px WCAG compliance) */
button, a[role="button"], input[type="button"], input[type="submit"] {
  min-width: 44px;
  min-height: 44px;
}

/* Better keyboard focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent, #4f6df5);
  outline-offset: 2px;
}

/* Remove default outline and add custom one */
button:focus,
a:focus {
  outline: none;
}

/* Better hover states */
button:not(:disabled):hover,
a[role="button"]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  transition: all var(--dur-fast) var(--ease);
}

/* Active state feedback */
button:not(:disabled):active,
a[role="button"]:active {
  transform: translateY(1px);
}

/* Disabled state */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Better contrast for links */
a {
  color: var(--accent, #4f6df5);
  text-decoration: underline;
  text-underline-offset: 4px;
}

a:visited {
  color: var(--accent, #4f6df5);
  opacity: 0.7;
}

/* Skip to main content link (accessibility) */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent, #4f6df5);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 9999;
}

.skip-to-content:focus {
  top: 0;
}

/* Better form focus states */
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent, #4f6df5);
  box-shadow: 0 0 0 3px rgba(79, 109, 245, 0.1);
}

/* Reduce motion for animations if user prefers */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .design-changed-toast,
  .design-card-flash,
  .option-card-committing { animation: none; }
}

/* ============================= Preview window ============================= */

/* The preview is a site inside a browser window: the window (bar, border,
   shadow) belongs to the wizard and always matches its dark glass theme,
   while the page inside carries the chosen design's own colours. Framing it
   this way is what stops a light design from reading as a stray cream block
   in a dark UI. */
.preview-window {
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.preview-window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.preview-window-dots { display: flex; gap: 6px; flex: none; }
.preview-window-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.preview-window-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-window-url svg { flex: none; color: var(--accent-2); }

@media (max-width: 979px) {
  .preview-frame { height: calc(100dvh - 210px - var(--safe-top, 0px)); }
}

/* Step subtitles are sentences, not table cells: let them wrap. */
.wizard-subtitle {
  margin: 4px 0 18px;
  max-width: 62ch;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.9;
}
.wizard-subtitle-tight { margin-bottom: 12px; }

@media (max-width: 520px) {
  .feature-base-toggle-label { display: none; }
}


/* ===================== Features step: base / starting point / add-ons ===================== */
.feature-base-note { margin: 0; padding: 0 14px 12px; font-size: 12.5px; line-height: 1.8; color: var(--text-muted); }
.feature-start { display: grid; gap: 10px; margin: 18px 0 14px; }
.feature-start-title { margin: 0; font-size: 15px; font-weight: 800; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.feature-start-title small { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.feature-start-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.feature-start-card {
  display: grid; gap: 4px; align-content: start; justify-items: start; text-align: start; min-height: 96px; padding: 12px 14px;
  border-radius: 18px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-family: inherit; cursor: pointer;
  transition: transform .4s cubic-bezier(.34, 1.4, .5, 1), border-color .25s, background .25s;
}
.feature-start-card:hover { transform: translateY(-2px); }
.feature-start-card.is-on { border-color: var(--text); background: rgb(var(--fg-rgb) / .1); transform: translateY(-2px); }
.feature-start-card:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.feature-start-name { font-size: 14.5px; font-weight: 800; }
.feature-start-count { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: rgb(var(--fg-rgb) / .1); }
.feature-start-card.is-on .feature-start-count { background: #e9edf6; color: #0f1626; }
.feature-start-desc { font-size: 12.5px; line-height: 1.7; color: var(--text-muted); }
.feature-start-custom { margin: 0; padding: 8px 14px; border-radius: 14px; background: rgb(var(--fg-rgb) / .06); color: var(--text-muted); font-size: 13px; }
@media (max-width: 560px) {
  .feature-start-cards { grid-template-columns: minmax(0, 1fr); }
  .feature-start-card { min-height: 0; grid-template-columns: 1fr auto; align-items: center; }
  .feature-start-desc { grid-column: 1 / -1; }
}

/* ===================== Wizard primary actions =====================
   Same bordered, unfilled primary as the rest of the site (see site.css .btn-primary). */
#configurator-root .step-bar-next { background: transparent; color: var(--accent-2); border: 1.5px solid var(--accent-2); box-shadow: none; }

/* Conversational header (replaces the numbered step tabs) */
.cv-head { display: grid; gap: 10px; margin: 0 0 26px; }
.cv-row { display: flex; align-items: center; gap: 12px; }
.cv-back { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; transition: transform .3s var(--ease), background .2s; }
.cv-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cv-back:hover:not(.cv-back-ghost) { transform: translateX(3px); background: var(--accent-2-soft); }
:root[dir='ltr'] .cv-back svg { transform: scaleX(-1); }
:root[dir='ltr'] .cv-back:hover:not(.cv-back-ghost) { transform: translateX(-3px); }
.cv-back-ghost { visibility: hidden; }
.cv-where { flex: 1; font-weight: 700; font-size: 15px; }
.cv-count { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cv-bar { height: 4px; border-radius: 99px; background: var(--surface-2, rgb(var(--fg-rgb) / .08)); overflow: hidden; }
.cv-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent-2); transition: width .45s var(--ease); }
:root[dir='ltr'] .cv-bar i { margin-inline-start: 0; }
.cv-note { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.wizard-body .panel-section-head h3 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.8rem); }
@media (prefers-reduced-motion: reduce) { .cv-bar i, .cv-back { transition: none; } }
.panel-section:has(.cv-back:not(.cv-back-ghost)) .cfg-back { visibility: hidden; }

/* Style / colour split on the design step */
.design-section-title { margin: 22px 0 6px; font-size: 1.05rem; font-weight: 800; }
.design-section-note { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.palette-block { margin-top: 6px; }
.palette-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.palette-row::-webkit-scrollbar { display: none; }
.palette-chip { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 99px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; transition: transform .3s var(--ease), border-color .2s, background .2s; }
.palette-chip:hover { transform: translateY(-2px); }
.palette-chip.selected { border-color: var(--accent-2); background: var(--accent-2-soft); font-weight: 700; }
.palette-chip:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.palette-dots { display: inline-flex; }
.palette-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); }
.palette-dots i + i { margin-inline-start: -7px; }
.palette-dots-auto { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#4f6df5, #22c3a6, #e8578a, #b8863f, #4f6df5); }
@media (prefers-reduced-motion: reduce) { .palette-chip { transition: none; } }

/* Paid picks */
.paid-tag { display: inline-flex; align-items: center; margin-inline-start: 8px; padding: 1px 9px; border-radius: 99px; border: 1px solid var(--accent-2-border, var(--accent-2)); color: var(--accent-2); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.paid-legend { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.paid-summary ul { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.paid-summary li, .paid-total { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.paid-total { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 4px; }
.paid-summary small { color: var(--text-muted); }
.paid-topup-link { color: var(--accent-2); font-weight: 700; text-decoration: underline; }

/* Look panel: colour swatches + light/dark, compact and always visible above the styles */
.look-panel { display: grid; gap: 14px; margin: 14px 0 6px; padding: 14px 16px; border-radius: var(--radius-lg, 18px); border: 1px solid var(--border-strong); background: var(--surface); }
.look-row { display: grid; gap: 8px; }
.look-label { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid transparent; outline: 1px solid var(--border-strong); outline-offset: 0; cursor: pointer; padding: 0; transition: transform .25s var(--ease), box-shadow .2s; }
.swatch:hover { transform: scale(1.1); }
.swatch.selected { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-2); transform: scale(1.06); }
.swatch:focus-visible { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.swatch-auto { background: conic-gradient(#4f6df5, #22c3a6, #e8578a, #b8863f, #4f6df5); position: relative; }
.swatch-auto::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.look-current { margin: 0; font-size: 13.5px; color: var(--text); }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--surface-2, rgb(var(--fg-rgb) / .07)); width: fit-content; gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 99px; background: none; color: var(--text-muted); font: inherit; font-size: 14px; cursor: pointer; transition: background .2s, color .2s; }
.seg-btn.selected { background: var(--accent-2-soft); color: var(--accent-2); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--accent-2); }
.seg-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .swatch, .seg-btn { transition: none; } }

/* Summary step: the (long) list of included features stays closed until asked for. */
.summary-features { margin: 4px 0 22px; border: 1px solid var(--border, rgb(var(--fg-rgb) / .12)); border-radius: 18px; background: rgb(var(--fg-rgb) / .03); }
.summary-features > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 16px; min-height: 52px; border-radius: 18px; }
.summary-features > summary::-webkit-details-marker { display: none; }
.summary-features > summary > span { font-weight: 600; }
.summary-features > summary > small { grid-column: 1; color: var(--text-muted, #9aa7bd); }
.summary-features > summary > svg { grid-row: 1 / span 2; grid-column: 2; transition: transform .25s ease; }
.summary-features[open] > summary > svg { transform: rotate(180deg); }
.summary-features > summary:focus-visible { outline: 2px solid var(--accent-2, #8bc74b); outline-offset: 2px; }
.summary-features > .tag-chip-row { padding: 0 16px 16px; }
@media (prefers-reduced-motion: reduce) { .summary-features > summary > svg { transition: none; } }

/* ── The last step's account gate: email, then a six-digit code, right inside the wizard ── */
.cfg-gate { display: grid; gap: 10px; margin: 0 0 20px; padding: 18px; border-radius: 20px; border: 1px solid var(--accent-2-border, rgba(139,199,75,.35)); background: linear-gradient(160deg, var(--accent-2-soft, rgba(139,199,75,.12)), transparent 70%), var(--surface, rgb(var(--fg-rgb) / .06)); }
.cfg-gate h4 { margin: 0; font-size: 18px; line-height: 1.5; }
.cfg-gate-lead { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.85; }
.cfg-gate-form { display: grid; gap: 8px; }
.cfg-gate-form label { font-size: 13px; color: var(--text-muted); }
.cfg-gate-row { display: flex; gap: 10px; align-items: stretch; }
.cfg-gate-row input { flex: 1; min-width: 0; min-height: 48px; }
.cfg-gate-row .btn { min-height: 48px; flex: none; white-space: nowrap; }
.cfg-gate-sent { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--text); }
.cfg-gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cfg-gate-actions .btn { min-height: 44px; }
.cfg-gate-link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 13.5px; min-height: 44px; padding: 0 4px; }
.cfg-gate-link:hover { text-decoration: underline; }
.cfg-gate-error { margin: 0; }
.cfg-gate-fine { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.cfg-gate-fine a { color: var(--accent); }
.cfg-gate-need { text-align: center; margin-top: 10px; }
.cfg-gate-done { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--accent-2-border, rgba(139,199,75,.35)); background: var(--accent-2-soft, rgba(139,199,75,.12)); }
.cfg-gate-done > span:first-child { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-2, #8bc74b); color: #0b1320; font-weight: 800; }
.cfg-gate-done b { display: block; font-size: 14.5px; overflow-wrap: anywhere; } .cfg-gate-done small { display: block; color: var(--text-muted); font-size: 12.5px; }
.cfg-draft { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; border: 1px dashed var(--accent-border, rgba(220,182,121,.4)); background: var(--accent-soft, rgba(220,182,121,.1)); font-size: 14px; }
.cfg-draft > div { display: flex; gap: 8px; }
.cfg-draft .btn { min-height: 44px; }
@media (max-width: 520px) {
  .cfg-gate { padding: 16px 14px; }
  .cfg-gate-row { flex-direction: column; }
  .cfg-gate-row .btn { width: 100%; }
  .cfg-draft > div { width: 100%; } .cfg-draft .btn { flex: 1; }
}
.cfg-gate input[type="email"], .cfg-gate .otp-input { box-sizing: border-box; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border-strong, rgb(var(--fg-rgb) / .25)); background: rgba(8,13,22,.55); color: var(--text, #fff); font-family: inherit; font-size: 16px; }
.cfg-gate input[type="email"]:focus, .cfg-gate .otp-input:focus { outline: 0; border-color: var(--accent-2, #8bc74b); box-shadow: 0 0 0 3px var(--accent-2-soft, rgba(139,199,75,.2)); }
.cfg-gate input[readonly] { opacity: .8; }
.cfg-gate > *, .cfg-gate-form, .cfg-gate-row { min-width: 0; }
.cfg-gate-form { grid-template-columns: minmax(0, 1fr); }
.cfg-gate input { width: 100%; min-width: 0; }
.cfg-gate-chat { text-align: center; margin-top: 4px; }

/* ============ Compact wizard: every step fits one screen, nothing but the choice ============ */
.st { display: grid; gap: 14px; align-content: start; }
.st-title { margin: 0; font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); font-weight: 800; line-height: 1.5; }
.wizard-body .panel-section-head h3 { font-size: 1.15rem; }
.cv-head { margin-bottom: 14px; gap: 8px; }
.lang-switcher-row { margin-bottom: 4px; }
.wizard-nav { margin-top: 4px; }

.style-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .style-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.style-chip { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 58px; padding: 6px 10px 6px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: start; cursor: pointer; font: inherit; transition: border-color .2s, background .2s, transform .15s; }
.style-chip:hover { border-color: var(--accent-2-border); }
.style-chip.selected { border-color: var(--accent-2); background: var(--accent-2-soft); box-shadow: 0 0 0 2px var(--accent-2-soft); }
.style-chip-sw { width: 56px; height: 44px; border-radius: 9px; overflow: hidden; position: relative; background: var(--pv-bg, #111); border: 1px solid var(--border); }
.style-chip-sw .design-swatch { position: absolute; inset: 0 auto auto 0; width: 168px; height: 132px; transform: scale(.333); transform-origin: top left; pointer-events: none; }
:root[dir='rtl'] .style-chip-sw .design-swatch { inset: 0 0 auto auto; transform-origin: top right; }
.style-chip-name { font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.style-chip-star { font-style: normal; color: var(--accent); margin-inline-start: 4px; font-size: 12px; }
.style-chip .paid-tag { position: absolute; top: 4px; inset-inline-end: 6px; font-size: 10.5px; }

.color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.color-opt { position: relative; display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; transition: border-color .2s, background .2s; }
.color-opt:hover { border-color: var(--accent-2-border); }
.color-opt.selected { border-color: var(--accent-2); background: var(--accent-2-soft); box-shadow: 0 0 0 2px var(--accent-2-soft); }
.color-dot { width: 44px; height: 44px; border-radius: 50%; outline: 1px solid var(--border-strong); }
.color-dot-auto { background: conic-gradient(from 0deg, #ff7a59, #f5c842, #8bc74b, #3fb8c9, #6f7dff, #c45ad6, #ff7a59); }
.color-name { font-size: 12.5px; line-height: 1.4; text-align: center; }
.color-opt .paid-tag { font-size: 10.5px; }

.sum-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sum-line span { padding: 4px 12px; border-radius: 999px; font-size: 13px; border: 1px solid var(--border); background: var(--surface); }
.sum-paid { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.8; } .sum-paid b { color: var(--accent); }
.subdomain-field { margin: 0; }
.subdomain-suffix { font-size: 13px; color: var(--text-muted); white-space: nowrap; padding-inline: 6px; }
.subdomain-field label { font-size: 14px; font-weight: 700; }
.cfg-gate { margin: 0; }
.cfg-gate-chat { text-align: center; }

@media (max-width: 520px) { #configurator-root .panel-section { padding: 14px 12px; } }

/* The preview never makes the page taller than the screen: it scrolls inside its own frame. */
@media (min-width: 980px) {
  .wizard-body.has-preview .wizard-preview-col { max-height: min(560px, calc(100svh - 280px)); overflow: auto; }
}
.panel-section:has(.cv-back:not(.cv-back-ghost)) .lang-switcher-row { display: none; }
@media (max-width: 979px) { .preview-mobile-topbar { padding-block: 6px; } .cv-head { margin-bottom: 8px; } }

/* ============ Wizard shell v3: one calm column on a phone, a two-column card on a desktop ============ */
.cfg-shell { max-width: 1120px; margin: 0 auto; padding-block: clamp(12px, 3vh, 32px); }
@media (min-width: 900px) { #configurator-root { padding-top: 0; } }
.cfg-shell > .panel-section { min-height: calc(100svh - clamp(24px, 6vh, 64px)); display: flex; flex-direction: column; }
.cfg-shell > .panel-section > div { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cfg-shell .wizard-body { flex: 1; }
.cfg-shell .wizard-main { display: flex; flex-direction: column; }
.cfg-shell .wizard-main > .st, .cfg-shell .wizard-main > div:not(.cfg-draft) { flex: 1; }
.wizard-step-anim { animation: wizardFade .25s var(--ease); }
@keyframes wizardFade { from { opacity: 0; } to { opacity: 1; } }

/* header: back · progress · count · (phone) preview, all on one row */
.cv-head { margin: 0 0 14px; gap: 0; }
.cv-row { gap: 12px; }
.cv-back { width: 40px; height: 40px; text-decoration: none; }
.cv-bar { flex: 1; min-width: 0; }
.cv-eye { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--accent-2-border); background: var(--accent-2-soft); color: var(--accent-2); cursor: pointer; }
.cv-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 980px) { .cv-eye { display: none; } }

/* the choice buttons sit in a dock at the bottom of the screen on a phone, inline on a desktop */
.wizard-nav { margin-top: auto; padding-top: 14px; }
.wizard-nav .btn { min-height: 48px; }
.wizard-nav .wizard-nav-next { flex: 1; }
@media (max-width: 979px) {
  .wizard-nav-next { display: inline-flex; }
  .wizard-nav { justify-content: stretch; position: fixed; inset-inline: 0; bottom: 0; z-index: 30; margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgb(var(--glass-rgb) / .88); border-top: 1px solid var(--border); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .cfg-shell { padding-bottom: 96px; }
  .cfg-shell > .panel-section { min-height: calc(100svh - 24px - 84px); }
}
@media (max-width: 520px) { .cfg-shell { padding-inline: 10px; } }

/* type step: big tappable cards that use the height */
.option-grid { gap: 12px; }
.wizard-main-narrow .option-grid { flex: 1; grid-auto-rows: minmax(88px, 1fr); align-content: stretch; }
.option-card { align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 88px; }
.option-card-icon { width: 38px; height: 38px; fill: none; stroke: var(--accent-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.option-card-title { font-size: 1.1rem; }
@media (min-width: 900px) { .wizard-main-narrow .option-grid { max-width: 980px; margin-inline: auto; width: 100%; grid-auto-rows: minmax(150px, 220px); align-content: center; } }

/* style and colour steps: chips fill the width, comfortable targets */
.st { align-content: start; }
.st-title { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem); }
.style-chip { min-height: 64px; }
.color-opt { padding-block: 14px 10px; }
.color-dot { width: 48px; height: 48px; }
@media (min-width: 980px) { .color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .st-title { margin-bottom: 4px; } }
/* a blurred glass panel would become the containing block of the fixed dock: no blur here */
.cfg-shell > .panel-section { backdrop-filter: none; -webkit-backdrop-filter: none; -webkit-mask: none; mask: none; }
.cfg-shell .wizard-body:not(.has-preview) { display: flex; flex-direction: column; }
.cfg-shell .wizard-main > div:not(.cfg-draft) { display: flex; flex-direction: column; }
.cfg-shell .wizard-main > .st { display: grid; grid-template-rows: auto auto; align-content: start; }
.cfg-shell .wizard-main > .st > .wizard-nav { align-self: end; }
.cfg-shell .wizard-main > div > .option-grid { flex: 1; }
.cfg-shell > .panel-section { margin-bottom: 0; }
body.site-body:has(.cfg-shell) { padding-bottom: 0; }
@media (max-width: 979px) { .cfg-shell > .panel-section { min-height: calc(100svh - 108px); } }
@media (max-width: 979px) { .cfg-shell { padding-top: 12px; } .cfg-shell > .panel-section { min-height: calc(100svh - 108px); } }
.cfg-shell .wizard-body:not(.has-preview) > .wizard-main { flex: 1; }
.cfg-shell .wizard-main-narrow > div { gap: 12px; }

/* ============ Wizard v4: no outer box; the back button, the progress and the preview button are glass pieces of their own ============ */
.cfg-shell > .panel-section { background: none; border: 0; box-shadow: none; padding-inline: 0; border-radius: 0; }
.cv-head { margin-bottom: 16px; }
.cv-back, .cv-eye, .cv-pill { background: rgb(var(--glass-rgb) / .55); border: 1px solid var(--border-strong); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .75), inset 0 1px 0 rgb(var(--fg-rgb) / .12); transition: transform .45s cubic-bezier(.34, 1.4, .5, 1), background .25s, border-color .25s; }
.cv-back, .cv-eye { width: 44px; height: 44px; }
.cv-eye { color: var(--accent-2); }
.cv-back:hover:not(.cv-back-ghost), .cv-eye:hover { border-color: var(--accent-2-border); background: rgba(139, 199, 75, .12); }
.cv-back:active, .cv-eye:active { transform: scale(.9); }
.cv-pill { flex: 1; min-width: 0; height: 44px; border-radius: 999px; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.cv-pill .cv-bar { flex: 1; height: 5px; }
.cv-pill .cv-count { flex: none; font-size: 12.5px; }
.cv-bar i { transition: width .6s cubic-bezier(.22, 1, .36, 1); }

/* preview: laid out at a fixed size and scaled to fit, so it never scrolls */
.preview-fit { position: relative; width: 100%; overflow: hidden; }
.preview-scaler { position: absolute; top: 0; left: 50%; transform-origin: top center; }
.preview-scaler .preview-window { height: 100%; display: flex; flex-direction: column; }
.preview-scaler .preview-frame { flex: 1; height: auto; min-height: 0; overflow: hidden; }
@media (max-width: 979px) { .preview-scaler .preview-frame { height: auto; } }
@media (min-width: 980px) { .wizard-body.has-preview .wizard-preview-col { max-height: none; overflow: visible; } }

/* ============ Progress: four strands. Done = lit, current = charging + flowing + a comet of light + breathing glow, to come = dim ============ */
.cv-strands { flex: 1; min-width: 0; height: 14px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; align-items: center; --ac: #8bc74b; --ac2: #5fd0a4; --o: right; }
:root[dir='ltr'] .cv-strands { --o: left; }
.cv-strands i { position: relative; height: 8px; overflow: hidden; border-radius: 99px; background: rgb(var(--fg-rgb) / .12); transition: height .5s cubic-bezier(.34, 1.4, .5, 1), box-shadow .5s ease; }
.cv-strands i::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--ac); transform: scaleX(0); transform-origin: var(--o); transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
.cv-strands i.done::before, .cv-strands i.now::before { transform: scaleX(1); }
.cv-strands i.done { box-shadow: 0 0 10px -3px var(--ac); }
.cv-strands i.now { height: 14px; animation: cv-breathe 2s ease-in-out infinite; }
.cv-strands i.now::before { background: linear-gradient(100deg, var(--ac), var(--ac2), var(--ac)); background-size: 250% 100%; animation: cv-charge 1s cubic-bezier(.22, 1, .36, 1) backwards, cv-flow 2.2s linear infinite; }
.cv-strands i.now::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(100deg, transparent 35%, rgb(255 255 255 / .75) 50%, transparent 65%); background-size: 220% 100%; animation: cv-glint 1.7s ease-in-out infinite; mix-blend-mode: soft-light; }
@keyframes cv-charge { from { transform: scaleX(0); } }
@keyframes cv-flow { to { background-position: -250% 0; } }
@keyframes cv-glint { from { background-position: 160% 0; } to { background-position: -60% 0; } }
@keyframes cv-breathe { 0%, 100% { box-shadow: 0 0 6px -2px var(--ac); } 50% { box-shadow: 0 0 18px 0 var(--ac); } }
@media (prefers-reduced-motion: reduce) { .cv-strands i, .cv-strands i::before { transition: none; } .cv-strands i.now, .cv-strands i.now::before, .cv-strands i.now::after { animation: none; } }

/* Address choice on the last step: an address under ours, or the visitor's own domain. Two big, thumb-sized options. */
.addr-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.addr-opt {
  display: grid; gap: 4px; text-align: start; padding: 12px 14px; border-radius: 14px; cursor: pointer; font: inherit; color: inherit;
  border: 1px solid var(--border, rgba(127, 127, 127, .3)); background: var(--surface);
  transition: border-color var(--dur-fast, .18s) var(--ease, ease), background var(--dur-fast, .18s) var(--ease, ease), transform var(--dur-fast, .18s) var(--ease, ease);
}
.addr-opt b { font-size: .95rem; }
.addr-opt small { color: var(--text-muted, inherit); opacity: .8; font-size: .78rem; line-height: 1.6; }
.addr-opt:hover { border-color: var(--accent-2-border); }
.addr-opt:active { transform: scale(.985); }
.addr-opt.is-on { border-color: var(--accent-2); background: var(--accent-2-soft); }
.addr-opt:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.own-steps { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: .84rem; line-height: 1.9; }
.own-steps ol { margin: 6px 0 0; padding-inline-start: 20px; color: var(--text-muted, inherit); }
@media (max-width: 480px) { .addr-mode { gap: 8px; } .addr-opt { padding: 10px 11px; } .addr-opt b { font-size: .88rem; } .addr-opt small { font-size: .72rem; } }

/* Waiting overlay after "build my site": a ring, a line that moves on, four quiet dots. */
.sub-wait { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--bg, #0b1320) 82%, transparent); backdrop-filter: blur(8px); animation: sw-in .3s ease both; }
.sub-wait-card { display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 320px; }
.sub-wait-card b { font-size: 1.15rem; }
.sub-wait-card p { margin: 0; color: var(--text-muted); font-size: .92rem; line-height: 1.8; min-height: 3.4em; animation: sw-line .45s ease both; }
.sub-wait-ring { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--accent-2-soft); border-top-color: var(--accent-2); border-inline-end-color: var(--accent-2); animation: sw-spin 1.1s cubic-bezier(.5, .1, .5, .9) infinite; box-shadow: 0 0 28px var(--accent-2-soft); }
.sub-wait-dots { display: flex; gap: 7px; }
.sub-wait-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); opacity: .25; animation: sw-dot 1.2s ease-in-out infinite; }
.sub-wait-dots i:nth-child(2) { animation-delay: .15s; } .sub-wait-dots i:nth-child(3) { animation-delay: .3s; } .sub-wait-dots i:nth-child(4) { animation-delay: .45s; }
@keyframes sw-spin { to { transform: rotate(360deg); } }
@keyframes sw-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sw-line { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sw-dot { 0%, 100% { opacity: .25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .sub-wait-ring, .sub-wait-dots i { animation: none; } .sub-wait-dots i { opacity: .8; } }

/* ===== Step 1 (type lab model 10): an open-and-see list with the live preview beside it (above it on a phone) ===== */
.pt { display: grid; gap: 14px; align-content: start; }
.pt-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.pt-list { display: grid; gap: 10px; }
.pt-row { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: border-color .25s, background .25s, box-shadow .4s; }
.pt-row.on { border-color: var(--accent-2); background: var(--accent-2-soft); box-shadow: 0 18px 40px -26px var(--accent-2); }
.pt-row-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 72px; background: none; border: 0; text-align: start; color: inherit; font: inherit; cursor: pointer; }
.pt-ico { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-2-soft); color: var(--accent-2); transition: transform .4s cubic-bezier(.34, 1.6, .5, 1); }
.pt-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pt-row.on .pt-ico { transform: scale(1.1) rotate(-4deg); }
.pt-row-t { flex: 1; min-width: 0; display: grid; gap: 2px; } .pt-row-t b { font-size: 1.02rem; } .pt-row-t small { color: var(--text-muted); line-height: 1.6; }
.pt-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); position: relative; transition: border-color .25s; }
.pt-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent-2); transform: scale(0); transition: transform .35s cubic-bezier(.34, 1.7, .5, 1); }
.pt-row.on .pt-radio { border-color: var(--accent-2); } .pt-row.on .pt-radio::after { transform: scale(1); }
.pt-row-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.22, 1, .36, 1); } .pt-row.on .pt-row-b { grid-template-rows: 1fr; }
.pt-row-b > div { overflow: hidden; min-height: 0; padding-inline: 14px; } .pt-row.on .pt-row-b > div { padding-bottom: 14px; }
.pt-l { margin: 4px 0 6px; font-size: .78rem; font-weight: 800; color: var(--text-muted); }
.pt-row-b ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .pt-row-b li::before { content: "✓ "; color: var(--accent-2); font-weight: 800; }
.pt-go { margin-top: 12px; width: 100%; min-height: 48px; border: 0; border-radius: 99px; background: var(--accent-2); color: var(--accent-ink, #12100a); font: inherit; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 10px 28px -12px var(--accent-2); transition: transform .3s cubic-bezier(.34, 1.5, .5, 1), filter .2s; }
.pt-go:hover { transform: translateY(-2px); filter: brightness(1.07); } .pt-go:active, .pt-go.is-busy { transform: scale(.97); }
.pt-go i { font-style: normal; transition: transform .25s; } .pt-go:hover i { transform: translateX(-4px); }
.pt-soon { margin: 4px 2px 0; color: var(--text-muted); font-size: .84rem; line-height: 1.8; } .pt-soon span { font-weight: 700; }
.pt-stage { position: sticky; inset-block-start: 76px; min-height: 120px; }
.pt-stage-clip { animation: pt-in .5s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes pt-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.pt-hint { margin: 0; display: grid; place-items: center; text-align: center; min-height: 220px; padding: 20px; color: var(--text-muted); border-radius: var(--radius-lg); border: 1px dashed var(--border-strong); line-height: 1.9; }
@media (max-width: 899px) {
  .pt-split { grid-template-columns: 1fr; gap: 12px; }
  .pt-stage { order: -1; position: relative; inset-block-start: auto; }
  .pt-stage.has .pt-stage-clip { max-height: 250px; overflow: hidden; border-radius: var(--radius-md); -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
  .pt-hint { min-height: 64px; padding: 12px; }
  .pt-row-h { min-height: 64px; padding: 10px 12px; } .pt-row-t small { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .pt-stage-clip { animation: none; } .pt-row-b, .pt-ico { transition: none; } }

.own-fee { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--accent-2-soft); border: 1px solid var(--accent-2-border); color: var(--text); font-size: .84rem; line-height: 1.8; }

/* own-domain payment: what it costs, what the wallet has, and a way forward when it is short */
.own-pay { margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 10px; }
.own-pay.is-short { border-color: color-mix(in srgb, var(--danger) 55%, transparent); } .own-pay.is-ok { border-color: var(--accent-2-border); background: var(--accent-2-soft); }
.own-pay dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; } .own-pay dl div { display: grid; gap: 2px; min-width: 0; }
.own-pay dt { font-size: .72rem; color: var(--text-muted); } .own-pay dd { margin: 0; font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.own-pay.is-short dl div:last-child dd { color: var(--danger); } .own-pay.is-ok dl div:last-child dd { color: var(--accent-2); }
.own-pay p { margin: 0; font-size: .84rem; line-height: 1.9; color: var(--text-muted); }
.own-pay-actions { display: flex; flex-wrap: wrap; gap: 8px; } .own-pay-actions .btn { flex: 1 1 200px; text-align: center; }
@media (max-width: 480px) { .own-pay dl { grid-template-columns: 1fr; } }

.pay-error { display: grid; gap: 8px; justify-items: start; padding: 14px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.pay-error p { margin: 0; line-height: 1.9; font-size: .9rem; } .pay-error-note { color: var(--text-muted); font-size: .82rem !important; }

/* ============ Wizard v5: header and dock stay put, content slides beneath them ============ */
.cv-head { position: sticky; inset-block-start: calc(6px + env(safe-area-inset-top)); z-index: 45; margin-inline: -4px; padding: 6px 4px 8px; }
.cv-head::before { content: ""; position: absolute; inset: -14px 0 0 0; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 72%, transparent), color-mix(in srgb, var(--bg) 38%, transparent) 55%, transparent); }
.cv-theme { flex: none; width: 44px; height: 44px; }
.wizard-main.wizard-step-anim { animation: wizardUnder .38s var(--ease) both; position: relative; z-index: 1; }
@keyframes wizardUnder { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

@media (max-width: 979px) {
  .wizard-dock { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 60; margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, color-mix(in srgb, var(--bg) 70%, transparent), color-mix(in srgb, var(--bg) 30%, transparent) 60%, transparent); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; transform: translateZ(0); pointer-events: none; }
  .wizard-dock .btn { pointer-events: auto; background: rgb(var(--glass-rgb) / .55); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .75), inset 0 1px 0 rgb(var(--fg-rgb) / .12); }
  .wizard-dock .btn-primary { border: 1.5px solid var(--accent-2); color: var(--accent-2); }
  .wizard-dock .btn[disabled] { opacity: .45; }
}
@media (prefers-reduced-motion: reduce) { .wizard-main.wizard-step-anim { animation: none; } }

/* ============ Colour step: families, many pairs, a colour of your own ============ */
.color-fam { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .color-fam::-webkit-scrollbar { display: none; }
.color-fam-chip { flex: none; min-height: 36px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font: inherit; font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.color-fam-chip.on { background: var(--accent-2-soft); border-color: var(--accent-2); color: var(--accent-2); font-weight: 800; }
.color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 980px) { .color-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.color-opt { animation: colorIn .35s var(--ease) both; }
@keyframes colorIn { from { opacity: 0; transform: scale(.92); } }
.color-opt.selected .color-dot { transform: scale(1.08); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-2); }
.color-dot { transition: transform .35s cubic-bezier(.34, 1.4, .5, 1), box-shadow .25s; }
.color-dot-mix { position: relative; background: conic-gradient(from 90deg, #ff4d6d, #ffb703, #8ac926, #1982c4, #6a4c93, #ff4d6d); display: grid; place-items: center; }
.color-dot-mix i { font-style: normal; font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.color-sub { font-size: 11px; color: var(--text-muted); margin-top: -4px; }
.color-mix { display: grid; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--accent-2-border); background: var(--accent-2-soft); animation: mixIn .4s var(--ease); }
@keyframes mixIn { from { opacity: 0; transform: translateY(-8px); } }
.color-mix-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-pick { display: grid; gap: 6px; font-size: 13px; color: var(--text-muted); } .color-pick.is-auto { opacity: .7; }
.color-pick-box { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); }
.color-pick-box input[type=color] { flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; } .color-pick-box input[type=color]:disabled { cursor: default; }
.color-pick-box input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .color-pick-box input[type=color]::-webkit-color-swatch { border: 0; border-radius: 10px; }
.color-pick-box b { font-size: 13px; color: var(--text); letter-spacing: .03em; }
.color-auto { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; } .color-auto input { width: 20px; height: 20px; accent-color: var(--accent-2); }
.color-mix-demo { display: flex; align-items: center; gap: 8px; }
.demo-btn { min-width: 52px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); } .demo-bar { flex: 1; height: 10px; border-radius: 99px; }
.color-read { margin: 0; font-size: 13px; display: grid; gap: 2px; } .color-read small { color: var(--text-muted); font-size: 12px; }
.color-read.is-good { color: var(--accent-2); } .color-read.is-ok { color: var(--text); } .color-read.is-low { color: #e8a04a; }

/* ============ Preview coach: dimmed, softly blurred page with one lit spot ============ */
.coach { position: fixed; inset: 0; z-index: 200; }
.coach-dim { position: absolute; inset: 0; background: rgb(4 9 20 / .56); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: clip-path .75s cubic-bezier(.22, 1, .36, 1); animation: coachFade .5s ease both; }
@keyframes coachFade { from { opacity: 0; } }
.coach-ring { position: absolute; border-radius: 22px; border: 2px solid var(--accent-2); box-shadow: 0 0 0 4px rgb(var(--accent-2-rgb, 139 199 75) / .22), 0 0 34px rgb(var(--accent-2-rgb, 139 199 75) / .5); pointer-events: none; transition: all .75s cubic-bezier(.22, 1, .36, 1); }
.coach-ring::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--accent-2); animation: coachPulse 1.8s ease-out infinite .7s; }
@keyframes coachPulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
.coach-bubble { position: absolute; padding: 18px 18px 16px; border-radius: 22px; background: var(--bg-elevated, #0d1424); border: 1px solid var(--accent-2-border); color: var(--text); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); display: grid; gap: 8px; opacity: 0; transform: translateY(14px) scale(.94); transform-origin: top center; transition: opacity .45s ease .35s, transform .6s cubic-bezier(.34, 1.4, .5, 1) .35s; }
.coach-bubble.on { opacity: 1; transform: none; }
.coach-bubble::before { content: ""; position: absolute; inset-block-start: -8px; left: calc(var(--arrow, 40px) - 8px); width: 16px; height: 16px; background: inherit; border-inline-start: 1px solid var(--accent-2-border); border-block-start: 1px solid var(--accent-2-border); transform: rotate(45deg); }
.coach-bubble.inside::before { display: none; }
.coach-eye { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-2-soft); color: var(--accent-2); border: 1px solid var(--accent-2-border); }
.coach-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.coach-bubble b { font-size: 1.05rem; } .coach-bubble p { margin: 0; font-size: .92rem; line-height: 1.9; color: var(--text-muted); }
.coach-actions { display: flex; gap: 8px; margin-top: 4px; } .coach-actions .btn { flex: 1; min-height: 46px; }
@media (prefers-reduced-motion: reduce) { .coach-dim, .coach-ring, .coach-bubble { transition: none; animation: none; } .coach-ring::after { animation: none; } }

/* ============ Own domain: the notices fold into one line ============ */
.own-fold { border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.own-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font-size: 13.5px; font-weight: 700; }
.own-fold > summary::-webkit-details-marker { display: none; }
.own-fold > summary::after { content: "‹"; margin-inline-start: auto; font-size: 1.2rem; color: var(--text-muted); transition: transform .3s var(--ease); transform: rotate(-90deg); }
.own-fold[open] > summary::after { transform: rotate(90deg); }
.own-fold > summary small { font-weight: 400; color: var(--text-muted); }
.own-fold.is-ok { border-color: var(--accent-2-border); background: var(--accent-2-soft); } .own-fold.is-ok > summary { color: var(--accent-2); }
.own-fold[open] > :not(summary) { animation: mixIn .3s var(--ease); }
.own-fold ol { margin: 0; padding: 4px 34px 14px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.9; color: var(--text-muted); }
.own-fold dl { margin: 0; padding: 4px 14px; display: grid; gap: 4px; } .own-fold dl div { display: flex; justify-content: space-between; font-size: 13px; } .own-fold dl dt { color: var(--text-muted); }
.own-fold p { margin: 0; padding: 0 14px 12px; font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.own-steps { display: grid; gap: 8px; }

/* on a desktop the buttons follow the step but never leave the screen when the step is taller than it */
@media (min-width: 980px) {
  .wizard-nav:not(.wizard-dock) { position: sticky; inset-block-end: 14px; z-index: 20; pointer-events: none; }
  .wizard-nav:not(.wizard-dock) .btn { pointer-events: auto; background: rgb(var(--glass-rgb) / .55); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .75), inset 0 1px 0 rgb(var(--fg-rgb) / .12); }
}
.cv-head { margin-bottom: 4px; }

/* no shadow under the pinned header: neither the fade behind it nor the drop shadows of its pieces */
.cv-head::before { content: none; display: none; }
.cv-back, .cv-eye, .cv-pill, .cv-theme { box-shadow: none; }

/* ---- last step: compact invoice ---- */
.sum-sub { margin: -8px 0 0; font-size: 13px; color: var(--text-muted); }
.inv { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 4px 14px 10px; display: grid; gap: 6px; min-width: 0; }
.inv dl { margin: 0; display: grid; }
.inv dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 32px; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; min-width: 0; }
.inv dl > div:last-child { border-bottom: 0; }
.inv dt { color: var(--text-muted); min-width: 0; overflow-wrap: anywhere; } .inv dt b { color: var(--text); font-weight: 700; margin-inline-start: 4px; }
.inv dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv dd.is-free { color: var(--accent-2); font-weight: 600; }
.inv .inv-total { border-bottom: 1px solid var(--border-strong, var(--border)); } .inv .inv-total dt { color: var(--text); font-weight: 700; } .inv .inv-total dd { font-size: 1rem; color: var(--accent); }
.inv .inv-short dd, .inv .inv-short dt { color: var(--danger); } .inv .inv-left dd { color: var(--accent-2); }
.inv.is-short { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.inv-note { margin: 0; font-size: 12px; line-height: 1.8; color: var(--text-muted); }
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; } .inv-actions .btn { flex: 1 1 180px; text-align: center; min-height: 40px; } .inv-actions .inv-note { flex-basis: 100%; }
.inv-run { padding-top: 2px; }
@media (min-width: 980px) { .st:has(.inv) { gap: 10px; } }
@media (max-width: 979px) and (max-height: 760px) { .inv-note:not(.inv-run) { display: none; } .inv.is-short .inv-actions .inv-note { display: block; } }

/* Pro tag: priced styles and colours carry a gold "Pro" label before the price */
.paid-tag { gap: 6px; }
.paid-tag i { font-style: normal; font-weight: 800; font-size: .92em; letter-spacing: .4px; padding: 0 6px; margin-inline-start: -5px; border-radius: 99px; background: linear-gradient(135deg, #f5c842, #e8963a); color: #1b1203; }
.style-chip .paid-tag { top: 6px; padding-inline: 4px 9px; }

/* Pro: a small label in the site's theme colour — no price on the picking steps (it is one price for all, shown in the last step's invoice) */
.pro-tag { display: inline-flex; align-items: center; padding: 0 9px; min-height: 20px; border-radius: 99px; background: var(--accent-2); color: var(--accent-ink, #12100a); font-size: 10.5px; font-weight: 800; letter-spacing: .5px; line-height: 1; white-space: nowrap; margin-inline-start: 6px; }
.style-chip .pro-tag { position: absolute; top: 6px; inset-inline-end: 6px; margin: 0; }
.color-opt .pro-tag { margin-top: 2px; }
.pro-note { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.9; } .pro-note .pro-tag { margin-inline: 0 4px; vertical-align: 1px; }
.inv dt .pro-tag { margin-inline-start: 6px; }

/* Pro mark: one look everywhere (gradient pill, a small gem, a single sheen) */
.pro-tag { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(120deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 55%, #2dd4bf)); color: var(--accent-ink, #12100a); border-color: transparent; position: relative; overflow: hidden; box-shadow: 0 0 0 1px rgb(255 255 255 / .16) inset, 0 6px 14px -9px var(--accent-2); padding: 0 9px 0 8px; }
.pro-tag::before { content: ''; width: 10px; height: 10px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l4 6-10 12L2 9z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l4 6-10 12L2 9z'/%3E%3C/svg%3E") center / contain no-repeat; }
.pro-tag::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / .55) 50%, transparent 62%); transform: translateX(-130%); animation: pro-sheen 1.4s cubic-bezier(.22, 1, .36, 1) 1s 1 forwards; pointer-events: none; }
@keyframes pro-sheen { to { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .pro-tag::after { animation: none; } }

/* Pro in the wizard: the note under the styles and the invoice line become one calm Pro box */
.pro-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--accent-2-border); background: linear-gradient(120deg, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 78%); animation: pro-rise .6s cubic-bezier(.22, 1, .36, 1) both; }
.inv dl > .inv-pro { margin-block: 4px; padding: 8px 12px; border: 1px solid var(--accent-2-border) !important; border-radius: 12px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 80%); animation: pro-rise .6s cubic-bezier(.22, 1, .36, 1) both; }
.inv dl > .inv-pro dt { color: var(--text); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.inv dl > .inv-pro dt::before { content: ''; width: 14px; height: 14px; flex: none; background: var(--accent-2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l4 6-10 12L2 9z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l4 6-10 12L2 9z'/%3E%3C/svg%3E") center / contain no-repeat; }
.inv dl > .inv-pro dd.is-free { color: var(--accent-2); font-weight: 800; }
@keyframes pro-rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .pro-note, .inv dl > .inv-pro { animation: none; } }

/* own domain: an offer to upgrade, not a refusal */
.own-lock { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--border); background: var(--surface-2, var(--surface)); }
.own-lock b { font-size: 15px; } .own-lock p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--text-muted); }
.own-lock-act { display: flex; flex-wrap: wrap; gap: 8px; } .own-lock-act .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }

/* the Pro label is a plain Persian word: no gem icon, no letter-spacing (it breaks the joined Persian letters) */
.pro-tag::before { content: none !important; display: none !important; }
.pro-tag { letter-spacing: 0; font-size: 11.5px; padding: 0 10px; gap: 0; }

/* Layout choices and the on-demand preview dialog */
.st.ly-choices { display: grid; gap: clamp(14px, 3vw, 24px); align-content: start; }
.ly-head .st-title { margin: 0 0 4px; }
.ly-lead, .ly-dialog-top p { margin: 0; color: var(--text-muted); font-size: .82rem; line-height: 1.8; }
.ly-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.ly-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; align-items: center; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.ly-choice.on { border-color: var(--accent-2); background: var(--accent-2-soft); }
.ly-choice-label { display: flex; gap: 9px; min-width: 0; align-items: center; cursor: pointer; min-height: 44px; }
.ly-choice-label input { inline-size: 17px; block-size: 17px; flex: none; margin: 0; accent-color: var(--accent-2); }
.ly-txt { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ly-txt small { color: var(--text-muted); font-size: .75rem; line-height: 1.65; }
.ly-choice .pro-tag { grid-column: 1; grid-row: 2; justify-self: start; }
.ly-view, .ly-close { color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 11px; min-height: 44px; font: inherit; font-size: .78rem; cursor: pointer; }
.ly-view { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; }
.ly-view svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ly-view:hover, .ly-close:hover { border-color: var(--accent-2); }
.ly-choice-lock { color: var(--text-muted); font-size: .85rem; }
.ly-choice-lock a { color: var(--accent-2); }
.ly-dialog { box-sizing: border-box; width: min(calc(100% - 22px), 1120px); height: min(820px, calc(100dvh - 28px)); max-height: calc(100% - 12px); padding: clamp(10px, 2vw, 24px); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 22px; margin: auto; overflow: hidden; }
.ly-dialog[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; animation: ly-in .26s ease-out both; }
.ly-dialog::backdrop { background: rgb(6 12 22 / .74); }
.ly-dialog-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.ly-dialog-top h3 { margin: 0; font-size: clamp(1rem, 3vw, 1.35rem); overflow-wrap: anywhere; }
.ly-close { font-size: 1.5rem; width: 44px; flex: none; line-height: 1; }
.ly-dev { display: inline-flex; justify-self: start; padding: 3px; border: 1px solid var(--border); border-radius: 99px; }
.ly-dev button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 99px; background: transparent; color: var(--text-muted); font: inherit; font-size: .8rem; cursor: pointer; }
.ly-dev button.on { background: var(--accent-2); color: var(--accent-ink, #12100a); }
.ly-stage { display: grid; place-items: center; min-width: 0; min-height: 0; }
.ly-frame { position: relative; width: 100%; height: 100%; max-width: 100%; overflow: hidden; border-radius: 15px; background: rgb(var(--fg-rgb) / .05); outline: 1px solid var(--border); }
.ly-frame.ly-mobile { border-radius: 20px; }
.ly-frame iframe { position: absolute; inset: 0 auto auto 0; border: 0; transform-origin: top left; pointer-events: none; visibility: hidden; opacity: 0; background: white; }
.ly-frame iframe.can-scroll { pointer-events: auto; }
.ly-frame iframe.on { visibility: visible; opacity: 1; transition: opacity .22s; }
.ly-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 12px; text-align: center; color: var(--text-muted); font-size: .82rem; line-height: 1.8; }
.ly-wait span { max-width: 37ch; }
.ly-wait .btn { min-height: 44px; }
.ly-wait i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent-2); animation: ly-spin .8s linear infinite; }
@keyframes ly-spin { to { transform: rotate(360deg); } }
@keyframes ly-in { from { opacity: 0; transform: translateY(12px) scale(.99); } }
@media (max-width: 640px) {
  .ly-dialog { margin: auto auto max(8px, env(safe-area-inset-bottom)); border-radius: 18px; height: calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 16px)); }
}
@media (prefers-reduced-motion: reduce) { .ly-dialog[open], .ly-wait i { animation: none; } .ly-frame iframe.on { transition: none; } }


.pv-business { min-height: 100%; background: var(--pv-bg, #f7faf9); color: var(--pv-text-color, #142623); }
.pv-business-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 57px; padding: 12px 20px; background: var(--pv-card-background, white); border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.pv-business-brand { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 850; }
.pv-business-brand i { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: var(--pv-accent, #1e6858); color: var(--pv-accent-text, #fff); font: 800 14px/1 sans-serif; }
.pv-business-nav > div { display: flex; gap: 10px; font-size: 9px; }
.pv-business-hero { min-height: 234px; padding: 24px 20px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 14px; background: color-mix(in srgb, var(--pv-accent, #1e6858) 10%, var(--pv-bg, #f7faf9)); }
.pv-business-hero img { width: 100%; height: 185px; object-fit: cover; border-radius: 12px; }
.pv-business-intro h3 { font-size: 23px; line-height: 1.35; margin: 0; }
.pv-business-intro p { font-size: 11px; line-height: 1.8; margin: 8px 0 13px; }
.pv-business-action { display: inline-flex; gap: 5px; align-items: center; padding: 7px 9px; border-radius: 8px; background: var(--pv-accent, #1e6858); color: var(--pv-accent-text, #fff); font-size: 10px; font-weight: 750; }
.pv-business-action i { font-style: normal; }
.pv-business-name { font-size: 11px; font-weight: 750; display: block; margin-bottom: 5px; }
.pv-business-personal .pv-business-hero { background: color-mix(in srgb, var(--pv-accent, #7158a9) 12%, var(--pv-bg, #fcfaf7)); }
.pv-business-personal .pv-business-hero img { border-radius: 44% 44% 15px 15px; }
.pv-business-work { padding: 19px 20px 24px; }
.pv-business-work h4 { margin: 0 0 11px; font-size: 16px; }
.pv-business-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pv-business-grid > div { overflow: hidden; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 11px; background: var(--pv-card-background, white); }
.pv-business-grid b { display: block; font-size: 10px; padding: 7px 8px 9px; overflow-wrap: anywhere; }
.pv-business-grid img { display: block; width: 100%; height: 63px; object-fit: cover; }
.pv-business-symbol { display: inline-grid; place-items: center; width: 25px; height: 25px; margin: 8px 8px 0; border-radius: 7px; background: color-mix(in srgb, var(--pv-accent, #1e6858) 18%, transparent); }

.ly-toolbar, .ly-dialog-actions, .pt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.ly-dialog-actions { justify-content: flex-end; min-height: 44px; padding-block-start: 3px; }
.ly-scroll-hint, .ly-dialog-actions > span { color: var(--text-muted); font-size: .78rem; }
.ly-dialog-actions .btn { min-height: 44px; }
.ly-dialog:has(.ly-dialog-actions) .ly-stage { min-height: 0; }
.pt-actions { margin-block-start: 8px; }
.pt-actions .pt-go { margin: 0; }
.pt-live { padding-inline: 12px; }
@media (max-height: 520px) { .ly-scroll-hint { display: none; } }
