:root {
    color-scheme: dark;
    --background: #0b1115;
    --surface: #131d23;
    --surface-raised: #18242b;
    --line: #2b3b42;
    --text: #f1f3f1;
    --muted: #b0bdbf;
    --gold: #e9bb68;
    --gold-deep: #b88637;
    --aqua: #8dc9c7;
    --focus: #f5d99f;
    font-family: Inter, "Aptos", "Segoe UI", system-ui, sans-serif;
    font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); line-height: 1.55; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--gold); color: #101619; }
.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-shell > main { flex: 1; }

.site-header { position: relative; z-index: 5; border-bottom: 1px solid #ffffff13; background: #0b1115ef; }
.nav { min-height: 96px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; width: 310px; flex: none; max-width: 100%; }
.brand-logo { display: block; width: 100%; height: auto; }
.brand:hover { color: var(--text); }
.fe-barbell { display: inline-flex; align-items: center; flex: none; }
.fe-plate { display: block; width: 56px; height: 56px; flex: none; }
.fe-bar { display: block; width: 32px; height: 8px; flex: none; background: var(--muted); }
.loading-mark .fe-plate { width: 38px; height: 38px; }
.nav-links, .nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-links { margin-left: auto; }
.nav-links a, .nav-login { color: #d2dadd; font-size: .88rem; font-weight: 600; white-space: nowrap; transition: color .2s ease; }
.nav-links a:hover, .nav-login:hover { color: var(--gold); }
.nav-actions { gap: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 46px; padding: 11px 20px; border: 1px solid transparent; border-radius: 8px; font-size: .88rem; font-weight: 800; line-height: 1.2; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease; }
.button:disabled { opacity: .65; cursor: wait; }
.button-primary { color: #171a18; background: var(--gold); border-color: var(--gold); box-shadow: 0 8px 28px #e9bb6818; }
.button-primary:hover:not(:disabled) { color: #111715; background: #f5cc7e; border-color: #f5cc7e; box-shadow: 0 10px 32px #e9bb682d; }
.button-secondary { color: var(--text); background: transparent; border-color: #61727a; }
.button-secondary:hover:not(:disabled) { color: var(--gold); border-color: var(--gold); }
.button-large { min-height: 56px; padding-inline: 26px; }
.text-link { display: inline-flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--gold-deep); padding-bottom: 5px; color: var(--text); font-size: .9rem; font-weight: 750; transition: color .2s ease, border-color .2s ease; }
.text-link:hover { color: var(--gold); border-color: var(--gold); }
.resend-confirmation { display: block; margin-top: 16px; border-top: 0; border-left: 0; border-right: 0; background: transparent; cursor: pointer; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--gold); font-size: .74rem; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow-rule { width: 28px; height: 1px; background: var(--gold); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.045em; }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; min-height: 675px; padding-block: 70px 84px; }
.hero h1 { margin-bottom: 27px; font-size: clamp(3.5rem, 6.5vw, 6.5rem); font-weight: 850; line-height: .98; letter-spacing: -.075em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-lede { max-width: 530px; margin-bottom: 30px; color: #c3cdd0; font-size: clamp(1.03rem, 1.65vw, 1.18rem); line-height: 1.75; }
.hero-actions, .closing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 27px; }
.hero-note { margin: 22px 0 0; color: #9ba9ac; font-size: .81rem; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 540px; isolation: isolate; }
.hero-visual::before { content: ""; position: absolute; z-index: -2; width: min(95%, 470px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #344d4d 0%, #182a30 45%, transparent 70%); filter: blur(25px); opacity: .65; }
.hero-orbit { position: absolute; z-index: -1; border: 1px solid #c3d4c916; border-radius: 50%; }
.orbit-one { width: 520px; height: 520px; }
.orbit-two { width: 400px; height: 400px; }
.workout-preview { width: min(100%, 438px); padding: 27px; border: 1px solid #4a5d60; border-radius: 18px; background: linear-gradient(155deg, #202e33, #111a20 60%); box-shadow: 0 34px 80px #0008, inset 0 1px #ffffff15; transform: rotate(1.7deg); }
.preview-topline, .preview-exercise, .preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.preview-label, .preview-status, .preview-meta, .preview-footer, .exercise-count { font-size: .67rem; font-weight: 800; letter-spacing: .12em; }
.preview-label { color: var(--gold); }
.preview-status { display: inline-flex; align-items: center; gap: 7px; color: var(--aqua); white-space: nowrap; }
.status-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 4px #8dc9c71a; }
.workout-preview h2 { margin: 32px 0 6px; font-size: 1.75rem; }
.preview-meta { color: #9fafb3; }
.preview-meta span { margin-inline: 8px; color: #576970; }
.preview-divider { height: 1px; margin: 23px 0; background: var(--line); }
.preview-exercise strong { display: block; font-size: .94rem; }
.preview-exercise small { display: block; margin-top: 5px; color: #a9b8ba; font-size: .76rem; }
.exercise-count { color: var(--gold); white-space: nowrap; }
.set-track { display: flex; gap: 8px; margin: 17px 0 23px; }
.set-track span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #5c7870; border-radius: 50%; font-size: .78rem; font-weight: 800; }
.set-complete { color: #d2e8d5; background: #2c5146; }
.set-next { color: var(--gold); border-color: var(--gold) !important; }
.second-exercise { padding-top: 19px; border-top: 1px solid var(--line); }
.second-exercise .exercise-count { color: #8fa2a7; }
.preview-footer { margin: 30px 0 9px; color: #a9b8ba; }
.preview-footer strong { color: var(--gold); font-size: .82rem; }
.progress-track { height: 5px; border-radius: 9px; background: #33444a; overflow: hidden; }
.progress-track span { display: block; width: 58%; height: 100%; background: var(--gold); }
.sync-chip { position: absolute; right: -10px; bottom: 24px; display: flex; align-items: center; gap: 12px; max-width: 270px; padding: 12px 15px; border: 1px solid #4d6668; border-radius: 11px; color: #e1e8e7; background: #1a292d; box-shadow: 0 15px 30px #0006; font-size: .76rem; font-weight: 700; }
.sync-symbol { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid #668f8a; border-radius: 50%; color: var(--aqua); font-size: 1.1rem; }
.proof-strip { border-block: 1px solid #26353a; background: #11191e; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 76px; align-items: center; text-align: center; color: #b9c4c4; font-size: .7rem; font-weight: 800; letter-spacing: .18em; }
.proof-grid span + span { border-left: 1px solid #35434a; }
.section { padding-block: 106px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 45px; margin-bottom: 40px; }
.section-heading h2, .story-copy h2, .closing-section h2 { margin-bottom: 0; font-size: clamp(2.5rem, 4.6vw, 4.35rem); font-weight: 830; }
.section-heading > p { max-width: 370px; margin: 0 0 5px; color: var(--muted); line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { min-height: 358px; padding: 27px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #19252b, #111a20 70%); }
.feature-index { color: var(--gold); font-size: .72rem; font-weight: 850; letter-spacing: .16em; }
.feature-graphic { display: flex; align-items: end; gap: 9px; height: 94px; margin: 20px 0 14px; padding: 17px; border: 1px solid #34464b; border-radius: 9px; background: #101a1e; }
.plan-graphic { flex-direction: column; align-items: stretch; justify-content: center; }
.plan-graphic span { height: 9px; border-radius: 3px; background: #5f8581; }
.plan-graphic span:first-child { width: 65%; background: var(--gold); }
.plan-graphic span:nth-child(2) { width: 90%; }
.plan-graphic span:last-child { width: 76%; }
.train-graphic span { width: 22%; border-radius: 4px 4px 0 0; background: #4a756e; }
.train-graphic span:first-child { height: 37%; }
.train-graphic span:nth-child(2) { height: 65%; }
.train-graphic span:nth-child(3) { height: 85%; background: var(--gold); }
.train-graphic span:last-child { height: 58%; }
.review-graphic { gap: 0; align-items: center; justify-content: space-between; }
.review-graphic span { width: 14%; height: 30%; border-radius: 3px; background: #53766f; }
.review-graphic span:nth-child(2) { height: 47%; }
.review-graphic span:nth-child(3) { height: 41%; }
.review-graphic span:nth-child(4) { height: 65%; }
.review-graphic span:last-child { height: 77%; background: var(--gold); }
.feature-card h3 { margin-bottom: 10px; font-size: 1.42rem; }
.feature-card p { max-width: 320px; margin-bottom: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.story-section { border-block: 1px solid #233239; background: radial-gradient(circle at 82% 50%, #1d3536 0, #111b20 45%, #0e171b 100%); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.story-copy h2 { max-width: 520px; margin-bottom: 22px; }
.story-copy > p:not(.eyebrow) { max-width: 490px; color: #c0cccd; line-height: 1.8; }
.story-copy .availability-note { display: flex; align-items: center; gap: 10px; margin: 23px 0 30px; color: var(--aqua) !important; font-size: .86rem; font-weight: 700; }
.story-diagram { display: grid; gap: 0; padding: 28px; border: 1px solid #456065; border-radius: 16px; background: #142127bf; }
.diagram-node { display: grid; gap: 3px; padding: 18px 22px; border: 1px solid #3d5359; border-radius: 10px; background: #1b2a30; }
.diagram-node strong { font-size: 1.05rem; }
.diagram-node small { color: var(--muted); }
.node-tag { margin-bottom: 5px; color: var(--gold); font-size: .65rem; font-weight: 850; letter-spacing: .16em; }
.mobile-node { border-color: #809463; }
.diagram-line { display: grid; place-items: center; height: 33px; }
.diagram-line span { width: 1px; height: 100%; background: #7b9d93; }
.closing-section { text-align: center; }
.closing-section .eyebrow { justify-content: center; }
.closing-section h2 { margin-bottom: 15px; }
.closing-section > p:not(.eyebrow) { color: var(--muted); }
.closing-actions { justify-content: center; margin-top: 30px; }
.site-footer { border-top: 1px solid #25343a; background: #0e161a; }
.footer-inner { display: flex; align-items: start; justify-content: space-between; gap: 32px; padding-block: 40px; }
.footer-brand { color: var(--gold); font-size: .78rem; font-weight: 850; letter-spacing: .2em; }
.site-footer p { margin: 9px 0 0; color: var(--muted); font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 25px; color: #c0cbcd; font-size: .84rem; }

.auth-page { display: grid; grid-template-columns: 1fr minmax(350px, 475px); gap: clamp(50px, 8vw, 145px); align-items: center; min-height: 740px; padding-block: 65px 90px; }
.auth-intro { align-self: stretch; display: flex; flex-direction: column; align-items: start; justify-content: center; }
.back-link { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 85px; color: #c4cfd1; font-size: .86rem; font-weight: 650; }
.back-link:hover { color: var(--gold); }
.auth-intro h1 { margin-bottom: 18px; font-size: clamp(3.2rem, 5.3vw, 5.8rem); line-height: 1; }
.auth-intro > p:not(.eyebrow) { max-width: 470px; color: var(--muted); font-size: 1.08rem; }
.auth-quote { margin-top: 70px; }
.quote-mark { display: block; height: 44px; color: var(--gold); font-family: Georgia, serif; font-size: 4.5rem; line-height: 1; }
.auth-quote p { max-width: 300px; margin: 10px 0 18px; color: #e5eae8; font-family: Georgia, serif; font-size: 1.35rem; font-style: italic; line-height: 1.35; }
.quote-rule { display: block; width: 46px; height: 2px; background: var(--gold); }
.auth-card { padding: 36px; border: 1px solid #405257; border-radius: 16px; background: linear-gradient(155deg, #1c292e, #131d23 65%); box-shadow: 0 24px 64px #0005; }
.card-step { color: var(--gold); font-size: .68rem; font-weight: 850; letter-spacing: .17em; }
.auth-card-heading h2 { margin: 12px 0 9px; font-size: 1.9rem; }
.auth-card-heading p { margin-bottom: 27px; color: var(--muted); font-size: .88rem; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; color: #e7eded; font-size: .81rem; font-weight: 750; }
.field input { width: 100%; min-height: 49px; padding: 11px 13px; border: 1px solid #52646a; border-radius: 8px; outline: none; color: var(--text); background: #0c151a; transition: border-color .2s ease, box-shadow .2s ease; }
.field input::placeholder { color: #8a9b9f; }
.field input:hover { border-color: #8ba4a7; }
.field input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px #e9bb6829; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.label-row a, .auth-card-footer a { color: var(--gold); font-size: .8rem; font-weight: 750; }
.label-row a:hover, .auth-card-footer a:hover { text-decoration: underline; }
.form-submit { width: 100%; margin-top: 7px; min-height: 51px; justify-content: space-between; }
.form-message { padding: 12px 14px; border-radius: 8px; margin: 0 0 23px; font-size: .85rem; line-height: 1.5; }
.error-message { border: 1px solid #bb7167; color: #ffe1d9; background: #70362d44; }
.success-message { border: 1px solid #6f9c88; color: #d9f7e8; background: #22543c55; }
.auth-card-footer { display: flex; flex-wrap: wrap; gap: 6px 11px; justify-content: center; padding-top: 25px; color: var(--muted); font-size: .8rem; text-align: center; }
.account-page { display: grid; place-items: center; min-height: 630px; padding-block: 80px; }
.account-panel { width: min(100%, 680px); padding: clamp(28px, 5vw, 55px); border: 1px solid #405257; border-radius: 16px; background: var(--surface); }
.account-panel h1 { font-size: clamp(2.8rem, 5vw, 4rem); }
.account-panel p { color: var(--muted); }
.account-panel p strong { color: var(--text); }
.account-next { margin-block: 26px 32px; padding-left: 17px; border-left: 2px solid var(--gold); }
.simple-page { min-height: 500px; padding-block: 110px; }
.simple-page h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.simple-page p:not(.eyebrow) { color: var(--muted); }
.app-loading { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 100vh; color: var(--muted); }
#blazor-error-ui { display: none; position: fixed; z-index: 20; inset: auto 0 0; padding: 14px 22px; color: #fff; background: #813e35; }
#blazor-error-ui .reload { margin-left: 10px; text-decoration: underline; }
#blazor-error-ui .dismiss { float: right; border: 0; color: inherit; background: transparent; font-size: 1.3rem; }

@media (max-width: 1100px) {
    .nav { flex-wrap: wrap; gap: 12px 20px; padding-block: 14px; }
    .nav-links { order: 3; width: 100%; justify-content: center; }
    .nav-actions { margin-left: auto; }
}

@media (max-width: 1000px) {
    .nav-links { gap: 17px; }
    .hero { grid-template-columns: 1fr 1fr; gap: 22px; }
    .hero h1 { font-size: clamp(3.5rem, 6vw, 5rem); }
    .orbit-one { width: 420px; height: 420px; }
    .orbit-two { width: 330px; height: 330px; }
    .story-grid { gap: 40px; }
    .auth-page { gap: 40px; }
}

@media (max-width: 760px) {
    .container { width: min(100% - 36px, 620px); }
    .nav { min-height: 72px; gap: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .site-header .nav { width: calc(100% - 36px); }
    .brand { width: 248px; min-width: 0; }
    .nav-links { display: none; }
    .nav-actions { margin-left: auto; gap: 15px; justify-content: flex-end; flex-wrap: wrap; max-width: 46vw; }
    .hero { grid-template-columns: 1fr; padding-block: 68px 65px; }
    .hero h1 { font-size: clamp(3.55rem, 12vw, 5.8rem); }
    .hero-visual { min-height: 480px; }
    .workout-preview { transform: none; }
    .sync-chip { right: -5px; bottom: 6px; }
    .proof-grid { gap: 16px; padding-block: 18px; font-size: .57rem; }
    .section { padding-block: 75px; }
    .section-heading { display: block; }
    .section-heading > p { margin-top: 18px; }
    .feature-grid, .story-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: 0; }
    .story-diagram { margin-top: 12px; }
    .auth-page { grid-template-columns: 1fr; gap: 30px; min-height: 0; padding-block: 50px 70px; }
    .back-link { margin-bottom: 45px; }
    .auth-intro h1 { font-size: clamp(3rem, 10vw, 4.5rem); }
    .auth-quote { display: none; }
}

@media (max-width: 480px) {
    .brand { width: 180px; margin-inline: 0; }
    .fe-plate { width: 42px; height: 42px; }
    .fe-bar { width: 24px; }
    .nav-signup { min-height: 38px; padding: 8px 10px; font-size: .72rem; }
    .nav-login { font-size: .76rem; }
    .nav-actions { gap: 8px; }
    .hero h1 { font-size: 3.6rem; }
    .hero-actions { align-items: start; flex-direction: column; gap: 21px; }
    .hero-visual { min-height: 440px; }
    .workout-preview { padding: 21px; }
    .orbit-one { width: 340px; height: 340px; }
    .orbit-two { width: 270px; height: 270px; }
    .sync-chip { max-width: 225px; font-size: .68rem; }
    .proof-grid { grid-template-columns: 1fr; gap: 8px; text-align: left; }
    .proof-grid span + span { border-left: 0; }
    .section-heading h2, .story-copy h2, .closing-section h2 { font-size: 2.65rem; }
    .feature-card { padding: 23px; }
    .story-diagram { padding: 18px; }
    .auth-card { padding: 25px; }
    .footer-inner { flex-direction: column; }
}

.social-page { padding-block: 52px 95px; }
.social-page > .back-link { margin-bottom: 38px; }
.social-heading { margin: 15px 0 34px; }
.social-heading h1 { margin-bottom: 12px; font-size: clamp(2.9rem, 5vw, 4.7rem); }
.social-heading > p:last-child { color: var(--muted); }
.community-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); align-items: start; gap: 20px; }
.community-main, .community-side { display: grid; gap: 20px; }
.social-card { padding: 27px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.social-card h2 { font-size: 1.55rem; }
.social-card h3 { font-size: 1.1rem; }
.social-card .field { margin-top: 17px; }
.social-card .field input, .social-card .field select, .social-card .field textarea { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #52646a; border-radius: 7px; color: var(--text); background: #0c151a; }
.social-card .field textarea { resize: vertical; }
.social-card .field input:focus, .social-card .field select:focus, .social-card .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.social-card .button { margin-top: 19px; }
.share-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.share-controls { margin: 18px 0; padding: 5px 16px; border: 1px solid #42575b; border-radius: 8px; }
.setting-toggle { display: flex; align-items: start; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting-toggle:last-child { border-bottom: 0; }
.setting-toggle input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); }
.setting-toggle strong, .setting-toggle small { display: block; }
.setting-toggle strong { color: var(--text); font-size: .89rem; }
.setting-toggle small { margin-top: 3px; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.feed-section .panel-heading { margin: 16px 0 2px; }
.feed-card { margin-top: 14px; }
.feed-top { display: flex; align-items: center; gap: 12px; }
.feed-avatar { display: grid; place-items: center; flex: none; width: 41px; height: 41px; border: 1px solid #a68a52; border-radius: 50%; color: var(--gold); background: #3b3428; font-size: .78rem; font-weight: 850; }
.feed-top strong, .feed-top small { display: block; }
.feed-top small { color: var(--muted); font-size: .75rem; }
.feed-kind { margin-left: auto; color: var(--aqua); font-size: .65rem; font-weight: 850; letter-spacing: .11em; white-space: nowrap; }
.feed-caption { margin: 20px 0 0; }
.feed-detail { margin-top: 18px; padding: 20px; border: 1px solid #42595c; border-radius: 10px; background: #17262b; }
.feed-detail h3 { margin: 0 0 8px; }
.feed-detail > p { margin-bottom: 10px; color: var(--muted); font-size: .83rem; }
.feed-exercise { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-top: 1px solid #31464b; font-size: .81rem; }
.feed-exercise span { color: var(--muted); text-align: right; }
.feed-detail .feed-note { padding-top: 10px; border-top: 1px solid #31464b; }
.feed-delete { margin-top: 18px; padding: 0; }
.feed-card .delete-actions { margin-top: 18px; color: var(--muted); font-size: .82rem; }
.friend-search .button, .community-side form .button { width: 100%; }
.people-results, .friend-list { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.people-results h3, .friend-list h3 { margin-bottom: 10px; font-size: .88rem; }
.person-row, .friend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #293c42; font-size: .83rem; }
.person-row small, .friend-row small { color: var(--muted); }
.friend-row strong, .friend-row small { display: block; }
.friend-actions { display: flex; gap: 8px; }
.friend-actions button { border: 0; color: var(--gold); background: transparent; font-size: .75rem; font-weight: 750; }
.settings-link { margin-top: 24px; }
.settings-form { display: grid; gap: 18px; max-width: 750px; }
.settings-form .social-card .field { max-width: 480px; }
.settings-email { color: var(--muted); font-size: .8rem; }
.settings-save { justify-self: start; }

@media (max-width: 1000px) {
    .community-grid { grid-template-columns: 1fr; }
    .community-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .social-page { padding-block: 35px 70px; }
    .community-side { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .social-card { padding: 19px; }
    .share-fields { grid-template-columns: 1fr; }
    .feed-kind { white-space: normal; text-align: right; }
    .feed-exercise { flex-direction: column; gap: 3px; }
    .feed-exercise span { text-align: left; }
    .feed-card .delete-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.skip-link { position: absolute; z-index: 30; left: 12px; top: -60px; padding: 10px 15px; border-radius: 6px; color: #101619; background: var(--gold); font-weight: 800; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dashboard-page, .builder-page { padding-block: 52px 95px; }
.dashboard-loading { display: grid; place-items: center; min-height: 450px; color: var(--muted); }
.dashboard-heading, .builder-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 20px 0 37px; }
.dashboard-heading h1, .builder-heading h1 { margin-bottom: 12px; font-size: clamp(2.8rem, 5vw, 4.7rem); }
.dashboard-heading p:not(.eyebrow), .builder-heading p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); }
.dashboard-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; }
.dashboard-actions .button { white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 23px; }
.summary-card { display: grid; gap: 7px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.summary-card > span { color: var(--gold); font-size: .68rem; font-weight: 850; letter-spacing: .14em; }
.summary-card strong { font-size: 2.55rem; line-height: 1; }
.summary-card small { color: var(--muted); font-size: .79rem; }
.training-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 20px; }
.calendar-panel, .agenda-panel, .recent-panel, .builder-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.calendar-panel, .agenda-panel, .recent-panel { padding: 26px; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.panel-heading .eyebrow { margin-bottom: 8px; }
.panel-heading h2 { margin: 0; font-size: clamp(1.4rem, 2vw, 1.9rem); }
.calendar-controls { display: flex; align-items: center; gap: 6px; }
.calendar-controls button { min-width: 37px; height: 36px; padding: 0 9px; border: 1px solid #4a5d62; border-radius: 7px; color: var(--text); background: #1a292e; font-weight: 700; }
.calendar-controls button:hover { border-color: var(--gold); color: var(--gold); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekday { padding: 5px 0 9px; color: var(--muted); font-size: .7rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 68px; border: 1px solid transparent; border-radius: 8px; color: var(--text); background: #1b292f; transition: background-color .2s ease, border-color .2s ease; }
.calendar-day:hover { border-color: #7b9193; background: #24363c; }
.calendar-day.selected { border-color: var(--gold); background: #3a3429; }
.calendar-day.outside { color: #829196; background: #162227; }
.day-number { font-size: .87rem; font-weight: 750; }
.day-markers { display: flex; gap: 4px; height: 6px; }
.plan-marker, .workout-marker { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.workout-marker { background: var(--aqua); }
.calendar-legend { display: flex; gap: 20px; margin-top: 18px; color: var(--muted); font-size: .78rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 7px; }
.agenda-panel { min-height: 420px; }
.agenda-empty { display: flex; flex-direction: column; align-items: start; justify-content: center; min-height: 280px; }
.empty-rule { width: 42px; height: 2px; margin-bottom: 22px; background: var(--gold); }
.agenda-empty h3 { margin-bottom: 9px; font-size: 1.55rem; }
.agenda-empty p, .muted-copy { color: var(--muted); }
.agenda-empty a { color: var(--gold); font-weight: 750; }
.agenda-list { display: grid; gap: 10px; }
.agenda-item { position: relative; display: grid; gap: 7px; padding: 18px 35px 18px 18px; border: 1px solid #43585b; border-radius: 9px; background: #1b2b30; transition: border-color .2s ease; }
.agenda-item:hover { border-color: var(--gold); }
.agenda-item strong { font-size: 1.05rem; }
.agenda-item small { color: var(--muted); }
.agenda-type { color: var(--gold); font-size: .65rem; font-weight: 850; letter-spacing: .14em; }
.agenda-type.logged { color: var(--aqua); }
.agenda-arrow { position: absolute; right: 17px; top: 24px; color: var(--gold); }
.recent-panel { margin-top: 20px; }
.recent-list { display: grid; }
.recent-list a { display: grid; grid-template-columns: 135px 1fr 120px; gap: 15px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.recent-list a:hover strong { color: var(--gold); }
.recent-list span { color: var(--muted); font-size: .81rem; }
.recent-list span:last-child { text-align: right; }
.recent-list b { margin-left: 8px; color: var(--gold); }
.dashboard-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 35px; color: var(--muted); font-size: .83rem; }
.dashboard-footer button { border: 0; color: var(--gold); background: transparent; font-weight: 700; }

.builder-page > .back-link { margin: 0; }
.builder-heading { margin-top: 35px; }
.builder-badge { padding: 9px 12px; border: 1px solid #6f7b5d; border-radius: 7px; color: var(--gold); font-size: .68rem; font-weight: 850; letter-spacing: .14em; white-space: nowrap; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 295px; gap: 20px; align-items: start; }
.builder-main, .builder-side { display: grid; gap: 20px; }
.builder-card { padding: 27px; }
.builder-card-heading { margin-bottom: 25px; }
.builder-card-heading > span { color: var(--gold); font-size: .69rem; font-weight: 850; letter-spacing: .15em; }
.builder-card h2 { margin: 8px 0 8px; font-size: 1.5rem; }
.builder-card-heading p, .builder-side p { margin-bottom: 0; color: var(--muted); font-size: .85rem; }
.builder-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.builder-card .field input, .builder-card .field select, .builder-card .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #52646a; border-radius: 7px; color: var(--text); background: #0c151a; }
.builder-card .field textarea { resize: vertical; }
.builder-card .field input:focus, .builder-card .field select:focus, .builder-card .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.builder-card .field { min-width: 0; }
.plan-import .button { width: 100%; }
.builder-exercise { margin: 16px 0; padding: 21px; border: 1px solid #3e5459; border-radius: 10px; background: #17242a; }
.exercise-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.exercise-heading strong { color: var(--gold); font-size: .72rem; letter-spacing: .12em; }
.check-row { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 19px; color: var(--muted); font-size: .83rem; }
.check-row input, .sets-table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--gold); }
.sets-table-wrap { width: 100%; overflow-x: auto; }
.sets-table { width: 100%; min-width: 480px; border-collapse: collapse; }
.sets-table th, .sets-table td { padding: 8px 4px; text-align: left; }
.sets-table thead th { color: var(--muted); font-size: .68rem; font-weight: 750; white-space: nowrap; }
.sets-table tbody th { color: var(--gold); font-size: .8rem; }
.sets-table input:not([type=checkbox]), .sets-table select { width: 100%; min-width: 53px; height: 35px; padding: 5px; border: 1px solid #52646a; border-radius: 5px; color: var(--text); background: #0b161a; font-size: .78rem; }
.sets-table select { min-width: 85px; }
.sets-table input:focus, .sets-table select:focus { outline: 2px solid var(--focus); }
.sets-table td:has(input[type=checkbox]) { text-align: center; }
.remove-set, .inline-button, .add-set { border: 0; color: var(--gold); background: transparent; font-weight: 750; }
.remove-set { font-size: 1.35rem; }
.remove-set:hover, .inline-button:hover, .add-set:hover { text-decoration: underline; }
.add-set { margin-top: 12px; padding: 5px 0; font-size: .82rem; }
.add-exercise { width: 100%; margin-top: 5px; }
.builder-side { position: sticky; top: 22px; }
.save-card .button, .catalog-card .button { width: 100%; margin-top: 22px; }
.save-card > a { display: block; margin-top: 18px; color: var(--muted); font-size: .8rem; text-align: center; }
.save-card > a:hover { color: var(--gold); }
.catalog-card .field { margin-top: 16px; margin-bottom: 0; }
.catalog-card .eyebrow { margin-bottom: 8px; }
.danger-link { color: #ffb0a2; }
.delete-card { border-color: #61423f; }
.delete-card h2 { font-size: 1.12rem; }
.delete-card .inline-button { margin-top: 16px; }
.button-danger { color: #fff; background: #993c34; }
.button-danger:hover { color: #fff; background: #ae4a41; }
.delete-actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 1000px) {
    .dashboard-heading { align-items: start; flex-direction: column; }
    .dashboard-actions { justify-content: start; }
    .training-grid { grid-template-columns: 1fr; }
    .builder-grid { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 760px) {
    .dashboard-page, .builder-page { padding-block: 35px 70px; }
    .builder-grid { grid-template-columns: 1fr; }
    .builder-side { position: static; }
    .summary-grid { grid-template-columns: 1fr; }
    .summary-card { grid-template-columns: 1fr auto; align-items: center; }
    .summary-card small { grid-column: 1 / -1; }
    .builder-heading { align-items: start; flex-direction: column; }
    .recent-list a { grid-template-columns: 100px 1fr; }
    .recent-list a span:last-child { grid-column: 2; text-align: left; }
}
@media (max-width: 480px) {
    .calendar-panel, .agenda-panel, .recent-panel, .builder-card { padding: 18px; }
    .calendar-panel .panel-heading { align-items: start; flex-direction: column; }
    .calendar-day { min-height: 53px; }
    .calendar-grid { gap: 3px; }
    .builder-fields { grid-template-columns: 1fr; }
    .builder-exercise { padding: 14px; }
    .dashboard-actions .button { width: 100%; }
}
.download-page { max-width: 900px; padding-top: 5rem; padding-bottom: 6rem; display: grid; gap: 1.5rem; }
.download-page h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.08; }
.download-page .social-card { padding: 2rem; }
.download-page li { margin: .6rem 0; }
.release-notes { white-space: pre-line; }
.download-checksum { display: block; overflow-wrap: anywhere; user-select: all; }
.admin-page .recent-panel { max-width: 1050px; }
.admin-search { display: flex; align-items: end; gap: 12px; margin-bottom: 12px; }
.admin-search .field { flex: 1; margin: 0; }
.admin-search input { width: 100%; }
.admin-users { display: grid; }
.admin-user { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.admin-user > div:first-child { display: grid; gap: 4px; min-width: 0; }
.admin-user small { color: var(--muted); overflow-wrap: anywhere; }
.admin-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-catalog-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-catalog-tabs button { min-height: 38px; padding: 0 14px; border: 1px solid #43585b; border-radius: 7px; color: var(--muted); background: #17242a; font: inherit; font-size: .83rem; font-weight: 750; cursor: pointer; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.admin-catalog-tabs button:hover, .admin-catalog-tabs button.selected { border-color: var(--gold); color: var(--text); background: #302d25; }
.admin-catalog-tabs button:focus-visible, .admin-editor button:focus-visible, .admin-catalog-row button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.admin-catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 16px; }
.admin-catalog-heading h3 { margin: 0 0 5px; font-size: 1.02rem; }
.admin-catalog-heading .muted-copy { margin: 0; font-size: .83rem; }
.admin-editor { margin: 16px 0 22px; padding: 20px; border: 1px solid #465a5e; border-radius: 10px; background: #121e23; }
.admin-editor-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr); gap: 0 18px; align-items: end; }
.admin-editor .field input, .admin-editor .field select, .admin-editor .field textarea { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #52646a; border-radius: 7px; color: var(--text); background: #0c151a; }
.admin-editor .field textarea { resize: vertical; }
.admin-editor .field input:focus, .admin-editor .field select:focus, .admin-editor .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.admin-editor-wide { grid-column: 1 / -1; }
.admin-editor .check-row { min-height: 42px; align-self: center; margin: 0; }
.admin-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.admin-catalog-list { display: grid; }
.admin-catalog-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.admin-catalog-row > div:first-child { display: grid; gap: 5px; min-width: 0; }
.admin-catalog-row small { color: var(--muted); overflow-wrap: anywhere; }
.admin-template-row .admin-actions { flex: 0 0 auto; }
.catalog-status { margin-left: 7px; color: #ffc78e; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-template-exercises { margin-top: 24px; }
.admin-template-exercise { margin-top: 12px; padding: 17px; border: 1px solid #3e5459; border-radius: 9px; background: #17242a; }
.admin-template-exercise-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(130px, .6fr) auto auto; gap: 12px; align-items: end; }
.admin-template-exercise-fields .field { margin-bottom: 0; }
.admin-template-exercise-fields .check-row { white-space: nowrap; }
.admin-template-sets { max-width: 620px; margin-top: 12px; }
.admin-template-sets input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--gold); }
.admin-template-sets td:has(input[type=checkbox]) { text-align: center; }
.admin-template-sets input:disabled { opacity: .55; }
.interest-consent { align-items: start; gap: 10px; margin: 18px 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.interest-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.interest-page .auth-card form > .muted-copy { margin-top: 14px; line-height: 1.5; }
@media (max-width: 600px) { .admin-user, .admin-search { align-items: stretch; flex-direction: column; } }
@media (max-width: 760px) {
    .admin-page .panel-heading { align-items: start; flex-direction: column; }
    .admin-catalog-heading { align-items: start; flex-direction: column; }
    .admin-template-exercise-fields { grid-template-columns: minmax(0, 1fr) minmax(110px, .6fr); }
    .admin-template-exercise-fields .check-row { grid-column: 1; }
    .admin-template-exercise-fields > button { justify-self: start; }
}
@media (max-width: 520px) {
    .admin-catalog-row { align-items: start; flex-direction: column; }
    .admin-editor-grid { grid-template-columns: 1fr; }
    .admin-editor-wide { grid-column: auto; }
    .admin-template-exercise-fields { grid-template-columns: 1fr; }
    .admin-template-exercise-fields .check-row { grid-column: auto; }
    .admin-template-row .admin-actions { flex-wrap: wrap; }
}
