:root {
  --ink: #101512;
  --muted: #5d665f;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --line: #dfe5dd;
  --green: #74bf44;
  --green-dark: #275f2f;
  --teal: #1e6f68;
  --amber: #b87818;
  --red: #a3312f;
  --shadow: 0 18px 55px rgba(16, 21, 18, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 4px;
  font-size: 0.78rem;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 73px);
  padding: clamp(44px, 7vw, 92px) clamp(18px, 4vw, 56px) 30px;
  background: linear-gradient(90deg, rgba(251, 250, 245, 1) 0%, rgba(251, 250, 245, 0.88) 48%, rgba(251, 250, 245, 0.45) 100%);
}

.hero h1 {
  max-width: 870px;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.24rem);
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.report-actions,
.form-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

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

.button.small {
  min-height: 34px;
  justify-self: start;
  padding: 0 12px;
  font-size: 0.88rem;
}

.hero-image {
  min-height: min(620px, 64vh);
  border: 1px solid rgba(16, 21, 18, 0.1);
  background-image: linear-gradient(180deg, rgba(16, 21, 18, 0.02), rgba(16, 21, 18, 0.08)), url("../assets/dse-hybrid-workplace.png");
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.signal-strip div {
  padding: 24px clamp(18px, 3vw, 42px);
  border-right: 1px solid rgba(255, 255, 255, 0.17);
}

.signal-strip strong,
.signal-strip span {
  display: block;
}

.signal-strip span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: clamp(28px, 5vw, 60px) clamp(18px, 4vw, 56px);
}

.progress-panel,
.assessment-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 8px 28px rgba(16, 21, 18, 0.06);
}

.progress-panel {
  position: sticky;
  top: 94px;
  align-self: start;
  padding: 22px;
}

.progress-panel h2,
.knowledge h2 {
  margin: 0;
  font-size: 1.55rem;
}

#stepList {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

#stepList li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

#stepList li::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

#stepList li.is-active {
  color: var(--ink);
  font-weight: 800;
}

#stepList li.is-active::before,
#stepList li.is-complete::before {
  border-color: var(--green);
  background: var(--green);
}

.risk-meter {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.risk-meter span {
  color: var(--muted);
}

.risk-meter strong {
  display: block;
  margin: 5px 0 12px;
  font-size: 1.2rem;
}

.meter {
  overflow: hidden;
  height: 11px;
  background: #edf1ea;
  border-radius: 99px;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 200ms ease, background 200ms ease;
}

.assessment-form {
  padding: clamp(22px, 4vw, 42px);
}

.form-step {
  display: none;
}

.form-step.is-active {
  display: block;
}

.step-heading {
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.step-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  letter-spacing: 0;
}

.step-heading p:last-child {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.6;
}

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

.demo-identity {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f8f4;
}

.demo-identity span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.demo-identity strong {
  font-size: 1.25rem;
}

.demo-identity p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--ink);
  font-weight: 800;
}

fieldset {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

legend {
  padding: 0 8px;
  font-weight: 900;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea {
  width: 100%;
  border: 1px solid #cbd4c9;
  border-radius: 5px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.choice-grid label,
.radio-stack label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px;
  background: #f7f8f4;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 700;
}

.radio-stack {
  display: grid;
  gap: 10px;
}

.question-list,
.place-list {
  display: grid;
  gap: 14px;
}

.question,
.place-section,
.review-box {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px;
  background: #fff;
}

.question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 18px;
  align-items: center;
}

.question h3,
.place-section h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.question p,
.review-box p,
.actions-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.answer-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.answer-row label {
  display: grid;
  min-height: 44px;
  place-items: center;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f8f4;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.answer-row input {
  position: absolute;
  opacity: 0;
}

.answer-row label:has(input:checked) {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.place-section h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.place-section h3::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--green);
  border-radius: 50%;
}

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

.review-box span {
  color: var(--muted);
  font-weight: 800;
}

.review-box strong {
  display: block;
  margin: 6px 0;
  font-size: 2rem;
}

.summary-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f8f4;
}

.summary-panel h3,
.actions-panel h3 {
  margin: 0 0 12px;
}

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

.summary-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.summary-item strong {
  display: block;
  margin-top: 5px;
}

.actions-panel {
  margin-top: 18px;
}

.action-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.action-item:first-child {
  border-top: 1px solid var(--line);
}

.priority {
  align-self: start;
  padding: 6px 8px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.priority.high {
  color: #fff;
  background: var(--red);
}

.priority.medium {
  color: #1f1707;
  background: #f2c66d;
}

.priority.low {
  color: #fff;
  background: var(--teal);
}

.knowledge {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 32px;
  padding: clamp(34px, 5vw, 70px) clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.source-grid a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
  font-weight: 800;
}

.pdf-report {
  display: none;
}

@media (max-width: 920px) {
  .topbar,
  nav,
  .signal-strip,
  .workspace,
  .knowledge,
  .question,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-image {
    min-height: 320px;
  }

  .progress-panel {
    position: static;
  }

  .field-grid,
  .summary-list,
  .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .answer-row {
    grid-template-columns: 1fr;
  }

  .action-item {
    grid-template-columns: 1fr;
  }
}

@media print {
  .topbar,
  .hero,
  .signal-strip,
  .progress-panel,
  .form-controls,
  .report-actions,
  .knowledge,
  .assessment-form {
    display: none;
  }

  body {
    background: #fff;
  }

  .workspace {
    display: block;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .pdf-report {
    display: block;
    color: #111;
    font-size: 11pt;
  }

  .pdf-report-header {
    border-bottom: 2px solid #111;
    margin-bottom: 18px;
    padding-bottom: 12px;
  }

  .pdf-report h1 {
    margin: 0;
    font-size: 24pt;
  }

  .pdf-section {
    break-inside: avoid;
    margin: 0 0 18px;
  }

  .pdf-section h2 {
    margin: 0 0 8px;
    font-size: 15pt;
  }

  .pdf-table {
    width: 100%;
    border-collapse: collapse;
  }

  .pdf-table th,
  .pdf-table td {
    border: 1px solid #999;
    padding: 7px;
    text-align: left;
    vertical-align: top;
  }

  .pdf-table th {
    background: #efefef;
  }
}
