:root {
  --ink: #14201c;
  --muted: #4d5f57;
  --paper: #f4f0e8;
  --line: rgba(20, 32, 28, 0.12);
  --teal: #0d5c4b;
  --teal-2: #094337;
  --clay: #c45a27;
  --good: #1b7a4a;
  --bad: #b1362c;
  --shadow: 0 24px 60px rgba(12, 36, 28, 0.14);
  --font: "Instrument Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.55;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(13, 92, 75, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 5%, rgba(196, 90, 39, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 70% 100%, rgba(26, 79, 110, 0.1), transparent 55%),
    linear-gradient(160deg, #f7f3eb 0%, #e8f0ea 48%, #f3ebe3 100%);
}

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

.header {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.15rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #f6f2ea;
  font-family: var(--display);
  font-weight: 700;
  border-radius: 10px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong { font-size: 1rem; font-weight: 700; }
.logo-text small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.is-active { background: rgba(13, 92, 75, 0.1); color: var(--teal); }

.nav-cta {
  background: var(--teal) !important;
  color: #f6f2ea !important;
}

.nav-cta:hover { background: var(--teal-2) !important; }

#app {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
  min-height: 70vh;
}

.view {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.view.is-in {
  opacity: 1;
  transform: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.7rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.meta-row span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-weight: 700;
  font-size: 0.98rem;
}

.meta-row em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}

.qa-list {
  display: grid;
  gap: 1rem;
}

.qa-item {
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.qa-q {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.qa-q h2 {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.qa-a {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(13, 92, 75, 0.08);
  border-left: 3px solid var(--teal);
}

.qa-a span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.qa-a p {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-bottom: 0.5rem;
}

.footer-meta p { color: var(--ink); }
.footer-note { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(13, 92, 75, 0.18);
}

.btn-primary {
  background: var(--teal);
  color: #f6f2ea;
}

.btn-primary:hover { background: var(--teal-2); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  padding: 1.25rem 0 2.5rem;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--teal-2);
  max-width: 12em;
  margin-bottom: 1.1rem;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.6rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.hero-panel { display: grid; place-items: center; }

.orbit {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  inset: 8%;
  border: 1.5px dashed rgba(13, 92, 75, 0.35);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}

.orbit-ring.delay {
  inset: 0;
  border-style: solid;
  border-color: rgba(196, 90, 39, 0.28);
  animation-duration: 40s;
  animation-direction: reverse;
}

.orbit-core {
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 45%),
    linear-gradient(145deg, #d7e8e1, #b9d2c8);
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}

.orbit-core strong {
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--teal-2);
  line-height: 1;
}

.orbit-core em {
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Blocks */
.block { padding: 3rem 0; }

.block-head {
  max-width: 38rem;
  margin-bottom: 1.75rem;
}

.block-head h2,
.detail-hero h1,
.quiz-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  color: var(--teal-2);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.block-head p { color: var(--muted); }

.goal-card {
  padding: 1.5rem 0 2rem;
  border-top: 3px solid var(--teal);
  max-width: 50rem;
  margin-bottom: 1.5rem;
}

.goal-card h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
  color: var(--teal-2);
}

.goal-card p { color: var(--muted); margin-bottom: 0.85rem; }

.goal-card .meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
}

.goal-card .meta span {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}

.task-grid,
.std-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.task-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.task-card:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

.task-n {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--clay);
  display: block;
  margin-bottom: 0.45rem;
}

.task-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; min-height: 1.4em; }
.task-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }

.std-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent, var(--teal));
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  min-height: 100%;
}

.std-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.72);
}

.std-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.std-num {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent, var(--teal));
  color: #f6f2ea;
  font-weight: 700;
  font-size: 0.9rem;
}

.std-code {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent, var(--teal));
  text-align: right;
}

.std-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  min-height: 2.5em;
}

.std-card p {
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1;
}

