/* Mangalamm: shared styles. Indigo night, mist surfaces, rose as the love accent, rounded type. */

:root {
  --accent: #CF3459;           /* rose: the love accent, used sparingly */
  --accent-deep: #AE2948;
  --night: #262150;            /* indigo: hero and dark fields */
  --ink: #1D1B33;
  --ink-soft: #5A5770;
  --mist: #F6F5F9;             /* page */
  --haze: #ECEAF3;             /* raised surfaces */
  --lilac: #D9D5EA;
  --warm: #FCE6E9;             /* mutual highlights */
  --on-dark: #F6F5F9;
  --line: #E1DEEA;
  --gold: #C8A04A;
  --white: #FFFFFF;
  --ok: #2C7A6E;

  --display: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "M PLUS Rounded 1c", "Arial Rounded MT", system-ui, sans-serif;

  --arch: 999px 999px 18px 18px;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h4 { font-size: 16px; font-weight: 500; margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 16px/1 var(--body);
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--mist); }
.btn-quiet { background: var(--haze); color: var(--night); }
.btn-quiet:hover { background: var(--lilac); }
.btn-light { background: var(--mist); color: var(--night); }
.btn-light:hover { background: var(--white); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[aria-pressed="true"] { background: var(--night); color: var(--on-dark); }

.text-link {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Logo and header ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.logo svg { width: 28px; height: 28px; color: var(--accent); flex: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 245, 249, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 40px; height: 76px; }

.nav { display: flex; gap: 30px; margin-right: auto; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
.nav .mobile-only { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  vertical-align: 2px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-dark);
  font-family: var(--display);
  font-size: 17px;
  text-decoration: none;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* Landing header sits on the night field */
.site-header.on-dark {
  position: absolute;
  inset: 0 0 auto 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(246, 245, 249, .22);
  color: var(--on-dark);
}
.on-dark .logo, .on-dark .logo svg { color: var(--on-dark); }
.on-dark .nav a { color: rgba(246, 245, 249, .8); }
.on-dark .nav a:hover { color: var(--on-dark); }
.on-dark .btn-outline { border-color: rgba(246, 245, 249, .6); color: var(--on-dark); }
.on-dark .btn-outline:hover { background: var(--on-dark); color: var(--night); }

@media (max-width: 860px) {
  .menu-toggle { display: grid; place-items: center; margin-left: auto; }
  .nav {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--mist);
    border-bottom: 1px solid var(--line);
  }
  .nav a { padding: 12px 0; border: 0; color: var(--ink); }
  .nav.open { display: flex; }
  .nav .mobile-only { display: block; }
  .on-dark .nav { background: var(--night); border-color: transparent; }
  .on-dark .nav a { color: var(--on-dark); }
  .header-actions .btn-outline { display: none; }
}
@media (max-width: 520px) {
  .site-header .wrap { gap: 12px; }
  .header-actions .btn { display: none; }
}

/* ---------- Member photos ----------
   Photos sit in a poruwa arch. Members who keep photos private show a heavy blur with a lock. */

.arch {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--arch);
  overflow: hidden;
  background: var(--lilac);
}
.photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 22%;
}
/* Full-length stock shot: zoom to head and shoulders */
.photo img[src$="ravindu.jpg"] { transform: scale(1.8); transform-origin: 50% 34%; }
.photo.locked img { filter: blur(16px) saturate(.85); transform: scale(1.25); }
.photo.locked::before {
  /* Lock mark, centred */
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 46%;
  width: clamp(26px, 30%, 48px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(246, 245, 249, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262150' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") no-repeat center / 50%;
}
.photo.locked::after { content: ""; position: absolute; inset: 0; background: rgba(38, 33, 80, .18); }
.photo .lock-note, .photo .main-tag { z-index: 2; color: var(--white); text-shadow: 0 1px 6px rgba(15, 10, 45, .5); }

.lock-note {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: currentColor;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.lock-note svg { width: 12px; height: 12px; }

.verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
}
.verified svg { width: 15px; height: 15px; }

/* ---------- Landing: hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(90vh, 820px);
  display: grid;
  align-items: center;
  background: var(--night);
  color: var(--on-dark);
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 30% 60%;
}
.hero::after {
  /* Scrim: keeps the couple clear on the left, gives the text a calm field on the right */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(38, 33, 80, 0) 34%, rgba(38, 33, 80, .6) 56%, rgba(38, 33, 80, .9) 76%),
    linear-gradient(180deg, rgba(20, 17, 45, .5), rgba(20, 17, 45, 0) 24%);
}
.hero .wrap { display: grid; grid-template-columns: 1fr minmax(0, 500px); padding: 150px 0 170px; }
.hero-copy { grid-column: 2; }
.hero h1 { font-weight: 500; font-size: clamp(44px, 4.8vw, 68px); line-height: 1.04; letter-spacing: -0.02em; }
.hero .lede { margin-top: 22px; font-size: 18px; line-height: 1.7; color: rgba(246, 245, 249, .86); max-width: 40ch; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 36px; }

