:root {
  color-scheme: light;
  --ink: #102c38;
  --muted: #6a7e84;
  --line: #e0e9e8;
  --paper: #f3f7f5;
  --card: #fff;
  --teal: #087c79;
  --teal-dark: #075e5e;
  --teal-soft: #e2f3ef;
  --orange: #df7b39;
  --shadow: 0 12px 34px rgba(16, 44, 56, .055);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px max(24px, calc((100% - 1120px) / 2));
  background: #0b2430;
  color: #f7fcfa;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(177, 231, 217, .43);
  border-radius: 13px;
  background: rgba(68, 188, 160, .12);
  color: #a8e9d5;
  font: 800 20px system-ui, sans-serif;
}

.topbar h1, h2, p { margin-top: 0; }
.topbar h1 { margin-bottom: 0; font: 700 19px system-ui, sans-serif; letter-spacing: -.025em; }
.topbar .eyebrow { margin-bottom: 3px; color: #93b5b8; }
.source-link { margin-left: auto; color: #c5e8e2; font-size: 13px; text-decoration: none; }
.source-link:hover, .text-link:hover { text-decoration: underline; }

main { max-width: 1120px; margin: 34px auto 52px; padding: 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .82fr 1.12fr; gap: 16px; margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid rgba(205, 220, 218, .8); border-radius: 15px; box-shadow: var(--shadow); }
.live-card, .summary-card { min-height: 170px; padding: 22px 24px; }
.live-card { background: linear-gradient(135deg, #fff 0%, #f1fbf7 100%); }
.card-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.eyebrow { margin-bottom: 7px; color: #778b8d; font-size: 10px; font-weight: 700; letter-spacing: .13em; line-height: 1.35; text-transform: uppercase; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #44b987; box-shadow: 0 0 0 5px #e0f5e9; }
.visitor-line { display: flex; align-items: baseline; gap: 10px; margin: 5px 0 5px; }
.visitor-line strong { font: 800 49px/1 system-ui, sans-serif; letter-spacing: -.07em; color: var(--teal-dark); }
.visitor-line span { color: #557477; font-size: 14px; }
.muted { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.summary-value { margin: 11px 0 2px; font: 800 32px/1.2 system-ui, sans-serif; letter-spacing: -.055em; }
.summary-foot { margin-top: 15px; color: #8a9a9a; font-size: 11px; }
.summary-recommendation { font-size: 21px; letter-spacing: -.035em; }
.recommendation-card .muted { max-width: 330px; }
.error-message { margin: 10px 0 0; color: #9d4a26; font-size: 12px; }

.chart-card, .recommendations-card { padding: 23px 24px 20px; margin-top: 17px; }
.section-heading { margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 4px; }
h2 { margin-bottom: 0; font: 700 19px system-ui, sans-serif; letter-spacing: -.035em; }
.range-control { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
select { min-height: 35px; padding: 0 30px 0 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
.chart-wrap { width: 100%; height: 230px; }
canvas { width: 100%; height: 100%; display: block; }
.chart-legend { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid #eef2f0; color: #829395; font-size: 11px; }
.chart-legend span:first-child { display: inline-flex; align-items: center; gap: 8px; color: #526c70; }
.chart-legend i { width: 15px; height: 3px; border-radius: 3px; background: var(--teal); }
.text-link { color: var(--teal-dark); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 12px; color: #819292; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
td { padding: 14px 12px; border-top: 1px solid #edf1ef; color: #28454c; font-size: 13px; }
tbody tr:first-child td { border-top: 1px solid var(--line); }
td strong { color: var(--teal-dark); font: 700 16px 'Manrope', sans-serif; }
.empty-state { padding: 21px 12px; color: #859496; font-size: 12px; }

.schedule-card { margin-top: 17px; padding: 0 24px; }
.schedule-card summary { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; }
.schedule-card summary::-webkit-details-marker { display: none; }
.schedule-card summary span:first-child { display: grid; gap: 1px; }
.schedule-card summary strong { font: 700 16px system-ui, sans-serif; }
.summary-chevron { color: var(--teal); font-size: 22px; transition: transform .15s ease; }
.schedule-card[open] .summary-chevron { transform: rotate(45deg); }
.schedule-content { padding: 0 0 22px; border-top: 1px solid #edf1ef; }
.schedule-content > .muted { max-width: 820px; margin: 16px 0; }
code { color: var(--teal-dark); background: #edf7f3; padding: 1px 4px; border-radius: 4px; }
.schedule-template-row, .schedule-actions { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.schedule-template-row .muted { font-size: 11px; }
textarea { display: block; width: 100%; min-height: 270px; resize: vertical; padding: 14px; border: 1px solid #cddbd7; border-radius: 9px; background: #fbfdfc; color: #17363e; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
.token-label { display: grid; gap: 6px; width: min(100%, 460px); margin: 14px 0; color: #627b7e; font-size: 11px; font-weight: 600; }
.token-label input { min-height: 38px; padding: 0 11px; border: 1px solid #cddbd7; border-radius: 8px; color: var(--ink); font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
textarea:focus, select:focus, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(8, 124, 121, .23); outline-offset: 2px; }
.button { min-height: 38px; border: 0; border-radius: 8px; cursor: pointer; font: 600 12px 'DM Sans', sans-serif; }
.button-primary { padding: 0 15px; background: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { padding: 0 12px; background: var(--teal-soft); color: var(--teal-dark); }
#schedule-status { color: #557477; font-size: 12px; }
#schedule-status.error { color: #9d4a26; }
.disclaimer { margin: 18px 2px 0; color: #839395; font-size: 11px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 800px) {
  main { margin-top: 22px; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .recommendation-card { grid-column: span 2; min-height: 143px; }
  .chart-wrap { height: 200px; }
}

@media (max-width: 540px) {
  .topbar { min-height: 76px; padding: 15px 18px; }
  main { padding: 0 14px; }
  .brand-mark { width: 38px; height: 38px; }
  .topbar h1 { font-size: 17px; }
  .source-link { font-size: 11px; }
  .hero-grid { grid-template-columns: 1fr; gap: 11px; }
  .live-card, .summary-card, .recommendation-card { grid-column: auto; min-height: 140px; padding: 18px 19px; }
  .visitor-line strong { font-size: 44px; }
  .chart-card, .recommendations-card { padding: 19px 16px 16px; }
  .section-heading { align-items: flex-start; }
  h2 { font-size: 17px; }
  .chart-wrap { height: 180px; }
  .chart-legend { font-size: 10px; }
  .schedule-card { padding: 0 16px; }
  th, td { padding-left: 7px; padding-right: 7px; }
  th { font-size: 9px; }
  td { font-size: 12px; }
}
