/* ========== Tokens ========== */
:root {
    /* Base */
    --bg: #0a0c10;
    --bg-2: #0f1218;
    --panel: #141822;
    --panel-2: #1a1f2d;
    --panel-3: #222736;
    --border: #262b3a;
    --border-2: #323849;

    /* Text */
    --text: #e9ecf3;
    --text-2: #b4bacb;
    --muted: #7a8197;
    --dim: #525869;

    /* Accents — blue + red duotone */
    --accent: #3b82f6;
    --accent-hi: #60a5fa;
    --accent-lo: #1e40af;
    --accent-glow: rgba(59, 130, 246, 0.35);

    --red: #ef4444;
    --red-hi: #f87171;
    --red-lo: #7f1d1d;
    --red-glow: rgba(239, 68, 68, 0.35);

    --ok: #22c55e;
    --warn: #f59e0b;

    /* Intensity (session cards) */
    --light: #22c55e;
    --light-bg: rgba(34, 197, 94, 0.12);
    --medium: #f59e0b;
    --medium-bg: rgba(245, 158, 11, 0.12);
    --heavy: #ef4444;
    --heavy-bg: rgba(239, 68, 68, 0.14);

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur-fast: 140ms;
    --dur: 220ms;
    --dur-slow: 420ms;

    /* Radii / shadows */
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-blue: 0 0 0 1px rgba(59, 130, 246, 0.22), 0 10px 40px -10px rgba(59, 130, 246, 0.45);
    --shadow-red:  0 0 0 1px rgba(239, 68, 68, 0.22), 0 10px 40px -10px rgba(239, 68, 68, 0.45);
}

* { box-sizing: border-box; }

@font-face {
    font-family: 'Inter var fallback';
    src: local('Inter'), local('Segoe UI'), local('Helvetica Neue');
    font-weight: 100 900;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}
html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 'Inter', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Ambient background — red/blue orbs + subtle grid */
body::before {
    content: '';
    position: fixed;
    inset: -20vmax -20vmax auto auto;
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(closest-side, var(--red-glow), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    animation: orb-a 14s var(--ease) infinite alternate;
}
body::after {
    content: '';
    position: fixed;
    inset: auto auto -20vmax -20vmax;
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    animation: orb-b 18s var(--ease) infinite alternate;
}

@keyframes orb-a {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: .35; }
    100% { transform: translate3d(-6vmax, 8vmax, 0) scale(1.15); opacity: .55; }
}
@keyframes orb-b {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: .30; }
    100% { transform: translate3d(6vmax, -6vmax, 0) scale(1.1); opacity: .50; }
}

a { color: var(--accent-hi); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--red-hi); }

/* ========== Header / Nav ========== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(10, 12, 16, 0.88), rgba(10, 12, 16, 0.72));
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 28px;
}
header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red) 30%, var(--accent) 70%, transparent);
    opacity: .45;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 0;
    color: var(--text);
    white-space: nowrap;
}
.brand .brand-mark {
    display: inline-grid;
    place-items: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(248, 250, 252, .18);
    border-radius: 10px;
    background: linear-gradient(145deg, #171c27 0%, #090d15 100%);
    color: #f8fafc;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 24px -16px var(--red-glow), 0 12px 24px -16px var(--accent-glow);
}
.brand .brand-mark::before {
    content: '';
    position: absolute;
    inset: auto -12px -13px -12px;
    z-index: -1;
    height: 28px;
    background: linear-gradient(90deg, #ef4444 0%, #7c3aed 48%, #2563eb 100%);
    transform: rotate(-18deg);
}
.brand:hover { color: var(--text); }

header nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}
header nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
header nav a:hover {
    color: var(--text);
    background: var(--panel-2);
}
header nav a:focus-visible,
.btn:focus-visible,
button:focus-visible,
input[type=submit]:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-hi);
    outline-offset: 3px;
}
header nav a.active {
    color: var(--text);
    background: var(--panel-2);
}
header nav a.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: 2px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--red));
    border-radius: 2px;
}
header nav a svg {
    width: 16px; height: 16px;
    stroke-width: 2;
    opacity: .85;
}

.user-name {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
}

/* ========== Main ========== */
main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 44px 28px 100px;
    animation: page-in var(--dur-slow) var(--ease) both;
}
@keyframes page-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.15;
    letter-spacing: 0;
    margin: 0 0 20px;
    font-weight: 800;
}
h2 {
    font-size: 22px;
    letter-spacing: 0;
    margin: 28px 0 14px;
    font-weight: 700;
}
h3 {
    font-size: 16px;
    margin: 16px 0 10px;
    font-weight: 700;
    letter-spacing: 0;
}

.muted { color: var(--muted); font-size: 14px; }
.note { color: var(--accent-hi); margin: 4px 0 12px; }
.error { color: var(--red-hi); margin: 8px 0; }
.success { color: var(--ok); margin: 8px 0; }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-hi);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.kicker::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 12px var(--red-glow);
    animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.35); opacity: .5; }
}

/* ========== Panel / Cards ========== */
.panel {
    position: relative;
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 120%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px 26px;
    margin: 18px 0;
    box-shadow: var(--shadow-1);
    transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.panel:hover {
    border-color: var(--border-2);
}

.grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 10px 24px;
}
.grid dt { color: var(--muted); font-size: 14px; }
.grid dd { margin: 0; font-weight: 500; }

/* ========== Buttons ========== */
.btn, button, input[type=submit] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-lo) 140%);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 11px 20px;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0;
    cursor: pointer;
    position: relative;
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), filter var(--dur-fast) var(--ease);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 6px 18px -6px var(--accent-glow);
    text-decoration: none;
}
.btn:hover, button:hover, input[type=submit]:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 0 0 1px rgba(239, 68, 68, 0.35), 0 10px 28px -6px var(--red-glow);
    text-decoration: none;
}
.btn:active, button:active { transform: translateY(0); }
.btn:disabled, button:disabled, input[type=submit]:disabled {
    cursor: not-allowed;
    opacity: .55;
    filter: none;
    transform: none;
}
.btn.secondary {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn.secondary:hover {
    background: var(--panel-3);
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red-glow);
}
.btn.secondary:disabled:hover,
button.btn.secondary:disabled:hover {
    background: var(--panel-2);
    border-color: var(--border);
    box-shadow: none;
}
.btn.danger {
    background: linear-gradient(180deg, var(--red) 0%, var(--red-lo) 140%);
    color: #fff;
    box-shadow: 0 6px 18px -6px var(--red-glow);
}

/* ========== Inputs ========== */
input[type=text], input[type=number], input[type=email], input[type=password], textarea, select {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 10px;
    font: inherit;
    min-width: 240px;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--panel);
}

textarea {
    min-height: 96px;
    resize: vertical;
}

form p { margin: 12px 0; }
label { display: inline-block; color: var(--text-2); font-size: 14px; margin-bottom: 6px; }

.auth-details {
    padding: 0;
    overflow: hidden;
}
.auth-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.auth-summary::-webkit-details-marker { display: none; }
.auth-summary span {
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
}
.auth-summary small {
    color: var(--accent-hi);
    font-size: 14px;
    font-weight: 700;
}
.auth-summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    color: var(--text);
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.auth-details[open] .auth-summary::after {
    content: "−";
    border-color: var(--accent);
    transform: rotate(180deg);
}
.auth-details-body {
    padding: 0 28px 24px;
}
.auth-details .muted {
    padding: 0 28px 24px;
    margin-top: 0;
}
.auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    align-items: start;
}
.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.account-reset-link {
    margin: 14px 0 0;
    font-weight: 700;
}

/* ========== Tabs (week stepper + section tabs) ========== */
.tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 20px;
    flex-wrap: wrap;
    padding: 6px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
}
.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: transparent;
    color: var(--text-2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.tabs a:hover { background: var(--panel-2); color: var(--text); }
.tabs a.active {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-lo) 140%);
    color: #fff;
    box-shadow: 0 4px 12px -4px var(--accent-glow);
}

/* Week stepper — numbered */
.week-stepper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 24px;
}
.week-stepper a {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 54px;
    height: 54px;
    padding: 0 16px;
    background: var(--panel);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0;
    transition: all var(--dur) var(--ease);
}
.week-stepper a .w-num { font-size: 16px; }
.week-stepper a .w-lbl {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 999px;
    box-shadow: 0 2px 8px -2px var(--red-glow);
}
.week-stepper a:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-1px);
}
.week-stepper a.active {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-lo) 140%);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 10px 26px -8px var(--accent-glow), 0 0 0 1px rgba(239, 68, 68, 0.3);
}
.week-stepper a.done {
    border-color: var(--border-2);
    color: var(--muted);
}
.week-stepper a.done::after {
    content: '';
    position: absolute;
    bottom: 6px; left: 50%;
    width: 14px; height: 2px;
    transform: translateX(-50%);
    background: var(--ok);
    border-radius: 2px;
}

/* ========== Session card ========== */
.session {
    position: relative;
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 130%);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-lg);
    padding: 20px 24px;
    margin: 14px 0;
    box-shadow: var(--shadow-1);
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.session:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}
.session h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    font-size: 17px;
}

/* Intensity badge — colored by session type */
.session .intensity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid currentColor;
}
.session .intensity::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

/* Types */
.session.type-light  { border-left-color: var(--light); }
.session.type-medium { border-left-color: var(--medium); }
.session.type-heavy  { border-left-color: var(--heavy); box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.14), var(--shadow-1); }

.session.type-light  .intensity { color: var(--light); background: var(--light-bg); }
.session.type-medium .intensity { color: var(--medium); background: var(--medium-bg); }
.session.type-heavy  .intensity { color: var(--heavy); background: var(--heavy-bg); }

.exercises {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}
.exercises li {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14.5px;
    color: var(--text-2);
    transition: color var(--dur-fast) var(--ease), padding var(--dur-fast) var(--ease);
}
.exercises li:hover { color: var(--text); padding-left: 6px; }
.exercises li:last-child { border-bottom: none; }
.exercises li strong { color: var(--text); font-weight: 700; }

.week-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.week-head h2 { margin: 0; }

