:root {
  --ink: #13243a;
  --stone: #566676;
  --paper: #f4f8f8;
  --surface: #ffffff;
  --line: #d3e0e2;
  --current: #137683;
  --current-deep: #0d5963;
  --current-soft: #e1f0f1;
  --spark: #f5a524;
  --spark-deep: #b86f00;
  --danger: #b3261e;
  --radius-lg: 22px;
  --radius: 12px;
  --radius-sm: 8px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6f0f1;
    --stone: #9fb2bf;
    --paper: #0f1c28;
    --surface: #152738;
    --line: #28415a;
    --current: #3fb6c2;
    --current-deep: #7fd3db;
    --current-soft: #173a47;
    --spark: #f5b347;
    --spark-deep: #f5b347;
    --danger: #ff8a80;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}
img, svg, video { max-width: 100%; }
a { color: var(--current-deep); text-underline-offset: 3px; }
a:hover { color: var(--current); }
:focus-visible { outline: 3px solid var(--spark); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 700; margin-top: 1.8em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.prose { max-width: 70ch; }
.muted { color: var(--stone); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 800 1.45rem/1 var(--display); letter-spacing: -0.03em; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--current-soft); color: var(--current-deep); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: 700 .95rem var(--body); color: var(--ink); }
@media (max-width: 820px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; z-index: 20; }
  .nav.open { display: flex; }
  .site-header { position: relative; }
}

/* Hero + tool */
.hero { padding: 36px 0 12px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; align-items: start; }
.hero-copy { padding-top: 12px; }
.hero-copy .lede { font-size: 1.15rem; color: var(--stone); max-width: 46ch; }
.promise { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.promise li { display: flex; gap: 10px; align-items: flex-start; }
.promise svg { flex: none; width: 22px; height: 22px; color: var(--current); margin-top: 2px; }
@media (max-width: 900px) {
  .hero-grid { display: flex; flex-direction: column; gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy .breadcrumb { order: 1; }
  .hero-copy h1 { order: 2; font-size: clamp(1.8rem, 7vw, 2.4rem); margin-bottom: 14px; }
  .hero-grid > .tool { order: 3; }
  .hero-copy .lede { order: 4; margin-top: 20px; font-size: 1.05rem; }
  .hero-copy .promise { order: 5; display: grid; margin-top: 4px; }
  .hero { padding-top: 20px; }
  .tool { padding: 14px; }
  .drop { min-height: 200px; }
}

.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: 0 18px 40px -28px rgba(19, 36, 58, .45); }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 250px; border: 2px dashed var(--current); border-radius: var(--radius); background: var(--current-soft);
  padding: 28px 16px; cursor: pointer; transition: background .15s, border-color .15s; overflow: hidden;
}
.drop.drag { background: color-mix(in srgb, var(--current-soft) 60%, var(--current) 18%); border-style: solid; }
.drop .wave { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; color: var(--current); opacity: .18; pointer-events: none; }
.drop strong { font: 700 1.25rem/1.3 var(--display); }
.drop .hint { color: var(--stone); font-size: .95rem; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 1.05rem/1 var(--body); padding: 15px 26px; border-radius: 999px; background: var(--current); color: #fff; min-height: 50px;
}
.btn:hover { background: var(--current-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .btn, .btn:hover { color: #0f1c28; } }
.btn.big { font-size: 1.12rem; padding: 17px 30px; width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--current-soft); color: var(--ink); }
.btn.download { background: var(--spark); color: #231400; }
.btn.download:hover { background: #ffb948; color: #231400; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.drop .btn { margin-top: 16px; pointer-events: none; }

.file-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.file-row .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .meta { color: var(--stone); font-size: .9rem; }
.file-row .grow { min-width: 0; flex: 1; }
.linkbtn { background: none; border: 0; color: var(--current-deep); font: 700 .95rem var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }

.field { margin: 0 0 16px; }
.field > .label { display: block; font-weight: 700; margin-bottom: 8px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.next .chips { display: flex; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm);
  padding: 10px 14px; font: 700 .95rem/1.2 var(--body); cursor: pointer; text-align: left;
}
.chip small { display: block; font-weight: 400; color: var(--stone); font-size: .82rem; margin-top: 2px; }
.chip[aria-pressed="true"] { border-color: var(--current); background: var(--current-soft); box-shadow: inset 0 0 0 1px var(--current); }
.inline-input { display: flex; align-items: center; gap: 8px; }
input[type="number"], select {
  font: 700 1rem var(--body); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; width: 110px;
}
select { width: auto; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--current); }

.preview { width: 100%; max-height: 320px; border-radius: var(--radius); background: #000; display: block; margin-bottom: 14px; }
.trim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trim-grid .field { margin: 0; }
.trim-grid input { width: 100%; }
.range-wrap { position: relative; height: 38px; margin: 6px 0 12px; }
.range-wrap input[type="range"] { position: absolute; inset: 0; width: 100%; pointer-events: none; appearance: none; background: none; margin: 0; }
.range-wrap input[type="range"]::-webkit-slider-thumb { pointer-events: auto; appearance: none; width: 22px; height: 34px; border-radius: 6px; background: var(--current); border: 3px solid var(--surface); cursor: ew-resize; }
.range-wrap input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 30px; border-radius: 6px; background: var(--current); border: 3px solid var(--surface); cursor: ew-resize; }
.range-track { position: absolute; left: 0; right: 0; top: 13px; height: 12px; border-radius: 6px; background: var(--line); }
.range-sel { position: absolute; top: 13px; height: 12px; border-radius: 6px; background: var(--current); opacity: .45; }
.small-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.small-actions .btn { padding: 10px 14px; min-height: 40px; font-size: .9rem; }

.progress { margin: 8px 0 14px; }
.bar { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--current), var(--current-deep)); transition: width .25s; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 700; }

/* Result: the size story */
.shrink { margin: 4px 0 18px; }
.shrink .row { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; margin-bottom: 10px; font-weight: 700; }
.shrink .row span:first-child { color: var(--stone); font-weight: 400; }
.shrink .track { height: 22px; border-radius: 6px; background: transparent; }
.shrink .fill { height: 100%; border-radius: 6px; background: var(--line); }
.shrink .fill.after { background: var(--spark); width: 100%; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.shrink .headline { font: 800 1.6rem/1.2 var(--display); margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .shrink .fill.after, .bar > span { transition: none; } }
.result-actions { display: grid; gap: 10px; }
.next { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.next .label { font-weight: 700; margin-bottom: 8px; display: block; }
.next .chips a { text-decoration: none; }

.notice { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; font-size: .95rem; }
.notice.err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--surface)); }
.notice.info { background: var(--current-soft); }
.privacy-line { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--stone); font-size: .88rem; margin: 14px 0 0; }
.privacy-line svg { width: 16px; height: 16px; color: var(--current); }

