/* ═══════════════════════════════════════════════════════════
   نَسَبًا وَصِهْرًا — الهوية البصرية: كحلي عميق + ذهبي
   ═══════════════════════════════════════════════════════════ */
:root {
  --navy-950: #060e1a;
  --navy-900: #0a1628;
  --navy-800: #0e1f38;
  --navy-700: #152b4a;
  --navy-600: #1f3a60;
  --gold-700: #8a6720;
  --gold-600: #a87f2c;
  --gold-500: #c9a24a;
  --gold-400: #d9b768;
  --gold-300: #e8cf8a;
  --gold-200: #f2e3b8;
  --gold-100: #faf3e0;
  --ivory: #f7f3ea;
  --paper: #ffffff;
  --ink: #17233a;
  --ink-2: #364660;
  --muted: #69768c;
  --line: #e6dcc6;
  --line-2: #f0e9da;
  --ok: #26704f;   --ok-bg: #e6f3ec;
  --bad: #a83c32;  --bad-bg: #fbeae7;
  --warn: #8f6210; --warn-bg: #fcf1d8;
  --info: #285785; --info-bg: #e7eff8;
  --gold-grad: linear-gradient(135deg, #f3dc9a 0%, #d4ad57 48%, #a87f2c 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(10, 22, 40, .05), 0 10px 28px rgba(10, 22, 40, .07);
  --shadow-lg: 0 20px 50px rgba(6, 14, 26, .18);
  --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-brand: "Aref Ruqaa", "Cairo", serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-opacity='.10' stroke-width='1'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='7'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--ivory);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--gold-700); }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; color: var(--navy-900); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.wrap-sm { max-width: 760px; }
.wrap-xs { max-width: 480px; }
.inline { display: inline; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; max-width: 100%; overflow-wrap: anywhere; vertical-align: bottom; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.25em; }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy-900);
  background-image: var(--pattern);
  border-bottom: 1px solid rgba(201, 162, 74, .28);
  box-shadow: 0 4px 18px rgba(6, 14, 26, .25);
}
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 46px; height: auto; filter: drop-shadow(0 2px 6px rgba(201, 162, 74, .35)); }
.brand-name {
  font-family: var(--font-brand); font-size: 1.6rem; font-weight: 700; line-height: 1;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 4px;
}
.nav-desktop { display: flex; gap: 4px; margin-inline-start: 18px; flex: 1; }
.nav-desktop a {
  color: #d5dbe6; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav-desktop a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-desktop a.active { color: var(--navy-900); background: var(--gold-grad); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid rgba(201, 162, 74, .3); background: rgba(255, 255, 255, .04);
  color: var(--gold-300); cursor: pointer; text-decoration: none; font: inherit;
}
.icon-btn:hover { background: rgba(201, 162, 74, .14); }
.icon-btn .ic { width: 20px; height: 20px; }
.dot-count {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #e0533f; color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
  border: 2px solid var(--navy-900);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, background .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-gold { background: var(--gold-grad); color: var(--navy-900); box-shadow: 0 6px 18px rgba(168, 127, 44, .32); }
.btn-gold:hover { box-shadow: 0 8px 24px rgba(168, 127, 44, .45); }
.btn-navy { background: var(--navy-800); color: var(--gold-200); }
.btn-navy:hover { background: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold-500); background: var(--gold-100); }
.btn-ghost-light { background: transparent; color: var(--gold-200); border-color: rgba(201, 162, 74, .45); }
.btn-ghost-light:hover { background: rgba(201, 162, 74, .12); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-bad { background: var(--bad); color: #fff; }
.btn-soft-bad { background: var(--bad-bg); color: var(--bad); }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn .ic { width: 1.15em; height: 1.15em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── Flash ── */
.flash {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 16px;
  border-radius: var(--radius-sm); font-weight: 600; animation: drop .3s ease-out;
}
.flash-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe0cd; }
.flash-bad { background: var(--bad-bg); color: var(--bad); border: 1px solid #f0c8c1; }
.flash-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0dca8; }
.flash span { flex: 1; }
.flash-x { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: inherit; cursor: pointer; opacity: .6; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Hero (landing) ── */
.hero {
  position: relative; overflow: hidden; color: #e9edf4; text-align: center;
  background:
    radial-gradient(ellipse 60% 55% at 50% 38%, rgba(201, 162, 74, .20), transparent 70%),
    var(--pattern),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  padding: 36px 0 64px;
}
.hero::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 40px;
  background: var(--ivory); clip-path: ellipse(70% 100% at 50% 100%);
}
.hero-logo { width: min(420px, 82vw); margin: 0 auto 6px; display: block; filter: drop-shadow(0 8px 30px rgba(201, 162, 74, .25)); animation: rise .8s ease-out both; }
.hero h1 { color: #fff; font-size: clamp(1.45rem, 4.2vw, 2.1rem); font-weight: 800; margin-bottom: 4px; animation: rise .8s .1s ease-out both; }
.hero .tag { color: var(--gold-300); font-size: clamp(1.05rem, 3vw, 1.3rem); font-weight: 600; margin-bottom: 26px; animation: rise .8s .2s ease-out both; }
.hero .btn-row { justify-content: center; animation: rise .8s .3s ease-out both; }
.hero .free-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; padding: 4px 14px; border-radius: 999px;
  background: rgba(201, 162, 74, .14); border: 1px solid rgba(201, 162, 74, .35); color: var(--gold-200); font-size: .9rem; font-weight: 700;
}
.hero .login-hint { margin-top: 16px; font-size: .95rem; color: #b8c2d3; }
.hero .login-hint a { color: var(--gold-300); font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.section { padding: 48px 0; }
.section-title { text-align: center; margin-bottom: 28px; }
.section-title h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); font-weight: 800; }
.section-title p { color: var(--muted); max-width: 560px; margin-inline: auto; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold-500); margin-bottom: 6px; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 48px; background: linear-gradient(90deg, transparent, var(--gold-500)); }
.ornament::after { transform: scaleX(-1); }
.ornament .ic { width: 18px; height: 18px; }

.steps-how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: how; }
.how-card { position: relative; padding: 26px 20px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.how-card .num {
  position: absolute; top: -16px; inset-inline-start: 20px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-800); color: var(--gold-300); font-weight: 800; border: 2px solid var(--gold-500);
}
.how-card h3 { font-size: 1.08rem; margin-top: 6px; }
.how-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.how-card .ic { width: 28px; height: 28px; color: var(--gold-600); margin-bottom: 4px; }

