/* Palette: warm paper, deep forest green, soft sage */
:root {
  --bg: #f3f3ee;
  --surface: #fafaf6;
  --text: #1e2b25;
  --heading: #234a3b;
  --sage: #7f9a87;
  --muted: #5e6a63;
  --line: #dcdfd5;
  --accent: #234a3b;
  --accent-ink: #f6f7f2;
  --accent-soft: #e5ebe3;
  --error: #a8321f;
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111613;
    --surface: #18201b;
    --text: #e4e9e4;
    --heading: #cfe0d4;
    --sage: #7f9a87;
    --muted: #9aa69f;
    --line: #29332d;
    --accent: #9cc3aa;
    --accent-ink: #10201a;
    --accent-soft: #1d2a23;
    --error: #f08b78;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
header.site { background: var(--bg); }
.brand { font-weight: 700; text-decoration: none; color: var(--heading); letter-spacing: -0.01em; display: flex; align-items: center; }
.brand::before { content: ""; margin-right: 8px; width: 18px; height: 18px; border-radius: 5px; background: var(--accent); box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 6px var(--accent-ink); }
.brand span { color: var(--sage); }
nav.sizes a { margin-left: 14px; font-size: 14px; text-decoration: none; color: var(--muted); }
nav.sizes a:hover, nav.sizes a[aria-current] { color: var(--accent); }

.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 40px 0 0; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 1px; }
h1 { font-size: clamp(34px, 7.5vw, 54px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 500; color: var(--heading); margin: 16px 0 14px; }
h1 span { color: var(--sage); display: block; }
.lede { color: var(--muted); margin: 0 0 24px; font-size: 17px; }

.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.drop {
  display: block;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 36px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.drop strong { display: block; font-size: 18px; margin-bottom: 4px; }
.drop small { color: var(--muted); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.controls { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; align-items: end; }
.controls label { font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.controls input, .controls select {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 120px;
}
.kb { display: flex; align-items: center; gap: 6px; }
.kb input { width: 110px; min-width: 0; }

.status { min-height: 1.6em; margin: 14px 0 0; font-weight: 500; }
.status.error { color: var(--error); }

.result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.stats dt { font: 500 11px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stats dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats .big dd { color: var(--accent); }
.preview { display: block; max-width: 100%; max-height: 360px; margin: 0 auto 14px; border-radius: 8px; }
.btn {
  display: block; text-align: center; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 500; padding: 13px 16px; border-radius: 6px;
}
.btn::after { content: "  →"; }
.btn:hover { filter: brightness(1.05); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chips a {
  font-size: 14px; text-decoration: none; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); background: var(--surface);
}
.chips a:hover { border-color: var(--accent); color: var(--accent); }

.content { margin: 40px 0; }
.content h2 { font-size: 22px; font-weight: 600; color: var(--heading); margin: 32px 0 8px; letter-spacing: -0.02em; }
.content h3 { color: var(--heading); }
.content h3 { font-size: 17px; margin: 20px 0 4px; }
.content p, .content li { color: var(--muted); }
.content ol { padding-left: 20px; }

/* Ad slots: empty until AdSense is approved, so they take no space now */
.ad-slot:empty { display: none; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer.site a { color: var(--muted); margin-right: 14px; }

@media (max-width: 560px) {
  nav.sizes { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .wide { grid-column: span 2; }
}