.std-go {
  margin-top: auto;
  font-weight: 700;
  color: var(--teal);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.std-card:hover .std-go i { transform: translateX(4px); }
.std-go i { display: inline-block; transition: transform 0.2s ease; font-style: normal; }

.labs-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  padding: 1.25rem 0 1rem;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.lab-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: 100%;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent, var(--teal));
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

a.lab-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.78);
}

.lab-card.is-locked {
  background: rgba(255, 255, 255, 0.32);
}

.lab-card.is-locked .lab-go {
  color: var(--muted);
}

.lab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lab-num {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--accent, var(--teal));
}

.lab-card h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  min-height: 3.75em;
}

.lab-result span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, var(--teal));
}

.lab-card p {
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1;
}

.lab-go {
  margin-top: auto;
  font-weight: 700;
  color: var(--teal);
  font-size: 0.9rem;
}

.lab-go i {
  display: inline-block;
  font-style: normal;
  transition: transform 0.2s ease;
}

a.lab-card:hover .lab-go i { transform: translateX(4px); }

.lit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lit-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.lit-item:hover {
  border-color: rgba(13, 92, 75, 0.35);
  transform: translateY(-2px);
}

.lit-n {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #f6f2ea;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.lit-body p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.lit-link {
  font-weight: 600;
  color: var(--teal-2);
  text-decoration: underline;
  text-decoration-color: rgba(13, 92, 75, 0.28);
  text-underline-offset: 0.18em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.lit-link:hover {
  color: var(--clay);
  text-decoration-color: rgba(196, 90, 39, 0.45);
}

.lit-source {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta {
  margin-top: 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta h2 {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--teal-2);
}

.cta p { color: var(--muted); }

/* Detail */
.detail { padding-top: 0.5rem; }

.back {
  display: inline-block;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.back:hover { color: var(--teal); }

.detail-hero {
  max-width: 46rem;
  margin-bottom: 2.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 3px solid var(--accent, var(--teal));
}

.detail-about {
  margin-top: 0.9rem;
  font-size: 1.08rem;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.info-block { margin-bottom: 1.8rem; }

.info-block h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--teal-2);
  margin-bottom: 0.5rem;
}

.info-block p { color: var(--muted); }

.terms { display: grid; gap: 0.85rem; margin-top: 0.9rem; }

.term {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.term:last-child { border-bottom: none; }

.term dt {
  font-weight: 700;
  color: var(--teal-2);
  margin-bottom: 0.2rem;
}

.term dd { color: var(--muted); }

.facts {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.facts li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--muted);
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--clay);
}

.side {
  position: sticky;
  top: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.side h3 {
  font-family: var(--display);
  margin-bottom: 0.9rem;
  font-size: 1.15rem;
}

.side-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.side-link:last-of-type { border-bottom: none; margin-bottom: 0.8rem; }

.side-link strong { font-size: 0.9rem; }
.side-link span { color: var(--muted); font-size: 0.85rem; }
.side-link:hover strong { color: var(--teal); }

.side-btn { width: 100%; margin-top: 0.5rem; }

/* Quiz */
.quiz { padding-top: 0.5rem; }
.quiz-hero { max-width: 38rem; margin-bottom: 1.8rem; }
.quiz-hero p { color: var(--muted); }

.quiz-form { display: grid; gap: 1.15rem; }

.q {
  border: none;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

.q legend {
  font-weight: 700;
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  float: none;
  width: 100%;
  padding: 0;
}

.q-n {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #f6f2ea;
  border-radius: 7px;
  font-size: 0.82rem;
}

.opts { display: grid; gap: 0.45rem; clear: both; }

.q-write textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  resize: vertical;
  min-height: 5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.q-write textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 92, 75, 0.12);
}

.q-write textarea::placeholder { color: #8a9a92; }

.q-write textarea[readonly] {
  background: rgba(255, 255, 255, 0.45);
  cursor: default;
}

.model-answer {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(13, 92, 75, 0.08);
  border-left: 3px solid var(--teal);
}

.model-answer span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.model-answer p {
  color: var(--ink);
  font-size: 0.96rem;
}

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

.q.is-checked {
  border-color: rgba(13, 92, 75, 0.28);
}

.opt {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: rgba(255, 255, 255, 0.35);
}

.opt:hover {
  border-color: var(--teal);
  background: rgba(13, 92, 75, 0.05);
}

.opt input {
  margin-top: 0.2rem;
  accent-color: var(--teal);
}

.opt.correct {
  border-color: var(--good);
  background: rgba(27, 122, 74, 0.1);
}

.opt.wrong {
  border-color: var(--bad);
  background: rgba(177, 54, 44, 0.08);
}

.explain {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.quiz-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.result {
  margin-top: 1.5rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
}

.result-score {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--teal-2);
  margin-bottom: 0.3rem;
}

.result-note { color: var(--muted); margin-bottom: 0.9rem; }

.result-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(13, 92, 75, 0.12);
  overflow: hidden;
}

.result-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #2a8f72);
  border-radius: inherit;
  transition: width 0.6s ease;
}

