/* ═══ QR Pro v4 — design tokens: airy white + indigo ═══════════════ */
:root {
    --bg:          #ffffff;
    --surface:     #ffffff;
    --surface-2:   #f5f5f9;
    --surface-3:   #ececf3;
    --surface-4:   #e0dfe9;

    --border:      #e6e5ee;
    --border-2:    #d5d4e2;
    --border-3:    #bcbacb;

    --accent:       #4338ca;
    --accent-mid:   #5b52d8;
    --accent-deep:  #37309f;
    --accent-light: #eef0fd;
    --accent-dim:   rgba(67,56,202,0.07);
    --accent-glow:  rgba(67,56,202,0.16);

    --text-1: #17162b;
    --text-2: #5d5c72;
    --text-3: #9998ac;

    --success:      #16a34a;
    --success-dim:  rgba(22,163,74,0.10);
    --warning-clr:  #c2550a;
    --warning-dim:  rgba(194,85,10,0.09);
    --danger-clr:   #dc2626;

    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    --shadow-sm: 0 1px 2px rgba(23,22,43,0.05);
    --shadow:    0 4px 16px rgba(23,22,43,0.06), 0 1px 4px rgba(23,22,43,0.05);
    --shadow-lg: 0 18px 50px rgba(67,56,202,0.10), 0 4px 14px rgba(23,22,43,0.06);
}

/* ═══ Reset & base ═════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-1);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1060px; margin: 0 auto; padding: 0 22px; }

/* Hero wash — soft indigo gradient behind nav + hero + tool */
.hero-zone {
    background: linear-gradient(180deg, #eef0fd 0%, #f8f8fc 42%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
    padding-bottom: 56px;
}
[dir="rtl"] body { text-align: right; }

/* ═══ Nav ══════════════════════════════════════════════════════════ */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 14px;
    flex-wrap: wrap;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo {
    width: 34px; height: 34px; border-radius: 9px;
    object-fit: contain; background: var(--surface);
    padding: 4px; border: 1px solid var(--border);
    flex-shrink: 0;
}
.nav-brand-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px; font-weight: 700;
    color: var(--text-1); letter-spacing: -0.02em;
}
.nav-links {
    display: flex; align-items: center; gap: 2px;
    list-style: none; margin: 0; padding: 0;
}
.nav-links a {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px; font-weight: 500;
    color: var(--text-2); text-decoration: none;
    padding: 7px 13px; border-radius: 99px;
    transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--accent-dim); color: var(--text-1); }
.nav-links a.active { background: var(--text-1); color: #fff; font-weight: 600; }

/* Language dropdown */
.lang-btn {
    cursor: pointer; font-size: 13px; color: var(--text-2);
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--border-2); border-radius: 99px;
    padding: 6px 13px; display: flex; align-items: center; gap: 7px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.lang-btn:hover { border-color: var(--border-3); }
.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    margin: 0;
    list-style: none;
    min-width: 150px;
}
.dropdown-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-2);
    text-decoration: none;
    padding: 7px 10px; border-radius: var(--radius-sm);
    transition: background 0.12s, color 0.12s;
}
.dropdown-item:hover { background: var(--accent-light); color: var(--accent-deep); }

/* ═══ Hero ═════════════════════════════════════════════════════════ */
.hero { text-align: center; padding: 40px 0 30px; }
.hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 800; letter-spacing: -0.022em; line-height: 1.12;
    margin: 0 0 14px;
}
.hero .qr-word { display: inline-block; position: relative; color: var(--accent); }
.hero .qr-word::after {
    content: ''; position: absolute; left: -2%; right: -2%; bottom: 4px;
    height: 11px; background: var(--accent-glow); border-radius: 4px; z-index: -1;
}
.hero .hero-sub {
    font-size: 16.5px; color: var(--text-2);
    margin: 0 auto; max-width: 500px;
}
.hero .hero-example {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 12.5px; color: var(--text-3);
    margin-top: 16px; display: inline-flex; align-items: center; gap: 9px;
}
.hero .hero-example .mini-qr {
    width: 22px; height: 22px; border-radius: 4px; background: var(--text-1);
    display: inline-grid; place-items: center; color: #fff;
}
.hero .hero-example .mini-qr svg { width: 14px; height: 14px; }

