:root {
  --ink: #14213d;
  --muted: #637083;
  --line: #d9e1e9;
  --paper: #f5f7fa;
  --panel: #ffffff;
  --lime: #c8f24a;
  --coral: #ff7961;
  --blue: #3675ea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, sans-serif;
}

button, input { font: inherit; }

.shell { width: min(1050px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.brand { color: var(--ink); display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; background: var(--ink); color: var(--lime); font-family: Consolas, monospace; }
.local-badge { display: flex; align-items: center; gap: 7px; color: #3c536d; font: 500 12px Consolas, monospace; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #38b177; box-shadow: 0 0 0 3px #d9f3e7; }

.tool { border: 1px solid var(--line); background: var(--panel); padding: clamp(24px, 5vw, 52px); box-shadow: 0 16px 45px rgba(33, 61, 90, .08); }
.tool-heading { max-width: 610px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font: 500 12px Consolas, monospace; letter-spacing: 0; }
h1, h2 { margin: 0; letter-spacing: 0; line-height: 1.05; }
h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; }
h2 { font-size: clamp(25px, 4vw, 38px); }
.lede { margin: 14px 0 30px; color: var(--muted); font-size: 16px; line-height: 1.65; }

.dropzone { display: flex; min-height: 205px; padding: 28px; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #aebdce; background: #f9fbfd; cursor: pointer; text-align: center; transition: background .2s, border-color .2s; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--blue); background: #f0f5ff; }
.dropzone.has-file { border-style: solid; border-color: #8bcaa6; background: #f0faf5; }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 11px; border-radius: 50%; color: var(--ink); background: var(--lime); font-size: 24px; font-weight: 800; }
.drop-title { font-size: 18px; font-weight: 800; }
.drop-copy { margin-top: 4px; color: var(--muted); font-size: 14px; }
.file-label { margin-top: 16px; padding: 6px 9px; color: #365270; background: #e8eff6; font: 500 11px Consolas, monospace; }

.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.control-card { min-height: 145px; padding: 16px; border: 1px solid var(--line); background: #fff; }
.control-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 800; }
output { color: var(--blue); font: 500 11px Consolas, monospace; white-space: nowrap; }
input[type="range"] { width: 100%; margin: 20px 0 10px; accent-color: var(--blue); }
.control-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.convert-button, .download-button { display: flex; width: 100%; min-height: 54px; justify-content: space-between; align-items: center; padding: 0 20px; border: 0; border-radius: 4px; color: var(--ink); background: var(--lime); font-weight: 800; cursor: pointer; text-decoration: none; }
.convert-button:hover:not(:disabled), .download-button:hover { background: #b6e53a; }
.convert-button:disabled { color: #91a091; background: #e5e9e5; cursor: not-allowed; }
.status { min-height: 21px; margin: 15px 0 0; color: var(--muted); font: 500 12px Consolas, monospace; }
.status.is-working { color: var(--blue); }
.status.is-error { color: #bb3f38; }

.result { display: grid; grid-template-columns: 1.3fr .7fr; gap: 25px; align-items: end; margin-top: 25px; padding: 25px; border: 1px solid #b9dca4; background: #f7ffef; }
dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 23px 0 0; }
dl div { min-width: 0; }
dt { margin-bottom: 5px; color: var(--muted); font: 500 11px Consolas, monospace; }
dd { overflow-wrap: anywhere; margin: 0; font-size: 13px; font-weight: 700; }
.download-button { width: auto; min-width: 180px; }
.privacy-note { display: flex; gap: 12px; margin: 18px 0 34px; padding: 0 3px; color: #40546b; font-size: 13px; line-height: 1.55; }
.privacy-note p { margin: 0; }
.privacy-icon { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #195b3b; background: #d8f1e2; font-weight: 800; }
.how-it-works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.how-it-works div { padding: 20px; background: var(--paper); }
.how-it-works span { color: var(--coral); font: 500 12px Consolas, monospace; }
.how-it-works p { margin: 10px 0 0; font-size: 14px; font-weight: 800; }
.related-pages { margin-top: 34px; }
.related-pages > div { display: flex; flex-wrap: wrap; gap: 9px; }
.related-pages a { border: 1px solid var(--line); padding: 10px 12px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 800; text-decoration: none; }
.related-pages a:hover { border-color: var(--blue); color: var(--blue); }
footer { margin-top: 24px; color: var(--muted); font: 500 11px Consolas, monospace; text-align: center; }

@media (max-width: 690px) {
  .shell { width: min(100% - 20px, 1050px); padding-top: 14px; }
  .local-badge { font-size: 10px; }
  .tool { padding: 24px 18px; }
  .controls { grid-template-columns: 1fr; }
  .control-card { min-height: 122px; }
  .result { grid-template-columns: 1fr; }
  .download-button { width: 100%; }
  dl { grid-template-columns: 1fr; gap: 11px; }
  .how-it-works { grid-template-columns: 1fr; }
}
