:root {
  --cyan-950: #083344;
  --cyan-900: #164e63;
  --cyan-800: #155e75;
  --cyan-700: #0e7490;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-300: #67e8f9;
  --cyan-100: #cffafe;
  --cyan-50: #ecfeff;
  --sky-100: #e0f2fe;
  --blue-600: #0284c7;
  --ink: #163047;
  --muted: #60758a;
  --line: #c8e5ee;
  --surface: #ffffff;
  --page: #f3fbfd;
  --danger: #b42318;
  --danger-bg: #fee4e2;
  --warning: #9a6700;
  --warning-bg: #fff3cd;
  --success: #087443;
  --success-bg: #dff7ea;
  --shadow: 0 15px 45px rgba(8, 51, 68, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(103, 232, 249, .28), transparent 28rem),
    linear-gradient(180deg, var(--cyan-50), var(--page) 22rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: var(--cyan-700); text-underline-offset: 3px; }
a:hover { color: var(--cyan-900); }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding: .7rem max(1rem, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(8, 145, 178, .18);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--cyan-950); text-decoration: none; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: white; background: linear-gradient(145deg, var(--cyan-500), var(--blue-600)); box-shadow: 0 8px 20px rgba(8, 145, 178, .24); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.site-nav > a, .link-button { display: inline-flex; min-height: 42px; align-items: center; padding: .55rem .72rem; border: 0; border-radius: 10px; color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; }
.site-nav > a:hover, .link-button:hover { background: var(--cyan-50); color: var(--cyan-800); }
.nav-form { margin: 0; }
.menu-button { display: none; margin-left: auto; border: 1px solid var(--line); background: white; border-radius: 10px; min-height: 42px; padding: .5rem .8rem; color: var(--ink); }

.page-shell { width: min(1240px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.page-heading { margin-bottom: 1.4rem; }
.page-heading h1 { margin: .15rem 0 .3rem; font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.045em; color: var(--cyan-950); }
.split-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.eyebrow { color: var(--cyan-700); font-size: .76rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }

.card { background: rgba(255,255,255,.94); border: 1px solid rgba(14,116,144,.16); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1rem, 2.5vw, 1.55rem); margin-bottom: 1.2rem; }
.card h1, .card h2, .card h3 { color: var(--cyan-950); }
.card h1 { margin: .2rem 0 1rem; font-size: clamp(1.7rem, 5vw, 2.55rem); letter-spacing: -.035em; line-height: 1.12; }
.card h2 { margin: .2rem 0 .75rem; letter-spacing: -.02em; }
.narrow-card { width: min(680px, 100%); margin-inline: auto; }
.wide-card { width: min(980px, 100%); margin-inline: auto; }
.auth-card { margin-top: clamp(2rem, 10vh, 7rem); }

.today-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.today-grid .card { min-height: 315px; margin: 0; display: flex; flex-direction: column; }
.now-card { border-top: 5px solid var(--cyan-600); }
.next-card { border-top: 5px solid #38bdf8; }
.return-card { border-top: 5px solid #22d3ee; }
.today-grid .button, .today-grid form:last-child { margin-top: auto; }
.time-badge { display: inline-flex; align-self: flex-start; padding: .35rem .65rem; border-radius: 999px; background: var(--cyan-100); color: var(--cyan-900); font-weight: 800; }
.first-action { color: var(--cyan-900); background: var(--cyan-50); border-left: 4px solid var(--cyan-500); padding: .65rem .8rem; border-radius: 0 10px 10px 0; }

.two-column-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr); gap: 1.2rem; align-items: start; }
.form-card { position: relative; }
.form-stack, .form-grid { display: grid; gap: .9rem; }
.form-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.two-up label:has(textarea), .form-grid.two-up .button-row { grid-column: 1 / -1; }
.compact-form { margin-top: .5rem; }
label { display: grid; gap: .35rem; font-weight: 700; color: var(--ink); }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid #a9d4e0; border-radius: 11px; padding: .65rem .75rem; color: var(--ink); background: white; outline: none; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan-600); box-shadow: 0 0 0 4px rgba(6, 182, 212, .16); }
input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--cyan-600); }
.checkbox-label { grid-template-columns: auto 1fr; align-items: center; justify-content: start; }
.checkbox-label label { display: contents; }
.field-error { color: var(--danger); font-size: .86rem; font-weight: 650; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border: 1px solid var(--cyan-600); border-radius: 11px; padding: .62rem .92rem; color: var(--cyan-900); background: white; text-decoration: none; font-weight: 780; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(8,145,178,.13); }
.button.primary { color: white; background: linear-gradient(145deg, var(--cyan-600), var(--blue-600)); border-color: transparent; }
.button.secondary { background: var(--cyan-100); border-color: var(--cyan-300); }
.button.ghost { background: transparent; border-color: var(--line); }
.button.danger { color: white; background: var(--danger); border-color: var(--danger); }
.button.danger-text { color: var(--danger); border-color: transparent; background: transparent; }
.button.small { min-height: 36px; padding: .4rem .62rem; font-size: .88rem; }
.button.wide { width: 100%; }
.button-row { display: flex; align-items: center; gap: .55rem; }
.button-row form { margin: 0; }
.button-row.wrap { flex-wrap: wrap; }