.not-found {
  text-align: center;
  padding: 6rem 1rem;
}

.not-found h1 {
  font-family: var(--display);
  font-size: 4rem;
  color: var(--teal-2);
}

.not-found p { color: var(--muted); margin: 0.7rem 0 1.4rem; }

/* Practice mini-game */
.practice-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: rgba(138, 59, 18, 0.1);
  color: #8a3b12;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid rgba(138, 59, 18, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.practice-link:hover {
  background: rgba(138, 59, 18, 0.18);
  transform: translateY(-2px);
}

.practice-hero {
  padding: 1.5rem 0 1.75rem;
  max-width: 40rem;
}

.practice-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--teal-2);
  margin-bottom: 0.75rem;
}

.practice-hero p { color: var(--muted); font-size: 1.05rem; }

.practice-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
}

.practice-side {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.practice-side h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--teal-2);
}

.scenario-grid {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.scenario-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(13, 92, 75, 0.07);
  border-left: 3px solid var(--teal);
}

.scenario-item em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}

.scenario-item strong {
  font-size: 0.98rem;
  font-weight: 600;
}

.practice-hint p {
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

.practice-hint .muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.practice-panel { display: grid; gap: 1.15rem; }

.reg-card {
  padding: 1.4rem 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.reg-head { margin-bottom: 1.15rem; }

.reg-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.45rem;
}

.reg-head h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--teal-2);
  margin-bottom: 0.25rem;
}

.reg-head p { color: var(--muted); font-size: 0.95rem; }

.reg-form {
  display: grid;
  gap: 0.85rem;
}

.reg-form label {
  display: grid;
  gap: 0.35rem;
}

.reg-form label > span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.reg-form input[type="email"],
.reg-form input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reg-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 92, 75, 0.15);
}

.reg-check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  grid-template-columns: none !important;
  padding: 0.55rem 0.15rem;
  cursor: pointer;
}

.reg-check input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--teal);
}

.reg-check span {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
}

.rule-list {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(13, 92, 75, 0.06);
}

