:root {
    --ink: #12252c;
    --muted: #62747b;
    --green: #00a685;
    --green-deep: #007d68;
    --green-pale: #e0f5ef;
    --sand: #f1f4f1;
    --surface: #ffffff;
    --line: #dce5e1;
    --carbon: #081317;
    --carbon-soft: #13252b;
    --teal-glow: #17dbc0;
    --danger: #a3372b;
    --success: #19674e;
    --shadow: 0 18px 45px rgba(19, 40, 47, .06);
    font-family: "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f8faf8;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, p {
    margin-top: 0;
}

h1 {
    margin-bottom: .45rem;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.1;
}

h2 {
    margin-bottom: 1.15rem;
    font-size: 1.18rem;
}

.site-header {
    height: 80px;
    padding: 0 max(1.2rem, calc((100% - 1220px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #e8eeeb;
    backdrop-filter: blur(16px);
}

.public-view .site-header {
    gap: 2rem;
}

.public-view .public-nav {
    margin-left: auto;
    margin-right: auto;
    gap: 1.7rem;
}

.public-view .public-nav a {
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
}

.public-view .public-nav a:hover {
    color: var(--green);
}

.public-view .account-nav {
    gap: .75rem;
}

.studio-brand {
    gap: .62rem;
    text-transform: uppercase;
}

.studio-brand .brand-mark {
    display: block;
    width: auto;
    height: auto;
    color: var(--teal-glow);
    background: none;
    border-radius: 0;
    font-size: 1.68rem;
    font-weight: 750;
    letter-spacing: -.09em;
}

.studio-brand .brand-mark::after {
    display: none;
}

.studio-brand > strong {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 750;
    letter-spacing: .09em;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.brand-mark {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--carbon);
    color: white;
    font-weight: 700;
}

.brand-mark::after {
    content: "";
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal-glow);
}

.brand small {
    display: block;
    color: var(--muted);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--muted);
}

.site-header nav a {
    color: var(--green-deep);
    font-weight: 600;
}

.site-header .header-action {
    padding: .72rem 1.18rem;
    color: #fff;
    background: var(--green);
    border-radius: 999px;
}

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 2.1rem 1.2rem 4rem;
}

.eyebrow {
    margin-bottom: .45rem;
    color: var(--green);
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

.hero, .page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.hero {
    margin-bottom: 1.6rem;
}

.hero.compact {
    margin: 1.6rem 0;
}

.performance-hero {
    position: relative;
    min-height: 670px;
    margin: .4rem 0 4.4rem;
    overflow: hidden;
    color: #fff;
    background: var(--carbon);
    border-radius: 30px;
}

.performance-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(8, 19, 23, .98) 0%, rgba(8, 19, 23, .91) 34%, rgba(8, 19, 23, .26) 62%, rgba(8, 19, 23, .12) 100%),
        url("hero-bike-fitting-studio.webp");
    background-repeat: no-repeat;
    background-position: center, right center;
    background-size: cover;
}

.performance-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 620px;
    min-height: 670px;
    padding: 4.5rem 3.7rem 3rem;
}

.hero-kicker {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #8aa4a5;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hero-kicker span {
    width: 30px;
    height: 2px;
    background: var(--teal-glow);
}

.performance-content h1 {
    margin: .9rem 0 1.2rem;
    font-size: clamp(2.65rem, 5.5vw, 4.45rem);
    font-weight: 720;
    letter-spacing: -.055em;
    line-height: 1.02;
}

.performance-content h1 em {
    color: var(--teal-glow);
    font-style: normal;
}

.landing-lead {
    max-width: 530px;
    margin: 0 0 2.1rem;
    color: #b5c5c5;
    font-size: 1.04rem;
    line-height: 1.7;
}

.landing-actions {
    display: flex;
    gap: .85rem;
}

.performance-hero .button {
    padding: .92rem 1.42rem;
    border-radius: 999px;
}

.performance-hero .button.secondary {
    color: #e8f1ef;
    background: transparent;
    border: 1px solid rgba(232, 241, 239, .32);
}

.performance-hero .button.secondary:hover {
    border-color: var(--teal-glow);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 1.55rem;
    margin-top: 3.3rem;
}

.hero-metrics div {
    padding-left: 1rem;
    border-left: 1px solid rgba(23, 219, 192, .45);
}

.hero-metrics strong,
.hero-metrics span,
.analysis-badge strong,
.analysis-badge span {
    display: block;
}

.hero-metrics strong {
    font-size: .9rem;
}

.hero-metrics span {
    margin-top: .32rem;
    color: #88a3a4;
    font-size: .76rem;
}

.analysis-badge {
    position: absolute;
    right: 3rem;
    bottom: 2.7rem;
    z-index: 1;
    width: 185px;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(23, 219, 192, .28);
    border-radius: 15px;
    background: rgba(8, 19, 23, .75);
    backdrop-filter: blur(8px);
}

.analysis-badge p {
    margin-bottom: .85rem;
    color: var(--teal-glow);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.analysis-badge div {
    margin-top: .65rem;
}

.analysis-badge strong {
    font-size: 1.25rem;
}

.analysis-badge span {
    color: #a6b9b9;
    font-size: .75rem;
}

.landing-protocol {
    position: relative;
    margin: 0 0 4rem;
    padding: 3.3rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7eeeb;
    border-radius: 30px;
}

.landing-protocol::after {
    display: none;
}

.landing-assistance {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(460px, 1.15fr);
    align-items: center;
    gap: 3rem;
    margin: -1.2rem 1.2rem 4.6rem;
    padding: 3.15rem 3.3rem;
    overflow: hidden;
    background:
        linear-gradient(112deg, #fff 0%, #fff 56%, #f3faf7 100%);
    border: 1px solid #e1ebe7;
    border-radius: 28px;
    box-shadow: 0 24px 55px rgba(14, 37, 43, .07);
}

.landing-assistance::after {
    content: "";
    position: absolute;
    right: -6rem;
    bottom: -8rem;
    width: 20rem;
    height: 20rem;
    background-image:
        linear-gradient(rgba(0, 166, 133, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 166, 133, .09) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle, #000 25%, transparent 70%);
}

.landing-assistance h2 {
    margin: 0 0 1.35rem;
    max-width: 455px;
    font-size: clamp(2rem, 3vw, 2.65rem);
    letter-spacing: -.045em;
    line-height: 1.12;
}

.assistance-copy {
    position: relative;
    z-index: 1;
    color: var(--muted);
    line-height: 1.7;
}

.assistance-copy p:last-child {
    margin-bottom: 0;
}

.assistance-content {
    position: relative;
    z-index: 1;
}

.assistance-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .8rem;
    margin-top: 2rem;
}

.assistance-benefits div {
    position: relative;
    padding-top: 2.3rem;
}

.assistance-benefits div::before {
    content: "";
    position: absolute;
    top: .2rem;
    left: 0;
    width: 1.45rem;
    height: 1.45rem;
    border: 2px solid var(--green);
    border-radius: 50%;
}

.assistance-benefits div::after {
    content: "";
    position: absolute;
    top: .7rem;
    left: .5rem;
    width: .42rem;
    height: .42rem;
    background: var(--green);
    border-radius: 50%;
}

.assistance-benefits strong,
.assistance-benefits span {
    display: block;
}

.assistance-benefits strong {
    margin-bottom: .32rem;
    font-size: .8rem;
}

.assistance-benefits span {
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.5;
}

.interface-preview {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #e9f2f1;
    background:
        radial-gradient(circle at 85% 12%, rgba(23, 219, 192, .1), transparent 14rem),
        #071419;
    border: 1px solid rgba(23, 219, 192, .16);
    border-radius: 20px;
    box-shadow: 0 22px 42px rgba(8, 19, 23, .19);
}

.preview-bar {
    display: flex;
    align-items: center;
    gap: .52rem;
    padding: .8rem .9rem;
    color: #95a9aa;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .63rem;
}

.preview-bar strong {
    color: var(--teal-glow);
    font-size: .8rem;
}

.preview-bar i {
    width: 1.5rem;
    height: 1.5rem;
    margin-left: auto;
    background: rgba(23, 219, 192, .15);
    border: 1px solid rgba(23, 219, 192, .2);
    border-radius: 50%;
}

.preview-workspace {
    display: grid;
    grid-template-columns: 105px 1fr;
    min-height: 266px;
}

.preview-nav,
.study-preview-menu {
    display: grid;
    align-content: start;
    gap: .85rem;
    padding: 1rem .72rem;
    color: #83999a;
    border-right: 1px solid rgba(255, 255, 255, .07);
    font-size: .62rem;
}

.preview-nav strong,
.study-preview-menu strong {
    margin: -.25rem -.35rem .18rem;
    padding: .54rem .4rem;
    color: var(--teal-glow);
    background: rgba(23, 219, 192, .13);
    border-radius: 7px;
}

.preview-dashboard {
    padding: .95rem;
}

.preview-dashboard > p,
.study-comparison p {
    margin-bottom: .7rem;
    color: #d6e2e1;
    font-size: .72rem;
    font-weight: 650;
}

.preview-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .42rem;
}

.preview-stat-grid div {
    padding: .62rem .5rem;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 7px;
}

.preview-stat-grid small,
.preview-stat-grid strong {
    display: block;
}

.preview-stat-grid small {
    margin-bottom: .3rem;
    color: #8ea3a4;
    font-size: .54rem;
}

.preview-stat-grid strong {
    font-size: 1rem;
}

.preview-panels {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: .45rem;
    margin-top: .5rem;
}

.preview-table,
.preview-chart,
.study-trend {
    padding: .65rem;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 7px;
}

.preview-table span,
.preview-chart span {
    display: block;
    margin-bottom: .45rem;
    color: #a8baba;
    font-size: .56rem;
}

.preview-table i {
    display: block;
    height: .62rem;
    margin: .42rem 0;
    background: linear-gradient(90deg, rgba(23, 219, 192, .18) 0 18%, rgba(255, 255, 255, .055) 18%);
    border-radius: 4px;
}

.preview-chart strong {
    display: block;
    margin-bottom: .35rem;
    font-size: .95rem;
}

.interface-preview svg {
    display: block;
    width: 100%;
    height: auto;
}

.interface-preview polyline {
    fill: none;
    stroke: var(--teal-glow);
    stroke-width: 2;
}

.professional-rule {
    margin: 1.3rem 0 0;
    padding: 1.15rem 1.3rem;
    color: #fff;
    background:
        linear-gradient(110deg, var(--green-deep), var(--green));
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(0, 125, 104, .18);
    font-weight: 600;
}

.protocol-heading {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 2.3rem;
    text-align: center;
}

.protocol-heading h2 {
    margin: 0 auto .65rem;
    max-width: 650px;
    font-size: clamp(2rem, 3vw, 2.65rem);
    letter-spacing: -.045em;
    line-height: 1.12;
}

.protocol-heading > p {
    max-width: 520px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.65;
}

.feature-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
}

.feature-card {
    position: relative;
    min-height: 224px;
    padding: 1.7rem 1.8rem 1.8rem;
    overflow: hidden;
    color: #eef5f4;
    border: 1px solid rgba(23, 219, 192, .12);
    border-radius: 21px;
    background:
        radial-gradient(circle at 10% 0%, rgba(23, 219, 192, .12), transparent 9rem),
        var(--carbon);
    box-shadow: 0 14px 30px rgba(8, 19, 23, .09);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.feature-card::before {
    display: none;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 166, 133, .24);
    box-shadow: 0 22px 42px rgba(18, 37, 44, .09);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    color: var(--teal-glow);
    background: rgba(23, 219, 192, .08);
    border: 1px solid rgba(23, 219, 192, .35);
    border-radius: 50%;
}

.feature-icon svg {
    width: 1.55rem;
    height: 1.55rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    margin: 1.05rem 0 .7rem;
    font-size: 1.25rem;
    letter-spacing: -.02em;
}

.feature-card p {
    margin: 0;
    color: #9fb2b3;
    line-height: 1.68;
}

.landing-future {
    position: relative;
    display: grid;
    grid-template-columns: minmax(330px, .9fr) minmax(480px, 1.35fr);
    gap: 3rem;
    margin-bottom: 4rem;
    padding: 3.35rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 88% 0%, rgba(23, 219, 192, .22), transparent 22rem),
        linear-gradient(118deg, #081317 0%, #102b31 100%);
    border-radius: 30px;
}

.landing-future::before {
    content: "";
    position: absolute;
    right: -2rem;
    bottom: 0;
    width: 18rem;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(8, 19, 23, .1), rgba(8, 19, 23, .74)),
        url("hero-bike-fitting-studio.webp") center / cover;
    opacity: .34;
}

.future-heading,
.future-grid {
    position: relative;
    z-index: 1;
}

.future-heading h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 3vw, 2.55rem);
    letter-spacing: -.04em;
    line-height: 1.12;
}

.future-heading > p:last-child {
    margin: 0;
    color: #b2c3c3;
    line-height: 1.65;
}

.future-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    gap: .8rem;
}

.future-grid span {
    position: relative;
    display: grid;
    place-items: center;
    gap: .58rem;
    min-height: 88px;
    padding: .8rem .45rem;
    color: #e0ebea;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(23, 219, 192, .2);
    border-radius: 14px;
    backdrop-filter: blur(5px);
    text-align: center;
}

.future-grid span b {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    color: var(--teal-glow);
    border: 1px solid rgba(23, 219, 192, .25);
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 500;
}

.landing-followup {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, .76fr) minmax(480px, 1.24fr);
    align-items: center;
    gap: 2.8rem;
    margin-bottom: 4rem;
    padding: 3.2rem 3.3rem;
    background:
        linear-gradient(100deg, #fff 0%, #fff 46%, #f6faf8 100%);
    border: 1px solid #e1ebe7;
    border-radius: 30px;
}

.landing-followup h2 {
    margin-bottom: .85rem;
    max-width: 485px;
    font-size: clamp(2rem, 3vw, 2.55rem);
    letter-spacing: -.04em;
    line-height: 1.12;
}

.followup-copy > p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.65;
}

.followup-list {
    display: grid;
    gap: .6rem;
    margin: 1.65rem 0 0;
    padding: 0;
    list-style: none;
}

.followup-list li {
    position: relative;
    padding: .72rem 4.85rem .72rem 2.15rem;
    background: var(--surface);
    border: 1px solid #e2ebe7;
    border-radius: 13px;
    font-size: .9rem;
    font-weight: 550;
}

.followup-list li::before {
    content: "";
    position: absolute;
    top: 1.02rem;
    left: .95rem;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

.followup-list li::after {
    content: "Disponible";
    position: absolute;
    top: .5rem;
    right: .7rem;
    padding: .26rem .48rem;
    color: var(--green-deep);
    background: var(--green-pale);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.followup-list li:nth-child(n+4)::after {
    content: "A venir";
    color: #768387;
    background: #edf1ef;
}

.landing-footer {
    position: relative;
    display: grid;
    grid-template-columns: minmax(195px, 1fr) minmax(330px, 1.4fr) minmax(210px, .85fr);
    align-items: start;
    gap: 2rem;
    margin-top: 4.5rem;
    padding: 3rem 3rem;
    overflow: hidden;
    color: #e9f1f0;
    background:
        radial-gradient(circle at 7% 50%, rgba(23, 219, 192, .13), transparent 16rem),
        linear-gradient(105deg, #071217, #112b31);
    border: 1px solid rgba(23, 219, 192, .13);
    border-radius: 28px;
}

.landing-footer::after {
    content: "";
    position: absolute;
    right: -7rem;
    bottom: -11rem;
    width: 24rem;
    height: 24rem;
    border: 1px solid rgba(23, 219, 192, .14);
    border-radius: 50%;
}

.footer-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 1.05rem;
}

.footer-brand .brand-mark {
    width: auto;
    height: auto;
    color: var(--teal-glow);
    background: none;
    border: 0;
    border-radius: 0;
    font-size: 1.7rem;
    letter-spacing: -.09em;
}

.footer-brand .brand-mark::after {
    display: none;
}

.footer-brand strong {
    font-size: 1.1rem;
}

.footer-brand p {
    margin: .18rem 0 0;
    color: #97aaab;
    font-size: .87rem;
}

.footer-links {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 1.5rem;
}

.landing-footer nav {
    display: grid;
    align-content: start;
    gap: .55rem;
    color: #b8c8c8;
    font-size: .92rem;
}

.landing-footer nav strong {
    margin-bottom: .35rem;
    color: #f2f6f5;
    font-size: .9rem;
}

.landing-footer nav a {
    padding: 0;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.landing-footer nav a:hover {
    color: var(--teal-glow);
}

.footer-cta {
    position: relative;
    z-index: 1;
    padding: 1.2rem;
    border: 1px solid rgba(23, 219, 192, .29);
    border-radius: 16px;
}

.footer-cta strong {
    display: block;
    margin-bottom: .65rem;
    color: #fff;
}

.footer-cta p {
    margin-bottom: 1.05rem;
    color: #a5b7b7;
    font-size: .88rem;
    line-height: 1.55;
}

.footer-cta .button {
    display: inline-block;
    padding: .72rem 1rem;
    color: var(--carbon);
    background: var(--teal-glow);
    font-size: .88rem;
}

.institutional-page {
    display: grid;
    justify-items: center;
    max-width: 670px;
    margin: 6rem auto 0;
    padding: 4.4rem 2rem;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 166, 133, .1), transparent 18rem),
        var(--surface);
    border: 1px solid #e5ebe8;
    border-radius: 26px;
    box-shadow: 0 25px 60px rgba(18, 37, 44, .09);
}

.institutional-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin-bottom: 1.65rem;
    color: var(--teal-glow);
    background: var(--carbon);
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 700;
}

