:root {
  --paper: #f3f5f2;
  --surface: #ffffff;
  --surface-muted: #e8ece8;
  --ink: #15211e;
  --muted: #596762;
  --line: #c8d0cb;
  --line-strong: #8f9d96;
  --ocean: #071a2a;
  --ocean-muted: #b7c9cf;
  --action: #185aa5;
  --action-strong: #10447f;
  --action-soft: #e6eef8;
  --aqua: #76dec9;
  --aqua-soft: #e2f6f0;
  --amber: #efbd52;
  --amber-soft: #fff4d7;
  --coral: #d8664f;
  --danger: #a9362c;
  --danger-soft: #fff0ed;
  --shadow: 10px 12px 0 rgba(7, 26, 42, 0.07);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--ocean);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--ocean);
  font-family: var(--body-font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
a {
  touch-action: manipulation;
}

a {
  color: var(--action);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--action-strong);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(24, 90, 165, 0.38);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
li,
span,
strong,
a,
button,
label,
legend,
summary {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display-font);
  line-height: 1.16;
}

h1,
h2,
h3,
h4,
.retain-line strong {
  min-width: 0;
  white-space: nowrap;
}

h1 {
  font-size: 56px;
  font-weight: 700;
}

h2 {
  font-size: 40px;
  font-weight: 700;
}

h3 {
  font-size: 23px;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--action-strong);
  transform: translateY(-150%);
}

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

.shell {
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(183, 201, 207, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  color: #fff;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 4px;
  font-size: 12px;
}

.header-nav {
  display: flex;
  align-items: center;
}

.header-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  text-decoration: none;
}

.header-nav a:hover {
  border-bottom-color: var(--amber);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body-font);
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease, box-shadow 160ms ease;
}

.button-secondary {
  border-color: var(--line-strong);
}

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

.button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu {
  display: none;
  position: relative;
}

.mobile-menu summary {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(197, 212, 217, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.menu-lines {
  width: 20px;
  display: grid;
  gap: 5px;
}

.menu-lines span {
  height: 2px;
  background: #fff;
  transition: transform 160ms ease, opacity 160ms ease;
}

.mobile-menu[open] .menu-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu[open] .menu-lines span:nth-child(2) {
  opacity: 0;
}

.mobile-menu[open] .menu-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid rgba(197, 212, 217, 0.28);
  border-top: 4px solid var(--amber);
  border-radius: var(--radius);
  background: #0b2738;
}

.mobile-menu-panel a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #eef5f6;
  font-weight: 650;
  text-decoration: none;
}

.mobile-menu-panel a + a {
  border-top: 1px solid rgba(197, 212, 217, 0.16);
}

.mobile-menu-panel .mobile-primary {
  margin-top: 8px;
  justify-content: center;
  color: #fff;
}

.hero {
  position: relative;
  height: calc(86dvh - var(--header-height));
  min-height: 540px;
  max-height: 820px;
  overflow: hidden;
  color: #fff;
  background: var(--ocean);
}

.water-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--ocean);
  opacity: 1;
  pointer-events: none;
}

body > header,
body > main,
body > footer {
  position: relative;
  z-index: 1;
}

.water-canvas.is-water-fallback,
.water-canvas.is-water-ready {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(2, 12, 20, 0.24);
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-inner::before {
  content: "";
  width: 4px;
  height: min(52%, 360px);
  flex: 0 0 4px;
  margin-right: 28px;
  background: var(--coral);
  box-shadow: 0 18px 0 var(--amber), 0 36px 0 var(--aqua);
}

.hero-content {
  max-width: 720px;
  padding: 64px 0;
}

.hero-meta {
  width: fit-content;
  margin: 0 0 22px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-left: 4px solid var(--amber);
  color: #edf5f6;
  background: rgba(7, 26, 42, 0.42);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  max-width: 690px;
  color: #fff;
  font-size: 64px;
  font-weight: 700;
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.28);
}

.hero-lead {
  max-width: 710px;
  margin: 22px 0 0;
  color: #edf5f6;
  font-size: 22px;
  line-height: 1.55;
}

.hero-copy {
  max-width: 670px;
  margin: 14px 0 0;
  color: #c2d3d8;
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}

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

.hero .button-primary:hover {
  color: #fff;
  background: #236dbb;
}

.hero .text-link {
  color: #fff;
}

