/* PDF to Excel Converter – public site + web converter.
   Hand-written (no build step). Brand: PDF red → XLSX green, like the app icon. */

:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --ink-300: #cbd5e1;
    --ink-200: #e2e8f0;
    --ink-100: #f1f5f9;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-100: #dcfce7;
    --green-50: #f0fdf4;
    --red-600: #dc2626;
    --red-100: #fee2e2;
    --amber-100: #fef3c7;
    --amber-800: #92400e;
    --radius: 14px;
    --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --shadow-lift: 0 20px 40px -20px rgba(15, 23, 42, .3);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-900);
    background: var(--bg);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11", "tnum";
}
img { max-width: 100%; display: block; }
main { flex: 1 0 auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.muted { color: var(--ink-500); }
.small { font-size: .875rem; }
.center { text-align: center; }
.eyebrow {
    display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--green-700); background: var(--green-100);
    padding: .25rem .6rem; border-radius: 999px; margin-bottom: .9rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
    padding: .75rem 1.15rem; border-radius: 10px; border: 1px solid transparent;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: 0 2px 8px rgba(22, 163, 74, .3); }
.btn-primary:hover:not(:disabled) { background: var(--green-700); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); }
.btn-outline { background: #fff; border-color: var(--ink-300); color: var(--ink-900); }
.btn-outline:hover { border-color: var(--ink-500); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: .45rem .75rem; font-size: .85rem; }
.btn-block { width: 100%; }
.link { color: var(--green-700); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green-700); font-weight: 600; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
    background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ink-200);
}
.nav { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.brand img { border-radius: 9px; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-700); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--ink-900); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink-900); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 2.5rem; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.lead { font-size: 1.15rem; color: var(--ink-700); max-width: 34rem; }
.hero-points { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: .5rem; color: var(--ink-700); }
.hero-points li { padding-left: 1.6rem; position: relative; }
.hero-points li::before {
    content: ""; position: absolute; left: 0; top: .35em; width: 1rem; height: 1rem; border-radius: 50%;
    background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2315803d' d='M7.6 13.4 4.2 10l1.4-1.4 2 2 6.8-6.8L15.8 5z'/%3E%3C/svg%3E") center/70% no-repeat;
}
.hero-stores { display: flex; gap: .75rem; flex-wrap: wrap; }
.store-badge {
    display: inline-flex; align-items: center; gap: .6rem; background: var(--ink-900); color: #fff;
    text-decoration: none; padding: .55rem .9rem; border-radius: 10px; line-height: 1.1;
}
.store-badge small { display: block; font-size: .65rem; opacity: .8; font-weight: 500; }
.store-badge span { font-weight: 700; font-size: 1rem; }

/* ---------- Dropzone ---------- */
.dropzone {
    position: relative; border: 2px dashed var(--ink-300); border-radius: var(--radius); background: var(--surface);
    padding: 2.4rem 1.5rem; text-align: center; cursor: pointer; outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s; box-shadow: var(--shadow-card);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--green-600); box-shadow: 0 0 0 4px var(--green-100); }
.dropzone.is-over { border-color: var(--green-600); background: var(--green-50); }
.dropzone.is-busy { cursor: default; border-style: solid; }
.dropzone-idle, .dropzone-busy { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.dropzone strong { font-size: 1.1rem; font-weight: 700; }
.dropzone span { color: var(--ink-500); font-size: .9rem; }
.dz-icon { margin-bottom: .6rem; }
.dz-icon svg { width: 96px; height: 64px; }
.dz-note { margin: .8rem 0 0; font-size: .875rem; color: var(--ink-500); text-align: center; }
.trust-row { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-top: .8rem; font-size: .8rem; color: var(--ink-500); }
.hero-drop .dropzone { padding: 3rem 1.5rem; box-shadow: var(--shadow-lift); }

.spinner {
    width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--green-100); border-top-color: var(--green-600);
    animation: spin .8s linear infinite; margin-bottom: .6rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress { width: min(320px, 100%); height: 6px; background: var(--ink-100); border-radius: 3px; overflow: hidden; margin-top: .8rem; }
.progress-bar { height: 100%; width: 0; background: var(--green-600); transition: width .3s; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: #fff; border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); }
.section-title { text-align: center; }
.section-sub { text-align: center; color: var(--ink-500); max-width: 40rem; margin: 0 auto 2.5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-card); }
.feature-icon { font-size: 1.6rem; margin-bottom: .6rem; }
.feature p { margin: 0; color: var(--ink-700); font-size: .95rem; }
.steps { list-style: none; padding: 0; margin: 2rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.steps li { text-align: center; padding: 0 .5rem; }
.steps p { color: var(--ink-700); margin: 0; }
.step-num {
    display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--green-600); color: #fff; font-weight: 800; margin-bottom: .8rem;
}
.cta-row { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.faq { background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; padding: .2rem 1.2rem; margin-bottom: .75rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: .9rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--ink-500); font-size: 1.3rem; }
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--ink-700); padding-bottom: 1rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--ink-200); background: #fff; padding: 2.5rem 0 1.5rem; margin-top: 2rem; font-size: .9rem; flex-shrink: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-500); margin-bottom: .8rem; }
.footer-grid a:not(.brand) { display: block; text-decoration: none; color: var(--ink-700); margin-bottom: .45rem; }
.footer-grid a:hover { color: var(--ink-900); }
.footer-grid .brand { margin-bottom: .6rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--ink-200); color: var(--ink-500); font-size: .85rem; }

