/* ===== Rooted Union design system ===== */
:root {
    --ru-bg: #f7f3ec;
    --ru-bg-deep: #ebe3d6;
    --ru-surface: #fffdf9;
    --ru-header: #fffdf9;
    --ru-ink: #2f2218;
    --ru-ink-soft: #5c4b3f;
    --ru-muted: #8a7664;
    --ru-line: #e2d5c4;
    --ru-accent: #5c3f2c;
    --ru-accent-hover: #463022;
    --ru-accent-soft: #efe6da;
    --ru-success-bg: #e8f2ea;
    --ru-success-ink: #245338;
    --ru-error-bg: #f8e8e4;
    --ru-error-ink: #8b2e2e;
    --ru-warning-bg: #fff4e5;
    --ru-warning-ink: #7a5420;
    --ru-radius-sm: 10px;
    --ru-radius-md: 16px;
    --ru-radius-lg: 22px;
    --ru-radius-pill: 999px;
    --ru-shadow: 0 12px 32px rgba(47, 34, 24, 0.08);
    --ru-font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --ru-font-body: "Sora", "Segoe UI", sans-serif;
    --ru-space-page: clamp(20px, 4vw, 40px);
    --ru-max: 1120px;
    --ru-max-app: 960px;
    --ru-max-form: 880px;
    --ru-max-narrow: 720px;
    --ru-max-policy: 920px;
    --ru-page-top: 72px;
    --ru-page-bottom: 96px;
    --ru-gap-split: 56px;
    --ru-header-h: 72px;
}

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

html,
body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    font-family: var(--ru-font-body);
    color: var(--ru-ink);
    background: var(--ru-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body:has(.app-tabs) {
    padding-bottom: 0;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--ru-accent);
}

h1, h2, h3, h4 {
    font-family: var(--ru-font-display);
    font-weight: 560;
    line-height: 1.15;
    color: var(--ru-ink);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: var(--ru-radius-pill);
    text-decoration: none;
    font-weight: 650;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary,
.btn-primary {
    background: var(--ru-accent);
    color: #fffdf9;
}

.btn.primary:hover,
.btn-primary:hover {
    background: var(--ru-accent-hover);
}

.btn.secondary,
.btn-secondary {
    background: transparent;
    border-color: var(--ru-accent);
    color: var(--ru-accent);
}

.btn.secondary:hover,
.btn-secondary:hover {
    background: var(--ru-accent-soft);
}

.btn.ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ru-ink-soft);
    font-weight: 550;
    padding: 8px 12px;
}

.btn.ghost:hover {
    color: var(--ru-ink);
    background: rgba(92, 63, 44, 0.06);
}

.btn:disabled,
.btn.is-disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.block {
    width: 100%;
}

.btn.danger {
    background: #a83232;
    color: #fff;
    border-color: #a83232;
}

.primary-btn,
.auth-container button[type="submit"],
.profile-card button[type="submit"] {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--ru-radius-sm);
    background: var(--ru-accent);
    color: #fffdf9;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
}

.primary-btn:hover,
.auth-container button[type="submit"]:hover,
.profile-card button[type="submit"]:hover {
    background: var(--ru-accent-hover);
}

/* ===== Alerts / flashes ===== */
.flash-stack {
    max-width: var(--ru-max);
    margin: 0 auto;
    padding: 16px var(--ru-space-page) 0;
    width: 100%;
    box-sizing: border-box;
}

/* Legal / long-form articles */
.policy-shell {
    width: 100%;
    max-width: var(--ru-max-policy);
    margin: 0 auto;
    padding: var(--ru-page-top) var(--ru-space-page) var(--ru-page-bottom);
    box-sizing: border-box;
    flex: 1 0 auto;
}

.policy-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 253, 249, 0.96);
    border: 1px solid rgba(226, 213, 196, 0.85);
    border-radius: var(--ru-radius-lg);
    padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
    box-shadow: var(--ru-shadow);
    color: var(--ru-ink);
    line-height: 1.65;
}

.policy-card::before {
    content: "";
    position: absolute;
    top: -48px;
    right: -36px;
    width: 160px;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 160' fill='none'%3E%3Cpath d='M60 152c0-38 18-62 18-98C78 28 60 12 60 12S42 28 42 54c0 36 18 60 18 98Z' stroke='%235c3f2c' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M60 72c-22-6-34-22-38-40M60 72c22-6 34-22 38-40M60 98c-18-4-28-16-32-30M60 98c18-4 28-16 32-30' stroke='%235c3f2c' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M48 44c6-10 12-14 12-14s6 4 12 14c-6 2-12 2-12 2s-6 0-12-2Z' fill='%235c3f2c' opacity='.22'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
}

.policy-card h1 {
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    margin: 0 0 20px;
    text-align: center;
}

.policy-card h2 {
    font-size: 1.35rem;
    margin: 32px 0 12px;
    color: var(--ru-ink-soft);
    border-bottom: 1px solid var(--ru-line);
    padding-bottom: 8px;
}

.policy-card p {
    margin: 0 0 16px;
    color: var(--ru-ink-soft);
    font-size: 1.02rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.value-card {
    padding: 20px 18px;
    border: 1px solid var(--ru-line);
    border-radius: var(--ru-radius-md);
    background: rgba(255, 255, 255, 0.55);
}

.value-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: var(--ru-ink);
}

.value-card p {
    margin: 0;
    font-size: 0.95rem;
}

.alert,
.flash,
.success-message,
.error-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--ru-radius-sm);
    margin-bottom: 16px;
    font-size: 0.93rem;
    font-weight: 550;
    line-height: 1.5;
}

.alert::before,
.flash::before {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    margin-top: 1px;
}

.alert-success,
.flash-success,
.success-message {
    background: var(--ru-success-bg);
    color: var(--ru-success-ink);
    border: 1px solid #c7dfcf;
    border-left: 3px solid #4a9a6a;
}

.alert-success::before,
.flash-success::before {
    content: "✓";
    background: #4a9a6a;
    color: #fff;
}

.alert-error,
.flash-error,
.error-message {
    background: var(--ru-error-bg);
    color: var(--ru-error-ink);
    border: 1px solid #e2b7ad;
    border-left: 3px solid #c0463a;
}

.alert-error::before,
.flash-error::before {
    content: "!";
    background: #c0463a;
    color: #fff;
}