/* ═══ Tool card ════════════════════════════════════════════════════ */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-top: 30px;
    overflow: hidden;
}
.tool-grid { display: grid; grid-template-columns: 1fr 380px; }
.tool-left { padding: 28px 30px 30px; border-right: 1px solid var(--border); min-width: 0; }
[dir="rtl"] .tool-left { border-right: 0; border-left: 1px solid var(--border); }

@media (max-width: 880px) {
    .tool-grid { grid-template-columns: 1fr; }
    .tool-left, [dir="rtl"] .tool-left {
        border-right: 0; border-left: 0;
        border-bottom: 1px solid var(--border);
    }
}

/* Type pills (class kept as .type-tab for JS compatibility) */
.type-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.type-tab {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 500;
    color: var(--text-2); background: var(--surface-2);
    border: 1px solid transparent; border-radius: 99px;
    padding: 7px 14px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.15s;
}
.type-tab:hover { background: var(--surface-3); color: var(--text-1); }
.type-tab.active {
    background: var(--accent-light); color: var(--accent-deep);
    border-color: rgba(67,56,202,0.25); font-weight: 600;
}
.type-tab svg { width: 13px; height: 13px; }

/* Fields */
.type-fields { display: none; }
.field { margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
@media (max-width: 520px) { .field-row { flex-direction: column; gap: 0; } }

.field-label {
    display: block;
    font-size: 13px; font-weight: 600;
    color: var(--text-1);
    margin-bottom: 7px;
}
.field-input {
    width: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14.5px;
    color: var(--text-1); background: var(--surface);
    border: 1.5px solid var(--border-2); border-radius: var(--radius);
    padding: 11px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.field-input { border-radius: var(--radius-lg); padding: 14px 16px; }
.field-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.field-input:disabled { opacity: 0.45; cursor: not-allowed; }
.field-input::placeholder { color: var(--text-3); }
select.field-input { cursor: pointer; }

.field-hint {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 11px;
    color: var(--text-3); margin-top: 6px;
}

.form-check-dark {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: var(--text-2); cursor: pointer;
}
.form-check-dark input { accent-color: var(--accent); width: 15px; height: 15px; }

/* Warning */
#qrWarning {
    display: none;
    background: var(--warning-dim);
    border: 1px solid rgba(194,85,10,0.25);
    border-radius: var(--radius);
    color: var(--warning-clr);
    font-size: 12.5px; line-height: 1.5;
    padding: 10px 14px; margin: 4px 0 12px;
}
#qrWarning div + div { margin-top: 5px; }

/* ═══ Quick style: presets + advanced toggle ═══════════════════════ */
.quick-style-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin: 18px 0 10px;
}
.quick-style-head .field-label { margin: 0; }

.color-presets { display: flex; gap: 9px; flex-wrap: wrap; }
.color-preset {
    width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
    border: 2px solid transparent; padding: 0;
    transition: transform 0.12s, border-color 0.12s;
    position: relative;
}
.color-preset:hover { transform: scale(1.1); }
.color-preset.active { border-color: var(--accent); }
.color-preset.active::after {
    content: ''; position: absolute; inset: -6px;
    border: 2px solid var(--accent-glow); border-radius: 13px;
}
.color-preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.adv-toggle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12.5px; font-weight: 600; color: var(--accent);
    background: none; border: 0; cursor: pointer; padding: 4px 0;
    display: inline-flex; align-items: center; gap: 5px;
}
.adv-toggle svg { width: 12px; height: 12px; transition: transform 0.2s; }
.adv-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.adv-panel {
    display: none; margin-top: 18px; padding-top: 18px;
    border-top: 1px dashed var(--border-2);
}
.adv-panel.open { display: block; }

/* Advanced field labels use mono eyebrow style */
.adv-panel .field-label {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 10px; font-weight: 500;
    color: var(--text-3); text-transform: uppercase; letter-spacing: 0.11em;
}

