:root {
  color-scheme: light;
  --ink: #17302d;
  --ink-soft: #3f5551;
  --ink-faint: #526762;
  --forest: #163b36;
  --forest-2: #24584f;
  --mint: #8fc9ae;
  --mint-soft: #dcecdf;
  --cream: #f4f1e8;
  --paper: #fffdf8;
  --paper-2: #f8f7f1;
  --line: #cbd3cc;
  --line-strong: #aebdb3;
  --orange: #ad441c;
  --orange-soft: #f8dccb;
  --amber: #d79c2a;
  --amber-soft: #f4e7c5;
  --red: #bc4e42;
  --red-soft: #f7dcd7;
  --blue: #4f7791;
  --blue-soft: #dce8ef;
  --shadow: 0 14px 40px rgba(25, 55, 50, 0.08);
  --shadow-small: 0 6px 18px rgba(25, 55, 50, 0.07);
  --radius: 22px;
  --radius-small: 14px;
  --sidebar-width: 224px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 93% 2%, rgba(143, 201, 174, 0.22), transparent 26rem),
    var(--cream);
  color: var(--ink);
  font-family: Inter, "Aptos", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

input[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(188, 78, 66, 0.13);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(232, 120, 63, 0.35);
  outline-offset: 3px;
}

a {
  color: var(--forest-2);
}

p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.18;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: white;
  border-radius: 0 0 8px 8px;
}

.skip-link:focus {
  top: 0;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0.8rem clamp(1rem, 2.4vw, 2.4rem);
  border-bottom: 1px solid rgba(188, 201, 192, 0.75);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(18px);
}

.brand-lockup,
.top-actions,
.decision-line,
.panel-heading,
.input-heading,
.robot-heading,
.section-mini-heading {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 0.85rem;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.15;
}

.eyebrow,
.mini-label {
  margin-bottom: 0.24rem;
  color: var(--forest-2);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.brand-lockup .eyebrow {
  font-size: 0.58rem;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(22, 59, 54, 0.15);
  border-radius: 50%;
  background: var(--mint-soft);
}

.brand-mark span {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 3px solid var(--forest);
  border-left-color: transparent;
  border-radius: 50%;
}

.brand-mark span:nth-child(1) { left: 8px; top: 7px; transform: rotate(-25deg); }
.brand-mark span:nth-child(2) { right: 7px; top: 11px; transform: rotate(95deg); }
.brand-mark span:nth-child(3) { left: 14px; bottom: 6px; transform: rotate(210deg); }

.top-actions {
  justify-content: flex-end;
  gap: 0.65rem;
}

.suite-rail {
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(150px, 1fr));
  gap: 1px;
  padding: 1px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--line-strong);
}

.suite-rail-intro,
.suite-rail > a {
  min-width: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem clamp(0.75rem, 1.6vw, 1.35rem);
  background: rgba(255, 253, 248, 0.98);
  color: var(--ink);
  text-decoration: none;
}

.suite-rail-intro {
  background: var(--forest);
  color: white;
}

.suite-loop-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: var(--mint);
  font-size: 1.25rem;
}

.suite-rail-intro > span:last-child,
.suite-rail > a > span:last-child {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.suite-rail small {
  color: var(--ink-faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.suite-rail-intro small {
  color: rgba(255, 255, 255, 0.65);
}

.suite-rail strong {
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suite-rail > a > span:first-child {
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 800;
}

.suite-rail > a {
  transition: background 150ms ease, color 150ms ease;
}

.suite-rail > a:hover {
  background: var(--mint-soft);
}

.suite-rail > a.is-current {
  background: var(--forest-2);
  color: white;
}

.suite-rail > a.is-current small,
.suite-rail > a.is-current > span:first-child {
  color: var(--mint);
}

.handoff-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(36, 88, 79, 0.22);
  border-radius: var(--radius-small);
  background:
    linear-gradient(105deg, rgba(143, 201, 174, 0.2), rgba(255, 253, 248, 0.88) 48%),
    var(--paper);
  box-shadow: var(--shadow-small);
}

.handoff-card[data-has-context="true"] {
  border-color: rgba(232, 120, 63, 0.42);
  background:
    linear-gradient(105deg, rgba(232, 120, 63, 0.12), rgba(255, 253, 248, 0.94) 48%),
    var(--paper);
}

.handoff-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font-size: 1.35rem;
}

.handoff-copy h3,
.handoff-copy p {
  margin-bottom: 0.2rem;
}

.handoff-copy > p:not(.mini-label) {
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.handoff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.55rem;
}

.handoff-tags:empty {
  display: none;
}

.handoff-tags span {
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(36, 88, 79, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--forest-2);
  font-size: 0.68rem;
  font-weight: 750;
}

.handoff-actions {
  display: grid;
  justify-items: stretch;
  gap: 0.45rem;
}

.handoff-actions .button,
.handoff-actions a {
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.privacy-pill,
.snapshot-pill,
.status-chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.privacy-pill {
  color: var(--forest);
  background: var(--mint-soft);
  border-color: rgba(36, 88, 79, 0.12);
}

.privacy-dot {
  width: 7px;
  height: 7px;
  margin-right: 0.42rem;
  border-radius: 50%;
  background: #3f8e65;
  box-shadow: 0 0 0 4px rgba(63, 142, 101, 0.12);
}

.button {
  min-height: 38px;
  padding: 0.58rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 760;
  line-height: 1.15;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.button.primary {
  color: white;
  background: var(--forest);
  box-shadow: 0 7px 18px rgba(22, 59, 54, 0.18);
}

.button.primary:hover {
  background: #0f302c;
}

.button.secondary {
  color: var(--forest);
  background: var(--mint-soft);
  border-color: rgba(36, 88, 79, 0.12);
}

.button.ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.button.small {
  min-height: 32px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

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

.sidebar {
  position: sticky;
  top: 78px;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 78px);
  padding: 1.6rem 1rem;
  border-right: 1px solid rgba(188, 201, 192, 0.72);
  background: rgba(244, 241, 232, 0.76);
}

.nav-list {
  display: grid;
  gap: 0.35rem;
}

.nav-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.75rem;
  border: 0;
  border-radius: 12px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  font-weight: 720;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nav-item:hover {
  color: var(--forest);
  background: rgba(255, 253, 248, 0.65);
}

.nav-item.is-active {
  color: white;
  background: var(--forest);
  box-shadow: var(--shadow-small);
}

.nav-index {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.58;
}

.sidebar-note {
  margin-top: auto;
  padding: 1rem;
  border: 1px solid rgba(36, 88, 79, 0.12);
  border-radius: var(--radius-small);
  background: rgba(220, 236, 223, 0.7);
}

.sidebar-note p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.55;
}

.main-content {
  min-width: 0;
  padding: clamp(1.4rem, 3.3vw, 3.1rem) clamp(1rem, 4vw, 4rem) 2rem;
}

.view {
  display: none;
  width: min(1320px, 100%);
  margin: 0 auto;
  animation: view-in 220ms ease;
}

.view.is-active {
  display: block;
}

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

.view-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.view-heading > div:first-child {
  max-width: 820px;
}

.lead {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.preset-control {
  display: grid;
  gap: 0.3rem;
  min-width: 285px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 760;
}

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

select:hover,
input[type="text"]:hover,
input[type="number"]:hover {
  border-color: #93a89d;
}

select:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(36, 88, 79, 0.1);
}

.decision-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  min-height: 250px;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 88% 10%, rgba(143, 201, 174, 0.35), transparent 18rem),
    linear-gradient(135deg, #12352f 0%, #1d4a42 62%, #2a6154 100%);
  box-shadow: 0 18px 50px rgba(22, 59, 54, 0.18);
}

.decision-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -140px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.035), 0 0 0 90px rgba(255, 255, 255, 0.025);
}

