/* EZ4X4 Images. Navy, EZ4X4 red, plenty of white, few words. */
:root {
  --navy: #1f3864;
  --navy-deep: #14264a;
  --red: #c8102e;
  --bg: #f3f5f9;
  --card: #ffffff;
  --ink: #16223b;
  --muted: #5d6982;
  --line: #e1e6ef;
  --soft: #eef2f8;
  --ok: #1c8a4b;
  --ok-soft: #e8f6ee;
  --bad-soft: #fdecef;
  --accent: var(--navy);
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(20, 38, 74, .06), 0 8px 24px rgba(20, 38, 74, .06);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1422;
    --card: #161f33;
    --ink: #e8edf7;
    --muted: #9ba8c2;
    --line: #27324b;
    --soft: #1d2840;
    --ok: #4cc38a;
    --ok-soft: #14301f;
    --bad-soft: #3a1820;
    --accent: #6f95dc;
    --on-accent: #0d1422;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  min-height: 100vh;
  min-height: 100dvh;
}
h1, h2, p { margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
small { color: var(--muted); font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ---------- brand ---------- */
.brand { font-size: 19px; letter-spacing: .2px; white-space: nowrap; }
.brand b { font-weight: 800; }
.brand i { font-style: normal; color: var(--red); }
.brand span { font-weight: 400; opacity: .85; }

/* ---------- top bar ---------- */
.top { background: var(--navy-deep); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 28px; }
.top-brand { color: #fff; text-decoration: none; }
.places { display: flex; gap: 4px; flex: 1; }
.places a {
  color: rgba(255, 255, 255, .78); text-decoration: none; padding: 8px 14px; border-radius: 9px;
  font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px;
}
.places a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.places a[aria-current] { color: #fff; background: rgba(255, 255, 255, .16); }
.places .ico { display: none; }
.ico { width: 24px; height: 24px; }

.mine { position: relative; margin-left: auto; }
.mine summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 600; font-size: 15px;
}
.mine summary::-webkit-details-marker { display: none; }
.mine summary:hover, .mine[open] summary { background: rgba(255, 255, 255, .18); }
.mine-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; z-index: 30;
}
.mine-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.mine-head small { display: block; }
.mine-menu a, .mine-menu button {
  display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 9px; border: 0; background: none;
  color: var(--ink); font: inherit; text-decoration: none; cursor: pointer;
}
.mine-menu a:hover, .mine-menu button:hover { background: var(--soft); }
.mine-menu form { margin: 0; }

/* ---------- page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.page.narrow { max-width: 720px; }
.page-title { font-size: 28px; line-height: 1.2; margin-bottom: 18px; letter-spacing: -.2px; }
.block { margin-top: 30px; }
.block h2, .block-title { font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0 0 10px 2px; font-weight: 700; }
.block-title { margin-top: 30px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 26px; }
.lead { font-size: 18px; color: var(--muted); }
.actions { margin-top: 20px; }

/* ---------- avatars ---------- */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex: none; color: #fff; font-weight: 700; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-sm { width: 34px; height: 34px; font-size: 15px; }
.av-md { width: 44px; height: 44px; font-size: 18px; }
.av-lg { width: 60px; height: 60px; font-size: 24px; }
.av-xl { width: 92px; height: 92px; font-size: 36px; box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line); }
.av-c0 { background: #1f3864; } .av-c1 { background: #c8102e; } .av-c2 { background: #2f6f8f; }
.av-c3 { background: #6a4c93; } .av-c4 { background: #3d7a55; } .av-c5 { background: #b3611b; }

/* ---------- home ---------- */
.hero { display: flex; align-items: center; gap: 26px; padding: 34px; }
.hero h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.4px; }
.hero .lead { margin-top: 8px; }
.empty { display: flex; align-items: center; gap: 24px; padding: 26px; }
.empty-tall { padding: 44px 30px; }
.empty-art { width: 128px; flex: none; }
.empty-title { font-size: 18px; font-weight: 700; }
.art-wall { fill: var(--soft); }
.art-roof { fill: none; stroke: var(--navy); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.art-open { fill: var(--card); stroke: var(--line); stroke-width: 2; }
.art-door { fill: var(--navy); }
.art-line { stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; }
.art-rail { fill: var(--red); }
.art-floor { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
@media (prefers-color-scheme: dark) { .art-roof { stroke: #6f95dc; } .art-door { fill: #2b4a86; } }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px; border-left: 5px solid var(--red); }
.crew { display: flex; flex-wrap: wrap; gap: 8px 6px; padding: 22px 18px; }
.crew-one { width: 108px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.crew-one strong { margin-top: 8px; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soon-tag { background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; font-weight: 600; }
.field > span small { margin-left: 6px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]), select, textarea {
  font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; width: 100%; min-height: 48px; font-weight: 400;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.check { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); margin: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; cursor: pointer;
  padding: 11px 20px; min-height: 46px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; width: fit-content;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
@media (prefers-color-scheme: dark) { .btn-primary { background: #2f55a0; border-color: #2f55a0; } .btn-primary:hover { background: #3a63b5; border-color: #3a63b5; } }
.btn-wide { width: 100%; min-height: 52px; font-size: 17px; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.note { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-weight: 600; }
.note-ok { background: var(--ok-soft); color: var(--ok); }
.note-bad { background: var(--bad-soft); color: var(--red); }
@media (prefers-color-scheme: dark) { .note-bad { color: #ff8fa0; } }

.step { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; min-width: 0; }
.step legend { font-size: 18px; font-weight: 700; padding: 0; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.step legend b { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }

.tones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tone input { position: absolute; opacity: 0; }
.tone-card { display: grid; gap: 6px; height: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.tone-name { font-weight: 700; }
.tone-sample { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.tone input:checked + .tone-card { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); background: var(--soft); }
.tone input:focus-visible + .tone-card { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

.photo-pick { display: flex; align-items: center; gap: 22px; }
.photo-pick .muted { margin-top: 8px; }

/* ---------- sign-in and join ---------- */
body.bare { background: linear-gradient(180deg, var(--navy-deep) 0 230px, var(--bg) 230px); }
.gate { max-width: 440px; margin: 0 auto; padding-top: 22px; }
.gate-wide { max-width: 600px; }
.gate-brand { color: #fff; text-align: center; margin-bottom: 30px; }
.gate-brand .brand { font-size: 28px; }
.gate .card { box-shadow: 0 12px 40px rgba(20, 38, 74, .16); }
.gate .lead { margin-bottom: 22px; font-size: 16px; }
.gate-who { text-align: center; margin: -4px 0 22px; }
.gate-who h1 { font-size: 24px; margin-top: 14px; }
.gate-alt { text-align: center; margin-top: 18px; }
.gate-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 20px; }

/* ---------- team ---------- */
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.row form { margin: 0; }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-fold summary { list-style: none; cursor: pointer; }
.row-fold summary::-webkit-details-marker { display: none; }
.row-fold.is-off summary { opacity: .55; }
.fold-body { padding: 4px 18px 22px 76px; }
.fold-extra { margin-top: 16px; }
.you { font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); padding: 2px 8px; border-radius: 999px; margin-left: 4px; vertical-align: 2px; }
.linkbox { border-left: 5px solid var(--ok); display: grid; gap: 12px; }
.copy-row { display: flex; gap: 10px; }
.copy-text { font-family: ui-monospace, Consolas, monospace !important; font-size: 14px !important; }

/* ---------- the door ---------- */
.door { position: fixed; inset: 0; z-index: 100; overflow: hidden; cursor: pointer; animation: door-gone 0s linear forwards; }
.door-panel {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, .22)),
    repeating-linear-gradient(180deg, #24427a 0 2px, #1f3864 2px 40px, #162a50 40px 44px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  animation: door-up 1s cubic-bezier(.7, 0, .25, 1) forwards;
  will-change: transform;
}
.door-sign { text-align: center; color: #fff; padding: 30px 38px; background: rgba(13, 24, 48, .78); border-radius: 16px; border: 1px solid rgba(255, 255, 255, .14); max-width: min(86vw, 560px); }
.door-brand .brand { font-size: clamp(30px, 6vw, 46px); }
.door-text { margin-top: 12px; font-size: clamp(18px, 3.4vw, 24px); color: rgba(255, 255, 255, .9); }
.door-rail { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--red); }
.door-handle { position: absolute; left: 50%; bottom: 34px; width: 92px; height: 12px; margin-left: -46px; border-radius: 8px; background: rgba(255, 255, 255, .22); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3); }
.door-skip { position: absolute; right: 18px; bottom: 30px; z-index: 2; background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; animation: door-fade .3s linear 1.4s forwards; }
/* the first time: read the welcome, then the door rolls up */
.door-first { animation-delay: 3.200s; }
.door-first .door-panel { animation-duration: 1.500s; animation-delay: 1.700s; }
/* later: quick */
.door-short { animation-delay: 1.250s; }
.door-short .door-panel { animation-duration: .750s; animation-delay: .500s; }
.door.is-skipped { display: none; }
@keyframes door-up { to { transform: translateY(-103%); } }
@keyframes door-gone { to { visibility: hidden; pointer-events: none; } }
@keyframes door-fade { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .door-panel { animation-name: door-fade; animation-duration: .350s !important; }
  .door-first { animation-delay: 2.100s; }
  .door-short { animation-delay: .900s; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .top-in { height: 54px; padding: 0 14px; }
  .mine-name { display: none; }
  .mine summary { padding: 4px; }
  .places {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 0; justify-content: space-around;
  }
  .places a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 12px; color: var(--muted); min-height: 52px; justify-content: center; }
  .places a:hover { background: none; color: var(--muted); }
  .places a[aria-current] { color: var(--accent); background: none; }
  .places .ico { display: block; }
  .page { padding: 18px 14px calc(96px + env(safe-area-inset-bottom)); }
  body.bare .page { padding-bottom: 40px; }
  .page-title { font-size: 24px; }
  .pad { padding: 20px; }
  .hero { padding: 24px 20px; gap: 18px; }
  .hero h1 { font-size: 25px; }
  .hero .av-xl, .photo-pick .av-xl { width: 72px; height: 72px; font-size: 28px; }
  .lead { font-size: 16px; }
  .empty { flex-direction: column; text-align: center; gap: 14px; }
  .callout { flex-direction: column; align-items: stretch; }
  .callout .btn { width: 100%; }
  .crew { justify-content: space-around; }
  .crew-one { width: 31%; }
  .tones { grid-template-columns: 1fr; }
  .fold-body { padding-left: 18px; }
  .copy-row { flex-direction: column; }
  .copy-row .btn { width: 100%; }
}

/* ================= step 2: products, gallery, compare ================= */
:root { --stage: #e4e8ef; }
@media (prefers-color-scheme: dark) { :root { --stage: #090e18; } }
.page.wide { max-width: 1560px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head-row .page-title { margin: 0; }
.search { flex: 0 1 360px; }
.crumb { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.crumb a { text-decoration: none; font-weight: 600; }
.sku { font-weight: 800; color: var(--accent); letter-spacing: .3px; margin-right: 6px; white-space: nowrap; }
.two { display: grid; grid-template-columns: 1fr 240px; gap: 14px; }
.fold-card { margin: 0 0 26px; }
.grid + .fold-card, .empty + .fold-card { margin-top: 28px; }
.fold-card > summary { list-style: none; cursor: pointer; padding: 16px 18px; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card[open] > summary { border-bottom: 1px solid var(--line); }
.pad-s { padding: 16px; }

/* gallery */
.shelf { margin-bottom: 30px; }
/* A product's heading on the list is one link across the whole row. The button at its end makes that plain. */
.shelf-head { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; text-decoration: none; color: var(--ink); margin: 0 -8px 8px; padding: 6px 8px; border-radius: 12px; font-size: 17px; transition: background .15s; }
.shelf-name { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.shelf-go { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 10px 5px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--accent); font-size: 14px; font-weight: 700; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.shelf-arrow { font-size: 20px; line-height: 1; margin-top: -2px; transition: transform .15s; }
.shelf-go:has(> .shelf-arrow:only-child) { padding: 5px 13px; }      /* a product without pictures: the arrow alone */
.shelf-head:hover, .shelf-head:focus-visible { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.shelf-head:hover strong, .shelf-head:focus-visible strong { text-decoration: underline; }
.shelf-head:hover .shelf-go, .shelf-head:focus-visible .shelf-go { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.shelf-head:hover .shelf-arrow, .shelf-head:focus-visible .shelf-arrow { transform: translateX(3px); }
.shelf-head:active .shelf-go { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .shelf-head, .shelf-go, .shelf-arrow { transition: none; } }
.grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.grid-big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: 20px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); display: block; transition: box-shadow .15s, border-color .15s; }
.tile:hover, .tile:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
/* on a product's page each picture ends in a small arrow, so the card reads as something to open */
.tile-end { margin-left: auto; display: inline-flex; align-items: baseline; gap: 7px; }
.tile-go { color: var(--accent); font-size: 18px; font-weight: 700; line-height: 1; transition: transform .15s; }
.tile:hover .tile-go, .tile:focus-visible .tile-go { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .tile-go { transition: none; } }
.tile-img { display: block; aspect-ratio: 1; background: #fff; }
.tile-img img { width: 100%; height: 100%; object-fit: contain; }
.tile-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 8px 10px; font-size: 13px; border-top: 1px solid var(--line); }
.tile-foot small { font-size: 12px; white-space: nowrap; }
.tile-foot b { white-space: nowrap; }
.grid:not(.grid-big) .tile-foot { flex-direction: column; gap: 0; padding: 6px 9px; }
.tile-foot small.more { color: var(--accent); font-weight: 700; }
.empty-link { text-decoration: none; padding: 18px 20px; }

/* upload */
.drop { border-style: dashed; border-width: 2px; box-shadow: none; padding: 18px; }
.drop.is-over { border-color: var(--accent); background: var(--soft); }
.drop-in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; cursor: pointer; }
.is-busy .btn { opacity: .5; pointer-events: none; }
.drop-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.drop-list li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px 11px; background: var(--soft); border-radius: 8px; font-size: 14px; overflow: hidden; }
.drop-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-list li small { flex: none; }
.drop-list li i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); transition: width .2s; }
.drop-list li.is-ok i { background: var(--ok); }
.drop-list li.is-ok small { color: var(--ok); font-weight: 700; }
.drop-list li.is-bad i { background: var(--red); }
.drop-list li.is-bad small { color: var(--red); font-weight: 700; white-space: normal; text-align: right; }

/* compare */
/* One row: where you are, how to compare, and the steps through the list. */
.cmp-top { display: flex; align-items: center; gap: 10px 16px; margin-bottom: 12px; min-height: 41px; }
.cmp-where { display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: 0; }
.cmp-back { font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 3em; flex: 0 1 auto; }
.cmp-code { white-space: nowrap; }
.cmp-product { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted); text-decoration: none; }
.cmp-product:hover { color: var(--ink); text-decoration: underline; }
.cmp-steps { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.steps { display: inline-flex; gap: 4px; }
.step-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); text-decoration: none; font-size: 18px; color: var(--ink); }
.step-btn.is-off { opacity: .35; }
.cmp-tools { display: flex; gap: 10px; flex: none; }
.seg { display: inline-flex; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; font-weight: 600; font-size: 14px; border: 0; background: none; color: var(--ink); padding: 8px 14px; min-height: 38px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { background: var(--soft); }
.seg button[aria-pressed=true] { background: var(--navy); color: #fff; }

/* The picture on the left, the Review box on the right. The right column never scrolls by itself: when it is taller
   than the window the page scrolls, and the picture stays in view (see the 1101px rule below). */
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 16px; align-items: start; }
.cmp h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 10px; }
.cmp-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cmp-stage { scroll-margin-top: 72px; }

.cmp-stage { position: relative; height: calc(100dvh - 145px); min-height: 380px; background: var(--stage); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pane { position: relative; overflow: hidden; min-width: 0; min-height: 0; }
.pane img { width: 100%; height: 100%; object-fit: contain; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.tag { position: absolute; bottom: 12px; padding: 5px 11px; border-radius: 8px; font-size: 13px; font-weight: 700; color: #fff; pointer-events: none; white-space: nowrap; }
.tag-a { left: 12px; background: var(--navy); }
.tag-b { right: 12px; background: var(--red); }
.handle { display: none; }
/* without JavaScript: the two pictures simply sit next to each other */
.cmp:not(.is-live) .cmp-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
/* with JavaScript */
.cmp.is-live .cmp-stage { touch-action: none; user-select: none; -webkit-user-select: none; }
.cmp.is-live[data-mode=slider] .pane, .cmp.is-live[data-mode=new] .pane { position: absolute; inset: 0; }
.cmp.is-live[data-mode=slider] .cmp-stage { cursor: ew-resize; }
.cmp.is-live[data-mode=new] .pane-a { display: none; }
.cmp.is-live[data-mode=side] .cmp-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--line); }
.cmp.is-live[data-mode=side] .pane { background: var(--stage); }
.cmp.is-live.is-zoomed .cmp-stage { cursor: grab; }
.cmp.is-live[data-mode=slider] .handle { display: block; position: absolute; top: 0; bottom: 0; width: 44px; margin-left: -22px; cursor: ew-resize; z-index: 3; outline-offset: -4px; }
.handle::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(20, 38, 74, .35); }
.handle span { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.handle span::before, .handle span::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border: solid var(--navy); border-width: 0 0 2.500px 2.500px; margin-top: -5px; }
.handle span::before { left: 11px; transform: rotate(45deg); }
.handle span::after { right: 11px; transform: rotate(-135deg); }

/* One column that can never be wider than its box: a long file name wraps instead of pushing the cards out. */
.cmp-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; overflow-wrap: anywhere; }
.cmp-side > * { min-width: 0; }
label.btn { position: relative; }      /* a hidden file input inside a button stays inside it, wherever the page scrolls */
@media (min-width: 1101px) {
  /* The picture fills the window under the two bars and stays there. With the strip of older versions it is one row shorter. */
  .cmp-page .page.wide { padding: 16px 20px 16px; }
  /* When notes make the right column taller than the window, only that column moves. The bar and the picture stay
     exactly where they are: 60px of header, then the bar (69px with its padding), then the picture. */
  .cmp-top { position: sticky; top: 60px; z-index: 6; background: var(--bg); margin: -16px 0 0; padding: 16px 0 12px; }
  .cmp-main { position: sticky; top: 129px; }
  /* While the administrator looks as the team, the yellow bar (48px) is on top and stays; the header scrolls away. */
  .is-looking .cmp-top { position: static; }
  .is-looking .cmp-main { top: 60px; }
  .is-looking .cmp-stage { height: calc(100dvh - 193px); }
}
.code-big { font-size: 20px; font-weight: 800; }
.rename { display: grid; gap: 10px; margin-bottom: 12px; }
.form-tight { gap: 12px; }
.btn-wide-s { width: 100%; overflow: hidden; }
.btn-wide-s span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-side input:not([type=checkbox]):not([type=radio]):not([type=file]) { min-height: 42px; padding: 9px 12px; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* one column: the bar, the picture, the older versions, the Review box, the folds. Pinch zooms. */
  .cmp { grid-template-columns: minmax(0, 1fr); }
  .cmp-stage { height: 62dvh; min-height: 300px; }
  .cmp-top { flex-wrap: wrap; }
  .cmp-zoom { display: none; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .grid-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
  .search { flex-basis: 100%; }
  .tile-foot { flex-direction: column; gap: 0; padding: 6px 8px; }
  .cmp { gap: 12px; }
  .cmp-stage { height: 50dvh; min-height: 260px; }
  .cmp.is-live[data-mode=side] .cmp-stage, .cmp:not(.is-live) .cmp-stage { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .seg button { padding: 8px 11px; }
  .cmp-product { display: none; }
  .cmp-tools { order: 3; width: 100%; }
  .cmp-tools .seg { flex: 1; }
  .cmp-tools .seg button { flex: 1; padding: 8px 6px; }
  .cmp-count { font-size: 13px; }
  .tag { font-size: 11px; padding: 4px 8px; bottom: 8px; }
  .tag-a { left: 8px; } .tag-b { right: 8px; }
}
@media (max-width: 480px) { .cmp-count { display: none; } }      /* the name of the list matters more than its length */

/* ================= step 3: Amazon listings, approvals, comment pins ================= */
:root { --wait: #b7791f; --wait-soft: #fdf3dc; }
@media (prefers-color-scheme: dark) { :root { --wait: #e6b450; --wait-soft: #33290f; } }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-approved { background: var(--ok-soft); color: var(--ok); }
.badge-waiting { background: var(--wait-soft); color: var(--wait); }
.badge-rejected { background: var(--bad-soft); color: var(--red); }
@media (prefers-color-scheme: dark) { .badge-rejected { color: #ff8fa0; } }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--card); }
.dot-approved { background: var(--ok); } .dot-waiting { background: var(--wait); } .dot-rejected { background: var(--red); }
.legend { color: var(--muted); font-size: 13px; display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; }
.legend .dot { margin-left: 10px; }
.head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-s { margin: -8px 0 18px; }
.after { margin-top: 16px; }
button:disabled { opacity: .4; cursor: default; }

.strip { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; text-decoration: none; }
.strip-one { position: relative; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: block; }
.strip-one img { width: 100%; height: 100%; object-fit: contain; }
.strip-one .dot { position: absolute; right: 6px; bottom: 6px; width: 14px; height: 14px; }
.strip-one.is-empty { background: none; border-style: dashed; border-width: 2px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; font-size: 14px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.slot { padding: 14px; display: grid; gap: 10px; align-content: start; scroll-margin-top: 80px; }
.slot.is-empty { box-shadow: none; border-style: dashed; border-width: 2px; background: none; }
.slot:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.slot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.slot-img { display: block; aspect-ratio: 1; background: #fff; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.slot-img img { width: 100%; height: 100%; object-fit: contain; }
.slot-blank { background: none; border: 0; display: flex; align-items: center; justify-content: center; color: var(--line); font-size: 44px; font-weight: 800; }
.slot-meta { font-size: 13px; color: var(--muted); }
.slot-meta b { color: var(--ink); }
.pins-open { color: var(--red); font-weight: 700; }
.slot-why { font-size: 13px; background: var(--bad-soft); color: var(--ink); border-radius: 8px; padding: 7px 10px; }
.slot-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.slot-acts form { display: flex; gap: 6px; margin: 0; }
.slot-pick summary { list-style: none; cursor: pointer; font-size: 14px; }
.slot-pick summary::-webkit-details-marker { display: none; }
.pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; max-height: 220px; overflow: auto; }
.pick button { padding: 0; border: 1.5px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.pick button:hover { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.pick img { width: 100%; height: 100%; object-fit: contain; }
.pick-up { display: grid; gap: 8px; margin-top: 10px; font-size: 13px; }
.pick-up input[type=file] { max-width: 100%; font: inherit; font-size: 13px; color: var(--muted); }

.shop { display: grid; grid-template-columns: 74px minmax(0, 1.25fr) minmax(220px, .75fr); gap: 20px; padding: 22px; align-items: start; }
.shop-thumbs { display: grid; gap: 8px; }
.shop-thumbs a { display: block; aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.shop-thumbs a.is-on { border-color: #e77600; box-shadow: 0 0 0 2px rgba(231, 118, 0, .3); }
.shop-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.shop-main { background: #fff; border-radius: 10px; aspect-ratio: 1; }
.shop-main img { width: 100%; height: 100%; object-fit: contain; }
.shop-side { display: grid; gap: 12px; align-content: start; }
.shop-title { font-size: 22px; line-height: 1.25; }
.shop-now { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ghost-lines { display: grid; gap: 9px; margin: 6px 0 10px; }
.ghost-lines i { height: 11px; border-radius: 6px; background: var(--soft); }
.ghost-lines i:nth-child(1) { width: 38%; height: 18px; } .ghost-lines i:nth-child(3) { width: 86%; } .ghost-lines i:nth-child(4) { width: 62%; }

.row-link { text-decoration: none; color: var(--ink); }
.row-link:hover { background: var(--soft); }
.row-thumb { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.count { min-width: 52px; height: 52px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; flex: none; }
.count-wait { background: var(--wait-soft); color: var(--wait); }

.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 28px; gap: 14px; align-items: center; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.bar { width: 100%; height: 10px; display: block; }
.bar-bg { fill: var(--soft); } .bar-fill { fill: var(--red); }

.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; width: 100%; }
.btn-ok:hover { border-color: var(--ok); filter: brightness(1.08); }
.btn-no { width: 100%; }
.btn-no-go { background: var(--red); border-color: var(--red); color: #fff; width: 100%; }
@media (prefers-color-scheme: dark) { .btn-ok { color: #06220f; } }
.decide-form { display: grid; gap: 8px; margin: 10px 0 4px; }
.decide-now { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.no summary { list-style: none; }
.no summary::-webkit-details-marker { display: none; }
.no[open] summary { border-color: var(--red); color: var(--red); }
.no-body { display: grid; gap: 9px; margin-top: 12px; }
.no-body .check { font-size: 15px; }
.no-body .check input { accent-color: var(--red); }

.pin-layer { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pin, .pin-no { width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font: 800 13px/1 var(--font); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pin { position: absolute; margin: -14px 0 0 -14px; border: 2.500px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); cursor: pointer; pointer-events: auto; padding: 0; box-sizing: content-box; width: 24px; height: 24px; }
.pin.is-active { outline: 3px solid #fff; box-shadow: 0 0 0 6px var(--red), 0 2px 10px rgba(0, 0, 0, .5); z-index: 1; }
.pin.is-done { background: #6b7a90; }
.pin.is-new, .pin-no.is-new { background: var(--navy); }
.cmp.is-live.is-pinning:not(.is-zoomed) .cmp-stage { cursor: crosshair; }
.say { font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }

@media (max-width: 760px) {
  .strip { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .slot { padding: 10px; }
  .shop { grid-template-columns: 1fr; padding: 14px; }
  .shop-thumbs { grid-template-columns: repeat(7, minmax(0, 1fr)); order: 2; }
  .shop-main { order: 1; } .shop-side { order: 3; }
  .bar-row { grid-template-columns: 120px minmax(0, 1fr) 24px; gap: 10px; font-size: 14px; }
  .head-acts { width: 100%; }
  .head-acts .btn { flex: 1; }
}
.slot > *, .pick button { min-width: 0; }
@media (max-width: 760px) {
  .row { padding: 12px 14px; gap: 10px; }
  .row-main strong { font-size: 15px; }
  .pick { grid-template-columns: repeat(3, 1fr); }
}


/* ================= step 4: the owner's phone screen and the shopper-size views ================= */
.seg a { font-weight: 600; font-size: 14px; color: var(--ink); padding: 8px 14px; min-height: 38px; text-decoration: none; display: inline-flex; align-items: center; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a:hover { background: var(--soft); }
.seg a[aria-current] { background: var(--navy); color: #fff; }

body.review-page .places { display: none; }
.page.review { max-width: 760px; padding: 0; }
.rv { display: flex; flex-direction: column; height: calc(100dvh - 60px); }
.rv-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.rv-back { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); }
.rv-title { flex: 1; min-width: 0; display: grid; }
.rv-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rv-track::-webkit-scrollbar { display: none; }
.rv-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; padding: 0 10px; }
.rv-pic { position: relative; max-width: 100%; max-height: 100%; display: flex; line-height: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.rv-pic img { max-width: 100%; max-height: calc(100dvh - 60px - 62px - 26px - 46px - 96px); width: auto; height: auto; border-radius: 12px; -webkit-user-drag: none; user-select: none; }
.rv-pic.is-asking { animation: rv-ask .9s ease 2; }
@keyframes rv-ask { 50% { box-shadow: 0 0 0 5px var(--red); } }
.rv-dots { display: flex; justify-content: center; gap: 7px; padding: 10px 0 4px; }
.rv-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.rv-dots i.is-approved { background: var(--ok); } .rv-dots i.is-rejected { background: var(--red); } .rv-dots i.is-waiting { background: var(--wait); }
.rv-dots i.is-on { transform: scale(1.5); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.500px var(--ink); }
.rv-hint { text-align: center; font-size: 14px; color: var(--muted); padding: 2px 16px 8px; min-height: 46px; }
.rv-bar { display: flex; gap: 10px; padding: 8px 14px calc(14px + env(safe-area-inset-bottom)); }
.rv-bar .btn { flex: 1; min-height: 60px; font-size: 18px; width: auto; border-radius: 14px; }
.rv-yes { flex: 2 !important; background: var(--ok); border-color: var(--ok); color: #fff; }
.rv-no { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.rv-no-go { background: var(--red); border-color: var(--red); color: #fff; }
@media (prefers-color-scheme: dark) { .rv-yes { color: #06220f; } .rv-no { color: #ff8fa0; } }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(8, 14, 28, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-in { background: var(--card); color: var(--ink); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px; max-height: 88dvh; overflow: auto; animation: sheet-up .2s ease-out; }
@keyframes sheet-up { from { transform: translateY(30%); opacity: 0; } }
.sheet-in h2 { font-size: 19px; }
.sheet-in textarea { font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; resize: vertical; }
.sheet-reasons { display: grid; gap: 4px; }
.sheet-reasons .check { padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; }
.sheet-reasons .check:has(input:checked) { border-color: var(--red); background: var(--bad-soft); }
.sheet-reasons input { accent-color: var(--red); }
.sheet-row { display: flex; gap: 10px; }
.sheet-row .btn { flex: 1; width: auto; min-height: 52px; }
.sheet-in .note { margin: 0; }
@media (min-width: 761px) { .sheet { align-items: center; } .sheet-in { border-radius: 20px; } }
@media (max-width: 760px) { .rv { height: calc(100dvh - 54px); } .rv-pic img { max-height: calc(100dvh - 54px - 62px - 26px - 46px - 96px); } }

/* shopper-size views */
.fake-search { border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--muted); font-size: 14px; max-width: 320px; margin-bottom: 18px; }
.results { display: flex; gap: 16px; overflow-x: auto; padding: 14px 0 6px; }
.result { flex: 0 0 218px; position: relative; }
.result img, .result .other { width: 218px; height: 218px; border-radius: 6px; }
.result img { object-fit: contain; background: #fff; border: 2px solid var(--navy); }
.other { background: var(--soft); color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; line-height: 1.3; }
.yours, .yours-inline { background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 9px; }
.yours { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 1; }
.yours-inline { width: fit-content; }
.result .ghost-lines { margin-top: 12px; }
.result .ghost-lines i:nth-child(1), .p-result .ghost-lines i:nth-of-type(1) { width: 92%; height: 11px; }
.result .ghost-lines i:nth-child(2), .p-result .ghost-lines i:nth-of-type(2) { width: 44%; background: #f2c200; opacity: .8; }
.result .ghost-lines i:nth-child(3), .p-result .ghost-lines i:nth-of-type(3) { width: 30%; height: 16px; }
.phone-wrap { display: flex; gap: 34px; align-items: center; flex-wrap: wrap; }
.phone { width: 360px; max-width: 100%; border: 10px solid #1b2130; border-radius: 34px; padding: 18px 12px; background: var(--card); flex: none; }
.p-result { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.p-result img, .p-result .other { width: 140px; height: 140px; border-radius: 6px; }
.p-result img { object-fit: contain; background: #fff; }
.p-result .ghost-lines { margin: 0; }
.phone-say { flex: 1; min-width: 240px; display: grid; gap: 10px; }
.pickline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.pick-thumb { width: 46px; height: 46px; border: 1.5px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.pick-thumb.is-on { border-color: var(--navy); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.pick-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* ================= piece 2, step 1: free edits ================= */
.this { display: grid; gap: 8px; }
.this-dl { font-size: 13px; color: var(--muted); }

.ed { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.ed-stage { position: sticky; top: 76px; display: grid; gap: 10px; justify-items: center; background: var(--stage); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 12px; min-height: 420px; align-content: center; }
.ed-wrap { position: relative; line-height: 0; max-width: 100%; background-color: #fff; background-image: linear-gradient(45deg, #e6e9ef 25%, transparent 25%, transparent 75%, #e6e9ef 75%), linear-gradient(45deg, #e6e9ef 25%, transparent 25%, transparent 75%, #e6e9ef 75%); background-size: 18px 18px; background-position: 0 0, 9px 9px; box-shadow: var(--shadow); touch-action: none; }
.ed-wrap img { display: block; max-width: 100%; max-height: calc(100dvh - 210px); width: auto; height: auto; user-select: none; -webkit-user-drag: none; transition: opacity .12s; }
.ed-stage.is-loading img { opacity: .55; }
.ed-info { font-size: 14px; color: var(--muted); display: flex; gap: 6px 14px; flex-wrap: wrap; justify-content: center; text-align: center; }
.ed-warn { color: var(--wait); font-weight: 600; }
.ed-crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(10, 18, 36, .55), inset 0 0 0 1px rgba(20, 38, 74, .5); cursor: move; touch-action: none; }
.ed-crop[hidden] { display: none; }
.ed-wrap:has(.ed-crop:not([hidden])) { overflow: hidden; }
.ed-crop i { position: absolute; width: 30px; height: 30px; background: #fff; border: 2px solid var(--navy); border-radius: 50%; margin: -15px; box-shadow: 0 1px 5px rgba(0, 0, 0, .4); }
.ed-crop i[data-handle=nw] { left: 0; top: 0; cursor: nwse-resize; }
.ed-crop i[data-handle=ne] { right: 0; top: 0; cursor: nesw-resize; }
.ed-crop i[data-handle=sw] { left: 0; bottom: 0; cursor: nesw-resize; }
.ed-crop i[data-handle=se] { right: 0; bottom: 0; cursor: nwse-resize; }
.ed-tools { display: grid; gap: 10px; }
.ed-tools h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 10px; }
.ed-tool { display: grid; gap: 10px; }
.ed-tool h2 { margin: 0; }
.ed-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ed-shapes { width: fit-content; }
.ed-range { gap: 4px; font-weight: 400; font-size: 14px; }
.ed-range b { font-variant-numeric: tabular-nums; }
.ed-range input[type=range] { width: 100%; accent-color: var(--navy); height: 28px; }
.ed-tools select { min-height: 42px; padding: 8px 12px; }
.ed.is-cutting .ed-tool:not(.ed-tool-cut), .ed.is-cutting .ed-save { opacity: .4; pointer-events: none; }
.ed-summary { font-weight: 600; font-size: 14px; }
.ed-save .btn-primary { width: 100%; }
.ed-save input:not([type=hidden]) { min-height: 42px; padding: 9px 12px; }
@media (max-width: 900px) {
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-stage { position: static; min-height: 0; padding: 12px; }
  .ed-wrap img { max-height: 56dvh; }
}

/* ================= piece 2, step 2: cut out the product ================= */
.job { display: flex; gap: 12px; align-items: center; border-left: 5px solid var(--wait); font-size: 14px; font-weight: 600; }
.job-bad { border-left-color: var(--red); background: var(--bad-soft); }
.job-bad .spin { display: none; }
.spin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.pane.is-see, .tile-see { background-color: #fff; background-image: linear-gradient(45deg, #dfe3ea 25%, transparent 25%, transparent 75%, #dfe3ea 75%), linear-gradient(45deg, #dfe3ea 25%, transparent 25%, transparent 75%, #dfe3ea 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.this form { margin: 0; }


/* ---------- the builder: a picture from parts ---------- */
.head-act { margin-left: auto; }
.bd { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; align-items: start; }
.bd-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; position: sticky; top: 76px; }
.bd-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bd-bar-gap { flex: 1; }
.bd-bar-item { display: inline-flex; align-items: center; gap: 8px; }
.bd-bar select { min-height: 36px; padding: 5px 10px; font-size: 14px; width: auto; }
.bd-stage { height: calc(100dvh - 236px); min-height: 380px; background: var(--stage); border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center; overflow: hidden; outline-offset: -3px; }
.bd-canvas { position: relative; box-shadow: var(--shadow); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.bd-clip { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.bd-canvas.is-clear .bd-clip, .bd-sw-clear { background-color: #fff; background-image: linear-gradient(45deg, #dfe3ea 25%, transparent 25%, transparent 75%, #dfe3ea 75%), linear-gradient(45deg, #dfe3ea 25%, transparent 25%, transparent 75%, #dfe3ea 75%); background-size: 18px 18px; background-position: 0 0, 9px 9px; }
.bd-part { position: absolute; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.bd-hit { position: absolute; cursor: move; touch-action: none; }
.bd-hit.is-back:not(.is-on) { cursor: pointer; touch-action: pan-y; }
.bd-hit:hover:not(.is-on) { outline: 1.5px dashed rgba(47, 111, 237, .7); outline-offset: -1px; }
.bd-sel { position: absolute; pointer-events: none; outline: 2px solid #2f6fed; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85); }
.bd-sel i { position: absolute; width: 16px; height: 16px; margin: -8px; background: #fff; border: 2px solid #2f6fed; border-radius: 50%; pointer-events: auto; touch-action: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.bd-sel i::after { content: ""; position: absolute; inset: -12px; }
.bd-sel i[data-handle=nw] { left: 0; top: 0; cursor: nwse-resize; }
.bd-sel i[data-handle=ne] { right: 0; top: 0; cursor: nesw-resize; }
.bd-sel i[data-handle=sw] { left: 0; bottom: 0; cursor: nesw-resize; }
.bd-sel i[data-handle=se] { right: 0; bottom: 0; cursor: nwse-resize; }
.bd-sel i.bd-side-h { display: none; top: 50%; width: 10px; height: 24px; margin: -12px -5px; border-radius: 5px; cursor: ew-resize; }
.bd-sel[data-kind=words] i.bd-side-h, .bd-sel[data-kind=block] i.bd-side-h { display: block; }
.bd-sel i[data-handle=w] { left: 0; }
.bd-sel i[data-handle=e] { right: 0; }
.bd-guide { position: absolute; background: #e14145; pointer-events: none; }
.bd-guide-v { left: 50%; top: 0; bottom: 0; width: 1px; }
.bd-guide-h { top: 50%; left: 0; right: 0; height: 1px; }
.bd-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12%; color: #5d6982; font-size: 15px; line-height: 1.5; pointer-events: none; }
.ed-warn.is-bad { color: var(--red); }
.bd-back { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.bd-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.bd-side h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0; }
.bd-side h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.bd-card, .bd-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.bd-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.bd-list li { display: flex; gap: 2px; align-items: center; border: 1.5px solid var(--line); border-radius: 9px; padding: 1px 3px 1px 1px; }
.bd-list li.is-on { border-color: var(--accent); background: var(--soft); }
.bd-list-name { flex: 1; min-width: 0; text-align: left; background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); padding: 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-list-btn { flex: none; width: 32px; height: 32px; border-radius: 7px; border: 0; background: none; color: var(--ink); font-size: 16px; cursor: pointer; }
.bd-list-btn:hover:not(:disabled) { background: var(--line); }
.bd-list-btn:disabled { opacity: .28; cursor: default; }
.bd-field { gap: 5px; font-size: 14px; }
.bd-side select, .bd-side textarea { min-height: 40px; padding: 8px 10px; font-size: 15px; }
.bd-side textarea { resize: vertical; line-height: 1.35; }
.bd-line { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; font-size: 14px; }
.bd-line-name { font-weight: 600; min-width: 58px; }
.bd-swatches { display: inline-flex; gap: 6px; align-items: center; }
.bd-sw { flex: none; display: inline-block; position: relative; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); padding: 0; cursor: pointer; overflow: hidden; }
.bd-sw[aria-pressed=true] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.bd-sw-any { background: conic-gradient(#e14145, #f2c230, #3aa655, #2f9ed8, #3b4cc0, #b03aa8, #e14145); }
.bd-sw-any input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; border: 0; cursor: pointer; }
.bd-sw-clear { background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.bd-remove { color: var(--red); }
.bd-pick { border: 0; border-radius: 16px; padding: 20px; width: min(780px, calc(100vw - 24px)); max-height: min(86dvh, 840px); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.bd-pick::backdrop { background: rgba(10, 18, 36, .55); }
.bd-pick-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bd-pick-head h2 { margin: 0; }
.bd-pick h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 18px 0 8px; }
.bd-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin-bottom: 8px; }
.bd-pick-tile { position: relative; display: grid; gap: 4px; padding: 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bd-pick-tile:hover { border-color: var(--accent); }
.bd-pick-img { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background-color: var(--soft); }
.bd-pick-img img { width: 100%; height: 100%; object-fit: contain; }
.bd-pick-name { font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bd-pick-tile em { position: absolute; top: 10px; left: 10px; font-style: normal; font-size: 11px; font-weight: 700; background: var(--navy); color: #fff; border-radius: 6px; padding: 2px 6px; }
.lead-s { margin: -6px 0 16px; }
.brand-add { margin-bottom: 18px; }
.brand-tile { cursor: default; }
.brand-acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 0 12px 10px; font-size: 13px; }
.brand-acts form { margin: 0; }
.brand-acts .link { font-size: 13px; color: var(--red); }
@media (max-width: 900px) {
  .bd { grid-template-columns: 1fr; }
  .bd-main { position: static; }
  .bd-stage { height: min(96vw, 60dvh); min-height: 300px; }
  .bd-bar-gap { display: none; }
}
.repeat-top { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.repeat-pic { width: 150px; height: 150px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; flex: none; }
.repeat-list { display: grid; gap: 8px; }
.repeat-item { display: flex; justify-content: space-between; align-items: center; gap: 6px 16px; flex-wrap: wrap; text-decoration: none; color: var(--ink); }
.repeat-item:hover { border-color: var(--accent); }
@media (max-width: 760px) { .repeat-top { flex-direction: column; align-items: flex-start; } }

/* ================= piece 2, step 5: easy and advanced, scenes, one spot, money ================= */
.mode-easy [data-adv] { display: none !important; }
.mode-switch { width: fit-content; }
.mode-switch button { padding: 5px 12px; min-height: 34px; font-size: 13px; }
.mine-mode { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.mine-mode small { color: var(--muted); font-size: 13px; }
.mine-menu .mode-switch button { display: inline-block; width: auto; padding: 5px 12px; border-radius: 0; text-align: center; }
.mine-menu .mode-switch button[aria-pressed=true], .mine-menu .mode-switch button[aria-pressed=true]:hover { background: var(--navy); color: #fff; }
.sec { font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 28px 0 10px 2px; font-weight: 700; }
.note-wait { background: var(--wait-soft); color: var(--wait); font-weight: 600; }
.note-wait a { color: inherit; }
.month b { font-variant-numeric: tabular-nums; }

.scene-make { gap: 14px; margin-top: 4px; }
.scene-make h2 { font-size: 18px; }
.scene-make .note { margin: 0; }
.scene-ready { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.scene-opt { position: relative; display: block; cursor: pointer; }
.scene-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.scene-opt span { display: grid; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); min-height: 62px; height: 100%; align-content: center; }
.scene-opt small { color: var(--muted); font-size: 12px; }
.scene-opt:hover span { border-color: var(--accent); }
.scene-opt input:checked + span { border-color: var(--navy); background: var(--soft); box-shadow: inset 0 0 0 1px var(--navy); }
.scene-opt input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.scene-opt input:disabled + span { opacity: .45; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { .scene-opt input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } }
.scene-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.scene-row select { min-height: 44px; padding: 8px 12px; }
.scene-make textarea { resize: vertical; line-height: 1.4; }
.scene-go { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; }
.scene-month { margin-left: auto; }
.scene-img { aspect-ratio: 4 / 3; background: var(--soft); }
.scene-img img { object-fit: cover; }
.scene-by { display: block; padding: 0 12px 8px; font-size: 12px; }
.scene-grid .brand-acts .btn { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.page > .job { margin-bottom: 12px; }

.sp-wrap { cursor: crosshair; touch-action: manipulation; }
.sp-mark { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px #e14145, 0 0 0 9999px rgba(10, 18, 36, .24); pointer-events: none; }
.sp-wrap { overflow: hidden; }
.sp-sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-size { position: relative; cursor: pointer; }
.sp-size input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sp-size span { display: block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; }
.sp-size input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.sp-size input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.sp-how { align-items: flex-start; flex-wrap: nowrap; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; }
.sp-how:has(input:checked) { border-color: var(--navy); background: var(--soft); }
.sp-how.is-off { opacity: .55; cursor: not-allowed; }
.sp-how input { margin-top: 2px; flex: none; }
.sp-how span { display: grid; gap: 1px; }
.sp-how small { font-size: 13px; }
.sp-words { display: grid; gap: 8px; }
.sp-words[hidden] { display: none; }
.sp-words textarea { min-height: 84px; padding: 9px 12px; font-size: 15px; line-height: 1.4; resize: vertical; }
.sp-save { display: grid; gap: 10px; }
@media (prefers-color-scheme: dark) { .sp-how:has(input:checked) { border-color: var(--accent); } }

.money-now { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px 32px; align-items: start; }
.money-read { display: grid; gap: 8px; }
.money-big { font-size: 20px; }
.money-big b { font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.meter { width: 100%; height: 12px; border: 0; border-radius: 999px; overflow: hidden; background: var(--soft); appearance: none; -webkit-appearance: none; }
.meter::-webkit-progress-bar { background: var(--soft); }
.meter::-webkit-progress-value { background: var(--navy); border-radius: 999px; }
.meter::-moz-progress-bar { background: var(--navy); border-radius: 999px; }
@media (prefers-color-scheme: dark) { .meter::-webkit-progress-value { background: var(--accent); } .meter::-moz-progress-bar { background: var(--accent); } }
.money-form .btn { width: 100%; }
.money-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.money-models section { display: grid; gap: 8px; align-content: start; }
.money-models h3 { margin: 0; font-size: 17px; }
.money-models h3 small { font-weight: 400; font-size: 14px; margin-left: 4px; }
.money-prices { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 15px; }
.money-foot { margin-top: 12px; }
.money-table { overflow-x: auto; }
.money-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.money-table th, .money-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.money-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.money-table tr:last-child td { border-bottom: 0; }
.money-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.bd-pick-new { display: grid; place-items: center; text-align: center; text-decoration: none; min-height: 100%; border-style: dashed; font-weight: 700; font-size: 14px; color: var(--accent); padding: 14px 8px; }
.bd-pick-scene .bd-pick-img img { object-fit: cover; }
.bd-bar .mode-switch { margin-left: 4px; }
.crumb-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.crumb-row .crumb { margin: 0; }
@media (max-width: 760px) {
  .money-now { grid-template-columns: minmax(0, 1fr); }
  .scene-month { margin-left: 0; }
}

/* ================= piece 3, step 1: checked before anyone looks ================= */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.check-list li { position: relative; padding-left: 26px; line-height: 1.35; }
.check-list li::before { position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; }
.check-list .is-ok::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.check-list .is-look::before { content: "!"; background: var(--wait-soft); color: var(--wait); }
.check-list .is-stop::before { content: "!"; background: var(--red); color: #fff; }
.check-list .is-info::before { content: "·"; background: var(--soft); color: var(--muted); font-size: 18px; }
.check-list .is-stop { font-weight: 600; }
.checks { display: grid; gap: 10px; }
.checks h2 { margin: 0; }
.check-pass { font-size: 13px; color: var(--ok); font-weight: 600; }
.check-pass::before { content: "✓ "; }
.slot .check-list { font-size: 13px; }
.chk { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chk-ok, .chk-info { background: var(--ok-soft); color: var(--ok); }
.chk-look { background: var(--wait-soft); color: var(--wait); }
.chk-stop { background: var(--bad-soft); color: var(--red); }
@media (prefers-color-scheme: dark) { .chk-stop { color: #ff8fa0; } }
.checked-line { margin: 0 2px 10px; }
.rv-checks { text-align: center; font-size: 13px; font-weight: 600; padding: 4px 16px 0; }
.rv-checks.is-ok, .rv-checks.is-info { color: var(--ok); }
.rv-checks.is-look { color: var(--wait); }
.rv-checks.is-stop { color: var(--red); }
@media (max-width: 760px) {
  .row-link { flex-wrap: wrap; row-gap: 6px; }
  .row .chk { order: 5; margin-left: 62px; }
}

/* ================= the tracker sheet in the app: old and new side by side, pages of products ================= */
.grid-pairs { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tile-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; aspect-ratio: 2 / 1; background: var(--line); }
.tile-pair > span { position: relative; display: block; background: #fff; min-width: 0; }
.tile-pair img { position: absolute; inset: 0; }
.tile-pair i { position: absolute; left: 6px; bottom: 6px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(20, 38, 74, .78); color: #fff; }
.tile-pair i.is-new { background: var(--red); }
.tile-none { display: grid !important; place-items: center; text-align: center; font-size: 13px; color: #5d6982; background: #f3f5f9 !important; padding: 8px; }
.tile-foot small + small { margin-left: auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px 0 8px; }
.pager .is-off { opacity: .4; pointer-events: none; }
.tracker-note { font-size: 14px; background: var(--soft); border-radius: 8px; padding: 8px 10px; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 760px) { .grid-pairs { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the website work list ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.tabs a { display: inline-flex; gap: 7px; align-items: baseline; padding: 8px 13px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.tabs a b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.tabs a:hover { border-color: var(--accent); }
.tabs a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs a[aria-current] b { color: #fff; opacity: .85; }
.tabs-note { margin: 0 2px 14px; }
.how { margin-bottom: 14px; }
.how-in { display: grid; gap: 12px; }
.how-in ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.how textarea, .wk textarea { font-family: inherit; font-size: 14px; line-height: 1.4; min-height: 0; padding: 9px 11px; resize: vertical; }
.wk-list { display: grid; gap: 10px; }
.wk { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; padding: 12px; align-items: start; }
.wk-pair { border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.wk-pair img { width: 100%; height: 100%; object-fit: contain; }
.wk-main { display: grid; gap: 8px; min-width: 0; }
.wk-top { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; }
.wk-code { font-weight: 800; font-size: 17px; text-decoration: none; }
.wk-where a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.wk-where a:hover { text-decoration: underline; }
.wk-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.wk-make summary { cursor: pointer; list-style: none; }
.wk-make summary::-webkit-details-marker { display: none; }
.wk-steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 12px; }
.wk-steps li { display: grid; gap: 6px; justify-items: start; }
.wk-steps textarea { width: 100%; }
.wk-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.wk-form input[type=file] { max-width: 100%; font-size: 14px; }
@media (max-width: 760px) { .wk { grid-template-columns: minmax(0, 1fr); } }

/* ================= what the team sees: switches, "only you", and looking as the team ================= */
.as-bar { position: sticky; top: 0; z-index: 60; display: flex; gap: 8px 14px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 0; padding: 8px 16px; background: #ffd84d; color: #14264a; font-weight: 600; font-size: 14px; text-align: center; }
.as-bar button { font: inherit; font-weight: 700; border: 2px solid #14264a; background: #14264a; color: #fff; border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.as-bar button:hover { background: #1f3864; }
body.is-looking .top { position: relative; }       /* the yellow bar stays at the top instead; two bars would cover each other */
.sw-count { margin: -8px 0 18px; }
.sw-look { display: flex; gap: 12px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sw-look small { display: block; }
.sw { gap: 10px 16px; scroll-margin-top: 90px; }
.sw .row-main { gap: 2px; }
.sw .seg { flex: none; }
.sw-now { margin-top: 2px; }
.sw-live { color: var(--ok); }
.sw-said { justify-self: start; margin-top: 6px; padding: 4px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.sw-foot { margin-top: 20px; display: grid; gap: 4px; }
.sw-foot p { margin: 0; }
.only-me-tag { display: inline-block; font-size: 11.5px; font-weight: 700; line-height: 1.5; letter-spacing: .2px; text-transform: none; text-decoration: none; white-space: nowrap; vertical-align: 1px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); }
.btn .only-me-tag { margin-left: 4px; }
.only-me { border-style: dashed; box-shadow: none; }
.cmp-side .fold-card { margin: 0; }
.only-me > summary { padding: 12px 16px; }
.only-me-in { display: grid; gap: 16px; padding: 14px 16px 16px; }
.only-me-in > div + div { border-top: 1px solid var(--line); padding-top: 16px; }
.mine-menu { max-height: calc(100dvh - 76px); overflow-y: auto; }
.mine-only { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
.mine-only > small { display: block; padding: 8px 12px 2px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.mine-only a { padding: 8px 12px; }
.mine-only .mine-mode { border-top: 0; margin-top: 0; padding: 6px 12px; }
.mine-mode { flex-direction: column; align-items: flex-start; gap: 6px; }     /* side by side, “Advanced” was cut off */
.mine-menu > .mine-mode { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 6px; }
.mine-only + form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
@media (max-width: 760px) {
  .mine-menu { max-height: calc(100dvh - 150px - env(safe-area-inset-bottom)); }
  .as-bar { font-size: 13px; padding: 6px 10px; gap: 4px 10px; }
  .as-bar button { padding: 3px 12px; }
  .sw { flex-wrap: wrap; }
  .sw .row-main { flex-basis: 100%; }
  .sw .seg, .sw-look .seg { width: 100%; }
  .sw .seg button, .sw-look .seg button { flex: 1; }
}
@media (prefers-color-scheme: dark) { .sw .seg button[aria-pressed=true], .sw-look .seg button[aria-pressed=true] { background: #2f55a0; } }

/* ---------- someone who is not signed in ---------- */
.top-signin { margin-left: auto; display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px; border-radius: 999px; background: #fff; color: #14264a; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.top-signin:hover { background: #dfe7f5; }
.top-signin:focus-visible { outline-color: #fff; }
@media (max-width: 760px) {
  .top-signin { min-height: 36px; padding: 5px 13px; font-size: 14px; }
  /* three ways to look do not fit side by side on a phone: one under the other */
  .sw-look .seg { flex-direction: column; width: 100%; }
  .sw-look .seg button { flex: none; width: 100%; }
  .sw-look .seg button + button { border-left: 0; border-top: 1px solid var(--line); }
  .grid-pairs .tile-foot { flex-direction: row; gap: 6px; padding: 8px 10px; }      /* one picture per row: the foot has room */
}

/* ---------- in step with the tracker sheet ---------- */
.sheet-line { display: flex; align-items: baseline; gap: 8px; margin: -8px 2px 16px; color: var(--muted); line-height: 1.4; }
.sheet-line .dot { flex: none; width: 8px; height: 8px; border: 0; transform: translateY(-1px); }
.sheet-line .dot-none { background: var(--line); }
.sheet-more { margin-top: -10px; padding-left: 16px; }
.tracker-then { font-size: 14px; line-height: 1.45; margin: 0; }

/* ================= the Review box beside a picture: status, the four answers, notes, the note box ================= */
.rw-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rw-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rw-card *, .rw-more * { min-width: 0; }
.rw-card h2, .rw-head h2 { margin: 0; }
.rw-card h3, .rw-more h3, .only-me-in h3 { font-size: 13px; font-weight: 700; margin: 0 0 6px; }
.rw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rw-status { display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.rw-status .chk { margin-right: 4px; }
.rw-line { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font-size: 13px; color: var(--muted); }
.rw-line form { margin: 0; }
.rw-line .link { font-size: 13px; }
.rw-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.rw-answers-one { grid-template-columns: 1fr; }
.rw-a { width: 100%; min-height: 42px; padding: 8px 10px; font-size: 15px; }
.rw-a[aria-pressed=true] { color: #fff; }
.rw-a-match { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); color: var(--ok); }
.rw-a-match[aria-pressed=true] { background: var(--ok); border-color: var(--ok); }
.rw-a-fix[aria-pressed=true] { background: var(--wait); border-color: var(--wait); }
.rw-a-no[aria-pressed=true] { background: var(--red); border-color: var(--red); }
.rw-a-keep[aria-pressed=true] { background: var(--muted); border-color: var(--muted); }
@media (prefers-color-scheme: dark) { .rw-a[aria-pressed=true] { color: #0d1422; } .rw-a-no[aria-pressed=true] { color: #fff; } }
.rw-hint, .rw-quiet { font-size: 13px; line-height: 1.4; color: var(--muted); margin: -4px 0 0; }
.rw-quiet { margin: 0; }
.rw-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rw-live, .rw-next { justify-self: start; }
.rw-body form { margin: 0; }

.rw-asked { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.rw-asked h3 { margin: 0; }
.rw-ask { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 8px; align-items: start; padding: 6px 4px; border-radius: 8px; cursor: default; }
.rw-ask > .btn, .rw-ask > .muted { grid-column: 2; justify-self: start; }
.rw-ask:hover, .rw-ask:focus-visible { background: var(--card); }
.rw-ask .btn { min-height: 28px; padding: 2px 10px; font-size: 13px; }
.rw-ask .pin-no, .rw-note .pin-no { width: 24px; height: 24px; font-size: 12px; }
.pin-no.is-asked, .pin.is-asked { background: #fff; color: var(--red); border: 2.500px solid var(--red); }
.pin.is-asked { pointer-events: none; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0, 0, 0, .45); }
.pin.is-new { pointer-events: none; }
.rw-sq { width: 12px; height: 12px; margin: 6px; border-radius: 3px; background: var(--muted); flex: none; display: inline-block; opacity: .7; }

.rw-notes { display: grid; gap: 4px; }
.rw-notes h3 { margin: 0 0 2px; }
.rw-note { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 8px 6px; border-radius: 10px; }
.rw-note[data-pin] { cursor: pointer; }
.rw-note + .rw-note { border-top: 1px solid var(--line); border-radius: 0; }
.rw-note.is-active { background: var(--soft); border-radius: 10px; border-top-color: transparent; }
.rw-note.is-active + .rw-note { border-top-color: transparent; }
.rw-note-main { display: grid; gap: 3px; }
.rw-also { font-size: 13px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.rw-also b { color: var(--ink); font-weight: 600; }
.rw-earlier summary { font-size: 13px; list-style: none; cursor: pointer; }
.rw-earlier summary::-webkit-details-marker { display: none; }
.rw-by { font-size: 12px; color: var(--muted); }
.rw-acts { display: none; gap: 4px 14px; flex-wrap: wrap; align-items: center; font-size: 13px; margin-top: 2px; }
.rw-acts .link { font-size: 13px; white-space: nowrap; }
.rw-note.is-active .rw-acts, .rw-acts-on { display: flex; }      /* only the selected note shows what can be done with it */
.rw-add { display: flex; gap: 6px; margin-top: 4px; }
.rw-add input { flex: 1; font-size: 14px; }
.rw-none { padding: 4px 0; }
.rw-done-line { font-size: 13px; color: var(--muted); padding: 4px 6px 0; }
.rw-done-line .link { font-size: 13px; }
.rw-note.is-done .say, .rw-note.is-done .rw-also { color: var(--muted); }
.rw-note.is-done .pin-no { background: #6b7a90; }
.rw-ai { display: grid; gap: 6px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; line-height: 1.4; }
.rw-words summary { list-style: none; cursor: pointer; font-weight: 400; }
.rw-words summary::-webkit-details-marker { display: none; }
.rw-words[open] { display: grid; gap: 6px; font-weight: 400; color: var(--ink); }
.rw-words textarea, .rw-write textarea { font: inherit; font-size: 14px; line-height: 1.4; min-height: 0; padding: 9px 11px; resize: vertical; }
.rw-words textarea { font-size: 13px; }

.rw-write { display: grid; gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.rw-box { display: flex; gap: 8px; align-items: flex-start; }
.rw-box textarea { flex: 1; }
.rw-spot { position: relative; flex: none; margin-top: 8px; }
.rw-x { position: absolute; top: -9px; right: -9px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font: 700 10px/1 var(--font); padding: 0; cursor: pointer; display: grid; place-items: center; }
.rw-x:hover { color: var(--ink); border-color: var(--accent); }
.rw-problem { font-size: 13px; font-weight: 600; color: var(--red); margin: 0; }
@media (prefers-color-scheme: dark) { .rw-problem { color: #ff8fa0; } }
.rw-signin { width: 100%; }

/* the line inside the picture while spots are marked */
.rw-say { position: absolute; top: 12px; left: 12px; right: 12px; margin: 0 auto; width: fit-content; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(20, 38, 74, .92); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); cursor: default; pointer-events: none; }
.rw-say.is-low { top: auto; bottom: 12px; }      /* out of the way of a spot near the top */
.rw-say .btn { min-height: 32px; padding: 4px 14px; border-radius: 999px; border-color: #fff; background: #fff; color: #14264a; flex: none; pointer-events: auto; }
.rw-slot:empty { display: none; }

/* the two folds under the Review box */
.rw-more > summary, .rw-tools > summary { padding: 12px 16px; }
.rw-more-in { display: grid; gap: 14px; padding: 14px 16px 16px; font-size: 14px; }
.rw-more-in > div { display: grid; gap: 4px; }
.rw-more-in > div + div { border-top: 1px solid var(--line); padding-top: 14px; }
.rw-versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rw-versions li { display: grid; gap: 1px; }
.rw-on { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rw-on select { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.wk-notes { list-style: none; margin: 0; display: grid; gap: 6px; }
.wk-notes li { display: flex; gap: 8px; align-items: flex-start; }
.wk-notes i { font-style: normal; color: var(--muted); }
.pin-no-s { width: 20px; height: 20px; font-size: 11px; margin-top: 1px; }

/* On a phone, while spots are marked: the picture stays under the header and the note box sits right below it. */
@media (max-width: 760px) {
  .is-marking .cmp-top, .is-marking .cmp-rail, .is-marking .places { display: none; }
  .is-marking .cmp-main { position: sticky; top: 54px; z-index: 5; background: var(--bg); padding-bottom: 8px; }
  .is-marking.is-looking .cmp-main { top: 0; }
  .is-marking .cmp-stage { height: 40dvh; min-height: 220px; }
  .rw-slot { display: grid; gap: 8px; }
  .rw-slot .rw-say { position: static; width: auto; margin: 0; justify-content: space-between; border-radius: 12px; box-shadow: none; pointer-events: auto; font-size: 13px; padding: 5px 5px 5px 12px; }
  .rw-slot .rw-write { grid-template-columns: minmax(0, 1fr) auto; border-top: 0; padding-top: 0; align-items: stretch; gap: 0 8px; }
  .rw-slot .rw-problem { grid-column: 1 / -1; grid-row: 1; margin-bottom: 6px; }
  .rw-slot .rw-box { grid-column: 1; grid-row: 2; }
  .rw-slot .rw-row { grid-column: 2; grid-row: 2; }
  .rw-slot .rw-row .btn { height: 100%; white-space: nowrap; }
  .rw-slot [data-rw-mark], .rw-slot .rw-first, .rw-slot noscript { display: none; }
}

/* removing a version (administrator) */
.pin-layer[hidden] { display: none; }
.rw-remove { margin-top: 4px; }
.rw-remove summary { cursor: pointer; list-style: none; }
.rw-remove summary::-webkit-details-marker { display: none; }
.rw-remove form { margin-top: 6px; display: grid; gap: 6px; justify-items: start; }

/* the note on the picture when it is not the old picture against the newest */
.cmp-note { position: absolute; z-index: 4; top: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin: 0; padding: 5px 6px 5px 14px; max-width: calc(100% - 24px); border-radius: 999px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 600; text-align: center; pointer-events: none; }
.cmp-note[hidden], .cmp-note [hidden] { display: none; }
.cmp-reset { pointer-events: auto; padding: 3px 10px; border-radius: 999px; background: #fff; color: var(--navy); text-decoration: none; font-weight: 700; white-space: nowrap; }
.cmp-reset:hover { background: #e8edf6; }

/* the versions column: every version with Left and Right */
.cmp-rail { min-width: 0; }
.vr-tab { display: none; }
.vr-arrow { font-size: 20px; line-height: 1; color: var(--accent); }
.vr-open { display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.vr-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.vr-fold { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.vr-fold:hover { border-color: var(--accent); }
.vr-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 6px; align-content: start; overflow: hidden auto; }
.vr-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "img name" "img sub" "btns btns"; gap: 2px 8px; padding: 6px; border: 1.5px solid transparent; border-radius: 10px; }
.vr-item img { grid-area: img; width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.vr-name { grid-area: name; font-weight: 700; font-size: 13px; align-self: end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-sub { grid-area: sub; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-newest { color: var(--red); font-weight: 700; }
.vr-btns { grid-area: btns; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px; }
.vr-btn { display: block; padding: 4px 0; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); text-align: center; text-decoration: none; font-size: 12.5px; font-weight: 700; }
.vr-btn:hover { border-color: var(--accent); }
.vr-left.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.vr-right.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.vr-item.is-a { border-color: var(--navy); }
.vr-item.is-b { border-color: var(--red); }
@media (min-width: 1101px) {
  .cmp.has-rail { grid-template-columns: 184px minmax(0, 1fr) 328px; }
  .cmp.has-rail[data-rail-wide=closed] { grid-template-columns: 38px minmax(0, 1fr) 328px; }
  .cmp-rail { position: sticky; top: 129px; height: calc(100dvh - 145px); min-height: 380px; }
  .is-looking .cmp-rail { top: 60px; height: calc(100dvh - 193px); }
  .vr-open { height: 100%; }
  .cmp[data-rail-wide=closed] .vr-open { display: none; }
  .cmp[data-rail-wide=closed] .vr-tab { display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; width: 38px; height: 100%; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .cmp[data-rail-wide=closed] .vr-tab span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
  .cmp[data-rail-wide=closed] .vr-tab:hover { border-color: var(--accent); }
}
@media (max-width: 1100px) {
  .cmp:not([data-rail-narrow=open]) .vr-open { display: none; }
  .cmp:not([data-rail-narrow=open]) .vr-tab { display: block; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
  .cmp:not([data-rail-narrow=open]) .vr-tab span::after { content: " ▾"; color: var(--muted); }
  .vr-arrow { display: none; }
  .vr-fold { transform: rotate(90deg); }
  .vr-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 46dvh; }
}

/* the test site says so on every page */
.test-bar { position: sticky; top: 0; z-index: 61; margin: 0; padding: 6px 16px; background: repeating-linear-gradient(135deg, #f4a300 0 14px, #ffbf3c 14px 28px); color: #14264a; font-weight: 800; font-size: 14px; text-align: center; }
