:root {
  font-family:Arial,Helvetica,sans-serif;
  color:#233c35;
  background:#f5f4ed;
  font-synthesis:none;
  --green:#254b41;
  --muted:#6c7a72;
  --line:#dfe3d9;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
.shell {
  max-width:1500px;
  margin:auto;
  padding:0 48px;
}
button,input,select {
  font:inherit;
}
button,a,input,select {
  -webkit-tap-highlight-color:transparent;
}
button,a {
  touch-action:manipulation;
}
button {
  cursor:pointer;
}
button:disabled {
  cursor:wait;
  opacity:.6;
}
a {
  color:inherit;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #b38b35;
  outline-offset:3px;
}
.masthead {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:28px 0;
  border-bottom:1px solid var(--line);
}
.brand {
  display:flex;
  gap:12px;
  align-items:center;
}
.brand-mark {
  display:grid;
  place-items:center;
  background:var(--green);
  color:#fff;
  width:46px;
  height:46px;
  border-radius:14px;
  font-size:26px;
  font-family:Georgia,serif;
}
.brand strong {
  display:block;
  font-size:23px;
  letter-spacing:-1px;
}
.brand div>span {
  display:block;
  font-size:9px;
  letter-spacing:2px;
  margin-top:5px;
  color:var(--muted);
}
.board-link {
  font-size:13px;
  text-decoration:none;
}
.intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:44px 0 28px;
}
.eyebrow {
  font-size:10px;
  font-weight:700;
  letter-spacing:2px;
  color:var(--muted);
}
h1 {
  font-family:Georgia,serif;
  font-weight:400;
  font-size:44px;
  letter-spacing:-1.5px;
  margin:12px 0;
}
.intro p:last-child {
  color:var(--muted);
  font-size:14px;
}
.primary {
  background:var(--green);
  color:white;
  border:0;
  border-radius:8px;
  padding:14px 20px;
  text-decoration:none;
  display:inline-block;
  font-size:13px;
  white-space:nowrap;
}
.notice {
  font-size:13px;
  padding:12px 16px;
  background:#eaf0e6;
  border:1px solid #d8e3d3;
  border-radius:8px;
  line-height:1.6;
}
.notice.error {
  background:#fff1e8;
  border-color:#e8cabb;
  color:#8a4728;
}
.stats {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  margin:24px 0;
  gap:14px;
}
.stats>div {
  background:#fffdf7;
  border:1px solid var(--line);
  border-radius:10px;
  padding:20px 24px;
}
.stats span {
  font-size:12px;
  color:var(--muted);
}
.stats strong {
  display:block;
  font-size:30px;
  font-weight:500;
  margin-top:10px;
  font-variant-numeric:tabular-nums;
}
.workspace {
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
}
.toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:22px 24px;
}
.month-nav {
  display:flex;
  align-items:center;
  gap:12px;
}
.month-nav h2 {
  min-width:180px;
  text-align:center;
  font-size:21px;
  font-weight:500;
  margin:0;
  text-transform:capitalize;
}
.month-nav button {
  border:1px solid var(--line);
  border-radius:6px;
  background:white;
  padding:5px 12px;
  font-size:22px;
}
.month-nav .today-button {
  font-size:12px;
  padding:9px 12px;
}
.view-toggle {
  background:#f3f4ef;
  border-radius:7px;
  padding:4px;
  display:flex;
}
.view-toggle button {
  border:0;
  border-radius:5px;
  padding:9px 14px;
  background:transparent;
  color:var(--muted);
  font-size:12px;
}
.view-toggle button[aria-pressed=true] {
  background:white;
  color:var(--green);
  box-shadow:0 1px 3px #0001;
}
.filters {
  display:flex;
  align-items:end;
  gap:14px;
  padding:0 24px 22px;
  flex-wrap:wrap;
}
.filters label {
  display:flex;
  flex-direction:column;
  gap:7px;
  font-size:11px;
  color:var(--muted);
}
.filters .search {
  flex:1;
  min-width:160px;
}
input[type=search],select {
  border:1px solid var(--line);
  background:white;
  border-radius:6px;
  padding:10px 12px;
  color:#233c35;
  min-height:38px;
  font-size:12px;
}
.filters .checkbox {
  flex-direction:row;
  align-items:center;
  align-self:center;
  margin-top:18px;
  font-size:12px;
  cursor:pointer;
}
input[type=checkbox] {
  accent-color:var(--green);
}
.calendar {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  border-top:1px solid var(--line);
}
.weekday {
  text-align:center;
  font-size:11px;
  color:var(--muted);
  padding:14px;
  background:#fafbf7;
}
.day {
  min-height:124px;
  max-height:270px;
  overflow:auto;
  border-top:1px solid var(--line);
  border-right:1px solid var(--line);
  padding:8px;
}
.day:nth-child(7n) {
  border-right:0;
}
.day.other-month {
  background:#fafbf7;
}
.other-month .day-number {
  color:#9ba69f;
}
.day-number {
  display:grid;
  place-items:center;
  font-size:12px;
  width:27px;
  height:27px;
  margin-bottom:6px;
}
.is-today .day-number {
  background:var(--green);
  color:white;
  border-radius:50%;
}
.task {
  display:flex;
  flex-direction:column;
  gap:5px;
  align-items:flex-start;
  width:100%;
  text-align:left;
  background:#eaf0e6;
  border:0;
  border-left:3px solid #74926a;
  border-radius:5px;
  color:#2e4d3e;
  padding:9px;
  margin:5px 0;
  font-size:11px;
  line-height:1.4;
}
.task:hover {
  background:#dce8d5;
}
.task-name {
  overflow-wrap:anywhere;
}
.task-status {
  font-size:9px;
  opacity:.75;
}
.task.completed {
  background:#f1f1ee;
  border-left-color:#a6aaa2;
  color:#71766f;
}
.task.completed .task-name {
  text-decoration:line-through;
}
.calendar-foot {
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding:14px 24px;
  border-top:1px solid var(--line);
  font-size:10px;
  color:var(--muted);
}
.agenda {
  padding:0 24px 24px;
  max-height:750px;
  overflow:auto;
}
.agenda-day {
  display:grid;
  grid-template-columns:180px 1fr;
  gap:8px 20px;
  padding:16px 0;
  border-top:1px solid var(--line);
}
.agenda-day h3 {
  grid-row:1/span 100;
  font-size:13px;
  font-weight:500;
  text-transform:capitalize;
  line-height:1.6;
}
.agenda-day .task {
  font-size:13px;
  margin:0;
}
.undated-section {
  margin:32px 0;
}
.undated-section h2 {
  font-size:18px;
  font-weight:500;
}
.pill {
  display:inline-block;
  font-size:11px;
  padding:3px 8px;
  background:#e4e9df;
  border-radius:14px;
  margin-left:5px;
}
.undated-section>p {
  font-size:12px;
  color:var(--muted);
}
.undated {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:12px;
}
.undated .task {
  padding:14px;
  font-size:13px;
  margin:0;
}
.empty {
  font-size:13px;
  color:var(--muted);
  padding:16px 0;
  grid-column:1/-1;
}
footer {
  display:flex;
  justify-content:space-between;
  gap:20px;
  border-top:1px solid var(--line);
  padding:24px 0 30px;
  color:var(--muted);
  font-size:10px;
}
dialog {
  border:1px solid var(--line);
  border-radius:16px;
  padding:28px;
  max-width:520px;
  width:calc(100% - 32px);
  color:#233c35;
}
dialog::backdrop {
  background:#122c2580;
}
dialog h2 {
  font-family:Georgia,serif;
  font-size:28px;
  font-weight:400;
  overflow-wrap:anywhere;
}
.dialog-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.dialog-top button {
  background:transparent;
  border:0;
  font-size:26px;
  color:var(--muted);
}
dl {
  display:grid;
  grid-template-columns:120px 1fr;
  gap:16px;
  font-size:13px;
  margin:28px 0;
}
dt {
  color:var(--muted);
}
dd {
  margin:0;
  overflow-wrap:anywhere;
}
[hidden] {
  display:none!important;
}
@media(max-width:900px) {
  .shell {
    padding:0 22px;
  }
  .intro {
    align-items:flex-start;
  }
  h1 {
    font-size:35px;
  }
  .toolbar {
    flex-wrap:wrap;
  }
  .filters {
    gap:12px;
  }
  .day {
    padding:5px;
  }
  .task {
    padding:6px;
    font-size:10px;
  }
  .stats>div {
    padding:16px;
  }
  .month-nav h2 {
    min-width:150px;
    font-size:18px;
  }
}
@media(max-width:600px) {
  .shell {
    padding:0 12px;
  }
  .masthead {
    padding:20px 0;
  }
  .board-link {
    font-size:11px;
    max-width:120px;
    text-align:right;
  }
  .intro {
    flex-direction:column;
    padding-top:28px;
    gap:10px;
  }
  h1 {
    font-size:34px;
  }
  .intro p:last-child {
    line-height:1.7;
  }
  .stats {
    grid-template-columns:repeat(2,1fr);
    gap:8px;
  }
  .stats strong {
    font-size:26px;
  }
  .toolbar {
    padding:18px 12px;
    gap:16px;
  }
  .month-nav {
    gap:6px;
  }
  .month-nav h2 {
    min-width:130px;
    font-size:16px;
  }
  .filters {
    padding:0 12px 18px;
  }
  .filters .search {
    flex-basis:100%;
  }
  .filters label:not(.search):not(.checkbox) {
    flex:1;
    min-width:110px;
  }
  select {
    width:100%;
  }
  .filters .checkbox {
    margin:0;
  }
  .calendar {
    grid-template-columns:repeat(7,minmax(0,1fr));
  }
  .day {
    min-height:100px;
    padding:3px;
    max-height:240px;
  }
  .day-number {
    width:22px;
    height:22px;
    font-size:11px;
  }
  .task {
    font-size:9px;
    padding:5px 3px;
    border-left-width:2px;
  }
  .task-status {
    display:none;
  }
  .weekday {
    font-size:10px;
    padding:12px 0;
  }
  .calendar-foot,footer {
    flex-direction:column;
    gap:8px;
    padding:14px 12px;
  }
  .agenda {
    padding:0 12px 20px;
  }
  .agenda-day {
    grid-template-columns:1fr;
  }
  .agenda-day h3 {
    grid-row:auto;
  }
  .undated {
    grid-template-columns:1fr;
  }
  dl {
    grid-template-columns:100px 1fr;
  }
}

.connection-debug {
  margin: 16px 0 24px;
  border: 1px solid #d8ded9;
  border-radius: 12px;
  background: #fff;
}
.connection-debug summary { padding: 16px; cursor: pointer; font-weight: 600; }
.connection-debug summary span { display: inline-block; margin-left: 12px; font-size: 13px; font-weight: 400; }
.debug-content { padding: 0 16px 16px; }
.debug-content > p { font-size: 14px; }
#connection-history { list-style: none; padding: 0; max-height: 480px; overflow-y: auto; }
#connection-history li { margin-top: 12px; padding: 16px; border-radius: 8px; border-left: 4px solid #254b41; background: #f4f7f4; }
#connection-history .debug-error { border-color: #a33131; background: #fff4f2; }
#connection-history h3 { margin: 0; font-size: 15px; }
#connection-history p { font-size: 14px; overflow-wrap: anywhere; }
#connection-history dl { display: grid; grid-template-columns: minmax(100px, 180px) minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
#connection-history dd { margin: 0; overflow-wrap: anywhere; }
.debug-action { font-weight: 600; }
