/* Shared styles for the extension pages (/<extension>/...). The home page keeps its own style.css. */
:root {
    --bg: #09090b;
    --bg-card: #18181b;
    --bg-card-hover: #27272a;
    --text: #fafafa;
    --text-2: #a1a1aa;
    --text-3: #8e8e98;
    --border: #27272a;
    --accent: #facc15;
    --accent-dim: rgba(250, 204, 21, 0.12);
    --accent-ink: #111113;
    --ok: #34d399;
    --warn: #f87171;
    --radius: 14px;
    --wrap: 760px;
    --wide: 1040px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
    font-family: var(--font);
    background: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(250, 204, 21, 0.035) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.035) 0px, transparent 50%);
    background-repeat: no-repeat;
    color: var(--text);
    line-height: 1.7;
    font-size: 17px;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap-wide { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 16px; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(9, 9, 11, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-in { display: flex; align-items: center; gap: 12px 20px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand-home { color: var(--text-2); font-weight: 600; font-size: 15px; }
.brand-home:hover { color: var(--text); }
.brand-sep { color: var(--text-3); }
.brand img { border-radius: 7px; }
.topnav { display: flex; gap: 4px; font-size: 15px; }
.topnav a { text-decoration: none; color: var(--text-2); padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--text); background: var(--bg-card); }
.topbar .btn { margin-left: auto; }
.lang-switch { font-size: 14px; color: var(--text-2); text-decoration: none; border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; }
.lang-switch:hover { color: var(--text); }

@media (max-width: 720px) {
    .topbar-in { gap: 6px 12px; }
    .brand-home, .brand-sep { display: none; }
    .topnav { order: 3; width: 100%; overflow-x: auto; margin: 0 -6px; scrollbar-width: none; }
    .topnav::-webkit-scrollbar { display: none; }
    .topbar .btn { padding: 9px 14px; font-size: 14px; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 700; font-size: 15px; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    padding: 12px 18px; border-radius: 10px; border: 1px solid transparent;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn-cta { background: var(--accent); color: var(--accent-ink); }
.btn-cta:hover { background: #fde047; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-card); }
.btn-lg { padding: 15px 22px; font-size: 17px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Breadcrumb ---------- */
.crumbs { margin: 22px 0 8px; font-size: 14px; color: var(--text-3); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li { display: flex; gap: 4px; align-items: center; }
.crumbs li + li::before { content: "›"; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text-3); }

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 800; }
h2 { font-size: clamp(23px, 4vw, 29px); font-weight: 800; margin: 2.4em 0 .6em; }
h3 { font-size: 20px; font-weight: 700; margin: 1.8em 0 .5em; }
p, ul, ol, table, figure, .callout, .cta-box, details { margin-bottom: 1.15em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .4em; }
li::marker { color: var(--text-3); }
strong { color: #fff; }
.prose a, .link { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(250, 204, 21, .4); text-underline-offset: 3px; }
.prose a:hover, .link:hover { text-decoration-color: var(--accent); }
.prose a.btn { text-decoration: none; color: var(--accent-ink); }
kbd { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: var(--bg-card); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--bg-card); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--text-2); }
.prose, .lead, .faq .answer, .cta-box, figcaption { overflow-wrap: break-word; }
.prose a, .lead a, .faq .answer a, code { overflow-wrap: anywhere; }
.small { font-size: 14px; }

/* numbered steps */
ol.steps { list-style: none; padding: 0; counter-reset: s; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 1em; }
ol.steps > li::before {
    content: counter(s); position: absolute; left: 0; top: 0;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(250, 204, 21, .35);
    display: grid; place-items: center; font-weight: 800; font-size: 14px;
}

/* ---------- Article ---------- */
.article { padding-bottom: 40px; }
.article-head { margin: 10px 0 18px; }
.meta { color: var(--text-3); font-size: 14px; margin-top: 12px; }
.lead { font-size: 19px; color: #e4e4e7; }
.prose { color: #d4d4d8; }
.prose h2, .prose h3 { color: var(--text); }

figure { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
figure img { border-radius: 9px; width: 100%; }
figcaption { font-size: 14px; color: var(--text-2); padding: 10px 6px 2px; line-height: 1.5; }

.toc { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 1.6em; }
.toc p { font-weight: 700; margin-bottom: .4em; color: var(--text); }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 15px; }
.toc li { margin-bottom: .25em; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--bg-card); border-radius: 10px; padding: 14px 18px; }
.callout > :last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn); }
.callout.ok { border-left-color: var(--ok); }
.callout-title { font-weight: 700; color: var(--text); margin-bottom: .3em; }

.table-wrap { overflow-x: auto; margin-bottom: 1.15em; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-card); color: var(--text); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* Quick-method box with the store button */
.cta-box {
    display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(250, 204, 21, .10), rgba(250, 204, 21, .02));
    border: 1px solid rgba(250, 204, 21, .35);
    border-radius: var(--radius); padding: 20px 22px; margin: 2em 0;
}
.cta-box > div { flex: 1 1 320px; }
.cta-kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-bottom: .2em; }
.cta-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: .3em; line-height: 1.3; }
.cta-box p:last-child { margin-bottom: 0; }
.cta-text { color: var(--text-2); font-size: 15px; }