/* ========== Choice cards (goal, schedule) ========== */
.choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.btn.choice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    padding: 18px 20px;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0;
    box-shadow: none;
    line-height: 1.35;
    min-height: 70px;
    white-space: normal;
    transition: all var(--dur) var(--ease);
}
.btn.choice:hover {
    border-color: var(--accent);
    background: var(--panel-3);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px var(--accent-glow), 0 0 0 1px rgba(239, 68, 68, 0.22);
    filter: none;
}
.btn.choice .ico {
    display: inline-grid;
    place-items: center;
    width: 36px; height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(239, 68, 68, 0.2));
    border: 1px solid var(--border);
    font-size: 18px;
    transition: transform var(--dur) var(--ease);
}
.btn.choice:hover .ico { transform: scale(1.08) rotate(-4deg); }
.btn.choice.is-selected {
    border-color: rgba(96, 165, 250, 0.72);
    background: rgba(59, 130, 246, 0.12);
}

/* ========== Progress indicator (anketa steps) ========== */
.steps {
    display: flex;
    gap: 6px;
    margin: 4px 0 24px;
    align-items: center;
}
.steps .dot {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    transition: background var(--dur) var(--ease);
}
.steps .dot.done { background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
.steps .dot.active {
    background: linear-gradient(90deg, var(--accent), var(--red));
    box-shadow: 0 0 10px var(--accent-glow);
}
.steps-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.anketa-progress {
    margin: 18px 0 24px;
}
.anketa-stepper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(248, 113, 113, 0.78) rgba(255, 255, 255, 0.04);
    scroll-padding-inline: 2px;
}
.anketa-stepper::-webkit-scrollbar {
    height: 6px;
}
.anketa-stepper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}
.anketa-stepper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.86), rgba(96, 165, 250, 0.68));
    border-radius: 999px;
}
.anketa-stepper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, rgba(248, 113, 113, 1), rgba(96, 165, 250, 0.9));
}
.anketa-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.55);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}
.anketa-step > span {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text);
    font-size: 11px;
}
.anketa-step.done {
    border-color: rgba(96, 165, 250, 0.45);
    color: var(--text-2);
}
.anketa-step.active {
    border-color: rgba(96, 165, 250, 0.78);
    background: rgba(59, 130, 246, 0.16);
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.14);
}
.anketa-step.future {
    opacity: .55;
    cursor: not-allowed;
}
a.anketa-step:hover,
a.anketa-step:focus-visible {
    border-color: var(--accent);
    color: var(--text);
    background: var(--panel-3);
}
.anketa-panel {
    overflow: visible;
}
.anketa-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}
.anketa-summary {
    display: grid;
    gap: 10px;
    margin: 16px 0 18px;
}
.anketa-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: rgba(15, 23, 42, 0.52);
}
.anketa-summary-row span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.anketa-summary-row strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 15px;
}
.small-link {
    color: var(--accent-hi);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.small-link:hover,
.small-link:focus-visible {
    color: var(--text);
    text-decoration: underline;
}

/* ========== Hero (home) ========== */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.98fr) minmax(360px, 560px);
    gap: clamp(36px, 6vw, 84px);
    align-items: center;
    min-height: clamp(650px, calc(100vh - 96px), 820px);
    padding: clamp(54px, 8vh, 92px) 0 clamp(54px, 8vh, 96px);
    overflow: visible;
}
.hero-title {
    font-size: clamp(48px, 6.7vw, 92px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0 0 26px;
    max-width: 10.8ch;
}
.hero-title .accent {
    background: linear-gradient(90deg, var(--accent-hi), var(--red-hi));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    color: var(--text-2);
    font-size: clamp(18px, 1.55vw, 24px);
    max-width: 34ch;
    margin: 0 0 32px;
    line-height: 1.62;
}
.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.hero-cta .btn {
    padding: 14px 26px;
    font-size: 15px;
}
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 540px;
    margin-top: 28px;
}
.hero-metrics span {
    display: block;
    min-height: 68px;
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(15, 23, 42, .5);
}
.hero-metrics b {
    display: block;
    color: var(--text);
    font-size: 13px;
}

/* Right-side visual — silhouette + orbital rings */
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 560px;
    margin-left: auto;
    justify-self: end;
    border: 1px solid rgba(96, 165, 250, .18);
    border-radius: 8px;
    background: rgba(2, 6, 23, .34);
    box-shadow: 0 44px 120px -72px rgba(96, 165, 250, .75);
    overflow: hidden;
}
.hero-visual svg { width: 100%; height: 100%; display: block; }
.hero-visual .orbit {
    position: absolute;
    inset: 0;
    animation: orbit-rot 40s linear infinite;
}
.hero-visual .orbit-r {
    position: absolute;
    inset: 0;
    animation: orbit-rot 60s linear infinite reverse;
}
@keyframes orbit-rot {
    to { transform: rotate(360deg); }
}

/* ========== Cinematic home media ========== */
.cinema-wall {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(26px, 4vw, 56px);
    align-items: center;
    min-height: 82vh;
    padding: clamp(54px, 7vw, 96px) 0;
}

.cinema-wall::before,
.story-split::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    background:
        linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent 34%, rgba(239, 68, 68, 0.08)),
        linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.025), transparent);
    pointer-events: none;
    z-index: -1;
}

.cinema-wall::after,
.story-split::after {
    content: '';
    position: absolute;
    inset: 8% -10%;
    background-image: url('/media/streetlift-equations.svg');
    background-size: 980px auto;
    background-repeat: repeat;
    opacity: 0.13;
    mix-blend-mode: screen;
    pointer-events: none;
    transform: rotate(-2deg);
    animation: equation-drift 24s linear infinite alternate;
    z-index: 0;
}

@keyframes equation-drift {
    from { background-position: 0 0; opacity: 0.09; }
    to { background-position: 180px -90px; opacity: 0.16; }
}

.cinema-copy {
    position: sticky;
    top: 120px;
    align-self: start;
    padding-top: 10vh;
    z-index: 1;
}

.cinema-copy h2,
.story-copy h2 {
    font-size: clamp(34px, 4.3vw, 58px);
    line-height: 1.04;
    letter-spacing: 0;
    margin: 0 0 22px;
    text-wrap: balance;
}

.cinema-copy p,
.story-copy p {
    color: var(--text-2);
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.62;
    max-width: 44ch;
}

.media-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.03fr 0.97fr;
    grid-template-rows: repeat(2, minmax(240px, 1fr));
    gap: 16px;
}

.media-card {
    position: relative;
    min-height: 280px;
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: #070a0f;
    box-shadow: 0 28px 80px -50px rgba(59, 130, 246, 0.55);
    isolation: isolate;
}

.media-card-tall {
    grid-row: span 2;
    min-height: 640px;
}

.media-card img,
.story-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.06);
    transition: transform 1300ms cubic-bezier(.2,.7,.2,1), filter 900ms var(--ease);
    filter: saturate(0.92) contrast(1.08);
}

.media-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.78)),
        linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 42%);
    z-index: 1;
}

.media-card::before {
    content: '';
    position: absolute;
    inset: -20% -45%;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.16) 48%, transparent 62%);
    transform: translateX(-42%);
    opacity: 0;
    z-index: 2;
}

.media-card:hover img,
.story-media:hover img {
    transform: scale(1.015);
    filter: saturate(1.08) contrast(1.12);
}

.media-card:hover::before {
    animation: media-sweep 1100ms var(--ease) both;
}

@keyframes media-sweep {
    0% { opacity: 0; transform: translateX(-44%); }
    28% { opacity: 1; }
    100% { opacity: 0; transform: translateX(44%); }
}

.media-card figcaption {
    position: absolute;
    left: clamp(18px, 3vw, 34px);
    right: clamp(18px, 3vw, 34px);
    bottom: clamp(18px, 3vw, 34px);
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 6px 14px;
    color: var(--text);
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
    letter-spacing: 0;
}

.media-card figcaption span {
    grid-column: 1 / -1;
    color: var(--accent-hi);
    font-size: 12px;
    letter-spacing: 0.18em;
    font-weight: 800;
}

.media-video figcaption::after {
    content: '';
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(233, 236, 243, 0.6);
    background:
        linear-gradient(90deg, transparent 43%, rgba(233, 236, 243, 0.9) 43% 57%, transparent 57%),
        rgba(20, 24, 34, 0.56);
    box-shadow: 0 0 28px rgba(96, 165, 250, 0.26);
    animation: play-breathe 2.8s var(--ease) infinite;
}

@keyframes play-breathe {
    0%, 100% { transform: scale(1); opacity: 0.78; }
    50% { transform: scale(1.08); opacity: 1; }
}

.story-split {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr);
    gap: clamp(26px, 5vw, 70px);
    align-items: center;
    min-height: 72vh;
    padding: clamp(54px, 8vw, 110px) 0;
}

.story-media {
    position: relative;
    z-index: 1;
    min-height: min(640px, 68vh);
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.18);
    background: #070a0f;
    box-shadow: 0 34px 90px -58px rgba(239, 68, 68, 0.58);
}

.story-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,12,16,.72), transparent 50%, rgba(10,12,16,.16));
}

.story-copy {
    position: relative;
    z-index: 2;
}

.metric-rail {
    display: grid;
    gap: 8px;
    margin-top: 26px;
    max-width: 420px;
}

.metric-rail span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
}

.metric-rail b {
    color: var(--text);
    font-size: 18px;
    letter-spacing: 0;
}

.smart-lab {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, .86fr) minmax(0, 1.14fr);
    gap: clamp(26px, 5vw, 70px);
    align-items: center;
    padding: clamp(58px, 8vw, 118px) 0;
    isolation: isolate;
}

.smart-lab::before {
    content: '';
    position: absolute;
    inset: 4% -12%;
    background:
        radial-gradient(circle at 14% 30%, rgba(96, 165, 250, .18), transparent 30%),
        radial-gradient(circle at 82% 62%, rgba(239, 68, 68, .2), transparent 34%),
        url('/media/streetlift-equations.svg');
    background-size: auto, auto, 850px auto;
    opacity: .42;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: -1;
    animation: equation-drift 28s linear infinite alternate;
}

.smart-lab-copy h2 {
    font-size: clamp(34px, 4.4vw, 60px);
    line-height: 1.04;
    margin: 0 0 18px;
    max-width: 11ch;
}

.smart-lab-copy p {
    color: var(--text-2);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.62;
    max-width: 48ch;
}

.formula-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.formula-cloud span {
    padding: 10px 13px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 999px;
    background: rgba(15, 23, 42, .58);
    color: rgba(248, 250, 252, .88);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    animation: chip-float 5s var(--ease) infinite alternate;
}

