:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.48);
  --text: #0b0b0c;
  --text-soft: #424245;
  --muted: #86868b;
  --muted-strong: #6e6e73;
  --hairline: rgba(0, 0, 0, 0.065);
  --hairline-strong: rgba(0, 0, 0, 0.11);
  --shadow: 0 22px 60px -32px rgba(0, 0, 0, 0.2), 0 4px 24px -8px rgba(0, 0, 0, 0.045);
  --shadow-float: 0 26px 70px -24px rgba(0, 0, 0, 0.28);
  --heart: #ff2d55;
  --heart-soft: rgba(255, 45, 85, 0.12);
  --sleep: #5856d6;
  --core: #007aff;
  --rem: #32ade6;
  --awake: #ff9500;
  --activity: #34c759;
  --oxygen: #00c7be;
  --ink-button: #141416;
  --on-ink: #ffffff;
  --focus: rgba(0, 122, 255, 0.35);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 17px;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070708;
  --bg-elevated: #1c1c1e;
  --surface: rgba(27, 27, 30, 0.76);
  --surface-strong: rgba(34, 34, 37, 0.94);
  --surface-soft: rgba(39, 39, 42, 0.48);
  --text: #f5f5f7;
  --text-soft: #d1d1d6;
  --muted: #98989d;
  --muted-strong: #aeaeb2;
  --hairline: rgba(255, 255, 255, 0.085);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 28px 70px -35px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.025);
  --shadow-float: 0 30px 80px -25px rgba(0, 0, 0, 0.82);
  --ink-button: #f5f5f7;
  --on-ink: #101012;
  --heart-soft: rgba(255, 69, 106, 0.13);
  --focus: rgba(10, 132, 255, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 400ms var(--spring), color 400ms var(--spring);
}

button,
input,
textarea {
  font: inherit;
  font-variant-numeric: tabular-nums;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.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;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.22;
  background-image: radial-gradient(rgba(0, 0, 0, 0.16) 0.48px, transparent 0.48px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

html[data-theme="dark"] .atmosphere::after {
  opacity: 0.1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.42) 0.5px, transparent 0.5px);
}

.atmosphere__orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.6;
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

.atmosphere__orb--one {
  top: -17vw;
  right: 4vw;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgba(255, 149, 0, 0.13), rgba(255, 45, 85, 0.05) 42%, transparent 70%);
}

.atmosphere__orb--two {
  bottom: -30vw;
  left: -10vw;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, rgba(88, 86, 214, 0.13), rgba(0, 122, 255, 0.04) 45%, transparent 72%);
  animation-delay: -7s;
}

html[data-theme="dark"] .atmosphere__orb {
  opacity: 0.38;
}

.atmosphere__grid {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1420px, 92vw);
  height: 100%;
  transform: translateX(-50%);
  opacity: 0.36;
  background:
    linear-gradient(90deg, transparent calc(25% - 0.5px), var(--hairline) 25%, transparent calc(25% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), var(--hairline) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(75% - 0.5px), var(--hairline) 75%, transparent calc(75% + 0.5px));
  mask-image: linear-gradient(to bottom, transparent, black 12%, transparent 60%);
}

@keyframes ambient-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(0.96); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1420px, calc(100% - 36px));
  height: 66px;
  margin: 14px auto 0;
  padding: 0 10px 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 23px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  box-shadow: 0 8px 34px -20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--ink-button);
  color: var(--on-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.brand__mark svg {
  width: 27px;
  height: 27px;
}

.brand__name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.period-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 294px;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface-soft);
}

.period-switch__indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 4);
  border-radius: 10px;
  background: var(--ink-button);
  box-shadow: 0 5px 15px -8px rgba(0, 0, 0, 0.6);
  transition: transform 480ms var(--spring), width 480ms var(--spring);
}

.period-switch__button {
  position: relative;
  z-index: 1;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 570;
  cursor: pointer;
  transition: color 260ms ease;
}

.period-switch__button.is-active {
  color: var(--on-ink);
}

.topbar__actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button,
.avatar-button,
.drawer-close {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: transform 260ms var(--spring), background 260ms ease, border-color 260ms ease;
}

.icon-button:hover,
.avatar-button:hover,
.drawer-close:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-strong);
  background: var(--surface-strong);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.icon-sun,
html[data-theme="dark"] .icon-moon {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: block;
}

.avatar-button {
  border-color: transparent;
  border-radius: 50%;
  background: linear-gradient(145deg, #dfe5ec, #bdc7d4);
  color: #28313b;
  font-size: 13px;
  font-weight: 650;
}

html[data-theme="dark"] .avatar-button {
  background: linear-gradient(145deg, #43454b, #282a2f);
  color: #f2f3f5;
}

.sync-pill {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 260ms var(--spring), background 260ms ease;
}

.sync-pill:hover {
  transform: translateY(-1px);
  background: var(--surface-strong);
}

.sync-pill svg {
  width: 14px;
  height: 14px;
  transition: transform 300ms var(--spring);
}

.sync-pill[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.sync-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--activity);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.12);
}

.sync-pill__dot.is-stale {
  background: var(--awake);
  box-shadow: 0 0 0 4px rgba(255, 149, 0, 0.12);
}

.account-menu,
.sync-popover {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 40;
  min-width: 172px;
  padding: 7px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(26px) saturate(180%);
  animation: popover-in 260ms var(--spring);
}

.account-menu button,
.text-button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.account-menu button:hover,
.text-button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.account-menu__divider {
  height: 1px;
  margin: 5px 4px;
  background: var(--hairline);
}

