/* NESTORA component library. Uses tokens.css; dark.css and mobile.css load after this. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.55;
  color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 0% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(800px 480px at 100% 0%, var(--bg-glow-2), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 var(--s-3); }
h1 { font-size: var(--fs-3xl); font-weight: 750; }
h2 { font-size: var(--fs-2xl); font-weight: 700; }
h3 { font-size: var(--fs-xl); font-weight: 650; }
h4 { font-size: var(--fs-lg); font-weight: 650; }
p { margin: 0 0 var(--s-3); }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--panel-solid); padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 12px; }

/* ---------- Layout shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-6);
  padding-left: max(var(--s-6), env(safe-area-inset-left)); padding-right: max(var(--s-6), env(safe-area-inset-right));
  background: var(--panel); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 800; letter-spacing: 0.12em; font-size: 1.05rem; }
.topbar .brand:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.topbar-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); color: var(--ink); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-nav { display: flex; gap: var(--s-1); margin-left: var(--s-6); }
.topbar-nav a { color: var(--text-muted); padding: 8px 14px; border-radius: var(--radius-pill); font-weight: 550; font-size: var(--fs-sm); }
.topbar-nav a:hover, .topbar-nav a[aria-current="page"] { color: var(--ink); background: var(--muted-bg); text-decoration: none; }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); flex-wrap: nowrap; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel-strong); color: var(--text); cursor: pointer; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--panel-solid); }
.icon-btn:active { transform: scale(.96); }
.menu-btn, .back-btn { display: none; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }

.shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  width: var(--sidebar-w); flex: none; padding: var(--s-5) var(--s-4); display: none; flex-direction: column; gap: var(--s-1);
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto;
}
.has-sidebar .sidebar { display: flex; }
.sidebar-head { display: none; }
.nav-filter { margin-bottom: var(--s-2); }
.nav-section { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin: var(--s-4) var(--s-3) var(--s-1); font-weight: 650; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--text-muted); font-weight: 550; font-size: .95rem;
}
.nav-link:hover { background: var(--muted-bg); color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--panel-strong); color: var(--brand-700); box-shadow: var(--shadow-sm); }
.nav-user { margin-top: auto; padding: var(--s-3); border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-border); display: flex; gap: 10px; align-items: center; }
.nav-user .who { min-width: 0; }
.nav-user strong { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; min-width: 0; padding: var(--s-8) var(--s-8) var(--s-12); }
.container { max-width: var(--content-max); margin: 0 auto; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.page-head h1 { margin: 0; font-size: var(--fs-2xl); }
.page-head p { margin: 4px 0 0; color: var(--text-muted); }
.page-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

.footer { padding: var(--s-10) var(--s-6) var(--s-12); color: var(--text-muted); font-size: var(--fs-sm); border-top: 1px solid var(--line); margin-top: var(--s-12); }
.footer-grid { max-width: var(--content-max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--s-6); justify-content: space-between; }
.footer a { color: var(--text-muted); margin-right: var(--s-4); }

/* ---------- Panels (spatial glass) ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); padding: var(--s-6);
}
.panel + .panel { margin-top: var(--s-5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: var(--fs-lg); }
.panel-sunken { background: var(--panel-sunken); border-radius: var(--radius); padding: var(--s-4); }
.grid { display: grid; gap: var(--s-5); }
.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: var(--s-4); }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 14px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  text-decoration: none !important; white-space: nowrap; transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 6px 16px rgba(99, 56, 207, .28); }
.btn-primary:hover { background: var(--brand-700); }
.btn-gold { background: var(--gold-500); color: #1b1f2e; }
.btn-secondary { background: var(--panel-strong); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--panel-solid); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--muted-bg); color: var(--ink); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 12px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.inline-form { display: inline; margin: 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field .hint { font-size: var(--fs-sm); color: var(--text-muted); }
.field .error { font-size: var(--fs-sm); color: var(--danger); font-weight: 550; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"],
.field input[type="date"], .field input[type="url"], .field input[type="tel"], .field select, .field textarea, select.input {
  width: 100%; min-height: 46px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 14px; outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand-600); flex: none; }
.check-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; }
.check-grid li { display: flex; gap: 10px; align-items: center; }
.check-grid input { width: 20px; height: 20px; accent-color: var(--brand-600); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-5); }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s-5); }
.span-2 { grid-column: span 2; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--field-border); border-right: 0; border-radius: 14px 0 0 14px; background: var(--panel-sunken); color: var(--text-muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.input-prefix input { border-radius: 0 14px 14px 0 !important; }
.form-section { padding-top: var(--s-2); }
.form-section + .form-section { border-top: 1px solid var(--line); margin-top: var(--s-4); padding-top: var(--s-6); }
.form-section h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.form-section > p { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--s-4); }
.charges-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: var(--s-3); align-items: end; }
.charges-row .field { margin-bottom: var(--s-3); }
.form-actions { display: flex; gap: var(--s-3); justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; padding: var(--s-4) 0; background: linear-gradient(transparent, var(--bg) 35%); }

/* ---------- Badges, chips, alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 650; white-space: nowrap; line-height: 1.6; }
.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-muted   { background: var(--muted-bg); color: var(--text-muted); }
.badge-verified { background: var(--trust-600); color: #fff; }
:root[data-theme="dark"] .badge-verified { color: #06231d; }
.badge-trust { background: var(--trust-100); color: var(--trust-700); }
.chip-trust { color: var(--trust-700); }
.chip-trust .icon { color: var(--trust-600); }
.text-trust { color: var(--trust-700); }
.badge-sample { background: var(--gold-100); color: var(--gold-600); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-pill); background: var(--panel-strong); border: 1px solid var(--line); font-size: .85rem; color: var(--text); white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
a.chip:hover { border-color: var(--brand-300); text-decoration: none; }

.alerts { position: fixed; z-index: 120; right: max(var(--s-5), env(safe-area-inset-right)); top: calc(var(--topbar-h) + 12px); width: min(420px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--panel-strong); border: 1px solid var(--panel-border); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: slide-in .28s var(--ease); font-size: .95rem; }
.alert .icon { margin-top: 1px; }
.alert-success .icon { color: var(--success); }
.alert-danger .icon { color: var(--danger); }
.alert-warning .icon { color: var(--warning); }
.alert-info .icon { color: var(--info); }
.alert .close { margin-left: auto; background: none; border: 0; color: var(--text-faint); cursor: pointer; padding: 0; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); font-size: .93rem; }
.notice-info { background: var(--info-bg); color: var(--info); }
.notice-warning { background: var(--warning-bg); color: var(--warning); }
.notice-success { background: var(--success-bg); color: var(--success); }
.notice p { margin: 0; color: var(--text); }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-6); }
.stat { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); padding: var(--s-5); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 550; }
.stat-label .icon { color: var(--brand-600); }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 750; color: var(--ink); margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 2px; }
.stat-accent { background: linear-gradient(140deg, var(--brand-600), var(--brand-900)); border-color: transparent; }
.stat-accent .stat-label, .stat-accent .stat-foot, .stat-accent .stat-label .icon { color: rgba(255,255,255,.8); }
.stat-accent .stat-value { color: #fff; }

/* ---------- Property cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-5); }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); display: flex; flex-direction: column; min-width: 0;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--brand-50); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-photo img { transform: scale(1.04); }
.card-photo .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-faint); }
.card-badges { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; right: 60px; }
.card-badges .badge { backdrop-filter: blur(8px); }
.card-badges .badge-muted { background: rgba(255,255,255,.85); color: #33454c; }
.fav-btn { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.88); color: #22333a; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.fav-btn[aria-pressed="true"] { color: #e0475b; }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }
.card-body { padding: var(--s-4) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 750; color: var(--ink); }
.card-price small { font-size: .8rem; font-weight: 550; color: var(--text-muted); font-family: var(--font-body); }
.card-title { font-weight: 650; color: var(--text); font-size: 1rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: inherit; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .fav-form, .card .fav-btn { z-index: 2; }
.card-loc { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: var(--fs-sm); }
.card-specs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: var(--fs-sm); }
.card-specs span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.card-initial { font-size: var(--fs-xs); color: var(--text-faint); }
.cards.is-list { grid-template-columns: 1fr; }
.cards.is-list .card { flex-direction: row; }
.cards.is-list .card-photo { width: 300px; flex: none; aspect-ratio: auto; min-height: 210px; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--panel-sunken); }
.table .thumb { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--brand-50); }
.table .t-title { font-weight: 600; min-width: 200px; }
.table .t-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }

/* ---------- Pagination, empty states, loading ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: var(--s-8); flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .9rem; }
.pagination .current { background: var(--brand-600); color: #fff; border-color: transparent; }
.pagination a:hover { text-decoration: none; border-color: var(--brand-300); }
.empty { text-align: center; padding: var(--s-12) var(--s-6); }
.empty .empty-icon { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto var(--s-4); display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--text-muted); max-width: 440px; margin: 0 auto var(--s-5); }
.skeleton { background: linear-gradient(90deg, var(--muted-bg) 25%, var(--panel-sunken) 50%, var(--muted-bg) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Hero / home ---------- */
.hero {
  position: relative; border-radius: 32px; overflow: hidden; padding: clamp(32px, 6vw, 72px); color: #fff;
  background: linear-gradient(140deg, #5a2fbf 0%, #2e1a68 55%, #2d3040 100%); box-shadow: var(--shadow-lg);
}
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 85% 10%, rgba(176, 186, 204,.35), transparent 60%), radial-gradient(500px 300px at 10% 100%, rgba(214,220,232,.28), transparent 60%); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { color: #fff; font-size: var(--fs-4xl); max-width: 760px; margin-bottom: var(--s-4); }
.hero p.lead { color: rgba(255,255,255,.82); font-size: 1.1rem; max-width: 600px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); margin-bottom: var(--s-3); }
.hero .eyebrow { color: #d5dbe8; }
.hero-search { margin-top: var(--s-8); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 10px; padding: 10px; border-radius: 22px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.hero-search .input { background: rgba(255,255,255,.96); color: #14232b; border-color: transparent; }
.hero-stats { display: flex; gap: var(--s-8); margin-top: var(--s-8); flex-wrap: wrap; }
.hero-stats div { color: rgba(255,255,255,.75); font-size: var(--fs-sm); }
.hero-stats strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.6rem; }
.section { margin-top: var(--s-12); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature .f-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); }
.feature h3 { font-size: var(--fs-lg); margin: 0; }
.feature p { color: var(--text-muted); margin: 0; font-size: .95rem; }
.role-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.role-card ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: .93rem; }
.role-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Search page ---------- */
.search-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.filters { position: sticky; top: calc(var(--topbar-h) + 20px); max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto; }
.filters .field { margin-bottom: var(--s-3); }
.filters h3 { font-size: var(--fs-md); }
.filter-toggle { display: none; }
.results-bar { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4); }
.results-bar .count { font-weight: 650; }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--panel-sunken); gap: 2px; }
.seg a { display: inline-grid; place-items: center; width: 38px; height: 34px; border-radius: 10px; color: var(--text-muted); }
.seg a[aria-current="true"] { background: var(--panel-solid); color: var(--ink); box-shadow: var(--shadow-sm); }
.sort-select { min-height: 40px !important; width: auto !important; font-size: 16px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--field-border); background: var(--field); color: var(--text); }
.filter-actions { display: flex; gap: 8px; position: sticky; bottom: -1px; background: var(--panel-strong); padding: 12px 0 2px; }

