/* Rufina — design system.
   Palette: Bukhara sandstone + turquoise domes. Logical properties keep RTL (ar) correct.
   Sections: tokens · base · layout · header · buttons · forms · components · pages · utilities. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #f7f3ec;
  --bg-tint: #efe7da;
  --surface: #fffdf9;
  --surface-2: #f4eee4;
  --surface-3: #ebe3d5;
  --ink: #1b2220;
  --ink-2: #39423f;
  --muted: #6a6f68;
  --line: #e5ddcf;
  --line-strong: #cfc4b1;
  --primary: #11555c;
  --primary-hover: #0b4248;
  --primary-ink: #ffffff;
  --primary-soft: #e0eeec;
  --primary-soft-ink: #0d4a50;
  --accent: #c0673a;
  --accent-soft: #f7e4d7;
  --accent-ink: #8a3f1c;
  --gold: #b88a3c;
  --danger: #b42318;
  --danger-soft: #fdece9;
  --success: #1d7348;
  --success-soft: #e1f2e8;
  --warning: #8d5a00;
  --warning-soft: #fdf1d5;
  --focus: #d07a45;
  --featured-bg: #12393d;
  --featured-ink: #f4efe6;
  --featured-muted: #b7c8c4;
  --featured-line: rgb(255 255 255 / .14);
  --sky-1: #f4d8b4;
  --sky-2: #eeb489;
  --sky-3: #e08c66;
  --sun: #fff4de;
  --city-far: #c47a58;
  --city: #163d41;
  --dome: #2a8c8e;
  --dome-light: #5fb8b5;
  --ground: #0f2f33;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 36px;
  --pill: 999px;
  --shadow-xs: 0 1px 2px rgb(27 34 32 / .06);
  --shadow-sm: 0 1px 2px rgb(27 34 32 / .05), 0 4px 12px -6px rgb(27 34 32 / .12);
  --shadow: 0 2px 6px rgb(27 34 32 / .04), 0 18px 40px -18px rgb(27 34 32 / .22);
  --shadow-lg: 0 40px 80px -30px rgb(14 52 56 / .45);
  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, "Noto Sans", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Dark theme: follows the system unless the visitor chose a theme (data-theme on <html>, see base.html). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1413;
    --bg-tint: #141b1a;
    --surface: #161d1c;
    --surface-2: #1c2524;
    --surface-3: #24302e;
    --ink: #ece6dc;
    --ink-2: #d2ccc1;
    --muted: #9aa29d;
    --line: #26312f;
    --line-strong: #364442;
    --primary: #5cc0bb;
    --primary-hover: #7fd2cd;
    --primary-ink: #06201f;
    --primary-soft: #173533;
    --primary-soft-ink: #9fe0db;
    --accent: #e39467;
    --accent-soft: #3a2519;
    --accent-ink: #f1b893;
    --gold: #d8ad62;
    --danger: #ff8a7a;
    --danger-soft: #3b1c18;
    --success: #6fd39d;
    --success-soft: #16301f;
    --warning: #f0c060;
    --warning-soft: #332710;
    --focus: #e39467;
    --featured-bg: #0b2a2c;
    --featured-ink: #f1ece3;
    --featured-muted: #a8bdb9;
    --sky-1: #233c4f;
    --sky-2: #3b4a63;
    --sky-3: #7a5a6a;
    --sun: #f7e9c8;
    --city-far: #3d4b5c;
    --city: #0b1d20;
    --dome: #2a7f80;
    --dome-light: #4aa3a1;
    --ground: #071315;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow: 0 2px 6px rgb(0 0 0 / .3), 0 18px 40px -18px rgb(0 0 0 / .6);
    --shadow-lg: 0 40px 80px -30px rgb(0 0 0 / .8);
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1413;
  --bg-tint: #141b1a;
  --surface: #161d1c;
  --surface-2: #1c2524;
  --surface-3: #24302e;
  --ink: #ece6dc;
  --ink-2: #d2ccc1;
  --muted: #9aa29d;
  --line: #26312f;
  --line-strong: #364442;
  --primary: #5cc0bb;
  --primary-hover: #7fd2cd;
  --primary-ink: #06201f;
  --primary-soft: #173533;
  --primary-soft-ink: #9fe0db;
  --accent: #e39467;
  --accent-soft: #3a2519;
  --accent-ink: #f1b893;
  --gold: #d8ad62;
  --danger: #ff8a7a;
  --danger-soft: #3b1c18;
  --success: #6fd39d;
  --success-soft: #16301f;
  --warning: #f0c060;
  --warning-soft: #332710;
  --focus: #e39467;
  --featured-bg: #0b2a2c;
  --featured-ink: #f1ece3;
  --featured-muted: #a8bdb9;
  --sky-1: #233c4f;
  --sky-2: #3b4a63;
  --sky-3: #7a5a6a;
  --sun: #f7e9c8;
  --city-far: #3d4b5c;
  --city: #0b1d20;
  --dome: #2a7f80;
  --dome-light: #4aa3a1;
  --ground: #071315;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow: 0 2px 6px rgb(0 0 0 / .3), 0 18px 40px -18px rgb(0 0 0 / .6);
  --shadow-lg: 0 40px 80px -30px rgb(0 0 0 / .8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-block-start: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  min-block-size: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, color-mix(in srgb, var(--primary-soft) 70%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Main page: decorative ornament at the top start edge, scrolls with the page (mirrored for RTL). */
.page-home::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  block-size: 100vh;
  inset-inline-start: 0;
  inline-size: min(100vw, 720px);
  background: url("img/site/fon-uzor.webp") no-repeat left top / auto 100%;
  opacity: .15;
  pointer-events: none;
  z-index: -1;
}
[dir="rtl"] .page-home::before { transform: scaleX(-1); }
/* Full-width dark sections stick out by the scrollbar width; clip that without making a scroll container. */
.page-home { overflow-x: clip; }
@media print { .page-home::before { display: none; } }
img, svg { max-inline-size: 100%; }
img { block-size: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .15s; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4, p, ul, ol, dl, blockquote, figure { margin-block-start: 0; }
h1, h2, h3, h4 { line-height: 1.12; overflow-wrap: anywhere; color: var(--ink); text-wrap: balance; }
h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.3rem, 5.4vw, 4.4rem); letter-spacing: -.035em; margin-block-end: 1rem; }
h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.75rem, 3.4vw, 2.6rem); letter-spacing: -.025em; margin-block-end: .9rem; }
h3 { font-size: 1.18rem; font-weight: 650; letter-spacing: -.01em; margin-block-end: .5rem; }
p { text-wrap: pretty; }
:lang(ar) h1, :lang(ar) h2, :lang(ja) h1, :lang(ja) h2, :lang(zh-hans) h1, :lang(zh-hans) h2, :lang(ko) h1, :lang(ko) h2, :lang(hi) h1, :lang(hi) h2, :lang(kk) h1, :lang(kk) h2, :lang(tg) h1, :lang(tg) h2 { font-family: var(--font-sans); font-weight: 650; letter-spacing: 0; }
:lang(ar) body { line-height: 1.75; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--ink); }
hr { border: 0; border-block-start: 1px solid var(--line); margin-block: 24px; }
small { font-size: .85em; }
strong { font-weight: 650; }
bdi { unicode-bidi: isolate; }

