/* Settle Product Design Kit: exact shared tokens, component base and horizontal product navigation. */
/* Settle design study. Values reconstructed from visual references, not original CSS. */
:root{--ink:#1b1b1f;--muted:#898985;--surface:#fff;--canvas:#f1f0ec;--soft:#ebe9e5;--line:#e9e8e5;--coral:#ff7653;--coral-soft:#ffebe3;--lilac:#beb3e3;--lilac-soft:#eee9fa;--green:#3b8267;--green-soft:#e5f3eb;--radius-card:32px;--radius-panel:40px;--radius-control:999px;--shadow-card:0 2px 2px #21211904,0 18px 32px -28px #26252260;--shadow-control:0 2px 4px #17171912,0 8px 16px -12px #17171960;--font:Inter,"Helvetica Neue",Arial,sans-serif;--ease:cubic-bezier(.2,.8,.2,1);--duration:240ms;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;--space-12:48px}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--canvas);font:16px/1.5 var(--font);letter-spacing:-.035em}button,input,select,textarea{font:inherit;letter-spacing:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button{color:inherit}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid var(--coral);outline-offset:4px}input:focus,select:focus,textarea:focus{outline:2px solid var(--lilac);outline-offset:2px}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:500;line-height:1.12}h1{letter-spacing:-.065em}h2{font-size:30px;letter-spacing:-.055em}h3{font-size:21px;letter-spacing:-.04em}small,.meta{font-size:13px;color:var(--muted)}.muted{color:var(--muted)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid var(--line);background:var(--surface);border-radius:var(--radius-control);padding:12px 21px;font-size:14px;white-space:nowrap;transition:transform var(--duration) var(--ease),box-shadow var(--duration)}.btn:hover{transform:translateY(-2px);box-shadow:var(--shadow-control)}.btn.dark{background:var(--ink);color:#fff;border-color:var(--ink)}.btn.coral{background:var(--coral);border-color:var(--coral);color:#fff}.btn.soft{background:var(--canvas);border-color:transparent}.btn.icon{padding:0;width:43px;height:43px}.icon svg,svg.ico{width:18px;height:18px;display:block;flex-shrink:0}.brand{display:inline-flex;align-items:center;gap:10px;font-size:25px;letter-spacing:-.065em;font-weight:550}.mark{display:inline-block;position:relative;width:34px;height:25px;vertical-align:middle;color:inherit;flex-shrink:0}.mark:before,.mark:after{content:"";position:absolute;top:0;width:24px;height:25px;background:currentColor;border-radius:50%}.mark:before{left:0}.mark:after{right:0}.mark i{position:absolute;background:var(--canvas);border-radius:50%;width:12px;height:22px;top:1.5px;left:11px;z-index:1}.white-brand .mark i{background:#746d82}.row{display:flex;align-items:center;gap:14px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.stack{display:grid;gap:20px}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:26px;box-shadow:var(--shadow-card);min-width:0}.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:28px}.card-head p{margin-top:6px;color:var(--muted);font-size:14px}.pill{display:inline-flex;gap:7px;align-items:center;background:var(--canvas);border-radius:999px;padding:6px 12px;font-size:13px;white-space:nowrap}.pill.green{background:var(--green-soft);color:var(--green)}.pill.orange{background:var(--coral-soft);color:#a95137}.pill.lilac{background:var(--lilac-soft);color:#79669d}.segment{display:inline-flex;padding:4px;background:var(--soft);border-radius:999px;gap:3px}.segment button{background:none;border:0;border-radius:999px;padding:8px 15px;color:var(--muted);font-size:14px;transition:all var(--duration)}.segment button.active{background:#fff;color:var(--ink);box-shadow:var(--shadow-control)}.avatar{display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;border-radius:50%;background:#d9d0ec;color:#282430;font-size:11px;letter-spacing:-.02em;font-weight:550;border:2px solid var(--canvas);flex-shrink:0}.avatar.peach{background:#ffdac8}.avatar.sage{background:#dedfd4}.avatars{display:flex}.avatars .avatar+.avatar{margin-left:-7px}
/* RITMO domain components adapted to the supplied kit. */
/* Settle kit pass: composition, hierarchy and useful space across RITMO. */
:root {
  --settle-canvas: #f1f0ec;
  --settle-ink: #1b1b1f;
  --settle-line: #e9e8e5;
  --settle-shadow: 0 2px 2px #21211904, 0 18px 32px -28px #26252260;
}

/* A safe, interactive product preview: every value is fictional. */
.landing-demo-panel[hidden] { display: none !important; }
.landing-demo-header > .landing-demo-tabs { display: flex; align-items: center; gap: 5px; }
.landing-demo-tabs > button { border: 0; border-radius: 999px; background: transparent; padding: 8px 11px; color: #777973; font: inherit; font-size: 12px; cursor: pointer; }
.landing-demo-tabs > button[aria-selected="true"] { color: #202124; background: #e9e9e4; }
.landing-demo-tabs > button:hover { color: #202124; }
.landing-demo-tabs > button:focus-visible { outline: 2px solid #638775; outline-offset: 2px; }
.landing-demo-weight { display: flex; align-items: baseline; gap: 6px; margin: 19px 0 5px; }
.landing-demo-weight strong { font-size: clamp(2.6rem, 4vw, 4rem); line-height: 1; font-weight: 550; letter-spacing: -.07em; }
.landing-demo-weight > span { color: #777973; font-size: 14px; }
.landing-demo-weight > small { margin-left: auto; color: #35725a; font-size: 12px; }
.landing-demo-line { display: block; width: 100%; height: 91px; overflow: visible; }
.landing-demo-side strong { font-size: clamp(1.35rem, 2vw, 2rem); white-space: nowrap; letter-spacing: -.035em; }
.landing-demo-side strong small { font-size: .45em; font-weight: 500; }
.landing-demo-habits { padding-block: 20px; }
.landing-demo-habit { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #ecece8; font-size: 12px; }
.landing-demo-habit:last-child { border-bottom: 0; }
.landing-demo-habit > span:first-child { display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #d2d2ce; border-radius: 50%; font-size: 12px; }
.landing-demo-habit > span:first-child.checked { background: #242527; border-color: #242527; color: white; }
.landing-demo-habit > small { margin-left: auto; color: #858781; }
@media (max-width: 700px) {
  .nutrition-summary:has(+ .nutrition-board-library) .energy-field { display: flex; min-height: 0; gap: 16px; padding: 22px; }
  .nutrition-summary:has(+ .nutrition-board-library) .energy-field .energy-total { font-size: clamp(4.1rem, 16vw, 5.2rem); }
  .landing-demo-header > .landing-demo-tabs { display: flex; gap: 0; margin-left: auto; }
  .landing-demo-tabs > button { padding: 7px 8px; font-size: 10px; }
  .landing-demo-header > .landing-demo-avatar { display: none; }
}

/* Public: put the promise, actions and a real product preview in one view. */
@media (min-width: 901px) {
  .landing-settle .landing-new-hero {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(30px, 4.5vw, 78px);
    width: min(1420px, calc(100% - 72px));
    min-height: min(720px, calc(100svh - 90px));
    padding: 24px 0 58px;
  }
  .landing-settle .landing-new-copy {
    max-width: 620px;
    margin: 0;
    text-align: left;
  }
  .landing-settle .landing-new-copy h1 {
    font-size: clamp(3.55rem, 5.3vw, 5.8rem);
    line-height: 1.02;
  }
  .landing-settle .landing-new-copy > p { margin: 25px 0 0; }
  .landing-settle .landing-new-actions { justify-content: flex-start; }
  .landing-settle .landing-new-visual { align-self: center; }
  .landing-demo-content { padding: clamp(22px, 2.3vw, 38px); }
  .landing-demo-grid { grid-template-columns: minmax(0, 1.55fr) minmax(180px, .75fr); }
  .landing-demo-main, .landing-demo-side { min-height: 225px; }
}

.landing-settle .landing-new-flow-steps > div,
.landing-demo-main,
.landing-settle .landing-new-visual {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.landing-settle .landing-new-flow-steps > div:hover,
.landing-demo-main:hover { transform: translateY(-3px); box-shadow: 0 19px 34px -26px #20272250; }

/* Shared product materials: crisp white working surfaces and tactile controls. */
.settings-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 30px}
.settings-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:3px;min-width:0;padding:5px;border:1px solid var(--line);border-radius:28px;background:var(--surface);box-shadow:var(--shadow-control)}
.settings-tabs a{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:10px 15px;border-radius:999px;color:var(--muted);font-size:.82rem;white-space:nowrap;transition:background-color .2s,color .2s}
.settings-tabs a svg{width:17px;height:17px;flex:none}
.settings-tabs a:hover{background:var(--canvas);color:var(--ink)}
.settings-tabs a.active{background:var(--ink);color:var(--surface)}
.settings-signout{min-height:52px;flex:none}
@media(max-width:1050px){.settings-toolbar{flex-direction:column}.settings-signout{align-self:flex-end}}
@media(max-width:760px){.settings-tabs{width:100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;border-radius:22px}.settings-tabs a{scroll-snap-align:start;font-size:.78rem}.settings-signout{align-self:flex-start}.settings-page-head{margin-bottom:20px}}
.layout { max-width: 1680px; padding-inline: clamp(18px, 2.7vw, 42px); }
.app-header { gap: 18px; padding-bottom: clamp(24px, 3vw, 40px); }
.mainnav { padding: 5px; box-shadow: 0 2px 8px #1b1b1f08; }
.mainnav a { min-height: 43px; padding-inline: clamp(12px, 1.35vw, 20px); }
.page-head { margin-bottom: 28px; gap: 18px; }
.page-head h1 { font-size: clamp(2.25rem, 3.5vw, 3.4rem); line-height: 1.02; }
.page-head p { max-width: 70ch; line-height: 1.55; }
.card, .settings-card, .nutrition-day-lane {
  border-color: var(--settle-line);
  box-shadow: var(--settle-shadow);
}
.card-head h2, .card-head h3 { letter-spacing: -.045em; }
.btn, .segment button, .mainnav a { transition: transform .24s var(--ease), box-shadow .24s var(--ease), background-color .24s var(--ease), color .24s var(--ease); }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-control); }
.btn:active:not(:disabled) { transform: translateY(0); }
.segment { gap: 3px; padding: 4px; border: 0; background: var(--soft); }
.segment button { min-height: 38px; }
.segment button.active, .segment button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-control); }
.pill { font-variant-numeric: tabular-nums; }
.input, .date-input { border-color: var(--line); }
.input:focus-visible, .date-input:focus-visible { border-color: var(--lilac); box-shadow: 0 0 0 4px var(--lilac-soft); outline: 0; }

/* Today: a compact prompt followed by cards with a clear content hierarchy. */
.today-pulse-missing, .today-pulse-complete {
  grid-template-columns: 76px minmax(0, 1fr) auto auto !important;
  min-height: 120px;
  padding: 20px 26px !important;
  border-radius: 30px;
  gap: clamp(15px, 2vw, 30px) !important;
}
.today-pulse-count { width: 76px; min-height: 76px; border-radius: 24px; background: var(--lilac-soft); color: #655a90; }
.today-pulse-count strong { font-size: 2.4rem; }
.today-pulse-copy strong { font-size: clamp(1.05rem, 1.35vw, 1.35rem) !important; letter-spacing: -.045em; }
.today-pulse-copy > span { max-width: 45ch; font-size: .75rem !important; }
.today-missing-chip { min-height: 39px; background: var(--canvas) !important; }
.fixed-dashboard .dashboard-widget > .card { border-radius: 32px; }
.fixed-dashboard .dashboard-widget .card-head { margin-bottom: 16px; }
.fixed-dashboard .weekly-settle .weekly-settle-head { align-items: flex-start; }
.fixed-dashboard .weekly-settle .week-block-chart { gap: clamp(5px, .8vw, 16px); }
.fixed-dashboard .weekly-settle .week-bar-slot { height: 150px; }
.fixed-dashboard .weekly-settle .week-block { background: var(--ink); }
.fixed-dashboard .weekly-settle .week-block.partial { background: #92938e; }
.fixed-dashboard .weekly-settle .week-block.unrecorded { background: var(--soft); border-color: #c9c8c2; }
.fixed-dashboard .weekly-settle .week-block-chart small { font-size: .68rem; }

/* Calendar: day cells and the inspector share one visual language. */
.calendar-refined { gap: 20px; }
.calendar-refined .calendar-card, .calendar-refined .day-inspector > .card { border-radius: 32px; }
.calendar-refined .calendar-day { border-radius: 18px; transition: transform .2s var(--ease), background-color .2s var(--ease); }
.calendar-refined .calendar-day:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.calendar-refined .calendar-day.selected { box-shadow: 0 10px 20px -14px #1b1b1f90; }
.calendar-refined .calendar-weekdays { color: var(--muted); }
.calendar-refined .calendar-weekdays {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-refined .calendar-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  flex: none;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 108px;
  align-items: stretch;
}
.calendar-refined .calendar-day.product-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  height: auto;
  overflow: hidden;
}
.calendar-refined .calendar-day.product-day .product-day-status {
  position: static !important;
  display: block;
  max-width: 100%;
  margin-top: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-refined .calendar-day.product-day > small:not(.product-day-status) {
  position: absolute;
  inset: 14px 12px auto auto;
  font-size: .65rem;
}
.calendar-refined .calendar-day.outside .product-day-status,
.calendar-refined .calendar-day.outside > small:not(.product-day-status) { display: none; }
.calendar-refined .context-metric { min-height: 58px; background: var(--canvas); border-radius: 18px; }
.calendar-streak-card { background: var(--ink); }

/* Progress: two-by-one history, one-by-one change, then forecast and confidence. */
.progress-main { gap: 20px; }
.progress-main .chart-card, .progress-main .chart-card:has(.combined-chart) { border-radius: 32px; }
.progress-main .chart-card .card-head h2 { font-size: clamp(1.7rem, 2.25vw, 2.25rem); }
.chart-metric-selector { background: var(--soft); border-radius: 999px; }
.chart-metric-selector button.active { background: var(--surface); box-shadow: var(--shadow-control); }
.chart-history-range { padding: 4px; background: var(--soft); }
.chart-history-range button.active { box-shadow: var(--shadow-control); }
.progress-main .chart-grid, .progress-main .combined-chart line { display: none; }
.progress-main .axis-date { fill: color-mix(in srgb, var(--muted) 65%, transparent); }
.chart-delta.down { background: var(--green-soft); color: #286d53; }
.chart-delta.up { background: var(--coral-soft); color: #a94b37; }
.change-panel { min-width: 0; }
.progress-carousel { min-width: 0; overflow: hidden; }
.progress-carousel .progress-change {
  container-type: inline-size;
  min-width: 0;
  min-height: 0;
  padding: 25px !important;
  border-radius: 32px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.progress-carousel .progress-change .change-value {
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  margin: 0 !important;
  transform: none;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.progress-carousel .progress-change .change-number {
  display: block;
  min-width: 0;
  font-size: clamp(3.75rem, 23cqw, 6.5rem) !important;
  line-height: .95 !important;
  letter-spacing: -.085em;
  white-space: nowrap;
}
.progress-carousel .change-value small { align-self: baseline !important; flex: 0 0 auto; font-size: .88rem !important; }
.progress-carousel .change-endpoints {
  width: 100%;
  max-width: 270px;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}
.progress-carousel .change-endpoints > span:first-child, .progress-carousel .change-endpoints > span:last-child { min-width: 0; }
.forecast-visual { border-radius: 32px; }
.forecast-chart-stage { min-width: 0; }
.prediction-insight-widget { border-radius: 32px; }
.prediction-insight-dots { margin-top: auto !important; }

/* Nutrition: a library at the left and a visible day board at the right. */
.nutrition-summary:has(+ .nutrition-board-library) .energy-field {
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(210px, .35fr) 1fr;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 14px 32px;
  padding: 26px 32px;
  border-radius: 32px;
}
.nutrition-summary:has(+ .nutrition-board-library) .energy-field > .row { grid-column: 1 / -1; }
.nutrition-summary:has(+ .nutrition-board-library) .energy-field .energy-total { grid-column: 1; font-size: clamp(4.5rem, 7vw, 6rem); }
.nutrition-summary:has(+ .nutrition-board-library) .energy-field .macro-strip { grid-column: 2; gap: 10px; }
.nutrition-summary:has(+ .nutrition-board-library) .energy-field .macro-strip span { min-height: 36px; align-items: center; }
.nutrition-board-library {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .75fr);
  grid-template-rows: auto auto auto auto 1fr auto;
  align-items: start;
  gap: 0 24px;
  margin-top: 26px;
}
.nutrition-board-library > .library-head { grid-column: 1 / -1; grid-row: 1; margin-bottom: 24px; }
.nutrition-board-library > .catalogue-sources { grid-column: 1; grid-row: 2; margin: 0 0 18px; }
.nutrition-board-library > .catalogue-filters { grid-column: 1; grid-row: 3; margin: 0 0 16px; }
.nutrition-board-library > .nutrition-day-lane {
  grid-column: 2 !important;
  grid-row: 2 / 6 !important;
  position: sticky !important;
  top: 20px;
  min-width: 0;
  margin: 0 !important;
  padding: 24px !important;
  border: 1px solid var(--settle-line) !important;
  border-radius: 32px !important;
  background: var(--surface) !important;
}
.nutrition-board-library > #usda-results { grid-column: 1; grid-row: 4; min-width: 0; }
.nutrition-board-library > .nutrition-source-note { grid-column: 1; grid-row: 5; align-self: end; }
.nutrition-day-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nutrition-day-column { min-height: 155px; padding: 14px; border-radius: 22px; background: var(--canvas); }
.nutrition-day-column > div > p { min-height: 88px; border-color: #cecdc7; }
.nutrition-day-column.dragging { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green); }
.nutrition-board-library .nutrition-library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  background: transparent;
}
.nutrition-board-library .nutrition-kanban-card {
  min-height: 220px !important;
  padding: 19px !important;
  border: 1px solid var(--settle-line);
  border-radius: 26px !important;
  background: var(--surface);
  box-shadow: var(--settle-shadow);
}
.nutrition-board-library .nutrition-kanban-card h3 { font-size: 1rem !important; }
.nutrition-board-library .nutrition-kanban-card:focus-within { outline: 2px solid var(--lilac); outline-offset: 2px; }
.nutrition-board-library .nutrition-kanban-card > div:last-child > strong { font-size: 1.2rem !important; }
.nutrition-board-filters .input { border-radius: 16px; }
.food-macro-bars i { height: 8px; }

/* Habits and settings: useful grouping, quieter supporting text. */
.habits-layout-v3 > .card, .habits-layout-v3 aside > .card, .annual-habits, .habit-learning { border-radius: 32px; }
.habits-layout-v3 .habit-edit-tile {
  min-height: 150px;
  border: 1px solid var(--settle-line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--settle-shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.habits-layout-v3 .habit-edit-tile:hover { transform: translateY(-2px); box-shadow: 0 19px 34px -26px #20272250; }
.habits-layout-v3 .habit-edit-tile .habit-item { min-height: 96px; background: transparent; }
.habits-layout-v3 .habit-edit-tile:has(.habit-item.done) { background: var(--green-soft); }
.habits-layout-v3 .habit-edit-link { margin-bottom: 9px; }
.habit-risk-card .habit-risk-row { min-height: 66px; }
.habit-risk-ticks i { border-radius: 999px; }
.settings-rail a, .settings-rail button { min-height: 44px; border-radius: 999px; }
.settings-rail .active { box-shadow: var(--shadow-control); }
.settings-section .settings-card, .settings-section .card { border-radius: 32px; }
.settings-section .settings-heading { margin-bottom: 24px; }
.settings-section .setting-line, .settings-section .setting-row { min-height: 68px; }
.settings-section .setting-line:hover, .settings-section .setting-row:hover { background: color-mix(in srgb, var(--soft) 35%, transparent); }
.settings-preferences .settings-card > .setting-line { flex: 0 0 auto; }
.settings-card-grid.two { align-items: start; }
.settings-card-grid.two > .settings-card { align-self: start; }
.csv-import-hint { padding: 0 20px 20px; color: var(--muted); font-size: .76rem; line-height: 1.5; }

/* Forms and dialogs retain the compact account layout and generous focus targets. */
.auth-designed .auth-panel { border-radius: 32px; }
.auth-designed .auth-panel .input { font-size: max(16px, .9rem); }
.auth-designed .auth-secondary-actions a:focus-visible,
.nutrition-day-column:focus-within,
.habit-item:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.overlay .modal { border-radius: 32px; border-color: var(--settle-line); box-shadow: 0 30px 100px #17171c25; }
.overlay .modal .input { border-radius: 16px; }
.overlay .modal .form-actions { gap: 10px; }

@media (max-width: 1120px) {
  .nutrition-board-library { grid-template-columns: minmax(0, 1fr); }
  .nutrition-board-library > .library-head,
  .nutrition-board-library > .catalogue-sources,
  .nutrition-board-library > .catalogue-filters,
  .nutrition-board-library > .nutrition-day-lane,
  .nutrition-board-library > #usda-results,
  .nutrition-board-library > .nutrition-source-note { grid-column: 1 !important; grid-row: auto !important; }
  .nutrition-board-library > .nutrition-day-lane { position: static !important; margin: 0 0 24px !important; }
  .nutrition-day-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nutrition-board-library .nutrition-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .landing-settle .landing-new-hero { display: block; }
  .landing-settle .landing-new-copy { text-align: center; }
  .landing-settle .landing-new-actions { justify-content: center; }
  .nutrition-day-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nutrition-board-library .nutrition-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-pulse-missing, .today-pulse-complete { grid-template-columns: 68px minmax(0, 1fr) auto !important; }
  .today-pulse-signals { grid-column: 2; }
  .today-pulse > .btn { grid-column: 3; grid-row: 1 / 3; }
}

@media (max-width: 700px) {
  .landing-settle .landing-new-copy { margin-inline: auto; }
  .landing-settle .landing-new-hero { padding-top: 56px; }
  .layout { padding-inline: 16px; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: clamp(2.1rem, 8vw, 2.8rem); }
  .today-pulse-missing, .today-pulse-complete { grid-template-columns: 64px minmax(0, 1fr) !important; padding: 18px !important; border-radius: 26px; }
  .today-pulse-count { width: 64px; min-height: 64px; }
  .today-pulse-signals, .today-pulse > .btn { grid-column: 1 / -1; grid-row: auto; }
  .nutrition-board-library .nutrition-library-grid { grid-template-columns: 1fr; }
  .nutrition-day-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nutrition-board-library > .nutrition-day-lane { padding: 18px !important; }
  .nutrition-day-column { min-height: 135px; }
  .progress-carousel .progress-change { padding: 22px !important; }
  .calendar-refined .calendar-grid { grid-auto-rows: 68px; }
  .calendar-refined .calendar-day.product-day { min-height: 68px; padding: 7px; }
  .calendar-refined .calendar-day.product-day .product-day-status { font-size: .55rem; }
  .calendar-refined .calendar-day.product-day > small:not(.product-day-status) { display: none; }
}

@media (max-width: 420px) {
  .nutrition-day-board { grid-template-columns: 1fr; }
  .nutrition-day-column { min-height: 100px; }
  .nutrition-day-column > div > p { min-height: 45px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-settle .landing-new-flow-steps > div,
  .landing-demo-main,
  .landing-settle .landing-new-visual,
  .habits-layout-v3 .habit-edit-tile { transition: none; }
}

/* Original horizontal navigation from the kit. */
.horizontal-mode{--sidebar-width:0px}.horizontal-layout.layout{margin:0 auto!important;max-width:1680px;padding:35px 38px 100px;min-height:100vh}.horizontal-layout>main{max-width:none}.horizontal-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:25px;padding:0 0 44px;margin-bottom:12px}.horizontal-brand{justify-self:start}.horizontal-brand .brand{font-size:30px;font-weight:600}.horizontal-brand .mark{width:38px;height:28px}.horizontal-brand .mark:before,.horizontal-brand .mark:after{height:28px;width:27px}.horizontal-brand .mark i{left:12px;top:2px;width:14px;height:24px}.horizontal-tabs{display:flex;align-items:center;gap:3px;padding:6px;background:var(--surface);border:1px solid #dcdad4;border-radius:999px;justify-self:center;position:relative}.horizontal-tabs>a,.horizontal-more>summary{display:flex;align-items:center;justify-content:center;gap:10px;padding:14px 19px;border-radius:999px;color:var(--muted);font-size:15px;white-space:nowrap;list-style:none;cursor:pointer;transition:background .2s,color .2s,box-shadow .2s}.horizontal-more>summary::-webkit-details-marker{display:none}.horizontal-tabs>a>.ico,.horizontal-more>summary>.ico{width:19px;height:19px}.horizontal-tabs>a.active,.horizontal-more>summary.active{background:var(--ink);color:var(--surface);box-shadow:0 5px 15px #18181b17}.horizontal-tabs>a:hover:not(.active),.horizontal-more>summary:hover:not(.active){background:var(--canvas);color:var(--ink)}.horizontal-more>summary:focus-visible{outline:3px solid var(--coral);outline-offset:3px}.more-chevron{font-size:12px}.horizontal-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;justify-self:end}.horizontal-actions .btn.icon{width:47px;height:47px;border-color:#dedcd5;background:var(--surface)}.horizontal-actions .ico{width:21px;height:21px}.horizontal-avatar>.avatar{height:43px;width:43px;border:0;font-size:12px}.horizontal-menu{position:absolute;z-index:55;top:calc(100% + 12px);right:0;width:430px;display:grid;grid-template-columns:1fr 1fr;gap:4px;background:var(--surface);border:1px solid var(--line);box-shadow:0 20px 60px #24202920;padding:13px;border-radius:25px;animation:fade .2s}.horizontal-menu>a{display:flex;align-items:center;gap:10px;padding:13px;border-radius:13px;font-size:14px;color:var(--ink)}.horizontal-menu>a:hover{background:var(--canvas)}.horizontal-menu .ico{width:17px;height:17px;color:var(--muted)}.horizontal-sections{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);display:flex;gap:4px;padding:5px;background:#ffffffed;backdrop-filter:blur(14px);box-shadow:0 8px 30px #211b2f19;border:1px solid var(--line);border-radius:99px;z-index:40}.horizontal-sections a{padding:9px 20px;font-size:13px;border-radius:99px;color:#7c7973}.horizontal-sections a.active{background:var(--ink);color:var(--surface)}.horizontal-mode #app>.kit{max-width:1680px;padding:35px 38px 110px}.horizontal-mode #app>.kit>.horizontal-header{margin-bottom:0}.horizontal-mode .suite-page-head h1{font-size:44px}.horizontal-mode .suite-page-head p{font-size:15px}.horizontal-mode .suite-page-head .eyebrow{font-size:10px}.horizontal-mode .suite-stats .stat-card>.muted{font-size:14px}.horizontal-mode .suite-stats .stat-card .meta{font-size:13px}.horizontal-mode .home-widget{min-height:330px}.horizontal-mode .focus-task{font-size:13px}.horizontal-mode .focus-task small{font-size:12px}.horizontal-mode .home-event>div strong{font-size:13px}.horizontal-mode .home-event>div small{font-size:12px}.horizontal-mode .home-widget>.text-button{font-size:13px}.horizontal-mode .settings-layout.expanded{max-width:1400px}.horizontal-mode.theme-dark .horizontal-sections{background:#27272aee}.horizontal-mode.theme-dark .horizontal-tabs{border-color:var(--line)}.horizontal-mode.theme-dark .horizontal-actions .btn{border-color:var(--line)}
@media(min-width:1800px){.horizontal-layout.layout,.horizontal-mode #app>.kit{max-width:2048px;padding:50px 55px 110px}.horizontal-header{padding-bottom:60px;margin-bottom:10px}.horizontal-tabs>a,.horizontal-more>summary{font-size:19px;padding:17px 25px;gap:12px}.horizontal-tabs{padding:7px}.horizontal-tabs .ico{width:23px;height:23px}.horizontal-brand .brand{font-size:36px}.horizontal-actions .btn.icon{width:59px;height:59px}.horizontal-actions .ico{width:24px;height:24px}.horizontal-avatar>.avatar{width:51px;height:51px;font-size:15px}.horizontal-mode .suite-page-head h1{font-size:58px}.horizontal-mode .suite-page-head p{font-size:19px}.horizontal-mode .suite-page-head>.row .btn{font-size:17px;padding:16px 25px}}
@media(max-width:1250px){.horizontal-header{grid-template-columns:auto 1fr auto;gap:18px}.horizontal-tabs>a,.horizontal-more>summary{padding:12px 14px;font-size:13px;gap:7px}.horizontal-actions{gap:7px}.horizontal-actions .btn.icon{width:39px;height:39px}.horizontal-avatar>.avatar{width:36px;height:36px}.horizontal-brand .brand{font-size:26px}.horizontal-layout.layout,.horizontal-mode #app>.kit{padding:28px 25px 95px}.horizontal-mode .suite-page-head h1{font-size:36px}}
@media(max-width:950px){.horizontal-header{grid-template-columns:1fr auto;gap:22px;padding-bottom:28px}.horizontal-tabs{grid-column:1/-1;grid-row:2;justify-self:center}.horizontal-actions{grid-column:2;grid-row:1}.horizontal-brand .brand{font-size:28px}.horizontal-tabs>a,.horizontal-more>summary{font-size:14px;padding:13px 21px}.horizontal-mode .horizontal-layout .suite-page-head{margin-top:5px}.horizontal-mode .suite-page-head h1{font-size:34px}}
@media(max-width:650px){.horizontal-layout.layout,.horizontal-mode #app>.kit{padding:24px 18px 95px}.horizontal-header{gap:22px;padding-bottom:27px;margin:0}.horizontal-brand .brand{font-size:26px}.horizontal-actions{gap:8px}.horizontal-actions .btn.icon{width:36px;height:36px}.horizontal-actions .ico{width:17px;height:17px}.horizontal-avatar>.avatar{width:34px;height:34px;font-size:10px}.horizontal-tabs{width:100%;justify-content:space-between;padding:4px;gap:0}.horizontal-tabs>a,.horizontal-more>summary{font-size:11px;padding:11px 10px;gap:5px}.horizontal-tabs>a>.ico,.horizontal-more>summary>.ico{width:14px;height:14px}.horizontal-more>summary{gap:4px}.more-chevron{display:none}.horizontal-menu{width:min(380px,calc(100vw - 36px));right:0;max-height:65vh;overflow:auto;border-radius:20px;padding:10px}.horizontal-menu>a{font-size:12px;padding:13px 10px;gap:8px}.horizontal-menu .ico{width:15px;height:15px}.horizontal-mode .suite-page-head h1{font-size:33px}.horizontal-mode .suite-page-head p{font-size:13px}.horizontal-mode .suite-page-head .eyebrow{font-size:9px}.horizontal-sections{bottom:12px}.horizontal-sections a{font-size:12px;padding:9px 20px}.horizontal-mode .suite-stats .stat-card .meta{font-size:12px}}

/* Public pages carry no private save indicator. Programmatically focused headings remain visually quiet. */
body.public-surface #ritmo-sync-status { display: none; }
#main h1[tabindex="-1"]:focus { outline: none; }

@media (max-width: 650px) {
  .horizontal-tabs {
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .horizontal-tabs::-webkit-scrollbar { display: none; }
  .horizontal-tabs > a, .horizontal-more { flex: 0 0 auto; scroll-snap-align: center; }
  .horizontal-menu {
    position: fixed;
    top: 140px;
    left: 18px;
    right: 18px;
    width: auto;
    max-height: calc(100svh - 160px);
  }

  /* The chart has its own horizontal history viewport on narrow screens. */
  .progress-main .chart-card,
  .progress-main .chart-card:has(.combined-chart) {
    height: auto;
    min-height: 0;
  }
  .progress-main .chart-card .card-head {
    display: grid;
    gap: 18px;
  }
  .chart-card-controls,
  .chart-selector-stack {
    display: grid;
    width: 100%;
    gap: 9px;
    justify-items: start;
  }
  .chart-metric-selector {
    display: flex;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .chart-metric-selector button { flex: 0 0 auto; }
  .chart-history-range { justify-self: end; width: auto; max-width: 100%; }
  .chart-history-range button { min-width: 44px; white-space: nowrap; }
  .progress-main .chart-stage,
  .progress-main .chart-stage:has(.combined-chart) {
    flex: none;
    width: 100%;
    height: 260px;
    min-height: 0;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin;
  }
  .progress-main .chart-stage > svg,
  .progress-main .combined-chart svg,
  .progress-main .native-series svg {
    display: block;
    width: 640px;
    min-width: 640px;
    max-width: none;
    height: 250px !important;
  }
}
