:root {
  color-scheme: light;
  --paper: #fff;
  --background: #f2f5f4;
  --ink: #132a28;
  --muted: #48605e;
  --line: #cedbd7;
  --brand: #0c5f53;
  --brand-dark: #103632;
  --tint: #e6f3ed;
  --amber: #784606;
  --amber-bg: #fcf0d5;
  --radius: 14px;
  font: 16px/1.55 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--background);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.topbar { background: var(--brand-dark); color: white; }
.topbar-inner {
  width: min(1240px, 100% - 48px);
  min-height: 74px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 16px;
  row-gap: 8px;
  padding: 10px 0;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: white; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #cce8db; color: #103632; font-size: 1.2rem; }
.brand small { display: block; color: #d5e7e2; font-size: .76rem; font-weight: 500; }
#identity { font-size: .875rem; overflow-wrap: anywhere; color: #ecf8f3; }
#identity:empty { display: none; }
main { width: min(1240px, 100% - 48px); margin: 30px auto 56px; }
h1 { font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 22px; }
h2 { font-size: 1.18rem; margin: 24px 0 10px; }
h3 { font-size: 1.05rem; line-height: 1.4; margin: 0 0 6px; }
a { color: #09594f; }
:focus-visible { outline: 3px solid #087a71; outline-offset: 3px; }
button, .entry, .outline {
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 9px;
  padding: 8px 13px;
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .entry:hover { background: #084c43; }
button:disabled { cursor: wait; opacity: .72; }
.outline, .toolbar button, nav button {
  background: var(--paper);
  border-color: var(--line);
  color: var(--brand-dark);
}
.outline:hover, .toolbar button:hover, nav button:hover { background: var(--tint); }
nav button[aria-current] { color: white; background: var(--brand); border-color: var(--brand); }
.workspace-bar { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.workspace-bar:has(nav:empty):has(.toolbar:empty) { display: none; }
nav, .toolbar, .actions { display: flex; flex-wrap: wrap; gap: 7px; }
.toolbar button { font-size: .86rem; }
nav button { white-space: nowrap; }
article, form, details {
  background: var(--paper);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 10px 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
article p { margin-bottom: 0; }
article details, details form, article > form { border: 0; border-radius: 0; margin: 8px 0 0; padding: 0; }
article details + details { border-top: 1px solid var(--line); }
details form { padding-top: 6px; }
summary { cursor: pointer; color: var(--brand); font-weight: 650; padding: 10px 0; min-height: 44px; }
details.cta { border-color: #a5cdbd; }
details.cta > summary { color: #074e45; }
article details.cta > summary { background: var(--tint); padding-inline: 10px; border-radius: 8px; }
p { margin: 4px 0 10px; }
.card-note, .muted, .task-meta { color: var(--muted); }
.task-meta { font-size: .88rem; }
.status { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 7px; padding: 3px 9px; background: var(--tint); color: #174739; }
.status.warning { background: var(--amber-bg); color: var(--amber); }
.status.neutral { background: #eef1ef; color: #485551; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.status-row h3 { flex: 1 1 12rem; }
#feedback:empty { display: none; }
#feedback, #connectivity { padding: 11px 14px; border-radius: 9px; }
#feedback { background: var(--tint); }
#feedback.error { background: #fae7e2; color: #86291d; }
#connectivity { background: var(--amber-bg); color: var(--amber); border: 1px solid #bc8f40; }
.grid, .card-grid, .metrics, .quick-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.grid { margin-bottom: 13px; }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.card-grid > article, .quick-actions > details { margin: 0; }
.metrics { margin: 0 0 16px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; min-width: 0; }
.metric span { display: block; color: var(--muted); font-size: .85rem; }
.metric strong { font-variant-numeric: tabular-nums; font-size: clamp(1.28rem, 3vw, 1.9rem); overflow-wrap: anywhere; }
.metric.warning { background: var(--amber-bg); border-color: #dbba71; }
.metric.warning span { color: var(--amber); }
.task-counts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 13px 0 7px; }
.task-counts .metric { padding: 8px; border: 0; border-radius: 9px; background: #eef5f1; }
.task-counts .metric span { font-size: .75rem; }
.task-counts .metric strong { font-size: 1.24rem; }
label { display: flex; flex-direction: column; gap: 5px; font-size: .875rem; font-weight: 650; min-width: 0; }
label.toggle { flex-direction: row; align-items: center; min-height: 44px; }
input, select { min-width: 0; width: 100%; background: white; color: inherit; padding: 8px 10px; min-height: 44px; font: 400 16px/1.35 system-ui, sans-serif; border: 1px solid #809792; border-radius: 8px; }
input[type=checkbox] { width: 19px; height: 19px; min-height: 0; accent-color: var(--brand); }
input[type=file] { padding: 7px; }
input[type=search] { display: block; max-width: 420px; margin: 18px 0 12px; }
.empty { color: var(--muted); border: 1px dashed #9cafaa; border-radius: var(--radius); padding: 19px; }
.entry-list { display: flex; gap: 12px; flex-wrap: wrap; }
.entry, .outline { display: inline-flex; align-items: center; }
.login-panel { max-width: 520px; }
.login-panel > form { border: 0; padding: 0; }
.login-panel .grid { grid-template-columns: minmax(0,1fr); }
.login-panel button { width: 100%; }
pre { white-space: pre-wrap; }
.print-meta { display: none; }
@media (max-width: 640px) {
  main, .topbar-inner { width: calc(100% - 28px); }
  main { margin-top: 21px; }
  .workspace-bar { gap: 8px; }
  nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 8px; }
  .toolbar { width: 100%; }
  .grid, .card-grid, .quick-actions { grid-template-columns: minmax(0,1fr); }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { padding: 10px; }
  .task-counts .metric { padding: 6px; }
}
@media print {
  @page { margin: 15mm; }
  :root { background: white; color: black; font-size: 11pt; }
  body > header, .workspace-bar, button, form, details, #connectivity, #feedback, input[type=search], article a { display: none !important; }
  main { width: auto; margin: 0; }
  .print-meta { display: block; }
  .card-grid { display: block; }
  article { break-inside: avoid; border: 1px solid #bbb; padding: 8px; }
  .card-grid > article { margin: 0 0 8px; }
}
.login-panel h2 { margin: 0 0 10px; }
.task-counts + .outline { margin-block: 6px 3px; }
.card-note + .status { margin-top: 8px; }
.status + a, article a + a { margin-inline-start: 10px; }

.status-row h3, .status, .task-meta { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

.install-main { max-width: 700px; }
.install-tabs { margin-bottom: 12px; }
.install-tabs a { white-space: nowrap; }
.install-main article { margin-bottom: 18px; padding: clamp(14px, 4vw, 24px); }
.install-main article h2 { margin-top: 0; }
.install-main ol { padding-inline-start: 1.5rem; }
.install-main li + li { margin-top: 9px; }
.install-warning { padding: 10px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); }
.install-main .muted { font-size: .88rem; margin-top: 14px; }
#install-entry { margin-top: 14px; }