.alert-info,
.flash-info {
    background: var(--ru-accent-soft);
    color: var(--ru-ink);
    border: 1px solid var(--ru-line);
    border-left: 3px solid var(--ru-accent);
}

.alert-info::before,
.flash-info::before {
    content: "i";
    background: var(--ru-accent);
    color: #fff;
    font-style: italic;
    font-family: Georgia, serif;
}

.alert-warning,
.flash-warning {
    background: var(--ru-warning-bg);
    color: var(--ru-warning-ink);
    border: 1px solid #e6c98a;
    border-left: 3px solid #c8882a;
}

.alert-warning::before,
.flash-warning::before {
    content: "!";
    background: #c8882a;
    color: #fff;
}

/* ===== App shell / nav ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--ru-header);
    border-bottom: 1px solid var(--ru-line);
    transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 4px 18px rgba(47, 34, 24, 0.07);
}

.site-header .nav {
    position: relative;
}

.nav {
    width: 100%;
    max-width: var(--ru-max);
    margin: 0 auto;
    min-height: var(--ru-header-h);
    padding: 14px var(--ru-space-page);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.logo-img {
    display: block;
    height: 44px;
    width: auto;
    max-width: min(220px, 52vw);
    object-fit: contain;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--ru-line);
    background: var(--ru-surface);
    color: var(--ru-ink);
    border-radius: var(--ru-radius-sm);
    padding: 0;
    cursor: pointer;
}

.nav-toggle-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 18px;
}

.nav-toggle-bars span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ru-ink);
    border-radius: 2px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.site-header.is-open .nav-toggle-bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
}

.site-header.is-open .nav-toggle-bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--ru-ink-soft);
    font-size: 0.93rem;
    font-weight: 550;
    padding: 8px 12px;
    border-radius: var(--ru-radius-sm);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-link svg {
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.nav-link:hover {
    color: var(--ru-ink);
    background: rgba(92, 63, 44, 0.06);
}

.nav-link:hover svg {
    opacity: 1;
}

.nav-link.is-active {
    color: var(--ru-ink);
    font-weight: 700;
    background: var(--ru-accent-soft);
}

.nav-link.is-active svg {
    opacity: 1;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 2px;
    border-radius: var(--ru-radius-pill);
    background: var(--ru-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
    line-height: 1;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--ru-accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    font-weight: 650;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--ru-line);
}

.nav-chip {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ru-ink);
    background: var(--ru-accent-soft);
    padding: 6px 12px;
    border-radius: var(--ru-radius-pill);
}

.nav-logout {
    color: var(--ru-muted) !important;
    font-weight: 500 !important;
    font-size: 0.88rem !important;
    text-decoration: none;
    padding: 6px 8px;
}

.nav-logout:hover {
    color: var(--ru-ink) !important;
    text-decoration: underline;
}

.nav-onboarding-note {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ru-muted);
    padding: 8px 12px;
}

.nav-cta {
    margin-left: 4px;
}

.account-menu {
    position: relative;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--ru-line);
}

.account-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--ru-line);
    background: var(--ru-surface);
    padding: 4px 10px 4px 4px;
    border-radius: var(--ru-radius-pill);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.account-menu-trigger:hover,
.account-menu.is-open .account-menu-trigger {
    border-color: #cbb79f;
    background: #fff;
}

.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ru-accent);
    color: #fffdf9;
    font-size: 0.85rem;
    font-weight: 700;
}

.account-menu-name {
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--ru-ink);
}

.account-menu-caret {
    color: var(--ru-muted);
    font-size: 0.75rem;
}

.account-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: var(--ru-surface);
    border: 1px solid var(--ru-line);
    border-radius: var(--ru-radius-sm);
    box-shadow: var(--ru-shadow);
    padding: 8px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-menu-panel[hidden] {
    display: none !important;
}

.account-menu-panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    color: var(--ru-ink);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 550;
}

.account-menu-panel a:hover,
.account-menu-panel a.is-active {
    background: var(--ru-accent-soft);
}

.account-menu-status {
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--ru-muted);
    background: var(--ru-bg);
    padding: 2px 8px;
    border-radius: var(--ru-radius-pill);
}

.account-menu-panel .account-menu-logout {
    color: var(--ru-muted);
    border-top: 1px solid var(--ru-line);
    margin-top: 4px;
    border-radius: 0 0 8px 8px;
}

/* Mobile app tabs — logged-in complete members */
.app-tabs {
    display: none;
}

.optional-label {
    font-weight: 500;
    color: var(--ru-muted);
}

.plan-compare-wrap {
    overflow-x: auto;
    margin-bottom: 0;
    width: 100%;
    border: 1px solid rgba(226, 213, 196, 0.9);
    border-radius: var(--ru-radius-md);
    background: var(--ru-surface);
    box-shadow: var(--ru-shadow);
}

.plan-compare {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.plan-compare th,
.plan-compare td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--ru-line);
    color: var(--ru-ink-soft);
    font-size: 0.95rem;
}

.plan-compare thead th {
    background: var(--ru-accent-soft);
    color: var(--ru-ink);
    font-weight: 700;
}

.plan-compare tbody th {
    color: var(--ru-ink);
    font-weight: 650;
    width: 34%;
}

.plan-compare tbody tr:last-child th,
.plan-compare tbody tr:last-child td {
    border-bottom: none;
}

.plan-compare tbody tr:hover td,
.plan-compare tbody tr:hover th {
    background: rgba(92, 63, 44, 0.03);
}

.plan-compare-check {
    color: #245338;
    font-weight: 550;
}

.plan-compare-check-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.plan-compare-check svg,
.plan-compare-check-inner svg {
    color: #4a9a6a;
    flex-shrink: 0;
    vertical-align: middle;
}

.plan-compare-check--featured {
    color: #1a4228;
}

.membership-cta-row {
    margin-top: 18px;
}

/* ===== Unified page shell (every member-facing page) =====
   Same top offset + horizontal padding everywhere.
   Variants only change width / columns — never the start line. */
.page-shell {
    width: 100%;
    max-width: var(--ru-max);
    margin: 0 auto;
    padding: var(--ru-page-top) var(--ru-space-page) var(--ru-page-bottom);
    box-sizing: border-box;
    flex: 1 0 auto;
}

.page-shell--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ru-gap-split);
    align-items: start;
}

.page-shell--split.page-shell--split-media {
    align-items: center;
}

.page-shell--app {
    max-width: var(--ru-max-app);
}

