:root {
  color-scheme: light;
  --canvas: #f7f8f5;
  --paper: #fff;
  --ink: #1b2620;
  --muted: #55665c;
  --line: #dfe5df;
  --soft: #edf1eb;
  --pine: #142a21;
  --mint: #cef2b6;
  --green: #255f3d;
  --alert: #a43b31;
  --alert-soft: #fceee9;
  --radius: 18px;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: var(--green); }
:focus-visible { outline: 2px solid #3b8152; outline-offset: 3px; }
.skip { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 12px; background: white; border-radius: 10px; transform: translateY(-150%); }
.skip:focus { transform: none; }
h1,h2,h3,p { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(34px, 5vw, 55px); font-weight: 690; }
h2 { font-size: 22px; }
.svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 224px minmax(0,1fr); }
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 28px 17px 20px; background: var(--pine); color: #f7fff9; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 24px; font-weight: 700; letter-spacing: -.045em; }
.rail .brand { padding-inline: 10px; margin-bottom: 39px; }
.rail nav { display: grid; gap: 5px; }
.nav-link { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; font-weight: 550; font-size: 15px; text-decoration: none; color: #c2d2c8; }
.nav-link:hover { background: #213a2d; color: white; }
.nav-link[aria-current="page"] { color: var(--mint); background: #293e32; border-color: #405444; }
.rail-logout { margin-top: auto; align-self: start; color: #c2d2c8; }
.rail-logout:hover { background: #233c30; }
.topbar { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 12px clamp(20px,4vw,55px); min-height: 70px; }
.workspace-label { font-size: 14px; font-weight: 550; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.primary,.secondary,.quiet,.icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; border-radius: 11px; padding: 0 14px; font-weight: 620; border: 1px solid transparent; transition: background .15s ease, transform .15s ease; }
.primary { background: var(--pine); color: white; }
.primary:hover { background: #28503b; }
.secondary { background: var(--soft); color: var(--ink); border-color: var(--line); }
.secondary:hover { background: #e0ebe0; }
.quiet,.icon-button { background: transparent; color: inherit; }
.quiet:not(.rail-logout):hover,.icon-button:hover { background: var(--soft); }
.icon-button { min-width: 44px; padding: 0; font-size: 23px; }
.primary:active,.secondary:active,.icon-button:active { transform: scale(.97); }
.add-symbol { font-size: 23px; font-weight: 400; line-height: 1; }
.mobile-brand,.mobile-only,.mobile-agenda { display: none; }
#main { max-width: 1440px; margin-inline: auto; padding: 29px clamp(20px,4vw,55px) 52px; }
.view-heading { margin-bottom: 25px; display: grid; gap: 8px; }
.kicker { color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .03em; }
.hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(245px, 31%); gap: 24px; align-items: end; position: relative; isolation: isolate; overflow: hidden; padding: clamp(23px,4vw,40px); background: #e3f0de; border-radius: 23px; border: 1px solid #d4e3d1; margin-bottom: 27px; animation: enter .3s ease-out; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: -40% -15% -70% 45%; background: repeating-radial-gradient(ellipse at 75% 80%, transparent 0 25px,#32534313 26px 27px); transform: rotate(-14deg); mask-image: linear-gradient(90deg,transparent,black); }
.hero p { margin: 0 0 8px; }
.progress { padding: 15px 17px; border: 1px solid #bdcfb9; border-radius: 14px; background: #f4f9f2; min-width: 0; }
.progress-line { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.progress-line strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.progress-line span { color: var(--muted); font-size: 13px; }
progress { display: block; width: 100%; height: 6px; margin-top: 8px; accent-color: var(--green); }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 31%); align-items: start; gap: 24px; }
.stack { display: grid; gap: 23px; min-width: 0; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; min-height: 27px; }
.section-head h2 { overflow-wrap: anywhere; }
.section-head .count { font-size: 12px; color: var(--muted); font-weight: 650; background: var(--soft); border-radius: 20px; padding: 3px 7px; font-variant-numeric: tabular-nums; }
.section-head.late h2 { color: var(--alert); }
.rows,.agenda,.calendar-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.row { display: flex; align-items: center; padding: 5px 10px; gap: 2px; min-width: 0; min-height: 62px; }
.row + .row { border-top: 1px solid var(--line); }
.expand-list { display: flex; width: 100%; border-radius: 0 0 var(--radius) var(--radius); border-top-color: var(--line); }
.check { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: 9px; color: var(--green); }
.check:hover { background: var(--soft); }
.box,.dot { display: grid; place-items: center; width: 19px; height: 19px; border: 1.5px solid #7e9586; border-radius: 6px; }
.row[data-kind=goal] .box { border-radius: 50%; }
.row[data-done=true] .box { background: #def2dc; border-color: #90bb98; }
.row[data-done=true] .row-title { color: var(--muted); text-decoration: line-through; }
.row .box .svg { width: 14px; height: 14px; stroke-width: 2.2; }
.row-main { display: flex; gap: 7px; flex: 1; align-items: center; min-width: 0; min-height: 48px; border: 0; padding: 5px 5px; background: transparent; text-align: left; color: inherit; text-decoration: none; border-radius: 8px; }
.row-main:hover { background: var(--canvas); }
.row-main > span:first-child { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 580; line-height: 1.28; overflow-wrap: anywhere; }
.row-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.row-date { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row[data-late=true] .row-date { color: var(--alert); }
.row-main .svg { width: 16px; height: 16px; color: var(--muted); }
.dot { border: 0; width: 9px; height: 9px; background: #6a987d; margin: 0 9px; border-radius: 50%; flex: none; }
.empty { padding: 17px 18px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.agenda { padding: 15px 13px 12px; }
.agenda h2 { margin: 1px 3px 14px; }
.agenda h3 { font-size: 13px; color: var(--muted); margin: 12px 5px 3px; letter-spacing: 0; }
.agenda .row { padding: 0 1px; min-height: 48px; }
.agenda .row + .row { border-top: 0; }
.agenda .row-title { font-size: 14px; }
.agenda .quiet { margin-top: 7px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.filter { background: var(--paper); min-height: 44px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); padding: 0 12px; font-size: 14px; font-weight: 550; }
.filter:hover { background: var(--soft); }
.filter[aria-pressed=true] { background: #dfebdd; color: var(--pine); border-color: #bed1be; }
.search-label { max-width: 660px; margin-bottom: 20px; }
.calendar-card { padding: clamp(10px,2.4vw,23px); }
.calendar-head { display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.calendar-head h2 { text-transform: capitalize; margin-right: auto; min-width: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
.weekday { font-size: 12px; text-align: center; color: var(--muted); padding: 4px 0; }
.calendar-day { min-height: 49px; border: 1px solid transparent; border-radius: 9px; background: var(--canvas); color: var(--ink); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 0; font-variant-numeric: tabular-nums; }
.calendar-day:hover { background: var(--soft); }
.calendar-day.today { border-color: #9cb49f; font-weight: 700; }
.calendar-day[aria-pressed=true] { color: white; background: var(--pine); }
.indicators { display: flex; gap: 3px; min-height: 5px; }
.indicators i { width: 5px; height: 5px; border-radius: 50%; background: #77ab86; }
.indicators .goal { background: #d7984e; }
.indicators .event { background: #7cacc8; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 2px 0; color: var(--muted); font-size: 12px; }
.calendar-legend span { display: flex; align-items: center; gap: 5px; }
#notice { margin-bottom: 16px; padding: 11px 14px; background: var(--soft); border-radius: 10px; overflow-wrap: anywhere; }
.error, #notice[data-error=true] { color: var(--alert); background: var(--alert-soft); padding: 9px 12px; border-radius: 8px; }
.hint { color: var(--muted); font-size: 14px; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 22px; background: radial-gradient(ellipse at 65% 15%,#e2f0db,transparent 65%); }
.login-form { width: min(100%,410px); padding: 28px; display: grid; gap: 19px; background: white; border: 1px solid var(--line); border-radius: 22px; }
.login h1 { font-size: 34px; }
label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
input,select { width: 100%; min-width: 0; min-height: 48px; border: 1px solid #c8d4c9; border-radius: 10px; padding: 9px 12px; background: white; color: var(--ink); font-size: 16px; font-weight: 450; }
dialog { width: min(calc(100% - 30px), 490px); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: white; color: var(--ink); max-height: calc(100dvh - 24px); box-shadow: 0 13px 60px #192b2133; }
dialog::backdrop { background: #13231c77; }
dialog form,.detail-inner { padding: 21px; display: grid; gap: 15px; min-width: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-head h2 { overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#voice-status:not(:empty) { margin-top: 8px; }
#transcript { margin: 8px 0 0; padding: 8px; border-radius: 8px; background: var(--canvas); overflow-wrap: anywhere; }
#transcript summary { cursor: pointer; min-height: 38px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-link { display: flex; width: fit-content; align-items: center; min-height: 44px; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media(max-width: 970px) {
  .shell { grid-template-columns: 172px minmax(0,1fr); }
  .columns,.hero { gap: 17px; }
}
@media(max-width: 820px) {
  .shell { display: block; }
  .mobile-brand,.mobile-only { display: flex; }
  .workspace-label,.rail .brand,.rail-logout { display: none; }
  .rail { position: fixed; inset: auto 0 0; z-index: 3; height: auto; padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); background: #fcfdfb; border-top: 1px solid var(--line); }
  .rail nav { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; }
  .nav-link { min-height: 53px; justify-content: center; flex-direction: column; padding: 4px 2px; gap: 3px; text-align: center; font-size: 11px; color: var(--muted); }
  .nav-link:hover { background: var(--soft); color: var(--pine); }
  .nav-link[aria-current=page] { background: #e3efdf; border-color: transparent; color: var(--pine); }
  .nav-link .svg { width: 20px; height: 20px; }
  #main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media(max-width: 640px) {
  .topbar { min-height: 61px; padding: 8px 14px; }
  .top-actions { gap: 3px; }
  .mobile-brand { font-size: 22px; gap: 7px; }
  #main { padding: 16px 14px calc(88px + env(safe-area-inset-bottom)); }
  .columns { grid-template-columns: minmax(0,1fr); gap: 23px; }
  .hero { grid-template-columns: minmax(0,1fr); gap: 13px; padding: 19px; border-radius: 18px; margin-bottom: 21px; }
  .hero::after { inset: -50% -50% -65% 27%; }
  .progress { padding: 9px 12px; }
  .progress-line strong { font-size: 17px; }
  .hero h1 { font-size: 40px; }
  .mobile-agenda { display: flex; width: fit-content; justify-content: start; padding-inline: 0; font-size: 14px; margin-block: 4px -5px; }
  .mobile-agenda .svg { width: 17px; }
  .row { padding-inline: 3px 6px; }
  .row-main .svg { display: none; }
  .row-date { font-size: 11px; }
  .agenda { padding: 13px 12px 9px; }
  .calendar-head h2 { font-size: 18px; }
  .calendar-head .quiet { padding-inline: 6px; font-size: 13px; }
  dialog { margin: auto auto 0; width: 100%; border-radius: 22px 22px 0 0; }
  dialog form,.detail-inner { padding-bottom: calc(21px + env(safe-area-inset-bottom)); }
}
@media(max-width: 375px) {
  .topbar { padding-inline: 10px; }
  #create { gap: 4px; padding-inline: 8px; font-size: 13px; }
  .calendar-grid { gap: 2px; }
}
@media(prefers-reduced-motion: reduce) { *,*::after { animation: none !important; transition: none !important; } }
