:root {
  --background: #f6f5f8;
  --foreground: #29232e;
  --primary: #8832b8;
  --primary-foreground: #fff;
  --input: #d9d1df;
  --ring: #8832b8;
  --line: #e6e0eb;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100svh;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.5 Inter, Arial, sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition: background 0.15s;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ba7bdc;
  outline-offset: 3px;
}

.topbar {
  height: 80px;
  max-width: 1400px;
  margin: auto;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.logo {
  width: 174px;
  height: auto;
}

.topmeta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #847a8b;
  font-size: 14px;
}

.tag {
  border: 1px solid #ded7e5;
  border-radius: 40px;
  padding: 7px 13px;
  font-size: 13px;
}

.shell {
  max-width: 1280px;
  margin: auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  padding: 16px 24px 8px;
  min-height: calc(100svh - 168px);
  max-height: calc(100svh - 168px);
  overflow: hidden;
}

.eyebrow {
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
  color: #95869f;
  margin: 0 0 14px;
}

.side h1 {
  font-size: 38px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}

.side h1 span {
  color: #8832b8;
}

.side > p {
  color: #897c93;
  max-width: 280px;
}

.steps {
  display: grid;
  gap: 8px;
  margin: 32px 0 36px;
}

.step {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  color: #a192ac;
  background: none;
  border: 0;
  text-align: left;
}

.stepnum {
  border: 1px solid #ddd2e5;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

.step.active {
  color: #33233f;
  font-weight: 600;
}

.step.active .stepnum {
  background: #8832b8;
  border-color: #8832b8;
  color: #fff;
}

.step.done .stepnum {
  color: #8832b8;
  background: #efe3f7;
}

.side-note {
  border-top: 1px solid #ded3e6;
  padding-top: 18px;
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #92829d;
  max-width: 290px;
}

.side-note svg {
  flex-shrink: 0;
  color: #8832b8;
  margin-top: 3px;
}

.card {
  background: #fff;
  border: 1px solid #e9e2ee;
  border-radius: 20px;
  box-shadow: 0 10px 36px #2b0c4206;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.card-body {
  padding: 18px 22px 16px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #998aa3;
  margin-bottom: 9px;
}

.progress-row strong {
  font-weight: 500;
  color: #8832b8;
}

.form-progress {
  height: 3px;
  margin-bottom: 18px;
  background: #eee6f4;
}

.card h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 10px;
}

.lede {
  color: #97869f;
  margin: 0 0 16px;
  font-size: 14px;
}

.choices {
  display: grid;
  gap: 8px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e5dbea;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}

.choice.selected {
  border-color: #8832b8;
  background: #fbf7fe;
}

.choice-icon {
  height: 40px;
  width: 40px;
  display: grid;
  place-items: center;
  background: #f3edf7;
  border-radius: 9px;
  color: #9b80ad;
  flex-shrink: 0;
}

.selected .choice-icon {
  background: #efe1f8;
  color: #8832b8;
}

.choice-text {
  flex: 1;
}

.choice-text strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.choice-text small {
  display: block;
  color: #9a86a7;
  font-size: 12px;
  margin-top: 3px;
}

.field {
  display: block;
  margin-top: 12px;
}