.sync-popover {
  width: 300px;
  padding: 15px;
}

.sync-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 650;
}

.sync-popover__head .text-button {
  width: auto;
  padding: 4px 0;
  color: var(--muted);
}

.sync-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  border-top: 1px solid var(--hairline);
  color: var(--muted-strong);
  font-size: 12px;
}

.sync-item strong {
  color: var(--text-soft);
  font-weight: 550;
}

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.page-shell {
  width: min(1420px, calc(100% - 56px));
  margin: 0 auto;
  padding-bottom: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(460px, 0.7fr);
  gap: 42px;
  align-items: end;
  padding: 82px 4px 39px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 580;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow__signal {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--heart);
  box-shadow: 0 0 0 4px var(--heart-soft);
}

.eyebrow__signal::after {
  position: absolute;
  inset: -5px;
  border: 1px solid var(--heart);
  border-radius: 50%;
  content: "";
  opacity: 0;
  animation: signal-pulse 3.4s var(--spring) infinite;
}

#dateLabel.is-stale {
  color: var(--awake);
}

@keyframes signal-pulse {
  0%, 58% { opacity: 0; transform: scale(0.6); }
  70% { opacity: 0.3; }
  100% { opacity: 0; transform: scale(1.7); }
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(46px, 5.1vw, 72px);
  font-weight: 630;
  line-height: 0.99;
  letter-spacing: -0.058em;
}

.hero__insight {
  max-width: 760px;
  min-height: 31px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: clamp(17px, 1.55vw, 21px);
  font-weight: 430;
  line-height: 1.55;
  letter-spacing: -0.018em;
}

.hero__status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
}

.status-capsule {
  display: flex;
  min-height: 122px;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px 16px;
  border: 1px solid var(--hairline);
  border-radius: 21px;
  background: var(--surface-soft);
  backdrop-filter: blur(15px);
  transition: transform 350ms var(--spring), background 350ms ease;
}

.status-capsule:hover {
  transform: translateY(-2px);
  background: var(--surface);
}

.status-capsule--primary {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.5), transparent 52%),
    var(--heart-soft);
}

html[data-theme="dark"] .status-capsule--primary {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 52%),
    var(--heart-soft);
}

.status-capsule__label {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-capsule__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 7px 0;
  font-size: 30px;
  font-weight: 610;
  line-height: 1;
  letter-spacing: -0.045em;
}

.status-capsule__value small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0;
}

.status-capsule__meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-capsule__meta.is-positive {
  color: var(--activity);
}

.status-capsule__meta.is-alert {
  color: var(--awake);
}

.vitals-strip {
  margin-bottom: 16px;
  padding: 23px 25px 21px;
  border: 1px solid var(--hairline);
  border-radius: 27px;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--oxygen) 5%, transparent), transparent 38%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(180%);
}

.vitals-strip__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.vitals-strip__header .card__kicker {
  margin-bottom: 5px;
}

.vitals-strip__header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 610;
  letter-spacing: -0.035em;
}

.vitals-strip__meta {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 9.5px;
}

.vitals-strip__meta span + span {
  padding-left: 11px;
  border-left: 1px solid var(--hairline-strong);
}

.vitals-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.vital-skeleton {
  height: 112px;
  border-radius: 17px;
  background: linear-gradient(
    100deg,
    var(--surface-soft) 20%,
    color-mix(in srgb, var(--surface-strong) 70%, transparent) 42%,
    var(--surface-soft) 64%
  );
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.8s linear infinite;
}

@keyframes skeleton-shimmer {
  to { background-position: -220% 0; }
}

.vital {
  min-width: 0;
  padding: 14px 14px 12px;
  border: 1px solid var(--hairline);
  border-radius: 17px;
  background: var(--surface-soft);
  transition: transform 320ms var(--spring), border-color 220ms ease;
}

.vital:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-strong);
}

.vital__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vital__label {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vital__status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 590;
}

.vital__status.is-inside {
  color: var(--activity);
}

.vital__status.is-outside {
  color: var(--awake);
}

.vital__status.is-limited {
  color: var(--muted);
}

.vital__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 11px 0 12px;
  font-size: 25px;
  font-weight: 610;
  line-height: 1;
  letter-spacing: -0.045em;
}

.vital__value small {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 520;
  letter-spacing: 0;
}

.vital-track {
  position: relative;
  height: 4px;
  margin: 0 2px 9px;
  border-radius: 10px;
  background: var(--hairline-strong);
}

.vital-track__corridor {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--activity) 34%, transparent);
}

.vital-track__marker {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface-strong);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 1px var(--hairline-strong);
  transform: translate(-50%, -50%);
}

.vital-track__marker.is-outside {
  background: var(--awake);
}

.vital__meta {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-logger {
  margin-bottom: 18px;
  padding: 20px 24px;
  overflow: visible;
}

.context-logger:hover {
  transform: none;
}

.context-logger__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.context-logger__header .card__kicker {
  margin-bottom: 4px;
}

.context-logger__header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 610;
  letter-spacing: -0.03em;
}

.context-save-state {
  color: var(--muted);
  font-size: 9px;
}

.context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.context-tag {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 530;
  cursor: pointer;
  transition:
    transform 220ms var(--spring),
    color 200ms ease,
    background 200ms ease,
    border-color 200ms ease;
}

.context-tag:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-strong);
  color: var(--text);
}

.context-tag.is-active {
  border-color: color-mix(in srgb, var(--core) 20%, transparent);
  background: color-mix(in srgb, var(--core) 9%, var(--surface-strong));
  color: var(--core);
}

