@font-face {
  font-family: "Yekan Bakh";
  src: local("Yekan Bakh"), local("YekanBakh"), local("Yekan Bakh FaNum");
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: local("IRANYekanX"), local("IRANYekanXFaNum"), local("IRANYekan");
  font-display: swap;
}

@font-face {
  font-family: "Dana";
  src: local("Dana"), local("DanaFaNum"), local("Dana VF");
  font-display: swap;
}

:root,
:root[data-theme="light"] {
  --font-fa: "Yekan Bakh", "IRANYekanX", "Dana", "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-num: var(--font-fa);
  --bg: #eef3f0;
  --bg-soft: #f6f8f6;
  --surface: #ffffff;
  --surface-soft: #f9fbfa;
  --ink: #061c24;
  --ink-2: #203b42;
  --muted: #6a7f83;
  --line: rgba(6, 28, 36, .1);
  --line-strong: rgba(15, 185, 160, .42);
  --teal: #0fb9a0;
  --teal-dark: #188d8f;
  --navy: #061c24;
  --white: #f4fafa;
  --gray: #6b7c80;
  --amber: #d7a642;
  --red: #d94d5c;
  --green: #21a970;
  --radius: 8px;
  --shadow: 0 16px 42px rgba(6, 28, 36, .08);
  --shadow-strong: 0 26px 70px rgba(6, 28, 36, .14);
}

:root[data-theme="dark"] {
  --bg: #061c24;
  --bg-soft: #09242d;
  --surface: #0b2a33;
  --surface-soft: #0e323b;
  --ink: #f4fafa;
  --ink-2: #d7e6e6;
  --muted: #9bb0b2;
  --line: rgba(244, 250, 250, .12);
  --line-strong: rgba(15, 185, 160, .5);
  --shadow: 0 18px 50px rgba(0, 0, 0, .26);
  --shadow-strong: 0 30px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  direction: rtl;
  color: var(--ink);
  background:
    linear-gradient(rgba(15, 185, 160, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 185, 160, .03) 1px, transparent 1px),
    radial-gradient(circle at 20% 0, rgba(15, 185, 160, .1), transparent 24rem),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  background-size: 72px 72px, 72px 72px, auto, auto;
  font-family: var(--font-fa);
  font-size: var(--hm-base-font-size, 15px);
  font-weight: var(--hm-body-font-weight, 500);
  line-height: var(--hm-line-height, 1.75);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(rgba(15, 185, 160, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 185, 160, .045) 1px, transparent 1px),
    radial-gradient(circle at 78% -8%, rgba(15, 185, 160, .18), transparent 26rem),
    linear-gradient(180deg, #031016, var(--bg));
  background-size: 72px 72px, 72px 72px, auto, auto;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1, h2, h3, h4, strong, b {
  font-family: var(--font-fa);
  font-weight: var(--hm-heading-font-weight, 850);
  letter-spacing: 0;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.muted { color: var(--muted); }
main { min-height: 64vh; }

.topbar {
  position: sticky;
  top: 12px;
  z-index: 80;
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  min-width: 250px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 28px rgba(15, 185, 160, .18);
}

.brand small {
  display: block;
  color: var(--teal-dark);
  font-size: 10px;
  letter-spacing: 1.2px;
}

.navlinks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}

.navlinks a:not(.btn),
.navlinks form button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--ink-2);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.navlinks a:hover,
.navlinks a.is-active,
.navlinks form button:hover {
  color: var(--navy);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(6, 28, 36, .06);
}

:root[data-theme="dark"] .navlinks a:hover,
:root[data-theme="dark"] .navlinks a.is-active,
:root[data-theme="dark"] .navlinks form button:hover {
  color: var(--white);
  background: rgba(244, 250, 250, .08);
}

.btn,
.ui-btn,
button:not(.ui-icon-btn):not(.ui-nav-toggle) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 850;
  box-shadow: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.btn:hover,
.ui-btn:hover,
button:not(.ui-icon-btn):not(.ui-nav-toggle):hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 28px rgba(15, 185, 160, .13);
}

.btn.gold,
.ui-btn--primary {
  color: #031016;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), #86f0e2);
}

