@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/NunitoSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --white: #fff;
  --warm-white: #fffdf8;
  --sky-pale: #eef5ff;
  --sky: #cce9fb;
  --sky-strong: #66b7ee;
  --navy: #24334b;
  --navy-deep: #19263a;
  --blue: #3159cf;
  --blue-dark: #2447b5;
  --blue-pale: #e7edff;
  --sun: #ffdb78;
  --sun-pale: #fff3c9;
  --coral: #e8785b;
  --coral-pale: #ffe7df;
  --green: #397b65;
  --green-pale: #e0f2ea;
  --ink-muted: #637086;
  --line: #dbe2ec;
  --danger: #a33f42;
  --danger-pale: #fbe7e6;
  --radius-sm: 9px;
  --radius-md: 15px;
  --radius-lg: 23px;
  --shadow: 0 14px 34px rgba(36, 51, 75, .09);
  --sans: "Nunito Sans", ui-rounded, "Arial Rounded MT Bold", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Compatibility aliases used by the remaining templates during the staged redesign. */
  --ivory: var(--warm-white);
  --paper: var(--white);
  --forest: var(--navy);
  --forest-dark: var(--navy-deep);
  --moss: var(--blue);
  --moss-pale: var(--blue-pale);
  --apricot: var(--sun);
  --apricot-pale: var(--sun-pale);
  --serif: var(--sans);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--warm-white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, svg { max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .65rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--navy); color: white; font-weight: 800; }
.skip-link:focus { top: 0; }
.demo-ribbon { position: relative; z-index: 40; min-height: 32px; padding: .35rem 1rem; background: var(--sun); color: var(--navy-deep); font-size: .76rem; font-weight: 850; letter-spacing: .025em; text-align: center; }
.app-shell { min-height: calc(100vh - 32px); }

.brand { display: inline-flex; align-items: center; gap: .58rem; color: var(--navy-deep); text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-size: 1.65rem; font-weight: 950; letter-spacing: -.055em; line-height: 1; }
.mobile-header { display: none; }
.sidebar {
  position: fixed;
  inset: 32px auto 0 0;
  z-index: 20;
  display: flex;
  width: 218px;
  flex-direction: column;
  padding: 1.35rem 1rem 1rem;
  border-right: 1px solid var(--line);
  background: var(--white);
}
.sidebar-greeting { margin: 1.7rem .7rem .5rem; color: var(--ink-muted); font-size: .76rem; font-weight: 800; }
.sidebar-nav { display: grid; gap: .24rem; }
.nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: .72rem;
  padding: .55rem .7rem;
  border-radius: 11px;
  color: #53627a;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}
.nav-link:hover { background: var(--sky-pale); color: var(--blue); }
.nav-link[aria-current="page"] { background: var(--blue-pale); color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.9; }
.sidebar-bottom { display: grid; gap: .45rem; margin-top: auto; }
.user-chip { display: flex; min-width: 0; align-items: center; gap: .65rem; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--sky-pale); text-decoration: none; }
.user-chip-icon { width: 30px; height: 30px; flex: 0 0 auto; padding: 5px; border-radius: 50%; background: var(--white); color: var(--blue); }
.user-chip strong, .user-chip small { display: block; line-height: 1.25; }
.user-chip strong { overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { margin-top: .12rem; color: var(--ink-muted); font-size: .68rem; }
.link-button { width: 100%; min-height: 38px; padding: .4rem .7rem; border: 0; background: none; color: var(--ink-muted); cursor: pointer; font-size: .82rem; font-weight: 800; text-align: left; }
.link-button:hover { color: var(--blue); }

.page { min-height: calc(100vh - 32px); margin-left: 218px; }
.page-inner { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; padding: 2.25rem 0 4.5rem; }
.page-inner--wide { width: min(1280px, calc(100% - 3rem)); }
.public-shell .page { margin-left: 0; }
.public-header { display: flex; width: min(1280px, calc(100% - 3rem)); min-height: 76px; margin: 0 auto; align-items: center; justify-content: space-between; }
.public-header .brand img { width: 44px; height: 44px; }
.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.header-link { color: var(--navy); font-size: .88rem; font-weight: 850; text-decoration: none; }
.header-link:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }

