/* =====================================================================
   PresetShift — landing v9 restyle
   Dark theme from the "PresetShift Restyling" canvas; light theme derived
   from it with the approved translucent (glass) panels.
   ===================================================================== */

:root {
    --bg: #110f0d;
    --bg-alt: #141210;
    --card-bg: #1a1715;
    --surface-inner: #1f1c19;
    --surface-2: #2a2622;
    --border-color: #2e2a26;
    --border-subtle: #221f1c;
    --border-hover: #3a3530;
    --border-dashed: #4a443e;
    --accent: #c2611f;            /* the original PresetShift orange */
    --accent-hover: #d46b28;
    --accent-text: #d46b28;       /* small orange text: 5.0:1 on the page */
    --accent-strong: #b13a0a;     /* fill behind white text */
    --on-accent: #160c05;
    --text-primary: #f2efea;
    --text-muted: #b0a9a2;
    --text-dim: #a39c95;
    --text-faint: #8c857e;
    --success: #34d399;
    /* Panel tokens: opaque in dark mode, glass in light mode */
    --glass-bg: var(--card-bg);
    --glass-border: var(--border-color);
    --glass-highlight: transparent;
    --glass-sep: var(--border-color);
    --glass-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    --tip-bg: #1f1a15;
    --tip-border: #3a2c20;
    --font-body: 'Instrument Sans', system-ui, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="light"] {
    --bg: #f2ede8;
    --bg-alt: #ebe5df;
    --card-bg: #ffffff;
    --surface-inner: #f7f4f0;
    --surface-2: #ece6df;
    --border-color: #e2ddd8;
    --border-subtle: #eae5df;
    --border-hover: #cbbfb4;
    --border-dashed: #c9bfb4;
    --accent: #ea580c;
    --accent-hover: #c2410c;
    --accent-text: #bd3f0b;       /* 4.65:1 on the page background */
    --accent-strong: #b13a0a;
    --on-accent: #160c05;
    --text-primary: #1a1714;
    --text-muted: #6b6560;
    --text-dim: #7a736d;
    --text-faint: #8c857e;
    --success: #047857;
    --glass-bg: rgba(255, 255, 255, 0.48);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-highlight: rgba(255, 255, 255, 0.95);
    --glass-sep: rgba(70, 45, 20, 0.09);
    --glass-shadow: 0 12px 40px rgba(80, 50, 20, 0.10);
    --tip-bg: rgba(234, 88, 12, 0.08);
    --tip-border: rgba(234, 88, 12, 0.35);
}

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

html {
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Soft color glow behind the page, light theme only (what the glass panels blur) */
[data-theme="light"] body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(55% 45% at 12% 8%, rgba(234, 88, 12, 0.18), transparent 70%),
        radial-gradient(45% 40% at 88% 28%, rgba(255, 196, 150, 0.45), transparent 70%),
        radial-gradient(50% 45% at 55% 95%, rgba(234, 88, 12, 0.12), transparent 70%);
}

