/* ==========================================================================
   Codenninja — public site, Help Center and customer area
   Clean SaaS: white base, violet-indigo accent, soft gradient panels.
   ========================================================================== */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/PlusJakartaSans.ttf") format("truetype");
    font-weight: 200 800;
    font-display: swap;
}

:root {
    --primary: #5b5bf0;
    --primary-600: #4a4ad8;
    --primary-700: #3d3cb8;
    --primary-50: #f3f3fe;
    --primary-100: #e6e6fd;
    --primary-200: #cfcffb;
    --violet: #8b5cf6;

    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --subtle: #94a3b8;
    --line: #e5e7ef;
    --line-soft: #eef0f6;
    --bg: #ffffff;
    --bg-soft: #f8f9fc;

    --green: #059669;  --green-bg: #ecfdf5;  --green-line: #a7f3d0;
    --red: #dc2626;    --red-bg: #fef2f2;    --red-line: #fecaca;
    --amber: #b45309;  --amber-bg: #fffbeb;  --amber-line: #fde68a;

    --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, .12);
    --shadow-lg: 0 30px 60px -20px rgba(30, 27, 75, .25);
    --focus: 0 0 0 4px rgba(91, 91, 240, .22);

    --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); letter-spacing: -.035em; line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.icon { flex-shrink: 0; vertical-align: middle; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: var(--r-sm); }