.btn.light,
.ui-btn--soft {
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
}

.btn.danger { color: #fff; background: var(--red); border-color: transparent; }
.ui-btn--full { width: 100%; }

.ui-icon-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.ui-theme-toggle {
  width: auto;
  min-width: 86px;
  gap: 7px;
  padding-inline: 11px;
  font-size: 12px;
  font-weight: 850;
}

.ui-nav-toggle { display: none; }

.flash,
.errors {
  margin: 18px 0;
  border-radius: var(--radius);
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.errors { border-color: rgba(217, 77, 92, .25); color: var(--red); }
.flash { border-color: rgba(33, 169, 112, .25); color: var(--green); }

.hm-hero {
  padding: 64px 0 32px;
}

.hm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .75fr);
  gap: 22px;
  align-items: stretch;
}

.hm-hero-panel,
.hm-search-console,
.hm-insight-card,
.hm-step-card,
.hm-path-card,
.card,
.filter-panel,
.side,
.stat,
.category-card,
.plan-card,
.brand-panel,
.page-hero-box,
.search-console,
.ui-listing,
.listing-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hm-hero-panel {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  padding: clamp(26px, 4vw, 46px);
  color: #f4fafa;
  background:
    linear-gradient(rgba(126, 238, 221, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 238, 221, .07) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(15, 185, 160, .27), transparent 18rem),
    linear-gradient(135deg, #0b2a33, #061c24 62%, #031016);
  background-size: 68px 68px, 68px 68px, auto, auto;
  box-shadow: var(--shadow-strong);
}

.hm-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hm-hero__copy h1 {
  max-width: 660px;
  margin: 16px 0 12px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.3;
  color: #f4fafa;
  text-wrap: balance;
}

.hm-hero__copy p {
  max-width: 610px;
  margin: 0;
  color: rgba(244, 250, 250, .78);
  font-size: 15px;
  line-height: 2;
}

.hm-hero__actions,
.hm-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hm-hero__visual {
  align-self: center;
  display: grid;
  gap: 12px;
}

.hm-logo-tile {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(244, 250, 250, .14);
  border-radius: var(--radius);
  background: rgba(244, 250, 250, .08);
}

.hm-logo-tile img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 185, 160, .5);
}

.hm-logo-tile strong { color: #f4fafa; font-size: 18px; }
.hm-logo-tile span { color: rgba(244, 250, 250, .68); font-size: 12px; }

.hm-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hm-hero-metrics div {
  min-height: 72px;
  display: grid;
  align-content: center;
  padding: 10px;
  border: 1px solid rgba(244, 250, 250, .12);
  border-radius: var(--radius);
  background: rgba(244, 250, 250, .07);
}

.hm-hero-metrics b { color: #86f0e2; font-size: 22px; line-height: 1.1; }
.hm-hero-metrics span { color: rgba(244, 250, 250, .7); font-size: 12px; }

.hm-search-console {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 20px;
}

.ui-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ui-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ui-card-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.ui-pill,
.eyebrow {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15, 185, 160, .35);
  border-radius: var(--radius);
  padding: 5px 10px;
  color: var(--teal-dark);
  background: rgba(15, 185, 160, .08);
  font-size: 12px;
  font-weight: 850;
}

.hm-hero-panel .ui-pill {
  color: #86f0e2;
  border-color: rgba(134, 240, 226, .35);
  background: rgba(15, 185, 160, .12);
}

.ui-segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.ui-segment label {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.ui-segment input { display: none; }
.ui-segment label:has(input:checked) {
  color: #031016;
  background: linear-gradient(135deg, var(--teal), #86f0e2);
}

.field,
.ui-field {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
}

.form-grid,
.ui-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: 1.2fr 1fr 1fr .8fr; }

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface-soft);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea { min-height: 124px; resize: vertical; }
select option { color: #061c24; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:focus, select:focus, textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(15, 185, 160, .12);
  background: var(--surface);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  appearance: none;
  padding: 0;
  margin: 0 0 0 8px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  vertical-align: middle;
}

input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: radial-gradient(circle, #031016 0 30%, transparent 31%), linear-gradient(135deg, var(--teal), #86f0e2);
}

.hm-home-section,
.ui-section,
.section {
  padding: 36px 0;
}

.ui-section-head,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact,
.ui-section-head.compact {
  align-items: flex-start;
  flex-direction: column;
}

.ui-section-head h2,
.section-head h1,
.section-head h2,
.page-hero h1 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.45;
  text-wrap: balance;
}

