:root {
  --navy-950: #0b1f46;
  --navy-900: #112a5b;
  --navy-800: #17366f;
  --blue-700: #134fc0;
  --blue-600: #155eef;
  --blue-500: #2a6df5;
  --blue-100: #eaf1ff;
  --blue-50: #f5f8ff;
  --green-700: #087a48;
  --green-600: #0d9255;
  --green-100: #ddf5e8;
  --green-50: #f2fbf6;
  --amber-700: #8a4b00;
  --amber-100: #fff0d5;
  --amber-50: #fff9ee;
  --red-700: #a13a3a;
  --red-50: #fff4f3;
  --ink: #17233e;
  --text: #263755;
  --muted: #687690;
  --line-strong: #bac7dc;
  --line: #d8e0ec;
  --line-soft: #e8edf5;
  --surface: #ffffff;
  --surface-subtle: #f8fafd;
  --surface-blue: #f3f7ff;
  --page: #f4f6fa;
  --sidebar-width: 220px;
  --header-height: 64px;
  --footer-height: 50px;
  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-focus: 0 0 0 3px rgb(21 94 239 / 14%);
  --font-sans: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--page);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--page);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
fieldset {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  color: var(--navy-950);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--small {
  width: 17px;
  height: 17px;
}

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

.sr-only,
.scenario-control {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--navy-950);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--header-height) 1fr var(--footer-height);
  background: var(--surface);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  padding: 0 28px 0 24px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
}

.brand,
.brand-copy,
.header-status,
.status-item {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 42px;
  place-items: center;
  color: var(--navy-900);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: var(--navy-900);
}

.brand-mark svg path + path {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
}

.brand-copy {
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 19px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.header-status {
  gap: 16px;
  flex: 0 0 auto;
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 650;
}

.status-item {
  gap: 7px;
}

.status-dot,
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-100);
}

.status-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.demo-label,
.source-type,
.duration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--navy-900);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 12px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface-subtle);
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--navy-800);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-item::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -13px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: var(--blue-600);
  content: "";
  opacity: 0;
}

.nav-item:hover {
  border-color: var(--line);
  background: #fff;
}

