:root {
  color-scheme: light;
  --paper: #f5f6f1;
  --surface: #fffefa;
  --sidebar: #fafbf6;
  --ink: #203129;
  --muted: #5d6c63;
  --faint: #879188;
  --line: #dce2d7;
  --line-soft: #e9ede5;
  --green: #214b3b;
  --green-dark: #193d30;
  --mint: #e7eedc;
  --lime: #d4e897;
  --round: 16px;
  --body-font: "DM Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; font-size: 16px; scrollbar-color: #abb7a9 transparent; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--body-font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; }
a { color: #365c43; text-underline-offset: .18em; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #8ea95d; outline-offset: 3px;
}
button:disabled { cursor: default; opacity: .55; }
svg { flex-shrink: 0; }
button svg, .icon, .nav-icon svg, .icon-tile svg { width: 19px; height: 19px; vertical-align: middle; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
::selection { color: #1b382b; background: #deedb6; }
.app-shell { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 20; display: flex; flex-direction: column; overflow-y: auto; padding: 30px 14px 16px; background: var(--sidebar); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; padding: 0 7px; text-decoration: none; color: var(--ink); }
.brandmark { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: #e7efa9; }
.brandmark svg { width: 28px; height: 28px; }
.brand-title, .brand-sub { display: block; }
.brand-title { color: #253c2d; font-size: 1.15rem; font-weight: 780; line-height: 1.16; letter-spacing: .04em; }
.brand-sub { margin-top: 4px; color: var(--muted); font-size: .775rem; line-height: 1.25; letter-spacing: .025em; }
.nav-label { margin: 32px 12px 9px; color: #6a766b; font-size: .765rem; line-height: 1.3; font-weight: 600; letter-spacing: .08em; }
.nav { display: grid; gap: 3px; }
.nav [data-page] { display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; border-radius: 9px; padding: 9px 13px; color: #59665b; background: transparent; font-size: .938rem; letter-spacing: .015em; text-decoration: none; text-align: left; }
.nav [data-page]:hover { color: #254331; background: #edf1e8; }
.nav [data-page].active, .nav [data-page][aria-current="page"], .nav [data-page][aria-selected="true"] { color: #234632; background: #e3ecd8; font-weight: 680; }
.nav-icon { width: 21px; display: inline-grid; place-items: center; color: currentColor; }
.nav-icon svg { width: 19px; height: 19px; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 8px 2px; border-top: 1px solid var(--line); font-size: .875rem; }
.sidebar-foot small { display: block; color: var(--muted); font-size: .76rem; }
.sidebar-foot .avatar { display: grid; flex-shrink: 0; width: 37px; height: 37px; place-items: center; border: 1px solid #d3dfc9; border-radius: 50%; color: var(--green); background: #e6ecdf; font-weight: 700; }
.workspace { min-width: 0; }
.skip-link { position: fixed; z-index: 100; top: -100px; left: 12px; padding: 9px 14px; border-radius: 8px; background: var(--surface); color: var(--green); }
.skip-link:focus { top: 8px; }
.scrim { display: none; }
.space-lock { display: inline-flex; color: #7b8977; margin-left: auto; }
.space-lock svg { width: 14px; height: 14px; }
.topbar { display: flex; align-items: center; gap: 14px; min-height: 65px; padding: 12px clamp(20px, 2.6vw, 42px); background: #fcfdf8; border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: .875rem; font-weight: 600; }
.crumb svg { width: 15px; height: 15px; color: #7c8679; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar .mobile-toggle { display: none; }
.crumb > span:first-child, .crumb-slash { color: #798474; font-weight: 450; }
.search-trigger { display: inline-flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; color: var(--muted); font-size: .875rem; }
.search-trigger:hover { background: #ecf0e7; }
.search-trigger svg { width: 17px; height: 17px; }
kbd { padding: 1px 5px; border: 1px solid #d6ded1; border-radius: 4px; color: #667262; background: #f9fbf5; font: .75rem/1.5 var(--mono); white-space: nowrap; }
#view { width: 100%; max-width: 1630px; margin: 0 auto; padding: 28px clamp(20px, 2.6vw, 42px) 46px; }
.home-heading, .page-heading { margin-bottom: 21px; }
.home-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.home-heading .date-label { white-space: nowrap; margin-bottom: 6px; }
.heading-line { width: 20px; height: 2px; background: #869c68; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #62735a; font-size: .75rem; font-weight: 700; letter-spacing: .14em; line-height: 1.5; }
.page-heading h1, .page-title { margin: 4px 0 5px; color: #203128; font-size: clamp(1.72rem, 2.5vw, 2.38rem); line-height: 1.26; letter-spacing: -.035em; font-weight: 735; }
.page-heading p, .date-label { color: var(--muted); font-size: .916rem; }
.date-label { display: inline-flex; align-items: center; gap: 7px; }
.date-label svg { width: 15px; height: 15px; }
.focus-banner { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; min-height: 188px; padding: 24px 30px; margin-bottom: 20px; border: 1px solid #204231; border-radius: var(--round); color: #fffdf0; background: linear-gradient(105deg, #1d4737, #224d3b 47%, #315b42); }
.focus-banner::before { content: ""; position: absolute; z-index: -1; inset: 0 0 0 30%; background: url("./topography.svg") center right / cover no-repeat; }
.focus-banner::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #1d4737 0%, #1f4837 28%, rgba(30,72,54,.94) 37%, rgba(30,72,54,.63) 49%, rgba(30,72,54,0) 68%); pointer-events: none; }
.focus-top, .focus-label, .focus-meta { display: flex; align-items: center; }
.focus-top { gap: 12px; justify-content: space-between; }
.focus-label { gap: 7px; color: #deeba8; font-weight: 600; font-size: .875rem; letter-spacing: .035em; }
.focus-label svg, .focus-meta svg { width: 16px; height: 16px; }
.focus-title { width: fit-content; max-width: min(75%, 44rem); margin: 16px 0 11px; color: #fffdf1; font-size: clamp(1.45rem, 2.2vw, 2.2rem); line-height: 1.38; letter-spacing: -.025em; font-weight: 680; overflow-wrap: anywhere; text-align: left; }
.focus-meta { flex-wrap: wrap; gap: 7px; width: fit-content; max-width: 72%; color: #e1eadc; font-size: .875rem; }
.hero-edit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 4px 10px; border: 1px solid #749078; border-radius: 7px; color: #f6f8e8; background: #31583f; font-size: .813rem; }
.hero-edit:hover { background: #3d6749; } .hero-edit svg { width: 15px; height: 15px; }
.focus-meta .hero-edit { min-height: 34px; padding: 6px 13px; border-color: #d9e7b1; background: #dce9b6; color: #254633; font-weight: 650; }
.focus-meta .hero-edit:hover { background: #eaf4c9; border-color: #eef7d5; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(275px, 1fr); align-items: start; gap: 18px; }
.main-col, .side-col, .stack { display: grid; min-width: 0; gap: 18px; align-content: start; }
.panel { min-width: 0; padding: 21px 22px; border: 1px solid var(--line); border-radius: var(--round); background: var(--surface); box-shadow: 0 2px 3px rgba(33,54,34,.018); overflow-wrap: anywhere; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.panel-head h2, .panel-title h2, .panel > h2 { color: var(--ink); font-size: 1.105rem; font-weight: 690; line-height: 1.45; letter-spacing: -.015em; }
.panel h3 { font-size: 1rem; line-height: 1.55; }
.icon-tile { display: inline-grid; flex-shrink: 0; width: 32px; height: 32px; place-items: center; border: 1px solid #e2e7d7; border-radius: 9px; color: #466641; background: #eef2e5; }
.icon-tile svg { width: 17px; height: 17px; }
.count, .chip, .action-tag { display: inline-flex; align-items: center; width: fit-content; min-height: 23px; padding: 2px 8px; border-radius: 6px; background: #edf2e4; color: #4e6847; font-size: .77rem; line-height: 1.5; font-weight: 600; }
.count { color: #657461; background: #f1f3eb; font-family: var(--mono); white-space: nowrap; }
.btn, .tab { display: inline-flex; flex-shrink: 0; justify-content: center; align-items: center; gap: 7px; min-height: 37px; padding: 7px 13px; border: 1px solid #cfd9c9; border-radius: 8px; background: #fcfdf8; color: #38543f; line-height: 1.4; font-size: .875rem; font-weight: 600; text-decoration: none; }
.btn:hover, .tab:hover { background: #edf3e6; border-color: #aebeaa; }
.btn.primary { color: #fffef3; background: var(--green); border-color: var(--green); }
.btn.primary:hover { background: #315d44; border-color: #315d44; }
.btn.light { color: #34563d; background: #eaf1dc; border-color: #d9e5c8; }
.btn.ghost { color: #4c6650; background: transparent; border-color: transparent; }
.btn.ghost:hover { background: #edf2e6; }
.btn svg, .tab svg { width: 16px; height: 16px; }
.action-list { display: grid; }
.action-row { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.action-row:last-child { border-bottom: 0; }
.check { display: grid; flex-shrink: 0; place-items: center; border: 1.5px solid #97a790; border-radius: 6px; width: 20px; height: 20px; background: #fffef9; color: #fff; padding: 0; }
.check svg { width: 14px; height: 14px; }
.check:hover { border-color: #467850; }
.check[aria-checked="true"], .check[aria-pressed="true"], .action-row.done .check, .check.done, .check.checked { background: #42744b; border-color: #42744b; color: #fff; }
.action-row.done .action-text, .action-row.completed .action-text { color: #76816f; text-decoration: line-through; }
.action-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.action-tag { white-space: nowrap; }
.icon-button { display: inline-grid; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; color: #63715f; border-radius: 8px; }
.icon-button:hover { background: #eef2e8; }
.icon-button svg { width: 16px; height: 16px; }
.add-action { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 38px; margin-top: 10px; padding: 8px 12px; color: #4a6b47; border: 1px dashed #b7c9ac; background: #f7f9f1; border-radius: 8px; font-size: .875rem; font-weight: 600; }
.add-action:hover { background: #edf4e4; border-color: #8aa17d; }
.add-action svg { width: 16px; height: 16px; }
.balance-body { display: flex; align-items: center; justify-content: space-evenly; gap: 15px; padding: 6px 0 2px; }
.balance-ring { position: relative; display: grid; place-items: center; flex-shrink: 0; width: clamp(92px, 8.2vw, 131px); aspect-ratio: 1; }
.balance-ring > svg { display: block; width: 100%; height: 100%; }
.balance-ring > :not(svg) { position: absolute; text-align: center; }
.score-legend { display: grid; flex: 1; gap: 8px; max-width: 200px; min-width: 75px; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: .875rem; color: #566455; }
.legend-row > :last-child:not(.legend-dot) { margin-left: auto; }
.legend-dot { display: inline-block; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: #92aa83; }
.review-card { background: #eaf0de; border-color: #d8e2c9; }
.review-card .icon-tile { background: #dfe9cf; border-color: #d3dfc4; }
.review-card p, .week-panel p { color: #54634f; font-size: .938rem; }
.review-card .btn, .week-panel .btn { margin-top: 12px; }
.panel-head .btn { margin-top: 0; }
.grid-2, .field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.muted { color: var(--muted); font-size: .91rem; }
.record { min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.record:last-child { border-bottom: 0; } .record p { margin: 5px 0; }
.empty { padding: 18px 14px; color: #606c5e; border: 1px dashed #d8e1d0; border-radius: 9px; background: #f7f9f1; line-height: 1.65; font-size: .91rem; }
.tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 3px; }
.tab { background: transparent; border-color: transparent; color: var(--muted); white-space: nowrap; }
.tab.active, .tab[aria-selected="true"] { color: var(--green); background: #e7efdc; border-color: #d8e3cd; }
.stat { padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9f1; color: #4e624d; }
.stat strong { display: block; margin-top: 3px; color: var(--ink); font-size: 1.3rem; }
.field { display: grid; min-width: 0; gap: 6px; font-size: .91rem; }
.field label, label.field > span { font-weight: 600; color: #3d503e; }
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  display: block; width: 100%; min-width: 0; min-height: 41px; padding: 8px 10px; border: 1px solid #cdd7c7; border-radius: 8px; background-color: #fffefa; color: var(--ink); line-height: 1.5; font-size: 1rem;
}
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #73806f; }
input[type="range"], input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpath d='m1 1 5.5 5.5L12 1' fill='none' stroke='%23536750' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
#dialog { width: min(520px, calc(100vw - 28px)); max-height: min(84vh, 760px); max-height: min(84dvh, 760px); margin: auto; border: 1px solid var(--line); border-radius: 17px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 18px 70px rgba(24,47,30,.21); }
#dialog::backdrop { background: rgba(22,38,28,.4); }
.dialog-inner { padding: 23px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dialog-head h2 { font-size: 1.2rem; line-height: 1.45; }
.form-grid { display: grid; gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 80; max-width: calc(100vw - 40px); padding: 10px 15px; border: 1px solid #436049; border-radius: 10px; background: #274531; color: #f9faef; line-height: 1.5; font-size: .91rem; box-shadow: 0 3px 12px #18322122; }
.toast:empty { display: none; }
@media (min-width: 1550px) { #view { padding-top: 35px; } .focus-banner { min-height: 207px; padding-left: 36px; } }
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(252px, 1fr); gap: 14px; }
  .panel { padding: 18px; }
  .main-col, .side-col { gap: 14px; }
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 178px minmax(0, 1fr); }
  .sidebar { padding-inline: 9px; }
  .sidebar-foot { padding-inline: 3px; }
  #view, .topbar { padding-inline: 18px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.25fr) minmax(215px, 1fr); gap: 12px; }
  .panel { padding: 16px; }
  .panel-head, .balance-body { gap: 8px; }
  .balance-ring { width: 83px; }
  .focus-banner { padding-inline: 23px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(255px, 84vw); height: 100dvh; padding: 23px 13px 15px; transform: translateX(-105%); transition: transform .16s ease; visibility: hidden; }
  .sidebar.open, .sidebar.is-open, .sidebar[data-open="true"], .menu-open .sidebar, .nav-open .sidebar, .sidebar-open .sidebar { transform: translateX(0); visibility: visible; }
  .sidebar.open, .sidebar.is-open, .sidebar[data-open="true"], .nav-open .sidebar, .sidebar-open .sidebar { box-shadow: 8px 0 35px #152e2422; }
  .topbar { min-height: 56px; padding: 8px 16px; gap: 9px; }
  .topbar .mobile-toggle { display: inline-grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 7px; }
  .scrim:not([hidden]) { display: block; position: fixed; z-index: 19; inset: 0; width: 100%; height: 100%; background: #203a2b65; }
  .top-actions { gap: 5px; } .crumb { gap: 5px; }
  .search-trigger kbd { display: none; }
  #view { padding: 22px 16px 36px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.45fr) minmax(205px,1fr); }
  .home-heading, .page-heading { margin-bottom: 16px; }
  .focus-banner { min-height: 158px; margin-bottom: 14px; padding: 18px 20px; }
  .focus-banner::before { left: 19%; }
  .focus-title { margin: 14px 0 9px; }
  .panel { border-radius: 13px; }
}
@media (max-width: 610px) {
  .home-heading { flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .home-heading .date-label { margin: 0; font-size: .815rem; }
  .crumb > span:first-child, .crumb-slash { display: none; }
  .dashboard-grid, .grid-2, .field-grid { grid-template-columns: 1fr; }
  .main-col, .side-col, .dashboard-grid { gap: 12px; }
  .balance-body { justify-content: flex-start; gap: 24px; padding: 2px 4px 6px; }
  .balance-ring { width: 108px; }
  .score-legend { max-width: none; }
  .focus-banner::before { left: 15%; opacity: .8; background-position: 63% center; }
  .focus-banner::after { background: linear-gradient(90deg, #1d4737 0%, rgba(29,71,55,.93) 35%, rgba(29,71,55,.45) 62%, rgba(29,71,55,0) 100%); }
  .focus-title { max-width: 100%; text-wrap: balance; }
  .focus-meta { max-width: 85%; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { padding: 8px; }
  .top-actions .btn { min-height: 34px; padding: 6px 9px; }
  .hero-edit { min-height: 30px; }
}
@media (max-width: 365px) {
  #view { padding-inline: 10px; }
  .topbar { padding-inline: 9px; } .focus-banner { padding-inline: 15px; }
  .crumb { font-size: .8125rem; }
  .panel { padding: 14px; } .dialog-inner { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
