/* Akarika OCR — solid colours only */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --border: #e2e4e9;
  --border-strong: #c9ccd3;
  --text: #16181d;
  --text-2: #464a53;
  --muted: #6b707b;
  --brand: #1b5fd9;
  --brand-hover: #164fb6;
  --brand-press: #123f91;
  --brand-soft: #ebf2fd;
  --brand-ink: #ffffff;
  --ink: #111318;
  --ink-text: #f4f5f7;
  --ok: #0f7a52;
  --ok-soft: #e5f5ee;
  --err: #c8243a;
  --err-soft: #fdecee;
  --warn: #8a5a00;
  --warn-soft: #fff5db;
  --focus: #1b5fd9;
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, .06);
  --shadow: 0 1px 3px rgba(17, 19, 24, .06), 0 12px 32px rgba(17, 19, 24, .08);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --font: "Source Sans 3", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Noto Sans Devanagari", "Source Sans 3", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111215;
    --bg-alt: #16181c;
    --surface: #1b1d22;
    --surface-2: #23262c;
    --border: #2e3138;
    --border-strong: #41454e;
    --text: #f1f2f4;
    --text-2: #c5c8cf;
    --muted: #8f949e;
    --brand: #4c8dff;
    --brand-hover: #6b9fff;
    --brand-press: #8ab3ff;
    --brand-soft: #172741;
    --brand-ink: #0b1220;
    --ink: #23262d;
    --ink-text: #f1f2f4;
    --ok: #4cc38a;
    --ok-soft: #12291f;
    --err: #ff6b7d;
    --err-soft: #34161b;
    --warn: #f5c451;
    --warn-soft: #2f2711;
    --focus: #6b9fff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:active { background: var(--brand-press); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--text-2); }
