:root {
  --red: #d31626;
  --red-dark: #a90d1a;
  --ink: #111318;
  --ink-2: #252831;
  --muted: #646a76;
  --line: #dfe2e8;
  --soft: #f4f5f7;
  --white: #ffffff;
  --max: 1180px;
  --shadow: 0 18px 50px rgba(15, 18, 26, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 1000; background: var(--white); padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 16px; }

.utility-bar { background: var(--ink); color: rgba(255,255,255,.76); font-size: .82rem; letter-spacing: .02em; }
.utility-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.utility-actions { display: flex; align-items: center; gap: 18px; }
.utility-bar a { color: #fff; text-decoration: none; font-weight: 700; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(17,19,24,.08); }
.header-main { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { width: 250px; flex: 0 0 auto; }
.primary-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { text-decoration: none; color: var(--ink-2); font-weight: 750; font-size: .93rem; padding: 12px 13px; border-radius: 999px; }
.nav-link:hover, .nav-link.active { background: var(--soft); color: var(--red); }
.menu-button { display: none; border: 1px solid var(--line); background: var(--white); padding: 9px 14px; border-radius: 10px; font-weight: 800; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--red); background: var(--red); color: var(--white); text-decoration: none; font-weight: 850; box-shadow: 0 10px 24px rgba(211,22,38,.2); transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); background: var(--red-dark); }
.button-small { min-height: 40px; padding-inline: 17px; font-size: .9rem; }
.button-ghost { background: transparent; border-color: rgba(255,255,255,.4); box-shadow: none; }
.button-ghost:hover { background: rgba(255,255,255,.09); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.eyebrow { margin: 0 0 10px; color: var(--red); text-transform: uppercase; letter-spacing: .15em; font-size: .76rem; font-weight: 900; }
.hero { position: relative; overflow: hidden; color: var(--white); background: radial-gradient(circle at 80% 20%, rgba(211,22,38,.45), transparent 30%), linear-gradient(125deg, #111318 0%, #1b1f29 55%, #08090c 100%); }
.hero::after { content: ""; position: absolute; width: 800px; height: 240px; right: -120px; bottom: -70px; border: 20px solid rgba(255,255,255,.055); border-radius: 50%; transform: rotate(-12deg); }
.hero-grid-lines { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to right, transparent, black 45%, black); }
.hero-inner { position: relative; z-index: 1; min-height: 630px; display: grid; grid-template-columns: 1.4fr .75fr; align-items: center; gap: 80px; padding-block: 80px; }
.hero-copy { max-width: 780px; }
.hero h1 { margin: 0; max-width: 850px; font-size: clamp(3.4rem, 7.5vw, 7.5rem); line-height: .9; letter-spacing: -.065em; }
.hero h1 span { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.7); }
.hero-lede { max-width: 660px; margin: 26px 0 0; color: rgba(255,255,255,.76); font-size: clamp(1rem, 1.5vw, 1.25rem); }
.hero-panel { align-self: end; margin-bottom: 40px; padding: 30px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); background: rgba(255,255,255,.07); backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.panel-label { margin: 0 0 18px; color: rgba(255,255,255,.6); text-transform: uppercase; font-size: .72rem; letter-spacing: .15em; font-weight: 800; }
.event-date { display: flex; align-items: baseline; gap: 8px; margin: 0; color: rgba(255,255,255,.8); }
.event-date span { font-size: 2.8rem; color: var(--white); font-weight: 950; }
.hero-panel h2 { margin: 8px 0; font-size: 1.5rem; line-height: 1.15; }
.hero-panel p { color: rgba(255,255,255,.7); }
.hero-panel a { color: var(--white); font-weight: 850; text-decoration: none; }

.stats-strip { border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid div { padding: 25px 28px; border-right: 1px solid var(--line); }
.stats-grid div:last-child { border-right: 0; }
.stats-grid strong, .stats-grid span { display: block; }
.stats-grid strong { font-size: 1.2rem; }
.stats-grid span { color: var(--muted); font-size: .88rem; }

.section { padding-block: 96px; }
.section-heading { margin-bottom: 42px; }
.section-heading h2, .page-hero h1 { margin: 0; font-size: clamp(2.3rem, 4vw, 4.4rem); line-height: 1.02; letter-spacing: -.045em; }
.split-heading { display: grid; grid-template-columns: 1.1fr .8fr; align-items: end; gap: 80px; }
.split-heading > p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.card-grid { display: grid; gap: 22px; }
.three-up { grid-template-columns: repeat(3, 1fr); }
.feature-card { min-height: 330px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--soft); color: var(--red); font-weight: 950; }
.feature-card h3 { margin: auto 0 10px; font-size: 1.45rem; }
.feature-card p { color: var(--muted); }
.feature-card a { margin-top: 12px; color: var(--red); font-weight: 850; text-decoration: none; }
.section-dark { background: var(--ink); color: var(--white); }
.section-dark .eyebrow { color: #ff5a67; }
.event-list { display: grid; gap: 14px; }
.event-card { display: grid; grid-template-columns: 110px 1fr 50px; align-items: center; gap: 26px; padding: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.035); }
.event-card > a { color: var(--white); text-decoration: none; font-size: 1.8rem; text-align: center; }
.date-block { text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.date-block strong, .date-block span { display: block; }
.date-block strong { font-size: 1.7rem; }
.date-block span { color: rgba(255,255,255,.55); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.event-type { margin: 0; color: #ff6975; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; }
.event-card h3 { margin: 4px 0; font-size: 1.3rem; }
.event-card p:last-child { margin: 0; color: rgba(255,255,255,.62); }
.callout-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; }
.quote-card, .join-card { border-radius: var(--radius); padding: 42px; }
.quote-card { background: var(--soft); }
.quote-mark { color: var(--red); font-size: 5rem; line-height: .6; }
.quote-card blockquote { margin: 24px 0; font-size: 1.65rem; line-height: 1.35; font-weight: 800; }
.quote-card p { color: var(--muted); }
.join-card { background: linear-gradient(135deg, #211f23, #101216); color: var(--white); }
.join-card h2 { margin: 0; font-size: 2.4rem; line-height: 1.1; }
.join-card > p:not(.eyebrow) { color: rgba(255,255,255,.7); max-width: 650px; }

.page-hero { padding: 96px 0 78px; background: linear-gradient(180deg, var(--soft), #fff); border-bottom: 1px solid var(--line); }
.page-hero .container { max-width: 980px; margin-left: max(20px, calc((100vw - var(--max))/2)); }
.page-hero p:last-child { max-width: 760px; color: var(--muted); font-size: 1.1rem; }
.page-hero .button { margin-top: 18px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 32px; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 15px; font-weight: 800; }
.chip.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.calendar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.calendar-card { display: grid; grid-template-columns: 110px 1fr; gap: 26px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.calendar-card[hidden] { display: none; }
.calendar-date { padding-right: 24px; border-right: 1px solid var(--line); text-align: center; }
.calendar-date strong, .calendar-date span { display: block; }
.calendar-date strong { font-size: 1.55rem; }
.calendar-date span { color: var(--muted); font-size: .77rem; text-transform: uppercase; letter-spacing: .12em; }
.calendar-card h2 { margin: 10px 0; font-size: 1.35rem; line-height: 1.2; }
.calendar-card p { color: var(--muted); }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #fff0f1; color: var(--red); text-transform: uppercase; font-size: .68rem; font-weight: 900; letter-spacing: .09em; }
dl { margin: 20px 0 0; }
dl div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; margin-top: 8px; }
dt { color: var(--muted); font-size: .82rem; }
dd { margin: 0; font-weight: 750; }
.member-event { background: var(--ink); color: var(--white); border-color: var(--ink); }
.member-event p { color: rgba(255,255,255,.64); }
.member-event .calendar-date { border-color: rgba(255,255,255,.15); }
.generation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.generation-card { min-height: 180px; padding: 28px; border-radius: 18px; color: var(--white); display: flex; align-items: flex-end; justify-content: space-between; overflow: hidden; position: relative; background: var(--ink); }
.generation-card::after { content: ""; position: absolute; width: 280px; height: 90px; right: -50px; top: 35px; border: 10px solid rgba(255,255,255,.08); border-radius: 50%; transform: rotate(-12deg); }
.generation-card > span { align-self: flex-start; color: rgba(255,255,255,.7); font-weight: 950; letter-spacing: .15em; }
.generation-card p { margin: 0; color: rgba(255,255,255,.55); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.generation-card h2 { margin: 6px 0 0; max-width: 340px; font-size: 1.25rem; }
.gen-2, .gen-5, .gen-8 { background: #5d0c13; }
.gen-3, .gen-6 { background: #2e333e; }
.empty-state { margin-top: 40px; padding: 44px; border: 1px dashed #b8bdc7; border-radius: var(--radius); text-align: center; background: var(--soft); }
.empty-state h2 { margin: 0; }
.empty-state p:last-child { max-width: 720px; margin-inline: auto; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.story-grid h2 { margin: 0; font-size: 3rem; line-height: 1.08; }
.rich-text { font-size: 1.12rem; color: var(--muted); }
.section-soft { background: var(--soft); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-grid article { padding: 32px; background: var(--white); border-radius: var(--radius); }
.info-grid span { color: var(--red); font-weight: 950; }
.info-grid h2 { font-size: 1.35rem; }
.info-grid p { color: var(--muted); }
.privacy-callout { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 44px; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.privacy-callout h2 { margin: 0; font-size: 2.3rem; line-height: 1.1; }
.privacy-callout p:last-child { color: rgba(255,255,255,.65); max-width: 800px; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr .95fr; gap: 20px; align-items: start; }
.price-card, .join-notes { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); }
.price-card.featured { border: 2px solid var(--red); box-shadow: var(--shadow); }
.price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 20px; }
.price strong { font-size: 3rem; }
.price span { color: var(--muted); }
.price-card ul, .auth-side ul { list-style: none; padding: 0; margin: 0 0 28px; }
.price-card li, .auth-side li { padding: 10px 0 10px 27px; border-bottom: 1px solid var(--line); position: relative; }
.price-card li::before, .auth-side li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 950; }
.join-notes ol { padding-left: 22px; }
.join-notes li { margin-bottom: 12px; }
.join-notes p { color: var(--muted); }

.auth-section { min-height: 720px; display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); }
.auth-card, .auth-side { padding: clamp(40px, 7vw, 100px); display: flex; flex-direction: column; justify-content: center; }
.auth-card { background: var(--white); }
.auth-brand { width: 250px; margin-bottom: 40px; }
.auth-card h1 { margin: 0; font-size: 3.3rem; letter-spacing: -.05em; }
.auth-card > p:not(.eyebrow):not(.form-help) { color: var(--muted); }
.auth-side { background: radial-gradient(circle at 80% 15%, rgba(211,22,38,.4), transparent 35%), var(--ink); color: var(--white); }
.auth-side h2 { margin: 0 0 25px; max-width: 570px; font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1.05; letter-spacing: -.04em; }
.auth-side li { border-color: rgba(255,255,255,.12); }
.form-stack { display: grid; gap: 18px; margin-top: 24px; max-width: 500px; }
.form-stack label, .admin-form label { display: grid; gap: 7px; font-size: .82rem; font-weight: 850; }
input, select { width: 100%; min-height: 48px; border: 1px solid #cfd3db; border-radius: 10px; padding: 10px 13px; background: var(--white); color: var(--ink); }
input:focus, select:focus { outline: 3px solid rgba(211,22,38,.17); border-color: var(--red); }
.form-help { color: var(--muted); font-size: .85rem; max-width: 500px; }
.alert, .success-alert { padding: 12px 14px; border-radius: 10px; margin-top: 18px; }
.alert { background: #fff0f1; color: #8c0c17; border: 1px solid #ffc6cb; }
.success-alert { background: #edf9f0; color: #1d6d35; border: 1px solid #bce4c7; margin-bottom: 20px; }

.portal-header { padding: 54px 0; background: var(--ink); color: var(--white); }
.portal-header h1 { margin: 0; font-size: 2.9rem; letter-spacing: -.04em; }
.portal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 44px; padding-block: 48px 90px; }
.portal-nav { position: sticky; top: 145px; align-self: start; display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; }
.portal-nav > a, .portal-nav form button { display: block; width: 100%; padding: 10px 12px; border-radius: 9px; text-align: left; text-decoration: none; border: 0; background: transparent; color: var(--ink); font-weight: 800; }
.portal-nav > a:hover, .portal-nav > a.active { background: var(--soft); color: var(--red); }
.portal-nav form { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.member-chip { display: flex; align-items: center; gap: 11px; padding: 6px 7px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.member-chip > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: var(--white); font-weight: 950; }
.member-chip strong, .member-chip small { display: block; }
.member-chip small { color: var(--muted); text-transform: capitalize; }
.portal-content { min-width: 0; }
.portal-welcome { display: grid; grid-template-columns: 1fr .8fr; gap: 28px; align-items: center; padding: 34px; border-radius: var(--radius); background: var(--soft); }
.portal-welcome h2 { margin: 0; font-size: 2.1rem; line-height: 1.1; }
.portal-welcome p:last-child { color: var(--muted); }
.secure-badge { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--white); border-radius: 14px; }
.secure-badge > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #e8f8ed; color: #208543; font-weight: 950; }
.secure-badge strong, .secure-badge small { display: block; }
.secure-badge small { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; }
.dashboard-card { min-height: 260px; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.dashboard-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.dashboard-card > span { color: var(--red); font-size: .76rem; font-weight: 950; letter-spacing: .12em; }
.dashboard-card h3 { margin: auto 0 8px; font-size: 1.5rem; }
.dashboard-card p { color: var(--muted); }
.dashboard-card b { color: var(--red); }
.admin-card { background: var(--ink); color: var(--white); border-color: var(--ink); }
.admin-card p { color: rgba(255,255,255,.62); }
.content-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.content-toolbar h2 { margin: 0; font-size: 2.4rem; }
.content-toolbar p:last-child { color: var(--muted); }
.search-box { width: min(320px, 100%); font-size: .78rem; font-weight: 850; }
.search-box input { margin-top: 6px; }
.privacy-note { padding: 13px 15px; background: #fff8e8; border: 1px solid #f1d896; border-radius: 10px; margin-bottom: 20px; color: #705518; }
.roster-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.roster-card { display: grid; grid-template-columns: 54px 1fr; gap: 17px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; }
.roster-card[hidden] { display: none; }
.roster-avatar { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--white); font-weight: 950; }
.roster-main h3 { margin: 0; }
.partner { margin: 0; color: var(--muted); font-size: .88rem; }
.car-line { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 14px 0 0; }
.car-line strong, .car-line span { display: block; }
.car-line span { color: var(--muted); }
.roster-main dl { padding-top: 12px; border-top: 1px solid var(--line); }
.roster-main dl div { grid-template-columns: 95px 1fr; }
.roster-main dd { overflow-wrap: anywhere; font-weight: 650; }
.roster-main dd a { color: var(--red); }
.empty-message { padding: 35px; background: var(--soft); text-align: center; border-radius: 16px; }
.document-list { display: grid; gap: 12px; }
.document-list article { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; }
.file-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 14px; background: var(--soft); color: var(--red); font-size: .72rem; font-weight: 950; }
.document-list h3 { margin: 0; }
.document-list p { margin: 4px 0 0; color: var(--muted); }
.document-list a { color: var(--red); font-weight: 850; }
.status-pill { padding: 7px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .75rem; font-weight: 850; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-panel { padding: 26px; border: 1px solid var(--line); border-radius: 17px; }
.admin-panel h2 { margin: 0 0 20px; }
.admin-form { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.check-row { display: flex; flex-wrap: wrap; gap: 16px; }
.check-row label { display: flex; align-items: center; gap: 8px; }
.check-row input { width: auto; min-height: auto; }
.admin-table-panel { margin-top: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .08em; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; text-transform: capitalize; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #999; }
.status-dot.active::before { background: #2aa554; }
.status-dot.inactive::before { background: #b7bbc4; }

.site-footer { background: #0b0c0f; color: rgba(255,255,255,.68); padding: 70px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; }
.footer-logo { width: 220px; margin-bottom: 20px; }
.footer-grid h2 { margin: 0 0 14px; color: var(--white); font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; }
.footer-grid a { display: block; color: rgba(255,255,255,.68); text-decoration: none; margin: 8px 0; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }

@media (max-width: 980px) {
  .header-main { min-height: 78px; }
  .brand { width: 190px; }
  .menu-button { display: block; }
  .primary-nav { display: none; position: absolute; top: 114px; left: 20px; right: 20px; padding: 15px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); align-items: stretch; flex-direction: column; }
  .primary-nav.open { display: flex; }
  .nav-link { border-radius: 8px; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; min-height: auto; }
  .hero-panel { margin: 0; max-width: 600px; }
  .three-up, .info-grid { grid-template-columns: 1fr 1fr; }
  .split-heading, .story-grid { grid-template-columns: 1fr; gap: 25px; }
  .calendar-grid, .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid { max-width: 700px; }
  .portal-layout { grid-template-columns: 1fr; }
  .portal-nav { position: static; display: flex; flex-wrap: wrap; align-items: center; }
  .member-chip { width: 100%; }
  .portal-nav form { margin: 0 0 0 auto; border: 0; padding: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .utility-inner > span:first-child { display: none; }
  .utility-inner { justify-content: flex-end; }
  .hero-inner { padding-block: 65px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid div:nth-child(2) { border-right: 0; }
  .stats-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section { padding-block: 70px; }
  .three-up, .generation-grid, .info-grid, .callout-grid, .roster-grid, .dashboard-grid, .admin-grid { grid-template-columns: 1fr; }
  .event-card { grid-template-columns: 70px 1fr; }
  .event-card > a { display: none; }
  .date-block { padding-right: 16px; }
  .calendar-card { grid-template-columns: 78px 1fr; padding: 22px; gap: 18px; }
  .calendar-date { padding-right: 16px; }
  .privacy-callout { align-items: flex-start; flex-direction: column; }
  .auth-section { grid-template-columns: 1fr; }
  .auth-card, .auth-side { padding: 50px 24px; }
  .content-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .portal-welcome { grid-template-columns: 1fr; }
  .document-list article { grid-template-columns: 55px 1fr; }
  .document-list article > a, .document-list article > .status-pill { grid-column: 2; justify-self: start; }
  .file-icon { width: 50px; height: 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

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


/* Dreamweaver/PHP edition additions */
.notice { padding: 15px 17px; margin: 0 0 20px; border: 1px solid #cfd3db; border-radius: 11px; background: var(--soft); }
.notice strong { display: block; margin-bottom: 3px; }
.notice-success { border-color: #bce4c7; background: #edf9f0; color: #1d6d35; }
.notice-error { border-color: #ffc6cb; background: #fff0f1; color: #8c0c17; }
.setup-wrap { width: min(calc(100% - 40px), 760px); margin: 70px auto; }
.setup-card { padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--white); }
.setup-card h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.045em; }
.setup-card .auth-brand { margin-bottom: 30px; }
.field-note { margin: 5px 0 0; color: var(--muted); font-size: .78rem; font-weight: 500; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-section-title { margin-top: 34px; }
.compact-table td, .compact-table th { white-space: normal; }
.muted { color: var(--muted); }
.portal-nav button { cursor: pointer; }
.button-secondary { background: var(--white); color: var(--ink); border-color: var(--line); box-shadow: none; }
.button-secondary:hover { background: var(--soft); }
.static-note { margin: 26px 0 0; color: var(--muted); font-size: .9rem; }
code { padding: .12em .35em; border-radius: 5px; background: var(--soft); }
@media (max-width: 980px) {
  .primary-nav { top: 114px; }
}

/* Member editing upgrade */
.form-span-2 { grid-column: 1 / -1; }
.admin-heading-row, .edit-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.admin-heading-row h2, .edit-page-heading h2 { margin-bottom: 8px; }
.admin-heading-row .form-help { max-width: 520px; margin: 0; }
.edit-page-heading { margin-bottom: 20px; }
.admin-form h3 { margin: 4px 0 0; }
.compact-table .button { white-space: nowrap; }
@media (max-width: 720px) {
  .admin-heading-row, .edit-page-heading { flex-direction: column; }
  .form-span-2 { grid-column: auto; }
}

/* Member activation and password self-service */
.activation-link-box { border-left: 4px solid currentColor; }
.activation-link-box p { margin: .45rem 0 .75rem; }
.copy-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; align-items: center; }
.copy-link-row input { width: 100%; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .82rem; }
.inline-form { display: inline; margin: 0; }
.inline-form button { white-space: nowrap; }
.auth-actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: 1rem 0 1.25rem; font-size: .93rem; }
.narrow-panel { max-width: 680px; }
@media (max-width: 650px) { .copy-link-row { grid-template-columns: 1fr; } }

/* Protected document library upgrade */
.document-toolbar { align-items: center; }
.document-category { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; }
.document-category + .document-category { margin-top: 18px; }
.document-category-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.document-category-heading h3 { margin: 0; font-size: 1.45rem; }
.document-category-heading p:last-child { margin: 5px 0 0; color: var(--muted); }
.document-empty { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 13px; background: var(--soft); color: var(--muted); }
.document-empty strong { color: var(--ink); }
.managed-document-list article { grid-template-columns: 72px minmax(0,1fr) auto; }
.document-details { min-width: 0; }
.document-details h4 { margin: 0; font-size: 1.05rem; }
.document-details small { display: block; margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.document-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.document-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
.button-danger { background: #fff; color: #a10f1b; border-color: #e6a5aa; box-shadow: none; }
.button-danger:hover { background: #fff0f1; }
.document-security-note { margin-top: 24px; }
.document-edit-panel textarea { width: 100%; min-height: 120px; resize: vertical; border: 1px solid #cfd3db; border-radius: 10px; padding: 10px 13px; background: var(--white); color: var(--ink); font: inherit; }
.document-edit-panel textarea:focus { outline: 3px solid rgba(211,22,38,.17); border-color: var(--red); }
.current-document { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 22px; border-radius: 13px; background: var(--soft); }
.current-document strong, .current-document span { display: block; }
.current-document span { margin-top: 3px; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .document-category-heading { flex-direction: column; }
  .managed-document-list article { grid-template-columns: 55px minmax(0,1fr); }
  .managed-document-list .document-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .document-actions { flex-direction: column; align-items: stretch; }
  .document-actions .button, .document-actions form, .document-actions form button { width: 100%; text-align: center; }
}

/* Public sponsors and sponsor administration */
.sponsor-page-hero { background: radial-gradient(circle at 78% 20%, rgba(211,22,38,.09), transparent 30%), linear-gradient(180deg, var(--soft), #fff); }
.sponsor-heading { margin-bottom: 34px; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 22px; align-items: stretch; }
.sponsor-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
a.sponsor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #cdd1d9; }
.sponsor-logo-frame { min-height: 205px; padding: 30px; display: grid; place-items: center; background: linear-gradient(145deg, #fff, var(--soft)); border-bottom: 1px solid var(--line); }
.sponsor-logo-frame img { width: 100%; max-width: 330px; height: 145px; object-fit: contain; }
.sponsor-logo-fallback { max-width: 280px; text-align: center; font-size: 1.35rem; line-height: 1.2; font-weight: 900; }
.sponsor-card-copy { display: flex; flex: 1; flex-direction: column; padding: 25px 26px 27px; }
.sponsor-card-copy h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.sponsor-card-copy p { margin: 10px 0 20px; color: var(--muted); }
.sponsor-visit { margin-top: auto; color: var(--red); font-weight: 850; }
.sponsor-visit-muted { color: var(--muted); font-weight: 700; }
.sponsor-empty { max-width: 760px; margin-inline: auto; }
.sponsor-cta-section { padding-block: 72px; }
.sponsor-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 50px; }
.sponsor-cta h2 { margin: 0; max-width: 760px; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.04em; }
.sponsor-cta p:not(.eyebrow) { max-width: 760px; color: rgba(255,255,255,.68); }
.sponsor-admin-table td { vertical-align: middle; }
.sponsor-admin-thumb { width: 88px; height: 58px; padding: 5px; object-fit: contain; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.sponsor-admin-intro .inline-actions { justify-content: flex-end; }
.sponsor-edit-panel textarea { width: 100%; min-height: 110px; resize: vertical; border: 1px solid #cfd3db; border-radius: 10px; padding: 10px 13px; background: var(--white); color: var(--ink); font: inherit; }
.sponsor-edit-panel textarea:focus { outline: 3px solid rgba(211,22,38,.17); border-color: var(--red); }
.current-sponsor-logo { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; padding: 18px; border-radius: 14px; background: var(--soft); }
.current-sponsor-logo img { width: 150px; height: 90px; padding: 8px; object-fit: contain; border-radius: 10px; background: var(--white); border: 1px solid var(--line); }
.current-sponsor-logo strong, .current-sponsor-logo span { display: block; }
.current-sponsor-logo span { margin-top: 3px; color: var(--muted); font-size: .85rem; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.danger-zone p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 980px) {
  .sponsor-cta { grid-template-columns: 1fr; gap: 24px; }
  .sponsor-cta .button { justify-self: start; }
}
@media (max-width: 720px) {
  .sponsor-grid { grid-template-columns: 1fr; }
  .sponsor-logo-frame { min-height: 180px; }
  .sponsor-admin-intro .inline-actions { justify-content: flex-start; }
  .current-sponsor-logo, .danger-zone { align-items: flex-start; flex-direction: column; }
}

/* Member profile portrait and Corvette photo upgrade */
.roster-avatar-photo { overflow: hidden; flex: 0 0 auto; }
.roster-avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.roster-profile-link { margin-top: 14px; }
.member-profile-card { display: grid; grid-template-columns: minmax(190px, 260px) minmax(0,1fr); gap: 34px; align-items: stretch; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.profile-portrait-wrap { min-width: 0; }
.profile-portrait { width: 100%; aspect-ratio: 4 / 5; display: block; object-fit: cover; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); }
.profile-portrait-placeholder { display: grid; place-items: center; background: linear-gradient(145deg, var(--ink), #343946); color: var(--white); font-size: clamp(3rem, 8vw, 5rem); font-weight: 950; letter-spacing: -.06em; }
.profile-summary { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.profile-summary h2 { margin: 0; font-size: clamp(2.1rem, 5vw, 4rem); line-height: .98; letter-spacing: -.045em; }
.profile-partner { margin: 8px 0 0; color: var(--muted); font-size: 1.08rem; }
.profile-facts, .profile-contact { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.profile-contact { grid-template-columns: repeat(2, minmax(0,1fr)); }
.profile-facts > div, .profile-contact > div { padding: 14px 15px; border-radius: 12px; background: var(--soft); min-width: 0; }
.profile-facts span, .profile-contact span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.profile-facts strong, .profile-contact strong { display: block; overflow-wrap: anywhere; }
.profile-contact a { color: inherit; }
.profile-summary .inline-actions { margin-top: 20px; }
.profile-car-section { margin-top: 22px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; }
.profile-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.profile-section-heading h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.profile-car-photo { width: 100%; max-height: 560px; aspect-ratio: 16 / 9; display: block; object-fit: cover; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.profile-car-placeholder { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; border: 1px dashed #c9ced7; border-radius: 16px; background: var(--soft); color: var(--muted); }
.profile-car-placeholder strong { color: var(--ink); font-size: 1.1rem; }
.profile-photo-manager { margin-top: 22px; }
.profile-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 22px; }
.profile-upload-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.profile-upload-card h3 { margin: 0 0 5px; }
.profile-upload-card .admin-form { margin-top: 14px; }
.profile-upload-card input[type="file"] { width: 100%; padding: 10px; border: 1px solid #cfd3db; border-radius: 10px; background: var(--white); }
.profile-remove-form { margin-top: 10px; }
.member-photo-admin-summary { margin-top: 20px; }
@media (max-width: 820px) {
  .member-profile-card { grid-template-columns: 1fr; }
  .profile-portrait-wrap { max-width: 300px; }
  .profile-facts { grid-template-columns: 1fr 1fr; }
  .profile-upload-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .member-profile-card, .profile-car-section { padding: 20px; }
  .profile-facts, .profile-contact { grid-template-columns: 1fr; }
  .profile-portrait-wrap { max-width: 230px; }
}

/* Button contrast fix: keep primary red buttons readable even inside containers
   that apply red link text to normal anchors. */
a.button:not(.button-secondary):not(.button-danger),
a.button:not(.button-secondary):not(.button-danger):link,
a.button:not(.button-secondary):not(.button-danger):visited,
a.button:not(.button-secondary):not(.button-danger):hover,
a.button:not(.button-secondary):not(.button-danger):focus,
a.button:not(.button-secondary):not(.button-danger):active,
button.button:not(.button-secondary):not(.button-danger) {
  color: var(--white);
}

/* Preserve the intended text colors for non-primary button variants. */
a.button.button-secondary,
a.button.button-secondary:link,
a.button.button-secondary:visited,
a.button.button-secondary:hover,
a.button.button-secondary:focus,
a.button.button-secondary:active,
button.button.button-secondary {
  color: var(--ink);
}

a.button.button-danger,
a.button.button-danger:link,
a.button.button-danger:visited,
a.button.button-danger:hover,
a.button.button-danger:focus,
a.button.button-danger:active,
button.button.button-danger {
  color: #a10f1b;
}

.button:focus-visible {
  outline: 3px solid rgba(17, 19, 24, .34);
  outline-offset: 3px;
}


/* Public video library and administration */
.video-page-hero { background: radial-gradient(circle at 78% 18%, rgba(211,22,38,.11), transparent 32%), linear-gradient(180deg, var(--soft), #fff); }
.video-heading { margin-bottom: 28px; }
.video-filter-bar { margin-bottom: 28px; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.video-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.video-card[hidden] { display: none; }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cdd1d9; }
.video-poster { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #111318; color: var(--white); text-decoration: none; }
.video-poster > img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease, opacity .25s ease; }
.video-card:hover .video-poster > img { transform: scale(1.025); opacity: .9; }
.video-poster-placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 10px; padding: 28px; text-align: center; background: radial-gradient(circle at 70% 20%, rgba(211,22,38,.55), transparent 30%), linear-gradient(135deg, #252831, #0b0c0f); }
.video-play-mark { font-size: 2.2rem; line-height: 1; }
.video-play-button { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 68px; height: 68px; display: grid; place-items: center; padding-left: 4px; border-radius: 50%; background: rgba(211,22,38,.94); color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.3); font-size: 1.45rem; }
.video-featured-badge { position: absolute; top: 16px; left: 16px; padding: 7px 11px; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; }
.video-card-copy { padding: 24px 25px 26px; }
.video-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.video-card-copy h2 { margin: 9px 0 8px; font-size: 1.5rem; line-height: 1.15; }
.video-card-copy h2 a { text-decoration: none; }
.video-card-copy p { margin: 0 0 18px; color: var(--muted); }
.video-watch-link { color: var(--red); font-weight: 850; text-decoration: none; }
.video-empty { max-width: 760px; margin-inline: auto; }
.video-watch-layout { max-width: 1080px; }
.video-player-shell { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #0b0c0f; box-shadow: var(--shadow); }
.video-player-shell iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-player-shell > video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.video-external-player { height: 100%; display: grid; place-items: center; align-content: center; gap: 10px; padding: 40px; color: #fff; text-align: center; }
.video-external-player h2, .video-external-player p { margin: 0; }
.video-external-player p { color: rgba(255,255,255,.72); max-width: 640px; }
.video-watch-copy { max-width: 850px; margin: 28px auto 0; font-size: 1.08rem; }
.video-watch-copy > p { white-space: normal; color: var(--muted); }
.gallery-video-callout { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 40px; margin-top: 42px; padding: 34px; border-radius: var(--radius); background: linear-gradient(135deg, #211f23, #101216); color: #fff; }
.gallery-video-callout h2 { margin: 0; font-size: clamp(1.8rem,3vw,2.7rem); line-height: 1.05; }
.gallery-video-callout p:not(.eyebrow) { margin: 10px 0 0; max-width: 720px; color: rgba(255,255,255,.7); }
.video-admin-table td { vertical-align: middle; }
.video-admin-thumb { width: 110px; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.video-admin-intro .inline-actions { justify-content: flex-end; }
.video-edit-panel textarea { width: 100%; min-height: 120px; resize: vertical; border: 1px solid #cfd3db; border-radius: 10px; padding: 10px 13px; background: var(--white); color: var(--ink); font: inherit; }
.video-edit-panel textarea:focus { outline: 3px solid rgba(211,22,38,.17); border-color: var(--red); }
.current-video-thumbnail { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; padding: 18px; border-radius: 14px; background: var(--soft); }
.current-video-thumbnail img { width: 190px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--white); border: 1px solid var(--line); }
.current-video-thumbnail strong, .current-video-thumbnail span { display: block; }
.current-video-thumbnail span { margin-top: 3px; color: var(--muted); font-size: .85rem; }
.checkbox-label { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; }
.checkbox-label input { width: auto; }
@media (max-width: 900px) { .video-grid { grid-template-columns: 1fr; } .gallery-video-callout { grid-template-columns: 1fr; } .gallery-video-callout .button { justify-self: start; } }
@media (max-width: 640px) { .video-card-copy { padding: 20px; } .video-play-button { width: 58px; height: 58px; } .current-video-thumbnail { align-items: flex-start; flex-direction: column; } .current-video-thumbnail img { width: 100%; max-width: 300px; } }
