/* ==========================================================================
   Design system — shared by the public site, the client area and the portal.
   Brand colours, fonts and corner radius arrive as CSS custom properties
   generated from Site settings (core/theme.py); the values below are only
   fallbacks. All spacing uses logical properties so RTL (Arabic) just works.
   ========================================================================== */

/* Fallbacks only: :where() has zero specificity, so the per-centre theme
   (an inline :root block generated from Site settings) always wins. */
:where(:root) {
  --brand: #a6b668;
  --brand-rgb: 166 182 104;
  --brand-strong: #5f7136;
  --brand-strong-rgb: 95 113 54;
  --brand-deep: #445127;
  --brand-text: #7c8a45;
  --brand-50: #f8f9f3;
  --brand-100: #f1f4e8;
  --brand-200: #e3e8d0;
  --brand-300: #cdd5ad;
  --on-brand: #3a3a3a;
  --ink: #3a3a3a;
  --ink-rgb: 58 58 58;
  --ink-soft: #757575;
  --ink-deep: #262626;
  --accent: #d9a66b;
  --accent-rgb: 217 166 107;
  --accent-100: #f8ede0;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-btn: 999px;
  --font-heading: "Montserrat", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-script: "Allura", cursive;

  --bg: #fbfbf8;
  --surface: #ffffff;
  --surface-2: #f6f7f1;
  --surface-3: #eef0e6;
  --line: #e7e9df;
  --line-strong: #d6d9cb;
  --text: var(--ink);
  --muted: #6c7066;
  --soft: #8e9288;

  --success: #2f7d4f;
  --success-bg: #e7f4ec;
  --warning: #9a6512;
  --warning-bg: #fdf3e1;
  --danger: #b4372a;
  --danger-bg: #fcebe8;
  --info: #2b62a1;
  --info-bg: #e8f0fa;
  --wa: #179848;

  --shadow-xs: 0 1px 2px rgb(var(--ink-rgb) / 0.06);
  --shadow-sm: 0 1px 2px rgb(var(--ink-rgb) / 0.05), 0 2px 8px rgb(var(--ink-rgb) / 0.04);
  --shadow: 0 2px 6px rgb(var(--ink-rgb) / 0.05), 0 12px 32px rgb(var(--ink-rgb) / 0.07);
  --shadow-lg: 0 8px 20px rgb(var(--ink-rgb) / 0.08), 0 30px 60px rgb(var(--ink-rgb) / 0.10);
  --ring: 0 0 0 4px rgb(var(--brand-rgb) / 0.32);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
[dir="rtl"] body { line-height: 1.75; font-size: 17px; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { color: var(--brand-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
table { border-collapse: collapse; }
:focus-visible { outline: 3px solid rgb(var(--brand-strong-rgb) / 0.55); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgb(var(--brand-rgb) / 0.35); }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--ink-deep);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); }
h4, .h4 { font-size: 1.05rem; }

.icon { flex: none; vertical-align: middle; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }

/* ── Typography helpers ─────────────────────────────────────────────────── */
.script-accent {
  font-family: var(--font-script);
  color: var(--brand-text);
  font-weight: 400;
  font-size: 1.32em;
  line-height: 0.8;
  letter-spacing: 0;
  padding-inline: 0.06em;
}
[dir="rtl"] .script-accent { font-size: 1.12em; line-height: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: 0.9rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--brand); }
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 0.9rem; }
.lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.78rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .ltr { display: inline-block; }
.num { font-variant-numeric: tabular-nums; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.45rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose p, .prose li { color: #4a4d46; }
.prose li { margin-bottom: 0.35em; }

/* ── Layout helpers ─────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 860px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 0.75rem); }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.grid { display: grid; gap: var(--gap, 1.25rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.flex-1 { flex: 1; min-width: 0; }
.ms-auto { margin-inline-start: auto; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink-deep);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s, border-color 0.18s, color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--btn-fg); border-color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand-strong); --btn-fg: #fff; --btn-bd: var(--brand-strong); box-shadow: 0 6px 18px rgb(var(--brand-strong-rgb) / 0.28); }
.btn-primary:hover { --btn-bg: var(--brand-deep); border-color: var(--brand-deep); box-shadow: 0 10px 26px rgb(var(--brand-strong-rgb) / 0.34); }
.btn-brand { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-bd: var(--brand); }
.btn-brand:hover { --btn-bg: var(--brand-300); }
.btn-dark { --btn-bg: var(--ink-deep); --btn-fg: #fff; --btn-bd: var(--ink-deep); }
.btn-dark:hover { --btn-bg: #000; border-color: #000; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); border-color: transparent; }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink-deep); --btn-bd: #fff; }
.btn-wa { --btn-bg: var(--wa); --btn-fg: #fff; --btn-bd: var(--wa); }
.btn-wa:hover { --btn-bg: #12803c; border-color: #12803c; }
.btn-danger { --btn-bg: var(--danger-bg); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-danger:hover { --btn-bg: var(--danger); --btn-fg: #fff; border-color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0.4rem 0.85rem; font-size: 0.85rem; gap: 0.4rem; }
.btn-xs { min-height: 30px; padding: 0.25rem 0.65rem; font-size: 0.8rem; gap: 0.3rem; }
.btn-lg { min-height: 54px; padding: 0.85rem 1.7rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 44px; min-width: 44px; }
.btn-icon.btn-sm { width: 36px; min-width: 36px; }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-strong); font-weight: 600; }
.link-btn:hover { color: var(--brand-deep); text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.link-arrow .icon { transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
[dir="rtl"] .link-arrow:hover .icon { transform: scaleX(-1) translateX(3px); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: clamp(1.1rem, 0.9rem + 1vw, 1.75rem); }
.card-hover { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-200); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; margin-bottom: 1rem; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.08rem; }
.card-soft { background: var(--brand-50); border-color: var(--brand-100); box-shadow: none; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--muted);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge.no-dot::before { display: none; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--brand-100); color: var(--brand-deep); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-dark { background: var(--ink-deep); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  font-size: 0.82rem; font-weight: 600; color: var(--ink);
}
a.chip:hover, .chip.is-active { border-color: var(--brand-strong); color: var(--brand-deep); background: var(--brand-50); }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-section { margin-bottom: 1.75rem; }
.form-section > h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1rem; }
[dir="rtl"] .form-section > h3 { letter-spacing: 0; }
.form-row { display: grid; gap: 0 1rem; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 1rem; }
.field { margin-bottom: 1rem; min-width: 0; }
.field > label, .label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.4rem; color: var(--ink-deep); }
.req { color: var(--danger); margin-inline-start: 0.15rem; }
.input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.9rem;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--soft); }
.input:hover { border-color: var(--brand-300); }
.input:focus { outline: none; border-color: var(--brand-strong); box-shadow: var(--ring); }
textarea.input { min-height: 96px; resize: vertical; }
select.input, .select {
  padding-inline-end: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c7066' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
[dir="rtl"] select.input, [dir="rtl"] .select { background-position: left 0.85rem center; }
select[multiple].input { background-image: none; min-height: 120px; padding-inline-end: 0.9rem; }
.input-file { padding: 0.55rem; min-height: auto; font-size: 0.9rem; }
.input-file::file-selector-button { border: 0; background: var(--surface-3); padding: 0.45rem 0.85rem; border-radius: 999px; margin-inline-end: 0.75rem; font-weight: 600; cursor: pointer; }
.input-color { padding: 4px; height: 46px; width: 72px; cursor: pointer; }
.field .clearable-file-input, .field a[href*="/media/"] { font-size: 0.85rem; }
.field-help { display: block; color: var(--soft); font-size: 0.8rem; margin-top: 0.35rem; }
.field-error { display: block; color: var(--danger); font-size: 0.82rem; font-weight: 600; margin-top: 0.35rem; }
.has-error .input { border-color: var(--danger); background: #fffafa; }
.form-errors { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; }
.form-errors ul { margin: 0; padding-inline-start: 1rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.check-input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand-strong); margin: 0; flex: none; }
.field-check label.check, label.check { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 500; cursor: pointer; font-size: 0.95rem; }
label.check input { margin-top: 0.2rem; }
div.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0.5rem; }
div.choice-grid label {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.6rem 0.8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-weight: 500; font-size: 0.92rem; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
div.choice-grid label:hover { border-color: var(--brand-300); }
div.choice-grid label:has(input:checked) { border-color: var(--brand-strong); background: var(--brand-50); }
input.choice-grid { width: 1.1rem; height: 1.1rem; accent-color: var(--brand-strong); margin: 0; }
.input-group { display: flex; gap: 0.5rem; }
.input-group .input { flex: 1; }
.honeypot { position: absolute !important; inset-inline-start: -9999px; height: 0; overflow: hidden; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: 0.92rem; }
.table th {
  text-align: start; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--soft); padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface);
}
[dir="rtl"] .table th { letter-spacing: 0; font-size: 0.8rem; }
.table td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background-color 0.15s; }
.table tbody tr:hover { background: var(--brand-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num, .table td.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: end; white-space: nowrap; }
/* Simple rows: title + meta on the left, value on the right (orders, lists). */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 700; color: var(--ink-deep); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { font-size: 0.83rem; color: var(--soft); }

.table-link { color: var(--ink-deep); font-weight: 600; }
.table-link:hover { color: var(--brand-strong); }
@media (max-width: 720px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .table-stack td { border: 0; padding: 0.2rem 0.25rem; display: flex; justify-content: space-between; gap: 1rem; text-align: end; }
  .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--soft); font-size: 0.8rem; text-align: start; }
  .table-stack td[data-label=""]::before { display: none; }
  .table-stack td.actions { justify-content: flex-end; padding-top: 0.5rem; }
}