.decision-hero[data-tone="danger"] {
  background:
    radial-gradient(circle at 88% 10%, rgba(248, 220, 203, 0.25), transparent 18rem),
    linear-gradient(135deg, #512e2c, #793f36 62%, #9b5c48);
}

.decision-hero[data-tone="warning"],
.decision-hero[data-tone="caution"] {
  background:
    radial-gradient(circle at 88% 10%, rgba(244, 231, 197, 0.28), transparent 18rem),
    linear-gradient(135deg, #4b3b22, #6a5127 62%, #8a6933);
}

.decision-hero[data-tone="positive"] {
  background:
    radial-gradient(circle at 88% 10%, rgba(220, 236, 223, 0.35), transparent 18rem),
    linear-gradient(135deg, #143d31, #1e5a43 62%, #2c7250);
}

.decision-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.decision-copy .mini-label {
  color: rgba(255, 255, 255, 0.65);
}

.decision-line {
  gap: 0.85rem;
  margin: 0.2rem 0 0.7rem;
}

.decision-line h3 {
  margin: 0;
  font-size: clamp(1.55rem, 3.5vw, 2.75rem);
  line-height: 1.12;
}

.decision-code {
  display: inline-grid;
  place-items: center;
  min-width: 70px;
  min-height: 34px;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.11);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.decision-copy > p:not(.mini-label) {
  max-width: 680px;
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

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

.decision-hero .button.primary {
  color: var(--forest);
  background: white;
}

.decision-hero .button.secondary {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.decision-visual {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  min-width: 170px;
}

.decision-visual p {
  margin: 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.76rem;
}

.ring {
  --progress: 0deg;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--mint) var(--progress), rgba(255, 255, 255, 0.14) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ring::before {
  content: "";
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(24, 60, 53, 0.82);
}

.ring span {
  position: relative;
  z-index: 1;
  font-size: 1.2rem;
  font-weight: 850;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}

.metric-card {
  min-width: 0;
  min-height: 142px;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-small);
}

.metric-card.featured {
  border-color: rgba(232, 120, 63, 0.24);
  background: linear-gradient(150deg, #fff8f1, var(--paper));
}

.metric-card p {
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 720;
}

.metric-card strong {
  display: block;
  min-height: 2.5rem;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.3vw, 1.9rem);
  line-height: 1.2;
}

.metric-card strong.text-metric {
  font-size: 1rem;
  line-height: 1.36;
}

.metric-card span {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink-faint);
  font-size: 0.67rem;
  line-height: 1.4;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.panel {
  min-width: 0;
  padding: clamp(1.15rem, 2.5vw, 1.65rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-small);
}

.panel-heading {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.panel-heading h3,
.panel-heading p:last-child {
  margin-bottom: 0;
}

.panel-heading p:last-child:not(.mini-label) {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.score-list {
  display: grid;
  gap: 0.75rem;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(118px, 0.8fr) minmax(120px, 1.6fr) 44px;
  align-items: center;
  gap: 0.7rem;
}

.score-row span:first-child {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.score-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.score-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e8e1;
}

.score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--mint));
  transform-origin: left;
}

.next-action-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(143, 201, 174, 0.18), transparent 14rem),
    var(--paper);
}

.sequence-list {
  display: grid;
  gap: 0.82rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sequence-list li {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 0.72rem;
  align-items: start;
}

.sequence-list li > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: var(--forest);
  background: var(--mint-soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.sequence-list strong {
  font-size: 0.86rem;
}

.sequence-list p {
  margin: 0.05rem 0 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.5;
}

.inputs-panel,
.gate-panel,
.benchmark-panel {
  margin: 1rem 0;
}

.input-heading {
  justify-content: space-between;
  align-items: start;
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.autosave-label {
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
  display: grid;
  align-content: start;
  gap: 0.32rem;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 720;
}

.field small {
  color: var(--ink-faint);
  font-size: 0.64rem;
  font-weight: 650;
}

.field.span-2 {
  grid-column: span 2;
}

.checkbox-field {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.56rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0 0.55rem 0 0;
  accent-color: var(--forest-2);
}

.advanced-inputs {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.advanced-inputs summary {
  width: fit-content;
  padding: 0.9rem 0;
  color: var(--forest-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.gate-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.gate-check-grid label {
  display: flex;
  align-items: start;
  min-height: 68px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}

.gate-check-grid strong,
.gate-check-grid small {
  display: block;
}

.gate-check-grid strong {
  font-size: 0.78rem;
}

.gate-check-grid small {
  margin-top: 0.1rem;
  color: var(--ink-faint);
  font-size: 0.66rem;
}

.status-chip[data-tone="danger"] { color: #8d352e; background: var(--red-soft); border-color: rgba(188, 78, 66, 0.2); }
.status-chip[data-tone="warning"], .status-chip[data-tone="caution"] { color: #71531c; background: var(--amber-soft); border-color: rgba(215, 156, 42, 0.22); }
.status-chip[data-tone="positive"] { color: #24583d; background: var(--mint-soft); border-color: rgba(36, 88, 61, 0.17); }

.tech-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.tech-summary-card {
  padding: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
}

.tech-summary-card span {
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.tech-summary-card strong {
  display: block;
  margin: 0.2rem 0;
  font-size: 1rem;
}

.tech-summary-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

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

.tech-card {
  display: grid;
  grid-template-columns: 40px minmax(145px, 0.75fr) minmax(140px, 1fr) minmax(150px, 1fr) 105px 90px;
  gap: 0.7rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 2px 0 rgba(25, 55, 50, 0.02);
}

.tech-rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--forest);
  background: var(--mint-soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.tech-name span,
.tech-copy span {
  color: var(--ink-faint);
  font-size: 0.65rem;
  font-weight: 720;
}

.tech-name strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.88rem;
}

.tech-copy p {
  margin: 0.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.48;
}

.tech-score {
  min-width: 0;
}

.tech-score-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 750;
}

.tech-score .score-track {
  height: 8px;
}

.tech-verdict {
  justify-self: end;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  color: var(--forest-2);
  background: var(--mint-soft);
  font-size: 0.68rem;
  font-weight: 820;
}

.tech-verdict[data-level="low"] { color: var(--ink-soft); background: #e8e8e3; }
.tech-verdict[data-level="medium"] { color: #76561d; background: var(--amber-soft); }

.callout {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 0.9rem;
  align-items: start;
  margin: 1rem 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.neutral-callout { background: var(--blue-soft); border-color: rgba(79, 119, 145, 0.15); }
.warning-callout { background: var(--orange-soft); border-color: rgba(232, 120, 63, 0.18); }

.callout-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-weight: 850;
}

.warning-callout .callout-icon { background: var(--orange); }

.callout h3,
.callout p {
  margin-bottom: 0;
}

.callout p {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.finance-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.economics-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.waterfall {
  display: grid;
  gap: 0.75rem;
}

.waterfall-row {
  display: grid;
  grid-template-columns: 142px minmax(120px, 1fr) 74px;
  gap: 0.65rem;
  align-items: center;
}

.waterfall-row > span:first-child {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.waterfall-row strong {
  text-align: right;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.waterfall-track {
  height: 23px;
  overflow: hidden;
  border-radius: 6px;
  background: #ebebe5;
}

.waterfall-bar {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--forest-2);
}

.waterfall-row[data-type="revenue"] .waterfall-bar { background: var(--mint); }
.waterfall-row[data-type="carbon"] .waterfall-bar { background: var(--orange); }
.waterfall-row[data-type="total"] .waterfall-bar { background: var(--ink); }

.gap-visual {
  display: grid;
  gap: 0.85rem;
}

.gap-gauge {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint-soft) 0 50%, var(--amber-soft) 50% 75%, var(--red-soft) 75% 100%);
}

.gap-marker {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 24px;
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 0 0 0 2px white;
}

.gap-labels {
  display: flex;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.65rem;
}

.gap-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.gap-result div {
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--paper-2);
}

.gap-result span,
.gap-result strong {
  display: block;
}

.gap-result span {
  color: var(--ink-faint);
  font-size: 0.66rem;
}

.gap-result strong {
  margin-top: 0.2rem;
  font-size: 1.05rem;
}

.formula-note {
  margin-top: 1.15rem;
  padding: 0.9rem;
  border-left: 3px solid var(--orange);
  background: var(--paper-2);
}

.formula-note strong {
  font-size: 0.75rem;
}

.formula-note p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.69rem;
}

.source-link {
  font-size: 0.72rem;
  font-weight: 780;
  text-decoration: none;
}

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

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.76rem;
}

th,
td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--ink-soft);
  background: var(--paper-2);
  font-size: 0.68rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.is-selected {
  background: var(--mint-soft);
}

.source-caption {
  margin: 0.8rem 0 0;
  color: var(--ink-faint);
  font-size: 0.67rem;
  line-height: 1.55;
}

.carbon-toggle-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 120, 63, 0.12), transparent 14rem),
    var(--paper);
}

.carbon-toggle-panel p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.switch-control {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 160px;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 52px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c5cbc5;
  transition: background 160ms ease;
}

.switch-track span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(20, 40, 36, 0.2);
  transition: transform 160ms ease;
}

.switch-control input:checked + .switch-track {
  background: var(--forest-2);
}

.switch-control input:checked + .switch-track span {
  transform: translateX(23px);
}

.switch-control input:focus-visible + .switch-track {
  outline: 3px solid rgba(22, 59, 54, 0.34);
  outline-offset: 3px;
}

.switch-control.is-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.carbon-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.8rem;
  align-items: center;
  margin: 1rem 0;
}

.carbon-flow article {
  min-height: 150px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.carbon-flow article.final-carbon {
  border-color: rgba(232, 120, 63, 0.22);
  background: var(--orange-soft);
}

.carbon-flow p {
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.carbon-flow strong {
  display: block;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  line-height: 1.2;
}

.carbon-flow article > span {
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.flow-arrow {
  display: grid;
  justify-items: center;
  color: var(--forest-2);
  font-size: 1.3rem;
  font-weight: 800;
}

.flow-arrow small {
  color: var(--ink-faint);
  font-size: 0.58rem;
  font-weight: 650;
  white-space: nowrap;
}

.carbon-input-panel .compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integrity-list {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.integrity-list li {
  display: grid;
  grid-template-columns: 33px 1fr;
  gap: 0.65rem;
}

.integrity-list li > span {
  color: var(--orange);
  font-size: 0.67rem;
  font-weight: 850;
}

.integrity-list strong {
  font-size: 0.78rem;
}

.integrity-list p {
  margin: 0.05rem 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.carbon-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap-list {
  display: grid;
  gap: 0.75rem;
}

.roadmap-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(0, 1.25fr) 105px;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: var(--radius-small);
  background: var(--paper);
  box-shadow: 0 2px 0 rgba(25, 55, 50, 0.02);
}

.roadmap-card[data-window="31〜60日"] { border-left-color: var(--amber); }
.roadmap-card[data-window="61〜90日"] { border-left-color: var(--orange); }

.roadmap-window {
  font-size: 0.85rem;
  font-weight: 850;
}

.roadmap-cell span {
  display: block;
  color: var(--ink-faint);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-cell p {
  margin: 0.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.45;
}

.roadmap-status {
  justify-self: end;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--forest-2);
  background: var(--mint-soft);
  font-size: 0.64rem;
  font-weight: 820;
  text-align: center;
}

.robot-panel {
  margin-top: 1.2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 26px;
  color: white;
  background:
    radial-gradient(circle at 100% 0%, rgba(143, 201, 174, 0.22), transparent 20rem),
    var(--forest);
  box-shadow: var(--shadow);
}

.robot-heading {
  gap: 0.9rem;
}

.robot-heading .mini-label {
  color: rgba(255, 255, 255, 0.6);
}

.robot-heading h3,
.robot-heading p {
  margin-bottom: 0;
}

.robot-heading p:last-child {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
}

.robot-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  color: var(--forest);
  background: var(--mint);
  font-size: 0.78rem;
  font-weight: 900;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.25rem 0 0.8rem;
}

.prompt-chips button {
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.83);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
}

.prompt-chips button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.robot-answer {
  min-height: 100px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.robot-answer p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
}

.robot-answer .robot-name {
  margin-bottom: 0.3rem;
  color: var(--mint);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.robot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.robot-form input {
  border-color: rgba(255, 255, 255, 0.16);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.robot-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.robot-form .button.primary {
  color: var(--forest);
  background: var(--mint);
}

.source-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 1rem;
  align-items: start;
}

.section-mini-heading {
  align-items: end;
  justify-content: space-between;
  margin: 1.5rem 0 0.7rem;
}

.section-mini-heading h3 {
  margin-bottom: 0;
}

.source-list {
  display: grid;
  gap: 0.65rem;
}

.source-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
}

.source-number {
  color: var(--orange);
  font-size: 0.68rem;
  font-weight: 900;
}

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

.source-card strong {
  font-size: 0.79rem;
}

.source-card span {
  color: var(--ink-faint);
  font-size: 0.64rem;
}

.source-card p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.source-card a {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.67rem;
  font-weight: 780;
  text-decoration: none;
}

.source-card a:hover {
  background: var(--mint-soft);
}

.limitation-panel {
  position: sticky;
  top: 98px;
  margin-top: 1.5rem;
}

.limitation-panel ul {
  display: grid;
  gap: 0.7rem;
  padding-left: 1.15rem;
  margin: 0;
}

.limitation-panel li,
.limitation-panel p {
  color: var(--ink-soft);
  font-size: 0.71rem;
}

.limitation-panel hr {
  margin: 1.2rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1320px, 100%);
  margin: 3rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.app-footer p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.64rem;
}

.app-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.app-footer nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--forest-2);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.app-footer nav a:hover {
  border-color: var(--forest-2);
  background: var(--mint-soft);
}

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: 360px;
  padding: 1rem;
  border-radius: 12px;
  color: white;
  background: var(--red);
}

.journey-panel {
  position: sticky;
  top: 90px;
  z-index: 14;
  width: min(1320px, 100%);
  margin: -1rem auto 1.35rem;
  padding: 0.75rem;
  border: 1px solid rgba(174, 189, 179, 0.88);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(16px);
}

.journey-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.journey-summary p {
  margin-bottom: 0.05rem;
}

.journey-summary > div > strong {
  font-size: 0.88rem;
}

.journey-summary > span {
  min-width: 54px;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  color: white;
  background: var(--forest);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.journey-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 0.4rem;
  overflow-x: auto;
}

.journey-track button {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 0.42rem;
  align-items: center;
  min-height: 48px;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--paper-2);
  text-align: left;
}