/* Quick search, overlapping the bottom of the hero */
.finder { position: relative; z-index: 2; margin-top: -60px; }
.finder form {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr 1fr auto;
  align-items: center;
  padding: 10px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 28px 60px -28px rgba(15, 10, 45, .45), 0 1px 2px rgba(15, 10, 45, .08);
}
.finder .f { display: grid; gap: 2px; padding: 8px 20px; border-right: 1px solid var(--line); }
.finder .f:nth-child(4) { border-right: 0; }
.finder label, .finder .label { font-size: 13px; color: var(--ink-soft); }
.finder select {
  appearance: none;
  border: 0;
  padding: 2px 18px 2px 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235A5770' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right center;
  font: 500 16px/1.4 var(--body);
  color: var(--ink);
  cursor: pointer;
}
.finder select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.finder .pair { display: flex; align-items: center; gap: 10px; }
.finder .btn { min-height: 56px; padding: 0 30px; }

@media (max-width: 900px) {
  /* Stack on small screens: photo on top, text below, so neither covers the other */
  .hero { display: block; min-height: 0; }
  .hero-photo { position: relative; z-index: 0; height: 440px; object-position: 36% 60%; }
  .hero::after { inset: 0 0 auto 0; height: 440px; z-index: 0; background: linear-gradient(180deg, rgba(20, 17, 45, .5) 0%, rgba(20, 17, 45, 0) 26%, rgba(38, 33, 80, 0) 70%, var(--night) 100%); }
  .hero .wrap { position: relative; z-index: 1; grid-template-columns: 1fr; padding: 8px 0 110px; }
  .hero-copy { grid-column: 1; }
  .finder form { grid-template-columns: 1fr 1fr; gap: 4px; }
  .finder .f { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .finder .btn { grid-column: 1 / -1; margin-top: 6px; }
}

/* ---------- Landing: sections ---------- */

.section { padding: 128px 0; }
.finder + .section { padding-top: 112px; }
.band-haze { background: var(--haze); }
.band-night { background: var(--night); color: var(--on-dark); }
.band-warm { background: var(--warm); color: var(--ink); }

.h-xl { font-size: clamp(38px, 4.4vw, 60px); }
.sub { margin-top: 18px; font-size: 18px; color: var(--ink-soft); max-width: 44ch; }

/* Photos cropped to the poruwa arch, the same shape as the profile monograms */
.arch-photo { margin: 0; }
.arch-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 999px 999px 24px 24px;
}

/* Privacy: photo beside three stages */
.privacy {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 80px;
  align-items: center;
}
.stage-list { display: grid; gap: 12px; margin-top: 40px; }
.stage { padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.stage.mutual { background: var(--warm); border-color: transparent; }
.stage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.stage h3 { font-size: 24px; }
.stage-head span { font-size: 14px; color: var(--ink-soft); }
.stage ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stage li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--haze);
  font-size: 14px;
}
.stage.mutual li { background: var(--white); }
.stage li.off { background: transparent; border: 1px dashed #C9C5DA; color: var(--ink-soft); }
.stage li svg { width: 13px; height: 13px; }

/* Traditions: copy beside two staggered arch photos */
.traditions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: center;
}
.traditions .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; max-width: 460px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.duo .arch-photo img { aspect-ratio: 3 / 4; }
.duo .arch-photo:last-child { margin-top: 80px; }

