:root {
  color-scheme: light;
  --ink: #12314a;
  --muted: #617284;
  --line: #d5e0e8;
  --paper: #ffffff;
  --soft: #f1f7fb;
  --brand: #009ac7;
  --brand-dark: #042e5f;
  --blue: #1f74a8;
  --gold: #e0a526;
  --danger: #a33b32;
  --ok: #0a7a8b;
  --shadow: 0 18px 45px rgba(23, 34, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.9rem;
}

.topbar__inner,
.site-nav__inner,
.footer__grid {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-nav__inner {
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  border-color: var(--brand);
}

.nav-links a.is-active {
  color: var(--brand-dark);
  border-color: var(--brand);
}

.menu-toggle {
  display: none;
}

.page-view[hidden] {
  display: none;
}

.protected-section.is-locked .protected-content {
  display: none;
}

.protected-section.is-unlocked .protected-gate {
  display: none;
}

.protected-gate {
  max-width: 760px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(23, 34, 45, 0.06);
}

.login-hint {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.hero {
  background: #eaf5fb;
  border-bottom: 1px solid var(--line);
}

.hero__grid {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 52px;
  align-items: center;
  padding: 54px 0 62px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.35rem, 4.6vw, 4.9rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 3rem);
}

h3 {
  font-size: 1.24rem;
}

p {
  color: var(--muted);
  line-height: 1.62;
}

.hero__copy p:not(.eyebrow) {
  max-width: 690px;
  font-size: 1.12rem;
}

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

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 0 16px;
  border-radius: 4px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
}

.btn--primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.btn--secondary {
  color: var(--ink);
  background: #fff;
}

.btn--danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.hero__visual {
  min-height: 430px;
  display: grid;
  place-items: center;
}

.hospital-illustration {
  position: relative;
  width: min(620px, 100%);
  aspect-ratio: 1.24;
  overflow: hidden;
  background: #d9edf8;
  border: 1px solid #bfd9e8;
  box-shadow: var(--shadow);
}

.sky {
  position: absolute;
  inset: 0 0 42%;
  background:
    radial-gradient(circle at 15% 25%, #ffffff 0 8%, transparent 9%),
    linear-gradient(180deg, #9fd3ea, #edf8fc);
}

.building {
  position: absolute;
  background: #f8fbfd;
  border: 1px solid #aac6d8;
}

.building--back {
  left: 10%;
  right: 18%;
  bottom: 22%;
  height: 38%;
}

.building--front {
  left: 22%;
  right: 8%;
  bottom: 17%;
  height: 46%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 28px;
}

.building--front span {
  min-height: 28px;
  background: #76b9d5;
}

.entrance {
  position: absolute;
  left: 38%;
  bottom: 17%;
  width: 22%;
  height: 18%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.ground {
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  background: #c8d6a0;
}

.quick-links {
  border-bottom: 1px solid var(--line);
}

.quick-links__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.quick-links a {
  min-height: 84px;
  display: flex;
  align-items: center;
  padding: 18px;
  border-right: 1px solid var(--line);
  font-weight: 800;
}

.quick-links a:last-child {
  border-right: 0;
}

.section {
  padding: 76px 0;
}

.section--muted {
  background: var(--soft);
}

.section--accent {
  background: #eaf7fb;
}

.section__head {
  max-width: 820px;
  margin-bottom: 28px;
}

.section__head--split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 54px;
  align-items: start;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.service-card {
  min-height: 180px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.service-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.service-card small {
  color: var(--brand);
  font-weight: 800;
}

.doc-table,
.case-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.doc-table > div {
  display: grid;
  grid-template-columns: 1.8fr 0.8fr 0.7fr 0.7fr;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.doc-table > div:first-child {
  border-top: 0;
}

.doc-table__head {
  color: #fff;
  background: var(--brand-dark);
  font-weight: 800;
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.claim-form,
.receipt,
.code,
.dashboard__item,
.case-detail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(23, 34, 45, 0.06);
}

.claim-form {
  padding: 22px;
}

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

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd3da;
  border-radius: 4px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(0, 154, 199, 0.2);
  border-color: var(--brand);
}

.check {
  grid-template-columns: 20px 1fr;
  align-items: start;
  font-weight: 700;
}

.check input {
  margin-top: 3px;
}

.receipt {
  position: sticky;
  top: 100px;
  padding: 22px;
}

.receipt__folio {
  display: inline-flex;
  margin: 8px 0;
  padding: 8px 12px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.receipt dl {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 8px 12px;
  margin: 18px 0 0;
}

.receipt dt {
  color: var(--muted);
  font-weight: 800;
}

.receipt dd {
  margin: 0;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.login-box,
.reports {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.login-box p,
.reports p {
  margin: 6px 0 0;
}

.login-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.login-form input {
  width: 150px;
}

.reports[hidden] {
  display: none;
}

.dashboard__item {
  padding: 16px;
}

.dashboard__item strong {
  display: block;
  font-size: 1.8rem;
}

.dashboard__item span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.case-row {
  display: grid;
  grid-template-columns: 1fr 0.95fr 0.8fr 0.9fr 0.8fr 0.9fr;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  align-items: center;
  font-size: 0.9rem;
}

.case-row:first-child {
  border-top: 0;
}

.case-row--head {
  color: #fff;
  background: var(--brand-dark);
  font-weight: 900;
}

.badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.badge--new {
  color: var(--blue);
  background: #e6f0f8;
}

.badge--api {
  color: var(--ok);
  background: #e5f3ea;
}

.badge--warn {
  color: #8a5b12;
  background: #fff1d6;
}

.case-detail {
  margin-top: 12px;
  padding: 16px;
}

.case-detail pre,
.code {
  overflow: auto;
  max-height: 460px;
  padding: 16px;
  color: #eaf2f0;
  background: #16242a;
  font-size: 0.84rem;
  line-height: 1.5;
}

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

.footer span {
  color: #d5dde3;
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0 12px;
    border-radius: 4px;
    font-weight: 800;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 24px;
    border-top: 1px solid var(--line);
  }

  .hero__grid,
  .two-col,
  .flow-layout {
    grid-template-columns: 1fr;
  }

  .hero__grid {
    min-height: auto;
  }

  .quick-links__grid,
  .service-grid,
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .receipt {
    position: static;
  }

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

  .case-row--head {
    display: none;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 22px, 1160px);
  }

  .topbar__inner,
  .footer__grid,
  .section__head--split {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .hero__grid {
    gap: 28px;
    padding: 36px 0;
  }

  .hero__visual {
    min-height: 280px;
  }

  .quick-links__grid,
  .service-grid,
  .field-row,
  .dashboard,
  .login-box,
  .reports,
  .doc-table > div {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }
}
