:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --type-body: .9375rem;
  --type-label: .875rem;
  --type-meta: .8125rem;
  background: #f7f8fc;
  color: #172338;
  --border: #e4e8f2;
  --muted: #53617a;
  --accent: #3f58a7;
  --accent-ink: #304785;
  --accent-soft: #edf1ff;
  --accent-focus: var(--accent);
  --radius-control: .65rem;
  --radius-card: .85rem;
  --radius-surface: 1.05rem;
  --canvas: light-dark(#f7f8fc, #141b28);
  --surface: light-dark(#fff, #202a3b);
  --subtle: light-dark(#f2f5fc, #28354a);
  --rail: light-dark(#fbfcff, #182233);
  --text: light-dark(#172338, #edf1fa);
  --border: light-dark(#e5eaf1, #38455a);
  --field-border: light-dark(#cbd5e2, #4b5a72);
  --elevation-low: 0 .15rem .6rem light-dark(#263a5910, #080d1724);
  --muted: light-dark(#53617a, #b0bdd2);
  --accent: light-dark(#3f58a7, #adbeff);
  --accent-ink: light-dark(#304785, #d4deff);
  --accent-soft: light-dark(#edf1ff, #304163);
  --accent-button: #405bac;
  --accent-hover: #314a96;
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="system"] { color-scheme: light dark; }
:root[data-accent="ocean"] {
  --accent: light-dark(#176391,#89c9f2); --accent-ink: light-dark(#12547c,#b7e1fb); --accent-soft: light-dark(#e8f5ff,#24455e);
  --accent-button: #1a6594; --accent-hover: #12527b;
}
:root[data-accent="jade"] {
  --accent: light-dark(#22735d,#8adbb9); --accent-ink: light-dark(#185746,#b8eed9); --accent-soft: light-dark(#e6f5ef,#294b43);
  --accent-button: #23705c; --accent-hover: #1a5948;
}
:root[data-accent="plum"] {
  --accent: light-dark(#794290,#e0abf0); --accent-ink: light-dark(#69397f,#efcaf9); --accent-soft: light-dark(#f6ebfb,#4a3458);
  --accent-button: #774291; --accent-hover: #66357b;
}
:root[data-accent="ember"] {
  --accent: light-dark(#975018,#f1b783); --accent-ink: light-dark(#7d4016,#ffd6ad); --accent-soft: light-dark(#fff0e3,#553a32);
  --accent-button: #924a1c; --accent-hover: #7c3d12;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: var(--type-body); line-height: 1.48; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 2px; }
button, input, select, textarea { font: inherit; }
button, .primary, nav a {
  padding: .62rem .86rem; border: 1px solid var(--border); border-radius: var(--radius-control);
  background: white; color: #214357; text-decoration: none; cursor: pointer;
}
.primary { background: var(--accent); color: white; border-color: var(--accent); font-weight: 650; display: inline-block; }
.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.app-frame { isolation: isolate; display: grid; grid-template-columns: 14rem minmax(0, 1fr); min-height: 100dvh; }
.shell { width: 100%; margin-inline: auto; max-width: 1440px; padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 2.5rem; min-width: 0; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; overflow: auto; background: #fff;
  display: flex; flex-direction: column; gap: 1.7rem; padding: 1.4rem .85rem .85rem;
  border-right: 1px solid var(--border);
}
.brand-link { color: inherit; text-decoration: none; align-self: flex-start; padding-inline: .5rem; }
.account, .heading, .time-head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.13rem; font-weight: 750; letter-spacing: -.035em; }
.brand-mark { flex: none; display: block; }
.account span, p, small { color: var(--muted); overflow-wrap: anywhere; }
small { display: block; margin-top: .25rem; font-weight: 400; font-size: var(--type-meta); line-height: 1.4; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.45rem, 2.8vw, 1.9rem); line-height: 1.2; letter-spacing: -.025em; }
h2 { font-size: 1.0625rem; line-height: 1.3; letter-spacing: -.012em; }
p { margin-top: .4rem; }
.heading { margin: 1rem 0 1.6rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem); gap: 1.25rem; align-items: start; }
.schedule { min-width: 0; display: grid; gap: 1rem; }
.panel { background: var(--surface); padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--border); border-radius: var(--radius-surface); box-shadow: var(--elevation-low); min-width: 0; }
.fields { display: grid; gap: .9rem; margin-top: 1rem; }
.fields label { display: grid; gap: .35rem; font-weight: 650; }
input, select, textarea { color: inherit; border: 1px solid var(--field-border); background: white; border-radius: var(--radius-control); padding: .55rem; min-width: 0; width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
nav { display: flex; gap: .35rem; flex-wrap: wrap; }
nav a { font-size: var(--type-label); line-height: 1.35; }
.filters { margin: 1rem 0; }
.filters [aria-current="page"] { color: #0a4c41; background: #e0f3ed; border-color: #a3d6c7; font-weight: 700; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: .65rem; }
table { width: 100%; min-width: 690px; border-spacing: 0; table-layout: fixed; text-align: left; }
th, td { padding: .45rem; border-bottom: 1px solid var(--border); }
thead th { background: #eff5f8; font-weight: 600; font-size: .875rem; vertical-align: top; }
thead th:first-child, tbody th { position: sticky; left: 0; width: 175px; overflow-wrap: anywhere; z-index: 1; }
tbody th { background: white; box-shadow: 1px 0 0 var(--border); }
thead th.today { background: #d8eee8; color: #0a4c41; box-shadow: inset 0 3px 0 #158273; }
td.slot { background: #f9fbfd; box-shadow: inset 1px 0 var(--border); }
.bar, .pill { background: #deedf8; color: #184867; border-radius: .4rem; font-size: .875rem; padding: .4rem .55rem; }
.bar span { display: block; font-variant-numeric: tabular-nums; }
.doing { background: #ffefcc; color: #684900; }
.done { background: #daf3e9; color: #0c5341; }
.empty { padding: 1.2rem; color: var(--muted); }
.grant, .agenda li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .8rem 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.grant:first-of-type { margin-top: 1rem; }
.agenda ul { list-style: none; padding: 0; margin: .8rem 0 0; }
.status { display: flex; gap: .4rem; }
.signin { display: grid; place-items: center; min-height: 100dvh; padding: 1rem; }
.signin .panel { width: min(100%, 410px); }
.signin h1 { margin-top: 1rem; }
.error { background: light-dark(#fce9e8, #482c36); color: light-dark(#791e20, #ffd4d6); padding: .75rem; border-radius: var(--radius-control); margin: .75rem 0; }
.main-nav { display: grid; gap: .25rem; }
.main-nav a, .sidebar-lists nav a { background: transparent; border-color: transparent; }
.main-nav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .65rem; color: var(--muted); }
.main-nav a:hover { background: #f4f6fc; color: var(--accent-ink); }
.main-nav [aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-weight: 650; }
.nav-icon { display: inline-block; flex: 0 0 1rem; height: 1rem; position: relative; color: currentColor; }
.nav-icon.sun { border: 2px dotted currentColor; border-radius: 50%; }
.nav-icon.sun::after { content: ""; position: absolute; inset: 2px; border: 1px solid currentColor; border-radius: 50%; }
.nav-icon.list { background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 5px); margin-block: 2px; height: 11px; }
.nav-icon.people::before, .nav-icon.people::after { content: ""; position: absolute; width: 7px; height: 7px; top: 1px; border: 1px solid currentColor; border-radius: 50%; }
.nav-icon.people::after { top: 6px; left: 6px; }
.nav-icon.timeline { background: linear-gradient(currentColor,currentColor) left 2px / 60% 2px no-repeat, linear-gradient(currentColor,currentColor) right 7px / 60% 2px no-repeat, linear-gradient(currentColor,currentColor) center 12px / 40% 2px no-repeat; }
.nav-icon.board { border: 1px solid currentColor; border-radius: 3px; background: linear-gradient(currentColor,currentColor) center / 1px 100% no-repeat; }
.sidebar-lists { padding: .1rem .4rem; min-width: 0; }
.sidebar-lists h2 { font-size: .95rem; margin-bottom: .45rem; }
.sidebar-lists nav { display: grid; gap: .2rem; }
.sidebar-lists nav a { padding: .4rem .45rem; overflow-wrap: anywhere; }
.sidebar-lists [aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.sidebar-lists details { margin-top: .55rem; }
.sidebar-lists summary { cursor: pointer; color: var(--accent); font-size: .875rem; }
.sidebar-lists form { display: grid; gap: .35rem; margin-top: .45rem; }
.profile-menu { margin-top: auto; min-width: 0; border-top: 1px solid var(--border); padding-top: .55rem; }
.profile-menu summary { list-style: none; cursor: pointer; }
.profile-menu summary::-webkit-details-marker { display: none; }
.sidebar .account { justify-content: flex-start; gap: .6rem; padding: .35rem; border-radius: .6rem; }
.sidebar .account:hover { background: var(--accent-soft); }
.account .avatar { display: grid; place-items: center; flex: 0 0 2rem; height: 2rem; border-radius: 50%; color: var(--accent-ink); background: var(--accent-soft); font-weight: 650; }
.account-address { min-width: 0; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu form { padding: .4rem; }
.profile-menu button { border: 0; background: var(--accent-soft); color: var(--accent-ink); font-size: .875rem; }
.task-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem) auto; align-items: end; gap: .65rem; }
.task-filters label { display: grid; gap: .35rem; font-size: .875rem; }
.task-info { min-width: 0; }
.editor { position: sticky; top: 1rem; }
.daily-frame { grid-template-columns: 12.75rem minmax(0, 1fr); }
.daily-frame .sidebar { background: #fbfcff; }
.daily-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(16.25rem, 21%, 19rem); min-width: 0; }
.daily-main {
  position: relative; min-width: 0; min-height: 100dvh;
  display: flex; flex-direction: column; gap: 1.5rem; padding: clamp(1rem, 3vw, 3rem);
}
.app-backdrop { position: fixed; inset: 0; z-index: -1; isolation: isolate; pointer-events: none; }
[data-background-stage] {
  --sky: #f1f5ff;
  --light: #ececff;
  --warm: #dcd7f3;
  --cool: #bce5df;
  --art-bright: #f7ffff;
  --art-main: #a9d9dc;
  --art-shade: #9aaed6;
  --art-second: #d8c8eb;
  --dark-sky: #192235;
  --dark-light: #1c293e;
  --dark-warm: #302944;
  --dark-cool: #1d3846;
  background:
    radial-gradient(ellipse at 86% 79%, light-dark(var(--warm), var(--dark-warm)) 0, transparent 61%),
    radial-gradient(ellipse at 7% 83%, light-dark(var(--cool), var(--dark-cool)) 0, transparent 67%),
    linear-gradient(155deg, light-dark(var(--sky), var(--dark-sky)) 15%, light-dark(var(--light), var(--dark-light)));
}
[data-background-stage][data-background="sunrise"] {
  --sky: #fff9f5; --light: #ffeae9; --warm: #f3c8be; --cool: #e6d6f6;
  --dark-sky: #282233; --dark-light: #2b263a; --dark-warm: #4c3136; --dark-cool: #342d4b;
  --art-bright: #fff7ef; --art-main: #edbcb0; --art-shade: #b9a2d8; --art-second: #fae0c4;
}
[data-background-stage][data-background="lagoon"] {
  --sky: #e5fcf8; --light: #e4f1fb; --warm: #c7daeb; --cool: #98d3cf;
  --dark-sky: #152c33; --dark-light: #1b3042; --dark-warm: #233d57; --dark-cool: #1e4a45;
  --art-bright: #ecffff; --art-main: #7abbb8; --art-shade: #6485aa; --art-second: #bedcee;
}
[data-background-stage][data-background="paper"], [data-background-stage][data-background="custom"] { background: var(--canvas); }
[data-background="paper"] .day-art, [data-background="custom"] .day-art { display: none; }
.custom-app-background { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .26; pointer-events: none; }
.day-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: .34; }
.day-art span { position: absolute; display: block; }
.day-art span:nth-child(1) {
  width: min(67%, 48rem); aspect-ratio: 1.4; left: 9%; top: 32%; transform: rotate(-31deg);
  border-radius: 58% 42% 63% 36% / 72% 42% 58% 28%;
  background: radial-gradient(ellipse at 26% 25%, var(--art-bright), transparent 54%),
    linear-gradient(132deg, var(--art-main), var(--art-shade));
  box-shadow: inset 0 2px 9px #ffffff8a, 0 1.6rem 4rem #4b609a24;
}
.day-art span:nth-child(2) {
  width: min(46%, 31rem); aspect-ratio: 1.4; right: 7%; top: 56%; transform: rotate(-24deg);
  border-radius: 26% 74% 70% 30% / 46% 50% 50% 54%;
  background: radial-gradient(ellipse at 83% 17%, var(--art-bright), transparent 67%),
    linear-gradient(135deg, var(--art-second), var(--art-shade));
  box-shadow: inset 0 1px 8px #ffffffbd, 0 .8rem 2rem #4a589829;
}
.day-art span:nth-child(3) {
  width: 13%; aspect-ratio: 1; right: 13%; top: 34%; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--art-bright), var(--art-second) 54%, var(--art-shade));
  box-shadow: 0 .75rem 1.7rem #535f8b22;
}
.day-art span:nth-child(4) {
  width: 7%; aspect-ratio: 1; left: 17%; top: 72%; border-radius: 50%;
  background: radial-gradient(circle at 28% 26%, var(--art-bright), var(--art-main) 56%, var(--art-shade));
}
.daily-content, .daily-dock { width: min(100%, 40rem); margin-inline: auto; }
.daily-content { display: grid; gap: .75rem; }
.day-heading { padding: .25rem 0 .55rem; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.day-heading h1 { font-size: clamp(1.55rem, 2.9vw, 2rem); line-height: 1.18; letter-spacing: -.028em; }
.day-heading p { color: var(--muted); font-size: var(--type-label); font-weight: 500; margin-bottom: .3rem; }
.day-heading p::first-letter { text-transform: uppercase; }
.background-picker { position: relative; z-index: 5; min-width: 0; }
.background-picker [hidden], .background-picker[hidden] { display: none !important; }
.background-picker > summary {
  list-style: none; cursor: pointer; color: var(--accent-ink); font-size: .875rem; font-weight: 650;
  display: flex; align-items: center; gap: .35rem; height: 100%; min-height: 2.75rem;
  border: 1px solid var(--border); padding: .4rem .55rem; border-radius: .8rem; background: #fff;
}
.background-picker summary::-webkit-details-marker { display: none; }
.background-thumbnail { display: block; width: 1.85rem; height: 1.85rem; border: 1px solid var(--border); border-radius: .5rem; background: linear-gradient(140deg,#bce5df,#c9c6ed); overflow: hidden; }
[data-background="sunrise"] .background-thumbnail { background: linear-gradient(140deg,#f3c8be,#e6d6f6); }
[data-background="lagoon"] .background-thumbnail { background: linear-gradient(140deg,#98d3cf,#b9d9ed); }
[data-background="paper"] .background-thumbnail { background: #f7f9fe; }
.background-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.background-options {
  position: absolute; bottom: calc(100% + .45rem); right: 0; display: grid; gap: .55rem; width: min(19rem, 83vw);
  max-height: min(55dvh, 21rem); overflow: auto;
  padding: .6rem; border: 1px solid var(--border); border-radius: .85rem; background: white; box-shadow: 0 .5rem 1.6rem #29395725;
}
.background-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.background-options button { display: flex; gap: .35rem; align-items: center; padding: .35rem; border: 0; font-size: .875rem; }
.background-gallery button { align-items: stretch; flex-direction: column; text-align: left; }
.background-options button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 650; }
.background-gallery button span { height: 1.8rem; border-radius: .45rem; border: 1px solid var(--border); }
.background-options [data-set-background="mist"] span { background: linear-gradient(140deg,#bce5df,#c9c6ed); }
.background-options [data-set-background="sunrise"] span { background: linear-gradient(140deg,#f3c8be,#e6d6f6); }
.background-options [data-set-background="lagoon"] span { background: linear-gradient(140deg,#98d3cf,#b9d9ed); }
.background-options [data-set-background="paper"] span { background: #f7f9fe; }
.background-options [data-set-background="custom"] span { background: linear-gradient(135deg,#f0eff8,#c8cde1); }
.background-upload { display: grid; gap: .3rem; color: var(--accent-ink); font-size: .875rem; font-weight: 650; }
.background-upload input { padding: .35rem; font-size: .875rem; }
.background-remove { color: var(--accent-ink); justify-self: start; }
.background-message { color: var(--muted); font-size: .875rem; margin: 0; }
.background-message:empty { display: none; }
.daily-agenda { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); align-items: start; gap: 1rem; }
.date-tile { display: grid; gap: .2rem; justify-items: center; padding: .55rem .3rem; border-radius: .7rem; color: var(--accent-ink); background: var(--accent-soft); }
.date-tile strong { font-size: 1.875rem; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.date-tile span { font-size: var(--type-meta); }
.date-tile span:first-child { text-transform: uppercase; font-weight: 700; }
.daily-agenda-items ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.daily-agenda-items li {
  display: grid; grid-template-columns: minmax(6rem, auto) minmax(0, 1fr);
  gap: .55rem; padding: .38rem 0; overflow-wrap: anywhere; border-top: 1px solid var(--border);
}
.daily-agenda-items li { font-size: var(--type-label); line-height: 1.4; align-items: baseline; }
.agenda-hours { color: var(--muted); font-size: var(--type-label); font-variant-numeric: tabular-nums; }
.daily-dock { position: sticky; bottom: .75rem; margin-top: auto; z-index: 2; display: grid; gap: .45rem; }
.daily-capture-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; align-items: stretch; }
.quick-capture {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .45rem;
  padding: .45rem .55rem; background: #fff; border: 1px solid var(--border); border-radius: .8rem;
  box-shadow: 0 .45rem 1.75rem #29295b20;
}
.quick-capture input { border-color: transparent; }
.quick-capture .primary { padding-inline: clamp(.55rem, 2vw, .9rem); }
.daily-composer > summary {
  width: fit-content; cursor: pointer; background: #fff; border: 1px solid var(--border); border-radius: .65rem;
  padding: .38rem .7rem; color: var(--accent); font-size: .875rem; font-weight: 650;
}
.composer-plus { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: .5rem; background: var(--accent-soft); color: var(--accent-ink); font-size: 1.2rem; }
.daily-composer .editor { position: static; margin-top: .5rem; }
.daily-dock:has(.daily-composer[open]) { position: relative; bottom: auto; }
.daily-composer[open] { scroll-margin-top: 1rem; }
.suggestion-rail {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  min-width: 0; padding: 1.3rem 1rem; border-left: 1px solid var(--border);
}
.suggestion-heading { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem; }
.suggestion-heading h2 { display: flex; align-items: center; gap: .3rem; margin: 0; font-size: .9rem; font-weight: 650; }
.suggestion-heading svg, .suggestion-filters svg { width: 1.05rem; height: 1.05rem; flex: none; }
.suggestion-heading h2 svg { color: var(--accent); }
.suggestion-tools { display: flex; gap: .1rem; align-items: center; padding: .12rem; border: 1px solid var(--border); border-radius: 2rem; background: var(--surface); }
.suggestion-tools > a, .suggestion-tools > details > summary {
  position: relative; display: grid; place-items: center; width: 1.65rem; height: 1.9rem;
  border-radius: 1rem; color: var(--text); text-decoration: none; list-style: none;
}
.suggestion-tools summary::-webkit-details-marker { display: none; }
.suggestion-tools :is(a, summary):is(:hover, :focus-visible), .suggestion-tools [aria-current], .suggestion-tools details[open] summary { background: var(--accent-soft); color: var(--accent-ink); }
.suggestion-heading .suggestion-tools > details { margin: 0; }
.suggestion-help > div {
  position: absolute; z-index: 4; inset: calc(100% + .35rem) 0 auto auto; width: min(100%, 16rem);
  padding: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: .65rem;
  box-shadow: 0 .45rem 1.2rem #0002; font-size: var(--type-meta);
}
.suggestion-help p { margin: .25rem 0 0; color: var(--muted); }
.suggestion-dot { position: absolute; top: .23rem; right: .22rem; width: .5rem; height: .5rem; border: 1px solid var(--surface); border-radius: 50%; background: light-dark(#b93451, #ff8aa0); }
.notification-panel {
  position: absolute; z-index: 5; inset: calc(100% + .45rem) 0 auto auto;
  width: min(100%, 24rem); max-height: min(34rem, 75dvh); overflow: auto;
  padding: .75rem; border: 1px solid var(--border); border-radius: .85rem;
  background: var(--rail); box-shadow: 0 .6rem 1.6rem #0003;
}
.notification-panel header, .notification-controls, .notification-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.notification-panel header { justify-content: space-between; }
.notification-panel header h2 { font-size: .96rem; }
.notification-panel header > span { color: var(--muted); font-size: .75rem; }
.notification-controls { justify-content: space-between; margin-top: .55rem; }
.notification-tabs a, .notification-controls button {
  padding: .25rem .4rem; border: 0; border-radius: .35rem; text-decoration: none;
  background: transparent; color: var(--accent-ink); font-size: .75rem; font-weight: 600;
}
.notification-tabs a:hover, .notification-controls button:hover { background: var(--accent-soft); }
.notification-panel > ul { display: grid; gap: .45rem; margin-top: .65rem; }
.notification-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .5rem;
  width: 100%; padding: .55rem; border-radius: .6rem; color: var(--text); text-align: left;
}
.notification-item:hover { border-color: var(--accent); }
.notification-item.is-unread { border-inline-start-color: var(--accent); }
.notification-avatar {
  display: grid; place-items: center; width: 1.65rem; height: 1.65rem;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: .72rem; font-weight: 700;
}
.notification-copy { display: grid; gap: .25rem; overflow-wrap: anywhere; font-size: var(--type-meta); }
.notification-copy time, .notification-empty { color: var(--muted); font-size: .75rem; }
.notification-unread { width: .35rem; height: .35rem; margin-top: .35rem; border-radius: 50%; background: var(--accent); }
.notification-empty { margin: .7rem 0 0; padding: .6rem; border: 1px dashed var(--border); border-radius: .5rem; }
.suggestion-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; margin-top: 1rem; }
.suggestion-search { grid-column: 1 / -1; }
.suggestion-filters :is(input, select, button) {
  min-height: 2.35rem; border: 1px solid var(--border); border-radius: .55rem; font-size: var(--type-meta);
}
.suggestion-filters button { display: grid; place-items: center; padding: .4rem .63rem; color: var(--muted); }
.suggestion-filters button:hover { background: var(--subtle); }
.suggestion-clear { display: inline-block; margin-top: .45rem; font-size: var(--type-meta); }
.overdue { color: #842d44; background: #fbe5eb; }
.agenda-warning { color: light-dark(#854313, #ffd399); }
.daily-agenda-items > .agenda-warning { background: light-dark(#fff0d6, #4a382a); border-radius: var(--radius-control); padding: .4rem .55rem; font-size: .875rem; }
.pinned-task { margin-inline-start: .3rem; }
.day-list ul { padding: 0; margin: .75rem 0 0; list-style: none; }
.day-list details { margin-top: 1rem; }
.day-list summary { cursor: pointer; font-weight: 650; }
.focus-row, .focus-actions { display: flex; align-items: center; gap: .55rem; }
.focus-actions { flex-wrap: wrap; }
.focus-row { justify-content: space-between; padding: .8rem 0; border-top: 1px solid var(--border); }
.focus-info { min-width: 0; overflow-wrap: anywhere; }
.focus-info .pill { display: inline-block; margin-top: .35rem; padding: .2rem .5rem; }
.finish-task {
  display: grid; place-items: center; width: 2.35rem; height: 2.35rem; padding: 0;
  border: 0; border-radius: 50%; background: #f1f4fc; color: var(--accent);
}
.finish-task > span { display: block; width: 1rem; height: 1rem; border: 1.5px solid currentColor; border-radius: 50%; }
.finish-task:hover { background: #e6edff; }
.finish-task.is-done > span { border: 0; border-radius: 0; width: .5rem; height: .85rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.focus-info a, .work-card > a { color: inherit; text-decoration: none; }
.focus-info strong, .work-card > a, .task-info > strong { font-size: var(--type-body); font-weight: 600; }
.task-title { display: inline-flex; align-items: center; gap: .28rem; max-width: 100%; vertical-align: middle; }
.task-title > .editable-title { color: inherit; text-decoration: none; cursor: text; min-width: 0; overflow-wrap: anywhere; }
.task-title > .editable-title:hover { color: var(--accent-ink); text-decoration: underline dotted; }
.task-title > [hidden] { display: none; }
.task-title > .inline-title-input {
  flex: 1 1 auto; width: min(100%, 22rem); min-width: 4rem; padding: .2rem .35rem;
  font-size: inherit; font-weight: inherit; border-color: var(--accent); user-select: text;
}
.task-detail-link {
  flex: 0 0 1.6rem; width: 1.6rem; height: 1.6rem; border-radius: .4rem; display: inline-grid;
  place-items: center; color: var(--muted); text-decoration: none; cursor: pointer;
}
.task-detail-link::before {
  content: ""; width: .65rem; height: .8rem; border: 1px solid currentColor; border-radius: .15rem;
  background: linear-gradient(currentColor,currentColor) center 3px / .3rem 1px no-repeat,
    linear-gradient(currentColor,currentColor) center 6px / .3rem 1px no-repeat;
}
.task-detail-link:hover, .task-detail-link:focus-visible { color: var(--accent-ink); background-color: var(--accent-soft); }
.work-card > .task-title { font-size: var(--type-body); font-weight: 600; }
.focus-info a:hover, .work-card > a:hover { color: var(--accent); text-decoration: underline; }
.focus-info { flex: 1 1 auto; }
.task-options { flex: none; }
.task-options .task-menu-toggle {
  display: grid; place-items: center; width: 1.9rem; height: 2rem; padding: 0; border: 0;
  border-radius: .55rem; background: transparent; color: var(--muted); font-size: 1.24rem; line-height: 1;
}
.task-options .task-menu-toggle:is(:hover, :focus-visible) { background: var(--accent-soft); color: var(--accent-ink); }
.task-options-menu {
  position: fixed; inset: 0 auto auto 0; width: max-content; max-width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem);
  margin: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: .75rem;
  box-shadow: 0 .45rem 1.5rem #15223e35; padding: .3rem; font-weight: 500;
}
.task-options-menu :is(a, button) {
  display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; border-radius: .45rem;
  padding: .42rem .6rem; text-align: left; font-size: .875rem; text-decoration: none;
  color: var(--text); background: transparent;
}
.task-options-menu :is(a, button):is(:hover, :focus-visible) { background: var(--accent-soft); color: var(--accent-ink); }
.task-action-icon { width: 1.05rem; height: 1.05rem; flex: none; color: var(--accent); }
.project-card-heading .task-options { margin-inline-start: auto; }
.work-card:not(.project-card) > .task-options { float: right; }
.project-day-pins h3 { margin: 1rem 0 .35rem; font-size: var(--type-label); }
.project-day-pins ul { display: grid; gap: .55rem; }
.task-clock-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .4rem; }
.task-elapsed { color: var(--accent-ink); font-size: var(--type-meta); font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-extra summary { color: var(--accent-ink); font-weight: 650; cursor: pointer; }
.task-extra-compose { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem; margin-top: .4rem; }
.task-extra-compose label { display: grid; gap: .2rem; font-size: var(--type-meta); }
.task-extra .task-label-remove { padding: .1rem .3rem; border: 0; }
.personal-comments { padding: 0; list-style: none; }
.personal-comments li { border-bottom: 1px solid var(--border); padding: .55rem 0; overflow-wrap: anywhere; }
.personal-comments p { white-space: pre-wrap; }
.task-dates { display: grid; gap: .65rem; }
body:has(.detail-overlay) { overflow: hidden; }
.detail-overlay {
  position: fixed; z-index: 10; inset: 0; display: grid; place-items: center;
  background: #1a1c3d9c; padding: clamp(.75rem, 3vw, 2rem);
}
.task-detail {
  position: relative; inset: auto; width: min(100%, 43rem); max-height: 90dvh;
  overflow: auto; overscroll-behavior: contain; margin: 0; color: #212745; background: #fff;
  border: 1px solid var(--border); border-radius: 1.15rem; padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 1.5rem 5rem #0c102c55;
}
.detail-top, .detail-meta { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.detail-context { font-size: .875rem; color: var(--accent); font-weight: 650; }
.close-detail {
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem; color: var(--accent);
  border-radius: .65rem; background: #efedfc; font-size: 1.45rem; line-height: 1; text-decoration: none;
}
.task-detail h1 { margin: .55rem 0 .7rem; overflow-wrap: anywhere; font-size: clamp(1.3rem, 2.8vw, 1.7rem); }
.detail-meta { justify-content: flex-start; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.detail-state { margin-top: .85rem; }
.detail-state button { color: var(--accent); border-color: #d9d4ff; }
.task-detail .task-fields { padding: 1rem 0 0; border-top: 1px solid var(--border); }
.task-detail .task-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.task-detail .task-fields .primary { justify-self: start; }
.task-detail textarea { resize: vertical; }
.detail-notes, .detail-checklist, .detail-sharing { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.detail-notes p { white-space: pre-wrap; }
.detail-checklist h2 span { margin-left: .3rem; color: var(--muted); font-size: .875rem; font-weight: 500; }
.detail-checklist progress { width: 100%; margin-top: .5rem; accent-color: var(--accent); }
.detail-checklist ul { list-style: none; margin: .6rem 0; padding: 0; }
.detail-checklist li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .35rem; overflow-wrap: anywhere; }
.detail-checklist li form:first-child { min-width: 0; }
.subtask-toggle { border: 0; padding-inline: .2rem; text-align: left; display: flex; gap: .45rem; align-items: center; overflow-wrap: anywhere; }
.subtask-toggle span { width: 1rem; height: 1rem; flex: 0 0 1rem; border: 1px solid var(--accent); border-radius: 50%; }
.subtask-toggle[aria-pressed="true"] { text-decoration: line-through; }
.subtask-toggle[aria-pressed="true"] span { background: var(--accent); box-shadow: inset 0 0 0 2px #fff; }
.subtask-add { display: flex; gap: .55rem; margin-top: .7rem; }
.detail-sharing summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.board-grid, .week-grid { display: grid; gap: .75rem; align-items: stretch; margin: .85rem 0 1.2rem; }
.board-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.week-grid { grid-template-columns: repeat(7, minmax(10.5rem, 1fr)); overflow-x: auto; padding: .2rem .1rem .6rem; }
.board-column, .week-column {
  min-width: 0; min-height: 7rem; padding: .7rem; background: #eceef7;
  border: 1px solid var(--border); border-radius: .85rem;
}
.board-column h2, .week-column h2 { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; padding: .25rem .1rem; font-size: 1rem; }
.board-column h2 small, .week-current h2 small { margin: 0; border-radius: .5rem; padding: .1rem .38rem; background: white; }
.week-current { border-color: #8e84dc; background: #eae7ff; }
.week-column h2 span { text-transform: capitalize; }
.state-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #47769a; }
.state-dot.doing { background: #a26717; }
.state-dot.done { background: #25826b; }
.board-column ul, .week-column ul { list-style: none; display: grid; gap: .55rem; margin: .55rem 0 0; padding: 0; }
.work-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: .65rem; min-width: 0; overflow-wrap: anywhere; }
.work-card > a { line-height: 1.4; }
.work-card .pill { display: inline-block; margin-top: .4rem; padding: .2rem .5rem; }
.work-card details { margin-top: .55rem; font-size: .875rem; }
.work-card summary { cursor: pointer; color: var(--accent); }
.card-actions { display: flex; gap: .3rem; margin-top: .45rem; flex-wrap: wrap; }
.card-actions input { min-width: 0; }
.card-actions button { padding: .35rem .55rem; }
.drag-hint { display: none; }
.drag-grip {
  display: none; width: 2rem; height: 2.5rem; flex: 0 0 2rem; position: relative; border-radius: .45rem;
  color: #7164a8; background: #f3f0fb; cursor: grab; touch-action: none; user-select: none;
}
.has-interactions .drag-grip { display: inline-grid; place-items: center; }
.drag-grip::before {
  content: ""; width: .625rem; height: .9rem;
  background: radial-gradient(circle, currentColor 35%, transparent 40%) 0 0 / 5px 5px;
}
.work-card:has(.drag-grip) { position: relative; padding-top: 1rem; }
.work-card .drag-grip { float: right; margin: -.35rem -.25rem .25rem .3rem; }
.bar { min-width: 0; }
.bar .drag-grip { width: 1.5rem; height: 1.7rem; float: right; margin: -.12rem -.15rem .15rem .15rem; background: #ffffff87; }
.gantt-panel table { min-width: 880px; }
.gantt-panel th, .gantt-panel td { padding-block: .55rem; }
.gantt-panel tbody th > a { color: inherit; text-decoration: none; }
.gantt-panel tbody th > a:hover { color: var(--accent); text-decoration: underline; }
.gantt-status { display: inline-block; color: var(--muted); font-size: .875rem; font-weight: 500; margin-top: .25rem; }
.gantt-status.doing, .gantt-status.done { border-radius: .4rem; padding-inline: .4rem; }
.gantt-composer > summary {
  width: fit-content; border-radius: .6rem; padding: .55rem .75rem; cursor: pointer;
  background: white; color: var(--accent); border: 1px solid var(--border); font-weight: 650;
}
.gantt-composer .editor { position: static; margin-top: .5rem; max-width: 32rem; }
.dragging { opacity: .42; }
.drag-origin-hidden { display: none !important; }
.drop-placeholder {
  display: block; border: 1px dashed var(--accent); border-radius: .75rem;
  background: var(--accent-soft); opacity: .72;
}
.drag-active, .drag-active * { cursor: grabbing !important; }
.has-interactions [data-drag-task] { cursor: grab; user-select: none; -webkit-touch-callout: none; }
.has-interactions [data-drag-task] :is(button, summary, input, select, label) { cursor: pointer; }
.has-interactions [data-drag-task] :is(input, textarea) { user-select: text; }
.has-interactions .day-plan { min-width: 0; }
.day-plan > ul, .day-plan details > ul { display: grid; gap: .65rem; }
.day-plan .focus-row {
  border: 1px solid var(--border); border-radius: var(--radius-card); padding: .65rem .7rem;
  box-shadow: var(--elevation-low);
}
.agenda ul { display: grid; gap: .65rem; }
.agenda li { border: 1px solid var(--border); border-radius: var(--radius-card); padding: .7rem .75rem; }
.board-column ul, .week-column ul { gap: .65rem; }
.drag-preview {
  position: fixed; left: 0; top: 0; z-index: 12; pointer-events: none; max-width: 100vw;
  overflow: hidden; border: 1px solid var(--border); border-radius: .75rem;
  box-shadow: 0 .65rem 1.85rem #28285540; will-change: transform;
}
.drag-preview ul { list-style: none; margin: 0; padding: 0; }
.drag-preview .focus-row { border: 0; padding: .65rem .7rem; }
.drag-notice {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 15;
  width: max-content; max-width: 90vw; border: 1px solid var(--border); border-radius: .7rem;
  padding: .65rem .9rem; background: var(--surface); color: var(--text); box-shadow: 0 .45rem 1.4rem #28285525;
}
.drag-notice:empty { display: none; }
.drop-target { outline: 2px dashed var(--accent); outline-offset: -3px; background: #e5e2ff !important; }
.drop-before { box-shadow: inset 0 3px var(--accent); }
.drop-after { box-shadow: inset 0 -3px var(--accent); }
.drag-active .day-plan { min-height: 8rem; }
.has-interactions .drag-hint { display: block; margin-bottom: .55rem; }

.nav-icon.palette { border: 1px solid currentColor; border-radius: 50% 50% 45% 40%; background: radial-gradient(circle,currentColor 1px,transparent 1.4px) 1px -1px / 6px 6px; }
.suggestion-group { margin-top: 1.25rem; }
.suggestion-group-title { display: flex; gap: .5rem; align-items: center; min-height: 1.8rem; }
.suggestion-group-title h3 { display: flex; align-items: center; gap: .4rem; font-size: var(--type-meta); margin: 0; font-weight: 650; }
.suggestion-group-title h3::before { content: ''; width: .38rem; height: .38rem; border-radius: 50%; background: var(--muted); }
.suggestion-group[data-period="today"] h3::before { background: var(--accent); }
.suggestion-group[data-period="overdue"] h3::before { background: light-dark(#a94059, #ffa8bd); }
.suggestion-group-title > span { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.suggestion-group-title form { margin-left: auto; }
.suggestion-group-title button { padding: .28rem .35rem; border-color: transparent; background: transparent; color: var(--accent-ink); font-size: .75rem; font-weight: 600; }
.suggestion-group-title button:hover { background: var(--accent-soft); }
.suggestion-group > ul { display: grid; gap: .45rem; margin-top: .35rem; }
.suggestion-card.focus-row {
  flex-wrap: nowrap; justify-content: flex-start; gap: .45rem; min-height: 4rem;
  padding: .45rem .55rem; border: 1px solid var(--border); border-radius: var(--radius-card);
}
.suggestion-rail .suggestion-card:is(:hover, :focus-within) { border-color: color-mix(in srgb, var(--border) 62%, var(--accent)); }
.suggestion-card .focus-info { display: grid; gap: .1rem; }
.suggestion-card .focus-info strong { font-size: var(--type-label); line-height: 1.35; }
.suggestion-source, .suggestion-date { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.suggestion-card .drag-grip { width: .85rem; flex-basis: .85rem; margin: 0; background: transparent; color: var(--muted); }
.suggestion-card .suggestion-add {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0;
  border: 1px solid transparent; border-radius: .55rem; background: transparent; color: var(--accent-ink); font-size: 1.2rem;
}
.suggestion-card .suggestion-add:is(:hover, :focus-visible) { background: var(--accent-soft); border-color: var(--border); }
.suggestion-empty { margin-top: 1rem; padding: .85rem; border: 1px dashed var(--border); border-radius: .7rem; font-size: var(--type-label); }
.suggestion-empty p { margin: .2rem 0 0; color: var(--muted); font-size: var(--type-meta); }

.appearance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.appearance-controls form { display: grid; gap: 1rem; }
.appearance-controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.appearance-controls legend { font-weight: 700; margin-bottom: .65rem; }
.theme-options, .accent-options { display: flex; flex-wrap: wrap; gap: .4rem; }
.theme-options label, .accent-options label {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; padding: .35rem .5rem;
  border: 1px solid var(--border); border-radius: .6rem; font-size: .875rem;
}
.theme-options label:has(:checked), .accent-options label:has(:checked) { background: var(--accent-soft); color: var(--accent-ink); }
.appearance-controls input { width: auto; margin: 0; accent-color: var(--accent-button); }
.theme-swatch, .accent-swatch { width: .95rem; height: .95rem; border: 1px solid var(--border); border-radius: 50%; }
.theme-swatch.light { background: #f9faff; }
.theme-swatch.dark { background: #202a3b; }
.theme-swatch.system { background: linear-gradient(135deg,#f9faff 50%,#202a3b 50%); }
.accent-swatch.indigo { background: #405bac; } .accent-swatch.ocean { background: #1a6594; }
.accent-swatch.jade { background: #23705c; } .accent-swatch.plum { background: #774291; }
.accent-swatch.ember { background: #924a1c; }
.appearance-controls .primary { justify-self: start; }
.appearance-stage { display: grid; position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-card); margin-top: .75rem; padding: .8rem; gap: .7rem; }
.appearance-preview { display: grid; gap: .25rem; width: fit-content; padding: .65rem; border-radius: .6rem; background: var(--surface); }
.appearance-preview span { color: var(--muted); font-size: .8rem; }
.background-in-settings > summary { display: none; }
.background-in-settings .background-options { position: static; width: 100%; max-height: none; }
.settings-feedback { margin-bottom: .75rem; color: var(--accent-ink); }

:root, body { color: var(--text); background: var(--canvas); }
button, nav a, input, select, textarea { background: var(--surface); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.primary { color: white; background: var(--accent-button); border-color: var(--accent-button); }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.sidebar, .daily-frame .sidebar, .suggestion-rail { background: color-mix(in srgb, var(--rail) 96%, transparent); }
.panel, .task-detail, .daily-main .panel, .focus-row, .suggestion-rail .focus-row, .work-card, .background-options,
.background-picker > summary, .daily-composer > summary, .gantt-composer > summary, .profile-menu form,
.task-options-menu, .quick-capture, .drag-preview { background: var(--surface); color: var(--text); border-color: var(--border); }
:root[data-theme="dark"] .day-art { opacity: .14; }
:root[data-theme="dark"] .custom-app-background { opacity: .18; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .day-art { opacity: .14; }
  :root[data-theme="system"] .custom-app-background { opacity: .18; }
}
.board-column, .week-column, thead th, td.slot { background: var(--subtle); }
.week-current, thead th.today { background: var(--accent-soft); color: var(--accent-ink); }
tbody th, .board-column h2 small, .week-current h2 small { background: var(--surface); color: var(--text); }
.bar, .pill, .gantt-status.planned { background: light-dark(#e7effa,#304463); color: light-dark(#234670,#c6dcfb); }
.bar.doing, .pill.doing, .gantt-status.doing { background: light-dark(#ffefcc,#554329); color: light-dark(#684900,#ffe0a2); }
.bar.done, .pill.done, .gantt-status.done { background: light-dark(#daf3e9,#254a42); color: light-dark(#22594c,#b6e9d8); }
.pill.overdue { background: light-dark(#fbe5eb,#553143); color: light-dark(#842d44,#ffc0d1); }
.pill.pinned-task { background: var(--accent-soft); color: var(--accent-ink); }
.finish-task, .task-options > summary, .drag-grip, .close-detail { background: var(--accent-soft); color: var(--accent-ink); }
.drag-active .drop-target { background: var(--accent-soft) !important; }
.task-options-menu button:hover, .main-nav a:hover, .finish-task:hover { background: var(--accent-soft); }
.filters [aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--border); }
.project-nav { margin-top: -.55rem; }
.project-nav summary { padding-bottom: .4rem; color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.project-nav nav a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .4rem; align-items: center; font-size: var(--type-label); }
.project-nav nav a span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-nav nav a:hover { background: var(--subtle); }
.project-shell { max-width: none; }
.project-overline { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: var(--type-meta); }
.project-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin: .45rem 0 .9rem; }
.project-header h1 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.85rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.project-identity { display: flex; align-items: center; min-width: 0; gap: .55rem; }
.project-identity > span { display: grid; place-items: center; flex: none; width: 2.45rem; height: 2.45rem; background: var(--accent-soft); border-radius: .7rem; font-size: 1.22rem; }
.project-star { padding: .22rem .52rem; font-size: 1.12rem; line-height: 1.4; color: var(--accent-ink); }
.project-members { position: relative; }
.project-members summary { cursor: pointer; border: 1px solid var(--border); border-radius: .55rem; padding: .35rem .6rem; background: var(--surface); }
.project-members-panel { position: absolute; z-index: 5; inset: 100% 0 auto auto; width: min(19rem, 83vw); margin-top: .3rem; padding: .7rem; max-height: 65dvh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; box-shadow: 0 .6rem 1.5rem #0002; }
.project-members-panel h2 { font-size: 1rem; }
.project-members-panel label { display: grid; gap: .2rem; margin-block: .5rem; font-size: var(--type-meta); }
.project-member { display: flex; justify-content: space-between; align-items: center; gap: .45rem; padding: .38rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; font-size: var(--type-meta); }
.project-member small { display: block; color: var(--muted); }
.project-member button { padding: .25rem .4rem; }
.project-toolbar, .project-toolbar nav, .project-filters { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.project-toolbar { justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: .55rem; }
.project-toolbar nav a, .project-toolbar button { padding: .37rem .65rem; font-size: var(--type-label); }
.project-toolbar nav [aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.project-filters { margin: .7rem 0 1rem; }
.project-filters :is(input, select) { width: auto; max-width: 100%; border-color: var(--border); }
.project-filters input { flex: 1 0 13rem; max-width: 23rem; }
.project-filters :is(select, button, a) { font-size: var(--type-meta); }
.project-setup, .project-directory { display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .7rem; }
.project-setup { margin-bottom: 1rem; }
.project-setup h2, .project-access h2, .project-archive h2 { margin: 0; font-size: 1.1rem; }
.project-directory a { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.project-directory a:hover { border-color: var(--accent); }
.project-directory a small { color: var(--muted); }
.project-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(15rem, 27vw, 19rem); align-items: start; gap: .85rem; overflow-x: auto; padding: .15rem .15rem .7rem; }
.project-lane, .project-add-lane { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-surface); background: color-mix(in srgb, var(--subtle) 93%, transparent); }
.project-lane { display: grid; grid-template-rows: auto minmax(9rem, 1fr) auto; height: clamp(22rem, calc(100dvh - 15rem), 54rem); }
.project-lane > header { display: flex; align-items: center; gap: .4rem; min-height: 2.65rem; padding: .48rem .65rem; }
.project-lane > header h2 { margin: 0; font-size: .91rem; overflow-wrap: anywhere; }
.project-lane > header > span { padding: .06rem .35rem; color: var(--muted); border: 1px solid var(--border); border-radius: .8rem; font-size: .73rem; }
.project-lane > header details { position: relative; margin-left: auto; }
.project-lane > header summary { cursor: pointer; padding: .12rem .42rem; border-radius: .4rem; list-style: none; }
.project-lane > header summary:hover { background: var(--accent-soft); }
.project-lane > header summary::-webkit-details-marker { display: none; }
.project-lane > header form { position: absolute; z-index: 3; inset: 100% 0 auto auto; width: 12rem; padding: .55rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); }
.project-lane > header form button { margin-top: .35rem; padding: .28rem .5rem; }
.project-lane > ul { display: grid; align-content: start; gap: .5rem; padding: .2rem .6rem .5rem; margin: 0; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.project-lane-empty { padding: .5rem .1rem; color: var(--muted); font-size: var(--type-meta); }
.project-lane footer { padding: .55rem .6rem; border-top: 1px solid var(--border); }
.project-lane footer form, .project-add-lane form { display: flex; gap: .35rem; }
.project-lane footer button { color: var(--accent-ink); padding: .3rem .65rem; }
.project-lane footer :is(input, button), .project-add-lane :is(input, button) { border-color: var(--border); }
.project-add-lane { padding: .55rem .65rem; }
.project-add-lane summary { cursor: pointer; color: var(--accent-ink); font-size: var(--type-label); font-weight: 650; }
.project-add-lane form { margin-top: .45rem; }
.project-card.work-card { display: grid; gap: .35rem; padding: .52rem .55rem; box-shadow: var(--elevation-low); }
.project-card:hover { border-color: color-mix(in srgb, var(--border) 50%, var(--accent)); }
.project-card-heading, .project-card-meta, .project-tags, .project-detail-actions, .project-detail-actions form { display: flex; gap: .38rem; align-items: center; min-width: 0; }
.project-card-heading { font-weight: 600; }
.project-card-heading .finish-task { width: 1.55rem; height: 1.55rem; }
.project-card-heading > a, .project-card-done .project-card-heading .editable-title { color: var(--muted); }
.project-card-meta { flex-wrap: wrap; color: var(--muted); font-size: var(--type-meta); }
.project-card-meta time { font-variant-numeric: tabular-nums; }
.project-overdue { color: light-dark(#a23048, #ff95ab); font-weight: 650; }
.project-tags { flex-wrap: wrap; }
.project-label { display: inline-block; max-width: 100%; padding: .14rem .45rem; border-radius: .4rem; font-size: .75rem; font-weight: 650; overflow-wrap: anywhere; background: light-dark(#ebeefe, #353d69); color: light-dark(#374881, #d8e0ff); }
.project-label[data-color="blue"] { background: light-dark(#e3f2fd, #24455c); color: light-dark(#18577e, #c0e6ff); }
.project-label[data-color="green"] { background: light-dark(#e2f6ed, #244b3c); color: light-dark(#1b5b44, #baf1d9); }
.project-label[data-color="amber"] { background: light-dark(#fff0d4, #56402a); color: light-dark(#764b12, #ffdf9f); }
.project-label[data-color="rose"] { background: light-dark(#fce7ee, #5a3042); color: light-dark(#90314e, #ffd0df); }
.project-label[data-color="slate"] { background: light-dark(#edf0f5, #3b4758); color: light-dark(#46556b, #dbe5f3); }
.project-avatar { margin-left: auto; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; color: var(--accent-ink); background: var(--accent-soft); font-size: .65rem; font-weight: 700; }
.project-archive > div { display: flex; justify-content: space-between; align-items: center; gap: .45rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.project-gantt table { min-width: 67rem; table-layout: fixed; }
.project-gantt :is(thead th:first-child, tbody th) { width: 13rem; position: sticky; left: 0; z-index: 1; text-align: left; overflow-wrap: anywhere; }
.project-gantt thead th { text-align: center; }
.project-gantt .project-bar { padding: .28rem .35rem; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-unscheduled h3 { margin-bottom: .3rem; font-size: .95rem; }
.project-unscheduled ul { margin-top: 0; }
.project-detail { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(100%, 65rem); height: min(90dvh, 50rem); padding: 0; overflow: hidden; }
.project-detail-top { padding: .62rem 1rem; border-bottom: 1px solid var(--border); }
.project-detail-top .detail-context { overflow-wrap: anywhere; min-width: 0; flex: 1; }
.project-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 32%); min-height: 0; }
.project-task-main { padding: .75rem 1.25rem 1.2rem; overflow: auto; }
.project-detail-actions { margin: .7rem 0; flex-wrap: wrap; }
.project-detail-actions label { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: var(--type-meta); }
.project-detail-actions form select { width: auto; max-width: 13rem; }
.project-task-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; }
.project-task-fields :is(input, select, textarea) { font-weight: 500; }
.project-task-fields :is(.task-dates, small, label:has(textarea)) { grid-column: 1 / -1; }
.project-task-fields small, .project-empty-copy { color: var(--muted); font-size: var(--type-meta); }
.project-task-fields .primary { justify-self: start; }
.project-task-section { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.project-task-section h2, .project-chat h2 { margin: 0 0 .38rem; font-size: .97rem; }
.project-task-section h2 small { display: inline-block; margin: 0 .25rem; color: var(--muted); font-size: .75rem; font-weight: 500; }
.project-task-section p { margin: .25rem 0 .45rem; }
.project-label-control { margin-top: .45rem; }
.project-upload { position: relative; margin-inline-start: auto; }
.project-label-control summary, .project-upload summary { cursor: pointer; color: var(--accent-ink); font-size: var(--type-meta); font-weight: 650; }
.project-label-list { display: grid; gap: .35rem; }
.project-label-row, .project-label-new, .project-label-row details form, .project-upload form { display: flex; gap: .42rem; flex-wrap: wrap; align-items: center; }
.project-label-row { padding: .3rem 0; }
.project-label-row details[open] { flex-basis: 100%; }
.project-label-row details form, .project-label-new, .project-upload form { padding: .5rem; margin-top: .4rem; background: var(--subtle); border: 1px solid var(--border); border-radius: .55rem; align-items: end; }
.project-task-section label, .project-upload label, .project-chat-compose label { display: grid; gap: .22rem; font-size: var(--type-meta); color: var(--muted); }
.project-task-section :is(input, select, button) { padding: .35rem .52rem; border-color: var(--border); }
.project-files ul, .project-feed ol { list-style: none; margin: 0; padding: 0; }
.project-files li { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin-bottom: .35rem; overflow-wrap: anywhere; }
.project-files li small, .project-upload form small { color: var(--muted); }
.project-upload form { position: absolute; z-index: 3; inset: 100% 0 auto auto; width: min(17rem, 72vw); background: var(--surface); box-shadow: 0 .4rem 1.1rem #0002; }
.project-upload form label { width: 100%; min-width: 0; }
.project-upload form small { font-size: var(--type-meta); }
.project-upload form button { padding: .35rem .55rem; margin-inline-start: auto; }
.project-upload summary { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .55rem; list-style: none; border: 1px solid var(--border); border-radius: .48rem; background: var(--accent-soft); }
.project-upload summary::-webkit-details-marker { display: none; }
.project-upload summary span { font-size: 1.17rem; line-height: 1; }
.project-read-dates { display: flex; flex-wrap: wrap; gap: .65rem; }
.project-read-dates dd { margin: 0; }
.project-read-dates dt { color: var(--muted); font-size: var(--type-meta); }
.project-detail .detail-checklist > form { margin-top: .55rem; }
.project-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; border-inline-start: 1px solid var(--border); background: var(--rail); }
.project-chat > header { padding: .85rem .85rem .6rem; border-bottom: 1px solid var(--border); }
.project-chat h2 { margin: 0; }
.project-chat nav { display: flex; gap: .55rem; margin-top: .35rem; font-size: var(--type-meta); }
.project-feed { overflow: auto; overscroll-behavior: contain; padding: .7rem .85rem; }
.project-feed ol { display: grid; gap: .58rem; }
.project-activity-entry { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .42rem; align-items: start; font-size: var(--type-meta); overflow-wrap: anywhere; }
.project-activity-entry.comment { background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; padding: .48rem; }
.project-activity-entry.event { color: var(--muted); padding: .15rem .4rem; }
.project-activity-author { display: grid; gap: .05rem; }
.project-activity-author time { color: var(--muted); font-size: .72rem; }
.project-activity-entry p { white-space: pre-wrap; margin: .2rem 0 0; overflow-wrap: anywhere; }
.project-chat-compose { display: grid; gap: .42rem; padding: .7rem .85rem; border-top: 1px solid var(--border); }
.project-chat-compose textarea { border-color: var(--border); }
.project-chat-compose button { justify-self: end; padding: .35rem .65rem; }
.project-chat-compose [data-chat-status] { color: light-dark(#90314e, #ffd0df); margin: 0; font-size: var(--type-meta); }
.project-chat-compose [data-chat-status]:empty { display: none; }
@media (max-width: 1060px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .editor { position: static; scroll-margin-top: 1rem; }
}
@media (max-width: 1000px) {
  .appearance-grid { grid-template-columns: minmax(0, 1fr); }
  .daily-layout { grid-template-columns: minmax(0, 1fr); }
  .daily-main { min-height: min(75dvh, 48rem); }
  .suggestion-rail { position: static; height: auto; border-left: 0; border-top: 1px solid var(--border); }
  .suggestion-group > ul { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
}
@media (max-width: 740px) {
  .app-frame { display: block; }
  .sidebar { height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: .65rem; padding: .75rem; }
  .project-nav { margin-top: 0; }
  .project-kanban { grid-auto-columns: min(16rem, 80vw); }
  .project-members-panel { inset-inline: 0 auto; }
  .project-detail { display: block; height: auto; overflow: auto; }
  .project-detail-layout { display: block; }
  .project-task-main { padding: .7rem .85rem 1rem; overflow: visible; }
  .project-task-fields { grid-template-columns: minmax(0, 1fr); }
  .project-chat { border-inline-start: 0; border-top: 1px solid var(--border); }
  .project-feed { min-height: 8rem; max-height: 48dvh; }
  .profile-menu { grid-column: 2; grid-row: 1; border: 0; padding: 0; margin: 0; position: relative; }
  .profile-menu form { position: absolute; right: 0; top: 100%; z-index: 4; white-space: nowrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-control); }
  .account-address { display: none; }
  .brand-link { padding: 0; }
  .main-nav { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar-lists { grid-column: 1 / -1; }
  .sidebar-lists nav { display: flex; flex-wrap: wrap; }
  .main-nav a { justify-content: center; padding: .55rem .25rem; text-align: center; }
  .nav-icon { display: none; }
}
@media (max-width: 620px) {
  .quick-capture input, .fields input, .fields select, .fields textarea, .suggestion-filters input { font-size: 1rem; }
  .background-picker summary > span:last-child { display: none; }
  .board-grid { grid-template-columns: minmax(0, 1fr); }
  .task-detail .task-dates { grid-template-columns: minmax(0, 1fr); }
  .focus-row { align-items: center; flex-wrap: wrap; }
  .focus-row .focus-info { flex-basis: 9rem; }
  .focus-row .focus-actions { margin-left: auto; }
  .task-filters { grid-template-columns: minmax(0, 1fr) auto; }
  .task-filters label:first-of-type { grid-column: 1 / -1; }
  .time-head, .agenda li { align-items: flex-start; flex-direction: column; }
  thead th:first-child, tbody th { width: 125px; }
  .daily-agenda { grid-template-columns: 3.65rem minmax(0, 1fr); gap: .65rem; }
  .daily-agenda-items li { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
}