.formula-cloud span:nth-child(2n) { animation-delay: .6s; color: #bfdbfe; }
.formula-cloud span:nth-child(3n) { animation-delay: 1.1s; color: #fecaca; }

.smart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

@keyframes chip-float {
    to { transform: translateY(-7px); filter: brightness(1.16); }
}

.smart-lab-board {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, .2);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, .94), rgba(9, 12, 18, .86)),
        radial-gradient(circle at 18% 20%, rgba(59, 130, 246, .18), transparent 34%),
        radial-gradient(circle at 90% 66%, rgba(239, 68, 68, .16), transparent 38%);
    box-shadow: 0 34px 100px -64px rgba(59, 130, 246, .8);
    padding: clamp(18px, 3vw, 30px);
}

.smart-lab-board::before {
    content: '∑ 1ПМ  ×  КПШ  →  адаптация  💪  rest ↓';
    position: absolute;
    left: -4%;
    top: 14%;
    right: -4%;
    color: rgba(255, 255, 255, .08);
    font-size: clamp(32px, 4vw, 58px);
    font-weight: 900;
    white-space: nowrap;
    transform: rotate(-8deg);
    pointer-events: none;
}

.ux-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.ux-flow::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 24px;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #f8fafc, #ef4444);
    opacity: .5;
}

.flow-node {
    position: relative;
    z-index: 1;
    min-height: 106px;
    padding: 14px 12px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    background: rgba(15, 23, 42, .72);
    display: grid;
    align-content: space-between;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.flow-node b {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #eaf2ff;
    background: linear-gradient(135deg, rgba(59, 130, 246, .85), rgba(239, 68, 68, .66));
    box-shadow: 0 0 30px rgba(96,165,250,.22);
}

.flow-node span {
    color: var(--text);
    font-weight: 800;
}

.flow-node.active {
    border-color: rgba(96, 165, 250, .62);
    transform: translateY(-4px);
}

.lab-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr);
    gap: 12px;
}

.lab-chart-card,
.lab-slogan {
    position: relative;
    min-height: 190px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    background: rgba(2, 6, 23, .58);
}

.lab-chart-card strong {
    display: block;
    margin-top: 4px;
    font-size: 28px;
}

.chart-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
    font-weight: 900;
}

.lab-chart-card svg {
    width: 100%;
    height: 128px;
    margin-top: 10px;
}

.lab-chart-card svg rect {
    fill: #3b82f6;
    opacity: .8;
    animation: chart-breathe 3.8s var(--ease) infinite alternate;
}

.lab-chart-card svg rect:nth-of-type(2n) { animation-delay: .5s; }

.chart-grid {
    stroke: rgba(148, 163, 184, .18);
    stroke-width: 1;
    stroke-dasharray: 5 8;
}

.chart-line {
    fill: none;
    stroke: #ff6b6b;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 380;
    stroke-dashoffset: 380;
    animation: chart-draw 4s var(--ease) infinite alternate;
}

@keyframes chart-breathe {
    to { opacity: 1; filter: drop-shadow(0 0 10px rgba(96, 165, 250, .28)); }
}

@keyframes chart-draw {
    to { stroke-dashoffset: 0; }
}

.gauge {
    --angle: calc(var(--p, 0) * 3.6deg);
    width: min(180px, 100%);
    aspect-ratio: 1;
    margin: 18px auto 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        conic-gradient(from -90deg, #ef4444 0deg, #60a5fa var(--angle), rgba(148,163,184,.12) var(--angle) 360deg);
    box-shadow: 0 0 36px rgba(239, 68, 68, .18);
}

.gauge span {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: #0b1020;
}

.gauge b {
    position: relative;
    z-index: 1;
    font-size: 34px;
}

.lab-slogan {
    grid-column: 1 / -1;
    min-height: 112px;
    display: grid;
    align-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(59,130,246,.2), rgba(239,68,68,.2));
}

.lab-slogan span {
    color: #93c5fd;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .2em;
}

.lab-slogan b {
    color: #f8fafc;
    font-size: clamp(20px, 3vw, 34px);
}

.reveal .cinema-copy,
.reveal .story-copy,
.reveal .smart-lab-copy,
.reveal .smart-lab-board,
.reveal .media-card,
.reveal .story-media {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.reveal.is-visible .cinema-copy,
.reveal.is-visible .story-copy,
.reveal.is-visible .smart-lab-copy,
.reveal.is-visible .smart-lab-board,
.reveal.is-visible .media-card,
.reveal.is-visible .story-media {
    opacity: 1;
    transform: none;
}

.reveal.is-visible .media-card:nth-child(2) { transition-delay: 120ms; }
.reveal.is-visible .media-card:nth-child(3) { transition-delay: 240ms; }

/* Hero background streaks */
.hero::before {
    content: '';
    position: absolute;
    top: -20%; left: -10%;
    width: 50%; height: 140%;
    background: radial-gradient(ellipse at center, var(--red-glow), transparent 60%);
    filter: blur(50px);
    opacity: .5;
    pointer-events: none;
    z-index: -1;
    animation: hero-glow 9s var(--ease) infinite alternate;
}
@keyframes hero-glow {
    from { opacity: .35; transform: scale(1); }
    to   { opacity: .55; transform: scale(1.08); }
}

/* Feature grid on home */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 28px;
}
.feature {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    transition: all var(--dur) var(--ease);
    color: var(--text);
}
.feature:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 18px 36px -20px var(--accent-glow);
    text-decoration: none;
}
.feature .feature-ico {
    display: inline-grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(239, 68, 68, 0.25));
    border: 1px solid var(--border);
    font-size: 18px;
    margin-bottom: 12px;
    transition: transform var(--dur) var(--ease);
}
.feature:hover .feature-ico { transform: scale(1.08) rotate(-5deg); }
.feature h3 { margin: 0 0 6px; color: var(--text); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.feature .mini-pill {
    display: inline-flex;
    width: fit-content;
    margin-top: 14px;
    padding: 6px 10px;
    border: 1px solid rgba(96, 165, 250, .22);
    border-radius: 999px;
    color: var(--accent-hi);
    background: rgba(59, 130, 246, .08);
    font-size: 12px;
    font-weight: 800;
}

/* ========== Tips themed backgrounds ========== */
.advice-nutrition {
    --topic-a: 34, 197, 94;
    --topic-b: 250, 204, 21;
    --topic-c: 56, 189, 248;
    --topic-symbol: '🥗';
    --topic-note: 'C/P/F · +80–150g · rice · fruit';
}
.advice-supplements {
    --topic-a: 244, 114, 182;
    --topic-b: 168, 85, 247;
    --topic-c: 96, 165, 250;
    --topic-symbol: '💊';
    --topic-note: 'creatine · H₂O · recovery';
}
.advice-training {
    --topic-a: 248, 113, 113;
    --topic-b: 59, 130, 246;
    --topic-c: 245, 158, 11;
    --topic-symbol: '🏋️';
    --topic-note: 'clusters × sets × reps · RPE ≤ 8';
}
.advice-psychology {
    --topic-a: 192, 132, 252;
    --topic-b: 34, 211, 238;
    --topic-c: 248, 113, 113;
    --topic-symbol: '🧠';
    --topic-note: 'focus · action → result · calm';
}

.tips-topic-card {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 78% 22%, rgba(var(--topic-a), .22), transparent 34%),
        radial-gradient(circle at 104% 88%, rgba(var(--topic-b), .16), transparent 38%),
        linear-gradient(180deg, rgba(20, 24, 34, .96), rgba(12, 15, 23, .96));
}
.tips-topic-card::before {
    content: var(--topic-symbol);
    position: absolute;
    right: 18px;
    bottom: 8px;
    z-index: -1;
    font-size: 88px;
    line-height: 1;
    opacity: .12;
    filter: saturate(1.4);
    transform: rotate(-10deg);
}
.tips-topic-card::after {
    content: var(--topic-note);
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: -1;
    color: rgba(226, 232, 240, .16);
    font: 900 13px/1.3 'JetBrains Mono', Consolas, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tips-topic-card:hover {
    border-color: rgba(var(--topic-a), .72);
    box-shadow: 0 18px 36px -20px rgba(var(--topic-a), .55);
}
.tips-topic-card h3,
.tips-topic-card .btn {
    position: relative;
    z-index: 1;
}
.tips-topic-card h3 {
    max-width: calc(100% - 210px);
    line-height: 1.22;
}

.advice-article {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--topic-a), .36);
    border-radius: var(--r-lg);
    background:
        radial-gradient(circle at 86% 18%, rgba(var(--topic-a), .22), transparent 30%),
        radial-gradient(circle at 8% 88%, rgba(var(--topic-b), .14), transparent 34%),
        linear-gradient(135deg, rgba(18, 22, 34, .96), rgba(12, 14, 22, .98));
    box-shadow: 0 26px 80px -56px rgba(var(--topic-a), .72);
}
.advice-article::before {
    content: var(--topic-symbol);
    position: absolute;
    right: clamp(18px, 7vw, 92px);
    top: 42px;
    font-size: clamp(90px, 14vw, 190px);
    line-height: 1;
    opacity: .105;
    filter: saturate(1.35) drop-shadow(0 0 28px rgba(var(--topic-a), .34));
    transform: rotate(-8deg);
}
.advice-article::after {
    content: var(--topic-note);
    position: absolute;
    right: 34px;
    bottom: 28px;
    max-width: 360px;
    color: rgba(226, 232, 240, .12);
    font: 900 clamp(18px, 2.2vw, 34px)/1.2 'JetBrains Mono', Consolas, monospace;
    letter-spacing: .06em;
    text-align: right;
    text-transform: uppercase;
}
.advice-article .advice-copy {
    position: relative;
    z-index: 1;
    margin: 0;
    border: 0;
    border-left: 3px solid rgb(var(--topic-a));
    background:
        linear-gradient(90deg, rgba(10, 12, 18, .78), rgba(10, 12, 18, .55) 70%, rgba(10, 12, 18, .18)),
        repeating-linear-gradient(90deg, transparent 0 78px, rgba(var(--topic-c), .035) 79px 80px);
    padding: 28px clamp(22px, 19vw, 300px) 28px 28px;
    min-height: 520px;
}

@media (max-width: 720px) {
    .tips-topic-card {
        min-height: 138px;
    }
    .tips-topic-card::before {
        font-size: 72px;
        opacity: .09;
    }
    .tips-topic-card::after {
        display: none;
    }
    .advice-article::before {
        right: 16px;
        top: 22px;
        font-size: 92px;
        opacity: .07;
    }
    .advice-article::after {
        display: none;
    }
    .advice-article .advice-copy {
        padding: 22px 18px;
        min-height: 0;
    }
}

/* Product-grade tips knowledge base. */
.tips-shell {
    display: grid;
    gap: 24px;
}

