/* Website pages. The converter page also loads css/app.css from the Blazor app, so names here never overlap with it. */
:root {
    color-scheme: light dark;
    --c-bg: #ffffff;
    --c-bg-soft: #f4f6fa;
    --c-surface: #ffffff;
    --c-text: #141a26;
    --c-muted: #556074;
    --c-border: #dde2ea;
    --c-brand: #1659c7;
    --c-brand-strong: #0f47a3;
    --c-brand-soft: #e8f0fd;
    --c-on-brand: #ffffff;
    --c-good: #15784b;
    --c-good-soft: #e3f4ec;
    --c-warn: #8a5a00;
    --c-warn-soft: #fdf3dc;
    --c-shadow: 0 1px 2px rgba(20, 26, 38, .06), 0 8px 24px rgba(20, 26, 38, .06);
    --c-radius: 14px;
    --c-max: 1160px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --c-bg: #0f131a;
        --c-bg-soft: #151a23;
        --c-surface: #1a202b;
        --c-text: #e8ebf1;
        --c-muted: #9aa4b6;
        --c-border: #2d3544;
        --c-brand: #6ea2f2;
        --c-brand-strong: #8db6f5;
        --c-brand-soft: #1b2a44;
        --c-on-brand: #0d1320;
        --c-good: #63cf9b;
        --c-good-soft: #15302a;
        --c-warn: #e8bd6a;
        --c-warn-soft: #362b14;
        --c-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
}

* { box-sizing: border-box; }

body.site {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.site a { color: var(--c-brand); }
.site a:focus-visible, .site button:focus-visible, .site summary:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: 4px; }
.site h1, .site h2, .site h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
.site p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--c-surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 16px; }

.wrap { max-width: var(--c-max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--c-bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-border); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 19px; color: var(--c-text) !important; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-fix { color: var(--c-brand); }
.main-nav { display: flex; gap: 4px; margin-right: auto; }
.main-nav a, .lang-menu summary, .menu-toggle summary { color: var(--c-text); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 15px; }
.main-nav a:hover, .main-nav a[aria-current=page] { background: var(--c-bg-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-menu, .menu-toggle { position: relative; }
.lang-menu summary, .menu-toggle summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lang-menu summary::-webkit-details-marker, .menu-toggle summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .menu-toggle summary:hover { background: var(--c-bg-soft); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; box-shadow: var(--c-shadow); padding: 6px; display: flex; flex-direction: column; }
.dropdown a { color: var(--c-text); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.dropdown a:hover, .dropdown a[aria-current=true] { background: var(--c-bg-soft); }
.menu-toggle { display: none; }

@media (max-width: 900px) {
    .main-nav, .header-actions .login-link { display: none; }
    .menu-toggle { display: block; }
    .site-header .wrap { gap: 8px; }
    .brand { margin-right: auto; }
}
@media (max-width: 420px) {
    .header-actions .btn-try { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 620; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--c-brand); color: var(--c-on-brand) !important; }
.btn-primary:hover { background: var(--c-brand-strong); }
.btn-ghost { background: transparent; color: var(--c-text) !important; border-color: var(--c-border); }
.btn-ghost:hover { border-color: var(--c-brand); }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* Sections */
.section { padding: 72px 0; }
.section-soft { background: var(--c-bg-soft); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { color: var(--c-muted); font-size: 18px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--c-brand); margin-bottom: 12px; }

/* Hero */
.hero { padding: 72px 0 64px; background: radial-gradient(1100px 420px at 85% -10%, var(--c-brand-soft), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.03em; }
.hero-text { font-size: 19px; color: var(--c-muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 16px; }
.hero-note { font-size: 14px; color: var(--c-muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

.demo { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius); box-shadow: var(--c-shadow); padding: 22px; }
.demo-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 10px; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.demo-file svg { flex: none; }
.demo-arrow { display: flex; justify-content: center; padding: 10px 0; color: var(--c-muted); }
.demo-checks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.demo-checks li { display: flex; gap: 10px; align-items: flex-start; }
.demo-checks .tick { flex: none; color: var(--c-good); }
.demo-valid { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 7px 12px; border-radius: 999px; background: var(--c-good-soft); color: var(--c-good); font-weight: 650; font-size: 14px; }

/* Cards and grids */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-3, .grid-5 { grid-template-columns: 1fr; } }

.tile { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius); padding: 22px; }
.tile h3 { font-size: 18px; }
.tile p { color: var(--c-muted); margin: 0; font-size: 15.5px; }
.tile-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--c-brand-soft); color: var(--c-brand); display: grid; place-items: center; margin-bottom: 14px; }
.country-flag { font-size: 13px; font-weight: 700; letter-spacing: .05em; color: var(--c-brand); margin-bottom: 6px; display: block; }

.steps { counter-reset: step; }
.step { position: relative; padding-top: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); display: grid; place-items: center; font-weight: 700; }

.link-more { display: inline-block; margin-top: 22px; font-weight: 620; text-decoration: none; }
.link-more:hover { text-decoration: underline; }

/* Pricing */
.billing-toggle { display: inline-flex; padding: 4px; border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-surface); margin-bottom: 28px; }
.billing-toggle button { border: 0; background: none; color: var(--c-text); padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.billing-toggle button[aria-pressed=true] { background: var(--c-brand); color: var(--c-on-brand); }
.billing-toggle .save { font-weight: 500; opacity: .85; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius); padding: 24px 20px; }
.plan.recommended { border: 2px solid var(--c-brand); box-shadow: var(--c-shadow); }
.plan-badge { position: absolute; top: -12px; left: 20px; background: var(--c-brand); color: var(--c-on-brand); font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan-for { color: var(--c-muted); font-size: 14.5px; min-height: 3em; }
.plan-price { font-size: 38px; font-weight: 750; letter-spacing: -0.03em; margin: 8px 0 0; }
.plan-period { color: var(--c-muted); font-size: 14px; margin-bottom: 16px; }
.plan-volume { font-weight: 650; margin-bottom: 4px; }
.plan-extra { color: var(--c-muted); font-size: 14px; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; flex: 1; }
.plan li { display: flex; gap: 8px; }
.plan li .tick { color: var(--c-good); flex: none; }
.plan li.off { color: var(--c-muted); }
.plan li.off .tick { color: var(--c-muted); }
.price-yearly { display: none; }
.show-yearly .price-yearly { display: block; }
.show-yearly .price-monthly { display: none; }
.pricing-note { color: var(--c-muted); font-size: 14px; margin-top: 18px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--c-border); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 620; font-size: 17px; padding: 14px 32px 14px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--c-muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--c-muted); padding-right: 32px; }

