:root {
  color-scheme: light;
  --ink: #102c32;
  --muted: #4c6668;
  --brand: #075a56;
  --paper: #fff;
  --line: #d6e4e0;
  --wash: #f4f8f7;
  font: 1rem/1.5 "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--wash);
}

* { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #007b73; outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-inner, .top-actions { display: flex; align-items: center; gap: 12px 18px; }
.top-inner { min-height: 72px; justify-content: space-between; }
.top-actions { justify-content: flex-end; flex-wrap: wrap; }
.top select, .back {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
}
.back { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; }
.back:hover, .top select:hover { border-color: var(--brand); }

.intro { padding: clamp(26px, 5vw, 58px) 0 24px; }
.intro h1 { font-size: clamp(1.85rem, 4.2vw, 3.55rem); line-height: 1.1; letter-spacing: -.045em; }
.intro > p { margin-top: 10px; color: var(--muted); }
.intro .demo-notice { font-size: .9rem; color: var(--brand); font-weight: 700; }

.workspace {
  display: grid;
  grid-template-columns: minmax(165px, 216px) minmax(0, 1fr);
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 40px #153b3412;
}
.modules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 19px 14px;
  background: #103a3b;
  color: #edf8f6;
}
.clinic { padding: 9px 12px 15px; color: #c2dfda; font-size: .83rem; font-weight: 650; }
.modules a { padding: 12px; border-radius: 9px; text-decoration: none; font-weight: 650; }
.modules a:hover { background: #ffffff15; }
.modules a:focus-visible { outline-color: #a8dfd3; outline-offset: -2px; }
.modules a[aria-current] { color: var(--ink); background: #d4ece6; }

.work-area { min-width: 0; background: var(--paper); }
.panel { padding: clamp(17px, 4vw, 38px); }
.panel + .panel { border-top: 1px solid var(--line); }
.section-label { margin-bottom: 14px; color: var(--brand); font-size: .88rem; font-weight: 750; }
.panel-heading { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.panel-heading h2 { font-size: clamp(1.55rem, 3.3vw, 2.65rem); line-height: 1.12; letter-spacing: -.04em; }
.panel-heading h2:focus { outline: none; }
.panel-heading p { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: none;
  color: var(--brand);
  background: #e6f3ef;
  font-weight: 750;
}
.status {
  margin-inline-start: auto;
  padding: 5px 11px;
  border-radius: 20px;
  color: #145844;
  background: #e5f5ed;
  font-size: .81rem;
  font-weight: 700;
}
.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-block: 22px 25px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.details > div { min-width: 0; padding: 13px 15px; background: #f7fbfa; }
.details dt { color: var(--muted); font-size: .81rem; }
.details dd { margin-top: 4px; overflow-wrap: anywhere; font-weight: 700; }
.panel h3 { font-size: 1.08rem; }
.activity { margin: 9px 0 0; padding-inline-start: 20px; color: var(--muted); }
.activity li { margin-block: 6px; }

.estimate { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.estimate th, .estimate td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.estimate :is(th, td):last-child { text-align: right; white-space: nowrap; }
.estimate thead { color: var(--muted); font-size: .83rem; }
.estimate tbody th { font-weight: 550; }
.estimate tfoot { color: var(--brand); font-weight: 750; }
.next {
  display: inline-flex;
  gap: .5em;
  align-items: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid #adcdc5;
  border-radius: 10px;
  background: #f4faf8;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
.next:hover { border-color: var(--brand); background: #e8f5f0; }

@media (max-width: 720px) {
  .wrap { width: calc(100% - 28px); }
  .workspace { grid-template-columns: 1fr; border-radius: 16px; }
  .modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px 10px 11px; }
  .clinic { grid-column: 1 / -1; padding: 4px 7px; }
  .modules a { padding: 10px 7px; }
  .panel-heading { gap: 8px 12px; }
  .status { margin-inline-start: 0; }
  .details { grid-template-columns: 1fr; margin-block: 17px 20px; }
}

@media (max-width: 420px) {
  .top-inner, .top-actions { gap: 6px 8px; }
  .top-inner > img { width: 68px; height: auto; }
  .top select, .back { padding-inline: 6px; font-size: .78rem; }
}