/* Ads */
.ad { margin: 28px auto; text-align: center; min-height: 0; }
.ad-label { display: block; font-size: .72rem; color: var(--stone); margin-bottom: 4px; letter-spacing: .02em; }
.ad ins { display: block; }

/* Content */
main section { scroll-margin-top: 20px; }
.content { padding: 12px 0 40px; }
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 18px 0 0; }
.steps li { counter-increment: s; padding: 18px; border-left: 3px solid var(--current); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.steps li::before { content: counter(s); display: block; font: 800 1.9rem/1 var(--display); color: var(--current); margin-bottom: 8px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 1.05rem; list-style-position: outside; }
.faq details p { margin: 10px 0 0; }
table.specs { border-collapse: collapse; width: 100%; max-width: 70ch; margin: 8px 0 18px; font-size: .95rem; }
table.specs th, table.specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.specs th { font-family: var(--display); }

.tool-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0 0; }
.tool-link { display: block; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.tool-link:hover { border-color: var(--current); color: var(--ink); }
.tool-link b { display: block; font-family: var(--display); font-size: 1.08rem; margin-bottom: 2px; }
.tool-link span { color: var(--stone); font-size: .92rem; }
.group-title { margin-top: 32px; }

.breadcrumb { font-size: .88rem; color: var(--stone); margin-bottom: 10px; }
.breadcrumb a { color: var(--stone); }

.page { padding: 36px 0 56px; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 28px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot-grid h3 { font-size: 1rem; margin-bottom: 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--ink); text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.copy { margin-top: 26px; color: var(--stone); font-size: .88rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid .about-col { grid-column: 1 / -1; } }

[hidden] { display: none !important; }