.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rule { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.rule .ic-wrap { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-700); flex: none; }
.rule h3 { font-size: 1.02rem; margin-bottom: 2px; }
.rule p { margin: 0; color: var(--muted); font-size: .94rem; }

.cta-band {
  margin: 8px 0 48px; padding: 32px 22px; text-align: center; border-radius: 24px; color: #e6ebf3;
  background: var(--pattern), linear-gradient(135deg, var(--navy-800), var(--navy-950));
  border: 1px solid rgba(201, 162, 74, .3);
}
.cta-band h2 { color: var(--gold-300); font-family: var(--font-brand); font-size: 2rem; }

/* ── Page header ── */
.page-head { padding: 26px 0 8px; }
.page-head h1 { font-size: clamp(1.35rem, 3.6vw, 1.75rem); font-weight: 800; margin-bottom: 2px; }
.page-head p { color: var(--muted); margin: 0; }
.page-head .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* ── Cards ── */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; color: var(--navy-900); }
.card-title .ic { color: var(--gold-600); }
.card-title .count { margin-inline-start: auto; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; line-height: 1.9; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: #eef0f4; color: var(--muted); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gold { background: var(--gold-100); color: var(--gold-700); border: 1px solid var(--gold-200); }
.badge-navy { background: var(--navy-800); color: var(--gold-300); }
.badge .ic { width: 14px; height: 14px; }
.code-tag {
  display: inline-flex; align-items: center; justify-content: center; min-width: 58px; padding: 2px 12px; border-radius: 10px;
  background: var(--navy-800); color: var(--gold-300); font-weight: 800; letter-spacing: .5px; direction: ltr; font-size: .95rem;
  border: 1px solid rgba(201, 162, 74, .45);
}

/* ── Status banner ── */
.status-banner { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); border: 1px solid; }
.status-banner .ic-wrap { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.status-banner .ic-wrap .ic { width: 26px; height: 26px; }
.status-banner h2 { font-size: 1.15rem; margin-bottom: 4px; }
.status-banner p { margin: 0; }
.status-warn { background: var(--warn-bg); border-color: #efd9a3; }
.status-warn .ic-wrap { background: #f7e3b2; color: var(--warn); }
.status-ok { background: var(--ok-bg); border-color: #c3e2d0; }
.status-ok .ic-wrap { background: #cfe9da; color: var(--ok); }
.status-bad { background: var(--bad-bg); border-color: #f1cbc4; }
.status-bad .ic-wrap { background: #f6d5cf; color: var(--bad); }
.status-muted { background: #f1f2f5; border-color: #dfe2e8; }
.status-muted .ic-wrap { background: #e2e5ea; color: var(--muted); }
.reason { margin-top: 10px !important; padding: 10px 14px; background: #fff; border-radius: 10px; border-inline-start: 4px solid var(--bad); }

/* ── Stats ── */
.stat { padding: 18px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; transition: transform .15s, border-color .15s; }
a.stat:hover { transform: translateY(-2px); border-color: var(--gold-400); }
.stat .lbl { color: var(--muted); font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.stat .val { display: block; font-size: 2rem; font-weight: 800; color: var(--navy-900); line-height: 1.3; }
.stat .sub { display: block; font-size: .85rem; color: var(--gold-200); }
.stat.hl { background: var(--pattern), linear-gradient(135deg, var(--navy-800), var(--navy-900)); border-color: rgba(201, 162, 74, .4); }
.stat.hl .lbl { color: var(--gold-200); }
.stat.hl .val { color: var(--gold-300); }

/* ── Forms ── */
.form-card { padding: 26px; }
.field { margin-bottom: 18px; min-width: 0; }
.field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.lbl { display: block; font-weight: 700; color: var(--navy-800); margin-bottom: 6px; font-size: .98rem; }
legend.lbl { padding: 0; }
.req { color: var(--bad); font-weight: 800; margin-inline-start: 2px; }
.opt { color: var(--muted); font-weight: 500; font-size: .85rem; margin-inline-start: 4px; }
.help { color: var(--muted); font-size: .88rem; margin: -2px 0 8px; }
.err { color: var(--bad); font-size: .88rem; font-weight: 700; margin: 6px 0 0; }
.err:empty { display: none; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel],
.field input[type=number], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 11px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a87f2c' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; padding-inline-end: 14px; padding-inline-start: 14px; padding-left: 38px;
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 74, .18);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); background: #fffafa; }
.field.has-error .opts, .field.has-error .chips { outline: 2px solid rgba(168, 60, 50, .25); outline-offset: 4px; border-radius: 12px; }
.with-unit { position: relative; }
.with-unit input, .field .with-unit input { padding-left: 54px; }
.with-unit .unit { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: .9rem; pointer-events: none; }
.pw-wrap { position: relative; }
.pw-wrap input, .field .pw-wrap input { padding-left: 50px; }
.pw-toggle { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; }
.pw-toggle:hover { color: var(--gold-700); }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.fields-grid > .field { grid-column: 1 / -1; }
.fields-grid > .field.half { grid-column: auto; }

/* radio "pills" & chips */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-item { position: relative; cursor: pointer; margin: 0; }
.opt-item input { position: absolute; opacity: 0; pointer-events: none; }
.opt-item span {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 9px 14px; height: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-weight: 600; font-size: .95rem;
  transition: border-color .12s, background .12s, color .12s; line-height: 1.45;
}
.opts .opt-item span::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid #c8bea7; background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
.chips .opt-item span { min-height: 42px; border-radius: 999px; padding: 7px 16px; }
.chips .opt-item span::before {
  content: ""; width: 0; height: 0; transition: width .12s;
}
.opt-item:hover span { border-color: var(--gold-400); }
.opt-item input:focus-visible + span { box-shadow: 0 0 0 4px rgba(201, 162, 74, .25); }
.opt-item input:checked + span { border-color: var(--gold-500); background: var(--gold-100); color: var(--navy-900); }
.opts .opt-item input:checked + span::before { border-color: var(--gold-600); box-shadow: inset 0 0 0 4px #fff; background: var(--gold-600); }
.chips .opt-item input:checked + span { background: var(--navy-800); color: var(--gold-200); border-color: var(--navy-800); }
.chips .opt-item input:checked + span::before {
  width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8cf8a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; margin-bottom: 10px; font-weight: 600; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--gold-600); flex: none; }
.check:has(input:checked) { border-color: var(--gold-500); background: var(--gold-100); }

/* ── Stepper ── */
.stepper { position: relative; }
.sp-head { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 14px; margin-bottom: 16px; }
.sp-track { list-style: none; margin: 0 0 12px; padding: 0; display: flex; justify-content: space-between; position: relative; }
.sp-track::before { content: ""; position: absolute; top: 20px; inset-inline: 22px; height: 2px; background: var(--line); }
.sp-dot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.sp-dot button {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: inherit; font-weight: 800;
  border: 2px solid var(--line); background: #fff; color: var(--muted); cursor: default; transition: all .2s; padding: 0;
}
.sp-dot .ic { width: 19px; height: 19px; }
.sp-dot .t { font-size: .78rem; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.3; max-width: 92px; }
.sp-dot.done button { background: var(--gold-100); border-color: var(--gold-500); color: var(--gold-700); cursor: pointer; }
.sp-dot.reach button { cursor: pointer; }
.sp-dot.active button { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); box-shadow: 0 0 0 5px rgba(201, 162, 74, .22); transform: scale(1.06); }
.sp-dot.active .t { color: var(--navy-900); }
.sp-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .92rem; color: var(--muted); font-weight: 600; }
.sp-meta [data-step-title] { color: var(--navy-900); font-weight: 800; }
.sp-bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 8px; }
.sp-bar span { display: block; height: 100%; width: 0; background: var(--gold-grad); border-radius: inherit; transition: width .35s ease; }
.step { animation: stepIn .3s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.step-head .ic-wrap { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--navy-800); color: var(--gold-300); flex: none; }
.step-head h2 { font-size: 1.25rem; margin: 0; outline: none; }
.step-head p { color: var(--muted); margin: 2px 0 0; font-size: .95rem; }
.sp-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 20px; }
.sp-nav .spacer { flex: 1; }
.draft-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.draft-note button { margin-inline-start: auto; background: none; border: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.privacy-note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 18px; border-radius: var(--radius-sm); background: var(--gold-100); color: var(--gold-700); font-weight: 600; font-size: .92rem; border: 1px dashed var(--gold-400); }

/* review */
.rv-sec { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; background: #fdfbf6; }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rv-head h3 { font-size: 1rem; margin: 0; }

/* key/value lists */
.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; margin: 0; }
.kv dt, .kv dd { padding: 9px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; padding-inline-end: 12px; }
.kv dd { font-weight: 700; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.kv dd.empty { color: #b0b6c2; font-weight: 500; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.kv .priv { display: inline-flex; margin-inline-start: 6px; color: var(--gold-600); vertical-align: middle; }
.kv .priv .ic { width: 15px; height: 15px; }

/* ── Profile / form view ── */
.prof-hero {
  display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: var(--radius); color: #e8edf5;
  background: var(--pattern), linear-gradient(135deg, var(--navy-800), var(--navy-950)); border: 1px solid rgba(201, 162, 74, .35); box-shadow: var(--shadow-lg);
}
.prof-hero .avatar { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; background: rgba(201, 162, 74, .14); border: 1px solid rgba(201, 162, 74, .4); color: var(--gold-300); flex: none; }
.prof-hero .avatar .ic { width: 36px; height: 36px; }
.prof-hero h1 { color: #fff; margin: 0 0 4px; font-size: 1.35rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prof-hero .facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: #c3cddc; font-weight: 600; font-size: .95rem; }
.prof-hero .facts span { display: inline-flex; align-items: center; gap: 6px; }
.prof-hero .facts .ic { color: var(--gold-400); width: 16px; height: 16px; }
.prof-hero .ring { margin-inline-start: auto; }
.form-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--gold-200); }
.form-sec h2 .ic { color: var(--gold-600); }

/* match ring */
.ring { --p: 0; --c: var(--gold-500); width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--navy-900); }
.ring b { position: relative; color: #fff; font-size: 1.1rem; font-weight: 800; line-height: 1; text-align: center; }
.ring b small { display: block; font-size: .62rem; color: var(--gold-200); font-weight: 600; margin-top: 3px; }
.ring.light { background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); width: 62px; height: 62px; }
.ring.light::before { background: #fff; inset: 5px; }
.ring.light b { color: var(--navy-900); font-size: 1rem; }
.ring.hi { --c: #2f9a6a; } .ring.mid { --c: var(--gold-500); } .ring.lo { --c: #c0634f; }

.match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match-col h3 { font-size: .98rem; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mc { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.mc:last-child { border-bottom: 0; }
.mc .st { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 2px; }
.mc .st .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.mc.ok .st { background: var(--ok-bg); color: var(--ok); }
.mc.no .st { background: var(--bad-bg); color: var(--bad); }
.mc .t { font-weight: 700; }
.mc .d { color: var(--muted); font-size: .88rem; }
.mc .soft { font-size: .75rem; color: var(--muted); font-weight: 600; background: #eef0f4; border-radius: 999px; padding: 0 8px; margin-inline-start: 6px; }

/* ── Search ── */
.search-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 30px; }
.filters { position: sticky; top: 84px; }
.filters .field { margin-bottom: 12px; }
.filters .lbl { font-size: .9rem; }
.filters .field select, .filters .field input { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.filters-toggle { display: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--line-2); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.seg a { text-align: center; padding: 8px 10px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg a.on { background: var(--navy-800); color: var(--gold-300); box-shadow: 0 2px 8px rgba(10, 22, 40, .2); }
.results-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.results-head .cnt { font-weight: 800; color: var(--navy-900); }
.results-head select { min-height: 40px; padding: 6px 14px 6px 34px; border-radius: 999px; border: 1.5px solid var(--line); font: inherit; font-weight: 600; background-color: #fff; }
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.res-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s, border-color .15s, box-shadow .15s; }
.res-card:hover { transform: translateY(-2px); border-color: var(--gold-400); box-shadow: var(--shadow-lg); }
.res-top { display: flex; gap: 12px; align-items: center; }
.res-top .who { flex: 1; min-width: 0; }
.res-top .who .line1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 800; color: var(--navy-900); }
.res-top .who .line2 { color: var(--muted); font-size: .9rem; font-weight: 600; }
.res-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.res-facts span { background: var(--ivory); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 10px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.res-quote { color: var(--ink-2); font-size: .92rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: .88rem; }
.res-foot .go { color: var(--gold-700); font-weight: 800; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .ic { width: 52px; height: 52px; color: var(--gold-400); margin-bottom: 10px; }
.empty-state h3 { color: var(--navy-900); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-weight: 700; padding: 0 10px; }
.pager .on { background: var(--navy-800); color: var(--gold-300); border-color: var(--navy-800); }

/* ── Lists (notifications, requests) ── */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.list > li:last-child { border-bottom: 0; }
.list .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 9px; flex: none; }
.list .unread .dot { background: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 74, .2); }
.list .body { flex: 1; min-width: 0; }
.list .meta { color: var(--muted); font-size: .84rem; }
.list a { color: var(--navy-800); text-decoration: none; font-weight: 600; }
.list a:hover { color: var(--gold-700); }

.req-card { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.req-card + .req-card { margin-top: 12px; }
.req-card .info { flex: 1; min-width: 200px; }
.req-card .info .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 800; }
.req-card .msg { margin: 8px 0 0; padding: 8px 12px; background: var(--ivory); border-radius: 10px; font-size: .92rem; color: var(--ink-2); }
.req-card .acts { display: flex; gap: 8px; flex-wrap: wrap; }

.guardian-card { padding: 20px; border-radius: var(--radius); background: var(--ok-bg); border: 1px solid #bfe0cd; }
.guardian-card h3 { color: var(--ok); display: flex; gap: 8px; align-items: center; }
.guardian-card .kv dt { color: #4b7a63; }
.request-box textarea { width: 100%; min-height: 96px; }

/* ── Tables (admin) ── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: start; font-size: .84rem; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:hover td { background: #fdfbf6; }
.tbl a.rowlink { color: var(--navy-800); font-weight: 700; text-decoration: none; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 16px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .92rem; background: #fff; border: 1px solid var(--line); display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on { background: var(--navy-800); color: var(--gold-300); border-color: var(--navy-800); }
.tabs a .n { background: rgba(201, 162, 74, .2); border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .input { min-height: 44px; flex: 1; min-width: 200px; width: auto; }
.toolbar select.input { flex: 0 0 auto; min-width: 140px; }
select.input, .results-head select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a87f2c' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; padding-left: 34px;
}
.action-panel { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: #fdfbf6; }
.action-panel textarea { width: 100%; min-height: 80px; margin-bottom: 10px; }
details.mail { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
details.mail + details.mail { margin-top: 8px; }
details.mail summary { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
details.mail summary::-webkit-details-marker { display: none; }
details.mail .mail-body { border-top: 1px solid var(--line); padding: 10px; }
details.mail iframe { width: 100%; height: 460px; border: 0; background: #f4efe4; border-radius: 8px; }

/* ── Auth pages ── */
.auth-wrap { padding: 36px 0 48px; }
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-card .head { text-align: center; margin-bottom: 18px; }
.auth-card .head img { width: 70px; }
.auth-card .head h1 { font-size: 1.4rem; margin: 8px 0 2px; }
.auth-card .alt { text-align: center; margin-top: 16px; color: var(--muted); }
.auth-card .alt a { font-weight: 700; }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choose a {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 20px;
  border-radius: 22px; text-decoration: none; color: inherit; background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.choose a:hover { transform: translateY(-3px); border-color: var(--gold-500); box-shadow: var(--shadow-lg); }
.choose .big-ic { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--navy-800); color: var(--gold-300); }
.choose .big-ic .ic { width: 38px; height: 38px; }
.choose h2 { font-size: 1.25rem; margin: 6px 0 0; }
.choose p { color: var(--muted); margin: 0; font-size: .95rem; }
.choose .btn { margin-top: 8px; }

/* ── Footer ── */
.footer { margin-top: 40px; padding: 28px 0 24px; text-align: center; background: var(--navy-950); background-image: var(--pattern); color: #9eabc0; border-top: 1px solid rgba(201, 162, 74, .25); }
.footer .verse { font-family: var(--font-brand); color: var(--gold-300); font-size: 1.3rem; margin-bottom: 8px; line-height: 1.9; }
.footer .verse small { font-family: var(--font); color: #8796ad; font-size: .8rem; }
.footer .foot-note { max-width: 620px; margin: 0 auto 8px; font-size: .9rem; }
.footer .foot-copy { font-size: .82rem; margin: 0; color: #6f7d93; }

/* ── Mobile tab bar ── */
.tabbar { display: none; }

/* ═════════ Responsive ═════════ */
@media (max-width: 960px) {
  .nav-desktop { display: none; }
  .layout-side, .search-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; }
  .steps-how { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  body.has-tabbar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.has-tabbar .footer { margin-bottom: 0; }
  .tabbar {
    display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    background: var(--navy-900); border-top: 1px solid rgba(201, 162, 74, .3);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(6, 14, 26, .25);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; text-decoration: none; color: #94a3ba; font-size: .74rem; font-weight: 700; border-radius: 12px; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--gold-300); background: rgba(201, 162, 74, .12); }

  .filters-toggle { display: flex; }
  .filters-body.collapsed { display: none; }
  .filters-body:not(.collapsed) { margin-top: 14px; }
  .hide-md { display: none !important; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hide-xs { display: none !important; }
  .brand-name { font-size: 1.35rem; }
  .brand img { width: 38px; }
  .topbar-in { min-height: 58px; gap: 10px; }
  .card { padding: 18px 16px; }
  .form-card { padding: 18px 16px; }
  .fields-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-2, .grid-3, .res-grid, .match-cols, .rules, .choose { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .steps-how { grid-template-columns: minmax(0, 1fr); }
  .opts { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { border-bottom: 0; padding-bottom: 0; font-size: .88rem; }
  .kv dd { padding-top: 2px; }
  .kv > :nth-last-child(2) { border-bottom: 0; }
  .stat .val { font-size: 1.6rem; }

  .sp-head { padding: 14px 12px 12px; position: sticky; top: 58px; z-index: 20; border-radius: 0 0 var(--radius) var(--radius); margin-inline: -16px; border-inline: 0; border-top: 0; }
  .sp-dot .t { display: none; }
  .sp-dot button { width: 34px; height: 34px; font-size: .85rem; }
  .sp-dot .ic { width: 16px; height: 16px; }
  .sp-track::before { top: 16px; }
  .sp-track { margin-bottom: 8px; }
  .sp-nav { position: sticky; bottom: 0; z-index: 15; margin: 18px -16px -18px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
  .sp-nav .btn { flex: 1; }
  .sp-nav .spacer { display: none; }
  body.has-tabbar .sp-nav { bottom: calc(68px + env(safe-area-inset-bottom)); }

  .prof-hero { flex-wrap: wrap; padding: 18px; }
  .prof-hero .avatar { width: 58px; height: 58px; border-radius: 18px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl td { border: 0; padding: 4px 2px; display: flex; gap: 8px; justify-content: space-between; align-items: center; }
  .tbl td::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: .85rem; }
  .tbl td[data-label=""]::before { display: none; }
  .choose a { padding: 22px 18px; }
  .seg a { font-size: .86rem; padding: 8px 6px; }
  .seg a .ic { display: none; }
  .cta-band h2 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