.skip-link:focus { top: 1rem; color: #fff; }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.container-narrow { width: min(860px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: .75rem 0 0; }
.section-head.left { text-align: left; margin-left: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 999px; background: var(--primary-50); color: var(--primary-600); font-size: .82rem; font-weight: 650; margin-bottom: 1rem; border: 1px solid var(--primary-100); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.text-center { text-align: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .6rem 1.2rem; border-radius: 10px; border: 1px solid transparent;
    font: 650 .95rem/1.2 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(49, 46, 129, .25), inset 0 1px 0 rgba(255,255,255,.15); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1e293b; color: #fff; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-xs); }
.btn-outline:hover { border-color: #cbd2e1; background: var(--bg-soft); color: var(--ink); }
.btn-soft { background: var(--primary-50); color: var(--primary-600); border-color: var(--primary-100); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary-700); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-danger { background: #fff; border-color: var(--red-line); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); color: var(--red); }
.btn-sm { min-height: 36px; padding: .4rem .85rem; font-size: .875rem; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: .8rem 1.6rem; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 650; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------------------------------------------------------------- badges & pills */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 650; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; }
.pill .icon { width: 14px; height: 14px; }
.pill-primary { background: var(--primary-50); color: var(--primary-600); border-color: var(--primary-100); }
.pill-green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.pill-red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.pill-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.pill-gray { background: var(--bg-soft); color: var(--muted); border-color: var(--line); }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: #cbd2e1; display: inline-block; }

/* ---------------------------------------------------------------- announcement & header */
.announcement { background: linear-gradient(90deg, var(--primary-700), var(--primary), var(--violet)); color: #fff; font-size: .88rem; font-weight: 600; text-align: center; padding: .55rem 1rem; }
.announcement a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line-soft); }
.site-header .container { position: relative; display: flex; align-items: center; gap: 2rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 800; font-size: 1.28rem; letter-spacing: -.03em; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 35px; }
.brand-custom img { width: auto; height: 36px; }
.brand b { color: var(--primary); font-weight: 800; }
.nav { display: flex; align-items: center; gap: .2rem; flex: 1; }
.nav a { color: var(--text); font-weight: 550; font-size: .95rem; padding: .5rem .8rem; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-md); padding: .4rem; z-index: 60; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: 8px; color: var(--text); font: 550 .92rem var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-soft); color: var(--ink); }
.dropdown-menu .icon { color: var(--subtle); }
.dropdown-menu hr { margin: .35rem 0; }
.dropdown-menu form { margin: 0; }
.dropdown-head { padding: .6rem .75rem .5rem; }
.dropdown-head strong { display: block; color: var(--ink); font-size: .92rem; }
.dropdown-head span { color: var(--muted); font-size: .82rem; word-break: break-all; }
.user-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .3rem .6rem .3rem .3rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .92rem; }
.user-chip:hover { border-color: #cbd2e1; }
.user-chip .icon { color: var(--subtle); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.menu-toggle { display: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 6.5rem); isolation: isolate; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(60% 55% at 85% 10%, rgba(139, 92, 246, .16), transparent 70%),
        radial-gradient(50% 50% at 5% 30%, rgba(91, 91, 240, .13), transparent 70%),
        linear-gradient(180deg, #fbfbff 0%, #fff 100%);
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
    background-image: radial-gradient(rgba(91, 91, 240, .18) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(70% 60% at 50% 20%, #000 20%, transparent 75%);
}
.hero .container { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: 1.25rem; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 540px; margin-bottom: 2rem; }
.hero-trust { display: flex; align-items: center; gap: .9rem; margin-top: 2rem; color: var(--muted); font-size: .9rem; }
.stars { display: inline-flex; gap: 2px; color: #f59e0b; }
.stars .icon { fill: currentColor; stroke: none; }
.stars .off { color: #d8dce6; }

.mockup { position: relative; }
.mockup-window { border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; transform: perspective(1400px) rotateY(-4deg) rotateX(2deg); }
.mockup-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg-soft); }
.mockup-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e5ee; }
.mockup-bar span { margin-left: .75rem; flex: 1; height: 22px; border-radius: 6px; background: #fff; border: 1px solid var(--line-soft); font-size: .72rem; color: var(--subtle); display: flex; align-items: center; padding: 0 .6rem; }
.mockup-card { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: .8rem 1rem; display: flex; align-items: center; gap: .75rem; font-size: .82rem; color: var(--muted); }
.mockup-card strong { display: block; color: var(--ink); font-size: .9rem; }
.mockup-card .badge-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.mockup-card-1 { left: -32px; top: 72px; }
.mockup-card-1 .badge-icon { background: var(--green-bg); color: var(--green); }
.mockup-card-2 { right: -22px; bottom: -24px; }
.mockup-card-2 .badge-icon { background: var(--primary-50); color: var(--primary); }
@media (prefers-reduced-motion: no-preference) {
    .mockup-card-1 { animation: float 6s ease-in-out infinite; }
    .mockup-card-2 { animation: float 6s ease-in-out -3s infinite; }
    @keyframes float { 50% { transform: translateY(-8px); } }
}

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-xl); background: #fff; box-shadow: var(--shadow-sm); }
.stats div { padding: 1.6rem 1.25rem; text-align: center; }
.stats div + div { border-left: 1px solid var(--line-soft); }
.stats strong { display: block; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.stats span { color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- product covers & tiles */
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--primary-50); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-generated { display: flex; flex-direction: column; justify-content: space-between; padding: 1.4rem; color: #fff; background: linear-gradient(135deg, #5b5bf0 0%, #7c3aed 100%); }
.cover-generated::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.2) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(135deg, transparent 30%, #000); }
.cover-generated.v1 { background: linear-gradient(135deg, #0ea5e9 0%, #5b5bf0 100%); }
.cover-generated.v2 { background: linear-gradient(135deg, #10b981 0%, #0d9488 100%); }
.cover-generated b { position: relative; z-index: 1; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; max-width: 12ch; }
.cover-generated .tile { position: relative; z-index: 1; }
.tile { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; background: linear-gradient(135deg, #5b5bf0, #7c3aed); flex-shrink: 0; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.v1 { background: linear-gradient(135deg, #0ea5e9, #5b5bf0); }
.tile.v2 { background: linear-gradient(135deg, #10b981, #0d9488); }
.tile-lg { width: 80px; height: 80px; border-radius: 18px; font-size: 1.6rem; }
.tile-glass { background: rgba(255,255,255,.2); width: 44px; height: 44px; border-radius: 12px; font-size: .95rem; border: 1px solid rgba(255,255,255,.35); }

/* ---------------------------------------------------------------- cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: clamp(1.25rem, 3vw, 1.75rem); }
.card-hover { transition: border-color .2s, box-shadow .2s, transform .2s; }
.card-hover:hover { border-color: var(--primary-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-title { font-size: 1.1rem; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.5rem; }
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card .cover { border-bottom: 1px solid var(--line-soft); }
.product-card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.product-card-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.product-card h3 { margin-bottom: .45rem; }
.product-card h3 a { color: var(--ink); }
.product-card h3 a:hover { color: var(--primary); }
.product-card p { color: var(--muted); font-size: .94rem; margin-bottom: 1.25rem; }
.product-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.price { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price small { font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.rating { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); font-weight: 600; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { padding: 1.6rem; }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 1.1rem; border: 1px solid var(--primary-100); }
.feature h3 { margin-bottom: .45rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.testimonials { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.testimonial { padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.testimonial blockquote { margin: 0; color: var(--text); font-size: 1rem; }
.testimonial footer { display: flex; align-items: center; gap: .75rem; margin-top: auto; }
.testimonial footer strong { display: block; color: var(--ink); font-size: .95rem; }
.testimonial footer span { color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- FAQ */
.faq { display: grid; gap: .75rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--primary-200); box-shadow: 0 0 0 3px var(--primary-50); }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 650; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--subtle); transition: transform .2s; }
.faq details[open] summary { color: var(--primary-600); }
.faq details[open] summary .icon { transform: rotate(180deg); color: var(--primary); }
.faq .answer { padding: 0 1.25rem 1.2rem; color: var(--muted); }
.faq .answer > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- CTA band */
.cta { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(2.5rem, 6vw, 4rem); color: #c7c9f7; background: radial-gradient(80% 120% at 100% 0%, rgba(139, 92, 246, .55), transparent 60%), linear-gradient(135deg, #1e1b4b, #312e81); display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(90deg, transparent, #000); pointer-events: none; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: #fff; margin-bottom: .5rem; }
.cta p { margin: 0; max-width: 520px; }
.cta .btn-outline { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; box-shadow: none; }
.cta .btn-outline:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---------------------------------------------------------------- page header */
.page-hero { position: relative; padding: clamp(2.75rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 2.75rem); background: linear-gradient(180deg, #fafaff, #fff); border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(91,91,240,.14) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(60% 100% at 50% 0%, #000, transparent 80%); pointer-events: none; }
.page-hero .container, .page-hero .container-narrow { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.page-hero p { color: var(--muted); font-size: 1.08rem; margin: .6rem 0 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--muted); font-weight: 550; }
.breadcrumbs a:hover { color: var(--primary); }

/* ---------------------------------------------------------------- product page */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.5rem; align-items: start; padding-block: 2.5rem 5rem; }
.product-head { display: flex; gap: 1.25rem; align-items: center; }
.product-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.product-head p { margin: .35rem 0 0; color: var(--muted); font-size: 1.05rem; }
.product-cover { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); margin: 2rem 0; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.75rem; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .8rem 1rem; font: 650 .95rem var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--primary); border-color: var(--primary); }
.tab-panel[hidden] { display: none; }
.buy-panel { position: sticky; top: 96px; padding: 1.5rem; }
.license-option { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: .6rem; }
.license-option strong { color: var(--ink); display: block; font-size: .95rem; }
.license-option span { color: var(--muted); font-size: .82rem; }
.license-option .price { font-size: 1.3rem; }
.checklist { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .55rem; }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; color: var(--text); font-size: .93rem; }
.checklist .icon { color: var(--green); margin-top: 2px; }
.meta-list { list-style: none; padding: 0; margin: 1.25rem 0 0; border-top: 1px solid var(--line-soft); }
.meta-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.meta-list li > :first-child { color: var(--muted); }
.meta-list li > :last-child { color: var(--ink); font-weight: 600; }
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.feature-grid li { display: flex; gap: .65rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; font-weight: 550; color: var(--ink); }
.feature-grid .icon { color: var(--primary); margin-top: 2px; }
.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline article { position: relative; padding-bottom: 2rem; }
.timeline article::before { content: ""; position: absolute; left: -1.75rem; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.timeline header { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.timeline header strong { color: var(--ink); font-size: 1.05rem; }
.review-summary { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem; }
.review-summary strong { font-size: 3rem; line-height: 1; color: var(--ink); font-weight: 800; letter-spacing: -.04em; }

/* ---------------------------------------------------------------- prose */
.prose { color: var(--text); max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; scroll-margin-top: 96px; }
.prose h3 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; scroll-margin-top: 96px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r); border: 1px solid var(--line); margin: 1.25rem 0; }
.prose code { background: var(--bg-soft); border: 1px solid var(--line-soft); padding: .1em .4em; border-radius: 6px; color: var(--ink); }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 1rem 1.2rem; border-radius: var(--r); overflow-x: auto; font-size: .88rem; }
.prose pre code { background: none; border: 0; color: inherit; padding: 0; }
.prose blockquote { margin: 1.25rem 0; padding: .9rem 1.2rem; border-left: 3px solid var(--primary); background: var(--primary-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .75rem; text-align: left; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 1.1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: .45rem; align-content: start; }
.field > span:first-child, .label { font-weight: 600; color: var(--ink); font-size: .92rem; }
.hint { color: var(--muted); font-size: .84rem; font-weight: 400; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, textarea {
    width: 100%; font: 400 .97rem/1.5 var(--font); color: var(--ink); background: #fff;
    min-height: 46px; padding: .65rem .9rem; border: 1px solid #d9dde8; border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 140px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
input[type=file] { font: 500 .9rem var(--font); color: var(--muted); }
input[type=file]::file-selector-button { font: 600 .85rem var(--font); margin-right: .75rem; padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); cursor: pointer; }
.is-invalid { border-color: #f09a9a !important; }
.field-error { color: var(--red); font-size: .85rem; font-weight: 550; margin: 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: var(--text); }
.check input { margin-top: .25rem; width: 17px; height: 17px; accent-color: var(--primary); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- alerts */
.alert { display: flex; gap: .7rem; align-items: flex-start; border-radius: var(--r); padding: .9rem 1.1rem; margin-bottom: 1.5rem; font-weight: 550; font-size: .94rem; border: 1px solid transparent; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--green-bg); color: #065f46; border-color: var(--green-line); }
.alert-error { background: var(--red-bg); color: #991b1b; border-color: var(--red-line); }
.alert-info { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-100); }
.alert-warning { background: var(--amber-bg); color: #92400e; border-color: var(--amber-line); }
.flash-wrap { padding-top: 1.5rem; }
.flash-wrap .alert { margin-bottom: 0; }

/* ---------------------------------------------------------------- auth */
.auth { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 3rem 1.25rem; background: radial-gradient(50% 50% at 50% 0%, rgba(91,91,240,.1), transparent), var(--bg-soft); }
.auth-card { width: min(460px, 100%); padding: clamp(1.75rem, 5vw, 2.5rem); box-shadow: var(--shadow-md); }
.auth-card .brand { justify-content: center; display: flex; margin-bottom: 1.5rem; }
.auth-card h1 { font-size: 1.75rem; text-align: center; margin-bottom: .35rem; }
.auth-card > p { color: var(--muted); text-align: center; margin-bottom: 1.75rem; }
.auth-foot { text-align: center; color: var(--muted); font-size: .92rem; margin: 1.5rem 0 0; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- customer area */
.account { padding: 2.5rem 0 5rem; }
.account-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.account-title h1 { font-size: clamp(1.8rem, 3.5vw, 2.3rem); }
.account-title p { color: var(--muted); margin: .4rem 0 0; }
.account-title p strong { color: var(--ink); }

.import-panel { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(280px, 460px); gap: 1.25rem 1.5rem; align-items: center; padding: 1.5rem 1.6rem; border: 1px solid var(--primary-100); border-radius: var(--r-lg); background: linear-gradient(135deg, #f8f8ff, #f0f2fe); margin-bottom: 2rem; }
.import-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(91,91,240,.14) 1px, transparent 1px); background-size: 16px 16px; mask-image: linear-gradient(90deg, #000, transparent 70%); pointer-events: none; }
.import-panel > * { position: relative; }
.import-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--primary); border: 1px solid var(--primary-100); box-shadow: var(--shadow-sm); }
.import-panel h2 { font-size: 1.2rem; margin-bottom: .25rem; }
.import-panel p { color: var(--muted); font-size: .9rem; margin: 0; }
.import-panel > form { display: flex; gap: .6rem; }
.import-panel > form input { flex: 1; min-width: 0; }
.import-panel .field-error, .import-panel .connect-line { grid-column: 2 / -1; }
.connect-line { font-size: .88rem; color: var(--muted); }

.purchase { display: grid; grid-template-columns: auto minmax(0, 1fr) 240px; gap: 1.5rem; padding: 1.5rem; margin-bottom: 1.25rem; }
.purchase h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.purchase h3 a { color: var(--ink); }
.purchase h3 a:hover { color: var(--primary); }
.purchase-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem; font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.code-box { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); overflow: hidden; font-size: .82rem; }
.code-box > span { padding: .5rem .75rem; color: var(--muted); font-weight: 700; font-size: .7rem; letter-spacing: .05em; display: flex; align-items: center; border-right: 1px solid var(--line); background: #fff; }
.code-box code { padding: .5rem .75rem; color: var(--ink); display: flex; align-items: center; overflow-x: auto; white-space: nowrap; }
.code-box button { border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--muted); padding: 0 .7rem; cursor: pointer; display: grid; place-items: center; }
.code-box button:hover { color: var(--primary); }
.purchase-actions { display: flex; flex-direction: column; justify-content: center; gap: .6rem; }
.rate { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.rate form { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin: 0; }
.rate button { background: none; border: 0; padding: 1px; cursor: pointer; color: #d8dce6; line-height: 0; }
.rate button .icon { fill: currentColor; stroke: none; }
.rate button.on { color: #f59e0b; }
.rate form:hover button { color: #d8dce6; }
.rate form button:hover, .rate form button:hover ~ button { color: #f59e0b; }

.key-box { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 1.5rem; border-radius: var(--r-lg); color: #c7c9f7; background: radial-gradient(80% 140% at 100% 0%, rgba(139,92,246,.5), transparent 60%), linear-gradient(135deg, #1e1b4b, #312e81); margin-bottom: 1.5rem; }
.key-box small { display: block; font-weight: 600; margin-bottom: .2rem; }
.key-box code { color: #fff; font-size: clamp(1rem, 2.4vw, 1.35rem); letter-spacing: .08em; user-select: all; }
.key-box .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; box-shadow: none; }
.key-box .btn:hover { background: rgba(255,255,255,.18); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .65rem 1.5rem; margin: 0; font-size: .94rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--ink); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 600; font-size: .8rem; color: var(--muted); padding: .7rem 1rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .9rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfcff; }
.row-link { color: var(--ink); font-weight: 650; }
.row-link:hover { color: var(--primary); }
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty > .icon { color: var(--primary-200); margin: 0 auto .75rem; display: block; }
.empty h3 { margin-bottom: .35rem; }

/* tickets */
.thread { display: grid; gap: 1.1rem; }
.msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; }
.msg-body { border: 1px solid var(--line); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); background: #fff; padding: 1rem 1.2rem; }
.msg-staff .msg-body { background: var(--primary-50); border-color: var(--primary-100); }
.msg-staff .avatar { background: linear-gradient(135deg, #1e1b4b, #5b5bf0); }
.msg-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .45rem; font-size: .86rem; color: var(--muted); }
.msg-head strong { color: var(--ink); font-size: .92rem; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: .95rem; }
.attachments { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.attachments a { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: .82rem; color: var(--text); font-weight: 550; }
.attachments a:hover { border-color: var(--primary-200); color: var(--primary); }
.suggestions { border: 1px solid var(--primary-100); background: var(--primary-50); border-radius: var(--r); padding: .9rem 1.1rem; font-size: .92rem; }
.suggestions ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.ticket-side { position: sticky; top: 96px; display: grid; gap: 1rem; }

/* ---------------------------------------------------------------- help center */
.help-hero { position: relative; overflow: hidden; text-align: center; padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(3rem, 7vw, 4.5rem); color: #c7c9f7; background: radial-gradient(60% 90% at 90% 0%, rgba(139,92,246,.45), transparent 60%), radial-gradient(50% 80% at 0% 100%, rgba(91,91,240,.45), transparent 60%), linear-gradient(135deg, #17153f, #2a2775); }
.help-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(70% 80% at 50% 40%, #000, transparent); pointer-events: none; }
.help-hero > * { position: relative; z-index: 1; }
.help-hero h1 { color: #fff; margin-bottom: .75rem; }
.help-hero p { font-size: 1.1rem; margin: 0 auto 2rem; max-width: 560px; }
.help-hero .breadcrumbs { justify-content: center; }
.help-hero .breadcrumbs a { color: #c7c9f7; }
.search-box { position: relative; max-width: 640px; margin: 0 auto; }
.search-box > .icon { position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; z-index: 1; }
.search-box input { min-height: 60px !important; padding-left: 3.2rem !important; padding-right: 7.5rem !important; border-radius: 14px !important; border-color: transparent !important; font-size: 1.02rem !important; box-shadow: var(--shadow-lg); }
.search-box .btn { position: absolute; right: 8px; top: 8px; bottom: 8px; min-height: 0; }
.categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.category-card { display: flex; flex-direction: column; gap: .75rem; padding: 1.5rem; color: var(--text); }
.category-card:hover { color: var(--text); }
.category-card h3 { color: var(--ink); }
.category-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.category-card .count { margin-top: auto; font-size: .85rem; font-weight: 650; color: var(--primary); }
.article-list { display: grid; }
.article-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.2rem; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.article-list a:last-child { border-bottom: 0; }
.article-list a:hover { background: var(--bg-soft); color: var(--primary); }
.article-list a > .icon { color: var(--subtle); }
.article-list small { display: block; font-weight: 400; color: var(--muted); margin-top: .15rem; }
.article-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; padding-block: 2.5rem 5rem; align-items: start; }
.toc { position: sticky; top: 96px; font-size: .9rem; }
.toc h2 { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; letter-spacing: 0; }
.toc ul { list-style: none; margin: 0 0 1.75rem; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: .3rem 0 .3rem .9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); }
.toc li a:hover, .toc li a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }
.toc li.l3 a { padding-left: 1.7rem; font-size: .85rem; }
.helpful { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.35rem; margin-top: 2.5rem; }
.helpful strong { color: var(--ink); }
.helpful form { display: flex; gap: .5rem; margin: 0; }
.help-cta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.help-cta .card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem; }
.help-cta h3 { margin-bottom: .3rem; }
.help-cta p { color: var(--muted); font-size: .93rem; margin-bottom: .75rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: #0c0b24; color: #a3a6c8; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand b { color: #a5a6ff; }
.site-footer p { font-size: .92rem; max-width: 320px; }
.site-footer h2 { color: #fff; font-size: .95rem; margin-bottom: 1rem; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .92rem; }
.site-footer a { color: #a3a6c8; }
.site-footer a:hover { color: #fff; }
.socials { display: flex; gap: .5rem; margin-top: 1.25rem; }
.socials a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.socials a:hover { background: rgba(255,255,255,.12); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

.pagination { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: 2rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .import-panel { grid-template-columns: auto minmax(0, 1fr); }
    .import-panel > form { grid-column: 1 / -1; }
    .import-panel .field-error, .import-panel .connect-line { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
    .hero .container, .product-layout, .article-layout, .ticket-layout, .grid-2, .help-cta { grid-template-columns: 1fr; }
    .mockup { max-width: 560px; margin: 0 auto; }
    .mockup-window { transform: none; }
    .buy-panel, .toc, .ticket-side { position: static; }
    .purchase { grid-template-columns: auto minmax(0, 1fr); }
    .purchase-actions { grid-column: 1 / -1; flex-direction: row; }
    .purchase-actions .btn { flex: 1; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stats div:nth-child(3) { border-left: 0; }
    .stats div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 860px) {
    .menu-toggle { display: inline-flex; }
    .nav { display: none; position: absolute; top: 72px; left: -1.25rem; right: -1.25rem; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem; box-shadow: var(--shadow-md); }
    .nav.open { display: flex; }
    .nav a { padding: .8rem .75rem; }
    .hide-sm { display: none !important; }
    .site-header .container { gap: .75rem; }
}
@media (max-width: 640px) {
    .features, .form-grid { grid-template-columns: 1fr; }
    .products, .testimonials, .categories { grid-template-columns: 1fr; }
    .mockup-card { display: none; }
    .import-panel { grid-template-columns: 1fr; }
    .import-panel > form { flex-direction: column; }
    .purchase { grid-template-columns: 1fr; }
    .purchase-actions { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .user-chip .name { display: none; }
    .search-box input { padding-right: 1rem !important; }
    .search-box .btn { display: none; }
}

/* utilities */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
figure.testimonial { margin: 0; }

.inline-form { display: inline; margin: 0; }
.btn-block-half { flex: 1; }
.stack > * + * { margin-top: 1rem; }

/* keep grid/flex children from forcing horizontal scroll on small screens */
.product-layout > *, .article-layout > *, .ticket-layout > *, .grid-2 > *, .hero .container > *, .purchase > * { min-width: 0; }
.tabs, .table-wrap, .code-box { max-width: 100%; }
.prose, .product-head h1, .purchase h3 { overflow-wrap: anywhere; }
.prose pre, .prose table { max-width: 100%; }
@media (max-width: 640px) {
    .product-head { flex-direction: column; align-items: flex-start; }
    .license-option { flex-wrap: wrap; }
}

/* ==========================================================================
   Navigation v3 — centered capsule menu + customer-area tab bar
   ========================================================================== */
.site-header .container { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; }
.site-header .brand { justify-self: start; }
.nav {
    flex: none; justify-self: center; gap: 2px; padding: 4px;
    background: rgba(241, 242, 250, .85); border: 1px solid var(--line); border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.nav a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.nav a .icon { color: var(--subtle); transition: color .15s; }
.nav a:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.nav a:hover .icon { color: var(--primary); }
.nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(15,23,42,.1), 0 0 0 1px rgba(91,91,240,.12); }
.nav a[aria-current="page"] .icon { color: var(--primary); }
.nav .nav-account { color: var(--primary-600); }
.header-actions { justify-self: end; margin-left: 0; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); border: 1px solid transparent; }
.icon-btn:hover { background: var(--bg-soft); border-color: var(--line); color: var(--primary); }
.user-chip { padding: .25rem .5rem .25rem .25rem; gap: .35rem; border-radius: 14px; }
.user-chip .avatar { border-radius: 10px; }
.dropdown-head { display: flex; gap: .7rem; align-items: center; }
.dropdown-head .avatar { border-radius: 10px; }

/* customer area tab bar */
.account-bar { background: linear-gradient(180deg, #f7f7ff, #fff); border-bottom: 1px solid var(--line-soft); }
.account-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-block: 1rem .9rem; }
.account-hello { display: flex; align-items: center; gap: .7rem; }
.account-hello .avatar { width: 40px; height: 40px; border-radius: 12px; font-size: .95rem; }
.account-hello strong { display: block; color: var(--ink); font-size: .95rem; line-height: 1.3; }
.account-hello div > span { color: var(--muted); font-size: .8rem; }
.account-tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.account-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.account-tabs a:hover { background: #fff; color: var(--ink); }
.account-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.account-tabs a[aria-current="page"] .icon { color: #a5b4fc; }

@media (max-width: 860px) {
    .site-header .container { display: flex; }
    .header-actions { margin-left: auto; }
    .nav { position: absolute; top: 72px; left: -1.25rem; right: -1.25rem; border-radius: 0; border-width: 0 0 1px; background: #fff; padding: .75rem 1.25rem 1.25rem; }
    .nav a { border-radius: 10px; padding: .8rem .75rem; }
    .account-hello { display: none; }
    .account-bar .container { padding-block: .6rem; }
}

/* layout audit fixes (small screens) */
.form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field, .form-grid > * { min-width: 0; }
select, input, textarea { max-width: 100%; }
.key-box > div { min-width: 0; }
.key-box code { overflow-wrap: anywhere; word-break: break-all; }
.account-title > * { min-width: 0; }
.account > .container > .card, .account > .container > section { min-width: 0; }
@media (max-width: 640px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .key-box { padding: 1rem 1.1rem; }
    .key-box code { font-size: .95rem; letter-spacing: .04em; }
    .table th, .table td { padding: .7rem .75rem; }
}

/* mobile audit: tab bar scrolls inside itself; long file names/hints wrap */
.account-tabs { min-width: 0; max-width: 100%; }
@media (max-width: 860px) { .account-tabs { flex: 1 1 100%; } }
.field > *, .table-wrap { min-width: 0; }
.hint, .field > span { overflow-wrap: anywhere; }
input[type=file] { width: 100%; min-width: 0; }

.table-wrap { position: relative; }

/* ---- licensing v3: key pair, verification, ratings, invoices ---- */
.key-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: .6rem; }
.key-grid .key-box { min-width: 0; }
.key-box-alt code { font-size: .92rem; }
.how-to summary { cursor: pointer; font-weight: 600; color: var(--primary-600); }
.how-to ol { margin: .6rem 0 0; }
.verify-banner { align-items: center; flex-wrap: wrap; }
.verify-banner form { margin-left: auto; }
.container.narrow { max-width: 640px; }
.verify-card { text-align: center; padding: 3rem 2rem; }
.verify-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 1rem; background: var(--primary-50); color: var(--primary); }
.verify-card .actions { justify-content: center; margin-top: 1.25rem; }
.rate-card .rate { margin: .25rem 0 1rem; }
.rate-lg button .icon { width: 28px; height: 28px; }
.invoice-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); }
.invoice-link:hover { color: var(--primary); }
.check > span { display: grid; gap: .15rem; }
.check .hint { display: block; }

/* ---- v4: consent bar, traffic sparkline, maintenance page ---- */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; max-width: 720px; margin: 0 auto; padding: .9rem 1.1rem; background: var(--ink); color: #e5e7ff; border-radius: 14px; box-shadow: 0 12px 40px rgba(15,23,42,.25); font-size: .9rem; }
.consent p { margin: 0; flex: 1 1 260px; }
.consent-actions { display: flex; gap: .5rem; }
.consent .btn-outline { color: #fff; border-color: rgba(255,255,255,.35); }
.spark { display: inline-flex; align-items: flex-end; gap: 1px; height: 22px; width: 90px; vertical-align: middle; }
.spark i { display: block; flex: 1 1 0; min-width: 1px; background: var(--primary); opacity: .75; border-radius: 1px 1px 0 0; }
.spark i.h0 { height: 1px; background: var(--line); }
.traffic-cell { white-space: nowrap; }
.maintenance-page { display: grid; place-items: center; min-height: 100vh; background: var(--bg-soft); }
.maintenance { text-align: center; max-width: 520px; padding: 2rem; }
.maintenance-logo { height: 40px; margin-bottom: 1.5rem; }
.maintenance h1 { margin-bottom: .5rem; }
.spark i.h1{height:10%}.spark i.h2{height:20%}.spark i.h3{height:30%}.spark i.h4{height:40%}.spark i.h5{height:50%}.spark i.h6{height:60%}.spark i.h7{height:70%}.spark i.h8{height:80%}.spark i.h9{height:90%}.spark i.h10{height:100%}

/* phone audit: guest header (brand + Get started + menu) must fit 375px */
@media (max-width: 480px) {
    .site-header .container { gap: .5rem; min-width: 0; }
    .header-actions { gap: .4rem; flex-shrink: 0; }
    .header-actions .btn-dark { padding: .45rem .7rem; font-size: .82rem; }
    .header-actions .btn-dark .icon { display: none; }
    .brand span { font-size: 1rem; }
}