@media (max-width: 900px) {
  .privacy, .traditions { grid-template-columns: 1fr; gap: 48px; }
  .privacy .arch-photo { max-width: 360px; }
  .duo .arch-photo:last-child { margin-top: 40px; }
}

/* How it works */
.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 80px;
  align-items: start;
}
.how-head { position: sticky; top: 120px; }
.how-head p { margin-top: 22px; font-size: 19px; color: var(--ink-soft); max-width: 34ch; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  padding: 34px 0;
  border-top: 1px solid rgba(29, 27, 51, .18);
}
.steps li:last-child { border-bottom: 1px solid rgba(29, 27, 51, .18); }
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-size: 52px;
  line-height: .9;
  color: var(--accent);
}
.steps h3 { font-size: 32px; margin-bottom: 10px; }
.steps p { color: var(--ink-soft); max-width: 44ch; }

@media (max-width: 900px) {
  .how { grid-template-columns: 1fr; gap: 28px; }
  .how-head { position: static; }
  .steps li { grid-template-columns: 64px 1fr; gap: 12px; }
  .steps li::before { font-size: 40px; }
}

/* Joined this week */
.row-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 48px;
}
.row-head p { margin-top: 16px; color: var(--ink-soft); max-width: 46ch; }

.recent { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.recent a { text-decoration: none; }
.recent .arch { margin-bottom: 18px; }
.recent .name { font-family: var(--display); font-size: 24px; line-height: 1.15; }
.recent .meta { font-size: 15px; color: var(--ink-soft); }
.recent a:hover .name { color: var(--accent); }

@media (max-width: 1000px) {
  .recent { grid-template-columns: repeat(3, 1fr); }
  .recent > :nth-child(n+4) { display: none; }
}
@media (max-width: 600px) {
  .recent { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .recent > :nth-child(n+3) { display: none; }
  .row-head { flex-direction: column; align-items: start; }
}

/* For families, on mulberry */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 96px;
  align-items: start;
}
.split .copy p { margin-top: 24px; font-size: 19px; max-width: 38ch; color: rgba(246, 245, 249, .82); }
.features { margin: 0; }
.features div { padding: 28px 0; border-top: 1px solid rgba(246, 245, 249, .22); }
.features div:last-child { border-bottom: 1px solid rgba(246, 245, 249, .22); }
.features dt { font-family: var(--display); font-size: 28px; line-height: 1.15; color: var(--on-dark); }
.features dd { margin: 8px 0 0; color: rgba(246, 245, 249, .78); max-width: 46ch; }

@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 48px; } }

/* Closing CTA */
.cta { padding: 112px 0; }
.cta .wrap { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(40px, 5vw, 64px); max-width: 14ch; }
.cta p { margin-top: 28px; font-size: 19px; max-width: 40ch; color: var(--ink-soft); }
.cta .actions { margin-top: 40px; }

/* Footer */
.site-footer { padding: 72px 0 40px; background: var(--ink); color: rgba(246, 245, 249, .7); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .logo { color: var(--on-dark); }
.site-footer .logo svg { color: var(--lilac); }
.site-footer p { margin-top: 16px; max-width: 32ch; font-size: 15px; }
.site-footer h4 { color: var(--on-dark); margin-bottom: 14px; font-size: 15px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); }
.site-footer .legal {
  grid-column: 1 / -1;
  padding-top: 28px;
  margin-top: 8px;
  border-top: 1px solid rgba(246, 245, 249, .14);
  font-size: 14px;
}
@media (max-width: 760px) {
  .section { padding: 88px 0; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }
}

/* ---------- Forms ---------- */

.field { display: grid; gap: 7px; }
.field + .field { margin-top: 20px; }
.field label, .field .label { font-weight: 500; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--ink-soft); }
.field > .segmented { justify-self: start; }

