:root {
  color-scheme: light;
  --background: #f4f4ef;
  --surface: #ffffff;
  --surface-soft: #f8f8f4;
  --surface-accent: #e7eee9;
  --ink: #17221d;
  --ink-soft: #5f6b65;
  --ink-faint: #89928d;
  --line: #dde1db;
  --line-strong: #c7cec8;
  --accent: #145d47;
  --accent-strong: #0d4937;
  --accent-soft: #d8e9df;
  --warm: #9c5d35;
  --warm-soft: #f3e6da;
  --shadow: 0 20px 50px rgb(34 48 41 / 8%);
  --sidebar-width: 250px;
  --radius-large: 22px;
  --radius-medium: 15px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #121713;
  --surface: #1a211c;
  --surface-soft: #202922;
  --surface-accent: #23372d;
  --ink: #eef3ef;
  --ink-soft: #b1bcb5;
  --ink-faint: #818e86;
  --line: #303b33;
  --line-strong: #445148;
  --accent: #76c9a8;
  --accent-strong: #9bddc2;
  --accent-soft: #244536;
  --warm: #e2a77e;
  --warm-soft: #4a3428;
  --shadow: 0 20px 60px rgb(0 0 0 / 28%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button,
a[href] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 48%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-150%);
}

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

.demo-banner {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: var(--surface);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  padding-top: 28px;
}

.sidebar {
  position: sticky;
  top: 28px;
  display: flex;
  height: calc(100vh - 28px);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 28px 20px 20px;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 30px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 700;
}

.brand strong,
.brand small,
.profile-card strong,
.profile-card small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.brand small,
.profile-card small {
  color: var(--ink-soft);
  font-size: 11px;
}

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

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--ink);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--surface-accent);
  color: var(--accent);
  font-weight: 700;
}

.nav-icon {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.nav-count {
  margin-left: auto;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar-support {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface-soft);
  padding: 15px;
}

.sidebar-support p {
  margin: 0 0 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.text-button,
.evidence-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-weight: 750;
}

.text-button:hover,
.evidence-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 8px 0;
}

.profile-card strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--warm-soft);
  color: var(--warm);
  font-size: 10px;
  font-weight: 800;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.icon-button.subtle {
  border-color: transparent;
  background: transparent;
}

.main-content {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 42px clamp(24px, 4vw, 64px) 80px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar h1 {
  margin: 2px 0 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(29px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.topbar p {
  margin: 0;
  color: var(--ink-soft);
}

.eyebrow,
.section-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.save-state {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-soft);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b9d6f;
  box-shadow: 0 0 0 4px color-mix(in srgb, #3b9d6f 14%, transparent);
}

.hero-card {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.7fr);
  gap: 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius-large);
  background:
    radial-gradient(
      circle at 88% 15%,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 32%
    ),
    var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 48px);
}

.hero-copy {
  align-self: center;
}

.hero-copy .section-label,
.card .section-label,
.section-header .section-label,
.panel-header .section-label {
  margin: 0 0 8px;
}

.hero-card h2 {
  max-width: 680px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 43px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-description {
  max-width: 650px;
  margin: 18px 0 26px;
  color: var(--ink-soft);
}

.hero-actions,
.card-footer {
  display: flex;
  align-items: center;
  gap: 18px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 11px;
  cursor: pointer;
  padding: 10px 17px;
  font-weight: 750;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 20%, transparent);
  color: #fff;
}

:root[data-theme="dark"] .primary-button {
  color: #102019;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.time-estimate {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.progress-visual {
  display: grid;
  place-items: center;
  align-content: center;
}

.progress-ring {
  --progress: 0;
  display: grid;
  width: 154px;
  height: 154px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) 0 calc(var(--progress) * 1%),
    var(--line) calc(var(--progress) * 1%) 100%
  );
}

.progress-ring::before {
  position: absolute;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.progress-ring div {
  position: relative;
  display: grid;
  text-align: center;
}

.progress-ring strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
}

.progress-ring span,
.progress-visual p {
  color: var(--ink-soft);
  font-size: 11px;
}

.progress-visual p {
  margin: 14px 0 0;
}

.progress-visual p strong {
  color: var(--ink);
}

.dashboard-grid,
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.card,
.section-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.card {
  padding: 25px;
}

.card-heading,
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.card h2,
.section-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.card > p {
  margin: 12px 0 20px;
  color: var(--ink-soft);
}

