:root {
  --bg: #f8f5ee;
  --surface: #ffffff;
  --surface-2: #f2eee4;
  --ink: #1c2333;
  --ink-2: #4a5468;
  --ink-3: #6f788b;
  --line: #e4dfd2;
  --brand: #1f2a44;
  --accent: #ffc93c;
  --accent-ink: #1f2a44;
  --urgent: #b42318;
  --urgent-bg: #fdecea;
  --soon: #b54708;
  --soon-bg: #fff4e0;
  --good: #067647;
  --good-bg: #e6f6ee;
  --info-bg: #eef2fb;
  --focus: #2f6fed;
  --coffee: #ffdd00;
  --coffee-ink: #1c1c1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(28 35 51 / 6%), 0 6px 24px rgb(28 35 51 / 6%);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141b;
    --surface: #191e28;
    --surface-2: #212734;
    --ink: #eceef3;
    --ink-2: #b9c0cf;
    --ink-3: #8f98aa;
    --line: #2b3242;
    --brand: #eceef3;
    --accent: #ffc93c;
    --accent-ink: #1f2a44;
    --urgent: #ff8a7a;
    --urgent-bg: #3a1c1a;
    --soon: #ffb35c;
    --soon-bg: #35270f;
    --good: #5fd39b;
    --good-bg: #13301f;
    --info-bg: #1d2638;
    --focus: #7aa2ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 24px rgb(0 0 0 / 25%);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

[hidden] { display: none !important; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img { border-radius: 8px; }

main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}

.hero h1 {
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 18px 0 12px;
}

.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 22px; max-width: 34em; }

.dropzone {
  background: var(--surface);
  border: 2px dashed var(--line);
  border-radius: 22px;
  padding: 28px 20px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: border-color .15s, background .15s;
}

.dropzone.dragging { border-color: var(--focus); background: var(--info-bg); }

.drop-icon { width: 52px; height: 52px; fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.drop-icon rect { fill: var(--accent); stroke: var(--accent-ink); }
.drop-icon path { stroke: var(--accent-ink); }
.drop-title { font-weight: 700; font-size: 19px; margin: 8px 0 2px; }
.drop-hint { color: var(--ink-3); margin: 0 0 18px; font-size: 15px; }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 600 16px/1.2 var(--font);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: none;
}

.button.primary { background: var(--accent); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 70%, #000); }
.button.primary:hover { filter: brightness(0.97); }
.button.secondary { background: var(--surface-2); border-color: var(--line); }
.button.secondary:hover { border-color: var(--ink-3); }
.button.ghost { border-color: var(--line); background: var(--surface); }
.button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.button:disabled { opacity: .55; cursor: default; }

.link {
  background: none;
  border: 0;
  padding: 6px 4px;
  font: inherit;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.dropzone .link { margin-top: 12px; }
.link.inline { padding: 0; font: inherit; color: var(--ink); }

.report-line { margin: 18px 4px 0; color: var(--ink-3); font-size: 15px; }
.report-line .link { padding: 0; }

.feedback-dialog { width: min(520px, calc(100vw - 32px)); }
.feedback-dialog h2 { padding-right: 36px; }
.feedback-lead { margin: 0 0 14px; color: var(--ink-2); }
.feedback-form { display: grid; gap: 6px; }
.feedback-form label { margin-top: 8px; font-weight: 650; font-size: 15px; }
.feedback-optional { font-weight: 400; color: var(--ink-3); }
.feedback-form select, .feedback-form input {
  width: 100%;
  min-height: 44px;
  font: 15px/1.4 var(--font);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.feedback-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.feedback-privacy { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--info-bg); font-size: 14px; color: var(--ink-2); }
.feedback-privacy p { margin: 0; }
.feedback-sent-with { margin: 4px 0 0; padding-left: 18px; }
.feedback-more { margin-top: 6px !important; }
.feedback-more a { color: var(--ink-2); }
.feedback-sent-with code { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.feedback-error { margin: 8px 0 0; color: var(--urgent); font-weight: 600; font-size: 15px; }
.feedback-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.feedback-thanks { text-align: center; padding: 12px 0 4px; }
.feedback-thanks-title { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.feedback-thanks p { color: var(--ink-2); }

.paste-form { margin-top: 12px; display: grid; gap: 10px; text-align: left; }

textarea {
  width: 100%;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
}

.privacy-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 4px;
  color: var(--ink-2);
  font-size: 15px;
}

.privacy-line svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--good); stroke-width: 2; }

.examples { margin: 26px 0 8px; }
.examples-title { margin: 0 0 10px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  font: 600 15px/1.3 var(--font);
  text-align: left;
  cursor: pointer;
}

.chip span { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.chip:hover { border-color: var(--ink-3); }

.how {
  list-style: none;
  counter-reset: how;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 12px;
}

.how li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--ink-2);
}