.input, .select, textarea.input {
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  border: 1px solid #D3D0E0;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.4 var(--body);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 124px; resize: vertical; }
.input:hover, .select:hover { border-color: #B3AFC9; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(207, 52, 89, .15); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A5770' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 .field + .field, .grid-3 .field + .field { margin-top: 0; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #D3D0E0;
  background: var(--white);
  font-size: 15px;
  color: var(--ink-soft);
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip input:hover + span { border-color: var(--accent); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.dealbreaker input:checked + span { background: var(--ink); border-color: var(--ink); }

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid #D3D0E0;
  background: var(--white);
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink-soft);
}
.segmented input:checked + span { background: var(--haze); color: var(--accent-deep); font-weight: 500; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.switch-row:last-child { border-bottom: 1px solid var(--line); }
.switch-row .t { font-weight: 500; }
.switch-row .d { font-size: 15px; color: var(--ink-soft); }
.switch { position: relative; flex: none; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #CFCBDD; transition: background-color .15s; }
.switch span::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--white);
  transition: transform .15s;
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Auth ---------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  position: relative;
  background: var(--night);
  color: var(--on-dark);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-side .logo, .auth-side .logo svg { color: var(--on-dark); }
.auth-side > div, .auth-side .small { position: relative; z-index: 1; }
.auth-side h2 { font-size: clamp(48px, 5.2vw, 84px); line-height: .96; max-width: 10ch; }
.auth-side p { margin-top: 24px; max-width: 36ch; color: rgba(246, 245, 249, .85); }
.auth-side .small { font-size: 14px; color: rgba(246, 245, 249, .7); }

.auth-main { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 48px; }
.auth-card .sub { margin-top: 10px; color: var(--ink-soft); }
.auth-card form { margin-top: 36px; }
.auth-card .row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 26px; font-size: 15px; }
.auth-card .row-between a { color: var(--accent); }
.auth-card .switch-mode { margin-top: 28px; text-align: center; color: var(--ink-soft); font-size: 15px; }
.auth-card .switch-mode button { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.for-whom { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 32px 24px; gap: 40px; }
}

.auth-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 12% 50%;
}
.auth-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38, 33, 80, .5) 0%, rgba(38, 33, 80, .05) 24%, rgba(38, 33, 80, .15) 42%, rgba(38, 33, 80, .95) 66%);
}
.auth-side > a { position: relative; z-index: 1; }
.auth-side > div { margin-top: auto; margin-bottom: 48px; }
@media (max-width: 900px) { .auth-side { min-height: 420px; } }

/* ---------- App shell ---------- */

.page { padding: 56px 0 112px; }
.page-title { font-size: clamp(40px, 4.4vw, 60px); }
.page-sub { margin-top: 12px; color: var(--ink-soft); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
}

/* ---------- Onboarding ---------- */

.builder { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }

.stepper { position: sticky; top: 112px; list-style: none; margin: 0; padding: 0; }
.stepper li { position: relative; padding-left: 44px; }
.stepper li + li { margin-top: 6px; }
.stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 36px;
  bottom: -12px;
  width: 1px;
  background: var(--line);
}
.stepper li.done:not(:last-child)::after { background: var(--accent); }
.stepper button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 0 14px;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
}
.stepper .dot {
  position: absolute;
  left: 0;
  top: 8px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid #D3D0E0;
  background: var(--mist);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 15px;
  color: var(--ink-soft);
}
.stepper .t { display: block; font-weight: 500; color: inherit; line-height: 1.3; }
.stepper .s { display: block; font-size: 14px; }
.stepper li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--white); }
.stepper li.current .dot { border-color: var(--accent); color: var(--accent); }
.stepper li.current button, .stepper li.done button { color: var(--ink); }

.step-panel[hidden] { display: none; }
.step-panel h2 { font-size: 44px; }
.step-panel > .muted { margin-top: 10px; margin-bottom: 36px; max-width: 56ch; }
.step-panel h3.group { font-family: var(--display); font-size: 26px; margin: 40px 0 16px; }

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.step-count { font-size: 15px; color: var(--ink-soft); }