.rule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.rule span {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1.5px solid rgba(20, 32, 28, 0.2);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.rule.is-ok { color: var(--good); font-weight: 600; }
.rule.is-ok span {
  border-color: var(--good);
  background: var(--good);
  color: #fff;
}
.rule.is-ok span::after { content: "✓"; }

.rule.is-bad { color: var(--bad); }
.rule.is-bad span {
  border-color: var(--bad);
  background: rgba(177, 54, 44, 0.12);
}
.rule.is-bad span::after { content: "!"; color: var(--bad); }

.reg-feedback {
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 500;
}

.reg-feedback.is-bad {
  background: rgba(177, 54, 44, 0.1);
  border: 1px solid rgba(177, 54, 44, 0.28);
  color: #8a2a22;
}

.reg-feedback.is-warn {
  background: rgba(196, 90, 39, 0.12);
  border: 1px solid rgba(196, 90, 39, 0.3);
  color: #8a3b12;
}

.reg-submit { width: 100%; margin-top: 0.25rem; }

.reg-success {
  text-align: center;
  padding: 1rem 0.5rem 0.25rem;
}

.success-mark {
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto 0.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  animation: pop-in 0.45s ease;
}

@keyframes pop-in {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reg-success h3 {
  font-family: var(--display);
  font-size: 1.45rem;
  color: var(--teal-2);
  margin-bottom: 0.5rem;
}

.reg-success > p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.success-points {
  list-style: none;
  text-align: left;
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(13, 92, 75, 0.08);
}

.success-points li {
  font-size: 0.95rem;
  color: var(--ink);
}

.practice-explain {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(26, 79, 110, 0.08);
  border: 1px solid rgba(26, 79, 110, 0.15);
}

.practice-explain h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  color: #1a4f6e;
  margin-bottom: 0.45rem;
}

.practice-explain p {
  color: var(--ink);
  font-size: 0.98rem;
}

.footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.lab2-hero,
.lab3-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  align-items: center;
  padding: 0.4rem 0 0.5rem;
}

.lab2-hero .hero-title { max-width: 11em; }
.lab3-hero .hero-title { max-width: 14em; }

.stat-stack {
  display: grid;
  gap: 0.75rem;
}

.stat-stack div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-left: 3px solid #1a4f6e;
}

.stat-stack strong {
  font-family: var(--display);
  font-size: 1.8rem;
  color: #1a4f6e;
  line-height: 1;
}

.stat-stack span {
  color: var(--muted);
  font-weight: 600;
}

.report-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.5rem 0 0.25rem;
}

.report-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
}

.report-nav a:hover { border-color: #1a4f6e; color: #1a4f6e; }

.lab2 section[id],
.lab3 section[id] { scroll-margin-top: 1rem; }

.process-grid,
.cia-grid,
.cat-grid,
.protect-grid {
  display: grid;
  gap: 1rem;
}

.process-grid,
.cia-grid { grid-template-columns: repeat(3, 1fr); }
.cat-grid { grid-template-columns: repeat(3, 1fr); margin: 1rem 0 0.25rem; }
.protect-grid { grid-template-columns: repeat(2, 1fr); }

.process-card,
.cia-card,
.cat-card,
.protect-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.15rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

.process-card h3,
.cia-card h3,
.cat-card h3,
.protect-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.process-card p,
.cia-card li,
.cat-card p,
.theory { color: var(--muted); }

.cia-card ul,
.protect-list,
.rec-list { list-style: none; }

.cia-card li,
.protect-list li { margin-bottom: 0.35rem; }

.cia-key {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.55rem;
  border-radius: 8px;
  background: #1a4f6e;
  color: #f6f2ea;
  font-weight: 700;
}

.cat-card strong {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--clay);
}

.theory {
  margin-top: 1.25rem;
  max-width: 52rem;
  font-size: 1.02rem;
  line-height: 1.65;
}

.type-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.type-pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.type-pill em {
  font-style: normal;
  color: #1a4f6e;
}