a {
    text-decoration: none;
    color: inherit;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

main, .site-header, .site-footer {
    position: relative;
    z-index: 1;
}

/* ---- Header ---- */
.site-header {
    border-bottom: 1px solid var(--border-subtle);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px clamp(16px, 4vw, 32px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.nav-brand span,
.footer-brand span {
    color: var(--accent);
}

.nav-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 10px 14px;
    font-size: 15px;
    color: var(--text-muted);
    border-radius: 8px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* ---- Theme segmented control (sliding indicator) ---- */
.theme-segmented {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 3px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    height: 44px;
}

.theme-indicator {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 36px;
    height: 36px;
    background: var(--surface-2);
    border-radius: 999px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

[data-theme="light"] .theme-indicator {
    transform: translateX(36px);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.theme-btn {
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-faint);
    transition: color 0.2s ease;
    padding: 0;
    border-radius: 999px;
}

.theme-btn.active,
.theme-btn:hover {
    color: var(--text-primary);
}

/* ---- First screen ---- */
.first-screen {
    min-height: calc(100vh - 85px);
    display: flex;
    flex-direction: column;
}

.hero {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px clamp(16px, 4vw, 32px);
    display: flex;
    flex-wrap: wrap;
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
}

.hero-text {
    flex: 1 1 420px;
    min-width: 0;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 3.15vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-line {
    display: inline;
}

.hero-accent {
    font-style: italic;
    font-weight: 700;
    color: var(--accent);
}

.hero-sub {
    margin-top: 24px;
    max-width: 38ch;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
}

.hero-proof-row {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
    padding: 10px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    width: fit-content;
}

:root:not([data-theme="light"]) .hero-proof-row {
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--border-subtle);
}

[data-theme="light"] .hero-proof-row {
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
}

.hero-proof-item {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.hero-proof-num {
    font-size: 19px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero-proof-num span {
    color: var(--text-primary);
}

.hero-proof-label {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1;
}

.hero-proof-dot {
    color: var(--text-faint);
    user-select: none;
}

/* ---- Converter card ---- */
.hero-card {
    flex: 1 1 420px;
    max-width: 580px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.converter-shell {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid var(--accent);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow), 0 0 40px rgba(194, 97, 31, 0.12);
    overflow: hidden;
}

:root:not([data-theme="light"]) .converter-shell {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.converter-toggle {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-alt);
}

[data-theme="light"] .converter-toggle {
    background: rgba(255, 255, 255, 0.35);
}

.converter-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc(50% - 8px);
    background: var(--surface-2);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px var(--border-hover);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

[data-theme="light"] .converter-indicator {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.converter-toggle.tab-mobile-active .converter-indicator {
    transform: translateX(calc(100% + 4px));
}

.toggle-btn {
    position: relative;
    z-index: 2;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.toggle-btn:hover,
.toggle-btn.active {
    color: var(--text-primary);
}

.converter-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.converter-panel {
    animation: panelIn 0.22s ease;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.card-meta {
    font-size: 12px;
    color: var(--text-dim);
}

/* Drop zone */
.drop-zone {
    margin-top: 20px;
    min-height: 300px;
    padding: 40px 20px 32px;
    justify-content: center;
    border: 1.5px dashed var(--border-dashed);
    border-radius: 14px;
    background: var(--surface-inner);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
}

[data-theme="light"] .drop-zone {
    background: rgba(255, 255, 255, 0.45);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent);
    background: var(--surface-2);
}

[data-theme="light"] .drop-zone:hover,
[data-theme="light"] .drop-zone.dragover {
    background: rgba(255, 255, 255, 0.75);
}

.drop-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-icon {
    transition: color 0.3s;
}

.drop-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.drop-formats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.tag-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-faint);
}

.tag {
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text-muted);
    min-width: 92px;
    text-align: center;
}

.tag.accent {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text-primary);
}

.tag-arrow {
    flex: none;
}

/* Primary button */
.btn-file {
    margin-top: 16px;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-file:hover {
    background: var(--accent-hover);
}

.btn-file:active {
    transform: translateY(1px);
}

.card-hint {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dim);
}

.card-hint strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Conversion progress bar ---- */
.c1-progress-section {
    margin-top: 1rem;
    width: 100%;
}

.c1-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.c1-status-msg {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease;
}

.c1-progress-track {
    height: 6px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

[data-theme="light"] .c1-progress-track {
    background: rgba(0, 0, 0, 0.08);
}

.c1-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.1s linear;
}

/* "Done!" and hourly-limit messages under the converter */
.convert-status {
    text-align: center;
    padding-top: 1rem;
    color: var(--success);
    font-size: 0.9rem;
}

/* ---- Built by Daniele: row under the card ---- */
.author-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px;
}

.author-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.author-links {
    font-size: 13px;
    color: var(--text-dim);
}

.author-links a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.author-links a:hover {
    color: var(--text-primary);
}

.author-dot {
    margin: 0 0.4rem;
    color: var(--text-faint);
}


.coffee-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(194, 97, 31, 0.14);
    border: 1px solid rgba(194, 97, 31, 0.45);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.2s, border-color 0.2s;
}

.coffee-btn svg {
    color: var(--accent);
}

.coffee-btn:hover {
    background: rgba(194, 97, 31, 0.24);
    border-color: var(--accent);
}

.scroll-cue {
    align-self: center;
    margin: auto 0 20px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-dim);
    transition: color 0.2s;
}

.scroll-cue:hover {
    color: var(--text-primary);
}

[data-theme="light"] .coffee-btn {
    background: rgba(234, 88, 12, 0.12);
    border-color: rgba(234, 88, 12, 0.45);
}

[data-theme="light"] .coffee-btn:hover {
    background: rgba(234, 88, 12, 0.22);
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 4px;
    font-size: 14px;
    color: var(--text-dim);
    transition: color 0.2s;
}

.support-link svg {
    color: var(--accent);
}

.support-link:hover {
    color: var(--text-primary);
}

/* ---- Sections ---- */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(64px, 9vw, 112px) clamp(16px, 4vw, 32px) 0;
}