/* ── Messages / toasts ──────────────────────────────────────────────────── */
.toast-stack { position: fixed; inset-block-start: 1rem; inset-inline-end: 1rem; z-index: 200; display: flex; flex-direction: column; gap: 0.6rem; width: min(400px, calc(100vw - 2rem)); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.9rem 1rem; border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); border-inline-start: 4px solid var(--brand-strong);
  font-size: 0.93rem; font-weight: 500;
  animation: toast-in 0.35s var(--ease) both;
}
.toast .icon { margin-top: 2px; color: var(--brand-strong); }
.toast-success { border-inline-start-color: var(--success); } .toast-success .icon { color: var(--success); }
.toast-error { border-inline-start-color: var(--danger); } .toast-error .icon { color: var(--danger); }
.toast-warning { border-inline-start-color: var(--warning); } .toast-warning .icon { color: var(--warning); }
.toast-close { margin-inline-start: auto; background: none; border: 0; padding: 0; color: var(--soft); }
.toast.is-leaving { animation: toast-out 0.3s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }
.notice { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--radius); background: var(--brand-50); border: 1px solid var(--brand-100); font-size: 0.92rem; }
.notice .icon { color: var(--brand-strong); margin-top: 2px; }
.notice-warning { background: var(--warning-bg); border-color: #f4dfb8; } .notice-warning .icon { color: var(--warning); }
.notice-info { background: var(--info-bg); border-color: #cfe0f4; } .notice-info .icon { color: var(--info); }
.notice-danger { background: var(--danger-bg); border-color: #f4cdc7; } .notice-danger .icon { color: var(--danger); }

.icon-tile { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--brand-50); color: var(--brand-strong); margin-bottom: 1rem; }

/* ── Round icon buttons (header, topbar) ─*/
.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-deep); }
.icon-btn .count {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--brand-strong); color: #fff; font-size: 0.7rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
.icon-btn .count.bump { animation: bump 0.45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.lang-btn { font-weight: 700; font-size: 0.85rem; width: auto; padding-inline: 0.8rem; border-radius: 999px; font-family: var(--font-latin, inherit); }

/* ── Pill tabs ─*/
.pill-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.pill-tabs a { padding: 0.45rem 0.9rem; border-radius: 999px; font-weight: 600; font-size: 0.86rem; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.pill-tabs a:hover { color: var(--ink-deep); border-color: var(--line-strong); }
.pill-tabs a.is-active { background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }
.pill-tabs .n { opacity: 0.7; margin-inline-start: 0.25rem; }

/* ── Misc components ────────────────────────────────────────────────────── */
.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); flex: none;
  border-radius: 50%; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-200), var(--brand-100));
  color: var(--brand-deep); font-weight: 700; font-size: calc(var(--size) * 0.38);
  overflow: hidden; font-family: var(--font-heading);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { --size: 32px; } .avatar-lg { --size: 64px; } .avatar-xl { --size: 88px; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-strong)); transition: width 1s var(--ease); }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 0.55rem 1rem; margin: 0; font-size: 0.93rem; }
