/* V8 components copied from v8/index.html; website adapter hooks below. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/987ai-direct/fonts/inter-cyrillic-v20.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/987ai-direct/fonts/inter-latin-v20.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --primary: #10a37f;
    --primary-dark: #087f63;
    --primary-deep: #10251f;
    --primary-soft: #e8f7f2;
    --bg: #f7f7f8;
    --card: #ffffff;
    --text: #202123;
    --muted: #6e6e80;
    --border: #e5e7eb;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --success: #10a37f;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --shadow: 0 8px 24px rgba(16, 24, 40, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    width: min(100% - 28px, 560px);
    margin: 0 auto;
    padding: 20px 0 32px;
}

.header { text-align: center; margin-bottom: 16px; }

.logo-box {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(145deg, #12b894, #0d8268);
    box-shadow: 0 14px 32px rgba(16, 163, 127, 0.16);
}

.logo { width: 38px; height: 38px; fill: #fff; display: block; }

h1 {
    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.08;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

.plan-rotator {
    display: inline-block;
    color: var(--primary);
    white-space: nowrap;
}

.subtitle {
    max-width: 420px;
    margin: 0 auto;
    font-size: clamp(14px, 1.7vw, 16px);
    color: var(--muted);
    line-height: 1.45;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px auto 18px;
    max-width: 560px;
}

.benefit {
    min-height: 68px;
    padding: 11px 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    text-align: center;
    box-shadow: 0 4px 14px rgba(21, 24, 34, 0.06);
}

.benefit-icon { font-size: 20px; margin-bottom: 6px; }
.benefit-text { font-size: 13px; font-weight: 600; }

.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.step {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.step.active, .step.done {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(16, 163, 127, 0.20);
}

.step.active { transform: translateY(-1px); }
.step-line { width: 44px; height: 2px; border-radius: 999px; background: var(--border); }
.step-line.active { background: var(--primary); }

.card {
    width: min(100%, 560px);
    margin: 0 auto 18px;
    background: var(--card);
    border: 1px solid #e9e9ed;
    border-radius: 21px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.step-content { display: none; }
.step-content.active { display: block; }

.message {
    display: none;
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.message.show { display: block; }
.message strong { font-weight: 700; }
.message-subline { display: block; margin-top: 4px; font-weight: 600; word-break: break-word; }
.message.error { background: var(--error-bg); color: #b91c1c; border: 1px solid #fecaca; }
.message.success { background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0; }
.message.info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.message.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fde68a; }

.active-plan-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #eeeeef;
    color: #202123;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.active-plan-pill span {
    display: inline-block;
    margin-left: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-group { margin-bottom: 18px; }
label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }

input, textarea {
    width: 100%;
    border: 1px solid #d8d8dd;
    border-radius: 13px;
    padding: 14px 15px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea {
    min-height: 230px;
    resize: vertical;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.11);
}

.hint { margin-top: 7px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.hint a { color: var(--primary); font-weight: 700; text-decoration: none; }
.hint a:hover { text-decoration: underline; }

.tariff-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.tariff-option {
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tariff-option:hover {
    border-color: rgba(16, 163, 127, 0.45);
    transform: translateY(-1px);
}

.tariff-option.active {
    border-color: rgba(16, 163, 127, 0.46);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.08);
}

.btn {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 13px;
    padding: 13px 15px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 24px rgba(16, 163, 127, 0.18);
}

.btn-primary:hover:not(:disabled) { background: #0c8f70; transform: translateY(-1px); }
.btn-secondary {
    margin-top: 11px;
    background: #fff;
    color: var(--primary-dark);
    border: 2px solid rgba(16, 163, 127, 0.28);
    box-shadow: none;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-1px); }
.btn:disabled { opacity: 0.62; cursor: not-allowed; transform: none; }

.spinner {
    display: inline-block;
    width: 17px;
    height: 17px;
    margin-right: 8px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: -4px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.step-section { margin-bottom: 22px; }

.step-head {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(16, 163, 127, 0.22);
    border-radius: 17px;
    background: radial-gradient(circle at 12% 0%, rgba(16, 163, 127, 0.13), transparent 30%), var(--primary-soft);
}

.step-kicker, .step-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.step-kicker::before, .step-section-title::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.step-head h2 { margin-bottom: 7px; font-size: 21px; line-height: 1.18; font-weight: 600; letter-spacing: -0.03em; }
.step-head p { color: var(--muted); font-size: 14px; line-height: 1.55; }

.token-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(16, 163, 127, 0.32);
    color: var(--primary-dark);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.token-link:hover { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.09); }

.info-block, .overwrite-box {
    margin-bottom: 0;
    padding: 15px;
    border-radius: 18px;
    background: var(--primary-soft);
    border: 1px solid rgba(16, 163, 127, 0.25);
}

.info-block { display: grid; gap: 10px; }
.info-title, .overwrite-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.info-text, .overwrite-text { font-size: 14px; color: var(--muted); line-height: 1.55; }
.info-text a { color: var(--primary-dark); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.json-field-box {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #fbfbfb 100%);
}

.json-field-box .form-group { margin-bottom: 0; }
.json-field-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.json-field-header label { margin-bottom: 0; font-size: 16px; font-weight: 600; }
.json-field-note { color: var(--muted); font-size: 13px; white-space: nowrap; }
.json-token-input { min-height: 250px; padding: 15px; border-radius: 16px; font-size: 14px; line-height: 1.55; }
.overwrite-section { display: none; }
.overwrite-section.show { display: block; }
.overwrite-box { display: none; background: #fffaf0; border-color: #f6d365; }
.overwrite-box.show { display: block; }

.result {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 5px 0 4px;
    border-radius: 20px;
    transition: background 0.2s ease, color 0.2s ease;
}

.result .logo-box { width: 54px; height: 54px; margin-bottom: 14px; border-radius: 15px; }
.result .logo { width: 34px; height: 34px; }
.result h2 { font-size: clamp(23px, 3vw, 30px); line-height: 1.1; color: var(--success); margin-bottom: 10px; font-weight: 600; letter-spacing: -0.04em; }
.status-text { max-width: 440px; margin: 0 auto 20px; font-size: clamp(14px, 1.7vw, 16px); color: var(--muted); line-height: 1.45; }

.status-card {
    text-align: left;
    margin: 0 auto 20px;
    padding: 15px;
    border-radius: 18px;
    background: var(--primary-soft);
    border: 1px solid rgba(16, 163, 127, 0.25);
}

.status-card strong { color: var(--text); }
.status-row { font-size: 14px; color: var(--muted); margin-top: 7px; line-height: 1.45; }
.status-row:first-child { margin-top: 0; }

.progress { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(16, 163, 127, 0.13); margin-bottom: 12px; }
.progress-bar { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #12c4a0, var(--primary-dark)); transition: width 0.35s ease; }

.result-actions { display: none; gap: 14px; margin-top: 22px; }
.result-actions.show { display: grid; }
.result-actions.success-only { grid-template-columns: 1fr; }

.success-panel-grid { display: flex; flex-direction: column-reverse; align-items: center; gap: 0; }
.success-copy { min-width: 0; text-align: center; }
.success-done {
    display: none;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #b9f7e6;
    font-size: 14px;
    font-weight: 700;
}

.result.success {
    margin: -26px;
    padding: 34px 28px;
    min-height: 288px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    background: var(--primary-deep);
    color: #fff;
    text-align: left;
    box-shadow: 0 24px 52px rgba(10, 32, 26, 0.22);
}

.result.success::before {
    content: '';
    position: absolute;
    right: -104px;
    top: -136px;
    width: 288px;
    height: 288px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27, 214, 169, 0.42), transparent 63%);
    animation: successFloat 6s ease-in-out infinite;
}

.result.success::after {
    content: '';
    position: absolute;
    left: -72px;
    bottom: -104px;
    width: 184px;
    height: 184px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 65%);
}

.result.success .success-panel-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 128px;
    gap: 22px;
    align-items: center;
}

.result.success .success-copy { text-align: left; }
.result.success .success-done { display: inline-flex; }
.success-done::before {
    content: '✓';
    width: 21px;
    height: 21px;
    border-radius: 999px;
    background: #19c89e;
    color: #06251d;
    display: grid;
    place-items: center;
}

.result.success .logo-box {
    width: 120px;
    height: 120px;
    margin: 0;
    justify-self: end;
    border-radius: 27px;
    background: linear-gradient(145deg, #13b890, #0b735b);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.20);
}

.result.success .logo { width: 70px; height: 70px; }
.result.success h2 { color: #fff !important; margin-bottom: 10px; }
.result.success .status-text { color: rgba(255,255,255,0.76); margin: 0; max-width: 380px; }
.result.success .result-actions { position: relative; z-index: 2; max-width: none; margin-top: 22px; }
.result.success .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: none; }
.result.success .btn-primary:hover:not(:disabled) { background: #f0faf6; }

.result.error .logo-box { background: #ef4444; box-shadow: 0 16px 32px rgba(220, 38, 38, 0.16); }

@keyframes successFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(16px); } }

.video-guide { margin-top: 18px; }
.video-guide h2, .faq h2 { font-size: 20px; line-height: 1.2; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.03em; }
.video-guide-text, .faq-intro { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
.video-frame { overflow: hidden; border-radius: 18px; border: 1px solid var(--border); background: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-frame a { color: #fff; font-weight: 700; }

.faq { margin-top: 18px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    width: 100%;
    padding: 14px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.faq-question::after { content: '+'; color: var(--muted); font-size: 21px; line-height: 1; }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.open .faq-answer { max-height: 520px; }
.faq-answer p { padding-bottom: 13px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.faq-answer a { color: var(--primary-dark); font-weight: 700; text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }

.footer { text-align: center; padding: 8px 14px 22px; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
    .container { width: min(100% - 20px, 460px); padding-top: 16px; }
    .benefits { grid-template-columns: 1fr; gap: 8px; margin: 16px 0; }
    .benefit { min-height: 56px; display: grid; grid-template-columns: auto 1fr; align-items: center; justify-content: start; text-align: left; padding: 10px 13px; }
    .benefit-icon { font-size: 20px; margin: 0; }
    .benefit-text { margin-left: 10px; font-size: 13px; }
    .steps { gap: 8px; }
    .step { width: 34px; height: 34px; font-size: 15px; }
    .step-line { width: 32px; height: 2px; }
    .card { width: 100%; padding: 20px 15px; border-radius: 18px; }
    .btn { min-height: 50px; font-size: 16px; }
    input, textarea { font-size: 16px; padding: 14px; }
    label { font-size: 14px; }
    .hint { font-size: 13px; }
    .step-head { padding: 14px; border-radius: 15px; }
    .step-head h2 { font-size: 19px; }
    .step-head p { font-size: 14px; }
    .json-field-box { padding: 13px; }
    .json-field-header { display: block; }
    .json-field-header label { font-size: 15px; }
    .json-field-note { display: block; margin-top: 4px; white-space: normal; }
    .json-token-input { min-height: 220px; padding: 14px; font-size: 13px; }
    .result.success { margin: -20px -15px; padding: 28px 18px; min-height: 344px; text-align: center; }
    .result.success .success-panel-grid { grid-template-columns: 1fr; gap: 22px; }
    .result.success .success-copy { text-align: center; }
    .result.success .logo-box { width: 92px; height: 92px; border-radius: 22px; justify-self: center; grid-row: 1; }
    .result.success .logo { width: 54px; height: 54px; }
    .result.success .status-text { margin: 0 auto; }
    .result.success .result-actions { grid-template-columns: 1fr; margin-top: 18px; }
    .video-guide h2, .faq h2 { font-size: 19px; }
    .video-guide-text, .faq-intro, .faq-answer p { font-size: 13px; }
    .faq-question { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .plan-rotator { white-space: normal; }
}


/* balanced-scale-20260504: чуть больше воздуха после компактного редизайна */
.container {
    width: min(100% - 32px, 600px);
    padding: 26px 0 38px;
}
.header { margin-bottom: 20px; }
.logo-box {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 18px;
    font-size: 28px;
}
.logo { width: 42px; height: 42px; }
h1 {
    font-size: clamp(27px, 3.8vw, 36px);
    margin-bottom: 9px;
}
.subtitle {
    max-width: 500px;
    font-size: clamp(15px, 1.9vw, 18px);
}
.benefits {
    width: min(100%, 600px);
    max-width: 600px;
    gap: 12px;
    margin: 22px auto 22px;
}
.benefit {
    min-height: 76px;
    padding: 13px 12px;
    border-radius: 16px;
}
.benefit-icon { font-size: 22px; margin-bottom: 7px; }
.benefit-text { font-size: 14px; }
.steps {
    gap: 10px;
    margin-bottom: 22px;
}
.step {
    width: 38px;
    height: 38px;
    font-size: 16px;
}
.step-line {
    width: 50px;
    height: 2px;
}
.card {
    width: min(100%, 600px);
    margin-bottom: 22px;
    border-radius: 23px;
    padding: 30px;
}
.message {
    margin-bottom: 18px;
    padding: 15px 17px;
    border-radius: 14px;
    font-size: 14px;
}
.step-head {
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 18px;
}
.step-head h2 {
    font-size: 23px;
    margin-bottom: 8px;
}
.step-head p { font-size: 15px; }
.form-group { margin-bottom: 20px; }
label { font-size: 15px; margin-bottom: 8px; }
input, textarea {
    border-radius: 14px;
    padding: 15px 16px;
    font-size: 16px;
}
textarea, .json-token-input {
    min-height: 260px;
    font-size: 13px;
}
.json-field-box {
    padding: 18px;
    border-radius: 18px;
}
.json-field-header label { font-size: 17px; }
.btn {
    min-height: 54px;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 17px;
}
.result .logo-box {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    border-radius: 17px;
    font-size: 26px;
}
.result .logo { width: 38px; height: 38px; }
.result h2 { font-size: clamp(24px, 3.2vw, 32px); }
.status-text {
    max-width: 500px;
    font-size: clamp(15px, 1.9vw, 17px);
}
.status-card {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 16px;
}
.status-row { font-size: 14px; }
.progress { height: 8px; }
.success-shell {
    margin: -30px;
    padding: 38px 32px;
    min-height: 300px;
    grid-template-columns: 1fr 132px;
    gap: 24px;
    border-radius: 23px;
}
.success-shell::before { width: 290px; height: 290px; }
.success-shell::after { width: 190px; height: 190px; }
.success-shell h2 { font-size: clamp(26px, 3.5vw, 37px); }
.success-shell .status-text { max-width: 430px; }
.success-shell .logo-box {
    width: 132px;
    height: 132px;
    border-radius: 30px;
    font-size: 50px;
}
.result.success {
    margin: -30px;
    padding: 38px 32px;
    min-height: 320px;
}
.result.success::before {
    width: 315px;
    height: 315px;
}
.result.success::after {
    width: 205px;
    height: 205px;
}
.result.success .success-panel-grid {
    grid-template-columns: 1fr 140px;
    gap: 24px;
}
.result.success .logo-box {
    width: 132px;
    height: 132px;
    border-radius: 30px;
}
.result.success .logo {
    width: 78px;
    height: 78px;
}
.result.success .status-text { max-width: 430px; }
.result.success .result-actions { margin-top: 24px; }
.service-guide, .video-guide, .faq { margin-top: 22px; }
.service-guide h2, .video-guide h2, .faq h2 { font-size: 22px; }
.service-guide-text, .video-guide-text, .faq-intro { font-size: 14px; }
.guide-step {
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 15px;
    border-radius: 17px;
}
.guide-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 13px;
}
.guide-step h3 { font-size: 15px; }
.guide-step p, .guide-callout p, .guide-note { font-size: 13.5px; }
.guide-callout {
    padding: 16px;
    border-radius: 18px;
}
.guide-note {
    padding: 13px 14px;
    border-radius: 14px;
}
.faq-question {
    padding: 16px 0;
    font-size: 15px;
}
.faq-answer p { font-size: 14px; }
.footer { font-size: 13px; }

