.tu-meter,
#planning-app details.tu-meter {
  --tu-ink: #183451;
  --tu-muted: #6d7e92;
  --tu-line: #dce4ee;
  --tu-paper: #fff;
  position: relative;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--tu-line);
  border-radius: 0;
  color: var(--tu-ink);
  background: transparent;
  font: 12px/1.5 "Microsoft JhengHei", "PingFang TC", sans-serif;
  text-align: left;
}
#planning-app .pw-shell > nav:has(+ .tu-meter) { margin-bottom: 0; }
#planning-app .simple-workspace .workspace-body:has(> .tu-meter) { padding-top: 6px; }
.tu-summary,
#planning-app .tu-meter > .tu-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 46px;
  padding: 9px 2px;
  color: inherit;
  font-size: 12px;
  font-weight: 400;
  list-style: none;
  cursor: pointer;
}
.tu-summary::-webkit-details-marker { display: none; }
.tu-summary::before, .tu-summary::after,
#planning-app .tu-meter > .tu-summary::before, #planning-app .tu-meter > .tu-summary::after { content: none; }
.tu-summary:focus-visible { outline: 2px solid #6d98f3; outline-offset: 3px; border-radius: 4px; }
.tu-identity { display: inline-flex; align-items: center; gap: 7px; color: var(--tu-muted); white-space: nowrap; }
.tu-identity svg { width: 16px; height: 16px; color: #527398; }
.tu-metrics { display: flex; align-items: baseline; gap: 24px; margin-left: auto; min-width: 0; }
.tu-metric { display: inline-flex; align-items: baseline; gap: 9px; min-width: 0; }
.tu-label, .tu-unit { color: var(--tu-muted); white-space: nowrap; }
.tu-metric b { font: 600 13px/1.5 Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tu-project-total b { color: #2458cc; }
.tu-unit { margin-left: -17px; font-size: 11px; }
.tu-disclosure { display: flex; align-items: center; gap: 4px; color: var(--tu-muted); white-space: nowrap; }
.tu-disclosure svg { width: 14px; height: 14px; transition: transform .15s; }
.tu-meter[open] > .tu-summary .tu-disclosure svg { transform: rotate(180deg); }
.tu-summary:hover .tu-disclosure { color: #2458cc; }
.tu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  box-sizing: border-box;
  width: min(540px, calc(100vw - 36px));
  max-height: min(560px, 70vh);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--tu-line);
  border-radius: 12px;
  background: var(--tu-paper);
  color: var(--tu-ink);
  box-shadow: 0 12px 36px #14315114, 0 2px 6px #14315108;
}
.tu-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.tu-panel-heading strong { font-size: 14px; font-weight: 600; }
.tu-panel-heading > span { color: var(--tu-muted); font-size: 11px; }
.tu-recent { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0 0 14px; color: var(--tu-muted); }
.tu-recent b { margin-left: 8px; color: var(--tu-ink); font-family: Consolas, monospace; font-variant-numeric: tabular-nums; }
.tu-table,
#planning-app .tu-meter .tu-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.tu-table th, .tu-table td,
#planning-app .tu-meter .tu-table th, #planning-app .tu-meter .tu-table td {
  padding: 9px 6px;
  border: 0;
  border-bottom: 1px solid var(--tu-line);
  text-align: right;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.tu-table thead th { color: var(--tu-muted); font-size: 11px; font-weight: 400; }
.tu-table th:first-child, #planning-app .tu-meter .tu-table th:first-child { width: 26%; padding-left: 8px; text-align: left; font-weight: 400; }
.tu-table th:last-child { width: 12%; }
.tu-table td { font-family: Consolas, "Microsoft JhengHei", monospace; font-variant-numeric: tabular-nums; }
.tu-table .tu-current { background: #f1f5fc; }
.tu-current-label { display: inline-block; margin-left: 6px; color: #2458cc; font: 10px "Microsoft JhengHei", sans-serif; }
.tu-footnote, #planning-app .tu-meter .tu-footnote { margin: 14px 0 0; color: var(--tu-muted); font-size: 11px; line-height: 1.7; }
.tu-footnote strong { display: block; font-weight: 400; color: var(--tu-ink); }
.tu-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tu-context { margin: 0 0 16px; padding: 12px; border: 1px solid var(--tu-line); border-radius: 10px; background: var(--tu-paper); }
.tu-context-badge { color:var(--tu-muted); font-size:10px; white-space:nowrap; }
.tu-context-heading { display:flex; justify-content:space-between; gap:12px; }
.tu-context-heading span { color:var(--tu-muted); overflow-wrap:anywhere; }
.tu-context p, #planning-app .tu-context p { margin: 7px 0; font-size:12px; line-height:1.6; }
.tu-context-track { height:7px; overflow:hidden; border-radius:5px; background:var(--tu-line); margin-top:10px; }
.tu-context-track span { display:block; height:100%; background:#3868d9; }
.tu-context .tu-context-note, #planning-app .tu-context .tu-context-note { font-size:11px; color:var(--tu-muted); }
.tu-toolbar { border: 1px solid var(--tu-line, #dce4ee); background: var(--tu-paper, #fff); border-radius: 12px; }
.tu-meter.tu-meter--toolbar { margin: 0; border: 0; }
.tu-meter--toolbar > .tu-summary { min-height: 52px; padding: 8px 14px; gap: 14px; }
.tu-meter--toolbar .tu-identity { display: none; }
.tu-meter--toolbar .tu-metrics { gap: 14px; }
.tu-meter--toolbar .tu-unit { margin-left: -8px; }
.tu-meter--toolbar .tu-disclosure > span { display: none; }
html.dark .tu-meter, html.dark #planning-app details.tu-meter {
  --tu-ink: #d9e5f1; --tu-muted: #9badc2; --tu-line: #35465a; --tu-paper: #192737;
  background: var(--tu-paper); border-radius: 6px;
}
html.dark .tu-summary { padding-left: 10px; padding-right: 10px; }
html.dark .tu-toolbar { background: #192737; border-color: #35465a; }
html.dark .tu-project-total b, html.dark .tu-current-label { color: #9dbbff; }
html.dark .tu-table .tu-current { background: #25374c; }
@media(max-width:600px) {
  .tu-summary, #planning-app .tu-meter > .tu-summary { gap: 12px; }
  .tu-identity { gap: 4px; }
  .tu-metrics { gap: 12px; }
  .tu-metric { gap: 5px; }
  .tu-label { font-size: 11px; }
  .tu-step-total, .tu-unit, .tu-disclosure > span { display: none; }
  .tu-panel { padding: 16px 12px; max-height: min(480px, 55dvh); }
  .tu-current-label { display: none; }
  .tu-table th:first-child, #planning-app .tu-meter .tu-table th:first-child { width: 23%; }
  .tu-meter--toolbar > .tu-summary { padding: 8px 10px; }
}
@media(prefers-reduced-motion:reduce) { .tu-disclosure svg { transition: none; } }
@media print { .tu-meter { display: none; } }
