:root {
  --paper: #f2efe6;
  --paper-2: #faf8f2;
  --ink: #153733;
  --muted: #697875;
  --line: #d9d7cd;
  --orange: #f06b38;
  --orange-dark: #d75427;
  --mint: #b9d4c7;
  --lime: #d8e9b1;
  --shadow: 0 20px 60px rgba(29, 53, 48, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(240, 107, 56, .34); outline-offset: 2px; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 72px);
  border-bottom: 1px solid rgba(21, 55, 51, .12);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 239, 230, .92);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 850; font-size: 15px; letter-spacing: .14em; }
.brand-mark { display: flex; align-items: flex-end; gap: 2px; height: 22px; transform: skew(-15deg); }
.brand-mark i { display: block; width: 7px; border-radius: 1px; background: var(--orange); }
.brand-mark i:nth-child(1) { height: 11px; }
.brand-mark i:nth-child(2) { height: 17px; }
.brand-mark i:nth-child(3) { height: 22px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.privacy-badge { display: flex; align-items: center; gap: 7px; color: #4e625e; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.privacy-badge span { width: 7px; height: 7px; border-radius: 50%; background: #4b9f77; box-shadow: 0 0 0 4px rgba(75,159,119,.12); }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--paper-2); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }

.section-shell { padding-left: clamp(22px, 5vw, 72px); padding-right: clamp(22px, 5vw, 72px); }
.eyebrow { margin: 0 0 13px; font-size: 11px; font-weight: 800; letter-spacing: .17em; color: var(--orange-dark); }
.hero { min-height: 490px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); gap: clamp(40px, 7vw, 120px); align-items: center; padding-top: 54px; padding-bottom: 54px; }
.hero h1 { margin: 0; max-width: 780px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 6vw, 84px); line-height: .96; letter-spacing: -.055em; font-weight: 500; }
.hero h1 em { color: var(--orange); font-weight: 500; }
.hero-text { max-width: 660px; font-size: 17px; line-height: 1.65; color: #61716d; margin: 25px 0 28px; }
.hero-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.primary-button { border: 0; border-radius: 2px; padding: 13px 18px; background: var(--orange); color: #fff; font-weight: 750; cursor: pointer; box-shadow: 0 8px 22px rgba(240,107,56,.18); }
.primary-button:hover { background: var(--orange-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.primary-button span { margin-left: 14px; }
.text-button, .quiet-button { border: 0; background: transparent; cursor: pointer; font-weight: 720; padding: 9px 2px; }
.text-button:hover, .quiet-button:hover { color: var(--orange-dark); }
.sync-icon { display: inline-block; margin-right: 7px; }
.syncing .sync-icon { animation: rotate .8s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.readiness-card { padding: 28px; border: 1px solid var(--line); background: rgba(250,248,242,.56); box-shadow: var(--shadow); }
.readiness-head { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.source-pill { border-radius: 20px; padding: 6px 9px; letter-spacing: .06em; }
.source-pill.demo { color: #8a6639; background: #efe3c6; }
.source-pill.live { color: #397154; background: #d9eadf; }
.source-pill.import { color: #315d72; background: #dbeaf0; }
.gauge-wrap { position: relative; height: 145px; margin-top: 14px; }
.gauge { width: 100%; height: 142px; overflow: visible; }
.gauge path { fill: none; stroke-linecap: butt; stroke-width: 8; }
.gauge-track { stroke: #e0ded5; }
.gauge-value { stroke: var(--orange); stroke-dasharray: 72 100; transition: stroke-dasharray .8s ease; }
.gauge-number { position: absolute; inset: 54px 0 auto; display: flex; justify-content: center; align-items: baseline; gap: 5px; }
.gauge-number strong { font-family: Georgia, serif; font-size: 58px; line-height: 1; font-weight: 500; }
.gauge-number span { color: var(--muted); font-size: 14px; }
.readiness-caption { display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 750; margin-top: -2px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.good { background: #55a477; }
.status-dot.watch { background: #d8a241; }
.status-dot.low { background: #da674c; }
.readiness-card > p { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.45; margin: 15px 0 0; }

.metrics { background: var(--paper-2); padding-top: 65px; padding-bottom: 74px; border-top: 1px solid rgba(21,55,51,.08); border-bottom: 1px solid rgba(21,55,51,.08); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.section-heading h2 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.035em; font-size: clamp(30px, 3vw, 44px); margin: 0; }
.section-heading .eyebrow { margin-bottom: 8px; }
.range-tabs { display: flex; border-bottom: 1px solid var(--line); }
.range-tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 13px; cursor: pointer; font-size: 12px; }
.range-tabs button.active { color: var(--ink); border-bottom: 2px solid var(--orange); font-weight: 800; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-card { min-height: 142px; border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; background: #fffdf9; }
.metric-card.warm { background: #f6eadb; }
.metric-card.dark { background: var(--ink); color: white; border-color: var(--ink); }
.metric-card > span { font-size: 10px; font-weight: 850; letter-spacing: .14em; color: #697773; }
.metric-card.dark > span { color: #afc3be; }
.metric-card > span i { border: 1px solid currentColor; border-radius: 50%; width: 14px; height: 14px; display: inline-grid; place-items: center; font-size: 9px; font-style: normal; }
.metric-card > strong, .ftp-card div strong { font-family: Georgia, serif; font-size: 44px; font-weight: 500; line-height: 1; margin: 20px 0 9px; }
.metric-card small { margin-top: auto; color: var(--muted); }
.metric-card.dark small { color: #bfd0cc; }
.trend.up { color: #44805f; }
.trend.down { color: #a76148; }
.ftp-card div { display: flex; align-items: baseline; gap: 5px; }
.ftp-card div strong { margin-bottom: 6px; }
.ftp-card div b { font-size: 15px; }
.ftp-card button { margin-top: auto; align-self: flex-start; border: 0; border-bottom: 1px solid var(--orange); background: transparent; padding: 0 0 2px; color: var(--orange-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.trend-panel { margin-top: 17px; padding: 22px 22px 12px; border: 1px solid var(--line); background: #fffdf9; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.chart-head > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.chart-head strong { font-family: Georgia, serif; font-size: 18px; }
.chart-head span { color: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 16px; }
.legend i { display: inline-block; width: 15px; margin-right: 5px; vertical-align: 3px; }
.load-key { height: 7px; background: var(--mint); }
.fitness-key { height: 2px; background: var(--orange); }
.load-chart { width: 100%; height: 210px; margin-top: 6px; overflow: visible; }
.goal-panel { margin-top: 17px; padding: 24px; border: 1px solid var(--ink); background: var(--ink); color: white; }
.goal-summary { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.goal-summary .eyebrow { color: #f1a17d; margin-bottom: 7px; }
.goal-summary h3 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.goal-summary p:last-child { margin: 7px 0 0; color: #bdd0cb; font-size: 13px; }
.goal-summary .quiet-button { color: #ffc2a6; border-color: rgba(255,194,166,.45); white-space: nowrap; }
.goal-measure-row { display: flex; align-items: end; gap: 18px; margin-top: 22px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
.goal-measure-row > div { display: flex; flex-direction: column; gap: 4px; }
.goal-measure-row span, .goal-progress-head span { color: #a9c1bb; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.goal-measure-row strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.goal-measure-row > b { align-self: center; color: #77918b; font: italic 14px Georgia, serif; }
.goal-measure-row small { margin-left: auto; align-self: center; color: #bdd0cb; font-size: 12px; }
.goal-plan-progress { margin-top: 18px; }
.goal-progress-head { display: flex; justify-content: space-between; gap: 18px; align-items: baseline; margin-bottom: 9px; }
.goal-progress-head strong { font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.goal-progress { height: 7px; background: rgba(255,255,255,.15); overflow: hidden; }
.goal-progress i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .5s ease; }
.goal-plan-progress p { margin: 8px 0 0; color: #bdd0cb; font-size: 12px; }
.roadmap-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 20px; background: rgba(255,255,255,.13); }
.roadmap-item { min-height: 92px; padding: 13px; background: #1d4540; }
.roadmap-item.current { background: #f06b38; color: #fff; }
.roadmap-item span { display: block; color: #a9c1bb; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.roadmap-item.current span { color: rgba(255,255,255,.75); }
.roadmap-item strong { display: block; margin-top: 6px; font-size: 12px; }
.roadmap-item small { display: block; margin-top: 5px; color: #bdd0cb; font-size: 9px; line-height: 1.4; }
.roadmap-item.current small { color: rgba(255,255,255,.88); }

.dashboard { padding-top: 70px; padding-bottom: 90px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(45px, 7vw, 100px); }
.section-heading.compact { align-items: center; margin-bottom: 20px; }
.section-heading.compact h2 { font-size: 34px; }
.plan-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.plan-view-tabs { display: flex; border: 1px solid var(--line); background: rgba(255,255,255,.48); }
.plan-view-tabs button { border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); padding: 7px 9px; cursor: pointer; font-size: 9px; white-space: nowrap; }
.plan-view-tabs button:first-child { border-left: 0; }
.plan-view-tabs button.active { background: var(--ink); color: white; font-weight: 800; }
.heading-actions { display: flex; align-items: center; gap: 14px; }
.auto-sync-badge { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.auto-sync-badge i { width: 7px; height: 7px; border-radius: 50%; background: #b8bbb6; }
.auto-sync-badge.live i { background: #4b9f77; box-shadow: 0 0 0 4px rgba(75,159,119,.12); }
.quiet-button { color: var(--orange-dark); font-size: 12px; border-bottom: 1px solid rgba(240,107,56,.35); }
.activity-list, .plan-list { border-top: 1px solid var(--ink); }
.activity-card { border-bottom: 1px solid var(--line); }
.activity-card.latest { background: linear-gradient(90deg, rgba(255,255,255,.42), transparent); }
.activity-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 0 15px; }
.activity-date { text-align: center; border-right: 1px solid var(--line); padding-right: 14px; }
.activity-date strong { display: block; font-family: Georgia, serif; font-size: 26px; font-weight: 500; line-height: .9; }
.activity-date span { font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.activity-main strong { display: block; font-size: 14px; }
.activity-main span { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.activity-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.activity-tags b { display: inline-block; border: 1px solid #ccd3cc; padding: 3px 6px; color: #526863; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.activity-tags b.followed { border-color: #89b99f; color: #397154; }
.activity-tags b.partial { border-color: #d5b56c; color: #92691e; }
.activity-tags b.exceeded { border-color: #e39b54; color: #a14e22; background: #fff3e6; }
.activity-tags b.off { border-color: #d89b8b; color: #a44735; }
.activity-load { text-align: right; }
.activity-load strong { display: block; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.activity-load span { font-size: 9px; color: var(--muted); letter-spacing: .1em; }
.activity-comment { margin: 0 0 15px 70px; padding: 11px 13px; border-left: 2px solid var(--mint); background: rgba(255,255,255,.48); }
.activity-comment > span { display: block; color: var(--orange-dark); font-size: 8px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.activity-comment p { margin: 5px 0 3px; font-size: 11px; line-height: 1.45; }
.activity-comment small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.empty-state { color: var(--muted); padding: 28px 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.plan-status { padding: 7px 10px; border: 1px solid #9ebcad; color: #397154; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.plan-column { min-width: 0; }
.dashboard.plan-expanded { grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); gap: clamp(36px, 5vw, 72px); }
.coach-insight { border: 1px solid var(--line); border-left: 4px solid var(--mint); padding: 16px 17px; margin: 0 0 17px; background: rgba(255,255,255,.52); }
.coach-insight.ai { border-left-color: var(--orange); }
.coach-insight-head { display: flex; align-items: center; gap: 8px; }
.coach-avatar { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-family: Georgia, serif; font-size: 12px; }
.coach-insight-head strong { font-size: 9px; letter-spacing: .12em; }
.coach-insight-head b { margin-left: auto; padding: 4px 7px; background: #e4ebe5; color: #527065; font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.coach-insight p { margin: 11px 0 5px; font-family: Georgia, serif; font-size: 17px; line-height: 1.35; }
.coach-insight small { display: block; color: var(--muted); font-size: 9px; line-height: 1.5; }
.coach-insight button { margin-top: 12px; border: 0; border-bottom: 1px solid var(--orange); background: transparent; color: var(--orange-dark); padding: 0 0 2px; font-size: 10px; font-weight: 800; cursor: pointer; }
.coach-insight button span { margin-left: 7px; }
.plan-week + .plan-week { margin-top: 24px; }
.plan-list.plan-window { max-height: 620px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: smooth; }
.plan-window .plan-week-head { position: sticky; top: 0; z-index: 2; }
.plan-week-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 12px; border-bottom: 1px solid var(--ink); background: #edf1ea; }
.plan-week-head > div { display: flex; align-items: baseline; gap: 9px; }
.plan-week-head span { color: var(--orange-dark); font-size: 8px; font-weight: 850; letter-spacing: .11em; }
.plan-week-head strong { font-family: Georgia, serif; font-size: 16px; font-weight: 500; }
.plan-week-head small { color: var(--muted); font-size: 9px; text-align: right; }
.plan-row { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.plan-row::before { content: ""; position: absolute; left: 57px; top: 0; bottom: 0; width: 3px; background: var(--zone-color, var(--mint)); }
.plan-row.completed { background: rgba(111, 169, 137, .08); }
.plan-row.exceeded { background: rgba(240, 157, 75, .1); }
.plan-row.missed, .plan-row.under { opacity: .72; }
.plan-date { padding-right: 12px; text-align: center; }
.plan-date span { display: block; font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.plan-date strong { font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.plan-main { padding-left: 10px; }
.plan-main > div { display: flex; justify-content: space-between; gap: 10px; }
.plan-main strong { font-size: 14px; }
.plan-main b { color: var(--orange-dark); font-size: 11px; }
.plan-main p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.plan-main .power-target { color: var(--ink); font-weight: 700; }
.plan-attributes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plan-attribute { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid #ccd3cc; color: #526863; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.plan-attribute i { display: inline-grid; place-items: center; min-width: 15px; min-height: 15px; border-radius: 50%; background: #397154; color: white; font-size: 9px; font-style: normal; letter-spacing: 0; }
.plan-attribute.completed { border-color: #89b99f; color: #397154; }
.plan-attribute.exceeded { border-color: #e39b54; color: #a14e22; background: #fff3e6; }
.plan-attribute.exceeded i { background: #c65e2c; }
.plan-attribute.missed, .plan-attribute.under { border-color: #d3aaa0; color: #a44735; }
.plan-attribute.partial { border-color: #d5b56c; color: #92691e; }
.plan-attribute.moved { border-color: #9ebcad; color: #397154; background: #edf5ef; }
.feedback-box { margin-top: 25px; padding: 18px; background: #e3ecdf; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.feedback-box > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.feedback-box strong { font-family: Georgia, serif; font-size: 17px; }
.feedback-box span { color: var(--muted); font-size: 10px; }
.feeling-buttons { display: flex; gap: 6px; }
.feeling-buttons button { width: 48px; min-height: 45px; border: 1px solid #c2d0be; background: rgba(255,255,255,.46); cursor: pointer; font-size: 18px; }
.feeling-buttons button.selected { background: var(--ink); color: white; border-color: var(--ink); }
.feeling-buttons small { display: block; font-size: 8px; margin-top: 2px; }
.coach-note { color: var(--muted); font-size: 9px; line-height: 1.55; }

.settings-dialog { width: min(680px, calc(100vw - 28px)); max-height: min(820px, calc(100vh - 28px)); padding: 0; border: 0; background: transparent; color: var(--ink); }
.settings-dialog::backdrop { background: rgba(11, 31, 28, .48); backdrop-filter: blur(5px); }
.dialog-shell { background: var(--paper-2); padding: clamp(22px, 4vw, 36px); box-shadow: 0 30px 90px rgba(0,0,0,.28); overflow-y: auto; max-height: calc(100vh - 28px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-head h2 { margin: 0; font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.close-button { border: 1px solid var(--line); border-radius: 50%; background: transparent; width: 36px; height: 36px; font-size: 24px; cursor: pointer; }
.dialog-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 25px 0; }
.dialog-tabs button { flex: 1; border: 0; background: transparent; padding: 12px; color: var(--muted); cursor: pointer; }
.dialog-tabs button.active { color: var(--ink); font-weight: 800; border-bottom: 2px solid var(--orange); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.security-callout { display: flex; gap: 13px; background: #e5eee8; border-left: 3px solid #5b9876; padding: 15px; margin-bottom: 23px; }
.security-callout svg { flex: 0 0 20px; width: 20px; fill: none; stroke: #477b61; stroke-width: 1.6; }
.security-callout strong { font-size: 13px; }
.security-callout p { margin: 4px 0 0; color: #5c716b; font-size: 11px; line-height: 1.55; }
.field-label { display: block; font-size: 11px; font-weight: 800; margin-bottom: 7px; }
.secret-field { display: flex; border: 1px solid var(--line); background: #fff; }
.secret-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 13px; }
.secret-field button { border: 0; background: transparent; color: var(--orange-dark); padding: 0 13px; font-size: 11px; font-weight: 800; cursor: pointer; }
.field-help { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.dialog-actions.end { justify-content: flex-end; }
.danger-link { border: 0; background: transparent; color: #aa4e3b; cursor: pointer; font-size: 11px; text-decoration: underline; }
.connection-message { min-height: 18px; font-size: 11px; color: var(--muted); }
.connection-message.error { color: #b44835; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-fields label { border: 1px solid var(--line); padding: 13px; font-size: 11px; font-weight: 800; }
.two-fields label span { float: right; font-weight: 600; }
.two-fields input { width: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: right; }
.three-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.three-fields label { border: 1px solid var(--line); padding: 13px; font-size: 11px; font-weight: 800; }
.three-fields label span { float: right; font-weight: 600; }
.three-fields input { width: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: right; }
.select-field { width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 13px; }
.goal-fields { margin-top: 14px; }
.goal-fields label { display: flex; flex-direction: column; gap: 10px; }
.goal-fields label > span { float: none; }
.goal-fields label b { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.goal-fields input { width: 100%; text-align: left; padding: 7px 0; }
.goal-fields i { font-style: normal; color: var(--muted); white-space: nowrap; }
.goal-callout { background: #f2eadc; border-left-color: var(--orange); }
.goal-callout svg { stroke: var(--orange-dark); }
.zone-editor { margin-top: 18px; }
.zone-row { display: grid; grid-template-columns: 13px 44px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.zone-row i { width: 9px; height: 9px; border-radius: 50%; background: var(--zone); }
.zone-row strong { font-size: 12px; }
.zone-row span { color: var(--muted); }
.zone-row input { width: 54px; border: 1px solid var(--line); background: #fff; padding: 6px; text-align: right; }
.memory-editor { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.memory-editor > div:first-child strong { font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.memory-editor label { display: block; margin-top: 15px; font-size: 10px; font-weight: 800; }
.memory-editor textarea { display: block; width: 100%; margin-top: 6px; resize: vertical; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 11px; font-size: 11px; line-height: 1.45; }

.coach-dialog { width: min(560px, calc(100vw - 20px)); height: min(760px, calc(100vh - 20px)); max-height: none; padding: 0; border: 0; background: transparent; color: var(--ink); }
.coach-dialog::backdrop { background: rgba(11,31,28,.48); backdrop-filter: blur(5px); }
.coach-shell { height: 100%; display: flex; flex-direction: column; background: var(--paper-2); padding: clamp(20px, 4vw, 32px); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.coach-shell .dialog-head h2 { font-size: 34px; }
.chat-context { margin: 15px 0; padding: 9px 11px; background: #e5eee8; color: #5b716a; font-size: 9px; line-height: 1.45; }
.chat-messages { min-height: 240px; flex: 1; overflow-y: auto; padding: 8px 3px 18px; }
.chat-message { width: 88%; margin: 10px 0; padding: 12px 14px; background: #fff; border: 1px solid var(--line); }
.chat-message.user { margin-left: auto; background: var(--ink); color: white; border-color: var(--ink); }
.chat-message > span { display: block; margin-bottom: 6px; color: var(--orange-dark); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.chat-message.user > span { color: #b9d4c7; }
.chat-message p { margin: 0; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.chat-message small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.chat-message.user small { color: #bfcfcb; }
.chat-suggestions { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; }
.chat-suggestions button { flex: 0 0 auto; max-width: 250px; border: 1px solid var(--line); background: transparent; padding: 7px 9px; color: var(--muted); font-size: 9px; cursor: pointer; }
.chat-suggestions button:hover { border-color: var(--orange); color: var(--orange-dark); }
.chat-form { display: grid; grid-template-columns: 1fr auto; align-items: stretch; border: 1px solid var(--line); background: #fff; }
.chat-form textarea { min-width: 0; resize: none; border: 0; background: transparent; color: var(--ink); padding: 12px; font-size: 12px; line-height: 1.45; }
.chat-form .primary-button { margin: 6px; }
.coach-shell > .coach-note { margin-bottom: 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 12px 18px; font-size: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s ease; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
  .readiness-card { max-width: 480px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .dashboard, .dashboard.plan-expanded { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { height: 64px; }
  .hero { min-height: 0; }
  .hero h1 { font-size: 46px; }
  .privacy-badge { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 124px; }
  .section-heading { align-items: flex-start; }
  .section-heading.compact { align-items: flex-start; }
  .plan-heading-actions { align-items: flex-start; }
  .plan-week-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .plan-week-head small { text-align: left; }
  .chart-head { flex-direction: column; }
  .trend-panel { padding-left: 12px; padding-right: 12px; }
  .feedback-box { align-items: flex-start; flex-direction: column; }
  .heading-actions { align-items: flex-end; flex-direction: column; gap: 4px; }
  .feeling-buttons { width: 100%; }
  .feeling-buttons button { flex: 1; }
  .two-fields { grid-template-columns: 1fr; }
  .three-fields { grid-template-columns: 1fr; }
  .goal-summary { flex-direction: column; }
  .goal-measure-row { align-items: flex-start; flex-wrap: wrap; }
  .goal-measure-row small { width: 100%; margin-left: 0; }
  .roadmap-list { grid-template-columns: 1fr 1fr; }
  .activity-comment { margin-left: 0; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-form .primary-button { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
#sessionBanner{padding:8px 20px;background:#e5ecdf;font-size:13px}#accountBar{display:flex;justify-content:flex-end;gap:14px;padding:8px 20px}#accountBar button{cursor:pointer;border:1px solid #c3c8bd;border-radius:8px;padding:7px 12px;background:#faf9f4}[hidden]{display:none!important}.admin-panel{max-width:1000px;margin:30px auto;padding:24px}.admin-panel label{display:block;margin:16px 0}.admin-panel input,.admin-panel select{padding:10px;max-width:100%}.admin-panel table{border-collapse:collapse;width:100%;font-size:13px}.admin-panel td,.admin-panel th{padding:10px;border-bottom:1px solid #ccc;text-align:left}.admin-panel pre{white-space:pre-wrap;overflow-wrap:anywhere}

/* Public landing: visible and usable before JavaScript or storage access. */
.login-page{min-height:100svh;max-width:1240px;margin:auto;padding:30px 48px 22px;display:flex;flex-direction:column;color:var(--ink,#26392f)}
.login-header{display:flex;align-items:center;justify-content:space-between;gap:20px}.login-wordmark{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;font-weight:850;letter-spacing:.12em;font-size:18px}.login-wordmark img{border-radius:10px}.login-wordmark small{display:block;font-size:9px;letter-spacing:.15em;margin-top:3px;color:var(--muted,#70766e)}.login-private{font-size:12px;color:var(--muted,#70766e)}
.login-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);align-items:center;gap:90px;flex:1;padding:70px 0}.login-copy h1{font-size:clamp(42px,5.3vw,70px);line-height:1.07;font-weight:600;letter-spacing:-.045em;margin:18px 0 24px}.login-copy h1 em{font-style:normal;color:var(--orange,#f06b38)}.login-intro{font-size:17px;line-height:1.7;max-width:510px;color:var(--muted,#70766e)}
.login-benefits{list-style:none;margin:36px 0 0;padding:0;display:grid;gap:22px}.login-benefits li{display:flex;gap:16px;align-items:flex-start}.login-benefits li>span{color:var(--orange,#f06b38);font-size:11px;letter-spacing:.1em;padding-top:3px}.login-benefits strong{font-size:14px}.login-benefits p{font-size:13px;margin:5px 0 0;color:var(--muted,#70766e);line-height:1.5}
.login-card{background:#fffdf8;border:1px solid #deded1;box-shadow:0 16px 55px #23382e0a;border-radius:18px;padding:36px}.login-card-mark{width:48px;height:48px;background:#253d36;color:#d5b471;font-size:28px;font-weight:750;border-radius:14px;display:grid;place-items:center;margin-bottom:30px}.login-card .eyebrow{font-size:10px}.login-card h2{font-size:31px;line-height:1.15;letter-spacing:-.035em;margin:12px 0 18px}.login-card>p:not(.eyebrow){font-size:13px;line-height:1.7;color:var(--muted,#70766e)}
.google-login{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;margin-top:27px;background:#253d36;border:1px solid #253d36;color:#fff;text-decoration:none;border-radius:8px;font-size:14px;font-weight:650;min-height:54px}.google-login:hover{background:#345346}.google-login:focus-visible{outline:3px solid #f06b38;outline-offset:4px}.google-letter{background:white;color:#345fbd;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-family:Arial,sans-serif;font-weight:700}.login-message{min-height:22px;margin-top:12px}.login-divider{height:1px;background:#e7e5db;margin:24px 0 18px}.login-card .login-privacy{font-size:11px!important;line-height:1.7}.login-footer{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #dcded3;padding-top:20px;font-size:10px;letter-spacing:.09em;color:#747b70}
@media(max-width:800px){.login-page{padding:24px}.login-layout{gap:36px;padding:48px 0;grid-template-columns:1fr}.login-copy h1{font-size:48px}.login-card{max-width:520px;width:100%;padding:28px}.login-benefits{gap:16px}.login-private{max-width:100px;text-align:right;font-size:11px}.login-footer{font-size:9px}}
@media(max-width:400px){.login-page{padding:20px}.login-copy h1{font-size:39px}.login-card{padding:24px}.login-wordmark{font-size:15px}.login-private{display:none}}

#majorDialog{max-width:800px;width:calc(100% - 24px);max-height:90dvh;overflow:auto;border:1px solid #d3ddd6;border-radius:18px;background:#f6f7f2;color:#223d32;padding:24px}.major-panel{display:grid;gap:14px}.major-panel label{display:grid;gap:6px}.major-panel textarea,.major-panel input{font:inherit;padding:10px;border:1px solid #b9c7be;border-radius:8px;max-width:100%}.major-panel label:has(input[type=checkbox]){display:inline-flex;padding:8px}.major-comparison{display:grid;gap:12px}.major-comparison article{border:1px solid #c6d5cb;border-radius:10px;padding:12px}#accountBar{display:flex;flex-wrap:wrap;gap:8px;padding:10px 20px}#accountBar[hidden]{display:none}