.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.timeline { display: grid; gap: .55rem; }
.timeline-row { display: grid; grid-template-columns: 72px 1fr auto; gap: .8rem; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: .7rem; background: white; }
.timeline-time { color: var(--cyan-900); font-weight: 850; line-height: 1.15; }
.timeline-time span { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.timeline-body { display: grid; gap: .12rem; min-width: 0; }
.timeline-body strong { overflow-wrap: anywhere; }
.timeline-body span, .timeline-body small { color: var(--muted); }
.timeline-row.kind-routine { border-left: 5px solid var(--cyan-500); }
.timeline-row.kind-task { border-left: 5px solid #38bdf8; }
.timeline-row.kind-buffer { opacity: .72; background: var(--cyan-50); }
.timeline-row.status-completed { opacity: .68; }
.status-pill { display: inline-flex; padding: .25rem .52rem; border-radius: 999px; background: var(--sky-100); color: var(--cyan-900); font-size: .78rem; font-weight: 750; text-transform: capitalize; }
.schedule-day h2 { border-bottom: 1px solid var(--line); padding-bottom: .65rem; }

.record-list { display: grid; gap: .65rem; }
.record-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 13px; background: white; }
.record-title { font-weight: 850; color: var(--cyan-950); }
.record-meta { color: var(--muted); font-size: .9rem; }
.empty-state { color: var(--muted); text-align: center; padding: 2rem 1rem; border: 1px dashed #a9d4e0; border-radius: 12px; }

.focus-card { text-align: center; padding-block: clamp(1.5rem, 6vw, 3rem); }
.time-display { margin: 1rem auto; font-size: clamp(2.4rem, 10vw, 5rem); font-weight: 900; letter-spacing: -.06em; color: var(--cyan-700); }
.countdown { margin: 1rem auto 0; font-variant-numeric: tabular-nums; font-size: clamp(4rem, 18vw, 8rem); line-height: .95; font-weight: 900; letter-spacing: -.07em; color: var(--cyan-800); }
.timer-caption { color: var(--muted); }
.focus-actions { display: grid; gap: .65rem; margin-top: 1.4rem; }
.callout { display: grid; gap: .25rem; text-align: left; margin: 1rem 0; padding: .9rem 1rem; border-radius: 14px; color: var(--cyan-950); background: var(--cyan-100); border: 1px solid var(--cyan-300); }
.callout.subtle { background: var(--sky-100); border-color: #bae6fd; }

.progress-table { display: grid; gap: .2rem; }
.progress-row { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(90px, 1fr)); gap: .8rem; align-items: center; padding: .75rem; border-bottom: 1px solid var(--line); }
.progress-row.header { color: var(--cyan-800); font-size: .8rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }

.flash-stack { display: grid; gap: .5rem; margin-bottom: 1rem; }
.flash { border-radius: 12px; padding: .75rem .9rem; border: 1px solid transparent; }
.flash-success { color: var(--success); background: var(--success-bg); border-color: #a7e6c4; }
.flash-warning { color: var(--warning); background: var(--warning-bg); border-color: #f4d67b; }
.flash-error { color: var(--danger); background: var(--danger-bg); border-color: #f9b5ae; }
.site-footer { width: min(1240px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0 2rem; color: var(--muted); font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.3rem 0; }

@media (max-width: 960px) {
  .site-header { flex-wrap: wrap; }
  .menu-button { display: inline-flex; }
  .site-nav { display: none; width: 100%; margin-left: 0; flex-direction: column; align-items: stretch; padding-bottom: .5rem; }
  .site-nav.open { display: flex; }
  .site-nav > a, .link-button { width: 100%; }
  .today-grid { grid-template-columns: 1fr; }
  .today-grid .card { min-height: auto; }
  .two-column-layout { grid-template-columns: 1fr; }
  .form-card { position: static; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 1rem, 1240px); padding-top: 1rem; }
  .site-header { padding-inline: .65rem; }
  .brand span:last-child { font-size: .96rem; }
  .split-heading { align-items: stretch; flex-direction: column; }
  .split-heading > .button-row { display: grid; grid-template-columns: 1fr 1fr; }
  .split-heading .button { width: 100%; }
  .form-grid.two-up { grid-template-columns: 1fr; }
  .form-grid.two-up label { grid-column: auto; }
  .timeline-row { grid-template-columns: 58px 1fr; }
  .timeline-action { grid-column: 1 / -1; justify-content: flex-end; }
  .record-row { align-items: flex-start; flex-direction: column; }
  .record-row > .button-row { width: 100%; }
  .progress-row { grid-template-columns: 1.5fr 1fr; }
  .progress-row span:nth-child(3), .progress-row span:nth-child(4) { text-align: right; }
  .progress-row.header span:nth-child(3), .progress-row.header span:nth-child(4) { display: none; }
  .button-row { flex-wrap: wrap; }
  .focus-card { min-height: calc(100vh - 150px); display: flex; flex-direction: column; justify-content: center; }
}

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

/* Getting-started help dialog */
body.dialog-open { overflow: hidden; }
.help-dialog {
  width: min(920px, calc(100% - 2rem));
  max-width: none;
  max-height: min(90vh, 920px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 90px rgba(8, 51, 68, .28);
}
.help-dialog::backdrop {
  background: rgba(8, 51, 68, .58);
  backdrop-filter: blur(5px);
}
.help-dialog-panel {
  display: flex;
  max-height: min(90vh, 920px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(14,116,144,.2);
  border-radius: 24px;
  background: var(--surface);
}
.help-dialog-header,
.help-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, .97);
}
.help-dialog-header { border-bottom: 1px solid var(--line); }
.help-dialog-header h2 {
  margin: .12rem 0 0;
  color: var(--cyan-950);
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.help-dialog-header form,
.help-dialog-footer form { margin: 0; }
.help-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--cyan-900);
  background: var(--cyan-50);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.help-close:hover { background: var(--cyan-100); }
.help-dialog-content {
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 1.65rem);
}
.help-lede {
  max-width: 72ch;
  margin: 0 0 1.5rem;
  color: var(--cyan-950);
  font-size: 1.08rem;
  line-height: 1.65;
}
.help-section { margin-top: 1.65rem; }
.help-section:first-of-type { margin-top: 0; }
.help-section h3 {
  margin: 0 0 .75rem;
  color: var(--cyan-950);
  font-size: 1.14rem;
  letter-spacing: -.015em;
}
.help-steps {
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: help-step;
}
.help-steps li {
  position: relative;
  min-height: 42px;
  padding: .62rem .75rem .62rem 3.2rem;
  border: 1px solid rgba(14,116,144,.14);
  border-radius: 13px;
  background: var(--cyan-50);
  counter-increment: help-step;
}
.help-steps li::before {
  position: absolute;
  top: .55rem;
  left: .65rem;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--cyan-700);
  content: counter(help-step);
  font-size: .84rem;
  font-weight: 850;
}
.help-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.help-example-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, white, var(--cyan-50));
}
.help-example-card h4 { margin: .45rem 0 .7rem; color: var(--cyan-950); font-size: 1rem; }
.help-example-card dl { display: grid; gap: .35rem; margin: 0; }
.help-example-card dl div { display: flex; justify-content: space-between; gap: .75rem; }
.help-example-card dt { color: var(--muted); }
.help-example-card dd { margin: 0; font-weight: 750; text-align: right; }
.help-kind {
  display: inline-flex;
  padding: .22rem .48rem;
  border-radius: 999px;
  color: var(--cyan-900);
  background: var(--cyan-100);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.help-kind.quiet { color: var(--muted); background: #edf2f5; }
.help-kind.routine { color: #075985; background: var(--sky-100); }
.help-clarity-list { display: grid; gap: .6rem; }
.help-clarity-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: .8rem;
  align-items: start;
  padding: .75rem;
  border-bottom: 1px solid var(--line);
}
.help-clarity-list p { margin: 0; }
.help-note {
  padding: 1rem;
  border-left: 5px solid var(--cyan-500);
  border-radius: 0 15px 15px 0;
  background: var(--cyan-50);
}
.help-note p { margin: .55rem 0 0; }
.help-dialog-footer { border-top: 1px solid var(--line); }
.help-dialog-footer > .muted { max-width: 46ch; font-size: .88rem; }

@media (max-width: 760px) {
  .help-dialog { width: calc(100% - 1rem); max-height: 94vh; }
  .help-dialog-panel { max-height: 94vh; border-radius: 18px; }
  .help-dialog-header, .help-dialog-footer { padding: .85rem; }
  .help-example-grid { grid-template-columns: 1fr; }
  .help-clarity-list > div { grid-template-columns: 1fr; gap: .4rem; }
  .help-dialog-footer { align-items: stretch; flex-direction: column; }
  .help-dialog-footer .button-row { display: grid; grid-template-columns: 1fr 1fr; }
  .help-dialog-footer .button,
  .help-dialog-footer form { width: 100%; }
}

.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;
}
.language-form { display: flex; align-items: center; }
.language-form select {
  min-width: 7rem;
  padding: .42rem .55rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
}
.new-account-fields {
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--cyan-50);
}
.new-account-fields summary { cursor: pointer; font-weight: 750; }
.new-account-fields[open] summary { margin-bottom: .65rem; }
.account-warning { margin-bottom: 1rem; }

/* Public product and deterministic demo */
.public-shell { padding-top: clamp(1.2rem, 4vw, 3rem); }
.public-heading { max-width: 820px; }
.public-heading .hero-lede,
.hero-lede { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.7; }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; padding: clamp(1rem, 3vw, 2rem) 0 clamp(2rem, 6vw, 4rem); }
.hero h1 { max-width: 15ch; margin: .3rem 0 1rem; color: var(--cyan-950); font-size: clamp(2.5rem, 7vw, 5.2rem); line-height: .98; letter-spacing: -.065em; }
.hero-panel { padding: clamp(1.1rem, 3vw, 1.8rem); border: 1px solid rgba(14,116,144,.2); border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(8,51,68,.14); transform: rotate(1deg); }
.hero-panel h2 { margin: .75rem 0 1rem; color: var(--cyan-950); font-size: clamp(1.4rem, 3vw, 2rem); }
.sample-badge { display: inline-flex; padding: .28rem .58rem; border-radius: 999px; color: var(--cyan-900); background: var(--cyan-100); font-size: .74rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.mini-plan { display: grid; gap: .55rem; }
.mini-plan > div { display: grid; grid-template-columns: 82px 1fr; gap: .7rem; align-items: center; padding: .75rem; border: 1px solid var(--line); border-radius: 13px; background: white; }
.mini-plan time { color: var(--cyan-800); font-weight: 850; }
.mini-plan span { color: var(--ink); font-weight: 720; }
.public-grid { display: grid; gap: 1.1rem; }
.public-grid.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.public-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-grid .card { margin: 0; }
.feature-card { display: flex; flex-direction: column; }
.feature-card .button { align-self: flex-start; margin-top: auto; }
.public-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.2rem; background: linear-gradient(135deg, white, var(--cyan-50)); }
.public-cta h2 { margin: .2rem 0 .45rem; }
.public-cta p { margin: 0; color: var(--muted); }
.public-article { font-size: 1.02rem; }
.public-article > p { max-width: 74ch; }
.feature-list { display: grid; gap: .7rem; padding-left: 1.3rem; }
.feature-list li::marker { color: var(--cyan-600); }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-top: 5px solid var(--cyan-600); }
.price-card .price { margin: .2rem 0 .7rem; color: var(--cyan-800); font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.05em; }
.price-card ul { display: grid; gap: .5rem; margin-bottom: 1.3rem; padding-left: 1.25rem; }
.price-card .button { margin-top: auto; }
.sample-banner { display: flex; gap: .55rem; align-items: center; margin-bottom: 1rem; padding: .72rem .9rem; border: 1px solid var(--cyan-300); border-radius: 13px; color: var(--cyan-950); background: var(--cyan-100); }
.sample-banner span { color: var(--cyan-900); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .hero-panel { transform: none; }
  .public-grid.three-up { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .public-grid.two-up, .pricing-grid { grid-template-columns: 1fr; }
  .public-cta { align-items: stretch; flex-direction: column; }
  .public-cta .button { width: 100%; }
  .sample-banner { align-items: flex-start; flex-direction: column; }
}

/* Public analytics consent */
.analytics-consent {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: flex;
  width: min(620px, calc(100vw - 2rem));
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--cyan-300);
  border-radius: 16px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 70px rgba(8,51,68,.2);
}
.analytics-consent[hidden] { display: none; }
.analytics-consent strong,
.analytics-consent span { display: block; }
.analytics-consent span { margin-top: .25rem; color: var(--muted); }
.footer-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
@media (max-width: 700px) {
  .analytics-consent { align-items: stretch; flex-direction: column; }
  .analytics-consent .button-row { display: grid; grid-template-columns: 1fr 1fr; }
}
