:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --line: #d8e1eb;
  --line-strong: #c2cfde;
  --ink: #363636;
  --ink-soft: #5e6f83;
  --primary: #2f5c87;
  --primary-soft: #f3f8ff;
  --ok: #1f7a4f;
  --warn: #8f2236;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 92, 135, 0.3);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  background: #ffffff;
  color: #1f2d3d;
  border: 1px solid #c7d2de;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

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

.container {
  width: min(1120px, calc(100% - 2.2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

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

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand {
  text-decoration: none;
  color: rgb(54, 54, 54);
  font-family: "Helvetica Neue UltraLight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 200;
}

.main-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: #2d4d72;
  border-color: var(--line-strong);
  background: #f5f9ff;
}

.wre-module-main {
  padding: 1.15rem 0 2.6rem;
  display: grid;
  gap: 0.8rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.9rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #5c7594;
}

h1,
h2,
h3 {
  margin: 0 0 0.42rem;
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin: 0 0 0.62rem;
}

.wre-module-hero p {
  color: var(--ink-soft);
  max-width: 90ch;
}

.wre-module-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0.8rem;
  align-items: start;
}

.case-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
}

.case-head label {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.case-head select {
  min-width: 280px;
  max-width: 100%;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  padding: 0.38rem 0.46rem;
  font: inherit;
  color: #28415d;
  background: #ffffff;
}

.case-summary {
  white-space: pre-wrap;
  color: #2f4b6b;
}

.case-actions {
  border: 1px dashed #cad6e3;
  border-radius: 10px;
  background: #f9fbfe;
  padding: 0.6rem;
}

.case-actions h3 {
  font-size: 0.98rem;
}

.case-actions p {
  margin: 0.18rem 0;
}

.hint {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.hint a,
.sep-link-inline {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted rgba(47, 92, 135, 0.5);
}

.hint a:hover,
.hint a:focus-visible,
.sep-link-inline:hover,
.sep-link-inline:focus-visible {
  color: #ff5f35;
  border-bottom-color: rgba(255, 95, 53, 0.7);
}

.case-sep-links {
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
  padding-top: 0.44rem;
}

.case-sep-links p {
  margin: 0.18rem 0;
}

.question-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.question-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.question-form legend {
  margin-bottom: 0.46rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.question-options {
  display: grid;
  gap: 0.42rem;
}

.confidence-wrap {
  margin-top: 0.55rem;
  border: 1px solid #d8e1eb;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.48rem 0.56rem;
}

.confidence-wrap label {
  display: block;
  margin: 0 0 0.28rem;
  color: #2e4a69;
  font-size: 0.88rem;
  font-weight: 600;
}

.confidence-wrap strong {
  color: #2f5c87;
}

.confidence-row input[type="range"] {
  width: 100%;
}

.choice-option {
  border: 1px solid #d4dee9;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.46rem 0.52rem;
}

.choice-option label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  cursor: pointer;
  color: #2e4767;
}

.choice-option input {
  margin-top: 0.22rem;
}

.choice-option strong {
  display: block;
  margin-bottom: 0.12rem;
}

.choice-option p {
  margin: 0;
  color: #4f637a;
  font-size: 0.84rem;
}

.reflection-timer {
  margin-top: 0.58rem;
  border: 1px solid #d5e0ea;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.52rem;
}

.reflection-timer p {
  margin: 0;
}

.reflection-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid #c7d3e1;
  border-radius: 9px;
  background: #ffffff;
  color: #294764;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.42rem 0.7rem;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: #274d72;
}

.btn-secondary {
  background: #f4f8ff;
  border-color: #c8d6ea;
}

.btn-ghost {
  background: #ffffff;
}

.status-line {
  min-height: 1.2rem;
  margin: 0.42rem 0 0;
  color: var(--warn);
  font-size: 0.84rem;
}

.question-actions {
  margin-top: 0.42rem;
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
}

.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
}

.summary-rows {
  display: grid;
  gap: 0.34rem;
  margin-top: 0.35rem;
}

.summary-row {
  border: 1px solid #d7e0eb;
  border-radius: 10px;
  background: #f9fbfe;
  padding: 0.42rem 0.52rem;
}

.summary-row strong {
  display: inline-block;
  min-width: 230px;
  color: #294765;
}