.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.photo-slot {
  aspect-ratio: 3 / 4;
  border-radius: var(--arch);
  border: 1px dashed #C3BFD6;
  background: var(--mist);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--accent-deep);
  font: 500 14px/1.3 var(--body);
  cursor: pointer;
}
.photo-slot:hover { border-color: var(--accent); background: var(--haze); }
.photo-slot svg { width: 22px; height: 22px; margin: 0 auto 6px; }
.photo-grid .arch .main-tag {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  font: 500 12px/1 var(--body); white-space: nowrap;
}

.preview-card {
  margin-top: 32px;
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 16px;
  background: var(--haze);
}
.preview-card .arch { width: 72px; flex: none; }

@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; gap: 24px; }
  .stepper { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .stepper li { padding-left: 0; flex: none; }
  .stepper li + li { margin-top: 0; }
  .stepper li::after, .stepper .dot, .stepper .s { display: none; }
  .stepper button { padding: 6px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); }
  .stepper li.current button { border-color: var(--accent); color: var(--accent); }
  .stepper li.done button { background: var(--haze); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 24px; }
}

.save-note { margin-left: auto; }
@media (max-width: 520px) {
  .save-note { display: none; }
  .site-header .btn-quiet { margin-left: auto; }
}

/* ---------- Browse ---------- */

.browse { display: grid; grid-template-columns: 272px 1fr; gap: 48px; align-items: start; }

.filters { position: sticky; top: 104px; }
.filters h2 { font-size: 28px; margin-bottom: 4px; }
.filter-group { padding: 20px 0; border-bottom: 1px solid var(--line); }
.filter-group .label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 10px; }
.filter-group .chips { gap: 6px; }
.filter-group .chip span { min-height: 32px; padding: 0 12px; font-size: 14px; }
.range { display: flex; align-items: center; gap: 10px; }
.range .input { min-height: 42px; padding: 8px 12px; }

.searchbar { display: flex; gap: 12px; margin-bottom: 20px; }
.searchbar .input {
  flex: 1;
  padding-left: 46px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235A5770' stroke-width='1.8'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 16px center;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}
.results-meta .select { width: auto; min-height: 40px; font-size: 15px; }

/* Results read as a list of proposals, separated by rules, not boxed */
.results { display: grid; }
.result {
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.result .arch { width: 128px; }
.result h3 { font-size: 34px; }
.result h3 a { text-decoration: none; }
.result h3 a:hover { color: var(--accent); }
.result .line { margin-top: 6px; color: var(--ink-soft); font-size: 15px; }
.result .about { margin-top: 12px; max-width: 58ch; }
.result .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--haze);
  color: var(--night);
  font-size: 14px;
}
.tag.match { background: #E2F0EC; color: var(--ok); }
.result .side { display: grid; gap: 12px; justify-items: end; align-self: stretch; align-content: space-between; }
.match-score { text-align: right; }
.match-score strong { display: block; font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--accent); }
.match-score span { font-size: 13px; color: var(--ink-soft); }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pager a {
  display: grid; place-items: center;
  min-width: 42px; height: 42px; border-radius: 999px;
  text-decoration: none; color: var(--ink-soft);
}
.pager a:hover { background: var(--haze); }
.pager a[aria-current="page"] { background: var(--ink); color: var(--mist); }

.filters-toggle { display: none; }

@media (max-width: 960px) {
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: block; }
  .filters-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .result { grid-template-columns: 96px 1fr; gap: 20px; }
  .result .arch { width: 96px; }
  .result h3 { font-size: 28px; }
  .result .side { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
  .result .about { display: none; }
}

/* ---------- Profile ---------- */