.band {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.band-white {
  background: rgba(255, 255, 255, 0.88);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 0.68fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.section-title h2 {
  max-width: 820px;
}

.section-title p {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.capability-row {
  min-width: 0;
  min-height: 252px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-content: start;
  column-gap: 18px;
  padding: 30px 30px 28px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.capability-row:nth-child(even) {
  padding-right: 0;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.capability-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.capability-row h3 {
  font-size: 21px;
}

.capability-row p {
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.deliverable {
  align-self: end;
  padding: 11px 13px;
  border-left: 4px solid var(--aqua);
  color: var(--ink);
  background: var(--aqua-soft);
  font-size: 13px;
}

.deliverable span {
  display: inline;
  margin-right: 8px;
  color: var(--muted);
  font-size: 12px;
}

.field-band {
  position: relative;
  color: #fff;
  background: rgba(7, 26, 42, 0.78);
}

.field-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28%;
  height: 5px;
  background: var(--coral);
}

.field-band::after {
  content: "";
  position: absolute;
  top: 0;
  left: 28%;
  width: 12%;
  height: 5px;
  background: var(--amber);
}

.field-band .section-title p {
  color: var(--ocean-muted);
}

.field-log {
  border-top: 2px solid rgba(255, 255, 255, 0.62);
}

.field-entry {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 34px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.field-time {
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
}

.field-entry h3 {
  color: #fff;
  font-size: 22px;
}

.field-entry p {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--ocean-muted);
  font-size: 15px;
}

.field-output {
  align-self: start;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-left: 4px solid var(--aqua);
  color: #fff;
  font-size: 13px;
}

.field-output span {
  display: block;
  margin-bottom: 4px;
  color: var(--aqua);
  font-size: 12px;
  font-weight: 750;
}

.retain-line {
  display: grid;
  grid-template-columns: 0.38fr 0.62fr;
  gap: 40px;
  margin-top: 48px;
  padding: 28px 0 0;
  border-top: 5px solid var(--coral);
}

.retain-line strong {
  color: #fff;
  font-family: var(--display-font);
  font-size: 28px;
  line-height: 1.3;
}

.retain-line p {
  margin: 0;
  color: var(--ocean-muted);
}

.case-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-left: 1px solid var(--line);
}

.case-row {
  min-width: 0;
  min-height: 180px;
  padding: 24px 26px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.case-row:nth-child(3n + 1) {
  box-shadow: inset 0 4px 0 var(--aqua);
}

.case-row:nth-child(3n + 2) {
  box-shadow: inset 0 4px 0 var(--amber);
}

.case-row:nth-child(3n) {
  box-shadow: inset 0 4px 0 var(--coral);
}

.case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-meta strong {
  color: var(--action-strong);
  font-size: 14px;
}

.case-status {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid #4a9f8e;
  border-radius: 2px;
  color: #174f45;
  background: var(--aqua-soft);
  font-size: 11px;
  font-weight: 750;
}

.case-row h3 {
  margin-top: 25px;
  font-size: 20px;
}

.case-row p {
  max-width: 480px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.preview-band {
  border-bottom: 1px solid var(--line-strong);
  background: rgba(232, 236, 232, 0.86);
}

.preview-layout {
  padding: 72px 0;
}

.preview-copy {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  grid-template-rows: auto auto auto 1fr;
  column-gap: 80px;
  align-items: start;
}

.section-kicker {
  display: block;
  margin-bottom: 13px;
  padding-left: 12px;
  border-left: 4px solid var(--coral);
  color: var(--action-strong);
  font-size: 13px;
  font-weight: 760;
}

.preview-copy h2 {
  font-size: 35px;
}

.preview-copy > p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
}

.preview-copy > .button {
  width: fit-content;
  margin-top: 26px;
}

.preview-points {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  list-style: none;
}

.preview-points li {
  display: grid;
  grid-template-columns: minmax(130px, 0.42fr) minmax(0, 0.58fr);
  gap: 20px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line-strong);
}

.preview-points strong,
.preview-points span {
  display: block;
}

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

.preview-points span {
  color: var(--muted);
  font-size: 13px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: var(--surface-muted);
}

.bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 0;
  background: var(--action);
}

.action-band {
  padding: 54px 0;
  border-bottom: 1px solid #bd8c2f;
  background: var(--amber);
}

.action-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
}

.action-band h2 {
  max-width: 760px;
  font-size: 34px;
}

.action-band p {
  margin: 12px 0 0;
  color: #4b412d;
}

.action-band .button-primary {
  box-shadow: 4px 4px 0 rgba(7, 26, 42, 0.3);
}

.site-footer {
  padding: 38px 0;
  color: #9fb6be;
  background: #061521;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
}

.footer-brand {
  color: #fff;
  font-size: 16px;
  font-weight: 750;
}

.footer-grid p {
  max-width: 620px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer-links a {
  color: #c4d3d8;
}

/* Diagnosis workspace */
.diagnosis-main {
  min-height: calc(100dvh - var(--header-height));
  padding: 64px 0 90px;
  border-top: 5px solid var(--coral);
  background: rgba(243, 245, 242, 0.82);
}

.diagnosis-main > .shell {
  width: min(100% - 48px, 940px);
}

.diagnosis-intro {
  margin-bottom: 34px;
  padding-left: 28px;
  border-left: 4px solid var(--amber);
}

.diagnosis-intro h1 {
  max-width: 800px;
  font-size: 46px;
}

.diagnosis-intro p {
  max-width: 700px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.diagnosis-layout,
.workspace {
  min-width: 0;
}

.diagnosis-layout {
  display: block;
}

.workspace {
  display: grid;
  gap: 32px;
}

.task-panel,
.report-panel {
  min-width: 0;
  scroll-margin-top: calc(var(--header-height) + 16px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-top: 5px solid var(--ocean);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.report-panel {
  border-top-color: var(--coral);
  box-shadow: none;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}

.panel-heading h2 {
  font-size: 25px;
}

.panel-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-index {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #bd8c2f;
  border-left: 4px solid var(--coral);
  color: #694a0d;
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 800;
}

.form-body {
  padding: 30px 28px 32px;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-section + .form-section {
  margin-top: 32px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.form-section legend {
  width: 100%;
  margin-bottom: 20px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 700;
}

.form-section legend span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 450;
}

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

.form-field {
  min-width: 0;
}

.form-field.full {
  grid-column: 1 / -1;
}

.optional-fields {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.optional-fields summary {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 20px;
  align-items: center;
  gap: 16px;
  color: var(--action-strong);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.optional-fields summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}

.optional-fields summary::after {
  content: "+";
  color: var(--coral);
  font-size: 22px;
  line-height: 1;
  text-align: right;
}

.optional-fields[open] summary::after {
  content: "-";
}

.optional-fields[open] summary {
  margin-bottom: 20px;
}

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

.form-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-width: 0;
  min-height: 49px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.form-textarea {
  min-height: 138px;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #71807a;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #687870;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--action);
  background: #fbfdff;
  box-shadow: 0 0 0 3px rgba(24, 90, 165, 0.13);
  outline: none;
}

.form-input[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: inset 4px 0 0 var(--danger);
}

.field-help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--action);
}

.form-check input[aria-invalid="true"] {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

.form-error {
  display: none;
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid #e2a59d;
  border-left: 5px solid var(--danger);
  color: #6e1d18;
  background: var(--danger-soft);
  font-size: 13px;
}

.form-error.is-visible {
  display: block;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.form-actions p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.submit-btn {
  flex: 0 1 auto;
}

.register-copy {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.verify-btn {
  min-height: 49px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--action);
  border-radius: 2px;
  color: var(--action-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  cursor: pointer;
}

.verify-btn:hover {
  color: #fff;
  background: var(--action);
}

.verify-btn:disabled {
  border-color: var(--line-strong);
  color: var(--muted);
  background: var(--surface-muted);
  cursor: not-allowed;
}

.form-ok,
.register-success {
  color: var(--action-strong);
  font-size: 13px;
  font-weight: 700;
}

.form-ok {
  margin: 8px 0 0;
}

.register-success {
  display: none;
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #8acbbb;
  border-left: 5px solid #3a9683;
  background: var(--aqua-soft);
}

.register-success.is-visible {
  display: block;
}

.result-loading {
  display: none;
  padding: 30px 28px 34px;
}

.result-loading.is-visible {
  display: block;
}

.loading-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.result-content {
  display: none;
}

.result-content.is-visible {
  display: block;
}

.report-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.report-meta div {
  min-width: 0;
  padding: 15px 18px;
  background: var(--paper);
}

.report-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.report-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.result-tags {
  padding: 22px 28px 14px;
}

.tag {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 5px 8px;
  border: 1px solid #9fb7d5;
  border-left: 4px solid var(--action);
  border-radius: 2px;
  color: #174679;
  background: var(--action-soft);
  font-size: 12px;
  font-weight: 700;
}

.tag.green {
  border-color: #86c3b5;
  border-left-color: #338c79;
  color: #155143;
  background: var(--aqua-soft);
}

.report-body {
  padding: 0 28px 32px;
}

.report-section {
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.report-section h3 {
  margin-bottom: 14px;
  color: var(--action-strong);
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 800;
}

.report-section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dimension-bars {
  display: grid;
  gap: 15px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
}

.dimension-label {
  color: var(--muted);
  font-size: 13px;
}

.dimension-row .bar-fill {
  transition: width 600ms ease;
}

.dimension-value {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.dimension-row.is-top .dimension-label,
.dimension-row.is-top .dimension-value {
  color: var(--action-strong);
  font-weight: 800;
}

.dimension-row.is-top .bar-fill {
  background: var(--coral);
}

.hypothesis-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.hypothesis-list li::marker {
  color: var(--coral);
}

.hypothesis-list li + li {
  margin-top: 9px;
}

.result-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 26px;
  border-top: 5px solid var(--amber);
}

.result-action p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.result-action .button {
  flex: 0 1 auto;
}

.cta-done {
  border-color: #4a9f8e !important;
  color: #174f45 !important;
  background: var(--aqua-soft) !important;
  box-shadow: none !important;
}

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

@media (max-width: 1100px) {
  .field-entry {
    grid-template-columns: 108px minmax(0, 1fr);
  }

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

  .preview-copy {
    column-gap: 48px;
  }
}

@media (max-width: 900px) {

  .header-nav,
  .home-page .header-actions > .button {
    display: none;
  }

  .diagnosis-page .header-actions > .button {
    min-height: 44px;
    display: inline-flex;
    padding: 9px 14px;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    height: calc(82dvh - var(--header-height));
    min-height: 510px;
  }

  .section-intro {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 32px;
  }

  .preview-copy {
    grid-template-columns: minmax(230px, 0.85fr) minmax(280px, 1.15fr);
    column-gap: 36px;
  }
}

@media (max-width: 767px) {
  .shell,
  .diagnosis-main > .shell {
    width: min(100% - 40px, 1240px);
  }

  .brand-copy small {
    display: none;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

  .hero {
    height: calc(78dvh - var(--header-height));
    min-height: 480px;
    max-height: 650px;
  }

  .hero-inner::before {
    width: 3px;
    flex-basis: 3px;
    margin-right: 18px;
  }

  .hero-content {
    padding: 42px 0 58px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 18px;
  }

  .hero-copy {
    display: none;
  }

  .band {
    padding: 66px 0;
  }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
  }

  .capability-list,
  .case-ledger {
    grid-template-columns: 1fr;
  }

  .capability-row,
  .capability-row:nth-child(even) {
    min-height: 0;
    padding: 25px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .capability-row:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

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

  .field-entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .field-output {
    grid-column: 1;
    margin-top: 8px;
  }

  .retain-line {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preview-layout {
    padding: 64px 0;
  }

  .preview-copy {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .preview-points {
    grid-column: 1;
    grid-row: auto;
    margin-top: 30px;
  }

  .action-inner,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .diagnosis-main {
    padding: 44px 0 66px;
  }

  .diagnosis-intro {
    margin-bottom: 30px;
    padding-left: 18px;
  }

  .diagnosis-intro h1 {
    font-size: 38px;
  }

  .diagnosis-intro p {
    font-size: 16px;
  }

  .panel-heading,
  .form-body,
  .result-tags,
  .report-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full {
    grid-column: auto;
  }

  .form-actions,
  .result-action {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  .form-actions .button,
  .result-action .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .shell,
  .diagnosis-main > .shell {
    width: min(100% - 32px, 1240px);
  }

  .header-inner {
    gap: 12px;
  }

  .diagnosis-page .header-actions > .button {
    padding-inline: 11px;
    font-size: 13px;
  }

  .hero {
    min-height: 470px;
  }

  .hero-inner::before {
    display: none;
  }

  .hero h1 {
    font-size: 37px;
  }

  .hero-meta {
    max-width: 100%;
  }

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

  .hero-actions .button,
  .hero-actions .text-link {
    width: 100%;
  }

  .preview-copy h2,
  .action-band h2 {
    font-size: 29px;
  }

  .preview-points li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .diagnosis-intro h1 {
    font-size: 34px;
  }

  .panel-heading {
    gap: 12px;
  }

  .verify-row,
  .report-meta {
    grid-template-columns: 1fr;
  }

  .dimension-row {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .dimension-label {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .action-band,
  .form-actions,
  .result-action,
  .site-footer {
    display: none !important;
  }

  body,
  .diagnosis-main {
    color: #000;
    background: #fff;
  }

  .diagnosis-main {
    padding: 0;
    border: 0;
  }

  .diagnosis-layout {
    display: block;
  }

  .task-panel {
    display: none;
  }

  .report-panel {
    border: 0;
    box-shadow: none;
  }

  .panel-heading,
  .report-meta div {
    background: #fff;
  }
}

/* Home direction: dark editorial field over the shared water canvas. */

.home-page .hero {
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
  align-items: stretch;
}

.home-page .hero-inner {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.home-page .hero-inner::before {
  display: none;
}

.home-page .hero-content {
  grid-column: 2;
  grid-row: 1;
}

.home-page .hero-meta {
  border-left-color: var(--home-aqua);
}

.home-page .band {
  border-bottom-color: var(--home-line);
}

.home-page .band-white,
.home-page .preview-band {
  color: var(--home-ink);
}

.home-page .capability-list,
.home-page .case-ledger,
.home-page .preview-points {
  border-color: var(--home-line);
}

.home-page .capability-row,
.home-page .capability-row:nth-child(even),
.home-page .case-row,
.home-page .preview-points li {
  border-color: var(--home-line);
  background: transparent;
}

.home-page .deliverable,
.home-page .case-status {
  border-color: var(--home-aqua);
}

.home-page .preview-layout {
  padding-block: 92px;
}

.home-page .action-band {
  border-bottom-color: var(--home-aqua);
}

@media (max-width: 767px) {

  .home-page .hero-inner {
    gap: 34px;
  }

  .home-page .hero-content {
    order: 1;
  }

}

/* Diagnosis page: editorial dark workspace over the shared water wall. */

.diagnosis-page .site-header,
.diagnosis-page .site-footer {
  border-color: rgba(123, 228, 212, 0.28);
}

.diagnosis-page .site-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.diagnosis-page .button-secondary {
  border-color: rgba(123, 228, 212, 0.58);
  color: #dff9f5;
  background: rgba(1, 9, 13, 0.45);
}

.diagnosis-page .button-secondary:hover {
  border-color: var(--aqua);
  color: #031013;
  background: var(--aqua);
}

.diagnosis-page .diagnosis-main {
  padding-top: 72px;
  border-top: 0;
}

.diagnosis-page .diagnosis-intro {
  padding-left: 24px;
  border-left-color: var(--aqua);
}

.diagnosis-page .diagnosis-intro h1 {
  color: #fff;
  font-family: var(--body-font);
  letter-spacing: 0;
}

.diagnosis-page .section-kicker {
  border-left-color: var(--amber);
}

.diagnosis-page .task-panel {
  border-color: rgba(123, 228, 212, 0.5);
  border-top-color: var(--aqua);
}

.diagnosis-page .report-panel {
  border-top: 2px solid rgba(123, 228, 212, 0.58);
}

.diagnosis-page .panel-heading {
  border-color: rgba(212, 243, 241, 0.18);
}

.diagnosis-page .form-body,
.diagnosis-page .report-body {
  color: #f4fbfb;
}

.diagnosis-page .form-label small,
.diagnosis-page .optional-fields summary span {
  color: #9fc2c3;
}

.diagnosis-page .form-input,
.diagnosis-page .form-select,
.diagnosis-page .form-textarea {
  border-color: rgba(185, 231, 227, 0.62);
}

.diagnosis-page .form-input::placeholder,
.diagnosis-page .form-textarea::placeholder {
  color: #8ba9aa;
}

.diagnosis-page .form-check {
  color: #c6dddd;
}

.diagnosis-page .form-error {
  border-color: rgba(255, 164, 151, 0.72);
  color: #ffd9d3;
  background: rgba(108, 29, 24, 0.55);
}

.diagnosis-page .verify-btn {
  border-color: var(--aqua);
}

.diagnosis-page .tag {
  border-color: rgba(123, 228, 212, 0.58);
  border-left-color: var(--aqua);
}

.diagnosis-page .tag.green {
  border-color: rgba(123, 228, 212, 0.58);
  border-left-color: var(--amber);
}

.diagnosis-page .result-action {
  border-top-color: var(--amber);
}

.diagnosis-page .result-action p,
.diagnosis-page .footer-grid p {
  color: #b9d1d2;
}

.diagnosis-page .footer-links a {
  color: #c6dddd;
}

@media (max-width: 390px) {
  .diagnosis-page .diagnosis-main {
    padding-top: 44px;
  }

  .diagnosis-page .diagnosis-intro {
    padding-left: 14px;
  }

  .diagnosis-page .panel-heading,
  .diagnosis-page .form-body,
  .diagnosis-page .result-tags,
  .diagnosis-page .report-body {
    padding-left: 16px;
    padding-right: 16px;
  }

}

/* Editorial technology theme. The water canvas remains the shared backdrop. */
:root {
  --motion-duration: 550ms;
  --motion-ease: cubic-bezier(0.85, 0, 0, 1);
  --accent: #a100ff;
  --accent-bright: #bd4cff;
  --night-line: rgba(255, 255, 255, 0.22);
  --display-font: "Avenir Next", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body-font: "Avenir Next", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 0;
}

body {
  line-height: 1.55;
}

::selection {
  color: #fff;
  background: var(--accent);
}

.site-header {
  border: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  gap: 14px;
}

.brand-copy strong {
  font-size: 17px;
  font-weight: 800;
}

.brand-copy small {
  color: #9999a2;
}

.header-nav {
  gap: 38px;
}

.header-nav a {
  position: relative;
  border: 0;
  color: #d8d8dc;
  font-weight: 600;
}

.header-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--motion-duration) var(--motion-ease);
}

.header-nav a:hover::after,
.header-nav a[aria-current="location"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.button {
  min-height: 48px;
  padding: 13px 22px;
  border: 0;
  border-radius: 0;
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
}

.button-primary,
.home-page .button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: none;
}

.button-primary:hover,
.home-page .button-primary:hover {
  color: #fff;
  background: var(--accent-bright);
  box-shadow: none;
  transform: none;
}

.button-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.button-secondary:hover {
  color: #fff;
  background: var(--accent);
}

.home-page .header-actions > .button::after,
.home-page .preview-copy > .button::after,
.home-page .action-band .button::after {
  content: none;
}

.home-page {
  --home-ink: #f7f7f8;
  --home-muted: #b8b8c0;
  --home-line: rgba(255, 255, 255, 0.22);
  --home-aqua: var(--accent);
  color: var(--home-ink);
}

.home-page .site-header {
  border: 0;
}

.home-page .hero {
  display: block;
  padding: 0;
}

.home-page .hero-inner {
  margin-inline: auto;
  display: flex;
}

.home-page .hero-content {
  padding: 0;
}

.home-page .hero-meta {
  margin-bottom: 26px;
  padding: 0;
  border: 0;
  color: #e2e2e6;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.home-page .hero-meta::before {
  content: "";
  width: 22px;
  height: 4px;
  display: inline-block;
  margin: 0 12px 3px 0;
  background: var(--accent);
}

.home-page .hero h1 {
  max-width: 940px;
  font-family: var(--body-font);
  font-size: 60px;
  font-weight: 500;
  line-height: 1.15;
  text-shadow: none;
}

.home-page .hero-lead {
  max-width: 720px;
  margin-top: 28px;
  color: #fff;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.45;
}

.home-page .hero-copy {
  max-width: 740px;
  margin-top: 18px;
  color: #c4c4cb;
  font-size: 16px;
  line-height: 1.75;
}

.home-page .hero-actions {
  margin-top: 34px;
  gap: 24px;
}

.home-page .hero .text-link {
  color: #fff;
  text-decoration-color: var(--accent);
}

.home-page .band,
.home-page .preview-band,
.home-page .action-band,
.home-page .site-footer {
  color: var(--home-ink);
}

.home-page .band {
  padding: 80px 0;
  border: 0;
}

.home-page .field-band::before,
.home-page .field-band::after {
  display: none;
}

.home-page .section-intro {
  display: block;
  margin-bottom: 40px;
}

.section-label,
.home-page .section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.section-label::before,
.home-page .section-kicker::before {
  content: "";
  width: 22px;
  height: 4px;
  background: var(--accent);
}

.home-page .section-title h2,
.home-page .preview-copy h2 {
  max-width: 980px;
  color: #fff;
  font-family: var(--body-font);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.3;
}

.home-page .section-title p,
.home-page .preview-copy > p {
  max-width: 760px;
  margin-top: 22px;
  color: var(--home-muted);
  font-size: 18px;
  line-height: 1.7;
}

.home-page .capability-list,
.home-page .field-log {
  display: block;
  border: 0;
  border-top: 2px solid var(--accent);
}

.home-page .capability-row {
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  transition: border-color 160ms ease;
}

.home-page .capability-row:nth-child(even),
.home-page .capability-row:nth-last-child(-n + 2) {
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--accent);
}

.home-page .capability-row h3 {
  color: #fff;
  font-family: var(--body-font);
  font-size: 24px;
  font-weight: 500;
  transition: color 160ms ease;
}

.home-page .capability-row[open] h3,
.home-page .capability-row:focus-within h3 {
  color: #fff;
}

.home-page .capability-row p {
  margin: 0;
  color: var(--home-muted);
  font-size: 16px;
  line-height: 1.7;
}

.home-page .deliverable {
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
  line-height: 1.55;
}

.home-page .deliverable span {
  display: block;
  margin: 0 0 7px;
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 750;
}

.home-page .field-entry {
  grid-template-columns: 100px minmax(0, 1fr) minmax(180px, 0.32fr);
  gap: 40px;
  padding: 32px 0;
  border-color: var(--home-line);
}

.home-page .field-time {
  color: var(--accent-bright);
}

.home-page .field-entry h3 {
  font-family: var(--body-font);
  font-size: 24px;
  font-weight: 500;
}

.home-page .field-entry p {
  color: var(--home-muted);
  font-size: 16px;
  line-height: 1.7;
}

.home-page .field-output {
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 14px;
}

.home-page .field-output span {
  color: var(--accent-bright);
}

.home-page .retain-line {
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--accent);
}

.home-page .retain-line strong {
  font-family: var(--body-font);
  font-size: 28px;
  font-weight: 500;
}

.home-page .retain-line p {
  max-width: 760px;
  color: var(--home-muted);
  font-size: 17px;
}

.home-page .case-ledger {
  border: 0;
}

.home-page .case-row {
  border-top: 1px solid var(--home-line);
  box-shadow: none;
}

.home-page .case-row:nth-child(3n + 1),
.home-page .case-row:nth-child(3n + 2),
.home-page .case-row:nth-child(3n) {
  box-shadow: none;
}

.home-page .case-meta strong {
  color: var(--accent-bright);
  font-size: 13px;
}

.home-page .case-status {
  padding: 0;
  border: 0;
  color: #a5a5ad;
  background: transparent;
}

.home-page .case-row h3 {
  color: #fff;
  font-family: var(--body-font);
  font-size: 24px;
  font-weight: 500;
}

.home-page .case-row p {
  color: var(--home-muted);
}

.home-page .preview-band {
  border: 0;
}

.home-page .preview-layout {
  padding: 80px 0;
}

.home-page .preview-copy {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
}

.home-page .preview-points {
  border: 0;
  border-top: 2px solid var(--accent);
}

.home-page .preview-points li {
  padding: 24px 0;
  border-color: var(--home-line);
}

.home-page .preview-points strong {
  color: #fff;
  font-size: 15px;
}

.home-page .preview-points span {
  color: var(--home-muted);
  font-size: 14px;
}

.home-page .action-band {
  padding: 80px 0;
  border: 0;
}

.home-page .action-inner {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
}

.home-page .action-inner > div,
.home-page .field-entry > div {
  min-width: 0;
}

.home-page .action-band h2 {
  max-width: 940px;
  color: #fff;
  font-family: var(--body-font);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.3;
}

.home-page .action-band p {
  color: var(--home-muted);
  font-size: 18px;
}

.home-page .site-footer {
  padding: 48px 0;
  border: 0;
}

/* The diagnosis flow uses rules and whitespace instead of container cards. */
.diagnosis-page {
  color: #f7f7f8;
}

.diagnosis-page .site-header,
.diagnosis-page .site-footer {
  border: 0;
  background: rgba(0, 0, 0, 0.84);
}

.diagnosis-page .diagnosis-main {
  padding: 64px 0 88px;
  border: 0;
  background: rgba(0, 0, 0, 0.76);
}

.diagnosis-page .diagnosis-intro {
  margin-bottom: 48px;
  padding: 0;
  border: 0;
}

.diagnosis-page .section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  color: #fff;
}

.diagnosis-page .section-kicker::before {
  content: "";
  width: 22px;
  height: 4px;
  background: var(--accent);
}

.diagnosis-page .diagnosis-intro h1 {
  max-width: 940px;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: none;
}

.diagnosis-page .diagnosis-intro p {
  max-width: 760px;
  margin-top: 24px;
  color: #bdbdc5;
  font-size: 18px;
}

.diagnosis-page .workspace {
  gap: 80px;
}

#task-panel,
#conversation-panel {
  max-width: 800px;
}

#task-panel > .form-body {
  padding-top: 0;
}

.diagnosis-page #task-title {
  scroll-margin-top: calc(var(--header-height) + 32px);
}

.question-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

#question-index {
  color: #b9d1d2;
  font-size: 13px;
}

.question-box {
  min-height: 144px;
  padding: 24px;
  border: 1px solid rgba(185, 231, 227, 0.62);
  border-left: 3px solid var(--accent-bright);
  background: rgba(18, 35, 46, 0.9);
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.answer-field {
  margin-top: 28px;
}

#input-answer {
  min-height: 180px;
}

#conversation-status {
  margin-top: 16px;
}

.diagnosis-page .button:disabled {
  cursor: wait;
  opacity: 0.6;
}

#diagnose-form .form-actions {
  justify-content: flex-end;
}

.diagnosis-page .task-panel,
.diagnosis-page .report-panel {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.diagnosis-page .panel-heading {
  padding: 0 0 30px;
  border: 0;
  border-bottom: 2px solid var(--accent);
  background: transparent;
}

.diagnosis-page .panel-heading h2 {
  color: #fff;
  font-size: 28px;
  font-weight: 500;
}

.diagnosis-page .panel-heading p {
  margin-top: 10px;
  color: #aaaab3;
  font-size: 14px;
}

.diagnosis-page .panel-index {
  padding: 0;
  border: 0;
  color: var(--accent-bright);
  background: transparent;
  font-size: 12px;
}

.diagnosis-page .form-body {
  padding: 40px 0 0;
}

.diagnosis-page .form-section + .form-section,
.diagnosis-page .optional-fields,
.diagnosis-page .form-actions,
.diagnosis-page .report-section,
.diagnosis-page .loading-step {
  border-color: var(--night-line);
}

.diagnosis-page .form-section + .form-section {
  margin-top: 36px;
  padding-top: 0;
  border: 0;
}

.diagnosis-page .form-section + .form-section legend {
  padding-top: 28px;
  border-top: 1px solid rgba(212, 243, 241, 0.46);
}

.diagnosis-page .form-section legend small {
  margin-left: 8px;
  color: #9fc2c3;
  font-size: 12px;
  font-weight: 400;
}

.diagnosis-page .form-section legend {
  margin-bottom: 28px;
  color: #fff;
  font-family: var(--body-font);
  font-size: 20px;
  font-weight: 500;
}

.diagnosis-page .form-section legend span {
  margin-top: 7px;
  color: #9e9ea7;
  font-size: 13px;
}

.diagnosis-page .form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 34px;
}

.diagnosis-page .form-label {
  margin-bottom: 9px;
  color: #f4f4f6;
  font-size: 14px;
}

.diagnosis-page .form-input,
.diagnosis-page .form-select,
.diagnosis-page .form-textarea {
  padding: 13px 16px;
  border: 1px solid rgba(185, 231, 227, 0.62);
  border-radius: 4px;
  color: #fff;
  background: rgba(18, 35, 46, 0.9);
}

.diagnosis-page .form-textarea {
  min-height: 126px;
}

.diagnosis-page .form-input:hover,
.diagnosis-page .form-select:hover,
.diagnosis-page .form-textarea:hover,
.diagnosis-page .form-input:focus,
.diagnosis-page .form-select:focus,
.diagnosis-page .form-textarea:focus {
  border-color: var(--accent-bright);
  background: rgba(24, 43, 57, 0.96);
  box-shadow: none;
}

.diagnosis-page .form-select option {
  color: #111;
  background: #fff;
}

.diagnosis-page .field-help,
.diagnosis-page .form-actions p,
.diagnosis-page .register-copy,
.diagnosis-page .report-section p,
.diagnosis-page .hypothesis-list,
.diagnosis-page .dimension-label,
.diagnosis-page .dimension-value,
.diagnosis-page .loading-step {
  color: #aaaab3;
}

.diagnosis-page .optional-fields {
  margin-top: 48px;
  padding-top: 24px;
}

.diagnosis-page .optional-fields summary,
.diagnosis-page .optional-fields summary::after {
  color: var(--accent-bright);
}

.diagnosis-page .form-check input {
  accent-color: var(--accent);
}

.diagnosis-page .form-actions {
  margin-top: 38px;
  padding-top: 30px;
  border-color: rgba(212, 243, 241, 0.46);
}

.diagnosis-page .verify-btn {
  min-height: 50px;
  min-width: 142px;
  padding: 12px 18px;
  border: 0;
  color: #fff;
  background: var(--accent);
}

.diagnosis-page .verify-btn:hover {
  color: #fff;
  background: var(--accent-bright);
}

.diagnosis-page .form-error,
.diagnosis-page .register-success {
  border: 0;
  border-left: 4px solid currentColor;
  border-radius: 0;
}

.diagnosis-page .result-loading {
  padding: 34px 0;
}

.diagnosis-page .loading-step {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
}

.diagnosis-page .loading-step::before {
  content: "";
  width: 16px;
  height: 3px;
  background: var(--accent);
}

.diagnosis-page .report-meta {
  gap: 40px;
  padding: 28px 0;
  border-top: 0;
  border-bottom: 1px solid var(--night-line);
  background: transparent;
}

.diagnosis-page .report-meta div {
  padding: 0;
  background: transparent;
}

.diagnosis-page .report-meta span {
  color: #8f8f99;
}

.diagnosis-page .report-meta strong {
  color: #fff;
}

.diagnosis-page .result-tags {
  padding: 26px 0 8px;
}

.diagnosis-page .tag,
.diagnosis-page .tag.green {
  margin-right: 18px;
  padding: 0;
  border: 0;
  color: #d8d8dd;
  background: transparent;
  font-size: 12px;
}

.diagnosis-page .tag::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 8px;
  background: var(--accent);
}

.diagnosis-page .tag.green::before {
  background: #6ee7d3;
}

.diagnosis-page .report-body {
  padding: 0;
}

.diagnosis-page .report-section {
  padding: 38px 0;
}

.diagnosis-page .report-section h3 {
  margin-bottom: 20px;
  color: #fff;
  font-size: 22px;
  font-weight: 500;
}

.diagnosis-page .bar-track {
  height: 5px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
}

.diagnosis-page .bar-fill,
.diagnosis-page .dimension-row.is-top .bar-fill {
  background: var(--accent);
}

.diagnosis-page .dimension-row.is-top .dimension-label,
.diagnosis-page .dimension-row.is-top .dimension-value {
  color: var(--accent-bright);
}

.diagnosis-page .hypothesis-list li::marker {
  color: var(--accent-bright);
}

.diagnosis-page .result-action {
  padding-top: 34px;
  border-top: 2px solid var(--accent);
}

.diagnosis-page .result-action p {
  color: #aaaab3;
}

.diagnosis-page .site-footer {
  border-top: 1px solid var(--night-line);
}

@media (max-width: 1100px) {
  .home-page .capability-row {
    grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1.15fr);
    gap: 24px 40px;
  }

  .home-page .deliverable {
    grid-column: 2;
  }

  .home-page .field-entry {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .home-page .field-output {
    grid-column: 2;
  }
}

@media (max-width: 900px) {

  .home-page .hero h1 {
    font-size: 56px;
  }

  .home-page .section-title h2,
  .home-page .preview-copy h2 {
    font-size: 36px;
  }

  .home-page .preview-copy {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .home-page .preview-points {
    grid-column: 1;
    grid-row: auto;
    margin-top: 48px;
  }

  .home-page .action-band h2 {
    font-size: 36px;
  }
}

@media (max-width: 767px) {

  .home-page .hero {
    padding: 0;
  }

  .home-page .hero-inner {
    justify-content: flex-end;
  }

  .home-page .hero h1 {
    font-size: 40px;
  }

  .home-page .hero-lead {
    font-size: 22px;
  }

  .home-page .hero-copy {
    display: block;
    font-size: 15px;
  }

  .home-page .band {
    padding: 56px 0;
  }

  .home-page .section-intro {
    margin-bottom: 44px;
  }

  .home-page .section-title h2,
  .home-page .preview-copy h2 {
    font-size: 32px;
  }

  .home-page .section-title p,
  .home-page .preview-copy > p {
    font-size: 16px;
  }

  .home-page .capability-row,
  .home-page .capability-row:nth-child(even),
  .home-page .capability-row:nth-last-child(-n + 2) {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
  }

  .home-page .deliverable {
    grid-column: 1;
    margin-top: 8px;
  }

  .home-page .field-entry {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 30px 0;
  }

  .home-page .field-output {
    grid-column: 1;
    margin-top: 8px;
  }

  .home-page .retain-line {
    margin-top: 52px;
  }

  .home-page .retain-line strong {
    font-size: 24px;
  }

  .home-page .preview-layout {
    padding: 56px 0;
  }

  .home-page .action-band {
    padding: 56px 0;
  }

  .home-page .action-inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .home-page .action-band h2 {
    font-size: 32px;
  }

  .diagnosis-page .diagnosis-main {
    padding: 64px 0 88px;
  }

  .diagnosis-page .diagnosis-intro {
    margin-bottom: 54px;
  }

  .diagnosis-page .diagnosis-intro h1 {
    font-size: 36px;
  }

  .diagnosis-page .panel-heading,
  .diagnosis-page .form-body,
  .diagnosis-page .result-tags,
  .diagnosis-page .report-body {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 480px) {

  .home-page .hero h1 {
    font-size: 40px;
  }

  .home-page .hero-lead {
    font-size: 20px;
  }

  .home-page .hero-actions .button,
  .home-page .hero-actions .text-link {
    width: 100%;
  }

  .home-page .section-title h2,
  .home-page .preview-copy h2 {
    font-size: 28px;
  }

  .home-page .capability-row h3,
  .home-page .field-entry h3,
  .home-page .case-row h3 {
    font-size: 20px;
  }

  .home-page .action-band h2 {
    font-size: 28px;
  }

  .diagnosis-page .diagnosis-intro h1 {
    font-size: 32px;
  }

  .diagnosis-page .panel-heading h2 {
    font-size: 24px;
  }

  .diagnosis-page .report-meta {
    gap: 18px;
  }
}

/* One continuous water-backed surface across the home page. */
.home-page {
  --home-surface: rgba(0, 7, 12, 0.72);
}

.home-page .site-header,
.home-page .hero,
.home-page .band,
.home-page .field-band,
.home-page .preview-band,
.home-page .action-band,
.home-page .site-footer {
  border-top: 0;
  border-bottom: 0;
  background: var(--home-surface);
}

.home-page .hero::after {
  background: transparent;
}

/* Voract brand asset and the native horizontal case scroller. */
.brand-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  filter: invert(1);
}

.home-page .case-ledger {
  display: flex;
  grid-template-columns: none;
  gap: 40px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.home-page .case-ledger::-webkit-scrollbar {
  display: none;
}

.home-page .case-row {
  min-height: 0;
  flex: 0 0 360px;
  display: flex;
  flex-direction: column;
  overflow: clip;
  padding: 0;
  border: 1px solid var(--home-line);
  background: rgba(255, 255, 255, 0.04);
  scroll-snap-align: start;
}

.home-page .case-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid var(--home-line);
}

.home-page .case-content {
  flex: 1;
  padding: 24px;
}

.home-page .case-row h3 {
  margin-top: 20px;
}

.home-page .case-row p {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.78;
}

.diagnosis-page .form-file {
  min-height: 56px;
  padding: 7px 12px;
  color: #aaaab3;
  cursor: pointer;
}

.diagnosis-page .form-file::file-selector-button {
  min-height: 40px;
  margin-right: 16px;
  padding: 9px 14px;
  border: 0;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.diagnosis-page .form-file:hover::file-selector-button {
  background: var(--accent-bright);
}

@media (max-width: 767px) {
  .home-page .case-row {
    flex-basis: min(300px, calc(100% - 28px));
  }
}

@media (max-width: 480px) {
  .brand-logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .home-page .case-content {
    padding: 22px 20px 26px;
  }
}

/* Shared alignment and native disclosures; the water surfaces above stay intact. */
:root {
  --page-gutter: 80px;
  --header-height: 72px;
}

.shell,
.home-page .hero-inner {
  width: min(calc(100% - 2 * var(--page-gutter)), 1440px);
}

.diagnosis-page .diagnosis-main > .shell {
  width: min(calc(100% - 2 * var(--page-gutter)), 1120px);
}

.site-header,
.header-inner {
  min-height: var(--header-height);
}

.home-page {
  --visible-header-height: var(--header-height);
}

.home-page:has(.site-header.is-hidden) {
  --visible-header-height: 0px;
}

.home-page main > section[id] {
  scroll-margin-top: calc(var(--visible-header-height) + 24px);
}

.home-page .site-header {
  transition: transform var(--motion-duration) var(--motion-ease);
}

.home-page .site-header.is-hidden:not(:focus-within) {
  transform: translateY(-100%);
}

.header-nav a[aria-current],
.mobile-menu-panel a[aria-current] {
  color: #fff;
}

.mobile-menu-panel {
  border-top-color: var(--accent);
  box-shadow: none;
}

.mobile-menu-panel a[aria-current] {
  box-shadow: inset 2px 0 var(--accent);
}

.mobile-menu-panel .mobile-primary {
  background: var(--accent);
}

.home-page .hero {
  height: auto;
  min-height: min(640px, calc(80svh - var(--header-height)));
  max-height: none;
}

.home-page .hero-inner {
  min-height: inherit;
  height: auto;
  padding: 64px 0;
  flex-direction: row;
  align-items: center;
}

.home-page .hero-content {
  min-width: 0;
  width: 100%;
  max-width: 880px;
}

.text-link {
  position: relative;
  font-weight: 500;
  text-decoration: none;
}

.text-link::after {
  content: "";
  position: absolute;
  inset: auto 0 5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--motion-duration) var(--motion-ease);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
}

:is(.home-page, .diagnosis-page) :focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 4px;
}

.home-page .capability-row > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  align-items: center;
  gap: 32px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}

:is(.capability-row, .case-disclosure) > summary::-webkit-details-marker {
  display: none;
}

.capability-summary {
  color: var(--home-muted);
  font-size: 15px;
  line-height: 1.7;
}

.disclosure-icon {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--accent-bright);
}

.disclosure-icon::before,
.disclosure-icon::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 13px;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform var(--motion-duration) var(--motion-ease);
}

.disclosure-icon::after {
  transform: rotate(90deg);
}

details[open] > summary .disclosure-icon::after {
  transform: rotate(0);
}

.capability-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.4fr);
  gap: 48px;
  padding: 12px 76px 32px 0;
}

