:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #2f1b2b;
  background: #f5eaf2;
  --purple: #9e508e;
  --purple-dark: #78376b;
  --border: #e2cadd;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
main { width: min(100% - 24px, 960px); margin: 16px auto 42px; }
.brand {
  display: flex; align-items: center; justify-content: center; gap: clamp(16px, 5vw, 56px);
  overflow: hidden; isolation: isolate; position: relative; min-height: 150px;
  background: #fffaff; border-radius: 18px; padding: 16px 34px; margin-bottom: 12px;
}
.brand-shape { position: absolute; top: 0; height: 100%; z-index: -1; pointer-events: none; }
.brand-shape-left { left: 0; width: 14%; }
.brand-shape-right { right: 0; width: 23.5%; }
.brand-shape .teal { fill: #26b2b9; }
.brand-shape .purple { fill: var(--purple); opacity: .92; }
.brand img { width: min(40%, 270px); height: auto; }
.brand p { color: var(--purple-dark); font-size: clamp(.8rem, 2.5vw, 1.33rem); font-weight: 650; border-left: 2px solid var(--purple); padding-left: clamp(12px, 4vw, 42px); margin: 0; }
.card { background: white; border: 1px solid var(--border); border-radius: 17px; margin: 0 0 12px; min-width: 0; padding: 12px 22px 20px; box-shadow: 0 2px 4px #57214c0a; }
.intro { padding: 19px 24px; }
.intro p { margin: 8px 0; }
h1 { color: #35182e; font-size: clamp(2rem, 6vw, 2.85rem); line-height: 1.1; margin: 8px 0; letter-spacing: -.035em; }
h2 { color: var(--purple-dark); margin: 0; font-size: clamp(1.15rem, 3vw, 1.55rem); }
.eyebrow { color: var(--purple); font-size: .88rem; font-weight: 650; }
.required { color: #aa202e; font-weight: 650; }
.intro .rule { border-top: 1px solid var(--border); padding-top: 8px; margin-bottom: 0; }
fieldset.card { position: relative; padding-top: 0; }
fieldset.card > legend { padding: 12px 0 2px; display: flex; gap: 12px; align-items: baseline; font-weight: 700; font-size: 1.06rem; float: left; width: 100%; }
fieldset.card > legend + * { clear: both; }
.number { display: inline-grid; place-items: center; border-radius: 50%; background: var(--purple); color: white; flex: 0 0 32px; height: 32px; }
.hint { margin: 3px 0 8px 44px; color: #654b60; font-size: .93rem; }
.choice { display: flex; align-items: center; gap: 10px; padding: 5px 0; min-height: 38px; cursor: pointer; }
.card > .choice { margin-left: 44px; }
.choice input { margin: 0; width: 21px; height: 21px; flex: 0 0 21px; accent-color: var(--purple); }
.matrix-head, .matrix-row { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 3px; }
.matrix-head { margin-top: 12px; margin-bottom: 3px; font-size: .9rem; text-align: center; font-weight: 650; }
.matrix-row { margin: 0 0 3px; border: 0; padding: 0; min-width: 0; }
.matrix-head span:not(:first-child), .matrix-row > * { border-radius: 5px; padding: 6px 9px; background: #f4e8f1; }
.matrix-row .topic { font-weight: 650; align-content: center; }
.matrix-row .choice { justify-content: center; position: relative; }
.matrix-row .choice span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
textarea, input[type="text"] { font: inherit; color: inherit; border: 1px solid #a17a9a; border-radius: 8px; padding: 9px 11px; width: 100%; }
textarea { display: block; resize: vertical; }
#attribution { margin: 8px 0 0 44px; }
.text-field { display: block; margin-top: 9px; font-weight: 650; }
.text-field input { display: block; margin-top: 4px; }
.actions { padding: 5px 0; }
button, .button { display: inline-block; background: var(--purple); color: white; border: 0; border-radius: 9px; padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
button:disabled { opacity: .65; cursor: wait; }
a { color: var(--purple-dark); }
:focus-visible { outline: 3px solid var(--purple-dark); outline-offset: 3px; }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.result { background: #faf1f8; border-radius: 9px; padding: 12px; }
.result h3 { margin: 0 0 8px; font-size: 1rem; }
.metric { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-bottom: 8px; font-size: .9rem; }
progress { width: 100%; height: 8px; grid-column: 1 / -1; accent-color: var(--purple); }
.comments li { margin-bottom: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  main { margin-top: 10px; }
  .brand { min-height: 100px; padding: 10px 15px; }
  .card, .intro { padding-inline: 14px; }
  .hint, .card > .choice, #attribution { margin-left: 0; }
  .matrix-head { display: none; }
  .matrix-row { display: block; background: #f4e8f1; margin-bottom: 7px; padding: 4px 8px; border-radius: 8px; }
  .matrix-row .choice { justify-content: flex-start; }
  .matrix-row .choice span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
}

/* Feedback dashboard */
.dashboard-hero { background: linear-gradient(125deg, #fff, #f4e8f1); }
.dashboard-hero .button { margin-top: 6px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr)); margin-top: 12px; }
.stat { padding: 14px; border-top: 3px solid var(--purple); }
.stat strong { display: block; color: var(--purple-dark); font-size: 2rem; line-height: 1.1; margin-bottom: 6px; }
.stat p { font-size: .88rem; color: #654b60; margin: 0; }
.empty-results { color: #654b60; }
.chart-dot { display: block; width: .75rem; height: .75rem; border-radius: 50%; background: var(--chart-color); }
.tone-0 { --chart-color: #753969; }
.tone-1 { --chart-color: #12837e; }
.tone-2 { --chart-color: #a95989; }
.tone-3 { --chart-color: #bb653c; }
.chart-legend { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.chart-legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: .88rem; }
.learning-chart { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.learning-row { padding: 12px; border: 1px solid var(--border); border-radius: 9px; }
.learning-row h3 { margin: 0 0 7px; font-size: 1rem; }
.stack { display: block; width: 100%; height: 14px; background: #e9dce6; border-radius: 7px; }
.stack rect { fill: var(--chart-color); }
.ring-card { display: flex; flex-direction: column; }
.ring { width: 110px; height: 110px; align-self: center; margin: auto 0 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--chart-color); stroke-width: 16; }
.ring .ring-track { stroke: #e9dce6; }