.nav-item:focus-visible,
.button:focus-visible,
.scenario-option:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.app-shell:not(:has(.screen:target, .question-panel:target)) .nav-item--home,
.app-shell:has(#screen-home:target) .nav-item--home,
.app-shell:has(#screen-learn:target) .nav-item--learn,
.app-shell:has(#screen-consult:target) .nav-item--consult,
.app-shell:has(#screen-quiz:target) .nav-item--quiz,
.app-shell:has(.screen--quiz .question-panel:target) .nav-item--quiz {
  color: var(--blue-700);
  border-color: #dce7ff;
  background: var(--blue-100);
}

.app-shell:not(:has(.screen:target, .question-panel:target)) .nav-item--home::before,
.app-shell:has(#screen-home:target) .nav-item--home::before,
.app-shell:has(#screen-learn:target) .nav-item--learn::before,
.app-shell:has(#screen-consult:target) .nav-item--consult::before,
.app-shell:has(#screen-quiz:target) .nav-item--quiz::before,
.app-shell:has(.screen--quiz .question-panel:target) .nav-item--quiz::before {
  opacity: 1;
}

.sidebar-guide {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  line-height: 1.55;
}

.guide-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--navy-800);
}

.sidebar-guide p {
  margin-bottom: 12px;
}

.sidebar-guide dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.sidebar-guide dl > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

.sidebar-guide dd {
  margin: 0;
  color: var(--navy-900);
  font-weight: 700;
}

.main-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.screen {
  display: none;
  min-height: 100%;
  padding: 28px clamp(24px, 2.7vw, 42px) 34px;
  animation: screen-in 220ms ease both;
}

.screen--home,
.screen:target,
.screen--quiz:has(.question-panel:target) {
  display: block;
}

.main-content:has(.screen:target, .question-panel:target) .screen--home:not(:target) {
  display: none;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 26px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--surface-blue);
  font-size: 10px;
}

.app-footer p {
  margin: 0;
}

.context-line,
.section-label,
.panel-number,
.question-type,
.duty-phase,
.lesson-kicker,
.bubble-source {
  margin-bottom: 6px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 43px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: #fff;
  border-color: var(--blue-700);
  background: var(--blue-600);
  box-shadow: 0 4px 12px rgb(21 94 239 / 16%);
}

.button--primary:hover {
  background: var(--blue-700);
}

.button--secondary {
  color: var(--blue-700);
  border-color: var(--blue-500);
  background: #fff;
}

.button--secondary:hover {
  background: var(--blue-50);
}

.button--large {
  min-height: 50px;
  padding: 0 22px;
  font-size: 14px;
}

.button--small {
  min-height: 38px;
  padding: 0 13px;
  font-size: 11px;
}

.button--full {
  width: 100%;
}

.button--disabled {
  color: #8b96a9;
  border-color: var(--line);
  background: #edf1f6;
  cursor: not-allowed;
}

.button--disabled:hover {
  transform: none;
}

/* Home */
.screen--home {
  background:
    linear-gradient(90deg, transparent 0 49.95%, var(--line-soft) 49.95% 50.05%, transparent 50.05%) top 30px center / 100% 490px no-repeat,
    #fff;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.05fr);
  gap: clamp(42px, 6vw, 92px);
  max-width: 1240px;
  margin: 30px auto 42px;
  padding: 26px 0 20px;
}

.home-intro {
  align-self: center;
  max-width: 560px;
}

.home-intro h1 {
  max-width: 540px;
  margin-bottom: 22px;
  font-size: clamp(32px, 3.25vw, 49px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.home-lead {
  max-width: 540px;
  margin-bottom: 27px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 19px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.home-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.journey-panel {
  align-self: stretch;
  padding: 25px 27px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #fff;
}

.panel-heading,
.workspace-title,
.screen-heading,
.quiz-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.panel-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.workspace-title h2 {
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.4;
}

.duration {
  color: var(--blue-700);
  border-color: #cddcff;
  background: var(--blue-50);
}

.journey-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.step-index,
.lesson-steps > li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue-600);
  font-size: 12px;
  font-weight: 850;
}

.journey-step strong {
  font-size: 14px;
}

.journey-step p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.step-time {
  padding-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.journey-note {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid #cedcff;
  border-radius: var(--radius-sm);
  color: var(--blue-700);
  background: var(--blue-50);
}

.journey-note p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
}

.source-foundation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.source-foundation__copy {
  display: flex;
  align-items: center;
  gap: 16px;
}

.source-foundation__copy > .icon {
  color: var(--blue-700);
}

.source-foundation h2 {
  margin-bottom: 2px;
  font-size: 15px;
}

.source-foundation p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Shared screen heading */
.screen-heading {
  max-width: 1320px;
  margin: 0 auto 22px;
}

.screen-heading h1,
.quiz-heading h1 {
  margin-bottom: 6px;
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.screen-heading p:not(.context-line),
.quiz-heading p:not(.context-line) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.progress-block {
  flex: 0 0 210px;
  padding-top: 7px;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.progress-label strong {
  font-size: 16px;
}

.progress-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 20px;
  background: #e3e8f1;
}

.progress-track > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--blue-600);
}

/* Learn */
.learn-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(390px, 1.25fr) minmax(315px, 0.95fr);
  gap: 14px;
  max-width: 1320px;
  margin: 0 auto;
}

.duty-map,
.lesson-panel,
.assistant-panel,
.scenario-nav,
.conversation-panel,
.source-panel,
.learning-log {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.duty-map,
.lesson-panel,
.assistant-panel {
  min-height: 562px;
}

.duty-map {
  padding: 20px 18px;
}

.workspace-title {
  display: block;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.duty-flow {
  position: relative;
  display: grid;
  gap: 6px;
}

.duty-flow::before {
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 20px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.duty-node {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 86px;
  padding: 10px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.duty-node--active {
  border-color: #d9e5ff;
  background: var(--blue-50);
}

.duty-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--navy-800);
  background: #fff;
}

.duty-node--active .duty-icon {
  color: #fff;
  border-color: var(--blue-600);
  background: var(--blue-600);
}

.duty-node strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.duty-node p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.duty-phase {
  display: block;
  margin-bottom: 2px;
  color: var(--blue-700);
  font-size: 9px;
}

.map-caption {
  display: flex;
  gap: 7px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.map-caption p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.lesson-panel {
  padding: 24px 24px 20px;
}

.lesson-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 23px;
  border-radius: 5px;
  color: #fff;
  background: var(--blue-600);
  font-size: 10px;
}

.lesson-panel h2 {
  margin-bottom: 11px;
  font-size: 24px;
  line-height: 1.35;
}

.lesson-lead {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.8;
}

.distinction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 21px;
}

.distinction {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.distinction > span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-700);
  font-size: 9px;
  font-weight: 800;
}

.distinction strong {
  display: block;
  font-size: 11px;
}

.distinction p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.distinction--official {
  border-color: #cfdcff;
  background: var(--blue-50);
}

.distinction--general {
  border-color: #d8e9e1;
  background: var(--green-50);
}

.distinction--general > span {
  color: var(--green-700);
}

.lesson-panel h3 {
  margin-bottom: 10px;
  font-size: 13px;
}

.lesson-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.lesson-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.lesson-steps li:not(:last-child) {
  position: relative;
}

.lesson-steps li:not(:last-child)::after {
  position: absolute;
  top: 30px;
  bottom: -10px;
  left: 14px;
  width: 1px;
  background: #cbd7ed;
  content: "";
}

.lesson-steps strong {
  font-size: 11px;
}

.lesson-steps p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.lesson-caution {
  display: flex;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #d5dfed;
  border-radius: 7px;
  color: var(--blue-700);
  background: var(--surface-blue);
}

.lesson-caution p {
  margin: 0;
  color: var(--text);
  font-size: 9px;
  line-height: 1.65;
}

.assistant-panel {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface-subtle);
}

.assistant-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.assistant-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #c8d8ff;
  border-radius: 8px;
  color: var(--blue-700);
  background: var(--blue-50);
}

.assistant-heading h2 {
  margin-bottom: 1px;
  font-size: 15px;
}

.assistant-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.chat-bubble {
  padding: 13px 14px;
  border: 1px solid #cfdbef;
  border-radius: 8px;
  background: #fff;
}

.chat-bubble p {
  margin: 0;
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.65;
}

.bubble-source {
  display: block;
  margin-bottom: 5px;
  font-size: 9px;
}

.answer-group {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding: 0;
  border: 0;
}

.answer-group input,
.quiz-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.answer-group label {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 8px 10px 8px 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.answer-group label::before {
  position: absolute;
  left: 11px;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  content: "";
}

.answer-group input:focus-visible + label,
.quiz-options input:focus-visible + label {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.answer-group input:checked + label {
  color: var(--blue-700);
  border-color: var(--blue-500);
  background: var(--blue-50);
}

.answer-group input:checked + label::before {
  border: 4px solid var(--blue-600);
}

.selection-response {
  display: none;
  margin-top: 3px;
  padding: 9px 10px;
  border-left: 3px solid var(--green-600);
  color: var(--text);
  background: var(--green-50);
  font-size: 9px;
}

#interest-training:checked ~ .selection-response--training,
#interest-unknown:checked ~ .selection-response--unknown,
#interest-new:checked ~ .selection-response--default,
#interest-support:checked ~ .selection-response--default,
#interest-overview:checked ~ .selection-response--default {
  display: block;
}

.privacy-note {
  display: flex;
  gap: 6px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.evidence-strip {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 1320px;
  margin: 14px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.evidence-strip__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.evidence-strip__title > .icon {
  color: var(--blue-700);
}

.evidence-strip h2 {
  margin: 0;
  font-size: 13px;
}

.evidence-item {
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.evidence-item strong,
.evidence-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-item strong {
  font-size: 10px;
}

.evidence-item span {
  color: var(--muted);
  font-size: 9px;
}

/* Consult */
.consult-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.62fr) minmax(480px, 1.45fr) minmax(260px, 0.78fr);
  gap: 14px;
  max-width: 1320px;
  margin: 0 auto;
}

.scenario-nav,
.conversation-panel,
.source-panel {
  min-height: 638px;
}

.scenario-nav,
.source-panel {
  padding: 20px 18px;
}

.scenario-options {
  display: grid;
  gap: 7px;
}

.scenario-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  min-height: 62px;
  padding: 9px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--navy-800);
  cursor: pointer;
}

.scenario-option:hover {
  border-color: var(--line);
  background: var(--surface-subtle);
}

.scenario-option strong,
.scenario-option small {
  display: block;
}

.scenario-option strong {
  font-size: 11px;
}

.scenario-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.scenario-arrow {
  color: var(--muted);
}

#scenario-training:checked ~ .scenario-nav .scenario-option--training,
#scenario-recruit:checked ~ .scenario-nav .scenario-option--recruit,
#scenario-work:checked ~ .scenario-nav .scenario-option--work {
  color: var(--blue-700);
  border-color: #d7e3ff;
  background: var(--blue-50);
}

#scenario-training:focus-visible ~ .scenario-nav .scenario-option--training,
#scenario-recruit:focus-visible ~ .scenario-nav .scenario-option--recruit,
#scenario-work:focus-visible ~ .scenario-nav .scenario-option--work {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

.scenario-tip {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-subtle);
}