.journey-track button > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e6e9e4;
  font-size: 0.7rem;
  font-weight: 850;
}

.journey-track button strong {
  align-self: end;
  font-size: 0.74rem;
  line-height: 1.15;
}

.journey-track button small {
  align-self: start;
  color: var(--ink-faint);
  font-size: 0.68rem;
  line-height: 1.15;
}

.journey-track button.is-complete > span {
  color: white;
  background: #2f7653;
}

.journey-track button.is-active {
  border-color: var(--forest-2);
  color: white;
  background: var(--forest);
}

.journey-track button.is-active small {
  color: rgba(255, 255, 255, 0.78);
}

.candidate-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 1rem;
  margin: 1rem 0;
}

.candidate-funnel {
  display: grid;
  gap: 0.68rem;
}

.funnel-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 112px;
  gap: 0.65rem;
  align-items: center;
}

.funnel-row > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--forest);
  background: var(--mint-soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.funnel-row > strong {
  font-size: 0.78rem;
  text-align: right;
}

.funnel-label {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.funnel-label strong {
  font-size: 0.78rem;
}

.funnel-label small {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.funnel-track {
  height: 9px;
  margin-top: 0.24rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9e4;
}

.funnel-track > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-2), var(--mint));
}

.data-confidence {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.data-confidence > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.42rem;
  font-size: 0.78rem;
}

