/* ErrorDTC – public site */
:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #f1f3f8;
    --text: #0f172a;
    --text-2: #475569;
    --muted: #64748b;
    --border: #e2e8f0;
    --accent: #f59e0b;
    --accent-ink: #b45309;
    --accent-soft: #fef3c7;
    --blue: #2563eb;
    --ink: #0b1220;
    --ink-2: #131c31;
    --ok: #059669;
    --danger: #dc2626;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, .12);
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0f1c;
        --surface: #111827;
        --surface-2: #172033;
        --text: #e5e9f2;
        --text-2: #b6c0d2;
        --muted: #8b97ad;
        --border: #243049;
        --accent-soft: rgba(245, 158, 11, .14);
        --accent-ink: #fbbf24;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: #7aa7ff; } }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Right-to-left (Persian) ---------- */
[dir="rtl"] .topbar__nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .lang__menu { right: auto; left: 0; }
[dir="rtl"] .chev { transform: scaleX(-1); }
[dir="rtl"] .dtc-list a:hover .chev { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .tldr { border-left: 1px solid rgba(255, 255, 255, .1); border-right: 4px solid var(--accent); }
[dir="rtl"] .steps li { padding: 0 40px 12px 0; }
[dir="rtl"] .steps li::before { left: auto; right: 0; }
[dir="rtl"] .steps li:not(:last-child)::after { left: auto; right: 12.5px; }
[dir="rtl"] .crumbs li + li::before { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .facts dd, [dir="rtl"] .summary dd { text-align: left; }
/* codes, URLs and numbers stay left-to-right inside RTL text */
[dir="rtl"] .code, [dir="rtl"] .badge, [dir="rtl"] code, [dir="rtl"] .tag, [dir="rtl"] .dtc-head__code { direction: ltr; unicode-bidi: isolate; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11, 18, 32, .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.topbar__inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--accent); }
.logo__icon { width: 32px; height: 32px; stroke: none; }
.logo--footer { color: var(--text); }
.topbar__search { position: relative; flex: 1; max-width: 420px; display: flex; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; padding: 0 14px; }
.topbar__search:focus-within { background: rgba(255, 255, 255, .13); border-color: rgba(245, 158, 11, .6); }
.topbar__search svg { color: #94a3b8; flex: none; }
.topbar__search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; padding: 9px 10px; font: inherit; font-size: .95rem; }
.topbar__search input::placeholder { color: #94a3b8; }
.topbar__nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.topbar__nav > a { color: #cbd5e1; font-weight: 600; font-size: .95rem; }
.topbar__nav > a:hover { color: #fff; text-decoration: none; }
.topbar__nav > a.nav-premium { color: #111; background: var(--accent); padding: 6px 14px; border-radius: 999px; font-weight: 800; }
.topbar__nav > a.nav-premium:hover { color: #111; background: #fbbf24; }
@media (max-width: 760px) { .topbar__nav > a.nav-account, .topbar__nav > a.nav-premium { display: inline-block; } .topbar__nav > a.nav-account { font-size: .85rem; } }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: #cbd5e1; font-weight: 700; font-size: .85rem; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; }
.lang summary::-webkit-details-marker { display: none; }
.lang__menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 6px; min-width: 160px; display: grid; }
.lang__menu a { padding: 8px 12px; border-radius: 7px; color: var(--text); font-size: .95rem; }
.lang__menu a:hover, .lang__menu a.is-active { background: var(--surface-2); text-decoration: none; }
@media (max-width: 760px) {
    .topbar__nav > a { display: none; }
    .topbar__inner { gap: 12px; }
    .logo span { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 80% -10%, #1e2a4a 0%, transparent 60%), linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #e2e8f0; padding: 72px 0 64px; }
.hero__glow { position: absolute; inset: auto -10% -60% auto; width: 700px; height: 700px; background: radial-gradient(circle, rgba(245, 158, 11, .22), transparent 60%); pointer-events: none; }
.hero__inner { position: relative; text-align: center; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.5vw, 3.6rem); max-width: 820px; margin: 0 auto 16px; }
.hero__lead { color: #a8b3c7; font-size: 1.15rem; max-width: 640px; margin: 0 auto 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; letter-spacing: .02em; color: #fcd34d; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .28); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } }
.hero .searchbox { margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: .9rem; }
.chip { color: #cbd5e1; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); padding: 5px 12px; border-radius: 999px; }
.chip:hover { color: #fff; border-color: var(--accent); text-decoration: none; }
.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; max-width: 720px; margin: 44px auto 0; background: rgba(255, 255, 255, .08); border-radius: var(--radius); overflow: hidden; }
.hero__stats div { background: rgba(11, 18, 32, .6); padding: 16px 10px; }
.hero__stats dt { font-size: .78rem; color: #8b97ad; text-transform: uppercase; letter-spacing: .06em; }
.hero__stats dd { margin: 2px 0 0; font-size: 1.6rem; font-weight: 800; color: #fff; }
@media (max-width: 600px) { .hero__stats { grid-template-columns: repeat(2, 1fr); } .hero { padding: 48px 0; } }

/* ---------- Search box + suggestions ---------- */
.searchbox { position: relative; display: flex; align-items: center; max-width: 680px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px 6px 6px 18px; }
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .2), var(--shadow-lg); }
.searchbox > svg { color: var(--muted); font-size: 1.25rem; flex: none; }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.1rem; padding: 12px; color: var(--text); }
.searchbox button { border: 0; cursor: pointer; background: var(--accent); color: #111; font: inherit; font-weight: 800; padding: 12px 22px; border-radius: 11px; }
.searchbox button:hover { background: #fbbf24; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60; text-align: left; }
.suggest a { display: flex; gap: 12px; align-items: center; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.is-active { background: var(--surface-2); text-decoration: none; }
.suggest small { color: var(--muted); display: block; font-size: .8rem; }
.topbar__search .suggest { top: calc(100% + 10px); }

/* ---------- Page head ---------- */
.pagehead { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #cbd5e1; padding: 28px 0 36px; }
.pagehead h1 { color: #fff; }
.pagehead .lead { color: #a8b3c7; font-size: 1.08rem; max-width: 780px; }
.pagehead .searchbox { margin-top: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: .88rem; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #475569; }
.crumbs a { color: #94a3b8; }
.crumbs span { color: #e2e8f0; }
.ecus { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: .88rem; }
.pagehead .tag { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: #cbd5e1; }
.big404 { font-size: 5rem; font-weight: 900; color: var(--accent); margin: 0; line-height: 1; }

/* ---------- Sections, cards ---------- */
.section { margin: 40px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.link-arrow { font-weight: 700; font-size: .95rem; }
.grid { display: grid; gap: 14px; }
.grid--systems { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-lg); text-decoration: none; }
.card__title { font-weight: 700; line-height: 1.3; }
.card__meta { color: var(--muted); font-size: .88rem; margin-top: auto; }
.card__text { color: var(--text-2); font-size: .93rem; }
.badge { display: inline-block; align-self: flex-start; font: 800 .8rem/1 var(--mono); letter-spacing: .03em; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid rgba(245, 158, 11, .35); padding: 5px 8px; border-radius: 6px; }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; background: rgba(255, 255, 255, .1); padding: 2px 10px; border-radius: 999px; }
.tag { display: inline-block; font-size: .8rem; font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); padding: 2px 8px; border-radius: 6px; margin: 2px 3px 2px 0; }
.code-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 28px 0; }
.card--code__top { display: flex; align-items: center; gap: 8px; font-size: .88rem; }

/* ---------- DTC list ---------- */
.dtc-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dtc-list li + li { border-top: 1px solid var(--border); }
.dtc-list a { display: flex; align-items: center; gap: 16px; padding: 13px 18px; color: var(--text); }
.dtc-list a:hover { background: var(--surface-2); text-decoration: none; }
.dtc-list a:hover .chev { transform: translateX(3px); color: var(--accent); }
.code { flex: none; min-width: 84px; text-align: center; font: 800 .95rem/1 var(--mono); letter-spacing: .04em; color: #fff; background: var(--ink); border: 1px solid #22304d; padding: 9px 10px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { .code { background: #0b1220; } }
.code small { display: block; margin-top: 4px; font-size: .68rem; font-weight: 600; letter-spacing: .02em; color: #94a3b8; }
.code--sm { min-width: 64px; font-size: .8rem; padding: 6px 8px; }
.dtc-list__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dtc-list__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dtc-list__meta { color: var(--muted); font-size: .85rem; }
.chev { flex: none; color: var(--muted); transition: transform .15s; }

.filter { display: flex; gap: 8px; align-items: center; margin: 24px 0 14px; }
.filter input { flex: 1; max-width: 420px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.filter button, .btn { border: 0; cursor: pointer; background: var(--ink); color: #fff; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 10px; display: inline-block; }
@media (prefers-color-scheme: dark) { .filter button, .btn { background: var(--accent); color: #111; } }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0 48px; }
.pager__btn { min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; }
.pager__btn:hover { border-color: var(--accent); text-decoration: none; }
.pager__btn.is-active { background: var(--accent); border-color: var(--accent); color: #111; }
.pager__btn.is-disabled { opacity: .4; }
.pager__gap { padding: 8px 4px; color: var(--muted); }

.empty { text-align: center; padding: 48px 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); margin: 28px 0; }

/* ---------- Features / prose ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 1.3rem; margin-bottom: 12px; }
.feature p { color: var(--text-2); margin: 0; }
.prose { max-width: 780px; margin: 36px auto 56px; color: var(--text-2); font-size: 1.05rem; }
.prose h2 { color: var(--text); }
.seo-text { margin-left: 0; }

/* ---------- DTC page ---------- */
.pagehead--dtc { padding-bottom: 30px; }
.dtc-head { display: flex; gap: 22px; align-items: center; }
.dtc-head__code { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 120px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(145deg, #f59e0b, #d97706); color: #111; box-shadow: 0 10px 30px rgba(245, 158, 11, .25); }
.dtc-head__fmt { display: flex; flex-direction: column; align-items: center; }
.dtc-head__fmt--hex { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(17, 17, 17, .25); width: 100%; }
.dtc-head__code small { font: 800 .68rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.dtc-head__code strong { font: 900 1.9rem/1.1 var(--mono); letter-spacing: .02em; }
.dtc-head__fmt--hex strong { font-size: 1.3rem; }
.dtc-head__formats { margin: 8px 0 0; color: #94a3b8; font-size: .9rem; }
.dtc-head h1 { margin-bottom: 8px; }
.h1-sub { display: block; font-size: .62em; font-weight: 600; color: #fcd34d; letter-spacing: -.01em; margin-top: 6px; }
.dtc-head__meta { color: #a8b3c7; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pagehead .badge { background: rgba(245, 158, 11, .15); color: #fcd34d; }
.tldr { margin-top: 22px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 18px; max-width: 880px; }
.tldr strong { color: #fcd34d; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.tldr p { margin: 4px 0 0; color: #e2e8f0; font-size: 1.05rem; }
@media (max-width: 600px) {
    .dtc-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .dtc-head__code { flex-direction: row; gap: 14px; min-width: 0; padding: 10px 14px; }
    .dtc-head__code strong { font-size: 1.4rem; }
    .dtc-head__fmt--hex { margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid rgba(17, 17, 17, .25); width: auto; }
}

.dtc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; margin-top: 32px; margin-bottom: 56px; }
@media (max-width: 960px) { .dtc-layout { grid-template-columns: 1fr; } }
.variants { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.variants a { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; color: var(--text); font-size: .85rem; }
.variants a span { color: var(--muted); font-family: var(--mono); font-size: .78rem; }
.variants a:hover { border-color: var(--accent); text-decoration: none; }
.variant { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 26px; margin-bottom: 22px; scroll-margin-top: 80px; }
.variant__head { padding: 18px 0 14px; border-bottom: 1px solid var(--border); }
.variant__head p { margin: 0; color: var(--muted); font-size: .9rem; }
.applies { padding-top: 16px; margin: 0; color: var(--muted); font-size: .9rem; }
.block { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 16px; padding: 22px 0; }
.block + .block { border-top: 1px solid var(--border); }
.block__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--surface-2); color: var(--text-2); }
.block--cause .block__icon { background: #fee2e2; color: #b91c1c; }
.block--reaction .block__icon { background: #ede9fe; color: #6d28d9; }
.block--symptom .block__icon { background: #e0f2fe; color: #0369a1; }
.block--action .block__icon { background: #dcfce7; color: #15803d; }
@media (prefers-color-scheme: dark) {
    .block--cause .block__icon { background: rgba(220, 38, 38, .15); color: #fca5a5; }
    .block--reaction .block__icon { background: rgba(124, 58, 237, .18); color: #c4b5fd; }
    .block--symptom .block__icon { background: rgba(2, 132, 199, .18); color: #7dd3fc; }
    .block--action .block__icon { background: rgba(5, 150, 105, .18); color: #6ee7b7; }
}
.block__body h2, .block__body h3 { font-size: 1.12rem; margin-bottom: 8px; }
.block__body p { color: var(--text-2); margin: 0; white-space: pre-line; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 12px 40px; color: var(--text-2); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 .8rem/1 var(--font); background: var(--accent-soft); color: var(--accent-ink); border: 1px solid rgba(245, 158, 11, .4); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 30px; bottom: 4px; width: 1px; background: var(--border); }
.note { font-size: .85rem; color: var(--muted); font-style: italic; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border: 1px solid rgba(245, 158, 11, .3); border-radius: 12px; padding: 14px 16px; color: var(--text-2); font-size: .92rem; }
.notice svg { flex: none; font-size: 1.2rem; color: var(--accent-ink); margin-top: 2px; }
.notice p { margin: 0; }

/* ---------- Forms, account, pricing ---------- */
.flash { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-weight: 600; }
@media (prefers-color-scheme: dark) { .flash { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .35); color: #6ee7b7; } }
.errors { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
@media (prefers-color-scheme: dark) { .errors { background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .35); color: #fca5a5; } }
.narrow { max-width: 460px; margin: 36px auto 60px; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.form-card h1 { font-size: 1.6rem; }
.form-grid { display: grid; gap: 14px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-grid--2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 5px; font-weight: 600; font-size: .92rem; }
.field small { font-weight: 400; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=password], .field select, .field textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.field input:focus, .field select:focus { outline: 2px solid rgba(245, 158, 11, .45); border-color: var(--accent); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; color: var(--text-2); }
.check input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.form-links { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-top: 14px; flex-wrap: wrap; }
.btn-block { width: 100%; text-align: center; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 820px; margin: 36px auto; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.plan--best { border: 2px solid var(--accent); box-shadow: 0 10px 40px rgba(245, 158, 11, .18); }
.plan__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #111; font-weight: 800; font-size: .78rem; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.plan h2 { font-size: 1.15rem; margin: 0; }
.plan__price { font-size: 2.4rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.plan__price small { font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan__note { color: var(--muted); font-size: .88rem; margin: 0; }
.plan ul { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 7px; color: var(--text-2); }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 900; margin-right: 8px; }
.plan .btn-primary, .plan .btn-ghost { margin-top: auto; text-align: center; }

.summary { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 0; }
.summary dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary .total { border-top: 1px solid var(--border); padding-top: 8px; font-size: 1.1rem; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; margin: 30px 0 60px; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }

.account { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin: 28px 0 60px; }
@media (max-width: 860px) { .account { grid-template-columns: 1fr; } }
.account .form-card h2 { font-size: 1.15rem; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.status--active { background: #dcfce7; color: #166534; }
.status--cancelled, .status--suspended { background: #fef3c7; color: #92400e; }
.status--none, .status--expired { background: var(--surface-2); color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--border); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.link-danger { background: none; border: 0; color: var(--danger); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }

.narrow--wide { max-width: 640px; }
.steps-bar { list-style: none; display: flex; gap: 8px; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.steps-bar li { padding: 6px 14px; border-radius: 999px; font-size: .88rem; font-weight: 700; color: #94a3b8; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.steps-bar li.is-on { color: #111; background: var(--accent); border-color: var(--accent); }
.steps-bar li.is-done { color: #6ee7b7; }
.steps-bar li.is-done::before { content: "✓ "; }
.pay-buttons { display: grid; gap: 12px; margin: 6px 0 16px; min-height: 110px; }

/* ---------- Paywall ---------- */
.blurred { filter: blur(5px); user-select: none; pointer-events: none; color: var(--muted) !important; }
.paywall { text-align: center; margin: 8px -26px 0; padding: 30px 26px 26px; border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent, var(--accent-soft) 70%); border-radius: 0 0 var(--radius) var(--radius); }
.paywall__icon { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--accent); font-size: 1.5rem; }
.paywall h2 { font-size: 1.35rem; }
.paywall p { color: var(--text-2); max-width: 520px; margin-left: auto; margin-right: auto; }
.paywall__list { list-style: none; padding: 0; margin: 0 auto 18px; display: inline-grid; gap: 6px; text-align: left; color: var(--text-2); }
.paywall__list li::before { content: "✓"; color: var(--ok); font-weight: 900; margin-right: 8px; }
.paywall__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.paywall__small { font-size: .82rem; margin-top: 12px; }
.btn-primary { display: inline-block; background: var(--accent); color: #111 !important; font-weight: 800; padding: 12px 22px; border-radius: 11px; border: 0; cursor: pointer; font: inherit; font-weight: 800; }
.btn-primary:hover { background: #fbbf24; text-decoration: none; }
.btn-ghost { display: inline-block; background: var(--surface); color: var(--text) !important; font-weight: 700; padding: 12px 20px; border-radius: 11px; border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

.dtc-aside { display: flex; flex-direction: column; gap: 20px; }
.facts, .nearby { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.facts h2, .nearby h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; min-width: 0; }
.facts__ecus { grid-column: 1 / -1; }
.btn-copy { margin-top: 16px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.btn-copy:hover { border-color: var(--accent); }
.nearby ul { list-style: none; margin: 0 0 12px; padding: 0; }
.nearby li a, .nearby li.is-current { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; color: var(--text); font-size: .88rem; }
.nearby li a span:last-child, .nearby li.is-current span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby li a:hover { background: var(--surface-2); text-decoration: none; }
.nearby li.is-current { background: var(--accent-soft); font-weight: 700; }
@media (min-width: 961px) { .nearby { position: sticky; top: 84px; } }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; padding: 44px 0 20px; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer__grid h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer__grid a:not(.logo) { display: block; color: var(--text-2); padding: 3px 0; }
.footer__legal { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 18px; color: var(--muted); font-size: .82rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