.step-badge,
.analysis-state {
  flex: none;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini-progress,
.panel-progress {
  overflow: hidden;
  height: 5px;
  border-radius: 99px;
  background: var(--line);
}

.mini-progress span,
.panel-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.card-footer {
  justify-content: space-between;
  margin-top: 14px;
}

.card-footer > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.quality-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d39a44;
  box-shadow: 0 0 0 6px color-mix(in srgb, #d39a44 14%, transparent);
}

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

.quality-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.quality-list strong {
  color: var(--ink);
  font-weight: 750;
}

.section-block {
  margin-top: 18px;
  padding: 28px;
}

.section-header {
  align-items: center;
  margin-bottom: 20px;
}

.experience-list {
  display: grid;
}

.experience-card {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr) auto;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.experience-card:first-child {
  border-top: 0;
  padding-top: 3px;
}

.experience-card:last-child {
  padding-bottom: 0;
}

.experience-date {
  display: flex;
  flex-direction: column;
  color: var(--ink-soft);
  font-size: 11px;
}

.experience-date strong {
  color: var(--ink);
  font-size: 14px;
}

.experience-card h3,
.insight-card h3 {
  margin: 7px 0 1px;
  font-size: 16px;
}

.experience-card p,
.insight-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.data-type {
  display: inline-flex;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.data-type.fact {
  background: var(--accent-soft);
  color: var(--accent);
}

.data-type.hypothesis {
  background: var(--warm-soft);
  color: var(--warm);
}

.data-type.recommendation {
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 650;
}

.insight-section {
  background: color-mix(in srgb, var(--surface-accent) 44%, var(--surface));
}

.insight-grid {
  margin-top: 0;
}

.insight-card {
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: var(--radius-medium);
  background: var(--surface);
  padding: 20px;
}

.insight-card.muted {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.insight-card p {
  min-height: 62px;
  margin: 8px 0 14px;
}

.evidence-link {
  font-size: 11px;
}

.app-view.active {
  animation: view-in 220ms ease-out both;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
  padding-top: 4px;
}

.page-header h1 {
  max-width: 760px;
  margin: 3px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.page-header p {
  max-width: 690px;
  margin: 0;
  color: var(--ink-soft);
}

.primary-button.compact,
.secondary-button.compact {
  min-height: 40px;
  flex: none;
  padding: 8px 13px;
  font-size: 12px;
}

.journey-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.journey-stats article {
  display: flex;
  min-height: 106px;
  align-items: center;
  gap: 14px;
  border-left: 1px solid var(--line);
  padding: 22px 26px;
}

.journey-stats article:first-child {
  border-left: 0;
}

.journey-stats article > span:last-child {
  max-width: 120px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.stat-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1;
}

.journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(245px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.journey-detail {
  min-width: 0;
}

.completion-label {
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline {
  position: relative;
  display: grid;
  margin-top: 4px;
}

.timeline::before {
  position: absolute;
  top: 13px;
  bottom: 26px;
  left: 8px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0 30px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-marker.muted {
  background: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.timeline-content {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 28px;
}

.timeline-item:last-child .timeline-content {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.timeline-heading h3 {
  margin: 8px 0 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.timeline-heading p,
.detail-columns p,
.missing-detail p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.detail-columns > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 15px;
}

.detail-columns h4 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.detail-columns ul {
  margin: 0;
  padding-left: 17px;
  color: var(--ink-soft);
  font-size: 12px;
}

.detail-columns li + li {
  margin-top: 5px;
}

.evidence-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.evidence-row > span {
  flex: none;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.evidence-row .tag-list {
  margin: 0;
}

.missing-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 15px;
}

.missing-detail > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.missing-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
}

.missing-detail strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.journey-side {
  position: sticky;
  top: 48px;
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.objective-card h2,
.source-card h2,
.vigilance-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.objective-card p:not(.section-label) {
  margin: 12px 0 16px;
  color: var(--ink-soft);
  font-size: 12px;
}

.source-list {
  display: grid;
  gap: 13px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  display: grid;
  grid-template-columns: 35px 1fr;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.source-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 850;
}

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

.source-list strong {
  font-size: 11px;
}

.source-list small {
  color: var(--ink-soft);
  font-size: 10px;
}

.results-header {
  align-items: center;
}

.confidence-pill {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-soft);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
}

.confidence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d39a44;
}

.result-notice {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 11px;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, #d39a44 35%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, #d39a44 9%, var(--surface));
  padding: 15px 18px;
}

.result-notice > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, #d39a44 24%, transparent);
  color: var(--warm);
  font-family: Georgia, serif;
  font-style: italic;
}

.result-notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dimension-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  padding: 27px;
}

.dimension-card.documented {
  background:
    radial-gradient(
      circle at 100% 0,
      color-mix(in srgb, var(--accent) 10%, transparent),
      transparent 42%
    ),
    var(--surface);
}

.dimension-card.incomplete {
  border-style: dashed;
}

.dimension-topline,
.dimension-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.confidence-level {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.dimension-card h2 {
  margin: 17px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

.dimension-card > p {
  min-height: 68px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.qualitative-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin: 24px 0 18px;
}

.qualitative-scale span {
  height: 7px;
  border-radius: 99px;
  background: var(--line);
}

.qualitative-scale span.active {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.empty-scale {
  height: 7px;
  margin: 24px 0 18px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, var(--line) 0 16%, transparent 16% 18%);
}

.dimension-footer {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.dimension-footer > span {
  color: var(--ink-faint);
  font-size: 10px;
}

.results-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.evidence-list {
  display: grid;
}

.evidence-list article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.evidence-list article:first-child {
  border-top: 0;
  padding-top: 2px;
}

.evidence-list article:last-child {
  padding-bottom: 0;
}

.evidence-index {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
}

.evidence-list h3 {
  margin: 7px 0 3px;
  font-size: 13px;
}

.evidence-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.evidence-strength {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 700;
}

.vigilance-card {
  margin-top: 18px;
}

.vigilance-card ul {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.vigilance-card li {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 11px;
}

.vigilance-card li > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 7px;
  background: var(--warm-soft);
  color: var(--warm);
  font-size: 9px;
  font-weight: 850;
}

.vigilance-card .secondary-button {
  width: 100%;
}

.panel-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgb(9 17 12 / 38%);
  backdrop-filter: blur(3px);
}

.questionnaire-panel {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  display: grid;
  width: min(590px, 100%);
  height: 100vh;
  grid-template-rows: auto auto 1fr auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -30px 0 70px rgb(15 27 20 / 16%);
  transform: translateX(105%);
  transition: transform 240ms ease;
}

.questionnaire-panel.open {
  transform: translateX(0);
}

.panel-header,
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 30px;
}

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

.question-counter {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.panel-progress {
  height: 4px;
  border-radius: 0;
}

.panel-progress span {
  width: 55%;
  transition: width 220ms ease;
}

.question-content {
  overflow-y: auto;
  padding: clamp(34px, 7vh, 70px) 30px 30px;
}

.question-content h2 {
  max-width: 500px;
  margin: 14px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.23;
}

.question-help {
  max-width: 480px;
  margin: 0;
  color: var(--ink-soft);
}

.scale-fieldset {
  margin: 42px 0 30px;
  border: 0;
  padding: 0;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.scale-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.scale-option {
  aspect-ratio: 1;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  font-weight: 750;
  transition:
    border 150ms ease,
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.scale-option:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.scale-option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.method-note {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
}

.method-note > span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
}

.method-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.panel-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.answer-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

form label {
  display: block;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}

.consent-label input {
  margin-top: 3px;
}

form input[type="text"],
form input[type="date"],
form input[type="password"],
form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
}

form input:focus-visible,
form textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 48%, transparent);
  outline-offset: 1px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.choice-options {
  display: grid;
  gap: 10px;
}

.choice-option {
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  padding: 14px 16px;
  text-align: left;
  transition:
    border 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.choice-option:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.choice-option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.finding-card {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.finding-card:first-child {
  border-top: 0;
  padding-top: 2px;
}

.finding-card p {
  margin: 6px 0 8px;
  color: var(--ink-soft);
  font-size: 13px;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 15;
    top: 28px;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 18px;
  }

  .brand {
    padding: 0;
  }

  .brand small,
  .sidebar-support,
  .profile-card {
    display: none;
  }

  .main-nav {
    display: flex;
    overflow-x: auto;
    margin-top: 10px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-item {
    width: auto;
    flex: none;
    white-space: nowrap;
  }

  .main-content {
    padding-top: 28px;
  }

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

  .progress-visual {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
  }

  .progress-ring {
    width: 116px;
    height: 116px;
  }

  .progress-ring::before {
    width: 94px;
    height: 94px;
  }

  .journey-layout,
  .results-detail-grid {
    grid-template-columns: 1fr;
  }

  .journey-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }

  .vigilance-card {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 24px 14px 64px;
  }

  .topbar {
    align-items: center;
  }

  .topbar .eyebrow,
  .topbar > div > p:last-child {
    display: none;
  }

  .topbar h1 {
    font-size: 29px;
  }

  .hero-card {
    padding: 25px 20px;
  }

  .hero-card h2 {
    font-size: 30px;
  }

  .hero-actions,
  .card-footer,
  .panel-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .dashboard-grid,
  .insight-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  .page-header h1 {
    font-size: 35px;
  }

  .page-header .primary-button {
    width: 100%;
  }

  .journey-stats {
    grid-template-columns: 1fr;
  }

  .journey-stats article {
    min-height: 78px;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 16px 20px;
  }

  .journey-stats article:first-child {
    border-top: 0;
  }

  .journey-side,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .missing-detail,
  .dimension-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .evidence-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-header {
    align-items: flex-start;
  }

  .confidence-pill {
    align-self: flex-start;
  }

  .evidence-list article {
    grid-template-columns: 25px minmax(0, 1fr);
  }

  .evidence-strength {
    grid-column: 2;
    justify-self: start;
  }

  .card,
  .section-block {
    border-radius: 17px;
    padding: 20px;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .experience-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }

  .experience-card .icon-button {
    display: none;
  }

  .panel-header,
  .panel-footer,
  .question-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .panel-footer .answer-status {
    text-align: center;
  }
}

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

/* --- Aide latérale dépliable --- */

.sidebar-support summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.help-steps {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.help-steps li + li {
  margin-top: 6px;
}

/* --- État « analyse en cours » et bandeau de statut du rapport --- */

.analysis-running {
  border-color: var(--accent);
}

.status-dot.pulsing {
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.report-banner {
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid #b98a2c;
  border-radius: var(--radius-medium);
  background: var(--surface-soft);
  font-size: 14px;
}

.report-banner.validated {
  border-left-color: var(--accent);
}

/* --- Propositions issues du CV --- */

.cv-proposal {
  border: 1px dashed var(--line);
  border-radius: var(--radius-medium);
  padding: 14px;
}

.cv-proposal .hero-actions {
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .status-dot.pulsing {
    animation: none;
  }
}

/* --- Cartes de constats du rapport ---
   La liste parente (.evidence-list) impose une grille à trois colonnes héritée
   d'un ancien composant : les constats reprennent une disposition en bloc. */

.evidence-list .finding-card {
  display: block;
  grid-template-columns: none;
  padding: 18px 0;
}

.finding-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.finding-statement {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.citation-block {
  margin-top: 10px;
}

.citation-block summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.citation-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.citation-list li {
  border-left: 2px solid var(--line-strong);
  color: var(--ink-soft);
  padding: 2px 0 2px 12px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
}

.citation-list li + li {
  margin-top: 8px;
}

/* Missions et réalisations d'une expérience : liste lisible plutôt que des
   pastilles, les phrases étant trop longues pour ce format. */

.experience-card .tag-list {
  display: block;
}

.experience-card .tag-list li {
  border: 0;
  border-left: 2px solid var(--line);
  border-radius: 0;
  padding: 2px 0 2px 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.experience-card .tag-list li + li {
  margin-top: 6px;
}

/* --- Envoi d'un fichier CV --- */

.cv-upload {
  margin: 14px 0 4px;
}

.file-drop {
  display: grid;
  gap: 4px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-medium);
  background: var(--surface-soft);
  cursor: pointer;
  padding: 18px;
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: var(--accent);
  background: var(--surface-accent);
}

.file-drop strong {
  color: var(--accent);
  font-size: 14px;
}

.file-drop span {
  color: var(--ink-soft);
  font-size: 12px;
}

.file-drop input[type="file"] {
  margin: 8px auto 0;
  max-width: 100%;
  font-size: 12px;
}

.cv-paste {
  margin-top: 14px;
}

.cv-paste summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.cv-paste form {
  margin-top: 12px;
}

/* --- Assistant conversationnel --- */

.sidebar-support {
  display: grid;
  gap: 10px;
}

.sidebar-support details summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.assistant-panel {
  display: flex;
  flex-direction: column;
}

.assistant-log {
  display: grid;
  flex: 1;
  gap: 10px;
  align-content: start;
  overflow-y: auto;
  padding: 20px clamp(20px, 4vw, 32px);
}

.assistant-message {
  margin: 0;
  max-width: 92%;
  border-radius: var(--radius-medium);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.assistant-message.assistant {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.assistant-message.beneficiary {
  justify-self: end;
  background: var(--surface-accent);
  color: var(--ink);
}

.assistant-message.failed {
  border-color: var(--warm);
  color: var(--warm);
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.assistant-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

@media (max-width: 640px) {
  .assistant-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