.home-page .capability-detail .deliverable {
  grid-column: auto;
  align-self: start;
  margin: 0;
}

.home-page .capability-list:has([open]) .capability-row:not([open]):not(:hover):not(:focus-within):not(:has(+ [open])) {
  border-bottom-color: var(--home-line);
}

.home-page .capability-list:has([open]) .capability-row:not([open]):not(:hover):not(:focus-within) h3 {
  color: var(--home-muted);
}

/* Unsupported browsers keep the native, instant details behavior. */
@supports (interpolate-size: allow-keywords) {
  :is(.capability-row, .case-disclosure)::details-content {
    interpolate-size: allow-keywords;
    block-size: 0;
    overflow: clip;
    transition: block-size var(--motion-duration) var(--motion-ease),
      content-visibility var(--motion-duration) allow-discrete;
  }

  :is(.capability-row, .case-disclosure)[open]::details-content {
    block-size: auto;
  }
}

.home-page .case-row .case-summary {
  min-height: 5.34em;
}

.case-disclosure {
  margin-top: 16px;
  border-top: 1px solid var(--home-line);
}

.case-disclosure > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.case-disclosure:not([open]) .when-open,
.case-disclosure[open] .when-closed {
  display: none;
}

.home-page .case-detail p {
  margin: 8px 0 16px;
}

