:root {
  color-scheme: light;
  --ink: #1c2734;
  --muted: #667383;
  --accent: #d94b43;
  --accent-dark: #bd3933;
  --accent-soft: #fff1ef;
  --action: #2563eb;
  --action-dark: #1d4ed8;
  --border: #e4e9ef;
  --surface: #fff;
  --background: #f7f8fa;
  --ethiopic: "Noto Sans Ethiopic", sans-serif;
  font-family: "DM Sans", var(--ethiopic), sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0, rgb(255 255 255 / 90%), transparent 58%),
    var(--background);
  color: var(--ink);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

button, textarea { font: inherit; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, textarea:focus-visible {
  outline: 3px solid rgb(217 75 67 / 35%);
  outline-offset: 3px;
}

.topbar, main, .footer { width: min(100% - 48px, 1060px); margin-inline: auto; }
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(228 233 239 / 85%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.6px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 12px rgb(217 75 67 / 18%);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { display: inline-flex; gap: 4px; white-space: nowrap; }
.brand-love { color: var(--accent); }
.topbar-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #536171;
  font-size: 13px;
  font-weight: 600;
}
.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35a170;
  box-shadow: 0 0 0 4px #e8f5ee;
}

.intro { max-width: 720px; margin: 0 auto; padding: 48px 0 30px; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 11px;
  border: 1px solid #f1d8d5;
  border-radius: 99px;
  background: #fff8f7;
  color: #a64b45;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.15px;
}
.intro h1 {
  margin: 16px 0 11px;
  font-size: clamp(34px, 5vw, 49px);
  line-height: 1.14;
  letter-spacing: -2px;
  font-weight: 700;
}
.intro h1 span { color: var(--accent); }
.intro-copy {
  max-width: 570px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 18px;
  color: #536171;
  font-size: 13px;
  font-weight: 600;
}
.check-icon { margin-right: 5px; color: #278c60; font-size: 13px; }

.workspace {
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 48px rgb(28 39 52 / 7%), 0 2px 6px rgb(28 39 52 / 3%);
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 1px 22px;
}
.workspace-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.35px;
}
.workspace-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.language-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: #fbfcfd;
  color: #536171;
  font-size: 12px;
  font-weight: 600;
}
.language-pill span { color: var(--accent); font-family: var(--ethiopic); font-size: 15px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
}
.panel-title-row { min-height: 25px; display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.panel-title-row h3 { margin: 0; font-size: 14px; font-weight: 700; }
.step-number {
  color: #98a2ae;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .7px;
}
.drop-zone {
  height: 248px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cbd4de;
  border-radius: 11px;
  background: #fafbfd;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.drop-zone:hover, .drop-zone.is-dragging {
  border-color: var(--accent);
  background: #fff9f8;
  box-shadow: inset 0 0 0 1px rgb(217 75 67 / 8%);
}
.empty-upload { display: flex; flex-direction: column; align-items: center; padding: 18px; text-align: center; }
.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border: 1px solid #f7d8d5;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}
.upload-icon svg { width: 27px; height: 27px; }
.empty-upload strong, .result-placeholder strong { font-size: 14px; font-weight: 700; }
.drop-subtitle { margin-top: 7px; color: var(--muted); font-size: 13px; }
.browse-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.file-types { margin-top: 17px; color: #8792a0; font-size: 11px; }
.preview-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
}
.preview-wrap img { max-width: 100%; max-height: 180px; object-fit: contain; border-radius: 6px; }
.file-name { max-width: 90%; overflow: hidden; color: #536171; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.button {
  min-height: 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { background: var(--action); color: #fff; box-shadow: 0 4px 10px rgb(37 99 235 / 18%); }
.button-primary:hover:not(:disabled) { transform: translateY(-1px); background: var(--action-dark); box-shadow: 0 6px 14px rgb(37 99 235 / 24%); }
.convert-button { width: 100%; margin-top: 13px; }
.convert-button span[aria-hidden] { margin-left: 3px; font-size: 15px; }
.helper-note { margin: 13px 0 0; text-align: center; color: #748090; font-size: 11px; line-height: 1.5; }
.helper-note span { margin-right: 4px; color: #278c60; }

.result-heading-row { margin-bottom: 13px; }
.result-count { margin-left: auto; color: #7b8795; font-size: 11px; }
.result-area {
  height: 248px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfcfd;
}
.result-placeholder {
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.document-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid #e8edf2;
  border-radius: 15px;
  background: #f2f5f8;
  color: #8793a1;
}
.document-icon svg { width: 27px; height: 27px; }
.result-placeholder > span:last-child { max-width: 270px; margin-top: 8px; color: #7b8795; font-size: 12px; line-height: 1.6; }
.result-text {
  width: 100%;
  height: 100%;
  padding: 16px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263545;
  direction: ltr;
  font-family: var(--ethiopic);
  font-size: 15px;
  line-height: 1.9;
  text-align: left;
}
.result-text:focus-visible { outline: 0; }
.progress-wrap { margin-top: 13px; }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: #647181; font-size: 11px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 5px; background: #edf0f3; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.result-actions { display: flex; gap: 9px; margin-top: 13px; }
.result-actions .button { flex: 1; }
.button-secondary { border-color: #dfe5eb; background: #fff; color: #526071; }
.button-secondary:hover:not(:disabled) { border-color: #bbc6d1; background: #f8fafc; }
.button-download { background: var(--action); color: #fff; }
.button-download:hover:not(:disabled) { background: var(--action-dark); }
.status-message { min-height: 18px; margin: 12px 3px 0; color: #a14d3d; font-size: 12px; }
.status-message:empty { min-height: 0; margin-top: 0; }
.spinner { width: 14px; height: 14px; border: 2px solid rgb(255 255 255 / 45%); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.ad-slot {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  border: 1px dashed #dfe4ea;
  border-radius: 11px;
  background: rgb(255 255 255 / 55%);
  color: #9aa4af;
}
.ad-slot > span { font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.ad-slot p { margin: 6px 0 0; font-size: 12px; }
.assurance-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 20px 8px 3px;
  color: #667383;
  font-size: 12px;
}
.assurance-strip strong { color: var(--accent); font-weight: 700; }
.assurance-divider { width: 1px; height: 13px; background: #dfe4ea; }
.info-section { margin: 38px 0 0; }
.info-heading { max-width: 680px; margin: 0 auto 20px; text-align: center; }
.info-heading .eyebrow { margin-bottom: 12px; }
.info-heading h2 { margin: 0; font-size: clamp(24px, 3.5vw, 32px); letter-spacing: -.8px; }
.info-heading > p:last-child { margin: 9px 0 0; color: var(--muted); line-height: 1.65; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.info-card { padding: 20px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.info-card h3 { margin: 0 0 10px; font-size: 15px; }
.info-card p, .info-card li { color: #5d6a79; font-size: 13px; line-height: 1.7; }
.info-card p { margin: 8px 0 0; }
.info-card ol, .info-card ul { margin: 0; padding-left: 20px; }
.info-card li + li { margin-top: 5px; }
.info-card a, .text-page a { color: #1d4ed8; text-underline-offset: 3px; }
.info-card details { padding: 10px 0; border-top: 1px solid var(--border); }
.info-card details:first-of-type { border-top: 0; }
.info-card summary { color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600; }
.info-card details p { margin-top: 7px; }
.text-page { max-width: 780px; margin: 36px auto 50px; padding: 30px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 12px 36px rgb(28 39 52 / 5%); }
.text-page h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 40px); letter-spacing: -1px; }
.text-page h2 { margin: 28px 0 8px; font-size: 19px; }
.text-page p, .text-page li { color: #536171; font-size: 14px; line-height: 1.8; }
.text-page p { margin: 10px 0; }
.text-page ul { padding-left: 22px; }
.text-page .updated-date { color: #7b8795; font-size: 12px; }
.back-link { display: inline-flex; margin-bottom: 16px; color: #536171 !important; font-size: 13px; font-weight: 600; text-decoration: none; }
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: #667383; text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--accent-dark); }
.footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 25px;
  border-top: 1px solid var(--border);
  color: #758190;
  font-size: 11px;
}
.footer-brand { font-size: 15px; }
.footer-brand .brand-name { gap: 3px; }
.footer-brand .brand-mark { width: 27px; height: 27px; border-radius: 9px; font-size: 16px; }

@media (max-width: 700px) {
  .topbar, main, .footer { width: min(100% - 32px, 540px); }
  .topbar { height: 66px; }
  .intro { padding: 37px 0 25px; }
  .intro h1 { font-size: clamp(32px, 8vw, 41px); letter-spacing: -1.5px; }
  .intro-copy { font-size: 15px; }
  .trust-row { gap: 9px 16px; font-size: 12px; }
  .workspace { padding: 19px; border-radius: 15px; }
  .workspace-heading h2 { font-size: 16px; }
  .workspace-heading p { max-width: 290px; font-size: 12px; }
  .columns { grid-template-columns: 1fr; gap: 13px; }
  .panel { padding: 15px; }
  .drop-zone, .result-area { height: 220px; }
  .preview-wrap img { max-height: 155px; }
  .assurance-strip { gap: 9px 12px; padding-top: 16px; }
  .info-section { margin-top: 30px; }
  .info-grid { grid-template-columns: 1fr; gap: 11px; }
  .info-card { padding: 17px; }
  .text-page { margin: 25px auto 35px; padding: 21px; }
  .ad-slot { margin-top: 18px; }
  .footer { min-height: 70px; flex-wrap: wrap; gap: 9px 14px; margin-top: 19px; padding: 14px 0; }
  .footer > span:last-child { width: 100%; }
  .footer-links { width: 100%; }
}

@media (max-width: 390px) {
  .topbar, main, .footer { width: calc(100% - 26px); }
  .topbar-note { gap: 7px; font-size: 11px; }
  .brand { gap: 7px; font-size: 15px; }
  .brand-name { gap: 3px; }
  .workspace { padding: 14px; }
  .workspace-heading { align-items: flex-start; }
  .workspace-heading p { max-width: 205px; }
  .language-pill { gap: 5px; padding: 7px 9px; }
  .panel { padding: 12px; }
  .result-actions { gap: 7px; }
  .result-actions .button { padding-inline: 8px; font-size: 13px; }
  .assurance-strip { gap: 8px; font-size: 10px; }
}