.btn-light { background: #ffffff; color: #111318; }
.btn-light:hover { background: #e9ebef; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- header */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: var(--brand); }
.brand-mark path { fill: none; stroke: #fff; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.brand-name span { font-weight: 400; color: var(--text-2); }
.nav-links { display: flex; gap: 26px; margin-right: auto; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ---------- hero + tool */
.hero { padding: 64px 0 72px; background: var(--bg-alt); border-bottom: 1px solid var(--border); text-align: center; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -0.03em; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--text-2); margin: 18px auto 0; max-width: 700px; }
.tool-wrap { max-width: 880px; margin-top: 40px; }
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px; text-align: left; }
.tool:focus { outline: none; }
.tool-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.tool-note svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: 12px; padding: 48px 20px 44px; background: var(--surface);
  transition: background-color .12s, border-color .12s;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop:focus-within { border-color: var(--brand); }
.drop-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.drop-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-size: 20px; font-weight: 700; }
.drop-or { font-size: 14px; color: var(--muted); }
.drop .btn { pointer-events: none; }
.drop-hint { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

#stepReady { padding: 16px 16px 12px; }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.step-head h2 { font-size: 18px; }
.file-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r); }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.file-list li + li { border-top: 1px solid var(--border); }
.file-list .f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 15px; }
.file-list .f-size { color: var(--muted); font-size: 13.5px; }
.icon-btn { width: 32px; height: 32px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ftype { width: 34px; height: 40px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; color: #fff; flex: none; }
.ftype.pdf { background: #c8243a; }
.ftype.img { background: #0f7a52; }
.ftype.doc { background: #1b5fd9; }
.ftype.ppt { background: #c4510f; }
.ftype.xls { background: #177245; }
.ftype.txt { background: #5b6270; }

.field { margin-top: 22px; }
.field-label { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.field-label .hint { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--brand-soft); color: var(--text); font-weight: 600; font-size: 14px; border: 1px solid var(--brand); }
.chip button { width: 24px; height: 24px; border-radius: 999px; border: 0; background: transparent; color: var(--brand); cursor: pointer; display: grid; place-items: center; }
.chip button:hover { background: var(--surface); }
.chip button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.chips .none { color: var(--muted); font-size: 14px; line-height: 32px; }
.combo { position: relative; margin-top: 10px; max-width: 420px; }
.combo-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.combo input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); }
.combo input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.combo-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 15px; }
.combo-list li small { color: var(--muted); }
.combo-list li:hover, .combo-list li[aria-selected=true] { background: var(--surface-2); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.presets button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.presets button:hover { border-color: var(--brand); color: var(--brand); }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modes button { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .12s, background-color .12s; }
.modes button:hover { border-color: var(--border-strong); }
.modes button[aria-checked=true] { border-color: var(--brand); background: var(--brand-soft); }
.modes b { display: block; font-size: 15.5px; }
.modes em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--brand); border: 1px solid var(--brand); border-radius: 4px; padding: 0 4px; margin-left: 4px; vertical-align: 2px; }
.modes small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 2px; }
.modes button:disabled { opacity: .5; cursor: not-allowed; }
.mode-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; flex: none; }
.modes button[aria-checked=true] .mode-icon { background: var(--brand); color: var(--brand-ink); }
.mode-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.more { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.more summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.more[open] summary::before { transform: rotate(45deg); }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.control { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.control select, .control input { height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); font-weight: 400; color: var(--text); }
.control select:focus, .control input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; align-self: end; min-height: 40px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.tool-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-msg { color: var(--err); font-size: 14px; text-align: right; margin-top: 8px; min-height: 1px; }

/* ---------- results */
.results-section { padding: 48px 0 8px; }
.results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.results-head h2 { font-size: 26px; }
.results { display: grid; gap: 20px; }
.result { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.r-progress { height: 3px; background: var(--surface-2); }
.r-bar { height: 100%; width: 0; background: var(--brand); transition: width .35s ease; }
.result.is-done .r-progress { visibility: hidden; }
.r-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.r-title { flex: 1; min-width: 180px; }
.r-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-meta { font-size: 13.5px; color: var(--muted); }
.r-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.working { background: var(--brand-soft); color: var(--brand); }
.pill.working::before { animation: pulse 1s ease-in-out infinite; }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.error { background: var(--err-soft); color: var(--err); }
@keyframes pulse { 50% { opacity: .25; } }
.r-alert { margin: 16px 20px 0; padding: 10px 14px; border-radius: var(--r-sm); font-size: 14.5px; background: var(--warn-soft); color: var(--warn); }
.r-alert.error { background: var(--err-soft); color: var(--err); }
.r-body { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px; }
.r-body.with-preview { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.r-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px; display: grid; place-items: center; align-self: start; position: sticky; top: 80px; }
.r-preview img { max-height: 560px; width: auto; border-radius: 4px; box-shadow: var(--shadow-sm); }
.r-pages { display: grid; gap: 14px; min-width: 0; }
.r-empty-wait { color: var(--muted); font-size: 15px; padding: 28px 0; text-align: center; }
.page { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.page-head .pl { font-weight: 700; font-size: 14px; }
.page-head .pm { font-size: 13px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.page-head .btn { height: 30px; padding: 0 12px; font-size: 13px; }
.page textarea { display: block; width: 100%; min-height: 140px; max-height: 640px; border: 0; resize: vertical; padding: 14px 16px; background: var(--surface); color: var(--text); font: 400 16px/1.75 var(--font-text); }
.page textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand-soft); }
.page .empty { padding: 16px; color: var(--muted); font-size: 14.5px; }
.page .perr { padding: 12px 16px; color: var(--err); font-size: 14.5px; }

/* ---------- sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.025em; }
.section-head p:not(.eyebrow) { color: var(--text-2); font-size: 18px; margin-top: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.feature { background: var(--surface); padding: 32px 28px; }
.f-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.f-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 15.5px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }
.step-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--ink-text); font-weight: 700; margin-bottom: 16px; }
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--text-2); font-size: 15.5px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.split h2 { margin-bottom: 14px; }
.muted-p { color: var(--text-2); }
.lang-cloud { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lang-cloud li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14.5px; font-weight: 500; }
.all-langs { margin-top: 18px; }
.all-langs summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 15px; }
.all-langs-list { list-style: none; margin: 14px 0 0; padding: 16px; columns: 3 150px; column-gap: 20px; font-size: 14px; color: var(--text-2); border: 1px solid var(--border); border-radius: var(--r); max-height: 320px; overflow: auto; background: var(--surface); }
.all-langs-list li { break-inside: avoid; padding: 2px 0; }
.formats { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 15.5px; }
.formats th, .formats td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.formats th { width: 38%; font-weight: 700; padding-right: 16px; }
.formats td { color: var(--text-2); }

.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 700; font-size: 16.5px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 18px; color: var(--text-2); }

.cta { background: var(--ink); color: var(--ink-text); padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.cta p { color: #b8bcc6; margin-top: 8px; font-size: 17px; }

.footer { padding: 56px 0 28px; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 320px; font-size: 15px; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.footer-col a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--brand); }
.footer-base { margin-top: 40px; font-size: 14px; color: var(--muted); }
.footer-base > span { display: block; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .feature-grid, .steps { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .r-body.with-preview { grid-template-columns: 1fr; }
  .r-preview { position: static; }
  .r-preview img { max-height: 320px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 48px; }
  .tool-wrap { margin-top: 28px; }
  .tool { padding: 8px; }
  #stepReady { padding: 10px 8px 6px; }
  .drop { padding: 36px 16px 32px; }
  .modes, .more-grid, .feature-grid, .steps { grid-template-columns: 1fr; }
  .field-label .hint { display: block; margin: 2px 0 0; }
  .tool-actions .btn { flex: 1; }
  .section { padding: 64px 0; }
  .r-head { padding: 14px 16px; }
  .r-body { padding: 16px; }
  .r-actions { width: 100%; }
  .r-actions .btn { flex: 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .formats th { width: 34%; }
}