.section.engine {
    padding-top: clamp(32px, 5vw, 56px);
}

.section.limits {
    padding-top: 56px;
}

.eyebrow {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-text);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.015em;
}

.engine .section-title {
    margin-top: 12px;
    max-width: 18ch;
}

.section-lead {
    margin-top: 16px;
    max-width: 62ch;
    font-size: 16px;
    color: var(--text-muted);
}

/* ---- What carries over ---- */
.feature-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
}

:root:not([data-theme="light"]) .feature-grid {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}

.feature {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 0 0 0.5px var(--glass-sep);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .feature-icon {
    background: rgba(234, 88, 12, 0.12);
}

.feature-name {
    font-weight: 600;
}

.feature-desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-dim);
}

/* ---- Limits ---- */
.limits-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.limits-box {
    flex: 1 1 440px;
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

[data-theme="light"] .limits-box {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    border-color: var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
}

.limits-box h3,
.tip-box h3 {
    font-size: 18px;
    font-weight: 600;
}

.limits-box ul {
    margin-top: 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.limits-box li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 15px;
    color: var(--text-muted);
}

.limits-box li svg {
    flex: none;
    margin-top: 3px;
    color: var(--text-faint);
}

.tip-box {
    flex: 1 1 340px;
    min-width: 0;
    padding: 28px;
    border-radius: 16px;
    background: var(--tip-bg);
    border: 1px solid var(--tip-border);
}

.tip-head {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--accent);
}

.tip-head h3 {
    color: var(--text-primary);
}

.tip-box p {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.tip-box .mono {
    font-size: 14px;
    color: var(--text-primary);
}

/* ---- FAQ ---- */
.faq-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    column-gap: 48px;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item summary {
    min-height: 64px;
    padding: 20px 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    flex: none;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-dim);
    transition: transform 0.2s, color 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--accent);
}

.faq-item summary:hover {
    color: var(--accent-text);
}

.faq-item > p {
    padding: 0 0 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

.faq-item > p a {
    color: var(--accent-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Footer ---- */
.site-footer {
    margin-top: clamp(80px, 10vw, 128px);
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-alt);
}

[data-theme="light"] .site-footer {
    background: rgba(255, 255, 255, 0.3);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px clamp(16px, 4vw, 32px);
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
}

.footer-by {
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-dim);
}

.footer-by a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-by a:hover {
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.footer-links > a:not(.coffee-btn) {
    font-size: 14px;
    color: var(--text-dim);
    transition: color 0.2s;
}

.footer-links > a:not(.coffee-btn):hover {
    color: var(--text-primary);
}

.footer-support {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-support p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 56ch;
}

.legal {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-faint);
    max-width: 900px;
}

/* ---- Legal pages (Privacy, Terms) ---- */
.legal-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px clamp(16px, 4vw, 32px) 80px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

.legal-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: clamp(24px, 4vw, 48px);
    color: var(--text-muted);
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
}

[data-theme="light"] .legal-box {
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
}

.legal-box h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.legal-box h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 10px;
}

.legal-box p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-box ul {
    margin: 8px 0 16px 20px;
    font-size: 15px;
    line-height: 1.8;
}

.legal-box strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-box a {
    color: var(--accent-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-box code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--surface-2);
    border-radius: 4px;
    padding: 1px 6px;
}

/* ---- Donate / training opt-in checkbox ---- */
.donate-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    cursor: pointer;
    user-select: none;
}

.donate-checkbox-wrap {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 3px;
}

.donate-checkbox-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.donate-checkmark {
    position: absolute;
    inset: 0;
    border: 1px solid var(--border-hover);
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    transition: border-color 0.18s, background 0.18s;
}