/* Shape grid (class kept as .sample-shape for JS compatibility) */
.shape-grid { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sample-shape {
    width: 52px; height: 52px; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1.5px solid transparent;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; cursor: pointer; color: var(--text-2);
    transition: all 0.13s;
}
.sample-shape:hover { background: var(--surface-3); }
.sample-shape.selected {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-deep);
}
.sample-shape:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sample-shape svg {
    width: 17px; height: 17px;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.shape-label {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 8.5px;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.sample-shape-content { display: none; }

/* Sliders */
.slider-row { display: flex; align-items: center; gap: 11px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--accent); margin: 0; }
.slider-val {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 12px;
    color: var(--text-2); min-width: 46px; text-align: right;
}
[dir="rtl"] .slider-val { text-align: left; }

/* Colours */
.color-row { display: flex; align-items: center; gap: 10px; }
.color-swatch-btn {
    width: 30px; height: 30px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-2);
    overflow: hidden; flex-shrink: 0; position: relative;
}
.color-swatch-btn input[type="color"] {
    position: absolute; inset: -25%;
    width: 150%; height: 150%;
    border: 0; padding: 0; cursor: pointer;
}
.color-hex-display {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 12px; color: var(--text-2);
}
.color-type-select {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px;
    color: var(--text-2); background: var(--surface-2);
    border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    padding: 6px 8px; cursor: pointer;
}

/* Logo upload */
.logo-upload-zone {
    display: flex; align-items: flex-start; gap: 14px;
    background: var(--surface-2);
    border: 1.5px dashed var(--border-2);
    border-radius: var(--radius-lg);
    padding: 14px;
}
#logoPreview {
    display: none; width: 46px; height: 46px;
    border-radius: var(--radius-sm); object-fit: contain;
    background: #fff; border: 1px solid var(--border);
}
.upload-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
    background: var(--accent-light);
    border: 1px solid rgba(67,56,202,0.25); border-radius: 99px;
    padding: 6px 14px; cursor: pointer;
    transition: background 0.14s;
}
.upload-btn:hover { background: #e2e5fb; }
.remove-logo-btn {
    display: none;
    font-size: 12.5px; font-weight: 500; color: var(--text-2);
    background: none; border: 1px solid var(--border-2); border-radius: 99px;
    padding: 6px 14px; cursor: pointer; margin-left: 7px;
    transition: color 0.14s, border-color 0.14s;
}
.remove-logo-btn:hover { color: var(--danger-clr); border-color: var(--danger-clr); }
[dir="rtl"] .remove-logo-btn { margin-left: 0; margin-right: 7px; }
.logo-note {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 11px;
    color: var(--text-3); margin-top: 7px; line-height: 1.4;
}

/* ═══ Preview panel (right) ════════════════════════════════════════ */
.preview-panel {
    background: linear-gradient(180deg, #fafafe 0%, var(--surface-2) 100%);
    padding: 28px 26px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.qr-canvas-area {
    width: 100%; max-width: 300px;
    border-radius: var(--radius-lg);
    background: #fff; border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; min-height: 240px;
}
#qrCode { display: flex; align-items: center; justify-content: center; }
#qrCode canvas { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

.qr-placeholder-inner { text-align: center; color: rgba(23,22,43,0.15); padding: 34px 0; }
.qr-placeholder-inner svg { width: 64px; height: 64px; stroke: currentColor; margin-bottom: 10px; }
.qr-placeholder-inner p {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 12px;
    margin: 0; letter-spacing: 0.03em;
}

.qr-loader {
    width: 34px; height: 34px;
    border: 3px solid var(--accent-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: qr-spin 0.7s linear infinite;
    margin: 40px auto;
}
@keyframes qr-spin { to { transform: rotate(360deg); } }

.qr-error {
    color: var(--danger-clr); font-size: 13px;
    padding: 20px; text-align: center;
}

/* Stats */
.qr-info-bar {
    display: none; align-items: center; gap: 16px;
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 11px;
}
.qr-stat { display: flex; align-items: baseline; gap: 5px; }
.qr-stat-label { color: var(--text-3); }
.qr-stat-val { color: var(--text-2); font-weight: 500; }
.qr-stat-sep { width: 1px; height: 12px; background: var(--border-2); }

/* Density */
.density-bar-wrap { display: none; width: 100%; max-width: 300px; }
.density-label-row {
    display: flex; justify-content: space-between; margin-bottom: 5px;
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 10px;
}
.density-label { color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; }
.density-pct { color: var(--text-2); }
.density-track {
    height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden;
}
.density-fill {
    height: 100%; width: 0; background: var(--accent);
    border-radius: 99px; transition: width 0.3s, background 0.3s;
}

/* Buttons */
.btn-generate, .btn-png {
    width: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 600;
    color: #fff; background: var(--accent);
    border: 0; border-radius: 14px; padding: 14px 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    box-shadow: 0 6px 18px var(--accent-glow);
    transition: background 0.15s, transform 0.12s;
}
.btn-generate:hover, .btn-png:hover:not(:disabled) {
    background: var(--accent-deep); transform: translateY(-1px);
}
.btn-png:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-generate svg, .btn-png svg { width: 16px; height: 16px; }

.btn-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; width: 100%; }
.btn-sec, .btn-util {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 500;
    color: var(--text-2); background: #fff;
    border: 1px solid var(--border-2); border-radius: 11px;
    padding: 10px 12px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: all 0.14s;
}
.btn-sec:hover:not(:disabled), .btn-util:hover {
    border-color: var(--accent); color: var(--accent-deep);
}
.btn-sec:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sec svg, .btn-util svg { width: 13px; height: 13px; }
.btn-row-3 { width: 100%; }
.btn-row-3 .btn-util { width: 100%; }

/* ═══ Benefits ═════════════════════════════════════════════════════ */
.benefits {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    padding: 46px 0 4px;
}
@media (max-width: 880px) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .benefits { grid-template-columns: 1fr; } }
.benefit {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px 20px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.benefit:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.benefit .b-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--accent-light); color: var(--accent-deep);
    display: grid; place-items: center; margin-bottom: 13px;
}
.benefit .b-icon svg { width: 17px; height: 17px; }
.benefit h2 {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700;
    margin: 0 0 5px; letter-spacing: -0.01em;
}
.benefit p { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.55; }

/* Best practices card */
.practices-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px 20px;
    width: 100%;
}
.practices-title {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 9px; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px;
}
.practices-card ul {
    margin: 0; padding: 0; list-style: none;
    display: flex; flex-direction: column; gap: 8px;
}
.practices-card li {
    font-size: 12px; color: var(--text-2);
    display: flex; gap: 8px; align-items: flex-start;
}
.practices-card li::before { content: '—'; color: var(--accent); flex-shrink: 0; }

