html,
body {
    background: #050607;
    color: #f4f4f5;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100%;
}

body {
    margin: 0;
}

a,
.btn-link {
    color: inherit;
}

button,
a {
    letter-spacing: 0;
}

.btn-primary {
    color: #08090a;
    background-color: #f4f4f5;
    border-color: #f4f4f5;
}

.btn-primary:hover {
    background-color: #d8d8dc;
    border-color: #d8d8dc;
    color: #08090a;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.12rem #050607, 0 0 0 0.26rem #f4f4f5;
}

.page,
main,
.content {
    min-height: 100vh;
}

.content {
    padding: 0;
}

.landing-shell {
    background: #050607;
    color: #f4f4f5;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

.landing-nav {
    align-items: center;
    border-bottom: 1px solid #15171a;
    display: grid;
    gap: 2rem;
    grid-template-columns: auto 1fr auto;
    height: 66px;
    padding: 0 clamp(1.5rem, 7vw, 6.5rem);
}

.landing-brand,
.landing-links a,
.landing-footer,
.system-label,
.protocol-grid span {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.landing-brand {
    color: #f4f4f5;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

.landing-brand::after {
    color: #f4f4f5;
    content: " / System";
    font-weight: 700;
}

.landing-links {
    display: flex;
    gap: 2.2rem;
    padding-left: 2.4rem;
}

.landing-links a,
.muted-link,
.landing-footer a {
    color: #8d8d98;
    font-size: .85rem;
    text-decoration: none;
}

.landing-links a {
    font-size: .72rem;
}

.landing-links a:hover,
.muted-link:hover,
.landing-footer a:hover {
    color: #f4f4f5;
}

.landing-account,
.landing-account form {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.nav-button,
.join-button,
.primary-action,
.secondary-action {
    align-items: center;
    border-radius: 0;
    display: inline-flex;
    font-size: .9rem;
    font-weight: 500;
    height: 46px;
    justify-content: center;
    line-height: 1;
    min-width: 140px;
    padding: 0 1.35rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-button {
    background: transparent;
    border: 0;
    color: #8d8d98;
    min-width: 0;
    padding: 0;
}

.join-button,
.primary-action {
    background: #f4f4f5;
    border: 1px solid #f4f4f5;
    color: #08090a;
}

.join-button span {
    font-size: 1.35rem;
    line-height: .75;
    margin-right: .6rem;
}

.secondary-action {
    background: transparent;
    border: 1px solid #24262b;
    color: #a4a4ad;
    min-width: 176px;
}

.join-button:hover,
.primary-action:hover {
    background: #d8d8dc;
    border-color: #d8d8dc;
    color: #08090a;
}

.secondary-action:hover {
    border-color: #454852;
    color: #f4f4f5;
}

.landing-main {
    margin: 0 auto;
    max-width: 1232px;
    padding: clamp(7rem, 14vh, 8.25rem) clamp(1.5rem, 7vw, 0rem) 7.9rem;
    width: min(100%, calc(100vw - 3rem));
}

.landing-hero {
    isolation: isolate;
    max-width: 1040px;
    min-height: 430px;
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
    position: relative;
}

.landing-hero::before {
    background:
        linear-gradient(90deg, rgba(5, 6, 7, .98) 0%, rgba(5, 6, 7, .86) 42%, rgba(5, 6, 7, .35) 100%),
        linear-gradient(0deg, rgba(5, 6, 7, 1) 0%, rgba(5, 6, 7, 0) 26%, rgba(5, 6, 7, 0) 72%, rgba(5, 6, 7, 1) 100%),
        url("https://images.unsplash.com/photo-1534438327276-14e5300c3a48?auto=format&fit=crop&w=1800&q=82");
    background-position: center right;
    background-size: cover;
    bottom: -1.5rem;
    content: "";
    left: max(-6.5rem, calc((1232px - 100vw) / 2));
    opacity: .72;
    position: absolute;
    right: max(-6.5rem, calc((1232px - 100vw) / 2));
    top: -2.5rem;
    z-index: -1;
}

.system-label,
.protocol-grid span {
    color: #777781;
    font-size: .68rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.landing-hero h1 {
    color: #f5f5f6;
    font-size: clamp(3.25rem, 5.1vw, 4rem);
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.03;
    margin: 0;
    max-width: 1020px;
}

.landing-lede {
    color: #a2a2ab;
    font-size: 1.18rem;
    line-height: 1.46;
    margin: 2rem 0 0;
    max-width: 640px;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-top: 2.65rem;
}

.methodology-section {
    margin-top: 3.9rem;
}

.methodology-heading {
    margin-bottom: 1.35rem;
    max-width: 640px;
}

.methodology-heading .system-label {
    margin-bottom: 1rem;
}

.methodology-heading h2 {
    color: #f5f5f6;
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    font-weight: 650;
    line-height: 1.05;
    margin: 0 0 .85rem;
}

.methodology-heading p:last-child {
    color: #a0a0a8;
    font-size: 1rem;
    line-height: 1.45;
    margin: 0;
}

.protocol-grid {
    border: 1px solid #191b20;
    border-radius: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
}

.protocol-grid article {
    background: rgba(255, 255, 255, .004);
    border-bottom: 1px solid #191b20;
    border-right: 1px solid #191b20;
    min-height: 191px;
    padding: 2.25rem 2.05rem 2rem;
}

.protocol-grid article:nth-child(3n) {
    border-right: 0;
}

.protocol-grid article:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.protocol-grid span {
    display: block;
    margin-bottom: 1.35rem;
}

.protocol-grid h2 {
    color: #f5f5f6;
    font-size: 1.18rem;
    font-weight: 650;
    margin: 0 0 .8rem;
}

.protocol-grid p {
    color: #a0a0a8;
    font-size: .95rem;
    line-height: 1.35;
    margin: 0;
    max-width: 335px;
}

.landing-footer {
    align-items: center;
    border-top: 1px solid #15171a;
    color: #555761;
    display: flex;
    font-size: .68rem;
    justify-content: space-between;
    min-height: 110px;
    padding: 0 clamp(1.5rem, 7vw, 6.5rem);
}

.landing-footer nav {
    display: flex;
    gap: 2.25rem;
}

.eyebrow,
.feature-kicker {
    color: #777781;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    margin-bottom: .4rem;
    text-transform: uppercase;
}

.lead {
    color: inherit;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 760px;
}

.dashboard-shell {
    background: #050607;
    color: #f4f4f5;
    display: grid;
    gap: 1.25rem;
    min-height: 100vh;
    padding: clamp(1.5rem, 5vw, 4rem);
}

.dashboard-header,
.metric-card,
.roadmap-panel {
    background: #090a0c;
    border: 1px solid #1b1d22;
    border-radius: 8px;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.dashboard-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-header h1 {
    color: #f5f5f6;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 650;
    line-height: 1;
    margin: 0 0 1rem;
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card span {
    color: #777781;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    font-size: 2.5rem;
    line-height: 1;
    margin: .75rem 0;
}

.metric-card p,
.roadmap-panel,
.feature-grid p {
    color: #a0a0a8;
}

.roadmap-panel h2 {
    color: #f5f5f6;
    font-size: 1.1rem;
    margin-bottom: .5rem;
}

.milestone-list {
    display: grid;
    gap: .75rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.milestone-list li {
    align-items: center;
    border-top: 1px solid #1b1d22;
    display: flex;
    gap: .75rem;
    padding-top: .75rem;
}

.milestone-list span {
    background: #f4f4f5;
    border-radius: 999px;
    color: #08090a;
    flex: 0 0 auto;
    font-size: .72rem;
    font-weight: 800;
    padding: .3rem .6rem;
    text-transform: uppercase;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #ff6b6b;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

@media (max-width: 760px) {
    .landing-hero {
        min-height: 520px;
        padding-bottom: 3rem;
    }

    .landing-hero::before {
        background:
            linear-gradient(180deg, rgba(5, 6, 7, .8) 0%, rgba(5, 6, 7, .96) 70%, rgba(5, 6, 7, 1) 100%),
            url("https://images.unsplash.com/photo-1534438327276-14e5300c3a48?auto=format&fit=crop&w=1000&q=82");
        background-position: center top;
        left: -1.5rem;
        right: -1.5rem;
        top: -2rem;
        bottom: -1rem;
    }

    .landing-nav {
        gap: 1rem;
        grid-template-columns: 1fr auto;
        height: 65px;
        padding: 0 1.5rem;
    }

    .landing-brand::after,
    .landing-links {
        display: none;
    }

    .landing-account {
        gap: 1rem;
    }

    .muted-link {
        font-size: .95rem;
    }

    .join-button {
        height: 38px;
        min-width: 139px;
        padding: 0 .85rem;
    }

    .landing-main {
        padding: 6rem 1.5rem 6rem;
        width: 100%;
    }

    .system-label {
        margin-bottom: 1.8rem;
    }

    .landing-hero h1 {
        font-size: clamp(2.05rem, 9vw, 2.55rem);
        line-height: 1.12;
    }

    .landing-lede {
        font-size: 1.05rem;
        line-height: 1.5;
        margin-top: 1.9rem;
    }

    .landing-actions {
        display: grid;
        gap: .85rem;
        grid-template-columns: 1fr 1.25fr;
        margin-top: 2.4rem;
    }

    .primary-action,
    .secondary-action {
        height: 47px;
        min-width: 0;
        padding: 0 .8rem;
    }

        .methodology-section {
        margin-top: 3.9rem;
    }

    .protocol-grid {
        grid-template-columns: 1fr;
    }

    .protocol-grid article {
        min-height: 190px;
        padding: 2.15rem 2rem 2rem;
    }

        .protocol-grid article,
    .protocol-grid article:nth-child(3n),
    .protocol-grid article:nth-last-child(-n + 3) {
        border-bottom: 1px solid #191b20;
        border-right: 0;
    }

    .protocol-grid article:last-child {
        border-bottom: 0;
    }

    .landing-footer {
        align-items: center;
        flex-direction: column;
        gap: 1.5rem;
        justify-content: center;
        min-height: 153px;
        padding: 0 1.5rem;
        text-align: center;
    }

    .landing-footer nav {
        gap: 2rem;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 390px) {
    .landing-nav {
        padding: 0 1.45rem;
    }

    .landing-brand {
        font-size: .72rem;
    }

    .join-button {
        min-width: 139px;
    }

    .landing-actions {
        grid-template-columns: 1fr;
    }
}
.auth-page {
    align-items: center;
    background: #050607;
    color: #f4f4f5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 5rem 1.5rem;
}

.auth-panel {
    background: #090a0c;
    border: 1px solid #1b1d22;
    border-radius: 16px;
    max-width: 440px;
    padding: clamp(2rem, 5vw, 2.75rem);
    width: 100%;
}

.auth-panel h1 {
    color: #f5f5f6;
    font-size: clamp(2.1rem, 7vw, 3rem);
    font-weight: 650;
    line-height: 1;
    margin: 0 0 1rem;
}

.auth-copy {
    color: #a0a0a8;
    line-height: 1.5;
    margin: 0 0 2rem;
}

.auth-form .form-control {
    background: #050607;
    border: 1px solid #24262b;
    border-radius: 0;
    color: #f4f4f5;
    min-height: 56px;
}

.auth-form .form-control:focus {
    background: #050607;
    border-color: #f4f4f5;
    color: #f4f4f5;
    box-shadow: none;
}

.auth-form .form-floating > label {
    color: #8d8d98;
}

.auth-form .form-floating > .form-control:focus ~ label,
.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #a0a0a8;
}

.auth-submit {
    align-items: center;
    background: #f4f4f5;
    border: 1px solid #f4f4f5;
    border-radius: 0;
    color: #08090a;
    display: inline-flex;
    font-weight: 600;
    height: 50px;
    justify-content: center;
    margin-top: .35rem;
    width: 100%;
}

.auth-submit:hover {
    background: #d8d8dc;
    border-color: #d8d8dc;
}

.auth-switch,
.auth-links {
    color: #8d8d98;
    font-size: .95rem;
    margin: 1.35rem 0 0;
    text-align: center;
}

.auth-switch a,
.auth-links a {
    color: #f4f4f5;
    text-decoration: none;
}

.auth-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.auth-check {
    align-items: center;
    color: #a0a0a8;
    display: flex;
    gap: .55rem;
}

.auth-panel .text-danger,
.auth-panel .validation-message {
    color: #ff6b6b !important;
}

@media (max-width: 520px) {
    .auth-page {
        align-items: flex-start;
        padding: 4.5rem 1.25rem;
    }

    .auth-panel {
        border-radius: 14px;
        padding: 1.75rem;
    }

    .auth-links {
        flex-direction: column;
        gap: .65rem;
    }
}

.exercise-page {
    background: #050607;
    color: #f4f4f5;
    min-height: 100vh;
    padding: clamp(1.5rem, 5vw, 4rem);
}

.exercise-header {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 auto 2rem;
    max-width: 1280px;
}

.exercise-header h1 {
    color: #f5f5f6;
    font-size: clamp(2.35rem, 6vw, 4.5rem);
    font-weight: 650;
    line-height: 1;
    margin: 0 0 1rem;
    max-width: 860px;
}

.exercise-header p:last-child,
.muted-copy {
    color: #a0a0a8;
    line-height: 1.5;
    margin: 0;
    max-width: 700px;
}

.exercise-library,
.exercise-create {
    min-width: 0;
}

.exercise-create {
    background: #090a0c;
    border: 1px solid #1b1d22;
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

.exercise-create h2 {
    color: #f5f5f6;
    font-size: 1.45rem;
    margin: 0 0 .75rem;
}

.muscle-section {
    border: 1px solid #191b20;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.muscle-heading {
    align-items: center;
    background: #090a0c;
    border-bottom: 1px solid #191b20;
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.muscle-heading span {
    color: #f5f5f6;
    font-size: 1.05rem;
    font-weight: 650;
}

.muscle-heading strong {
    color: #777781;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.exercise-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exercise-card {
    border-bottom: 1px solid #191b20;
    border-right: 1px solid #191b20;
    min-height: 270px;
    padding: 1.35rem;
}

.exercise-card:nth-child(2n) {
    border-right: 0;
}

.exercise-card:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.exercise-card__topline {
    display: flex;
    gap: .65rem;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.exercise-card__topline span,
.exercise-card dt {
    color: #777781;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.exercise-card h2 {
    color: #f5f5f6;
    font-size: 1.3rem;
    margin: 0 0 1rem;
}

.exercise-card dl {
    display: grid;
    gap: .8rem;
    margin: 0 0 1rem;
}

.exercise-card dt,
.exercise-card dd {
    margin: 0;
}

.exercise-card dd,
.exercise-card p {
    color: #a0a0a8;
    line-height: 1.45;
}

.exercise-card p {
    margin: 0;
}

.exercise-form {
    display: grid;
    gap: .9rem;
    margin-top: 1.25rem;
}

.exercise-form label {
    color: #a0a0a8;
    display: grid;
    gap: .4rem;
    font-size: .88rem;
}

.exercise-form .form-control,
.exercise-form .form-select {
    background-color: #050607;
    border: 1px solid #24262b;
    border-radius: 0;
    color: #f4f4f5;
    min-height: 46px;
}

.exercise-form textarea.form-control {
    min-height: 110px;
}

.exercise-form .form-control:focus,
.exercise-form .form-select:focus {
    background-color: #050607;
    border-color: #f4f4f5;
    box-shadow: none;
    color: #f4f4f5;
}

.form-status {
    border: 1px solid #24262b;
    color: #f4f4f5;
    margin: 1rem 0 0;
    padding: .8rem;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.protocol-grid h2 a {
    color: inherit;
    text-decoration: none;
}

.protocol-grid h2 a:hover {
    color: #d8d8dc;
}

@media (max-width: 1050px) {
    .exercise-create {
        position: static;
    }
}

@media (max-width: 760px) {
    .exercise-page {
        padding: 1.5rem;
    }

    .exercise-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .exercise-grid {
        grid-template-columns: 1fr;
    }

    .exercise-card,
    .exercise-card:nth-child(2n),
    .exercise-card:nth-last-child(-n + 2) {
        border-bottom: 1px solid #191b20;
        border-right: 0;
    }

    .exercise-card:last-child {
        border-bottom: 0;
    }
}

.not-found-page {
    align-items: flex-start;
    background: #050607;
    color: #f4f4f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(2rem, 7vw, 6rem);
}

.not-found-page h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 650;
    line-height: 1;
    margin: 0 0 1rem;
}

.not-found-page p:not(.system-label) {
    color: #a0a0a8;
    margin-bottom: 2rem;
}