/* ---------- Property details ---------- */
.detail-head { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; align-items: flex-start; margin-bottom: var(--s-5); }
.detail-head h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 8px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--text-muted); font-size: .93rem; align-items: center; }
.detail-meta span { display: inline-flex; gap: 6px; align-items: center; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: clamp(300px, 46vw, 520px); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--s-6); }
.gallery button { all: unset; cursor: zoom-in; position: relative; overflow: hidden; background: var(--brand-50); }
.gallery button:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery button:hover img { transform: scale(1.03); }
.gallery .more { position: absolute; right: 12px; bottom: 12px; }
.gallery.count-1 { grid-template-columns: 1fr; }
.gallery.count-1 button:first-child { grid-row: span 2; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-6); align-items: start; }
.detail-aside { position: sticky; top: calc(var(--topbar-h) + 20px); }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.spec { padding: 14px; border-radius: var(--radius); background: var(--panel-sunken); }
.spec .icon { color: var(--brand-600); }
.spec dt { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 6px; }
.spec dd { margin: 0; font-weight: 650; }
.price-hero { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.price-hero small { font-size: .95rem; font-weight: 550; color: var(--text-muted); font-family: var(--font-body); }
.price-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.price-table td { padding: 9px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.price-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; padding-left: 12px; }
.price-table .note { display: block; font-size: var(--fs-xs); color: var(--text-faint); }
.price-total { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--brand-50); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; }
.price-total .amt { font-family: var(--font-display); font-size: 1.35rem; color: var(--brand-700); white-space: nowrap; }
.provider-card { display: flex; gap: 14px; align-items: center; }
.facility-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.facility-list li { display: flex; gap: 10px; align-items: center; }
.facility-list .icon { color: var(--success); }
.prose { white-space: pre-line; color: var(--text); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: .95rem; margin: 0; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 550; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(5, 12, 14, .92); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 86vh; max-width: 92vw; border-radius: 14px; object-fit: contain; }
.lightbox .icon-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
.lightbox .lb-close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lightbox .lb-prev { left: 16px; }
.lightbox .lb-next { right: 16px; }
.lightbox .lb-count { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); color: #fff; font-size: .9rem; }
.sample-ribbon { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: var(--radius); background: var(--gold-100); color: var(--gold-600); font-size: .9rem; font-weight: 550; margin-bottom: var(--s-5); }