.institutional-page h1 {
    margin-bottom: .8rem;
    font-size: clamp(2rem, 4vw, 2.55rem);
}

.institutional-page > p:not(.eyebrow) {
    max-width: 540px;
    margin-bottom: 2rem;
    color: var(--muted);
    line-height: 1.75;
}

.contact-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(330px, .9fr) minmax(430px, 1.1fr);
    gap: 3.4rem;
    align-items: start;
    margin: .4rem 0 2rem;
    padding: 3.2rem 3.3rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 96% 8%, rgba(0, 166, 133, .1), transparent 20rem),
        linear-gradient(112deg, #fff 0%, #fff 47%, #f3faf7 100%);
    border: 1px solid #e1ebe7;
    border-radius: 30px;
    box-shadow: 0 24px 55px rgba(14, 37, 43, .07);
}

.study-preview-grid {
    display: grid;
    grid-template-columns: 94px minmax(180px, 1fr) 116px;
    min-height: 294px;
}

.study-comparison {
    padding: .9rem .7rem;
}

.rider-shots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .4rem;
    margin-bottom: .7rem;
}

.rider-shots span {
    display: block;
    height: 76px;
    background:
        linear-gradient(90deg, rgba(8, 19, 23, .28), rgba(8, 19, 23, .18)),
        url("hero-bike-fitting-studio.webp") 62% center / cover;
    border: 1px solid rgba(23, 219, 192, .14);
    border-radius: 7px;
}

.study-values {
    display: grid;
    grid-template-columns: 1fr 38px 38px;
    gap: .35rem;
    margin-top: .35rem;
    padding-top: .42rem;
    color: #8da4a5;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: .58rem;
}

.study-values b {
    color: #dfe9e8;
}

.study-trend {
    margin: .9rem .65rem .9rem 0;
}

.study-trend small {
    display: block;
    color: #9db0b1;
    font-size: .57rem;
}

.study-trend strong {
    display: block;
    margin: .7rem 0 1.25rem;
    color: #fff;
    font-size: 1rem;
}

.contact-layout::after {
    content: "";
    position: absolute;
    right: -7rem;
    bottom: -9rem;
    width: 23rem;
    height: 23rem;
    border: 1px solid rgba(0, 166, 133, .12);
    border-radius: 50%;
}

.contact-copy,
.contact-card {
    position: relative;
    z-index: 1;
}

.contact-copy h1 {
    margin: .85rem 0 1.1rem;
    max-width: 490px;
    font-size: clamp(2.05rem, 3.2vw, 2.7rem);
    letter-spacing: -.045em;
    line-height: 1.12;
}

.contact-copy h1 em {
    color: var(--green);
    font-style: normal;
}

.contact-copy > p:not(.eyebrow) {
    max-width: 475px;
    color: var(--muted);
    line-height: 1.72;
}

.contact-copy .contact-note {
    margin: 1.7rem 0 0;
    padding: 1.05rem 1.2rem;
    color: var(--green-deep);
    background: var(--green-pale);
    border: 1px solid #c6eade;
    border-radius: 14px;
}

.contact-card {
    padding: 0 0 0 3rem;
    color: var(--ink);
    border-left: 1px solid #d8e5e0;
}

.contact-card h2 {
    margin-bottom: 1.35rem;
    font-size: 1.4rem;
    letter-spacing: -.03em;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact-form textarea {
    min-height: 150px;
}

.contact-check {
    position: absolute;
    left: -10000px;
}

.contact-actions {
    padding-top: .25rem;
}

.contact-captcha {
    min-height: 65px;
}

.contact-actions button {
    width: 100%;
    padding: .95rem 1.2rem;
}

.landing-security {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.45rem 2.7rem;
    color: #fff;
    background: var(--carbon-soft);
    border-radius: 24px;
}

.landing-security h2 {
    margin-bottom: .45rem;
}

.landing-security p:last-child {
    max-width: 700px;
    margin-bottom: 0;
    color: #b2c3c3;
}

.landing-security .button.secondary {
    color: var(--carbon);
    background: var(--teal-glow);
    border-radius: 999px;
}

.landing-security .button.secondary:hover {
    color: #fff;
    background: var(--green);
}

.page-actions {
    margin-bottom: .9rem;
}

.back {
    color: var(--green-deep);
    font-weight: 600;
}

button, .button {
    padding: .8rem 1.2rem;
    color: #fff;
    background: var(--green);
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

button:hover, .button:hover {
    background: var(--green-deep);
}

button.secondary, .button.secondary {
    color: var(--green-deep);
    background: var(--green-pale);
}

.app-view {
    background:
        radial-gradient(circle at 92% 0%, rgba(0, 166, 133, .12), transparent 32rem),
        #f2f5f3;
}

.app-view .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 76px;
    color: #fff;
    background: rgba(8, 19, 23, .97);
    border-color: rgba(255, 255, 255, .08);
}

.app-view .brand small {
    color: #8fa5a7;
}

.app-view .brand-mark {
    background: rgba(23, 219, 192, .12);
    border: 1px solid rgba(23, 219, 192, .28);
}

.app-view .studio-brand .brand-mark {
    color: var(--teal-glow);
    background: none;
    border: 0;
}

.app-view .studio-brand > strong {
    color: #eef5f4;
}

.app-view .site-header nav {
    gap: .55rem;
}

.app-view .site-header nav a {
    padding: .62rem .84rem;
    color: #c8d5d5;
    border-radius: 999px;
}

.app-view .site-header nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.app-view .site-header nav .logout-link {
    color: var(--teal-glow);
}

.user-badge {
    display: grid;
    gap: .04rem;
    margin: 0 .55rem;
    padding: 0 1rem;
    color: #eef5f4;
    border-left: 1px solid rgba(255, 255, 255, .14);
    font-size: .92rem;
    font-weight: 600;
}

.user-badge small {
    color: #80989b;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.account-menu {
    position: relative;
}

.account-menu .user-badge {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.account-menu .user-badge small {
    grid-column: 1;
}

.account-menu summary {
    cursor: pointer;
    list-style: none;
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu .user-badge::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / 3;
    width: 7px;
    height: 7px;
    margin: .55rem 0 0 .35rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
}

.account-menu-panel {
    position: absolute;
    top: calc(100% + .65rem);
    right: 0;
    z-index: 40;
    display: none;
    min-width: 190px;
    padding: .55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(12, 48, 64, .14);
}

.account-menu[open] .account-menu-panel {
    display: grid;
}

.app-view .site-header .account-menu-panel a {
    display: block;
    padding: .72rem .78rem;
    color: var(--ink);
    border-radius: 7px;
}

.app-view .site-header .account-menu-panel a:hover {
    color: var(--green);
    background: var(--green-pale);
}

.app-view .container {
    max-width: 1280px;
    padding-top: 2rem;
}

.dashboard-shell {
    max-width: 1120px;
    min-height: 0;
    margin: 0 auto 1.6rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e9e5;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.dashboard-windowbar {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 58px;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid #e2e9e5;
}

.dashboard-window-logo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: var(--green);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 750;
}

.dashboard-windowbar strong {
    font-size: .9rem;
}

.dashboard-window-dot {
    width: 22px;
    height: 22px;
    margin-left: auto;
    background: #f7ece6;
    border: 1px solid #ead0c5;
    border-radius: 50%;
}

.dashboard-app {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
}

.dashboard-side {
    display: grid;
    align-content: start;
    gap: .65rem;
    padding: 1.35rem 1rem;
    color: var(--muted);
    background: #f7faf8;
    border-right: 1px solid #e2e9e5;
    font-size: .82rem;
}

.dashboard-side a,
.dashboard-side span {
    color: inherit;
    padding: .68rem .72rem;
    border-radius: 8px;
}

.dashboard-side a:hover {
    color: var(--green-deep);
}

.dashboard-side .is-active {
    color: var(--green-deep);
    background: var(--green-pale);
}

.dashboard-side .is-disabled {
    opacity: .48;
    cursor: not-allowed;
}

.dashboard-main {
    min-width: 0;
    padding: 1.35rem 1.65rem 1.55rem;
}

.dashboard-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-title-row h1 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -.02em;
}

.dashboard-title-row button {
    padding: .62rem .9rem;
    border-radius: 8px;
    font-size: .83rem;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: .75rem;
}

.dashboard-summary-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-metric,
.dashboard-card {
    background: var(--surface);
    border: 1px solid #e2e9e5;
    border-radius: 8px;
}

.dashboard-metric {
    min-height: 108px;
    padding: 1rem 1.1rem;
    transition: border-color .2s ease, transform .2s ease;
}

.dashboard-metric:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 166, 133, .35);
}

.dashboard-metric span,
.dashboard-card h2 {
    display: block;
    margin: 0 0 .7rem;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 500;
}

.dashboard-metric strong {
    color: var(--green);
    font-size: 1.55rem;
    line-height: 1;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr);
    gap: .75rem;
    margin-bottom: 1rem;
}

.dashboard-card {
    min-height: 170px;
    padding: 1rem 1.1rem;
}

.dashboard-list {
    display: grid;
    gap: .55rem;
}

.dashboard-list a {
    display: grid;
    grid-template-columns: minmax(112px, .68fr) minmax(0, 1fr) max-content;
    align-items: center;
    gap: .6rem;
    padding: .56rem 0;
    color: var(--ink);
    border-bottom: 1px solid #eef0eb;
    font-size: .82rem;
}

.dashboard-list a:last-child {
    border-bottom: 0;
}

.dashboard-list strong {
    font-weight: 650;
}

.dashboard-list span,
.dashboard-list small {
    color: var(--muted);
    font-size: .78rem;
}

.dashboard-list small {
    text-align: right;
    white-space: nowrap;
}

.dashboard-roadmap {
    background: #fcfaf6;
}

.dashboard-module-grid {
    display: grid;
    gap: .65rem;
}

.dashboard-module-grid span,
.dashboard-module-grid a {
    display: block;
    padding: .78rem .85rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #e2e9e5;
    border-radius: 8px;
}

.dashboard-module-grid strong,
.dashboard-module-grid small {
    display: block;
}

.dashboard-module-grid strong {
    margin-bottom: .24rem;
    color: var(--green);
}

.dashboard-module-grid small {
    color: var(--muted);
}

.dashboard-module-grid a:hover {
    border-color: rgba(0, 166, 133, .35);
}

.dashboard-directory {
    margin-bottom: 0;
}

.reports-title-row {
    align-items: flex-start;
}

.reports-title-row p {
    margin: .28rem 0 0;
    color: var(--muted);
    font-size: .84rem;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.report-actions .button {
    min-height: 36px;
    padding: .52rem .72rem;
    border-radius: 8px;
    font-size: .78rem;
}

.report-actions .is-disabled {
    opacity: .52;
    cursor: not-allowed;
}

.dashboard-shell .panel {
    box-shadow: none;
}

.app-view .page-actions {
    margin-bottom: 1.35rem;
    padding: .2rem 0;
}

.study-action-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .55rem;
}

.app-view .back {
    color: var(--green-deep);
}

.app-view .hero.compact {
    margin: 0 0 1.45rem;
    padding: 1.85rem 2.15rem;
    color: #fff;
    background:
        linear-gradient(100deg, rgba(8, 19, 23, .98), rgba(19, 37, 43, .92)),
        url("hero-bike-fitting-studio.webp") right center / cover;
    border-radius: 20px;
}

.app-view .hero.compact .eyebrow {
    color: var(--teal-glow);
}

.app-view .hero.compact .muted {
    max-width: 710px;
    margin-bottom: 0;
    color: #b1c3c3;
    line-height: 1.55;
}

.panel {
    margin-bottom: 1.35rem;
    padding: 1.45rem;
    background: var(--surface);
    border: 1px solid #e2e9e5;
    border-radius: 17px;
    box-shadow: var(--shadow);
}

.app-view .panel {
    padding: 1.65rem;
    border-radius: 18px;
}

.app-view .panel h2 {
    letter-spacing: -.02em;
}

.app-view .section-head {
    padding-bottom: .95rem;
    border-bottom: 1px solid #edf1ef;
}

.new-client-panel {
    display: none;
}

.new-client-panel.is-open {
    display: block;
}

.section-head {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.section-head h2 {
    margin-bottom: 0;
}

.pill {
    padding: .3rem .72rem;
    border-radius: 999px;
    background: var(--green-pale);
    color: var(--green-deep);
    font-size: .87rem;
    font-weight: 650;
}

.account-subscription-grid,
.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 1rem;
    min-width: 0;
}

.account-subscription-grid {
    margin-bottom: 1rem;
}

.account-subscription-grid span {
    padding: .95rem;
    background: #f7fbf9;
    border: 1px solid #e2e9e5;
    border-radius: 12px;
}

.account-subscription-grid strong {
    display: block;
    color: var(--ink);
}

.account-subscription-grid small {
    color: var(--muted);
}

.subscription-card.is-highlighted {
    border-color: rgba(0, 166, 133, .38);
}

.subscription-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.subscription-price {
    margin: .35rem 0 0;
    color: var(--ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.subscription-card .feature-list {
    flex: 1;
}

.subscription-card h2,
.subscription-card li {
    overflow-wrap: anywhere;
}

.subscription-card .actions {
    display: grid;
    width: 100%;
    min-width: 0;
    margin-top: auto;
}

.subscription-card .actions > * {
    width: 100%;
    min-width: 0;
}

.subscription-card .actions .button,
.subscription-card .actions button {
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.waitlist-form {
    display: grid;
    gap: .8rem;
    width: 100%;
    min-width: 0;
}

.waitlist-form label {
    display: grid;
    gap: .38rem;
    min-width: 0;
}

.waitlist-form textarea {
    min-height: 82px;
}

.waitlist-form input,
.waitlist-form textarea {
    min-width: 0;
}

.feature-list {
    margin: 0 0 1.2rem;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.7;
}

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

.form-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

label span {
    display: block;
    margin-bottom: .42rem;
    color: var(--muted);
    font-size: .91rem;
    font-weight: 600;
}

input, textarea, select {
    width: 100%;
    padding: .72rem .78rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid #ccd5d0;
    border-radius: 10px;
    font: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid rgba(0, 166, 133, .25);
    border-color: var(--green);
}

textarea {
    resize: vertical;
}

.wide {
    grid-column: 1 / -1;
}

.actions {
    display: flex;
    justify-content: flex-end;
}

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

.columns .panel {
    margin-bottom: 0;
}

.date-inline {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.date-inline span {
    margin: 0;
}

.measure-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: .9rem 1.15rem;
}

.input-unit {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.input-unit input {
    min-width: 0;
}

.input-unit small {
    min-width: 38px;
    color: var(--muted);
}

.bike-workspace {
    display: grid;
    grid-template-columns: minmax(320px, .86fr) minmax(460px, 1.14fr);
    align-items: start;
    gap: 1.55rem;
}

.bike-figure {
    position: sticky;
    top: 1.2rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid #e2ebe7;
    border-radius: 14px;
    background: #f5f8f6;
}

.bike-figure img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}

.bike-figure figcaption {
    margin-top: .75rem;
    color: var(--muted);
    font-size: .87rem;
}

.measure-header, .measure-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 122px 122px;
    gap: .7rem;
    align-items: center;
}

.measure-header {
    margin-bottom: .45rem;
    color: var(--muted);
    font-size: .88rem;
}

.measure-row {
    padding: .44rem 0;
    border-bottom: 1px solid #edf0ed;
}

.measure-row label {
    font-size: .93rem;
}

.measure-row label b {
    display: inline-grid;
    width: 27px;
    height: 27px;
    margin-right: .45rem;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--green);
}

.measure-row input {
    padding: .55rem;
}

.measure-row .input-unit {
    gap: .27rem;
}

.measure-row small {
    min-width: 33px;
    font-size: .77rem;
}

.rider-measures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
    margin-top: 1.2rem;
    align-items: start;
}

