* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page {
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.eyebrow {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.auth-shell {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
}

.form-card,
.metric-card,
.match-card,
.profile-card,
.notification-row,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
}

.form-card {
  width: min(480px, 100%);
  padding: 1.5rem;
}

.wide-form {
  width: min(900px, 100%);
}

.stack {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
}

fieldset {
  border: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 1rem;
}

legend {
  color: var(--muted);
  font-weight: 800;
  padding: 0 0.4rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.account-preferred-name-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.account-preferred-name-form .button-row {
  align-self: end;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.metric-card {
  padding: 1rem;
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-weight: 700;
}

.metric-card strong {
  color: var(--blue);
  display: block;
  font-size: 2rem;
  margin-top: 0.25rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.list-stack {
  display: grid;
  gap: 1rem;
}

.match-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 0.8rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.match-filters label {
  font-size: 0.8rem;
}

.match-removed-toggle {
  align-self: end;
  min-height: 44px;
  padding-bottom: 0.6rem;
  white-space: nowrap;
}

.match-filter-actions {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}

.match-explanation {
  margin: 0.9rem 0;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid var(--primary);
  line-height: 1.5;
}

.match-explanation strong {
  display: block;
  margin-bottom: 0.2rem;
}

.match-card,
.profile-card,
.notification-row,
.empty-state {
  padding: 1rem;
}

.match-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  min-height: 1.4rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #e7eef8;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.9rem 0;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
}

.button-row,
.button-row form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  text-decoration: none;
}

.primary-button:hover {
  text-decoration: none;
}

.alert {
  border: 1px solid #e6b7b0;
  background: #fff4f2;
  color: #8d2b22;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.alert-success {
  border-color: #b9d8ce;
  background: #f0fbf6;
  color: #145c40;
}

.match-removed {
  opacity: 0.65;
  border-color: #e0c8c8;
  background: #fdf7f7;
}

.removed-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #f5e0e0;
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 800;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.score-muted {
  background: #f0f0f0;
  color: var(--muted);
  border-color: var(--line);
}

.notification-row.unread {
  border-color: #b9d8ce;
  background: #f2fbf7;
}

/* ── Nav CTA ── */
.nav-secondary {
  color: var(--muted) !important;
  font-size: 0.88rem;
}

.nav-admin {
  color: var(--amber) !important;
  font-weight: 800;
  font-size: 0.88rem;
}

.nav-cta {
  min-height: 36px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.footer-copy {
  font-size: 0.82rem;
}

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 2rem));
  background: var(--ink);
  color: #f0f4f2;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  z-index: 100;
  font-size: 0.88rem;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner p {
  flex: 1;
  margin: 0;
}

.cookie-banner a {
  color: #8dd4be;
}

.cookie-ok {
  border-color: rgba(255,255,255,0.25);
  color: #f0f4f2;
  white-space: nowrap;
  min-height: 36px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
}

/* ── Privacy page ── */
.privacy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.privacy-table th,
.privacy-table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.privacy-table thead th {
  background: var(--bg);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.privacy-table tbody tr:last-child td {
  border-bottom: none;
}

.privacy-list {
  padding-left: 1.4rem;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

/* ── Auth ── */
.auth-card {
  width: min(440px, 100%);
}

.auth-header {
  text-align: center;
  display: grid;
  gap: 0.4rem;
  padding-bottom: 0.5rem;
}

.auth-logo {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
}

.auth-foot {
  text-align: center;
  font-size: 0.9rem;
}

.auth-terms {
  font-size: 0.82rem;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.field-label {
  font-weight: 700;
  color: var(--ink);
}

.forgot-link {
  font-size: 0.85rem;
}

.password-wrap {
  position: relative;
  display: flex;
}

.password-wrap input {
  flex: 1;
  border-radius: 6px 0 0 6px;
  border-right: none;
}

.pw-toggle {
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid #cbd5ce;
  border-radius: 0 6px 6px 0;
  background: #f4f6f3;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.pw-toggle:hover {
  background: #e8ede6;
}

/* ── Landing ── */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 5rem);
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.feature-card h2 {
  font-size: 1.15rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-icon {
  font-size: 1.8rem;
}

.how-section {
  max-width: 640px;
  margin: 0 auto 4rem;
}

.how-title {
  text-align: center;
  margin-bottom: 2rem;
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.how-steps li {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.step-num {
  min-width: 2.2rem;
  min-height: 2.2rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.how-steps p {
  margin-top: 0.25rem;
}

.cta-banner {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
  display: grid;
  gap: 0.75rem;
}

/* ── About ── */
.about-hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 2rem;
  max-width: 680px;
}

.about-lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.about-body {
  display: grid;
  gap: 2.5rem;
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.about-block h2 {
  margin-bottom: 0.6rem;
}

.about-block p {
  color: var(--muted);
}

.about-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* ── Billing ── */
.billing-status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 820px;
}

.pricing-grid-single {
  grid-template-columns: minmax(0, 560px);
  max-width: 560px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pricing-pro {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(23, 107, 91, 0.15), var(--shadow);
}

.pricing-current {
  border-color: var(--blue);
}

.pricing-header {
  display: grid;
  gap: 0.4rem;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.price-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.94rem;
  flex: 1;
}

.feature-missing {
  color: var(--muted);
}

.current-plan-badge {
  display: inline-block;
  background: #e7eef8;
  color: var(--blue);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.admin-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-grid {
  display: grid;
  gap: 2rem;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.admin-table thead th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--bg);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover td {
  background: #f2fbf7;
}

.admin-pill {
  background: #fef3cd;
  color: var(--amber);
}

.admin-access-form {
  align-items: center;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(10rem, 1fr) auto;
  min-width: 18rem;
}

.admin-access-form input {
  font-size: 0.85rem;
  padding: 0.45rem 0.55rem;
}

.mini-button {
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
}

@media (max-width: 860px) {
  .topbar,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .metric-grid,
  .metric-grid.two,
  .admin-metric-grid,
  .features,
  .pricing-grid,
  .dash-stats,
  .dash-grid,
  .split-layout,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .match-topline {
    align-items: stretch;
  }
}

/* ── Nav active + divider ── */
.nav-active {
  color: var(--primary) !important;
  font-weight: 800;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
  align-self: center;
  margin: 0 0.25rem;
}

/* ── Scroll-reveal animation ── */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
              transform 0.65s cubic-bezier(0.16,1,0.3,1);
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}
[data-animate][data-delay="1"] { transition-delay: 0.08s; }
[data-animate][data-delay="2"] { transition-delay: 0.16s; }
[data-animate][data-delay="3"] { transition-delay: 0.24s; }
[data-animate][data-delay="4"] { transition-delay: 0.32s; }

/* ── Dashboard ── */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.dash-welcome h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.plan-badge {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.plan-free {
  background: #eef4f2;
  color: var(--primary-dark);
  border: 1px solid #c7d7d1;
}

.plan-pro {
  background: #fef3cd;
  color: var(--amber);
  border: 1px solid #f0d98a;
}

.setup-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, #f0fbf6 0%, #e8f5f0 100%);
  border: 1px solid #b9d8ce;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.setup-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.setup-card > div {
  flex: 1;
}

.setup-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.notification-setup-prompt { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -0.75rem 0 1.75rem; padding: 0.9rem 1rem; border: 1px solid #f0d98a; border-left: 4px solid #e5a71d; background: #fffaf0; }
.notification-setup-prompt .eyebrow { margin: 0 0 0.2rem; color: #8a5a04; }
.notification-setup-prompt strong { color: var(--ink); font-size: 0.92rem; }
.notification-setup-prompt p:not(.eyebrow) { max-width: 44rem; margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.notification-setup-prompt .secondary-button { flex: 0 0 auto; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card-link {
  color: inherit;
  text-decoration: none;
}

.stat-card-link:hover {
  border-color: #9fc8ba;
}

.stat-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  margin-top: 0.1rem;
}

.stat-green { color: var(--primary); }
.stat-amber { color: var(--amber); }

.score-lg {
  min-width: 56px;
  min-height: 56px;
  font-size: 1rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 1.5rem;
}

.dash-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.dash-section h2 {
  font-size: 1.1rem;
}

.section-link {
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 700;
}

.dash-match-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.75rem;
}

.dash-match-top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.dash-match-info {
  flex: 1;
  min-width: 0;
}

.dash-match-city {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.dash-match-info h3 {
  font-size: 0.97rem;
  margin: 0.2rem 0 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-match-reason {
  font-size: 0.83rem;
  line-height: 1.45;
}

.dash-match-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.score {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  background: #e6f3ef;
  color: var(--primary-dark);
  border: 1px solid #b9d8ce;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.9rem;
}

.dash-match-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.dash-match-foot {
  display: flex;
  gap: 0.5rem;
}

.dash-mini-btn {
  min-height: 34px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
}

.dash-empty {
  padding: 2rem 1rem;
  text-align: center;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

.notif-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.notif-unread {
  border-color: #b9d8ce;
  background: #f2fbf7;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
  margin-top: 0.4rem;
}

.notif-dot-active {
  background: var(--primary);
}

.notif-title {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.2rem;
}

.notif-body {
  font-size: 0.82rem;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 1rem, 1160px);
    padding-top: 1rem;
  }

  .form-card,
  .match-card,
  .profile-card,
  .notification-row,
  .empty-state {
    padding: 0.9rem;
  }

  .button-row,
  .button-row form {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row > *,
  .button-row form > * {
    width: 100%;
  }

  .match-filters {
    grid-template-columns: 1fr;
  }

  .match-removed-toggle {
    padding-bottom: 0;
  }

  .match-filter-actions {
    width: 100%;
  }

  .match-filter-actions > * {
    flex: 1;
  }
}

@media (min-width: 521px) and (max-width: 900px) {
  .match-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.onboarding-checklist { display: grid; gap: 0.7rem; padding-left: 1.4rem; margin: 0 0 1.25rem; }
.onboarding-checklist .done { color: var(--primary-dark); font-weight: 800; }
.connection-code { padding: 0.8rem; overflow-wrap: anywhere; background: #eef4f2; border: 1px solid var(--line); border-radius: 6px; }

/* ========================================================================
   HurryHome visual system. Shared components below intentionally style every
   page so the public site and private search workspace feel like one product.
   ======================================================================== */

html { scroll-behavior: smooth; }
a { color: var(--primary); }
a:hover { text-decoration: none; }
h1, h2, h3 { color: var(--ink); letter-spacing: 0; }

.topbar {
  border-color: #dbe5f0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-logo-mark { display: block; width: 27px; height: 27px; object-fit: contain; }
.brand-logo-wordmark { display: block; width: 122px; height: auto; }
.site-footer .brand-logo-mark { width: 23px; height: 23px; }
.site-footer .brand-logo-wordmark { width: 109px; }
:root[data-theme="dark"] .brand-logo-mark { content: url("/static/branding/hurryhome-mark-dark.png"); }
:root[data-theme="dark"] .brand-logo-wordmark { content: url("/static/branding/hurryhome-wordmark-dark.png"); }
.nav .nav-cta { color: #fff; background: var(--primary); border-color: var(--primary); }
.nav .nav-cta:hover { color: #fff; background: var(--primary-dark); }
.nav .badge { margin-left: 0.28rem; background: #ffd85a; color: var(--ink); }
.nav-divider { height: 25px; border-left-color: var(--line); }
.page-header { border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; }
.eyebrow { color: var(--primary); letter-spacing: 0.08em; }
.muted { color: var(--muted); }
input, select, textarea { border-color: #c7d5e6; }
input:focus, select:focus, textarea:focus { outline-color: rgba(39, 100, 232, 0.18); }
legend { color: #5271a3; }
.alert { border-color: #f2c2bd; background: #fff4f2; color: #9b342c; }
.alert-success { border-color: #b7dfc4; background: #effcf3; color: #16653a; }
.badge, .pill { background: #e8efff; color: #19449e; }

/* Public landing */
.hh-landing { width: 100%; padding: 0; overflow: hidden; }
.hh-shell { width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto; }
.hh-alert-wrap { padding-top: 1.25rem; }
.hh-hero { padding: clamp(3rem, 7vw, 6.6rem) 0 clamp(3rem, 7vw, 6.2rem); background: #f6f9ff; }
.hh-hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.hh-kicker { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 1.1rem; color: #52637d; font-size: 0.76rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.hh-kicker span { width: 9px; height: 9px; background: #ff774a; display: inline-block; transform: rotate(45deg); }
.hh-hero h1 { margin: 0; max-width: 650px; font-size: clamp(3rem, 5.7vw, 5.55rem); line-height: 0.96; font-weight: 900; }
.hh-hero h1 em { color: var(--primary); font-style: normal; }
.hh-lede { max-width: 560px; margin: 1.35rem 0 0; color: #53657d; font-size: clamp(1rem, 1.7vw, 1.16rem); line-height: 1.65; }
.hh-hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }
.hh-button { display: inline-flex; align-items: center; justify-content: center; min-height: 47px; padding: 0.72rem 1.05rem; border: 1px solid transparent; border-radius: 5px; font-size: 0.94rem; font-weight: 900; transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.hh-button:hover { text-decoration: none; }
.hh-button-primary { background: var(--primary); color: #fff; }
.hh-button-primary:hover { background: var(--primary-dark); color: #fff; }
.hh-button-secondary { border-color: #bdcde1; background: #fff; color: var(--ink); }
.hh-button-secondary:hover { border-color: #7089ad; color: var(--ink); }
.hh-button-light { background: #fff; color: var(--ink); }
.hh-button-light:hover { background: #edf3ff; color: var(--ink); }
.hh-proof-list { display: flex; flex-wrap: wrap; gap: 0.55rem 1.05rem; margin: 1.45rem 0 0; padding: 0; color: #657996; list-style: none; font-size: 0.82rem; font-weight: 700; }
.hh-proof-list li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0.42rem 0.1rem 0; background: #35bb82; border-radius: 50%; }
.hh-hero-art { position: relative; min-height: 510px; }
.hh-hero-art > img { display: block; width: 100%; height: 510px; border: 9px solid #fff; object-fit: cover; object-position: center; box-shadow: 18px 18px 0 #ffdc5b, 0 17px 42px rgba(22, 47, 79, 0.18); }
.hh-match-note { position: absolute; display: grid; grid-template-columns: auto 1fr; column-gap: 0.5rem; align-items: center; padding: 0.7rem 0.8rem; border: 1px solid #d7e2ef; background: rgba(255, 255, 255, 0.97); box-shadow: 0 8px 20px rgba(22, 47, 79, 0.12); color: var(--ink); }
.hh-match-note strong { font-size: 0.86rem; }
.hh-match-note small { grid-column: 2; color: var(--muted); font-size: 0.72rem; }
.hh-note-dot { width: 8px; height: 8px; background: #32b87b; border-radius: 50%; }
.hh-match-note-top { top: 2rem; left: -2rem; }
.hh-match-note-bottom { right: -1.2rem; bottom: 7.2rem; display: grid; }
.hh-match-note-bottom strong { color: var(--primary); font-size: 1.15rem; }
.hh-match-note-bottom small { grid-column: auto; }
.hh-hero-card { position: absolute; right: 1.4rem; bottom: -1.7rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(94%, 480px); background: #14253d; color: #fff; box-shadow: 0 12px 24px rgba(20, 37, 61, 0.22); }
.hh-hero-card div { display: grid; gap: 0.28rem; padding: 0.85rem 0.9rem; border-right: 1px solid rgba(255,255,255,0.15); }
.hh-hero-card div:last-child { border-right: 0; }
.hh-hero-card span { color: #b8c8df; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.07em; }
.hh-hero-card b { font-size: 0.8rem; }
.hh-signal-band { background: #ffdc5b; }
.hh-signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.hh-signal-grid p { margin: 0; padding: 1.35rem 1.45rem; border-right: 1px solid rgba(20,37,61,0.16); color: #354861; font-size: 0.9rem; }
.hh-signal-grid p:first-child { padding-left: 0; }
.hh-signal-grid p:last-child { padding-right: 0; border-right: 0; }
.hh-signal-grid b { display: block; color: var(--ink); font-size: 0.98rem; }
.hh-section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.hh-section-heading { max-width: 660px; }
.hh-section-heading h2, .hh-showcase-copy h2, .hh-membership h2, .hh-final-cta h2 { margin: 0; color: var(--ink); font-size: clamp(2.15rem, 4.2vw, 4.1rem); line-height: 1.02; font-weight: 900; }
.hh-section-heading > p:last-child, .hh-showcase-copy > p:last-of-type, .hh-membership-grid > div > p:last-child { margin: 1.15rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.hh-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; padding: 0; list-style: none; border-top: 1px solid #c9d7e6; }
.hh-steps li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; min-height: 200px; padding: 1.45rem 1.55rem 1rem 0; border-right: 1px solid #c9d7e6; }
.hh-steps li:not(:first-child) { padding-left: 1.55rem; }
.hh-steps li:last-child { border-right: 0; }
.hh-steps li > span, .hh-number { color: #ff6d42; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; }
.hh-steps h3, .hh-preference-grid h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.hh-steps p, .hh-preference-grid p { margin: 0; color: var(--muted); font-size: 0.91rem; line-height: 1.6; }
.hh-search-showcase { background: #eaf0ff; }
.hh-showcase-grid { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(460px, 1.25fr); gap: clamp(2rem, 7vw, 8rem); align-items: center; }
.hh-showcase-copy > p:last-of-type { max-width: 465px; }
.text-link { display: inline-flex; gap: 0.38rem; margin-top: 1.55rem; color: var(--primary); font-weight: 900; }
.text-link span { transition: transform 160ms ease; }
.text-link:hover span { transform: translateX(3px); }
.hh-board { background: #fff; border: 1px solid #c7d5e7; box-shadow: 12px 12px 0 #95b5ff, 0 15px 34px rgba(22, 47, 79, 0.1); }
.hh-board-top, .hh-board-footer { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid #dce5f1; color: #53657d; font-size: 0.77rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.hh-board-top b { padding: 0.22rem 0.45rem; background: #ffdc5b; color: var(--ink); font-size: 0.69rem; }
.hh-listing-preview { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.2rem 1rem; }
.hh-listing-score { display: grid; place-items: center; width: 44px; height: 44px; background: #d6f4e4; color: #13714a; font-weight: 900; }
.hh-listing-copy p { margin: 0 0 0.28rem; color: #5375b0; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.07em; }
.hh-listing-copy h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.hh-listing-copy small, .hh-listing-price small { color: var(--muted); font-size: 0.75rem; }
.hh-listing-price { display: grid; text-align: right; white-space: nowrap; }
.hh-listing-price b { font-size: 0.95rem; }
.hh-reason { margin: 0 1rem; padding: 0.85rem 0.9rem; border-left: 3px solid #ff774a; background: #fff8e8; }
.hh-reason span { display: block; color: #aa551a; font-size: 0.67rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.hh-reason p { margin: 0.2rem 0 0; color: #4e5e73; font-size: 0.82rem; line-height: 1.5; }
.hh-board-footer { margin-top: 1rem; border-top: 1px solid #dce5f1; border-bottom: 0; }
.hh-board-footer a { color: var(--primary); font-size: 0.72rem; }
.hh-preferences { background: #fff; }
.hh-section-heading-compact { max-width: 700px; }
.hh-preference-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 3.1rem; border-top: 4px solid var(--ink); }
.hh-preference-grid article { min-height: 185px; padding: 1.2rem 1.25rem 0 0; border-right: 1px solid #d4deea; }
.hh-preference-grid article:not(:first-child) { padding-left: 1.25rem; }
.hh-preference-grid article:last-child { border-right: 0; }
.hh-preference-grid h3 { margin-top: 1.55rem; }
.hh-membership { background: #ff774a; }
.hh-membership-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.7fr); align-items: center; gap: clamp(2rem, 8vw, 9rem); }
.hh-membership h2, .hh-membership .hh-kicker { color: #fff; }
.hh-membership .hh-kicker span { background: #ffdc5b; }
.hh-membership-grid > div > p:last-child { color: #fff1e9; max-width: 500px; }
.hh-membership-card { padding: 1.65rem; border: 1px solid rgba(20, 37, 61, 0.18); border-radius: 6px; background: #fff; box-shadow: 0 14px 30px rgba(20, 37, 61, 0.18); }
.hh-membership-card > p { margin: 0; color: #5470a0; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.09em; }
.hh-membership-card h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.35rem; margin: 0.55rem 0 1rem; font-size: 2rem; }
.hh-membership-card h3 small { color: var(--muted); font-size: 0.86rem; font-weight: 700; white-space: nowrap; }
.hh-membership-card ul { display: grid; gap: 0.62rem; margin: 0 0 1.35rem; padding: 0; list-style: none; color: #52637d; font-size: 0.88rem; }
.hh-membership-card li::before { content: "+"; display: inline-block; width: 1.2rem; color: var(--primary); font-weight: 900; }
.hh-membership-card .hh-button { width: 100%; }
.hh-membership-note { display: block; margin-top: 0.75rem; color: var(--muted); font-size: 0.72rem; line-height: 1.45; text-align: center; }
.hh-membership-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.hh-membership-options > .hh-button, .hh-membership-options > .hh-membership-note { grid-column: 1 / -1; }
.hh-membership-card-complete { border-top: 5px solid var(--primary); }
.hh-final-cta { padding: clamp(4rem, 9vw, 8rem) 0; background: #14253d; text-align: center; }
.hh-final-cta p { margin: 0 0 0.65rem; color: #b9d2ff; font-size: 0.87rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.hh-final-cta h2 { color: #fff; }
.hh-final-cta .hh-button { margin-top: 1.65rem; }

/* Auth, profiles, matches, notifications, billing, and dashboard */
.auth-shell { min-height: calc(100vh - 165px); }
.auth-logo { color: var(--primary); }
.page-header h1, .dash-welcome h1 { font-weight: 900; }
.metric-card strong { color: var(--primary); }
.match-filters { border-color: #d8e2ef; border-radius: 7px; }
.match-explanation { border-left-color: #ff774a; }
.match-card { transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.match-card:hover { border-color: #a9c0e3; box-shadow: 0 12px 26px rgba(22,47,79,0.1); transform: translateY(-2px); }
.score { background: #e5edff; border-color: #bed0fb; color: #19449e; border-radius: 5px; }
.score-lg { background: #d8f5e5; border-color: #9edfc0; color: #176946; }
.match-removed { background: #fffafa; }
.notification-row.unread, .notif-unread { border-color: #a9c8fb; background: #f1f5ff; }
.notif-dot-active { background: #ff774a; }
.setup-card { border-color: #b8cffa; border-radius: 7px; background: #eef4ff; }
.plan-pro { background: #ffdc5b; color: #202832; border-color: #e7bd26; }
.stat-card-link:hover { border-color: #aac3ed; transform: translateY(-1px); }
.stat-green { color: var(--success); }
.dash-grid { gap: 1.2rem; }
.dash-section h2 { font-size: 1.25rem; font-weight: 900; }
.dash-match-city { color: var(--primary); }
.dash-match-info h3 { white-space: normal; }
.dash-match-foot { padding-top: 0.1rem; }
.connection-code { border-color: #bcd0f5; background: #edf3ff; }
.site-footer { margin-top: 0; padding: 2rem clamp(1rem, 4vw, 3rem); background: #fff; }
.footer-nav a { color: #53657d; }
.cookie-banner { border-radius: 6px; background: #14253d; }

@media (max-width: 980px) {
  .hh-hero-grid, .hh-showcase-grid, .hh-membership-grid { grid-template-columns: 1fr; }
  .hh-hero-copy { max-width: 680px; }
  .hh-membership-options { max-width: 620px; }
  .hh-hero-art { width: min(650px, calc(100% - 2.5rem)); margin: 1rem auto 0; }
  .hh-showcase-copy { max-width: 650px; }
  .hh-preference-grid { grid-template-columns: repeat(2, 1fr); }
  .hh-preference-grid article:nth-child(2) { border-right: 0; }
  .hh-preference-grid article:nth-child(n+3) { margin-top: 1.45rem; }
}
@media (max-width: 740px) {
  .topbar { align-items: flex-start; }
  .nav { justify-content: flex-end; max-width: 72%; }
  .nav a { padding: 0.35rem 0.42rem; font-size: 0.79rem; }
  .nav-divider { display: none; }
  .page { width: min(100% - 1.4rem, 1180px); padding-top: 1.65rem; }
  .hh-shell { width: min(100% - 1.5rem, 1180px); }
  .hh-hero { padding-top: 3rem; }
  .hh-hero h1 { font-size: clamp(2.75rem, 13vw, 4.1rem); }
  .hh-hero-art { width: min(100% - 1rem, 620px); min-height: 385px; }
  .hh-hero-art > img { height: 385px; border-width: 6px; box-shadow: 10px 10px 0 #ffdc5b, 0 13px 28px rgba(22,47,79,0.15); }
  .hh-match-note-top { left: -0.45rem; top: 1.05rem; }
  .hh-match-note-bottom { right: -0.45rem; bottom: 5.9rem; }
  .hh-hero-card { right: 0.2rem; bottom: -1.45rem; }
  .hh-hero-card div { padding: 0.66rem 0.58rem; }
  .hh-hero-card b { font-size: 0.69rem; }
  .hh-signal-grid, .hh-steps { grid-template-columns: 1fr; }
  .hh-signal-grid p, .hh-signal-grid p:first-child, .hh-signal-grid p:last-child { padding: 1rem 0; border-right: 0; border-bottom: 1px solid rgba(20,37,61,0.16); }
  .hh-signal-grid p:last-child { border-bottom: 0; }
  .hh-steps { border-top: 1px solid #c9d7e6; }
  .hh-steps li, .hh-steps li:not(:first-child) { min-height: auto; padding: 1.2rem 0; border-right: 0; border-bottom: 1px solid #c9d7e6; }
  .hh-steps li:last-child { border-bottom: 0; }
  .hh-listing-preview { grid-template-columns: auto 1fr; }
  .hh-listing-price { grid-column: 2; text-align: left; }
  .hh-preference-grid { grid-template-columns: 1fr; }
  .hh-preference-grid article, .hh-preference-grid article:not(:first-child) { min-height: auto; padding: 1rem 0; border-right: 0; border-bottom: 1px solid #d4deea; margin-top: 0; }
  .hh-preference-grid article:last-child { border-bottom: 0; }
  .hh-preference-grid h3 { margin-top: 0.65rem; }
  .hh-membership-card { box-shadow: 0 10px 22px rgba(20, 37, 61, 0.18); }
  .hh-membership-options { grid-template-columns: 1fr; }
  .hh-membership-options > .hh-button, .hh-membership-options > .hh-membership-note { grid-column: auto; }
}
@media (max-width: 460px) {
  .topbar { gap: 0.5rem; }
  .brand-logo-mark { width: 24px; height: 24px; }
  .brand-logo-wordmark { width: 108px; }
  .nav { max-width: 78%; gap: 0.08rem; }
  .nav a { font-size: 0.72rem; }
  .nav .nav-cta { min-height: 31px; padding: 0.3rem 0.45rem; }
  .hh-hero-actions .hh-button { width: 100%; }
  .hh-hero-art { min-height: 330px; }
  .hh-hero-art > img { height: 330px; }
  .hh-match-note { padding: 0.5rem 0.55rem; }
  .hh-match-note-bottom { display: none; }
  .hh-hero-card { width: 100%; }
  .hh-hero-card span { font-size: 0.54rem; }
  .hh-hero-card b { font-size: 0.61rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Public motion: explanation on the landing page, feedback everywhere else. */

html.motion-ready .hh-hero-enter {
  animation: hh-hero-enter 620ms var(--ease-out) var(--hero-delay, 0ms) both;
}
html.motion-ready .hh-hero-art-enter {
  animation-name: hh-hero-art-enter;
}

@keyframes hh-hero-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hh-hero-art-enter {
  from { opacity: 0; transform: translateY(22px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

html.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 460ms var(--ease-out) var(--reveal-delay, 0ms),
    transform 620ms var(--ease-out) var(--reveal-delay, 0ms);
}

html.motion-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.primary-button, .secondary-button, .ghost-button, .danger-button, .hh-button {
  transition:
    transform 140ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:hover, .hh-button:hover { transform: translateY(-2px); }
  .secondary-button:hover, .ghost-button:hover, .danger-button:hover { transform: translateY(-1px); }
  .match-card:hover, .stat-card-link:hover { transform: translateY(-2px); }
  .hh-board:hover { transform: translateY(-3px); box-shadow: 12px 15px 0 #95b5ff, 0 20px 38px rgba(22, 47, 79, 0.13); }
  .hh-membership-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(20, 37, 61, 0.24); }
}

.hh-board, .hh-membership-card {
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

.primary-button:active, .secondary-button:active, .ghost-button:active,
.danger-button:active, .hh-button:active { transform: translateY(1px) scale(0.98); }

@media (hover: none), (pointer: coarse) {
  .primary-button:hover, .secondary-button:hover, .ghost-button:hover, .danger-button:hover,
  .hh-button:hover, .match-card:hover, .stat-card-link:hover, .hh-board:hover,
  .hh-membership-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.motion-ready .hh-hero-enter,
  html.motion-ready .hh-hero-art-enter {
    animation: none;
    opacity: 1;
    transform: none;
  }
  html.motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: opacity 160ms ease;
  }
}

/* Admin workspace: dense enough for operations, without making every metric equal. */
.admin-workspace { display: grid; gap: 2.75rem; }
.admin-hero { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.admin-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 900; }
.admin-hero-copy { max-width: 590px; margin: 0.65rem 0 0; color: var(--muted); font-size: 0.98rem; line-height: 1.6; }
.admin-run-state { display: flex; align-items: flex-start; gap: 0.7rem; min-width: 285px; padding: 0.82rem 0.92rem; border: 1px solid #b9dfc9; border-left: 4px solid #1c9a62; background: #f0fcf5; color: #14593a; }
.admin-run-state-attention { border-color: #f2d18d; border-left-color: #d27b1f; background: #fff8e8; color: #7b490d; }
.admin-run-dot { width: 9px; height: 9px; margin-top: 0.32rem; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.admin-run-state strong, .admin-run-state small { display: block; }
.admin-run-state strong { font-size: 0.88rem; }
.admin-run-state small { margin-top: 0.16rem; font-size: 0.75rem; line-height: 1.4; }
.admin-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); border-top: 4px solid var(--ink); border-bottom: 1px solid var(--line); }
.admin-actions a { display: grid; gap: 0.28rem; min-height: 92px; padding: 1rem 1.15rem; border-right: 1px solid var(--line); color: var(--ink); transition: background-color 160ms ease, color 160ms ease; }
.admin-actions a:last-child { border-right: 0; }
.admin-actions a:hover { background: #eaf0ff; color: var(--primary); }
.admin-actions span { font-size: 1rem; font-weight: 900; }
.admin-actions small { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.admin-section { display: grid; gap: 1.15rem; }
.admin-section + .admin-section { padding-top: 2.75rem; border-top: 1px solid var(--line); }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.admin-section-heading h2 { margin: 0; font-size: 1.35rem; font-weight: 900; }
.admin-section-heading > .muted { margin: 0; font-size: 0.84rem; }
.admin-signal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.admin-signal-card { display: grid; gap: 0.35rem; min-height: 142px; padding: 1rem 1.05rem; border: 1px solid var(--line); border-top: 4px solid #b7c5d9; background: #fff; box-shadow: 0 5px 14px rgba(22, 47, 79, 0.04); }
.admin-signal-card-primary { border-top-color: var(--primary); background: #f5f8ff; }
.admin-signal-card > span { color: #52647d; font-size: 0.75rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.admin-signal-card strong { color: var(--ink); font-size: clamp(1.65rem, 3vw, 2.3rem); line-height: 1; }
.admin-signal-card small { align-self: end; color: var(--muted); font-size: 0.76rem; line-height: 1.45; }
.admin-section-split { grid-template-columns: minmax(0, 0.86fr) minmax(300px, 1.14fr); gap: clamp(2rem, 6vw, 6rem); }
.admin-data-list { display: grid; margin-top: 1rem; border-top: 1px solid var(--line); }
.admin-data-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.72rem 0; border-bottom: 1px solid var(--line); }
.admin-data-list span { color: var(--muted); font-size: 0.87rem; }
.admin-data-list strong { color: var(--ink); font-size: 1.15rem; }
.admin-data-list strong small { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.admin-system-checks { padding-left: clamp(1.25rem, 4vw, 3rem); border-left: 1px solid var(--line); }
.admin-system-checks .text-link { margin: 0; font-size: 0.82rem; }
.admin-check-list { display: grid; margin-top: 1rem; border-top: 1px solid var(--line); }
.admin-check-list > div { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.admin-check-dot { width: 8px; height: 8px; margin-top: 0.35rem; flex: 0 0 auto; border-radius: 50%; background: #2da66b; }
.admin-check-dot-alert { background: #e38427; }
.admin-check-list p { margin: 0; }
.admin-check-list strong, .admin-check-list small { display: block; }
.admin-check-list strong { color: var(--ink); font-size: 0.86rem; }
.admin-check-list small { margin-top: 0.1rem; color: var(--muted); font-size: 0.75rem; }
.admin-run-meta { margin: 1rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.admin-table-wrap { border-color: #d8e2ef; border-radius: 6px; box-shadow: none; }
.admin-table { font-size: 0.87rem; }
.admin-table th, .admin-table td { padding: 0.8rem 0.9rem; border-color: #e0e8f2; vertical-align: middle; }
.admin-table thead th { background: #f4f7fb; color: #5d6e85; }
.admin-table tbody tr:hover td { background: #f3f7ff; }
.admin-table td > small { display: block; margin-top: 0.22rem; font-size: 0.72rem; }
.admin-table .pill { margin-right: 0.3rem; }
.admin-pill { background: #ffdc5b; color: #6a4700; }
.admin-access-form { grid-template-columns: minmax(9rem, 1fr) auto; min-width: 15rem; }
.admin-access-form input { min-height: 34px; padding: 0.35rem 0.5rem; }
.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; }
.admin-user-search { display: flex; gap: 0.45rem; align-items: center; }
.admin-user-search input { min-width: 14rem; min-height: 38px; }
.admin-users-table { min-width: 980px; }
.admin-access-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.9rem; min-width: 22rem; }
.admin-access-control { display: grid; align-content: start; gap: 0.45rem; min-width: 0; }
.admin-access-control + .admin-access-control { padding-left: 0.9rem; border-left: 1px solid #dce5ef; }
.admin-access-control-heading { display: grid; gap: 0.1rem; }
.admin-access-control-heading > span { color: var(--ink); font-size: 0.78rem; font-weight: 900; }
.admin-access-control-heading > small { color: var(--muted); font-size: 0.7rem; line-height: 1.35; }
.admin-access-control form { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.admin-access-control .primary-button { box-shadow: 0 2px 0 #174aaa; }
.admin-beta-action input[type="number"] { width: 4.1rem; min-height: 32px; padding: 0.3rem 0.4rem; font-size: 0.78rem; }
.text-button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 0.76rem; font-weight: 800; text-decoration: underline; text-underline-offset: 0.18em; }
.danger-text-button { color: var(--danger); }
.admin-account-controls { grid-column: 1 / -1; padding-top: 0.55rem; border-top: 1px solid #e0e8f2; }
.admin-account-controls > summary, .admin-close-account summary { cursor: pointer; color: #5d6e85; font-size: 0.74rem; font-weight: 900; }
.admin-account-controls > summary::marker, .admin-close-account summary::marker { color: var(--primary); }
.admin-account-controls-body { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; padding-top: 0.65rem; }
.admin-close-account summary { color: var(--danger); }
.admin-close-account form { display: grid; gap: 0.45rem; margin-top: 0.6rem; }
.admin-close-account label { display: grid; gap: 0.3rem; color: var(--muted); font-size: 0.76rem; }
.admin-close-account input { min-height: 34px; padding: 0.35rem 0.5rem; }

.connection-steps { display: grid; gap: 0.55rem; margin: 0; padding-left: 1.25rem; color: var(--muted); line-height: 1.5; }
.connection-steps strong { color: var(--ink); }
.beta-terms-consent { padding-top: 0.8rem; border-top: 1px solid var(--line); }
.beta-confidentiality-notice { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin: 0 0 1.25rem; padding: 0.95rem 1rem; border: 1px solid #d5e3ff; border-left: 4px solid var(--primary); background: #f6f9ff; }
.beta-confidentiality-notice .eyebrow { margin: 0 0 0.22rem; }
.beta-confidentiality-notice strong { color: var(--ink); font-size: 0.92rem; }
.beta-confidentiality-notice p:not(.eyebrow) { max-width: 48rem; margin: 0.25rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.beta-confidentiality-notice .text-link { flex: 0 0 auto; font-size: 0.82rem; }

/* Enrolment review: sensitive uploads stay simple, private, and easy to resolve. */
.enrolment-upload-field { display: grid; gap: 0.45rem; padding: 0.9rem; border: 1px solid #c9d7e6; background: #f7faff; }
.field-help { margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.consent-row { display: flex; align-items: flex-start; gap: 0.65rem; color: #43526a; font-size: 0.82rem; line-height: 1.45; }
.consent-row input { width: auto; min-height: 0; margin-top: 0.18rem; accent-color: var(--primary); }
.enrolment-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr); gap: clamp(2rem, 7vw, 7rem); max-width: 940px; margin: 2rem auto 4rem; align-items: start; }
.enrolment-status-card { padding: 1.4rem 0; border-top: 5px solid #ffdc5b; }
.enrolment-status-card h1, .enrolment-status-card h2 { max-width: 570px; margin: 0; color: var(--ink); font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 900; line-height: 1.03; }
.enrolment-status-card > p:not(.eyebrow):not(.success-message):not(.enrolment-note) { max-width: 540px; margin: 1rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.enrolment-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 500px; margin: 1.6rem 0 0; border-top: 1px solid var(--line); }
.enrolment-meta div { padding: 0.75rem 0.9rem 0.75rem 0; border-bottom: 1px solid var(--line); }
.enrolment-meta div + div { padding-left: 0.9rem; border-left: 1px solid var(--line); }
.enrolment-meta dt { color: var(--muted); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.enrolment-meta dd { margin: 0.25rem 0 0; color: var(--ink); font-size: 0.92rem; font-weight: 900; }
.enrolment-note, .success-message { margin: 1rem 0 0; padding: 0.75rem 0.85rem; border-left: 3px solid #e38427; background: #fff8e8; color: #70440f; font-size: 0.86rem; line-height: 1.5; }
.success-message { border-left-color: #1c9a62; background: #f0fcf5; color: #14593a; }
.enrolment-resubmit { margin: 0; border-top: 5px solid var(--primary); }
.enrolment-resubmit h2 { margin: 0; font-size: 1.45rem; font-weight: 900; }
.enrolment-privacy { grid-column: 1 / -1; max-width: 680px; margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.55; }
.proof-status { text-transform: capitalize; }
.proof-status-pending { background: #fff0c8; color: #805000; }
.proof-status-approved { background: #def5e7; color: #14623d; }
.proof-status-rejected { background: #ffe3df; color: #a33724; }
.admin-inline-link { margin: 0; font-size: 0.8rem; }
.admin-review-workspace { max-width: 920px; margin: 0 auto; }
.admin-review-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.admin-review-document { padding: 1.25rem 0; border-top: 4px solid #ffdc5b; }
.admin-review-document h2, .admin-review-form h2 { margin: 0; color: var(--ink); font-size: 1.35rem; font-weight: 900; }
.admin-review-document .muted { max-width: 360px; margin: 0.7rem 0 1.1rem; line-height: 1.55; }
.password-requirements { display: grid; gap: 0.28rem; margin: 0.65rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.82rem; }
.password-requirements li::before { content: "\2022"; display: inline-block; width: 1rem; color: currentColor; }
.password-requirements li.is-met { color: var(--primary-dark); }
.password-requirements li.is-met::before { content: "\2713"; font-weight: 800; }
.enrolment-proof-preview { display: block; width: 100%; min-height: 34rem; border: 1px solid var(--line); border-radius: 8px; background: #f5f7f4; object-fit: contain; }
img.enrolment-proof-preview { height: auto; max-height: 52rem; min-height: 0; }
.admin-review-form { margin: 0; }
.admin-review-form textarea { resize: vertical; }
.admin-review-actions { display: flex; justify-content: flex-end; gap: 0.65rem; flex-wrap: wrap; }
.registration-form { gap: 1.45rem; }
.registration-step { display: grid; gap: 0.95rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.registration-step-heading { display: flex; align-items: flex-start; gap: 0.75rem; }
.registration-step-heading .eyebrow { margin: 0 0 0.16rem; }
.registration-step-heading h2 { margin: 0; color: var(--ink); font-size: 1.08rem; font-weight: 900; }
.registration-step-number { display: grid; flex: 0 0 1.75rem; width: 1.75rem; height: 1.75rem; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 900; }
.registration-name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.registration-privacy-note { margin: -0.25rem 0 0; padding-left: 0.75rem; border-left: 3px solid #ffdc5b; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.terms-consent { padding-top: 0.25rem; border-top: 1px solid var(--line); }
.admin-review-facts { display: grid; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-review-facts p { display: grid; grid-template-columns: minmax(7rem, 0.7fr) minmax(0, 1.3fr); gap: 0.75rem; margin: 0; padding: 0.65rem 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.admin-review-facts p + p { border-top: 1px solid var(--line); }
.admin-review-facts strong { color: var(--ink); }

/* Mobile workspace: navigation and high-frequency admin work stay thumb-friendly. */
.desktop-nav { display: flex; align-items: center; gap: 0.28rem; flex-wrap: wrap; justify-content: flex-end; }
.mobile-nav { display: none; }
.admin-proof-list { display: none; }

@media (max-width: 740px) {
  .topbar { align-items: center; min-height: 64px; padding: 0.7rem 0.8rem; }
  .nav { max-width: none; margin-left: auto; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; position: relative; }
  .mobile-nav > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 42px;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 900;
    list-style: none;
  }
  .mobile-nav > summary::-webkit-details-marker { display: none; }
  .mobile-nav > summary:focus-visible { outline: 3px solid rgba(39, 100, 232, 0.24); outline-offset: 2px; }
  .mobile-nav-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    display: grid;
    width: min(290px, calc(100vw - 1.6rem));
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding: 0.45rem;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface-elevated);
    box-shadow: var(--shadow-floating);
  }
  .mobile-nav-panel a,
  .mobile-nav-panel form,
  .mobile-nav-panel .ghost-button {
    width: 100%;
  }
  .mobile-nav-panel a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.7rem;
    border-radius: 5px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 800;
  }
  .mobile-nav-panel a:hover,
  .mobile-nav-panel a.nav-active { background: var(--accent-soft); color: var(--primary); }
  .mobile-nav-panel form { margin-top: 0.3rem; padding-top: 0.45rem; border-top: 1px solid var(--line); }
  .mobile-nav-panel .ghost-button { min-height: 44px; }

  .page { width: min(100% - 1.25rem, 1180px); padding: 1.35rem 0 3rem; }
  .page-header { align-items: flex-start; gap: 0.85rem; }
  .page-header > .ghost-button,
  .page-header > .secondary-button,
  .page-header > form,
  .page-header > form button { width: 100%; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .footer-nav { gap: 0.75rem 1rem; }
  .cookie-banner { bottom: max(0.7rem, env(safe-area-inset-bottom)); width: calc(100% - 1.25rem); align-items: flex-start; padding: 0.8rem; }
  .cookie-ok { flex: 0 0 auto; }

  .match-topline, .dash-match-top { gap: 0.7rem; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 0.55rem; }
  .match-card { padding: 0.9rem; }
  .match-card h2 { font-size: 1.08rem; overflow-wrap: anywhere; }
  .match-explanation { padding: 0.7rem; }
  .dash-match-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-match-foot > * { width: 100%; }
  .setup-card { align-items: flex-start; padding: 1rem; }
  .setup-card > .primary-button { width: 100%; }
  .notification-setup-prompt { align-items: flex-start; flex-direction: column; margin-top: -0.75rem; }

  .form-card { padding: 1rem; }
  .form-grid { gap: 0.85rem; }
  .registration-name-grid { grid-template-columns: 1fr; }
  .check-row { align-items: flex-start; line-height: 1.4; }
  .check-row input { flex: 0 0 auto; margin-top: 0.15rem; }
  .button-row { align-items: stretch; }
  .button-row > a,
  .button-row > button,
  .button-row > form,
  .button-row form > button { width: 100%; }
  .button-row form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .button-row form > button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .match-filters { padding: 0.85rem; }
  .match-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match-filter-actions > * { width: 100%; }

  .admin-table-wrap { -webkit-overflow-scrolling: touch; touch-action: pan-x; }
  .admin-table { min-width: 640px; }
  .admin-access-form { min-width: 15rem; }
}

@media (max-width: 920px) {
  .admin-signal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-section-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .admin-system-checks { padding-left: 0; padding-top: 2.5rem; border-top: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 680px) {
  .admin-workspace { gap: 2rem; }
  .admin-hero { align-items: flex-start; flex-direction: column; gap: 1.2rem; }
  .admin-run-state { min-width: 0; width: 100%; }
  .admin-actions { grid-template-columns: 1fr; }
  .admin-actions a { min-height: 0; padding: 0.85rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-actions a:last-child { border-bottom: 0; }
  .admin-user-search { width: 100%; }
  .admin-user-search input { min-width: 0; flex: 1; }
  .admin-access-controls { min-width: 21rem; }
  .admin-section + .admin-section { padding-top: 2rem; }
  .admin-section-heading { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .admin-signal-grid { grid-template-columns: 1fr; }
  .beta-confidentiality-notice { align-items: flex-start; flex-direction: column; }
  .admin-signal-card { min-height: 118px; }
  .enrolment-shell, .admin-review-grid { grid-template-columns: 1fr; }
  .enrolment-proof-preview { min-height: 26rem; }
  .enrolment-shell { margin-top: 0.5rem; }
  .admin-review-actions { justify-content: stretch; }
  .admin-review-actions button { flex: 1 1 12rem; }
  .admin-proof-table { display: none; }
  .admin-proof-list { display: grid; gap: 0.65rem; }
  .admin-proof-card { display: grid; gap: 0.75rem; padding: 0.9rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .admin-proof-card strong, .admin-proof-card .muted { display: block; overflow-wrap: anywhere; }
  .admin-proof-card .muted { margin-top: 0.22rem; font-size: 0.8rem; }
  .admin-proof-card-action { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
  .admin-proof-card-action .secondary-button { min-width: 88px; }
}

/* Search-profile location controls */
.location-field { position: relative; display: grid; gap: 0.35rem; min-width: 0; color: var(--ink); font-weight: 700; }
.field-label { font-size: 1rem; }
.location-control { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0.35rem 0.5rem; border: 1px solid #c7d5e6; border-radius: 5px; background: #fff; }
.location-control:focus-within { outline: 3px solid rgba(39, 100, 232, 0.18); border-color: var(--primary); }
.location-control input { flex: 1 1 9rem; width: auto; min-width: 8rem; min-height: 32px; padding: 0.2rem; border: 0; outline: 0; box-shadow: none; }
.location-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.location-chip { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; padding: 0.24rem 0.3rem 0.24rem 0.5rem; border: 1px solid #b8cbf8; border-radius: 4px; background: #eaf0ff; color: #19449e; font-size: 0.78rem; font-weight: 800; }
.location-chip-remove { min-height: 24px; padding: 0 0.35rem; border: 0; border-radius: 3px; background: transparent; color: #19449e; font-size: 0.68rem; font-weight: 900; cursor: pointer; }
.location-chip-remove:hover, .location-chip-remove:focus-visible { background: #cddcff; }
.location-menu { position: absolute; z-index: 6; top: calc(100% - 1.8rem); right: 0; left: 0; display: grid; max-height: 16rem; overflow: auto; border: 1px solid #b9c9df; border-radius: 5px; background: #fff; box-shadow: 0 12px 28px rgba(22, 47, 79, 0.16); }
.location-menu[hidden] { display: none; }
.location-option { display: grid; gap: 0.1rem; width: 100%; min-height: 42px; padding: 0.55rem 0.7rem; border: 0; border-bottom: 1px solid #e4ebf4; background: #fff; color: var(--ink); text-align: left; font-weight: 800; cursor: pointer; }
.location-option:last-child { border-bottom: 0; }
.location-option:hover, .location-option:focus-visible { background: #edf3ff; outline: 0; }
.location-option small { color: var(--muted); font-size: 0.73rem; font-weight: 600; }
.commute-mode-selector { gap: 0.8rem; }
.commute-mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.mode-option { display: flex; align-items: center; gap: 0.65rem; min-height: 64px; padding: 0.7rem; border: 1px solid #c7d5e6; border-radius: 5px; background: #fff; cursor: pointer; }
.mode-option:has(input:checked) { border-color: #7194e8; background: #edf3ff; }
.mode-option input { flex: 0 0 auto; width: 18px; min-height: 18px; margin: 0; accent-color: var(--primary); }
.mode-option span { display: grid; gap: 0.06rem; }
.mode-option small { color: var(--muted); font-size: 0.73rem; font-weight: 600; }

@media (max-width: 700px) {
  .commute-mode-options { grid-template-columns: 1fr; }
  .location-menu { top: calc(100% - 1.45rem); }
}