.ui-section-head p { margin: 8px 0 0; color: var(--muted); }

.ui-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-dark);
  font-weight: 850;
}

.hm-path-grid,
.hm-step-grid,
.hm-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hm-path-card,
.hm-step-card,
.hm-insight-card {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hm-path-card:hover,
.hm-step-card:hover,
.hm-insight-card:hover,
.ui-listing:hover,
.listing-card:hover,
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-strong);
}

.hm-path-card__top,
.hm-step-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ui-icon,
.hm-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 185, 160, .28);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: rgba(15, 185, 160, .09);
}

.hm-card-art {
  min-height: 96px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(15, 185, 160, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 185, 160, .07) 1px, transparent 1px),
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 16%, var(--surface)), var(--surface-soft));
  background-size: 28px 28px, 28px 28px, auto;
}

.hm-card-art svg {
  width: 56px;
  height: 56px;
  color: var(--teal-dark);
}

.hm-path-card h3,
.hm-step-card h3,
.hm-insight-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.5;
}

.hm-path-card p,
.hm-step-card p,
.hm-insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hm-path-card em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border-radius: var(--radius);
  padding: 8px 10px;
  color: #031016;
  background: linear-gradient(135deg, var(--teal), #86f0e2);
  font-style: normal;
  font-weight: 850;
}

.hm-trust-band {
  color: #f4fafa;
  background:
    linear-gradient(rgba(126, 238, 221, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 238, 221, .06) 1px, transparent 1px),
    linear-gradient(135deg, #0b2a33, #061c24);
  background-size: 70px 70px, 70px 70px, auto;
  border-block: 1px solid rgba(15, 185, 160, .18);
}

.hm-trust-band .ui-section-head h2,
.hm-trust-band .hm-step-card h3 { color: #f4fafa; }
.hm-trust-band .ui-section-head p,
.hm-trust-band .hm-step-card p { color: rgba(244, 250, 250, .72); }
.hm-trust-band .hm-step-card {
  border-color: rgba(244, 250, 250, .12);
  background: rgba(244, 250, 250, .06);
  box-shadow: none;
}

.ui-listing-grid,
.grid.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ui-listing-grid--compact,
.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ui-listing,
.listing-card {
  overflow: hidden;
  padding: 10px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.ui-listing__media,
.media-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.ui-listing__media img,
.media-wrap img,
.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ui-listing__code,
.floating-badges,
.ui-listing__badges {
  position: absolute;
  z-index: 2;
}

.ui-listing__code {
  right: 10px;
  top: 10px;
  border-radius: var(--radius);
  padding: 5px 8px;
  color: #f4fafa;
  background: rgba(6, 28, 36, .72);
  font-size: 12px;
  font-weight: 850;
}

.floating-badges,
.ui-listing__badges {
  left: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge,
.ui-listing__badges span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: var(--radius);
  padding: 4px 8px;
  color: var(--ink);
  background: var(--bg-soft);
  font-size: 12px;
  font-weight: 850;
}

.badge.gold { color: #3d2d00; background: #ffe4a3; }
.badge.red { color: #fff; background: var(--red); }
.badge.green { color: #fff; background: var(--green); }
.badge.dark { color: #f4fafa; background: var(--navy); }

.ui-listing__body,
.listing-card .body {
  display: grid;
  gap: 12px;
  padding: 14px 4px 2px;
}

.ui-meta,
.meta-row,
.card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.ui-listing h3,
.listing-card h3 {
  margin: 0;
  min-height: 58px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}

.ui-specs,
.listing-spec-grid,
.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ui-specs span,
.listing-spec-grid div,
.specs div,
.stat {
  min-height: 64px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.ui-specs b,
.listing-spec-grid strong,
.specs strong,
.stat strong {
  color: var(--teal-dark);
  font-size: 18px;
  line-height: 1.1;
}

.ui-specs small,
.listing-spec-grid span,
.specs span,
.stat span {
  color: var(--muted);
  font-size: 12px;
}

.ui-price-box {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15, 185, 160, .18);
  border-radius: var(--radius);
  padding: 12px;
  background: color-mix(in srgb, var(--teal) 8%, var(--surface-soft));
}

.ui-price-box small { color: var(--muted); font-size: 12px; }
.ui-price-box strong {
  color: var(--teal-dark);
  font-size: 18px;
  line-height: 1.45;
  word-break: keep-all;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.filter-panel,
.card,
.side,
.page-hero-box,
.search-console,
.pro-form > section {
  padding: 18px;
}

.filter-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-hero { padding: 48px 0 10px; }
.page-hero-box {
  min-height: 210px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 10% 0, rgba(15, 185, 160, .13), transparent 20rem),
    var(--surface);
}

.dashboard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-block: 34px;
}

.side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
}

.side a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--ink-2);
  font-weight: 800;
}

.side a:hover,
.side a.active,
.side a.is-active {
  color: #031016;
  background: linear-gradient(135deg, var(--teal), #86f0e2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.pro-form {
  display: grid;
  gap: 16px;
}

.badges,
.pro-checks {
  display: grid;
  gap: 8px;
}

.badges label,
.pro-checks label,
.ui-check-card {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: var(--surface-soft);
  font-weight: 800;
}

.ui-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  background: var(--surface-soft);
}

tr:last-child td { border-bottom: 0; }

.empty-state,
.ui-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--muted);
  background: var(--surface-soft);
}

.pagination,
nav[role="navigation"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.font-manager { display: grid; gap: 18px; }
.font-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.font-preset-card {
  position: relative;
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 16px 42px;
  background: var(--surface-soft);
  cursor: pointer;
}

.font-preset-card input {
  position: absolute;
  top: 16px;
  left: 16px;
}

.font-preset-card:has(input:checked) {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--teal) 8%, var(--surface));
}