.field > span {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.field small,
.hint {
  color: #9c88a7;
  font-size: 12px;
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #dfd2e7;
  border-radius: 10px;
  background: #fff;
  color: #302037;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #afa0b8;
}

.field textarea {
  min-height: 68px;
  resize: vertical;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee6f3;
  padding: 12px 18px;
  background: #fdfbfe;
  gap: 12px;
}

.primary {
  background: #8832b8;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px #8832b81a;
}

.primary:hover {
  background: #7625a1;
}

.secondary {
  background: #fff;
  border: 1px solid #ded0e7;
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.back {
  background: none;
  border: 0;
  color: #9b85a9;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 8px 0;
}

.save {
  font-size: 13px;
  color: #a48dae;
  display: flex;
  align-items: center;
  gap: 7px;
}

.under-card {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #a38bae;
  font-size: 12px;
  padding: 0 4px;
}

.sitefooter {
  max-width: 1200px;
  margin: 6px auto 0;
  border-top: 1px solid #e3d9eb;
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  color: #a18aab;
  font-size: 12px;
}

.error {
  background: #fff0f2;
  color: #a72840;
  border-radius: 10px;
  padding: 12px 15px;
  margin: 14px 0;
  font-size: 14px;
}

.notice {
  background: #f5effa;
  color: #77588b;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-top: 14px;
}

.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px dashed #cdb7db;
  border-radius: 12px;
  padding: 22px;
  color: #8832b8;
  text-align: center;
  background: #fcf9fe;
  gap: 6px;
  cursor: pointer;
}

.upload input {
  max-width: 100%;
  font-size: 13px;
  margin-top: 8px;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee6f3;
  padding: 10px 0;
  gap: 12px;
  font-size: 14px;
}

.file-row a {
  overflow-wrap: anywhere;
}

.file-row button {
  border: 0;
  background: none;
  color: #987ca9;
  padding: 6px;
}

.summary {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.summary dt {
  font-size: 12px;
  color: #998ba3;
  margin-bottom: 3px;
}

.summary dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #8a7996;
  margin-top: 18px;
}

.consent button {
  flex-shrink: 0;
  margin-top: 3px;
}

.success {
  text-align: center;
  padding: 28px 16px;
}

.success-icon {
  display: grid;
  place-items: center;
  background: #efe2f8;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  color: #8832b8;
  margin: 0 auto 16px;
}

.success p {
  color: #8b7d95;
}

.success .secondary {
  margin-top: 12px;
}

.admin {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}

body.admin-view {
  background:
    radial-gradient(circle at 85% 0, rgba(136, 50, 184, .055), transparent 34rem),
    #f6f4f7;
}

.admin-topbar {
  position: relative;
  color: #332b37;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #e6dfea;
  box-shadow: 0 5px 22px rgba(50, 32, 60, .045);
}

.admin-topbar::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: '';
  background: linear-gradient(90deg, #7f29ad, #a54bc8 48%, #c58bda);
}

.admin-topbar-inner {
  width: min(1200px, calc(100% - 48px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 22px;
}

.admin-brand img {
  width: 146px;
  height: auto;
}

.admin-brand-copy {
  min-width: 0;
  padding-left: 22px;
  display: grid;
  gap: 2px;
  border-left: 1px solid #ddd4e2;
}

.admin-brand-copy strong {
  color: #332b37;
  font-size: 15px;
  font-weight: 600;
}

.admin-brand-copy small {
  color: #887b90;
  font-size: 12px;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e1d5e8;
  border-radius: 999px;
  color: #713193;
  background: #f7f0fa;
  font-size: 13px;
  font-weight: 500;
}

.admin-logout {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #ded5e3;
  border-radius: 10px;
  color: #605566;
  background: #fff;
}

.admin-logout:hover {
  color: #6f2299;
  border-color: #cdb7da;
  background: #fbf8fc;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.admin h1 {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
}

.admin p {
  color: #8a7e93;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
}

.requests-panel {
  box-shadow: 0 14px 38px rgba(55, 31, 66, .06);
}

.admin-success {
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid #cfe2d4;
  border-radius: 10px;
  color: #356a44;
  background: #f0f8f2;
  font-size: 14px;
}

.admin-footer {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto 22px;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #ddd3e2;
  color: #776681;
  font-size: 12px;
}

.admin-footer a {
  color: #73239f;
}

.panel {
  background: #fff;
  border: 1px solid #e5deeb;
  border-radius: 18px;
  padding: 24px;
}

.panel h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 18px;
}

.brief-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #eee7f3;
}

.brief-row:last-child {
  border: 0;
}

.brief-row strong {
  font-weight: 500;
}

.brief-row small {
  display: block;
  color: #a192ac;
  margin-top: 4px;
}

.status {
  display: inline-block;
  font-size: 12px;
  border-radius: 30px;
  padding: 5px 10px;
  background: #f0e5f7;
  color: #8832b8;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.empty {
  padding: 32px 12px;
  text-align: center;
  color: #9885a4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 250px 1fr;
    gap: 28px;
    padding: 26px 20px;
  }

  .side h1 {
    font-size: 34px;
  }

  .card-body {
    padding: 22px 20px;
  }

  .card-footer {
    padding: 14px 18px;
  }

  .sitefooter {
    margin: 16px 20px;
  }

  .topbar {
    padding: 0 20px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 74px;
    padding: 0 16px;
  }

  .logo {
    width: 142px;
  }

  .topmeta .tag {
    display: none;
  }

  .topmeta {
    font-size: 12px;
  }

  .shell {
    display: block;
    padding: 20px 14px;
  }

  .side h1 {
    font-size: 28px;
    max-width: 330px;
    margin-bottom: 10px;
  }

  .side h1 br {
    display: none;
  }

  .side > p,
  .side-note,
  .eyebrow {
    display: none;
  }

  .steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 18px 0 22px;
  }

  .step {
    padding: 0;
    gap: 0;
    flex: 1;
  }

  .step-label {
    display: none;
  }

  .step:not(:last-child):after {
    content: '';
    height: 1px;
    flex: 1;
    background: #e0d6e7;
    margin: 0 9px;
  }

  .card {
    border-radius: 16px;
  }

  .card-body {
    min-height: 0;
    padding: 20px 18px;
  }

  .card h2 {
    font-size: 24px;
  }

  .lede {
    font-size: 14px;
  }

  .choice {
    padding: 11px 11px;
    gap: 10px;
  }

  .choice-text strong {
    font-size: 15px;
  }

  .choice-text small {
    font-size: 12px;
  }

  .choice-icon {
    width: 36px;
    height: 36px;
  }

  .card-footer {
    padding: 14px 16px;
  }

  .primary {
    padding: 11px 18px;
  }

  .under-card {
    font-size: 12px;
    gap: 18px;
  }

  .under-card span:last-child {
    display: none;
  }

  .sitefooter {
    margin: 8px 16px;
    font-size: 12px;
    gap: 20px;
  }

  .sitefooter span:last-child {
    display: none;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .save {
    font-size: 12px;
  }

  .admin {
    margin: 26px auto;
    padding: 0 16px;
  }

  .admin-head {
    align-items: flex-start;
  }

  .admin h1 {
    font-size: 28px;
  }

  .panel {
    padding: 20px;
  }

  .brief-row {
    align-items: flex-start;
  }
}