html[data-theme="dark"] .context-tag.is-active {
  color: #65a9ff;
}

.context-tag__emoji {
  font-size: 12px;
}

.context-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--hairline);
  border-radius: 15px;
  background: var(--surface-soft);
}

.context-note-row:focus-within {
  border-color: color-mix(in srgb, var(--core) 32%, var(--hairline));
  box-shadow: 0 0 0 3px var(--focus);
}

.context-note-row input {
  min-width: 0;
  flex: 1 1 auto;
  height: 32px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.context-note-row input::placeholder {
  color: var(--muted);
}

.context-note-row button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: var(--ink-button);
  color: var(--on-ink);
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(384px, auto);
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 27px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 40%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition:
    transform 430ms var(--spring),
    box-shadow 430ms var(--spring),
    border-color 300ms ease,
    background 400ms ease,
    opacity 320ms ease;
}

html[data-theme="dark"] .card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), transparent 38%),
    var(--surface);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--hairline-strong);
  box-shadow: 0 28px 72px -36px rgba(0, 0, 0, 0.27), 0 8px 30px -14px rgba(0, 0, 0, 0.05);
}

.bento.is-updating .card {
  opacity: 0.54;
  transform: translateY(3px) scale(0.997);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal-card 780ms var(--spring) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal-card {
  to { opacity: 1; transform: translateY(0); }
}

.sleep-card { grid-column: 1 / span 7; grid-row: 1; }
.heart-card { grid-column: 8 / span 5; grid-row: 1; }
.activity-card { grid-column: 1 / span 4; grid-row: 2; }
.circadian-card { grid-column: 5 / span 5; grid-row: 2; }
.signals-card { grid-column: 10 / span 3; grid-row: 2; }
.baseline-card { grid-column: 1 / span 7; grid-row: 3; }
.clinical-card { grid-column: 8 / span 5; grid-row: 3; }

.card__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.card__kicker {
  margin: 0 0 8px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 630;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card__title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  font-size: 28px;
  font-weight: 610;
  line-height: 1;
  letter-spacing: -0.045em;
}

.card__title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0;
}

.card__badge,
.metric-delta {
  padding: 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.metric-delta.is-positive {
  border-color: rgba(52, 199, 89, 0.16);
  background: rgba(52, 199, 89, 0.09);
  color: #218c3d;
}

.metric-delta.is-negative {
  border-color: rgba(255, 149, 0, 0.18);
  background: rgba(255, 149, 0, 0.09);
  color: #b76a00;
}

html[data-theme="dark"] .metric-delta.is-positive {
  color: #69dc83;
}

html[data-theme="dark"] .metric-delta.is-negative {
  color: #ffb84d;
}

.sleep-chart-wrap {
  position: relative;
  height: 286px;
  margin: 25px -9px 0;
  touch-action: pan-y;
}

.sleep-chart {
  width: 100%;
  height: 100%;
}

.sleep-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sleep-axis-label {
  fill: var(--muted-strong);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
}

.sleep-grid-line {
  stroke: var(--hairline);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}

.sleep-stage-label {
  fill: var(--muted-strong);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 520;
}

.sleep-stage-segment {
  cursor: crosshair;
  transition: opacity 180ms ease, filter 180ms ease;
}

.sleep-stage-segment:hover {
  filter: brightness(1.1);
}

.sleep-hover-line {
  stroke: var(--text);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.34;
  pointer-events: none;
}

.sleep-hover-dot {
  stroke: var(--surface-strong);
  stroke-width: 2;
  pointer-events: none;
}

.stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 7px 0 0;
  color: var(--muted-strong);
  font-size: 10.5px;
  font-weight: 520;
}

.stage-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-legend b {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 560;
}

.stage-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.stage-dot--awake { background: var(--awake); }
.stage-dot--rem { background: var(--rem); }
.stage-dot--core { background: var(--core); }
.stage-dot--deep { background: var(--sleep); }

.sleep-detail {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.sleep-detail__times {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 520;
}

.sleep-detail__times span:last-child {
  color: var(--muted);
  font-size: 10.5px;
}

.sleep-trend-block {
  display: flex;
  flex: 0 1 288px;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.sleep-trend-caption {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 520;
}

.sleep-mini-trend {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
}

.sleep-mini-bar {
  position: relative;
  min-width: 4px;
  max-width: 16px;
  flex: 1 1 10px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--sleep) 17%, transparent);
  transition: height 650ms var(--spring), background 220ms ease;
}

.sleep-mini-bar::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--deep-share, 20%);
  border-radius: inherit;
  background: var(--sleep);
  content: "";
  opacity: 0.82;
}

.sleep-mini-bar:hover {
  background: color-mix(in srgb, var(--sleep) 30%, transparent);
}

.sleep-mini-bar:last-child {
  background: color-mix(in srgb, var(--sleep) 32%, transparent);
}

.heart-card {
  display: flex;
  flex-direction: column;
}

.heart-card__header {
  align-items: flex-start;
}

.heart-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 540;
}

.heart-card__aside strong {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 620;
}

.heart-card__aside small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.heart-card__aside .heart-resting {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.heart-resting b {
  color: var(--oxygen);
  font-weight: 620;
}

.heart-chart-wrap {
  position: relative;
  min-height: 250px;
  flex: 1 1 auto;
  margin: 26px -6px 0;
  touch-action: pan-y;
}

#heartChart {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-tooltip,
.chart-floating {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--surface-strong);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.38);
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.4;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 13px));
  backdrop-filter: blur(16px);
}

.chart-tooltip strong,
.chart-floating strong {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 620;
}