/* ---------- Cards / forms ---------- */
.card { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-card); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.card-head h3 { margin: 0; }
.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink-700); }
.field input {
    width: 100%; font: inherit; padding: .75rem .9rem; border: 1px solid var(--ink-300); border-radius: 10px;
    background: #fff; color: var(--ink-900); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.field input[aria-invalid="true"] { border-color: var(--red-600); }
.hint { display: block; color: var(--ink-500); font-size: .8rem; margin: .35rem 0 1rem; }
.otp-input { letter-spacing: .4em; font-size: 1.4rem; text-align: center; font-weight: 700; }
.form-row { display: flex; justify-content: flex-end; margin: -.4rem 0 1rem; font-size: .9rem; }
.form-error { margin-top: 1rem; background: var(--red-100); color: #991b1b; border-radius: 10px; padding: .75rem .9rem; font-size: .9rem; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--ink-500); font-size: .8rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--ink-200); }
.google-slot { display: flex; justify-content: center; min-height: 0; }
.google-slot > div { width: 100%; }

/* ---------- Auth page ---------- */
.auth-wrap { display: flex; justify-content: center; padding: clamp(2rem, 6vw, 4rem) 20px; }
.auth-card { width: 100%; max-width: 440px; padding: 2rem; }
.auth-logo { border-radius: 14px; margin: 0 auto 1rem; }
.auth-card h1 { font-size: 1.6rem; text-align: center; }
.auth-card p.center { margin: 1.1rem 0 0; }
.auth-card > div > p.muted:first-of-type { text-align: center; margin-bottom: 1.4rem; }

/* ---------- App page ---------- */
.app-shell { padding: 2rem 20px 3rem; }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.app-top h1 { font-size: 1.7rem; margin-bottom: .2rem; }
.balance-card { background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; padding: .8rem 1.1rem; min-width: 220px; box-shadow: var(--shadow-card); }
.balance-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-500); }
.balance-main strong { font-size: 1.1rem; }
.balance-sub { font-size: .85rem; color: var(--ink-500); margin-top: .2rem; }
.balance-card.is-pro { border-color: var(--green-600); background: var(--green-50); }
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.dropzone-app { margin-bottom: 1.5rem; }
.result-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
.result-head h2 { font-size: 1.25rem; word-break: break-word; }
.result-head .eyebrow { margin-bottom: .4rem; }
.result-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.lock-banner {
    display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; background: var(--amber-100); color: var(--amber-800);
    border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; margin-bottom: 1rem;
}
.lock-banner .btn { margin-left: auto; }
.sheet-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.sheet-tabs button {
    font: inherit; font-size: .85rem; font-weight: 600; padding: .4rem .8rem; border-radius: 8px; border: 1px solid var(--ink-200);
    background: #fff; color: var(--ink-700); cursor: pointer;
}
.sheet-tabs button.is-active { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.sheet-wrap { overflow: auto; max-height: 520px; border: 1px solid var(--ink-200); border-radius: 10px; background: #fff; }
.sheet { border-collapse: collapse; font-size: .82rem; min-width: 100%; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { border: 1px solid var(--ink-200); padding: .3rem .55rem; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.sheet th { background: var(--ink-100); color: var(--ink-500); font-weight: 600; position: sticky; top: 0; z-index: 1; text-align: center; }
.sheet td.num { text-align: right; }
.sheet tr:first-child td { font-weight: 600; background: var(--green-50); }
.sheet td.rowhead { background: var(--ink-100); color: var(--ink-500); text-align: center; font-weight: 600; position: sticky; left: 0; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; max-height: 60vh; overflow: auto; }
.file-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 10px; border: 1px solid transparent; min-width: 0; cursor: pointer; }
.file-item:hover { background: var(--ink-100); }
.file-item.is-active { border-color: var(--green-600); background: var(--green-50); }
.file-item .file-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; font-size: .65rem; font-weight: 800; flex: none; }
.file-item .file-meta { min-width: 0; flex: 1; }
.file-item .file-name { display: block; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .file-date { font-size: .75rem; color: var(--ink-500); }
.file-item button { flex: none; }
.file-item .btn-ghost { padding: .35rem .5rem; }

/* ---------- Modal / toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 1.6rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-lift); }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.toast-stack { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: .5rem; z-index: 60; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink-900); color: #fff; padding: .8rem 1rem; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow-lift); animation: toast-in .2s ease-out; }
.toast.ok { background: var(--green-700); }
.toast.err { background: var(--red-600); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .app-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .nav { flex-wrap: wrap; height: auto; min-height: 64px; }
    .nav-links, .nav-actions { display: none; }
    .nav-toggle { display: flex; }
    body.nav-open .nav-links, body.nav-open .nav-actions {
        display: flex; flex-direction: column; align-items: stretch; gap: .4rem; width: 100%; margin: 0;
    }
    body.nav-open .nav-links { padding-top: .5rem; border-top: 1px solid var(--ink-200); }
    body.nav-open .nav-links a { padding: .6rem 0; }
    body.nav-open .nav-actions { padding-bottom: 1rem; }
    body.nav-open .nav-actions .btn { width: 100%; }
    .feature-grid, .steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .result-actions { width: 100%; }
    .result-actions .btn { flex: 1; }
    .hero-stores .store-badge { flex: 1; justify-content: center; }
    .auth-card { padding: 1.5rem; }
}

/* ---------- Keyword landing pages (/convert/{slug}) + use-case links ---------- */
.footer-grid-5 { grid-template-columns: 1.6fr 1fr 1.4fr 1fr 1fr; }
@media (max-width: 960px) { .footer-grid-5 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .footer-grid-5 { grid-template-columns: 1fr; } }
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.usecase { display: block; background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; padding: 1rem 1.1rem; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.usecase:hover { border-color: var(--green-600); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.usecase strong { display: block; margin-bottom: .3rem; }
.usecase span { color: var(--ink-500); font-size: .88rem; }
.breadcrumbs { font-size: .85rem; color: var(--ink-500); margin: 1.2rem 0 0; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--ink-300); }
.breadcrumbs a { color: var(--ink-700); text-decoration: none; }
.seo-hero { padding: 1.4rem 0 2.5rem; }
.seo-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: start; }
.seo-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.seo-hero .lead { font-size: 1.05rem; }
.seo-body { max-width: 760px; }
.seo-body h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.seo-body ul, .seo-body ol { padding-left: 1.3rem; color: var(--ink-700); display: grid; gap: .45rem; }
.seo-body .result { background: var(--green-50); border: 1px solid #bbf7d0; border-radius: 12px; padding: 1rem 1.2rem; color: var(--ink-700); }
.seo-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; margin-top: 1rem; }
.seo-related a { display: block; background: #fff; border: 1px solid var(--ink-200); border-radius: 10px; padding: .8rem .9rem; font-weight: 600; text-decoration: none; font-size: .92rem; }
.seo-related a:hover { border-color: var(--green-600); }
.seo-side { position: sticky; top: 84px; }
.seo-side .dropzone { padding: 2.2rem 1.4rem; }
.disclaimer { font-size: .78rem; color: var(--ink-500); margin-top: 2rem; }
@media (max-width: 960px) { .seo-grid { grid-template-columns: 1fr; } .seo-side { position: static; } }