/* 2026-09-13: calmer, fixed-height questionnaire composition. */
.side-logo {
  display: inline-flex;
  margin: 2px 0 22px;
}

.form-title {
  color: #33233f;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.copy-brief-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: #7c6589;
  font-weight: 500;
}

.copy-brief-link:hover,
.sitefooter a:hover {
  color: #8832b8;
}

.sitefooter a {
  text-decoration: underline;
  text-decoration-color: #cdbbd7;
  text-underline-offset: 3px;
}

@media (min-width: 721px) {
  html,
  body,
  #root {
    height: 100%;
    overflow: hidden;
  }

  #root {
    display: flex;
    flex-direction: column;
  }

  .shell {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0 auto;
    padding-top: 18px;
    padding-bottom: 8px;
    align-items: start;
    overflow: hidden;
  }

  .shell > section {
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .card {
    width: 100%;
    height: min(590px, calc(100svh - 104px));
    min-height: 0;
    max-height: 590px;
    flex: 0 0 auto;
  }

  .card-body {
    flex: 1 1 auto;
    padding: 22px 24px 18px;
    overflow-y: auto;
  }

  .card-footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 14px 20px;
  }

  .progress-row {
    align-items: baseline;
    margin-bottom: 10px;
  }

  .form-progress {
    margin-bottom: 18px;
  }

  .card h2 {
    margin-bottom: 10px;
    font-size: 26px;
  }

  .lede {
    margin-bottom: 16px;
  }
}

@media (min-width: 721px) and (max-height: 760px) {
  .shell {
    padding-top: 12px;
    padding-bottom: 6px;
  }

  .side-logo {
    margin-bottom: 12px;
  }

  .side-logo .logo {
    width: 150px;
  }

  .card {
    height: min(570px, calc(100svh - 28px));
    max-height: none;
  }

  .card-body {
    padding: 18px 20px 14px;
  }

  .card-footer {
    padding: 12px 18px;
  }
}

