:root {
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --border: #e2e5ea;
  --text: #14181f;
  --muted: #5c6470;
  --danger: #c0392b;
  --ok: #1a7f4b;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Light is the fleet default and the only theme: no prefers-color-scheme
   override, so a visitor whose OS is in dark mode still gets the light page.
   Declaring the scheme keeps form controls and scrollbars light too — without
   it the browser renders native widgets dark against a white page. */
:root { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); }

header.site { border-bottom: 1px solid var(--border); padding: 14px 0; }
header.site .wrap { display: flex; align-items: center; gap: 16px; }
header.site .brand { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
header.site nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--text); }

h1 { font-size: 2rem; line-height: 1.2; margin: 34px 0 10px; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; margin: 40px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.tagline { font-size: 1.1rem; color: var(--muted); margin: 0 0 26px; }

/* --- tool --- */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.drop {
  display: block;               /* a <label> is inline by default, which breaks the dashed frame */
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 38px 20px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: .9rem; }
.drop input[type=file] { display: none; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.field .unit { color: var(--muted); font-weight: 400; }
.field input, .field select {
  width: 100%; padding: 9px 11px; font: inherit; font-size: .95rem;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 7px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.options { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; font-size: .9rem; }
.options label { display: flex; align-items: center; gap: 7px; color: var(--muted); }

button.primary {
  margin-top: 18px; background: var(--accent); color: var(--accent-ink); border: 0;
  border-radius: 8px; padding: 11px 22px; font: inherit; font-weight: 650; cursor: pointer;
}
button.primary:hover { filter: brightness(1.07); }
button.primary:disabled { opacity: .5; cursor: default; }

.status { margin-top: 16px; font-size: .93rem; }
.status.error { color: var(--danger); }
.status.busy { color: var(--muted); }
progress { width: 100%; height: 6px; margin-top: 12px; }

.results { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.results .row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 5px 0; }
.results .row.primary { font-size: 1.3rem; font-weight: 700; }
.results .row .label { color: var(--muted); font-size: .92rem; }
.results .row.primary .label { color: var(--text); font-size: 1rem; }
.results .note, .notes { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.notes ul { margin: 6px 0 0; padding-left: 18px; }

a.download {
  display: inline-block; margin-top: 14px; background: var(--ok); color: #fff;
  padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 650;
}

/* --- content --- */
.steps { counter-reset: step; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding-left: 38px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
}
details.faq { border-bottom: 1px solid var(--border); padding: 13px 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 9px 0 2px; color: var(--muted); }

.privacy-note {
  margin-top: 14px; font-size: .88rem; color: var(--muted);
  display: flex; gap: 8px; align-items: flex-start;
}

footer.site { border-top: 1px solid var(--border); margin-top: 56px; padding: 24px 0 40px; font-size: .87rem; color: var(--muted); }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
footer.site a { color: var(--muted); }

@media (max-width: 560px) {
  h1 { font-size: 1.6rem; }
  .tool { padding: 16px; }
}

.field.submit-row { grid-column: 1 / -1; align-self: end; }
.field.submit-row button.primary { margin-top: 0; }

/* --- advertising --- */
/* Hidden until the loader marks the document as ad-serving. A labelled empty
   box shown to someone who declined ads is worse than no box at all. */
.ad-unit { display: none; }
/* Height is reserved so an ad arriving after consent does not shove the page
   around; the label keeps it distinguishable from the tool's own output. */
[data-ads="on"] .ad-unit {
  display: block; margin: 32px 0; padding: 8px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); min-height: 120px;
}
.ad-label {
  display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.ad-unit ins { display: block; width: 100%; }

.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .09); padding: 16px 0;
}
.consent[hidden] { display: none; }
.consent .wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.consent p { margin: 0; font-size: .9rem; color: var(--muted); max-width: 62ch; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent button {
  padding: 9px 18px; border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text);
}
.consent button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

@media (max-width: 560px) {
  .consent .wrap { justify-content: stretch; }
  .consent-actions { width: 100%; }
  .consent-actions button { flex: 1; }
}
