:host {
  display: block;
  min-width: 0;
  scroll-margin-block-start: calc(var(--wp-admin--admin-bar--height, 0px) + 16px);
  color-scheme: light;
  --paper: #f5f6f1;
  --white: #fff;
  --ink: #202c2a;
  --muted: #4c5d58;
  --border: #d8e0d9;
  --forest: #174c40;
  --forest-dark: #103b32;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Focus indicators belong to controls inside the widget. */
:host(:focus) { outline: none !important; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.quiz-container {
  container: ta-quiz / inline-size;
}

.quiz-surface {
  border: 1px solid var(--border);
  border-radius: 16px;
  min-width: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 var(--sans);
  letter-spacing: normal;
  text-align: start;
  text-transform: none;
}

h2, h3, h4, p { margin: 0; }
button, input { font: inherit; }
a { color: var(--forest); text-underline-offset: 0.22em; }

:focus-visible {
  outline: 3px solid #866020;
  outline-offset: 4px;
}

h2:focus, legend:focus { outline: none; }

.shell {
  width: min(100% - 48px, 1152px);
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--border); }

.header-inner {
  display: flex;
  min-height: 68px;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--forest-dark);
  font-weight: 720;
  font-size: 16px;
}

.brand-mark {
  width: 30.4px;
  height: 30.4px;
  padding: 4px;
  border-radius: 8.96px;
  background: var(--forest);
  display: flex;
  gap: 2px;
  align-items: end;
  justify-content: center;
}