@media (min-width: 721px) and (max-height: 650px) {
  .shell {
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .side-logo {
    margin-bottom: 8px;
  }

  .side-logo .logo {
    width: 136px;
  }

  .card {
    height: calc(100svh - 16px);
  }

  .card-body {
    padding: 14px 16px 12px;
  }
}

/* The admin area is a regular scrollable workspace. */
@media (min-width: 721px) {
  html.admin-view,
  body.admin-view {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.admin-view #root {
    display: block;
    height: auto;
    min-height: 100%;
    overflow: visible;
  }
}

.requests-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.requests-title h2 {
  margin-bottom: 0;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #f7f3f9;
}

.filter-tabs button {
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  color: #75667e;
  background: transparent;
  cursor: pointer;
}

.filter-tabs button span {
  margin-left: 5px;
  color: #a491af;
}

.filter-tabs button.active {
  color: #6f2299;
  background: #fff;
  box-shadow: 0 1px 5px rgba(75,39,91,.1);
}

.cleanup-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 6px;
  padding: 13px 14px;
  border: 1px solid #eee5f2;
  border-radius: 12px;
  background: #fcfafc;
}

.cleanup-bar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #75667e;
  font-size: 13px;
}

.cleanup-copy {
  display: grid;
  gap: 6px;
}

.cleanup-copy > small {
  color: #97889f;
  font-size: 12px;
}

.cleanup-bar select {
  padding: 8px 30px 8px 10px;
  border: 1px solid #ddcfe5;
  border-radius: 8px;
  color: #43384a;
  background: #fff;
}

.brief-list {
  margin-top: 5px;
}

.brief-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
}

.brief-open {
  min-width: 0;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  background: none;
  cursor: pointer;
}

.brief-open strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-delete {
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #8e7e96;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.row-delete:hover,
.row-delete:focus-visible {
  color: #a62f46;
  border-color: #efd7dc;
  background: #fff0f2;
}

.danger-outline {
  color: #a62f46;
  border-color: #e6c0c8;
}

.danger-outline:disabled {
  opacity: .45;
  cursor: default;
}

.confirm-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32,20,38,.42);
  backdrop-filter: blur(3px);
}

.confirm-dialog {
  width: min(440px,100%);
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(32,20,38,.22);
}

.confirm-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #a62f46;
  background: #fff0f2;
}

.confirm-dialog h2 {
  margin: 18px 0 8px;
  font-size: 23px;
  font-weight: 500;
}