.page-shell--form {
    max-width: var(--ru-max-form);
}

.page-shell--narrow {
    max-width: var(--ru-max-narrow);
}

/* Backward-compatible aliases → same shell */
.content-band,
.hero-content,
.signup-layout,
.matches-page,
.page,
.page-container,
.profile-page,
.profile-detail-page,
.conversations-page,
.chat-page,
.membership-page,
.verify-page {
    width: 100%;
    max-width: var(--ru-max);
    margin: 0 auto;
    padding: var(--ru-page-top) var(--ru-space-page) var(--ru-page-bottom);
    box-sizing: border-box;
    flex: 1 0 auto;
}

.content-band,
.hero-content,
.signup-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ru-gap-split);
    align-items: start;
}

.content-band,
.hero-content {
    align-items: center;
}

.matches-page,
.page,
.page-container,
.conversations-page,
.chat-page,
.membership-page {
    max-width: var(--ru-max-app);
}

.verify-page {
    max-width: var(--ru-max-narrow);
}

.profile-page {
    max-width: var(--ru-max-form);
}

.profile-detail-page {
    max-width: var(--ru-max-app);
}

/* ===== Hero ===== */
.hero {
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.hero-badge {
    display: inline-block;
    background: var(--ru-accent-soft);
    color: var(--ru-accent);
    padding: 7px 12px;
    border-radius: var(--ru-radius-pill);
    font-size: 0.82rem;
    font-weight: 650;
    margin-bottom: 22px;
}

.hero-text h1,
.about-content h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.4rem);
    margin: 0 0 24px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-text p {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--ru-ink-soft);
    margin: 0 0 30px;
    max-width: 36em;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image,
.about-image {
    position: relative;
}

.hero-image img,
.about-image img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center;
    border-radius: 26px;
    display: block;
    box-shadow: var(--ru-shadow);
}

@media (min-width: 901px) {
    .hero-content {
        min-height: calc(100svh - var(--ru-header-h) - 56px);
        padding-top: 42px;
        padding-bottom: 56px;
    }

    .hero-text p {
        margin-bottom: 24px;
    }

    .hero-image img {
        height: 460px;
    }

    .home-resources .resources-section-inner {
        padding-top: 28px;
    }
}

.match-preview-card {
    position: absolute;
    left: 24px;
    bottom: 24px;
    width: 280px;
    background: var(--ru-surface);
    padding: 18px;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(61, 42, 29, 0.18);
    border: 1px solid rgba(226, 213, 196, 0.7);
}

.match-preview-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.match-preview-header strong {
    color: var(--ru-ink);
    font-size: 0.95rem;
}

.match-preview-header span {
    color: #7a5638;
    font-weight: 700;
    font-size: 0.9rem;
}

.match-preview-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px;
    color: var(--ru-ink-soft);
}

.match-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.match-tags span {
    background: var(--ru-accent-soft);
    color: var(--ru-accent);
    padding: 6px 10px;
    border-radius: var(--ru-radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
}

/* ===== About (same band as home) ===== */
.about-content p {
    font-size: 1.1rem;
    color: var(--ru-ink-soft);
    line-height: 1.8;
    margin: 0 0 22px;
}

.about-contact {
    margin-top: 28px;
    font-weight: 600;
    color: var(--ru-ink-soft);
}

.about-contact a {
    color: #6d5b4a;
}

/* ===== Auth / signup ===== */
.signup-intro {
    padding-top: 0;
}

.signup-intro h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 18px;
}

.signup-intro p {
    font-size: 1.05rem;
    color: var(--ru-ink-soft);
    margin: 0 0 28px;
    line-height: 1.7;
}

.signup-steps p {
    margin-bottom: 18px;
    color: var(--ru-ink-soft);
}

.signup-steps strong {
    color: var(--ru-ink);
}

.auth-container {
    width: 100%;
    background: var(--ru-surface);
    border-radius: var(--ru-radius-lg);
    padding: 32px;
    box-shadow: var(--ru-shadow);
    border: 1px solid rgba(226, 213, 196, 0.8);
}

.auth-container h2 {
    font-size: 1.65rem;
    margin: 0 0 18px;
}

/* Shared inline SVG motifs — zero image requests */
.ru-motif-svg {
    display: block;
    width: 100%;
    height: auto;
    color: var(--ru-accent);
}

.page-mark {
    display: block;
    width: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
    color: var(--ru-accent);
}

.support-header .page-mark {
    margin-left: auto;
    margin-right: auto;
}

.ru-motif-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Add class="has-motif" on main + include ru_motif_backdrop */
.has-motif {
    position: relative;
}

.has-motif > :not(.ru-motif-backdrop) {
    position: relative;
    z-index: 1;
}

.ru-motif-backdrop__bloom {
    position: absolute;
    width: clamp(120px, 18vw, 190px);
    opacity: 0.09;
}

.ru-motif-backdrop__bloom--a {
    top: 12px;
    left: -16px;
    transform: rotate(-18deg);
}

.ru-motif-backdrop__bloom--b {
    right: -12px;
    bottom: 40px;
    width: clamp(100px, 14vw, 160px);
    opacity: 0.07;
    transform: rotate(155deg) scaleX(-1);
}

.ru-motif-backdrop__bloom--c {
    top: 8px;
    left: 50%;
    width: clamp(52px, 8vw, 72px);
    opacity: 0.07;
    transform: translateX(-50%) rotate(6deg);
}

.chat-page.has-motif .ru-motif-backdrop__bloom {
    opacity: 0.05;
}

.support-header {
    text-align: center;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.support-card {
    position: relative;
    z-index: 1;
}

.support-card .support-lead {
    margin: 0 0 18px;
    color: var(--ru-ink-soft);
    line-height: 1.55;
}

@media (max-width: 700px) {
    .ru-motif-backdrop__bloom {
        opacity: 0.055;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ru-motif-backdrop__bloom {
        transform: none;
    }
}

.support-benefits {
    list-style: none;
    margin: 0 0 24px;
    padding: 18px 20px;
    border-radius: var(--ru-radius-sm);
    background: var(--ru-accent-soft);
}

.support-benefits li {
    position: relative;
    padding-left: 1.35rem;
    margin: 0 0 10px;
    color: var(--ru-ink-soft);
}

.support-benefits li:last-child {
    margin-bottom: 0;
}

.support-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--ru-accent);
    font-weight: 700;
}

