/* KB Kit — pop, sticker-like look built on one idea: the upload-limit line.
   Stamp blue = fits. Limit red (dashed) = the limit / over the limit. Ink borders + offset shadows = pop.
   Light only: people come here with their photos, so the page should feel bright and friendly. */
:root {
  --paper: #ffffff;
  --band: #ffe14d;       /* sunny yellow band behind the hero */
  --surface: #ffffff;
  --ink: #16182b;
  --muted: #545a73;
  --line: #e3e6f0;       /* quiet dividers inside text areas */
  --stamp: #2f5bff;
  --stamp-ink: #ffffff;
  --stamp-soft: #e8edff;
  --limit: #ff4d4d;
  --mint: #2bd4a4;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --text: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1040px;
  --measure: 66ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--text); }
a { color: var(--stamp); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
header.site { background: var(--band); border-bottom: 2px solid var(--ink); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.3rem/1 var(--display); letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 26px; position: relative; }
.brand-mark::before { content: ""; position: absolute; left: 0; bottom: 4px; width: 19px; height: 10px; background: var(--stamp); border: 2px solid var(--ink); border-radius: 3px; }
.brand-mark::after { content: ""; position: absolute; left: 24px; top: 0; bottom: 0; border-left: 3px dashed var(--limit); }
.site-right { display: flex; align-items: center; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 12px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.badge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); border: 2px solid var(--ink); }
nav.site a { color: var(--ink); text-decoration: none; margin-left: 16px; font-weight: 700; }
nav.site a:hover { color: var(--stamp); }
@media (max-width: 680px) { nav.site { display: none; } .badge { font-size: .78rem; padding: 4px 10px; } }

main { padding: 0 0 72px; }
main > .wrap > :first-child:not(.band) { margin-top: 44px; }

/* ---------- Type scale ---------- */
h1 { font: 800 clamp(2.2rem, 5.4vw, 3.6rem)/1.05 var(--display); letter-spacing: -0.03em; margin: 0 0 16px; max-width: 18ch; }
h2 { font: 800 1.7rem/1.2 var(--display); letter-spacing: -0.015em; margin: 56px 0 16px; }
h3 { font: 700 1.2rem/1.3 var(--display); margin: 28px 0 6px; }
p, li { max-width: var(--measure); }
.lead { color: var(--ink); font-size: 1.15rem; margin: 0 0 28px; max-width: 54ch; }

/* ---------- Yellow band (top of every page) ---------- */
.band { background: var(--band); border-bottom: 2px solid var(--ink); margin: 0 calc(50% - 50vw); padding: 36px calc(50vw - 50%) 48px; }
.hero { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The one animated moment: a file shrinking to fit under the limit line. */
.meter { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; padding: 24px 22px 20px; box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.meter-file { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.meter-name { font-weight: 700; word-break: break-all; }
.meter-size { font: 800 2.3rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--limit); transition: color .3s; white-space: nowrap; }
.meter.fits .meter-size { color: var(--stamp); }
.meter-track { position: relative; height: 22px; background: var(--stamp-soft); border: 2px solid var(--ink); border-radius: 11px; }
.meter-bar { position: absolute; left: -2px; top: -2px; bottom: -2px; width: calc(100% + 4px); background: var(--limit); border: 2px solid var(--ink); border-radius: 11px; transition: width 1.6s cubic-bezier(.6,0,.2,1), background-color .3s; }
.meter.fits .meter-bar { width: 38%; background: var(--stamp); }
.meter-limit { position: absolute; left: 45%; top: -12px; bottom: -12px; border-left: 3px dashed var(--limit); }
.meter-limit span { position: absolute; top: calc(100% + 4px); left: -2px; transform: translateX(-50%); font-size: .85rem; color: var(--limit); white-space: nowrap; font-weight: 800; }
.meter-status { margin: 34px 0 0; font-weight: 700; color: var(--muted); min-height: 1.5em; }
.meter.fits .meter-status { color: var(--stamp); }
@media (prefers-reduced-motion: reduce) { .meter-bar, .meter-size { transition: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: 800 1.02rem/1 var(--text); padding: 14px 22px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--stamp); color: var(--stamp-ink); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.secondary { background: var(--surface); color: var(--ink); }
.btn.small { padding: 10px 16px; font-size: .95rem; }

/* ---------- Compressor widget ---------- */
.tool { background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.band .tool { margin-top: 32px; }
.limit-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; }
.limit-field label { font: 800 1.1rem/1.2 var(--display); }
.limit-input { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); padding: 0 12px 0 10px; box-shadow: var(--shadow-sm); }
.limit-input .le { color: var(--limit); font-weight: 800; font-size: 1.2rem; padding-right: 6px; }
.limit-input input { width: 84px; border: 0; background: transparent; color: var(--ink); font: 800 1.6rem/1 var(--display); padding: 10px 4px; font-variant-numeric: tabular-nums; }
.limit-input input:focus { outline: none; }
.limit-input:focus-within { outline: 3px solid var(--stamp); outline-offset: 3px; }
.limit-input .unit { font-weight: 800; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 700 .95rem/1 var(--text); padding: 9px 13px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums;
}
.chip:hover { background: var(--band); }
.chip[aria-pressed=true] { background: var(--stamp); color: var(--stamp-ink); }

.drop {
  border: 3px dashed var(--ink); border-radius: 14px; padding: 42px 16px; text-align: center; cursor: pointer;
  background: var(--stamp-soft);
}
.drop:hover, .drop.over { background: #d9e2ff; border-color: var(--stamp); }
.drop strong { display: block; font: 800 1.3rem/1.3 var(--display); margin-bottom: 6px; }
.drop small { color: var(--muted); font-size: .95rem; }
.drop input { display: none; }

details.more { margin-top: 16px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: .95rem; font-weight: 700; }
.dims { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.dims input { width: 100px; padding: 9px 10px; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; }
.hint { color: var(--muted); font-size: .9rem; }

.privacy-note { margin: 18px 0 0; font-size: .95rem; color: var(--muted); }
.privacy-note b { color: var(--ink); }

#results { display: grid; gap: 14px; margin-top: 20px; }
.result { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--surface); }
.result img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); background: var(--stamp-soft); display: block; }
.result .name { font-weight: 800; word-break: break-all; }
.result .meta { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.result .ok { color: var(--stamp); font-weight: 800; }
.result .warn { color: var(--limit); font-weight: 800; }
.fit-track { position: relative; height: 10px; background: var(--stamp-soft); border: 2px solid var(--ink); border-radius: 6px; margin: 8px 0 6px; max-width: 360px; }
.fit-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--stamp); border-radius: 4px; }
.fit-limit { position: absolute; top: -6px; bottom: -6px; border-left: 3px dashed var(--limit); }
@media (max-width: 560px) {
  .result { grid-template-columns: 60px 1fr; }
  .result img { width: 60px; height: 60px; }
  .result .actions { grid-column: 1 / -1; }
  .result .actions .btn { width: 100%; text-align: center; }
}

