:root {
  --ink: #1b1a17;
  --muted: #6b665d;
  --bg: #faf8f4;
  --card: #ffffff;
  --line: #e6e1d8;
  --accent: #b5532c;      /* terracotta */
  --accent-ink: #ffffff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* author display rules must never beat the hidden attribute */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main, .top, footer { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.top { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.credits { font-size: 14px; color: var(--muted); }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; letter-spacing: -0.025em; margin: 12px 0 14px; text-wrap: balance; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 0 0 12px; }
.lead { color: #3d3a34; font-size: 19px; margin: 0 0 22px; max-width: 34em; }
.fine { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.hero { display: grid; gap: 32px; padding: 24px 0 40px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1fr; align-items: center; } }
.upload { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 15px 22px; border-radius: 10px; cursor: pointer; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 3px solid #e9b49b; }
.compare { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--line); aspect-ratio: 1 / 1; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; background: rgba(27,26,23,.72); color: #fff; font-size: 13px; padding: 7px 10px; border-radius: 8px; }
.studio { display: grid; gap: 28px; padding: 8px 0 40px; border-top: 1px solid var(--line); padding-top: 28px; }
@media (min-width: 900px) { .studio { grid-template-columns: 1fr 1fr; } }
.pick img { width: 100%; border-radius: 12px; display: block; margin-bottom: 16px; }
.label { font-weight: 700; margin: 0 0 8px; }
.styles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.styles button { font: inherit; font-size: 15px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; }
.styles button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.go { font: inherit; font-weight: 700; padding: 14px 22px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; cursor: pointer; width: 100%; }
.go:disabled { opacity: .45; cursor: default; }
.status { color: var(--muted); min-height: 1.5em; }
.result .row { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; justify-content: flex-end; }
.result .row button, .buy { font: inherit; font-size: 14px; font-weight: 700; padding: 9px 14px; border-radius: 8px; border: 0; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer; text-decoration: none; }
.buy { background: var(--accent); color: var(--accent-ink); }
.how { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.how ol { margin: 0; padding-left: 20px; }
.how li { margin: 6px 0; }
footer { border-top: 1px solid var(--line); padding: 20px; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); }
.how ul { margin: 0; padding-left: 20px; }
.how li { margin: 6px 0; }
.more { columns: 2; list-style: none; padding-left: 0; }
.more a { color: var(--ink); }
a.upload { text-decoration: none; }