.scenario-tip p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.conversation-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-subtle);
}

.conversation-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.conversation-topbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.conversation-topbar strong {
  font-size: 13px;
}

.conversation-topbar > span {
  color: var(--muted);
  font-size: 9px;
}

.scenario-content {
  display: none;
  flex: 1;
  padding: 21px;
}

#scenario-training:checked ~ .conversation-panel .scenario-content--training,
#scenario-recruit:checked ~ .conversation-panel .scenario-content--recruit,
#scenario-work:checked ~ .conversation-panel .scenario-content--work {
  display: block;
}

.message {
  max-width: 90%;
}

.message > span,
.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.message > p,
.message--assistant > p {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
  line-height: 1.75;
}

.message--user {
  margin-left: auto;
}

.message--user > p {
  border-color: #d9e5ff;
  background: var(--blue-100);
}

.message--assistant {
  max-width: 96%;
  margin-top: 18px;
}

.source-type {
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 8px;
}

.source-type--general {
  color: var(--green-700);
  border-color: #b9dfca;
  background: var(--green-50);
}

.source-type--official {
  color: var(--blue-700);
  border-color: #c8d7fb;
  background: var(--blue-50);
}

.source-type--unknown {
  color: var(--amber-700);
  border-color: #edcb98;
  background: var(--amber-50);
}