.rider-angle-guide {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.rider-angle-guide .guide-image {
    width: 100%;
    max-width: 860px;
}

.rider-angle-guide .guide-image img {
    min-height: 280px;
}

.rider-table {
    width: 100%;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #e3e8e4;
    border-radius: 14px;
}

.rider-table.after-stage {
    border-color: #b8e6dc;
    background: #f3fbf8;
}

.rider-header, .rider-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(96px, .35fr) minmax(96px, .35fr);
    align-items: center;
    gap: .48rem;
}

.rider-header {
    margin-bottom: .45rem;
    color: var(--muted);
    font-size: .87rem;
}

.rider-row {
    padding: .42rem 0;
    border-bottom: 1px solid #edf0ed;
}

.rider-row label {
    font-size: .92rem;
    font-weight: 600;
}

.rider-row label small {
    display: block;
    margin-top: .12rem;
    color: var(--muted);
    font-weight: 400;
}

.rider-row input {
    padding: .55rem;
}

.rider-row .input-unit {
    gap: .2rem;
}

.rider-row .input-unit small {
    min-width: 25px;
    font-size: .75rem;
}

.rider-note {
    display: block;
    margin-top: .9rem;
}

.rider-note textarea {
    margin-top: .1rem;
}

.study-form > .panel, .notes-columns {
    margin-bottom: 1.35rem;
}

.study-form {
    padding-bottom: 5rem;
}

.save-bar {
    position: fixed;
    right: max(1.2rem, calc((100vw - 1280px) / 2 + 1.2rem));
    bottom: 1.2rem;
    z-index: 25;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.save-bar button {
    padding: .95rem 1.6rem;
    box-shadow: 0 12px 28px rgba(16, 90, 75, .22);
    pointer-events: auto;
}

@media (max-width: 600px) {
    .save-bar {
        right: 1rem;
        left: 1rem;
        bottom: .8rem;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    color: var(--muted);
    font-size: .87rem;
    text-align: left;
}

td, th {
    padding: .8rem .6rem;
    border-bottom: 1px solid #e8ece8;
}

.text-link {
    color: var(--green);
    font-weight: 650;
}

.empty {
    padding: 1rem;
    color: var(--muted);
    text-align: center;
}

.study-list {
    display: grid;
    gap: .7rem;
}

.study-card {
    padding: .95rem;
    border: 1px solid #e4e9e5;
    border-radius: 12px;
    transition: border-color .2s ease, transform .2s ease;
}

.study-card:hover {
    transform: translateX(3px);
    border-color: rgba(0, 166, 133, .35);
}

.study-card-main {
    display: block;
}

.study-list span {
    display: block;
    margin-top: .28rem;
    color: var(--muted);
}

.study-card-actions {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
}

.study-card-actions summary {
    cursor: pointer;
    color: var(--green);
    font-size: .85rem;
    font-weight: 700;
}

.study-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    margin-top: .65rem;
}

.study-inline-form button,
.study-inline-form select {
    min-height: 38px;
}

.danger-button {
    color: #fff;
    background: var(--danger);
}

.danger-button:hover {
    background: #7f291f;
}

.email-template-new {
    margin-top: 1rem;
}

.email-template-new summary {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: .75rem 1.1rem;
    color: var(--green-deep);
    background: var(--green-pale);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 650;
    list-style: none;
}

.email-template-new summary::-webkit-details-marker {
    display: none;
}

.email-template-new[open] summary {
    margin-bottom: 1rem;
}

.merge-preview-panel {
    margin-bottom: 1.2rem;
}

.muted-text {
    color: var(--muted);
}

.merge-preview-table {
    max-height: 460px;
    overflow: auto;
}

.merge-preview-table table {
    width: max-content;
    min-width: 100%;
}

.merge-preview-table td,
.merge-preview-table th {
    max-width: 280px;
    vertical-align: top;
}

.merge-confirm-actions {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.merge-choice-list {
    display: grid;
    gap: .35rem;
    min-width: 150px;
}

.merge-choice-list label {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--ink);
    font-size: .85rem;
}

.merge-choice-list input {
    width: 16px;
    height: 16px;
}

.merge-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .7rem;
}

.migration-list {
    margin: 0 0 1.1rem;
    padding-left: 1.4rem;
}

.migration-list li {
    margin: .4rem 0;
}

.flash {
    margin-bottom: 1.2rem;
    padding: .85rem 1rem;
    border-radius: 8px;
}

.flash.error {
    color: var(--danger);
    background: #f8e7e5;
}

.flash.success {
    color: var(--success);
    background: var(--green-pale);
}

.demo-banner {
    padding: .7rem 1.2rem;
    color: #624711;
    background: #fff0c8;
    text-align: center;
    font-size: .92rem;
}

.demo-banner strong {
    margin-right: .3rem;
}

.demo-view {
    display: none;
}

.demo-view.is-active {
    display: block;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(380px, 1.05fr) minmax(370px, .8fr);
    max-width: 1040px;
    min-height: 640px;
    margin: 2.3rem auto 0;
    overflow: hidden;
    background: var(--surface);
    border-radius: 26px;
    box-shadow: 0 24px 64px rgba(8, 19, 23, .1);
}

.auth-scene {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: end;
    min-height: 640px;
    padding: 3.2rem;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(0deg, rgba(8, 19, 23, .98), rgba(8, 19, 23, .18) 72%),
        url("hero-bike-fitting-studio.webp") 68% center / cover;
}

.auth-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 19, 23, .55), transparent);
}

.auth-scene > * {
    position: relative;
    z-index: 1;
}

.auth-scene h1 {
    margin: .85rem 0 .9rem;
    color: #fff;
    font-size: clamp(2.15rem, 4vw, 2.8rem);
    letter-spacing: -.055em;
}

.auth-scene h1 em {
    color: var(--teal-glow);
    font-style: normal;
}

.auth-scene > p:not(.hero-kicker) {
    max-width: 470px;
    margin-bottom: 2rem;
    color: #afc2c2;
    line-height: 1.6;
}

.auth-scene-metrics {
    display: flex;
    gap: 1.7rem;
}

.auth-scene-metrics span {
    padding-left: .9rem;
    border-left: 1px solid rgba(23, 219, 192, .5);
}

.auth-scene-metrics strong,
.auth-scene-metrics small {
    display: block;
}

.auth-scene-metrics small {
    margin-top: .28rem;
    color: #879fa1;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.1rem;
    background: var(--surface);
}

.auth-card .stack {
    display: grid;
    gap: 1rem;
    margin-top: 1.7rem;
}

.auth-card button {
    margin-top: .4rem;
    padding: .92rem 1.2rem;
}

.required-note {
    color: var(--ink);
}

.required-marker {
    color: var(--danger);
    font-weight: 800;
}

[data-field] {
    display: block;
}

[data-field].is-invalid input {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(163, 55, 43, .12);
}

[data-field].is-valid input {
    border-color: var(--success);
    box-shadow: 0 0 0 2px rgba(25, 103, 78, .1);
}

.field-error {
    display: none;
    margin-top: .42rem;
    color: var(--danger);
    font-size: .78rem;
    font-weight: 650;
}

[data-field].is-invalid .field-error {
    display: block;
}

.password-input {
    position: relative;
    display: block;
}

.password-input input {
    padding-right: 5.8rem;
}

.auth-card .password-toggle,
.password-toggle {
    position: absolute;
    top: 50%;
    right: .36rem;
    min-height: 34px;
    margin: 0;
    padding: .42rem .68rem;
    transform: translateY(-50%);
    color: var(--green-deep);
    background: var(--green-pale);
    border: 1px solid rgba(0, 125, 104, .18);
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 750;
}

.password-policy {
    display: grid;
    gap: .7rem;
    margin-top: -.2rem;
    padding: .82rem .9rem;
    background: #fbfdfb;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.password-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem .8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-checklist li {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--danger);
    font-size: .82rem;
    font-weight: 650;
}

.password-checklist li::before {
    content: "x";
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: var(--danger);
    border-radius: 50%;
    font-size: .7rem;
    line-height: 1;
}

.password-checklist li.is-met {
    color: var(--success);
}

.password-checklist li.is-met::before {
    content: "✓";
    background: var(--success);
}

.password-strength {
    display: grid;
    grid-template-columns: auto minmax(90px, 1fr) auto;
    align-items: center;
    gap: .58rem;
    color: var(--muted);
    font-size: .82rem;
}

.password-strength strong {
    color: var(--ink);
}

.strength-meter {
    height: 8px;
    overflow: hidden;
    background: #e6ece8;
    border-radius: 999px;
}

.strength-meter span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--danger);
    border-radius: inherit;
    transition: width .18s ease, background .18s ease;
}

.password-strength[data-strength-level="2"] .strength-meter span {
    background: #b8871a;
}

.password-strength[data-strength-level="3"] .strength-meter span,
.password-strength[data-strength-level="4"] .strength-meter span {
    background: var(--success);
}

@media (max-width: 600px) {
    .password-checklist {
        grid-template-columns: 1fr;
    }

    .password-strength {
        grid-template-columns: 1fr;
        gap: .42rem;
    }

    .password-input input {
        padding-right: 5.4rem;
    }
}

.auth-link {
    margin: 1.35rem 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-link a {
    color: var(--green);
    font-weight: 650;
}

.print-view .container {
    max-width: 920px;
    background: #fff;
}

.app-view .report-page {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
}

.report-page-actions {
    margin-bottom: 1rem;
}

.print-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding-bottom: 1.4rem;
    border-bottom: 2px solid var(--green);
}

.report-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-logo {
    width: 112px;
    max-height: 82px;
    object-fit: contain;
}

.report-logo-placeholder {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.report-fitter-details {
    max-width: 380px;
    text-align: right;
}

.report-fitter-details strong {
    display: block;
    color: var(--ink);
    font-size: 1.08rem;
}

.report-fitter-details p {
    margin: .25rem 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.report-letter {
    margin: 1.4rem 0;
    color: #1f3036;
    line-height: 1.55;
}

.report-letter h2 {
    margin: 1.25rem 0 .45rem;
    color: var(--green);
    font-size: 1.05rem;
}

.report-letter h3,
.print-section h3 {
    margin: .9rem 0 .45rem;
    color: var(--ink);
    font-size: .96rem;
}

.report-letter p {
    margin: 0 0 .8rem;
}

.report-edit-block {
    margin: 1.2rem 0;
}

.report-edit-block textarea {
    width: 100%;
    min-height: 0;
    margin-top: .35rem;
    padding: .75rem .85rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    line-height: 1.5;
    resize: vertical;
}

.report-print-text {
    display: none;
}

.report-editor-actions {
    display: flex;
    justify-content: flex-end;
    margin: 1rem 0 1.4rem;
}

.report-print-actions {
    display: flex;
    justify-content: flex-end;
    margin: 1.5rem 0;
}

.report-group-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: .2rem 0 .75rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.report-group-check input {
    width: 16px;
    height: 16px;
}

.report-include-cell {
    width: 92px;
}

.report-include-cell label,
.report-include-check {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 650;
}

.report-include-cell input,
.report-include-check input {
    width: 15px;
    height: 15px;
}

[data-report-item].is-excluded {
    opacity: .46;
}

[data-report-group].is-empty-for-print {
    opacity: .55;
}

.print-empty {
    color: var(--muted);
}

.print-meta {
    margin: 1.3rem 0;
    padding: 0;
    background: transparent;
}

.print-meta h2 {
    margin-bottom: .65rem;
    color: var(--green);
    font-size: 1.05rem;
}

.print-meta > div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .35rem 1.2rem;
}

.print-meta p {
    margin: 0;
}

.print-section {
    margin: 1.5rem 0;
}

.print-section h2, .print-notes h2 {
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--line);
    color: var(--green);
    font-size: 1.05rem;
}

.report-bike-measures {
    display: grid;
    grid-template-columns: minmax(250px, 34%) minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
}

.report-bike-guide {
    margin: 0;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.report-bike-guide img {
    display: block;
    width: 100%;
    height: auto;
}

.report-bike-guide figcaption {
    margin-top: .45rem;
    color: var(--muted);
    font-size: .78rem;
}

.compact-table {
    width: 48%;
}

.print-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.3rem;
}

.rider-print-notes {
    margin-top: 1rem;
}

.rider-print-notes h3 {
    margin: 0 0 .6rem;
    font-size: .95rem;
}

.account-logo-panel {
    margin-bottom: 1.2rem;
}

.account-logo-form {
    align-items: end;
}

.report-logo-preview {
    display: grid;
    min-height: 86px;
    place-items: center;
    padding: .8rem;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #fff;
}

.report-logo-preview img {
    max-width: 180px;
    max-height: 82px;
    object-fit: contain;
}