.tips-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.tips-hero .muted {
    max-width: 68ch;
}

.tips-start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.tips-start a,
.tips-tabs a,
.tips-breadcrumb a,
.tips-article-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
}

.tips-start a {
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: rgba(15, 23, 42, .68);
}

.tips-start a:hover,
.tips-start a:focus-visible,
.tips-tabs a:hover,
.tips-tabs a:focus-visible,
.tips-article-nav a:hover,
.tips-article-nav a:focus-visible,
.tips-related-card:hover,
.tips-related-card:focus-visible,
.tips-topic-link:hover,
.tips-topic-link:focus-visible {
    border-color: rgba(96, 165, 250, .72);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .28);
}

.tips-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tips-topic-link {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.tips-topic-card > * {
    position: relative;
    z-index: 1;
}

.tips-card-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(var(--topic-a), .16);
    border: 1px solid rgba(var(--topic-a), .24);
    font-size: 20px;
}

.tips-card-title {
    max-width: none;
    font-weight: 900;
    font-size: 24px;
    line-height: 1.18;
    text-wrap: balance;
}

.tips-card-excerpt {
    max-width: none;
    color: rgba(203, 213, 225, .82);
    line-height: 1.6;
    font-size: 15px;
}

.tips-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
    color: rgba(226, 232, 240, .76);
    font-size: 13px;
}

.tips-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tips-tags span,
.tips-article-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(var(--topic-a), .22);
    border-radius: 999px;
    background: rgba(var(--topic-a), .1);
    color: rgba(241, 245, 249, .86);
    font-size: 12px;
}

.tips-card-cta {
    width: max-content;
    margin-top: 2px;
    pointer-events: none;
}

.tips-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.tips-breadcrumb span[aria-current="page"] {
    color: var(--text);
}

.tips-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: thin;
}

.tips-tabs a {
    flex: 0 0 auto;
    padding: 0 13px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 8px;
    background: rgba(15, 23, 42, .52);
    color: var(--muted);
    font-size: 14px;
}

.tips-tabs a.active {
    border-color: rgba(96, 165, 250, .7);
    color: var(--text);
    background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(236, 72, 153, .16));
}

.tips-article {
    display: grid;
    gap: 24px;
    padding: clamp(22px, 4vw, 42px);
    border-radius: 8px;
}

.tips-article > * {
    position: relative;
    z-index: 1;
}

.tips-article-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    max-width: 860px;
}

.tips-article-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(var(--topic-a), .18);
    border: 1px solid rgba(var(--topic-a), .28);
    font-size: 30px;
}

.tips-article-note {
    margin: 0 0 6px;
    color: rgba(147, 197, 253, .9);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}

.tips-article-hero h2 {
    margin: 0 0 10px;
    font-size: 46px;
    line-height: 1.03;
}

.tips-article-hero p:not(.tips-article-note) {
    max-width: 64ch;
    color: rgba(226, 232, 240, .86);
    font-size: 18px;
    line-height: 1.6;
}

.tips-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tips-takeaways,
.tips-practical,
.tips-section,
.tips-related,
.tips-product-cta {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 8px;
    background: rgba(15, 23, 42, .58);
}

.tips-takeaways,
.tips-practical {
    padding: 22px;
}

.tips-takeaways h2,
.tips-practical h2,
.tips-section h2,
.tips-related h2,
.tips-product-cta h2 {
    margin-top: 0;
}

.tips-takeaways ul,
.tips-practical ul {
    margin: 0;
    padding-left: 20px;
    color: rgba(226, 232, 240, .9);
    line-height: 1.7;
}

.tips-disclaimer {
    padding: 16px 18px;
    border: 1px solid rgba(250, 204, 21, .28);
    border-radius: 8px;
    background: rgba(250, 204, 21, .08);
    color: rgba(254, 249, 195, .95);
    line-height: 1.55;
}

.tips-article-body {
    display: grid;
    gap: 16px;
}

.tips-section {
    padding: 24px;
}

.tips-section p {
    max-width: 78ch;
    color: rgba(226, 232, 240, .88);
    line-height: 1.75;
}

.tips-section p:last-child {
    margin-bottom: 0;
}

.tips-callout {
    margin-top: 16px;
    padding: 16px;
    border-left: 3px solid rgba(var(--topic-a), .76);
    border-radius: 0 8px 8px 0;
    background: rgba(var(--topic-a), .1);
}

.tips-callout strong {
    display: block;
    margin-bottom: 6px;
}

.tips-callout p {
    margin: 0;
}

.tips-related {
    padding: 22px;
}