.form-hint {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: var(--ru-muted);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.form-actions--stack {
    flex-direction: column;
}

.form-actions .btn,
.form-actions .primary-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    justify-content: center;
}

.form-section {
    margin-bottom: 22px;
}

#preferences-section {
    scroll-margin-top: calc(var(--ru-header-h) + 16px);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.92rem;
    font-weight: 650;
    color: var(--ru-ink);
}

/* Password field wrapper for show/hide toggle */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .form-control,
.input-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.input-toggle-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    border: none;
    background: transparent;
    color: var(--ru-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0 var(--ru-radius-sm) var(--ru-radius-sm) 0;
    transition: color 0.15s ease;
}

.input-toggle-btn:hover {
    color: var(--ru-ink-soft);
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}

.form-label-row label {
    margin-bottom: 0;
}

.form-help-link {
    font-size: 0.85rem;
    color: var(--ru-muted);
}

.auth-container input,
.auth-container select,
.auth-container textarea,
.profile-card input,
.profile-card select,
.profile-card textarea,
.form-control {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d7c7b8;
    border-radius: var(--ru-radius-sm);
    background: #fffdfb;
    font-size: 0.98rem;
    color: var(--ru-ink);
    font-family: inherit;
}

.auth-container textarea,
.profile-card textarea {
    min-height: 100px;
    resize: vertical;
}

.auth-container input[type="checkbox"],
.profile-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    accent-color: var(--ru-accent);
}

.auth-container input:focus,
.auth-container select:focus,
.auth-container textarea:focus,
.profile-card input:focus,
.profile-card select:focus,
.profile-card textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #8b5e3c;
    box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.12);
    background: #fff;
}

.section-divider {
    margin: 24px 0;
    border-top: 1px solid var(--ru-line);
}

.auth-footer-note {
    margin-top: 18px;
    color: var(--ru-muted);
    font-size: 0.9rem;
}

.consent-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.consent-row input {
    margin-top: 4px;
}

.consent-row label {
    font-size: 0.85rem;
    color: var(--ru-ink-soft);
    font-weight: 400;
    margin-bottom: 0;
}

.photo-upload-card {
    margin-top: 24px;
}

.photo-upload-card h2 {
    font-size: 1.2rem;
    margin: 0 0 8px;
}

.photo-upload-card p {
    color: var(--ru-ink-soft);
    font-size: 0.9rem;
    margin: 0 0 12px;
}

/* ===== Photo picker (create profile) ===== */
.photo-picker {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid var(--ru-line);
    border-radius: var(--ru-radius-md);
    background: #faf7f2;
}

.photo-picker-frame {
    width: 112px;
    height: 112px;
    border-radius: 22px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ru-accent-soft);
    border: 1px solid rgba(226, 213, 196, 0.9);
}

.photo-picker-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-picker-fallback {
    font-family: var(--ru-font-display);
    font-size: 2.4rem;
    font-weight: 560;
    color: var(--ru-accent);
}

.photo-picker-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.photo-picker-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.photo-picker-label {
    cursor: pointer;
    margin: 0;
}

.photo-picker-meta small {
    margin: 0;
    color: var(--ru-muted);
    font-size: 0.85rem;
}

/* ===== Profile create ===== */
.profile-card {
    width: 100%;
    background: var(--ru-surface);
    border-radius: var(--ru-radius-lg);
    padding: clamp(28px, 4vw, 36px);
    box-shadow: var(--ru-shadow);
    border: 1px solid rgba(226, 213, 196, 0.8);
}

.profile-card h1 {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    margin: 0 0 10px;
}

.profile-card h3 {
    font-size: 1.25rem;
    margin: 28px 0 16px;
}

.profile-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-card small,
.form-intro {
    display: block;
    margin-top: 6px;
    color: var(--ru-ink-soft);
}

/* ===== Page headers ===== */
.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    margin: 0 0 8px;
}

.page-header p {
    margin: 0;
    color: var(--ru-ink-soft);
}