@media (max-width: 900px) {
    .report-bike-measures {
        grid-template-columns: 1fr;
    }

    .public-view .public-nav {
        display: none;
    }

    .columns, .bike-workspace, .rider-measures {
        display: block;
    }

    .auth-layout {
        display: block;
        min-height: 0;
        margin-top: 1rem;
    }

    .auth-scene {
        min-height: 350px;
        padding: 2.2rem;
    }

    .auth-card {
        padding: 2.3rem;
    }

    .dashboard-app,
    .dashboard-overview-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid #e2e9e5;
    }

    .performance-hero {
        min-height: 740px;
    }

    .performance-hero::before {
        background-image:
            linear-gradient(180deg, rgba(8, 19, 23, .97) 0%, rgba(8, 19, 23, .84) 55%, rgba(8, 19, 23, .45) 100%),
            url("hero-bike-fitting-studio.webp");
        background-position: center, 68% center;
    }

    .performance-content {
        min-height: 0;
        padding: 3.2rem 2rem 2rem;
    }

    .analysis-badge {
        right: 2rem;
        bottom: 2rem;
    }

    .protocol-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .landing-assistance,
    .landing-future,
    .landing-followup {
        display: block;
        padding: 2.4rem;
    }

    .landing-footer {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        max-width: 560px;
    }

    .footer-cta {
        max-width: 330px;
    }

    .future-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-layout {
        display: block;
        padding: 2.6rem;
    }

    .contact-card {
        margin-top: 2.2rem;
        padding: 0;
        border-left: 0;
    }

    .assistance-copy,
    .future-grid,
    .followup-list {
        margin-top: 1.7rem;
    }

    .interface-preview {
        margin-top: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .columns .panel {
        margin-bottom: 1.35rem;
    }

    .bike-figure {
        position: static;
        margin-bottom: 1.2rem;
    }

    .rider-table,
    .rider-angle-guide {
        margin-top: 1rem;
    }

    .form-grid.four, .measure-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .container {
        padding-top: 1.2rem;
    }

    .site-header nav span {
        display: none;
    }

    .site-header {
        height: auto;
        gap: 1rem;
        padding-top: .8rem;
        padding-bottom: .8rem;
    }

    .site-header nav {
        gap: .7rem;
        font-size: .9rem;
    }

    .site-header .header-action {
        padding: .55rem .7rem;
    }

    .hero, .page-actions, .section-head, .landing-security, .landing-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-view .site-header {
        align-items: flex-start;
        flex-direction: column;
        height: auto;
    }

    .app-view .site-header nav {
        width: 100%;
        justify-content: space-between;
    }

    .app-view .container {
        padding-top: 1.15rem;
    }

    .app-view .hero.compact {
        padding: 1.45rem;
        border-radius: 17px;
    }

    .dashboard-main {
        padding: .85rem;
    }

    .dashboard-side {
        gap: .45rem;
        padding: .75rem;
    }

    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .app-view .panel {
        padding: 1.15rem;
    }

    .auth-layout {
        border-radius: 19px;
    }

    .auth-scene {
        min-height: 305px;
        padding: 1.5rem;
    }

    .auth-scene h1 {
        font-size: 2rem;
    }

    .auth-card {
        padding: 1.6rem 1.35rem 1.9rem;
    }

    .auth-scene-metrics {
        gap: 1rem;
    }

    .table-wrap {
        overflow-x: auto;
    }

    .landing-actions {
        flex-direction: column;
    }

    .performance-hero {
        min-height: 735px;
        margin-bottom: 2.6rem;
        border-radius: 21px;
    }

    .performance-content {
        padding: 2.4rem 1.45rem 1.5rem;
    }

    .performance-content h1 {
        font-size: 2.45rem;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
        gap: .85rem;
        margin-top: 2rem;
    }

    .analysis-badge {
        display: none;
    }

    .landing-assistance,
    .landing-followup {
        margin-left: 0;
        margin-right: 0;
        padding: 1.55rem;
        border-radius: 19px;
    }

    .landing-future {
        padding: 1.55rem;
        border-radius: 18px;
    }

    .landing-protocol {
        padding: 1.55rem;
        border-radius: 19px;
    }

    .assistance-copy {
        margin-top: 0;
    }

    .assistance-benefits {
        grid-template-columns: 1fr;
        gap: 1.05rem;
    }

    .assistance-benefits div {
        padding: .12rem 0 .12rem 2.25rem;
    }

    .assistance-benefits div::before {
        top: 0;
    }

    .assistance-benefits div::after {
        top: .5rem;
    }

    .future-grid {
        grid-template-columns: 1fr;
    }

    .followup-list li {
        padding-right: 5.25rem;
    }

    .preview-workspace {
        grid-template-columns: 1fr;
    }

    .preview-nav,
    .study-preview-menu {
        display: none;
    }

    .preview-dashboard {
        padding: .85rem;
    }

    .study-preview-grid {
        grid-template-columns: minmax(180px, 1fr) 95px;
        min-height: 0;
    }

    .landing-footer {
        margin-top: 2.6rem;
        padding: 1.8rem 1.55rem;
        border-radius: 20px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .institutional-page {
        margin-top: 2.5rem;
        padding: 3rem 1.35rem;
    }

    .contact-layout {
        min-height: 0;
        padding: 1.55rem;
        border-radius: 20px;
    }

    .contact-copy h1 {
        font-size: 2.35rem;
    }

    .contact-card {
        padding: 0;
    }

    .form-grid, .form-grid.four, .measure-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .measure-header, .measure-row {
        grid-template-columns: minmax(130px, 1fr) 92px 92px;
        gap: .35rem;
    }

    .measure-row label b {
        margin-right: .25rem;
    }

    .rider-header, .rider-row {
        grid-template-columns: minmax(120px, 1fr) 84px 84px;
        gap: .25rem;
    }
}

@media print {
    @page {
        margin: 14mm;
        @bottom-right {
            content: counter(page) "/" counter(pages);
            color: #0c3040;
            font: 8.5pt Arial, sans-serif;
        }
    }

    body {
        background: #fff;
        font-size: 10pt;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .site-header, .demo-banner, .no-print {
        display: none !important;
    }

    .demo-view {
        display: none !important;
    }

    .demo-view[data-view="print"].is-active {
        display: block !important;
    }

    .print-section {
        break-inside: avoid;
    }

    .report-edit-block {
        break-inside: avoid;
    }

    .report-edit-block.is-empty {
        display: none;
    }

    [data-report-item].is-excluded {
        display: none !important;
    }

    [data-report-group].is-empty-for-print {
        display: none !important;
    }

    .report-bike-measures {
        grid-template-columns: 38% minmax(0, 1fr);
        gap: .9rem;
    }

    .report-bike-guide {
        padding: .45rem;
        break-inside: avoid;
    }

    .report-bike-guide figcaption {
        font-size: 8.5pt;
    }

    .report-edit-block textarea,
    .report-editor-actions {
        display: none !important;
    }

    .report-print-text {
        display: block;
    }

    td, th {
        padding: .34rem .45rem;
    }
}

/* Atelier clair visual identity */
:root {
    --ink: #0c3040;
    --muted: #5d7077;
    --green: #074959;
    --green-deep: #063845;
    --green-pale: #edf4f2;
    --sand: #faf7f1;
    --surface: #fffdf9;
    --line: #e6ded3;
    --carbon: #073643;
    --carbon-soft: #0c4654;
    --teal-glow: #ad4f2d;
    --clay: #ad4f2d;
    --clay-pale: #f7ece6;
    --success: #16624f;
    --shadow: 0 12px 35px rgba(41, 51, 51, .055);
}

body,
.app-view {
    color: var(--ink);
    background:
        radial-gradient(circle at 0 0, rgba(173, 79, 45, .035), transparent 32rem),
        #fdfbf7;
}

.site-header,
.app-view .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 82px;
    color: var(--ink);
    background: rgba(253, 251, 247, .94);
    border-color: var(--line);
    backdrop-filter: blur(16px);
}

.studio-brand {
    gap: .82rem;
    text-transform: none;
}

.studio-brand .brand-mark,
.app-view .studio-brand .brand-mark,
.footer-brand .brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: var(--green);
    border: 0;
    border-radius: 50%;
    font-size: .94rem;
    font-weight: 700;
    letter-spacing: 0;
}

.studio-brand .brand-mark::after,
.footer-brand .brand-mark::after {
    display: none;
}

.studio-brand > strong,
.app-view .studio-brand > strong {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.025em;
}

.public-view .public-nav a,
.site-header nav a,
.app-view .site-header nav a {
    color: var(--ink);
}

.public-view .public-nav a:hover,
.app-view .site-header nav a:hover,
.site-header nav a:hover {
    color: var(--clay);
    background: transparent;
}

.site-header .header-action {
    color: #fff;
    background: var(--green);
    border-radius: 8px;
}

.site-header .header-action:hover {
    color: #fff;
    background: var(--green-deep);
}

.public-session-status {
    display: none;
    align-items: center;
    gap: .38rem;
    min-height: 38px;
    padding: .52rem .68rem;
    color: var(--green-deep);
    background: var(--green-pale);
    border: 1px solid rgba(0, 166, 133, .22);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
}

.public-session-status::before {
    content: "";
    width: .48rem;
    height: .48rem;
    border-radius: 50%;
    background: var(--green);
}

.public-session-status:hover {
    color: var(--green-deep);
    background: #e8f6f1;
}

.container {
    max-width: 1320px;
    padding-top: 1.8rem;
}

.eyebrow,
.hero-kicker {
    color: var(--green);
}

.hero-kicker span {
    background: var(--clay);
}

button,
.button {
    color: #fff;
    background: var(--green);
    border-radius: 9px;
}

button:hover,
.button:hover {
    background: var(--green-deep);
}

button.secondary,
.button.secondary {
    color: var(--green);
    background: transparent;
    border: 1px solid rgba(7, 73, 89, .32);
}

.performance-hero {
    min-height: 668px;
    margin: 0 0 3.4rem;
    color: var(--ink);
    background: #fbf8f2;
    border: 1px solid var(--line);
    border-radius: 27px;
}

.performance-hero::before {
    inset: 0 0 0 42.5%;
    background: url("hero-bike-fitting-atelier-clair.webp") center center / cover no-repeat;
}

.performance-content {
    max-width: 555px;
    min-height: 668px;
    padding: 3.6rem 3.1rem 2.7rem;
    background: linear-gradient(90deg, #fbf8f2 0%, #fbf8f2 89%, rgba(251, 248, 242, 0) 100%);
}

.performance-content h1 {
    margin: 1.05rem 0 1rem;
    font-size: clamp(2.7rem, 4.65vw, 3.85rem);
    color: var(--ink);
}

.performance-content h1 em {
    color: var(--clay);
}

.landing-lead {
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.66;
}

.performance-hero .button {
    padding: .9rem 1.42rem;
    border-radius: 9px;
}

.performance-hero .button.secondary {
    color: var(--green);
    border-color: rgba(7, 73, 89, .4);
}

.hero-metrics {
    gap: 0;
    margin-top: 2.8rem;
}

.hero-metrics div {
    padding: 0 1.15rem;
    border-left-color: #ded5ca;
}

.hero-metrics div:first-child {
    padding-left: 0;
    border-left: 0;
}

.hero-metrics span,
.analysis-badge span {
    color: var(--muted);
}

.analysis-badge {
    right: 1.8rem;
    bottom: 2.9rem;
    width: 178px;
    color: var(--ink);
    background: rgba(255, 253, 249, .97);
    border-color: #e6ddd2;
    box-shadow: 0 12px 30px rgba(16, 38, 43, .11);
}

.analysis-badge p {
    color: var(--green);
}

.landing-assistance,
.landing-followup,
.contact-layout {
    margin-left: 0;
    margin-right: 0;
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
}

.landing-assistance::after,
.contact-layout::after {
    border-color: rgba(173, 79, 45, .09);
    background-image:
        linear-gradient(rgba(7, 73, 89, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 73, 89, .045) 1px, transparent 1px);
}

.assistance-benefits div::before {
    border-color: var(--green);
}

.assistance-benefits div::after {
    background: var(--clay);
}

.interface-preview {
    color: var(--ink);
    background: #fefcf8;
    border-color: var(--line);
    box-shadow: none;
}

.preview-bar {
    color: var(--muted);
    border-color: var(--line);
}

.preview-bar strong {
    color: #fff;
    background: var(--green);
    border-radius: 5px;
    padding: .35rem .42rem;
}

.preview-bar i {
    background: var(--clay-pale);
    border-color: #ead0c5;
}

.preview-nav,
.study-preview-menu {
    color: var(--muted);
    background: #fcfaf6;
    border-color: var(--line);
}

.preview-nav strong,
.study-preview-menu strong {
    color: #fff;
    background: var(--green);
}

.preview-dashboard > p,
.study-comparison p {
    color: var(--ink);
}

.preview-stat-grid div,
.preview-table,
.preview-chart,
.study-trend {
    background: #fff;
    border-color: var(--line);
}

.preview-stat-grid small,
.preview-table span,
.preview-chart span,
.study-trend small {
    color: var(--muted);
}

.preview-table i {
    background: linear-gradient(90deg, rgba(7, 73, 89, .15) 0 18%, #eef0eb 18%);
}

.interface-preview polyline {
    stroke: var(--green);
}

.landing-protocol {
    padding: 1.5rem 1.8rem 3rem;
    border: 0;
    background: transparent;
}

.feature-card {
    min-height: 210px;
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
}

.feature-card:hover {
    border-color: #d8cec1;
    box-shadow: var(--shadow);
}

.feature-icon {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
}

.feature-card p {
    color: var(--muted);
}

.landing-future {
    display: block;
    padding: 2.6rem 2rem 3rem;
    color: var(--ink);
    background: transparent;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    text-align: center;
}

.landing-future::before {
    display: none;
}

.future-heading h2 {
    margin: 0 auto 1rem;
}

.future-heading > p:last-child {
    max-width: 690px;
    margin: 0 auto 2rem;
    color: var(--muted);
}

.future-grid {
    max-width: 1020px;
    margin: 0 auto;
}

.future-grid span {
    min-height: 58px;
    display: flex;
    justify-content: center;
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
    backdrop-filter: none;
}

.future-grid span svg {
    flex: 0 0 auto;
    width: 1.45rem;
    height: 1.45rem;
    color: var(--green);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rider-shots span {
    background:
        linear-gradient(90deg, rgba(253, 251, 247, .1), rgba(253, 251, 247, .08)),
        url("hero-bike-fitting-atelier-clair.webp") 62% center / cover;
    border-color: var(--line);
}

.study-values {
    color: var(--muted);
    border-color: var(--line);
}

.study-values b,
.study-trend strong {
    color: var(--ink);
}

.followup-list li {
    background: transparent;
    border: 0;
    padding-right: .4rem;
}

.followup-list li::before {
    background: var(--green);
}

.followup-list li::after {
    display: none;
}

.landing-footer {
    margin-top: 3rem;
    padding: 2.2rem 2.35rem;
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
    border-radius: 18px;
}

.landing-footer::after {
    display: none;
}

.footer-brand p,
.landing-footer nav {
    color: var(--muted);
}

.landing-footer nav strong {
    color: var(--ink);
}

.landing-footer nav a:hover {
    color: var(--clay);
}

.footer-cta {
    border-color: var(--line);
    border-radius: 12px;
}

.footer-cta strong {
    color: var(--ink);
}

.footer-cta p {
    color: var(--muted);
}

.footer-cta .button {
    color: #fff;
    background: var(--green);
}

.institutional-page {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
}

.institutional-icon {
    color: #fff;
    background: var(--green);
}

.contact-copy h1 em {
    color: var(--clay);
}

.contact-copy .contact-note {
    color: var(--green);
    background: var(--green-pale);
    border-color: #d6e5e1;
}

.contact-card {
    border-color: var(--line);
}

.app-view .container {
    max-width: 1280px;
}

.app-view .brand small {
    color: var(--muted);
}

.app-view .site-header nav .logout-link {
    color: var(--clay);
}

.user-badge {
    color: var(--ink);
    border-color: var(--line);
}

.user-badge small {
    color: var(--muted);
}

.account-menu-panel {
    background: var(--surface);
    border-color: var(--line);
}

.dashboard-shell {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
}

.dashboard-windowbar {
    border-color: var(--line);
}

.dashboard-window-logo {
    background: var(--green);
}

.dashboard-side {
    background: #fcfaf6;
    border-color: var(--line);
}

.dashboard-side .is-active {
    color: #fff;
    background: var(--green);
}

.dashboard-metric,
.dashboard-card {
    border-color: var(--line);
}

.dashboard-module-grid span,
.dashboard-module-grid a {
    border-color: var(--line);
}

.app-view .hero.compact {
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(255, 253, 249, .99), rgba(255, 253, 249, .86)),
        url("hero-bike-fitting-atelier-clair.webp") right 43% / cover;
    border: 1px solid var(--line);
}

.app-view .hero.compact .eyebrow {
    color: var(--clay);
}

.app-view .hero.compact .muted {
    color: var(--muted);
}

.panel,
.app-view .panel,
.bike-figure,
.rider-table {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
}

.rider-table.after-stage {
    background: #f4f7f4;
    border-color: #d5e2dd;
}

.pill {
    color: var(--green);
    background: var(--green-pale);
}

input,
textarea,
select {
    background: #fffefc;
    border-color: #dcd4c9;
}

input:focus,
textarea:focus,
select:focus {
    outline-color: rgba(7, 73, 89, .14);
    border-color: var(--green);
}

.field-settings-form {
    display: grid;
    gap: 1rem;
}

.field-category {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.field-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    background: #fcfaf6;
    border-bottom: 1px solid var(--line);
}

.category-toggle {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-left: auto;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 650;
}

.category-toggle input {
    width: 16px;
    height: 16px;
}

.field-category-head h3,
.dynamic-measure-category h3 {
    margin: 0;
    font-size: .98rem;
}

.field-category-head small,
.field-title small {
    color: var(--muted);
}

.field-settings-table {
    display: grid;
}

.field-settings-row {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) 86px 112px;
    align-items: center;
    gap: .75rem;
    padding: .72rem 1rem;
    border-bottom: 1px solid var(--line);
}

.field-settings-row:last-child {
    border-bottom: 0;
}

.field-settings-row.head {
    color: var(--muted);
    background: #fffefc;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.field-title strong,
.field-title small {
    display: block;
}

.check-cell {
    display: grid;
    place-items: center;
}

.check-cell input {
    width: 18px;
    height: 18px;
}

.compact-save {
    position: static;
    justify-content: flex-end;
    margin-top: .35rem;
}

.dynamic-measure-sections {
    display: grid;
    gap: 1.2rem;
}

.dynamic-measure-category {
    display: grid;
    gap: .85rem;
    padding-top: .25rem;
}

.measure-field.wide {
    grid-column: 1 / -1;
}

.measure-field select {
    width: 100%;
}

.guide-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    margin-bottom: 1rem;
}

.guide-image {
    margin: 0;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffefc;
}

.guide-image img,
.guide-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 150px;
    border-radius: 7px;
}

.guide-image img {
    object-fit: contain;
}