.related { border-top: 1px solid var(--border); margin-top: 2.5em; padding-top: 1.5em; }
.related h2 { margin-top: 0; font-size: 22px; }
.card-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.card-list li { margin: 0; }
.card-link { display: block; text-decoration: none; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; transition: border-color .15s, background-color .15s; }
.card-link:hover { border-color: #3f3f46; background: var(--bg-card-hover); }
.card-link strong { display: block; color: var(--text); line-height: 1.35; }
.card-link span { display: block; color: var(--text-2); font-size: 15px; margin-top: 4px; line-height: 1.5; }

/* ---------- Extension home (pillar) ---------- */
.hero { padding: 26px 0 30px; }
.hero h1 { max-width: 15ch; }
.hero-sub { font-size: clamp(18px, 2.6vw, 21px); color: #d4d4d8; max-width: 40ch; margin: 18px 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.badges li { margin: 0; font-size: 14px; color: var(--text-2); border: 1px solid var(--border); background: var(--bg-card); border-radius: 999px; padding: 4px 12px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1.1fr; } }

.section { padding: 34px 0; border-top: 1px solid var(--border); }
.section > h2:first-child, .section-head h2 { margin-top: 0; }
.section-intro { color: var(--text-2); max-width: 60ch; }

.steps-grid { display: grid; gap: 16px; list-style: none; padding: 0; counter-reset: s; }
@media (min-width: 760px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card { margin: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 12px 16px; }
.step-card img { border-radius: 9px; margin-bottom: 12px; width: 100%; }
.step-card h3 { margin: 0 4px .35em; font-size: 18px; }
.step-card p { margin: 0 4px; color: var(--text-2); font-size: 15px; }

.feature-grid { display: grid; gap: 12px; list-style: none; padding: 0; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-grid li { margin: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.feature-grid strong { display: block; margin-bottom: 2px; }
.feature-grid span { color: var(--text-2); font-size: 15px; }

.two-col { display: grid; gap: 16px; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.panel h3 { margin-top: 0; }
.panel ul { margin-bottom: 0; }
.price-tag { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: .4em; }
.price-tag small { font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.plans { display: grid; gap: 12px; margin-bottom: 1em; }
.plans:has(.plan + .plan) { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.plan { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: rgba(255,255,255,.015); }
.plan .check-list { margin: 0; font-size: 15px; }
.plan-name { font-weight: 700; color: var(--text); margin-bottom: .1em; font-size: 15px; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 26px; position: relative; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.x-list { list-style: none; padding: 0; }
.x-list li { padding-left: 26px; position: relative; }
.x-list li::before { content: "×"; position: absolute; left: 3px; top: -1px; color: var(--warn); font-weight: 800; }

/* FAQ */
.faq details { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 0; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--text); list-style: none; position: relative; padding-right: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 11px; font-size: 22px; color: var(--text-3); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 18px 14px; color: #d4d4d8; }
.faq .answer > :last-child { margin-bottom: 0; }

/* Guide index */
.guide-grid { list-style: none; padding: 0; display: grid; gap: 12px; }
@media (min-width: 700px) { .guide-grid { grid-template-columns: 1fr 1fr; } }
.guide-grid li { margin: 0; }
.guide-grid .card-link { height: 100%; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 6px; }

/* Tools */
.tool { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 1.5em; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; color: var(--text); font-size: 15px; }
.field small { color: var(--text-3); font-size: 13px; }
.field input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid #3f3f46; border-radius: 9px; padding: 10px 12px; width: 100%; }
.field input:focus { border-color: var(--accent); outline: none; }
.fields-3 { display: grid; gap: 0 14px; }
@media (min-width: 700px) { .fields-3 { grid-template-columns: repeat(3, 1fr); } }
.results { display: grid; gap: 12px; margin-top: 6px; }
.result-row { display: grid; gap: 6px; }
.result-row .label { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.result-row .label b { color: var(--text); white-space: nowrap; }
.bar { height: 12px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.bar i { display: block; height: 100%; background: #52525b; border-radius: 99px; transition: width .3s ease; }
.bar.accent i { background: var(--accent); }
.big-answer { font-size: 20px; color: var(--text); font-weight: 700; margin: 4px 0 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 34px 0 40px; color: var(--text-2); font-size: 15px; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr; } }
.footer-title { color: var(--text); font-weight: 700; margin-bottom: .6em; font-size: 15px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .35em; }
.footer-list a { color: var(--text-2); text-decoration: none; }
.footer-list a:hover { color: var(--text); text-decoration: underline; }
.footer-ext { columns: 2 220px; column-gap: 24px; }
.footer-ext span { color: var(--text-3); }
.disclaimer { margin-top: 24px; font-size: 13px; color: var(--text-3); line-height: 1.6; }
.copy { margin-top: 10px; font-size: 13px; color: var(--text-3); }

/* 404 */
.notfound { text-align: left; padding: 60px 0 20px; }
.notfound .code { font-size: 14px; color: var(--accent); font-weight: 700; letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Prompt library */
.prompt { border-top: 1px solid var(--border); padding: 14px 0 4px; }
.prompt:first-of-type { border-top: 0; padding-top: 4px; }
.prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.prompt-head .btn { padding: 6px 12px; font-size: 14px; }
.prompt pre { white-space: pre-wrap; word-break: break-word; font: 15px/1.6 ui-monospace, Consolas, monospace; color: #d4d4d8; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; margin: 0 0 10px; }

/* Quiz */
.quiz-q { font-size: clamp(22px, 4vw, 30px); font-weight: 800; color: var(--text); margin: 6px 0 14px; }
.quiz-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.quiz-actions .btn { min-width: 120px; }
.quiz-feedback { min-height: 1.7em; font-weight: 600; }
.quiz-feedback.ok { color: var(--ok); }
.quiz-feedback.no { color: var(--warn); }
.score { color: var(--text-2); font-size: 15px; }