/* ═══ FAQ ══════════════════════════════════════════════════════════ */
.faq { padding: 46px 0 4px; max-width: 780px; }
.faq-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px; font-weight: 800; letter-spacing: -0.022em;
    margin: 0 0 18px;
}
.faq-item {
    border-bottom: 1px solid var(--border);
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 15px 34px 15px 0;
    font-size: 15px; font-weight: 600; color: var(--text-1);
    position: relative;
    transition: color 0.14s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::after {
    content: '';
    position: absolute; right: 6px; top: 50%;
    width: 9px; height: 9px;
    border-right: 2px solid var(--text-3);
    border-bottom: 2px solid var(--text-3);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    transform: translateY(-25%) rotate(-135deg);
    border-color: var(--accent);
}
.faq-item p {
    margin: 0; padding: 0 40px 18px 0;
    font-size: 14px; color: var(--text-2); line-height: 1.62;
}
[dir="rtl"] .faq-item summary { padding: 15px 0 15px 34px; }
[dir="rtl"] .faq-item summary::after { right: auto; left: 6px; }
[dir="rtl"] .faq-item p { padding: 0 0 18px 40px; }

/* ═══ Footer ═══════════════════════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 52px; padding: 24px 0 32px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    font-size: 13px; color: var(--text-3);
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); text-decoration: none; transition: color 0.14s; }
.footer-links a:hover { color: var(--accent); }

/* ═══ Toast ════════════════════════════════════════════════════════ */
#toast {
    position: fixed; bottom: 26px; left: 50%;
    transform: translate(-50%, 16px);
    background: var(--text-1); color: #fff;
    font-size: 13.5px; font-weight: 500;
    padding: 11px 22px; border-radius: 99px;
    box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 500;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ═══ Content pages (about / privacy / terms / blog) ═══════════════ */
.page-main { padding: 36px 0 10px; }
.page-main h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800; letter-spacing: -0.022em;
    margin: 0 0 8px;
}
.page-updated {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 12px;
    color: var(--text-3); margin-bottom: 28px;
}
.page-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); box-shadow: var(--shadow);
    padding: 34px 38px; max-width: 780px;
}
@media (max-width: 560px) { .page-card { padding: 24px 20px; } }
.page-card h2 {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; font-weight: 700;
    letter-spacing: -0.01em; margin: 28px 0 10px;
}
.page-card h2:first-child { margin-top: 0; }
.page-card p, .page-card li { font-size: 14.5px; color: var(--text-2); }
.page-card ul { padding-left: 20px; }
.page-card li { margin-bottom: 6px; }
.page-card a { color: var(--accent); }
.page-card strong { color: var(--text-1); }