.how li::before {
  content: counter(how);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

.how strong { color: var(--ink); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 0 0 14px;
}

.card h2 {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
}

.working-card { text-align: center; padding: 40px 20px; margin-top: 30px; }
.working-label { font-weight: 650; font-size: 18px; margin: 18px 0 14px; }

.spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid var(--surface-2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; max-width: 320px; margin: 0 auto 16px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s; }
.progress-bar.indeterminate { width: 35%; animation: slide 1.2s ease-in-out infinite; }

@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.muted { color: var(--ink-3); }
.small { font-size: 14px; }

.result-top { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.back { padding-left: 0; text-decoration: none; font-weight: 600; }

.summary { border-left: 6px solid var(--line); }
.summary.urgency-high { border-left-color: var(--urgent); }
.summary.urgency-medium { border-left-color: var(--soon); }
.summary.urgency-low { border-left-color: var(--good); }

.summary-from { margin: 0; color: var(--ink-3); font-size: 15px; }
.summary-title:focus { outline: none; }
.summary-title { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 4px 0 8px; }
.summary-title .german { font-weight: 500; color: var(--ink-3); font-size: 18px; }
.summary p { margin: 6px 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
}

.badge.high { background: var(--urgent-bg); color: var(--urgent); }
.badge.medium { background: var(--soon-bg); color: var(--soon); }
.badge.low { background: var(--good-bg); color: var(--good); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.facts .card { margin: 0; display: flex; flex-direction: column; gap: 4px; }

.fact-label { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.fact-value { font-size: 22px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.25; }
.fact-note { color: var(--ink-2); font-size: 14px; }
.fact-note.high { color: var(--urgent); font-weight: 650; }
.fact-note.medium { color: var(--soon); font-weight: 650; }
.fact .button { margin-top: 8px; align-self: flex-start; }

.money-pay .fact-value { color: var(--ink); }
.money-get .fact-value { color: var(--good); }

.rows { display: grid; gap: 10px; margin: 0; }
.row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; gap: 10px; align-items: center; }
.row dt { color: var(--ink-3); font-size: 14px; }
.row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.row dd.code { font-family: var(--mono); font-size: 15px; }

.copy {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  border-radius: 8px;
  padding: 4px 10px;
  font: 600 13px/1.4 var(--font);
  cursor: pointer;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.steps input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--good); }
.steps label { cursor: pointer; }
.steps li.urgent label { font-weight: 650; }
.steps li.good label { color: var(--good); font-weight: 650; }
.steps input:checked + label { color: var(--ink-3); text-decoration: line-through; font-weight: 400; }

.terms { display: grid; gap: 10px; margin: 0; }
.terms div { display: grid; gap: 2px; }
.terms dt { font-weight: 700; }
.terms dd { margin: 0; color: var(--ink-2); }
.more-terms { margin-top: 12px; }
.more-terms summary { cursor: pointer; font-weight: 650; font-size: 15px; color: var(--ink-2); }
.more-terms[open] summary { margin-bottom: 10px; }
.more-terms .terms { margin-top: 0; }

.translation p { margin: 0 0 12px; white-space: pre-line; }
.translation .german { color: var(--ink-3); font-size: 14px; border-left: 3px solid var(--line); padding-left: 10px; }
.translation-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

details.reply { border-top: 1px solid var(--line); padding: 12px 0; }
details.reply:first-of-type { border-top: 0; padding-top: 0; }
details.reply summary { cursor: pointer; font-weight: 650; }
details.reply summary::marker { color: var(--ink-3); }

pre.letter {
  white-space: pre-wrap;
  font: 14px/1.55 var(--mono);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}

.reply-actions { display: flex; flex-wrap: wrap; gap: 8px; }

details.source summary { cursor: pointer; font-weight: 650; }
details.source textarea { margin: 12px 0 10px; font-family: var(--mono); font-size: 14px; }

.notice { background: var(--info-bg); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.notice.error { background: var(--urgent-bg); color: var(--urgent); }

.footer {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px max(28px, env(safe-area-inset-bottom));
  color: var(--ink-3);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.footer p { margin: 6px 0; }

.footer-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.footer .footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 600 16px/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.footer .footer-link:hover { border-color: var(--ink-3); }
.footer-link svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 520px) {
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; }
  .footer .footer-link { justify-content: center; }
  .footer-links .footer-link:last-child { grid-column: 1 / -1; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 10;
}

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.promises {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.promises li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  background: var(--good-bg);
  border: 1px solid color-mix(in srgb, var(--good) 25%, transparent);
  border-radius: 16px;
}

.promise-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--good);
  margin-bottom: 6px;
}

.promise-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.promise-icon .cross { stroke: var(--urgent); stroke-width: 2.2; }
.promises strong { font-size: 17px; line-height: 1.2; color: var(--ink); }
.promises span:last-child { font-size: 14px; color: var(--ink-2); line-height: 1.4; }

.offline { margin-top: 30px; }
.offline h2 { font-size: 20px; letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 10px; }
.offline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.offline-item { color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.offline-item.ready { color: var(--good); font-weight: 650; }
.offline-item.waiting, .offline-item.failed { color: var(--soon); }
.offline-item .link { padding: 0; font-weight: 650; color: var(--ink); }
.offline-tick { font-weight: 800; }
.offline-missing { flex-basis: 100%; font-size: 13px; color: var(--ink-3); }
.offline-missing p { margin: 4px 0 0; overflow-wrap: anywhere; }
.mini-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface-2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }

.save { margin-top: 16px; padding: 20px; }
.save-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.save-head img { border-radius: 16px; flex: none; }
.save h2 { font-size: 20px; letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 4px; }
.save-head p { margin: 0; color: var(--ink-2); }
.save-button { width: 100%; min-height: 52px; font-size: 17px; margin-bottom: 12px; }
.save-help-title { font-weight: 650; margin: 4px 0 8px; }
.save-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; color: var(--ink-2); }
.save-steps strong { color: var(--ink); }
.save-steps .glyph { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--focus); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.save-note { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.save-done { margin: 0; font-weight: 650; color: var(--good); }

.support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.support p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1 1 240px; }