.page-kicker {
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--ru-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

/* ===== Matches ===== */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.matches-grid--single {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 0 auto;
}

.matches-grid--single .match-card {
    padding: 26px 28px;
}

.introductions-moment {
    margin-bottom: 28px;
}

.introductions-moment-copy {
    min-width: 0;
    max-width: 42ch;
}

.matches-page:has(.matches-grid--single) .introductions-moment-copy {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.matches-page:has(.matches-grid--single) .page-mark {
    margin-left: auto;
    margin-right: auto;
}

.introductions-moment-copy h1 {
    margin: 0 0 8px;
}

.introductions-moment-copy p {
    margin: 0;
    color: var(--ru-ink-soft);
    font-size: 1.05rem;
    line-height: 1.55;
}

.match-card {
    background: var(--ru-surface);
    border-radius: var(--ru-radius-lg);
    padding: 22px;
    border: 1px solid rgba(226, 213, 196, 0.9);
    box-shadow: var(--ru-shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* New interest (priority) vs browse introductions */
.matches-priority {
    margin: 0 0 40px;
}

.matches-priority-head,
.matches-browse-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.matches-priority-head h2,
.matches-browse-head h2 {
    margin: 0;
    font-family: var(--ru-font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ru-ink);
}

.matches-browse-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.matches-browse-head p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--ru-muted);
}

.interest-inbox-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: var(--ru-radius-pill);
    background: var(--ru-accent);
    color: #fffdf9;
    font-size: 0.75rem;
    font-weight: 700;
}

.match-card--priority {
    border-color: rgba(92, 63, 44, 0.28);
    box-shadow: 0 14px 34px rgba(47, 34, 24, 0.1);
    background:
        linear-gradient(180deg, rgba(239, 230, 218, 0.65) 0%, rgba(255, 253, 249, 0) 88px),
        var(--ru-surface);
    padding: 24px 26px;
}

.match-card--browse {
    box-shadow: none;
    border-color: rgba(226, 213, 196, 0.85);
    background: rgba(255, 253, 249, 0.88);
}

.match-card--browse .match-details,
.match-card--browse .match-reasons {
    opacity: 0.92;
}

.intro-pill--priority {
    background: var(--ru-accent);
    color: #fffdf9;
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 0.78rem;
    padding: 5px 12px;
}

.match-card-actions--priority {
    flex-wrap: wrap;
}

.match-decline-form {
    margin: 0;
    padding-top: 2px;
}

.match-decline {
    background: none;
    border: none;
    padding: 4px 0;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 550;
    color: var(--ru-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.match-decline:hover {
    color: var(--ru-ink-soft);
}

.matches-page--priority .introductions-moment-copy {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: 40rem;
}

.matches-page--priority .page-mark {
    margin-left: 0;
}

.matches-page--priority .matches-grid--single {
    margin-left: 0;
    margin-right: auto;
}

.matches-browse {
    padding-top: 8px;
    border-top: 1px solid rgba(226, 213, 196, 0.65);
}

.match-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-identity-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.match-identity-copy .intro-pill {
    margin-top: 2px;
}

.intro-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--ru-radius-pill);
    background: var(--ru-success-bg);
    color: var(--ru-success-ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intro-pill--waiting {
    background: var(--ru-accent-soft);
    color: var(--ru-ink-soft);
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 0.78rem;
    padding: 5px 12px;
}

.match-meta-sep {
    margin: 0 0.15em;
}

.match-alignment {
    color: var(--ru-muted);
    font-weight: 550;
}

.match-verse {
    margin: 10px 0 0 !important;
    font-family: var(--ru-font-display);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ru-ink-soft);
    line-height: 1.45;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.match-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.avatar,
.avatar-large,
.avatar-photo,
.account-avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fffdf9;
    background: var(--ru-accent);
    overflow: hidden;
    letter-spacing: 0.02em;
}

.avatar {
    width: 56px;
    height: 56px;
    font-size: 0.95rem;
}

.avatar--md {
    width: 56px;
    height: 56px;
    font-size: 0.95rem;
}

.avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar.is-fallback .avatar-initials {
    line-height: 1;
}

.avatar-large {
    width: 84px;
    height: 84px;
    font-size: 1.35rem;
}

.avatar-photo {
    width: 56px;
    height: 56px;
}

/* Soft tone variety so initials feel like people, not one flat chip */
.avatar--tone-1,
.account-avatar.avatar--tone-1 {
    background: #5c3f2c;
}

.avatar--tone-2,
.account-avatar.avatar--tone-2 {
    background: #6b4f3a;
}

.avatar--tone-3,
.account-avatar.avatar--tone-3 {
    background: #7a5a42;
}

.avatar--tone-4,
.account-avatar.avatar--tone-4 {
    background: #4a3426;
}

.match-card h2 {
    margin: 0;
    font-size: 1.45rem;
}

.match-card h2 a {
    text-decoration: none;
    color: inherit;
}

.match-meta {
    margin: 4px 0 0;
    color: var(--ru-ink-soft);
    font-size: 0.92rem;
}

.score-badge,
.match-score {
    display: inline-flex;
    align-items: center;
    background: var(--ru-accent-soft);
    color: var(--ru-accent);
    padding: 8px 12px;
    border-radius: var(--ru-radius-pill);
    font-weight: 650;
    font-size: 0.78rem;
    white-space: nowrap;
}

.match-details p {
    margin: 0 0 8px;
    color: var(--ru-ink-soft);
    font-size: 0.95rem;
}

.match-reasons h4 {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ru-muted);
}

.match-reasons ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ru-ink-soft);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.match-reasons ul li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.match-reasons ul li::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    background: var(--ru-accent);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E");
    background-size: 10px 10px;
    background-repeat: no-repeat;
    background-position: center;
}

.match-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ru-line);
    flex-wrap: wrap;
}

.interest-sent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: var(--ru-radius-pill);
    background: var(--ru-success-bg);
    color: var(--ru-success-ink);
    font-weight: 700;
    font-size: 0.92rem;
}

/* ===== Empty states ===== */
@keyframes emptyFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.empty-state {
    background: var(--ru-surface);
    padding: 40px 28px;
    border-radius: var(--ru-radius-lg);
    text-align: center;
    color: var(--ru-ink-soft);
    border: 1px solid rgba(226, 213, 196, 0.9);
    box-shadow: var(--ru-shadow);
    animation: emptyFade 0.45s ease;
}

.empty-state-visual {
    margin: 0 auto 28px;
    width: 140px;
    height: 140px;
    background: var(--ru-accent-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.empty-state-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
}

.empty-state-mark {
    display: block;
    width: 72px;
    color: var(--ru-accent);
    opacity: 0.55;
}

.empty-state h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 12px;
}

.empty-state p {
    margin: 0 0 20px;
    font-size: 1.02rem;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Primary + quiet secondary stacked tightly */
.empty-state-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-state-secondary {
    color: var(--ru-accent);
    font-weight: 650;
    font-size: 0.92rem;
    text-decoration: none;
    padding: 2px 4px;
}

.empty-state-secondary:hover {
    text-decoration: underline;
}

.empty-state-link {
    margin: 10px 0 0;
    font-size: 0.92rem;
}

.empty-state-link a {
    color: var(--ru-accent);
    font-weight: 650;
    text-decoration: none;
}

.empty-state-link a:hover {
    text-decoration: underline;
}

/* ===== Verify email ===== */
.verify-card {
    background: var(--ru-surface);
    border-radius: var(--ru-radius-lg);
    padding: 36px 32px;
    text-align: center;
    border: 1px solid rgba(226, 213, 196, 0.9);
    box-shadow: var(--ru-shadow);
}

.verify-card .hero-badge,
.profile-card .hero-badge {
    margin-bottom: 20px;
}

.verify-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--ru-accent-soft);
    color: var(--ru-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(92, 63, 44, 0.06);
}

.verify-card h1 {
    font-size: 2rem;
    margin: 0 0 12px;
}

.verify-card p {
    color: var(--ru-ink-soft);
    margin: 0 0 24px;
}

.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    max-width: 320px;
    margin: 0 auto;
}

.verify-email-hint {
    margin-top: 18px;
    font-size: 0.88rem;
    color: var(--ru-muted);
}

/* ===== Profile detail ===== */
.back-nav {
    margin-bottom: 22px;
}

.back-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ru-ink-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px 6px 8px;
    border-radius: var(--ru-radius-pill);
    border: 1px solid var(--ru-line);
    background: var(--ru-surface);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.back-nav a:hover {
    border-color: #cbb79f;
    color: var(--ru-ink);
    background: var(--ru-accent-soft);
    text-decoration: none;
}

.back-nav a svg {
    flex-shrink: 0;
}

