:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  --ink: #172b26;
  --muted: #51675e;
  --pine: #0a5c55;
  --dark: #103f39;
  --mint: #e4f4ed;
  --line: #d4e0d9;
  --bg: #f4f7f5;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
body { min-width: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #b6641e; outline-offset: 2px; }
[hidden], .symbols { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 6px; left: 6px; z-index: 2; padding: 6px 12px; background: white; color: var(--pine); }
.mast { background: var(--dark); color: #f5fff9; }
.mast-inner, main { max-width: 1120px; padding-inline: clamp(18px, 4vw, 56px); margin: 0 auto; }
.mast-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 650; letter-spacing: -.035em; }
.brand img { border-radius: 9px; background: white; }
#home-refresh, #home-mast-date { display: none; }
.account { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #9ce3be; }
#signout { min-height: 38px; background: transparent; color: inherit; margin-left: 8px; padding: 0 12px; border: 1px solid #79a295; border-radius: 8px; }
#signout:hover { background: #20574c; }
main { padding-bottom: 36px; }
main:focus { outline: none; }
.page-header { padding-block: clamp(24px, 4vw, 46px) 22px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.eyebrow { color: var(--muted); font-size: 11px; line-height: 1.5; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.08; font-weight: 650; letter-spacing: -.05em; }
.action, .icon-button { border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--pine); display: inline-flex; align-items: center; justify-content: center; }
.action { gap: 7px; padding: 8px 13px; min-height: 40px; font-size: 14px; font-weight: 600; }
.action svg, .icon-button svg, .calendar-mark svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.action svg, .icon-button svg { width: 18px; height: 18px; }
:is(.action,.icon-button,.today-button,.mobile-today):hover { background: #eff6f2; }
.panel, .welcome, .notice { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 3px 14px #14382306; }
.welcome { display: grid; grid-template-columns: 0.75fr 1fr; overflow: hidden; }
.welcome-art { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; min-height: 275px; background: linear-gradient(125deg,#103f39,#16594b); color: #88c5aa; }
.contours { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; color: #85c8aa; opacity: .46; }
.date-tile { color: #f1fff4; display: grid; justify-items: center; align-content: center; border: 1px solid #90baa4; box-shadow: 7px 7px 0 #9ce5bf17; background: #1f574a; border-radius: 15px; width: 130px; min-height: 145px; padding: 10px; }
.date-tile span:first-child { color: #b7efd1; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .13em; }
.date-tile b { font-size: 59px; line-height: 1.1; font-weight: 560; font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
.date-tile span:last-child { font-size: 13px; }
.welcome-copy { padding: clamp(27px, 4.5vw, 60px); align-self: center; min-width: 0; }
.welcome-copy h2 { margin: 8px 0 12px; font-size: clamp(24px, 3vw, 37px); line-height: 1.1; letter-spacing: -.045em; font-weight: 640; }
.welcome-copy > p:not(.eyebrow) { max-width: 36ch; color: var(--muted); }
#google-signin { margin-top: 22px; min-height: 40px; }
.notice { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-block: 12px; padding: 20px 24px; }
.notice h2 { font-size: 18px; }
.notice p { margin-top: 3px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(225px, 0.85fr) minmax(0, 2fr); align-items: start; gap: clamp(14px, 2.2vw, 26px); }
.month-panel { padding: clamp(15px, 2vw, 24px); }
.nav-heading, .agenda-heading, .arrows { display: flex; align-items: center; }
.nav-heading { justify-content: space-between; gap: 4px; margin-block: 2px 12px; }
.nav-heading h2 { font-size: 17px; letter-spacing: -.025em; line-height: 1.2; }
.arrows { gap: 3px; flex: none; }
.icon-button { width: 36px; height: 36px; padding: 0; }
.nav-heading .icon-button { width: 30px; height: 34px; border: 0; }
.weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.weekdays { color: var(--muted); font-size: 11px; font-weight: 600; padding-block: 2px 5px; }
.month-grid button { border: 1px solid transparent; border-radius: 8px; background: transparent; min-height: 33px; padding: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.month-grid button:hover { background: var(--mint); }
.month-grid [data-outside] { color: #677a70; }
.month-grid [aria-current="date"] { border-color: #83ad9b; }
.month-grid button[aria-pressed="true"] { color: white; background: var(--pine); font-weight: 650; }
.today-button, .mobile-today { border: 0; background: transparent; color: var(--pine); font-size: 13px; font-weight: 650; border-radius: 6px; padding: 6px 10px; min-height: 36px; }
.today-button { margin-top: 10px; }
.today-button:disabled { color: var(--muted); }
.agenda-panel { min-width: 0; padding: clamp(16px, 2.3vw, 26px); }
.agenda-heading { gap: 12px; }
.calendar-mark { width: 43px; height: 43px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: var(--pine); }
.calendar-mark svg { width: 23px; height: 23px; }
.title-group { min-width: 0; flex: 1; }
.agenda-heading h2 { font-size: clamp(18px, 2.15vw, 26px); line-height: 1.2; font-weight: 640; letter-spacing: -.035em; }
.mobile-today { display: none; }
.list-heading { color: var(--muted); font-size: 12px; font-weight: 650; margin-block: 20px 6px; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li + li { border-top: 1px solid #e1eae4; }
.entry-row { display: grid; grid-template-columns: 79px 4px minmax(0,1fr) auto; gap: 12px; padding: 12px 0; align-items: center; }
summary.entry-row { cursor: pointer; list-style: none; }
summary.entry-row::-webkit-details-marker { display: none; }
summary.entry-row:hover strong { color: var(--pine); }
.time { align-self: start; font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 650; }
.time small, .entry-label small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; line-height: 1.45; }
.stripe { width: 4px; border-radius: 4px; background: var(--pine); align-self: stretch; min-height: 28px; }
.stripe.personal { background: #ae6d38; }
.stripe.exercise { background: #527e43; }
.stripe.bed { background: #736497; }
.entry-label { min-width: 0; overflow-wrap: anywhere; }
.entry-label strong { font-size: 15px; line-height: 1.35; font-weight: 620; }
.entry-details { padding: 0 12px 14px 107px; color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.expand-mark { color: var(--pine); font-size: 14px; }
details[open] .expand-mark { transform: rotate(180deg); }
.empty { margin: 20px 0 4px; border: 1px dashed #ccdbd2; border-radius: 10px; background: #f7faf8; padding: 20px; }
.empty h3 { font-size: 16px; }
.empty p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.agenda-footer { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .mast-inner { min-height: 50px; }
  .mast-inner, main { padding-inline: 12px; }
  .brand { gap: 8px; font-size: 17px; }
  .brand img { width: 29px; height: 29px; border-radius: 7px; }
  .page-header { padding: 18px 2px 12px; }
  h1 { font-size: 27px; }
  .eyebrow { font-size: 10px; }
  .month-panel { display: none; }
  .workspace { display: block; }
  .agenda-panel { padding: 14px; }
  .agenda-heading { gap: 8px; }
  .calendar-mark { width: 34px; height: 34px; border-radius: 8px; }
  .calendar-mark svg { width: 18px; height: 18px; }
  .mobile-today { display: block; margin-top: 4px; }
  .entry-row { grid-template-columns: 60px 4px minmax(0,1fr) auto; gap: 8px; padding-block: 10px; }
  .entry-details { padding-left: 80px; }
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .welcome-art { min-height: 115px; }
  .date-tile { min-height: 80px; width: 96px; padding: 5px; border-radius: 8px; }
  .date-tile b { font-size: 32px; }
  .date-tile span:first-child, .date-tile span:last-child { font-size: 10px; }
  .welcome-copy { padding: 22px; }
}
@media (max-width: 370px) {
  .account-label, .status-dot { display: none; }
  .agenda-heading .icon-button { width: 30px; }
  .agenda-heading .arrows { gap: 1px; }
  .agenda-heading .calendar-mark { display: none; }
}

/* The wide layout follows Android Home's card order. Give the ToDo and mood
   summaries room for actual items, and let food and weight grow with their data. */
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.home-card { min-width: 0; padding: clamp(15px, 1.7vw, 24px); }
#home-activity { background: linear-gradient(110deg, #eaf8f2, #fff 85%); }
#home-todos { background: #ecf8f1; }
#home-mood { background: #fff9ed; }
#home-todos, #home-mood { min-height: 225px; }
#home-meals { align-self: stretch; }
.home-card h2:has(>.card-symbol) { display: flex; align-items: center; gap: 9px; }
.card-symbol { width: 29px; height: 29px; flex: none; padding: 6px; border-radius: 9px; color: var(--pine); background: #dff3eb; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#home-mood .card-symbol { color: #866323; background: #f8ecca; }
#home-meals .card-symbol { color: #945d36; background: #f9e7dd; }
#primary-nav { display: flex; gap: 6px; }
#primary-nav a { display: flex; align-items: center; gap: 10px; border-radius: 9px; text-decoration: none; font-weight: 600; color: inherit; padding: 11px 14px; }
#primary-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
#primary-nav a[aria-current="page"] { background: #c5eddc; color: #10423b; }
#primary-nav a:hover { background: #20574c; color: white; }
.connected { --rail: clamp(155px, 13vw, 220px); padding-left: var(--rail); }
.connected .mast { position: fixed; inset: 0 auto 0 0; width: var(--rail); }
.connected .mast-inner { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 27px 12px 19px; height: 100%; }
.connected .brand { padding: 1px 3px 23px; }
.connected #primary-nav { flex-direction: column; }
.connected .account { flex-wrap: wrap; margin-top: auto; padding: 10px 4px; }
.connected #signout { margin: 6px 0 0; flex-basis: 100%; }
.connected main { max-width: 1520px; padding-inline: clamp(16px, 2.7vw, 44px); }
.connected .page-header { padding-block: 27px 19px; }
.screen-tools, .view-switch, .date-controls { display: flex; align-items: center; gap: 6px; }
.screen-tools { flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.date-controls { margin-left: auto; }
.view-switch { border-radius: 9px; padding: 3px; background: #e3ece7; }
.view-switch button, .period-today, #selected-date { background: white; color: var(--pine); border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13px; min-height: 36px; padding: 5px 10px; }
.view-switch button { background: transparent; border-color: transparent; }
.view-switch [aria-pressed="true"] { background: var(--pine); color: white; }
#selected-date { max-width: 148px; }
#week-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(185px, .24fr); gap: 14px; align-items: start; }
.week-calendar, .week-detail { min-width: 0; }
.week-calendar { overflow: hidden; }
.week-caption, .week-detail { padding: 16px; }
.week-caption h2, .week-detail h2 { font-size: 19px; margin-top: 4px; overflow-wrap: anywhere; }
.week-grid { display: grid; grid-template-columns: 45px repeat(7,minmax(0,1fr)); }
.week-headers, .floating-row { border-block-start: 1px solid var(--line); }
.week-gutter { align-self: center; font-size: 10px; color: var(--muted); padding: 4px; }
.week-day { border: 0; border-left: 1px solid var(--line); background: white; color: var(--ink); min-width: 0; min-height: 55px; }
.week-day strong, .week-day small { display: block; font-size: 13px; }
.week-day small { color: var(--muted); font-size: 10px; }
.week-day.chosen { background: #c5eddc; }
.floating-cell { padding: 2px; border-left: 1px solid var(--line); }
.week-scroll { max-height: min(63vh, 610px); overflow-y: auto; border-top: 1px solid var(--line); }
.hour-tracks { height: 1440px; }
.time-ruler { display: grid; grid-template-rows: repeat(24, 1fr); }
.time-ruler span { font-size: 10px; color: var(--muted); padding: 1px 4px; }
.day-track { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, #dce7e0 0 1px, transparent 1px 30px, #eff3f0 30px 31px, transparent 31px 60px); }
.day-track.chosen { background-color: #eff9f3; }
.week-event, .floating-event { display: block; min-width: 0; text-align: start; border: 1px solid #c6ddd1; border-left: 3px solid #528376; border-radius: 4px; background: #eaf4ed; color: #173e34; padding: 2px 3px; line-height: 1.2; overflow: hidden; }
.week-event { position: absolute; }
.floating-event { width: 100%; margin-block: 2px; }
.week-event strong, .floating-event strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-event small { font-size: 10px; }
.week-event[data-kind="PERSONAL"], .floating-event[data-kind="PERSONAL"] { background: #fff6e6; border-left-color: #ac7034; }
.week-event[data-kind="EXERCISE"] { background: #edf5e7; border-left-color: #527e43; }
.week-event[data-kind="BED"] { background: #f1eef8; border-left-color: #736497; }
.week-event[aria-pressed="true"], .floating-event[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--pine); }
.week-detail { display: grid; gap: 9px; overflow-wrap: anywhere; }
.week-detail .action { justify-self: start; margin-top: 10px; }
.week-type, .detail-related, .detail-location, .detail-notes { font-size: 13px; color: var(--muted); }
.detail-notes { white-space: pre-wrap; }
@media (min-width: 901px) and (max-width: 1220px) {
  #week-screen { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  #agenda-views { display: none; }
}
@media (max-width: 760px), (min-width: 761px) and (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .connected { padding-left: 0; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .connected .mast { position: sticky; inset: 0 0 auto; width: auto; z-index: 5; padding-top: env(safe-area-inset-top); }
  .connected .mast-inner { height: auto; padding: 0 13px; min-height: 49px; flex-direction: row; align-items: center; justify-content: space-between; }
  .connected .brand { padding: 0; }
  .connected .account { flex-wrap: nowrap; margin: 0; padding: 0; }
  .connected #signout { flex-basis: auto; margin: 0 0 0 3px; }
  .connected main { padding-inline: 12px; }
  .connected .page-header { padding-block: 16px 12px; }
  .connected.home-page .page-header { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .connected.home-page .page-header #refresh { display: none; }
  .connected.home-page main { padding-top: 6px; }
  .connected.home-page .brand { line-height: 1.1; }
  .connected.home-page #home-mast-date { display: block; margin-top: 2px; color: #c5dfd4; font-size: .69rem; font-weight: 500; letter-spacing: .01em; }
  .connected.home-page #home-refresh { display: inline-flex; flex: none; margin-left: auto; width: 40px; height: 44px; background: transparent; border: 0; color: inherit; }
  .connected.home-page #home-refresh:hover { background: #20574c; }
  .connected #primary-nav { position: fixed; z-index: 5; inset: auto 0 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 4px 6px max(4px,env(safe-area-inset-bottom)); background: var(--dark); }
  #primary-nav a { flex-direction: column; justify-content: center; gap: 2px; padding: 4px; font-size: 11px; }
  #primary-nav svg { height: 18px; }
  .home-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .home-card { padding: 13px; }
  #home-activity, #home-upcoming, #home-meals, #home-weight { grid-column: 1/-1; }
  #home-todos, #home-mood { min-height: 0; }
}
@media (max-width: 355px) {
  #home-todos, #home-mood { grid-column: 1/-1; }
}
/* A rotated phone keeps the bottom menu and can fit two compact cards across. */
@media (min-width: 761px) and (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  #home-activity, #home-upcoming, #home-meals, #home-weight { grid-column: auto; }
}

.screen-tools .new-block { color: white; background: var(--pine); border-color: var(--pine); font-weight: 650; }
.agenda-edit-row { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; background: white; color: var(--pine); }
#save-status:not(:empty) { margin-block: 12px; color: var(--pine); font-weight: 600; }
.fit-tabs { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:15px; border-bottom:1px solid var(--line); }
.fit-tabs button { padding:9px 13px; background:transparent; border:0; border-bottom:2px solid transparent; color:var(--muted); }
.fit-tabs button[aria-pressed="true"] { border-color:var(--pine); color:var(--pine); font-weight:650; }
.fit-panel { padding:clamp(14px,2.4vw,28px); min-width:0; }
.fit-panel h2 { font-size:20px; margin-block:3px 7px; }
.fit-search { width:min(100%,28rem); margin-bottom:15px; border:1px solid var(--line); border-radius:8px; padding:9px 12px; font:inherit; }
.fit-muted,.fit-empty,.fit-detail small { color:var(--muted); font-size:13px; }
.fit-empty {padding-block:15px;}
.fit-detail { border-top:1px solid var(--line); margin-top:8px; }
.fit-detail summary { cursor:pointer; padding:12px 0; overflow-wrap:anywhere; }
.fit-detail small { display:block; margin-inline-start:15px; }
.fit-detail p { margin:2px 0 9px 16px; }
.fit-detail li { padding:3px 0; }
@media(min-width:761px) { .connected #primary-nav { overflow-y:auto; min-height:0; } }
@media (max-width: 760px), (min-width: 761px) and (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .connected #primary-nav {grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; padding-inline:3px; }
  #primary-nav a {min-width:0; min-height:45px; font-size:10px; padding-inline:0;}
  .home-card .dash-card-heading {flex-wrap:wrap;}
}