.data-confidence p,
.panel-intro {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.portfolio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.candidate-portfolio-list {
  display: grid;
  gap: 0.55rem;
}

.candidate-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(112px, 0.8fr) 92px auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
}

.candidate-row span,
.candidate-row strong {
  display: block;
}

.candidate-row span {
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.candidate-row strong {
  font-size: 0.78rem;
}

.candidate-row-actions {
  display: flex;
  gap: 0.35rem;
}

.candidate-row-actions button,
.risk-action button {
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--forest);
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 760;
}

.comparison-workbench {
  margin-bottom: 0.8rem;
}

.comparison-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.comparison-toolbar h3,
.comparison-toolbar p {
  margin-bottom: 0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-chips button {
  min-height: 36px;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper-2);
  font-size: 0.72rem;
  font-weight: 760;
}

.filter-chips button.is-active {
  color: white;
  border-color: var(--forest);
  background: var(--forest);
}

.selection-count {
  color: var(--ink-soft);
  font-size: 0.75rem;
  white-space: nowrap;
}

.technology-compare {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr);
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  min-width: max-content;
  border-bottom: 1px solid var(--line);
}

.compare-row:last-child {
  border-bottom: 0;
}

.compare-row > * {
  min-width: 0;
  padding: 0.7rem;
  margin: 0;
  border-right: 1px solid var(--line);
  font-size: 0.76rem;
}