.eyebrow { margin: 0 0 .55rem; color: var(--blue); font-size: .72rem; font-weight: 950; letter-spacing: .075em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; color: var(--navy-deep); }
h1, h2 { font-weight: 800; letter-spacing: -.03em; }
h1 { max-width: 800px; margin-bottom: 1rem; font-size: clamp(2.15rem, 4.2vw, 3.8rem); line-height: 1.06; }
h2 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1.12; }
h3 { font-size: 1.08rem; font-weight: 750; line-height: 1.25; }
.lede { max-width: 690px; color: #53627a; font-size: clamp(1.03rem, 1.35vw, 1.22rem); line-height: 1.58; }
.muted { color: var(--ink-muted); }
.small { font-size: .82rem; }
.text-link { color: var(--blue); font-weight: 900; text-underline-offset: .23em; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .67rem 1.05rem;
  border: 2px solid var(--blue);
  border-radius: 11px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
  transition: background .16s, border-color .16s, transform .16s;
}
.button:hover { border-color: var(--blue-dark); background: var(--blue-dark); transform: translateY(-1px); }
.button--light { border-color: var(--line); background: var(--white); color: var(--navy); }
.button--light:hover { border-color: var(--sky-strong); background: var(--sky-pale); color: var(--blue); }
.button--sun { border-color: var(--sun); background: var(--sun); color: var(--navy-deep); }
.button--sun:hover { border-color: #f4c94e; background: #f4c94e; }
.button--small { min-height: 38px; padding: .5rem .82rem; font-size: .82rem; }
.button--block { width: 100%; }
.button--danger { border-color: var(--danger); background: var(--danger); }
.button--quiet { border-color: transparent; background: transparent; color: var(--danger); }
.button--quiet:hover { border-color: #e6b9b9; background: var(--danger-pale); color: var(--danger); }
.quiet-link { color: var(--ink-muted); font-size: .68rem; font-weight: 800; text-underline-offset: 3px; }
.button[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.flash-stack { display: grid; gap: .6rem; margin-bottom: 1rem; }
.flash { padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.flash--error, .flash--danger { border-color: #e3aaaa; background: var(--danger-pale); color: #782f31; }
.flash--success { border-color: #9ac9b6; background: var(--green-pale); color: #245b49; }

.landing-page { padding-top: .9rem; }
.landing-hero { display: grid; min-height: 600px; grid-template-columns: minmax(0, .95fr) minmax(460px, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: 2rem 0 4.5rem; }
.landing-copy h1 { max-width: 640px; font-size: clamp(3rem, 5.2vw, 4.8rem); line-height: .99; }
.landing-copy .lede { max-width: 610px; }
.landing-actions { margin-top: 1.6rem; }
.hero-note { display: flex; gap: .5rem; align-items: center; margin: 1.5rem 0 0; color: var(--ink-muted); font-size: .82rem; font-weight: 750; }
.hero-note svg { width: 19px; height: 19px; color: var(--green); }
.landing-art { position: relative; padding: 1.1rem 1.1rem 3.8rem; }
.landing-art::before { position: absolute; inset: 0 0 2.4rem; z-index: -1; border-radius: 46px 22px 46px 22px; background: var(--sky); content: ""; transform: rotate(2deg); }
.landing-art::after { position: absolute; right: -8px; top: -14px; width: 74px; height: 74px; z-index: -1; border-radius: 50%; background: var(--sun); content: ""; }
.landing-art-frame { aspect-ratio: 1.38; overflow: hidden; border: 7px solid var(--white); border-radius: 34px 15px 34px 15px; background: var(--warm-white); box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.landing-art-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.03); }
.art-caption { position: absolute; right: 0; bottom: 0; display: grid; min-width: 285px; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 10px 24px rgba(36,51,75,.12); }
.art-caption strong { font-size: .95rem; }
.art-caption span { color: var(--ink-muted); font-size: .76rem; }

.landing-section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.landing-section--steps { border-top: 0; }
.section-intro { max-width: 690px; }
.section-intro h2 { margin-bottom: .75rem; }
.section-intro > p:last-child { color: var(--ink-muted); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.2rem; }
.principle { min-height: 285px; padding: 1.45rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.principle--blue { border-top: 6px solid var(--sky-strong); }
.principle--yellow { border-top: 6px solid var(--sun); }
.principle--coral { border-top: 6px solid var(--coral); }
.step-icon { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 1.2rem; border-radius: 16px; color: var(--navy); }
.principle--blue .step-icon { background: var(--sky); }
.principle--yellow .step-icon { background: var(--sun-pale); }
.principle--coral .step-icon { background: var(--coral-pale); }
.step-icon svg { width: 31px; height: 31px; }
.step-number { margin: 0 0 .25rem; color: var(--blue); font-size: .72rem; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
.principle h3 { margin-bottom: .6rem; font-size: 1.18rem; }
.principle > p:last-child { margin-bottom: 0; color: var(--ink-muted); font-size: .9rem; }
.privacy-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 1rem 3rem; align-items: center; padding: 2.4rem; border-radius: var(--radius-lg); background: var(--navy); color: white; }
.privacy-panel h2 { max-width: 650px; margin-bottom: 0; color: white; }
.privacy-panel .eyebrow { color: var(--sun); }
.privacy-panel > .text-link { grid-column: 2; color: var(--sun); }
.privacy-list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.privacy-list li { display: flex; gap: .65rem; align-items: center; font-size: .9rem; font-weight: 750; }
.privacy-list svg { width: 20px; height: 20px; flex: 0 0 auto; padding: 3px; border-radius: 50%; background: var(--sun); color: var(--navy); stroke-width: 2.8; }
.demo-entry { display: grid; grid-template-columns: minmax(0, .8fr) minmax(400px, 1.2fr); gap: 3rem; }
.demo-account-list { display: grid; gap: .65rem; }
.demo-account-list form { margin: 0; }
.demo-account { display: grid; width: 100%; min-height: 66px; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 13px; background: var(--white); color: var(--navy); cursor: pointer; text-align: left; transition: border-color .16s, transform .16s; }
.demo-account:hover { border-color: var(--sky-strong); transform: translateX(3px); }
.demo-account-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--sky-pale); color: var(--blue); font-weight: 950; }
.demo-account strong, .demo-account small { display: block; }
.demo-account small { color: var(--ink-muted); font-size: .72rem; }
.demo-account svg { width: 20px; height: 20px; color: var(--blue); }
.public-footer { display: flex; width: min(1280px, calc(100% - 3rem)); justify-content: space-between; gap: 1rem; margin: 0 auto; padding: 1.7rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: .76rem; }

.discover-heading { margin-bottom: 1.35rem; }
.discover-heading h1 { max-width: 850px; margin-bottom: .55rem; font-size: clamp(2rem, 3.3vw, 3rem); }
.discover-heading > div > p:last-child { max-width: 700px; margin: 0; color: var(--ink-muted); }
.discover-banner { position: relative; display: grid; min-height: 204px; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); overflow: hidden; margin-bottom: 1rem; border: 1px solid #c9dff5; border-radius: var(--radius-lg); background: var(--sky-pale); }
.discover-banner-copy { position: relative; z-index: 2; align-self: center; padding: 1.5rem 1.8rem; }
.discover-banner h2 { max-width: 620px; margin-bottom: .5rem; font-size: clamp(1.65rem, 2.4vw, 2.15rem); }
.discover-banner-copy > p:last-child { max-width: 620px; margin: 0; color: #53627a; font-size: .9rem; }
.discover-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 59% center; border-left: 7px solid var(--white); }

.field { display: grid; gap: .32rem; }
.field label, .field-label { color: var(--navy-deep); font-size: .78rem; font-weight: 900; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: .58rem .72rem;
  border: 1px solid #bdc8d7;
  border-radius: var(--radius-sm);
  background: white;
  color: var(--navy);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,89,207,.13); outline: none; }
.help { margin: 0; color: var(--ink-muted); font-size: .76rem; }
.check-row { display: flex; gap: .65rem; align-items: flex-start; font-size: .86rem; }
.check-row input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--blue); }
.form-stack { display: grid; gap: 1rem; }

.filter-bar { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; margin-bottom: 1.65rem; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); box-shadow: 0 6px 18px rgba(36,51,75,.05); }
.filter-bar > .field { min-width: 210px; flex: 1 1 230px; }
.filter-summary { display: flex; min-height: 44px; flex: 0 1 190px; gap: .6rem; align-items: center; padding: .4rem .7rem; border-left: 1px solid var(--line); }
.filter-summary strong, .filter-summary small { display: block; line-height: 1.25; }
.filter-summary strong { font-size: .82rem; }
.filter-summary small { color: var(--ink-muted); font-size: .69rem; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-pale); }
.optional-filters { position: relative; flex: 0 0 auto; }
.optional-filters summary { display: flex; min-height: 44px; align-items: center; gap: .45rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--blue); cursor: pointer; font-size: .8rem; font-weight: 900; list-style: none; }
.optional-filters summary::-webkit-details-marker { display: none; }
.optional-filters summary svg { width: 18px; height: 18px; }
.optional-filters[open] { flex-basis: 100%; order: 4; padding-top: .2rem; }
.optional-filters[open] summary { width: max-content; margin-bottom: .65rem; }
.optional-filter-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.filter-action { flex: 0 0 auto; }
.results-heading { display: flex; gap: 1rem; align-items: end; justify-content: space-between; margin-bottom: .85rem; }
.results-heading .eyebrow { margin-bottom: .2rem; }
.results-heading h2 { margin: 0; font-size: 1.55rem; }
.results-heading > p { margin: 0; color: var(--ink-muted); font-size: .72rem; }