/* ---------- Layout ---------- */
.site-main, .header-inner, .footer-inner, .translation-note {
  inline-size: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.site-main { flex: 1; padding-block: 8px 72px; }
.page { padding-block: 32px 0; }
.stack > * + * { margin-block-start: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-block-end: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  min-block-size: 72px;
  padding-block: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 600 1.7rem/1 var(--font-display);
  letter-spacing: -.04em;
  margin-inline-end: auto;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
/* "R." mark, same shape as static/favicon.svg: evenly rounded square, letter and accent dot. */
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 38px;
  block-size: 38px;
  border-radius: 27%;
  background: linear-gradient(145deg, var(--primary), var(--primary-hover));
  color: var(--primary-ink);
  font: 700 1.6rem/1 var(--font-display);
  letter-spacing: 0;
  padding-right: 9%;  /* physical: the latin letter and its dot do not mirror in RTL */
  box-shadow: var(--shadow-sm);
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: 17%;
  bottom: 25%;
  inline-size: 15%;
  block-size: 15%;
  border-radius: 50%;
  background: var(--accent);
}
.brand-dot { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.site-nav form { margin: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-block-size: 40px;
  padding: 8px 14px;
  border-radius: var(--pill);
  color: var(--ink-2);
  font-weight: 550;
  font-size: .94rem;
  text-decoration: none;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.language-switch { margin: 0; min-inline-size: 0; }
/* Theme toggle needs JavaScript, so it stays hidden without it. */
.theme-toggle { display: none; }
.js .theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border-radius: var(--pill);
}
.theme-toggle .icon-sun, .theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.language-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
}
.language-controls .select-icon {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
  display: flex;
}
.language-controls select {
  min-block-size: 40px;
  max-inline-size: 210px;
  min-inline-size: 0;
  padding-block: 6px;
  padding-inline: 38px 34px;
  border-radius: var(--pill);
  background-color: var(--surface);
  font-size: .92rem;
  font-weight: 550;
}
.language-controls button { flex-shrink: 0; }
.js .language-switch .lang-apply { display: none; }
.translation-note {
  margin-block: 14px 0;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: var(--warning);
  background: var(--warning-soft);
}
.translation-note span { display: block; }
.view-as-bar {
  inline-size: min(var(--container), 100% - 2 * var(--gutter));
  margin: 14px auto 0;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: .9rem;
}
.view-as-bar p { margin: 0; display: flex; gap: 8px; align-items: flex-start; min-inline-size: 0; overflow-wrap: anywhere; }
.view-as-bar .icon { flex-shrink: 0; margin-block-start: 2px; }
.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: -100px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.skip-link:focus { inset-block-start: 12px; }

/* ---------- Footer ---------- */
.site-footer { border-block-start: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px;
  color: var(--muted);
  font-size: .86rem;
}
.footer-inner .brand { font-size: 1.3rem; margin: 0; }
.footer-inner .brand-mark { inline-size: 30px; block-size: 30px; font-size: 1.25rem; }
.footer-meta { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Icons ---------- */
.icon { inline-size: 1.15em; block-size: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
[dir=rtl] .icon-flip { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
button, .button {
  --btn-bg: var(--primary);
  --btn-ink: var(--primary-ink);
  --btn-line: var(--primary);
  --btn-hover: var(--primary-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-block-size: 46px;
  padding: .7rem 1.25rem;
  border: 1px solid var(--btn-line);
  border-radius: var(--pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: inherit;
  font-weight: 600;
  font-size: .97rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s, box-shadow .18s, transform .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
button:hover, .button:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); }
button:active, .button:active { transform: translateY(1px); }
button:not(.subtle, .chip, .ghost, .button-secondary), .button:not(.subtle, .ghost, .button-secondary) { box-shadow: 0 1px 0 rgb(255 255 255 / .15) inset, 0 8px 20px -10px color-mix(in srgb, var(--primary) 80%, transparent); }
button.subtle, .button.subtle, .button-secondary {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  --btn-hover: var(--surface-2);
}
button.subtle:hover, .button.subtle:hover, .button-secondary:hover { border-color: var(--ink-2); }
button.ghost, .button.ghost { --btn-bg: transparent; --btn-ink: var(--ink-2); --btn-line: transparent; --btn-hover: var(--surface-2); }
.button-lg { min-block-size: 54px; padding: .9rem 1.6rem; font-size: 1.04rem; }
.button-sm, button.button-sm { min-block-size: 38px; padding: .45rem .95rem; font-size: .9rem; }
.button-block { inline-size: 100%; }
button:disabled, .button[aria-disabled=true] { opacity: .5; cursor: not-allowed; box-shadow: none !important; transform: none; }
button:disabled:hover { background: var(--btn-bg); border-color: var(--btn-line); }
button[aria-busy=true] { opacity: .75; cursor: progress; }
button[aria-busy=true]::before {
  content: "";
  inline-size: 1em;
  block-size: 1em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.button .icon, button .icon { transition: transform .2s var(--ease); }
.button:hover .icon-arrow, button:hover .icon-arrow { transform: translateX(3px); }
[dir=rtl] .button:hover .icon-arrow, [dir=rtl] button:hover .icon-arrow { transform: scaleX(-1) translateX(3px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 16px 8px; }
.actions p { margin: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-block-end: 18px; color: var(--muted); font-size: .92rem; font-weight: 550; text-decoration: none; }
.back-link:hover { color: var(--ink); }

/* ---------- Forms ---------- */
input, select, textarea { font: inherit; color: var(--ink); }
input:not([type=checkbox], [type=radio], [type=hidden], [type=file]), select, textarea {
  inline-size: 100%;
  max-inline-size: 100%;
  min-block-size: 48px;
  padding: .7rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
textarea { min-block-size: 110px; resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  padding-inline-end: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236a6f68' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: right .8rem center;
  cursor: pointer;
}
[dir=rtl] select { background-position: left .8rem center; }
input:hover:not(:disabled, [type=checkbox], [type=radio]), select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible:not([type=checkbox], [type=radio]), select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent);
}
input[type=file] {
  inline-size: 100%;
  padding: 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: .9rem;
}
input[type=file]::file-selector-button {
  margin-inline-end: 12px;
  padding: .45rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
input[type=checkbox], input[type=radio] {
  inline-size: 20px;
  block-size: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
input[type=date], input[type=datetime-local] { font-variant-numeric: tabular-nums; }
::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
label { font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.helptext, .field-help { display: block; margin-block-start: 6px; color: var(--muted); font-size: .84rem; font-weight: 400; }
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; font-weight: 650; }
.errorlist { list-style: none; margin: 6px 0; padding: 0; color: var(--danger); font-size: .88rem; font-weight: 550; }
.errorlist li { display: flex; gap: 6px; }
.errorlist li::before { content: "!"; display: inline-grid; place-items: center; flex-shrink: 0; inline-size: 18px; block-size: 18px; margin-block-start: 2px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; }
p.errorlist { display: block; }

/* Django as_p / hand-written field rows inside forms. */
.form-stack p, .panel form > p, .card form > p, dialog form > p, .field { display: grid; gap: 7px; margin-block: 0 16px; }
.form-stack p:not(:has(label, input, select, textarea)), .panel form > p:not(:has(label, input, select, textarea)), .card form > p:not(:has(label, input, select, textarea)), dialog form > p:not(:has(label, input, select, textarea)) { display: block; }
.form-stack p:has(> input[type=checkbox]), .card form > p:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-stack p:has(> input[type=checkbox]) label { order: 2; }
.form-stack p:has(> input[type=checkbox]) .helptext { order: 3; inline-size: 100%; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid > .wide { grid-column: 1 / -1; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-block: 0 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.filters p { display: grid; gap: 6px; margin: 0; min-inline-size: 150px; flex: 1 1 150px; }
.filters label { font-size: .82rem; }
.filters input:not([type=checkbox]), .filters select { min-block-size: 44px; }
.filters .check { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; }
.filters button { min-block-size: 44px; }

/* ---------- Components ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 12px;
  color: var(--accent-ink);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
:lang(ar) .eyebrow, :lang(ja) .eyebrow, :lang(zh-hans) .eyebrow, :lang(ko) .eyebrow, :lang(hi) .eyebrow { letter-spacing: .02em; }
.eyebrow-pill { padding: 6px 14px 6px 10px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--pill); background: color-mix(in srgb, var(--surface) 70%, transparent); }
[dir=rtl] .eyebrow-pill { padding: 6px 10px 6px 14px; }
.eyebrow-pill .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.muted { color: var(--muted); font-size: .92rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-inline-size: 34rem; }

.panel, .card {
  margin-block: 24px;
  padding: clamp(20px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow-wrap: anywhere;
}
.card { margin-block: 0; padding: clamp(18px, 2.6vw, 28px); border-radius: var(--radius); }
.panel.narrow { max-inline-size: 640px; margin-inline: auto; }
.panel > :last-child, .card > :last-child { margin-block-end: 0; }
.panel form, .card form { margin-block-end: 1rem; }
.panel form:last-child, .card form:last-child { margin-block-end: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; margin-block-end: 14px; }
.card-title .icon { color: var(--primary); }
.section-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-block: 36px 14px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-block: 36px 24px; }
.page-head h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3.3rem); }
.page-head .eyebrow { margin-block-end: 10px; }
.page-head + section > .section-heading { margin-block-start: 44px; }
.page-head p { margin: 8px 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: var(--pill);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.3;
  margin-block-end: 14px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border-radius: var(--pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}
[dir=rtl] .status { padding: 4px 9px 4px 11px; }
.status::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%; background: currentColor; }
.status-new { background: var(--warning-soft); color: var(--warning); }
.status-confirmed { background: var(--primary-soft); color: var(--primary-soft-ink); }
.status-completed { background: var(--success-soft); color: var(--success); }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.status-pending { background: var(--warning-soft); color: var(--warning); }
.status-accepted { background: var(--success-soft); color: var(--success); }
.status-rejected { background: var(--danger-soft); color: var(--danger); }

.notice, .flash {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-block: 14px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--ink);
}
.notice { display: block; }
.notice > :last-child { margin-block-end: 0; }
.notice ul { padding-inline-start: 1.2rem; }
.flash { margin-block: 20px 0; border-color: color-mix(in srgb, var(--primary) 30%, transparent); background: var(--primary-soft); color: var(--primary-soft-ink); font-weight: 550; box-shadow: var(--shadow-sm); animation: rise .4s var(--ease); }
.flash .icon { margin-block-start: 3px; }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } }
.error-summary {
  margin-block: 16px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-inline-start: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--ink);
}
.error-summary h2, .error-summary h3 { margin-block-end: 6px; font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; color: var(--danger); }
.error-summary > :last-child { margin-block-end: 0; }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: clamp(28px, 5vw, 48px) 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  color: var(--muted);
  text-align: center;
}
.empty-state .icon { inline-size: 34px; block-size: 34px; color: var(--primary); opacity: .75; margin-block-end: 6px; }
.empty-state h3 { margin: 0; color: var(--ink); }
.empty-state p { margin: 0; max-inline-size: 40rem; }
p.empty-state { display: block; }

.price {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.price small { font-size: .42em; font-weight: 650; letter-spacing: .04em; color: var(--muted); margin-inline-start: 6px; }
.num { font-variant-numeric: tabular-nums; }

/* Definition list rows */
.kv { display: grid; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; border-block-end: 1px solid var(--line); }
.kv > div:last-child { border-block-end: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; }

.booking-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 0; font-size: .92rem; }
.booking-facts dt { color: var(--muted); }
.booking-facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.booking-facts small { color: var(--muted); font-weight: 400; }

/* Dialog */
dialog {
  inline-size: min(560px, 100% - 32px);
  max-block-size: calc(100% - 32px);
  overflow: auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
dialog[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog::backdrop { background: rgb(10 26 28 / .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog h2 { margin-block-end: 18px; padding-inline-end: 48px; }
.dialog-close {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
}
.dialog-close .label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
dialog form > p { margin-block-end: 14px; }
dialog form button[type=submit], .offer-page form button[type=submit] { inline-size: 100%; min-block-size: 52px; margin-block-start: 6px; }
#offer-result:not(:empty) { margin-block-start: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--success-soft); color: var(--success); font-weight: 600; }
#offer-errors:not(:empty) { margin-block-end: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 550; }
#offer-errors p { margin: 0; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin-block: 12px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { inline-size: 100%; min-inline-size: 600px; border-collapse: collapse; font-size: .92rem; }
.table-wrap th, .table-wrap td { padding: 13px 16px; text-align: start; vertical-align: middle; border-block-end: 1px solid var(--line); }
.table-wrap th { position: sticky; inset-block-start: 0; background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.table-wrap tbody tr:last-child td { border-block-end: 0; }
.table-wrap tbody tr { transition: background-color .15s; }
.table-wrap tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.table-wrap td a { font-weight: 600; }
.table-wrap td bdi { white-space: nowrap; }
.table-wrap td.num, .table-wrap th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-block: 18px 12px; }
.stats-grid article, .stat-card {
  position: relative;
  min-inline-size: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.stats-grid article::after { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); opacity: .7; }
.stats-grid h3 { margin-block-end: 8px; color: var(--muted); font-size: .84rem; font-weight: 650; letter-spacing: .01em; }
.stat { margin-block-end: 6px; font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 650; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats-grid p:not(.stat) { margin-block-end: 6px; font-size: .84rem; }
.stats-grid p:last-child { margin-block-end: 0; }
.stats-grid .muted { font-size: .8rem; }

/* Lists of rows */
.row-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.row-item, .booking-row, .lead-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.row-item p, .booking-row p, .lead-history p { margin: 0; }
a.row-item { color: inherit; text-decoration: none; }
a.row-item:hover, .booking-row:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow-sm); }
.row-main { display: grid; gap: 2px; min-inline-size: 0; }
.row-title { font-weight: 650; font-variant-numeric: tabular-nums; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: .9rem; }
.row-end { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-links { display: flex; flex-wrap: wrap; gap: 8px 16px; inline-size: 100%; padding-block-start: 10px; border-block-start: 1px dashed var(--line); font-size: .92rem; }
.lead-history { display: grid; gap: 4px; }
.lead-history p:first-child { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }

/* Reviews */
.review {
  position: relative;
  margin: 0;
  padding: 26px 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-wrap: anywhere;
}
.review::before { content: "\201C"; position: absolute; inset-block-start: -6px; inset-inline-start: 18px; font: 4rem/1 var(--font-display); color: var(--accent); opacity: .55; }
.review p { margin-block-end: 14px; font-size: 1.02rem; color: var(--ink-2); }
.review footer { display: block; inline-size: auto; margin: 0; padding: 12px 0 0; border-block-start: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.reviews-public { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }

/* ---------- Landing ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  padding-block: clamp(32px, 6vw, 72px) clamp(28px, 4vw, 48px);
}
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1.02; letter-spacing: -.045em; margin-block-end: 1.25rem; }
.hero .lead { margin-block-end: 1.8rem; }
.photographer-note {
  max-inline-size: 34rem;
  margin-block: -.6rem 1.8rem;
  padding-inline-start: 16px;
  border-inline-start: 3px solid var(--accent);
  color: var(--ink-2);
  font-style: italic;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-end: 26px; }
.hero-meta { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: .9rem; }
.hero-meta .icon { color: var(--primary); }
.hero-art { position: relative; aspect-ratio: 6 / 7; max-block-size: 600px; justify-self: center; inline-size: min(100%, 500px); }
.hero-art svg { display: block; inline-size: 100%; block-size: 100%; filter: drop-shadow(0 40px 50px rgb(14 52 56 / .25)); }
.hero-art .sky-1 { stop-color: var(--sky-1); }
.hero-art .sky-2 { stop-color: var(--sky-2); }
.hero-art .sky-3 { stop-color: var(--sky-3); }
.hero-art .sun { fill: var(--sun); }
.hero-art .far { fill: var(--city-far); opacity: .45; }
.hero-art .city { fill: var(--city); }
.hero-art .dome { fill: var(--dome); }
.hero-art .dome-light { fill: var(--dome-light); }
.hero-art .ground { fill: var(--ground); }
.hero-art .band { stroke: var(--dome-light); stroke-width: 3; opacity: .55; fill: none; }
.hero-art .window { fill: var(--sky-2); opacity: .6; }
.hero-art .frame { fill: none; stroke: var(--gold); stroke-width: 2; opacity: .8; }
.hero-art .frame-2 { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .45; stroke-dasharray: 2 7; stroke-linecap: round; }
.hero-art .ripple { fill: none; stroke: var(--sky-2); stroke-width: 3; stroke-linecap: round; opacity: .3; }
.hero-art .bird { fill: none; stroke: var(--city); stroke-width: 2; stroke-linecap: round; opacity: .6; }
.hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, #fff 50%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.35;
  color: var(--ink);
}
.hero-chip .chip-icon { display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); }
.hero-chip-1 { inset-block-end: 12%; inset-inline-start: -6%; animation: float 7s ease-in-out infinite; }
.hero-chip-2 { inset-block-start: 22%; inset-inline-end: -4%; padding: 10px; animation: float 8s ease-in-out -3s infinite; }
.hero-chip-2 .chip-icon { background: var(--accent); }
@keyframes float { 50% { transform: translateY(-8px); } }

.steps { margin-block: 8px clamp(48px, 7vw, 88px); }
.steps ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
  min-inline-size: 0;
}
/* Arrow to the next step (desktop row only); mirrors in RTL. */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: -19px;
  inline-size: 10px;
  block-size: 10px;
  border-block-start: 2.5px solid var(--accent);
  border-inline-end: 2.5px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
[dir="rtl"] .steps li:not(:last-child)::after { transform: translateY(-50%) rotate(-45deg); }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 4px; }
.step-icon { display: grid; place-items: center; flex-shrink: 0; inline-size: 44px; block-size: 44px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-soft-ink); }
.step-icon .icon { inline-size: 22px; block-size: 22px; }
.step-num { padding: 4px 10px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-ink); font-size: .78rem; font-weight: 750; letter-spacing: .04em; white-space: nowrap; }
.step-title { font-size: 1rem; font-weight: 700; }
.step-text { color: var(--muted); font-size: .9rem; }

.section-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-block-end: 28px; }
.section-heading h2 { margin: 0; }
.section-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.section-tools > p { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--muted); font-size: .88rem; font-weight: 600; }
.section-heading > p { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--muted); font-size: .88rem; font-weight: 600; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.tariff-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s, background-color .25s;
}
.tariff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
/* Hover tint for the other cards; the chosen tariff gets the dark "selected" look below. */
.tariff-card:not(.is-selected):hover { background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.tariff-index { display: flex; align-items: center; justify-content: space-between; margin-block-end: 22px; color: var(--accent-ink); font-size: .78rem; font-weight: 750; letter-spacing: .04em; }
:lang(ar) .tariff-index { letter-spacing: 0; }
.tariff-index .tariff-glyph { display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.tariff-glyph .icon { inline-size: 22px; block-size: 22px; }
.tariff-card h3 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; letter-spacing: -.02em; margin-block-end: 10px; }
:lang(ar) .tariff-card h3, :lang(ja) .tariff-card h3, :lang(zh-hans) .tariff-card h3, :lang(ko) .tariff-card h3, :lang(hi) .tariff-card h3, :lang(kk) .tariff-card h3, :lang(tg) .tariff-card h3 { font-family: var(--font-sans); font-weight: 650; font-size: 1.45rem; letter-spacing: 0; }
.tariff-card .description { flex: 1; margin-block-end: 22px; color: var(--muted); overflow-wrap: anywhere; }
.tariff-card .price { margin-block-end: 20px; font-size: clamp(2.4rem, 4vw, 3rem); }
.tariff-card .facts { margin: 0 0 26px; }
.tariff-card .facts dt { display: inline-flex; align-items: center; gap: 8px; }
.tariff-card .facts dt .icon { color: var(--primary); }
.tariff-card > button, .tariff-card > .button { inline-size: 100%; min-block-size: 52px; }
.tariff-card > .muted { margin-block-end: 12px; font-size: .86rem; }
.tariff-card.is-selected {
  background: radial-gradient(500px 300px at 100% 0%, color-mix(in srgb, var(--dome) 45%, transparent), transparent 70%), var(--featured-bg);
  border-color: var(--featured-bg);
  color: var(--featured-ink);
  box-shadow: var(--shadow-lg);
}
.tariff-card.is-selected h3, .tariff-card.is-selected .price { color: var(--featured-ink); }
.tariff-card.is-selected .description, .tariff-card.is-selected .facts dt, .tariff-card.is-selected .price small, .tariff-card.is-selected > .muted { color: var(--featured-muted); }
.tariff-card.is-selected .facts > div { border-color: var(--featured-line); }
.tariff-card.is-selected .facts dt .icon { color: var(--dome-light); }
.tariff-card.is-selected .tariff-index { color: var(--gold); }
.tariff-card.is-selected .tariff-glyph { background: rgb(255 255 255 / .1); color: var(--gold); }
.tariff-card.is-selected > button:not(:disabled) { --btn-bg: var(--featured-ink); --btn-ink: var(--featured-bg); --btn-line: var(--featured-ink); --btn-hover: #fff; box-shadow: none; }
.facts { margin: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-block-start: 1px solid var(--line); font-size: .93rem; }
.facts > div:last-child { border-block-end: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.tariff-card.is-selected .facts > div:last-child { border-block-end-color: var(--featured-line); }

/* Selection */
.selection-panel { margin-block-start: clamp(40px, 6vw, 72px); scroll-margin-block-start: 90px; }
.panel-header { max-inline-size: 44rem; margin-block-end: 26px; }
.panel-header h2 { margin-block-end: 10px; }
.panel-header p:last-child { margin: 0; color: var(--muted); }
.selection-grid { display: grid; gap: 30px; margin-block: 0 26px; }
.choice-group > legend { display: flex; align-items: center; gap: 10px; inline-size: 100%; margin-block-end: 6px; font-family: var(--font-display); font-size: 1.55rem; font-weight: 500; letter-spacing: -.02em; }
:lang(ar) .choice-group > legend, :lang(ja) .choice-group > legend, :lang(zh-hans) .choice-group > legend, :lang(ko) .choice-group > legend, :lang(hi) .choice-group > legend, :lang(kk) .choice-group > legend, :lang(tg) .choice-group > legend { font-family: var(--font-sans); font-weight: 650; font-size: 1.3rem; }
.choice-help { display: inline-flex; align-items: center; gap: 8px; margin-block: 0 16px; color: var(--muted); font-size: .92rem; }
.choice-help .icon { color: var(--primary); }
.choice-help-text { display: flex; flex-direction: column; gap: 2px; }
.choice-group > div[id] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.choice-group > div[id] > div { display: flex; min-inline-size: 0; }
.addon-category { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.addon-category + .addon-category { margin-block-start: 16px; }
.addon-category > legend { padding: 0; margin-block-end: 8px; color: var(--accent-ink); font-size: .8rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
:lang(ar) .addon-category > legend { letter-spacing: 0; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.option-grid > div { display: flex; min-inline-size: 0; }
.location-option { position: relative; display: flex; flex: 1; min-inline-size: 0; }
/* Zoom button over the card photo; a sibling of the label so it never toggles the checkbox. */
.option-zoom { position: absolute; z-index: 1; inset-block-start: 6px; inset-inline-end: 6px; display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; text-decoration: none; transition: background-color .15s, transform .15s var(--ease); }
.option-zoom:hover { background: rgb(0 0 0 / .75); transform: scale(1.06); }
.option-zoom:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.option-zoom .icon { inline-size: 18px; block-size: 18px; }
.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-inline-size: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 400;
  font-size: .88rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s var(--ease), background-color .18s;
}
.option-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.option-card:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent), var(--shadow-sm); }
.option-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.option-card:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.option-card:has(input:disabled):hover { border-color: var(--line); box-shadow: none; transform: none; }
.option-card:has(input:disabled):hover .option-media img { transform: none; }
.option-media { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--surface-3); scrollbar-width: none; }
.option-media::-webkit-scrollbar { display: none; }
.option-media img { flex: 0 0 100%; inline-size: 100%; aspect-ratio: 16 / 9; block-size: auto; object-fit: cover; scroll-snap-align: start; transition: transform .5s var(--ease); }
.option-card:hover .option-media img { transform: scale(1.03); }
.option-count { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--pill); background: rgb(0 0 0 / .55); color: #fff; font-size: .74rem; font-weight: 650; pointer-events: none; }
.option-body { position: relative; display: flex; align-items: flex-start; gap: 8px; flex: 1; padding: 9px 10px 10px; }
.option-body input[type=checkbox] { position: absolute; inset-block-start: 9px; inset-inline-start: 10px; inline-size: 20px; block-size: 20px; margin: 0; opacity: 0; cursor: pointer; }
.option-check { display: grid; place-items: center; flex-shrink: 0; inline-size: 20px; block-size: 20px; margin-block-start: 0; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: transparent; transition: background-color .15s, border-color .15s, color .15s; }
.option-check .icon { inline-size: 14px; block-size: 14px; }
.option-card:has(input:checked) .option-check { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.option-text { display: grid; gap: 2px; min-inline-size: 0; }
.option-group { color: var(--accent-ink); font-size: .72rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.option-title { font-weight: 650; line-height: 1.25; }
.option-desc { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.option-variant { color: var(--ink-2); font-size: .78rem; }
.option-price { margin-block-start: 3px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary); }
.option-demo { justify-self: start; padding: 2px 8px; border-radius: var(--pill); background: var(--warning-soft); color: var(--warning); font-size: .7rem; font-weight: 700; }

.summary-bar {
  position: sticky;
  inset-block-end: 14px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-block: 24px 14px;
  padding: 16px 18px 16px 22px;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--line));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.estimate { display: grid; gap: 2px; min-inline-size: 0; }
.estimate h3 { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
:lang(ar) .estimate h3 { letter-spacing: 0; }
.estimate .price { font-size: 1.9rem; }
.estimate p:last-child { margin: 0; color: var(--muted); font-size: .86rem; }
.summary-bar .actions { margin: 0; }
.reassure { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--muted); font-size: .88rem; }
.reassure .icon { margin-block-start: 2px; color: var(--success); }
.reviews-section { margin-block-start: clamp(40px, 6vw, 72px); }

/* ---------- Checkout ---------- */
.progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  font-size: .86rem;
}
.progress li {
  counter-increment: step;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}
[dir=rtl] .progress li { padding: 6px 6px 6px 14px; }
.progress li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  inline-size: 26px;
  block-size: 26px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 750;
}
.progress .done { color: var(--primary-soft-ink); background: var(--primary-soft); border-color: transparent; }
.progress .done::before { content: "\2713"; background: var(--primary); color: var(--primary-ink); }
.progress .current { color: var(--ink); border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.progress .current::before { background: var(--primary); color: var(--primary-ink); }
.checkout-head { margin-block: 32px 22px; }
.checkout-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-block-end: 10px; }
.checkout-head .muted { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.checkout-head .muted .icon { margin-block-start: 3px; color: var(--primary); }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); align-items: start; gap: 24px; }
.checkout-main { display: grid; gap: 20px; min-inline-size: 0; }
.checkout-main > fieldset, .step-card {
  min-inline-size: 0;
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.checkout-main legend, .step-card legend {
  float: inline-start;
  display: flex;
  align-items: center;
  gap: 12px;
  inline-size: 100%;
  margin-block-end: 16px;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -.01em;
}
.checkout-main legend + * { clear: both; }
.legend-icon { display: grid; place-items: center; flex-shrink: 0; inline-size: 38px; block-size: 38px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-soft-ink); }
.summary {
  position: sticky;
  inset-block-start: 92px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}
.summary h2 { margin-block-end: 14px; color: var(--muted); font-family: var(--font-sans); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
:lang(ar) .summary h2 { letter-spacing: 0; }
.summary-product { margin-block-end: 6px; font-size: 1.15rem; font-weight: 650; line-height: 1.3; }
.summary-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 16px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--pill); background: var(--surface-3); color: var(--ink-2); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tag .icon { inline-size: 14px; block-size: 14px; }
.summary-subhead { display: flex; align-items: center; gap: 6px; margin: 16px 0 8px; color: var(--muted); font-family: var(--font-sans); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.summary-subhead .icon { inline-size: 14px; block-size: 14px; }
.summary ul { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-2); }
.summary li { position: relative; padding-inline-start: 22px; }
.summary li::before { content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: .5em; inline-size: 8px; block-size: 8px; border-radius: 50%; border: 2px solid var(--primary); }
.summary .price { padding-block: 16px 4px; border-block-start: 1px solid var(--line); font-size: 2.1rem; }
.summary > p:last-child { margin: 12px 0 0; font-size: .9rem; }
.day-picker, .checkout-main fieldset > p.day-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-block-end: 14px; }
.day-picker label { inline-size: 100%; }
.day-picker input { flex: 1 1 180px; inline-size: auto !important; }
.day-picker button { flex: 0 0 auto; }
.chips-label { margin-block: 4px 8px; }
.chips { display: flex; gap: 8px; margin-block: 0 18px; padding-block-end: 4px; overflow-x: auto; scrollbar-width: thin; }
.chip, button.chip {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  --btn-hover: var(--primary-soft);
  flex-shrink: 0;
  flex-direction: column;
  gap: 0;
  min-block-size: 56px;
  min-inline-size: 68px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.chip bdi { font-size: 1.02rem; font-weight: 700; }
.chip .muted { font-size: .74rem; font-weight: 600; }
.day-results { transition: opacity .2s; }
.day-results[aria-busy="true"] { opacity: .45; pointer-events: none; }
.day-title { margin: 4px 0 12px; font-size: 1.05rem; text-transform: capitalize; }
.day-title:focus { outline: none; }
.slot-periods { display: grid; gap: 12px; margin-block: 0 14px; }
.slot-period { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.slot-period-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .95rem; font-weight: 700; }
.period-icon { display: grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.slot-period-afternoon .period-icon { background: var(--primary-soft); color: var(--primary); }
.slot-period-evening .period-icon { background: color-mix(in srgb, var(--accent-soft) 50%, var(--primary-soft)); color: var(--ink-2); }
.period-icon .icon { inline-size: 18px; block-size: 18px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-block-size: 56px;
  padding: 6px 4px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s, transform .15s var(--ease);
}
.slot:hover { border-color: var(--primary); transform: translateY(-1px); }
.slot input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: pointer; }
.slot:has(input:checked) { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 18px -10px var(--primary); }
.slot:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.slot bdi { white-space: nowrap; }
.slot-start { font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
.slot-end { font-size: .74rem; font-weight: 600; color: var(--muted); line-height: 1.1; }
.slot:has(input:checked) .slot-end { color: inherit; opacity: .85; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.contact-row select { inline-size: 100%; }
.checkout-main fieldset > p { display: grid; gap: 7px; margin-block: 0 16px; }
.checkout-main fieldset > p:last-child { margin-block-end: 0; }
.checkout-main fieldset small { color: var(--muted); }
.submit-card { display: grid; gap: 16px; padding: clamp(20px, 3vw, 28px); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.submit-card > * { margin: 0; }
.confirm { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.confirm input[type=checkbox] { margin-block-start: 2px; inline-size: 22px; block-size: 22px; }
.confirm label { display: inline !important; flex: 1 1 200px; font-weight: 550; color: var(--ink); cursor: pointer; }
.confirm .errorlist { inline-size: 100%; margin: 0; }
button.primary { inline-size: 100%; min-block-size: 58px; font-size: 1.06rem; }
.notice.signin-card { display: grid; gap: 12px; margin: 0; padding: clamp(20px, 3vw, 28px); border-radius: var(--radius-lg); }
.notice.signin-card p { margin: 0; }
.oauth-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin-block: 10px; }
.oauth-buttons button { --btn-bg: var(--surface); --btn-ink: var(--ink); --btn-line: var(--line-strong); --btn-hover: var(--surface-2); max-inline-size: 100%; justify-content: flex-start; text-align: start; box-shadow: var(--shadow-xs) !important; }
.provider-mark { display: grid; place-items: center; flex-shrink: 0; inline-size: 28px; block-size: 28px; border-radius: 8px; color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: 0; }
.provider-google { background: conic-gradient(from -45deg, #ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.provider-facebook { background: #1877f2; }
.provider-vk { background: #0077ff; }
.provider-other { background: var(--muted); }

/* ---------- Auth & language ---------- */
.auth-wrap { display: grid; place-items: center; padding-block: clamp(24px, 6vw, 64px); }
.auth-card { inline-size: min(100%, 480px); margin: 0; }
.auth-card .auth-icon { display: grid; place-items: center; inline-size: 56px; block-size: 56px; margin-block-end: 18px; border-radius: 18px; background: var(--primary-soft); color: var(--primary-soft-ink); }
.auth-card .auth-icon .icon { inline-size: 28px; block-size: 28px; }
.auth-card h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
.auth-card > p { color: var(--muted); }
.auth-card form button[type=submit] { inline-size: 100%; min-block-size: 52px; margin-block-start: 6px; }
.language-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-block-start: 24px; }
.language-grid form { margin: 0; }
.language-option, button.language-option {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--line);
  --btn-hover: var(--primary-soft);
  inline-size: 100%;
  min-block-size: 64px;
  justify-content: flex-start;
  gap: 14px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 1.02rem;
  box-shadow: var(--shadow-xs) !important;
}
.language-option:hover { border-color: var(--primary); }
.language-option span { font-size: 1.6rem; line-height: 1; }
.language-option .icon-arrow { margin-inline-start: auto; color: var(--muted); }

/* ---------- Booking detail ---------- */
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-block: 0 8px; }
.detail-head h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3rem); }
.detail-head .status { font-size: .88rem; padding-block: 6px; }
.detail-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-block: 0 26px; color: var(--ink-2); font-size: 1.08rem; }
.detail-when strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.detail-when .icon { color: var(--primary); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); align-items: start; gap: 20px; }
.detail-main, .detail-side { display: grid; gap: 20px; min-inline-size: 0; }
.detail-side { position: sticky; inset-block-start: 92px; }
.card ul.clean { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.card ul.clean li { display: flex; gap: 10px; align-items: flex-start; }
.card ul.clean li .icon { margin-block-start: 3px; color: var(--primary); }
.card h3 { font-size: 1rem; margin-block: 18px 10px; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block-start: 14px; border-block-start: 1px solid var(--line); }
.total-row .price { font-size: 1.8rem; }
.contact-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-block-end: 12px; }
.request { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.request + .request { margin-block-start: 12px; }
.request > p:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.request ul { padding-inline-start: 1.2rem; }
.request form { margin-block-start: 14px; padding-block-start: 14px; border-block-start: 1px dashed var(--line-strong); }
/* Client proposals on the booking page: one folded card per kind (add-ons, reschedule, cancel). */
.request-blocks { display: grid; gap: 12px; min-inline-size: 0; }
.request-blocks > .card-title, .request-blocks > p { margin: 0; }
.request-block { margin: 0; padding-block: 6px; }
.request-block > summary { display: flex; inline-size: 100%; min-block-size: 48px; color: var(--ink); font-size: 1.05rem; }
.request-block > summary .icon { color: var(--primary); }
.request-block > summary::before { order: 2; margin-inline-start: auto; color: var(--primary); }
.request-block > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.request-block[open] > form { margin-block: 8px 12px; }
.request-block form > button { align-self: flex-start; }
.request-block .choice-group { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.request-block .choice-group > legend { margin-block-end: 10px; font-family: var(--font-sans); font-size: 1rem; font-weight: 650; letter-spacing: 0; }
/* Smaller cards than on the landing page: more per row, shorter photos. */
.request-block .option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.request-block .option-media img { aspect-ratio: 4 / 3; }
.request-block .option-card { font-size: .84rem; }
.request-block .option-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.request-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.request-forms form { display: flex; flex-direction: column; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.request-forms form h3 { margin-block: 0 12px; }
.request-forms form > button { margin-block-start: auto; }
.request-forms fieldset > div[id] { display: grid; gap: 8px; }
.request-forms fieldset label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.timeline { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding-inline-start: 28px; padding-block-end: 16px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; inset-block-start: 8px; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 9.5px; inset-block: 22px 0; inline-size: 1px; background: var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline p { margin: 0 0 4px; }
.timeline a { display: inline-flex; margin-inline-end: 10px; font-size: .86rem; }
.delivery-card { text-align: center; }
.delivery-card .auth-icon { margin-inline: auto; }

/* ---------- Cabinets & QR ---------- */
.link-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin-block: 0 26px; }
.link-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.link-tile:hover { color: var(--ink); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.link-tile .tile-icon { display: grid; place-items: center; flex-shrink: 0; inline-size: 40px; block-size: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-soft-ink); }
.link-tile .icon-arrow { margin-inline-start: auto; color: var(--muted); }
.link-tile small { color: var(--muted); font-weight: 600; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-block: 16px 28px; }
.qr-card { display: grid; gap: 10px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.qr-card h2 { margin: 0; font-family: var(--font-sans); font-size: 1.12rem; font-weight: 650; letter-spacing: 0; }
.qr-card p { margin: 0; }
.referral-image { inline-size: 100%; max-inline-size: 220px; justify-self: center; padding: 12px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); }
.qr-links { display: flex; flex-wrap: wrap; gap: 8px; }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-block: 0 10px; }
.metric { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric span { display: block; color: var(--muted); font-size: .82rem; font-weight: 600; }
.metric strong { display: block; margin-block-start: 4px; font-size: 1.8rem; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Administrator cabinet ---------- */
.admin-nav { display: flex; gap: 6px; margin-block: 0 22px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.admin-nav a { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-block-size: 40px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.admin-nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-soft-ink); }
.admin-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; margin-block-end: 18px; }
.admin-columns > section { min-inline-size: 0; }
.checklist { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.checklist li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.checklist li > span { flex: 1 1 180px; }
.checklist .is-ok .icon { color: var(--success); }
.checklist .is-gap { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, var(--line)); }
.checklist .is-gap .icon { color: var(--danger); }
.checklist a { font-size: .88rem; font-weight: 600; }
.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.inline-form input:not([type=hidden]) { min-block-size: 36px; inline-size: min(100%, 220px); }
.table-wrap td .button-sm, .table-wrap td .inline-form { margin-block: 2px; margin-inline-end: 4px; }
a.metric-link { color: inherit; text-decoration: none; transition: border-color .15s; }
a.metric-link:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.audit-fields { display: grid; gap: 2px; font-size: .84rem; }
.audit-fields bdi { white-space: normal !important; overflow-wrap: anywhere; }
.admin-review { display: grid; gap: 8px; }
.admin-review p { margin: 0; }
@media (min-width: 900px) { .admin-nav { flex-wrap: wrap; overflow-x: visible; } }
/* Mobile: sections collapse into a burger menu (only with JS; without it the scrolling strip stays). */
.admin-nav-toggle { display: none; }
@media (max-width: 899.98px) {
  .js .admin-nav-toggle { display: flex; align-items: center; gap: 10px; inline-size: 100%; min-block-size: 48px; margin-block: 0 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
  .js .admin-nav-toggle > span:first-of-type { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .js .admin-nav-toggle .icon:last-child { transition: transform .15s; }
  .js .admin-nav-toggle[aria-expanded="true"] .icon:last-child { transform: rotate(180deg); }
  .js .admin-nav { display: none; flex-direction: column; overflow: visible; }
  .js .admin-nav.is-open { display: flex; }
  .js .admin-nav a { min-block-size: 44px; white-space: normal; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-block: 0 24px; }

/* Catalog editor (/manage/catalog/...) */
.row-actions { white-space: nowrap; }
/* Row action menu (built by forms.js): inline buttons on wide screens, a "⋯" popup on phones. */
.row-menu { display: contents; }
.row-menu-toggle { display: none; }
/* .table-wrap.menu-actions: the "⋯" popup on every screen width. */
.js .menu-actions th:last-child { inline-size: 1%; padding-inline: 0; font-size: 0; letter-spacing: 0; }
.js .menu-actions td.row-actions { inline-size: 1%; text-align: center; }
.js .menu-actions .row-menu-toggle { display: inline-grid; place-items: center; inline-size: 34px; block-size: 32px; min-block-size: 0; min-inline-size: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.15rem; font-weight: 700; line-height: 1; box-shadow: none; cursor: pointer; }
.js .menu-actions .row-menu-toggle:hover, .js .menu-actions .row-menu-toggle[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line-strong); }
.js .menu-actions .row-menu { position: fixed; z-index: 60; display: none; flex-direction: column; gap: 4px; min-inline-size: 190px; max-inline-size: calc(100vw - 16px); padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); white-space: normal; text-align: start; }
.js .menu-actions .row-menu.is-open { display: flex; }
.js .menu-actions .row-menu > form, .js .menu-actions .row-menu .inline-form { display: flex; margin: 0; }
.js .menu-actions .row-menu .button, .js .menu-actions .row-menu button { inline-size: 100%; min-block-size: 40px; margin: 0; padding: 6px 12px; justify-content: flex-start; text-align: start; font-size: .88rem; }
button.button-danger, .button.button-danger { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: none; }
.button-secondary.button-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.catalog-editor .error-summary { margin-block-end: 18px; }
.catalog-editor .check { display: inline-flex; align-items: center; gap: 8px; min-block-size: 40px; }
.catalog-editor .check label { margin: 0; }
.catalog-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-block: 4px 24px; }
.catalog-editor-actions .button-danger { margin-inline-start: auto; }
.choice-list { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.choice-list legend { margin-block-end: 8px; font-weight: 650; }
.choice-list > div { display: grid; gap: 2px; max-block-size: 22rem; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.choice-list > div label { display: flex; align-items: center; gap: 10px; min-block-size: 40px; padding: 4px 8px; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.choice-list > div label:hover { background: var(--surface-2); }
.lang-block { margin-block: 0; padding-block: 4px; border-block-end: 1px solid var(--line); }
.lang-block:last-child { border-block-end: 0; }
.lang-block > summary { flex-wrap: wrap; color: var(--ink); }
.lang-block > .form-grid { padding-block: 8px 4px; }
.catalog-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 14px; margin: 0 0 18px; padding: 0; list-style: none; }
.catalog-photos li { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.catalog-photos li.is-hidden img { opacity: .45; }
.catalog-photos img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius-sm) - 2px); background: var(--surface-2); }
.catalog-photos p { margin: 0; }
.catalog-photos input[type=number] { inline-size: 100%; }

/* ---------- Calendar ---------- */
.calendar-form { max-inline-size: 46rem; }
.calendar-form p { display: grid; gap: 7px; margin-block: 0 16px; }
.calendar-form p:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.calendar-form p:has(> input[type=checkbox]) label { order: 2; }
.calendar-form p:has(> input[type=checkbox]) .helptext { order: 3; inline-size: 100%; margin: 0; }
.calendar-form label { display: block; }
.calendar-form .helptext { display: block; font-size: .84rem; }
.calendar-form textarea { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9rem; }
/* "Back to cabinet" button: right side of the page heading; icon only on phones. */
.page-head > div:has(> .cabinet-back) { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; }
.page-head > div:has(> .cabinet-back) > * { grid-column: 1 / -1; }
.page-head > div:has(> .cabinet-back) > h1 { grid-column: 1; }
.page-head > div > .cabinet-back { grid-column: 2; justify-self: end; }
.auth-card:has(> .cabinet-back) { position: relative; }
.auth-card > .cabinet-back { position: absolute; inset-block-start: 20px; inset-inline-end: 20px; }
.calendar-head { margin-block: 12px 16px; }
.calendar-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.calendar-panel { margin-block: 16px; padding: clamp(16px, 2.2vw, 24px); }
.calendar-panel .card-title { margin-block-end: 8px; }
.calendar-panel > p.muted { margin-block: 0 12px; font-size: .86rem; }
.calendar-form p { margin-block-end: 12px; }
.calendar-form.is-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); align-items: start; gap: 12px 14px; max-inline-size: none; }
.calendar-form.is-grid p, .settings-form p { align-content: start; }
.calendar-panel .empty-state { padding: 18px 16px; }
.calendar-form.is-grid p { margin: 0; }
.calendar-form.is-grid p:has(> input[type=checkbox]), .calendar-form.is-grid > button, .calendar-form.is-grid > ul { grid-column: 1 / -1; }
.calendar-form.is-grid > button { justify-self: start; }
.settings-form { max-inline-size: none; }
.settings-form p { margin: 0; }
.settings-form .settings-ready { margin-block-end: 12px; }
.settings-row, .settings-week { display: grid; gap: 10px 14px; }
.settings-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); align-items: end; margin-block-end: 14px; }
.settings-week { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 14px; margin-block-end: 16px; }
.settings-week > p { align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.settings-form:has(.interval-editor) .settings-week-help, p:has(> .interval-editor) > .helptext { display: none; }
.interval-editor { display: grid; gap: 6px; justify-items: start; }
.interval-list { display: grid; gap: 6px; inline-size: 100%; }
.interval-row { display: flex; align-items: center; gap: 4px; }
.interval-row input[type=time] { flex: 1 1 0; min-inline-size: 0; min-block-size: 40px; padding: .4rem .5rem; font-variant-numeric: tabular-nums; }
.interval-dash { color: var(--muted); }
button.interval-remove { flex: none; inline-size: 32px; min-block-size: 32px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; color: var(--muted); }
button.interval-remove:hover { color: var(--danger); }
.interval-off { margin: 0; padding: 8px 0; color: var(--muted); font-size: .9rem; }
button.interval-add { min-block-size: 32px; padding: .3rem .8rem; font-size: .86rem; }
.settings-form .settings-week-help { margin-block-end: 8px; color: var(--muted); }
.day-view-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; max-inline-size: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.day-view-form p { flex: 1 1 200px; margin: 0; }
.calendar-day { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-block: 16px 8px; }
.calendar-day h2 { margin: 0; font-variant-numeric: tabular-nums; }
.calendar-intervals { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-block-end: 12px; color: var(--muted); }
.calendar-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 8px 14px; }
.calendar-slots span { padding: 6px 12px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); border-radius: var(--pill); background: var(--primary-soft); color: var(--primary-soft-ink); font-size: .88rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.calendar-entry { margin-block: 8px; padding: 10px 14px; border: 1px solid var(--line); border-inline-start: 4px solid var(--primary); border-radius: var(--radius-sm); background: var(--surface); }
.calendar-entry.is-external { border-inline-start-color: var(--accent); }
.calendar-entry.is-inactive { opacity: .6; border-inline-start-color: var(--line-strong); }
.calendar-entry h3 { margin-block-end: 4px; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.calendar-entry p { margin-block-end: 4px; }
.calendar-entry p:last-of-type { color: var(--muted); font-size: .88rem; }
details { margin-block-start: 10px; }
details > summary { display: inline-flex; align-items: center; gap: 8px; min-block-size: 40px; color: var(--primary); font-weight: 650; cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: grid; place-items: center; inline-size: 22px; block-size: 22px; border-radius: 50%; background: var(--primary-soft); font-weight: 700; transition: rotate .2s; }
details[open] > summary::before { rotate: 45deg; }
details[open] > form { margin-block-start: 12px; }
.calendar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; margin-block: 16px; }
.calendar-grid .panel { margin: 0; }
.exception-list { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 16px; }
.exception-list p { margin: 0; padding: 6px 12px; border-radius: var(--pill); background: var(--surface-2); font-size: .86rem; font-variant-numeric: tabular-nums; }

.contact-row > p { display: grid; gap: 7px; margin-block: 0 16px; min-inline-size: 0; }
.provider-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Contact channel: icon tiles (radio inputs) */
.channel-field { margin-block: 0 16px; }
.channel-field > legend { margin-block-end: 8px; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.channel-picker { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.channel-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
  padding: 12px 4px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .15s var(--ease), box-shadow .15s;
}
.channel-option:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.channel-option input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: pointer; }
.channel-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface)); color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.channel-option:has(input:checked)::after { content: "\2713"; position: absolute; inset-block-start: 5px; inset-inline-end: 5px; display: grid; place-items: center; inline-size: 18px; block-size: 18px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: .65rem; font-weight: 800; }
.channel-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.channel-icon { display: grid; place-items: center; inline-size: 38px; block-size: 38px; border-radius: 12px; box-shadow: var(--shadow-xs); }
.channel-icon svg { inline-size: 24px; block-size: 24px; }
.channel-whatsapp { background: #25d366; }
.channel-telegram { background: #2aabee; }
.channel-facebook { background: #1877f2; }
.channel-vk { background: #0077ff; }
.channel-max { background: linear-gradient(135deg, #4b3cfa, #22b5ff); }
.channel-email { background: var(--accent); }
.channel-name { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-row:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }
[data-contact-form] > small { display: block; margin-block-start: -8px; }
dialog .channel-picker, .offer-page .channel-picker, .auth-card .channel-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .channel-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.type-picker { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)) !important; }
.type-option { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; text-align: start; font-size: .88rem; }
.type-option .channel-name { white-space: normal; overflow: visible; line-height: 1.25; padding-inline-end: 16px; }
.type-icon { display: grid; place-items: center; flex-shrink: 0; inline-size: 34px; block-size: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-soft-ink); }
.type-icon .icon { inline-size: 18px; block-size: 18px; }
.type-option:has(input:checked) .type-icon { background: var(--primary); color: var(--primary-ink); }

/* Live price on the selection screen */
.js .recalc-fallback { display: none; }
.count-badge { display: inline-flex; align-items: center; margin-inline-start: 6px; padding: 2px 10px; border-radius: var(--pill); background: var(--primary-soft); color: var(--primary-soft-ink); font-family: var(--font-sans); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: middle; letter-spacing: 0; }
.count-badge.is-complete { background: var(--success-soft); color: var(--success); }
.estimate [data-estimate-total] { display: inline-block; transition: opacity .15s; }
.estimate.is-updating [data-estimate-total] { opacity: .45; }
.estimate.is-changed .price { animation: price-flash .6s var(--ease); }
@keyframes price-flash { 0% { color: var(--accent); transform: scale(1.06); } 100% { color: inherit; transform: none; } }
.estimate .price { transform-origin: left center; }
[dir=rtl] .estimate .price { transform-origin: right center; }

/* ---------- Photographer: hero photos and portfolio ---------- */
.hero:has(.hero-visual) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block-start: clamp(24px, 4vw, 48px); }
.hero-visual { position: relative; justify-self: center; inline-size: min(100%, 620px); isolation: isolate; padding-block-start: 4%; }
.hero-arch {
  position: absolute;
  inset: 20% 9% 0;
  z-index: -1;
  border-radius: 999px 999px 28px 28px;
  background:
    radial-gradient(120% 70% at 50% 15%, color-mix(in srgb, var(--dome) 55%, transparent), transparent 70%),
    linear-gradient(180deg, var(--featured-bg), color-mix(in srgb, var(--featured-bg) 70%, #000));
  box-shadow: var(--shadow-lg);
}
.hero-arch::after { content: ""; position: absolute; inset: -12px; border: 1px dashed color-mix(in srgb, var(--gold) 70%, transparent); border-radius: inherit; border-end-start-radius: 34px; border-end-end-radius: 34px; }
.hero-photo { position: relative; display: block; inline-size: 100%; block-size: auto; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .28)); animation: rise .8s var(--ease) both; }
/* The camera cut-out and the portrait take turns (~3 s each); reduced motion keeps the cut-out only. */
.hero-portrait {
  position: absolute;
  inset: 20% 9% 0;
  z-index: -1;
  inline-size: 82%;
  block-size: 80%;
  object-fit: cover;
  object-position: 50% 6%;
  border-radius: 999px 999px 28px 28px;
  opacity: 0;
}
.hero-visual.has-portrait .hero-photo { animation: rise .8s var(--ease) both, hero-swap-out 6s ease-in-out 2.4s infinite both; }
.hero-visual.has-portrait .hero-portrait { animation: hero-swap-in 6s ease-in-out 2.4s infinite both; }
.hero-visual.has-portrait:hover .hero-photo, .hero-visual.has-portrait:hover .hero-portrait { animation-play-state: paused; }
@keyframes hero-swap-out { 0%, 40% { opacity: 1; transform: none; } 50%, 90% { opacity: 0; transform: translateY(10px) scale(.98); } 100% { opacity: 1; transform: none; } }
@keyframes hero-swap-in { 0%, 40% { opacity: 0; transform: scale(1.04); } 50%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }
/* Uploaded cut-outs (/manage/hero-photos/) share one grid cell and cross-fade (static/forms.js);
   photos of different sizes stand on the same bottom line. */
.hero-cutouts { position: relative; display: grid; align-items: end; justify-items: center; animation: rise .8s var(--ease) both; }
.hero-cutout {
  grid-area: 1 / 1;
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: min(80svh, 780px);
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / .28));
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
}
.hero-cutout.is-active { opacity: 1; transform: none; }
.hero-visual .hero-chip-1 { inset-block-end: 9%; inset-inline-start: -5%; }
.hero-chip-works { inset-block-start: 26%; inset-inline-end: -4%; gap: 10px; padding: 8px 14px 8px 8px; color: var(--ink); text-decoration: none; animation: float 8s ease-in-out -3s infinite; }
[dir=rtl] .hero-chip-works { padding: 8px 8px 8px 14px; }
.hero-chip-works:hover { color: var(--ink); box-shadow: var(--shadow-lg); }
.chip-stack { display: flex; }
.chip-stack img { inline-size: 34px; block-size: 34px; object-fit: cover; border-radius: 50%; border: 2px solid var(--surface); }
.chip-stack img + img { margin-inline-start: -12px; }
.chip-count { font-size: .95rem; font-weight: 750; letter-spacing: 0; }

.portfolio { margin-block: clamp(56px, 8vw, 110px); }
.gallery-grid { columns: 3 260px; column-gap: 16px; }
.gallery-item {
  position: relative;
  display: block;
  margin-block-end: 16px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-3);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}
.gallery-item img { display: block; inline-size: 100%; block-size: auto; transition: transform .7s var(--ease), filter .4s; }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgb(0 0 0 / .35)); opacity: 0; transition: opacity .3s; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.045); }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; }
.gallery-zoom { position: absolute; z-index: 1; inset-block-end: 14px; inset-inline-end: 14px; display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: rgb(255 255 255 / .9); color: #1b2220; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease); }
.gallery-item:hover .gallery-zoom, .gallery-item:focus-visible .gallery-zoom { opacity: 1; transform: none; }

/* ---------- Landing: portfolio flow ----------
   After images/bukhara_background/sample3_video.mp4: on a dark navy band one photo faces the viewer and the others
   stand in perspective stacks at the sides. static/portfolio-flow.js places the photos (.is-flow); without JS the
   same band holds the plain grid above. */
.portfolio {
  /* Joins the black "How it works" scene above without a light gap (that scene keeps its bottom margin). */
  margin-block: calc(-1 * clamp(48px, 7vw, 88px)) clamp(48px, 7vw, 88px);
  margin-inline: calc(50% - 50vw);
  padding: clamp(56px, 9vh, 104px) var(--gutter);
  background:
    radial-gradient(ellipse 60% 55% at 50% 52%, rgb(70 84 128 / .55), transparent 75%),
    linear-gradient(180deg, #050505 0%, #1b2138 22%, #1d2440 78%, #08090f 100%);
  color: #f4efe6;
  overflow: hidden;
}
.portfolio > * { inline-size: min(var(--container), 100%); margin-inline: auto; }
.portfolio-heading { justify-content: center; text-align: center; }
.portfolio-heading .eyebrow { justify-content: center; color: #f2c27b; }
.portfolio-heading h2 { margin: 0; color: #fff; }
.gallery-grid.is-flow {
  --flow-w: min(52vw, 600px);
  --flow-ratio: 4 / 3;
  position: relative;
  columns: auto;
  inline-size: 100%;
  block-size: calc(var(--flow-w) * 3 / 4 + clamp(40px, 6vw, 72px));
  margin-block: clamp(8px, 2vw, 24px) 0;
  perspective: 1500px;
  perspective-origin: 50% 45%;
  transform-style: preserve-3d;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
/* Soft shadow on the "floor" under the row, as in the video. */
.gallery-grid.is-flow::before {
  content: "";
  position: absolute;
  inset-inline: 8%;
  inset-block-end: 0;
  block-size: clamp(30px, 5vw, 60px);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgb(0 0 0 / .45), transparent 70%);
  pointer-events: none;
}
.is-flow .gallery-item {
  position: absolute;
  inset-block-start: calc(clamp(40px, 6vw, 72px) / 2 - 8px);
  inset-inline-start: calc(50% - var(--flow-w) / 2);
  inline-size: var(--flow-w);
  aspect-ratio: var(--flow-ratio);
  margin: 0;
  border-radius: clamp(10px, 1.4vw, 18px);
  background: #2a3150;
  box-shadow: 0 18px 40px rgb(0 0 0 / .4);
  backface-visibility: hidden;
  transform-origin: 50% 50%;
  cursor: pointer;
  will-change: transform;
}
.is-flow.is-ready .gallery-item { transition: transform .75s var(--ease), opacity .5s; }
.is-flow.is-dragging .gallery-item { transition: none; }
.is-flow .gallery-item.is-front { cursor: zoom-in; }
.is-flow .gallery-item img { inline-size: 100%; block-size: 100%; object-fit: cover; pointer-events: none; }
/* Photos in the stacks are darker; --shade comes from the script. */
.is-flow .gallery-item::after {
  background: linear-gradient(90deg, rgb(8 10 22 / .2), rgb(8 10 22 / .6));
  opacity: var(--shade, 0);
  transition: opacity .5s;
}
.is-flow .gallery-item:hover img { transform: none; }
.is-flow .gallery-item:not(.is-front) .gallery-zoom { display: none; }
.is-flow .gallery-item.is-front:hover::after { opacity: .5; background: linear-gradient(180deg, transparent 55%, rgb(0 0 0 / .35)); }
.is-flow .gallery-item:focus-visible { outline: 3px solid #f2c27b; outline-offset: 4px; }
.flow-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-block-start: clamp(14px, 2.4vw, 26px); }
.flow-controls[hidden] { display: none; }
.flow-controls button { --btn-bg: #fff; --btn-ink: #1b2220; --btn-line: transparent; --btn-hover: #f2c27b; inline-size: 48px; min-block-size: 48px; padding: 0; border-radius: 50%; box-shadow: 0 8px 20px rgb(0 0 0 / .3); }
.flow-controls button .icon { inline-size: 20px; block-size: 20px; }
.flow-counter { min-inline-size: 4.5em; margin: 0; text-align: center; font-size: .9rem; font-weight: 650; letter-spacing: .08em; color: rgb(255 255 255 / .75); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .gallery-grid.is-flow { --flow-w: 64vw; --flow-ratio: 4 / 5; block-size: calc(var(--flow-w) * 5 / 4 + 40px); perspective: 900px; }
  .is-flow .gallery-item { inset-block-start: 12px; }
}
/* The dark tariff story (same query as "Landing: scroll story") starts right below. */
@media (prefers-reduced-motion: no-preference) and (min-height: 520px) {
  .js .portfolio:has(+ .story) { margin-block-end: 0; }
}
@media print { .portfolio { margin: 0; padding: 0; background: none; color: inherit; } .portfolio-heading h2 { color: #000; } }

dialog.lightbox {
  inline-size: 100vw;
  max-inline-size: 100vw;
  block-size: 100dvh;
  max-block-size: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgb(8 12 12 / .94);
  color: #fff;
  box-shadow: none;
  overflow: hidden;
}
dialog.lightbox[open] { display: grid; place-items: center; animation: none; }
dialog.lightbox::backdrop { background: rgb(0 0 0 / .6); }
.lightbox.is-single .lightbox-nav, .lightbox.is-single .lightbox-counter { display: none; }
.lightbox-stage { display: grid; place-items: center; margin: 0; inline-size: 100%; block-size: 100%; padding: 64px 72px; }
.lightbox-image { max-inline-size: calc(100vw - 144px); max-block-size: calc(100dvh - 128px); inline-size: auto; block-size: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgb(0 0 0 / .5); transition: opacity .25s; }
.lightbox.is-loading .lightbox-image { opacity: .35; }
.lightbox-counter { position: absolute; inset-block-start: 22px; inset-inline-start: 50%; translate: -50% 0; margin: 0; font-size: .9rem; font-weight: 650; letter-spacing: .08em; color: rgb(255 255 255 / .8); font-variant-numeric: tabular-nums; }
[dir=rtl] .lightbox-counter { translate: 50% 0; }
.lightbox button { --btn-bg: rgb(255 255 255 / .12); --btn-ink: #fff; --btn-line: transparent; --btn-hover: rgb(255 255 255 / .24); position: absolute; inline-size: 52px; min-block-size: 52px; padding: 0; box-shadow: none !important; }
.lightbox button .icon { inline-size: 22px; block-size: 22px; }
.lightbox-close { inset-block-start: 14px; inset-inline-end: 14px; }
.lightbox-nav { inset-block-start: 50%; translate: 0 -50%; }
.lightbox-prev { inset-inline-start: 14px; }
.lightbox-next { inset-inline-end: 14px; }
.lightbox button:active { transform: none; }


@media (max-width: 860px) {
  .hero:has(.hero-visual) { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { inline-size: min(92%, 460px); }
}
@media (max-width: 640px) {
  .gallery-grid { columns: 2; column-gap: 10px; }
  .gallery-item { margin-block-end: 10px; border-radius: var(--radius-sm); }
  .gallery-zoom { display: none; }
  .lightbox-stage { padding: 64px 10px 84px; }
  .lightbox-image { max-inline-size: calc(100vw - 20px); max-block-size: calc(100dvh - 148px); }
  .lightbox-nav { inset-block-start: auto; inset-block-end: 16px; translate: none; }
  .hero-visual .hero-chip-1 { inset-inline-start: 0; }
  .hero-chip-works { inset-inline-end: 0; }
}

/* ---------- Utilities ---------- */
[hidden] { display: none !important; }
.sr-only { position: absolute !important; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-0 { margin-block-start: 0; }
.mb-0 { margin-block-end: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .checkout-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .checkout-layout > .summary { order: -1; position: static; }
  .detail-side { position: static; }
  .steps ol { gap: 14px; }
  .steps li:not(:last-child)::after { display: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { inline-size: min(86%, 380px); }
  .card-grid { grid-template-columns: minmax(0, 1fr); max-inline-size: 560px; margin-inline: auto; }
  .tariff-card:hover { transform: none; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 8px 10px; min-block-size: 0; padding-block: 10px; }
  .brand { font-size: 1.45rem; gap: 8px; }
  .brand-mark { inline-size: 32px; block-size: 32px; font-size: 1.35rem; }
  .language-switch { order: 2; }
  .theme-toggle { order: 2; }
  .language-controls select { max-inline-size: 150px; font-size: .86rem; padding-inline: 34px 30px; }
  .site-nav { order: 3; inline-size: 100%; gap: 6px; flex-wrap: nowrap; }
  .site-nav > * { flex: 1 1 0; min-inline-size: 0; }
  .site-nav .nav-link, .site-nav button { inline-size: 100%; justify-content: center; min-block-size: 40px; font-size: .88rem; padding-inline: 10px; }
  .js .language-switch .lang-apply { display: none; }
  .hero { padding-block-start: 20px; gap: 22px; }
  .hero-art { inline-size: min(82%, 320px); }
  .hero-chip-1 { inset-inline-start: 2%; inset-block-end: 8%; }
  .hero-chip-2 { inset-inline-end: 2%; }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  .hero-actions > * { flex: 1 1 100%; }
  .steps ol { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; padding: 14px 16px; }
  .steps .step-top { display: contents; }
  .steps .step-icon { grid-row: 1 / span 3; inline-size: 40px; block-size: 40px; }
  .steps .step-num { justify-self: start; padding: 2px 8px; font-size: .72rem; }
  .tariff-card { padding: 22px; }
  .panel { border-radius: var(--radius); }
  .contact-row, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot-period { padding: 12px; }
  .summary-bar { flex-wrap: nowrap; gap: 12px; padding: 10px 10px 10px 16px; inset-block-end: 8px; border-radius: var(--radius); }
  [dir=rtl] .summary-bar { padding: 10px 16px 10px 10px; }
  .summary-bar .estimate h3 { font-size: .66rem; }
  .summary-bar .estimate .price { font-size: 1.45rem; white-space: nowrap; }
  .summary-bar .estimate p:last-child { display: none; }
  .summary-bar .actions { flex: 1 1 auto; justify-content: flex-end; min-inline-size: 0; }
  .summary-bar .actions button { min-block-size: 48px; padding-inline: 14px; font-size: .9rem; }
  .booking-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .booking-facts dd { margin-block-end: 8px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  dialog { padding: 24px 20px; }
  .errorlist { padding-inline-start: 0; }
  /* Two compact cards per row on phones instead of one tall card. */
  .choice-group > div[id], .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .request-block .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  /* Text flows under the checkbox so narrow cards keep the full width for words. */
  .option-body { display: block; padding: 8px 8px 9px; }
  .option-check { float: inline-start; margin-inline-end: 6px; }
  .option-text { display: block; hyphens: auto; }
  .option-text > span { display: block; }
  .option-text > .option-demo { display: inline-block; }
  .option-title { min-block-size: 20px; margin-block-end: 2px; padding-block-start: 1px; }
  .option-body input[type=checkbox] { inset-block-start: 8px; inset-inline-start: 8px; }
  .option-card:hover { transform: none; }
  .page-head { margin-block-start: 24px; }
  .page-actions, .page-actions > * { inline-size: 100%; }
  .cabinet-back { inline-size: 40px; min-inline-size: 40px; block-size: 40px; min-block-size: 40px; padding: 0; justify-content: center; }
  .cabinet-back .cabinet-back-label { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .filters > * { flex: 1 1 100%; }
  /* Compact tables: small text, tight padding (still scrolls sideways if needed). */
  /* Size columns by content: the table and its frame shrink to fit instead of stretching short columns. */
  .table-wrap { inline-size: fit-content; max-inline-size: 100%; margin-block: 6px 16px; border-radius: var(--radius-sm); }
  .table-wrap table { inline-size: auto; min-inline-size: 0; font-size: .74rem; line-height: 1.3; }
  .table-wrap th, .table-wrap td { padding: 5px 7px; }
  .table-wrap th { font-size: .6rem; letter-spacing: .02em; white-space: normal; vertical-align: bottom; }
  .table-wrap td:first-child { min-inline-size: 6.5rem; }
  /* The "⋯" column needs no visible heading; keep it for screen readers. */
  .js .table-wrap table:has(td.row-actions) th:last-child { inline-size: 1%; padding-inline: 0; font-size: 0; letter-spacing: 0; }
  .table-wrap td a { font-weight: 550; }
  .table-wrap td .button-sm, .table-wrap td .button { min-block-size: 28px; padding: 2px 8px; font-size: .7rem; }
  .table-wrap td .button-sm, .table-wrap td .inline-form { margin-block: 1px; margin-inline-end: 3px; }
  .table-wrap td .inline-form { gap: 4px; }
  .table-wrap td .inline-form input:not([type=hidden]), .table-wrap td .inline-form select { min-block-size: 28px; padding-block: 2px; font-size: .74rem; }
  .table-wrap td .badge, .table-wrap td .status { font-size: .64rem; padding: 1px 6px; gap: 4px; }
  .table-wrap td .status::before { inline-size: 5px; block-size: 5px; }
  .audit-fields { font-size: .68rem; }
  .js .table-wrap td.row-actions { position: sticky; inset-inline-end: 0; inline-size: 1%; padding-inline: 6px; background: var(--surface); text-align: center; box-shadow: inset 1px 0 0 var(--line); }
  [dir=rtl].js .table-wrap td.row-actions, .js [dir=rtl] .table-wrap td.row-actions { box-shadow: inset -1px 0 0 var(--line); }
  .js .row-menu-toggle { display: inline-grid; place-items: center; inline-size: 32px; block-size: 28px; min-block-size: 0; min-inline-size: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 700; line-height: 1; box-shadow: none; cursor: pointer; }
  .js .row-menu-toggle[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line-strong); }
  .js .row-menu { position: fixed; z-index: 60; display: none; flex-direction: column; gap: 4px; min-inline-size: 170px; max-inline-size: calc(100vw - 16px); padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); white-space: normal; text-align: start; }
  .js .row-menu.is-open { display: flex; }
  .js .row-menu > form, .js .row-menu .inline-form { display: flex; margin: 0; }
  .js .row-menu .button, .js .row-menu button { inline-size: 100%; min-block-size: 40px; margin: 0; padding: 6px 12px; justify-content: flex-start; text-align: start; font-size: .82rem; }
}
@media (max-width: 380px) {
  .summary-bar { flex-wrap: wrap; }
  .summary-bar .actions, .summary-bar .actions button { inline-size: 100%; }
  .header-inner { column-gap: 8px; }
  .language-controls select { max-inline-size: 112px; padding-inline: 32px 24px; }
  .js .theme-toggle { inline-size: 36px; block-size: 36px; }
  .hero-chip-2 { display: none; }
}

@media print {
  .site-header, .site-footer, .summary-bar, .hero-art, button { display: none !important; }
  body { background: #fff; }
}

/* ---------- Admin: "Sample work" photos ---------- */
.portfolio-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 0 0 18px; padding: 0; list-style: none; }
.portfolio-admin-item { display: grid; gap: 8px; align-content: start; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.portfolio-admin-item.is-hidden .portfolio-admin-thumb img { opacity: .4; filter: grayscale(1); }
.portfolio-admin-thumb { display: block; overflow: hidden; border-radius: calc(var(--radius-sm) - 4px); background: var(--surface-2); aspect-ratio: 4 / 5; }
.portfolio-admin-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
/* Cut-outs: the whole figure on a checkerboard, so the transparent background is visible. */
.portfolio-admin.is-transparent .portfolio-admin-thumb { background: repeating-conic-gradient(#d9dde1 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.portfolio-admin.is-transparent .portfolio-admin-thumb img { object-fit: contain; object-position: 50% 100%; }
.portfolio-admin-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.portfolio-admin-position input { inline-size: 4.2em; min-block-size: 38px; padding-inline: 8px; text-align: center; }
.portfolio-admin-controls .ghost { min-inline-size: 38px; padding-inline: 8px; }
@media (max-width: 420px) { .portfolio-admin { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.portfolio-delete-thumb { max-inline-size: 260px; margin-block-end: 14px; }

/* ---------- Landing: header over the Bukhara photo ----------
   The menu is transparent over the photo and becomes the usual glass bar once the page scrolls
   (static/forms.js sets .is-scrolled and --header-h). Without JavaScript the glass bar stays. */
:root { --header-h: 73px; }
.hero-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-block-size: min(100svh, 900px);
  margin-block-start: calc(-1 * var(--header-h));
  padding-block-start: var(--header-h);
  background: #0b1630;
  color: #f6efe4;
}
/* Backgrounds from /manage/hero/ cross-fade (static/forms.js moves .is-active); without JS the first one stays. */
.hero-slides { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  max-inline-size: none;
  block-size: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}
.hero-bg.is-active { opacity: 1; }
/* Slow zoom while a photo is shown; reduced motion turns it off together with all animations. */
.hero-slides[data-hero-slides] .hero-bg { transform: scale(1.06); transition: opacity 1.6s ease-in-out, transform 12s linear; }
.hero-slides[data-hero-slides] .hero-bg.is-active { transform: scale(1); }
/* Darkens the sky behind the text and the strip under the menu, keeps the lit madrasa bright. */
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(5 12 30 / .8) 0%, rgb(5 12 30 / .5) 40%, rgb(5 12 30 / .05) 72%),
    linear-gradient(180deg, rgb(5 12 30 / .6) 0%, transparent 24%, transparent 72%, rgb(5 12 30 / .5) 100%);
}
[dir=rtl] .hero-banner::before {
  background:
    linear-gradient(270deg, rgb(5 12 30 / .82) 0%, rgb(5 12 30 / .6) 45%, rgb(5 12 30 / .2) 80%),
    linear-gradient(180deg, rgb(5 12 30 / .6) 0%, transparent 24%, transparent 72%, rgb(5 12 30 / .5) 100%);
}
.hero-banner .hero {
  inline-size: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
  align-items: end;
  padding-block: clamp(32px, 6vw, 72px) 0;
}
.hero-banner .hero-content { align-self: center; padding-block-end: clamp(40px, 7vw, 96px); }
.hero-banner h1 { color: #fff; text-shadow: 0 2px 24px rgb(0 0 0 / .35); }
.hero-banner .lead { color: rgb(255 255 255 / .86); }
.hero-banner .photographer-note { color: rgb(255 255 255 / .82); border-inline-start-color: #f2c27b; }
.hero-banner .eyebrow-pill {
  color: #fff;
  border-color: rgb(255 255 255 / .3);
  background: rgb(255 255 255 / .12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hero-banner .eyebrow-pill .dot { background: #f2c27b; box-shadow: 0 0 0 4px rgb(242 194 123 / .25); }
/* Warm lamp colour of the arches; dark text keeps contrast. */
.hero-banner .hero-actions .button:not(.button-secondary) {
  --btn-bg: #f2c27b;
  --btn-ink: #1d1a14;
  --btn-line: #f2c27b;
  --btn-hover: #f8d59f;
  box-shadow: 0 10px 30px -12px rgb(242 194 123 / .7);
}
.hero-banner .button-secondary {
  --btn-bg: rgb(255 255 255 / .1);
  --btn-ink: #fff;
  --btn-line: rgb(255 255 255 / .45);
  --btn-hover: rgb(255 255 255 / .2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hero-banner .button-secondary:hover { border-color: #fff; }
.hero-banner .hero-visual { align-self: end; padding-block-start: 0; }
/* Soft lamp glow instead of the teal arch, so dark hair does not merge with the night sky. */
.hero-banner .hero-arch {
  inset: 8% 0 -10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 196 128 / .38), rgb(255 196 128 / .12) 60%, transparent);
  box-shadow: none;
}
.hero-banner .hero-arch::after { display: none; }
.hero-banner .hero-portrait { box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6); }
.page-home::before { inset-block-start: min(100svh, 900px); }

/* Menu over the photo (home page, top of the page only). */
.js .page-home .site-header:not(.is-scrolled) {
  --ink: #fff;
  --ink-2: rgb(255 255 255 / .9);
  --muted: rgb(255 255 255 / .75);
  --surface: rgb(255 255 255 / .12);
  --surface-2: rgb(255 255 255 / .22);
  --line: rgb(255 255 255 / .28);
  --line-strong: rgb(255 255 255 / .45);
  background: transparent;
  border-block-end-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.js .page-home .site-header { transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.page-home .site-header select option { color: #1b2220; background: #fff; }

@media (max-width: 860px) {
  .hero-banner { min-block-size: 0; }
  .hero-bg { object-position: 68% 50%; }
  .hero-banner::before, [dir=rtl] .hero-banner::before {
    background: linear-gradient(180deg, rgb(5 12 30 / .78) 0%, rgb(5 12 30 / .55) 45%, rgb(5 12 30 / .15) 75%, rgb(5 12 30 / .45) 100%);
  }
  .hero-banner .hero-content { padding-block-end: 8px; }
}
@media (max-width: 640px) {
  :root { --header-h: 113px; }
  .hero-banner .hero { padding-block-start: 24px; }
}
@media print {
  .hero-bg, .hero-banner::before { display: none; }
  .hero-banner { margin: 0; padding: 0; min-block-size: 0; background: none; color: inherit; }
  .hero-banner h1, .hero-banner .lead { color: #000; text-shadow: none; }
}

/* ---------- Landing: scroll story ----------
   static/home-scroll.js sets --hero-out on the header photo and moves the step cards.
   Without JS, with reduced motion or on a low screen the steps stay a plain list of cards. */
.story { margin-block: 8px clamp(48px, 7vw, 88px); }
.story-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  min-inline-size: 0;
}
.story-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; margin: 0; background: var(--primary-soft); }
.story-media img { inline-size: 100%; block-size: 100%; max-inline-size: none; object-fit: cover; }
.story-icon { display: grid; place-items: center; block-size: 100%; color: var(--primary-soft-ink); }
.story-icon .icon { inline-size: 44px; block-size: 44px; }
.story-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 20px 20px; line-height: 1.4; }
.story-body .button, .story-body button { margin-block-start: 6px; }
.story-num { position: absolute; inset-block-start: 10px; inset-inline-end: 14px; z-index: 1; font: 500 2.4rem/1 var(--font-display); color: #fff; opacity: .85; text-shadow: 0 2px 12px rgb(0 0 0 / .45); }
.story-bg, .story-progress, .tariff-card .story-num, .tariff-card .story-media { display: none; }
@media (max-width: 1000px) { .story-track { gap: 14px; } }
@media (max-width: 760px) { .story-track { grid-template-columns: minmax(0, 1fr); max-inline-size: 520px; margin-inline: auto; } }

@media (prefers-reduced-motion: no-preference) and (min-height: 520px) {
  /* Header photo (as in the reference video): it moves slower than the page, its lower part sinks into
     the black of the steps scene, the text drifts up faster and fades. */
  .js .hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgb(5 5 5 / .1) 0%, rgb(5 5 5 / .6) 38%, #050505 76%);
    opacity: min(1, calc(var(--hero-out, 0) * 1.7));
    pointer-events: none;
  }
  .js .hero-banner .hero-content { transform: translate3d(0, calc(var(--hero-out, 0) * -140px), 0); opacity: calc(1 - var(--hero-out, 0) * 1.6); will-change: transform, opacity; }
  .js .hero-banner .hero-visual { transform: translate3d(0, calc(var(--hero-out, 0) * 90px), 0); opacity: calc(1 - var(--hero-out, 0) * 1.2); }
  .js .hero-slides { transform: translate3d(0, calc(var(--hero-out, 0) * 32%), 0) scale(calc(1 + var(--hero-out, 0) * .06)); transform-origin: 50% 0; }

  /* Story: full-width stage that sticks while the cards slide one by one. */
  .js .story {
    --dir: 1;
    position: relative;
    block-size: calc(100svh + (var(--story-count, 3) - 1) * var(--story-step, 110svh));
    margin-block: -8px clamp(48px, 7vw, 88px);
    margin-inline: calc(50% - 50vw);
    background: #0b1020;
    color: #f4efe6;
  }
  [dir=rtl].js .story { --dir: -1; }
  .js .story-stage {
    position: sticky;
    inset-block-start: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    block-size: 100svh;
    overflow: hidden;
    isolation: isolate;
    padding: calc(var(--header-h) + clamp(12px, 3vh, 32px)) var(--gutter) clamp(16px, 4vh, 40px);
  }
  /* Blurred, dark copy of the header photo: the same scene continues under the cards. */
  .js .story-bg {
    display: block;
    position: absolute;
    inset: -6%;
    z-index: -2;
    inline-size: 112%;
    max-inline-size: none;
    block-size: 112%;
    object-fit: cover;
    filter: blur(16px) brightness(.38) saturate(.8);
    transform: translate3d(calc(var(--story-p, 0) * -3% * var(--dir)), 0, 0);
  }
  .js .story-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(ellipse 70% 55% at 50% 45%, transparent 0%, rgb(5 8 18 / .55) 100%),
      repeating-radial-gradient(circle at 30% 120%, transparent 0 46px, rgb(255 255 255 / .035) 47px 48px);
  }
  .js .story-heading { inline-size: min(var(--container), 100%); margin: 0 auto; }
  .js .story-heading .eyebrow { color: #f2c27b; }
  .js .story-heading h2 { color: #fff; }

  .js .story-track { position: relative; display: block; inline-size: 100%; max-inline-size: none; margin: 0; }
  .js .story-card {
    --d: 0;
    position: absolute;
    inset: 0;
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 4vw, 56px);
    inline-size: min(900px, 100%);
    block-size: fit-content;
    max-block-size: 100%;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    will-change: transform, opacity;
  }
  .js .story-card:not(:first-child) { opacity: 0; }
  .js .story-media {
    aspect-ratio: 4 / 3;
    max-block-size: 58svh;
    border-radius: var(--radius);
    background: rgb(255 255 255 / .06);
    box-shadow: 0 40px 70px -30px rgb(0 0 0 / .8);
  }
  /* The photo moves a little against its frame, which gives depth. */
  .js .story-media img { transform: translate3d(calc(var(--d) * -9% * var(--dir)), 0, 0) scale(1.18); }
  .js .story-icon { color: rgb(255 255 255 / .7); }
  .js .story-icon .icon { inline-size: 64px; block-size: 64px; }
  .js .story-body { position: relative; z-index: 1; padding: 0; gap: 12px; }
  .js .story-body .step-num { background: rgb(242 194 123 / .16); color: #f2c27b; }
  .js .story-body .step-title { font: 500 clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--font-display); letter-spacing: -.02em; color: #fff; }
  .js .story-body .step-text { color: rgb(255 255 255 / .74); font-size: 1rem; }
  .js .story-body .button, .js .story-body button { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .3); color: #fff; box-shadow: none; }
  .js .story-body .button:hover, .js .story-body button:hover { background: rgb(255 255 255 / .2); }
  /* Big pale number behind the text, moving faster than the card. */
  .js .story-num {
    inset-block-start: -.18em;
    inset-inline-end: -.05em;
    z-index: 0;
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 600;
    color: rgb(255 255 255 / .07);
    opacity: 1;
    text-shadow: none;
    transform: translate3d(calc(var(--d) * 22vw * var(--dir)), 0, 0);
    pointer-events: none;
  }

  /* Progress line with numbered points. */
  .js .story-progress {
    display: block;
    position: relative;
    inline-size: min(560px, 100%);
    block-size: 60px;
    margin: clamp(8px, 2vh, 20px) auto 0;
  }
  [dir=rtl].js .story-progress svg { transform: scaleX(-1); }
  .js .story-progress svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
  .js .story-line { fill: none; stroke: rgb(255 255 255 / .28); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
  .js .story-line.is-filled { stroke: #f2c27b; stroke-width: 2; clip-path: inset(-10px calc(100% - var(--story-x, 16.7%)) -10px -10px); }
  .js .story-node {
    position: absolute;
    inset-inline-start: var(--x);
    inset-block-start: var(--y);
    translate: -50% -50%;
    display: grid;
    place-items: center;
    inline-size: 30px;
    block-size: 30px;
    border: 1px solid rgb(255 255 255 / .35);
    border-radius: 50%;
    background: #0b1020;
    color: rgb(255 255 255 / .7);
    font-size: .72rem;
    font-weight: 700;
    transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  }
  [dir=rtl].js .story-node { translate: 50% -50%; }
  .js .story-node.is-active { border-color: #f2c27b; background: #f2c27b; color: #1b1407; }
  /* Only the card in front takes clicks; the others are faded out to the sides. */
  .js .story [data-story-card]:not(.is-active) { pointer-events: none; }

  /* Tariffs in the same story: photo on one side (/manage/tariff-photos/), text with a large price line on the other. */
  .js .story-tariffs .story-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
  .js .story-tariffs .story-heading > p { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .2); color: rgb(255 255 255 / .8); }
  .js .story-tariffs .card-grid { display: block; }
  .js .story-tariffs .tariff-card {
    --d: 0;
    position: absolute;
    inset: 0;
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    column-gap: clamp(20px, 4vw, 56px);
    align-content: center;
    inline-size: min(900px, 100%);
    block-size: fit-content;
    max-block-size: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #fff;
    transition: none;
    will-change: transform, opacity;
  }
  .js .story-tariffs .tariff-card:not(:first-child) { opacity: 0; }
  .js .story-tariffs .tariff-card:hover { transform: none; background: none; }
  .js .story-tariffs .tariff-card > * { grid-column: 2; position: relative; z-index: 1; }
  .js .story-tariffs .tariff-card > .story-media { display: block; grid-column: 1; grid-row: 1 / span 8; align-self: center; position: relative; overflow: hidden; z-index: 0; }
  .js .story-tariffs .tariff-card > .story-num { display: block; grid-column: auto; position: absolute; z-index: 0; }
  .js .story-tariffs .tariff-card .price {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-block-end: 18px;
    color: #fff;
    font-size: clamp(3.2rem, 6vw, 4.6rem);
    line-height: 1;
  }
  /* Thin gold line after the price, to the end of the column. */
  .js .story-tariffs .tariff-card .price::after { content: ""; flex: 1; align-self: center; block-size: 1px; background: linear-gradient(to right, rgb(242 194 123 / .6), transparent); }
  [dir=rtl].js .story-tariffs .tariff-card .price::after { background: linear-gradient(to left, rgb(242 194 123 / .6), transparent); }
  .js .story-tariffs .tariff-card .price small { color: #f2c27b; }
  .js .story-tariffs .tariff-index { margin-block-end: 14px; color: #f2c27b; }
  .js .story-tariffs .tariff-glyph { background: rgb(242 194 123 / .16); color: #f2c27b; }
  .js .story-tariffs .tariff-card h3 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; }
  .js .story-tariffs .tariff-card .description { flex: none; margin-block-end: 18px; color: rgb(255 255 255 / .74); }
  .js .story-tariffs .tariff-card .facts { margin-block-end: 22px; }
  .js .story-tariffs .facts > div { border-color: rgb(255 255 255 / .16); }
  .js .story-tariffs .facts dt { color: rgb(255 255 255 / .7); }
  .js .story-tariffs .facts dt .icon { color: #f2c27b; }
  .js .story-tariffs .tariff-card > .muted { color: rgb(255 255 255 / .7); }
  .js .story-tariffs .tariff-card > button:not(:disabled) { --btn-bg: #f2c27b; --btn-ink: #1b1407; --btn-line: #f2c27b; --btn-hover: #f7d59f; box-shadow: none; }
  /* Chosen tariff: outlined button and a solid gold line after the price. */
  .js .story-tariffs .tariff-card.is-selected .price::after { background: #f2c27b; }
  .js .story-tariffs .tariff-card.is-selected > button:not(:disabled) { --btn-bg: transparent; --btn-ink: #fff; --btn-line: rgb(255 255 255 / .5); --btn-hover: rgb(255 255 255 / .12); }
  .js .story-tariffs .badge { justify-self: start; margin-block-end: 10px; }

  @media (max-width: 700px) {
    .js .story-card { grid-template-columns: minmax(0, 1fr); gap: 18px; inline-size: min(480px, 100%); }
    /* Photo takes what is left after the menu, heading, text and progress line. */
    .js .story-media { aspect-ratio: 3 / 2; max-block-size: clamp(110px, 100svh - var(--header-h) - 360px, 300px); }
    .js .story-progress { block-size: 46px; margin-block-start: 4px; }
    .js .story-body { gap: 8px; }
    .js .story-body .step-text { font-size: .92rem; }
    .js .story-num { inset-block-start: auto; inset-block-end: 30%; font-size: 7rem; }
    .js .story-heading { margin-block-end: 8px; }
    .js .story-heading h2 { font-size: 1.6rem; }
    .js .story-tariffs .story-heading > p { display: none; }
    .js .story-tariffs .tariff-card { grid-template-columns: minmax(0, 1fr); inline-size: min(480px, 100%); }
    .js .story-tariffs .tariff-card > * { grid-column: 1; }
    .js .story-tariffs .tariff-card > .story-media { grid-row: auto; margin-block-end: 14px; max-block-size: clamp(90px, 100svh - var(--header-h) - 560px, 220px); }
    .js .story-tariffs .tariff-card .price { margin-block-end: 12px; font-size: 2.6rem; }
    .js .story-tariffs .tariff-index { margin-block-end: 8px; }
    .js .story-tariffs .tariff-card h3 { font-size: 1.5rem; margin-block-end: 6px; }
    .js .story-tariffs .tariff-card .description { margin-block-end: 10px; font-size: .92rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
    .js .story-tariffs .facts > div { padding-block: 8px; }
    .js .story-tariffs .tariff-card .facts { margin-block-end: 12px; }
    .js .story-tariffs .tariff-card > button { min-block-size: 46px; }
    .js .story-tariffs .tariff-glyph { inline-size: 34px; block-size: 34px; border-radius: 11px; }
  }
  /* Low phones: the tariff card needs the whole height, the progress line goes. */
  @media (max-width: 700px) and (max-height: 700px) {
    .js .story-tariffs .story-progress, .js .story-tariffs .tariff-card > .story-media { display: none; }
    .js .story-tariffs .tariff-card h3 { font-size: 1.3rem; }
    .js .story-tariffs .tariff-card .description { -webkit-line-clamp: 2; }
    .js .story-tariffs .tariff-card .price { font-size: 2.2rem; margin-block-end: 8px; }
  }
}

/* ---------- Landing: "How it works" scene ----------
   After the reference video (images/bukhara_background/sample2_video.mp4): on black, three tall photos in a staggered
   row, a big pale number over the foot of each, the step texts below. static/home-scroll.js pins the scene and moves
   the parts (photos rise out of the header photo, each at its own speed; numbers follow; texts fade in last).
   Without JS, with reduced motion or on a low screen the same picture stays still. */
.steps-scene {
  --scene-bg: #050505;
  margin-block: -8px clamp(48px, 7vw, 88px);
  margin-inline: calc(50% - 50vw);
  background: var(--scene-bg);
  color: #f4efe6;
}
.steps-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: clamp(20px, 4vh, 44px);
  padding: clamp(56px, 9vh, 104px) var(--gutter) clamp(56px, 9vh, 104px);
}
/* Background like the tariffs one: a blurred, dark photo of Bukhara tiles (static/img/site/bukhara-tiles-*),
   a vignette and thin rings; the top edge comes out of the black of the header photo. */
.steps-bg {
  position: absolute;
  inset: -6%;
  z-index: -2;
  inline-size: 112%;
  max-inline-size: none;
  block-size: 112%;
  object-fit: cover;
  filter: blur(16px) brightness(.38) saturate(.8);
  transform: translate3d(0, calc(var(--scene-p, 0) * -3%), 0);
}
.steps-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--scene-bg) 0%, transparent 22%),
    radial-gradient(ellipse 70% 55% at 50% 45%, transparent 0%, rgb(5 8 18 / .55) 100%),
    repeating-radial-gradient(circle at 30% 120%, transparent 0 46px, rgb(255 255 255 / .035) 47px 48px);
}
.steps-heading { text-align: center; }
.steps-heading .eyebrow { justify-content: center; color: #f2c27b; }
.steps-heading h2 { margin: 0; color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.steps-row {
  --w: min(24vw, 26svh, 220px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: center;
  align-items: start;
  column-gap: clamp(12px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The photo and the text of a step sit in different grid rows (one row of photos, as in the video). */
.steps-item { display: contents; }
.steps-photo {
  position: relative;
  grid-row: 1;
  justify-self: center;
  inline-size: var(--w);
  aspect-ratio: 3 / 4;
  background: #161616;
  will-change: transform, opacity;
}
.steps-item:nth-child(1) .steps-photo { grid-column: 1; margin-block-start: calc(var(--w) * .1); }
.steps-item:nth-child(2) .steps-photo { grid-column: 2; }
.steps-item:nth-child(3) .steps-photo { grid-column: 3; margin-block-start: calc(var(--w) * .2); }
.steps-photo img { display: block; inline-size: 100%; block-size: 100%; max-inline-size: none; object-fit: cover; }
.steps-icon { display: grid; place-items: center; block-size: 100%; color: rgb(255 255 255 / .55); }
.steps-icon .icon { inline-size: 40px; block-size: 40px; }
/* Big pale number over the foot of the photo. */
.steps-num {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  translate: 0 46%;
  text-align: center;
  font: 600 calc(var(--w) * .4)/1 var(--font-display);
  letter-spacing: .02em;
  color: rgb(255 255 255 / .5);
  pointer-events: none;
}
.steps-body {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-block-start: calc(var(--w) * .26);
  text-align: center;
  line-height: 1.4;
}
.steps-item:nth-child(1) .steps-body { grid-column: 1; }
.steps-item:nth-child(2) .steps-body { grid-column: 2; }
.steps-item:nth-child(3) .steps-body { grid-column: 3; }
.steps-body .step-num { background: rgb(242 194 123 / .14); color: #f2c27b; }
.steps-body .step-title { color: #fff; font-size: 1.02rem; }
.steps-body .step-text { color: rgb(255 255 255 / .66); font-size: .88rem; }
.steps-body .button, .steps-body button {
  --btn-bg: transparent;
  --btn-ink: #fff;
  --btn-line: rgb(255 255 255 / .32);
  --btn-hover: rgb(255 255 255 / .12);
  margin-block-start: 4px;
  box-shadow: none;
}
/* Phones: the photos keep their row, the texts go under it one by one. */
@media (max-width: 700px) {
  .steps-row { --w: min(27vw, 22svh); grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; }
  .steps-body {
    grid-column: 1 / -1 !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 12px;
    padding-block: 12px;
    border-block-start: 1px solid rgb(255 255 255 / .12);
    text-align: start;
  }
  .steps-item:nth-child(1) .steps-body { grid-row: 2; margin-block-start: calc(var(--w) * .26); }
  .steps-item:nth-child(2) .steps-body { grid-row: 3; }
  .steps-item:nth-child(3) .steps-body { grid-row: 4; }
  .steps-body .step-num { justify-self: start; padding: 2px 8px; font-size: .7rem; }
  .steps-body .step-title, .steps-body .step-text { grid-column: 1; }
  .steps-body .button, .steps-body button { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
}
@media (max-width: 380px) {
  .steps-body { grid-template-columns: minmax(0, 1fr); }
  .steps-body .button, .steps-body button { grid-column: 1; grid-row: auto; justify-self: start; margin-block-start: 6px; }
}

/* Pinned scene; the same query is in static/home-scroll.js. */
@media (prefers-reduced-motion: no-preference) and (min-width: 701px) and (min-height: 600px),
       (prefers-reduced-motion: no-preference) and (min-height: 740px) {
  .js .steps-scene { block-size: var(--scene-length, 230svh); margin-block-start: -8px; }
  .js .steps-stage {
    position: sticky;
    inset-block-start: 0;
    block-size: 100svh;
    overflow: hidden;
    padding: calc(var(--header-h) + clamp(8px, 2vh, 24px)) var(--gutter) clamp(16px, 4vh, 40px);
  }
  .js .steps-num, .js .steps-body, .js .steps-heading { will-change: transform, opacity; }
  .js .steps-stage::before {
    background:
      radial-gradient(ellipse 70% 55% at 50% 45%, transparent 0%, rgb(5 8 18 / .55) 100%),
      repeating-radial-gradient(circle at 30% 120%, transparent 0 46px, rgb(255 255 255 / .035) 47px 48px);
  }
}
@media print { .steps-bg, .steps-stage::before { display: none; } .steps-scene { margin: 0; background: none; color: inherit; } .steps-heading h2, .steps-body .step-title { color: #000; } }