.compare-row > *:last-child {
  border-right: 0;
}

.compare-row > span:first-child {
  color: var(--ink-soft);
  background: var(--paper-2);
  font-weight: 760;
}

.compare-head {
  color: var(--forest);
  background: var(--mint-soft);
}

.empty-state {
  padding: 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--paper-2);
  font-size: 0.78rem;
  text-align: center;
}

.tech-card {
  grid-template-columns: 40px minmax(145px, 0.75fr) minmax(140px, 1fr) minmax(150px, 1fr) 105px 90px 96px;
}

.tech-card.is-selected {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 2px rgba(36, 88, 79, 0.1);
}

.tech-select {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--forest);
  background: var(--paper-2);
  font-size: 0.7rem;
  font-weight: 760;
}

.tech-select input {
  width: 16px;
  height: 16px;
  margin-right: 0.35rem;
}

.economics-decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 1rem;
  margin: 1rem 0;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.scenario-card {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}

.scenario-card[data-case="base"] {
  border-color: var(--forest-2);
  background: var(--mint-soft);
}

.scenario-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
}

.scenario-card > div:first-child span {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 760;
}

.scenario-card > div:first-child strong {
  font-size: 1rem;
}

.scenario-card > p {
  min-height: 3.2em;
  margin: 0.45rem 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.scenario-card dl {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}

.scenario-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.scenario-card dt {
  color: var(--ink-faint);
}

.scenario-card dd {
  margin: 0;
  font-weight: 760;
}

.sensitivity-list {
  display: grid;
  gap: 0.68rem;
}

.sensitivity-row {
  display: grid;
  grid-template-columns: 104px minmax(70px, 1fr) 74px;
  gap: 0.55rem;
  align-items: center;
}

.sensitivity-row > span,
.sensitivity-row > strong {
  font-size: 0.72rem;
}

.sensitivity-row > strong {
  text-align: right;
}

.sensitivity-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e8e3;
}