.tips-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tips-related-card {
    display: grid;
    gap: 8px;
    min-height: 148px;
    padding: 18px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

.tips-related-card small {
    color: var(--muted);
    line-height: 1.45;
}

.tips-product-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.tips-product-cta p {
    margin-bottom: 0;
    color: var(--muted);
}

.tips-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.tips-article-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.tips-article-nav a {
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 8px;
    background: rgba(15, 23, 42, .52);
}

.tips-article-nav a:last-child {
    justify-self: end;
}

@media (max-width: 1040px) {
    .tips-topic-grid,
    .tips-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .tips-hero,
    .tips-product-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .tips-start {
        justify-content: flex-start;
    }

    .tips-topic-grid,
    .tips-related-grid {
        grid-template-columns: 1fr;
    }

    .tips-topic-link {
        min-height: 0;
        padding: 22px;
    }

    .tips-card-title,
    .tips-card-excerpt {
        max-width: none;
    }

    .tips-card-title {
        font-size: 22px;
    }

    .tips-article-hero {
        grid-template-columns: 1fr;
    }

    .tips-article-hero h2 {
        font-size: 34px;
    }

    .tips-section,
    .tips-takeaways,
    .tips-practical,
    .tips-related,
    .tips-product-cta {
        padding: 18px;
    }

    .tips-cta-actions {
        justify-content: stretch;
    }

    .tips-cta-actions .btn,
    .tips-product-cta > .btn {
        width: 100%;
        justify-content: center;
    }

    .tips-article-nav {
        grid-template-columns: 1fr;
    }

    .tips-article-nav a,
    .tips-article-nav a:last-child {
        justify-self: stretch;
        justify-content: center;
    }
}

/* Realistic tips visuals: replaces emoji background art with material objects. */
.advice-nutrition {
    --topic-note: 'C/P/F  +80-150g  rice  fruit';
    --topic-visual:
        radial-gradient(ellipse at 52% 57%, rgba(248, 250, 252, .92) 0 29%, rgba(148, 163, 184, .32) 30% 34%, transparent 35%),
        radial-gradient(circle at 42% 50%, rgba(250, 204, 21, .94) 0 8%, transparent 9%),
        radial-gradient(circle at 58% 49%, rgba(34, 197, 94, .92) 0 8.5%, transparent 9.5%),
        radial-gradient(circle at 51% 64%, rgba(239, 68, 68, .78) 0 6.5%, transparent 7.5%),
        linear-gradient(122deg, transparent 0 16%, rgba(226, 232, 240, .34) 17% 18%, transparent 19%),
        linear-gradient(40deg, transparent 0 70%, rgba(226, 232, 240, .32) 71% 72%, transparent 73%),
        radial-gradient(circle at 55% 58%, rgba(34, 197, 94, .2), transparent 54%),
        linear-gradient(135deg, rgba(15, 23, 42, .15), rgba(34, 197, 94, .08));
    --topic-card-visual:
        radial-gradient(ellipse at 58% 58%, rgba(248, 250, 252, .84) 0 32%, rgba(148, 163, 184, .26) 33% 37%, transparent 38%),
        radial-gradient(circle at 45% 51%, rgba(250, 204, 21, .9) 0 9%, transparent 10%),
        radial-gradient(circle at 61% 54%, rgba(34, 197, 94, .9) 0 10%, transparent 11%),
        linear-gradient(120deg, transparent 0 25%, rgba(226, 232, 240, .34) 26% 28%, transparent 29%);
}
.advice-supplements {
    --topic-note: 'creatine  H2O  recovery';
    --topic-visual:
        linear-gradient(90deg, transparent 0 54%, rgba(248, 250, 252, .16) 55% 74%, transparent 75%),
        linear-gradient(180deg, transparent 0 12%, rgba(248, 250, 252, .78) 13% 18%, rgba(148, 163, 184, .32) 19% 72%, transparent 73%),
        radial-gradient(ellipse at 64% 56%, rgba(248, 250, 252, .13) 0 20%, transparent 21%),
        linear-gradient(136deg, transparent 0 28%, rgba(244, 114, 182, .92) 29% 39%, rgba(248, 250, 252, .82) 40% 50%, transparent 51%),
        linear-gradient(32deg, transparent 0 43%, rgba(96, 165, 250, .92) 44% 53%, rgba(248, 250, 252, .76) 54% 63%, transparent 64%),
        radial-gradient(circle at 34% 47%, rgba(168, 85, 247, .42), transparent 20%),
        radial-gradient(circle at 76% 62%, rgba(244, 114, 182, .26), transparent 30%);
    --topic-card-visual:
        linear-gradient(136deg, transparent 0 24%, rgba(244, 114, 182, .9) 25% 38%, rgba(248, 250, 252, .82) 39% 52%, transparent 53%),
        linear-gradient(32deg, transparent 0 48%, rgba(96, 165, 250, .88) 49% 62%, rgba(248, 250, 252, .72) 63% 74%, transparent 75%),
        radial-gradient(ellipse at 66% 52%, rgba(248, 250, 252, .18) 0 25%, transparent 26%);
}
.advice-training {
    --topic-note: 'clusters x sets x reps  RPE <= 8';
    --topic-visual:
        radial-gradient(circle at 20% 52%, rgba(203, 213, 225, .82) 0 8%, rgba(15, 23, 42, .9) 9% 14%, transparent 15%),
        radial-gradient(circle at 27% 52%, rgba(148, 163, 184, .72) 0 6%, rgba(15, 23, 42, .86) 7% 11%, transparent 12%),
        radial-gradient(circle at 80% 52%, rgba(203, 213, 225, .82) 0 8%, rgba(15, 23, 42, .9) 9% 14%, transparent 15%),
        radial-gradient(circle at 73% 52%, rgba(148, 163, 184, .72) 0 6%, rgba(15, 23, 42, .86) 7% 11%, transparent 12%),
        linear-gradient(90deg, transparent 0 14%, rgba(226, 232, 240, .82) 15% 85%, transparent 86%),
        linear-gradient(180deg, transparent 0 46%, rgba(248, 113, 113, .68) 47% 50%, transparent 51%),
        repeating-linear-gradient(90deg, transparent 0 42px, rgba(96, 165, 250, .12) 43px 44px),
        radial-gradient(circle at 51% 52%, rgba(248, 113, 113, .28), transparent 44%);
    --topic-card-visual:
        radial-gradient(circle at 20% 54%, rgba(203, 213, 225, .8) 0 11%, rgba(15, 23, 42, .88) 12% 18%, transparent 19%),
        radial-gradient(circle at 80% 54%, rgba(203, 213, 225, .8) 0 11%, rgba(15, 23, 42, .88) 12% 18%, transparent 19%),
        linear-gradient(90deg, transparent 0 12%, rgba(226, 232, 240, .82) 13% 87%, transparent 88%),
        linear-gradient(180deg, transparent 0 46%, rgba(248, 113, 113, .64) 47% 51%, transparent 52%);
}
.advice-psychology {
    --topic-note: 'focus  action -> result  calm';
    --topic-visual:
        radial-gradient(circle at 50% 50%, rgba(192, 132, 252, .36) 0 13%, transparent 14%),
        radial-gradient(circle at 33% 36%, rgba(34, 211, 238, .46) 0 4%, transparent 5%),
        radial-gradient(circle at 70% 38%, rgba(248, 113, 113, .38) 0 3.5%, transparent 4.5%),
        radial-gradient(circle at 40% 72%, rgba(96, 165, 250, .42) 0 4%, transparent 5%),
        radial-gradient(circle at 74% 70%, rgba(192, 132, 252, .4) 0 4%, transparent 5%),
        linear-gradient(28deg, transparent 0 38%, rgba(226, 232, 240, .24) 39% 40%, transparent 41%),
        linear-gradient(150deg, transparent 0 42%, rgba(226, 232, 240, .22) 43% 44%, transparent 45%),
        linear-gradient(82deg, transparent 0 50%, rgba(34, 211, 238, .18) 51% 52%, transparent 53%),
        radial-gradient(ellipse at 52% 52%, rgba(15, 23, 42, .05) 0 36%, rgba(192, 132, 252, .18) 37% 39%, transparent 40%);
    --topic-card-visual:
        radial-gradient(circle at 48% 52%, rgba(192, 132, 252, .46) 0 14%, transparent 15%),
        radial-gradient(circle at 30% 38%, rgba(34, 211, 238, .5) 0 5%, transparent 6%),
        radial-gradient(circle at 70% 68%, rgba(248, 113, 113, .42) 0 5%, transparent 6%),
        linear-gradient(35deg, transparent 0 38%, rgba(226, 232, 240, .28) 39% 41%, transparent 42%),
        linear-gradient(145deg, transparent 0 49%, rgba(226, 232, 240, .22) 50% 52%, transparent 53%);
}

.tips-topic-card::before {
    content: '';
    right: 14px;
    bottom: 12px;
    width: 148px;
    height: 108px;
    border: 1px solid rgba(var(--topic-a), .26);
    border-radius: 26px;
    background: var(--topic-card-visual);
    box-shadow:
        inset 0 0 38px rgba(255, 255, 255, .06),
        0 20px 48px -24px rgba(var(--topic-a), .72);
    opacity: .74;
    filter: saturate(1.18) contrast(1.05);
    transform: rotate(-7deg);
}
.tips-topic-card::after {
    color: rgba(226, 232, 240, .2);
}
.advice-article::before {
    content: '';
    right: clamp(16px, 4vw, 58px);
    top: 44px;
    width: clamp(260px, 31vw, 460px);
    height: clamp(260px, 32vw, 480px);
    border: 1px solid rgba(var(--topic-a), .32);
    border-radius: 32px;
    background: var(--topic-visual);
    box-shadow:
        inset 0 0 72px rgba(255, 255, 255, .06),
        inset 0 -80px 100px rgba(0, 0, 0, .28),
        0 34px 90px -36px rgba(var(--topic-a), .8);
    opacity: .94;
    filter: saturate(1.26) contrast(1.12) brightness(1.08);
    transform: rotate(-4deg);
}
.advice-article::after {
    color: rgba(226, 232, 240, .2);
}
.advice-article .advice-copy {
    background:
        linear-gradient(90deg, rgba(10, 12, 18, .9), rgba(10, 12, 18, .7) 58%, rgba(10, 12, 18, .16)),
        repeating-linear-gradient(90deg, transparent 0 78px, rgba(var(--topic-c), .035) 79px 80px);
}

@media (max-width: 720px) {
    .tips-topic-card::before {
        width: 116px;
        height: 84px;
        opacity: .48;
    }
    .advice-article::before {
        right: -18px;
        top: 24px;
        width: 190px;
        height: 190px;
        opacity: .5;
    }
}

/* Photo-based tips backgrounds. */
.advice-nutrition {
    --topic-image: image-set(url('/assets/tips/nutrition.webp?v=1') type('image/webp'), url('/assets/tips/nutrition.jpg?v=2') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/nutrition-card.webp?v=1') type('image/webp'), url('/assets/tips/nutrition-card.jpg?v=1') type('image/jpeg'));
    --topic-supplement-image: image-set(url('/assets/tips/supplements-card.webp?v=1') type('image/webp'), url('/assets/tips/supplements-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 44% 74%;
    --topic-card-position: 54% 56%;
}
.advice-supplements {
    --topic-image: image-set(url('/assets/tips/supplements.webp?v=1') type('image/webp'), url('/assets/tips/supplements.jpg?v=2') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/supplements-card.webp?v=1') type('image/webp'), url('/assets/tips/supplements-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 58% 50%;
    --topic-card-position: 58% 52%;
}
.advice-training {
    --topic-image: image-set(url('/assets/tips/training.webp?v=1') type('image/webp'), url('/assets/tips/training.jpg') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/training-card.webp?v=1') type('image/webp'), url('/assets/tips/training-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 62% 50%;
    --topic-card-position: 56% 52%;
}
.advice-psychology {
    --topic-image: image-set(url('/assets/tips/psychology.webp?v=1') type('image/webp'), url('/assets/tips/psychology.jpg?v=4') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/psychology-card.webp?v=1') type('image/webp'), url('/assets/tips/psychology-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 48% 52%;
    --topic-card-position: 48% 52%;
}
.advice-sleep {
    --topic-a: 139, 92, 246;
    --topic-b: 96, 165, 250;
    --topic-c: 34, 211, 238;
    --topic-symbol: '😴';
    --topic-note: 'sleep 7-9h  routine  recovery';
    --topic-image: image-set(url('/assets/tips/sleep-recovery.webp?v=1') type('image/webp'), url('/assets/tips/sleep-recovery.jpg?v=1') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/sleep-recovery-card.webp?v=1') type('image/webp'), url('/assets/tips/sleep-recovery-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 54% 52%;
    --topic-card-position: 58% 58%;
}
.advice-injury {
    --topic-a: 248, 113, 113;
    --topic-b: 251, 146, 60;
    --topic-c: 96, 165, 250;
    --topic-symbol: '🩹';
    --topic-note: 'elbows  shoulders  wrists';
    --topic-image: image-set(url('/assets/tips/injury-prevention.webp?v=1') type('image/webp'), url('/assets/tips/injury-prevention.jpg?v=5') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/injury-prevention-card.webp?v=1') type('image/webp'), url('/assets/tips/injury-prevention-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 52% 52%;
    --topic-card-position: 54% 52%;
}
.advice-plateau {
    --topic-a: 236, 72, 153;
    --topic-b: 168, 85, 247;
    --topic-c: 250, 204, 21;
    --topic-symbol: '📉';
    --topic-note: 'deload  wave  progress';
    --topic-image: image-set(url('/assets/tips/plateau.webp?v=1') type('image/webp'), url('/assets/tips/plateau.jpg?v=1') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/plateau-card.webp?v=1') type('image/webp'), url('/assets/tips/plateau-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 50% 52%;
    --topic-card-position: 52% 50%;
}
.advice-cardio {
    --topic-a: 34, 211, 238;
    --topic-b: 248, 113, 113;
    --topic-c: 34, 197, 94;
    --topic-symbol: '🫀';
    --topic-note: 'zone 2  steps  heart';
    --topic-image: image-set(url('/assets/tips/cardio-streetlifting.webp?v=1') type('image/webp'), url('/assets/tips/cardio-streetlifting.jpg?v=2') type('image/jpeg'));
    --topic-card-image: image-set(url('/assets/tips/cardio-streetlifting-card.webp?v=1') type('image/webp'), url('/assets/tips/cardio-streetlifting-card.jpg?v=1') type('image/jpeg'));
    --topic-position: 52% 58%;
    --topic-card-position: 54% 58%;
}

.tips-topic-card {
    background:
        radial-gradient(circle at 12% 12%, rgba(var(--topic-a), .18), transparent 34%),
        linear-gradient(180deg, rgba(20, 24, 34, .97), rgba(12, 15, 23, .97));
}
.tips-topic-card::before {
    position: relative;
    right: auto;
    bottom: auto;
    order: 20;
    z-index: 0;
    width: 100%;
    height: 132px;
    margin-top: 4px;
    border: 1px solid rgba(var(--topic-a), .42);
    border-radius: 8px;
    background-image:
        linear-gradient(180deg, rgba(4, 7, 13, .08), rgba(4, 7, 13, .5)),
        var(--topic-card-image, var(--topic-image));
    background-size: cover;
    background-position: var(--topic-card-position);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .08),
        inset 0 -60px 80px rgba(0, 0, 0, .42),
        0 24px 58px -26px rgba(var(--topic-a), .82);
    opacity: .88;
    filter: saturate(1.08) contrast(1.02);
    transform: none;
}
.tips-topic-card::after,
.advice-article::after {
    display: none;
}
.advice-nutrition.advice-article::after {
    content: '';
    display: block;
    position: absolute;
    right: clamp(18px, 5vw, 70px);
    bottom: clamp(18px, 4vw, 58px);
    width: clamp(170px, 20vw, 300px);
    height: clamp(112px, 13vw, 190px);
    border: 1px solid rgba(248, 250, 252, .16);
    border-radius: 22px;
    background-image:
        linear-gradient(180deg, rgba(5, 8, 14, .18), rgba(5, 8, 14, .52)),
        var(--topic-supplement-image);
    background-size: cover;
    background-position: 50% 54%;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .08),
        0 24px 72px -34px rgba(var(--topic-a), .66);
    opacity: .62;
    filter: saturate(1.05) contrast(1.03);
    transform: rotate(3deg);
}
.advice-article {
    background:
        radial-gradient(circle at 92% 10%, rgba(var(--topic-a), .24), transparent 28%),
        linear-gradient(135deg, rgba(18, 22, 34, .97), rgba(12, 14, 22, .98));
}
.advice-article::before {
    inset: 0;
    width: auto;
    height: auto;
    border: 0;
    border-radius: inherit;
    background-image:
        linear-gradient(90deg, rgba(6, 8, 14, .78) 0%, rgba(6, 8, 14, .62) 34%, rgba(6, 8, 14, .34) 66%, rgba(6, 8, 14, .14) 100%),
        linear-gradient(180deg, rgba(var(--topic-a), .12), rgba(var(--topic-b), .06)),
        var(--topic-image);
    background-size: cover;
    background-position: var(--topic-position);
    box-shadow:
        inset 0 0 0 1px rgba(var(--topic-a), .22),
        inset 0 -140px 160px rgba(0, 0, 0, .58),
        inset 0 120px 160px rgba(0, 0, 0, .28);
    opacity: .96;
    filter: saturate(1.14) contrast(1.04) brightness(1);
    transform: none;
}
.advice-article .advice-copy {
    background:
        linear-gradient(90deg, rgba(10, 12, 18, .76), rgba(10, 12, 18, .48) 58%, rgba(10, 12, 18, .08)),
        repeating-linear-gradient(90deg, transparent 0 78px, rgba(var(--topic-c), .025) 79px 80px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .72);
}

@media (max-width: 720px) {
    .tips-topic-card::before {
        width: 132px;
        height: 96px;
        opacity: .78;
    }
    .tips-topic-card h3 {
        max-width: calc(100% - 150px);
    }
    .advice-article::before {
        inset: 0;
        width: auto;
        height: auto;
        opacity: .92;
    }
    .advice-nutrition.advice-article::after {
        right: 16px;
        bottom: 18px;
        width: 132px;
        height: 88px;
        opacity: .38;
    }
    .advice-article .advice-copy {
        background:
            linear-gradient(90deg, rgba(10, 12, 18, .8), rgba(10, 12, 18, .62) 64%, rgba(10, 12, 18, .2)),
            repeating-linear-gradient(90deg, transparent 0 78px, rgba(var(--topic-c), .02) 79px 80px);
    }
}

@media (max-width: 1040px) {
    .tips-topic-link {
        padding: 22px;
    }
}

@media (max-width: 720px) {
    .tips-topic-link {
        min-height: 0;
    }

    .tips-card-title,
    .tips-card-excerpt {
        max-width: none;
    }

    .tips-topic-card::before {
        width: 100%;
        height: 128px;
        opacity: .82;
    }
}

/* Theory reuses the tips card structure for taxonomy, but it stays text-only. */
.theory-topic-card {
    position: relative;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    border-color: rgba(var(--topic-a), .2);
    background:
        radial-gradient(circle at 18% 14%, rgba(var(--topic-a), .2), transparent 36%),
        radial-gradient(circle at 92% 82%, rgba(var(--topic-b), .12), transparent 38%),
        linear-gradient(180deg, rgba(20, 24, 34, .97), rgba(12, 15, 23, .97));
}

.theory-topic-card:hover,
.theory-topic-card:focus-visible {
    border-color: rgba(var(--topic-a), .72);
    box-shadow: 0 18px 36px -20px rgba(var(--topic-a), .55);
}

.theory-topic-card::before,
.theory-topic-card::after,
.theory-shell .tips-topic-card::before,
.theory-shell .advice-article::before,
.theory-shell .advice-nutrition.advice-article::after {
    content: none;
    display: none;
    background-image: none;
}

.theory-shell .tips-topic-link {
    min-height: 0;
}

.theory-article {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--topic-a), .36);
    border-radius: var(--r-lg);
    background:
        radial-gradient(circle at 88% 12%, rgba(var(--topic-a), .22), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(var(--topic-b), .12), transparent 34%),
        linear-gradient(135deg, rgba(18, 22, 34, .97), rgba(12, 14, 22, .98));
    box-shadow: 0 26px 80px -56px rgba(var(--topic-a), .72);
}

.theory-article::before,
.theory-article::after {
    content: none;
    display: none;
    background-image: none;
}

/* Section heading with red dot */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 36px 0 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.section-title::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 12px var(--red-glow);
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

/* ========== Progress bar ========== */
.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--panel-2);
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 6px;
}
.progress-bar > i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--red));
    border-radius: 999px;
    box-shadow: 0 0 12px var(--accent-glow);
    width: var(--p, 0%);
    animation: bar-grow var(--dur-slow) var(--ease) both;
}
@keyframes bar-grow { from { width: 0; } }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text-2);
}
.badge.accent { color: var(--accent-hi); border-color: var(--accent-lo); background: rgba(59, 130, 246, 0.1); }
.badge.red { color: var(--red-hi); border-color: var(--red-lo); background: rgba(239, 68, 68, 0.1); }
.badge.ok { color: var(--ok); border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1); }