.font-preset-card strong { font-size: 17px; }
.font-preset-card span { color: var(--muted); font-size: 13px; }

.font-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface-soft);
}

.font-preview h3 { margin: 0; font-size: 26px; }
.font-preview p { margin: 0; color: var(--muted); }

.footer {
  margin-top: 42px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 66%, transparent);
}

.footer h3 { margin: 0 0 8px; }
.footer p { margin: 6px 0; }

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .36s ease, transform .36s ease;
  transition-delay: var(--delay, 0ms);
}

[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .hm-hero__grid,
  .hm-hero-panel,
  .layout,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .hm-search-console,
  .filter-panel,
  .side {
    position: static;
  }

  .ui-listing-grid--compact,
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body { padding-bottom: 70px; }
  .topbar { top: 8px; width: min(100% - 18px, 1180px); }
  .nav { min-height: 62px; }
  .brand { min-width: 0; }
  .brand img { width: 42px; height: 42px; }
  .brand small { display: none; }
  .ui-nav-toggle { display: inline-grid; }
  .ui-theme-toggle { min-width: 40px; width: 40px; padding: 0; }
  .ui-theme-toggle span { display: none; }

  [data-nav-panel] {
    position: fixed;
    inset: 86px 12px auto;
    z-index: 90;
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-strong);
  }

  body[data-menu-open] [data-nav-panel] { display: grid; }

  .hm-hero { padding-top: 32px; }
  .hm-hero-panel { min-height: auto; padding: 22px; }
  .hm-hero__copy h1 { font-size: clamp(30px, 9vw, 42px); line-height: 1.42; }
  .hm-hero__actions .ui-btn { width: 100%; }
  .hm-hero__visual { display: none; }
  .hm-path-grid,
  .hm-step-grid,
  .hm-insight-grid,
  .ui-listing-grid,
  .grid.cols-3,
  .grid.cols-4,
  .stats,
  .font-preset-grid,
  .form-grid.three,
  .form-grid.four {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container { width: min(100% - 22px, 1180px); }
  .hm-search-console,
  .card,
  .filter-panel,
  .side,
  .page-hero-box {
    padding: 14px;
  }
  .form-grid,
  .ui-form-row,
  .ui-specs,
  .listing-spec-grid,
  .specs,
  .hm-hero-metrics {
    grid-template-columns: 1fr;
  }
  .ui-section-head,
  .section-head,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Search-engine home redesign inspired by real-estate discovery products. */
.hm-search-hero {
  padding: 54px 0 28px;
}

.hm-search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 18px;
  align-items: stretch;
}