/* Blog cards */
.blog-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
    margin-top: 26px;
}
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
    display: block; text-decoration: none;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-tag {
    display: inline-block;
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--accent-deep); background: var(--accent-light);
    border-radius: 99px; padding: 3px 11px; margin-bottom: 12px;
}
.blog-card h2 {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 700;
    letter-spacing: -0.01em; color: var(--text-1); margin: 0 0 7px;
}
.blog-card p { font-size: 13.5px; color: var(--text-2); margin: 0 0 12px; }
.read-time {
    font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 11px; color: var(--text-3);
}

/* Article body */
.article-card { max-width: 720px; }
.article-card h1 { font-size: clamp(24px, 4vw, 32px); }

/* ═══ Utilities & a11y ═════════════════════════════════════════════ */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip: rect(0 0 0 0); overflow: hidden;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}


/* ═══ v5 — module styling controls ════════════════════════════════ */
.style-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.style-row  { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.style-row-label {
    font-size: 12px; font-weight: 600; color: var(--text-2);
    min-width: 58px;
}
.style-swatches { display: flex; gap: 7px; }
.style-swatch {
    width: 42px; height: 42px;
    border: 1.5px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 7px;
    transition: border-color .15s, background .15s, color .15s;
}
.style-swatch svg { width: 100%; height: 100%; }
.style-swatch:hover { border-color: var(--accent-mid); color: var(--accent); }
.style-swatch[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.style-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* SCAN ME frame toggle */
.frame-row { padding-top: 2px; }
.frame-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.frame-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.frame-switch-track {
    position: relative; flex-shrink: 0;
    width: 40px; height: 22px;
    background: var(--border-2);
    border-radius: 999px;
    transition: background .15s;
}
.frame-switch-track::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: var(--shadow-sm);
    transition: left .15s;
}
.frame-switch input:checked + .frame-switch-track { background: var(--accent); }
.frame-switch input:checked + .frame-switch-track::after { left: 21px; }
.frame-switch input:focus-visible + .frame-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.frame-switch-label { font-size: 13px; font-weight: 600; color: var(--text-1); }
.frame-text-input {
    width: 130px; padding: 7px 11px;
    border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-1); background: var(--surface);
}
.frame-text-input:focus { outline: 2px solid var(--accent-glow); border-color: var(--accent); }

/* Scan check */
.scan-check {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px;
    font-size: 12.5px; font-weight: 600;
    line-height: 1.45;
}
.scan-check-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.scan-check.pass { color: var(--success); }
.scan-check.pass .scan-check-dot { background: var(--success); }
.scan-check.warn { color: var(--warning-clr); }
.scan-check.warn .scan-check-dot { background: var(--warning-clr); }
.scan-check.fail { color: var(--danger-clr); }
.scan-check.fail .scan-check-dot { background: var(--danger-clr); }

/* NEW badge on type pill */
.type-tab { position: relative; }
.pill-badge-new {
    position: absolute; top: -7px; right: -5px;
    background: var(--success); color: #fff;
    font-size: 8px; font-weight: 800; letter-spacing: .05em;
    padding: 2px 5px; border-radius: 999px;
    line-height: 1.2;
}

