:root {
  color-scheme: light;
  --page: #fbfbf8;
  --sidebar: #f2f3ed;
  --white: #fff;
  --ink: #20261e;
  --muted: #5e665a;
  --subtle: #626b5d;
  --border: #e1e5dc;
  --green: #28543b;
  --green-dark: #1d412c;
  --green-tint: #e4ecde;
  --high-bg: #faece6;
  --high-ink: #9b4028;
  --display: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font: 15px/1.5 var(--display);
  background: var(--page);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-dark); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #4a7e57; outline-offset: 3px;
}
.shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh;
  padding: 30px 19px 18px; background: var(--sidebar); border-right: 1px solid var(--border);
}
.brand {
  display: inline-flex; align-items: center; gap: 11px; width: fit-content; border: 0;
  background: transparent; padding: 0; margin: 0 0 31px 9px;
  font-size: 30px; line-height: 1; font-weight: 760; letter-spacing: -1.4px;
}
.brand-mark {
  display: inline-grid; place-items: center; width: 33px; height: 33px; background: var(--green);
  border-radius: 10px; color: white; font-size: 20px; line-height: 1; letter-spacing: 0;
}
.brand-period { color: #5a815d; }
.main-nav, .projects { display: grid; gap: 5px; }
.main-nav button, .projects button {
  display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 8px;
  padding: 9px 10px; text-align: left; background: transparent; line-height: 1.4; font-weight: 560;
}
.main-nav button > span { width: 20px; text-align: center; font-size: 19px; line-height: 1; color: var(--green); }
#notice-count { margin-left: auto; min-width: 20px; padding: 1px 5px; border-radius: 12px; background: var(--green); color: white; font-size: 11px; text-align: center; }
.main-nav button[aria-current="page"], .projects button[aria-pressed="true"] { background: var(--green-tint); color: var(--green-dark); }
.main-nav button:hover, .projects button:hover { background: #e8ede3; }
.projects-head { display: flex; align-items: center; justify-content: space-between; margin: 29px 4px 5px 10px; color: var(--muted); font-size: 13px; font-weight: 650; }
.projects { overflow: auto; padding-bottom: 4px; }
.projects button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--dot, #5e8064); margin: 0 3px; }
.tone-1 { --dot: #628479; }.tone-2 { --dot: #b68352; }.tone-0 { --dot: #8574a1; }
.projects .all-projects { color: var(--muted); }
.identity {
  margin-top: auto; padding: 14px 4px 0; border-top: 1px solid var(--border); display: flex;
  align-items: center; gap: 10px; min-height: 50px; color: var(--muted);
}
.identity strong { display: block; font-size: 14px; color: var(--ink); }
.identity small { font-size: 11px; }
.identity .icon-button { margin-left: auto; }
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 50%; background: #e3ebe1; color: #275439; font-weight: 720; font-size: 12px;
}
.avatar.natasha { background: #f1e7d8; color: #745124; }
main { min-width: 0; }
.topbar {
  height: 72px; border-bottom: 1px solid var(--border); padding: 0 35px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.breadcrumbs { color: var(--subtle); font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs strong { font-weight: 650; color: var(--ink); }
.crumb-divider { color: var(--subtle); margin: 0 8px; }
.button {
  display: inline-flex; gap: 7px; align-items: center; justify-content: center;
  min-height: 37px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--white); font-weight: 650; white-space: nowrap;
}
.button:hover, .icon-button:hover { background: #edf1e9; }
.button.primary { background: var(--green); border-color: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.primary > span { font-size: 19px; line-height: 1; font-weight: 500; }
button:disabled { opacity: .55; cursor: wait; }
.icon-button {
  border: 0; border-radius: 6px; background: transparent; color: var(--green-dark);
  width: 31px; height: 31px; font-size: 20px; line-height: 1; display: inline-grid; place-items: center;
}
.content { max-width: 1180px; padding: 43px 35px 65px; margin: auto; }
.page-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 27px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(31px, 4.6vw, 51px); line-height: 1.08; font-weight: 750; letter-spacing: -.055em; overflow-wrap: anywhere; }
.page-header p { color: var(--muted); font-size: 15px; margin-top: 10px; }
.filters {
  margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; justify-content: space-between;
}
.filters:empty { display: none; }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
select, input:not([type="checkbox"]), textarea {
  border: 1px solid #cfd6cb; border-radius: 7px; padding: 8px 10px; background: white; min-width: 0;
}
.filters select { font-size: 13px; min-height: 35px; padding: 5px 9px; max-width: 100%; }
.count { color: var(--muted); font-size: 13px; }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 244px; gap: 18px; align-items: start; }
.task-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.task-table thead { color: var(--muted); background: #f7f8f4; }
.task-table th { font-size: 12px; font-weight: 650; padding: 11px 12px; white-space: nowrap; }
.task-table td { padding: 11px 12px; border-top: 1px solid #edf0e9; vertical-align: middle; }
.task-table :is(th, td):first-child { padding-left: 16px; }
.task-table :is(th, td):last-child { padding-right: 16px; }
.task-table .group-row th { background: #f7f8f4; color: var(--ink); font-size: 13px; border-top: 1px solid var(--border); }
.task-row:hover { background: #fafbf8; }
.task-title { text-align: left; padding: 3px 0; font-weight: 680; font-size: 14px; border: 0; background: transparent; overflow-wrap: anywhere; }
.task-title:hover, .thread-item:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.task-project { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.person { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.person .avatar { width: 23px; height: 23px; font-size: 10px; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 5px; font-size: 11px; line-height: 1.35; white-space: nowrap; font-weight: 650; }
.pill.high { color: var(--high-ink); background: var(--high-bg); }
.pill.normal, .pill.new, .pill.open { color: #4f5b4c; background: #edf0ea; }
.pill.low, .pill.done, .pill.resolved { color: #2e6140; background: #e9f1e5; }
.pill.doing { color: #2f5276; background: #e8f1f8; }
.pill.review, .pill.human { color: #80541a; background: #fbf0d9; }
.deadline { color: var(--muted); white-space: nowrap; }
.deadline.overdue { color: var(--high-ink); font-weight: 650; }
.agenda-sidebar { padding: 15px; }
.agenda-sidebar h2 { font-size: 15px; letter-spacing: -.01em; margin-bottom: 7px; }
.agenda-sidebar .person-total { padding: 10px 0; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.agenda-sidebar .person-total:last-child { border-bottom: 0; padding-bottom: 1px; }
.empty { padding: 25px 18px; color: var(--muted); }
.thread-item {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 14px; text-align: left;
  padding: 15px 16px; border: 0; border-top: 1px solid var(--border); background: white;
}
.thread-item:first-child { border-top: 0; }
.thread-item:hover { background: #fafbf8; }
.thread-item small { display: block; margin-top: 4px; color: var(--muted); }
.thread-view { max-width: 840px; }
.notices { display: grid; gap: 14px; max-width: 840px; }
.notices h2 { padding: 14px 16px; font-size: 16px; }
.notices time { color: var(--muted); flex-shrink: 0; font-size: 12px; }
.thread-header, .messages, .composer, .summary { padding: 16px 20px; }
.thread-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); }
.thread-header > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.summary { white-space: pre-wrap; background: #edf3e9; border-bottom: 1px solid var(--border); }
.message { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf0e9; }
.message:last-child { border-bottom: 0; }
.message p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0; }
.message header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px; }
.message small, .message q { color: var(--muted); font-size: 12px; }
.message q { display: block; margin-top: 5px; border-left: 2px solid var(--border); padding-left: 8px; }
.message q::before, .message q::after { content: none; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--green-dark); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.composer { border-top: 1px solid var(--border); }
.composer textarea { width: 100%; }
.composer-row { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.reply-label { display: flex; align-items: start; justify-content: space-between; gap: 9px; margin-bottom: 8px; color: var(--muted); }
dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 36px); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: white; color: var(--ink); }
dialog::backdrop { background: #18271c55; backdrop-filter: blur(1px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.035em; }
.form { display: grid; gap: 12px; padding: 17px 20px 20px; }
.form label, .login label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; min-width: 0; }
.form label > :is(input, textarea, select), .login input { color: var(--ink); width: 100%; }
.form textarea { resize: vertical; }
.form .check { display: flex; gap: 7px; align-items: center; }
.check input { accent-color: var(--green); }
.form .check input { width: auto; margin-left: 0; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
.form-actions .primary { margin-left: auto; }
.form-error { color: var(--high-ink); margin: 4px 0; overflow-wrap: anywhere; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login .panel { width: min(365px, 100%); padding: 22px; display: grid; gap: 15px; }
.login .brand { margin: 0; }
.login h1 { font-size: 29px; }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 2; background: var(--green-dark); color: white; padding: 10px 14px; border-radius: 8px; }
.load-error { margin: 25px; color: var(--high-ink); }
@media (max-width: 1100px) {
  .agenda-layout { grid-template-columns: minmax(0, 1fr); }
  .agenda-sidebar { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: center; }
  .agenda-sidebar h2, .agenda-sidebar .person-total { margin: 0; padding: 0; border: 0; }
  .agenda-sidebar .person-total:last-child { padding: 0; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 180px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .task-table :is(th, td) { padding-left: 7px; padding-right: 7px; }
  .task-table :is(th, td):first-child { padding-left: 10px; }
  .task-table :is(th, td):last-child { padding-right: 10px; }
}
@media (max-width: 650px) {
  .shell { display: block; }
  .sidebar { height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 13px 8px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
  .brand { margin: 0; font-size: 25px; }
  .main-nav { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 3px; }
  .main-nav button { width: auto; padding: 7px 8px; font-size: 12px; gap: 4px; }
  .main-nav button > span { font-size: 14px; width: 14px; }
  .projects-head { grid-column: 1; grid-row: 3; margin: 0; justify-content: start; gap: 4px; }
  .projects { grid-column: 1/-1; display: flex; overflow-x: auto; margin-top: -7px; }
  .projects button { width: auto; padding: 6px 8px; font-size: 11px; white-space: nowrap; }
  .identity { grid-row: 1; grid-column: 2; border: 0; padding: 0; min-height: 0; gap: 5px; }
  .identity small { display: none; }
  .identity .avatar { display: none; }
  .topbar { height: 53px; }
  .content { padding-top: 25px; }
  .page-header { margin-bottom: 17px; }
  .page-header p { margin-top: 6px; font-size: 13px; }
  .task-table .col-priority, .task-table .col-deadline { display: none; }
  .task-title .mobile-meta { display: block; color: var(--muted); font-size: 10px; font-weight: 500; margin-top: 3px; }
  .person > span:not(.avatar) { display: none; }
  .person .avatar { width: 22px; height: 22px; }
  .agenda-sidebar .person > span:not(.avatar) { display: inline; }
  .agenda-sidebar { grid-template-columns: 1fr 1fr; }
  .agenda-sidebar h2 { grid-column: 1/-1; }
  .thread-header, .messages, .composer, .summary { padding-left: 12px; padding-right: 12px; }
}
@media (min-width: 651px) { .mobile-meta { display: none; } }