.hm-search-copy,
.hm-radar-search,
.hm-live-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hm-search-copy {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 46px);
  color: #f4fafa;
  overflow: hidden;
  background:
    linear-gradient(rgba(126, 238, 221, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 238, 221, .06) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(15, 185, 160, .32), transparent 19rem),
    radial-gradient(circle at 88% 80%, rgba(134, 240, 226, .12), transparent 22rem),
    linear-gradient(135deg, #0b2a33, #061c24 62%, #031016);
  background-size: 72px 72px, 72px 72px, auto, auto, auto;
}

.hm-search-copy h1 {
  max-width: 780px;
  margin: 16px 0 12px;
  color: #f4fafa;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.3;
  text-wrap: balance;
}

.hm-search-copy p {
  max-width: 680px;
  margin: 0;
  color: rgba(244, 250, 250, .76);
  font-size: 15px;
  line-height: 2;
}

.hm-search-copy .ui-pill {
  color: #86f0e2;
  border-color: rgba(134, 240, 226, .34);
  background: rgba(15, 185, 160, .12);
}

.hm-source-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.hm-source-chip {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(244, 250, 250, .13);
  border-radius: var(--radius);
  padding: 13px;
  background: rgba(244, 250, 250, .07);
}

.hm-source-chip span {
  color: #86f0e2;
}

.hm-source-chip b {
  color: #f4fafa;
  font-size: 14px;
}

.hm-source-chip small {
  color: rgba(244, 250, 250, .68);
}

.hm-radar-search {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.hm-radar-search__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hm-radar-search__head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.hm-radar-search__head strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.hm-search-input {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 8px 7px 7px;
  color: var(--muted);
  background: var(--surface-soft);
}

.hm-search-input input {
  min-height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.hm-search-input input:focus {
  box-shadow: none;
}

.hm-search-input button {
  min-height: 42px;
  color: #031016;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), #86f0e2);
}

.hm-action-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hm-action-line a {
  min-height: 74px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--ink-2);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.hm-action-line a svg {
  color: var(--teal-dark);
}

.hm-market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hm-market-strip a {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-content: center;
  gap: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hm-market-strip b {
  color: var(--ink);
  font-size: 17px;
}

.hm-market-strip span {
  color: var(--muted);
  font-size: 13px;
}

.hm-market-strip svg {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--teal-dark);
}

.hm-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.hm-insight-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hm-live-panel {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.hm-live-panel__head {
  display: grid;
  gap: 4px;
}

.hm-live-panel__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.hm-live-panel__head strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}

.hm-live-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.hm-result-card .ui-listing__media::after,
.media-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(6, 28, 36, .65));
  pointer-events: none;
}

:root[data-theme="dark"] .hm-search-copy,
:root[data-theme="dark"] .hm-trust-band {
  background:
    linear-gradient(rgba(126, 238, 221, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 238, 221, .06) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(15, 185, 160, .26), transparent 19rem),
    linear-gradient(135deg, #0b2a33, #061c24 62%, #031016);
  background-size: 72px 72px, 72px 72px, auto, auto;
}

@media (max-width: 1100px) {
  .hm-search-layout,
  .hm-two-column {
    grid-template-columns: 1fr;
  }

  .hm-live-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .hm-search-hero {
    padding-top: 30px;
  }

  .hm-search-copy {
    min-height: auto;
    padding: 22px;
  }

  .hm-search-copy h1 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.45;
  }

  .hm-source-row,
  .hm-market-strip,
  .hm-insight-grid--two {
    grid-template-columns: 1fr;
  }

  .hm-action-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hm-action-line,
  .hm-search-input {
    grid-template-columns: 1fr;
  }

  .hm-search-input svg {
    display: none;
  }

  .hm-search-input button {
    width: 100%;
  }
}