.brand-mark i { width: 4px; border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 10.56px; background: #ebc09e; }
.brand-mark i:nth-child(2) { height: 16.32px; background: #b7e2d1; }
.brand-mark i:nth-child(3) { height: 13.12px; background: #dfcfee; }

.header-context { color: var(--muted); font-size: 14px; }

.hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: center;
  gap: clamp(24px, 5cqw, 76px);
  padding-block: clamp(33.6px, 6cqw, 74.4px) clamp(33.6px, 5cqw, 62.4px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11.2px;
  border: 1px solid #cedfd5;
  border-radius: 160px;
  background: #e9f2eb;
  color: var(--forest-dark);
  font-size: 14px;
  font-weight: 650;
}

.tag > span {
  width: 7.2px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #397763;
}

h2 {
  margin-block: 12.8px 18.4px;
  font: 400 clamp(43px, 6.1cqw, 80px)/0.99 var(--serif);
  letter-spacing: -0.07em;
}

h2 em { color: var(--forest); font-weight: 400; }
h3 { font: 400 clamp(26.4px, 2.3cqw, 32px)/1.15 var(--serif); letter-spacing: -0.035em; }
h4 { font-size: 18px; font-weight: 710; line-height: 1.3; }

.lead {
  max-width: 544px;
  color: var(--muted);
  font-size: clamp(16px, 1.55cqw, 18px);
  line-height: 1.6;
}

.hero-actions, .result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14.4px 18.4px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 50.4px;
  justify-content: center;
  align-items: center;
  padding: 11.2px 21.6px;
  border: 1px solid transparent;
  border-radius: 9.92px;
  cursor: pointer;
  font-weight: 680;
  text-align: center;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button-primary { background: var(--forest); color: var(--white); }
.button-primary:hover { background: var(--forest-dark); }
.button-outline { background: transparent; color: var(--forest-dark); border-color: #acbeb4; }
.button-outline:hover { background: #e8f2eb; border-color: var(--forest); }
.button:disabled { background: #e6ebe6; color: #52645b; cursor: default; }
.test-meta { color: var(--muted); font-size: 14px; }
.test-meta span { margin-inline: 2.4px; }

.hero-art {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 356px;
  container-type: inline-size;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(ellipse at 40% 43%, #285e50 0%, #194b41 53%, #123b34 100%);
}

.art-orbit, .art-axis, .art-spark { position: absolute; }
.art-orbit { border: 1px solid #c2dece30; width: 64%; aspect-ratio: 1; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.art-orbit-outer { width: 81%; }
.art-axis { background: #c2dece24; }
.art-axis-horizontal { top: 50%; left: 8%; right: 8%; height: 1px; }
.art-axis-vertical { left: 50%; top: 9%; bottom: 9%; width: 1px; }
.art-spark { width: 7.2px; aspect-ratio: 1; border-radius: 50%; background: #c4dfc8; }
.art-spark-one { top: 22%; right: 19%; }
.art-spark-two { bottom: 18%; left: 21%; width: 4.48px; background: #eac4ac; }

.disc {
  position: absolute;
  display: grid;
  place-items: center;
  width: 31%;
  aspect-ratio: 1;
  isolation: isolate;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 9.6px 22.4px #0b2e2a43, inset 0 0 0 1px #ffffff57;
  font: 400 clamp(32px, 15cqw, 75.2px)/1 var(--serif);
  letter-spacing: -0.085em;
}

.disc > span { position: relative; margin-inline-end: 0.07em; }
.disc-pattern { position: absolute; inset: 0; pointer-events: none; }

.disc-parent {
  left: 39%;
  top: 34%;
  color: #5d3220;
  background: radial-gradient(at 28% 23%, #f9d7b9, #dda986);
}

.disc-parent .disc-pattern {
  background: repeating-linear-gradient(137deg, transparent 0 8px, #71431e20 9px 10px);
  mask-image: linear-gradient(138deg, black, transparent 55%);
}

.disc-adult {
  left: 61%;
  top: 47%;
  z-index: 1;
  color: #124739;
  background: radial-gradient(at 32% 23%, #c8ead4, #87c6b0);
}

.disc-adult .disc-pattern {
  background-image: linear-gradient(#17584722 1px, transparent 1px), linear-gradient(90deg, #17584722 1px, transparent 1px);
  background-size: 11px 11px;
  mask-image: linear-gradient(228deg, black, transparent 56%);
}

.disc-child {
  left: 42%;
  top: 68%;
  z-index: 2;
  color: #4a3764;
  background: radial-gradient(at 28% 25%, #efdbf6, #c7b2df);
}

.disc-child .disc-pattern {
  background: radial-gradient(circle, #62427742 1px, transparent 1.5px) 0 0 / 8px 8px;
  mask-image: linear-gradient(35deg, black, transparent 54%);
}

.overview { margin-block-end: 23.2px; }
.overview h3 { margin-bottom: 16px; }

.state-grid, .result-grid { display: grid; gap: 14.4px; }
.state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.state-card, .panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14.4px;
}

.state-card { padding: 17.6px 18.4px; }
.state-card p { margin-top: 5.6px; color: var(--muted); }

.parent { --state-ink: #783e24; --state-pale: #f7e5d7; --state-bar: #a65e3d; }
.adult { --state-ink: #175644; --state-pale: #dcf0e6; --state-bar: #38836d; }
.child { --state-ink: #583c78; --state-pale: #eee4f5; --state-bar: #8b65a9; }

.state-icon {
  position: relative;
  display: grid;
  width: 32px;
  aspect-ratio: 1;
  margin-bottom: 11.2px;
  place-items: center;
  border-radius: 8px;
  background: var(--state-pale);
  color: var(--state-ink);
}

.state-icon::before, .state-icon::after { content: ""; position: absolute; }
.icon-rules::before { width: 11.2px; height: 13.12px; border: 1.5px solid currentColor; border-radius: 2px; }
.icon-rules::after { width: 5.6px; height: 1px; background: currentColor; box-shadow: 0 3px currentColor; top: 42%; }
.icon-facts::before { width: 13.12px; height: 13.12px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-facts::after { width: 5.76px; height: 5.76px; border-radius: 50%; background: currentColor; }
.icon-feeling::before { width: 14.88px; height: 14.88px; background: currentColor; clip-path: polygon(50% 0, 63% 36%, 100% 50%, 63% 64%, 50% 100%, 37% 64%, 0 50%, 37% 36%); }

.notice {
  display: flex;
  align-items: start;
  gap: 11.2px;
  margin-top: 20px;
  padding: 13.6px 16px;
  border: 1px solid #d9e4db;
  border-radius: 11.2px;
  background: #eaf0e9;
  color: #3f534b;
  font-size: 14px;
}

.notice strong { color: #263e35; }
.info-icon {
  display: grid;
  flex: none;
  width: 20px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #658477;
  border-radius: 50%;
  color: #375e50;
  font: 700 13.6px/1 var(--serif);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 17.6px;
  padding: 17.6px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer details { max-width: 672px; }
.site-footer summary { min-height: 32px; cursor: pointer; font-weight: 640; }
.site-footer details p { margin: 7.2px 0; }

.narrow { max-width: 688px; margin-inline: auto; }
.screen { padding-top: clamp(28.8px, 5cqw, 54.4px); }

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6.4px 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.progress-row span:first-child { font-weight: 750; color: var(--forest-dark); }
progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 7.2px;
  margin: 8px 0 15.2px;
  border: 0;
  border-radius: 16px;
  background: #dfe7df;
  color: var(--forest);
}

progress::-webkit-progress-bar { background: #dfe7df; border-radius: 16px; }
progress::-webkit-progress-value { background: var(--forest); border-radius: 16px; }
progress::-moz-progress-bar { background: var(--forest); border-radius: 16px; }

.question-panel { padding: clamp(16px, 4.2cqw, 32px); }
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }

legend {
  display: block;
  padding: 0;
  font: 400 clamp(24.8px, 4.6cqw, 36px)/1.15 var(--serif);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.question-prompt { margin-top: 9.6px; color: var(--muted); }
.answer-list { display: grid; gap: 7.2px; margin-top: 14.4px; }

.answer-option {
  display: flex;
  gap: 11.2px;
  align-items: center;
  min-height: 46.4px;
  padding: 7.2px 12.8px;
  border: 1px solid var(--border);
  border-radius: 8.8px;
  cursor: pointer;
}

.answer-option:hover { background: #f3f7f3; }
.answer-option:has(:checked) { border-color: #3e7a63; background: #e6f2e9; color: var(--forest-dark); font-weight: 650; }
.answer-option:has(:focus-visible) { outline: 3px solid #866020; outline-offset: 2px; }
.answer-option input { width: 17.6px; height: 17.6px; margin: 0; flex: none; accent-color: var(--forest); }
.answer-option input:focus-visible { outline: none; }

.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 11.2px;
  margin-top: 16px;
}

.result-header { padding-bottom: 22.4px; }
.result-header h2 { margin-top: 0; font-size: clamp(48px, 6.5cqw, 72.8px); }
.result-grid { grid-template-columns: 1.2fr 1fr; align-items: stretch; }
.chart, .reading { padding: clamp(17.6px, 3cqw, 26.4px); }
.score-rows { display: grid; gap: 14.4px; margin: 20px 0 6.4px; }
.score-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.score-name { color: var(--state-ink); font-weight: 710; }
.score-number { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.score-track {
  position: relative;
  height: 12px;
  margin-top: 5.6px;
  background: var(--state-pale);
  border-radius: 16px;
  overflow: hidden;
}

.score-fill { display: block; width: var(--score); height: 100%; border-radius: inherit; background: var(--state-bar); }
.chart-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.reading { border-radius: 14.4px; background: var(--forest-dark); color: #fff; }
.reading > p { margin-top: 13.6px; color: #edf6f0; }
.reflection { margin-top: 17.6px; padding-top: 16px; border-top: 1px solid #ffffff41; }
.reflection h4 { color: #d1f1df; font-size: 16px; }
.reflection p { margin-top: 4.8px; color: #edf6f0; }
.result-overview { margin-top: 25.6px; }
.result-actions { margin: 0 0 24px; }

@container ta-quiz (max-width: 880px) {
  .title-break { display: none; }
}

@container ta-quiz (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 59.2px; }
  .hero { grid-template-columns: 1fr; gap: 24.8px; }
  .hero-art { min-height: 0; height: clamp(192px, 56cqw, 288px); }
  .disc { width: min(29%, 136px); font-size: clamp(32px, 12cqw, 56px); }
  .art-orbit { width: min(64%, 304px); }
  .art-orbit-outer { width: min(81%, 368px); }
  .result-grid, .result-overview .state-grid { grid-template-columns: 1fr; }
}

@container ta-quiz (max-width: 560px) {
  h2 { font-size: clamp(40.8px, 10.9cqw, 60.8px); }
  .state-grid { grid-template-columns: 1fr; gap: 8.8px; }
  .state-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10.4px;
    padding: 12.8px 14.4px;
  }
  .state-icon { grid-row: 1 / 3; margin: 0; }
  .state-card p { margin-top: 3.2px; }
  .hero-actions, .result-actions { gap: 10.4px; }
}

@container ta-quiz (max-width: 400px) {
  .header-context { display: none; }
  .question-actions { flex-wrap: wrap; }
  .question-actions .button { padding-inline: 10px; }
}

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