.chart-tooltip span,
.chart-floating span {
  display: block;
  color: var(--muted);
}

.chart-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--text) 25%, transparent);
  pointer-events: none;
}

.zone-section {
  margin-top: 15px;
}

.zone-bar {
  display: flex;
  width: 100%;
  height: 7px;
  gap: 2px;
  overflow: hidden;
  border-radius: 100px;
}

.zone-segment {
  min-width: 2px;
  height: 100%;
  opacity: 0.9;
  transition: width 700ms var(--spring);
}

.zone-segment--low { background: #64d2ff; }
.zone-segment--rest { background: var(--oxygen); }
.zone-segment--daily { background: var(--activity); }
.zone-segment--active { background: var(--awake); }
.zone-segment--peak { background: var(--heart); }

.zone-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9.5px;
}

.zone-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.zone-legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.circadian-card {
  display: flex;
  flex-direction: column;
}

.circadian-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.circadian-metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: var(--surface-soft);
}

.circadian-metric span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}

.circadian-metric strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circadian-metric small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circadian-raster-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 190px;
  margin: 12px -6px 0;
}

.circadian-raster {
  width: 100%;
  height: 100%;
}

.circadian-raster svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.raster-grid {
  stroke: var(--hairline);
  stroke-width: 0.8;
  stroke-dasharray: 2 5;
}

.raster-target {
  stroke: color-mix(in srgb, var(--sleep) 48%, transparent);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.raster-bar {
  cursor: crosshair;
  transition: filter 180ms ease, opacity 180ms ease;
}

.raster-bar:hover {
  filter: brightness(1.1);
}

.raster-weekday {
  fill: color-mix(in srgb, var(--sleep) 76%, var(--surface-strong));
}

.raster-weekend {
  fill: color-mix(in srgb, var(--rem) 82%, var(--surface-strong));
}

.raster-dot {
  fill: var(--surface-strong);
  stroke: var(--sleep);
  stroke-width: 1.2;
}

.raster-label {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 7.5px;
  font-weight: 500;
}

.raster-axis {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 7px;
}

.debt-line {
  fill: none;
  stroke: color-mix(in srgb, var(--heart) 75%, transparent);
  stroke-width: 1.4;
}

.debt-area {
  fill: color-mix(in srgb, var(--heart) 8%, transparent);
}

.debt-max {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 7px;
}

.circadian-card .baseline-note {
  margin-top: 5px;
}

.activity-card {
  display: flex;
  flex-direction: column;
}

.activity-visual {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 240px;
  padding-top: 16px;
}

.rings {
  width: min(46%, 184px);
  flex: 0 1 184px;
  overflow: visible;
}

.ring-track {
  fill: none;
  stroke: color-mix(in srgb, var(--activity) 10%, transparent);
  stroke-width: 16;
}

.ring-track--inner {
  stroke: rgba(141, 219, 35, 0.09);
  stroke-width: 12;
}

.ring-progress {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 92px 92px;
  transition: stroke-dashoffset 900ms var(--spring);
}

.ring-progress--glow {
  stroke-width: 11;
  opacity: 0.32;
}

.ring-progress--inner {
  stroke-width: 12;
  transform-origin: 92px 92px;
}

.ring-value {
  fill: var(--text);
  font-family: var(--font);
  font-size: 29px;
  font-weight: 610;
  letter-spacing: -1.5px;
}

.ring-unit {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 550;
}

.activity-rows {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 13px;
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted-strong);
  font-size: 10.5px;
}

.activity-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-row > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.activity-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 610;
  white-space: nowrap;
}

.activity-row small {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
}

.activity-row--muted strong {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 520;
}

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.activity-dot--steps { background: #36c95b; }
.activity-dot--energy { background: #a4e32d; }

.baseline-card {
  display: flex;
  flex-direction: column;
}

.baseline-orb {
  width: 10px;
  height: 10px;
  margin: 4px 5px 0 0;
  border: 1px solid rgba(0, 199, 190, 0.38);
  border-radius: 50%;
  background: var(--oxygen);
  box-shadow: 0 0 0 6px rgba(0, 199, 190, 0.09), 0 0 23px rgba(0, 199, 190, 0.3);
}

.radar-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 270px;
  margin: -3px -8px 0;
}

.radar-chart {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: var(--hairline-strong);
  stroke-width: 0.8;
}

.radar-axis {
  stroke: var(--hairline);
  stroke-width: 0.8;
}

.radar-avg {
  fill: rgba(0, 199, 190, 0.055);
  stroke: color-mix(in srgb, var(--oxygen) 55%, transparent);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}

.radar-today {
  fill: rgba(255, 45, 85, 0.09);
  stroke: var(--heart);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.radar-point {
  fill: var(--surface-strong);
  stroke: var(--heart);
  stroke-width: 1.5;
  cursor: crosshair;
  transition: r 180ms var(--spring), fill 180ms ease;
}

.radar-point:hover {
  r: 5;
  fill: var(--heart);
}

.radar-label {
  fill: var(--muted-strong);
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 520;
}

.radar-value {
  fill: var(--text);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 620;
}

.baseline-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.clinical-card {
  display: flex;
  flex-direction: column;
}

.clinical-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.clinical-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--oxygen);
  content: "";
}

.clinical-status.is-watch {
  color: #b76a00;
  border-color: rgba(255, 149, 0, 0.16);
  background: rgba(255, 149, 0, 0.07);
}

.clinical-status.is-watch::before {
  background: var(--awake);
}

.clinical-status.is-clear::before {
  background: var(--activity);
}

.clinical-rule-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  margin-top: 17px;
}

