:root {
  color-scheme: light;
  --ink: #192922;
  --muted: #6f7a72;
  --green: #245c43;
  --green-dark: #194733;
  --line: #e4e9e3;
  --paper: #fff;
  --background: #f5f7f4;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(222, 234, 224, .52), transparent 40rem),
    var(--background);
}

.shell { width: min(100% - 40px, 760px); margin: 0 auto; }
.masthead { height: 94px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 700; letter-spacing: -1.2px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: white; font-family: Kalimati, "Noto Sans Devanagari", sans-serif; font-size: 23px; line-height: 1; }
.brand-dot { color: #76917f; }
.local-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #dfe7df; border-radius: 999px; background: rgba(255,255,255,.55); color: #57665c; font-size: 12px; }
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: #64a577; box-shadow: 0 0 0 3px #e8f3e9; }

.intro { padding: 42px 0 30px; text-align: center; }
.eyebrow { margin: 0 0 17px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: 2px; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 8vw, 58px); font-weight: 600; letter-spacing: -2.3px; line-height: 1.1; }
h1 em { color: var(--green); }
.intro-copy { max-width: 480px; margin: 18px auto 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.workspace { padding: 22px; border: 1px solid rgba(226,232,225,.9); border-radius: 15px; background: var(--paper); box-shadow: 0 15px 44px rgba(37,60,44,.055); }
.drop-zone { min-height: 195px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #cbd6cc; border-radius: 10px; background: #fbfcfa; cursor: pointer; transition: background .16s ease, border-color .16s ease; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.dragging { border-color: #6e9a79; background: #f3f8f3; outline: none; }
.upload-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid #e1e9e1; border-radius: 12px; background: white; color: var(--green); }
.upload-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone strong { font-size: 14px; font-weight: 600; }
#file-description { margin-top: 6px; color: var(--muted); font-size: 12px; }
.browse { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.file-types { margin-top: 15px; color: #929b93; font-size: 10px; }
.file-types i { padding: 0 4px; font-style: normal; }
.options { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 2px 16px; }
.options h2, .result h2 { margin: 0; font-size: 13px; font-weight: 600; }
.option-help { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.select-wrap { position: relative; }
.select-wrap select { width: 238px; padding: 10px 32px 10px 11px; border: 1px solid var(--line); border-radius: 7px; outline: none; appearance: none; background: #fff; color: #34443a; font: inherit; font-size: 11px; cursor: pointer; }
.select-wrap select:focus { border-color: #81a78b; box-shadow: 0 0 0 3px #edf5ee; }
.select-wrap svg { position: absolute; top: 50%; right: 11px; width: 13px; transform: translateY(-50%); pointer-events: none; fill: none; stroke: #738076; stroke-width: 1.4; }
.inline-note { margin: -5px 0 14px; color: #8a6128; font-size: 11px; line-height: 1.5; }
.privacy-note { display: flex; align-items: center; gap: 7px; padding: 12px 0 15px; color: #78837a; font-size: 10px; }
.lock-icon { display: inline-grid; place-items: center; width: 13px; height: 14px; border: 1px solid #99a59a; border-radius: 4px; font-size: 12px; line-height: 1; }
.convert-button { width: 100%; min-height: 45px; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 16px; border: 0; border-radius: 7px; background: var(--green); color: white; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.convert-button:hover:not(:disabled) { background: var(--green-dark); transform: translateY(-1px); }
.convert-button:disabled { background: #aab9ad; cursor: not-allowed; }
.convert-button span { font-size: 17px; font-weight: 400; }
.progress-panel { display: flex; align-items: center; gap: 14px; padding: 17px 3px 4px; }
.progress-content { flex: 1; min-width: 0; }
.progress-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-panel strong { font-size: 12px; }
#progress-percent { color: var(--green); font-size: 11px; font-weight: 600; }
.progress-panel #progress-detail { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
#conversion-progress { width: 100%; height: 7px; display: block; margin-top: 9px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #e8eee8; color: var(--green); }
#conversion-progress::-webkit-progress-bar { border-radius: 999px; background: #e8eee8; }
#conversion-progress::-webkit-progress-value { border-radius: 999px; background: var(--green); transition: width .18s ease; }
#conversion-progress::-moz-progress-bar { border-radius: 999px; background: var(--green); }
#conversion-progress:not([value]) { background: linear-gradient(90deg, #e8eee8 0%, #d7e5d9 35%, #e8eee8 70%); background-size: 200% 100%; animation: progress-indeterminate 1.2s ease-in-out infinite; }
#conversion-progress:not([value])::-webkit-progress-bar { background: transparent; }
#conversion-progress:not([value])::-webkit-progress-value { background: transparent; }
#conversion-progress:not([value])::-moz-progress-bar { background: transparent; }
@keyframes progress-indeterminate { to { background-position: -200% 0; } }
.spinner { width: 23px; height: 23px; border: 2px solid #dce8dd; border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result { padding-top: 18px; }
.result-head { display: flex; align-items: center; gap: 11px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.check-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #e9f4eb; color: #39744c; font-size: 14px; }
#result-filename { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 0; }
.summary-item { padding: 10px; border-radius: 7px; background: #f6f8f5; }
.summary-item strong { display: block; font-size: 17px; font-weight: 600; }
.summary-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.warnings { margin: 0 0 14px; padding: 0 0 0 19px; color: #83622e; font-size: 11px; line-height: 1.55; }
.warnings:empty { display: none; }
.error-message { margin-top: 13px; padding: 11px 12px; border: 1px solid #f1d4d0; border-radius: 7px; background: #fff7f5; color: #9c3d32; font-size: 12px; line-height: 1.5; }
.pdf-note { display: flex; gap: 11px; margin: 19px 2px 0; color: #737d74; }
.note-icon { flex: 0 0 17px; display: grid; place-items: center; width: 17px; height: 17px; margin-top: 1px; border: 1px solid #aeb8af; border-radius: 50%; font-family: Georgia, serif; font-size: 11px; }
.pdf-note p { margin: 0; font-size: 11px; line-height: 1.6; }
.pdf-note strong { color: #49564b; font-weight: 600; }
.font-note { margin: 9px 2px 0 30px; color: #8a938b; font-size: 10px; line-height: 1.55; }
footer { display: flex; justify-content: space-between; gap: 12px; padding: 40px 0 24px; color: #939b94; font-size: 10px; }
footer b { padding: 0 4px; color: #bdc5bd; }

@media (max-width: 560px) {
  .shell { width: min(100% - 28px, 760px); }
  .masthead { height: 72px; }
  .local-badge { padding: 7px 9px; font-size: 10px; }
  .intro { padding: 35px 0 24px; }
  .intro-copy { max-width: 345px; font-size: 13px; }
  .workspace { padding: 15px; }
  .drop-zone { min-height: 177px; }
  .options { align-items: flex-start; flex-direction: column; gap: 12px; }
  .select-wrap, .select-wrap select { width: 100%; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  footer { flex-direction: column; padding-top: 29px; }
}
