:root {
    --cream: #fbf7ef;
    --cream-deep: #f1e6d5;
    --paper: #ffffff;
    --ink: #2d211d;
    --muted: #746761;
    --maroon: #661623;
    --maroon-dark: #3c0811;
    --maroon-soft: #8f2f3d;
    --gold: #d6aa4a;
    --gold-dark: #9b6f1f;
    --gold-pale: #f4e8c8;
    --border: #e6d9c7;
    --success: #2e7d59;
    --danger: #b43a3a;
    --warning: #9a681c;
    --shadow: 0 22px 60px rgba(65, 31, 19, .12);
    --radius: 22px;

    /* Compatibility aliases used by the existing secure account templates. */
    --bg: var(--cream);
    --surface: var(--paper);
    --surface-2: #f7efe3;
    --text: var(--ink);
    --primary: var(--maroon);
    --primary-dark: var(--maroon-dark);
    --accent: var(--gold);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--cream);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

button, input, textarea, select { font: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-soft); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.08; }
p { color: var(--muted); }

.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.narrow-container { width: min(700px, calc(100% - 2rem)); }
.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 1000;
    padding: .7rem 1rem;
    color: white;
    background: var(--maroon);
    border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(154, 111, 31, .2);
    background: rgba(251, 247, 239, .95);
    backdrop-filter: blur(16px);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo-frame { position: relative; width: 56px; height: 58px; overflow: hidden; flex: 0 0 auto; }