.recommendation-card {
  margin-top: 0.6rem;
  border: 1px solid #cad8e9;
  border-radius: 12px;
  background: var(--primary-soft);
  padding: 0.62rem;
}

.recommendation-card h3 {
  margin-bottom: 0.3rem;
}

.recommendation-card p:last-child {
  margin-bottom: 0;
}

.method-guidance-box {
  margin: 0.5rem 0;
  border: 1px solid #d2dbea;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.5rem 0.56rem;
}

.method-guidance-box h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2e4b68;
}

.method-guidance-box ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.18rem;
}

.sep-round-diagnostics {
  margin: 0.5rem 0;
  border: 1px solid #d3ddeb;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.5rem 0.56rem;
  display: grid;
  gap: 0.24rem;
}

.sep-round-diagnostics h4 {
  margin: 0 0 0.16rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2e4b68;
}

.sep-round-row {
  font-size: 0.84rem;
  color: #3a5674;
}

.sep-round-note {
  margin: 0.1rem 0 0.2rem !important;
}

.sep-round-diagnostics ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.16rem;
}

.summary-actions {
  margin-top: 0.56rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.history-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.42rem;
}

.history-list li {
  color: #3e5673;
}

.history-list .empty {
  list-style: none;
  color: var(--ink-soft);
}

@media (max-width: 940px) {
  .wre-module-grid {
    grid-template-columns: 1fr;
  }

  .case-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-head label {
    margin-left: 0;
  }
}

/* Forethought-inspired minimal polish */
:root {
  --line: #dfe6ee;
  --line-strong: #ccd5e1;
  --ink: #1b2432;
  --ink-soft: #556173;
  --primary: #1d3557;
  --primary-soft: #f7f9fc;
  --ok: #1f7a54;
  --warn: #a24b5b;
}

.site-header {
  border-bottom-color: #e5ebf2;
}

.main-nav a {
  border-radius: 8px;
  font-weight: 500;
  color: #4f5b6b;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  background: #f6f9ff;
  border-color: #d8e1ec;
  color: #1d3557;
}

.panel,
.summary-row,
.recommendation-card,
.case-actions,
.confidence-wrap,
.reflection-timer,
.choice-option {
  border-color: #dfe6ee;
  box-shadow: 0 3px 12px rgba(27, 36, 50, 0.05);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
}

.btn-primary {
  background: #1d3557;
  border-color: #1d3557;
}

.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible:not(:disabled) {
  background: #172b46;
  border-color: #172b46;
}

.btn-secondary {
  background: #ffffff;
  border-color: #d3dde8;
  color: #1d3557;
}

.btn-secondary:hover:not(:disabled),
.btn-secondary:focus-visible:not(:disabled) {
  background: #f5f8fe;
}

/* Home-style alignment (Forethought-like) */
:root {
  --home-bg: #efefea;
  --home-surface: #f7f7f4;
  --home-line: #dfe2de;
  --home-line-strong: #d2d8d3;
  --home-ink: #2f2d2b;
  --home-muted: #5d615f;
  --home-accent: #2f3d53;
  --home-accent-hover: #263247;
}

body {
  background: var(--home-bg);
  color: var(--home-ink);
}

.site-header {
  border-bottom-color: #e6e8e2;
}

.brand {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Garamond, serif;
  font-weight: 500;
  color: var(--home-ink);
}

h1,
h2,
h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Garamond, serif;
  font-weight: 500;
  color: var(--home-ink);
}

.main-nav a {
  border-radius: 8px;
  color: #4d5350;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  background: #f5f5f2;
  border-color: var(--home-line-strong);
  color: var(--home-ink);
}

.panel,
.summary-row,
.recommendation-card,
.case-actions,
.confidence-wrap,
.reflection-timer,
.choice-option,
.sep-round-diagnostics {
  border-color: var(--home-line);
  background: var(--home-surface);
  box-shadow: none;
}

.hint,
.status-line,
.case-summary,
.choice-option p {
  color: var(--home-muted);
}

.btn {
  border-radius: 8px;
  font-weight: 600;
}

.btn-primary {
  background: var(--home-accent);
  border-color: var(--home-accent);
}

.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible:not(:disabled) {
  background: var(--home-accent-hover);
  border-color: var(--home-accent-hover);
}

.btn-secondary,
.btn-ghost {
  background: #ffffff;
  border-color: var(--home-line-strong);
  color: #4b5150;
}