[data-theme="light"] .donate-checkmark {
    background: rgba(0,0,0,0.03);
}

.donate-checkbox-wrap input:checked ~ .donate-checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.donate-checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.donate-checkbox-wrap input:checked ~ .donate-checkmark::after {
    display: block;
}

/* The real input is invisible: show keyboard focus on the drawn box */
.donate-checkbox-wrap input:focus-visible ~ .donate-checkmark {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.donate-label:hover .donate-checkmark {
    border-color: var(--accent);
}

.donate-text {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
    transition: color 0.18s;
}

.donate-label:hover .donate-text {
    color: var(--text-primary);
}

/* "How it works" inline link inside the opt-in label */
.anon-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: inherit;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
    line-height: inherit;
}

.anon-link:hover {
    color: var(--accent-text);
}

/* ---- Anon info popup ---- */
.anon-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.anon-popup {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 2rem 1.75rem;
    max-width: 400px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    animation: popupIn 0.2s ease;
}

@keyframes popupIn {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.anon-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.anon-popup-close:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

[data-theme="light"] .anon-popup-close:hover {
    background: rgba(0,0,0,0.06);
}

.anon-popup-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(194, 97, 31, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 1rem;
}

.anon-popup h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.anon-popup p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 0.6rem;
}

.anon-popup code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
}

[data-theme="light"] .anon-popup code {
    background: rgba(0,0,0,0.06);
}

/* ---- Turnstile security check modal ---- */
.cf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cf-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.cf-box h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cf-box p {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .first-screen {
        min-height: 0;
    }

    .hero {
        padding-top: 32px;
    }

    .hero-text h1 {
        font-size: clamp(1.9rem, 7vw, 2.6rem);
    }
}

@media (max-width: 480px) {
    /* Statistics row: one item per line, no horizontal overflow */
    .hero-proof-row {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 6px 14px;
        padding: 10px 14px;
    }

    .hero-proof-dot,
    .proof-extra {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .nav-link:not(#nav-feedback-btn) {
        display: none;
    }

    .hero-card {
        max-width: none;
    }

    .converter-card {
        padding: 22px 18px;
    }

    .drop-zone {
        padding: 28px 14px 22px;
    }

    .tag {
        min-width: 80px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .limits-box,
    .tip-box {
        padding: 22px;
    }

    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---- Pass: status in the card, section, forms ---- */
.btn-folder {
    margin-top: 10px;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border-hover);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.btn-folder:hover {
    border-color: var(--accent);
    background: var(--surface-inner);
}

.pass-status {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.pass-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex: none;
}

.pass-status .anon-link {
    margin-left: auto;
}

.badge-new {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-text);
    vertical-align: 1px;
}

.badge-new[hidden] {
    display: none;
}

.pass-teaser a,
.pass-note a,
.status-link {
    color: var(--accent-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pass .section-title {
    margin-top: 12px;
}

.pass-grid {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.pass-card {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

[data-theme="light"] .pass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    border-color: var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
}

.pass-card h3 {
    font-size: 18px;
    font-weight: 600;
}

.pass-price {
    margin-top: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.1;
}

.pass-price span {
    margin-left: 10px;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    color: var(--text-dim);
}

.pass-card ul {
    margin: 18px 0 8px;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    font-size: 15px;
    color: var(--text-muted);
}

.pass-card .btn-file:disabled {
    opacity: 0.7;
    cursor: wait;
}

.pass-note,
.pass-active-note {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-dim);
}

.pass-active-note {
    color: var(--success);
}

.pass-restore {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.pass-restore summary {
    cursor: pointer;
    color: var(--text-primary);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.pass-form {
    margin-top: 12px;
    max-width: 520px;
}

.pass-form label {
    display: block;
    margin-bottom: 6px;
}

.pass-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pass-form input {
    flex: 1 1 220px;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    background: var(--surface-inner);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
}

.btn-small {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-small:hover {
    background: var(--accent-hover);
}

.pass-restore-msg {
    margin-top: 10px;
    min-height: 1.4em;
}

@media (max-width: 600px) {
    .pass-card {
        padding: 22px;
    }
}

/* ---- Status / hidden ---- */
.hidden {
    display: none !important;
}