.brand-logo-frame img { position: absolute; width: 285px; max-width: none; left: -14px; top: -12px; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-family: Georgia, "Times New Roman", serif; color: var(--maroon); font-size: 1.15rem; }
.brand-copy small { margin-top: .3rem; color: var(--gold-dark); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 1.35rem; }
.site-nav > a:not(.button), .nav-button { color: #554843; font-size: .9rem; font-weight: 750; }
.inline-form { display: inline; margin: 0; }
.nav-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { display: grid; gap: 5px; width: 42px; height: 42px; place-content: center; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span { width: 20px; height: 2px; background: var(--maroon); }
.mobile-menu nav { position: absolute; right: 0; top: 50px; display: grid; min-width: 220px; padding: .65rem; border: 1px solid var(--border); background: white; border-radius: 14px; box-shadow: var(--shadow); }
.mobile-menu nav a, .mobile-menu nav button { display: block; width: 100%; padding: .75rem; text-align: left; }
.mobile-menu nav form { margin: 0; }

/* Buttons and shared labels */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: .78rem 1.2rem;
    border: 1px solid var(--maroon);
    color: white;
    background: var(--maroon);
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.button:hover { color: white; background: var(--maroon-soft); transform: translateY(-1px); box-shadow: 0 10px 25px rgba(102, 22, 35, .14); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-small { min-height: 40px; padding: .5rem .9rem; font-size: .88rem; }
.button-full { width: 100%; }
.button-secondary { color: var(--maroon); border-color: var(--border); background: var(--paper); }
.button-secondary:hover { color: var(--maroon); background: var(--gold-pale); }
.button-gold { color: #321d05; border-color: var(--gold); background: var(--gold); }
.button-gold:hover { color: #321d05; background: #e3be69; }
.button-ghost-light { color: white; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.06); }
.button-ghost-light:hover { color: white; background: rgba(255,255,255,.13); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.eyebrow { display: inline-block; margin-bottom: .9rem; color: var(--gold-dark); font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.light-eyebrow { color: #edcc80; }
.section-title { margin-bottom: 1rem; color: var(--maroon-dark); font-size: clamp(2rem, 4.6vw, 3.7rem); letter-spacing: -.035em; }
.centered-heading { max-width: 750px; margin-inline: auto; text-align: center; }
.centered-heading p { font-size: 1.05rem; }

/* Public landing page */
.project-hero {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
    background:
        radial-gradient(circle at 16% 20%, rgba(214, 170, 74, .18), transparent 26rem),
        linear-gradient(135deg, var(--maroon-dark), var(--maroon) 68%, #781e2a);
}
.project-hero::after { content: ""; position: absolute; right: -10rem; bottom: -14rem; width: 35rem; height: 35rem; border: 1px solid rgba(214,170,74,.24); border-radius: 50%; }
.hero-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(2rem, 7vw, 6rem); }
.hero-copy-block h1 { margin-bottom: 1.35rem; color: white; font-size: clamp(3.2rem, 7.2vw, 6rem); letter-spacing: -.05em; }
.hero-copy-block h1 em { color: #ebc972; font-style: italic; font-weight: 500; }
.hero-lead { max-width: 670px; margin-bottom: 2rem; color: rgba(255,255,255,.76); font-size: clamp(1rem, 2vw, 1.18rem); }
.trust-row { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; margin-top: 2rem; color: rgba(255,255,255,.7); font-size: .78rem; font-weight: 700; }
.trust-row span::before { content: "\2713"; margin-right: .4rem; color: #edcc80; }
.hero-portrait-wrap { position: relative; max-width: 500px; justify-self: end; }
.hero-portrait-wrap > img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: center 20%; border: 1px solid rgba(255,255,255,.24); border-radius: 220px 220px 28px 28px; box-shadow: 0 30px 80px rgba(15,0,3,.36); }
.portrait-caption { position: absolute; right: -1rem; bottom: 1.2rem; padding: 1rem 1.2rem; color: var(--maroon-dark); background: rgba(252,247,237,.94); border-radius: 14px; box-shadow: var(--shadow); }
.portrait-caption span, .portrait-caption strong { display: block; }
.portrait-caption span { color: var(--gold-dark); font-size: .65rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.portrait-caption strong { margin-top: .3rem; font-family: Georgia, "Times New Roman", serif; line-height: 1.25; }

.mission-section { padding: clamp(4rem, 9vw, 7rem) 0; background: var(--cream); }
.mission-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 7vw, 6rem); }
.mission-copy > p { margin-bottom: 2rem; font-size: 1.08rem; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.principle-grid article { padding-top: 1rem; border-top: 2px solid var(--gold); }
.principle-grid strong, .principle-grid span { display: block; }
.principle-grid strong { color: var(--maroon); }
.principle-grid span { margin-top: .35rem; color: var(--muted); font-size: .84rem; }

.membership-section, .warm-section { padding: clamp(4rem, 8vw, 6.5rem) 0; background: #f4eadb; }
.section-heading { margin-bottom: 2.25rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; max-width: 940px; margin: 0 auto; }
.price-card { position: relative; padding: clamp(1.5rem, 4vw, 2.35rem); border: 1px solid var(--border); background: var(--paper); border-radius: 24px; box-shadow: 0 18px 55px rgba(78,48,28,.08); }
.price-card.featured-price { color: white; border-color: var(--maroon); background: linear-gradient(145deg, var(--maroon), var(--maroon-dark)); }
.featured-price p, .featured-price li { color: rgba(255,255,255,.76); }
.plan-label { display: inline-block; color: var(--gold-dark); font-size: .75rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.featured-price .plan-label { color: #edcc80; }
.price-card h3, .price { margin: 1rem 0; color: var(--maroon-dark); font-size: clamp(2.4rem, 5vw, 3.6rem); }
.featured-price h3, .featured-price .price { color: white; }
.price-card h3 > span, .price > span { font-family: Inter, sans-serif; font-size: .68rem; letter-spacing: .08em; }
.price-card h3 small, .price small { font-family: Inter, sans-serif; font-size: .85rem; font-weight: 600; }
.recommended { position: absolute; top: 1rem; right: 1rem; padding: .36rem .65rem; color: #3b2106; background: var(--gold); border-radius: 999px; font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.check-list { display: grid; gap: .7rem; margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.check-list li { color: #665852; font-size: .9rem; }
.check-list li::before { content: "\2713"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: .6rem; color: var(--success); background: #e6f2eb; border-radius: 50%; font-size: .7rem; font-weight: 900; }
.featured-price .check-list li::before { color: #442801; background: var(--gold); }
.selected-plan { outline: 3px solid rgba(214,170,74,.55); outline-offset: 3px; }
.renewal-note { max-width: 760px; margin: 1.5rem auto 0; text-align: center; font-size: .78rem; }
.active-member-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 920px; margin: 0 auto; padding: 1.25rem; border: 1px solid #a7cdb9; background: #edf8f1; border-radius: 18px; }
.active-member-banner strong, .active-member-banner span { display: block; }
.active-member-banner strong { color: var(--success); }
.active-member-banner span { color: var(--muted); font-size: .9rem; }
.payment-explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1050px; margin: 3rem auto 0; }
.payment-explainer div { padding: 1.15rem; border-top: 1px solid #cdbb9f; }
.payment-explainer strong, .payment-explainer span { display: block; }
.payment-explainer strong { color: var(--maroon); }
.payment-explainer span { margin-top: .35rem; color: var(--muted); font-size: .83rem; }

.final-cta { padding: clamp(3rem, 7vw, 5rem) 0; background: var(--maroon-dark); }
.final-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.final-cta h2 { max-width: 760px; margin: 0; color: white; font-size: clamp(2rem, 4vw, 3.4rem); }

/* Page headings and authentication */
.page-hero { padding: clamp(3.5rem, 8vw, 6rem) 0; color: white; background: linear-gradient(135deg, var(--maroon-dark), var(--maroon)); }
.compact-page-hero { padding-block: clamp(3rem, 6vw, 4.5rem); }
.page-hero h1 { margin-bottom: .9rem; color: white; font-size: clamp(2.5rem, 6vw, 4.4rem); }
.page-hero p { color: rgba(255,255,255,.72); }
.page-section { min-height: calc(100vh - 165px); padding: clamp(3rem, 7vw, 5.5rem) 0; }
.page-heading { margin-bottom: 1.7rem; }
.page-heading h1, .dashboard-heading h1, .two-column-layout h1 { margin-bottom: .55rem; color: var(--maroon-dark); font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-heading p { font-size: 1.02rem; }
.card, .feature-card, .dashboard-panel { border: 1px solid var(--border); background: var(--paper); border-radius: var(--radius); box-shadow: 0 14px 45px rgba(65,31,19,.07); }
.form-card { padding: clamp(1.3rem, 4vw, 2rem); }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: .4rem; color: var(--ink); font-size: .88rem; font-weight: 800; }
.optional { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; padding: .85rem .9rem; color: var(--ink); border: 1px solid #d5c5b2; outline: 0; background: #fffdf9; border-radius: 10px; }
input:focus, textarea:focus, select:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(214,170,74,.2); }
input[type="file"] { padding: .65rem; }
.help-text, .muted-line { margin-top: .35rem; color: #8a7c75; font-size: .8rem; }
.field-error { margin-top: .35rem; color: var(--danger); font-size: .84rem; }
.form-errors, .notice { margin-bottom: 1rem; padding: .85rem 1rem; color: #584b45; border: 1px solid var(--border); background: #fffaf2; border-radius: 10px; }
.form-errors, .notice-danger { color: var(--danger); border-color: #e6b4b4; background: #fff3f3; }
.errorlist { margin: 0; padding-left: 1.2rem; }
.card-footnote, .center-note { margin: 1.25rem 0 0; text-align: center; }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; max-width: 930px; margin: 0 auto; }
.card-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.card-heading h2, .card-heading p { margin-bottom: 0; }
.card-number { color: var(--gold-dark); font-size: .74rem; font-weight: 900; letter-spacing: .08em; }
.passkey-card { border-color: #d9c18a; }
.privacy-note { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .8rem; }
.inline-status { min-height: 1.5rem; margin-top: .8rem; font-size: .86rem; }
.status-error { color: var(--danger); }
.status-success { color: var(--success); }
.status-working { color: var(--warning); }

.messages { padding-top: 1rem; }
.message { padding: .8rem 1rem; border: 1px solid var(--border); background: white; border-radius: 10px; box-shadow: 0 8px 25px rgba(65,31,19,.06); }
.message-success { color: var(--success); border-color: #a7cdb9; }
.message-warning, .message-error { color: var(--danger); border-color: #e3b2b2; }

/* Member dashboard */
.member-shell { min-height: 75vh; padding: clamp(2.5rem, 6vw, 5rem) 0; background: #f7efe4; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.dashboard-heading h1 { margin-bottom: .35rem; }
.dashboard-heading p { margin-bottom: 0; }
.member-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.summary-card { padding: 1.4rem; border: 1px solid var(--border); background: white; border-radius: 18px; }
.summary-card > span, .summary-card > small { display: block; color: var(--muted); }
.summary-card > span { font-size: .77rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.summary-card > strong { display: block; margin: .45rem 0; color: var(--maroon); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.summary-card > strong.date-value { font-size: 1.45rem; }
.summary-card > small { font-size: .78rem; }
.accent-card { color: white; border-color: var(--maroon); background: linear-gradient(145deg, var(--maroon), var(--maroon-dark)); }
.accent-card > span, .accent-card > small { color: rgba(255,255,255,.7); }
.accent-card > strong { color: #edcc80; }
.dashboard-content-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; margin-bottom: 1rem; }
.dashboard-panel { padding: clamp(1.15rem, 3vw, 1.7rem); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.panel-heading h2 { margin: .15rem 0 0; color: var(--maroon-dark); font-size: 1.5rem; }
.panel-kicker { color: var(--gold-dark); font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; min-height: 29px; padding: .23rem .65rem; color: #655a55; border: 1px solid var(--border); background: #f8f3ec; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status-active, .status-trialing, .status-paid, .status-approved { color: var(--success); border-color: #abd0bb; background: #edf8f1; }
.status-past_due, .status-failed, .status-unpaid, .status-canceled, .status-rejected { color: var(--danger); border-color: #e5b5b5; background: #fff1f1; }
.status-incomplete, .status-incomplete_expired, .status-open, .status-paused, .status-pending { color: var(--warning); border-color: #e7c98d; background: #fff8e9; }
.membership-details { margin: 0 0 1.35rem; }
.membership-details > div { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.membership-details dt { color: var(--muted); }
.membership-details dd { margin: 0; text-align: right; font-weight: 750; }
.empty-membership, .empty-ledger { padding: 1.3rem 0; text-align: center; }
.empty-membership > span, .empty-ledger > span { color: var(--gold); font-size: 2.5rem; }
.empty-membership h3, .empty-ledger h2 { color: var(--maroon-dark); }
.account-panel h2 { margin: .6rem 0 .2rem; color: var(--maroon-dark); }
.account-links { display: grid; gap: .65rem; margin-top: 1.4rem; }
.account-links a { display: grid; padding: .85rem; border: 1px solid var(--border); border-radius: 12px; }
.account-links span { font-weight: 800; }
.account-links small { margin-top: .2rem; color: var(--muted); line-height: 1.4; }
.transaction-panel { margin-top: 0; }
.text-link { font-weight: 800; }
.panel-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.panel-actions form { margin: 0; }
.link-button {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--maroon);
    font: inherit;
    cursor: pointer;
}
.link-button:hover { color: var(--gold-dark); text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.transaction-table { width: 100%; border-collapse: collapse; }
.transaction-table th, .transaction-table td { padding: .9rem .75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.transaction-table th { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.transaction-table td { font-size: .86rem; }
.transaction-table tr:last-child td { border-bottom: 0; }
.invoice-id { display: inline-block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.muted { color: var(--muted); }
.table-empty { padding: 2rem; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-top: 1.5rem; }
.pagination a { padding: .5rem .75rem; border: 1px solid var(--border); background: var(--cream); border-radius: 8px; font-weight: 750; }

/* Compatibility for vendor/status pages retained from the secure account base. */
.feature-grid, .dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding-bottom: 5rem; }
.feature-card, .dashboard-card { padding: 1.45rem; }
.feature-icon, .key-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--maroon); border: 1px solid var(--border); background: var(--gold-pale); border-radius: 12px; font-weight: 900; }
.role-badge { display: inline-flex; padding: .25rem .65rem; border: 1px solid var(--border); border-radius: 999px; }
.two-column-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); gap: clamp(2rem, 6vw, 5rem); }
.top-gap { margin-top: 2rem; }
.section-label { margin-bottom: .8rem; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stack-list { display: grid; gap: .8rem; }
.key-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.1rem; }
.key-details h2, .key-details p { margin-bottom: .2rem; }
.key-details p, .key-details small { display: block; color: var(--muted); font-size: .8rem; }
.danger-button { padding: .45rem .65rem; color: var(--danger); border: 1px solid #e5b5b5; background: transparent; border-radius: 8px; cursor: pointer; }
.empty-state, .status-card { padding: 2rem; text-align: center; }
.status-details { max-width: 500px; margin: 1.5rem auto; text-align: left; border-top: 1px solid var(--border); }
.status-details > div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.status-details dd { margin: 0; text-align: right; font-weight: 700; }

/* Footer */
.site-footer { padding: 2.5rem 0; color: rgba(255,255,255,.72); background: #29070d; }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.footer-grid strong { color: #edcc80; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; }
.footer-grid p { max-width: 520px; margin: .45rem 0 0; color: rgba(255,255,255,.58); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; }
.footer-links a { color: #edcc80; }

@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .mobile-menu { display: block; }
    .hero-layout, .mission-grid, .dashboard-content-grid, .two-column-layout { grid-template-columns: 1fr; }
    .hero-portrait-wrap { width: min(100%, 480px); justify-self: center; }
    .project-hero { padding-bottom: 4rem; }
    .principle-grid, .payment-explainer { grid-template-columns: 1fr; }
    .member-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .member-summary-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .pricing-grid, .auth-grid, .feature-grid, .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-heading, .active-member-banner, .final-cta-inner, .footer-grid { align-items: flex-start; flex-direction: column; }
    .active-member-banner .button, .final-cta .button { width: 100%; }
    .portrait-caption { right: .5rem; bottom: .5rem; max-width: calc(100% - 1rem); }
    .recommended { position: static; margin-bottom: .8rem; }
    .transaction-table thead { display: none; }
    .transaction-table, .transaction-table tbody, .transaction-table tr, .transaction-table td { display: block; width: 100%; }
    .transaction-table tr { margin-bottom: .85rem; padding: .4rem .8rem; border: 1px solid var(--border); background: #fffdf9; border-radius: 12px; }
    .transaction-table td { display: grid; grid-template-columns: minmax(90px, .7fr) 1.3fr; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--border); text-align: right; }
    .transaction-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
    .transaction-table tr:last-child td, .transaction-table td:last-child { border-bottom: 0; }
    .invoice-id { margin-left: auto; }
    .table-wrap { overflow: visible; }
}

@media (max-width: 520px) {
    .container, .narrow-container { width: min(100% - 1.15rem, 1180px); }
    .nav-wrap { min-height: 70px; }
    .brand-logo-frame { width: 46px; height: 50px; }
    .brand-logo-frame img { width: 245px; left: -13px; top: -10px; }
    .brand-copy strong { font-size: 1rem; }
    .brand-copy small { display: none; }
    .hero-copy-block h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
    .hero-copy-block .button { width: 100%; }
    .hero-portrait-wrap > img { border-radius: 150px 150px 22px 22px; }
    .member-summary-grid { grid-template-columns: 1fr; }
    .member-summary-grid > :last-child { grid-column: auto; }
    .membership-details > div { flex-direction: column; gap: .2rem; }
    .membership-details dd { text-align: left; }
    .dashboard-panel { padding: 1rem; }
    .panel-heading { flex-direction: column; }
    .key-item { grid-template-columns: auto 1fr; }
    .key-item form { grid-column: 2; }
    .status-details > div { flex-direction: column; gap: .2rem; }
    .status-details dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}