.answer-outline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.answer-outline > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.answer-outline span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue-600);
  font-size: 8px;
  font-weight: 850;
}

.answer-outline p {
  margin: 0;
  font-size: 8px;
  line-height: 1.4;
}

.reverse-question {
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid #cfdcff;
  border-radius: 8px;
  background: var(--surface-blue);
}

.reverse-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--blue-700);
  font-size: 9px;
  font-weight: 800;
}

.reverse-question > strong {
  display: block;
  font-size: 11px;
  line-height: 1.55;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.quick-reply-control {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.quick-replies label {
  padding: 6px 9px;
  border: 1px solid var(--blue-500);
  border-radius: 6px;
  color: var(--blue-700);
  background: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
}

.quick-reply-control:checked + label {
  color: #fff;
  border-color: var(--blue-700);
  background: var(--blue-600);
}

.quick-reply-control:focus-visible + label {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

.reply-followup {
  display: none;
  flex: 1 0 100%;
  padding: 9px 10px;
  border-left: 3px solid var(--green-600);
  border-radius: 4px;
  background: var(--green-50);
}

.reply-followup span,
.reply-followup strong {
  display: block;
}

.reply-followup span {
  color: var(--green-700);
  font-size: 7px;
  font-weight: 800;
}

.reply-followup strong {
  margin-top: 2px;
  font-size: 8px;
  line-height: 1.55;
}

.quick-reply-control:checked ~ .reply-followup {
  display: block;
}

.limit-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--amber-700);
  background: var(--amber-50);
}

.limit-note strong {
  color: var(--amber-700);
  font-size: 9px;
}

.limit-note p {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 9px;
}

.limit-note--strong {
  border: 1px solid #efd2a7;
  border-left-width: 3px;
  border-radius: 6px;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer-placeholder {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: #8a96a9;
  background: var(--surface-subtle);
  font-size: 9px;
}

.source-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.source-card + .source-card {
  margin-top: 9px;
}

.source-card--official {
  border-color: #cfdbf6;
  background: var(--blue-50);
}

.source-card__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--blue-700);
  font-size: 8px;
  font-weight: 800;
}