.clinical-rule {
  padding: 12px 13px;
  border: 1px solid var(--hairline);
  border-radius: 15px;
  background: var(--surface-soft);
}

.clinical-rule__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clinical-rule__head strong {
  font-size: 11.5px;
  font-weight: 620;
}

.clinical-rule__confidence {
  color: var(--muted);
  font-size: 8.5px;
}

.clinical-rule__evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.clinical-rule__evidence span {
  padding: 4px 7px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
  color: var(--muted-strong);
  font-size: 8.5px;
}

.clinical-rule__explain {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.clinical-clear {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 14px;
  padding: 22px 5px;
}

.clinical-clear__glyph {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(0, 199, 190, 0.18);
  border-radius: 50%;
  background: rgba(0, 199, 190, 0.07);
  color: var(--oxygen);
}

.clinical-clear__glyph svg {
  width: 20px;
  height: 20px;
}

.clinical-clear p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 10.5px;
  line-height: 1.55;
}

.zone-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.zone-target-chip {
  padding: 5px 8px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--muted-strong);
  font-size: 8.5px;
}

.zone-target-chip b {
  color: var(--text);
  font-weight: 620;
}

.zone-target-empty {
  padding: 5px 0;
  color: var(--muted);
  font-size: 9px;
}

.clinical-consult-button {
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 580;
  cursor: pointer;
  transition: background 200ms ease, transform 220ms var(--spring);
}

.clinical-consult-button:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.clinical-consult-button svg {
  width: 16px;
  height: 16px;
}

.baseline-legend {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
}

.baseline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.radar-key {
  width: 13px;
  height: 2px;
  border-radius: 4px;
}

.radar-key--today {
  height: 3px;
  background: var(--heart);
}

.radar-key--week {
  border-top: 1px dashed color-mix(in srgb, var(--oxygen) 72%, transparent);
}

.baseline-legend__reference {
  margin-left: auto;
}

.signals-card {
  display: flex;
  flex-direction: column;
}

.signals-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 30px;
}

.signal-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 12px;
  padding: 17px 0;
  border-top: 1px solid var(--hairline);
}

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

.signal-row:last-child {
  padding-bottom: 0;
}

.signal-row__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 10.5px;
  font-weight: 540;
}

.signal-mark {
  width: 7px;
  height: 7px;
  border-radius: 2.5px;
}

.signal-mark--oxygen { background: var(--oxygen); }
.signal-mark--stress { background: var(--awake); }
.signal-mark--sync { background: var(--core); }

.signal-row__value {
  color: var(--text);
  font-size: 32px;
  font-weight: 610;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.signal-row__value small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 540;
  letter-spacing: 0;
}

.signal-row__value--time {
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.signal-row p {
  grid-column: 1 / -1;
  margin: 2px 0 0 15px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.35;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5px 5px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.copilot-launch {
  position: fixed;
  right: 28px;
  bottom: 26px;
  z-index: 35;
  display: flex;
  height: 54px;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  background: #151517;
  box-shadow: 0 22px 55px -18px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12.5px;
  font-weight: 590;
  cursor: pointer;
  transition: transform 380ms var(--spring), box-shadow 380ms var(--spring);
}

.copilot-launch:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 28px 65px -18px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.copilot-launch__orb {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.6), transparent 22%),
    conic-gradient(from 220deg, #5856d6, #ff2d55, #ff9500, #32ade6, #5856d6);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.16);
}

.copilot-launch__orb svg {
  width: 17px;
  height: 17px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.copilot-launch kbd {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--font);
  font-size: 9px;
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(12, 12, 14, 0.2);
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 420ms var(--spring);
}

.drawer-scrim.is-open {
  opacity: 1;
}

.copilot-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 45;
  display: flex;
  width: min(438px, calc(100vw - 24px));
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--hairline-strong);
  border-radius: 31px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.35), transparent 30%),
    var(--surface-strong);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  opacity: 0;
  transform: translateX(calc(100% + 22px)) scale(0.98);
  visibility: hidden;
  transition:
    transform 520ms var(--spring),
    opacity 380ms var(--spring),
    visibility 0s linear 520ms;
}

html[data-theme="dark"] .copilot-drawer {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--surface-strong);
}

.copilot-drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}

.copilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.copilot-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.copilot-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.8), transparent 20%),
    conic-gradient(from 210deg, #5856d6, #ff2d55, #ff9500, #32ade6, #5856d6);
  box-shadow: 0 0 0 5px rgba(255, 45, 85, 0.06), 0 9px 24px -14px rgba(255, 45, 85, 0.6);
  animation: orb-breathe 6s ease-in-out infinite;
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(1.06); filter: saturate(1.18); }
}

.copilot-identity h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.copilot-identity span {
  color: var(--muted);
  font-size: 9.5px;
}

.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.drawer-close svg {
  width: 17px;
  height: 17px;
}

.copilot-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 17px 0 5px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 9.5px;
}

.clinical-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  margin-top: 10px;
}

.clinical-action-button {
  display: flex;
  min-width: 0;
  height: 43px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms var(--spring), border-color 200ms ease;
}

.clinical-action-button:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-strong);
}

.clinical-action-button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.clinical-action-button span {
  font-size: 10px;
  font-weight: 620;
}

.clinical-action-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.reasoning-pill {
  display: grid;
  min-width: 37px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--heart) 16%, transparent);
  border-radius: 12px;
  background: var(--heart-soft);
  color: var(--heart);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.memory-panel {
  margin-top: 9px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: var(--surface-soft);
}