@media (max-width: 760px) {
    .container {
        width: min(100% - 22px, 500px);
        padding-top: 20px;
    }
    .logo-box {
        width: 60px;
        height: 60px;
    }
    h1 { font-size: clamp(28px, 9vw, 34px); }
    .subtitle { font-size: 16px; }
    .benefits {
        gap: 9px;
        margin: 18px 0;
    }
    .benefit {
        min-height: 60px;
        padding: 11px 14px;
    }
    .step {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .step-line { width: 34px; }
    .card {
        padding: 22px 16px;
        border-radius: 20px;
    }
    .btn {
        min-height: 52px;
        font-size: 16px;
    }
    .step-head {
        padding: 16px;
        border-radius: 17px;
    }
    .step-head h2 { font-size: 21px; }
    .step-head p { font-size: 14px; }
    textarea, .json-token-input { min-height: 240px; }
    .success-shell,
    .result.success {
        margin: -22px -16px;
        padding: 32px 20px;
        min-height: 370px;
    }
    .success-shell .logo-box,
    .result.success .logo-box {
        width: 104px;
        height: 104px;
        border-radius: 25px;
    }
    .result.success .logo { width: 62px; height: 62px; }
    .success-shell .btn-primary { max-width: none; }
    .result.success .success-panel-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .result.success .success-copy { text-align: center; }
    .service-guide h2, .video-guide h2, .faq h2 { font-size: 21px; }
}

@media (max-width: 380px) {
    .container { width: min(100% - 18px, 460px); }
    h1 { font-size: 27px; }
    .card { padding: 20px 14px; }
}

/* Mirror hooks: automatic plan, one submit, truthful waiting and native disclosure. */
[hidden] { display: none !important; }
.message:not([hidden]) { display: block; }
#activationCard { scroll-margin-top: 24px; }
.panel h2:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 12px 16px; background: #fff; color: var(--primary-dark); border: 2px solid var(--primary); border-radius: 10px; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.step.done + .step-line { background: var(--primary); }
.step-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.step-meta .step-kicker { margin: 0; }
.active-plan-pill { flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 6px 9px; white-space: normal; line-height: 1.4; font-size: 13px; background: rgba(255,255,255,.8); color: var(--primary-dark); }
.active-plan-pill span { margin-left: 0; overflow: visible; text-overflow: clip; }
.active-plan-pill [data-plan-duration] { color: var(--muted); font-weight: 500; }
.token-link { gap: 8px; }
.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.field-heading label { margin: 0; }
#credentialState { font-size: 12px; color: var(--muted); }
#credentialState.valid { color: var(--primary-dark); }
#credential { display: block; min-height: 170px; font-size: 14px; line-height: 1.55; }
.account-preview { padding: 13px 15px; background: #f7f7f8; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 20px; }
.account-preview span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.account-preview strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.activation-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 13px 0 2px; }
.back-link { display: block; width: fit-content; max-width: 100%; min-height: 44px; margin: 4px auto 0; border: 0; padding: 10px 6px; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-underline-offset: 4px; }
.back-link:hover { color: var(--primary-dark); text-decoration: underline; }
.back-link:disabled { opacity: .6; cursor: default; }
.service-notice { margin: 0 0 16px; padding: 12px 14px; background: var(--warning-bg); border: 1px solid #fde68a; border-radius: 12px; color: var(--warning); font-size: 14px; }
.result h2 { color: var(--text); }
.result .status-text { margin-bottom: 0; }
.result-plan { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 10px; font-size: 16px; line-height: 1.5; margin: 0 0 14px; color: var(--primary-dark); }
.result-plan [data-plan-duration] { color: var(--muted); font-size: 14px; align-self: center; }
.result-account { margin-top: 12px; font-size: 13px; overflow-wrap: anywhere; }
.result-account span { color: var(--muted); margin-right: 6px; }
.result-account strong { font-weight: 500; }
.result-brand { position: relative; flex-shrink: 0; }
.result-icon { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; bottom: -4px; right: -4px; border-radius: 50%; border: 3px solid #fff; background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; line-height: 1; }
.result.processing .result-icon { border: 3px solid #d6eee7; border-top-color: var(--primary); background: #fff; animation: spin 1s linear infinite; }
.result.unknown .result-brand, .result.temporary .result-brand { background: #b45309; box-shadow: none; }
.result.unknown .result-icon, .result.temporary .result-icon { background: #b45309; }
.result.error .result-icon { background: var(--error); }
.result.used .result-brand { background: #5b6676; box-shadow: none; }
.result.used .result-icon { background: #5b6676; }
.status-card { margin-top: 22px; margin-bottom: 0; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; font-size: 14px; }
#progressElapsed { font-variant-numeric: tabular-nums; color: var(--primary-dark); font-size: 13px; }
.progress-bar { display: block; width: 36%; animation: waitingProgress 2.4s ease-in-out infinite; transition: none; }
@keyframes waitingProgress { 0% { transform: translateX(-110%); } 100% { transform: translateX(290%); } }
#progressNote { font-size: 13px; line-height: 1.5; color: var(--muted); }
.result-actions:not([hidden]) { display: grid; gap: 0; }
.result.success { border-radius: 23px; }
.result.success .result-plan { justify-content: flex-start; color: #d5f8ed; margin-bottom: 12px; }
.result.success .result-plan [data-plan-duration] { color: #b8cfc7; }
.result.success .result-account { color: #fff; }
.result.success .result-account span { color: #b8cfc7; }
.result.success .result-icon { width: 28px; height: 28px; background: #10a37f; border-color: var(--primary-deep); }
.result.success .back-link { color: #b8cfc7; }
.result.success .back-link:hover { color: #fff; }
.result.success .success-done { margin-bottom: 12px; padding: 5px 10px; font-size: 12px; }
.subscription-delay-note { display: none; }
.result.success .subscription-delay-note { display: block; position: relative; z-index: 2; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); color: #c9ded6; font-size: 14px; line-height: 1.6; text-align: left; }
.result.success .subscription-delay-note strong { color: #fff; font-weight: 600; }
.operation-details { margin: 16px auto 0; color: var(--muted); font-size: 12px; text-align: left; }
.operation-details summary { cursor: pointer; padding: 8px 0; }
.operation-details p { font-family: monospace; overflow-wrap: anywhere; }
.faq-item:last-child { border: 0; }
.faq-question { list-style: none; align-items: center; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { flex-shrink: 0; }
.faq-item[open] .faq-question::after { content: '−'; }
.faq-item[open] .faq-answer { max-height: none; }
.noscript-note { max-width: 600px; margin: 0 auto 24px; padding: 16px; color: #b91c1c; background: #fff; }
@media (max-width: 760px) {
    .benefits { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
    .benefit { display: block; padding: 11px 5px; min-height: 74px; text-align: center; }
    .benefit-icon { margin-bottom: 5px; }
    .benefit-text { margin: 0; font-size: 12px; letter-spacing: -.02em; }
    .desktop-break { display: none; }
    .step-meta { gap: 8px; }
    #credential { min-height: 180px; font-size: 16px; }
    .result.success { border-radius: 20px; }
    .result.success .result-plan { justify-content: center; }
}
@media (max-width: 380px) {
    .result.success { margin: -20px -14px; }
    .benefit-text { font-size: 11px; }
    .step-meta { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .progress-bar { transform: none; width: 50%; }
}