/* ========== Standards profile block ========== */
.standards-panel {
    overflow: hidden;
}

.standards-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.standards-head h2 {
    margin-bottom: 8px;
}

.standards-head p {
    max-width: 760px;
    margin: 0;
}

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

.standard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: rgba(15, 19, 29, .58);
}

.standard-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.standard-row strong {
    color: var(--text);
    text-align: right;
}

.standard-row-strong {
    background: linear-gradient(180deg, rgba(26, 31, 45, .78), rgba(15, 19, 29, .68));
    border-color: var(--border-2);
}

.standard-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    background: rgba(148, 163, 184, .08);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.standard-elite,
.standard-msmk,
.standard-ms {
    color: #c7d2fe;
    border-color: rgba(129, 140, 248, .38);
    background: rgba(99, 102, 241, .12);
}

.standard-kms,
.standard-rank_1 {
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, .34);
    background: rgba(59, 130, 246, .10);
}

.standard-rank_2,
.standard-rank_3,
.standard-junior_1,
.standard-junior_2,
.standard-junior_3 {
    color: #d1d5db;
    border-color: rgba(148, 163, 184, .24);
    background: rgba(148, 163, 184, .08);
}

.standard-level {
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, .28);
    background: rgba(168, 85, 247, .08);
}

.standard-category {
    color: var(--text);
    border-color: rgba(96, 165, 250, .24);
    background: rgba(96, 165, 250, .08);
}

.standard-muted,
.standard-unknown,
.standard-none {
    color: var(--muted);
    border-color: var(--border);
    background: rgba(82, 88, 105, .12);
}

.session-log {
    display: grid;
    gap: 10px;
}

.session-log-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.session-log-row:last-child {
    border-bottom: none;
}

.session-log-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.track-card {
    align-items: flex-start;
    padding: 16px 0;
}

.track-main {
    display: grid;
    gap: 8px;
    min-width: 240px;
    flex: 1;
}

.track-actions {
    display: grid;
    gap: 10px;
    min-width: min(100%, 420px);
}

.track-details {
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: rgba(15, 19, 29, 0.55);
    padding: 12px;
}

.track-details > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--accent-hi);
}

.rating-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.rating-row label,
.checkline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
}

.checkline {
    display: flex;
    margin: 10px 0;
}

.smart-exercise {
    border-top: 1px solid var(--border);
    padding: 14px 0;
}

.smart-exercise:first-of-type {
    border-top: none;
}

.smart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.smart-grid label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.smart-grid input {
    margin-top: 5px;
    width: 100%;
}

.smart-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.smart-buttons .btn,
.smart-buttons button {
    padding: 8px 11px;
    font-size: 12px;
}

.track-bars {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr);
    align-items: center;
    gap: 6px 10px;
    max-width: 460px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.track-bars i {
    display: block;
    height: 7px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, var(--ok), var(--accent-hi)) 0 0 / min(var(--p), 100%) 100% no-repeat,
        var(--panel-2);
    border: 1px solid var(--border);
}

.track-analysis {
    display: grid;
    gap: 5px;
    color: var(--text-2);
    font-size: 13px;
}

.track-analysis p {
    margin: 0;
}

/* ========== Program library ========== */
.program-list {
    display: grid;
    gap: 14px;
}

.program-card {
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
}

.program-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.program-card h3 {
    margin: 10px 0 6px;
    font-size: 22px;
}

.program-card-head > strong {
    font-size: 28px;
    font-variant-numeric: tabular-nums;
}

.program-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: var(--text-2);
}

.program-metrics span {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 8px 10px;
}

.program-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.program-actions form {
    margin: 0;
}

.comparison-panel {
    border-left: 3px solid var(--accent);
}

/* ========== Export / print ========== */
.export-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.print-sheet {
    background: linear-gradient(180deg, var(--panel) 0%, rgba(20, 24, 34, 0.82) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
}

.print-sheet.bw {
    background: #fff;
    color: #111827;
}

.print-sheet.bw .muted,
.print-sheet.bw .kicker {
    color: #4b5563;
}

.print-sheet.bw .export-week,
.print-sheet.bw .export-session,
.print-sheet.bw .export-table th,
.print-sheet.bw .export-table td {
    border-color: #d1d5db;
}

.export-head,
.export-week-head,
.export-session-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.export-head {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.export-head h1 {
    margin-bottom: 8px;
}

.export-qr {
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.export-qr img {
    width: 116px;
    height: 116px;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.export-week {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.export-week:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.export-week-head h2 {
    margin: 0 0 6px;
}

.export-session {
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 16px;
    margin-top: 12px;
    break-inside: avoid;
}

.export-exercises {
    margin: 12px 0 0;
    padding-left: 20px;
    color: var(--text-2);
    line-height: 1.7;
}

.export-table {
    margin-top: 12px;
}

.export-table th,
.export-table td {
    padding: 9px 10px;
}

.check-cell {
    width: 34px;
    font-size: 20px;
}

/* ========== Blocks & misc ========== */
pre.block {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--r);
    padding: 18px 22px;
    white-space: pre-wrap;
    font: 14px/1.65 'JetBrains Mono', 'Consolas', 'Menlo', monospace;
    color: var(--text-2);
}

.intro {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(239, 68, 68, 0.04));
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    padding: 16px 22px;
    border-radius: var(--r);
    margin: 0 0 24px;
    white-space: pre-wrap;
    color: var(--text-2);
    line-height: 1.55;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
tbody tr { transition: background var(--dur-fast) var(--ease); }
tbody tr:hover { background: var(--panel-2); }
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.error-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid var(--red);
    border-radius: var(--r);
    padding: 14px 18px;
    margin: 14px 0;
    color: var(--text);
    font-size: 14.5px;
}
.notice-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.42);
    border-radius: var(--r);
    padding: 14px 18px;
    margin: 14px 0;
    color: var(--text);
    font-size: 14.5px;
}

/* ========== Billing ========== */
.billing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 22px;
    align-items: stretch;
    overflow: hidden;
}
.billing-hero::after {
    content: '';
    position: absolute;
    inset: auto -80px -100px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, .28), transparent 68%);
    pointer-events: none;
}
.billing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .76fr);
    gap: 18px;
}
.billing-status-card {
    position: relative;
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 170px;
    padding: 20px;
    border-radius: var(--r);
    border: 1px solid rgba(139, 92, 246, .38);
    background:
        linear-gradient(145deg, rgba(139, 92, 246, .18), rgba(59, 130, 246, .08)),
        var(--panel-2);
    box-shadow: 0 18px 50px -34px rgba(139, 92, 246, .8);
}
.billing-status-card span {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(139, 92, 246, .16);
    color: #ddd6fe;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
}
.billing-status-card strong {
    font-size: 26px;
    line-height: 1.1;
}
.billing-status-card small {
    color: var(--muted);
    overflow-wrap: anywhere;
}
.billing-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.billing-badges span,
.feature-list li {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .035);
}
.billing-badges span {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--text-2);
    font-size: 13px;
}
.feature-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.feature-list li {
    border-radius: var(--r-sm);
    padding: 12px 14px;
    color: var(--text-2);
}
.feature-list strong {
    color: var(--text);
}