.memory-panel summary {
  display: flex;
  height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: var(--muted-strong);
  font-size: 9.5px;
  cursor: pointer;
  list-style: none;
}

.memory-panel summary::-webkit-details-marker {
  display: none;
}

.memory-panel summary b {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 100px;
  background: var(--surface-strong);
  color: var(--muted-strong);
  font-size: 8px;
}

.memory-list {
  max-height: 148px;
  overflow-y: auto;
  padding: 0 12px 11px;
  scrollbar-width: thin;
}

.memory-item {
  padding: 9px 0;
  border-top: 1px solid var(--hairline);
}

.memory-item strong {
  display: block;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 620;
}

.memory-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.45;
}

.memory-empty {
  padding: 9px 0 3px;
  color: var(--muted);
  font-size: 8.5px;
}

.context-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--activity);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.1);
}

.copilot-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  margin: 10px -6px 10px;
  padding: 12px 6px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
  overscroll-behavior: contain;
}

.copilot-welcome {
  margin: auto 0;
  padding: 22px 13px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.copilot-welcome__title {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 25px;
  font-weight: 610;
  letter-spacing: -0.045em;
}

.copilot-welcome p:last-child {
  max-width: 290px;
  margin: 0;
}

.message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 91%;
  animation: message-in 450ms var(--spring);
}

.message--user {
  align-self: flex-end;
  align-items: flex-end;
}

.message--assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.message__bubble {
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.message--user .message__bubble {
  border-bottom-right-radius: 6px;
  background: var(--ink-button);
  color: var(--on-ink);
}

.message--assistant .message__bubble {
  border: 1px solid var(--hairline);
  border-bottom-left-radius: 6px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.message__meta {
  padding: 0 4px;
  color: var(--muted);
  font-size: 8.5px;
}

.clinical-report {
  width: 100%;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--oxygen) 4%, transparent), transparent 40%),
    var(--surface-soft);
  animation: message-in 500ms var(--spring);
}

.clinical-report__head {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--hairline);
}

.clinical-report__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clinical-report__head h3 {
  margin: 8px 0 0;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.045em;
}

.clinical-impression {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--heart) 10%, transparent);
  border-radius: 16px;
  background: var(--heart-soft);
}

.clinical-impression strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.clinical-impression p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.report-section {
  margin-top: 16px;
}

.report-section__title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-section__title::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--oxygen);
  content: "";
}

.report-evidence {
  display: grid;
  gap: 7px;
}

.report-evidence__item {
  padding: 9px 10px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-strong) 58%, transparent);
}

.report-evidence__item strong {
  display: block;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 620;
}

.report-evidence__item span {
  display: block;
  margin-top: 3px;
  color: var(--muted-strong);
  font-size: 9px;
  line-height: 1.5;
}

.report-risk {
  padding: 10px 11px;
  border-left: 2px solid var(--awake);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 149, 0, 0.055);
}

.report-risk + .report-risk {
  margin-top: 6px;
}

.report-risk.is-clinical_review {
  border-left-color: var(--heart);
  background: var(--heart-soft);
}

.report-risk strong {
  display: block;
  font-size: 9.5px;
  font-weight: 620;
}

.report-risk p {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 8.8px;
  line-height: 1.5;
}

.report-protocol {
  display: grid;
  gap: 7px;
}

.report-protocol__item {
  display: grid;
  grid-template-columns: 53px 1fr;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid var(--hairline);
}

.report-protocol__time {
  color: var(--heart);
  font-size: 9px;
  font-weight: 650;
}

.report-protocol__body strong {
  display: block;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 620;
}

.report-protocol__body span,
.report-protocol__body small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.45;
}

.report-inquiry {
  margin-top: 7px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.5;
}

.report-references {
  margin-top: 15px;
  padding-top: 11px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.55;
}

.report-loading {
  display: flex;
  width: 100%;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 10px;
  text-align: center;
}

.report-loading__pulse {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--heart) 24%, transparent);
  border-radius: 50%;
}

.report-loading__pulse::before,
.report-loading__pulse::after {
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, var(--heart) 40%, transparent);
  border-radius: 50%;
  content: "";
  animation: report-pulse 2s ease-out infinite;
}

.report-loading__pulse::after {
  animation-delay: 0.7s;
}

@keyframes report-pulse {
  from { opacity: 0.8; transform: scale(0.55); }
  to { opacity: 0; transform: scale(1.5); }
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 16px;
  padding: 0 2px;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s ease-in-out infinite;
}

.typing-dots i:nth-child(2) { animation-delay: 0.12s; }
.typing-dots i:nth-child(3) { animation-delay: 0.24s; }

@keyframes typing {
  0%, 55%, 100% { opacity: 0.32; transform: translateY(0); }
  28% { opacity: 1; transform: translateY(-2px); }
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 11px;
}

.suggestion-chip {
  max-width: 100%;
  padding: 8px 11px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 9.5px;
  font-weight: 530;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}

.suggestion-chip:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-soft);
  color: var(--text);
}

.copilot-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.copilot-composer:focus-within {
  border-color: color-mix(in srgb, var(--core) 35%, var(--hairline));
  box-shadow: 0 0 0 3px var(--focus);
}

.copilot-composer textarea {
  width: 100%;
  max-height: 126px;
  min-height: 31px;
  resize: none;
  padding: 6px 0 5px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.copilot-composer textarea::placeholder {
  color: var(--muted);
}

.copilot-composer button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink-button);
  color: var(--on-ink);
  cursor: pointer;
  transition: transform 220ms var(--spring), opacity 220ms ease;
}

.copilot-composer button:hover {
  transform: scale(1.05);
}