.coffee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--coffee);
  color: var(--coffee-ink);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--coffee) 70%, #000);
}

.coffee:hover { filter: brightness(0.96); }
.coffee svg { width: 24px; height: 24px; fill: none; stroke: var(--coffee-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.coffee .cup { fill: #fff; }

.save-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px rgb(0 0 0 / 25%);
}

.save-dialog::backdrop { background: rgb(17 20 27 / 55%); }
.save-dialog h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -0.01em; }
.save-dialog .save-head { padding-right: 28px; }

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.problem { text-align: left; }
.problem p { margin: 0 0 6px; }
.problem-title { font-weight: 700; font-size: 17px; }
.problem-details { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.problem-details summary { cursor: pointer; }
.problem-details p { margin: 6px 0 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13px; }
.problem-details p:last-child { font-family: var(--font); }

.works { margin-top: 30px; }
.works h2 { font-size: 20px; letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 12px; }
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.works-head { margin: 0 0 8px; font-weight: 700; }
.works-head.yes { color: var(--good); }
.works-head.no { color: var(--urgent); }
.works-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.works-list li { position: relative; padding-left: 26px; color: var(--ink-2); }
.works-list li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.works-list.yes li::before { content: "✓"; color: var(--good); }
.works-list.no li::before { content: "✕"; color: var(--urgent); }
.works-note { margin: 14px 0 0; font-size: 14px; color: var(--ink-3); }

.boot-warning {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  margin: 0 auto;
  max-width: 560px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--urgent-bg);
  color: var(--urgent);
  font-weight: 600;
  box-shadow: var(--shadow);
  visibility: hidden;
  animation: boot-show 0s linear 8s forwards;
}

html.ready .boot-warning { display: none; }

@keyframes boot-show { to { visibility: visible; } }

.country-picker { margin: 0 0 14px; }
.country-title { margin: 0 0 8px; font-weight: 650; }
.countries { display: flex; flex-wrap: wrap; gap: 8px; }
.country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  font: 600 15px/1.2 var(--font);
  cursor: pointer;
}
.flag { display: inline-block; width: 21px; height: 14px; border-radius: 2px; object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgb(0 0 0 / 14%); }
.flag-large { width: 33px; height: 22px; border-radius: 3px; vertical-align: 0; margin-right: 4px; }
.country.selected { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.country:hover:not(.selected) { border-color: var(--ink-3); }

.scope {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.scope-title { margin: 0 0 10px; font-weight: 650; }
.scope-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.scope-tag { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.scope-tag span { color: var(--ink-3); }
.scope-more { margin-top: 10px; }
.scope-more summary { cursor: pointer; font-weight: 650; font-size: 15px; }
.scope-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; }
.scope-head { margin: 0 0 6px; font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.scope-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); font-size: 15px; }
.scope-list a { color: var(--ink); font-weight: 650; }
.scope-not { margin: 12px 0 0; font-size: 14px; color: var(--ink-3); }
.scope-short, .scope-not-inner { display: none; }
.scope-hint { margin: 0; color: var(--ink-2); font-size: 15px; }

.summary-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.summary-country { color: var(--ink-3); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.country-select {
  font: 600 14px/1.2 var(--font);
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
}
.summary-title .local { font-weight: 500; color: var(--ink-3); font-size: 18px; }
.pairs .original { display: none; color: var(--ink-3); font-size: 14px; border-left: 3px solid var(--line); padding-left: 10px; }
.pairs.with-original .original { display: block; order: 2; }
.pairs .pair { display: flex; flex-direction: column; }
.pairs.with-original .pair { border-bottom: 1px solid var(--line); padding: 10px 0 2px; }
.pairs.with-original .pair:last-child { border-bottom: 0; }
.pairs .pair.pair-head { display: none; }

.prose { line-height: 1.65; }
.prose h1 { font-size: clamp(28px, 5.5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 18px 0 12px; }
.prose h2 { font-size: 22px; letter-spacing: -0.01em; margin: 34px 0 10px; }
.prose h3 { font-size: 17px; margin: 22px 0 6px; }
.prose p, .prose li, .prose dd { color: var(--ink-2); }
.prose ul { padding-left: 22px; display: grid; gap: 6px; }
.prose a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose .link-list a { font-weight: 650; }
.prose .terms { gap: 14px; }
.prose pre.letter { font-size: 13px; }
.crumbs { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); }

.page-cta {
  margin: 24px 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--good-bg);
  border: 1px solid color-mix(in srgb, var(--good) 25%, transparent);
}
.page-layout { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; }
.page-layout main { max-width: none; }
.page-side { display: none; }

.page-cta-title { margin: 0 0 4px; font-weight: 750; font-size: 18px; color: var(--ink) !important; }
.page-cta p { margin: 0 0 12px; }
.page-cta .button { text-decoration: none; color: var(--accent-ink); }

.footer a { color: var(--ink-2); }
.footer a.coffee { color: var(--coffee-ink); }
.footer a .flag { margin-right: 5px; }

@media (max-width: 520px) {
  .promises { gap: 8px; }
  .promises li { padding: 12px 10px; }
  .promise-icon { width: 44px; height: 44px; }
  .promise-icon svg { width: 26px; height: 26px; }
  .promises strong { font-size: 15px; }
  .promises span:last-child { font-size: 13px; }
  .save-head img { width: 52px; height: 52px; }
  .save h2 { font-size: 18px; }
  .coffee { width: 100%; justify-content: center; }
}

@media (max-width: 360px) {
  .promises { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .drop-actions .button { flex: 1 1 100%; }
  .row { grid-template-columns: 1fr auto; }
  .row dt { grid-column: 1 / -1; }
  .summary-title { font-size: 23px; }
}

@media (hover: hover) and (pointer: fine) {
  #camera-label { display: none; }
  #files-label { background: var(--accent); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 70%, #000); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner, .progress-bar.indeterminate { animation: none; }
}

.start { display: flex; flex-direction: column; }
.intro { display: contents; }
.intro .hero { order: 1; }
.intro .promises { order: 2; }
.work { order: 3; }
.intro .how { order: 4; }
.hero h1 span { display: block; }

@media (max-width: 959px) {
  .hero h1 { font-size: clamp(24px, 6.5vw, 34px); margin: 10px 0 8px; }
  .lead { font-size: 16px; margin-bottom: 14px; }
  .promises { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; }
  .promises li { flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; }
  .promise-icon { width: 30px; height: 30px; border-radius: 9px; margin: 0; flex: none; }
  .promise-icon svg { width: 20px; height: 20px; }
  .promises strong { font-size: 14px; }
  .promises span:last-child { display: none; }
  .returning .intro .hero, .returning .intro .promises { display: none; }
  .returning .work { margin-top: 8px; }
  .countries { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .countries::-webkit-scrollbar { display: none; }
  .country { flex: none; scroll-snap-align: start; }
  .scope { padding: 12px 14px; }
  .scope-title { font-size: 15px; margin-bottom: 8px; }
  .scope-tags, .scope > .scope-not { display: none; }
  .scope-short { display: block; margin: 0; font-size: 15px; color: var(--ink-2); }
  .scope-more { margin-top: 6px; }
  .scope-not-inner { display: block; font-size: 13px; }
  .returning .scope-short { display: none; }
  .returning .scope-title { margin-bottom: 0; }
}

@media (max-width: 420px) {
  .promises li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .promises strong { font-size: 13px; }
}

@media (min-width: 960px) {
  .topbar, main, .footer { max-width: 1140px; }
  .start { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
  .intro { display: block; position: sticky; top: 16px; padding-top: 6px; }
  .hero h1 { font-size: 30px; line-height: 1.15; margin: 4px 0 10px; }
  .lead { font-size: 16px; margin-bottom: 18px; }
  .promises { grid-template-columns: 1fr; gap: 10px; margin: 0; }
  .promises li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 0; align-items: center; padding: 12px 14px; }
  .promise-icon { grid-row: span 2; width: 44px; height: 44px; margin: 0; }
  .promise-icon svg { width: 26px; height: 26px; }
  .promises strong { font-size: 16px; align-self: end; }
  .promises span:last-child { font-size: 13px; align-self: start; }
  .intro .how { margin-top: 24px; gap: 10px; }
  .intro .how li { grid-template-columns: 28px 1fr; font-size: 14px; }
  .intro .how li::before { width: 28px; height: 28px; font-size: 14px; }
  .work { padding-top: 8px; }
  .countries { gap: 6px; }
  .country { min-height: 36px; padding: 5px 10px; gap: 6px; font-size: 14px; }
  .scope-tag:nth-child(n+5) { display: none; }
  #working { max-width: 760px; width: 100%; margin: 0 auto; }
  #result { max-width: 1140px; width: 100%; margin: 0 auto; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .result-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
  .result-columns.single { grid-template-columns: minmax(0, 1fr); }
  .result-columns.single .result-col:empty { display: none; }
  .result-col { display: flex; flex-direction: column; gap: 16px; }
  .result-col > .card { margin: 0; }
  .result-col > .card:last-child { flex: 1; }
  .result-columns.measuring { align-items: start; }
  .result-columns.measuring .result-col > .card:last-child { flex: none; }
  .pairs.with-original .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .pairs.with-original .original { order: 0; font-size: 15px; border-left: 0; padding-left: 0; color: var(--ink-2); }
  .pairs.with-original .pair-head { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 0 0 4px; border-bottom: 2px solid var(--line); }
  .pairs.with-original .pair-head p { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
  .reply-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
  .reply-body .letter { margin-top: 0; }
  .page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; max-width: 1140px; align-items: start; }
  .page-side { display: block; position: sticky; top: 16px; padding: 70px 16px 32px 0; }
  .page-side .promises { margin-top: 16px; }
  .page-side .side-cta { margin: 0; }
  .prose .page-cta { display: none; }
}

@media (hover: none) and (pointer: coarse) {
  .dropzone { padding: 18px 16px 14px; }
  .drop-icon, .drop-title { display: none; }
  .drop-hint { margin-bottom: 12px; }
}

.cancel-teaser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 22px; }
.cancel-teaser h2 { font-size: 18px; letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 4px; }
.cancel-teaser p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 32em; }

.cancel-title { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; letter-spacing: -0.02em; margin: 6px 0 8px; }
.cancel-title:focus { outline: none; }
.cancel-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 650; font-size: 15px; }
.field .optional { font-weight: 400; color: var(--ink-3); }
.field input, .field select {
  width: 100%;
  min-height: 44px;
  font: 15px/1.4 var(--font);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.field select:disabled { opacity: .5; }
.field-hint, .cancel-form .notice { grid-column: 1 / -1; margin: 0; }
.field-hint { color: var(--ink-3); font-size: 14px; }
.cancel-tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.cancel-not { color: var(--ink-3); font-size: 14px; margin: 4px 4px 0; }

.print-sheet { display: none; }

@media print {
  @page { margin: 25mm 20mm; }
  .printing body { background: #fff; display: block; min-height: 0; }
  .printing body > *:not(.print-sheet) { display: none !important; }
  .printing .print-sheet { display: block; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 11pt/1.5 var(--font); color: #000; }
}

@media (min-width: 960px) {
  #cancel { max-width: 1140px; width: 100%; margin: 0 auto; }
  .cancel-columns { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; margin-bottom: 14px; }
  .cancel-side { display: flex; flex-direction: column; gap: 16px; }
  .cancel-columns .card { margin: 0; }
}
