/* ==========================================================================
   Mithaq design system
   Deep plum · warm ivory · muted rose · champagne gold
   ========================================================================== */

:root {
  /* "plum" tokens now carry the brand rose; names kept so every component re-themes at once */
  --plum-950: #170a14;
  --plum-900: #1d1320;      /* headings / ink-dark */
  --plum-800: #b3164a;      /* strong brand text */
  --plum-700: #e5336b;      /* PRIMARY — Mithaq rose */
  --plum-600: #f04d80;      /* primary hover / accents */
  --plum-500: #f47a9e;
  --plum-100: #ffe1ea;
  --plum-50: #fff1f5;
  --rose-600: #e5336b;
  --rose-500: #f47a9e;
  --rose-300: #ffc2d3;
  --rose-100: #ffe8ef;
  --gold-600: #c97d00;
  --gold-500: #f5a524;
  --gold-300: #ffd27a;
  --gold-100: #fff4dc;
  --ivory: #ffffff;
  --ivory-2: #fff5f8;
  --paper: #ffffff;
  --ink: #1d1320;
  --ink-2: #4b4150;
  --ink-3: #8a8090;
  --line: #efe6ec;
  --line-2: #f6eff3;
  --night: #1b0d19;
  --success: #2f7a5b;
  --success-bg: #e6f2ec;
  --warning: #9a6a14;
  --warning-bg: #fbf1dc;
  --danger: #a33a3d;
  --danger-bg: #f9e7e6;
  --info-bg: #efe7f0;

  --font-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(42, 16, 34, .06), 0 1px 1px rgba(42, 16, 34, .04);
  --shadow: 0 10px 30px -12px rgba(42, 16, 34, .18), 0 2px 6px rgba(42, 16, 34, .05);
  --shadow-lg: 0 30px 60px -24px rgba(42, 16, 34, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--plum-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--plum-600); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; color: var(--plum-900); }
h1, h2, .display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--plum-700); background: var(--plum-50); padding: .35rem .8rem; border-radius: 999px;
}
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; border-radius: 6px; }
.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; }
.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 100; background: var(--plum-800); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; color: #fff; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }
.icon-lg { width: 28px; height: 28px; flex: none; }
p > a > .icon-sm, p > a > .icon, li > a > .icon-sm { display: inline-block; vertical-align: -.2em; }

/* Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }
.container-wide { max-width: 1320px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-sm { padding: 48px 0; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.row { display: flex; gap: 1rem; align-items: center; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 24px; }
.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)); }
.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Buttons --------------------------------------------------------------- */
.btn {
  --btn-bg: var(--paper); --btn-fg: var(--plum-800); --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: .7rem 1.35rem;
  font: 600 .95rem/1 var(--font-sans); letter-spacing: .01em;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd);
  border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-primary { --btn-bg: var(--plum-700); --btn-fg: #fff; --btn-bd: var(--plum-700); }
.btn-primary { box-shadow: 0 8px 20px -8px rgba(229, 51, 107, .55); }
.btn-primary:hover { --btn-bg: var(--plum-600); box-shadow: 0 14px 28px -10px rgba(229, 51, 107, .65); }
.btn-gold { --btn-bg: linear-gradient(135deg, #ffb938, #f58b24); --btn-fg: #1d1320; --btn-bd: transparent; background: linear-gradient(135deg, #ffb938, #f58b24); }
.btn-gold:hover { box-shadow: 0 12px 26px -12px rgba(245, 139, 36, .8); }
.btn-white { --btn-bg: #fff; --btn-fg: var(--plum-900); --btn-bd: #fff; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: var(--plum-50); box-shadow: none; }
.btn-outline { --btn-bg: transparent; --btn-bd: var(--plum-700); }
.btn-light { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.3); }
.btn-light:hover { --btn-bg: rgba(255,255,255,.2); }
.btn-danger { --btn-bg: var(--danger-bg); --btn-fg: var(--danger); --btn-bd: #efcfcd; }
.btn-sm { min-height: 36px; padding: .45rem .95rem; font-size: .85rem; }
.btn-lg { min-height: 56px; padding: .9rem 1.8rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-icon { width: 46px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--plum-700); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Cards & surfaces -------------------------------------------------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.card-tight { padding: 20px; }
.card-flat { box-shadow: none; }
.card h3 { margin-bottom: .35rem; }
.surface-plum { background: radial-gradient(120% 120% at 0% 0%, #4a1238 0%, #2a0d24 45%, var(--night) 100%); color: #f6ecf1; }
.surface-plum h1, .surface-plum h2, .surface-plum h3 { color: #fff; }
.surface-ivory { background: var(--ivory-2); }
.divider-ornament { display: flex; align-items: center; gap: 14px; color: var(--gold-500); justify-content: center; margin: 1.5rem 0; }
.divider-ornament::before, .divider-ornament::after { content: ""; height: 1px; width: 60px; background: linear-gradient(90deg, transparent, var(--gold-300)); }
.divider-ornament::after { transform: scaleX(-1); }

/* Badges & chips --------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--plum-50); color: var(--plum-700); white-space: nowrap; }
.badge-gold { background: var(--gold-100); color: var(--gold-600); }
.badge-rose { background: var(--rose-100); color: var(--rose-600); }
.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-demo { background: #2a1022; color: #f5d995; letter-spacing: .08em; text-transform: uppercase; font-size: .66rem; }
.badge-test { background: #fff3cd; color: #7a5a00; border: 1px dashed #d9b44a; text-transform: uppercase; letter-spacing: .08em; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .8rem; border-radius: 999px; background: var(--ivory-2); border: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Forms ------------------------------------------------------------------ */
.field { margin-bottom: 1.35rem; }
.field > label, .field-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .45rem; color: var(--plum-900); }
.field .help { font-size: .82rem; color: var(--ink-3); margin: -.2rem 0 .5rem; }
.req { color: var(--rose-600); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: .75rem 1rem;
  font: 500 1rem/1.4 var(--font-sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--plum-500); box-shadow: 0 0 0 4px rgba(135, 66, 112, .12); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23874270' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem; }
.input.has-error, .select.has-error, .textarea.has-error, .has-error .option { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 600; margin: .4rem 0 0; }
.input-group { display: flex; gap: .75rem; align-items: center; }
.input-group .input { flex: 1; }
.input-suffix { position: relative; }
.input-suffix span { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: .9rem; }
.char-count { font-size: .78rem; color: var(--ink-3); text-align: right; margin-top: .3rem; }

.options { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.options.options-compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.option { position: relative; display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; font-weight: 600; font-size: .93rem; color: var(--ink-2); }
.option:hover { border-color: var(--rose-300); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; transition: all .15s; }
.option input[type=checkbox] + .tick { border-radius: 6px; }
.option input:checked + .tick { background: var(--plum-700); border-color: var(--plum-700); box-shadow: inset 0 0 0 3px var(--paper); }
.option input[type=checkbox]:checked + .tick { box-shadow: none; background: var(--plum-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; }
.option:has(input:checked) { border-color: var(--plum-600); background: var(--plum-50); color: var(--plum-800); }
.option:has(input:focus-visible) { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.pill-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-options .option { padding: .5rem .95rem; border-radius: 999px; font-size: .88rem; }
.pill-options .option .tick { display: none; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--plum-700); flex: none; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.switch input { appearance: none; width: 46px; height: 26px; background: var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--plum-700); }
.switch input:checked::after { transform: translateX(20px); }
.range-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: center; max-width: 360px; }
.searchable-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: .5rem; background: var(--paper); }
.searchable-list .option { border: 0; padding: .55rem .7rem; }
.list-filter { margin-bottom: .6rem; }

/* Alerts & flash ---------------------------------------------------------- */
.alert { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: 14px; background: var(--info-bg); color: var(--plum-800); font-size: .93rem; border: 1px solid transparent; }
.alert .icon { margin-top: 2px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert p:last-child { margin: 0; }
.flash-wrap { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 32px)); }
.flash { box-shadow: var(--shadow); animation: flashIn .35s var(--ease); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } }

.demo-banner { background: repeating-linear-gradient(135deg, #2a1022 0 14px, #331429 14px 28px); color: #f5d995; text-align: center; font-size: .82rem; font-weight: 700; letter-spacing: .04em; padding: .5rem 1rem; }
.demo-banner strong { letter-spacing: .14em; }
.test-banner { background: #fff3cd; color: #6b4f00; border-bottom: 1px dashed #d9b44a; text-align: center; font-size: .85rem; font-weight: 700; padding: .55rem 1rem; }

/* Header ------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 247, 241, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(233, 222, 212, .7); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--plum-900); }
.brand svg { width: 36px; height: 36px; }
.brand-name { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; letter-spacing: .01em; line-height: 1; }
.nav { display: flex; align-items: center; gap: .3rem; }
.nav a.nav-link { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .85rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.nav a.nav-link:hover { background: var(--plum-50); color: var(--plum-800); }
.nav a.nav-link.active { color: var(--plum-800); background: var(--plum-100); }
.nav .count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rose-600); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.menu-toggle { display: none; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: .5rem; z-index: 70; }
.user-menu .menu a, .user-menu .menu button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink-2); font: 600 .9rem var(--font-sans); background: none; border: 0; cursor: pointer; text-align: left; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--plum-50); color: var(--plum-800); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--rose-300), var(--gold-300)); color: var(--plum-900); font-weight: 800; font-size: .9rem; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }

.tabbar { display: none; }
@media (max-width: 900px) {
  .nav.member-nav { display: none; }
  .site-header .public-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header.open .public-nav { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); padding: 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 55; background: rgba(255, 253, 250, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 700; color: var(--ink-3); text-decoration: none; padding: 6px 10px; border-radius: 12px; }
  .tabbar a.active { color: var(--plum-700); background: var(--plum-50); }
  .tabbar .count { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--rose-600); color: #fff; font-size: .62rem; display: grid; place-items: center; padding: 0 4px; }
  body.has-tabbar { padding-bottom: 76px; }
}

/* Footer ------------------------------------------------------------------- */
.site-footer { background: var(--plum-950); color: #cdb9c5; padding: 72px 0 36px; margin-top: 0; }
.site-footer a { color: #e8d9e1; text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-grid h4 { color: var(--gold-300); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .93rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #9c8592; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Home: hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(closest-side, rgba(227, 185, 186, .45), transparent); pointer-events: none; }
.hero::after { content: ""; position: absolute; left: -200px; bottom: -260px; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(closest-side, rgba(217, 192, 143, .32), transparent); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 6.2vw, 5.2rem); line-height: 1.02; margin-bottom: 1.4rem; }
.hero h1 em { font-style: italic; color: var(--plum-600); font-weight: 500; }
.hero .lead { font-size: 1.2rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-trust { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 2.2rem; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust .icon { color: var(--gold-600); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* Interactive match preview (illustrative) */
.preview { position: relative; }
.preview-frame { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 32px; padding: 22px; box-shadow: var(--shadow-lg); }
.preview-label { position: absolute; top: -12px; left: 24px; }
.preview-tabs { display: flex; gap: .4rem; margin-bottom: 16px; flex-wrap: wrap; }
.preview-tabs button { border: 1px solid var(--line); background: var(--ivory); border-radius: 999px; padding: .4rem .85rem; font: 700 .78rem var(--font-sans); color: var(--ink-2); cursor: pointer; }
.preview-tabs button[aria-pressed=true] { background: var(--plum-700); border-color: var(--plum-700); color: #fff; }
.preview-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, var(--ivory) 0%, var(--plum-50) 100%); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.preview-card.swap { opacity: 0; transform: translateY(6px); }
.preview-art { width: 120px; height: 150px; border-radius: 18px; background: linear-gradient(170deg, var(--plum-600), var(--rose-500)); position: relative; overflow: hidden; }
.preview-art::before { content: ""; position: absolute; left: 18px; right: 18px; top: 28px; bottom: -10px; border: 2px solid rgba(245, 217, 149, .7); border-radius: 60px 60px 0 0; }
.preview-art::after { content: ""; position: absolute; left: 50%; top: 44px; width: 24px; height: 24px; transform: translateX(-50%) rotate(45deg); background: rgba(245, 217, 149, .85); box-shadow: 0 0 0 0 transparent; }
.preview-meta h3 { font-family: var(--font-display); font-size: 1.7rem; margin: 0; }
.preview-bars { margin-top: 16px; display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose-500), var(--plum-600)); transition: width .6s var(--ease); }
.preview-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 16px; font-size: .8rem; color: var(--ink-3); }

/* Score ring */
.ring { --val: 0; --size: 78px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--plum-600) calc(var(--val) * 1%), var(--line-2) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--paper); }
.ring span { position: relative; font-family: var(--font-display); font-weight: 700; font-size: calc(var(--size) * .3); color: var(--plum-800); line-height: 1; }
.ring small { position: relative; display: block; font-size: .55rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.ring-sm { --size: 54px; }
.ring-sm::before { inset: 5px; }
.ring-lg { --size: 120px; }
.ring-lg::before { inset: 10px; }

/* Home sections */
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head .lead { margin: 0 auto; }
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding: 30px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: var(--gold-300); line-height: 1; display: block; margin-bottom: 18px; }
.step .icon-badge { position: absolute; top: 28px; right: 26px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.icon-badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--plum-50); color: var(--plum-700); }
.icon-badge.gold { background: var(--gold-100); color: var(--gold-600); }
.icon-badge.rose { background: var(--rose-100); color: var(--rose-600); }
.feature { padding: 30px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature h3 { margin-top: 1.1rem; }
.feature p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.check-list li { display: flex; gap: .8rem; align-items: flex-start; }
.check-list .icon { color: var(--gold-500); margin-top: 3px; }
.surface-plum .check-list li { color: #e9dbe3; }
.privacy-visual { position: relative; border-radius: 32px; padding: 32px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.privacy-visual .row-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .93rem; }
.privacy-visual .row-item:last-child { border: 0; }
.blur-demo { filter: blur(6px); user-select: none; }
.testimonial { position: relative; margin: 0; padding: 32px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); }
.testimonial blockquote { margin: 0 0 1.2rem; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.45; color: var(--plum-900); font-style: italic; }
.testimonial .who { font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.illustrative-note { display: inline-flex; gap: .5rem; align-items: center; font-size: .82rem; color: var(--ink-3); background: var(--ivory-2); border: 1px dashed var(--line); padding: .45rem .9rem; border-radius: 999px; }
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 700; font-size: 1.05rem; color: var(--plum-900); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--gold-600); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .9rem 0 0; color: var(--ink-2); }
.cta-band { position: relative; overflow: hidden; border-radius: 40px; padding: clamp(40px, 7vw, 80px); text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: auto -120px -200px auto; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(217, 192, 143, .3); }
.cta-band::after { content: ""; position: absolute; inset: -160px auto auto -100px; width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(217, 192, 143, .25); }
.price-card { position: relative; max-width: 460px; margin: 0 auto; padding: 40px; border-radius: 32px; background: var(--paper); border: 1px solid var(--gold-300); box-shadow: var(--shadow-lg); }
.price { font-family: var(--font-display); font-size: 3.6rem; font-weight: 600; color: var(--plum-900); line-height: 1; }
.price small { font-family: var(--font-sans); font-size: 1rem; color: var(--ink-3); font-weight: 600; }

/* App shell ---------------------------------------------------------------- */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: .3rem; }
.page { padding-bottom: 80px; }
.layout-sidebar { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
@media (max-width: 960px) { .layout-sidebar { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 96px; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: .8rem 1rem; text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--plum-800); border-color: var(--plum-700); }

/* Profile cards */
.pcard { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pcard-media { position: relative; aspect-ratio: 4 / 5; background: linear-gradient(160deg, var(--plum-100), var(--rose-100)); overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-media img.blurred { filter: blur(18px) saturate(1.1); transform: scale(1.15); }
.pcard-media .monogram { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 4rem; font-weight: 600; color: var(--plum-600); opacity: .55; }
.pcard-media .media-note { position: absolute; left: 12px; bottom: 12px; display: inline-flex; gap: .35rem; align-items: center; font-size: .72rem; font-weight: 700; color: #fff; background: rgba(29, 11, 23, .55); padding: .3rem .6rem; border-radius: 999px; backdrop-filter: blur(6px); }
.pcard-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; z-index: 2; }
.pcard-score { background: rgba(255, 253, 250, .94); border-radius: 999px; padding: .3rem .7rem .3rem .35rem; display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 800; color: var(--plum-800); box-shadow: var(--shadow-sm); }
.pcard-score .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--plum-600) calc(var(--val) * 1%), var(--line) 0); position: relative; }
.pcard-score .dot::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.pcard-body { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.pcard-body h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: .4rem; }
.pcard-body h3 a { color: inherit; text-decoration: none; }
.pcard-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-meta { display: flex; flex-direction: column; gap: .2rem; font-size: .86rem; color: var(--ink-2); }
.pcard-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.pcard-meta .icon-sm { color: var(--ink-3); }
.pcard-reason { margin-top: .4rem; font-size: .8rem; color: var(--plum-600); font-weight: 600; display: flex; gap: .35rem; align-items: center; }
.pcard-actions { position: relative; z-index: 2; display: flex; gap: .5rem; padding: 0 18px 18px; }
.verified { color: var(--gold-600); }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--line-2); border-radius: 12px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card { border-radius: 24px; border: 1px solid var(--line); overflow: hidden; background: var(--paper); }
.skeleton-card .skeleton.media { aspect-ratio: 4/5; border-radius: 0; }
.skeleton-card .skeleton.line { height: 14px; margin: 14px 18px 0; }
.skeleton-card .skeleton.line.short { width: 50%; margin-bottom: 18px; }

/* Empty states */
.empty { text-align: center; padding: 64px 24px; border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.empty .icon-badge { margin: 0 auto 1rem; width: 64px; height: 64px; border-radius: 20px; }
.empty .icon-badge .icon { width: 28px; height: 28px; }
.empty h3 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.empty p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 1.4rem; }

/* Filters */
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.filters .field { margin-bottom: 1rem; }
.filters .field > label { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.filters .input, .filters .select { min-height: 42px; padding: .55rem .85rem; font-size: .92rem; border-radius: 12px; }
.filters-toggle { display: none; }
@media (max-width: 960px) {
  .filters-toggle { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: block; }
}
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 20px; }
.results-count { font-size: 1rem; color: var(--ink-2); }
.results-count strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--plum-800); font-weight: 700; margin-right: .2rem; }
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.pagination .current { background: var(--plum-700); border-color: var(--plum-700); color: #fff; }

/* Onboarding */
.onb { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 40px 0 100px; align-items: start; }
@media (max-width: 960px) { .onb { grid-template-columns: 1fr; gap: 20px; } .onb-steps { display: none; } }
.onb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; position: sticky; top: 96px; }
.onb-steps > li > a, .onb-steps > li > span { display: flex; gap: .75rem; align-items: center; padding: .6rem .8rem; border-radius: 12px; text-decoration: none; color: var(--ink-3); font-weight: 600; font-size: .92rem; }
.onb-steps .num { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; padding: 0; line-height: 1; font-size: .78rem; font-weight: 800; flex: none; background: var(--paper); }
.onb-steps .done > a { color: var(--ink-2); }
.onb-steps .done .num { background: var(--plum-100); border-color: var(--plum-100); color: var(--plum-700); }
.onb-steps .current > a, .onb-steps .current > span { background: var(--paper); color: var(--plum-900); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.onb-steps .current .num { background: var(--plum-700); color: #fff; border-color: var(--plum-700); }
.progress { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-500), var(--plum-600)); transition: width .5s var(--ease); }
.onb-card { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow-sm); }
.onb-card h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); }
.onb-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.q-block { padding: 1.4rem 0; border-bottom: 1px solid var(--line-2); }
.q-block:last-of-type { border-bottom: 0; }
.q-block[hidden] { display: none; }
.summary-section { padding: 1.4rem 0; border-bottom: 1px solid var(--line-2); }
.summary-section dl { display: grid; grid-template-columns: 220px 1fr; gap: .6rem 1.5rem; margin: 1rem 0 0; font-size: .93rem; }
.summary-section dt { color: var(--ink-3); font-weight: 600; }
.summary-section dd { margin: 0; color: var(--ink); }
@media (max-width: 640px) { .summary-section dl { grid-template-columns: 1fr; gap: .1rem; } .summary-section dd { margin-bottom: .6rem; } }