.copilot-composer button:disabled {
  opacity: 0.32;
  cursor: default;
  transform: none;
}

.copilot-composer button svg {
  width: 19px;
  height: 19px;
}

.copilot-footnote {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  text-align: center;
}

.profile-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--hairline-strong);
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: 0 40px 110px -30px rgba(0, 0, 0, 0.52);
  color: var(--text);
  backdrop-filter: blur(32px) saturate(180%);
}

.profile-dialog::backdrop {
  background: rgba(10, 10, 12, 0.28);
  backdrop-filter: blur(8px);
}

.profile-dialog[open] {
  animation: dialog-in 430ms var(--spring);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-form {
  padding: 24px;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--hairline);
}

.profile-header .card__kicker {
  margin-bottom: 5px;
}

.profile-header h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 620;
  letter-spacing: -0.045em;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--muted-strong);
  font-size: 9.5px;
  font-weight: 550;
}

.field span small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.field input,
.field select {
  height: 38px;
  padding: 0 11px;
}

.field textarea {
  min-height: 58px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: color-mix(in srgb, var(--core) 38%, var(--hairline));
  box-shadow: 0 0 0 3px var(--focus);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}

.profile-zone-preview {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 9.5px;
  line-height: 1.5;
}

.profile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--hairline);
}

.profile-footer > span {
  color: var(--muted);
  font-size: 8.5px;
}

.profile-footer > div {
  display: flex;
  gap: 8px;
}

.primary-button,
.secondary-button {
  height: 37px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--ink-button);
  background: var(--ink-button);
  color: var(--on-ink);
}

.secondary-button {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted-strong);
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--bg);
}

.auth-panel {
  display: flex;
  max-width: 590px;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  justify-self: center;
  padding: 48px;
}

.brand--auth {
  position: absolute;
  top: 31px;
  left: 42px;
}

.auth-panel__copy {
  margin-bottom: 27px;
}

.auth-panel__copy > span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.18em;
}

.auth-panel__copy h1 {
  margin: 0 0 12px;
  font-size: clamp(46px, 5vw, 74px);
  font-weight: 620;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.auth-panel__copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
}

.login-form {
  display: flex;
  max-width: 370px;
  flex-direction: column;
  gap: 9px;
}

.login-form label {
  color: var(--muted-strong);
  font-size: 10.5px;
  font-weight: 550;
}

.login-form input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--hairline-strong);
  border-radius: 15px;
  outline: 0;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.login-form input:focus {
  border-color: color-mix(in srgb, var(--core) 40%, var(--hairline));
  box-shadow: 0 0 0 4px var(--focus);
}

.login-form button {
  height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 15px;
  background: var(--ink-button);
  color: var(--on-ink);
  font-size: 12.5px;
  font-weight: 630;
  cursor: pointer;
  transition: transform 240ms var(--spring), opacity 200ms ease;
}

.login-form button:hover {
  transform: translateY(-1px);
}

.login-form button:disabled {
  opacity: 0.45;
  cursor: default;
}

.form-error {
  min-height: 17px;
  margin: 3px 0 0;
  color: var(--heart);
  font-size: 10.5px;
}