.kv dt { color: var(--soft); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink-deep); min-width: 0; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .empty-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-strong); }
.empty h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 1.5rem; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 0.75rem; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.pagination a:hover { border-color: var(--brand-strong); color: var(--brand-strong); }
.pagination .is-current { background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }
.divider-text { display: flex; align-items: center; gap: 1rem; color: var(--soft); font-size: 0.85rem; margin: 1.25rem 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--surface-2); display: inline-grid; place-items: center; color: var(--soft); }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 5px; vertical-align: middle; border: 1px solid rgb(0 0 0 / 0.1); }
.bool { display: inline-flex; }
.bool-ok { color: var(--success); }
.bool-off { color: var(--line-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.status-dot { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: 0.9rem; }
.status-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--soft); box-shadow: 0 0 0 4px rgb(0 0 0 / 0.05); }
.status-dot.is-open::before { background: #33a466; box-shadow: 0 0 0 4px rgb(51 164 102 / 0.18); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(51 164 102 / 0.06); } }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.18rem 0.55rem; border-radius: 999px; background: color-mix(in srgb, var(--tag, var(--brand)) 18%, white); color: color-mix(in srgb, var(--tag, var(--brand)) 70%, black); }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.print-only { display: none; }
.wordmark { font-family: var(--font-script); font-size: 2.2rem; line-height: 1; color: var(--ink-deep); white-space: nowrap; }
.wordmark-light { color: #fff; }

@media (max-width: 640px) {
  .form-row.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
  .btn-group-stack { flex-direction: column; align-items: stretch; }
}
@media (min-width: 641px) { .show-sm { display: none !important; } }
/* Touch screens: every control is comfortably tappable (≥ 40px). */
@media (pointer: coarse) {
  .btn-sm { min-height: 40px; }
  .btn-xs { min-height: 36px; padding-inline: 0.75rem; }
  .btn-icon.btn-sm { width: 40px; min-width: 40px; }
  .pagination a, .pagination span { min-width: 44px; height: 44px; }
  /* Finger-sized targets for the small text links people actually tap. */
  .link-arrow { min-height: 40px; }
  .link-btn { min-height: 40px; padding-inline: 0.35rem; }
  label.check { padding-block: 0.55rem; }
  .check-input { width: 1.35rem; height: 1.35rem; }
  .table-link { display: inline-block; padding-block: 0.5rem; }
  a[href^="tel:"], a[href^="mailto:"] { display: inline-block; padding-block: 0.4rem; }
}

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