.profile-detail-card {
    background: var(--ru-surface);
    border-radius: var(--ru-radius-lg);
    padding: 28px;
    border: 1px solid rgba(226, 213, 196, 0.9);
    box-shadow: var(--ru-shadow);
}

.profile-detail-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ru-line);
}

.profile-detail-header h1 {
    margin: 0 0 6px;
    font-size: 1.9rem;
}

.profile-detail-header p {
    margin: 0;
    color: var(--ru-ink-soft);
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.detail-section p {
    margin: 0;
    color: var(--ru-ink-soft);
    line-height: 1.65;
}

.hobbies-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hobby-tag {
    background: var(--ru-accent-soft);
    color: var(--ru-accent);
    padding: 6px 12px;
    border-radius: var(--ru-radius-pill);
    font-size: 0.85rem;
    font-weight: 650;
}

.interest-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--ru-line);
}

.safety-trigger {
    margin-top: 28px;
    text-align: center;
    border-top: 1px solid var(--ru-line);
    padding-top: 18px;
}

.safety-trigger button {
    background: none;
    border: none;
    font-size: 0.82rem;
    color: var(--ru-muted);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: var(--ru-radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}

.safety-trigger button:hover {
    color: var(--ru-ink-soft);
    background: rgba(92, 63, 44, 0.06);
    text-decoration: none;
}

/* Profile detail — meta chips (age, location) */
.profile-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 0;
}

.profile-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.88rem;
    color: var(--ru-ink-soft);
    background: var(--ru-bg-deep);
    padding: 4px 10px;
    border-radius: var(--ru-radius-pill);
    border: 1px solid rgba(226, 213, 196, 0.8);
}

/* Detail section headers with icon */
.detail-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ru-ink);
}

.detail-section-title svg {
    flex-shrink: 0;
    color: var(--ru-accent);
    opacity: 0.8;
}

/* Bible verse styling */
.bible-verse-text {
    font-family: var(--ru-font-display);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--ru-ink-soft);
    border-left: 3px solid var(--ru-line);
    padding-left: 14px;
    margin: 0;
    line-height: 1.6;
}

/* Login trust marks */
.login-trust-marks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--ru-line);
}

.trust-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--ru-ink-soft);
}

.trust-mark svg {
    flex-shrink: 0;
    color: var(--ru-accent);
    opacity: 0.75;
}

.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(47, 34, 24, 0.45);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-backdrop.is-open {
    display: block;
}

.modal-panel {
    background: var(--ru-surface);
    padding: 24px;
    border-radius: var(--ru-radius-md);
    width: 90%;
    max-width: 360px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--ru-shadow);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ru-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-panel p {
    font-size: 0.88rem;
    color: var(--ru-ink-soft);
    margin: 0 0 12px;
}

.modal-panel select,
.modal-panel input[type="text"] {
    width: 100%;
    padding: 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--ru-line);
    margin-bottom: 12px;
    font-size: 0.92rem;
    background: #fff;
    font-family: inherit;
}

/* ===== Conversations ===== */
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conversation-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--ru-surface);
    border: 1px solid rgba(226, 213, 196, 0.9);
    border-radius: var(--ru-radius-md);
    padding: 16px 18px;
    text-decoration: none;
    color: var(--ru-ink);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.conversation-row:hover {
    border-color: #cbb79f;
    transform: translateY(-1px);
}

.conversation-row-main strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.conversation-preview {
    color: var(--ru-ink-soft);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48ch;
}

.conversation-meta {
    text-align: right;
    color: var(--ru-muted);
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.conversation-row-arrow {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    color: var(--ru-muted);
}

.conversation-row:hover .conversation-row-arrow {
    opacity: 1;
    transform: translateX(0);
}

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

/* Beat .has-motif > * { z-index: 1 } so the More panel isn't covered by the backdrop */
.chat-page.has-motif > .chat-toolbar {
    z-index: 2;
}

.chat-toolbar-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.chat-toolbar h1 {
    margin: 0;
    font-size: 1.5rem;
}

.chat-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.safety-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: var(--ru-accent-soft);
    border: 1px solid var(--ru-line);
    border-radius: var(--ru-radius-sm);
    padding: 14px 16px;
    margin: 0 0 16px;
    color: var(--ru-ink-soft);
}

.safety-banner[hidden] {
    display: none !important;
}

.safety-banner-text {
    flex: 1;
    font-size: 0.92rem;
}

.safety-banner-dismiss {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--ru-accent);
    font-weight: 700;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 4px;
}

.overflow-menu {
    position: relative;
}

.overflow-menu-trigger {
    list-style: none;
    cursor: pointer;
}

.overflow-menu-trigger::-webkit-details-marker {
    display: none;
}

.overflow-menu-trigger::marker {
    content: "";
}

.overflow-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: var(--ru-surface);
    border: 1px solid var(--ru-line);
    border-radius: var(--ru-radius-sm);
    box-shadow: 0 16px 36px rgba(47, 34, 24, 0.16);
    padding: 8px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.overflow-menu-panel form {
    margin: 0;
}

.overflow-menu-panel button {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 550;
    color: var(--ru-ink);
    cursor: pointer;
}

.overflow-menu-panel button:hover {
    background: var(--ru-accent-soft);
}

.plan-limit-banner {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: var(--ru-radius-sm);
    background: var(--ru-warning-bg);
    color: var(--ru-warning-ink);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: space-between;
}

.plan-limit-banner p {
    margin: 0;
    font-size: 0.92rem;
}

.plan-limit-banner a {
    font-weight: 700;
}

.alert-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.alert-hint {
    font-size: 0.9rem;
}

.message-thread {
    background: var(--ru-surface);
    border: 1px solid rgba(226, 213, 196, 0.9);
    border-radius: var(--ru-radius-md);
    min-height: 320px;
    max-height: 480px;
    overflow-y: auto;
    padding: 20px 18px;
    scroll-behavior: smooth;
}

.msg {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.msg.is-mine {
    align-items: flex-end;
}

.msg-bubble {
    display: inline-block;
    max-width: 75%;
    padding: 11px 15px;
    border-radius: 18px;
    background: var(--ru-accent-soft);
    color: var(--ru-ink);
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.5;
    border-radius: 4px 18px 18px 18px;
    word-break: break-word;
}

.msg.is-mine .msg-bubble {
    background: var(--ru-accent);
    color: #fffdf9;
    border-radius: 18px 4px 18px 18px;
}

.msg-time {
    font-size: 0.72rem;
    color: var(--ru-muted);
    margin-top: 5px;
    padding: 0 4px;
}

.chat-compose {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    align-items: stretch;
    background: var(--ru-surface);
    border: 1px solid #d7c7b8;
    border-radius: var(--ru-radius-pill);
    padding: 6px 6px 6px 18px;
    box-shadow: 0 2px 8px rgba(47, 34, 24, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-compose:focus-within {
    border-color: #8b5e3c;
    box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.1);
}

.chat-compose input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ru-ink);
    padding: 6px 0;
    outline: none;
    min-width: 0;
}