.profile-head {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 72px;
  align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--ink);
}
.profile-head h1 { font-size: clamp(56px, 7vw, 104px); line-height: .92; }
.profile-head .line { margin-top: 16px; font-size: 19px; color: var(--ink-soft); }
.profile-head .about { margin-top: 26px; font-size: 19px; max-width: 46ch; }
.profile-head .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.profile-head .note { margin-top: 16px; font-size: 14px; color: var(--ink-soft); display: flex; gap: 8px; align-items: center; }
.profile-head .note svg { width: 14px; height: 14px; flex: none; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; }
.thumbs .arch { width: 64px; }

.profile-body { display: grid; grid-template-columns: 1fr 360px; gap: 72px; padding-top: 64px; align-items: start; }
.profile-section + .profile-section { margin-top: 64px; }
.profile-section h2 { font-size: 38px; margin-bottom: 20px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-weight: 500; }

.prefs { list-style: none; padding: 0; margin: 0; }
.prefs li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.prefs li svg { width: 20px; height: 20px; margin-top: 2px; }
.prefs .ok svg { color: var(--ok); }
.prefs .partial svg { color: var(--gold); }
.prefs .k { font-size: 14px; color: var(--ink-soft); }
.prefs .v { font-weight: 500; }
.prefs .you { font-size: 14px; color: var(--ink-soft); text-align: right; }

.aside-card { position: sticky; top: 112px; background: var(--haze); border-color: transparent; padding: 32px; }
.aside-card h3 { font-size: 32px; }
.aside-card .muted { margin-top: 6px; font-size: 15px; }
.compat { margin-top: 22px; }
.compat-bar { height: 3px; background: rgba(207, 52, 89, .18); }
.compat-bar span { display: block; height: 100%; background: var(--accent); }
.compat .row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 8px; }
.compat .row strong { color: var(--accent); font-weight: 500; }
.aside-card .lockbox { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(29, 27, 51, .15); font-size: 15px; }
.aside-card .lockbox h4 { font-size: 15px; margin-bottom: 8px; }
.aside-card .lockbox ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.report-link { display: inline-block; margin-top: 22px; font-size: 14px; color: var(--ink-soft); }

@media (max-width: 960px) {
  .profile-head { grid-template-columns: 1fr; gap: 36px; }
  .profile-head > div:first-child { max-width: 300px; }
  .profile-body { grid-template-columns: 1fr; }
  .aside-card { position: static; }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .prefs li { grid-template-columns: 24px 1fr; }
  .prefs .you { grid-column: 2; text-align: left; }
}

/* ---------- Tabs ---------- */