.guide-placeholder {
    color: var(--muted);
    background: repeating-linear-gradient(135deg, #faf7f1, #faf7f1 10px, #f3eee6 10px, #f3eee6 20px);
    border: 1px dashed #d7cec2;
    font-size: .9rem;
    font-weight: 650;
}

.morphology-schema-card {
    background: #fbfdfb;
}

.morphology-schema {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 340px;
    border: 1px solid #e5ece7;
    border-radius: 7px;
    background: linear-gradient(180deg, #ffffff, #f6faf7);
}

.morphology-base-image,
.morphology-svg {
    display: block;
    width: min(100%, 360px);
    height: auto;
}

.morphology-svg {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.body-schema,
.morphology-base-image[src$="body-morphology-guide.png"] {
    width: min(100%, 760px);
}

.feet-schema,
.morphology-base-image[src$="feet-morphology-guide.png"] {
    width: min(100%, 760px);
}

.morphology-svg .schema-base {
    fill: none;
    stroke: #53615d;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.morphology-svg .schema-marker {
    color: var(--green);
}

.morphology-svg .schema-marker.secondary {
    color: var(--green-deep);
}

.morphology-svg .schema-marker line {
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

.body-schema .schema-marker line {
    marker-start: url("#measure-arrow-body");
    marker-end: url("#measure-arrow-body");
}

.feet-schema .schema-marker line {
    marker-start: url("#measure-arrow-feet");
    marker-end: url("#measure-arrow-feet");
}

.morphology-svg marker path {
    fill: currentColor;
}

.morphology-svg text {
    fill: var(--ink);
    font-size: 13px;
    font-weight: 650;
}

.morphology-empty {
    display: grid;
    gap: .25rem;
    padding: 1rem;
    color: var(--muted);
    text-align: center;
}

.morphology-empty strong {
    color: var(--ink);
    font-size: .92rem;
}

.morphology-empty span {
    font-size: .78rem;
}

.guide-image figcaption,
.field-hint {
    display: block;
    margin-top: .55rem;
    color: var(--muted);
    font-size: .78rem;
}

.measure-row label b {
    background: var(--green);
}

.save-bar button {
    box-shadow: 0 12px 27px rgba(7, 73, 89, .18);
}

.text-link,
.back,
.app-view .back {
    color: var(--green);
}

.flash.success {
    background: var(--green-pale);
}

.auth-layout {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    overflow: hidden;
}

.auth-scene {
    color: var(--ink);
    background:
        radial-gradient(ellipse 82% 62% at 17% 84%, rgba(255, 253, 249, .98) 0%, rgba(255, 253, 249, .9) 46%, rgba(255, 253, 249, .36) 72%, transparent 100%),
        linear-gradient(90deg, rgba(255, 253, 249, .3), rgba(255, 253, 249, .06)),
        url("hero-bike-fitting-atelier-clair.webp") center / cover;
}

.auth-scene::before {
    background: transparent;
}

.auth-scene h1 {
    color: var(--ink);
}

.auth-scene h1 em {
    color: var(--clay);
}

.auth-scene > p:not(.hero-kicker),
.auth-scene-metrics small {
    color: #405962;
}

.auth-scene-metrics span {
    border-color: var(--line);
}

.auth-card {
    background: #fffdf9;
}

.auth-card .muted,
.auth-card .auth-link,
.auth-card label span {
    color: #405962;
}

@media (max-width: 600px) {
    .auth-scene {
        justify-content: start;
        min-height: 0;
        padding: calc(220px + 1.45rem) 1.35rem 1.35rem;
        background: #fffdf9;
    }

    .auth-scene::before {
        inset: 0 0 auto;
        height: 220px;
        background: url("hero-bike-fitting-atelier-clair.webp") center / cover;
    }

    .auth-scene > p:not(.hero-kicker) {
        margin-bottom: 1.35rem;
    }
}

@media (max-width: 900px) {
    .performance-hero::before {
        inset: 41% 0 0;
        background-position: center;
    }

    .performance-content {
        min-height: 810px;
        max-width: none;
        justify-content: start;
        background: linear-gradient(180deg, #fbf8f2 0%, #fbf8f2 42%, transparent 56%);
    }

    .landing-future {
        display: block;
    }
}

@media (max-width: 600px) {
    .site-header,
    .app-view .site-header {
        height: auto;
    }

    .performance-hero {
        min-height: 850px;
    }

    .performance-content {
        min-height: 850px;
        padding: 2rem 1.35rem;
    }

    .performance-content h1 {
        font-size: 2.2rem;
    }
}

@media print {
    body {
        background: #fff;
    }

    .landing-footer {
        display: none !important;
    }
}

.mobile-menu {
    display: none;
}

.import-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.import-meta-grid span {
    display: grid;
    gap: .25rem;
    padding: .85rem 1rem;
    background: #fffefc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.import-meta-grid strong {
    color: var(--muted);
    font-size: .75rem;
    text-transform: uppercase;
}

.import-workflow {
    display: grid;
    gap: 1.2rem;
    min-width: 0;
}

.import-workflow > form,
.import-workflow .panel {
    min-width: 0;
    max-width: 100%;
}

.import-preview,
.import-row-picker {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 420px;
    overflow-x: auto;
    overflow-y: auto;
}

.import-preview table,
.import-row-picker table {
    width: max-content;
    min-width: 100%;
}

.import-preview td,
.import-row-picker td,
.import-preview th,
.import-row-picker th {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-mapping-list {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.import-mapping-row {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(260px, 1fr);
    align-items: center;
    gap: 1rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--line);
}

.import-mapping-row:last-child {
    border-bottom: 0;
}

.import-mapping-row > span,
.duplicate-client-list span {
    display: grid;
    gap: .2rem;
}

.import-mapping-row small,
.duplicate-client-list small {
    color: var(--muted);
    font-size: .78rem;
}

.import-mapping-row select {
    width: 100%;
}

.duplicate-panel {
    border-color: rgba(173, 79, 45, .32);
}

.import-duplicate-form,
.duplicate-client-list {
    display: grid;
    gap: .75rem;
}

.duplicate-choice,
.duplicate-client-list label {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .85rem 1rem;
    background: #fffefc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.duplicate-choice input,
.duplicate-client-list input,
.import-row-picker input {
    width: 18px;
    height: 18px;
}

@media (max-width: 600px) {
    .public-view .site-header,
    .app-view .site-header {
        position: sticky;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: .75rem 1.1rem;
    }

    .public-view .studio-brand,
    .app-view .studio-brand {
        gap: .6rem;
    }

    .public-view .studio-brand > strong,
    .app-view .studio-brand > strong {
        font-size: .9rem;
    }

    .public-view .public-nav,
    .public-view .account-nav,
    .app-view .member-nav {
        display: none;
    }

    .mobile-menu {
        position: relative;
        display: block;
        margin-left: auto;
    }

    .public-session-status {
        display: inline-flex;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .public-session-status + .mobile-menu {
        margin-left: .4rem;
    }

    .mobile-menu summary {
        display: grid;
        gap: 5px;
        width: 43px;
        height: 43px;
        padding: 12px 10px;
        cursor: pointer;
        list-style: none;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: var(--surface);
    }

    .mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu summary span {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: var(--green);
    }

    .mobile-menu[open] nav {
        position: absolute;
        top: calc(100% + .65rem);
        right: 0;
        z-index: 30;
        display: grid;
        width: min(290px, calc(100vw - 2.2rem));
        padding: .65rem;
        color: var(--ink);
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 14px 34px rgba(12, 48, 64, .14);
    }

    .mobile-menu nav a {
        display: block;
        padding: .72rem .75rem;
        color: var(--ink);
    }

    .mobile-menu nav .header-action {
        margin-top: .4rem;
        color: #fff;
        text-align: center;
    }

    .import-meta-grid,
    .import-mapping-row {
        grid-template-columns: 1fr;
    }

    .field-settings-row {
        grid-template-columns: minmax(150px, 1fr) 52px 76px;
        gap: .35rem;
        padding: .65rem;
    }

    .study-inline-form {
        grid-template-columns: 1fr;
    }

    .field-settings-row.head {
        font-size: .62rem;
    }

    .guide-layout {
        grid-template-columns: 1fr;
    }

    .performance-hero {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding-top: 265px;
    }

    .performance-hero::before {
        inset: 0 0 auto;
        height: 285px;
        background:
            linear-gradient(0deg, #fbf8f2 0%, rgba(251, 248, 242, 0) 48%),
            url("hero-bike-fitting-atelier-clair.webp") 62% center / cover no-repeat;
    }

    .performance-content {
        min-height: 0;
        padding: 1.15rem 1.35rem 1.65rem;
        background: #fbf8f2;
    }

    .hero-kicker {
        margin-bottom: .7rem;
    }

    .performance-content h1 {
        margin-top: 0;
        font-size: 2.2rem;
    }
}

/* Final app UI layer. Keep this block last so it wins the existing cascade. */
.app-view {
    background: #f4f7f5;
}

.app-view .container {
    max-width: 1280px;
    padding-bottom: 2rem;
}

.app-view .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-view .panel,
.dashboard-shell,
.dashboard-card {
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(18, 37, 44, .055);
}

.app-view .panel {
    padding: 1.45rem;
}

.app-view .section-head {
    padding-bottom: .85rem;
    border-bottom: 1px solid rgba(220, 229, 225, .75);
}

.dashboard-metric {
    min-height: 118px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(7, 73, 89, .06), rgba(255, 253, 249, .96));
}

.dashboard-metric span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    font-weight: 750;
}

.dashboard-metric strong {
    color: var(--green);
    font-size: 2.35rem;
}

button,
.button,
.site-header .header-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .72rem 1rem;
    border-radius: 10px;
    font-weight: 750;
}

button.secondary,
.button.secondary {
    color: var(--green);
    background: #fff;
    border: 1px solid rgba(7, 73, 89, .32);
}

input,
textarea,
select,
.input-unit {
    border-radius: 10px;
}

input,
select {
    min-height: 42px;
}

input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    padding: 0;
    accent-color: var(--green);
}

.form-grid label:has(> input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.form-grid label:has(> input[type="checkbox"]) > span {
    margin-bottom: 0;
}

.form-grid label > span,
.measure-field > span:first-child,
.date-inline span {
    color: #405962;
    font-size: .78rem;
    font-weight: 750;
}

.workflow-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .32rem .62rem;
    color: var(--green-deep);
    background: var(--green-pale);
    border: 1px solid rgba(0, 166, 133, .16);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.study-stepper {
    position: sticky;
    top: 82px;
    z-index: 15;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: .45rem;
    margin: 0 0 1.15rem;
    padding: .7rem;
    background: rgba(255, 253, 249, .96);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(18, 37, 44, .06);
    backdrop-filter: blur(14px);
}

.study-stepper a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: .45rem;
    min-height: 46px;
    padding: .42rem .5rem;
    color: var(--muted);
    background: #fff;
    border: 1px solid rgba(220, 229, 225, .72);
    border-radius: 11px;
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.18;
}

.study-stepper span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    font-size: .72rem;
}

.study-workflow-panel {
    position: relative;
    overflow: hidden;
}

.study-workflow-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--green), var(--clay, #ad4f2d));
}

.bike-workspace,
.rider-measures,
.dynamic-measure-category,
.guide-image,
.import-meta-grid span,
.field-settings-row:not(.head) {
    background: #fbfdfb;
}

.bike-table,
.rider-table,
.dynamic-measure-category {
    border-radius: 14px;
}

.measure-header,
.rider-header {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .055em;
    font-size: .72rem;
}

.rider-table.after-stage {
    background: #f1f7f3;
}

@media (max-width: 900px) {
    .study-stepper {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        top: 76px;
    }
}

@media (max-width: 600px) {
    .app-view .container {
        padding: 1.1rem .9rem 1.8rem;
    }

    .app-view .panel {
        padding: 1.05rem;
        border-radius: 14px;
    }

    .dashboard-app {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        display: flex;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .dashboard-side a,
    .dashboard-side span {
        flex: 0 0 auto;
    }

    .study-stepper {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: .55rem;
    }

    .study-stepper a {
        grid-template-columns: 24px minmax(0, 1fr);
        min-height: 42px;
        font-size: .68rem;
    }

    .study-stepper span {
        width: 24px;
        height: 24px;
    }
}

.dashboard-summary-grid.two-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: .28rem .56rem;
    color: var(--green-deep);
    background: var(--green-pale);
    border: 1px solid rgba(0, 166, 133, .16);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
}

.status-chip--draft {
    color: #5b6472;
    background: #f3f5f7;
    border: 1px solid rgba(91, 100, 114, .16);
}

.status-chip--active {
    color: #7a4a00;
    background: #fff4dc;
    border: 1px solid rgba(194, 122, 0, .2);
}

.status-chip--done {
    color: var(--green-deep);
    background: var(--green-pale);
    border: 1px solid rgba(0, 166, 133, .16);
}

.status-chip--archived {
    color: #47505f;
    background: #eceff3;
    border: 1px solid rgba(71, 80, 95, .16);
}

.admin-users-table {
    min-width: 1180px;
    table-layout: fixed;
}

.admin-users-table-wrap {
    overflow-x: auto;
}

.admin-users-table th,
.admin-users-table td {
    vertical-align: middle;
}

.admin-users-table th:nth-child(1) {
    width: 18%;
}

.admin-users-table th:nth-child(2) {
    width: 10%;
}

.admin-users-table th:nth-child(3) {
    width: 12%;
}

.admin-users-table th:nth-child(4) {
    width: 22%;
}

.admin-users-table th:nth-child(5) {
    width: 9%;
}

.admin-users-table th:nth-child(6) {
    width: 9%;
}

.admin-users-table th:nth-child(7) {
    width: 10%;
}

.admin-users-table th:nth-child(8) {
    width: 10%;
}

.admin-users-table select {
    min-height: 38px;
    padding: .56rem .68rem;
    font-size: .82rem;
}

.admin-users-table td:nth-child(6) {
    white-space: nowrap;
}

.admin-users-table td:nth-child(7) {
    font-size: .82rem;
    line-height: 1.35;
}

.manual-access-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.manual-access-fields .wide,
.manual-access-fields small {
    grid-column: 1 / -1;
}

.manual-access-fields label span {
    margin-bottom: .22rem;
    font-size: .68rem;
}

.manual-access-fields input {
    min-height: 36px;
    padding: .48rem .56rem;
    font-size: .78rem;
}

.manual-access-fields small {
    color: var(--muted);
    font-size: .72rem;
}

.admin-filter-form {
    margin: 0 0 1rem;
}

.admin-filter-actions {
    align-content: end;
}

.admin-waitlist-table {
    min-width: 1040px;
    table-layout: fixed;
}

.admin-waitlist-table th:nth-child(1) {
    width: 15%;
}

.admin-waitlist-table th:nth-child(2) {
    width: 20%;
}

.admin-waitlist-table th:nth-child(3),
.admin-waitlist-table th:nth-child(4),
.admin-waitlist-table th:nth-child(6),
.admin-waitlist-table th:nth-child(7) {
    width: 10%;
}

.admin-waitlist-table th:nth-child(5) {
    width: 25%;
}

.admin-account-cell strong,
.admin-account-cell small {
    display: block;
}

.admin-account-cell small {
    margin-top: .25rem;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.admin-user-actions,
.admin-save-form,
.admin-delete-form {
    display: grid;
    gap: .45rem;
    min-width: 0;
}

.admin-user-actions button,
.admin-delete-action summary {
    width: 100%;
    min-height: 36px;
    padding: .5rem .7rem;
    border-radius: 8px;
    font-size: .78rem;
}

.admin-current-user {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
}

.admin-delete-action summary {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    background: #fff;
    border: 1px solid rgba(163, 55, 43, .3);
    cursor: pointer;
    font-weight: 750;
    list-style: none;
}

.admin-delete-action summary::-webkit-details-marker {
    display: none;
}

.admin-delete-action[open] summary {
    background: #f8e7e5;
}

.admin-delete-form {
    margin-top: .45rem;
    padding: .55rem;
    background: #fff9f8;
    border: 1px solid rgba(163, 55, 43, .18);
    border-radius: 9px;
}

.admin-delete-form label {
    display: flex;
    align-items: center;
    gap: .42rem;
    color: #6c3b34;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.15;
}

.admin-delete-form input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 0;
}

.admin-delete-form .danger-button {
    min-height: 34px;
    padding: .44rem .62rem;
    font-size: .76rem;
}

.client-context-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    margin: -1rem 0 1.35rem;
}

.client-context-grid span {
    display: grid;
    gap: .25rem;
    min-height: 88px;
    padding: .9rem 1rem;
    background: #fffefc;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(18, 37, 44, .045);
}

.client-context-grid strong {
    color: var(--ink);
    font-size: 1rem;
}

.client-context-grid small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .dashboard-summary-grid.two-columns,
    .client-context-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .dashboard-summary-grid.two-columns,
    .client-context-grid {
        grid-template-columns: 1fr;
    }
}

.assistance-benefits div {
    display: grid;
    align-content: start;
    gap: .42rem;
    padding-top: 0;
}

.assistance-benefits div::before,
.assistance-benefits div::after {
    display: none;
}

.assistance-benefits .benefit-icon {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    color: var(--green);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(18, 37, 44, .05);
}

.benefit-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-visual {
    position: relative;
    z-index: 1;
    min-height: 330px;
    margin: 0;
    overflow: hidden;
    background: #fffefc;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(18, 37, 44, .08);
}

.site-visual > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.site-visual--screenshot {
    display: grid;
    place-items: center;
    padding: .85rem;
}

.site-visual--screenshot > img {
    max-height: 330px;
    object-fit: contain;
}

@media (max-width: 900px) {
    .site-visual {
        margin-top: 2rem;
    }
}

@media (max-width: 600px) {
    .site-visual {
        min-height: 230px;
    }

    .site-visual--screenshot > img {
        max-height: 230px;
    }
}

/* Admin users desktop flow */
.admin-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-users-table-wrap {
    overflow: visible;
}

.admin-users-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.admin-users-table thead {
    display: none;
}

.admin-users-table tbody {
    display: grid;
    gap: .85rem;
}

.admin-users-table tr {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(130px, .72fr)) minmax(220px, 1.1fr);
    grid-template-areas:
        "account role plan status access"
        "account email usage actions access";
    gap: .75rem;
    padding: 1rem;
    background: #fffefc;
    border: 1px solid rgba(220, 229, 225, .95);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(18, 37, 44, .045);
}

