:root {
  --navy: #14213d;
  --navy-2: #24365f;
  --accent: #e4572e;
  --accent-2: #c2431f;
  --teal: #1f7a6d;
  --cream: #f7f5f0;
  --paper: #ffffff;
  --ink: #1b1d22;
  --muted: #5c6370;
  --line: #e4e0d6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 33, 61, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); }
h1, h2 { font-family: Fraunces, Georgia, serif; line-height: 1.15; color: var(--navy); }
h1 { font-size: clamp(1.75rem, 4.2vw, 2.9rem); margin: 0.15em 0 0.3em; }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); margin: 0 0 0.6em; }

.top {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1120px; margin: 0 auto; padding: 14px 16px 6px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.1rem; color: var(--navy); text-decoration: none; }
/* Brand mark: a round head with a glint. */
.brand-mark { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); display: inline-block; }
.brand-mark::after { content: ""; position: absolute; left: 4px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.top-cta { font-weight: 600; text-decoration: none; color: var(--navy-2); }

/* The tool is on the first screen: the hero is three short lines, nothing more. */
.hero { max-width: 1120px; margin: 0 auto; padding: 8px 16px 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 600; color: var(--accent-2); margin: 0; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 46em; margin: 0; }
.fine { font-size: 0.85rem; color: var(--muted); margin: 0.6em 0 0; }
.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; border: 0; border-radius: 999px; cursor: pointer;
  padding: 12px 22px; text-decoration: none; transition: transform 0.08s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--navy-2); }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-block.btn-ghost { margin-top: 10px; }
.btn-mini { font: inherit; font-size: 0.85rem; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--navy); cursor: pointer; }
.btn-mini:hover { border-color: var(--navy-2); }

.maker {
  max-width: 1120px; margin: 0 auto; padding: 0 16px 52px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start;
}
.card-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }

/* Photo picker */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.photo-box { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; margin: 0 0 22px; }
.photo-pick { display: grid; place-items: center; aspect-ratio: 1; border: 2px dashed var(--accent); border-radius: 14px; background: var(--cream); cursor: pointer; text-align: center; overflow: hidden; color: var(--muted); font-size: 0.82rem; line-height: 1.35; padding: 10px; }
.photo-pick:hover, #photoInput:focus-visible + .photo-pick { border-color: var(--navy); }
.photo-pick strong { display: block; color: var(--accent-2); font-size: 1rem; margin-bottom: 4px; }
.photo-pick.has-photo { border-style: solid; border-color: var(--teal); padding: 0; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick img[hidden], .photo-pick span[hidden] { display: none; }
.photo-side .fine:first-child { margin-top: 0; }
.photo-side .btn-mini { margin-top: 10px; }

/* Look picker */
.looks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.look {
  position: relative; border: 2px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden;
  background: var(--cream); cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.look img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.look-label { display: block; padding: 6px 8px 0; font-size: 0.82rem; font-weight: 600; line-height: 1.25; color: var(--navy); }
.look-note { display: block; padding: 2px 8px 8px; font-size: 0.72rem; line-height: 1.3; color: var(--muted); }
.look[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.16); }
.look[aria-checked="true"]::after {
  content: "✓"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 0.78rem;
}
.look:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 2px; }
.form-error { color: var(--accent-2); font-weight: 600; margin: 0 0 12px; }

/* Turnstile widget: invisible unless Cloudflare asks for a click. */
.human-check:empty { display: none; }
.human-check { display: flex; justify-content: center; margin: 0 0 0.8em; }

/* Result panel */
.maker-result { position: sticky; top: 16px; text-align: center; }
.result-title { margin-bottom: 0.5em; }
.spinner { width: 44px; height: 44px; margin: 8px auto 12px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); overflow: hidden; margin: 14px 0 6px; }
.bar-fill { height: 100%; width: 2%; background: linear-gradient(90deg, var(--teal), var(--accent)); transition: width 0.8s ease; }
.actions { margin-top: 14px; }
.paid-note { font-weight: 600; color: var(--teal); margin: 0 0 10px; }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.share-row .btn { padding: 11px 8px; }
.share-row[hidden], #previewBox .fine[hidden] { display: none; }

/* Before/after slider: two stacked pictures, the top one clipped at --pos. A real range input lies over the
   whole picture, so dragging, touch and the arrow keys all work without custom pointer code. */
.cmp { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--cream); user-select: none; -webkit-user-select: none; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp .cmp-after { clip-path: inset(0 0 0 var(--pos)); }
.cmp-tag { position: absolute; top: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(20, 33, 61, 0.82); color: #fff; font-size: 0.74rem; font-weight: 600; pointer-events: none; }
.cmp-tag-before { left: 10px; }
.cmp-tag-after { right: 10px; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(20, 33, 61, 0.25); pointer-events: none; }
.cmp-knob { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(20, 33, 61, 0.35); display: grid; place-items: center; color: var(--navy); font-size: 1rem; font-weight: 700; }
.cmp-knob::before { content: "↔"; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.cmp-range:focus-visible ~ .cmp-line .cmp-knob { outline: 3px solid var(--accent); outline-offset: 2px; }
.cmp.is-single .cmp-before, .cmp.is-single .cmp-line, .cmp.is-single .cmp-range, .cmp.is-single .cmp-tag { display: none; }
.cmp.is-single .cmp-after { clip-path: none; }

/* Content sections */
.how, .examples, .faq, .tips, .look-links, .page-intro { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 58px; position: relative; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.pairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pair { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pair-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pair-imgs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.pair figcaption { padding: 8px 12px; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
#examplesNote { margin-top: 12px; }
.look-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.look-links a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); text-decoration: none; font-size: 0.92rem; background: var(--paper); }
.look-links a:hover { border-color: var(--navy-2); }
.tips ul { margin: 0; padding-left: 1.2em; color: var(--ink); }
.tips li { margin-bottom: 4px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.faq p { margin: 10px 0 2px; color: var(--muted); }

/* Landing pages: the page's own text with its sample beside it */
.page-intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.page-intro-text h2 { margin-top: 1.2em; }
.page-intro-text h2:first-child { margin-top: 0; }
.page-intro-text p, .page-intro-text li { color: var(--muted); line-height: 1.65; }
.page-intro-text ul { padding-left: 1.2em; margin: 0; }
.page-sample { margin: 0; position: sticky; top: 16px; }
.page-sample figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }

.foot { text-align: center; padding: 28px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); }
.foot a { color: var(--muted); }

.legal { max-width: 760px; margin: 0 auto; padding: 8px 16px 56px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }

/* Share page /s/<id> and the 404 page */
.share-page, .notfound { max-width: 560px; margin: 0 auto; padding: 8px 16px 48px; text-align: center; }
.share-page h1, .notfound h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.share-img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); margin: 6px 0 20px; background: var(--paper); }

@media (max-width: 900px) {
  .maker { grid-template-columns: 1fr; }
  .maker-result { position: static; }
  .steps { grid-template-columns: 1fr; }
  .pairs { grid-template-columns: repeat(2, 1fr); }
  .page-intro { grid-template-columns: 1fr; }
  .page-sample { position: static; max-width: 460px; }
}
@media (max-width: 520px) {
  .hero { padding-bottom: 12px; }
  .lead { font-size: 0.98rem; }
  .card-panel { padding: 16px; }
  .photo-box { grid-template-columns: 118px 1fr; gap: 12px; margin-bottom: 18px; }
  .looks { grid-template-columns: repeat(3, 1fr); }
  .look-note { font-size: 0.7rem; }
  .pairs { grid-template-columns: 1fr; }
  .top-cta { display: none; }
}