.source-card__head .icon {
  width: 18px;
  height: 18px;
}

.source-card strong,
.source-card p,
.source-card small {
  display: block;
}

.source-card strong {
  font-size: 10px;
  line-height: 1.5;
}

.source-card p {
  margin: 3px 0;
  color: var(--text);
  font-size: 9px;
}

.source-card small {
  color: var(--muted);
  font-size: 8px;
}

.source-card a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--blue-700);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.source-card a:hover {
  text-decoration: underline;
}

.source-card--sample .source-card__head {
  color: var(--green-700);
}

.source-policy {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  padding: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--blue-700);
}

.source-policy strong {
  display: block;
  font-size: 9px;
}

.source-policy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
}

/* Quiz */
.screen--quiz {
  padding: 0;
}

.quiz-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 100%;
}

.quiz-main {
  min-width: 0;
  padding: 28px clamp(28px, 4vw, 64px) 34px;
}

.quiz-heading {
  max-width: 920px;
  margin: 0 auto 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.quiz-progress {
  flex: 0 0 180px;
  padding-top: 11px;
  color: var(--navy-900);
  text-align: right;
}

.quiz-progress__step {
  display: none;
  margin-bottom: 9px;
  font-size: 12px;
}

.quiz-progress__step strong {
  color: var(--blue-700);
  font-size: 20px;
}

.quiz-progress__step--1,
.screen--quiz:has(#question-2:target) .quiz-progress__step--2,
.screen--quiz:has(#question-3:target) .quiz-progress__step--3 {
  display: block;
}

.screen--quiz:has(#question-2:target) .quiz-progress__step--1,
.screen--quiz:has(#question-3:target) .quiz-progress__step--1,
.screen--quiz:has(#question-2:target) .quiz-progress__step--3,
.screen--quiz:has(#question-3:target) .quiz-progress__step--2 {
  display: none;
}

.quiz-bar {
  display: none;
}

.quiz-bar--1,
.screen--quiz:has(#question-2:target) .quiz-bar--2,
.screen--quiz:has(#question-3:target) .quiz-bar--3 {
  display: block;
}

.screen--quiz:has(#question-2:target) .quiz-bar--1,
.screen--quiz:has(#question-3:target) .quiz-bar--1,
.screen--quiz:has(#question-2:target) .quiz-bar--3,
.screen--quiz:has(#question-3:target) .quiz-bar--2 {
  display: none;
}

.quiz-bar--1 {
  width: 33.333%;
}

.quiz-bar--2 {
  width: 66.666%;
}

.quiz-bar--3 {
  width: 100%;
}

.question-panel {
  display: none;
  max-width: 920px;
  margin: 0 auto;
  animation: screen-in 180ms ease both;
}

.question-panel--1,
.question-panel:target {
  display: block;
}

.screen--quiz:has(.question-panel:target) .question-panel--1:not(:target) {
  display: none;
}

.question-panel > h2 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
}

.question-panel > h2 > span {
  color: var(--blue-700);
  font-size: 25px;
  line-height: 1.3;
}

.quiz-options {
  display: grid;
  gap: 9px;
  padding: 0;
  border: 0;
}

.quiz-options > label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 54px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--navy-900);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  transition: border 120ms ease, background 120ms ease;
}

.quiz-options > label:hover {
  border-color: var(--blue-500);
  background: var(--blue-50);
}

.radio-mark {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border: 1.5px solid #9cabc0;
  border-radius: 50%;
  background: #fff;
}

.quiz-options input:checked + label {
  color: var(--blue-700);
  border-color: var(--blue-600);
  background: var(--blue-50);
}

.quiz-options input:checked + label .radio-mark {
  border: 5px solid var(--blue-600);
}

.quiz-feedback {
  display: none;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
  gap: 20px;
  margin-top: 3px;
  padding: 20px;
  border: 1px solid #cce7d9;
  border-radius: 9px;
  background: var(--green-50);
}

.feedback-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.feedback-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green-600);
  font-size: 17px;
  font-weight: 850;
}

.feedback-title small,
.feedback-title strong {
  display: block;
}

.feedback-title small {
  color: var(--green-700);
  font-size: 8px;
  font-weight: 800;
}

.feedback-title strong {
  margin-top: 2px;
  color: var(--green-700);
  font-size: 14px;
  line-height: 1.45;
}

.feedback-copy > p {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 10px;
  line-height: 1.7;
}

.feedback-source {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #d6e0ec;
  border-radius: 7px;
  background: #fff;
}

.feedback-source > .icon {
  color: var(--blue-700);
}

.feedback-source > div {
  min-width: 0;
  flex: 1;
}

.feedback-source span,
.feedback-source strong {
  display: block;
}

.feedback-source > div > span {
  color: var(--muted);
  font-size: 8px;
}

.feedback-source strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.quiz-feedback--review {
  border-color: #efd2a7;
  background: var(--amber-50);
}

.feedback-title--review .feedback-icon {
  background: var(--amber-700);
}

.feedback-title--review small,
.feedback-title--review strong {
  color: var(--amber-700);
}

#q1-c:checked ~ .quiz-feedback--correct,
#q2-b:checked ~ .quiz-feedback--correct,
#q3-c:checked ~ .quiz-feedback--correct,
#q1-a:checked ~ .quiz-feedback--review,
#q1-b:checked ~ .quiz-feedback--review,
#q1-d:checked ~ .quiz-feedback--review,
#q2-a:checked ~ .quiz-feedback--review,
#q2-c:checked ~ .quiz-feedback--review,
#q2-d:checked ~ .quiz-feedback--review,
#q3-a:checked ~ .quiz-feedback--review,
#q3-b:checked ~ .quiz-feedback--review {
  display: grid;
}

.completion-summary {
  display: grid;
  grid-template-columns: 0.75fr 0.75fr 1.5fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #cce2d6;
  border-radius: 7px;
  background: #cce2d6;
}

.completion-summary > div {
  padding: 8px 9px;
  background: #fff;
}

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

.completion-summary span {
  color: var(--muted);
  font-size: 7px;
}

.completion-summary strong {
  margin-top: 2px;
  color: var(--green-700);
  font-size: 10px;
}

.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.question-actions .button--next {
  display: none;
}

.question-panel--1:has(#q1-c:checked) .question-actions .button--next,
.question-panel--2:has(#q2-b:checked) .question-actions .button--next,
.question-panel--3:has(#q3-c:checked) .question-actions .button--next {
  display: inline-flex;
}

.question-panel--1:has(#q1-c:checked) .question-actions .button--locked,
.question-panel--2:has(#q2-b:checked) .question-actions .button--locked,
.question-panel--3:has(#q3-c:checked) .question-actions .button--locked {
  display: none;
}

.button--locked {
  pointer-events: none;
  opacity: 0.42;
  box-shadow: none;
  cursor: not-allowed;
}

.learning-log {
  padding: 28px 22px;
  border-width: 0 0 0 1px;
  border-radius: 0;
  background: var(--surface-subtle);
}

.learning-log h2 {
  margin-bottom: 23px;
  font-size: 17px;
}

.log-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.log-item {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.log-item:not(:last-child)::after {
  position: absolute;
  top: 37px;
  bottom: -10px;
  left: 21px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.log-item > span {
  display: grid;
  width: 24px;
  height: 24px;
  z-index: 1;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: #fff;
  font-size: 9px;
  font-weight: 850;
}

.log-item strong,
.log-item small {
  display: block;
}

.log-item strong {
  font-size: 10px;
}

.log-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.log-item--done > span {
  color: #fff;
  border-color: var(--green-600);
  background: var(--green-600);
}

.log-item--active {
  border-color: #d6e2ff;
  background: var(--blue-50);
}

.log-item--active > span {
  color: #fff;
  border-color: var(--blue-600);
  background: var(--blue-600);
}

.log-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.source-reminder {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--blue-700);
}

.source-reminder strong {
  display: block;
  font-size: 10px;
}

.source-reminder p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.human-check {
  display: flex;
  gap: 8px;
  padding: 11px;
  border: 1px solid #cbd9f4;
  border-radius: 7px;
  color: var(--blue-700);
  background: var(--blue-50);
}

.human-check p {
  margin: 0;
  color: var(--text);
  font-size: 8px;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 188px;
  }

  .learn-workspace,
  .consult-workspace {
    grid-template-columns: minmax(200px, 0.7fr) minmax(400px, 1.3fr);
  }

  .assistant-panel,
  .source-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .assistant-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr);
    gap: 14px;
  }

  .assistant-heading,
  .privacy-note {
    grid-column: 1 / -1;
  }

  .assistant-panel > .button {
    align-self: end;
  }

  .source-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .source-panel > .workspace-title,
  .source-panel > .source-policy,
  .source-panel > .button {
    grid-column: 1 / -1;
  }

  .source-card + .source-card {
    margin-top: 0;
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: auto;
    --footer-height: auto;
  }

  .app-shell {
    grid-template-rows: auto 1fr auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 15px 18px;
  }

  .header-status {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .status-divider {
    display: none;
  }

  .app-body {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
  }

  .sidebar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    padding: 7px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .main-nav {
    display: flex;
    width: max-content;
    min-width: 610px;
  }

  .nav-item {
    min-width: 145px;
    min-height: 44px;
    justify-content: center;
  }

  .nav-item::before {
    top: auto;
    right: 12px;
    bottom: -8px;
    left: 12px;
    width: auto;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }

  .sidebar-guide {
    display: none;
  }

  .main-content {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    overflow: visible;
  }

  .screen {
    padding: 24px 18px 30px;
  }

  .home-layout,
  .learn-workspace,
  .consult-workspace,
  .quiz-workspace {
    grid-template-columns: 1fr;
  }

  .screen--home {
    background: #fff;
  }

  .home-layout {
    gap: 28px;
    margin-top: 0;
  }

  .screen-heading,
  .quiz-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-block,
  .quiz-progress {
    width: 100%;
    flex-basis: auto;
  }

  .quiz-progress {
    text-align: left;
  }

  .evidence-strip {
    grid-template-columns: 1fr 1fr;
  }

  .evidence-strip__title {
    grid-column: 1 / -1;
  }

  .evidence-strip .button {
    justify-self: start;
  }

  .assistant-panel {
    display: flex;
  }

  .scenario-nav,
  .conversation-panel,
  .source-panel {
    min-height: auto;
  }

  .source-panel {
    display: grid;
  }

  .quiz-main {
    padding: 26px 18px;
  }

  .learning-log {
    border-width: 1px 0 0;
  }

  .quiz-feedback {
    grid-template-columns: 1fr;
  }

  .app-footer {
    align-items: flex-start;
    padding: 12px 18px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy small,
  .status-item:first-child {
    display: none;
  }

  .screen {
    padding-inline: 14px;
  }

  .home-intro h1 {
    font-size: 32px;
  }

  .home-actions,
  .home-actions .button,
  .source-foundation,
  .question-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .home-meta {
    display: grid;
  }

  .journey-panel {
    padding: 20px 16px;
  }

  .journey-step {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .step-time {
    display: none;
  }

  .source-foundation {
    align-items: flex-start;
  }

  .distinction-grid,
  .evidence-strip,
  .source-panel,
  .completion-summary {
    grid-template-columns: 1fr;
  }

  .evidence-item {
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .answer-outline {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }

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

  .question-panel > h2 {
    grid-template-columns: 1fr;
  }

  .question-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