.admin-users-table td {
    display: grid;
    align-content: start;
    gap: .28rem;
    padding: 0;
    border-bottom: 0;
    vertical-align: top;
}

.admin-users-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-users-table td:nth-child(1) {
    grid-area: account;
    align-content: center;
    padding-right: .35rem;
}

.admin-users-table td:nth-child(2) {
    grid-area: role;
}

.admin-users-table td:nth-child(3) {
    grid-area: plan;
}

.admin-users-table td:nth-child(4) {
    grid-area: access;
}

.admin-users-table td:nth-child(5) {
    grid-area: status;
}

.admin-users-table td:nth-child(6) {
    grid-area: email;
    white-space: normal;
}

.admin-users-table td:nth-child(7) {
    grid-area: usage;
    font-size: .84rem;
}

.admin-users-table td:nth-child(8) {
    grid-area: actions;
}

.admin-users-table select,
.admin-users-table input {
    width: 100%;
}

.admin-users-table .admin-user-actions {
    align-content: start;
}

@media (max-width: 1050px) {
    .admin-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-users-table tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "account account"
            "role plan"
            "status email"
            "usage usage"
            "access access"
            "actions actions";
    }
}

@media (max-width: 650px) {
    .admin-summary-grid,
    .admin-users-table tr {
        grid-template-columns: 1fr;
    }

    .admin-users-table tr {
        grid-template-areas:
            "account"
            "role"
            "plan"
            "status"
            "email"
            "usage"
            "access"
            "actions";
    }
}

/* Mobile ergonomics pass */
@media (max-width: 600px) {
    .dashboard-shell {
        overflow: visible;
        border-radius: 16px;
    }

    .dashboard-windowbar {
        display: none;
    }

    .dashboard-side {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
        align-content: start;
        gap: .45rem;
        padding: .75rem;
        overflow: visible;
    }

    .dashboard-side a,
    .dashboard-side span {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: .62rem .55rem;
        text-align: center;
        white-space: normal;
    }

    .dashboard-title-row,
    .report-actions,
    .page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-title-row button,
    .report-actions .button,
    .page-actions button,
    .page-actions .button,
    .save-bar button,
    .actions button {
        width: 100%;
    }

    .dashboard-summary-grid,
    .dashboard-summary-grid.two-columns {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .55rem;
    }

    .dashboard-metric {
        min-height: 92px;
        padding: .72rem .62rem;
    }

    .dashboard-metric span {
        margin-bottom: .45rem;
        font-size: .58rem;
        line-height: 1.2;
        letter-spacing: .04em;
    }

    .dashboard-metric strong {
        font-size: 1.75rem;
    }

    .dashboard-card {
        min-height: 0;
        padding: .95rem;
    }

    .dashboard-card h2 {
        margin-bottom: .55rem;
    }

    .dashboard-list a {
        grid-template-columns: 1fr;
        gap: .28rem;
        padding: .7rem 0;
    }

    .dashboard-list small {
        text-align: left;
    }

    .subscription-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: .85rem;
    }

    .subscription-card {
        padding: 1.15rem;
    }

    .subscription-card .feature-list {
        margin-bottom: 1rem;
        font-size: .95rem;
        line-height: 1.55;
    }

    .subscription-card .actions,
    .subscription-card .actions .button,
    .subscription-card .actions button {
        width: 100%;
    }

    .empty {
        padding: .55rem 0;
        text-align: left;
    }

    .app-view .hero.compact {
        margin-bottom: 1rem;
    }

    .client-context-grid {
        gap: .55rem;
        margin: 0 0 1rem;
    }

    .client-context-grid span {
        min-height: 0;
        padding: .75rem .85rem;
    }

    .section-head h2 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .table-wrap {
        margin-inline: -.35rem;
        padding-inline: .35rem;
    }
}

@media (max-width: 600px) and (orientation: portrait) {
    .dashboard-directory .table-wrap {
        margin-inline: 0;
        padding-inline: 0;
        overflow-x: visible;
    }

    .dashboard-directory table,
    .dashboard-directory thead,
    .dashboard-directory tbody,
    .dashboard-directory tr,
    .dashboard-directory td {
        display: block;
        width: 100%;
    }

    .dashboard-directory table {
        border-collapse: separate;
    }

    .dashboard-directory thead {
        display: none;
    }

    .dashboard-directory tbody {
        display: grid;
        gap: .65rem;
    }

    .dashboard-directory tr {
        padding: .85rem;
        background: #fffefc;
        border: 1px solid var(--line);
        border-radius: 12px;
    }

    .dashboard-directory td {
        padding: .18rem 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }

    .dashboard-directory td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .06rem;
        color: var(--muted);
        font-size: .66rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .dashboard-directory td:last-child {
        padding-top: .65rem;
    }

    .dashboard-directory td:last-child::before {
        display: none;
    }

    .dashboard-directory .text-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 40px;
        padding: .55rem .75rem;
        color: var(--green);
        background: var(--green-pale);
        border-radius: 9px;
    }
}

/* App shell coherence */
.app-main-nav {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.app-view .site-header .app-main-nav {
    gap: .28rem;
}

.app-view .site-header .app-main-nav a,
.app-view .site-header .app-main-nav span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: .54rem .68rem;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 750;
    white-space: nowrap;
}

.app-view .site-header .app-main-nav .is-active {
    color: var(--green-deep);
    background: var(--green-pale);
}

.app-view .site-header .app-main-nav .is-disabled,
.mobile-menu nav .is-disabled {
    color: var(--muted);
    opacity: .58;
    cursor: not-allowed;
}

.app-view .site-header .app-main-nav small,
.dashboard-side small {
    margin-left: .25rem;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.app-view .account-nav {
    flex: 0 0 auto;
    margin-left: auto;
}

.dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-metric.is-muted {
    cursor: default;
}

.dashboard-metric.is-muted strong {
    color: var(--muted);
    font-size: 1.3rem;
}

.dashboard-actions-card {
    min-height: 0;
}

.dashboard-quick-actions {
    display: grid;
    gap: .65rem;
}

.dashboard-quick-actions button,
.dashboard-quick-actions .button {
    width: 100%;
}

.dashboard-activity-card .dashboard-list a strong {
    overflow-wrap: anywhere;
}

.study-card-main small {
    display: block;
    margin-top: .55rem;
}

.report-generated-footer {
    margin: 2rem 0 0;
    padding-top: .75rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: .78rem;
    text-align: center;
}

@media (max-width: 1100px) {
    .app-view .site-header .app-main-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }
}