/* Content pages */
.page-hero { padding: 56px 0 28px; background: var(--c-bg-soft); border-bottom: 1px solid var(--c-border); }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 44px); }
.page-hero p { color: var(--c-muted); font-size: 18px; max-width: 44em; margin: 0; }
.prose { max-width: 780px; padding: 40px 0 72px; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose p, .prose li { color: var(--c-text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--c-warn-soft); color: var(--c-warn); margin: 0 0 24px; font-size: 15px; }
.notice-info { background: var(--c-brand-soft); color: var(--c-text); }

.table-scroll { overflow-x: auto; margin: 0 0 1em; }
.rules-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.rules-table th, .rules-table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--c-border); }
.rules-table th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.rules-table td:first-child { font-weight: 650; white-space: nowrap; }

/* Call to action band */
.cta-band { background: var(--c-brand); color: var(--c-on-brand); border-radius: 20px; padding: 48px 32px; text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 34px); }
.cta-band p { opacity: .9; font-size: 18px; }
.cta-band .btn { background: var(--c-on-brand); color: var(--c-brand) !important; margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--c-border); padding: 48px 0 32px; font-size: 14.5px; color: var(--c-muted); background: var(--c-bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 14px; color: var(--c-text); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--c-muted); text-decoration: none; }
.site-footer a:hover { color: var(--c-text); text-decoration: underline; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--c-border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Converter page: the Blazor app brings its own styling for the editor. */
.app-host { min-height: 60vh; }
.app-loading { padding: 64px 16px; text-align: center; color: var(--c-muted); }

/* Account pages */
.account-wrap { max-width: 460px; margin: 0 auto; padding: 48px 16px 72px; }
.account-wrap.wide { max-width: 860px; }
.form-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius); padding: 28px; box-shadow: var(--c-shadow); }
.form-card h1 { font-size: 26px; }
.form-card h2 { font-size: 19px; margin-top: 4px; }
.form-intro { color: var(--c-muted); margin-bottom: 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-weight: 600; font-size: 14.5px; }
.form-field input, .form-field select {
    width: 100%; padding: 10px 12px; font: inherit; color: var(--c-text); background: var(--c-bg);
    border: 1px solid var(--c-border); border-radius: 8px;
}
.form-field input:focus-visible, .form-field select:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 1px; }
.form-field .hint { color: var(--c-muted); font-size: 13.5px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: 14.5px; }
.form-check input { margin-top: 4px; }
.field-error { color: #c0392b; font-size: 13.5px; }
.form-errors { list-style: none; margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; background: #fdecea; color: #a8281e; font-size: 14.5px; }
.form-errors:empty, .form-errors ul:empty { display: none; }
.form-errors ul { margin: 0; padding-left: 1em; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.form-links { margin-top: 20px; font-size: 14.5px; display: flex; flex-direction: column; gap: 6px; }
.flash { padding: 12px 16px; border-radius: 10px; background: var(--c-good-soft); color: var(--c-good); margin-bottom: 20px; font-weight: 600; }
.btn-danger { background: #c0392b; color: #fff !important; }
.account-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.account-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--c-text); border: 1px solid var(--c-border); font-size: 14.5px; }
.account-nav a[aria-current=page] { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius); padding: 18px; }
.stat-label { color: var(--c-muted); font-size: 13.5px; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.qr { background: #fff; padding: 12px; border-radius: 10px; display: inline-block; margin: 8px 0 16px; }
.qr svg { width: 180px; height: 180px; display: block; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--c-bg-soft); border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin: 12px 0 20px; }
.danger-zone { border-color: #e6b3ad; }
@media (prefers-color-scheme: dark) {
    .form-errors { background: #3b1d1b; color: #f28b82; }
    .field-error { color: #f28b82; }
    .danger-zone { border-color: #6b2f2a; }
}