.chat-compose input[type="text"]::placeholder {
    color: var(--ru-muted);
}

.chat-compose .btn {
    border-radius: var(--ru-radius-pill);
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-compose .btn svg {
    flex-shrink: 0;
}

.plan-note {
    margin-top: 22px;
    color: var(--ru-muted);
    font-size: 0.9rem;
}

/* ===== How it works (home) ===== */
.how-it-works {
    width: 100%;
    border-top: 1px solid var(--ru-line);
    background: #faf7f2;
}

.how-it-works-inner {
    max-width: var(--ru-max);
    margin: 0 auto;
    padding: 56px var(--ru-space-page) 72px;
}

.how-it-works h2 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.how-it-works-lead {
    margin: 0 0 36px;
    color: var(--ru-ink-soft);
    max-width: 40ch;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.how-step {
    background: var(--ru-surface);
    border: 1px solid rgba(226, 213, 196, 0.85);
    border-radius: var(--ru-radius-md);
    padding: 28px 24px;
    box-shadow: 0 4px 16px rgba(47, 34, 24, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.how-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(47, 34, 24, 0.09);
}

.how-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ru-accent);
    color: #fffdf9;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.how-step h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.how-step p {
    margin: 0;
    color: var(--ru-ink-soft);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* ===== Digital resources ===== */
.section-eyebrow,
.resource-type {
    margin: 0 0 12px;
    color: var(--ru-gold, #9a7538);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-resources,
.resources-collection {
    width: 100%;
    border-top: 1px solid var(--ru-line);
    background: var(--ru-bg, #fffaf3);
}

.resources-section-inner {
    width: 100%;
    max-width: var(--ru-max);
    margin: 0 auto;
    padding: 72px var(--ru-space-page);
}

.resources-section-heading {
    max-width: 720px;
    margin-bottom: 38px;
}

.resources-section-heading h2,
.resources-page-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.resources-section-heading > p:last-child,
.resources-page-intro > p:last-child {
    margin: 0;
    color: var(--ru-ink-soft);
    font-size: 1.04rem;
    line-height: 1.7;
    max-width: 62ch;
}

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

.resource-card {
    min-width: 0;
    overflow: hidden;
    background: var(--ru-surface);
    border: 1px solid rgba(226, 213, 196, 0.9);
    border-radius: var(--ru-radius-md);
    box-shadow: 0 8px 28px rgba(47, 34, 24, 0.07);
}

.resource-card-cover {
    display: block;
    padding: 28px 28px 0;
    background: linear-gradient(180deg, #f4ecdf 0%, #fbf7f0 100%);
}

.resource-card-cover img {
    display: block;
    width: min(100%, 430px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    object-fit: contain;
    box-shadow: 0 16px 36px rgba(47, 34, 24, 0.13);
}

.resource-card-content {
    padding: 28px 30px 32px;
}

.resource-card h3 {
    margin: 0 0 12px;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.resource-card h3 a,
.resource-explore-link,
.resources-view-all,
.resource-back-link {
    color: var(--ru-ink);
    text-decoration: none;
}

.resource-description {
    min-height: 5.1em;
    margin: 0 0 18px;
    color: var(--ru-ink-soft);
    line-height: 1.7;
}

.resource-price {
    margin: 0 0 18px;
    color: var(--ru-accent);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.resource-explore-link,
.resources-view-all,
.resource-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 650;
}

.resource-explore-link:hover,
.resources-view-all:hover,
.resource-back-link:hover {
    color: var(--ru-accent);
}

.resources-view-all {
    margin-top: 30px;
}

.resources-page-intro {
    padding-top: 72px;
    padding-bottom: 52px;
    text-align: center;
}

.resources-page-intro > p:last-child {
    margin-right: auto;
    margin-left: auto;
}

.resources-collection {
    border-bottom: 1px solid var(--ru-line);
    background: #faf7f2;
}

.resource-detail-hero {
    gap: clamp(40px, 7vw, 88px);
    padding-top: 64px;
    padding-bottom: 80px;
}

.resource-detail-cover img {
    display: block;
    width: min(100%, 540px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    object-fit: contain;
    box-shadow: 0 22px 55px rgba(47, 34, 24, 0.16);
}

.resource-back-link {
    margin-bottom: 34px;
    color: var(--ru-ink-soft);
    font-size: 0.9rem;
}

.resource-detail-summary h1 {
    margin: 0 0 20px;
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    line-height: 1.02;
}

.resource-detail-positioning {
    margin: 0 0 24px;
    color: var(--ru-ink-soft);
    font-size: 1.08rem;
    line-height: 1.75;
}

.resource-price--large {
    font-size: 1.25rem;
}

.resource-purchase-cta {
    text-align: center;
}

.resource-checkout-note {
    margin: 14px 0 0;
    color: var(--ru-muted);
    font-size: 0.84rem;
}

.resource-editorial-sections {
    width: min(calc(100% - (2 * var(--ru-space-page))), 860px);
    margin: 0 auto;
    padding: 0 0 80px;
}

.resource-editorial-sections section {
    padding: 42px 0;
    border-top: 1px solid var(--ru-line);
}

.resource-editorial-sections h2,
.resource-final-cta h2 {
    margin: 0 0 16px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.resource-editorial-sections section > p:last-child,
.resource-final-cta-inner > p:not(.section-eyebrow):not(.resource-price):not(.resource-checkout-note) {
    color: var(--ru-ink-soft);
    line-height: 1.75;
}

.resource-benefit-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.resource-benefit-list li {
    position: relative;
    padding-left: 28px;
    color: var(--ru-ink-soft);
    line-height: 1.65;
}

.resource-benefit-list li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ru-gold, #9a7538);
}

.resource-final-cta {
    padding: 72px var(--ru-space-page);
    border-top: 1px solid var(--ru-line);
    background: #faf7f2;
    text-align: center;
}

.resource-final-cta-inner {
    max-width: 700px;
    margin: 0 auto;
}

.resource-final-cta .resource-price {
    margin-top: 22px;
}

/* ===== Membership ===== */
.membership-closed-note {
    margin-bottom: 20px;
}

.membership-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
    width: 100%;
}

.membership-cta-row {
    align-items: stretch;
}

.plan-card {
    background: var(--ru-surface);
    border: 1px solid rgba(226, 213, 196, 0.9);
    border-radius: var(--ru-radius-lg);
    padding: 28px;
    box-shadow: var(--ru-shadow);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.plan-card-body {
    flex: 1 1 auto;
}

.plan-card-footer {
    margin-top: 22px;
}

.plan-card-footer .btn,
.plan-card-footer .btn.is-disabled {
    width: 100%;
}

.plan-card h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.plan-card .plan-price {
    margin: 0 0 14px;
    color: var(--ru-ink-soft);
    font-weight: 650;
}

.plan-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ru-ink-soft);
    line-height: 1.8;
}

.plan-card.is-featured {
    background: var(--ru-ink);
    color: #f5f1ea;
    border-color: var(--ru-ink);
}

.plan-card.is-featured h2,
.plan-card.is-featured .plan-price,
.plan-card.is-featured ul {
    color: #f5f1ea;
}

.plan-note--on-dark {
    color: #d7c7b8 !important;
}

.plan-card .btn.on-dark {
    background: #f5f1ea;
    color: var(--ru-ink);
}

.plan-card .btn.on-dark:hover {
    background: #fff;
}

.plan-card .btn.on-dark.is-disabled,
.btn.on-dark.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.plan-status {
    margin-top: 0;
    font-weight: 700;
}

.plan-status--current {
    display: inline-block;
    margin: 0 0 12px;
    padding: 6px 12px;
    border-radius: var(--ru-radius-pill);
    background: var(--ru-success-bg);
    color: var(--ru-success-ink);
    font-size: 0.85rem;
}

.plan-card.is-featured .plan-status--current {
    background: rgba(245, 241, 234, 0.18);
    color: #f5f1ea;
}

.plan-card.is-current {
    border-color: #cbb79f;
}

.plan-compare-wrap {
    width: 100%;
}

/* ===== Footer ===== */
.global-footer {
    margin-top: auto;
    padding: 28px var(--ru-space-page);
    text-align: center;
    border-top: 1px solid var(--ru-line);
    background: #faf8f5;
    font-size: 0.85rem;
    color: var(--ru-muted);
    width: 100%;
}

.global-footer--app {
    padding: 18px var(--ru-space-page);
    font-size: 0.78rem;
    background: transparent;
}

.global-footer--app .footer-links {
    gap: 20px 28px;
}

.footer-inner {
    max-width: var(--ru-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.global-footer--app .footer-inner {
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 16px 28px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6d5b4a;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-social-link svg {
    flex: 0 0 auto;
}

.footer-social-link:focus-visible {
    outline: 2px solid var(--ru-accent);
    outline-offset: 4px;
    border-radius: 2px;
}

.global-footer p {
    margin: 0;
}

.global-footer p a {
    color: #6d5b4a;
    text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .page-shell--split,
    .content-band,
    .hero-content,
    .signup-layout,
    .matches-grid,
      .membership-grid,
      .how-steps,
      .resource-grid {
          grid-template-columns: 1fr;
      }

      .resource-description {
          min-height: 0;
      }

    body:has(.app-tabs) {
        padding-bottom: 72px;
    }

    .app-tabs {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        background: var(--ru-header);
        border-top: 1px solid var(--ru-line);
        box-shadow: 0 -4px 18px rgba(47, 34, 24, 0.06);
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
        gap: 4px;
    }

    .app-tab {
        flex: 1;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        text-decoration: none;
        color: var(--ru-muted);
        font-size: 0.72rem;
        font-weight: 650;
        border-radius: var(--ru-radius-sm);
        transition: color 0.15s ease, background 0.15s ease;
        position: relative;
    }

    .app-tab svg {
        transition: transform 0.15s ease;
    }

    .app-tab.is-active {
        color: var(--ru-accent);
    }

    .app-tab.is-active svg {
        transform: translateY(-1px);
    }

    .app-tab .nav-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 18px);
        margin: 0;
    }

    body:has(.app-tabs) .nav-link--tabbed {
        display: none;
    }

    .global-footer--app {
        margin-bottom: 0;
    }

    .page-shell,
    .content-band,
    .hero-content,
    .signup-layout,
    .matches-page,
    .page,
    .page-container,
    .profile-page,
    .profile-detail-page,
    .conversations-page,
    .chat-page,
    .membership-page,
    .verify-page,
    .policy-shell {
        --ru-page-top: 40px;
        --ru-page-bottom: 64px;
        padding-top: var(--ru-page-top);
        padding-bottom: var(--ru-page-bottom);
    }

    .page-shell--split,
    .content-band,
    .hero-content,
    .signup-layout {
        gap: 36px;
    }

    .hero-image img,
    .about-image img {
        height: 340px;
    }

    .match-preview-card {
        width: min(280px, calc(100% - 32px));
        left: 16px;
        bottom: 16px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(var(--ru-header-h) - 4px);
        left: 0;
        right: 0;
        background: var(--ru-header);
        border-bottom: 1px solid var(--ru-line);
        padding: 12px var(--ru-space-page) 18px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        box-shadow: var(--ru-shadow);
    }

    .site-header.is-open .nav-links {
        display: flex;
    }

    .nav-user,
    .account-menu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        width: 100%;
        padding-top: 8px;
        margin-top: 6px;
        border-top: 1px solid var(--ru-line);
    }

    .account-menu-trigger {
        width: 100%;
        justify-content: flex-start;
    }

    .account-menu-panel {
        position: static;
        box-shadow: none;
        border: none;
        padding: 4px 0 0;
        min-width: 0;
    }

    .nav-onboarding-note {
        width: 100%;
    }

    .profile-card .form-row {
        grid-template-columns: 1fr;
    }

    .conversation-preview {
        max-width: 28ch;
    }
}

@media (max-width: 640px) {
    .match-header {
        flex-direction: column;
    }

    .conversation-row {
        grid-template-columns: auto 1fr;
    }

    .conversation-meta {
        grid-column: 2;
        text-align: left;
    }

    .photo-picker {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}