/* Landing-page guide section */
.lp-guide { max-width: 720px; margin: 56px auto 0; }
.lp-guide h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px; font-weight: 800; color: var(--text-1);
    margin: 0 0 12px;
}
.lp-guide h3 { font-size: 16px; font-weight: 700; color: var(--text-1); margin: 22px 0 8px; }
.lp-guide p  { color: var(--text-2); font-size: 14.5px; margin: 0 0 12px; }
.lp-guide ul { color: var(--text-2); font-size: 14.5px; padding-left: 20px; margin: 0 0 12px; }
.lp-guide li { margin-bottom: 6px; }

/* v5.1: seven swatches per row wrap on small screens */
.style-swatches { flex-wrap: wrap; }
@media (max-width: 480px) { .style-swatch { width: 38px; height: 38px; } }

/* ═══ v6 — mode switch (Generate / Scan) ═════════════════════════ */
.mode-switch { display: flex; justify-content: center; margin: 0 0 22px; }
.seg {
    display: flex; gap: 4px; padding: 5px;
    background: var(--surface); border: 1.5px solid var(--border-2);
    border-radius: 999px; box-shadow: var(--shadow-sm);
}
.seg-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border-radius: 999px; padding: 10px 24px;
    font-size: 14px; font-weight: 700; color: var(--text-2);
    text-decoration: none; transition: all .15s;
}
.seg-btn svg { width: 16px; height: 16px; }
.seg-btn:hover { color: var(--accent); background: var(--accent-light); }
.seg-btn.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px var(--accent-glow); }
.seg-btn.active:hover { color: #fff; background: var(--accent); }

/* ═══ v6 — type picker: Show all pill + inline categorized panel ═ */
.type-tab-more { border-style: dashed; color: var(--accent); font-weight: 700; }
.type-tab-more.open { border-color: var(--accent); background: var(--accent-light); }
.type-tab-more svg { transition: transform .18s; }
.type-tab-more.open svg { transform: rotate(180deg); }

.type-panel {
    overflow: hidden; max-height: 0;
    transition: max-height .28s ease;
    border: 0 solid var(--border); border-radius: var(--radius-md);
    margin: 0;
}
.type-panel.open { max-height: 720px; border-width: 1px; margin: 12px 0 4px; }
.type-panel-inner { padding: 16px 16px 10px; background: var(--surface-2); }
.tp-cat { margin-bottom: 14px; }
.tp-cat:last-child { margin-bottom: 4px; }
.tp-cat-title {
    font-size: 11px; font-weight: 800; letter-spacing: .07em;
    text-transform: uppercase; color: var(--text-3); margin-bottom: 7px;
}
.tp-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.tp-item {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1.5px solid var(--border-2); background: var(--surface);
    border-radius: 9px; padding: 7px 12px;
    font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-1);
    cursor: pointer; transition: all .13s;
}
.tp-item svg { width: 14px; height: 14px; flex: none; }
.tp-item:hover { border-color: var(--accent-mid); color: var(--accent); }
.tp-item.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.tp-new {
    font-size: 8.5px; font-weight: 800; color: var(--success);
    border: 1px solid currentColor; border-radius: 999px; padding: 1px 5px;
}

/* ═══ v6 — icon logo grid ════════════════════════════════════════ */
.icon-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.icon-btn {
    width: 36px; height: 36px; padding: 7px;
    border: 1.5px solid var(--border-2); border-radius: 8px;
    background: var(--surface); color: var(--text-2); cursor: pointer;
    transition: all .13s;
}
.icon-btn svg { width: 100%; height: 100%; }
.icon-btn:hover { border-color: var(--accent-mid); color: var(--accent); }
.icon-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

