:root {
    --brand: #206BA4;
    --brand-hover: #1a5688;
    --brand-soft: #BBD9EE;
    --brand-mist: #EBF4FA;
    --bg: #F6FAFD;
    --surface: #fff;
    --ink: #2a4a66;
    --muted: #5a7389;
    --ok: #2f9d62;
    --err: #b05a52;
    --max: 1180px;
    --radius: 18px;
    --radius-sm: 12px;
    --font: "Onest", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body.aff-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; }
code { font-size: 0.92em; background: var(--brand-mist); padding: 2px 6px; border-radius: 6px; }

.aff-wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.aff-muted { color: var(--muted); font-size: 14px; }
.aff-accent { color: var(--brand); }

.aff-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand); font-size: 18px; }
.aff-brand--center { justify-content: center; margin-bottom: 24px; }

.aff-header { position: sticky; top: 0; z-index: 40; background: rgba(246,250,253,.9); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(32,107,164,.12); }
.aff-header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.aff-header-nav, .aff-cabinet-nav { display: flex; gap: 18px; font-size: 14px; font-weight: 600; color: var(--muted); margin-right: auto; margin-left: 24px; }
.aff-header-nav a:hover, .aff-cabinet-nav a:hover, .aff-cabinet-nav a.is-active { color: var(--brand); }
.aff-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.aff-balance-pill { padding: 6px 12px; border-radius: 999px; background: var(--brand-mist); color: var(--brand); font-size: 13px; font-weight: 700; }

.aff-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; }
.aff-btn:hover { background: var(--brand-hover); }
.aff-btn--secondary { background: #fff; color: var(--brand); border: 1px solid rgba(32,107,164,.22); }
.aff-btn--secondary:hover { background: var(--brand-mist); }
.aff-btn--ghost { background: transparent; color: var(--brand); border: 1px solid rgba(32,107,164,.2); }
.aff-btn--sm { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.aff-btn--full { width: 100%; }

.aff-hero { padding: 56px 0 72px; }
.aff-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.aff-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08; margin: 12px 0 16px; }
.aff-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.aff-lead { color: var(--muted); font-size: 17px; max-width: 36em; }
.aff-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.aff-hero-card { background: #fff; border: 1px solid rgba(32,107,164,.14); border-radius: 20px; padding: 24px; box-shadow: 0 16px 40px rgba(32,107,164,.08); }
.aff-hero-card strong { display: block; margin-bottom: 14px; color: var(--brand); }
.aff-calc-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(32,107,164,.1); font-size: 14px; }
.aff-calc-row b { color: var(--brand); white-space: nowrap; }
.aff-calc-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.aff-section { padding: 56px 0; }
.aff-section--alt { background: rgba(235,244,250,.55); }
.aff-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 24px; }
.aff-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.aff-feature-card { background: #fff; border: 1px solid rgba(32,107,164,.12); border-radius: var(--radius); padding: 22px; }
.aff-feature-num { display: block; color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.aff-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.aff-steps-list { margin: 16px 0 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 12px; }
.aff-panel { background: #fff; border: 1px solid rgba(32,107,164,.12); border-radius: var(--radius); padding: 24px; }
.aff-panel--cta { background: linear-gradient(135deg, var(--brand), #1a5688); color: #fff; }
.aff-panel--cta p { opacity: .9; }
.aff-panel--info { margin-top: 16px; background: var(--brand-mist); border-color: transparent; }

.aff-footer { padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.aff-footer-inner { display: flex; justify-content: space-between; gap: 12px; }

.aff-auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.aff-auth-card { width: min(520px, 100%); }
.aff-auth-card h1 { font-size: 1.6rem; margin-bottom: 16px; }
.aff-auth-switch { margin-top: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.aff-auth-switch a { color: var(--brand); font-weight: 600; }

.aff-cabinet { padding: 28px 0 56px; }
.aff-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.aff-page-head h1 { font-size: 1.8rem; }

.aff-kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.aff-kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
.aff-kpi { background: #fff; border: 1px solid rgba(32,107,164,.12); border-radius: var(--radius-sm); padding: 16px; }
.aff-kpi--accent { background: var(--brand-mist); border-color: rgba(32,107,164,.2); }
.aff-kpi-num { display: block; font-size: 1.35rem; font-weight: 700; color: var(--brand); }
.aff-kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); }

.aff-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.aff-panel h2 { font-size: 1.1rem; margin-bottom: 14px; color: var(--brand); }

.aff-chart { display: flex; align-items: flex-end; gap: 8px; min-height: 120px; }
.aff-chart-bar { flex: 1; height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.aff-chart-bar::before { content: ""; display: block; width: 100%; max-width: 28px; height: var(--h); background: linear-gradient(180deg, var(--brand-soft), var(--brand)); border-radius: 8px 8px 4px 4px; }
.aff-chart-bar span { position: absolute; font-size: 10px; color: var(--muted); transform: translateY(14px); }

.aff-list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(32,107,164,.08); font-size: 14px; }
.aff-list-row strong { display: block; }
.aff-pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--brand-mist); color: var(--brand); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.aff-pill--ok { background: rgba(47,157,98,.12); color: var(--ok); }

.aff-form { display: grid; gap: 12px; }
.aff-form--wide { margin-top: 0; }
.aff-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.aff-field { display: grid; gap: 6px; }
.aff-field span { font-size: 13px; font-weight: 600; color: var(--muted); }
.aff-field input, .aff-field select { width: 100%; min-height: 44px; border: 1px solid rgba(32,107,164,.18); border-radius: var(--radius-sm); padding: 10px 12px; background: #fff; }
.aff-bullets { margin: 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 8px; }

.aff-flash { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--brand-mist); color: var(--brand); font-weight: 600; margin-bottom: 16px; }
.aff-flash--error { background: #fdf3f1; color: var(--err); }

.aff-table { display: grid; gap: 8px; }
.aff-table-head, .aff-table-row { display: grid; grid-template-columns: 1.2fr 1.4fr .6fr .6fr .6fr 2fr; gap: 8px; align-items: center; font-size: 13px; }
.aff-table-head { font-weight: 700; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid rgba(32,107,164,.12); }
.aff-table-row { padding: 12px 0; border-bottom: 1px solid rgba(32,107,164,.08); }
.aff-copy-input { width: 100%; font-size: 11px; padding: 8px; border: 1px solid rgba(32,107,164,.14); border-radius: 8px; margin-bottom: 6px; }

@media (max-width: 1024px) {
    .aff-hero-grid, .aff-split, .aff-grid-2, .aff-feature-grid { grid-template-columns: 1fr; }
    .aff-kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .aff-header-nav { display: none; }
    .aff-table-head { display: none; }
    .aff-table-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 640px) {
    .aff-kpi-grid, .aff-kpi-grid--3, .aff-form-grid { grid-template-columns: 1fr; }
    .aff-cabinet-nav { display: none; }
    .aff-page-head { flex-direction: column; }
}
