:root {
  --ink: #07324a;
  --muted: #4c6878;
  --line: #c7dfeb;
  --teal: #00aa9e;
  --teal-dark: #007d78;
  --sky: #e8f7ff;
  --lavender: #f8f3ff;
  --lavender-line: #d8c4ff;
  --green: #eafaf2;
  --green-line: #7cd7ad;
  --amber: #fff7df;
  --amber-line: #e4bd51;
  --paper: #fff;
  --page: #edfaff;
  --radius: 8px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 8% 7%, rgba(255,204,105,.27), transparent 26%), radial-gradient(circle at 91% 9%, rgba(21,167,182,.20), transparent 28%), linear-gradient(145deg, #f7fcff 0%, #effafb 53%, #fff8e9 100%); background-attachment: fixed; }
button, input, select, textarea { font: inherit; }
button, .header-actions a { border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); padding: .65rem .9rem; font-weight: 700; cursor: pointer; text-decoration: none; }
button:hover, .header-actions a:hover { border-color: var(--teal); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #55c9ff; outline-offset: 2px; }
button.primary, .action-primary { background: var(--teal); color: #002f35; border-color: var(--teal); }
button[disabled] { opacity: .55; cursor: wait; }

.site-header { min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: .55rem 1rem; background: #fff; border-top: 10px solid #333; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; line-height: 1; display: inline-flex; flex-direction: column; width: max-content; }
.brand span, .eyebrow { color: var(--teal-dark); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.settings { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: center; }
.settings label { display: flex; align-items: center; gap: .45rem; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: .82rem; font-weight: 700; }
.header-actions { justify-self: end; display: flex; gap: .45rem; }
.pilot-notice { max-width: 1120px; margin: .75rem auto; padding: .45rem 1rem; border: 1px solid #0094df; border-radius: 999px; background: #ccefff; text-align: center; font-size: .83rem; font-weight: 700; }

.app-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto 4rem; }
.start-screen, .learning-page, .learning-sidebar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(6, 54, 75, .07); }
.start-screen { max-width: 760px; margin: 1.25rem auto; padding: clamp(1.5rem, 4vw, 3rem); }
h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.05; margin: .35rem 0 .8rem; letter-spacing: 0; }
h2, h3 { letter-spacing: 0; }
.concept-form { margin-top: 2rem; }
.concept-form label { display: block; margin-bottom: .45rem; font-weight: 800; }
.concept-row { display: grid; grid-template-columns: 1fr auto; gap: .65rem; }
.concept-row input { min-width: 0; border: 1px solid #9ac8dc; border-radius: var(--radius); padding: .85rem 1rem; }
.concept-suggestions { margin-top: 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: #f5fcff; }
.concept-suggestions-title { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
.concept-suggestion-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.concept-suggestion-list button { padding: .45rem .65rem; background: #fff; color: var(--teal-dark); font-size: .86rem; }
.concept-suggestion-list button:hover { background: #e5fbf7; }

.journey-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.learning-page { padding: clamp(1.1rem, 3vw, 2rem); }
.learning-sidebar { padding: 1rem; position: sticky; top: 1rem; }
.learning-sidebar > h2 { margin-top: 0; font-size: .78rem; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .08em; }
.screen-instruction { font-size: 1.05rem; line-height: 1.6; color: #244f62; }
.block { margin: 0; padding: 1.35rem 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #fff; line-height: 1.65; }
.block h2, .block h3 { margin: 0 0 .65rem; }
.block p:last-child { margin-bottom: 0; }
.block-bridge, .block-feedback_panel, .block-learning_object { background: transparent; }
.block-real_case, .block-hypothetical_case { margin: 1rem 0; padding: 1.25rem; border: 1px solid var(--amber-line); border-left: 5px solid var(--amber-line); border-radius: var(--radius); background: var(--amber); }
.block-diagnosis_report, .block-path_summary { margin: 1rem 0; padding: 1.25rem; border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--green); }
.block-objectives ul, .criteria { margin: .3rem 0 0; padding-left: 1.25rem; }
.section-grid { display: grid; gap: .7rem; }
.section-grid article { background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 6px; padding: .8rem; }
.worked-steps { counter-reset: step; list-style: none; padding: 0; }
.worked-steps li { margin: .55rem 0; padding-left: 2.2rem; position: relative; }
.worked-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--teal); font-weight: 800; }
.learning-image { width: 100%; max-height: 540px; object-fit: contain; border-radius: 6px; background: #fff; }
.learning-simulation { width: 100%; min-height: 480px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.simulation-link { display: inline-block; margin-top: .7rem; font-weight: 700; }
.interactive-surface-mount { margin-top: .75rem; min-height: 180px; }
.block-interactive_surface { background: var(--sky); border-color: #0d9add; }
.choice-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .8rem; }
.choice-option { text-align: left; min-height: 58px; font-weight: 650; }
.choice-option.selected { border-color: var(--teal); background: #e6fbf8; box-shadow: inset 0 0 0 1px var(--teal); }
.choice-feedback { margin-top: .75rem; padding: .75rem; border-radius: 6px; background: var(--green); border: 1px solid var(--green-line); }
.short-response textarea, .comparison-response { width: 100%; min-height: 120px; margin-top: .7rem; padding: .8rem; border: 1px solid #9ac8dc; border-radius: 6px; resize: vertical; }
.action-row { display: flex; gap: .6rem; flex-wrap: wrap; padding: 1rem; margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.scope-options { display: grid; gap: .55rem; }
.scope-option { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; padding: .75rem; border: 1px solid var(--line); border-radius: 6px; }
.scope-option small { display: block; color: var(--muted); margin-top: .2rem; }
.path-list { display: grid; gap: .5rem; }
.path-item { padding: .7rem; border: 1px solid var(--line); border-radius: 7px; display: grid; grid-template-columns: 1.7rem 1fr; gap: .5rem; }
.path-item strong { display: block; }
.path-item small { color: var(--muted); }
.path-item.active { border-color: var(--teal); background: #edfcf9; }
.path-item.complete, .path-item.secure { border-color: var(--green-line); background: var(--green); }
.path-index { width: 1.55rem; height: 1.55rem; display: grid; place-items: center; border-radius: 50%; background: #edf6fa; font-weight: 800; }
.vocabulary-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.vocabulary-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.vocabulary-heading h2 { margin: 0; color: var(--teal-dark); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.vocabulary-toggle { padding: .35rem .5rem; font-size: .72rem; }
.vocabulary-hint { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.vocabulary-body { display: grid; gap: .4rem; margin-top: .65rem; }
.vocabulary-entry { border: 1px solid var(--line); border-radius: 7px; background: #f8fdff; padding: .55rem .65rem; }
.vocabulary-entry summary { cursor: pointer; font-weight: 800; }
.vocabulary-entry p { margin: .45rem 0 .25rem; font-size: .82rem; line-height: 1.45; }
.vocabulary-entry small { display: block; color: var(--muted); line-height: 1.35; }
.concept-response-workspace { margin-top: .8rem; }
.block-resource_links { background: var(--lavender); border-color: var(--lavender-line); }
.activity-support { margin: .7rem 0; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfe; }
.activity-support > summary { cursor: pointer; padding: .8rem 1rem; color: var(--teal-dark); font-weight: 800; }
.activity-support[open] > summary { border-bottom: 1px solid var(--line); }
.activity-support > .block { padding: 1rem; border-top: 0; }
.resource-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.resource-prompt { margin-top: .75rem; padding: .75rem; border: 1px solid var(--lavender-line); border-radius: 6px; background: #fff; }
.categorization-row { grid-template-columns: minmax(0, 1fr) minmax(170px, .45fr); align-items: center; }
.categorization-row select { width: 100%; padding: .6rem; border: 1px solid #9ac8dc; border-radius: 6px; background: #fff; }
.sequence-jumble-tray { display: flex; flex-wrap: wrap; gap: .55rem; margin: .8rem 0 1rem; padding: .85rem; border: 1px solid var(--amber-line); border-radius: 8px; background: var(--amber); }
.sequence-jumble-tray > strong { flex-basis: 100%; color: var(--teal-dark); }
.sequence-jumble-card { padding: .45rem .65rem; border: 1px solid #d8b654; border-radius: 7px; background: #fff; font-weight: 750; }
.question-number { display: inline-flex; margin: 0 0 .65rem; padding: .25rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: .82rem; font-weight: 800; }
.activity-case-link { margin: 0 0 .8rem; padding: .8rem .9rem; border-left: 5px solid var(--teal); border-radius: 8px; background: #eaf7f5; color: var(--teal-dark); }
.activity-case-link p { margin: .35rem 0 0; line-height: 1.45; }
.activity-case-link .activity-case-action { font-weight: 800; }
.evidence-purpose { margin: -.15rem 0 .8rem; color: var(--teal-dark); font-weight: 800; }
.discovery-up-next { margin: 1rem 0; padding: 1.25rem; border: 2px solid var(--teal); border-radius: var(--radius); background: #f4fffd; }
.check-response { margin-top: .7rem; }
.activity-feedback { margin-top: .8rem; padding: .85rem; border: 1px solid var(--green-line); border-radius: 6px; background: var(--green); }
.activity-feedback p { margin: .35rem 0 0; }
.sample-answer { font-style: italic; }
.transition-error { margin: 1rem 0; padding: 1rem; border: 1px solid var(--amber-line); border-radius: var(--radius); background: var(--amber); }
.loading { display: flex; align-items: center; gap: .7rem; padding: 1rem; }
.loading::before { content: ""; width: 1.1rem; height: 1.1rem; border: 3px solid #b9e5e1; border-top-color: var(--teal-dark); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.debug-panel { margin: 1rem; background: #111; color: #d8ffd9; padding: 1rem; }
.debug-panel pre { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr; }
  .settings, .header-actions { justify-self: stretch; justify-content: center; }
  .journey-layout { grid-template-columns: 1fr; }
  .learning-sidebar { position: static; order: -1; }
  .choice-options { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .app-shell { width: min(100% - 1rem, 1120px); }
  .concept-row { grid-template-columns: 1fr; }
  .settings label { width: 100%; justify-content: space-between; }
  .header-actions { flex-wrap: wrap; }
}
.question-report{display:block;margin:14px 0 0 auto;border:0;background:transparent;color:#365f78;text-decoration:underline;font:700 13px/1.35 inherit;cursor:pointer;padding:5px}.question-report:hover,.question-report:focus-visible{color:#8a3f18;background:#fff4e8;border-radius:7px}