.confirm-dialog p {
  margin: 0;
  color: #75667e;
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.danger {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #a62f46;
  cursor: pointer;
}

@media (max-width: 720px) {
  .admin-topbar-inner {
    width: calc(100% - 32px);
    min-height: 72px;
  }

  .admin-brand {
    gap: 10px;
  }

  .admin-brand img {
    width: 116px;
  }

  .admin-brand-copy,
  .admin-badge {
    display: none;
  }

  .admin-logout {
    min-height: 36px;
    padding: 0 10px;
  }

  .admin {
    margin-top: 22px;
    padding: 0 16px;
  }

  .admin-footer {
    width: calc(100% - 32px);
    flex-direction: column;
    gap: 5px;
  }

  .cleanup-bar,
  .cleanup-bar label {
    align-items: stretch;
    flex-direction: column;
  }

  .cleanup-bar .secondary {
    justify-content: center;
  }

  .cleanup-copy {
    width: 100%;
  }

  .row-delete span {
    display: none;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .side-logo {
    margin-bottom: 16px;
  }

  .progress-row {
    align-items: flex-start;
    gap: 8px;
  }

  .progress-row span {
    text-align: right;
  }

  .copy-brief-link {
    text-align: right;
  }
}

@media (max-height: 920px) {
  .topbar {
    height: 76px;
  }

  .shell {
    min-height: calc(100svh - 150px);
    max-height: calc(100svh - 150px);
    padding-top: 12px;
    padding-bottom: 6px;
    gap: 26px;
  }

  .side h1 {
    font-size: 34px;
    margin-bottom: 12px;
  }

  .steps {
    margin: 24px 0 20px;
  }

  .card-body {
    padding: 16px 18px;
  }

  .card h2 {
    font-size: 25px;
  }

  .lede {
    margin-bottom: 12px;
  }

  .choice {
    padding: 11px;
  }

  .choice-text strong {
    font-size: 15px;
  }

  .choice-text small {
    font-size: 12px;
  }

  .choice-icon {
    width: 36px;
    height: 36px;
  }

  .field {
    margin-top: 10px;
  }

  .field-grid {
    gap: 0 12px;
  }

  .field input,
  .field textarea {
    padding: 10px 12px;
  }

  .field textarea {
    min-height: 60px;
  }

  .card-footer {
    padding: 10px 14px;
  }

  .sitefooter {
    padding: 6px 0;
    margin-top: 2px;
  }
}

@media (max-height: 820px) {
  .shell {
    min-height: calc(100svh - 136px);
    max-height: calc(100svh - 136px);
    gap: 20px;
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .topbar {
    height: 70px;
  }

  .side h1 {
    font-size: 30px;
    margin-bottom: 8px;
  }

  .steps {
    margin: 14px 0;
  }

  .choice {
    padding: 10px;
    gap: 10px;
  }

  .choice-icon {
    width: 34px;
    height: 34px;
  }

  .card-body {
    padding: 14px 14px;
  }

  .card h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .lede {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .field {
    margin-top: 9px;
  }

  .field small,
  .hint {
    font-size: 11px;
  }

  .card-footer {
    padding: 8px 12px;
  }

  .primary {
    padding: 10px 16px;
  }

  .under-card {
    margin-top: 6px;
  }

  .sitefooter {
    font-size: 11px;
  }
}

@media (max-height: 760px) {
  .topbar {
    height: 64px;
    padding: 0 3%;
  }

  .logo {
    width: 132px;
  }

  .shell {
    min-height: calc(100dvh - 100px);
    max-height: calc(100dvh - 100px);
    padding-top: 4px;
    padding-bottom: 0;
    gap: 14px;
  }

  .side h1 {
    font-size: 26px;
    margin-bottom: 4px;
  }

  .steps {
    margin: 10px 0;
  }

  .step {
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 13px;
  }

  .card-body {
    padding: 12px 14px 9px;
  }

  .card h2 {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .lede {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .choice {
    padding: 8px;
    gap: 8px;
  }

  .choice-icon {
    width: 30px;
    height: 30px;
  }

  .choice-text strong {
    font-size: 14px;
  }

  .field {
    margin-top: 6px;
  }

  .field input,
  .field textarea,
  .secondary,
  .primary {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .field input,
  .field textarea {
    font-size: 14px;
  }

  .field textarea {
    min-height: 54px;
  }

  .card-footer {
    padding: 7px 10px;
  }

  .progress-row {
    margin-bottom: 4px;
  }

  .form-progress {
    margin-bottom: 8px;
  }

  .under-card,
  .sitefooter {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.lede,
.side > p,
.side-note,
.hint,
.field small,
.choice-text small,
.save,
.under-card,
.sitefooter,
.step,
.progress-row,
.brief-row small {
  color: #776681;
}

.eyebrow {
  color: #7d6c87;
}

.step.active {
  color: #33233f;
}

.step.done {
  color: #776681;
}

@font-face {
  font-family: Gilroy;
  src: url(/gilroy-regular.woff) format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Gilroy;
  src: url(/gilroy-medium.woff) format("woff");
  font-weight: 500 800;
  font-display: swap;
}

body {
  font-family: Gilroy, Arial, sans-serif;
}

input[type='radio'],
input[type='checkbox'] {
  accent-color: #8832b8;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-progress > div {
  height: 100%;
  background: #8832b8;
}

.login {
  max-width: 480px;
  margin: 60px auto;
  padding: 24px;
}

.logout {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 10;
}

/* --- Fit landing form above the fold --- */
@media (min-height: 820px) {
  html,
  body,
  #root {
    height: 100%;
    overflow: hidden;
  }

  body {
    min-height: 100%;
  }

  .shell {
    min-height: calc(100dvh - 132px);
    max-height: calc(100dvh - 132px);
    padding-top: 10px;
    padding-bottom: 4px;
    gap: 20px;
    overflow: hidden;
  }

  .card {
    min-height: 0;
    height: 100%;
  }

  .card-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .card-footer {
    margin-top: auto;
  }
}

@media (max-height: 900px) {
  .shell {
    min-height: calc(100dvh - 132px);
    max-height: calc(100dvh - 132px);
  }

  .topbar {
    height: 68px;
    padding: 0 3%;
  }

  .side h1 {
    font-size: 30px;
    margin-bottom: 8px;
  }

  .steps {
    margin: 14px 0 12px;
  }

  .step {
    padding: 8px 0;
    font-size: 14px;
  }

  .card {
    border-radius: 18px;
  }

  .card-body {
    padding: 14px 16px 12px;
  }

  .progress-row {
    margin-bottom: 6px;
  }

  .form-progress {
    margin-bottom: 12px;
  }

  .card h2 {
    margin-bottom: 8px;
    font-size: 24px;
  }

  .lede {
    margin-bottom: 10px;
  }
}

/* Keep every questionnaire step inside a laptop viewport. */
@media (min-width: 721px) {
  html,
  body,
  #root {
    height: 100%;
    overflow: hidden;
  }

  #root {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .shell {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0 auto;
    overflow: hidden;
  }

  .shell > section {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
  }

  .card {
    width: 100%;
    height: auto;
    flex: 0 1 auto;
    min-height: 0;
    max-height: none;
  }

  .card-body {
    overflow-y: auto;
  }

  .card-footer {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .sitefooter {
    width: min(1200px, calc(100% - 48px));
    margin-right: auto;
    margin-left: auto;
  }

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

  .business-fields > .field:nth-child(3) {
    grid-column: 1 / -1;
  }

  .existing-business {
    display: block;
  }

  .variant-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .variant-choices .choice,
  .competitor-choices .choice {
    min-width: 0;
  }

  .variant-choices .choice-text,
  .competitor-choices .choice-text {
    min-width: 0;
  }

  .competitor-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .section-label {
    margin-top: 10px;
  }

  .step-5 .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    margin: 8px 0 10px;
  }

  .step-5 .summary dt {
    margin-bottom: 1px;
  }

  .step-5 .consent {
    margin-top: 8px;
  }

  .step-4 .upload {
    padding: 14px;
  }

  .step-4 .file-row {
    padding: 6px 0;
  }
}

@media (min-width: 721px) and (max-height: 760px) {
  #root {
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .shell {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .side > p,
  .side-note,
  .under-card,
  .sitefooter {
    display: none;
  }

  .business-fields .field {
    margin-top: 5px;
  }

  .business-fields .field textarea {
    min-height: 46px;
  }

  .step-3 .choice {
    padding: 7px;
  }

  .step-3 .choice-icon {
    width: 28px;
    height: 28px;
  }

  .step-3 .field textarea,
  .step-4 .field textarea {
    min-height: 46px;
  }

  .step-5 .summary dd {
    font-size: 14px;
  }
}

@media (min-width: 721px) and (max-height: 650px) {
  .step-3 .choice-text small {
    display: none;
  }

  .step-3 .choice {
    min-height: 38px;
    padding: 5px 7px;
  }

  .step-3 .choice-icon {
    width: 26px;
    height: 26px;
  }

  .step-3 .section-label {
    margin-top: 5px;
  }

  .step-3 .field textarea {
    min-height: 40px;
  }
}

@media (max-width: 720px) {
  html,
  body,
  #root {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #root {
    display: block;
  }

  .shell {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .card,
  .card-body {
    max-height: none;
    overflow: visible;
  }

  .business-fields,
  .variant-choices,
  .competitor-choices,
  .step-5 .summary {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Final questionnaire geometry: fixed card, stable controls and comfortable spacing. */
@media (min-width: 721px) {
  html,
  body,
  #root {
    height: 100%;
    overflow: hidden;
  }

  #root {
    display: flex;
    flex-direction: column;
  }

  .shell {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0 auto;
    padding-top: 18px;
    padding-bottom: 8px;
    align-items: start;
    overflow: hidden;
  }

  .shell > section {
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .card {
    width: 100%;
    height: min(590px, calc(100svh - 104px));
    min-height: 0;
    max-height: 590px;
    flex: 0 0 auto;
  }

  .card-body {
    flex: 1 1 auto;
    padding: 22px 24px 18px;
    overflow-y: auto;
  }

  .card-footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 14px 20px;
  }

  .progress-row {
    align-items: baseline;
    margin-bottom: 10px;
  }

  .form-progress {
    margin-bottom: 18px;
  }

  .card h2 {
    margin-bottom: 10px;
    font-size: 26px;
  }

  .lede {
    margin-bottom: 16px;
  }
}

@media (min-width: 721px) and (max-height: 760px) {
  .shell {
    padding-top: 12px;
    padding-bottom: 6px;
  }

  .side-logo {
    margin-bottom: 12px;
  }

  .side-logo .logo {
    width: 150px;
  }

  .card {
    height: min(570px, calc(100svh - 28px));
    max-height: none;
  }

  .card-body {
    padding: 18px 20px 14px;
  }

  .card-footer {
    padding: 12px 18px;
  }
}

@media (min-width: 721px) and (max-height: 650px) {
  .shell {
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .side-logo {
    margin-bottom: 8px;
  }

  .side-logo .logo {
    width: 136px;
  }

  .card {
    height: calc(100svh - 16px);
  }

  .card-body {
    padding: 14px 16px 12px;
  }
}

/* Extended Tsar Prompt questionnaire: compact, stable desktop steps. */
.brief-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}
.brief-fields .field { margin: 0; }
.brief-fields textarea { min-height: 56px; }
.step-3 .brief-fields,
.step-4 .brief-fields { gap: 6px 14px; }
.step-3 .brief-fields textarea,
.step-4 .brief-fields textarea { min-height: 48px; }
.step-6 .brief-fields { margin-top: 10px; }
.step-7 .competitor-choices { margin-top: 10px; }
@media (min-width: 721px) {
  .steps { gap: 2px; margin: 16px 0 18px; }
  .step { padding: 5px 0; }
  .stepnum { width: 27px; height: 27px; }
  .step-7 .choice { padding: 7px; }
  .step-7 .choice-icon { width: 30px; height: 30px; }
  .step-8 .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin: 8px 0; }
  .step-8 .summary dt { margin-bottom: 1px; }
}
@media (max-width: 720px) {
  .brief-fields { grid-template-columns: 1fr; }
}

.analysis-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d9c2e8;
  border-radius: 12px;
  background: #f8f2fb;
  color: #5f426f;
  font-size: 13px;
  line-height: 1.35;
}

.analysis-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #7f2cac;
}

.analysis-note strong { display: block; }

.field.from-site > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field.from-site > span em {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eee1f6;
  color: #74269f;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .02em;
}

.field.from-site input,
.field.from-site textarea {
  border-color: #c9a9dc;
  background: #fdfaff;
}

/* 2026-09-21: three-stage brief with compact, confirmable topics. */
.phase-steps {
  gap: 10px;
  margin-top: 28px;
}

.phase-steps .step {
  align-items: flex-start;
  padding: 9px 0;
}

.journey-steps {
  gap: 2px;
  margin-top: 18px;
}

.journey-steps .step {
  padding: 4px 0;
}

.journey-steps + .side-note {
  margin-top: 6px;
  padding-top: 12px;
}

.step-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.step-copy small {
  color: #9c8da5;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

.brief-topic {
  min-height: 0;
}

.compact-grid,
.topic-grid,
.competitor-choices,
.publication-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

.competitor-fields {
  display: grid;
  gap: 8px;
}

.competitor-fields .competitor-field {
  margin-top: 0;
}

.competitor-auto-choice {
  display: grid;
  margin-top: 10px;
}

.compact-grid .field,
.topic-grid .field {
  min-width: 0;
  margin-top: 0;
}

.topic-grid textarea {
  min-height: 68px;
}

.field-actions {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  margin: 5px 0 0 !important;
}

.field-actions button {
  padding: 2px 7px;
  border: 0;
  border-radius: 7px;
  color: #765c84;
  background: #f3edf6;
  font-size: 10px;
  font-weight: 500;
}

.field-actions button:hover {
  color: #6f2299;
  background: #ebddf2;
}

.analysis-stage {
  width: min(590px, 100%);
  margin: 34px auto 0;
  text-align: center;
}

.analysis-orbit {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8330b1;
  background: radial-gradient(circle, #f7effb 48%, #ead9f3 50%, #fbf8fd 68%);
}

.analysis-stage p {
  margin: 0 auto 20px;
  max-width: 560px;
  color: #88778f;
}

.analysis-intro {
  margin-bottom: 12px !important;
}

.analysis-steps {
  display: grid;
  gap: 7px;
  text-align: left;
}

.analysis-steps > div {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid #ede4f1;
  border-radius: 10px;
  background: #fdfaff;
}

.analysis-steps strong,
.analysis-next strong {
  color: #4b3556;
  font-size: 14px;
}

.analysis-steps span,
.analysis-next li {
  color: #7d6c86;
  font-size: 12px;
  line-height: 1.35;
}

.analysis-next {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f4fa;
  text-align: left;
}

.analysis-next ol {
  margin: 6px 0 0;
  padding-left: 18px;
}

.analysis-next li + li {
  margin-top: 3px;
}

.analysis-list {
  width: min(510px, 100%);
  margin: auto;
  display: grid;
  gap: 8px;
  text-align: left;
}

.analysis-list span {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #5f4b69;
  background: #f8f4fa;
  font-size: 13px;
}

.analysis-list svg {
  flex: 0 0 auto;
  color: #8430b2;
}

.variant-choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.publication-choices {
  margin-top: 12px;
}

.screen-13 .choice,
.screen-13 .publication-choices .choice {
  padding: 9px 10px;
}

.screen-13 .choice-icon {
  width: 34px;
  height: 34px;
}

.compact-upload {
  position: relative;
  min-height: 76px;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  text-align: left;
}

.compact-upload > svg {
  grid-row: 1 / 3;
  align-self: center;
}

.compact-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.materials-fields {
  margin-top: 10px;
}

.materials-list {
  max-height: 72px;
  overflow-y: auto;
  margin-top: 5px;
}

.materials-list .file-row {
  padding: 5px 2px;
  font-size: 12px;
}

.materials-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.handoff-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.handoff-summary > div {
  padding: 14px;
  border: 1px solid #eadfee;
  border-radius: 12px;
  background: #fbf9fc;
  text-align: center;
}

.handoff-summary strong,
.handoff-summary span {
  display: block;
}

.handoff-summary strong {
  color: #8030ad;
  font-size: 25px;
  font-weight: 500;
}

.handoff-summary span {
  margin-top: 2px;
  color: #8e7c97;
  font-size: 11px;
}

.compact-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 10px 0;
}

@media (min-width: 721px) {
  .brief-card .card-body {
    overflow: hidden;
  }

  .brief-card .field {
    margin-top: 10px;
  }

  .brief-card .field textarea {
    min-height: 66px;
    max-height: 84px;
  }

  .brief-card .topic-grid .field {
    margin-top: 0;
  }

  .screen-7 .topic-grid textarea,
  .screen-9 .topic-grid textarea {
    min-height: 58px;
    max-height: 70px;
  }

  .screen-10 .topic-grid textarea {
    min-height: 58px;
  }
}

@media (max-width: 720px) {
  .step-copy small {
    display: none;
  }

  .compact-grid,
  .topic-grid,
  .competitor-choices,
  .publication-choices,
  .variant-choices,
  .compact-summary {
    grid-template-columns: 1fr;
  }

  .handoff-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .handoff-summary > div {
    padding: 10px 5px;
  }

  .analysis-stage {
    margin-top: 12px;
  }
}

/* 2026-09-21: vertically ordered source links with a taller questionnaire card. */
@media (min-width: 721px) {
  .brief-card {
    height: min(704px, calc(100svh - 16px));
    max-height: none;
  }

  .source-links {
    grid-template-columns: 1fr;
  }

  .screen-2 .card-body {
    overflow-y: auto;
  }
}
