:root {
  color-scheme: light;
  --ink: #0c114a;
  --blue: #10145d;
  --yellow: #ffcb22;
  --paper: #ffffff;
  --field: rgba(255, 255, 255, .36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #edf0f7;
  color: var(--ink);
}

.app-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 24px;
}

.worksheet-form {
  display: grid;
  gap: 24px;
  justify-items: center;
}

.form-panel {
  width: min(100%, 900px);
  border: 1px solid #d8dced;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(12, 17, 74, .12);
}

.form-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 420px) auto;
  column-gap: 16px;
  row-gap: 14px;
  align-items: end;
  padding: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.email-field,
.form-panel label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.email-field input,
.form-panel input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd1ef;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.button {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 14px;
  font: 700 14px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

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

.primary {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.secondary {
  border: 1px solid #cbd1ef;
  background: #f5f6ff;
  color: var(--blue);
}

.privacy-note {
  grid-column: 1 / -1;
  margin: -6px 0 2px;
  color: #69708d;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.privacy-note a {
  color: var(--blue);
  font-weight: 400;
}

.status {
  grid-column: 1 / -1;
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  margin: 0;
  font-size: 13px;
  color: #3a416c;
}

.status:empty {
  min-height: 0;
}

.feedback-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  grid-column: 1 / -1;
  overflow: hidden;
  width: 100%;
  margin-top: 2px;
  border: 1px solid rgba(16, 20, 93, .18);
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  background: #fffdf5;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(12, 17, 74, .13);
  animation: feedback-enter .28s ease-out both;
}

.feedback-card[hidden] {
  display: none;
}

.feedback-card.is-error {
  border-left-color: #ba2f3a;
  background: #fff7f7;
}

.feedback-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--yellow);
  font-size: 21px;
  font-weight: 700;
}

.feedback-card.is-error .feedback-icon {
  background: #ba2f3a;
  color: #fff;
}

.feedback-title {
  margin: 0 0 3px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.feedback-message {
  margin: 0;
  color: #3a416c;
  font-size: 13px;
  line-height: 1.4;
}

.feedback-close {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  padding: 0 16px;
  font: 700 13px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.feedback-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.feedback-burst span {
  position: absolute;
  top: 19px;
  left: 26px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--yellow);
  opacity: 0;
  animation: confetti-flicker .7s ease-out both;
}

.feedback-burst span:nth-child(2) {
  background: var(--blue);
  animation-delay: .03s;
  transform: rotate(25deg);
}

.feedback-burst span:nth-child(3) {
  left: 42px;
  background: #ffdd5a;
  animation-delay: .06s;
}

.feedback-burst span:nth-child(4) {
  left: auto;
  right: 82px;
  background: var(--yellow);
  animation-delay: .04s;
}

.feedback-burst span:nth-child(5) {
  left: auto;
  right: 62px;
  background: var(--blue);
  animation-delay: .08s;
}

.feedback-burst span:nth-child(6) {
  left: auto;
  right: 42px;
  background: #ffdd5a;
  animation-delay: .11s;
}

.feedback-card.is-error .feedback-burst {
  display: none;
}

@keyframes feedback-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes confetti-flicker {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px) rotate(46deg);
  }
}

.page {
  position: relative;
  width: min(100%, 794px);
  aspect-ratio: 4242 / 5999;
  background: var(--paper);
  box-shadow: 0 16px 48px rgba(12, 17, 74, .18);
}

.page-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.field {
  position: absolute;
  display: block;
}

.field span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.field textarea {
  width: 100%;
  height: 100%;
  resize: none;
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--field);
  color: #111;
  padding: 5px 7px;
  font: 500 clamp(10px, 1.45vw, 15px)/1.25 Arial, Helvetica, sans-serif;
  outline: none;
}

.field textarea:focus {
  border-color: var(--yellow);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 0 0 2px rgba(255, 196, 0, .35);
}

.box {
  width: 20.2%;
  height: 5.8%;
}

.top-left { left: 13.6%; top: 17.2%; }
.top-center { left: 39.1%; top: 17.2%; }
.top-right { left: 64.1%; top: 17.2%; }

.left-1 { left: 7.8%; top: 26.2%; }
.left-2 { left: 7.8%; top: 34.2%; }
.left-3 { left: 7.8%; top: 42%; }

.right-1 { left: 72%; top: 26.2%; }
.right-2 { left: 72%; top: 34.2%; }
.right-3 { left: 72%; top: 42%; }

.bottom-left-1 { left: 7.8%; top: 53.7%; }
.bottom-left-2 { left: 7.8%; top: 61.8%; }
.bottom-left-3 { left: 7.8%; top: 70%; }
.bottom-left-4 { left: 7.8%; top: 78%; }

.bottom-center-1 { left: 38.8%; top: 53.7%; }
.bottom-center-2 { left: 38.8%; top: 61.8%; }
.bottom-center-3 { left: 38.8%; top: 70%; }
.bottom-center-4 { left: 38.8%; top: 78%; }

.bottom-right-1 { left: 72%; top: 53.7%; }
.bottom-right-2 { left: 72%; top: 61.8%; }
.bottom-right-3 { left: 72%; top: 70%; }
.bottom-right-4 { left: 72%; top: 78%; }

.form-panel .check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  line-height: 1.4;
}

.form-panel .check-row input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
}

.form-panel .check-row span {
  flex: 1 1 auto;
}

.consultation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  grid-column: 1 / -1;
}

.consultation-grid[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .form-panel {
    grid-template-columns: 1fr;
  }

  .consultation-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .feedback-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .feedback-close {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-shell {
    width: auto;
    padding: 0;
  }

  .form-panel {
    display: none;
  }

  .worksheet-form {
    display: block;
  }

  .page {
    width: 210mm;
    height: 297mm;
    box-shadow: none;
  }

  .field textarea {
    border-color: transparent;
    background: transparent;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