/* ═══ v6 — hub doors ═════════════════════════════════════════════ */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 4px; }
@media (max-width: 640px) { .doors { grid-template-columns: 1fr; } }
.door {
    position: relative; display: flex; gap: 15px; align-items: flex-start;
    border: 1.5px solid var(--border-2); background: var(--surface);
    border-radius: 16px; padding: 22px; text-align: left; text-decoration: none;
    transition: all .16s;
}
.door:hover { border-color: var(--accent-mid); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(67,56,202,.12); }
.door-ico {
    width: 44px; height: 44px; flex: none; border-radius: 11px;
    background: var(--accent-light); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.door-ico svg { width: 22px; height: 22px; }
.door h2 { font-size: 16px; font-weight: 800; color: var(--text-1); margin: 0 0 4px; }
.door p { font-size: 13px; color: var(--text-2); line-height: 1.55; margin: 0; }
.door .door-go { position: absolute; top: 20px; right: 18px; color: var(--text-3); font-weight: 800; }
.door:hover .door-go { color: var(--accent); }

/* ═══ v6 — scanner ═══════════════════════════════════════════════ */
.scan-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; }
@media (max-width: 700px) { .scan-grid { grid-template-columns: 1fr; } }
.scan-drop {
    border: 2px dashed var(--accent-mid); background: var(--accent-light);
    border-radius: 14px; padding: 34px 20px; text-align: center;
    cursor: pointer; transition: all .15s; color: var(--text-1);
}
.scan-drop:hover, .scan-drop.dragover { background: #e3e7fc; }
.scan-drop svg { color: var(--accent); margin-bottom: 10px; }
.scan-drop b { display: block; font-size: 15px; margin-bottom: 4px; }
.scan-drop span { font-size: 12.5px; color: var(--text-2); }
.scan-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--text-3); font-size: 11px; font-weight: 700; }
.scan-or::before, .scan-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cam-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
    border: 1.5px solid var(--accent); color: var(--accent); background: var(--surface);
    border-radius: 11px; padding: 12px; font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
}
.cam-btn:hover { background: var(--accent-light); }
.cam-btn.stop { border-color: var(--danger-clr); color: var(--danger-clr); }
#camVideo { width: 100%; border-radius: 12px; margin-top: 12px; display: none; background: #000; }
.scan-priv { margin-top: 12px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.5; }
.scan-result { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: var(--surface-2); }
.scan-result .rt { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--success); margin-bottom: 10px; }
.scan-result .rt .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.scan-result .rt.idle { color: var(--text-3); } .scan-result .rt.idle .dot { background: var(--text-3); }
.rkind { display: inline-block; background: var(--accent-light); color: var(--accent); font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 3px 9px; margin-bottom: 10px; letter-spacing: .04em; }
.rval { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 12px; font-size: 13px; word-break: break-all; margin-bottom: 12px; min-height: 44px; }
.racts { display: flex; gap: 8px; flex-wrap: wrap; }
.rbtn { border: 1.5px solid var(--border-2); background: var(--surface); border-radius: 9px; padding: 8px 14px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--text-1); }
.rbtn:hover { border-color: var(--accent-mid); color: var(--accent); }
.rbtn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rbtn.primary:hover { background: var(--accent-hover); color: #fff; }
.rnote { margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* ═══ v7 — style packages, ball color, logo controls, modal, busy ═ */
.theme-row { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-chip {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    border: 1.5px solid var(--border-2); border-radius: 11px; padding: 7px 9px 5px;
    background: var(--surface); cursor: pointer; transition: all .14s;
    font-family: inherit;
}
.theme-chip svg { width: 40px; height: 40px; border-radius: 7px; }
.theme-chip span { font-size: 10px; font-weight: 700; color: var(--text-2); }
.theme-chip:hover { border-color: var(--accent-mid); transform: translateY(-1px); }
.theme-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-light); box-shadow: 0 0 0 3px var(--accent-glow); }
.theme-chip[aria-pressed="true"] span { color: var(--accent); }

.match-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 600; cursor: pointer; }
.match-label input { accent-color: var(--accent); }

.more-btn { border-style: dashed !important; }
.more-icons-btn {
    margin-top: 8px; border: 1.5px dashed var(--border-2); background: var(--surface);
    border-radius: 9px; padding: 6px 13px; font-family: inherit; font-size: 12px;
    font-weight: 700; color: var(--accent); cursor: pointer;
}
.more-icons-btn:hover { border-color: var(--accent); background: var(--accent-light); }