.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin: 36px 0 8px; overflow-x: auto; }
.tabs button {
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  padding: 14px 16px 14px 0;
  font: 400 17px/1 var(--body);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tabs .count { margin-left: 6px; font-family: var(--display); color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* ---------- Interests ---------- */

.interest-list { display: grid; }
.interest {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.interest .arch { width: 76px; }
.interest h3 { font-size: 28px; }
.interest h3 a { text-decoration: none; }
.interest .line { font-size: 15px; color: var(--ink-soft); }
.interest .msg {
  margin-top: 10px;
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.4;
  max-width: 52ch;
}
.interest .acts { display: flex; gap: 8px; align-items: center; }
.interest .when { font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.interest.resolved { opacity: .55; }
.status-pill {
  display: inline-flex; align-items: center;
  min-height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 14px;
  background: var(--haze); color: var(--night);
}
.status-pill.accepted { background: #E2F0EC; color: var(--ok); }
.status-pill.declined { background: #ECEAF2; color: var(--ink-soft); }

.mutual-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px;
  margin-top: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  position: relative;
}
.mutual-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px dashed rgba(207, 52, 89, .3);
  border-radius: 14px;
  pointer-events: none;
}
.mutual-card + .mutual-card { margin-top: 16px; }
.mutual-pair { display: flex; align-items: center; }
.mutual-pair .arch { width: 64px; }
.mutual-pair svg { width: 56px; height: 30px; color: var(--accent); margin: 0 -6px; position: relative; z-index: 1; }
.mutual-card h3 { font-size: 32px; }
.mutual-card .contact { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 15px; }
.mutual-card .contact span { display: inline-flex; align-items: center; gap: 6px; }
.mutual-card .contact svg { width: 15px; height: 15px; color: var(--accent); }

@media (max-width: 700px) {
  .interest { grid-template-columns: 64px 1fr; }
  .interest .arch { width: 64px; }
  .interest .acts { grid-column: 1 / -1; flex-wrap: wrap; }
  .mutual-card { grid-template-columns: 1fr; gap: 16px; padding: 28px 24px; }
}

/* ---------- Admin ---------- */

.admin { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--ink);
  color: rgba(246, 245, 249, .7);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.admin-side .logo { color: var(--on-dark); font-size: 22px; padding: 0 10px; gap: 8px; }
.admin-side .logo svg { width: 24px; height: 24px; }
.admin-side .logo svg { color: var(--lilac); }
.admin-side .logo small { font-family: var(--body); font-style: normal; font-size: 13px; opacity: .6; margin-left: 2px; }
.admin-nav { display: grid; gap: 2px; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  text-decoration: none; font-size: 15px;
}
.admin-nav a svg { width: 18px; height: 18px; }
.admin-nav a:hover { background: rgba(246, 245, 249, .06); color: var(--on-dark); }
.admin-nav a[aria-current="page"] { background: var(--accent); color: var(--white); }
.admin-nav .nav-badge { margin-left: auto; background: var(--on-dark); color: var(--night); }
.admin-side .me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 0 10px; font-size: 14px; }
.admin-side .me .avatar { width: 34px; height: 34px; font-size: 14px; }

.admin-main { padding: 40px 44px 64px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.admin-top h1 { font-size: 48px; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 36px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.kpi { padding: 22px 24px 24px 0; }
.kpi + .kpi { padding-left: 24px; border-left: 1px solid var(--line); }
.kpi .k { font-size: 14px; color: var(--ink-soft); }
.kpi .v { font-family: var(--display); font-size: 44px; line-height: 1.15; }
.kpi .d { font-size: 14px; color: var(--ok); }
.kpi .d.warn { color: var(--accent); }

.admin-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.admin-grid .panel { padding: 28px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.panel-head h2 { font-size: 28px; }
.panel-head a { font-size: 14px; color: var(--accent); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; font-weight: 400; font-size: 14px; color: var(--ink-soft); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data .who { display: flex; align-items: center; gap: 12px; }
table.data .who .arch { width: 34px; flex: none; }
table.data .who small { display: block; color: var(--ink-soft); font-size: 13px; }

.state { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.active { color: var(--ok); }
.state.pending { color: var(--gold); }
.state.suspended { color: var(--accent); }

.report { padding: 18px 0; border-top: 1px solid var(--line); }
.report:first-of-type { border-top: 0; padding-top: 4px; }
.report .top { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.report .reason { font-weight: 500; }
.report .when { color: var(--ink-soft); font-size: 14px; white-space: nowrap; }
.report p { margin-top: 4px; font-size: 15px; color: var(--ink-soft); }
.report .acts { display: flex; gap: 8px; margin-top: 12px; }

.admin-menu-toggle { display: none; }

@media (max-width: 1100px) {
  .admin-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 800px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { padding: 16px 18px; gap: 16px; }
  .admin-side .head { display: flex; justify-content: space-between; align-items: center; }
  .admin-menu-toggle { display: grid; place-items: center; width: 40px; height: 40px; background: none; border: 0; color: var(--on-dark); cursor: pointer; }
  .admin-nav, .admin-side .me { display: none; }
  .admin-nav.open { display: grid; }
  .admin-main { padding: 28px 20px 56px; }
}

/* Display moments in Baloo 2 need an explicit weight; it has no light cut loaded */
.logo, .avatar, .recent .name, .features dt, .steps li::before,
.kpi .v, .match-score strong, .stepper .dot, .tabs .count { font-weight: 600; }
/* M PLUS Rounded is wide: give the members table room so names stay on one line */
.admin-grid { grid-template-columns: 1.7fr 1fr; }
table.data { font-size: 14px; }
table.data .who > div { white-space: nowrap; }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: 1fr; } }