.home-page .case-detail .text-link {
  color: #fff;
}

.diagnosis-page .form-input[aria-invalid="true"],
.diagnosis-page .form-textarea[aria-invalid="true"] {
  border-color: #ffa497;
}

.diagnosis-page .verify-btn:disabled {
  color: #b8b8c0;
  background: rgba(255, 255, 255, 0.12);
}

.diagnosis-page .form-ok {
  color: var(--aqua);
}

@media (hover: hover) {
  .home-page .capability-list:has(.capability-row:hover) .capability-row:not(:hover):not([open]):not(:focus-within):not(:has(+ [open], + :hover)) {
    border-bottom-color: var(--home-line);
  }

  .home-page .capability-list:has(.capability-row:hover) .capability-row:not(:hover):not([open]):not(:focus-within) h3 {
    color: var(--home-muted);
  }

  .home-page .case-row:hover,
  .home-page .case-row:focus-within {
    border-color: var(--accent-bright);
  }
}

@media (max-width: 1023px) {
  :root {
    --page-gutter: 48px;
    --header-height: 64px;
  }

  .home-page .capability-row > summary {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px 16px;
  }

  .capability-summary {
    grid-column: 1;
  }

  .capability-row .disclosure-icon {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .capability-detail {
    padding-right: 60px;
    gap: 24px;
  }

  .home-page .case-ledger {
    gap: 24px;
  }
}

@media (max-width: 767px) {
  .capability-detail {
    grid-template-columns: 1fr;
    padding-right: 0;
  }
}

@media (max-width: 599px) {
  :root {
    --page-gutter: 16px;
    --header-height: 56px;
  }

  .home-page .hero-inner {
    padding: 40px 0;
  }

  .home-page .hero-actions {
    gap: 12px;
    margin-top: 24px;
  }

  .home-page .case-ledger {
    gap: 16px;
  }

  .diagnosis-page .diagnosis-main {
    padding-top: 40px;
  }

  .diagnosis-page .diagnosis-intro {
    margin-bottom: 40px;
  }

  .question-box {
    min-height: 112px;
    padding: 18px;
    font-size: 16px;
  }

  #input-answer {
    min-height: 140px;
  }

  #conversation-form {
    padding-top: 28px;
  }

  .diagnosis-page #conversation-form .form-actions {
    flex-direction: row;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
  }
}

@media (max-height: 700px) {
  .home-page .hero-inner {
    padding: 24px 0 32px;
  }

  .home-page .hero-meta {
    margin-bottom: 16px;
  }

  .home-page .hero-lead {
    margin-top: 16px;
  }

  .home-page .band {
    padding-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-duration: 0s;
  }

  .home-page .site-header,
  :is(.capability-row, .case-disclosure)::details-content,
  .disclosure-icon::before,
  .disclosure-icon::after,
  .header-nav a::after,
  .text-link::after {
    transition: none !important;
  }
}