.chip { cursor: pointer; }
.chip.is-on {
  background: #1a4f6e;
  border-color: #1a4f6e;
  color: #f6f2ea;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

.reg-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.reg-table th,
.reg-table td {
  padding: 0.75rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.reg-table th {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: bottom;
}

.reg-table th:nth-child(n + 4),
.reg-table td:nth-child(n + 4) {
  width: 3.25rem;
  text-align: center;
  white-space: nowrap;
}

.reg-table th:nth-child(8),
.reg-table td:nth-child(8) {
  width: 6.5rem;
}

.asset-row { cursor: pointer; }
.asset-row:hover,
.asset-row.is-open { background: rgba(26, 79, 110, 0.06); }

.cell-sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.reg-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.cia-input {
  width: 2.6rem;
  height: 1.75rem;
  border: 1px solid rgba(20, 32, 28, 0.18);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.cia-input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.cat {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cat-high { background: rgba(13, 92, 75, 0.14); color: var(--teal-2); }
.cat-medium { background: rgba(26, 79, 110, 0.12); color: #1a4f6e; }
.cat-low { background: rgba(20, 32, 28, 0.08); color: var(--muted); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
  padding: 0.35rem 0.2rem 0.6rem;
}

.detail-grid em,
.detail-protect em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.2rem;
}

.detail-protect { grid-column: 1 / -1; }
.detail-protect .muted { color: var(--muted); }

.diagram-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.dep-wrap {
  overflow-x: auto;
  padding: 0.6rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.dep-figure { display: grid; gap: 0.85rem; }

.dep-svg { width: 100%; height: auto; display: block; }

.dep-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  justify-content: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.dep-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
}

.dot-high { background: var(--teal); }
.dot-medium { background: #1a4f6e; }
.dot-low { background: #8a7560; }

.d-label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  fill: var(--clay);
  dominant-baseline: middle;
}

.d-edge {
  fill: none;
  stroke: rgba(13, 92, 75, 0.38);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  marker-end: url(#dep-arrow);
}

.d-edge.d-use { marker-end: url(#dep-arrow-use); }

.d-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  pointer-events: stroke;
}

.d-edge.is-on { stroke: var(--teal-2); stroke-width: 2.6; }
.d-edge.d-use {
  stroke: var(--clay);
  stroke-dasharray: 5 4;
}
.d-edge.d-use.is-on { stroke: #8a3b12; }
.dep-svg.is-active .d-edge:not(.is-on) { opacity: 0.14; }

.d-node text.d-node-title,
.d-node text.d-node-sub {
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: var(--font);
  pointer-events: none;
}

.d-node text.d-node-title {
  font-size: 13px;
  font-weight: 700;
  fill: var(--ink);
}

.d-node text.d-node-sub {
  font-size: 10px;
  font-weight: 600;
  fill: #4d5f57;
}

.dash {
  width: 1.1rem;
  border-top: 2px dashed var(--clay);
  display: inline-block;
}

.wifi-line {
  width: 1.1rem;
  border-top: 2.5px solid #1a4f6e;
  display: inline-block;
}

.d-wifi {
  fill: none;
  stroke: #1a4f6e;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  marker-end: url(#dep-arrow-wifi);
}

.d-wifi.is-on { stroke: #0d3a52; stroke-width: 3; }
.dep-svg.is-active .d-wifi:not(.is-on) { opacity: 0.18; }

.d-node { cursor: pointer; }
.d-node rect {
  fill: #f7f4ee;
  stroke: #1a4f6e;
  stroke-width: 1.6;
}

.d-node[data-cat="high"] rect {
  fill: #e7f3ef;
  stroke: var(--teal);
}
.d-node[data-cat="medium"] rect {
  fill: #e8f1f6;
  stroke: #1a4f6e;
}
.d-node[data-cat="low"] rect {
  fill: #f6f1ea;
  stroke: #8a7560;
}

.d-node text {
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  fill: var(--ink);
  pointer-events: none;
}

.d-node.is-on rect { stroke-width: 2.6; }
.d-node.is-dim { opacity: 0.28; }

.dep-panel {
  padding: 1.15rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(26, 79, 110, 0.08);
  border: 1px solid rgba(26, 79, 110, 0.16);
  position: static;
}

.dep-panel h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  color: #1a4f6e;
  margin-bottom: 0.45rem;
}

.dep-panel p:last-child { color: var(--ink); }

.protect-head { margin-top: 2rem; }

.protect-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  min-height: 3.2rem;
  margin-bottom: 0.55rem;
}

.protect-card header h3 { flex: 1; margin-bottom: 0; }
.protect-card .cat { flex-shrink: 0; margin-top: 0.15rem; }

.rec-list { display: grid; gap: 0.7rem; }

.rec-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

.rec-item span {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #f6f2ea;
  font-weight: 700;
  font-size: 0.85rem;
}

.lab3 .stat-stack div { border-left-color: #8a3b12; }
.lab3 .stat-stack strong { color: #8a3b12; }
.lab3 .report-nav a:hover { border-color: #8a3b12; color: #8a3b12; }

.lab4 .chip.is-on {
  background: #5c3d7a;
  border-color: #5c3d7a;
  color: #f6f2ea;
}
.role-note {
  margin: 0 0 0.85rem;
  color: var(--muted);
  max-width: 46rem;
}
.lab4 .stat-stack div { border-left-color: #5c3d7a; }
.lab4 .stat-stack strong { color: #5c3d7a; }
.lab4 .report-nav a:hover { border-color: #5c3d7a; color: #5c3d7a; }

.access-matrix td:nth-child(2),
.access-matrix th:nth-child(2) { text-align: left; font-weight: 600; }
.access-matrix td:last-child,
.access-matrix th:last-child { text-align: left; font-weight: 500; min-width: 16rem; }
.perm-yes { color: #0d5c4b; font-weight: 700; }
.perm-no { color: #b7ab9e; }
.test-yes { color: #0d5c4b; font-weight: 700; }
.test-no { color: #8a3b12; font-weight: 700; }
.lab4 .d-edge { marker-end: url(#lab4-arrow); }
.lab4 .d-node { cursor: default; }

.limit-note {
  margin: 0.2rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(138, 59, 18, 0.25);
  background: rgba(138, 59, 18, 0.07);
  color: var(--ink);
}

.stride-grid,
.actor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.stride-card,
.actor-card,
.prio-card {
  height: 100%;
  padding: 1rem 1.05rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.stride-card h3,
.actor-card h3,
.prio-card h3 {
  font-family: var(--display);
  font-size: 1.12rem;
  margin-bottom: 0.35rem;
}

.stride-key {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.45rem;
  border-radius: 8px;
  background: #8a3b12;
  color: #f6f2ea;
  font-weight: 700;
}

.stride-card p,
.actor-card dd { color: var(--muted); }

.stride-meta {
  margin-top: 0.45rem;
  color: var(--ink);
}

.stride-meta em,
.prio-measures em,
.chain em,
.actor-card dt {
  display: block;
  margin-bottom: 0.15rem;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8a3b12;
}

.actor-card { border-top: 3px solid #8a3b12; }
.actor-card dl { margin: 0.35rem 0 0; }
.actor-card dd { margin: 0 0 0.55rem; }

.dfd-svg { width: 100%; height: auto; display: block; }
.dfd-svg text { font-family: "Instrument Sans", sans-serif; pointer-events: none; }
.dfd-boundary {
  fill: rgba(138, 59, 18, 0.045);
  stroke: #8a3b12;
  stroke-width: 1.6;
  stroke-dasharray: 7 6;
}
.dfd-boundary-label { font-size: 13px; font-weight: 700; fill: #8a3b12; }
.dfd-node { cursor: pointer; }
.dfd-node rect { fill: #f7fbfa; stroke: #1a4f6e; stroke-width: 1.5; }
.dfd-node[data-kind="ext"] rect {
  fill: #f6efe6;
  stroke: #8a3b12;
  stroke-dasharray: 5 4;
}
.dfd-node[data-kind="store"] rect { fill: #f3e6d8; stroke: #8a3b12; }
.dfd-title { font-size: 13px; font-weight: 650; fill: #2a2420; text-anchor: middle; }
.dfd-sub { font-size: 12px; fill: #6d645b; text-anchor: middle; }
.store-bar { stroke: #8a3b12; stroke-width: 1.6; }
.dfd-flow { cursor: pointer; }
.dfd-hit { fill: none; stroke: transparent; stroke-width: 14; }
.dfd-line { fill: none; stroke: #8a3b12; stroke-width: 2.1; }
.dfd-tag { font-size: 12px; font-weight: 700; fill: #8a3b12; text-anchor: middle; }
.dfd-mark { pointer-events: none; }
.dfd-mark rect { fill: #fff; stroke: #8a3b12; stroke-width: 1; }
.dfd-mark text {
  font-family: "Instrument Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  fill: #8a3b12;
  dominant-baseline: middle;
}
.dep-svg.is-active .dfd-mark.is-dim { opacity: 0.28; }
.dfd-mark.is-on rect { stroke-width: 1.8; }
.dfd-svg.is-active .dfd-line:not(.is-on) { opacity: 0.16; }
.dfd-svg.is-active .dfd-node:not(.is-on) { opacity: 0.35; }
.dfd-node.is-on rect { stroke-width: 2.6; }

.bound-swatch,
.ext-swatch,
.proc-swatch,
.store-swatch,
.flow-swatch {
  display: inline-block;
  width: 1.1rem;
  height: 0.55rem;
  border-radius: 2px;
}
.bound-swatch { border: 1.5px dashed #8a3b12; }
.ext-swatch { background: #f6efe6; border: 1.5px dashed #8a3b12; }
.proc-swatch { background: #f7fbfa; border: 1.5px solid #1a4f6e; }
.store-swatch { background: #f3e6d8; border: 1.5px solid #8a3b12; }
.flow-swatch { background: #8a3b12; height: 2px; align-self: center; }

.stride-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.stride-matrix th,
.stride-matrix td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.stride-matrix th:first-child,
.stride-matrix td:first-child { text-align: left; font-weight: 600; }
.matrix-link {
  border: 0;
  background: transparent;
  color: #8a3b12;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.threat-table th:nth-child(n + 4),
.threat-table td:nth-child(n + 4) {
  text-align: left;
  width: auto;
}
.threat-table th:nth-child(5),
.threat-table td:nth-child(5) {
  text-align: center;
  width: 8.5rem;
}

.score-cell {
  white-space: nowrap;
}

.score-times {
  margin: 0 0.15rem;
  font-weight: 700;
}

.score-product {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.threat-row { cursor: pointer; }
.threat-row:hover,
.threat-row.is-open,
.threat-row.is-hit { background: rgba(138, 59, 18, 0.08); }
.threat-row.is-dim { opacity: 0.38; }
.threat-detail td { background: rgba(138, 59, 18, 0.04); }

.prio-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #8a3b12;
  color: #f6f2ea;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.chain-lead {
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}
.chain {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}
.chain li {
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.prio-list { display: grid; gap: 0.8rem; }
.prio-card header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}
.prio-card header h3 { flex: 1; margin-bottom: 0; }
.prio-card > p { margin: 0.55rem 0 0.75rem; color: var(--ink); }
.prio-measures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}
.prio-measures p {
  margin: 0;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  background: rgba(138, 59, 18, 0.06);
  color: var(--ink);
}

@media (max-width: 920px) {
  .hero,
  .labs-hero,
  .lab2-hero,
  .lab3-hero,
  .diagram-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .process-grid,
  .cia-grid,
  .cat-grid,
  .protect-grid,
  .detail-grid,
  .stride-grid,
  .actor-grid,
  .prio-measures,
  .chain {
    grid-template-columns: 1fr;
  }

  .dep-panel { position: static; }

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

  .lab-card h3 { min-height: 0; }

  .hero-panel { order: -1; }
  .orbit { width: 210px; }
  .orbit-core strong { font-size: 1.7rem; }

  .task-grid,
  .std-grid,
  .detail-layout,
  .practice-layout {
    grid-template-columns: 1fr;
  }

  .task-card,
  .task-card:last-child:nth-child(3n + 1) {
    grid-column: auto;
  }

  .report-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side { position: static; }
}

@media (max-width: 640px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav { flex-wrap: wrap; }

  .hero-title { max-width: none; }
}
