:root {
  --ink: #18211d;
  --muted: #607067;
  --line: #dce4de;
  --paper: #f5f7f2;
  --surface: #ffffff;
  --green: #2e7653;
  --blue: #315f9a;
  --amber: #b4811f;
  --red: #b63f32;
  --sion-primary: #0f766e;
  --sion-blocked: #d9775b;
  --sion-warning: #d4a03c;
  --sion-success: #6b8e6b;
  --sion-ai-bg: #e6f0fa;
  --sion-bg: #f5f2ef;
  --sion-text: #2d2d2d;
  --sion-code-font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

aside {
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #edf2eb;
}

.brand {
  margin-bottom: 28px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
header p {
  color: var(--muted);
}

nav {
  display: grid;
  gap: 7px;
}

nav a {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

nav a.is-active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

main {
  min-width: 0;
  padding: 28px clamp(18px, 3vw, 42px);
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

header p,
h1,
h2 {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.warning-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.warning-stack p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e0c17b;
  border-radius: 8px;
  color: #5f4615;
  background: #fff8df;
}

.metric,
.table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric {
  min-height: 92px;
  padding: 16px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.metric strong {
  font-size: 1.8rem;
}

.table-shell {
  margin-bottom: 18px;
  overflow: hidden;
}

.table-shell h2 {
  margin: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
}

.pill {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 700;
}

button,
.button.secondary {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 700;
}

button.primary,
.button.primary {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.login-body,
.product-ui {
  display: block;
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.product-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar-actions,
.actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sidebar-nav {
  align-content: start;
  gap: 14px;
}

.nav-group strong {
  display: block;
  margin: 12px 10px 6px;
  color: var(--ink);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.nav-group a {
  display: block;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
}

.shell-main {
  padding: 0;
}

.page-content {
  padding: 28px clamp(18px, 3vw, 42px);
}

.breadcrumb {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.page-intro-copy {
  min-width: 0;
}

.page-intro p {
  margin: 6px 0 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-card,
.work-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.home-card,
.work-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.home-card h2,
.work-card h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.status-badge {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8faf7;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-ok {
  color: var(--green);
  border-color: #add8c0;
  background: #edf8f1;
}

.status-warning,
.status-attention,
.status-partially_ready {
  color: #68470d;
  border-color: #e0c17b;
  background: #fff8df;
}

.status-blocked,
.status-critical {
  color: var(--red);
  border-color: #e4aaa5;
  background: #fff1f0;
}

.count-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.count-list span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.count-list strong {
  font-size: 1.2rem;
}

.help-panel {
  padding: 14px;
  border: 1px solid #e0c17b;
  border-radius: 8px;
  color: #5f4615;
  background: #fff8df;
}

.hidden {
  display: none !important;
}

.content-stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.product-section,
.advanced-panel {
  padding: 16px;
}

.product-section h2,
.advanced-panel h2 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.advanced-panel {
  margin-top: 14px;
}

.advanced-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.responsibility-list {
  display: grid;
  gap: 10px;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
}

.fallback-indicator,
.translation-fallback::after {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f8faf7;
  font-size: 0.72rem;
  font-weight: 700;
}

.translation-fallback::after {
  content: "EN fallback";
  margin-left: 6px;
  margin-bottom: 0;
}

.language-control,
.public-language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.json-view {
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: var(--ink);
  background: #f9fbf8;
  font-size: 0.9rem;
  line-height: 1.45;
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.home-zones,
.task-lanes,
.review-cards,
.problem-list {
  display: grid;
  gap: 14px;
}

.home-zone,
.task-lane,
.focus-panel,
.progress-panel,
.first-time-guide,
.next-best-action,
.empty-state {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.home-zone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.home-action-card,
.task-card,
.review-card,
.problem-card,
.market-card,
.semaphore-card,
.focus-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.compact-intro {
  align-items: flex-start;
}

.disclaimer {
  width: fit-content;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid #e0c17b;
  border-radius: 8px;
  color: #5f4615;
  background: #fff8df;
  font-weight: 700;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 8px;
}

.market-card strong,
.market-card span {
  display: block;
}

.market-card span {
  color: var(--muted);
  font-weight: 700;
}

.semaphore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.semaphore-value {
  font-size: 2rem;
}

.explanation-panel {
  padding: 10px;
  border-radius: 8px;
  background: #f3f7f1;
  color: var(--ink);
}

.button.danger {
  color: white;
  border-color: var(--red);
  background: var(--red);
}

.button.is-disabled {
  pointer-events: none;
  opacity: 0.6;
}

.problem-card {
  grid-template-columns: 90px minmax(0, 1fr) auto auto auto;
  align-items: center;
}

.task-lanes {
  grid-template-columns: 1fr;
}

.task-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 10px;
}

.task-actions,
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.focus-panel {
  margin-bottom: 14px;
}

.focus-card {
  max-width: 720px;
}

.focus-instruction {
  font-size: 1.15rem;
}

.progress-panel {
  margin-bottom: 14px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #edf2eb;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

.first-time-guide {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.first-time-guide ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.guide-again {
  margin-bottom: 14px;
}

.trend-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf7;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.trend-up {
  color: var(--green);
}

.trend-down {
  color: var(--red);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.review-card {
  cursor: pointer;
}

.review-card:hover {
  border-color: #94b49a;
}

.review-card-title,
.flag-row,
.decision-grid,
.admin-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge-new {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  color: #0f5132;
  background: #dff3e8;
  border: 1px solid #a8d9bd;
  font-size: 0.75rem;
  font-weight: 800;
}

.review-detail {
  padding: 16px;
}

.comment-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.comment-field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.validation-message {
  color: var(--red);
  font-weight: 700;
}

.success-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  max-width: 420px;
  padding: 14px;
  border: 1px solid #a8d9bd;
  border-radius: 8px;
  background: #f0fbf4;
  box-shadow: 0 12px 36px rgb(26 45 32 / 18%);
}

.success-check {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 0;
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.green {
  background: var(--green);
}

.status-dot.yellow {
  background: #b4811f;
}

.status-dot.red {
  background: #b63f32;
}

.assessment-page,
.wizard-page {
  color: #2d2d2d;
}

.assessment-hero,
.assessment-detail-hero {
  background: #f5f2ef;
}

.assessment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.assessment-card,
.wizard-step-card,
.document-placement-card,
.uncertain-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px rgb(45 45 45 / 6%);
}

.assessment-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e7f3ef;
  color: #0f766e;
  font-size: 1.25rem;
}

.assessment-card h2,
.wizard-step-card h2 {
  margin: 0;
  font-size: 18px;
}

.assessment-card p,
.wizard-step-card p,
.document-placement-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.assessment-actions,
.segmented-buttons,
.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.capability-badges,
.connector-fallbacks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.capability-badge,
.connector-fallbacks span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf9;
  color: #2d2d2d;
  font-size: 12px;
  line-height: 1.3;
}

.connector-fallbacks {
  color: var(--muted);
  font-size: 13px;
}

.connector-fallbacks strong {
  font-size: 12px;
}

.segment {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: #2d2d2d;
  font-weight: 700;
}

.segment.active,
.button.primary {
  border-color: #0f766e;
  background: #0f766e;
  color: white;
}

.framework-layout,
.structure-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.clean-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.supportive-note,
.smart-skip {
  padding: 10px 12px;
  border: 1px solid #e3d4bb;
  border-radius: 8px;
  background: #fff8e8;
  color: #5b4519;
}

.wizard-step-grid {
  display: grid;
  gap: 14px;
}

.wizard-step-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.step-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e7f3ef;
  color: #0f766e;
  font-weight: 900;
}

.analysis-progress,
.ai-adviser-panel {
  padding: 16px;
  border: 1px solid #bad1e8;
  border-radius: 8px;
  background: #e6f0fa;
  color: #17324d;
}

.pulse {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2a6f9e;
  box-shadow: 0 0 0 8px rgb(42 111 158 / 12%);
}

.structure-layout {
  grid-template-columns: minmax(0, 4fr) minmax(260px, 1fr);
}

.structure-tree {
  display: grid;
  gap: 10px;
}

.structure-node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
}

.node-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #999;
}

.node-dot.confirmed,
.structure-node.confirmed {
  border-color: #6b8e6b;
}

.node-dot.confirmed {
  background: #6b8e6b;
}

.node-dot.ai {
  background: #2a6f9e;
}

.node-dot.amber {
  background: #d4a03c;
}

.node-dot.missing {
  background: #d9775b;
}

.node-dot.later {
  background: #9ca3af;
}

.suggestion-list {
  display: grid;
  gap: 8px;
}

.suggestion-row {
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

@media (max-width: 1100px) {
  .product-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .card-grid,
  .assessment-grid,
  .summary,
  .market-strip,
  .semaphore-grid,
  .home-zone-grid,
  .framework-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar,
  .page-intro,
  .section-heading {
    flex-wrap: wrap;
  }

  .problem-card,
  .review-layout,
    .first-time-guide,
    .wizard-step-card,
    .structure-layout {
    grid-template-columns: 1fr;
  }

  .first-time-guide {
    display: grid;
  }

  .task-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body,
  .summary,
  .panel-grid,
  .indicator-grid,
  .market-strip,
  .semaphore-grid,
  .home-zone-grid,
  .task-card,
  .success-panel {
    grid-template-columns: 1fr;
  }

  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  nav {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    overflow-x: auto;
  }

  header {
    display: grid;
  }

  .login-card,
  .product-shell,
  .assessment-grid,
  .framework-layout,
  .card-grid,
  .count-list,
  .work-item {
    grid-template-columns: 1fr;
  }
}

.task-card,
.review-card,
.semaphore-card,
.daily-focus-item,
.wizard-gate,
.proof-path-panel,
.empty-state-hero {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.task-card:hover,
.review-card:hover,
.semaphore-card:hover,
.daily-focus-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(24, 33, 29, 0.08);
}

.button,
button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:active,
button:active {
  transform: scale(0.98);
}

.grc-code {
  float: right;
  margin-left: 10px;
  color: var(--muted);
  font-family: var(--sion-code-font);
  font-size: 0.76rem;
  letter-spacing: 0;
}

.daily-focus-panel,
.proof-path-panel,
.decision-history,
.wizard-roadmap,
.gap-action-flow,
.ai-source-trace,
.sod-action-bar,
.task-grc-context {
  margin-top: 14px;
}

.daily-focus-list,
.proof-path-details,
.wizard-gates {
  display: grid;
  gap: 12px;
}

.daily-focus-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sion-primary);
  border-radius: 8px;
  background: var(--surface);
}

.focus-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: var(--sion-primary);
  font-weight: 800;
}

.daily-focus-condensed {
  opacity: 0.92;
}

.task-grc-context {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sion-primary);
  border-radius: 8px;
  background: #fbfcfa;
}

.task-grc-context p {
  margin: 0;
}

.why-me {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f7f1;
}

.evidence-thread,
.proof-path-graph {
  display: flex;
  gap: 8px;
  align-items: stretch;
  overflow-x: auto;
  padding: 8px 0;
}

.thread-node,
.proof-node {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  white-space: nowrap;
}

.thread-node {
  position: relative;
  padding-right: 12px;
  color: var(--sion-text);
  font-size: 0.86rem;
}

.thread-node::after {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--line);
}

.thread-node:last-child::after {
  display: none;
}

.thread-dot,
.proof-node-shape,
.gate-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: currentColor;
}

.thread-complete,
.proof-node-complete,
.gate-complete {
  color: var(--sion-success);
}

.thread-needs-review,
.proof-node-needs-review,
.gate-needs-review,
.gate-current {
  color: var(--sion-warning);
}

.thread-missing,
.proof-node-missing,
.gate-missing,
.thread-blocked,
.proof-node-blocked,
.gate-blocked {
  color: var(--sion-blocked);
}

.thread-not-applicable,
.proof-node-not-applicable,
.thread-unknown,
.proof-node-unknown,
.gate-not-applicable,
.gate-unknown {
  color: #8a928c;
}

.proof-path-graph {
  padding: 12px;
  border-radius: 8px;
  background: #f8faf7;
}

.proof-node {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--sion-text);
  font-weight: 700;
}

.proof-node-blocked .proof-node-shape,
.gate-blocked .gate-indicator {
  border-radius: 0;
  transform: rotate(45deg);
}

.proof-node.is-selected {
  border-color: var(--sion-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.proof-path-details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.proof-detail-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.proof-detail-row strong,
.proof-detail-row span {
  display: block;
}

.proof-detail-row strong {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.evidence-confidence,
.report-impact-badge,
.gap-status-badge,
.ai-source-trace {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.evidence-confidence summary,
.report-impact-badge summary {
  cursor: pointer;
  font-weight: 800;
}

.confidence-score {
  float: right;
  color: var(--sion-primary);
}

.confidence-medium,
.confidence-needs-review {
  border-left: 5px solid var(--sion-warning);
}

.confidence-high,
.confidence-complete {
  border-left: 5px solid var(--sion-success);
}

.confidence-low,
.confidence-missing {
  border-left: 5px solid var(--sion-blocked);
}

.report-impact-badge {
  border-left: 5px solid var(--sion-warning);
}

.gap-status-badge {
  border-left: 5px solid var(--sion-blocked);
  background: #fff8f3;
}

.decision-history ol {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.decision-history li {
  padding: 10px 12px;
  border-left: 3px solid var(--sion-primary);
  background: #fbfcfa;
}

.ai-source-trace {
  border-color: #b9d4ed;
  background: var(--sion-ai-bg);
}

.sod-action-bar {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.sod-explanation {
  margin: 8px 0 0;
  color: var(--muted);
}

.wizard-roadmap {
  margin-bottom: 16px;
}

.wizard-gates {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.wizard-gate {
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid currentColor;
  border-radius: 8px;
  background: var(--surface);
}

.wizard-gate strong,
.wizard-gate span,
.wizard-gate small {
  display: block;
  margin-top: 6px;
}

.completion-seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #b7c8b7;
  border-radius: 999px;
  color: #335f38;
  background: #edf6ed;
  font-weight: 800;
}

.completion-seal::before {
  content: "✓";
}

.empty-state-hero {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f5f4 100%);
}

.empty-illustration {
  display: grid;
  gap: 10px;
}

.empty-illustration span {
  display: block;
  height: 24px;
  border-radius: 999px;
  background: #d8e7e3;
}

.empty-illustration span:nth-child(2) {
  width: 78%;
  background: #dfe8f3;
}

.empty-illustration span:nth-child(3) {
  width: 54%;
  background: #e8dfcf;
}

@media (max-width: 1024px) {
  .daily-focus-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .daily-focus-item .button {
    grid-column: 2;
    justify-self: start;
  }

  .proof-path-details,
  .empty-state-hero {
    grid-template-columns: 1fr;
  }
}

/* Sprint 10.7.7 public product demo */
.public-ui {
  display: block;
  min-height: 100vh;
  color: #f4f7f5;
  background: #0b0e14;
}

.public-ui main {
  padding: 0;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  margin: 0;
  padding: 16px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(14px);
}

.public-brand {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.public-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.public-nav nav a {
  min-height: auto;
  padding: 8px 10px;
  color: #cbd5d1;
  text-decoration: none;
}

.public-nav select {
  color: #f4f7f5;
  border-color: rgba(255, 255, 255, 0.18);
  background: #111827;
}

.public-language {
  color: #cbd5d1;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(24px, 5vw, 72px);
  min-height: calc(100vh - 72px);
  padding: clamp(36px, 6vw, 92px) clamp(18px, 5vw, 84px);
  background:
    radial-gradient(circle at 20% 20%, rgba(15, 118, 110, 0.22), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(212, 160, 60, 0.16), transparent 28%),
    #0b0e14;
}

.hero-copy {
  max-width: 920px;
}

.eyebrow {
  color: #d4a03c;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-hero h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 0.95;
}

.public-hero h2,
.public-title-block h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

.public-hero p,
.public-title-block p {
  max-width: 820px;
  color: #cbd5d1;
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.public-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #eef8f5;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.public-button:hover {
  transform: translateY(-2px);
}

.public-button:active {
  transform: scale(0.98);
}

.public-button.primary {
  border-color: #0f766e;
  background: #0f766e;
}

.public-button.secondary {
  background: rgba(255, 255, 255, 0.08);
}

.public-button.gold {
  color: #0b0e14;
  border-color: #d4a03c;
  background: #d4a03c;
}

.evidence-thread {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 28px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.45);
  border-radius: 999px;
  color: #e7fffa;
  background: rgba(15, 118, 110, 0.12);
}

.evidence-thread span:not([aria-hidden]) {
  position: relative;
  animation: evidencePulse 4s ease-in-out infinite;
}

@keyframes evidencePulse {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .evidence-thread span,
  .analysis-strip.is-loading,
  .tree-node.is-revealed {
    animation: none;
  }
}

.trust-badge {
  display: inline-block;
  max-width: 780px;
  padding: 10px 12px;
  border: 1px solid rgba(230, 240, 250, 0.36);
  border-radius: 8px;
  color: #dceafa;
  background: rgba(230, 240, 250, 0.12);
}

.hero-product-preview,
.public-card,
.public-title-block,
.form-step,
.structure-demo-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.075);
}

.hero-product-preview {
  align-self: center;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.hero-product-preview article {
  padding: 16px;
  border-left: 4px solid #0f766e;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-product-preview strong {
  display: block;
  margin: 8px 0;
  color: #fff;
  font-size: 2rem;
}

.hero-product-preview small,
.muted {
  color: #aebdb8;
}

.ai-preview-card {
  border-left-color: #e6f0fa !important;
}

.public-demo-note,
.supportive-note {
  margin: 24px clamp(18px, 5vw, 84px);
  padding: 14px 16px;
  border: 1px solid rgba(212, 160, 60, 0.35);
  border-radius: 8px;
  color: #ffe6aa;
  background: rgba(212, 160, 60, 0.1);
}

.public-section,
.public-page {
  padding: 36px clamp(18px, 5vw, 84px);
}

.public-title-block {
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(255, 255, 255, 0.06));
}

.public-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.public-card {
  padding: 18px;
  color: #eef8f5;
  border-left: 4px solid #0f766e;
}

.public-card h3 {
  margin-top: 10px;
  color: #fff;
  font-size: clamp(20px, 2vw, 24px);
}

.public-card p,
.public-card li {
  color: #cbd5d1;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.5;
}

.public-card:hover {
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.status-chip,
.public-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eef8f5;
  background: rgba(255, 255, 255, 0.08);
}

.status-chip.warning {
  color: #ffe2a2;
  background: rgba(212, 160, 60, 0.16);
}

.public-chip {
  cursor: pointer;
}

.public-chip.is-active {
  border-color: #0f766e;
  background: #0f766e;
}

.country-row,
.demo-doc-list,
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-demo-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
}

.demo-doc,
.tree-node,
.proof-node {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #eef8f5;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.demo-doc.is-active,
.tree-node:hover {
  border-color: #0f766e;
}

.structure-demo-panel {
  padding: 18px;
}

.analysis-strip {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 8px;
  color: #17416b;
  background: #e6f0fa;
}

.analysis-strip.is-loading {
  animation: aiBreathe 1.4s ease-in-out infinite;
}

@keyframes aiBreathe {
  0%, 100% { box-shadow: 0 0 0 rgba(230, 240, 250, 0); }
  50% { box-shadow: 0 0 28px rgba(230, 240, 250, 0.32); }
}

.tree-node strong,
.tree-node span,
.tree-node small {
  display: block;
}

.tree-node small {
  color: #aebdb8;
}

.public-mini-metric {
  display: block;
  margin: 14px 0;
  color: #f7d37a;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1;
}

.demo-card-preview {
  display: grid;
  gap: 7px;
  min-height: 62px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.demo-card-preview span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.85), rgba(212, 160, 60, 0.7));
}

.demo-card-preview span:nth-child(2) {
  width: 76%;
  background: rgba(230, 240, 250, 0.55);
}

.demo-card-preview span:nth-child(3) {
  width: 52%;
  background: rgba(255, 255, 255, 0.2);
}

.card-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.comparison-card {
  min-height: 260px;
}

.comparison-card.is-after {
  border-left-color: #d4a03c;
}

.asset-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.asset-card strong {
  display: block;
  color: #f7d37a;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
}

.source-chip,
.confidence-badge {
  display: inline-flex;
  width: fit-content;
  margin: 4px 4px 0 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(230, 240, 250, 0.14);
  color: #dceafa;
  font-size: 13px;
}

.confidence-badge {
  color: #0b0e14;
  background: #e6f0fa;
}

.tree-node.is-revealed {
  animation: publicNodeReveal 0.36s ease-out;
}

@keyframes publicNodeReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.request-funnel {
  max-width: 1060px;
  margin: 0 auto;
}

.funnel-step {
  display: none;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.funnel-step.is-active {
  display: grid;
}

.funnel-step h2 {
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
}

.step-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.request-option {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #eef8f5;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.request-option strong {
  font-size: 18px;
}

.request-option span {
  color: #cbd5d1;
  font-size: 15px;
  line-height: 1.45;
}

.request-option.is-selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.2);
}

.compact-field {
  max-width: 420px;
}

.optional-details {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.optional-details summary {
  cursor: pointer;
  color: #eef8f5;
  font-weight: 800;
}

.funnel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

#formMessage {
  min-height: 24px;
  color: #ffe6aa;
  font-weight: 700;
}

.node-detail-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(230, 240, 250, 0.12);
}

.proof-path-public {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 18px clamp(18px, 5vw, 84px);
}

.proof-arrow {
  align-self: center;
  color: #d4a03c;
}

.request-form {
  display: grid;
  gap: 18px;
}

.form-step {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.request-form label {
  display: grid;
  gap: 6px;
  color: #eef8f5;
}

.request-form input,
.request-form select,
.request-form textarea {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #f4f7f5;
  background: #111827;
}

.request-form textarea {
  min-height: 96px;
}

.ack {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.floating-cta {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px 12px 18px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  background: #0f766e;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

.floating-cta button {
  min-height: 28px;
  width: 28px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1024px) {
  .public-hero h1 {
    font-size: clamp(42px, 5.4vw, 56px);
  }

  .public-hero,
  .ai-demo-layout,
  .split,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .public-card-grid,
  .asset-card-grid,
  .step-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-card-grid,
  .asset-card-grid,
  .step-option-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .floating-cta {
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: space-between;
    border-radius: 12px;
  }
}