/* Results reveal */
.reveal { text-align: center; padding: 64px 0 40px; }
.reveal .big-count { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 8rem); line-height: 1.05; font-weight: 600; color: var(--plum-800); margin-bottom: .4rem; }

/* Profile page */
.profile-hero { display: grid; grid-template-columns: 380px 1fr; gap: 40px; padding: 40px 0; align-items: start; }
@media (max-width: 900px) { .profile-hero { grid-template-columns: 1fr; } }
.gallery-main { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4/5; background: linear-gradient(160deg, var(--plum-100), var(--rose-100)); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main img.blurred { filter: blur(22px); transform: scale(1.2); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery-thumbs button { width: 64px; height: 80px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--line-2); }
.gallery-thumbs button[aria-current=true] { border-color: var(--plum-600); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin: 0; }
.detail-list div { display: flex; gap: .75rem; align-items: flex-start; }
.detail-list .icon { color: var(--gold-600); margin-top: 2px; }
.detail-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.detail-list dd { margin: 0; font-weight: 600; color: var(--ink); }
@media (max-width: 640px) { .detail-list { grid-template-columns: 1fr; } }
.breakdown { display: grid; gap: 12px; }
.breakdown .bar-row { grid-template-columns: 150px 1fr 44px; }
.breakdown .reason { grid-column: 1 / -1; font-size: .8rem; color: var(--ink-3); font-weight: 500; margin-top: -6px; }
.breakdown .na .bar > span { background: var(--line); }
.action-bar { display: flex; gap: .6rem; flex-wrap: wrap; }
dialog { border: 0; border-radius: 24px; padding: 0; width: min(520px, calc(100% - 32px)); box-shadow: var(--shadow-lg); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(29, 11, 23, .5); backdrop-filter: blur(3px); }
dialog .dialog-body { padding: 28px; }

/* Messaging */
.chat { display: grid; grid-template-columns: 320px 1fr; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--paper); height: calc(100vh - 190px); min-height: 520px; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list a { display: flex; gap: .8rem; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.chat-list a.active, .chat-list a:hover { background: var(--plum-50); }
.chat-list .preview-text { font-size: .83rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.chat-list .unread { margin-left: auto; background: var(--rose-600); color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 800; padding: .1rem .45rem; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.chat-stream { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, var(--ivory) 0%, var(--paper) 100%); }
.msg { max-width: 72%; padding: .65rem .95rem; border-radius: 18px; font-size: .95rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; background: var(--paper); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.mine { align-self: flex-end; background: var(--plum-700); color: #fff; border-color: var(--plum-700); border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.msg time { display: block; font-size: .68rem; opacity: .65; margin-top: .25rem; }
.chat-form { display: flex; gap: .6rem; padding: 14px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 46px; max-height: 160px; resize: none; }
.chat-safety { display: flex; gap: .5rem; align-items: center; font-size: .78rem; color: var(--ink-3); padding: 8px 20px; background: var(--gold-100); }
@media (max-width: 860px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .chat.has-active .chat-list { display: none; }
  .chat:not(.has-active) .chat-main { display: none; }
}

/* Settings */
.settings-nav { display: grid; gap: 4px; }
.settings-nav a { display: flex; gap: .7rem; align-items: center; padding: .7rem .9rem; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; }
.settings-nav a:hover { background: var(--plum-50); }
.settings-section { scroll-margin-top: 100px; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.photo-tile { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.photo-tile img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.photo-tile .tile-foot { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: 8px; }
.photo-tile .status { position: absolute; top: 8px; left: 8px; }
.dropzone { display: grid; place-items: center; gap: .5rem; text-align: center; padding: 32px; border: 2px dashed var(--rose-300); border-radius: 22px; background: var(--rose-100); color: var(--plum-800); cursor: pointer; transition: background .2s; }
.dropzone:hover, .dropzone.drag { background: #f3dcd9; }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; padding-bottom: 80px; }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; } }
.order-line { display: flex; justify-content: space-between; padding: .7rem 0; border-bottom: 1px solid var(--line-2); font-size: .95rem; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 1rem; font-weight: 800; }
.order-total .price { font-size: 2.2rem; }
.gateway-option { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Auth pages */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; }
.auth-art .arches { position: absolute; inset: 0; opacity: .5; }
.auth-art blockquote { position: relative; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.3; margin: 0 0 1rem; color: #fff; font-style: italic; }
.auth-panel { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 2.4rem; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* Tables (shared with admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--ivory); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--plum-50); }

/* Prose (legal pages) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.8rem; margin-top: 2.4rem; }
.prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }
.legal-note { border-left: 3px solid var(--gold-500); background: var(--gold-100); padding: 1rem 1.2rem; border-radius: 0 12px 12px 0; color: var(--ink-2); }

/* Error page */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 20px; }
.error-code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 11rem); line-height: .9; color: var(--plum-100); font-weight: 700; -webkit-text-stroke: 1px var(--rose-300); }

/* Motion */
.fade-up { animation: fadeUp .7s var(--ease) both; }
.fade-up.d1 { animation-delay: .08s; } .fade-up.d2 { animation-delay: .16s; } .fade-up.d3 { animation-delay: .24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.js .in-view { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .in-view.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .in-view { opacity: 1; transform: none; }
}

/* RTL readiness */
[dir=rtl] .eyebrow::before { order: 2; }
[dir=rtl] .user-menu .menu { right: auto; left: 0; }
[dir=rtl] .chat-list { border-right: 0; border-left: 1px solid var(--line); }
