:root {
  color-scheme: light;
  --ink: #3e4349;
  --paper: #f8fafb;
  --white: #fff;
  --blue: #5d7a8c;
  --blue-dark: #3e5766;
  --blue-light: #9cafbe;
  --mist: #eff5f9;
  --muted: #657580;
  --line: #dce5eb;
  --goal-online: #5d7a8c;
  --goal-phone: #9cafbe;
  --goal-form: #cbd9e3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
button { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
strong { font-variant-numeric: tabular-nums; }
.page { max-width: 1344px; margin: auto; padding: 0 40px 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 104px; }
.brand { display: flex; align-items: center; gap: 24px; }
.brand img { display: block; width: 190px; height: auto; }
.brand-caption { border-left: 1px solid var(--line); padding-left: 24px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.topbar nav { display: flex; align-items: center; gap: 28px; font-size: 12px; }
.topbar nav a { transition: color .2s; }
.topbar nav a:hover { color: var(--blue); }
.topbar .clinic-link { padding: 12px 17px; border: 1px solid var(--line); border-radius: 4px; }
.clinic-link span { margin-left: 14px; }
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: end; gap: 32px; background: var(--mist); padding: 44px 44px 38px; border-radius: 8px; min-height: 292px; }
.hero::before { content: ''; position: absolute; inset: 0 0 0 auto; width: 440px; background: url('assets/lazerta-tree.svg') right center / auto 130% no-repeat; opacity: .55; pointer-events: none; }
.hero-copy, .date-card { position: relative; z-index: 1; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
h1 { font-family: Ysabeau, Arial, sans-serif; font-size: clamp(36px, 4.5vw, 60px); line-height: 1.03; font-weight: 500; letter-spacing: -.025em; text-transform: uppercase; margin-bottom: 20px; }
h1 span { color: var(--blue); }
.subtitle { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0; }
.date-card { border-top: 1px solid var(--blue-light); padding-top: 18px; padding-bottom: 4px; }
.date-label { font-size: 10px; letter-spacing: .14em; color: var(--blue-dark); }
.date-card strong { display: block; font-family: Ysabeau, Arial, sans-serif; font-size: 23px; line-height: 1.25; font-weight: 600; margin: 10px 0; }
.date-card small { display: block; font-size: 10px; color: var(--muted); line-height: 1.7; }
.retry { display: block; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--blue); border-radius: 4px; color: var(--blue-dark); background: var(--white); cursor: pointer; font-size: 11px; }
[hidden] { display: none !important; }
.overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.metric { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 24px; min-height: 166px; }
.metric p { font-size: 11px; margin-bottom: 20px; color: var(--muted); }
.metric strong { display: block; font-size: clamp(27px, 2.7vw, 39px); font-weight: 500; letter-spacing: -.045em; line-height: 1.1; margin-bottom: 15px; white-space: nowrap; }
.metric strong i { font-size: .65em; font-weight: 400; font-style: normal; }
.metric small { display: block; font-size: 10px; line-height: 1.6; color: var(--muted); }
.metric-main { background: var(--blue); border-color: var(--blue); color: var(--white); }
.metric-main p, .metric-main small { color: #f1f5f8; }
.metric-total { background: var(--mist); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; margin: 22px 0; }
.panel { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.panel h2, .section-title h2 { font-family: Ysabeau, Arial, sans-serif; font-size: 30px; line-height: 1.1; font-weight: 500; margin: 0; letter-spacing: -.02em; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pill { color: var(--blue-dark); border: 1px solid var(--line); border-radius: 4px; font-size: 10px; padding: 8px 10px; white-space: nowrap; }
.chart-wrap { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); margin: 32px 0 0; height: 220px; }
.chart-y { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; justify-content: space-between; }
.chart-y span { transform: translateY(-50%); }
.chart { position: relative; min-height: 0; border-bottom: 1px solid var(--line); }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.g1 { top: 0; } .g2 { top: 25%; } .g3 { top: 50%; } .g4 { top: 75%; }
.chart svg { height: 100%; width: 100%; display: block; position: relative; overflow: visible; }
.area { fill: url(#fill); }
.line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart circle { fill: var(--white); stroke: var(--blue); stroke-width: 2.5; }
.x-axis { display: flex; justify-content: space-between; gap: 4px; padding-top: 13px; font-size: 9px; color: var(--muted); }
.chart-note { font-size: 10px; line-height: 1.6; color: var(--muted); margin: 43px 0 0; }
.chart-note span { display: inline-block; width: 16px; height: 2px; background: var(--blue); margin: 0 7px 3px 0; }
.result { background: var(--mist); border-color: var(--mist); }
.donut-block { display: flex; align-items: center; gap: 24px; margin: 32px 0; }
.donut { position: relative; flex: 0 0 132px; width: 132px; height: 132px; border-radius: 50%; background: var(--line); display: grid; place-items: center; }
.donut::before { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: var(--mist); }
.donut > div { position: relative; text-align: center; }
.donut strong { font-size: 33px; font-weight: 500; display: block; letter-spacing: -.04em; }
.donut span { font-size: 10px; color: var(--muted); }
.legend { display: grid; gap: 17px; list-style: none; padding: 0; margin: 0; font-size: 10px; line-height: 1.45; }
.legend li { display: grid; grid-template-columns: 8px 25px 1fr; align-items: baseline; gap: 7px; }
.legend b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.online { background: var(--goal-online); } .phone { background: var(--goal-phone); } .form { background: var(--goal-form); }
.fine-print { font-size: 10px; line-height: 1.7; color: var(--muted); margin: 0; border-top: 1px solid var(--line); padding-top: 20px; }
.directions { padding: 32px 28px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); margin: 22px 0; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-title > span { color: var(--muted); font-size: 10px; }
.direction-list { border-top: 1px solid var(--line); }
.direction { display: grid; grid-template-columns: 38px minmax(0, 2fr) minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.25fr) 80px; align-items: center; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.direction:last-child { border-bottom: 0; }
.rank { font-size: 11px; color: var(--blue); }
.direction-name h3 { font-family: Ysabeau, Arial, sans-serif; font-size: 21px; font-weight: 600; line-height: 1.15; margin: 0 0 6px; }
.direction-name span { font-size: 9px; letter-spacing: .1em; color: var(--muted); }
.direction label { display: block; font-size: 9px; line-height: 1.5; color: var(--muted); margin-bottom: 7px; }
.direction strong { font-size: 15px; font-weight: 500; white-space: nowrap; }
.mini-bar { height: 4px; background: var(--mist); border-radius: 2px; overflow: hidden; }
.mini-bar span { display: block; width: var(--size, 0%); height: 100%; background: var(--blue-light); }
.hot .mini-bar span { background: var(--blue); }
.insight { display: grid; grid-template-columns: 1fr 1.3fr; gap: 50px; align-items: center; background: var(--mist); border-radius: 8px; padding: 30px; margin-top: 22px; }
.insight h2 { font-family: Ysabeau, Arial, sans-serif; font-size: 29px; font-weight: 500; line-height: 1.1; margin: 0; }
.insight > p { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 0; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 28px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
body:not([data-state='ready']) .chart svg, body:not([data-state='ready']) .chart-y, body:not([data-state='ready']) .x-axis { visibility: hidden; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; }
body[data-state='ready'] .chart-empty { display: none; }
.noscript { padding: 16px; background: var(--mist); font-size: 13px; }

@media (min-width: 1000px) {
  .metric { transition: transform .2s, box-shadow .2s; }
  .metric:hover { transform: translateY(-3px); box-shadow: 0 10px 24px #3e57660a; }
}
@media (max-width: 1100px) {
  .page { padding: 0 24px 24px; }
  .brand-caption { display: none; }
  .hero { padding: 34px; grid-template-columns: minmax(0, 1fr) 260px; }
  .metric { padding: 20px 16px; }
  .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .panel { padding: 24px; }
  .donut-block { flex-wrap: wrap; gap: 22px; }
  .legend { gap: 12px; }
  .direction { grid-template-columns: 26px minmax(0, 1.5fr) 1fr .8fr 1fr; gap: 12px; }
  .mini-bar { display: none; }
}
@media (max-width: 760px) {
  .page { padding: 0 16px 24px; }
  .topbar { min-height: 82px; gap: 16px; }
  .brand img { width: 153px; }
  .topbar nav > a:not(.clinic-link) { display: none; }
  .topbar .clinic-link { padding: 10px 12px; font-size: 10px; }
  .clinic-link span { margin-left: 6px; }
  .hero { grid-template-columns: 1fr; gap: 30px; min-height: auto; padding: 30px 24px; }
  .hero::before { width: 65%; opacity: .35; }
  h1 { font-size: clamp(34px, 7vw, 48px); }
  .date-card { max-width: 330px; padding-top: 16px; }
  .date-card strong { font-size: 21px; }
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
  .metric { padding: 20px 16px; min-height: 160px; }
  .metric p { font-size: 10px; min-height: 24px; line-height: 1.4; margin-bottom: 10px; }
  .metric strong { font-size: clamp(25px, 5.8vw, 36px); margin-bottom: 10px; }
  .metric small { font-size: 9px; }
  .split { grid-template-columns: 1fr; gap: 16px; margin: 16px 0; }
  .panel { padding: 24px 20px; }
  .panel h2, .section-title h2 { font-size: 27px; }
  .pill { font-size: 9px; padding: 7px; }
  .chart-wrap { height: 180px; }
  .chart-note { font-size: 9px; }
  .x-axis { font-size: 8px; }
  .donut-block { flex-wrap: nowrap; justify-content: center; gap: 26px; margin: 28px 0; }
  .directions { padding: 26px 20px 6px; margin: 16px 0; }
  .section-title { align-items: start; flex-direction: column; gap: 12px; }
  .direction { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; padding: 22px 0; }
  .rank { grid-column: 1; grid-row: 1; align-self: start; padding-top: 4px; }
  .direction-name { grid-column: 1 / -1; grid-row: 1; padding-left: 32px; }
  .direction-name h3 { font-size: 22px; }
  .direction label { font-size: 9px; min-height: 27px; }
  .direction strong { font-size: 14px; }
  .insight { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px; margin-top: 16px; }
  .insight > p { font-size: 11px; }
  footer { flex-direction: column; gap: 7px; font-size: 9px; }
}
@media (max-width: 360px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .hero { padding: 26px 18px; }
  .panel, .directions { padding-left: 16px; padding-right: 16px; }
  .panel-heading { align-items: start; flex-direction: column; }
  .donut-block { gap: 16px; }
  .donut { flex-basis: 110px; width: 110px; height: 110px; }
  .direction strong { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
