:root {
  color-scheme: light;
  --ink: #16312d;
  --muted: #63736f;
  --line: #dce6e2;
  --paper: #ffffff;
  --wash: #f3f7f5;
  --forest: #0e3d36;
  --forest-light: #17564c;
  --mint: #b9e3d2;
  --mint-bright: #dff5eb;
  --error: #a33a3a;
  --success: #167254;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(500px, 1.1fr);
}

.welcome-panel {
  min-height: 100vh;
  padding: clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  color: #f7fffc;
  background:
    radial-gradient(circle at 82% 18%, rgba(185, 227, 210, 0.22), transparent 28%),
    radial-gradient(circle at 0 100%, rgba(97, 163, 141, 0.2), transparent 38%),
    var(--forest);
}

.welcome-panel::after {
  content: "";
  position: absolute;
  width: 390px;
  height: 390px;
  right: -210px;
  bottom: 10%;
  border: 1px solid rgba(223, 245, 235, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(223, 245, 235, 0.035), 0 0 0 128px rgba(223, 245, 235, 0.025);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: inherit;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.brand-mark span {
  width: 14px;
  height: 14px;
  position: relative;
}

.brand-mark span::before,
.brand-mark span::after {
  content: "";
  position: absolute;
  background: var(--mint);
  border-radius: 2px;
}

.brand-mark span::before {
  width: 14px;
  height: 4px;
  top: 5px;
}

.brand-mark span::after {
  width: 4px;
  height: 14px;
  left: 5px;
}

.welcome-copy {
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: #4d736a;
  font-size: 0.73rem;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.welcome-copy .eyebrow {
  color: var(--mint);
}

.welcome-copy h1 {
  margin: 0;
  max-width: 520px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 6.3vw, 6.6rem);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.055em;
}

.welcome-copy > p:last-child {
  max-width: 490px;
  margin: 32px 0 0;
  color: rgba(247, 255, 252, 0.72);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.75;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  position: relative;
  z-index: 1;
  color: rgba(247, 255, 252, 0.7);
  font-size: 0.88rem;
}

.privacy-note p {
  margin: 0;
}

.privacy-note strong {
  color: #f7fffc;
}

.privacy-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(185, 227, 210, 0.12);
}

.account-panel {
  min-height: 100vh;
  padding: clamp(28px, 6vw, 88px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
}

.account-card {
  width: min(100%, 470px);
  padding: clamp(28px, 4vw, 46px);
  background: var(--paper);
  border: 1px solid rgba(14, 61, 54, 0.08);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(22, 49, 45, 0.09);
}

.card-heading h2,
.signed-in-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.card-heading > p:last-child,
.signed-in-card > p:not(.eyebrow) {
  margin: 13px 0 30px;
  color: var(--muted);
  line-height: 1.65;
}

form {
  display: grid;
}

label {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 700;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input::placeholder {
  color: #98a6a2;
}

input:focus {
  background: #fff;
  border-color: #589383;
  box-shadow: 0 0 0 4px rgba(88, 147, 131, 0.12);
}

.password-label {
  margin-top: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.password-label label {
  margin-bottom: 8px;
}

.text-button {
  padding: 0;
  color: var(--forest-light);
  background: transparent;
  border: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.text-button:hover,
.text-button:focus-visible {
  text-decoration: underline;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 6px 7px;
  color: #5f746e;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 0.77rem;
  font-weight: 750;
}

.password-toggle:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(73, 139, 121, 0.28);
  outline-offset: 3px;
}

.form-message {
  min-height: 22px;
  margin: 14px 0 8px;
  color: var(--error);
  font-size: 0.82rem;
  line-height: 1.45;
}

.form-message[data-tone="success"] {
  color: var(--success);
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 10px;
  font-weight: 760;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.primary-button {
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--forest);
  border: 1px solid var(--forest);
}

.primary-link {
  text-decoration: none;
}

.primary-button:hover:not(:disabled) {
  background: var(--forest-light);
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.button-arrow {
  font-size: 1.2rem;
}

.account-help {
  margin: 24px 0 0;
  padding-top: 20px;
  color: #7b8b87;
  border-top: 1px solid #edf2f0;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.phone-access {
  margin-top: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  background: var(--mint-bright);
  border: 1px solid #ccebdd;
  border-radius: 14px;
}

.phone-access strong {
  display: block;
  font-size: 0.85rem;
}

.phone-access p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.install-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 15px;
  color: #fff;
  background: var(--forest);
  border: 0;
  border-radius: 10px;
  font-weight: 720;
  font-size: 0.8rem;
}

.install-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.data-note {
  margin: 0;
  color: #73837f;
  font-size: 0.76rem;
  text-align: center;
}

.signed-in-card {
  text-align: center;
}

.success-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: var(--mint-bright);
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 800;
}

.starter-note {
  margin: 8px 0 26px;
  padding: 18px;
  display: grid;
  gap: 5px;
  color: #50635e;
  background: var(--wash);
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.starter-note strong {
  color: var(--ink);
}

.secondary-button {
  width: 100%;
  color: var(--forest);
  background: #fff;
  border: 1px solid #b9ccc6;
}

.secondary-button:hover:not(:disabled) {
  background: var(--wash);
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  background: #f5f8f6;
}

.app-header {
  min-height: 76px;
  padding: 14px clamp(22px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.app-brand {
  color: var(--forest);
}

.app-brand-mark {
  border-color: rgba(14, 61, 54, 0.24);
}

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

.demo-pill,
.status-badge,
.source-badge,
.file-kind {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.demo-pill {
  padding: 8px 12px;
  color: #6d4f12;
  background: #fff4cf;
  border: 1px solid #f2d884;
}

.header-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--forest);
  background: #fff;
  border: 1px solid #bed0ca;
  border-radius: 9px;
  font-weight: 750;
}

.header-button:hover,
.header-button:focus-visible {
  background: var(--wash);
}

.dashboard-layout {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.side-navigation {
  padding: 38px 24px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.navigation-label,
.household-switcher label {
  margin: 0 0 10px;
  color: #84918e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.side-navigation nav {
  display: grid;
  gap: 5px;
}

.navigation-link {
  padding: 11px 13px;
  color: #60706c;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 680;
  text-decoration: none;
}

.navigation-link:hover,
.navigation-link:focus-visible,
.navigation-link.active {
  color: var(--forest);
  background: var(--mint-bright);
}

.household-switcher {
  margin-top: 30px;
  padding-top: 26px;
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
}

.household-switcher label {
  margin: 0;
}

.household-switcher select,
.family-form select {
  min-width: 0;
  height: 42px;
  padding: 0 34px 0 11px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}

.household-switcher select:focus,
.family-form select:focus {
  border-color: #589383;
  box-shadow: 0 0 0 4px rgba(88, 147, 131, 0.12);
}

.add-profile-button {
  padding: 8px 2px;
  color: var(--forest-light);
  background: transparent;
  border: 0;
  font-size: 0.78rem;
  font-weight: 760;
  text-align: left;
}

.add-profile-button:hover,
.add-profile-button:focus-visible {
  text-decoration: underline;
}

.privacy-card {
  margin-top: 30px;
  padding: 16px;
  color: #52645f;
  background: var(--wash);
  border: 1px solid #e3ece8;
  border-radius: 12px;
  font-size: 0.77rem;
  line-height: 1.5;
}

.privacy-card-icon {
  color: #2c9877;
  font-size: 0.64rem;
}

.privacy-card strong {
  margin-left: 5px;
  color: var(--ink);
}

.privacy-card p {
  margin: 6px 0 0;
}

.dashboard-content {
  width: min(100%, 1400px);
  padding: clamp(32px, 5vw, 70px);
  display: grid;
  gap: 52px;
}

.dashboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.dashboard-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.dashboard-hero > div > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-date {
  min-width: 165px;
  padding: 14px 0 2px;
  display: grid;
  gap: 5px;
  color: #758480;
  border-top: 1px solid #cbd8d4;
  font-size: 0.73rem;
}

.hero-date strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.section-heading,
.panel-heading,
.import-result-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin-bottom: 20px;
  align-items: end;
}

.section-heading h2,
.panel-heading h2,
.import-panel h2,
.family-form h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.section-heading .eyebrow,
.panel-heading .eyebrow,
.import-copy .eyebrow,
.family-form .eyebrow {
  margin-bottom: 8px;
}

.section-note {
  max-width: 430px;
  margin: 0 0 3px;
  color: #778681;
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: right;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.panel,
.connection-card,
.empty-record-card {
  background: #fff;
  border: 1px solid rgba(14, 61, 54, 0.09);
  box-shadow: 0 12px 35px rgba(22, 49, 45, 0.055);
}

.metric-card {
  min-height: 184px;
  padding: 20px;
  border-radius: 15px;
}

.metric-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-source,
.demo-dot {
  color: #75847f;
  font-size: 0.67rem;
  font-weight: 760;
}

.demo-dot {
  color: #92701f;
}

.metric-card h3 {
  margin: 24px 0 7px;
  color: #5f706b;
  font-size: 0.77rem;
}

.metric-value {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.metric-value strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
}

.metric-value span {
  color: #6f7e7a;
  font-size: 0.72rem;
}

.metric-date {
  margin: 11px 0 0;
  color: #96a19e;
  font-size: 0.67rem;
}

.empty-record-card {
  grid-column: 1 / -1;
  padding: 38px;
  border-radius: 15px;
  text-align: center;
}

.empty-record-card strong {
  color: var(--ink);
}

.empty-record-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
}

.panel {
  padding: clamp(22px, 3vw, 32px);
  border-radius: 18px;
}

.source-badge {
  padding: 7px 10px;
  color: #3f665d;
  background: var(--wash);
}

.trend-summary {
  margin: 32px 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.trend-summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 400;
}

.trend-summary strong span {
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
}

.trend-change {
  color: #24775f;
  font-size: 0.75rem;
  font-weight: 750;
}

.trend-chart {
  width: 100%;
  height: 130px;
  overflow: visible;
}

.trend-chart line {
  stroke: #e5ece9;
  stroke-width: 1;
}

.trend-chart polyline {
  fill: none;
  stroke: #267a65;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  color: #8c9995;
  font-size: 0.67rem;
}

.empty-panel-message {
  min-height: 130px;
  margin: 24px 0 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--wash);
  border-radius: 12px;
  font-size: 0.82rem;
}

.timeline {
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
}

.timeline-marker {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  background: var(--mint);
  border: 2px solid #2e806b;
  border-radius: 50%;
}

.timeline-copy {
  display: grid;
  gap: 3px;
}

.timeline-copy strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.timeline-copy span,
.timeline time,
.timeline-empty {
  color: #7d8a86;
  font-size: 0.68rem;
}

.timeline-empty {
  padding: 26px 0;
  text-align: center;
}

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

.connection-card {
  padding: 19px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border-radius: 14px;
}

.connection-monogram {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--forest);
  border-radius: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.connection-monogram.keto {
  color: #4c3612;
  background: #f5ce71;
}

.connection-monogram.cronometer {
  background: #3b7f5a;
}

.connection-monogram.function {
  background: #5f5b86;
}

.connection-monogram.imaging {
  color: #d9f2ef;
  background: #263f4c;
}

.connection-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.9rem;
}

.connection-card p {
  margin: 0;
  color: #75837f;
  font-size: 0.71rem;
  line-height: 1.45;
}

.status-badge {
  padding: 6px 9px;
}

.status-badge.ready {
  color: #176346;
  background: #e3f4eb;
}

.status-badge.planned {
  color: #755a1d;
  background: #fff3cf;
}

.status-badge.import {
  color: #4a5e76;
  background: #eaf0f7;
}

.import-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 62px);
}

.import-copy > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.privacy-list {
  margin: 20px 0 0;
  padding-left: 18px;
  color: #60716c;
  font-size: 0.76rem;
  line-height: 1.65;
}

.import-workspace {
  min-width: 0;
}

.file-drop {
  min-height: 150px;
  padding: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--forest);
  background: #f7fbf9;
  border: 1px dashed #8db5a9;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
}

.file-drop:hover,
.file-drop:focus-within {
  background: #eef8f4;
  border-color: #3f806f;
}

.file-drop-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--forest);
  border-radius: 50%;
  font-size: 1.1rem;
}