/* ---------- Three benefits ---------- */
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; max-width: none; }
@media (min-width: 820px) { .benefits { grid-template-columns: repeat(3, 1fr); } }
.benefits li { max-width: none; margin: 0; border: 2px solid var(--ink); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
.benefits li:nth-child(1) { background: #e3faf2; }
.benefits li:nth-child(2) { background: var(--stamp-soft); }
.benefits li:nth-child(3) { background: #fff4d1; }
.benefits svg { width: 100%; height: 120px; display: block; margin-bottom: 12px; }
.benefits b { display: block; font: 800 1.2rem/1.3 var(--display); margin-bottom: 4px; }
.benefits span { color: var(--muted); }

/* ---------- Tool list ---------- */
.tool-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: none; }
.tool-rows li { max-width: none; margin: 0; }
.tool-rows a { display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 20px; padding: 18px 20px; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow-sm); }
.tool-rows a:hover { background: var(--band); }
.tool-icon { grid-row: 1 / span 2; width: 56px; height: 56px; align-self: center; }
.tool-name { font: 800 1.25rem/1.3 var(--display); }
.tool-desc { color: var(--muted); grid-column: 2; }
.tool-sizes { grid-row: 1 / span 2; grid-column: 3; align-self: center; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tool-sizes span { font-size: .85rem; font-weight: 700; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; font-variant-numeric: tabular-nums; }
.tool-rows .soon { padding: 14px 20px; color: var(--muted); border: 2px dashed var(--muted); border-radius: 14px; }
@media (max-width: 560px) { .tool-sizes { display: none; } .tool-rows a { grid-template-columns: 44px 1fr; gap: 4px 14px; } .tool-icon { width: 44px; height: 44px; } }

/* ---------- Illustration strokes (inline SVG uses these classes) ---------- */
.i-ghost { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 3; }
.i-fill { fill: var(--stamp); stroke: var(--ink); stroke-width: 2; }
.i-paper { fill: #fff; }
.i-limit { stroke: var(--limit); stroke-width: 3; stroke-dasharray: 5 4; fill: none; }
.i-arrow { stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.i-white { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.i-blue { fill: var(--stamp); stroke: var(--ink); stroke-width: 3; }
.i-red { fill: var(--limit); stroke: var(--ink); stroke-width: 3; }
.i-mint { fill: var(--mint); stroke: var(--ink); stroke-width: 3; }
.i-yellow { fill: var(--band); stroke: var(--ink); stroke-width: 3; }
.i-cross { stroke: var(--limit); stroke-width: 7; stroke-linecap: round; }
.i-text { font: 800 15px var(--text); fill: var(--ink); }

/* ---------- Articles ---------- */
.ad-slot { min-height: 100px; margin: 32px 0; }
.ad-slot:empty { display: none; }
.prose table { border-collapse: collapse; width: 100%; max-width: var(--measure); font-size: .95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: var(--measure); }
details.faq summary { cursor: pointer; font-weight: 800; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

.size-links { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.size-links li { margin: 0; }
.size-links a { display: inline-block; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-weight: 800; box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums; }
.size-links a:hover { background: var(--band); }

footer.site { background: var(--ink); color: #c9cde0; padding: 32px 0 40px; font-size: .92rem; }
footer.site nav a { color: #fff; margin-right: 18px; }
footer.site p { margin: 14px 0 0; }