.auth-panel__foot {
  position: absolute;
  bottom: 31px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.auth-art {
  position: relative;
  overflow: hidden;
  margin: 11px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 70% 23%, rgba(255, 149, 0, 0.2), transparent 22%),
    radial-gradient(circle at 32% 68%, rgba(88, 86, 214, 0.32), transparent 34%),
    linear-gradient(150deg, #141416, #070708 65%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-art::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 0.45px, transparent 0.45px);
  background-size: 4px 4px;
  mask-image: linear-gradient(140deg, black, transparent 76%);
}

.auth-art__halo {
  position: absolute;
  top: 24%;
  left: 50%;
  width: 38vw;
  max-width: 520px;
  height: 38vw;
  max-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 48px rgba(255, 255, 255, 0.022),
    0 0 0 98px rgba(255, 255, 255, 0.014),
    0 0 100px rgba(255, 45, 85, 0.12);
}

.auth-art__line {
  position: absolute;
  top: 49%;
  right: 9%;
  left: 9%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.auth-art__time,
.auth-art__value {
  position: absolute;
  z-index: 1;
  font-weight: 600;
  letter-spacing: -0.055em;
}

.auth-art__time {
  bottom: 16%;
  left: 10%;
  color: rgba(255, 255, 255, 0.42);
  font-size: clamp(32px, 5vw, 66px);
}

.auth-art__value {
  top: 35%;
  right: 10%;
  font-size: clamp(74px, 10vw, 150px);
  color: #ff375f;
  text-shadow: 0 0 60px rgba(255, 45, 85, 0.28);
}

.auth-art__value::after {
  position: absolute;
  right: 2px;
  bottom: -19px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 9px;
  font-weight: 520;
  letter-spacing: 0.12em;
  content: "BPM";
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 500ms var(--spring), visibility 500ms;
}

.loading-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loading-mark {
  display: flex;
  align-items: center;
  gap: 5px;
}

.loading-mark span {
  width: 5px;
  height: 22px;
  border-radius: 10px;
  background: var(--text);
  animation: loading-wave 1.1s ease-in-out infinite;
}

.loading-mark span:nth-child(1) {
  height: 12px;
  background: var(--sleep);
}

.loading-mark span:nth-child(2) {
  height: 27px;
  background: var(--heart);
  animation-delay: 0.12s;
}

.loading-mark span:nth-child(3) {
  height: 17px;
  background: var(--activity);
  animation-delay: 0.24s;
}

@keyframes loading-wave {
  0%, 100% { transform: scaleY(0.55); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

.toast {
  position: fixed;
  bottom: 92px;
  left: 50%;
  z-index: 80;
  padding: 10px 15px;
  border: 1px solid var(--hairline-strong);
  border-radius: 13px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-float);
  color: var(--text-soft);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 260ms ease, transform 340ms var(--spring);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 68px;
  }

  .hero__copy {
    max-width: 900px;
  }

  .hero__status {
    max-width: 640px;
  }

  .bento {
    grid-template-rows: auto;
  }

  .sleep-card,
  .heart-card {
    grid-column: span 12;
    grid-row: auto;
  }

  .sleep-card,
  .heart-card {
    min-height: 440px;
  }

  .activity-card,
  .baseline-card,
  .circadian-card,
  .clinical-card {
    grid-column: span 6;
    grid-row: auto;
  }

  .signals-card {
    grid-column: span 12;
    grid-row: auto;
    min-height: 0;
  }

  .signals-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .signal-row,
  .signal-row:first-child {
    padding: 0 16px 0 0;
    border-top: 0;
    border-right: 1px solid var(--hairline);
  }

  .signal-row:last-child {
    border-right: 0;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr auto;
    width: calc(100% - 20px);
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 9px 9px 9px 14px;
    border-radius: 21px;
  }

  .brand {
    grid-column: 1;
  }

  .topbar__actions {
    grid-column: 2;
  }

  .period-switch {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 8px;
  }

  .sync-pill span:not(.sync-pill__dot) {
    display: none;
  }

  .sync-pill {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .sync-pill svg {
    display: none;
  }

  .page-shell {
    width: calc(100% - 24px);
  }

  .hero {
    gap: 24px;
    padding: 44px 2px 25px;
  }

  .hero h1 {
    font-size: clamp(40px, 11vw, 58px);
    line-height: 1;
  }

  .hero__insight {
    margin-top: 17px;
    font-size: 16px;
  }

  .hero__status {
    gap: 6px;
  }

  .vitals-strip {
    padding: 19px 18px 17px;
    border-radius: 23px;
  }

  .vitals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vital:last-child {
    grid-column: span 2;
  }

  .context-logger {
    padding: 18px;
  }

  .status-capsule {
    min-height: 104px;
    padding: 12px;
    border-radius: 17px;
  }

  .status-capsule__value {
    font-size: 25px;
  }

  .status-capsule__meta {
    font-size: 9px;
  }

  .bento {
    gap: 11px;
  }

  .card {
    padding: 21px;
    border-radius: 25px;
  }

  .sleep-card,
  .heart-card,
  .activity-card,
  .baseline-card,
  .circadian-card,
  .clinical-card,
  .signals-card {
    grid-column: span 12;
    grid-row: auto;
  }

  .sleep-card {
    min-height: 448px;
  }

  .heart-card {
    min-height: 425px;
  }

  .circadian-card {
    min-height: 370px;
  }

  .activity-card {
    min-height: 340px;
  }

  .baseline-card {
    min-height: 360px;
  }

  .sleep-chart-wrap {
    height: 278px;
    margin-top: 20px;
  }

  .sleep-detail {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .sleep-mini-trend {
    width: 100%;
    height: 40px;
  }

  .sleep-trend-block {
    width: 100%;
    flex-basis: auto;
    align-items: flex-start;
  }

  .sleep-axis-label,
  .sleep-stage-label {
    font-size: 16px;
  }

  .signals-list {
    display: flex;
    margin-top: 24px;
  }

  .signal-row,
  .signal-row:first-child {
    padding: 15px 0;
    border-right: 0;
    border-top: 1px solid var(--hairline);
  }

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

  .signal-row:last-child {
    padding-bottom: 0;
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 84px;
  }

  .copilot-launch {
    right: 13px;
    bottom: max(13px, env(safe-area-inset-bottom));
    height: 50px;
  }

  .copilot-launch kbd {
    display: none;
  }

  .copilot-drawer {
    top: 41px;
    right: 7px;
    bottom: 7px;
    width: calc(100vw - 14px);
    padding: 18px;
    border-radius: 30px;
    transform: translateY(calc(100% + 14px)) scale(0.99);
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .profile-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-gate {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    max-width: none;
    padding: 30px;
  }

  .auth-art {
    display: none;
  }

  .brand--auth {
    top: 24px;
    left: 26px;
  }

  .auth-panel__copy h1 {
    font-size: clamp(49px, 15vw, 71px);
  }

  .auth-panel__foot {
    bottom: 24px;
  }
}

@media (max-width: 460px) {
  .brand__name {
    font-size: 15px;
  }

  .hero__status {
    grid-template-columns: 1fr 1fr;
  }

  .status-capsule--primary {
    grid-column: span 2;
    min-height: 91px;
  }

  .status-capsule {
    min-height: 92px;
  }

  .activity-visual {
    flex-direction: column;
    gap: 11px;
  }

  .rings {
    width: 154px;
    flex-basis: 154px;
  }

  .activity-rows {
    width: 100%;
  }

  .activity-card {
    min-height: 470px;
  }

  .zone-legend {
    display: none;
  }

  .card__title {
    font-size: 25px;
  }

  .vitals-strip__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .context-logger__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .circadian-summary {
    gap: 5px;
  }

  .circadian-metric {
    padding: 9px 8px;
  }

  .clinical-actions {
    grid-template-columns: 1fr 1fr;
  }

  .reasoning-pill {
    display: none;
  }

  .profile-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100vh - 14px);
    border-radius: 23px;
  }

  .profile-form {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