.file-drop span:last-child {
  color: #71817c;
  font-size: 0.71rem;
}

.visually-hidden {
  width: 1px;
  height: 1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.import-status {
  min-height: 20px;
  margin: 12px 0;
  color: #71807c;
  font-size: 0.72rem;
}

.import-results {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.import-result {
  width: 100%;
  min-width: 0;
  padding: 15px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.import-result.import-error {
  color: var(--error);
  background: #fff8f8;
  border-color: #edcece;
}

.import-result > p {
  margin: 7px 0 0;
  color: #71807c;
  font-size: 0.7rem;
  line-height: 1.45;
}

.import-result-heading {
  align-items: center;
}

.import-result-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.file-kind {
  padding: 4px 7px;
  color: #355f55;
  background: #e4f1ec;
}

.import-result .import-result-note {
  color: #8a9692;
  font-size: 0.66rem;
}

.imaging-result {
  background: #f8fbfc;
  border-color: #d8e4e7;
}

.xray-preview {
  width: min(100%, 560px);
  max-height: 420px;
  margin: 14px auto 4px;
  display: block;
  object-fit: contain;
  background: #142129;
  border: 1px solid #243942;
  border-radius: 9px;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  margin-top: 12px;
  overflow-x: auto;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.66rem;
}

.preview-table th,
.preview-table td {
  max-width: 180px;
  padding: 7px 9px;
  overflow: hidden;
  border-bottom: 1px solid #e7eeeb;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-table th {
  color: #415c55;
  background: #eef5f2;
  font-weight: 780;
}

.compact-button {
  width: auto;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 14px;
}

.app-footer {
  padding-top: 6px;
  color: #84918d;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
}

.family-dialog {
  width: min(92vw, 510px);
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(14, 46, 40, 0.25);
}

.family-dialog::backdrop {
  background: rgba(8, 29, 25, 0.58);
  backdrop-filter: blur(3px);
}

.family-form {
  padding: clamp(26px, 5vw, 40px);
  display: grid;
  gap: 12px;
}

.family-form > div:first-child > p:not(.eyebrow),
.dialog-note {
  color: var(--muted);
  line-height: 1.55;
}

.family-form > div:first-child > p:not(.eyebrow) {
  margin: 10px 0 10px;
}

.family-form label {
  margin: 5px 0 -4px;
}

.family-form input {
  height: 46px;
}

.dialog-note {
  margin: 8px 0 0;
  padding: 12px;
  background: var(--wash);
  border-radius: 9px;
  font-size: 0.72rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions .primary-button {
  gap: 28px;
}

noscript {
  position: fixed;
  inset: auto 20px 20px;
  padding: 12px 16px;
  color: #fff;
  background: var(--error);
  border-radius: 8px;
  text-align: center;
}

@media (max-width: 850px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .welcome-panel {
    min-height: 390px;
    padding: 28px clamp(22px, 7vw, 52px) 42px;
  }

  .welcome-copy h1 {
    font-size: clamp(3.1rem, 13vw, 5.2rem);
  }

  .welcome-copy > p:last-child {
    margin-top: 22px;
  }

  .privacy-note {
    display: none;
  }

  .account-panel {
    min-height: auto;
    padding: 34px 20px 48px;
  }

  .app-header {
    position: static;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .side-navigation {
    padding: 14px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .navigation-label,
  .privacy-card {
    display: none;
  }

  .side-navigation nav {
    display: flex;
    overflow-x: auto;
  }

  .navigation-link {
    white-space: nowrap;
  }

  .household-switcher {
    min-width: 190px;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .add-profile-button {
    display: block;
  }

  .dashboard-content {
    padding: 38px 22px;
    gap: 42px;
  }

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

  .dashboard-grid,
  .import-panel {
    grid-template-columns: 1fr;
  }

  .connection-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .connection-card .status-badge {
    grid-column: 2;
  }
}

@media (max-width: 480px) {
  .welcome-panel {
    min-height: 340px;
  }

  .welcome-copy > p:last-child {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .account-card {
    padding: 28px 22px;
    border-radius: 17px;
  }

  .phone-access {
    align-items: stretch;
    flex-direction: column;
  }

  .install-button {
    width: 100%;
  }

  .app-header {
    padding: 12px 16px;
  }

  .demo-pill {
    display: none;
  }

  .side-navigation {
    grid-template-columns: 1fr;
  }

  .household-switcher {
    grid-row: 1;
  }

  .side-navigation nav {
    grid-row: 2;
  }

  .dashboard-hero,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .hero-date {
    width: 100%;
  }

  .section-note {
    text-align: left;
  }

  .metric-grid,
  .connection-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 9px minmax(0, 1fr);
  }

  .timeline time {
    grid-column: 2;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .compact-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
