:root {
  color-scheme: light;
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --ink: #111827;
  --muted: #566476;
  --line: #d5dde6;
  --line-strong: #b8c5d2;
  --teal: #146c70;
  --blue: #245f9f;
  --gold: #9a681b;
  --red: #934040;
  --green: #2d7650;
  --violet: #66539c;
  --focus: #0f766e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  border: 2px solid var(--focus);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-180%);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.42);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.console-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.product-header {
  border-top: 5px solid var(--blue);
  border-bottom: 1px solid var(--line-strong);
  padding: 28px 0 24px;
}

.header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.62fr);
  gap: 36px;
  align-items: end;
}

.lead {
  max-width: 760px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
}

.label,
.role-kicker {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.case-state-bar {
  display: grid;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.case-state-bar div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 4px;
}

.case-state-bar div:last-child {
  border-bottom: 0;
}

.case-state-bar span {
  color: var(--muted);
  font-size: 13px;
}

.case-state-bar strong {
  font-size: 14px;
}

.boundary {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  padding: 14px 0;
}

.boundary strong {
  color: var(--red);
  font-size: 13px;
  text-transform: uppercase;
}

.boundary span {
  color: #3e4b5c;
  font-size: 14px;
}

.role-entry-panel,
.process-panel,
.safety-panel,
.details-panel {
  padding: 30px 0;
}

.section-head {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.section-head-wide {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.56fr);
  gap: 28px;
  align-items: end;
}

.section-head-wide > p {
  color: var(--muted);
  font-size: 14px;
}

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

.role-entry {
  display: flex;
  min-height: 218px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.role-entry.hunter {
  border-top-color: var(--blue);
}

.role-entry.owl {
  border-top-color: var(--violet);
}

.role-entry.reader {
  border-top-color: var(--gold);
}

.role-entry:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.role-entry strong {
  margin-top: 10px;
  font-size: 19px;
  line-height: 1.2;
}

.role-entry p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.link-action {
  margin-top: auto;
  padding-top: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.link-action::after,
.text-link::after,
.next-action a::after,
.detail-groups a::after {
  content: " >";
}

.current-case {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 42px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 30px 0;
  background: #e9f2f2;
  box-shadow: 0 0 0 100vmax #e9f2f2;
  clip-path: inset(0 -100vmax);
}

.state-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.status-badge {
  border: 1px solid #d8b66d;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff8e7;
  color: #76500f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.state-copy {
  max-width: 680px;
  margin-top: 12px;
  color: #415163;
}

.next-action {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  border-left: 4px solid var(--teal);
  padding-left: 14px;
}

.next-action span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.next-action a,
.text-link {
  width: fit-content;
  margin-top: 6px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.readiness-panel {
  border-left: 1px solid #b9cccc;
  padding-left: 28px;
}

.readiness-panel ul {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.readiness-panel li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 16px;
  min-height: 42px;
  align-items: center;
  border-top: 1px solid #c8d8d8;
  font-size: 13px;
}

.readiness-panel li span {
  color: var(--muted);
}

.readiness-panel li strong {
  text-align: right;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px 10px;
  min-height: 158px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: var(--surface);
}

.process-steps li > span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.process-steps strong {
  align-self: center;
  font-size: 15px;
  line-height: 1.25;
}

.process-steps p {
  grid-column: 1 / 3;
  color: var(--muted);
  font-size: 13px;
}

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

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

.safety-grid article {
  min-height: 170px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.safety-grid article:nth-child(2) {
  border-left-color: var(--gold);
}

.safety-grid article:nth-child(3) {
  border-left-color: var(--red);
}

.safety-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.safety-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
}

.safety-grid p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-groups section {
  display: grid;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.detail-groups h3 {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  background: #eaf0f5;
}

.detail-groups a {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  color: #26384d;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.detail-groups a:last-child {
  border-bottom: 0;
}

.detail-groups a:hover {
  background: #f1f6f7;
}

.page-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-top: 1px solid var(--line-strong);
  padding: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-footer strong {
  color: var(--ink);
}

@media (max-width: 1100px) {
  .header-grid,
  .section-head-wide,
  .current-case {
    grid-template-columns: 1fr;
  }

  .header-grid,
  .current-case {
    gap: 24px;
  }

  .case-state-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-state-bar div {
    grid-template-columns: 1fr;
    gap: 2px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 10px 12px;
  }

  .case-state-bar div:last-child {
    border-right: 0;
  }

  .role-entry-grid,
  .process-steps,
  .detail-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readiness-panel {
    border-top: 1px solid #b9cccc;
    border-left: 0;
    padding-top: 20px;
    padding-left: 0;
  }
}

@media (max-width: 680px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .console-shell {
    width: 100%;
    max-width: 100%;
    padding: 0 16px 40px;
    overflow-x: clip;
  }

  .product-header {
    padding: 20px 0 18px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 22px;
  }

  .lead {
    font-size: 16px;
  }

  .case-state-bar {
    grid-template-columns: 1fr;
  }

  .case-state-bar div {
    grid-template-columns: 118px minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 4px;
  }

  .case-state-bar div:last-child {
    border-bottom: 0;
  }

  .boundary {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .role-entry-panel,
  .process-panel,
  .safety-panel,
  .details-panel {
    padding: 24px 0;
  }

  .section-head-wide {
    gap: 10px;
  }

  .role-entry-grid,
  .process-steps,
  .safety-grid,
  .detail-groups {
    grid-template-columns: 1fr;
  }

  .role-entry {
    min-height: 190px;
  }

  .current-case {
    padding: 24px 0;
  }

  .readiness-panel li {
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
    gap: 10px;
  }

  .process-steps li,
  .safety-grid article {
    min-height: 0;
  }

  .role-entry,
  .process-steps li,
  .safety-grid article,
  .detail-groups section,
  .case-state-bar,
  .readiness-panel {
    min-width: 0;
  }

  .role-entry strong,
  .role-entry p,
  .process-steps strong,
  .process-steps p,
  .safety-grid strong,
  .safety-grid p,
  .detail-groups a,
  .readiness-panel li > *,
  .case-state-bar div > * {
    overflow-wrap: anywhere;
  }
}

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

  .role-entry {
    transition: none;
  }
}