/* icon catalog modal */
.icon-modal {
    position: fixed; inset: 0; z-index: 400; display: flex;
    align-items: center; justify-content: center;
    background: rgba(23,22,43,.45); backdrop-filter: blur(3px); padding: 20px;
}
.im-card {
    background: var(--surface); border-radius: 16px; width: 100%; max-width: 520px;
    max-height: 82vh; display: flex; flex-direction: column; padding: 18px;
    box-shadow: 0 30px 70px rgba(23,22,43,.3);
}
.im-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.im-head h3 { font-size: 15px; font-weight: 800; }
.im-close { border: none; background: var(--surface-2); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.im-close:hover { background: var(--accent-light); color: var(--accent); }
.im-search {
    border: 1.5px solid var(--border-2); border-radius: 10px; padding: 9px 13px;
    font-family: inherit; font-size: 13px; margin-bottom: 12px;
}
.im-search:focus { outline: 2px solid var(--accent-glow); border-color: var(--accent); }
.im-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 7px; overflow-y: auto; padding: 2px;
}
.im-icon {
    aspect-ratio: 1; border: 1.5px solid var(--border-2); border-radius: 10px;
    background: var(--surface); color: var(--text-1); cursor: pointer; padding: 9px;
    transition: all .12s;
}
.im-icon svg { width: 100%; height: 100%; }
.im-icon:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.im-skel { aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.im-empty { grid-column: 1/-1; text-align: center; color: var(--text-3); font-size: 13px; padding: 20px; }
.im-license { font-size: 10.5px; color: var(--text-3); margin-top: 10px; text-align: center; }

/* preview busy overlay */
.qr-canvas-area { position: relative; }
.preview-busy {
    position: absolute; inset: 0; z-index: 5; display: flex;
    flex-direction: column; gap: 10px; align-items: center; justify-content: center;
    background: rgba(255,255,255,.82); border-radius: inherit;
    font-size: 12.5px; font-weight: 700; color: var(--text-2);
}
.pb-spin {
    width: 26px; height: 26px; border-radius: 50%;
    border: 3px solid var(--accent-light); border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ v7.1 — style tabs, chip strip, accordion groups ════════════ */
.shuffle-btn {
    border: 1.5px dashed var(--accent); background: var(--accent-light); color: var(--accent);
    border-radius: 999px; padding: 5px 13px; font-family: inherit; font-size: 11.5px;
    font-weight: 800; cursor: pointer;
}
.shuffle-btn:hover { background: #e0e4fb; }
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 9px; }
.cat-tab {
    border: 1.5px solid var(--border-2); background: var(--surface); border-radius: 999px;
    padding: 4px 12px; font-family: inherit; font-size: 11px; font-weight: 700;
    color: var(--text-2); cursor: pointer; transition: all .13s;
}
.cat-tab:hover { border-color: var(--accent); color: var(--accent); }
.cat-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.theme-row { display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px 9px; scrollbar-width: thin; flex-wrap: nowrap; }

.opt-group { border: 1px solid var(--border); border-radius: 13px; margin-top: 10px; overflow: hidden; background: var(--surface); }
.opt-head {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px;
    background: var(--surface-2); border: none; font-family: inherit; font-size: 12.5px;
    font-weight: 800; color: var(--text-1); cursor: pointer; text-align: left;
}
.opt-head:hover .opt-title { color: var(--accent); }
.opt-head .chev { flex: none; transition: transform .2s; color: var(--text-3); }
.opt-group.open .opt-head .chev { transform: rotate(90deg); color: var(--accent); }
.opt-peek { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.opt-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.opt-group.open .opt-body { max-height: 900px; }
.opt-inner { padding: 13px 14px; }
.opt-inner .field { margin-bottom: 12px; }
.opt-inner .field:last-child { margin-bottom: 0; }

/* ═══ v7.2 — ad slots + style group top ═════════════════════════ */
.ad-slot { display: flex; justify-content: center; margin: 22px 0; min-height: 0; }
.ad-slot:not(.ad-filled) { display: none; }
.ad-slot.ad-filled { min-height: 90px; }
.style-group-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }
