@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #f6f7f4;
  --card: #ffffff;
  --ink: #1b2421;
  --muted: #5a6762;
  --line: #dde2dc;
  --teal: #0e6e5c;
  --teal-soft: #e3f1ec;
  --rust: #a64b23;
  --rust-soft: #f6e6dc;
  --slate: #6b7a90;
  --sans: "Public Sans", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; }
a { color: var(--teal); }
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; }

.top, main, .foot { width: min(100% - 40px, 920px); margin-inline: auto; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--teal); position: relative; }
.mark::after { content: ""; position: absolute; left: 5px; right: 5px; top: 10px; height: 3px; border-radius: 2px; background: #fff; }
.top nav { display: flex; gap: 22px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

.intro { padding: 44px 0 30px; max-width: 720px; }
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 6vw, 56px); line-height: 1.06; letter-spacing: -0.015em; }
.lede { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 62ch; }

.tool { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 1px 0 rgba(27,36,33,.04); }
.field-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
textarea { width: 100%; resize: vertical; min-height: 110px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font: 400 18px/1.5 var(--serif); color: var(--ink); background: #fbfcfa; }
textarea::placeholder { color: #9aa59f; font-style: italic; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.examples-label { font-size: 14px; color: var(--muted); margin-right: 2px; }
.chip { font: 600 14px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.primary { font: 600 16px var(--sans); color: #fff; background: var(--teal); border: 0; border-radius: 10px; padding: 13px 20px; cursor: pointer; }
.primary:hover { background: #0b5c4c; }
.primary:disabled { background: #8fb3aa; cursor: progress; }
.status { font-size: 15px; color: var(--muted); }
.status.error { color: var(--rust); }

.progress { margin-top: 16px; }
.progress-track { height: 8px; border-radius: 4px; background: var(--teal-soft); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: 4px; background: var(--teal); transition: width .4s linear; }
.progress-fill.done { transition: width .25s ease-out; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }

.results { margin-top: 26px; }
.ruler { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 18px; }
.ruler-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; align-items: baseline; }
.ruler-head h2 { font-size: 15px; font-weight: 700; }
.ruler-note { font-size: 14px; color: var(--muted); }
.scale { position: relative; height: 122px; margin: 14px 8px 4px; }
.track { position: absolute; left: 0; right: 0; top: 52px; height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--teal-soft), #eef0ea 45%, var(--rust-soft)); }
.target { position: absolute; left: 30%; width: 10%; top: 46px; height: 18px; border-radius: 4px; background: rgba(14,110,92,.18); border: 1px dashed var(--teal); }
.target span { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--teal); font-weight: 600; white-space: nowrap; }
.pin { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; transition: left .6s cubic-bezier(.2,.8,.2,1); }
.pin b { font-size: 15px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: #fff; }
.pin span { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.pin::after { content: ""; width: 2px; height: 10px; background: currentColor; order: 1; }
.pin-orig, .pin-tuned { top: 0; }
.pin-orig { color: var(--rust); } .pin-orig b { background: var(--rust); }
.pin-tuned { color: var(--teal); } .pin-tuned b { background: var(--teal); }
.pin-base { top: 60px; flex-direction: column-reverse; color: var(--slate); }
.pin-base b { background: var(--slate); }
.pin-base::after { order: 0; }
.ticks { position: absolute; left: 0; right: 0; bottom: -4px; display: flex; justify-content: space-between; font-size: 11px; color: #9aa59f; visibility: hidden; }

.outputs { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; margin-top: 16px; }
.out { border-radius: 14px; padding: 20px 22px; border: 1px solid var(--line); background: var(--card); }
.out h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.out h3 small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.out p { font-family: var(--serif); font-size: 21px; line-height: 1.5; white-space: pre-wrap; }
.out-tuned { border-color: var(--teal); box-shadow: inset 4px 0 0 var(--teal); }
.out-base p { font-size: 18px; color: #3c4744; }
.caveat { margin-top: 14px; font-size: 14px; color: var(--muted); }

.how { padding: 72px 0 24px; }
.how h2 { font-family: var(--serif); font-weight: 500; font-size: 32px; letter-spacing: -0.01em; }
.how-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 36px; margin-top: 22px; }
.how h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.how p { color: #3c4744; max-width: 52ch; }
.limits { margin-top: 34px; padding: 20px 22px; border-radius: 14px; background: var(--rust-soft); }
.limits h3 { color: var(--rust); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 34px 0 44px; margin-top: 30px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .intro { padding-top: 24px; }
  .tool, .ruler, .out { padding: 16px; }
  .outputs, .how-grid { grid-template-columns: 1fr; }
  .out p { font-size: 19px; }
  .top nav a:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pin { transition: none; } }
