:root {
  color-scheme: light;
  --ink: #090909;
  --paper: #ffffff;
  --canvas: #f3f2ee;
  --graphite: #2f2f2d;
  --muted: #50504d;
  --line: #d9d8d3;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.brand {
  background: var(--ink);
  border-bottom: 3px solid #b8b6b0;
  min-height: 112px;
  display: grid;
  place-items: center;
}
.brand img { object-fit: contain; }
main {
  max-width: 650px;
  margin: 28px auto;
  padding: clamp(18px, 5vw, 46px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
h1, h2 { font-family: Georgia, serif; font-weight: 400; text-wrap: balance; }
h1 { margin: 17px 0 8px; font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: .99; letter-spacing: -.037em; }
h2 { margin: 0; font-size: 1.8rem; }
p { line-height: 1.5; }
.demo, .optional, .form-note, footer { color: var(--muted); font-size: .875rem; }
.demo { margin: 0; }
.intro { color: var(--muted); margin: 12px 0 25px; }
fieldset { margin: 0; padding: 15px 0 20px; min-width: 0; border: 0; }
.rating { border-top: 1px solid var(--line); }
.rating legend { float: left; width: 100%; padding: 0 0 10px; }
legend, .comment, .field { font-weight: 650; }
.options { clear: both; display: grid; gap: 6px; grid-template-columns: repeat(5, minmax(0, 52px)); }
.options.nps { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 8px;
  color: var(--graphite);
  border: 1px solid var(--line);
  font-weight: 650;
}
.choice svg { width: 23px; height: 23px; }
.option input:checked + .choice { background: var(--graphite); color: white; border-color: var(--graphite); }
.option input:checked + .choice svg { fill: currentColor; }
.option input:focus-visible + .choice, :focus-visible { outline: 2px solid var(--graphite); outline-offset: 3px; }
.scale { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .8rem; margin-top: 8px; }
.comment, .field { display: block; }
.comment { padding-top: 18px; border-top: 1px solid var(--line); }
.optional { font-weight: 400; margin-left: 4px; }
textarea, .field input, select {
  display: block;
  width: 100%;
  margin-top: 7px;
  min-height: 46px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
textarea { resize: vertical; margin-bottom: 18px; }
button, .option, .check { touch-action: manipulation; }
button { font: inherit; font-weight: 650; cursor: pointer; min-height: 48px; width: 100%; border-radius: 8px; }
.primary { border: 1px solid var(--graphite); background: var(--graphite); color: white; }
.secondary { background: transparent; border: 0; color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; margin-top: 6px; }
button:active, .option:active .choice { filter: brightness(.9); }
.invitation { border-top: 1px solid var(--line); padding-top: 22px; }
.birthday { padding: 0; }
.birthday legend { margin-bottom: 4px; }
.date { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#contact { display: grid; gap: 15px; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { accent-color: var(--graphite); width: 20px; height: 20px; flex: 0 0 auto; margin: 1px 0 0; }
.form-note { margin: 0; }
footer { text-align: center; padding: 4px 12px 24px; }
@media (max-width: 650px) {
  main { margin: 0; border: 0; border-radius: 0; }
  .brand { min-height: 96px; }
  .options.nps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  footer { padding-top: 16px; }
}

button:disabled { cursor: wait; opacity: .65; }

.survey-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.language-switch {
  width: auto;
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--graphite);
  font-size: .875rem;
}
#survey-view h1 { max-width: 11ch; }
.survey-toolbar > .language-switch { margin-left: auto; }