/* ---------- Photos manager ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-4); }
.photo-tile { border-radius: var(--radius); overflow: hidden; background: var(--panel-solid); border: 1px solid var(--line); }
.photo-tile img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-tile .tools { display: flex; gap: 6px; padding: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); padding: var(--s-8); text-align: center; background: var(--panel-sunken); transition: border-color var(--dur), background var(--dur); }
.dropzone.drag { border-color: var(--brand-500); background: var(--brand-50); }
.dropzone input[type="file"] { font-size: 16px; max-width: 100%; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-5); }
.steps span { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--muted-bg); color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.steps span.done { background: var(--success-bg); color: var(--success); }
.steps span.now { background: var(--brand-600); color: #fff; }

/* ---------- Auth (neumorphism + spatial) ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: radial-gradient(1200px 600px at 10% -10%, rgba(125, 87, 230,.16), transparent 60%), var(--bg); }
.auth-side { position: relative; margin: 20px; border-radius: 32px; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(150deg, #5a2fbf 0%, #2e1a68 60%, #2d3040 100%); box-shadow: var(--shadow-lg); }
.auth-side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 280px at 90% 0%, rgba(176, 186, 204,.35), transparent 60%); }
.auth-side > * { position: relative; }
.auth-side h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 460px; }
.auth-side p { color: rgba(255,255,255,.78); max-width: 440px; }
.auth-side .brand { color: #fff; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.9); }
.auth-points .icon { color: #d5dbe8; }
.auth-main { display: flex; flex-direction: column; padding: 24px clamp(20px, 5vw, 64px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-card { width: 100%; max-width: 480px; margin: auto; padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: var(--bg); box-shadow: var(--neu-out); border: 1px solid var(--panel-border); }
.auth-card h1 { font-size: var(--fs-2xl); margin-bottom: 6px; }
.auth-card .sub { color: var(--text-muted); margin-bottom: var(--s-6); }
.auth-card .field input, .auth-card .field select { background: var(--bg); box-shadow: var(--neu-in); border-color: transparent; }
.auth-card .field input:focus, .auth-card .field select:focus { border-color: var(--brand-500); }
.auth-card .btn-primary { box-shadow: var(--neu-out); }
.auth-alt { text-align: center; margin-top: var(--s-5); color: var(--text-muted); font-size: .95rem; }
.role-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: var(--s-4); }
.role-picker label { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; cursor: pointer; background: var(--bg); box-shadow: var(--neu-out); border: 2px solid transparent; transition: border-color var(--dur), box-shadow var(--dur); font-size: .9rem; }
.role-picker input { position: absolute; opacity: 0; pointer-events: none; }
.role-picker label:has(input:checked) { border-color: var(--brand-500); box-shadow: var(--neu-in); }
.role-picker label:has(input:focus-visible) { outline: 3px solid var(--brand-300); }
.role-picker .icon { color: var(--brand-600); }
.role-picker strong { color: var(--ink); }
.role-picker small { color: var(--text-muted); line-height: 1.35; }

/* ---------- Drawer, overlay, tab bar (phone parts are switched on in mobile.css) ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.overlay.open { opacity: 1; pointer-events: auto; }
.tabbar { display: none; }
body.drawer-open { overflow: hidden; }

/* ---------- Error page ---------- */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; background: linear-gradient(135deg, var(--brand-500), var(--gold-500)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* ---------- Responsive (tablet) ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search .btn { grid-column: span 2; }
}
@media (max-width: 960px) {
  .search-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* ---------- Print: always white ---------- */
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --panel: #fff; --panel-strong: #fff; --text: #000; --ink: #000; --text-muted: #333; color-scheme: light; }
  body { background: #fff !important; color: #000; }
  .topbar, .sidebar, .tabbar, .alerts, .overlay, .form-actions, .fav-btn, .btn, .filters, .footer { display: none !important; }
  .panel, .card, .stat { box-shadow: none !important; border: 1px solid #ccc !important; backdrop-filter: none !important; background: #fff !important; }
  .main { padding: 0; }
}

/* ---------- Utilities (no inline styles: strict CSP) ---------- */
.push-right { margin-left: auto; }
.drawer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; letter-spacing: .12em; color: var(--ink); }
.drawer-brand:hover { text-decoration: none; }
.footer-brand { color: var(--ink); letter-spacing: .12em; }
.footer-blurb { margin-top: 6px; max-width: 360px; }
.hide-desktop-title { display: none; }
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.text-center { text-align: center; }
.w-auto { width: auto !important; }
.gap-2 { gap: var(--s-2); }
.color-brand { color: var(--brand-600); }
.max-prose { max-width: 760px; }

.h-sm { font-size: var(--fs-lg); margin-bottom: var(--s-4); }
.h-xs { font-size: var(--fs-md); margin-bottom: var(--s-2); }
.chip[aria-current="page"] { background: var(--brand-600); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .chip[aria-current="page"] { color: #14092e; }
.fav-btn-wide[aria-pressed="true"] { color: #e0475b; }
.fav-btn-wide[aria-pressed="true"] .icon { fill: currentColor; }
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details > summary::after { content: "+"; font-weight: 700; color: var(--text-muted); }
details[open] > summary::after { content: "–"; }
.thumb { display: block; }
nav-link[aria-disabled] { opacity: .6; }
.nav-link[aria-disabled="true"] { opacity: .65; cursor: default; }
.nav-link[aria-disabled="true"]:hover { background: none; color: var(--text-muted); }
.nav-link .badge { margin-left: auto; }

.grid > *, .form-grid > *, .form-grid-3 > *, .detail-layout > *, .search-layout > * { min-width: 0; }

/* ---------- Charts ---------- */
.chart { position: relative; margin: 0; min-width: 0; }
.chart-head h3 { font-size: var(--fs-md); margin: 0; }
.chart-head p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.chart-plot { margin-top: var(--s-3); min-height: 60px; border-radius: 10px; }
.chart-plot:focus-visible { outline-offset: 4px; }
.chart-svg { display: block; overflow: visible; }
.c-bar { fill: var(--chart-1); transition: fill .12s; }
.c-bar.is-active { fill: var(--chart-1-active); }
.c-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.c-axis { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
.c-tick { fill: var(--text-muted); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.c-label { fill: var(--text); font-size: 12.5px; font-family: var(--font-body); }
.c-value { fill: var(--text); font-size: 12px; font-weight: 600; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.c-hit { fill: transparent; cursor: default; }
.chart-empty { color: var(--text-muted); font-size: var(--fs-sm); padding: var(--s-8) 0; text-align: center; margin: 0; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .12s; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.chart-tip.show { opacity: 1; }
.chart-tip strong { font-size: .95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-tip span { font-size: .78rem; color: var(--text-muted); }
.chart-table { margin-top: var(--s-2); font-size: var(--fs-sm); }
.chart-table summary { color: var(--text-muted); font-weight: 600; font-size: .82rem; padding: 4px 0; display: inline-flex; gap: 8px; }
.chart-table summary::after { content: none; }
.chart-table .table { font-size: .85rem; }
.chart-table .table td, .chart-table .table th { padding: 6px 10px; }
.range-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-5); }

/* ---------- Dashboard pieces ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.dash-grid > * { min-width: 0; }
.dash-grid + .dash-grid, .dash-grid + .panel, .panel + .dash-grid { margin-top: var(--s-5); }
.dash-grid > .panel + .panel { margin-top: 0; }
.stack-panels > .panel + .panel { margin-top: var(--s-5); }
.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.activity li { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.activity li > div { min-width: 0; }
.activity strong { display: block; font-size: .9rem; }
.activity a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-icon { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.coming { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; color: var(--text-muted); }
.coming:last-child { border-bottom: 0; }
.meter { height: 8px; border-radius: 999px; background: var(--brand-100); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--chart-1); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .93rem; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist .done { color: var(--success); }
.checklist .todo { color: var(--text-faint); }
.top-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.top-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.top-list .thumb { width: 56px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--brand-50); }
.top-list .t { min-width: 0; }
.top-list .t a { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.top-list .n { text-align: right; font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.top-list .n strong { display: block; color: var(--ink); font-size: .95rem; }
.org-logo { width: 56px; height: 56px; border-radius: 16px; object-fit: contain; background: var(--panel-solid); border: 1px solid var(--line); flex: none; }
.org-logo-lg { width: 96px; height: 96px; border-radius: 24px; }
.org-mark { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-weight: 800; font-family: var(--font-display); }
.org-mark.org-logo-lg { font-size: 1.6rem; }
.org-head { display: flex; gap: 16px; align-items: center; min-width: 0; }
.org-head h1 { margin: 0; }
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.row-form select { min-height: 38px; padding: 4px 10px; font-size: 16px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--field); color: var(--text); max-width: 170px; }
.compare-table th[scope="row"] { text-align: left; font-weight: 600; color: var(--text-muted); white-space: nowrap; position: sticky; left: 0; background: var(--panel-strong); z-index: 1; font-size: .85rem; text-transform: none; letter-spacing: 0; }
.compare-table td { min-width: 190px; vertical-align: top; }
.compare-table .thumb { width: 100%; height: 120px; border-radius: 12px; object-fit: cover; }
.compare-table .best { color: var(--success); font-weight: 700; }
.compare-table .section-row th { background: var(--panel-sunken); color: var(--ink); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.compare-pick { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.compare-pick input { width: 18px; height: 18px; accent-color: var(--brand-600); }
.saved-search { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.saved-search:last-child { border-bottom: 0; }
.saved-search .t { flex: 1; min-width: 180px; }
.saved-search .t a { font-weight: 650; color: var(--text); }

.meter-svg { display: block; width: 100%; height: 8px; }
.meter-track { fill: var(--brand-100); }

.compare-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.compare-wrap .compare-pick { align-self: flex-start; padding: 4px 6px; }
.d-block { display: block; }
.logo-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.logo-form input[type=file] { font-size: 16px; max-width: 100%; }
.role-help { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.role-help strong { color: var(--ink); }

.reset-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.logo-form > form { flex: 1 1 180px; min-width: 0; }
.logo-form input[type=file] { width: 100%; }

.grid > .panel + .panel, .grid > .panel { margin-top: 0; }
.top-list .t .small { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; white-space: normal; }

/* Stage 5 engagement views */
.list-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;text-decoration:none;color:inherit}
.list-row:hover{border-color:var(--line-strong,var(--border));text-decoration:none}
.list-row .grow,.saved-search .t{min-width:0;flex:1}
.form-panel{max-width:760px}
.message-card{max-width:88%;padding:1rem;border:1px solid var(--line,var(--border));border-radius:14px;background:var(--surface-2,var(--surface))}
.message-own{margin-left:auto;background:var(--surface-accent,var(--surface))}
.message-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:.65rem 0 0}
.empty-state{text-align:center;padding:3rem 1.5rem}
.empty-state h2{margin-bottom:.5rem}
@media(max-width:640px){.list-row{align-items:flex-start}.message-card{max-width:100%}}

/* ---------- Profile pictures, ratings and comments ---------- */
.avatar-img { object-fit: cover; padding: 0; background: var(--panel-solid); }
.avatar-link { display: inline-flex; border-radius: 50%; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.8rem; }
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars .star { color: var(--gold-500); fill: none; }
.stars .star-on { fill: currentColor; }
.stars-lg .icon { width: 24px; height: 24px; }
.rating-big { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-4); }
.rating-num { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1; color: var(--ink); }
.rating-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.rating-bars li { display: grid; grid-template-columns: 56px 1fr 32px; align-items: center; gap: var(--s-3); }
.rating-bars progress { width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: var(--muted-bg); appearance: none; -webkit-appearance: none; }
.rating-bars progress::-webkit-progress-bar { background: var(--muted-bg); }
.rating-bars progress::-webkit-progress-value { background: var(--gold-500); border-radius: 99px; }
.rating-bars progress::-moz-progress-bar { background: var(--gold-500); border-radius: 99px; }
.star-input { border: 0; padding: 0; margin: 0 0 var(--s-4); display: inline-flex; flex-direction: row-reverse; gap: 4px; position: relative; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--gold-500); line-height: 0; padding: 2px; border-radius: 8px; }
.star-input label .icon { width: 36px; height: 36px; fill: none; transition: transform var(--dur) var(--ease); }
.star-input input:checked ~ label .icon,
.star-input label:hover .icon, .star-input label:hover ~ label .icon { fill: currentColor; }
.star-input label:hover .icon { transform: scale(1.1); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.star-input.has-error label { color: var(--danger); }
.comments { margin-top: var(--s-10); max-width: 820px; }
.comment-form { margin: var(--s-4) 0 var(--s-6); }
.comment-form-row { display: flex; gap: var(--s-3); align-items: flex-start; }
.comment-form-row .field { flex: 1; margin: 0; min-width: 0; }
.comment-form textarea { width: 100%; }
.row-end { display: flex; justify-content: flex-end; margin-top: var(--s-3); }
.comment-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-5); }
.comment { display: flex; gap: var(--s-3); align-items: flex-start; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.comment:target .comment-main { outline: 2px solid var(--brand-500); outline-offset: 6px; border-radius: 8px; }
.comment-main { min-width: 0; flex: 1; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.comment-body { margin: 4px 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.comment .link-btn { display: inline; color: var(--text-muted); }
@media (max-width: 720px) { .rating-bars li { grid-template-columns: 52px 1fr 28px; } }