/* ========== Technique guide ========== */
.technique-jump {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 22px;
}
.technique-jump-card {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    color: var(--text);
    box-shadow: var(--shadow-1);
    overflow-wrap: anywhere;
    text-decoration: none;
}
.technique-jump-card:hover,
.technique-jump-card:focus-visible {
    border-color: var(--border-2);
    color: var(--text);
}
.technique-jump-card span {
    width: max-content;
    border: 1px solid rgba(96, 165, 250, .28);
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--accent-hi);
    font-size: 12px;
    font-weight: 800;
}
.technique-jump-card strong {
    font-size: 18px;
    line-height: 1.2;
}
.technique-jump-card small {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.45;
}
.technique-section {
    scroll-margin-top: 104px;
}
.technique-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}
.technique-section-head h2 {
    margin: 10px 0 8px;
}
.technique-section-head p {
    max-width: 68ch;
    margin: 0;
    color: var(--text-2);
}
.technique-video-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 94px;
    padding: 16px;
    border: 1px dashed rgba(96, 165, 250, .34);
    border-radius: var(--r);
    background: rgba(59, 130, 246, .06);
}
.technique-video-placeholder strong,
.technique-video-placeholder span {
    display: block;
}
.technique-video-placeholder strong {
    color: var(--text);
}
.technique-video-placeholder span {
    color: var(--muted);
    font-size: 13px;
}
.technique-video-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(248, 250, 252, .14);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(239, 68, 68, .14));
}
.technique-video-icon::before {
    content: '';
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid var(--text);
}

/* ========== Program workspace ========== */
.program-command,
.program-next-panel,
.program-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.program-command {
    align-items: stretch;
}
.program-progress-card {
    min-width: 210px;
    display: grid;
    gap: 8px;
    align-content: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: rgba(255, 255, 255, .035);
}
.program-progress-card span,
.training-metrics dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.program-progress-card strong {
    font-size: 24px;
    line-height: 1;
}
.program-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.program-actions form {
    margin: 0;
}
.program-week-stepper a {
    min-width: 118px;
    height: auto;
    min-height: 58px;
    align-content: center;
    gap: 2px;
    text-align: center;
}
.program-week-stepper .w-title {
    display: block;
    max-width: 100%;
    color: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    opacity: .82;
}
.training-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.training-metrics div {
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .03);
}
.training-metrics dd {
    margin: 3px 0 0;
    color: var(--text);
    font-weight: 800;
}
.track-light { border-left: 3px solid #38bdf8; }
.track-medium { border-left: 3px solid #a78bfa; }
.track-heavy { border-left: 3px solid #fb7185; }
.track-deload { border-left: 3px solid #67e8f9; }
.track-test { border-left: 3px solid #fbbf24; }
.mobile-workout-cta,
.mobile-bottom-nav {
    display: none;
}

/* ========== Legal pages / footer ========== */
.site-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 36px;
    color: var(--muted);
}
.site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.site-footer strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
}
.site-footer span {
    display: block;
    font-size: 13px;
}
.site-footer nav,
.legal-inline-links,
.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.site-footer a,
.legal-inline-links a,
.legal-card a {
    color: var(--accent-hi);
    text-decoration: none;
    border-bottom: 1px dashed rgba(96, 165, 250, 0.4);
}
.site-footer a:hover,
.legal-inline-links a:hover,
.legal-card a:hover {
    border-bottom-color: var(--accent-hi);
}
.legal-page {
    display: grid;
    gap: 16px;
}
.legal-card h2 {
    margin-top: 0;
}
.legal-card p {
    color: var(--text-2);
    line-height: 1.65;
}
.legal-links {
    margin-top: 4px;
}

.support-form {
    display: grid;
    gap: 12px;
}
.support-form select,
.support-form textarea {
    width: 100%;
}
.admin-support-message {
    max-width: 520px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--text-2);
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.diagnostics-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.diagnostics-list div {
    display: grid;
    grid-template-columns: minmax(140px, 0.8fr) 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.diagnostics-list div:last-child {
    border-bottom: 0;
}

.diagnostics-list dt {
    color: var(--muted);
}

.diagnostics-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

/* ========== 1RM calc result ========== */
#result {
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(239, 68, 68, 0.06));
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--r);
    color: var(--text);
    font-size: 16px;
    animation: page-in var(--dur) var(--ease) both;
}

/* ========== Responsive ========== */
@media (max-width: 860px) {
    /* Шапка в две полосы: бренд сверху, навигация одной строкой снизу. */
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 14px 8px;
    }
    .brand { align-self: flex-start; }
    header nav {
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 2px;
        margin: 0 -14px;
        padding-left: 14px;
        padding-right: 14px;
        scroll-snap-type: x proximity;
    }
    header nav::-webkit-scrollbar { display: none; }
    header nav a {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 13px;
        scroll-snap-align: start;
    }
    header nav a svg { display: none; }
    .user-name { margin-left: 0; }
    main { padding: 28px 18px 136px; }
    .site-footer { padding: 0 18px 32px; }
    .site-footer-inner { flex-direction: column; }
    .billing-hero,
    .billing-grid {
        grid-template-columns: 1fr;
    }
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 20px 0 46px;
    }
    .hero-visual { max-width: 320px; margin: 0 auto; }
    .cinema-wall,
    .story-split,
    .smart-lab {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 56px 0;
    }
    .cinema-copy {
        position: relative;
        top: auto;
        padding-top: 0;
    }
    .cinema-copy p,
    .story-copy p {
        max-width: 58ch;
    }
    .media-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
    .media-card,
    .media-card-tall,
    .story-media {
        min-height: 360px;
    }
    .smart-lab-copy h2 { max-width: 14ch; }
    .ux-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ux-flow::before { display: none; }
    .lab-charts { grid-template-columns: 1fr; }
    .media-card-tall { grid-row: auto; }
    .grid { grid-template-columns: 1fr; gap: 4px 0; }
    .grid dt { margin-top: 10px; }
    .standards-head,
    .standards-grid,
    .standard-row {
        display: grid;
    }
    .standards-grid {
        grid-template-columns: 1fr;
    }
    .standard-row strong {
        text-align: left;
    }
    .standard-badge {
        width: fit-content;
        white-space: normal;
    }
    .technique-jump {
        grid-template-columns: 1fr;
    }
    .technique-jump-card {
        min-height: 112px;
    }
    .technique-section-head {
        grid-template-columns: 1fr;
    }
    .program-command,
    .program-next-panel,
    .program-card-head {
        display: grid;
    }
    .program-actions,
    .track-actions {
        width: 100%;
    }
    .program-actions .btn,
    .program-actions button,
    .track-actions .btn,
    .track-actions button,
    .track-actions input {
        width: 100%;
    }
    .program-week-stepper {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(112px, 1fr);
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .program-week-stepper::-webkit-scrollbar { display: none; }
    .program-week-stepper a {
        min-width: 112px;
    }
    .mobile-workout-cta {
        display: inline-flex;
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 72px;
        z-index: 65;
        box-shadow: 0 12px 30px -12px var(--accent-glow);
    }
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 64;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        background: rgba(10, 12, 16, .94);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(16px);
    }
    .mobile-bottom-nav a {
        min-height: 44px;
        display: grid;
        place-items: center;
        color: var(--text-2);
        border-radius: 8px;
        font-size: 12px;
        font-weight: 800;
    }
    .mobile-bottom-nav a.active {
        color: var(--text);
        background: var(--panel-2);
    }
}
@media (max-width: 520px) {
    .hero-title { font-size: 32px; }
    .cinema-copy h2,
    .story-copy h2 {
        font-size: 34px;
        letter-spacing: 0;
    }
    .media-card,
    .media-card-tall,
    .story-media {
        min-height: 280px;
    }
    .media-card figcaption {
        align-items: center;
        font-size: 22px;
    }
    .media-video figcaption::after {
        width: 36px;
        height: 36px;
    }
    .metric-rail span {
        align-items: flex-start;
        flex-direction: column;
    }
    .smart-lab-copy h2 { font-size: 34px; }
    .formula-cloud span { width: 100%; border-radius: 8px; }
    .smart-lab-board { padding: 14px; }
    .ux-flow { grid-template-columns: 1fr; }
    .flow-node { min-height: 82px; }
    .panel { padding: 18px 18px; }
    .week-stepper a { min-width: 44px; height: 44px; padding: 0 10px; }
}

/* ========== One-page flow sections ========== */
.flow-section {
    position: relative;
    padding: 90px 0 40px;
    scroll-margin-top: 90px;
}
.flow-section + .flow-section { padding-top: 70px; }

/* Soft gradient divider line between sections (blue → red fade) */
.flow-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(70%, 620px);
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.0) 10%,
        rgba(59, 130, 246, 0.55) 40%,
        rgba(239, 68, 68, 0.55) 60%,
        rgba(239, 68, 68, 0.0) 90%,
        transparent 100%);
    opacity: 0.5;
}
/* Hero doesn't need a top divider */
.hero.reveal::before, .hero::before { /* preserve any existing .hero::before (the halo) */ }

