/* Tokens from the Paleta v7 board. */
:root {
  --ink: #1c1917;
  --ink-2: #44403c;
  --ink-3: #57534e;
  --line: #78716c;
  --ring: #efe6d8;
  --sand: #f3ede2;
  --cream: #faf6ef;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-50: #fee2e2;
  --green: #15803d;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 140px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 15px/22px Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, legend { font-family: Poppins, system-ui, sans-serif; }
a { color: var(--red-700); }
a:hover { color: var(--red-800); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: #ffffff; box-shadow: 0 1px 0 var(--ring); }
.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.brand img { display: block; height: 44px; width: auto; }
.brand b { display: block; font: 700 17px/22px Poppins, system-ui, sans-serif; }
.brand span { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.who input { width: 220px; height: 40px; padding: 0 14px; border: 0; border-radius: 9999px; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-weight: 400; color: var(--ink); }
.link { font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

.steps { position: sticky; top: 64px; z-index: 4; display: flex; gap: 8px; padding: 10px 24px; background: var(--cream); box-shadow: 0 1px 0 var(--ring); overflow-x: auto; }
.step { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 6px; border: 0; border-radius: 9999px; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 600 14px/20px Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.step .n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; background: var(--sand); font-size: 13px; }
.step.done .n { background: var(--green); color: #ffffff; }
.step.on { background: var(--ink); color: #ffffff; box-shadow: none; }
.step.on .n { background: #ffffff; color: var(--ink); }

.layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; padding: 20px 24px 48px; align-items: start; }
.panel { position: sticky; top: 132px; max-height: calc(100vh - 148px); overflow: auto; padding: 20px; border-radius: 18px; background: #ffffff; box-shadow: 0 0 0 1px var(--ring); }
.panel h2 { margin: 0; font-size: 22px; line-height: 28px; }
.intro { margin: 6px 0 16px; color: var(--ink-2); font-size: 14px; line-height: 21px; }
.q { margin: 0 0 16px; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.q legend { margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.opt:hover { background: var(--sand); }
.opt.on { box-shadow: inset 0 0 0 2px var(--ink); background: var(--sand); }
.opt input { margin: 4px 0 0; accent-color: var(--ink); }
.opt .badge { flex-shrink: 0; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--ink); color: #ffffff; font: 700 13px/26px Inter, system-ui, sans-serif; text-align: center; }
.opt .badge.swatch { min-width: 26px; width: 26px; padding: 0; border-radius: 9999px; box-shadow: inset 0 0 0 1px var(--line); }
.opt .txt { display: flex; flex-direction: column; gap: 2px; }
.opt b { font-size: 15px; line-height: 20px; }
.opt small { color: var(--ink-3); font-size: 13px; line-height: 18px; }
.sel, .comment { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-weight: 600; font-size: 14px; }
.sel select, .comment textarea { width: 100%; border: 0; border-radius: 12px; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); font: 400 14px/20px Inter, system-ui, sans-serif; color: var(--ink); }
.sel select { height: 40px; padding: 0 10px; }
.comment textarea { padding: 10px 12px; resize: vertical; }
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.btn { height: 44px; padding: 0 22px; border: 0; border-radius: 9999px; background: var(--red-600); color: #ffffff; font: 600 15px/20px Inter, system-ui, sans-serif; cursor: pointer; }
.btn:hover { background: var(--red-700); }
.btn.ghost { background: #ffffff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--sand); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.send { width: 100%; margin-top: 4px; }

.summary { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.summary .row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; background: var(--sand); }
.summary .row span { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); }
.summary .row.missing b { color: var(--red-700); }
.change { border: 0; background: none; color: var(--red-700); font: 600 13px/18px Inter, system-ui, sans-serif; text-decoration: underline; cursor: pointer; }
.status { min-height: 22px; margin: 12px 0 0; font-size: 14px; }
.status.ok { color: var(--green); font-weight: 600; }
.status.err { color: var(--red-700); font-weight: 600; }

.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font: 700 16px/22px Poppins, system-ui, sans-serif; }
.frame { position: relative; overflow: hidden; border-radius: 16px; background: #ffffff; box-shadow: 0 0 0 1px var(--ring); }
.frame iframe { display: block; width: 1440px; border: 0; transform-origin: 0 0; }
.noscript { padding: 24px; }

@media (max-width: 900px) {
  .top { flex-wrap: wrap; gap: 10px 16px; position: static; }
  .who { width: 100%; }
  .who input { flex: 1; width: auto; }
  .steps { top: 0; }
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .panel { position: static; max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