.discover-layout { display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 1rem; align-items: start; }
.match-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.match-card { display: flex; min-width: 0; min-height: 350px; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); box-shadow: 0 5px 16px rgba(36,51,75,.05); }
.match-card-top { display: grid; min-height: 90px; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: 1rem; background: var(--sky-pale); }
.match-card--1 .match-card-top { background: var(--sun-pale); }
.match-card--2 .match-card-top { background: var(--coral-pale); }
.match-card--3 .match-card-top { background: var(--green-pale); }
.activity-symbol { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 15px; background: var(--white); color: var(--blue); }
.match-card--1 .activity-symbol { color: #a16b00; }
.match-card--2 .activity-symbol { color: #b14b35; }
.match-card--3 .activity-symbol { color: var(--green); }
.activity-symbol svg { width: 42px; height: 42px; }
.match-label { margin: 0 0 .1rem; color: var(--ink-muted); font-size: .65rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.match-identity h3 { margin: 0; overflow-wrap: anywhere; font-size: 1.18rem; }
.shared-count { align-self: start; padding: .25rem .45rem; border-radius: 7px; background: var(--blue); color: white; font-size: .64rem; font-weight: 900; white-space: nowrap; }
.shared-count--related { background: var(--white); color: var(--navy); }
.match-card-body { display: grid; gap: .9rem; padding: 1rem; }
.match-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; }
.match-facts div { min-width: 0; }
.match-facts dt { color: var(--ink-muted); font-size: .62rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.match-facts dd { margin: .1rem 0 0; overflow-wrap: anywhere; font-size: .78rem; font-weight: 850; line-height: 1.25; }
.interest-summary { padding-top: .8rem; border-top: 1px solid var(--line); }
.interest-summary-label { margin: 0 0 .48rem; color: var(--navy); font-size: .75rem; font-weight: 900; }
.interest-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.interest-tags li { padding: .28rem .5rem; border: 1px solid #bed3f0; border-radius: 7px; background: var(--sky-pale); color: #29487b; font-size: .7rem; font-weight: 850; }
.related-copy { margin: 0; color: var(--ink-muted); font-size: .77rem; line-height: 1.45; }
.match-card-action { display: flex; min-height: 62px; flex-wrap: wrap; gap: .35rem .65rem; align-items: center; justify-content: space-between; margin-top: auto; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.match-card-action form { margin: 0; }
.match-card-action > span:last-child { color: var(--ink-muted); font-size: .65rem; }
.state-badge { display: inline-flex; padding: .3rem .5rem; border-radius: 7px; background: var(--green-pale); color: #245b49; font-size: .69rem; font-weight: 900; text-transform: capitalize; }
.side-note { position: sticky; top: 1rem; padding: 1.2rem; border: 1px solid #f1d676; border-radius: var(--radius-md); background: var(--sun-pale); }
.side-note-icon { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 1rem; border-radius: 13px; background: var(--white); color: var(--coral); }
.side-note-icon svg { width: 30px; height: 30px; }
.side-note h2 { margin-bottom: .75rem; font-size: 1.3rem; }
.steps { display: grid; gap: .85rem; margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 27px; padding-left: 2.15rem; color: #53627a; font-size: .77rem; counter-increment: steps; }
.steps li::before { position: absolute; left: 0; top: -.1rem; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; background: var(--white); color: var(--blue); content: counter(steps); font-size: .68rem; font-weight: 950; }
.side-note > p:last-child { margin-bottom: 0; padding-top: .8rem; border-top: 1px solid #e7ce78; font-size: .7rem; line-height: 1.45; }
.empty-state { grid-column: 1 / -1; padding: 2.4rem; border: 2px dashed #c6d2e1; border-radius: var(--radius-lg); background: var(--sky-pale); text-align: center; }
.empty-state h2 { margin-bottom: .6rem; }
.empty-state p { max-width: 620px; margin-right: auto; margin-left: auto; }
.empty-state-icon { display: grid; width: 60px; height: 60px; place-items: center; margin: 0 auto 1rem; border-radius: 18px; background: var(--white); color: var(--blue); }
.empty-state-icon svg { width: 38px; height: 38px; }

/* Shared structure retained for the remaining screens in the next design pass. */
.page-heading { display: flex; gap: 2rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.8rem; }
.page-heading h1 { margin-bottom: 0; font-size: clamp(2rem, 3.2vw, 3rem); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.card--soft { background: var(--sky-pale); }
.card--apricot { background: var(--sun-pale); }
.stack { display: grid; gap: 1rem; }
.section-heading { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: space-between; margin: 2rem 0 1rem; }
.section-heading h2, .section-heading p { margin: 0; }

.auth-layout { display: grid; min-height: calc(100vh - 150px); grid-template-columns: minmax(0, .9fr) minmax(390px, .65fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.auth-story { max-width: 620px; }
.auth-story::before { display: block; width: 76px; height: 12px; margin-bottom: 1.5rem; border-radius: 4px; background: var(--sun); content: ""; }
.auth-card { padding: clamp(1.4rem, 3vw, 2.3rem); border: 1px solid var(--line); border-top: 6px solid var(--sky-strong); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); }
.auth-card h2 { margin-bottom: .4rem; font-size: 1.8rem; }
.auth-card > .small { margin-top: 1.1rem; }
.form-divider { display: flex; align-items: center; gap: .8rem; color: var(--ink-muted); font-size: .76rem; }
.form-divider::before, .form-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.profile-card { display: flex; min-height: 245px; flex-direction: column; justify-content: space-between; padding: 1.3rem; border: 1px solid var(--line); border-top: 6px solid var(--sky-strong); border-radius: var(--radius-md); background: var(--white); }
.profile-card:nth-child(2n) { border-top-color: var(--sun); }
.profile-card h2 { margin: .7rem 0 .2rem; font-size: 1.65rem; }
.profile-card-top { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.interest-pill { display: inline-flex; padding: .3rem .52rem; border: 1px solid #bed3f0; border-radius: 7px; background: var(--sky-pale); color: #29487b; font-size: .72rem; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.choice-card { display: flex; min-width: 0; min-height: 54px; gap: .6rem; align-items: center; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--warm-white); cursor: pointer; }
.choice-card:hover { border-color: var(--sky-strong); background: var(--sky-pale); }
.choice-card input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--blue); }
.choice-name { display: block; overflow-wrap: anywhere; line-height: 1.25; }
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.interest-group { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.interest-group:last-child { border-bottom: 0; }
.interest-group h3 { margin-bottom: .6rem; color: var(--blue); }
.status-list { display: grid; gap: .65rem; }
.status-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.status-row h3, .status-row p { margin: 0; }
.request-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-left: 6px solid var(--sky-strong); border-radius: var(--radius-md); background: var(--white); }
.request-card h3 { margin: 0 0 .2rem; }
.request-route { display: flex; min-width: 0; gap: .8rem; align-items: center; }
.request-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: var(--sky-pale); color: var(--blue); }
.request-icon svg { width: 31px; height: 31px; }
.definition-grid { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: .65rem 1rem; }
.definition-grid dt { color: var(--ink-muted); font-weight: 800; }
.definition-grid dd { margin: 0; overflow-wrap: anywhere; }
.danger-zone { border-color: #e5b3b1; border-top: 6px solid var(--danger); background: #fffafa; }

.chat-shell { display: grid; min-height: 640px; grid-template-columns: 300px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); }
.conversation-list { border-right: 1px solid var(--line); background: var(--sky-pale); }
.conversation-list-header { padding: 1.2rem; border-bottom: 1px solid var(--line); }
.conversation-list-header h1 { margin: 0; font-size: 2rem; }
.conversation-link { display: flex; gap: .7rem; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.conversation-link:hover, .conversation-link[aria-current="page"] { background: var(--white); }
.conversation-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--white); color: var(--blue); }
.conversation-icon svg { width: 23px; height: 23px; }
.conversation-link strong, .conversation-link small { display: block; line-height: 1.25; }
.conversation-link small { color: var(--ink-muted); font-size: .7rem; }
.chat-panel { display: grid; min-width: 0; grid-template-rows: auto 1fr auto; }
.chat-header { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.chat-header h2, .chat-header p { margin: 0; }
.chat-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.mobile-back { display: none; align-items: center; gap: .3rem; margin-bottom: .3rem; }
.mobile-back svg { width: 16px; height: 16px; }
.message-list { display: flex; min-height: 0; flex-direction: column; gap: .65rem; overflow-y: auto; padding: 1.1rem; background: var(--warm-white); }
.message { max-width: min(72%, 580px); align-self: flex-start; padding: .7rem .85rem; border-radius: 5px 16px 16px 16px; background: var(--sky-pale); }
.message--own { align-self: flex-end; border-radius: 16px 5px 16px 16px; background: var(--sun-pale); }
.message p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.message time { display: block; margin-top: .25rem; color: var(--ink-muted); font-size: .66rem; }
.message-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; padding: .85rem 1rem; border-top: 1px solid var(--line); }
.message-guidance { grid-column: 1 / -1; margin: 0; color: var(--ink-muted); font-size: .85rem; line-height: 1.5; }
.message-form textarea { min-height: 45px; max-height: 140px; padding: .65rem .75rem; border: 1px solid #bdc8d7; border-radius: 10px; resize: vertical; }
.conversation-placeholder { display: grid; grid-row: 1 / -1; place-items: center; padding: 2rem; text-align: center; }

.safety-hero { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 3rem; align-items: center; padding: 1rem 0 3.5rem; }
.safety-symbol { display: grid; aspect-ratio: 1; place-items: center; border-radius: 34px 16px 34px 16px; background: var(--sun-pale); color: var(--blue); transform: rotate(2deg); }
.safety-symbol svg { width: 55%; height: 55%; stroke-width: 2.5; transform: rotate(-2deg); }
.safety-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.safety-grid .card { border-top: 6px solid var(--sky-strong); }
.safety-grid .card--soft { border-top-color: var(--green); }
.safety-grid .card--apricot { border-top-color: var(--sun); }
.policy-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.policy-list li { padding: .85rem 0 .85rem 1.8rem; border-bottom: 1px solid var(--line); }
.policy-list li::before { float: left; margin-left: -1.8rem; color: var(--green); content: "✓"; font-weight: 950; }

.admin-section { margin: 2rem 0; }
.admin-section > h2 { margin-bottom: .8rem; font-size: 1.7rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th, .data-table td { padding: .75rem .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: var(--sky-pale); color: var(--ink-muted); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.admin-actions { display: flex; min-width: 320px; flex-wrap: wrap; gap: .35rem; }
.admin-field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.compact-input, .compact-select { min-height: 36px; max-width: 180px; padding: .35rem .5rem; border: 1px solid #bdc8d7; border-radius: 8px; background: white; }
.cell-value { min-width: 0; overflow-wrap: anywhere; }
.error-page { display: grid; min-height: 65vh; place-items: center; text-align: center; }
.error-code { color: var(--coral); font-size: clamp(6rem, 16vw, 12rem); font-weight: 900; line-height: .8; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media (max-width: 1120px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); }
  .discover-layout { grid-template-columns: minmax(0, 1fr) 230px; }
  .match-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .page { margin-left: 200px; }
  .page-inner { width: min(100% - 2rem, 1180px); }
  .landing-hero { grid-template-columns: 1fr; }
  .landing-copy { padding-top: 1.5rem; }
  .landing-art { max-width: 680px; }
  .principles { grid-template-columns: 1fr; }
  .principle { min-height: 0; }
  .privacy-panel { grid-template-columns: 1fr; }
  .privacy-panel > .text-link { grid-column: 1; }
  .demo-entry { grid-template-columns: 1fr; }
  .discover-banner { grid-template-columns: 1fr 260px; }
  .discover-layout { grid-template-columns: 1fr; }
  .side-note { position: static; }
  .content-grid { grid-template-columns: 1fr; }
  .auth-layout { min-height: 0; grid-template-columns: 1fr; }
  .auth-story .lede { max-width: 720px; }
  .safety-hero { grid-template-columns: 1fr 190px; }
  .safety-grid { grid-template-columns: 1fr; }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-shell:has(.chat-panel--active) .conversation-list { display: none; }
  .chat-panel:not(.chat-panel--active) { display: none; }
  .conversation-list { border-right: 0; }
  .mobile-back { display: inline-flex; }
}

@media (max-width: 760px) {
  .demo-ribbon { padding: .35rem .5rem; font-size: .68rem; }
  .sidebar { display: none; }
  .mobile-header { position: relative; z-index: 30; display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: .6rem .75rem; border-bottom: 1px solid var(--line); background: var(--white); }
  .mobile-header .brand img { width: 36px; height: 36px; }
  .mobile-header .brand-name { font-size: 1.45rem; }
  .mobile-menu summary { display: flex; min-width: 86px; min-height: 42px; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--navy); font-size: .8rem; font-weight: 900; list-style: none; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--blue); content: ""; }
  .menu-lines { position: relative; }
  .menu-lines::before { position: absolute; top: -5px; }
  .menu-lines::after { position: absolute; top: 5px; }
  .mobile-menu[open] summary { border-color: var(--blue); background: var(--blue-pale); color: var(--blue); }
  .mobile-menu-panel { position: absolute; top: calc(100% + 1px); right: .75rem; left: .75rem; padding: .65rem; border: 1px solid var(--line); border-radius: 0 0 var(--radius-md) var(--radius-md); background: var(--white); box-shadow: var(--shadow); }
  .mobile-menu-panel nav { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
  .mobile-menu-panel nav a { display: flex; min-height: 43px; align-items: center; padding: .5rem .65rem; border-radius: 8px; font-size: .82rem; font-weight: 850; text-decoration: none; }
  .mobile-menu-panel nav a[aria-current="page"] { background: var(--blue-pale); color: var(--blue); }
  .mobile-menu-panel form { margin-top: .45rem; padding-top: .45rem; border-top: 1px solid var(--line); }
  .page { margin-left: 0; }
  .page-inner, .page-inner--wide { width: min(100% - 1.25rem, 680px); padding-top: 1.4rem; }
  .public-header { width: calc(100% - 1.25rem); min-height: 65px; }
  .public-header .brand img { width: 38px; height: 38px; }
  .public-header .brand-name { font-size: 1.45rem; }
  .header-link { display: none; }
  .landing-page { padding-top: 0; }
  .landing-hero { min-height: 0; gap: 2rem; padding: 2rem 0 3.5rem; }
  .landing-copy { padding-top: 0; }
  .landing-copy h1 { max-width: 370px; font-size: clamp(2.8rem, 13vw, 3.7rem); }
  .landing-copy .lede { font-size: 1rem; }
  .landing-actions { align-items: stretch; }
  .landing-actions .button { width: 100%; }
  .landing-actions .text-link { width: 100%; text-align: center; }
  .hero-note { align-items: flex-start; }
  .landing-art { padding: .65rem .65rem 3.2rem; }
  .landing-art::before { inset: 0 0 2rem; border-radius: 28px 14px 28px 14px; }
  .landing-art::after { width: 52px; height: 52px; }
  .landing-art-frame { aspect-ratio: 1.12; border-width: 5px; border-radius: 24px 11px 24px 11px; }
  .landing-art-frame img { object-position: 50% center; }
  .art-caption { right: .1rem; left: 1.4rem; min-width: 0; }
  .landing-section { padding: 3.5rem 0; }
  .principles { grid-template-columns: 1fr; }
  .privacy-panel { padding: 1.5rem; }
  .demo-entry { gap: 1.5rem; }
  .public-footer { width: calc(100% - 1.25rem); flex-direction: column; }

  .discover-heading { margin-bottom: .7rem; }
  .discover-heading h1 { margin-bottom: 0; font-size: 1.75rem; line-height: 1.12; }
  .discover-intro-copy { display: none; }
  .discover-banner { min-height: 0; grid-template-columns: 1fr; }
  .discover-banner-copy { padding: .9rem 1rem .75rem; }
  .discover-banner-copy .eyebrow { margin-bottom: .2rem; }
  .discover-banner h2 { margin-bottom: .25rem; font-size: 1.25rem; }
  .discover-banner-copy > p:last-child { font-size: .78rem; line-height: 1.4; }
  .discover-banner img { height: 84px; border-top: 5px solid var(--white); border-left: 0; object-position: 50% 47%; }
  .filter-bar { align-items: stretch; padding: .75rem; }
  .filter-bar > .field { min-width: 100%; flex-basis: 100%; }
  .filter-summary { min-width: calc(50% - .35rem); flex: 1 1 calc(50% - .35rem); border-left: 0; padding-left: .45rem; }
  .optional-filters { min-width: calc(50% - .35rem); flex: 1 1 calc(50% - .35rem); }
  .optional-filters summary { justify-content: center; }
  .optional-filters[open] { flex-basis: 100%; }
  .optional-filter-fields { grid-template-columns: 1fr; }
  .filter-action { width: 100%; }
  .filter-action .button { width: 100%; }
  .results-heading { align-items: start; }
  .results-heading > p { max-width: 110px; text-align: right; }
  .match-list { grid-template-columns: 1fr; }
  .match-card { min-height: 0; }
  .match-card-top { grid-template-columns: auto minmax(0, 1fr); }
  .shared-count { grid-column: 2; justify-self: start; }
  .match-facts { gap: .35rem; }
  .match-card-action { align-items: stretch; flex-direction: column; }
  .match-card-action .button, .match-card-action form { width: 100%; }
  .match-card-action > span:last-child { text-align: center; }
  .side-note { margin-top: .15rem; }
  .empty-state { padding: 1.7rem 1rem; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 2rem; }
  .page-heading .lede { font-size: .95rem; }
  .profile-grid, .choice-grid { grid-template-columns: 1fr; }
  .request-card, .status-row { grid-template-columns: 1fr; }
  .request-card .inline-actions { align-items: stretch; }
  .request-card .inline-actions form, .request-card .inline-actions .button { flex: 1 1 auto; }
  .chat-shell { min-height: 600px; }
  .chat-header { align-items: flex-start; }
  .chat-actions { justify-content: flex-end; }
  .message { max-width: 88%; }
  .message-form { grid-template-columns: 1fr; }
  .safety-hero { grid-template-columns: 1fr; gap: 1.2rem; padding-bottom: 2.5rem; }
  .safety-symbol { width: 150px; }
  .definition-grid { grid-template-columns: 1fr; gap: .1rem; }
  .definition-grid dd { margin-bottom: .6rem; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .data-table, .data-table tbody { display: block; width: 100%; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .data-table tr { display: block; margin-bottom: .8rem; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
  .data-table td { display: grid; width: 100%; grid-template-columns: minmax(90px, .35fr) minmax(0, 1fr); gap: .55rem; padding: .5rem 0; }
  .data-table td::before { color: var(--ink-muted); content: attr(data-label); font-size: .64rem; font-weight: 900; text-transform: uppercase; }
  .admin-actions { display: grid; width: 100%; min-width: 0; }
  .admin-field-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: .72rem; font-weight: 850; }
  .compact-input, .compact-select { width: 100%; max-width: none; min-height: 42px; }
}