@media (max-width: 900px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .app-view .account-nav,
    .app-view .member-nav {
        display: none;
    }

    .dashboard-kpi-grid,
    .dashboard-summary-grid.dashboard-kpi-grid,
    .dashboard-summary-grid.two-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metric.is-muted strong {
        font-size: .95rem;
        line-height: 1.15;
    }

    .dashboard-quick-actions {
        gap: .55rem;
    }

    .study-card {
        padding: .9rem;
    }

    .study-card-main {
        display: block;
    }

    .report-page .print-heading,
    .report-page .print-meta > div,
    .report-page .print-notes,
    .report-page .rider-print-notes {
        display: grid;
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .report-page .report-fitter-details {
        text-align: left;
    }

    .report-page .compact-table {
        width: 100%;
    }

    .report-page .print-table,
    .report-page .print-table thead,
    .report-page .print-table tbody,
    .report-page .print-table tr,
    .report-page .print-table th,
    .report-page .print-table td {
        display: block;
        width: 100%;
    }

    .report-page .print-table thead {
        display: none;
    }

    .report-page .print-table tbody {
        display: grid;
        gap: .65rem;
    }

    .report-page .print-table tr {
        padding: .82rem;
        background: #fffefc;
        border: 1px solid var(--line);
        border-radius: 12px;
    }

    .report-page .print-table th,
    .report-page .print-table td {
        padding: .2rem 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .report-page .print-table th[data-label]::before,
    .report-page .print-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .08rem;
        color: var(--muted);
        font-size: .66rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
}

/* Mobile app navigation inspired by the product mockup. */
.app-mobile-tabbar {
    display: none !important;
}

.app-mobile-icon {
    position: relative;
    display: block;
    width: 22px;
    height: 22px;
    color: currentColor;
}

.app-mobile-icon::before,
.app-mobile-icon::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.app-mobile-icon--dashboard::before {
    inset: 4px 3px 3px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 3px;
}

.app-mobile-icon--dashboard::after {
    left: 5px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
}

.app-mobile-icon--clients::before {
    left: 7px;
    top: 3px;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.app-mobile-icon--clients::after {
    left: 3px;
    bottom: 3px;
    width: 16px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 9px 9px 3px 3px;
}

.app-mobile-icon--studies::before,
.app-mobile-icon--documents::before {
    inset: 2px 4px 2px 5px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.app-mobile-icon--studies::after {
    left: 8px;
    top: 7px;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.app-mobile-icon--documents::after {
    left: 8px;
    top: 8px;
    width: 8px;
    height: 5px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.app-mobile-icon--settings::before {
    inset: 3px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.app-mobile-icon--settings::after {
    left: 9px;
    top: 1px;
    width: 4px;
    height: 20px;
    border-top: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
}

.dashboard-side a,
.dashboard-side span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-height: 40px;
    font-weight: 750;
}

.dashboard-title-row {
    align-items: flex-start;
}

.dashboard-title-row h1 {
    font-size: 1.35rem;
}

.dashboard-title-row button::before,
.dashboard-quick-actions button::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: .18rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: .9rem;
    line-height: 1;
}

.dashboard-metric {
    position: relative;
    padding-right: 4rem;
}

.dashboard-metric::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background:
        linear-gradient(currentColor, currentColor) center / 13px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 13px no-repeat,
        var(--green-pale);
    color: var(--green);
    opacity: .9;
}

.dashboard-metric:nth-child(2)::after,
.dashboard-metric:nth-child(3)::after,
.dashboard-metric:nth-child(4)::after {
    background:
        linear-gradient(currentColor, currentColor) center 12px / 13px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 13px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center 24px / 13px 2px no-repeat,
        var(--green-pale);
}

.dashboard-list a {
    border-radius: 9px;
}

.dashboard-list a:hover {
    background: #f7fbf8;
}

@media (max-width: 600px) {
    .app-view {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .app-view .container {
        padding-bottom: calc(2rem + 76px + env(safe-area-inset-bottom, 0px));
    }

    .app-mobile-tabbar {
        position: fixed;
        left: .75rem;
        right: .75rem;
        bottom: calc(.65rem + env(safe-area-inset-bottom, 0px));
        z-index: 45;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: .18rem;
        min-height: 66px;
        padding: .42rem;
        background: rgba(255, 253, 249, .97);
        border: 1px solid rgba(220, 229, 225, .92);
        border-radius: 18px;
        box-shadow: 0 18px 40px rgba(12, 48, 64, .18);
        backdrop-filter: blur(18px);
    }

    .app-mobile-tabbar a {
        display: grid;
        justify-items: center;
        align-content: center;
        gap: .18rem;
        min-width: 0;
        min-height: 54px;
        color: var(--muted);
        border-radius: 13px;
        font-size: .64rem;
        line-height: 1;
        text-align: center;
    }

    .app-mobile-tabbar a.is-active {
        color: var(--green);
        background: var(--green-pale);
    }

    .app-mobile-tabbar strong {
        max-width: 100%;
        overflow: hidden;
        font-size: .64rem;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-side {
        display: none;
    }

    .dashboard-shell {
        border-radius: 16px;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .dashboard-title-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-title-row button,
    .dashboard-quick-actions button,
    .dashboard-quick-actions .button,
    .page-actions button,
    .page-actions .button {
        width: 100%;
    }

    .dashboard-metric {
        min-height: 96px;
        padding: .85rem 3.1rem .85rem .85rem;
    }

    .dashboard-metric::after {
        right: .72rem;
        top: .72rem;
        width: 32px;
        height: 32px;
    }
}

@media print {
    .app-mobile-tabbar {
        display: none !important;
    }
}

/* BFS brand assets */
.brand-logo-horizontal,
.studio-brand .brand-mark,
.app-view .studio-brand .brand-mark,
.footer-logo,
.dashboard-window-logo {
    display: block;
    background: transparent;
    border: 0;
    object-fit: contain;
}

.brand-logo-horizontal {
    width: auto;
    height: 44px;
    max-width: 210px;
}

.studio-brand .brand-mark,
.studio-brand > strong {
    display: none;
}

.app-view .studio-brand .brand-logo-horizontal {
    display: none;
}

.app-view .studio-brand .brand-mark,
.dashboard-window-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.app-view .studio-brand > strong {
    display: block;
}

.dashboard-window-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.studio-brand .brand-mark::after {
    display: none;
}

.footer-logo {
    width: auto;
    height: 76px;
    max-width: min(340px, 100%);
}

img.institutional-icon {
    display: block;
    width: 84px;
    height: 84px;
    margin-bottom: 1.65rem;
    background: transparent;
    border: 0;
    border-radius: 20px;
    object-fit: contain;
}

.legal-page {
    max-width: 920px;
    text-align: center;
}

.privacy-policy-page {
    max-width: 980px;
}

.privacy-policy-page > .privacy-intro {
    max-width: 720px;
    margin-bottom: 1.6rem;
}

.privacy-toc {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .62rem;
    width: min(100%, 900px);
    margin: 0 0 .55rem;
    padding: 1rem;
    background: #fbfdfb;
    border: 1px solid var(--line);
    border-radius: 16px;
    text-align: left;
}

.privacy-toc p {
    grid-column: 1 / -1;
    margin: 0 0 .15rem;
    color: var(--green-deep);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.privacy-toc a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: .62rem .72rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #e8eeeb;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 700;
}

.privacy-toc a:hover {
    color: var(--green-deep);
    border-color: rgba(0, 166, 133, .32);
}

.legal-content {
    width: min(100%, 730px);
    margin-top: 1.7rem;
    text-align: left;
}

.privacy-content {
    width: min(100%, 900px);
    text-align: center;
}

.legal-section {
    padding-top: 1.45rem;
    border-top: 1px solid var(--line);
}

.privacy-section,
.privacy-important {
    scroll-margin-top: 100px;
    padding: 1.35rem;
    background: #fbfdfb;
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: 14px;
}

.privacy-content .privacy-section:first-child {
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
}

.privacy-content .privacy-section + .privacy-section,
.privacy-content .privacy-important {
    margin-top: 1rem;
}

.privacy-section h2,
.privacy-important h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    text-align: center;
}

.privacy-section-icon {
    position: relative;
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--green);
}

.privacy-section-icon::before {
    content: "";
    position: absolute;
    inset: .14rem;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.privacy-section-icon::after {
    content: "";
    position: absolute;
    right: .04rem;
    bottom: .04rem;
    width: .42rem;
    height: .42rem;
    background: currentColor;
    border: 2px solid #fbfdfb;
    border-radius: 50%;
}

.privacy-important {
    background: var(--green-pale);
    border-color: rgba(0, 166, 133, .32);
}

.privacy-important h2 {
    margin: 0 0 .75rem;
    color: var(--green-deep);
    font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.privacy-important p {
    margin: 0;
    color: var(--ink);
    line-height: 1.72;
}

.privacy-section ul {
    display: inline-block;
    max-width: min(100%, 660px);
    text-align: left;
}

.privacy-updated {
    margin: 1.5rem 0 0;
    color: var(--muted);
    font-size: .94rem;
    font-weight: 700;
}

.legal-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.legal-section + .legal-section {
    margin-top: 1.65rem;
}

.legal-section h2 {
    margin: 0 0 .75rem;
    color: var(--green-deep);
    font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.legal-section p,
.legal-section li,
.legal-address {
    color: var(--muted);
    line-height: 1.72;
}

.legal-section p {
    margin: 0 0 .85rem;
}

.legal-section p:last-child,
.legal-section ul:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    margin: .1rem 0 1rem;
    padding-left: 1.2rem;
}

.legal-section li + li {
    margin-top: .35rem;
}

.legal-section a:not(.button) {
    color: var(--green);
    font-weight: 750;
}

.legal-address {
    font-style: normal;
}

.legal-contact-button {
    margin-top: .2rem;
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .8rem;
    margin-top: 2rem;
}

.report-logo--system {
    width: 245px;
    max-width: 44vw;
    max-height: 72px;
}

.report-logo--profile {
    width: 88px;
    max-height: 58px;
}

@media (max-width: 600px) {
    .brand-logo-horizontal {
        display: none;
    }

    .studio-brand .brand-mark,
    .app-view .studio-brand .brand-mark {
        display: block;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .studio-brand > strong {
        display: block;
    }

    .footer-logo {
        height: 58px;
    }

    .report-logo--system {
        width: 180px;
        max-width: 100%;
    }

    .report-logo--profile {
        width: 72px;
    }

    .legal-page {
        padding-right: 1.1rem;
        padding-left: 1.1rem;
    }

    .privacy-toc {
        grid-template-columns: 1fr;
        padding: .85rem;
    }

    .privacy-section,
    .privacy-important {
        padding: 1.05rem;
    }

    .legal-content {
        margin-top: 1.35rem;
    }

    .legal-actions,
    .legal-actions .button,
    .legal-contact-button {
        width: 100%;
    }
}

.institutional-page.documentation-page {
    justify-items: center;
    width: min(calc(100% - 2.4rem), 1120px);
    max-width: 1120px;
    margin: 3.4rem auto 0;
    padding: clamp(1.6rem, 4vw, 4rem);
    text-align: center;
}

.documentation-hero {
    display: grid;
    justify-items: center;
    width: min(100%, 760px);
    margin: 0 auto 2.65rem;
}

.documentation-page .institutional-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 1.35rem;
}

.documentation-page h1 {
    margin-bottom: .95rem;
}

.documentation-intro {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.72;
}

.documentation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: min(100%, 980px);
    margin: 0 auto 3.1rem;
}

.documentation-card {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    min-height: 158px;
    padding: 1.25rem;
    color: var(--ink);
    background: #fffefc;
    border: 1px solid rgba(220, 229, 225, .95);
    border-radius: 16px;
    box-shadow: 0 12px 26px rgba(18, 37, 44, .045);
    text-align: left;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.documentation-card:hover {
    transform: translateY(-3px);
    background: #fff;
    border-color: rgba(0, 166, 133, .38);
    box-shadow: 0 18px 34px rgba(18, 37, 44, .085);
}

.documentation-card:focus-visible {
    outline: 3px solid rgba(0, 166, 133, .28);
    outline-offset: 3px;
}

.documentation-card-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    background: var(--green-pale);
    border: 1px solid rgba(0, 166, 133, .14);
    border-radius: 12px;
    font-size: 1.18rem;
    line-height: 1;
}

.documentation-card-copy {
    display: grid;
    gap: .42rem;
    min-width: 0;
}

.documentation-card-copy strong {
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.22;
}

.documentation-card-copy span {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
}

.documentation-details-heading {
    width: min(100%, 900px);
    margin: .2rem auto 1.55rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    text-align: left;
}

.documentation-details-heading h2 {
    margin: 0 0 .55rem;
    color: var(--ink);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.documentation-details-heading p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.documentation-sections {
    display: grid;
    gap: 1rem;
    width: min(100%, 900px);
    margin: 0 auto;
    text-align: left;
}

.documentation-section {
    scroll-margin-top: 96px;
    padding: 1.4rem 1.5rem;
    background: #fbfdfb;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.documentation-section h2 {
    margin: 0 0 .55rem;
    color: var(--green-deep);
    font-size: clamp(1.12rem, 2vw, 1.34rem);
}

.documentation-section p,
.documentation-section li {
    color: var(--muted);
    line-height: 1.7;
}

.documentation-section p {
    margin: 0 0 .9rem;
}

.documentation-section ul {
    margin: 0;
    padding-left: 1.2rem;
}

.documentation-section li + li {
    margin-top: .42rem;
}

.documentation-section a:not(.button) {
    color: var(--green);
    font-weight: 750;
}

.documentation-actions {
    display: flex;
    justify-content: center;
    margin-top: 2.6rem;
}

@media (max-width: 900px) {
    .institutional-page.documentation-page {
        width: min(calc(100% - 1.8rem), 1120px);
        margin-top: 2.6rem;
        padding: 2.2rem 1.35rem 2.6rem;
    }

    .documentation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .documentation-details-heading,
    .documentation-sections {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .institutional-page.documentation-page {
        width: min(calc(100% - 1rem), 1120px);
        margin-top: 1.4rem;
        padding: 1.65rem .9rem 2rem;
        border-radius: 20px;
    }

    .documentation-hero {
        margin-bottom: 1.75rem;
    }

    .documentation-page .institutional-icon {
        width: 72px;
        height: 72px;
    }

    .documentation-grid {
        grid-template-columns: 1fr;
        gap: .75rem;
        margin-bottom: 2.4rem;
    }

    .documentation-card {
        min-height: 0;
        padding: 1.05rem;
    }

    .documentation-details-heading {
        padding-top: 1.55rem;
    }

    .documentation-section {
        padding: 1.12rem 1rem;
        border-radius: 12px;
    }

    .documentation-actions,
    .documentation-actions .button {
        width: 100%;
    }
}

/* App shell simplification */
.dashboard-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
}

.dashboard-title-actions .button,
.dashboard-title-actions button {
    border-radius: 8px;
}

.dashboard-overview-grid > .dashboard-card:only-child {
    grid-column: 1 / -1;
}

.dashboard-coming-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    padding: .2rem .58rem;
    color: var(--green);
    background: var(--green-pale);
    border-radius: 999px;
    font-size: .82rem;
}

.dashboard-quick-actions button,
.dashboard-quick-actions .button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    min-height: 54px;
    padding: .75rem .85rem;
    color: var(--ink);
    background: #fffefc;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: left;
}

.dashboard-quick-actions button:hover,
.dashboard-quick-actions .button:hover {
    color: var(--green-deep);
    background: var(--green-pale);
}

.dashboard-quick-actions .button::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: .18rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: .9rem;
    line-height: 1;
}

.dashboard-quick-actions .button[href*="reports"]::before {
    content: "";
    border-radius: 4px;
}

.dashboard-quick-actions .button[href*="view=clients"]::before {
    content: "";
    background:
        radial-gradient(circle at 50% 35%, currentColor 0 3px, transparent 3.5px),
        radial-gradient(ellipse at 50% 76%, transparent 0 5px, currentColor 5.5px 6.5px, transparent 7px);
    border-radius: 50%;
}

.app-internal-nav {
    display: flex;
    gap: .45rem;
    margin: 0 0 1rem;
    padding-bottom: .35rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
}

.app-internal-nav a,
.app-internal-nav span {
    flex: 0 0 auto;
    min-height: 36px;
    padding: .58rem .78rem;
    color: var(--muted);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 750;
    white-space: nowrap;
}

.app-internal-nav a:hover {
    color: var(--green);
    background: var(--green-pale);
}

.app-internal-nav .is-active {
    color: #fff;
    background: var(--green);
}

.app-internal-nav .is-disabled {
    opacity: .55;
}

.app-internal-select {
    display: none;
}

.new-client-panel {
    scroll-margin-top: 96px;
}

.admin-log-preview {
    max-height: 420px;
    margin: 0;
    padding: .9rem;
    overflow: auto;
    color: var(--ink);
    background: #fbfdfb;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: .78rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

@media (max-width: 900px) {
    .app-internal-nav {
        display: none !important;
    }

    .app-internal-select {
        display: grid;
        gap: .35rem;
        margin: 0 0 1rem;
    }

    .app-internal-select span {
        color: var(--muted);
        font-size: .72rem;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .app-internal-select select {
        width: 100%;
        min-height: 48px;
        color: var(--ink);
        background: #fffefc;
        font-weight: 750;
    }
}

@media (max-width: 600px) {
    .app-view .mobile-menu[open] nav {
        position: fixed;
        top: 68px;
        right: .85rem;
        left: .85rem;
        width: auto;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        padding: .7rem;
        border-radius: 16px;
        box-shadow: 0 20px 44px rgba(12, 48, 64, .18);
    }

    .app-view .mobile-menu nav a,
    .app-view .mobile-menu nav span {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 42px;
        padding: .72rem .78rem;
        border-radius: 10px;
        font-weight: 750;
    }

    .app-view .mobile-menu nav .is-active {
        color: #fff;
        background: var(--green);
    }

    .dashboard-title-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .dashboard-title-actions .button,
    .dashboard-title-actions button {
        width: 100%;
    }

    .dashboard-quick-actions button,
    .dashboard-quick-actions .button {
        min-height: 58px;
    }

    .admin-users-table {
        min-width: 0;
        table-layout: auto;
    }

    .admin-users-table-wrap {
        overflow: visible;
    }

    .admin-users-table select {
        width: 100%;
    }

    .admin-user-actions,
    .manual-access-fields {
        display: grid;
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .admin-log-preview {
        max-height: none;
        font-size: .72rem;
        overflow-wrap: anywhere;
    }
}
/* App shell mockup alignment */
@media (min-width: 601px) {
    .app-view .site-header {
        display: none;
    }

    .app-view .container {
        padding-top: 1.4rem;
    }
}

.dashboard-shell {
    max-width: 1140px;
    background: #fffefc;
    border-color: rgba(220, 229, 225, .95);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(18, 37, 44, .075);
}

.dashboard-windowbar {
    min-height: 68px;
    padding: .75rem 1.15rem;
    background: #fffefc;
}

.dashboard-window-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--ink);
}

.dashboard-window-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.dashboard-windowbar strong {
    font-size: .95rem;
}

.dashboard-window-dot {
    display: none;
}

.dashboard-account-menu {
    margin-left: auto;
}

.dashboard-account-menu summary {
    list-style: none;
}

.dashboard-account-menu summary::-webkit-details-marker {
    display: none;
}

.dashboard-user-badge {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    padding: .28rem .5rem;
    color: var(--ink);
    cursor: pointer;
    border-radius: 999px;
}

.dashboard-user-badge:hover {
    background: #f4f8f6;
}

.dashboard-user-badge::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: .1rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
}

.dashboard-user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: var(--green-deep);
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800;
}

.dashboard-user-copy {
    display: grid;
    gap: .08rem;
    min-width: 0;
}

.dashboard-user-copy strong,
.dashboard-user-copy small {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-user-copy strong {
    color: var(--ink);
    font-size: .82rem;
    line-height: 1.1;
}

.dashboard-user-copy small {
    color: var(--muted);
    font-size: .68rem;
}

.dashboard-account-menu .account-menu-panel a {
    display: block;
    padding: .72rem .78rem;
    color: var(--ink);
    border-radius: 8px;
}

.dashboard-account-menu .account-menu-panel a:hover {
    color: var(--green-deep);
    background: var(--green-pale);
}

.dashboard-app {
    grid-template-columns: 220px minmax(0, 1fr);
}

.dashboard-side {
    gap: .6rem;
    padding: 1.35rem 1rem;
    background: #fffdf9;
}

.dashboard-side a,
.dashboard-side span {
    justify-content: flex-start;
    gap: .68rem;
    min-height: 42px;
    padding: .72rem .82rem;
    border-radius: 9px;
}

.dashboard-side a::before,
.dashboard-side span::before {
    content: "";
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
    opacity: .86;
}

.dashboard-side .is-active {
    color: #fff;
    background: #00566c;
    box-shadow: 0 10px 20px rgba(0, 86, 108, .18);
}

.dashboard-side .is-disabled {
    opacity: .62;
}

.dashboard-side small {
    margin-left: auto;
    padding: .13rem .45rem;
    color: var(--green-deep);
    background: var(--green-pale);
    border-radius: 999px;
    font-size: .64rem;
    opacity: 1;
}

.dashboard-main {
    padding: 1.55rem 1.75rem 1.75rem;
}

.dashboard-title-row {
    margin-bottom: 1.25rem;
}

.dashboard-title-row h1 {
    font-size: 1.45rem;
}

.dashboard-kpi-grid {
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.dashboard-metric,
.dashboard-card,
.dashboard-shell .panel {
    border-radius: 14px;
}

.dashboard-metric {
    min-height: 116px;
    padding: 1.05rem 4.3rem 1rem 1rem;
}

.dashboard-metric span,
.dashboard-card h2 {
    color: var(--muted);
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dashboard-card h2 {
    color: var(--ink);
    font-size: .96rem;
    letter-spacing: 0;
    text-transform: none;
}

.dashboard-metric strong {
    color: #00566c;
    font-size: 2rem;
}

.dashboard-metric.is-muted .dashboard-coming-badge {
    color: var(--green-deep);
    font-size: .9rem;
}

.dashboard-metric::after {
    right: 1rem;
    top: 1rem;
    border: 1px solid rgba(0, 86, 108, .16);
}

.dashboard-overview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(310px, .92fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-card {
    padding: 1.1rem 1.15rem;
}

.dashboard-quick-actions {
    gap: .75rem;
}

.dashboard-quick-actions button,
.dashboard-quick-actions .button {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .15rem .7rem;
    min-height: 62px;
    padding: .82rem .95rem;
    border-radius: 11px;
    box-shadow: 0 8px 18px rgba(18, 37, 44, .035);
}

.dashboard-quick-actions button::before,
.dashboard-quick-actions .button::before {
    grid-row: 1 / span 2;
    width: 24px;
    height: 24px;
    margin-right: 0;
    color: var(--green-deep);
}

.dashboard-quick-actions .button[href*="view=clients"]::before {
    content: "+";
    background: none;
    border-radius: 50%;
}

.dashboard-quick-actions strong,
.dashboard-quick-actions small {
    display: block;
    min-width: 0;
}

.dashboard-quick-actions strong {
    color: var(--ink);
    font-size: .92rem;
    line-height: 1.2;
}

.dashboard-quick-actions small {
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.25;
}

.dashboard-info-strip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .85rem;
    margin-top: .95rem;
    padding: .9rem 1rem;
    color: #74552f;
    background: #fff7e7;
    border: 1px solid #f1d8aa;
    border-radius: 12px;
}

.dashboard-info-strip > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #d8a551;
    border-radius: 50%;
}

.dashboard-info-strip > span::before {
    content: "";
    width: 7px;
    height: 12px;
    border-right: 2px solid #b5791f;
    border-bottom: 2px solid #b5791f;
    transform: rotate(45deg);
}

.dashboard-info-strip p {
    margin: 0;
    font-size: .84rem;
    line-height: 1.45;
}

.dashboard-info-strip .button {
    min-height: 36px;
    padding: .58rem .85rem;
    color: #fff;
    background: #00566c;
    border-radius: 8px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .dashboard-app {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 600px) {
    .app-view .site-header {
        height: 76px;
        color: var(--ink);
        background: rgba(255, 253, 249, .98);
        border-color: rgba(220, 229, 225, .95);
    }

    .app-view .studio-brand > strong {
        color: var(--ink);
        letter-spacing: 0;
        text-transform: none;
    }

    .app-view .mobile-menu summary {
        background: #fffefc;
    }

    .dashboard-shell {
        border-radius: 16px;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .dashboard-kpi-grid,
    .dashboard-summary-grid.dashboard-kpi-grid {
        gap: .72rem;
    }

    .dashboard-metric {
        min-height: 112px;
        padding: .95rem 3.45rem .9rem .95rem;
    }

    .dashboard-metric span {
        font-size: .66rem;
    }

    .dashboard-overview-grid,
    .dashboard-info-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-info-strip .button {
        width: 100%;
        text-align: center;
    }
}

/* Connected app continuity */
.app-view {
    background:
        radial-gradient(circle at 15% 0%, rgba(0, 166, 133, .08), transparent 30rem),
        #f8faf8;
}

.app-view .app-global-header {
    display: flex;
    height: 78px;
    padding: 0 max(1.2rem, calc((100% - 1180px) / 2));
    color: var(--ink);
    background: rgba(255, 253, 249, .96);
    border-bottom: 1px solid rgba(220, 229, 225, .95);
    box-shadow: 0 10px 28px rgba(18, 37, 44, .055);
}

.app-view .app-global-header .studio-brand {
    gap: .7rem;
}

.app-view .app-global-header .brand-logo-horizontal {
    display: block;
    height: 44px;
    max-width: 220px;
}

.app-view .app-global-header .brand-mark,
.app-view .app-global-header .studio-brand > strong {
    display: none;
}

.app-global-actions {
    margin-left: auto;
}

.app-view .app-global-actions a {
    color: var(--ink);
}

.app-view .app-global-actions a:hover {
    color: var(--green-deep);
    background: var(--green-pale);
}

.app-return-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.app-return-link::before {
    content: "\2190";
    font-size: 1rem;
    line-height: 1;
}

.app-help-link {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border: 1px solid var(--line);
    border-radius: 50% !important;
}

.app-view .app-global-header .dashboard-user-badge {
    min-height: 46px;
    padding: .35rem .55rem;
}

.app-view .container {
    max-width: 1180px;
    padding-top: 1.15rem;
}

.app-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: min(100%, 1140px);
    margin: 0 auto .85rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.app-breadcrumb a {
    color: var(--green-deep);
}

.app-breadcrumb strong {
    color: var(--ink);
}

.dashboard-shell {
    width: min(100%, 1140px);
    margin-bottom: 0;
}

.dashboard-app {
    min-height: 620px;
}

.dashboard-side {
    grid-template-rows: auto auto auto 1fr auto;
    min-height: 100%;
    padding: 1.15rem .9rem;
}

.dashboard-side-brand {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto .45rem;
    padding: 0 !important;
    background: transparent !important;
}

.dashboard-side-brand::before {
    display: none;
}

.dashboard-side-logo {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.dashboard-side-nav {
    display: grid;
    gap: .52rem;
}

.dashboard-side-return,
.dashboard-side-support {
    color: var(--ink) !important;
    background: #f2f6f4;
    border: 1px solid rgba(220, 229, 225, .9);
}

.dashboard-side-return {
    margin-bottom: .35rem;
}

.dashboard-side-return::before {
    border-radius: 50%;
    background:
        linear-gradient(currentColor, currentColor) 35% 50% / 8px 2px no-repeat,
        linear-gradient(45deg, transparent 44%, currentColor 46% 54%, transparent 56%) 35% 50% / 9px 9px no-repeat;
}

.dashboard-side-support {
    align-self: end;
    margin-top: 1rem;
}

.dashboard-main {
    padding: 1.45rem 1.65rem 1.65rem;
}

.dashboard-welcome-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr);
    gap: 1.2rem;
    margin-bottom: 1.1rem;
    overflow: hidden;
    padding: 1.45rem 1.5rem;
    background:
        linear-gradient(105deg, rgba(244, 250, 248, .98) 0%, rgba(226, 242, 255, .9) 100%);
    border: 1px solid rgba(220, 229, 225, .95);
    border-radius: 16px;
    box-shadow: 0 18px 38px rgba(18, 37, 44, .07);
}

.dashboard-welcome-copy {
    position: relative;
    z-index: 1;
}

.dashboard-welcome-card h2 {
    margin: 0 0 .45rem;
    color: var(--ink);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.08;
}

.dashboard-welcome-card p {
    margin: 0;
    color: var(--muted);
}

.dashboard-welcome-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1.15rem;
}

.dashboard-welcome-stats span {
    display: grid;
    gap: .28rem;
    min-height: 72px;
    padding: .75rem .82rem;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(220, 229, 225, .8);
    border-radius: 10px;
}

.dashboard-welcome-stats small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}

.dashboard-welcome-stats strong {
    color: #00566c;
    font-size: 1rem;
}

.dashboard-welcome-visual {
    position: relative;
    min-height: 150px;
}

.dashboard-welcome-visual::before,
.dashboard-welcome-visual::after {
    content: "";
    position: absolute;
    border: 2px solid rgba(0, 86, 108, .18);
    border-radius: 50%;
}

.dashboard-welcome-visual::before {
    right: .5rem;
    bottom: .35rem;
    width: 138px;
    height: 138px;
}

.dashboard-welcome-visual::after {
    right: 8.3rem;
    bottom: 1.35rem;
    width: 88px;
    height: 88px;
}

.app-footer {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
    align-items: center;
    gap: 1rem;
    width: min(100%, 1140px);
    margin: 0 auto 1.4rem;
    padding: 1rem 1.2rem;
    color: var(--muted);
    background: rgba(255, 253, 249, .92);
    border: 1px solid rgba(220, 229, 225, .95);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    font-size: .82rem;
}

.app-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .9rem;
}

.app-footer a {
    color: var(--ink);
    font-weight: 650;
}

.app-footer a:hover {
    color: var(--green-deep);
}

.app-footer > span:last-child {
    text-align: right;
}

@media (max-width: 900px) {
    .dashboard-welcome-card {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome-visual {
        display: none;
    }

    .dashboard-welcome-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .app-footer > span:last-child {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .app-view .app-global-header {
        height: 76px;
        padding: .75rem 1.1rem;
    }

    .app-view .app-global-header .brand-logo-horizontal {
        display: none;
    }

    .app-view .app-global-header .brand-mark {
        display: block;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .app-view .app-global-header .studio-brand > strong {
        display: block;
        color: var(--ink);
        font-size: .9rem;
        letter-spacing: 0;
        text-transform: none;
    }

    .app-breadcrumb {
        padding: 0 .1rem;
        font-size: .78rem;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .dashboard-welcome-card {
        padding: 1.15rem;
        border-radius: 14px;
    }

    .dashboard-welcome-stats {
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .app-footer {
        margin-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        padding: 1rem;
        border-radius: 14px;
    }
}
/* Connected app continuity visibility fix */
.app-view .site-header.app-global-header {
    display: flex !important;
}

.language-switcher {
    position: relative;
    display: inline-block;
    min-height: 0;
}

.language-switcher > summary {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    min-height: 32px;
    padding: .36rem .58rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: .7rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.language-switcher > summary::-webkit-details-marker {
    display: none;
}

.language-switcher > summary::marker {
    content: '';
}

.language-switcher > summary:hover,
.language-switcher[open] > summary {
    border-color: var(--green);
    color: var(--green);
}

.language-switcher > summary:focus-visible,
.site-header nav .language-switcher__menu a:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

.language-switcher__flag {
    display: block;
    width: 18px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(5, 50, 60, .16);
    object-fit: cover;
}

.language-switcher__label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.language-switcher__chevron {
    transition: transform .16s ease;
}

.language-switcher[open] .language-switcher__chevron {
    transform: rotate(180deg);
}

.language-switcher__menu {
    position: absolute;
    top: calc(100% + .4rem);
    right: 0;
    z-index: 200;
    display: none;
    min-width: 190px;
    max-height: min(60vh, 360px);
    overflow-y: auto;
    padding: .35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 14px 30px rgba(5, 50, 60, .16);
}

.language-switcher[open] > .language-switcher__menu {
    display: grid;
    gap: .15rem;
}

.site-header nav .language-switcher__menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-width: 0;
    padding: .55rem .65rem;
    border-radius: 8px;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

.site-header nav .language-switcher__menu a:hover {
    background: var(--green-pale);
}

.site-header nav .language-switcher__menu a.is-active {
    color: #fff;
    background: var(--green);
}

.language-switcher__check {
    font-size: .85rem;
}

@media (max-width: 600px) {
    .site-header .mobile-menu nav .language-switcher--mobile {
        display: block;
        width: 100%;
        min-height: auto;
        margin-top: .35rem;
    }

    .site-header .mobile-menu nav .language-switcher--mobile > summary {
        display: flex;
        align-items: center;
        width: 100%;
        height: auto;
        min-height: 42px;
        padding: .65rem .75rem;
        border-radius: 12px;
    }

    .site-header .mobile-menu nav .language-switcher--mobile > summary span {
        display: inline-block;
        height: auto;
        border-radius: 0;
        background: transparent;
    }

    .site-header .mobile-menu nav .language-switcher--mobile .language-switcher__chevron {
        margin-left: auto;
    }

    .site-header .mobile-menu nav .language-switcher--mobile .language-switcher__menu {
        position: static;
        width: 100%;
        min-width: 0;
        max-height: 280px;
        margin-top: .35rem;
        box-shadow: none;
    }

    .site-header .mobile-menu nav .language-switcher--mobile .language-switcher__menu a {
        min-height: 40px;
        white-space: normal;
    }

    .site-header .mobile-menu nav .language-switcher--mobile .language-switcher__label {
        display: inline-flex;
        min-height: 0;
        padding: 0;
    }

    .site-header .mobile-menu nav .language-switcher--mobile .language-switcher__label > span,
    .site-header .mobile-menu nav .language-switcher--mobile .language-switcher__check {
        display: inline;
        min-height: 0;
        padding: 0;
    }
}

.app-view .app-footer {
    display: grid !important;
}

/* Admin users action clarity */
.admin-users-table tr {
    grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(130px, .72fr)) minmax(170px, .85fr);
    grid-template-areas:
        "account role plan status actions"
        "account email usage usage actions"
        "access access access access actions";
}

.admin-users-table td:nth-child(4) {
    padding-top: .55rem;
    border-top: 1px solid rgba(220, 229, 225, .75);
}

.admin-users-table td:nth-child(8) {
    min-width: 0;
}

.admin-users-table .admin-user-actions {
    gap: .55rem;
    align-content: start;
}

.admin-current-user {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: .55rem .7rem;
    color: var(--muted);
    background: #f2f6f4;
    border: 1px solid rgba(220, 229, 225, .95);
    border-radius: 9px;
}

.admin-delete-form-inline {
    margin-top: 0;
}

.admin-delete-form-inline .danger-button {
    width: 100%;
}

@media (max-width: 1050px) {
    .admin-users-table tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "account account"
            "role plan"
            "status email"
            "usage usage"
            "access access"
            "actions actions";
    }
}

/* Admin users stable layout */
.admin-users-table-wrap {
    max-width: 100%;
    overflow: visible;
}

.admin-users-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    table-layout: auto;
}

.admin-users-table thead {
    display: none;
}

.admin-users-table tbody {
    display: grid;
    gap: .9rem;
}

.admin-users-table tr {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-areas:
        "account role"
        "email plan"
        "usage status"
        "access access"
        "actions actions";
    gap: .75rem 1rem;
    width: 100%;
    padding: 1rem;
    background: #fffefc;
    border: 1px solid rgba(220, 229, 225, .95);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(18, 37, 44, .045);
}

.admin-users-table td {
    display: grid;
    align-content: start;
    gap: .28rem;
    min-width: 0;
    padding: 0;
    border: 0;
}

.admin-users-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-users-table td:nth-child(1) {
    grid-area: account;
}

.admin-users-table td:nth-child(2) {
    grid-area: role;
}

.admin-users-table td:nth-child(3) {
    grid-area: plan;
}

.admin-users-table td:nth-child(4) {
    grid-area: access;
    min-width: 0;
    padding-top: .75rem;
    border-top: 1px solid rgba(220, 229, 225, .85);
}

.admin-users-table td:nth-child(5) {
    grid-area: status;
}

.admin-users-table td:nth-child(6) {
    grid-area: email;
    white-space: normal;
}

.admin-users-table td:nth-child(7) {
    grid-area: usage;
}

.admin-users-table td:nth-child(8) {
    grid-area: actions;
    min-width: 0;
    padding-top: .75rem;
    border-top: 1px solid rgba(220, 229, 225, .85);
}

.admin-users-table select,
.admin-users-table input {
    width: 100%;
}

.admin-users-table .admin-user-actions {
    display: grid;
    grid-template-columns: minmax(160px, .75fr) minmax(220px, 1.25fr);
    gap: .7rem;
    align-items: stretch;
}

.admin-users-table .admin-save-form,
.admin-delete-form-inline {
    display: grid;
    gap: .5rem;
}

.admin-users-table .admin-save-form button,
.admin-delete-form-inline .danger-button {
    width: 100%;
}

.admin-delete-form-inline {
    margin-top: 0;
    padding: .7rem;
    background: #fff7f4;
    border: 1px solid rgba(178, 52, 41, .2);
    border-radius: 10px;
}

.admin-delete-form-inline label {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #6f3c34;
    font-size: .78rem;
    font-weight: 750;
}

.admin-users-table .admin-current-user {
    display: grid;
    place-items: center;
    min-height: 100%;
    padding: .65rem .75rem;
    text-align: center;
}

@media (max-width: 760px) {
    .admin-users-table tr,
    .admin-users-table .admin-user-actions {
        grid-template-columns: 1fr;
    }

    .admin-users-table tr {
        grid-template-areas:
            "account"
            "role"
            "plan"
            "status"
            "email"
            "usage"
            "access"
            "actions";
    }
}

/* Connected app page consistency fixes */
.app-view .dashboard-title-row > div:first-child {
    display: grid;
    gap: .28rem;
}

.app-view .dashboard-title-row .eyebrow,
.app-view .dashboard-title-row .muted {
    margin: 0;
}

.admin-filter-form {
    grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(190px, 1fr) auto;
    align-items: end;
}

.admin-filter-actions {
    display: flex;
    gap: .45rem;
}

.admin-waitlist-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

.admin-waitlist-table th:nth-child(1),
.admin-waitlist-table th:nth-child(2),
.admin-waitlist-table th:nth-child(3),
.admin-waitlist-table th:nth-child(4),
.admin-waitlist-table th:nth-child(5),
.admin-waitlist-table th:nth-child(6),
.admin-waitlist-table th:nth-child(7) {
    width: auto;
}

.admin-waitlist-table th,
.admin-waitlist-table td {
    vertical-align: top;
}

.admin-waitlist-table td:nth-child(2),
.admin-waitlist-table td:nth-child(5) {
    overflow-wrap: anywhere;
}

.admin-waitlist-table select {
    width: 100%;
    min-width: 128px;
}

.admin-waitlist-table .admin-save-form button {
    width: 100%;
}

@media (max-width: 760px) {
    .admin-filter-form {
        grid-template-columns: 1fr;
    }

    .admin-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-waitlist-table,
    .admin-waitlist-table thead,
    .admin-waitlist-table tbody,
    .admin-waitlist-table tr,
    .admin-waitlist-table td {
        display: block;
        width: 100%;
    }

    .admin-waitlist-table thead {
        display: none;
    }

    .admin-waitlist-table tbody {
        display: grid;
        gap: .75rem;
    }

    .admin-waitlist-table tr {
        padding: .9rem;
        background: #fffefc;
        border: 1px solid var(--line);
        border-radius: 12px;
    }

    .admin-waitlist-table td {
        padding: .22rem 0;
        border-bottom: 0;
    }

    .admin-waitlist-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .1rem;
        color: var(--muted);
        font-size: .66rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
}