.flow-head { margin-bottom: 28px; }
.flow-head h2 {
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0;
    margin: 10px 0 10px;
}
.flow-head .kicker { margin-bottom: 0; }

/* Sub-panel — used for article-style blocks inside a section */
.sub-panel {
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px 26px;
    margin-top: 16px;
    position: relative;
    transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sub-panel:hover { border-color: var(--border-2); }
.sub-panel h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}
.sub-panel p {
    margin: 0 0 12px;
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.7;
}
.sub-panel p:last-child { margin-bottom: 0; }
.sub-panel p strong { color: var(--text); font-weight: 700; }
.sub-panel ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-2);
}
.sub-panel ul li { margin: 6px 0; }
.sub-panel a { color: var(--accent-hi); text-decoration: none; border-bottom: 1px dashed rgba(96, 165, 250, 0.4); }
.sub-panel a:hover { border-bottom-color: var(--accent-hi); }
.sub-panel code { background: var(--panel-3); padding: 1px 6px; border-radius: 6px; font-size: 13px; color: var(--accent-hi); }

/* ========== Scroll reveal ========== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 900ms var(--ease), transform 900ms var(--ease);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
/* Staggered sub-panel reveal within a visible section */
.reveal.is-visible .sub-panel {
    animation: sub-fade-in 700ms var(--ease) both;
}
.reveal.is-visible .sub-panel:nth-child(2) { animation-delay: 80ms; }
.reveal.is-visible .sub-panel:nth-child(3) { animation-delay: 160ms; }
.reveal.is-visible .sub-panel:nth-child(4) { animation-delay: 240ms; }
.reveal.is-visible .sub-panel:nth-child(5) { animation-delay: 320ms; }
.reveal.is-visible .sub-panel:nth-child(6) { animation-delay: 400ms; }

@keyframes sub-fade-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* ========== Athlete — interactive pull-up ========== */
.hero-visual .athlete {
    cursor: grab;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    touch-action: none;
}
.hero-visual .athlete:focus-visible { filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.45)); }
.hero-visual .athlete[data-state="pulling"],
.hero-visual .athlete[data-state="holding"] { cursor: grabbing; }

.athlete .swing,
.athlete .forearm-l,
.athlete .forearm-r,
.athlete .bicep-l,
.athlete .bicep-r,
.athlete .body,
.athlete .leg-l,
.athlete .leg-r {
    transform-box: view-box;
}

.athlete .forearm-l { transform-origin: 159px 82px; transition: transform 2.5s linear; will-change: transform; }
.athlete .forearm-r { transform-origin: 241px 82px; transition: transform 2.5s linear; will-change: transform; }
.athlete .bicep-l   { transform-origin: 167.5px 172px; transition: transform 2.5s linear; will-change: transform; }
.athlete .bicep-r   { transform-origin: 232.5px 172px; transition: transform 2.5s linear; will-change: transform; }
.athlete .body {
    transform-origin: 200px 82px;
    transition: transform 2.5s linear;
    will-change: transform;
}
.athlete .leg-l {
    transform-origin: 196px 292px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.athlete .leg-r {
    transform-origin: 204px 292px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.athlete .leg-gap {
    transition: opacity 0.3s;
}
.athlete .swing {
    transform-origin: 200px 80px;
    /* Постоянное лёгкое раскачивание. JS перехватит и уведёт в центр на hover/pull. */
    animation: athlete-dangle 3.2s ease-in-out infinite;
    /* transition вступит в силу, когда JS поставит inline-transform — для плавного увода в 0°. */
    transition: transform 0.45s ease-out;
}

/* Idle — straight arms, rest, legs spread with slight outward angle */
.athlete[data-state="idle"] .forearm-l,
.athlete[data-state="idle"] .forearm-r,
.athlete[data-state="idle"] .bicep-l,
.athlete[data-state="idle"] .bicep-r,
.athlete[data-state="idle"] .body { transform: none; }
.athlete[data-state="idle"] .leg-l { transform: rotate(3deg); }
.athlete[data-state="idle"] .leg-r { transform: rotate(-3deg); }

/* Hover — straight arms, legs together (parallel), body hanging */
.athlete[data-state="hover"] .forearm-l,
.athlete[data-state="hover"] .forearm-r,
.athlete[data-state="hover"] .bicep-l,
.athlete[data-state="hover"] .bicep-r,
.athlete[data-state="hover"] .body { transform: none; }
.athlete[data-state="hover"] .leg-l { transform: translateX(8px) scaleX(1.3); }
.athlete[data-state="hover"] .leg-r { transform: translateX(-8px) scaleX(1.3); }
.athlete[data-state="hover"] .leg-gap { opacity: 0.7; }

/* Pulling — forearms swing outward, biceps rotate to meet, body lifts up to clear bar */
.athlete[data-state="pulling"] .forearm-l { transform: rotate(52deg); }
.athlete[data-state="pulling"] .forearm-r { transform: rotate(-52deg); }
.athlete[data-state="pulling"] .bicep-l   { transform: rotate(-100deg); }
.athlete[data-state="pulling"] .bicep-r   { transform: rotate(100deg); }
.athlete[data-state="pulling"] .body { transform: translateY(-75px); }
.athlete[data-state="pulling"] .leg-l { transform: translateX(8px) scaleX(1.3); transition-duration: 0.3s; }
.athlete[data-state="pulling"] .leg-r { transform: translateX(-8px) scaleX(1.3); transition-duration: 0.3s; }
.athlete[data-state="pulling"] .leg-gap { opacity: 0.7; }

/* Holding — locked at top */
.athlete[data-state="holding"] .forearm-l { transform: rotate(52deg); transition: none; }
.athlete[data-state="holding"] .forearm-r { transform: rotate(-52deg); transition: none; }
.athlete[data-state="holding"] .bicep-l   { transform: rotate(-100deg); transition: none; }
.athlete[data-state="holding"] .bicep-r   { transform: rotate(100deg); transition: none; }
.athlete[data-state="holding"] .body { transform: translateY(-75px); transition: none; }
.athlete[data-state="holding"] .leg-l { transform: translateX(8px) scaleX(1.3); }
.athlete[data-state="holding"] .leg-r { transform: translateX(-8px) scaleX(1.3); }
.athlete[data-state="holding"] .leg-gap { opacity: 0.7; }

/* Plopping — quick straighten, body squish */
.athlete[data-state="plopping"] .forearm-l,
.athlete[data-state="plopping"] .forearm-r,
.athlete[data-state="plopping"] .bicep-l,
.athlete[data-state="plopping"] .bicep-r {
    transform: none;
    transition: transform 0.3s cubic-bezier(0.5, 0, 0.75, 0);
}
.athlete[data-state="plopping"] .body {
    transform: translateY(14px) scaleY(0.9);
    transition: transform 0.3s cubic-bezier(0.5, 0, 0.75, 0);
}
.athlete[data-state="plopping"] .leg-l {
    transform: translateX(-3px) rotate(-4deg);
    transition-duration: 0.3s;
}
.athlete[data-state="plopping"] .leg-r {
    transform: translateX(3px) rotate(4deg);
    transition-duration: 0.3s;
}

/* Settling — bouncy return to straight */
.athlete[data-state="settling"] .forearm-l,
.athlete[data-state="settling"] .forearm-r,
.athlete[data-state="settling"] .bicep-l,
.athlete[data-state="settling"] .bicep-r,
.athlete[data-state="settling"] .body {
    transform: none;
    transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.athlete[data-state="settling"] .leg-l { transform: rotate(3deg); transition-duration: 0.42s; }
.athlete[data-state="settling"] .leg-r { transform: rotate(-3deg); transition-duration: 0.42s; }

/* Dangling — continuous sway, straight arms, legs spread with slight outward angle */
.athlete[data-state="dangling"] .forearm-l,
.athlete[data-state="dangling"] .forearm-r,
.athlete[data-state="dangling"] .bicep-l,
.athlete[data-state="dangling"] .bicep-r { transform: none; transition: transform 0.5s; }
.athlete[data-state="dangling"] .body { transform: none; transition: transform 0.5s; }
.athlete[data-state="dangling"] .leg-l { transform: rotate(3deg); }
.athlete[data-state="dangling"] .leg-r { transform: rotate(-3deg); }
@keyframes athlete-dangle {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-2.5deg); }
    75%      { transform: rotate(2.5deg); }
}

/* ========== Perceived performance ========== */
@supports (content-visibility: auto) {
    .tips-topic-card,
    .tips-related-card,
    .theory-topic-card,
    .advice-article,
    .track-card,
    .program-card {
        content-visibility: auto;
        contain-intrinsic-size: 1px 420px;
    }

    .track-details:not([open]) > form {
        content-visibility: hidden;
        contain-intrinsic-size: 1px 520px;
    }
}

@media (max-width: 720px) {
    body::before,
    body::after {
        animation: none;
        filter: blur(28px);
        opacity: .2;
    }

    .tips-topic-card,
    .tips-related-card,
    .theory-topic-card,
    .advice-article {
        contain: layout paint;
    }
}

@media (max-width: 720px) {
    .track-card,
    .program-card-head,
    .export-head,
    .export-week-head,
    .export-session-title {
        display: grid;
    }

    .track-actions {
        min-width: 100%;
    }

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

    .track-bars {
        grid-template-columns: 1fr;
    }

    .print-sheet {
        padding: 18px;
    }
}

@media print {
    @page { margin: 12mm; }
    body {
        background: #fff !important;
        color: #111827 !important;
    }
    header,
    .topbar,
    .no-print,
    .export-toolbar {
        display: none !important;
    }
    .wrap {
        max-width: none;
        padding: 0;
    }
    .print-sheet {
        border: none;
        border-radius: 0;
        padding: 0;
        background: #fff !important;
        color: #111827 !important;
    }
    .print-sheet .muted,
    .print-sheet .kicker {
        color: #4b5563 !important;
    }
    .export-week,
    .export-session,
    .export-head,
    .export-table th,
    .export-table td {
        border-color: #d1d5db !important;
    }
    .badge {
        color: #111827 !important;
        border-color: #9ca3af !important;
        background: transparent !important;
    }
    a {
        color: inherit;
        text-decoration: none;
    }
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .athlete .forearm-l, .athlete .forearm-r, .athlete .bicep-l, .athlete .bicep-r, .athlete .body, .athlete .leg-l, .athlete .leg-r { transition: none !important; }
    .athlete .swing { animation: none !important; }
}