.sensitivity-track > div {
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.carbon-check-panel,
.carbon-pathway-panel {
  margin: 1rem 0;
}

.carbon-check-progress {
  min-width: 90px;
  text-align: right;
}

.carbon-check-progress strong,
.carbon-check-progress span {
  display: block;
}

.carbon-check-progress strong {
  font-size: 1.2rem;
}

.carbon-check-progress span {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.carbon-check-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.carbon-check-grid label {
  display: flex;
  align-items: start;
  min-height: 104px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}

.carbon-check-grid strong,
.carbon-check-grid small {
  display: block;
}

.carbon-check-grid strong {
  font-size: 0.76rem;
}

.carbon-check-grid small {
  margin-top: 0.18rem;
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.carbon-pathway-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.carbon-pathway-grid article {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}

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

.pathway-heading > strong {
  color: var(--forest);
  font-size: 1.15rem;
}

.carbon-pathway-grid h4 {
  margin: 0.6rem 0 0.35rem;
  font-size: 0.86rem;
}

.carbon-pathway-grid p,
.carbon-pathway-grid small {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.carbon-pathway-grid p {
  margin-bottom: 0.5rem;
}

.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 0.6fr)) minmax(260px, 1.4fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.risk-summary-grid article {
  min-height: 116px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.risk-summary-grid span,
.risk-summary-grid strong,
.risk-summary-grid small {
  display: block;
}

.risk-summary-grid span,
.risk-summary-grid small {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.risk-summary-grid strong {
  margin: 0.28rem 0;
  font-size: 1.8rem;
  line-height: 1.1;
}

.risk-summary-grid .risk-next strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.risk-register {
  display: grid;
  gap: 0.55rem;
}

.risk-row {
  display: grid;
  grid-template-columns: 92px minmax(170px, 1.1fr) minmax(140px, 0.75fr) minmax(160px, 0.9fr) 110px;
  gap: 0.7rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 11px;
  background: var(--paper-2);
}

.risk-row[data-level="blocker"] {
  border-left-color: var(--red);
  background: #fff6f4;
}

.risk-row[data-level="controlled"] {
  border-left-color: #2f7653;
}

.risk-level span,
.risk-level small,
.risk-main strong,
.risk-meta span {
  display: block;
}

.risk-level span {
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 850;
}

.risk-row[data-level="controlled"] .risk-level span {
  color: #2f7653;
}

.risk-level small,
.risk-meta span {
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.risk-main strong {
  font-size: 0.78rem;
}

.risk-main p,
.risk-meta p {
  margin: 0.14rem 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.45;
}

.action-progress-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(160px, 0.5fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.action-progress-copy h3 {
  margin-bottom: 0.25rem;
}

.action-progress-copy p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.action-progress-visual > strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
  text-align: right;
}

.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.roadmap-card {
  grid-template-columns: 28px 92px minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(0, 1.25fr) 105px;
}

.roadmap-card.is-complete {
  border-left-color: #2f7653;
  background: #f2f8f3;
}

.roadmap-card.is-complete .roadmap-cell p {
  text-decoration: line-through;
  text-decoration-color: rgba(63, 85, 81, 0.45);
}

.roadmap-check {
  display: grid;
  place-items: center;
}

.roadmap-check input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.evidence-matrix-panel {
  margin-bottom: 1rem;
}

.glossary-panel {
  margin-bottom: 1rem;
}

.glossary-panel summary {
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 800;
}

.glossary-panel dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 0;
}

.glossary-panel dl > div {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}

.glossary-panel dt {
  color: var(--forest);
  font-weight: 850;
}

.glossary-panel dd {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.evidence-matrix {
  display: grid;
  gap: 0.5rem;
}

.evidence-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(155px, 0.8fr) minmax(190px, 1fr) 100px 64px;
  gap: 0.7rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
}

.evidence-row > div span,
.evidence-row > div strong {
  display: block;
}

.evidence-row > div span {
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.evidence-row > div strong,
.evidence-row > div p {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
}

.evidence-row > div p {
  color: var(--ink-soft);
}

.evidence-row > a {
  font-size: 0.72rem;
  font-weight: 760;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.8rem 1rem;
  border-radius: 11px;
  color: white;
  background: var(--forest);
  box-shadow: 0 14px 34px rgba(23, 48, 45, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast[data-tone="danger"] {
  background: #8d352e;
}

.toast[data-tone="warning"] {
  background: #6a5127;
}

.toast[data-tone="positive"] {
  background: #24583d;
}

/* Readability floor for explanatory copy and controls. */
.eyebrow,
.mini-label,
.privacy-pill,
.snapshot-pill,
.status-chip,
.tag,
.metric-card p,
.metric-card span,
.score-row span:first-child,
.sequence-list p,
.autosave-label,
.field,
.gate-check-grid strong,
.gate-check-grid small,
.tech-summary-card p,
.tech-name span,
.tech-copy span,
.tech-copy p,
.tech-score-line,
.tech-verdict,
.callout p,
.waterfall-row > span:first-child,
.waterfall-row strong,
.gap-labels,
.formula-note p,
.source-caption,
.carbon-flow p,
.carbon-flow article > span,
.integrity-list strong,
.integrity-list p,
.roadmap-cell p,
.roadmap-status,
.robot-heading p:last-child,
.prompt-chips button,
.robot-answer p,
.source-card strong,
.source-card span,
.source-card p,
.source-card a,
.limitation-panel li,
.limitation-panel p,
.app-footer p {
  font-size: 0.78rem;
}

.metric-card p,
.metric-card span,
.sequence-list p,
.field,
.gate-check-grid strong,
.gate-check-grid small,
.tech-summary-card p,
.tech-copy p,
.callout p,
.formula-note p,
.source-caption,
.integrity-list p,
.roadmap-cell p,
.robot-answer p,
.source-card strong,
.source-card p,
.limitation-panel li,
.limitation-panel p,
.data-confidence p,
.panel-intro,
.compare-row > *,
.scenario-card > p,
.carbon-pathway-grid p,
.carbon-pathway-grid small,
.risk-main p,
.risk-meta p,
.action-progress-copy p:last-child,
.evidence-row > div strong,
.evidence-row > div p {
  font-size: 0.875rem;
}

.brand-lockup .eyebrow,
.nav-index,
.field small,
.tech-summary-card span,
.gap-result span,
th,
.flow-arrow small,
.integrity-list li > span,
.roadmap-cell span,
.robot-answer .robot-name,
.source-number {
  font-size: 0.75rem;
}

@media (max-width: 1180px) {
  :root { --sidebar-width: 190px; }
  .suite-rail {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    overflow-x: auto;
  }
  .suite-rail-intro { display: none; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .candidate-workspace, .economics-decision-grid { grid-template-columns: 1fr; }
  .tech-card { grid-template-columns: 40px minmax(145px, 0.72fr) minmax(170px, 1.15fr) 100px 90px 96px; }
  .tech-card .tech-copy.condition-copy { display: none; }
  .carbon-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carbon-pathway-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .risk-summary-grid .risk-next { grid-column: 1 / -1; }
  .risk-row { grid-template-columns: 86px minmax(170px, 1fr) minmax(150px, 0.8fr) 105px; }
  .risk-row .risk-meta:nth-of-type(4) { grid-column: 2 / 4; }
  .roadmap-card { grid-template-columns: 28px 82px 1fr 1fr 105px; }
  .roadmap-card .roadmap-cell.what-cell { grid-column: 3 / 5; }
  .evidence-row { grid-template-columns: minmax(180px, 1fr) minmax(155px, 0.8fr) minmax(190px, 1fr) 100px; }
  .evidence-row > a { grid-column: 4; }
  .source-layout { grid-template-columns: 1fr; }
  .limitation-panel { position: static; margin-top: 0; }
}

@media (max-width: 920px) {
  .topbar { position: static; }
  .snapshot-pill { display: none; }
  .app-shell { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 16;
    width: 100%;
    height: auto;
    padding: 0.55rem 0.75rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 241, 232, 0.95);
    backdrop-filter: blur(12px);
  }
  .journey-panel { top: 62px; margin-top: 0; }
  .nav-list { display: flex; width: max-content; }
  .nav-item { grid-template-columns: auto; width: auto; padding: 0.55rem 0.75rem; }
  .nav-index, .sidebar-note { display: none; }
  .main-content { padding-top: 1.5rem; }
  .journey-track { grid-template-columns: repeat(7, minmax(112px, 1fr)); }
  .view-heading { align-items: start; }
  .decision-hero { min-height: 230px; }
  .input-grid, .compact-grid, .carbon-input-panel .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .tech-card { grid-template-columns: 38px minmax(0, 1fr) 120px 96px; }
  .tech-card .tech-copy { grid-column: 2 / 4; }
  .tech-card .condition-copy { display: block; }
  .tech-score { grid-column: 2 / 4; }
  .tech-verdict { grid-column: 3; grid-row: 1; }
  .tech-select { grid-column: 4; grid-row: 1; }
  .carbon-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); min-height: 40px; align-content: center; }
  .flow-arrow small { display: none; }
  .carbon-flow article { min-height: 120px; }
  .risk-row { grid-template-columns: 84px 1fr 110px; }
  .risk-row .risk-meta { grid-column: 2 / 4; }
  .risk-row .risk-action { grid-column: 3; grid-row: 1; }
  .action-progress-panel { grid-template-columns: 1fr 160px; }
  .action-toolbar { grid-column: 1 / -1; justify-content: flex-start; }
  .evidence-row { grid-template-columns: 1fr 1fr 100px; }
  .evidence-row > div:nth-child(3) { grid-column: 1 / 3; }
  .evidence-row > a { grid-column: 3; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .suite-rail { grid-template-columns: repeat(4, 152px); }
  .suite-rail > a { min-height: 56px; padding: 0.6rem 0.75rem; }
  .suite-rail strong { font-size: 0.78rem; }
  .topbar { align-items: center; flex-wrap: wrap; padding: 0.7rem 0.85rem; }
  .brand-lockup .eyebrow, .privacy-pill { display: none; }
  .top-actions { width: 100%; justify-content: stretch; }
  .top-actions .button { display: inline-flex; flex: 1; justify-content: center; min-height: 42px; font-size: 0.75rem; }
  .brand-mark { width: 36px; height: 36px; }
  .main-content { padding: 1.1rem 0.8rem 1.6rem; }
  .journey-panel { position: static; padding: 0.65rem; }
  .journey-summary > div > strong { font-size: 0.82rem; }
  .journey-track { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .view-heading { display: block; }
  .preset-control { min-width: 0; margin-top: 1rem; }
  .decision-hero { grid-template-columns: minmax(0, 1fr) 82px; gap: 0.8rem; padding: 1.2rem; }
  .decision-visual { display: grid; min-width: 72px; }
  .ring { width: 72px; height: 72px; }
  .ring::before { width: 54px; height: 54px; }
  .ring span { font-size: 0.88rem; }
  .decision-visual p { font-size: 0.75rem; text-align: center; }
  .decision-line { display: block; }
  .decision-code { margin-bottom: 0.55rem; }
  .metric-grid, .finance-metrics, .carbon-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 128px; }
  .two-column, .economics-grid { grid-template-columns: 1fr; }
  .input-heading { display: block; }
  .input-actions { justify-content: space-between; margin-top: 0.7rem; }
  .input-grid, .compact-grid, .carbon-input-panel .compact-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .gate-check-grid { grid-template-columns: 1fr; }
  .candidate-row { grid-template-columns: 1fr 1fr; }
  .candidate-row-actions { justify-content: flex-start; }
  .tech-summary { grid-template-columns: 1fr; }
  .tech-card { grid-template-columns: 34px 1fr; gap: 0.6rem; }
  .tech-score, .tech-card .tech-copy { grid-column: 2; }
  .tech-verdict { grid-column: 2; grid-row: auto; justify-self: start; }
  .tech-select { grid-column: 2; grid-row: auto; justify-self: start; }
  .scenario-grid { grid-template-columns: 1fr; }
  .scenario-card > p { min-height: 0; }
  .waterfall-row { grid-template-columns: 110px minmax(80px, 1fr) 62px; }
  .carbon-toggle-panel { display: block; }
  .switch-control { margin-top: 1rem; }
  .carbon-check-grid, .carbon-pathway-grid { grid-template-columns: 1fr; }
  .carbon-check-grid label { min-height: 82px; }
  .risk-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-summary-grid .risk-next { grid-column: 1 / -1; }
  .risk-row { grid-template-columns: 1fr; }
  .risk-row .risk-meta, .risk-row .risk-action { grid-column: auto; grid-row: auto; }
  .action-progress-panel { grid-template-columns: 1fr; }
  .action-toolbar { grid-column: auto; }
  .roadmap-card { grid-template-columns: 28px 1fr; }
  .roadmap-card > :not(.roadmap-check) { grid-column: 2; }
  .roadmap-card .roadmap-cell.what-cell { grid-column: 2; }
  .roadmap-status { justify-self: start; }
  .evidence-row { grid-template-columns: 1fr; }
  .evidence-row > div:nth-child(3), .evidence-row > a { grid-column: auto; }
  .glossary-panel dl { grid-template-columns: 1fr; }
  .source-card { grid-template-columns: 34px 1fr; }
  .source-card a { grid-column: 2; width: fit-content; }
  .handoff-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .handoff-actions { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .app-footer { display: block; }
  .app-footer p + p { margin-top: 0.35rem; }
  .app-footer nav { justify-content: flex-start; margin-top: 0.8rem; }
}

@media (max-width: 420px) {
  .metric-grid, .finance-metrics, .carbon-metrics { grid-template-columns: 1fr; }
  .hero-actions { display: grid; }
  .score-row { grid-template-columns: 105px 1fr 36px; }
  .robot-form { grid-template-columns: 1fr; }
  .risk-summary-grid { grid-template-columns: 1fr; }
  .candidate-row { grid-template-columns: 1fr; }
}

@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;
  }
}

@media print {
  .topbar, .suite-rail, .decision-journey, .sidebar, .journey-panel, .button, .prompt-chips, .robot-form, .toast { display: none !important; }
  .app-shell { display: block; }
  .main-content { padding: 0; }
  .view { display: block !important; break-after: page; }
  .decision-hero, .robot-panel { color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: none; }
  .panel, .metric-card, .tech-card, .roadmap-card { box-shadow: none; break-inside: avoid; }
}

/* Guided journey redesign */
.decision-journey {
  position: sticky;
  z-index: 19;
  top: 78px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(16px);
}

.decision-journey > a {
  min-width: 0;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border-right: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.decision-journey > a:last-child {
  border-right: 0;
}

.decision-journey > a:hover {
  background: rgba(36, 124, 115, 0.055);
  color: var(--ink);
}

.decision-journey > a.is-current {
  color: var(--ink);
  background: rgba(36, 124, 115, 0.075);
  box-shadow: inset 0 -3px var(--forest-2);
}

.decision-journey > a > span:first-child {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-weight: 800;
}

.decision-journey > a.is-current > span:first-child {
  border-color: var(--forest-2);
  background: var(--forest-2);
  color: white;
}

.decision-journey > a > span:last-child {
  min-width: 0;
  display: grid;
  gap: 0.05rem;
}

.decision-journey strong {
  font-size: 0.88rem;
}

.decision-journey small {
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.app-shell {
  display: block;
}

.sidebar {
  position: sticky;
  z-index: 18;
  top: 148px;
  width: 100%;
  height: auto;
  display: block;
  padding: 0.65rem clamp(1rem, 4vw, 4rem);
  overflow-x: auto;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 234, 0.96);
  backdrop-filter: blur(14px);
}

.nav-list {
  width: min(1160px, max-content);
  min-width: min(100%, 760px);
  display: flex;
  gap: 0.3rem;
  margin: 0 auto;
}

.nav-item {
  width: auto;
  min-width: 0;
  flex: 1 0 auto;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 0.85rem;
  border-radius: 9px;
  white-space: nowrap;
  font-size: 0.82rem;
}

.nav-item.is-active {
  background: var(--forest);
}

.main-content {
  padding: 2.4rem clamp(1rem, 4vw, 4rem) 2rem;
}

.view {
  width: min(1160px, 100%);
}

.view[data-view="overview"].is-active {
  display: flex;
  flex-direction: column;
}

.view[data-view="overview"] > .view-heading { order: 1; }
.view[data-view="overview"] > .handoff-card { order: 2; }
.view[data-view="overview"] > .onboarding-card { order: 3; }
.view[data-view="overview"] > .inputs-panel { order: 4; }
.view[data-view="overview"] > .gate-panel { order: 5; }
.view[data-view="overview"] > .decision-hero { order: 6; }
.view[data-view="overview"] > .metric-grid { order: 7; }
.view[data-view="overview"] > .two-column { order: 8; }

.onboarding-card {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(450px, 1.5fr) auto;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.onboarding-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1.35rem;
}

.onboarding-card p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.onboarding-card ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onboarding-card li {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.6rem;
  padding: 0 1rem;
  border-right: 1px solid var(--line);
}

.onboarding-card li:last-child {
  border-right: 0;
}

.onboarding-card li > span {
  width: 28px;
  height: 28px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 850;
}

.onboarding-card li strong {
  font-size: 0.78rem;
}

.onboarding-card li small {
  color: var(--ink-faint);
  font-size: 0.66rem;
  line-height: 1.45;
}

#project-inputs,
#project-gates {
  scroll-margin-top: 230px;
}

.inputs-panel {
  margin-top: 0;
  border-color: rgba(36, 124, 115, 0.28);
}

.gate-panel {
  margin-top: 1rem;
}

.decision-hero {
  margin-top: 1rem;
}

.sample-state-note {
  display: inline-flex;
  width: fit-content;
  margin: -0.45rem 0 1rem !important;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.83) !important;
  font-size: 0.72rem !important;
}

.view-heading {
  margin-bottom: 1.2rem;
}

.view-heading h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.metric-grid {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

@media (max-width: 980px) {
  .topbar {
    position: static;
  }

  .decision-journey {
    top: 0;
  }

  .sidebar {
    top: 70px;
  }

  .onboarding-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 680px) {
  .decision-journey > a {
    min-height: 62px;
    gap: 0.45rem;
    padding: 0.4rem 0.5rem;
  }

  .decision-journey > a > span:first-child {
    width: 29px;
    height: 29px;
    font-size: 0.72rem;
  }

  .decision-journey strong {
    font-size: 0.72rem;
  }

  .decision-journey small {
    display: none;
  }

  .sidebar {
    top: 62px;
    padding: 0.5rem 0.75rem;
  }

  .main-content {
    padding-top: 1.35rem;
  }

  .onboarding-card ol {
    grid-template-columns: 1fr;
  }

  .onboarding-card li {
    padding: 0.7rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .onboarding-card li:last-child {
    border-bottom: 0;
  }

  #project-inputs,
  #project-gates {
    scroll-margin-top: 150px;
  }
}

@media print {
  .decision-journey {
    display: none !important;
  }
}

/* Shared action hierarchy and contrast guardrails */
:root {
  --action-primary: #173f35;
  --action-primary-hover: #0f322a;
  --action-on-primary: #ffffff;
  --action-secondary: #e3efe8;
  --action-secondary-hover: #d7e8df;
  --action-border: #aebdb6;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 760;
  text-decoration: none;
}

.button.primary {
  border-color: var(--action-primary);
  background: var(--action-primary);
  color: var(--action-on-primary);
  box-shadow: 0 8px 20px rgba(23, 63, 53, 0.18);
}

.button.primary:hover {
  border-color: var(--action-primary-hover);
  background: var(--action-primary-hover);
}

.button.secondary {
  border-color: rgba(23, 63, 53, 0.2);
  background: var(--action-secondary);
  color: var(--action-primary);
  box-shadow: none;
}

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

.button.ghost {
  border-color: var(--action-border);
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
}

.button.ghost:hover {
  border-color: var(--forest-2);
  background: var(--paper-2);
}

.button.small {
  min-height: 36px;
}

.decision-hero .button.primary {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--action-primary);
}

.decision-hero .button.primary:hover {
  border-color: var(--mint-soft);
  background: var(--mint-soft);
}

.decision-hero .button.secondary {
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #ffffff;
}

.decision-hero .button.secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
}

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

.nav-item.is-active {
  border-color: var(--action-primary);
  background: var(--action-primary);
  color: var(--action-on-primary);
}

th {
  color: var(--ink);
  background: #e5ede8;
  font-weight: 760;
}

td {
  background: var(--paper);
  color: var(--ink);
}

tbody tr:nth-child(even) td {
  background: #faf8f2;
}

tbody tr.is-selected td {
  background: var(--mint-soft);
  color: var(--ink);
}

button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Keep the suite handoff and the seven-stage project flow readable together. */
.journey-panel {
  position: relative;
  top: auto;
}

.view[data-view="overview"] > .candidate-workspace { order: 8; }
.view[data-view="overview"] > .two-column { order: 9; }

.decision-journey small,
.onboarding-card li strong {
  font-size: 0.875rem;
}

.onboarding-card p:last-child,
.onboarding-card li small,
.sample-state-note {
  font-size: 0.875rem !important;
}

@media (max-width: 680px) {
  .decision-journey strong {
    font-size: 0.82rem;
  }
}
