@import url("./board.css");

.tm {
  box-sizing: border-box;
  color: var(--h-text, #30343b);
  background: var(--h-content, #fff);
  font-size: 14px;
  line-height: 1.5;
  padding: 28px;
  min-width: 0;
  overflow: auto;
  --tm-accent: color-mix(in srgb, #8063e5 75%, var(--h-text, #30343b));
  --tm-soft: color-mix(in srgb, #8063e5 10%, var(--h-content, #fff));
}
.tm * {
  box-sizing: border-box;
}
.tm button,
.tm input,
.tm select,
.tm textarea {
  font: inherit;
}
.tm button,
.tm a,
.tm input,
.tm select {
  min-height: 44px;
}
.tm input:not([type="checkbox"]),
.tm select,
.tm textarea {
  border: 1px solid var(--h-border, #dde0e4);
  border-radius: 8px;
  background: var(--h-content, #fff);
  color: inherit;
  padding: 10px 12px;
  min-width: 0;
  max-width: 100%;
}
.tm input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--h-primary, #30343b);
}
.tm select[multiple] {
  min-height: 112px;
}
.tm textarea {
  width: 100%;
  resize: vertical;
}
.tm button {
  cursor: pointer;
}
.tm button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.tm :focus-visible {
  outline: 2px solid var(--h-focus, #4b5563);
  outline-offset: 3px;
}
.tm h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin: 0 0 10px;
  font-weight: 650;
}
.tm h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
}
.tm h3 {
  font-size: 15px;
}
.tm p {
  margin: 8px 0;
}
.tm a {
  color: var(--h-primary, #30343b);
  text-underline-offset: 3px;
}
.tm-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}
.tm-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: var(--h-secondary, #606772);
  margin: 0 0 12px !important;
}
.tm-muted {
  color: var(--h-secondary, #606772);
}
.tm-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 20px 0;
}
.tm-toolbar .tm-field {
  margin: 0;
  min-width: 100px;
}
.tm-toolbar input[type="search"] {
  flex: 1;
  min-width: 160px;
}
.tm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  font-size: 12px;
  font-weight: 500;
}
.tm-field:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.tm-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 32px;
}
.tm-metric {
  border: 1px solid var(--h-border, #dde0e4);
  border-radius: 12px;
  padding: 20px;
  background: var(--h-content, #fff);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tm-metric strong {
  font-size: 27px;
  letter-spacing: -0.6px;
}
.tm-title-button {
  display: block;
  text-align: left;
  border: 0;
  background: none;
  color: inherit;
  padding: 5px 0;
  font-weight: 600;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.tm-title-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tm-table-scroll,
.tm-chart-scroll {
  overflow: auto;
  max-width: 100%;
}
.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.tm-table th {
  color: var(--h-secondary, #606772);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.tm-table th,
.tm-table td {
  padding: 12px;
  border-bottom: 1px solid var(--h-border, #dde0e4);
  vertical-align: middle;
}
.tm-table td:first-child {
  min-width: 210px;
}
.tm-table select {
  font-size: 12px;
  min-height: 36px;
  padding: 6px 8px;
}
.tm-table tr:hover {
  background: var(--h-canvas, #f7f7f8);
}
.tm-group th {
  font-weight: 700;
  background: var(--h-canvas, #f7f7f8);
}
.tm-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.tm-panel,
.tm-card,
.tm-project-card {
  border: 1px solid var(--h-border, #dde0e4);
  border-radius: 12px;
  padding: 20px;
  background: var(--h-content, #fff);
  margin-bottom: 14px;
  min-width: 0;
}
.tm-card {
  padding: 16px;
  margin: 0 0 12px;
}
.tm-project-card .tm-title-button {
  font-size: 18px;
}
.tm-project-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--h-subtle, #eef0f3);
  border-radius: 10px;
  font-size: 21px;
}
.tm-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--h-secondary, #606772);
  font-size: 11px;
}
.tm-card .tm-title-button {
  font-size: 14px;
}
.tm-card select {
  margin-top: 12px;
  width: 100%;
}
.tm-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--h-subtle, #eef0f3);
  font-size: 11px;
  white-space: nowrap;
}
.tm-status-done {
  color: #246444;
  background: #e4f0e9;
}
.tm-status-doing {
  color: #3e5791;
  background: #e9edf7;
}
.tm-status-review {
  color: #77561c;
  background: #f5efdf;
}
.tm-board {
  gap: 14px;
  overflow: auto;
  align-items: start;
}
.tm-column {
  background: var(--h-canvas, #f7f7f8);
  border-radius: 12px;
  padding: 12px;
  min-height: 280px;
}
.tm-column > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 4px 14px;
}
.tm-column h3 {
  font-size: 12px;
}
.tm-count {
  font-size: 11px;
  border: 1px solid var(--h-border, #dde0e4);
  border-radius: 5px;
  padding: 0 6px;
}
.tm-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-size: 11px;
  margin: 18px 0;
}
.tm-progress > span {
  grid-column: 1/-1;
  color: var(--h-secondary, #606772);
}
.tm-progress progress {
  width: 100%;
  height: 6px;
  align-self: center;
  border: 0;
  accent-color: var(--h-primary, #30343b);
}
.tm-progress progress::-webkit-progress-bar {
  background: var(--h-subtle, #eef0f3);
  border-radius: 4px;
}
.tm-progress progress::-webkit-progress-value {
  background: var(--h-primary, #30343b);
  border-radius: 4px;
}
.tm-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--h-secondary, #606772);
  border: 1px dashed var(--h-border, #dde0e4);
  border-radius: 12px;
  margin: 24px 0;
}
.tm-empty h3 {
  font-weight: 500;
}
.tm-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--h-canvas, #f7f7f8);
  border-radius: 50%;
  margin: auto;
  font-size: 23px;
}
.tm-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid var(--h-border, #dde0e4);
  border-top: 1px solid var(--h-border, #dde0e4);
}
.tm-calendar-heading,
.tm-calendar-day {
  padding: 8px;
  border-right: 1px solid var(--h-border, #dde0e4);
  border-bottom: 1px solid var(--h-border, #dde0e4);
}
.tm-calendar-day {
  min-height: 100px;
  font-size: 11px;
}
.tm-calendar-heading {
  text-align: center;
  font-size: 12px;
  color: var(--h-secondary, #606772);
}
.tm-outside {
  opacity: 0.45;
}
.tm-today {
  background: var(--h-selected, #e5e7eb);
}
.tm-calendar-task {
  display: block;
  width: 100%;
  font-size: 11px !important;
  text-align: left;
  border: 0;
  border-radius: 5px;
  background: var(--h-subtle, #eef0f3);
  color: inherit;
  padding: 5px;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.tm-svg-text {
  font: 11px sans-serif;
  fill: var(--h-text, #30343b);
}
.tm-grid-line {
  stroke: var(--h-border, #dde0e4);
  stroke-width: 1;
}
.tm-gantt-bar {
  fill: var(--h-primary, #30343b);
  cursor: pointer;
}
.tm-critical {
  stroke: #b34d48;
  stroke-width: 3;
}
.tm-baseline-bar {
  fill: #8390aa;
}
.tm-dependency {
  stroke: #72819d;
  fill: none;
  stroke-width: 1.3;
}
.tm-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
/* Chart dimensions must override the shared Harness's 20px icon rule. */
.tm .tm-line-chart {
  display: block;
  width: 100%;
  height: auto;
}
.tm .tm-timeline-chart {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
}
.tm-overdue {
  color: #b3463e !important;
}
.tm-notice,
.tm-refresh-notice {
  padding: 12px 16px;
  border: 1px solid var(--h-border, #dde0e4);
  background: var(--h-subtle, #eef0f3);
  border-radius: 8px;
  margin: 12px 0;
  font-size: 13px;
}
.tm-error {
  border-color: #c2746c;
  color: #a73731;
  background: var(--h-content, #fff);
}
.tm-refresh-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tm-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}
.tm-form .tm-field:has(textarea),
.tm-full {
  grid-column: 1/-1;
}
.tm-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.tm-inline .tm-field {
  flex: 1;
  min-width: 120px;
}
.tm-inline input {
  width: 140px;
}
.tm-prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tm-dialog {
  border: 1px solid var(--h-border, #dde0e4);
  border-radius: 14px;
  background: var(--h-content, #fff);
  color: var(--h-text, #30343b);
  width: min(900px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  box-shadow: 0 20px 70px #0002;
}
.tm-dialog::backdrop {
  background: #17202e66;
}
.tm-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--h-border, #dde0e4);
  position: sticky;
  top: 0;
  background: var(--h-content, #fff);
  z-index: 3;
  gap: 14px;
}
.tm-dialog-head h2 {
  margin: 0;
  font-size: 19px;
}
.tm-dialog-body {
  padding: 20px 24px;
}
.tm-dialog-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-top: 1px solid var(--h-border, #dde0e4);
  background: var(--h-content, #fff);
  position: sticky;
  bottom: 0;
  z-index: 3;
}
.tm-related {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--h-border, #dde0e4);
}
.tm-comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--h-border, #dde0e4);
}
.tm-comment header {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  font-size: 12px;
}
.tm-comment small {
  color: var(--h-secondary, #606772);
}
.tm-file {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--h-border, #dde0e4);
  padding: 10px 0;
}
.tm-file > a {
  flex: 1;
  display: flex;
  align-items: center;
}
.tm-history {
  border-bottom: 1px solid var(--h-border, #dde0e4);
  padding: 16px 0;
}
.tm-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--h-border, #dde0e4);
}
.tm-block img {
  max-width: 100%;
  height: auto;
}
.tm-annotation-surface {
  position: relative;
  margin: 16px auto;
  line-height: 0;
}
.tm-annotation-surface > img,
.tm-annotation-surface > canvas {
  width: 100%;
  height: auto;
  display: block;
}
.tm-annotation-overlay,
.tm-annotation-marks {
  position: absolute;
  inset: 0;
}
.tm-annotation-overlay {
  cursor: crosshair;
  touch-action: none;
}
.tm-annotation-selection,
.tm-saved-mark {
  position: absolute;
  border: 2px solid #cc632c;
  background: #ffa13822;
  pointer-events: none;
}
.tm-saved-mark {
  border-color: #5576a3;
  background: #6387bd15;
}
.tm-dot {
  height: 8px;
  width: 8px;
  background: #5973a2;
  border-radius: 50%;
}
.tm-read {
  background: var(--h-border, #dde0e4);
}
.tm-ai-output {
  max-width: 850px;
}
.tm-ai-output > a {
  display: block;
}
.tm-secret {
  display: block;
  overflow-wrap: anywhere;
  padding: 16px;
  background: var(--h-subtle, #eef0f3);
}
.tm-auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 0% 0%, #e9edf4, transparent 50%), #f7f7f8;
}
.tm-auth-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border: 1px solid #dde0e4;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 12px 36px #20263106;
}
.tm-auth-card h1 {
  font-size: 28px;
}
.tm-auth-brand {
  display: grid;
  place-items: center;
  width: 104px;
  height: 44px;
  border: 1px dashed #dde0e4;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 32px;
}
.tm-auth-card [hidden] { display: none !important; }
.tm-auth-card > .h-button.tm-auth-back { width: 44px; }
.tm-auth-card > .h-button {
  display: block;
  width: 100%;
  margin-top: 24px;
}
.tm-auth .h-primary {
  background: #30343b;
  color: white;
  border: 1px solid #30343b;
  border-radius: 8px;
}
.tm-auth input {
  width: 100%;
}
.tm-offline {
  min-height: 100dvh;
}
@media (max-width: 900px) {
  .tm {
    padding: 20px;
  }
  .tm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tm-charts {
    grid-template-columns: 1fr;
  }
  .tm-page-head {
    align-items: flex-start;
  }
  .tm-page-head h1 {
    font-size: 24px;
  }
  .tm-calendar {
    min-width: 560px;
  }
  .tm-view-calendar {
    overflow: auto;
  }
}
@media (max-width: 520px) {
  .tm {
    padding: 16px;
  }
  .tm-page-head {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }
  .tm-page-head > .h-button {
    width: 100%;
  }
  .tm-gallery {
    grid-template-columns: 1fr;
  }
  .tm-form {
    grid-template-columns: 1fr;
  }
  .tm-metric {
    padding: 14px;
  }
  .tm-metric strong {
    font-size: 24px;
  }
  .tm-dialog-body {
    padding: 16px;
  }
  .tm-dialog-head {
    padding: 14px 16px;
  }
  .tm-dialog-footer {
    padding: 12px 16px;
  }
  .tm-toolbar > * {
    max-width: 100%;
  }
  .tm-auth-card {
    padding: 28px 22px;
  }
  .tm-comment header {
    flex-direction: column;
    gap: 4px;
  }
  .tm-refresh-notice {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tm * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.tm-block iframe {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--h-border);
  border-radius: 8px;
}

.tm .tm-icon-button {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.tm-task-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
}
.tm-task-toolbar > input[type="search"] {
  flex: 1 1 170px;
  max-width: 280px;
}
.tm-task-toolbar > select {
  max-width: 170px;
}
.tm .tm-icon-button[aria-pressed="true"],
.tm .tm-icon-button[aria-expanded="true"] {
  background: var(--h-selected, #e5e7eb);
  border-color: var(--h-border, #dde0e4);
}
.tm-filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--h-border, #dde0e4);
  border-radius: 10px;
}
.tm-filter-panel[hidden] { display: none; }
.tm-filter-panel .tm-field { margin: 0; }
.tm-ai-agents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}
.tm-ai-agent {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--h-secondary, #606772);
  background: transparent;
  font-size: 12px !important;
}
.tm-ai-agent:hover { background: var(--h-canvas, #f7f7f8); }
.tm-ai-agent[aria-pressed="true"] {
  border-color: var(--h-focus, #4b5563);
  color: var(--h-text, #30343b);
  background: var(--h-selected, #e5e7eb);
}
.tm-agent-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #365f98;
  background: #e2ecfa;
}
.tm-ai-agent:nth-child(3n + 2) .tm-agent-symbol { color: #387156; background: #e0f0e7; }
.tm-ai-agent:nth-child(3n) .tm-agent-symbol { color: #805395; background: #efe5f4; }
@media (max-width: 520px) {
  .tm-task-toolbar > input[type="search"] { max-width: none; min-width: 140px; }
  .tm-ai-agents { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Compact native popovers keep view selection out of the working area. */
.tm-dropdown-trigger { display: inline-flex; align-items: center; gap: 8px; }
.tm-dropdown-trigger svg { width: 20px; height: 20px; }
.tm-dropdown-trigger svg:last-child { width: 14px; }
.tm-dropdown-panel {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(268px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid var(--h-border, #dde0e4);
  border-radius: 12px;
  background: var(--h-content, #fff);
  color: var(--h-text, #30343b);
  box-shadow: 0 12px 36px #0003;
  overflow-y: auto;
}
.tm-dropdown-panel:not(:popover-open) { display: none; }
.tm-dropdown-panel:popover-open { display: grid; gap: 3px; }
.tm-dropdown-panel .h-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  text-align: left;
  border-color: transparent;
  font-size: 13px;
}
.tm-dropdown-panel svg { flex: 0 0 20px; }
.tm-project-icon { display: inline-grid; place-items: center; }
.tm-project-icon svg { width: 24px; height: 24px; }
.tm-task-dialog { width: min(1060px, calc(100vw - 28px)); }
.tm-task-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--h-border, #dde0e4);
}
.tm-task-tabs .h-button { display: flex; gap: 8px; align-items: center; }
.tm-task-tabs svg { width: 18px; height: 18px; }
.tm-task-tabs [aria-selected="true"] { background: var(--h-selected, #e5e7eb); }
.tm-task-dialog [hidden] { display: none !important; }
.tm-task-dialog .tm-related { margin: 0; padding: 0; border: none; }
.tm-chat-log { height: min(46dvh, 430px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.tm-chat-message { align-self: flex-start; max-width: 85%; padding: 12px 16px; background: var(--h-canvas, #f7f7f8); border: 1px solid var(--h-border, #dde0e4); border-radius: 14px 14px 14px 3px; }
.tm-chat-message.tm-chat-own { align-self: flex-end; background: var(--h-selected, #e5e7eb); border-radius: 14px 14px 3px 14px; }
.tm-chat-message header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; font-size: 12px; }
.tm-chat-message time, .tm-chat-message small { color: var(--h-secondary); font-size: 11px; }
.tm-chat-message p { margin: 8px 0 0; }
.tm-chat-compose { display: grid; gap: 10px; }
.tm-chat-compose textarea { width: 100%; }
.tm-chat-compose .tm-inline { justify-content: flex-end; }
.tm-chat-compose select { width: auto; }
.tm-chat-compose svg { width: 20px; height: 20px; }
.tm-chat-state { font-size: 12px; color: var(--h-secondary); }
.tm .tm-ai-trigger { color: #fff; background: #6544c9; border-color: #6544c9; }
.tm-ai-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(480px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 18px 0 0 18px;
  border: none;
  border-left: 4px solid #8063e5;
  animation: tm-drawer-in 220ms ease-out;
}
.tm-ai-drawer .tm-dialog-head { background: #6544c9; color: #fff; }
.tm-ai-drawer .tm-dialog-head .h-button { color: #fff; border-color: #ffffff70; background: transparent; }
.tm-ai-drawer .tm-dialog-body { padding: 20px; }
.tm-ai-drawer .tm-dialog-footer:empty { display: none; }
.tm-ai-drawer .h-primary { background: #6544c9; border-color: #6544c9; color: #fff; }
.tm-ai-output summary { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.tm-ai-output summary svg { width: 18px; height: 18px; }
@keyframes tm-drawer-in { from { opacity:0; translate:8px 0; } to { opacity:1; translate:0 0; } }
@media (prefers-reduced-motion: reduce) { .tm-ai-drawer { animation: none; } }
@media (max-width: 520px) {
  .tm-task-tabs { gap: 3px; }
  .tm-task-tabs .h-button { padding: 10px 7px; font-size: 12px; gap: 5px; }
  .tm-chat-message { max-width: 95%; }
  .tm-ai-drawer { border-radius: 0; border-left: none; }
}

.tm-module-content { min-width: 0; }
.tm-task-list, .tm-agenda { list-style: none; padding: 0; margin: 0; }
.tm-list-row { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 10px; }
.tm-list-row:hover { background: var(--h-canvas); }
.tm-list-row > input { appearance: none; display: grid; place-content: center; flex: 0 0 22px; width: 22px; height: 22px; border: 1.5px solid var(--h-secondary); border-radius: 50%; cursor: pointer; }
.tm-list-row > input:checked { background: #39846a; border-color: #39846a; }
.tm-list-row > input:checked::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.tm-list-row:has(> input:checked) .tm-list-title > .h-button { text-decoration: line-through; color: var(--h-secondary); }
.tm-list-title { flex: 1; min-width: 0; }
.tm-list-title .h-button { display: block; min-height: 32px; border: none; background: transparent; padding: 2px 0; text-align: left; font-weight: 600; }
.tm-list-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tm-list-meta .tm-badge { padding: 2px 7px; font-size: 10px; }
.tm-list-title small, .tm-list-date { color: var(--h-secondary); font-size: 12px; }
.tm-list-person { display: inline-flex; color: var(--h-secondary); }
.tm-list-person svg, .tm-list-date svg { width: 14px; height: 14px; }
.tm-list-date { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.tm-list-group { padding: 20px 10px 6px; font-size: 12px; font-weight: 600; }
.tm-view-table .tm-table-scroll { border: 1px solid var(--h-border); border-radius: 10px; }
.tm-task-grid { min-width: 960px; }
.tm-task-grid th, .tm-task-grid td { border-right: 1px solid var(--h-border); padding: 8px 12px; }
.tm-task-grid th { padding-top: 14px; padding-bottom: 14px; background: var(--h-subtle); font-weight: 600; }
.tm-task-grid tbody tr:nth-child(even) { background: var(--h-canvas); }
.tm-task-grid td:first-child { position: sticky; left: 0; background: var(--h-content); }
.tm-task-grid .tm-title-button { min-height: 36px; font-size: 13px; }
.tm-task-grid td:nth-last-child(-n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.tm-grid-title { display: flex; gap: 12px; align-items: center; }
.tm-row-number { min-width: 18px; color: var(--h-secondary); font-size: 11px; }
.tm-agenda { max-width: 800px; padding-top: 6px; }
.tm-agenda-item { display: grid; grid-template-columns: 100px 32px minmax(0, 1fr); gap: 16px; }
.tm-agenda-date { padding-top: 4px; color: var(--h-secondary); text-align: right; }
.tm-agenda-date time { display: grid; gap: 2px; }
.tm-agenda-date strong { color: var(--h-text); font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tm-agenda-date time span { font-size: 11px; }
.tm-agenda-undated { display: grid; justify-items: end; gap: 6px; font-size: 11px; }
.tm-agenda-marker { position: relative; display: flex; justify-content: center; padding-top: 10px; color: #5e73ba; }
.tm-agenda-marker::after { content: ""; position: absolute; top: 35px; bottom: 0; border-left: 2px solid var(--h-border); }
.tm-agenda-marker svg { position: relative; z-index: 1; width: 18px; height: 18px; padding: 5px; box-sizing: content-box; background: var(--h-subtle); border-radius: 50%; }
.tm-agenda-item:last-child .tm-agenda-marker::after { border-left-style: dashed; }
.tm-agenda-cards { padding-bottom: 26px; min-width: 0; }
.tm-agenda-card { padding: 10px 16px; margin-bottom: 8px; background: var(--h-canvas); border-radius: 10px; border-left: 3px solid #7b89bb; }
.tm-agenda-card > .h-button { border: 0; background: transparent; padding: 0; min-height: 32px; font-weight: 600; text-align: left; }
.tm-agenda-card .tm-card-meta { margin-top: 6px; gap: 8px; }
.tm-agenda-card small { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tm-agenda-card small svg { width: 14px; height: 14px; flex-shrink: 0; }
.tm-view-gantt .tm-timeline-chart { min-width: 100%; }
.tm-view-gantt .tm-chart-scroll { border: 1px solid var(--h-border); border-radius: 10px; }
.tm-gantt-header { fill: var(--h-subtle); }
.tm-gantt-heading { font-weight: 600; }
.tm-gantt-row { fill: var(--h-canvas); }
.tm-gantt-row-alt { fill: var(--h-content); }
.tm-gantt-weekend { fill: var(--h-secondary); opacity: 0.07; }
.tm-gantt-label { cursor: pointer; }
.tm-gantt-label:hover { text-decoration: underline; }
.tm-gantt-bar { fill: #7183a6; }
.tm-gantt-bar[data-status="doing"] { fill: #4675bf; }
.tm-gantt-bar[data-status="review"] { fill: #a47c2c; }
.tm-gantt-bar[data-status="done"] { fill: #39846a; }
.tm-gantt-bar[data-status="cancelled"] { fill: #868686; }
.tm-gantt-bar:hover { filter: brightness(1.1); }
.tm-gantt-today { stroke: #c15f58; stroke-width: 2; stroke-dasharray: 4 3; pointer-events: none; }
.tm-gantt-undated { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.tm-gantt-undated > span { display: inline-flex; align-items: center; gap: 6px; color: var(--h-secondary); font-size: 12px; margin-right: 4px; }
.tm-gantt-undated > span svg { width: 16px; height: 16px; }
.tm-gantt-undated .h-button { font-size: 12px; min-height: 36px; padding: 6px 12px; }
.tm-lane-create-task { margin-left: auto; flex-shrink: 0; }
.tm-with-assistant { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.tm-task-assistant[open] { display: flex; flex-direction: column; }
.tm-task-assistant .tm-dialog-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 16px; overflow: hidden; }
.tm-task-assistant .tm-dialog-head { padding: 16px; flex-shrink: 0; }
.tm-task-assistant.tm-assistant-docked { position: sticky; inset: 0 auto auto; margin: 0; width: 100%; height: calc(100dvh - 156px); min-height: 420px; max-height: none; border-radius: 14px; box-shadow: 0 8px 30px #0001; }
.tm-assistant-scope { margin: 0 0 12px; font-size: 11px; color: var(--h-secondary); }
.tm-assistant-log { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 2px; }
.tm-assistant-message { flex-shrink: 0; align-self: flex-start; max-width: 100%; padding: 12px; background: var(--h-canvas); border-radius: 12px 12px 12px 2px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.tm-assistant-message p { margin: 0; }
.tm-assistant-own { align-self: flex-end; background: #6544c9; color: #fff; border-radius: 12px 12px 2px 12px; }
.tm-assistant-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.tm-assistant-compose textarea { width: 100%; min-width: 0; min-height: 80px; max-height: 180px; resize: vertical; font-size: 13px; }
.tm-assistant-proposal { display: grid; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--h-border); }
.tm-assistant-proposal p { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tm-assistant-proposal svg { width: 16px; height: 16px; }
.tm-assistant-proposal small { color: var(--h-secondary); }
.tm-assistant-proposal .h-button { padding: 10px; font-size: 13px; }
.tm-assistant-proposal .tm-field { margin: 0; }
@media (max-width: 600px) {
  .tm-list-row { gap: 10px; flex-wrap: wrap; }
  .tm-list-title { flex-basis: calc(100% - 40px); }
  .tm-list-date { margin-left: 32px; margin-top: -6px; }
  .tm-agenda-item { grid-template-columns: 58px 24px minmax(0, 1fr); gap: 8px; }
  .tm-agenda-card { padding: 10px; }
  .tm-agenda-date strong { font-size: 24px; }
  .tm-agenda-date time span { font-size: 10px; }
  .tm-agenda-marker svg { width: 14px; height: 14px; padding: 4px; }
  .tm-agenda-card .tm-card-meta { flex-wrap: wrap; }
}

.tm-context-menu { width: 244px; min-width: 0; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
.tm-context-menu .h-button:focus-visible { outline-offset: -3px; background: var(--h-selected); }

/* Task essentials stay visible; less frequent fields use the same controls in sections. */
.tm-task-editor { width: min(880px, calc(100vw - 28px)); }
.tm-task-editor .tm-dialog-head { padding: 14px 24px; }
.tm-task-editor .tm-dialog-head h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.tm-task-editor .tm-dialog-head h2 svg { width: 20px; height: 20px; color: var(--h-secondary); }
.tm-task-editor .tm-dialog-head .h-button { border: 0; background: transparent; }
.tm-task-form { display: block; }
.tm-autosave { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; margin-right: auto; font-size: 12px; color: var(--h-secondary); }
.tm-autosave > span { overflow-wrap: anywhere; }
.tm-autosave [hidden] { display: none !important; }
.tm-task-hero { margin-bottom: 20px; }
.tm-task-title-field > span, .tm-task-description-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tm-task-title-field input { width: 100%; border-color: transparent !important; padding: 6px 0 !important; font-size: 26px; font-weight: 650; letter-spacing: -.6px; }
.tm-task-description-field textarea { border-color: transparent; background: var(--h-canvas); padding: 12px 14px; resize: vertical; }
.tm-task-basics, .tm-task-section-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.tm-task-basics { padding: 14px; margin-bottom: 18px; background: var(--h-canvas); border-radius: 14px; }
.tm-task-basics .tm-field { margin: 0; gap: 8px; display: flex; flex-direction: row; align-items: center; background: var(--h-content); border-radius: 10px; padding-left: 12px; min-width: 0; }
.tm-task-basics .tm-field > svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--h-secondary); }
.tm-task-basics .tm-field > input, .tm-task-basics .tm-field > select { flex: 1; width: 100%; border-color: transparent; background: transparent; }
.tm-people-picker { grid-column: 1 / -1; border: 0; padding: 8px 0 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tm-people-picker legend { display: flex; align-items: center; gap: 7px; color: var(--h-secondary); padding: 0; font-size: 12px; }
.tm-people-picker legend svg { width: 15px; height: 15px; }
.tm-person-choice { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 5px 10px; border: 1px solid var(--h-border); border-radius: 24px; cursor: pointer; font-size: 12px; }
.tm-person-choice:has(:checked) { background: var(--h-selected); border-color: var(--h-secondary); }
.tm-person-choice:focus-within { outline: 2px solid var(--h-focus); outline-offset: 2px; }
.tm-person-choice img, .tm-person-initial { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--h-canvas); display: grid; place-items: center; font-weight: 600; }
.tm-person-choice input { width: 14px !important; min-height: 14px !important; margin: 0; }
.tm-people-picker [hidden] { display: none !important; }
.tm-task-section { border-top: 1px solid var(--h-border); }
.tm-task-section > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 550; }
.tm-task-section > summary::-webkit-details-marker { display: none; }
.tm-task-section > summary svg { width: 18px; height: 18px; color: var(--h-secondary); }
.tm-task-section > summary svg:last-child { margin-left: auto; width: 16px; }
.tm-task-section[open] > summary svg:last-child { transform: rotate(180deg); }
.tm-task-section-fields { padding: 0 2px 18px; }
.tm-task-section-fields .tm-field { min-width: 0; }
.tm-task-tabs { gap: 8px; padding-bottom: 0; }
.tm-task-tabs .h-button { justify-content: center; width: 48px; min-height: 44px; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; padding: 10px; color: var(--h-secondary); }
.tm-task-tabs [aria-selected="true"] { background: var(--tm-soft); border-bottom-color: var(--tm-accent); color: var(--tm-accent); }

.tm-task-assistant { border: 1px solid var(--h-border); border-top: 3px solid #8063e5; }
.tm-task-assistant .tm-dialog-head { background: var(--h-content); color: var(--h-text); padding: 16px; }
.tm-task-assistant .tm-dialog-head h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.tm-assistant-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #6544c9; color: #fff; }
.tm-assistant-avatar svg { width: 21px; height: 21px; }
.tm-task-assistant .tm-dialog-head .h-button { color: var(--h-secondary); border: 0; width: 36px; min-height: 36px; height: 36px; padding: 8px; border-radius: 50%; }
.tm-task-assistant .tm-dialog-head .h-button:hover { background: var(--h-canvas); }
.tm-task-assistant .tm-dialog-body { padding: 16px; }
.tm-task-assistant.tm-assistant-docked { height: calc(100dvh - 136px); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 18px #00000008; }
.tm-assistant-scope { display: flex; align-items: center; gap: 7px; align-self: flex-start; padding: 5px 9px; background: var(--h-canvas); border-radius: 20px; margin-bottom: 12px; }
.tm-assistant-scope svg { width: 13px; height: 13px; }
.tm-assistant-welcome { margin: auto 0; padding: 24px 14px; text-align: center; color: var(--h-secondary); }
.tm-assistant-welcome-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 20px; background: #8063e51a; color: #8063e5; }
.tm-assistant-welcome-icon svg { width: 34px; height: 34px; }
.tm-assistant-welcome h3 { font-size: 16px; color: var(--h-text); margin: 0 0 8px; }
.tm-assistant-welcome p { font-size: 12px; line-height: 1.7; margin: 0; }
.tm-task-assistant .tm-assistant-message { max-width: 94%; padding: 13px 15px; border: 1px solid var(--h-border); background: var(--h-content); }
.tm-task-assistant .tm-assistant-own { background: #6544c9; border-color: #6544c9; }
.tm-task-assistant .tm-assistant-compose { border: 1px solid var(--h-border); border-radius: 16px; background: var(--h-content); display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; padding: 10px; margin-top: 12px; }
.tm-task-assistant .tm-assistant-compose:focus-within { border-color: #8063e5; box-shadow: 0 0 0 2px #8063e51a; }
.tm-task-assistant .tm-assistant-compose textarea { min-height: 66px; max-height: 160px; padding: 5px; resize: none; border: 0; border-radius: 0; background: transparent; }
.tm-task-assistant .tm-assistant-compose textarea:focus-visible { outline: none; }
.tm-task-assistant .tm-assistant-compose button { min-height: 38px; height: 38px; width: 38px; border-radius: 12px; padding: 8px; }
.tm-task-assistant .tm-chat-state:empty { display: none; }
.tm-task-assistant .tm-chat-state { margin: 8px 4px 0; }
.tm-ai-proposal { border: 1px solid var(--h-border); border-radius: 12px; padding: 12px; background: var(--h-surface-alt, var(--h-hover)); }
.tm-ai-proposal ul { margin: 8px 0; padding-left: 20px; }
.tm-ai-proposal-content { overflow-wrap: anywhere; }
.tm-ai-proposal-content h3 { margin: 0 0 6px; font-size: 16px; }
.tm-ai-proposal-content > p { margin: 0 0 12px; font-size: 13px; }
.tm-ai-change { padding: 12px 0; border-top: 1px solid var(--h-border); }
.tm-ai-change h4 { margin: 0 0 6px; font-size: 14px; }
.tm-ai-proposal-content details { margin: 4px 0 14px; font-size: 13px; }
.tm-ai-proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.tm-profile-page > .tm-field { max-width: 520px; }
.tm-profile-page > h2 { margin-top: 32px; }
.tm-profile-picture { display: flex; align-items: center; gap: 24px; padding: 24px; margin: 24px 0; border: 1px solid var(--h-border); border-radius: 16px; flex-wrap: wrap; }
.tm-profile-picture h2 { margin: 0 0 12px; font-size: 20px; }
.tm-profile-picture small { display: block; margin-top: 10px; }
.tm-profile-picture .h-button { display: inline-flex; gap: 8px; align-items: center; }
.tm-profile-picture .h-button svg { width: 18px; height: 18px; }
.tm-profile-picture [hidden] { display: none !important; }
.tm-profile-avatar { width: 104px; height: 104px; flex-shrink: 0; border: 4px solid var(--h-content); outline: 1px solid var(--h-border); border-radius: 50%; overflow: hidden; background: var(--h-selected); display: grid; place-items: center; font-size: 30px; font-weight: 600; }
.tm-profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm-profile-picture .tm-notice { flex-basis: 100%; }
@media (max-width: 600px) {
  .tm-task-editor .tm-dialog-body, .tm-task-editor .tm-dialog-head, .tm-task-editor .tm-dialog-footer { padding: 14px; }
  .tm-task-basics, .tm-task-section-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tm-task-basics { padding: 14px; }
  .tm-task-title-field input { font-size: 22px; }
  .tm-task-tabs { gap: 12px; }
  .tm-profile-picture { padding: 18px; gap: 18px; }
  .tm-task-assistant { border-radius: 0; }
}

/* Labelled planning controls share a baseline and wrap as complete fields. */
.tm-planning-toolbar { display: grid; grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(140px, 1fr)) minmax(120px, 1fr) auto auto; align-items: end; padding: 16px; background: var(--h-surface-alt, var(--h-hover)); border: 1px solid var(--h-border); border-radius: 12px; }
.tm-planning-toolbar .tm-field { min-width: 0; }
.tm-planning-toolbar input, .tm-planning-toolbar select { width: 100%; min-width: 0; }
.tm-planning-toolbar + .tm-toolbar:empty { display: none; }
@media (max-width: 1100px) { .tm-planning-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tm-planning-toolbar { padding: 12px; gap: 12px 8px; } }

.tm-chat-task-link { display: inline-flex; gap: 7px; align-items: center; margin-top: 8px; font-size: 12px; }

/* A shared visual vocabulary for workday, list, gallery, board and editor. */
.tm-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tm-date-tile { display: flex; flex-direction: column; align-items: center; flex: 0 0 48px; width: 48px; min-height: 56px; border-radius: 10px; overflow: hidden; background: var(--h-canvas); color: var(--h-text); text-align: center; }
.tm-date-tile > span { width: 100%; padding: 4px 5px 0; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--h-secondary); }
.tm-date-tile > strong { font-size: 24px; line-height: 1.2; letter-spacing: -.7px; padding: 0 6px 6px; font-weight: 650; }
.tm-task-people { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.tm-task-people .tm-avatar { width: 28px; height: 28px; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--h-subtle); color: var(--h-text); font-size: 10px; font-weight: 600; flex-shrink: 0; }
.tm-task-people .tm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-task-people .tm-avatar svg { width: 15px; height: 15px; color: var(--h-secondary); }
.tm-checklist-progress { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--h-secondary); }
.tm-checklist-progress svg { width: 14px; height: 14px; flex-shrink: 0; }
.tm-checklist-progress progress { width: 64px; height: 5px; appearance: none; border: 0; border-radius: 10px; overflow: hidden; background: var(--h-subtle); }
.tm-checklist-progress progress::-webkit-progress-bar { background: var(--h-subtle); border-radius: 10px; }
.tm-checklist-progress progress::-webkit-progress-value { background: var(--tm-accent); border-radius: 10px; }
.tm-checklist-progress progress::-moz-progress-bar { background: var(--tm-accent); border-radius: 10px; }
.tm-checklist-progress small { font-size: 11px; white-space: nowrap; }
.tm-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tm-card-heading .tm-title-button { flex: 1; min-width: 0; font-size: 15px; line-height: 1.45; }
.tm-card-heading .tm-date-tile { flex-basis: 43px; width: 43px; min-height: 51px; }
.tm-card-heading .tm-date-tile > strong { font-size: 22px; }
.tm-card > .tm-checklist-progress { margin: 14px 0; }
.tm-card-priority svg { width: 16px; height: 16px; color: var(--h-secondary); }
.tm-card-status-picker { position: relative; }
.tm-card-status-picker > summary { display: grid; place-items: center; width: 32px; min-height: 36px; list-style: none; cursor: pointer; }
.tm-card-status-picker > summary::-webkit-details-marker { display: none; }
.tm-card-status-picker svg { width: 16px; height: 16px; }
.tm-card-status-picker select { position: absolute; z-index: 3; right: 0; width: 150px; box-shadow: 0 6px 20px #0002; }
.tm-gallery .tm-card { display: flex; flex-direction: column; gap: 12px; }
.tm-gallery .tm-card > .tm-card-meta { margin-top: auto; }
.tm-list-row { border-bottom: 1px solid var(--h-border); border-radius: 0; padding: 16px 8px; }
.tm-list-title .h-button { font-size: 14px; }
.tm-list-row > .tm-date-tile { margin-left: auto; }
.tm-board-card-meta:empty { display: none; }
.tm-board-card[data-status="doing"], .tm-gallery .tm-card[data-status="doing"] { border-top: 3px solid #617bad; }
.tm-board-card[data-status="review"], .tm-gallery .tm-card[data-status="review"] { border-top: 3px solid #b18a3c; }
.tm-board-card[data-status="done"], .tm-gallery .tm-card[data-status="done"] { border-top: 3px solid #4b9a78; }
.tm-day-focus { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 30px; border-radius: 18px; background: var(--tm-soft); margin-bottom: 18px; }
.tm-day-focus > div { min-width: 0; }
.tm-day-focus .tm-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--tm-accent); margin-bottom: 10px !important; }
.tm-day-focus .tm-eyebrow svg { width: 16px; height: 16px; }
.tm-day-focus .tm-title-button { font-size: 24px; letter-spacing: -.5px; line-height: 1.25; padding: 2px 0; margin: 0 0 12px; }
.tm-day-focus-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--h-secondary); }
.tm-day-focus-meta .tm-badge { background: var(--h-content); font-size: 10px; }
.tm-day-focus .tm-date-tile { flex: 0 0 86px; width: 86px; border-radius: 13px; transform: rotate(6deg); background: var(--h-content); box-shadow: 0 7px 0 -3px color-mix(in srgb, var(--tm-accent) 18%, transparent); }
.tm-day-focus .tm-date-tile > span { color: var(--h-content); background: var(--tm-accent); padding: 7px; }
.tm-day-focus .tm-date-tile > strong { font-size: 43px; padding: 6px 8px 8px; }
.tm-day-focus-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: var(--h-content); color: var(--tm-accent); flex-shrink: 0; transform: rotate(6deg); }
.tm-day-focus-icon svg { width: 42px; height: 42px; }
.tm-day-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; color: var(--h-secondary); margin: 0 0 30px; font-size: 12px; }
.tm-day-summary > span { display: inline-flex; align-items: center; gap: 7px; }
.tm-day-summary svg { width: 16px; height: 16px; }
.tm-day-summary .tm-day-clear { color: color-mix(in srgb, #42936e 80%, var(--h-text)); }
.tm-day-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.tm-day-section-head h2 { margin: 0; font-size: 17px; }
.tm-day-section-head > span { font-size: 12px; }
.tm-day-section-head .tm-icon-button { border: 0; background: transparent; }
.tm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tm-week-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; min-height: 86px; border: 1px solid transparent; background: var(--h-canvas); border-radius: 11px; }
.tm-week-day > span { color: var(--h-secondary); font-size: 11px; }
.tm-week-day > strong { font-size: 20px; font-weight: 600; }
.tm-week-today { border-color: var(--h-border); background: var(--h-content); }
.tm-week-day[aria-pressed="true"] { border-color: var(--tm-accent); background: var(--tm-soft); }
.tm-week-dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 3px; }
.tm-week-has-tasks { background: var(--tm-accent); }
.tm-day-empty { padding: 30px 12px; display: flex; gap: 15px; align-items: center; justify-content: center; color: var(--h-secondary); background: var(--h-canvas); border-radius: 15px; }
.tm-day-empty h3 { margin: 0; font-size: 14px; font-weight: 500; }
.tm-day-empty-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: color-mix(in srgb, #42936e 80%, var(--h-text)); background: var(--h-content); }
.tm-day-empty-icon svg { width: 25px; height: 25px; }
.tm-workday [hidden] { display: none !important; }
.tm-assignees-picker { grid-column: 1 / -1; min-width: 0; }
.tm-assignees-picker > summary { display: flex; align-items: center; gap: 10px; width: fit-content; min-height: 44px; cursor: pointer; list-style: none; }
.tm-assignees-picker > summary::-webkit-details-marker { display: none; }
.tm-assignees-picker > summary > svg { width: 14px; height: 14px; color: var(--h-secondary); }
.tm-assignees-picker[open] .tm-people-picker { margin-top: 8px; }
.tm-task-basics [data-kind="status"][data-value="doing"] { background: color-mix(in srgb, #617bad 12%, var(--h-content)); }
.tm-task-basics [data-kind="status"][data-value="review"] { background: color-mix(in srgb, #b18a3c 12%, var(--h-content)); }
.tm-task-basics [data-kind="status"][data-value="done"] { background: color-mix(in srgb, #4b9a78 12%, var(--h-content)); }
.tm-checklist-editor { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; display: block; }
.tm-checklist-editor [hidden] { display: none !important; }
.tm-checklist-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) 36px; align-items: center; gap: 8px; border-bottom: 1px solid var(--h-border); }
.tm-checklist-item input[type="text"] { border-color: transparent; background: transparent; }
.tm-checklist-item:has(:checked) input[type="text"] { text-decoration: line-through; color: var(--h-secondary); }
.tm-checklist-item .tm-icon-button { border: 0; background: transparent; width: 36px; min-width: 36px; }
.tm-checklist-editor > .tm-icon-button { margin-top: 9px; border-style: dashed; }
.tm-section-count { color: var(--h-secondary); font-size: 11px; font-weight: 400; }
@media (max-width: 600px) {
  .tm-day-focus { padding: 20px; gap: 16px; }
  .tm-day-focus .tm-title-button { font-size: 21px; }
  .tm-day-focus .tm-date-tile { flex-basis: 64px; width: 64px; }
  .tm-day-focus .tm-date-tile > strong { font-size: 33px; }
  .tm-day-summary { gap: 10px 15px; margin-bottom: 23px; }
  .tm-week { gap: 5px; }
  .tm-week-day { min-height: 78px; padding-inline: 2px; }
  .tm-week-day > strong { font-size: 18px; }
  .tm-list-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 43px; gap: 10px; }
  .tm-list-row > .tm-date-tile { width: 43px; }
  .tm-list-meta { gap: 6px; }
  .tm-list-meta .tm-checklist-progress progress { width: 34px; }
}

/* Task sections: compact cards and visual values, sharing the native form model. */
.tm-task-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; }
.tm-task-section-column { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tm-task-section { min-width: 0; border: 1px solid var(--h-border); border-radius: 14px; background: var(--h-content); overflow: hidden; }
.tm-task-section[open] { border-color: color-mix(in srgb, var(--tm-accent) 28%, var(--h-border)); }
.tm-task-section > summary { padding: 12px 14px; min-height: 62px; gap: 12px; }
.tm-task-section > summary > svg:first-child { box-sizing: content-box; padding: 9px; border-radius: 11px; background: var(--h-canvas); color: var(--h-secondary); }
.tm-task-section[data-section="calendar"] > summary > svg:first-child { color: #526ba3; background: #6684ba18; }
.tm-task-section[data-section="rewrite"] > summary > svg:first-child { color: #7960b2; background: #8063c218; }
.tm-task-section[data-section="map"] > summary > svg:first-child { color: #43816a; background: #43816a18; }
.tm-task-section[data-section="list"] > summary > svg:first-child { color: #a27930; background: #b88b3218; }
.tm-task-section-fields { padding: 0 16px 16px; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tm-task-section-fields .tm-field { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .tm-task-section { transition: border-color .22s ease; }
  .tm-task-section > summary svg:last-child { transition: transform .22s ease; }
  @supports (interpolate-size: allow-keywords) {
    .tm details:not(.tm-assignees-picker,.tm-mention-picker,.tm-board-status-picker,.tm-card-status-picker)::details-content {
      interpolate-size: allow-keywords;
      block-size: 0;
      opacity: 0;
      overflow: clip;
      content-visibility: hidden;
      transition: block-size .22s ease, opacity .18s ease, content-visibility .22s allow-discrete;
    }
    .tm details[open]:not(.tm-assignees-picker,.tm-mention-picker,.tm-board-status-picker,.tm-card-status-picker)::details-content {
      block-size: auto;
      opacity: 1;
      content-visibility: visible;
    }
  }
}

.tm-task-section-fields .tm-property { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--h-canvas); border-radius: 12px; border: 1px solid transparent; }
.tm-task-section-fields .tm-property:focus-within { border-color: var(--h-focus); }
.tm-property > span { display: flex; gap: 6px; align-items: center; color: var(--h-secondary); font-size: 11px; }
.tm-property > span svg { width: 14px; height: 14px; }
.tm-property > input, .tm-property > select { border-color: transparent !important; background: transparent !important; padding: 6px 0 !important; min-height: 36px; font-size: 14px; font-weight: 550; }
.tm-number-stepper { display: flex; align-items: center; gap: 3px; min-width: 0; }
.tm-number-stepper > input { flex: 1; min-width: 0; width: 100%; padding: 3px !important; border: 0 !important; background: transparent !important; text-align: center; font-size: 24px; font-weight: 650; appearance: textfield; -moz-appearance: textfield; }
.tm-number-stepper input::-webkit-inner-spin-button, .tm-number-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tm-number-stepper .h-button { border: 0; background: var(--h-content); min-height: 32px; width: 32px; height: 32px; padding: 7px; border-radius: 50%; flex-shrink: 0; color: var(--h-secondary); }
.tm-wide-property { grid-column: 1 / -1; border: 0; padding: 0; min-width: 0; }
.tm-wide-property legend { font-size: 11px; color: var(--h-secondary); padding: 0 0 8px; }
.tm-choice-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-choice-chip { font: inherit; color: var(--h-secondary); background: var(--h-canvas); border: 1px solid transparent; border-radius: 9px; min-height: 38px; padding: 8px 12px; cursor: pointer; font-size: 12px; }
.tm-choice-chip[aria-pressed="true"] { color: var(--tm-accent); background: var(--tm-soft); border-color: color-mix(in srgb, var(--tm-accent) 35%, transparent); font-weight: 600; }
.tm-task-section-fields .tm-inline { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) 70px 36px; gap: 6px; padding: 8px; border-radius: 10px; background: var(--h-canvas); margin-bottom: 8px; }
.tm-task-section-fields .tm-inline input, .tm-task-section-fields .tm-inline select { min-width: 0; width: 100%; }
.tm-task-section-fields .tm-inline .h-button { width: 36px; min-height: 36px; padding: 8px; }
.tm-location-picker { grid-column: 1 / -1; min-width: 0; }
.tm-place-search { display: flex; gap: 8px; align-items: center; background: var(--h-canvas); border: 1px solid var(--h-border); border-radius: 12px; padding: 5px 6px 5px 12px; }
.tm-place-search > svg { width: 20px; height: 20px; color: var(--h-secondary); flex-shrink: 0; }
.tm-place-search input { min-width: 0; flex: 1; border: 0 !important; background: transparent !important; padding: 8px 0 !important; }
.tm-place-search button { border: 0; background: var(--h-content); width: 38px; min-height: 38px; padding: 9px; border-radius: 10px; }
.tm-place-results { display: grid; gap: 6px; margin-top: 8px; }
.tm-place-result { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--h-content); color: var(--h-text); font: inherit; font-size: 13px; border: 1px solid var(--h-border); padding: 12px; border-radius: 10px; cursor: pointer; }
.tm-place-result:hover { background: var(--h-canvas); }
.tm-place-result > svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--h-secondary); }
.tm-place-result > svg:last-child { margin-left: auto; }
.tm-place-state { font-size: 12px; margin: 8px 0; }
.tm-place-state:empty, .tm-place-selected:empty, .tm-location-preview:empty { display: none; }
.tm-place-selected { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 12px; background: #43816a12; border-radius: 10px; }
.tm-place-selected > svg { width: 18px; height: 18px; flex-shrink: 0; color: #43816a; }
.tm-place-selected strong { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.tm-place-selected button { margin-left: auto; width: 32px; min-height: 32px; padding: 6px; border: 0; background: transparent; }
.tm-location-preview .tm-task-map .tm-map-canvas { height: 180px; }
.tm-location-preview .tm-map-toolbar, .tm-location-preview .tm-map-task-list, .tm-location-preview h3 { display: none; }
.tm-place-credit { display: block; color: var(--h-secondary); font-size: 10px; text-align: right; margin: 8px 0; }
.tm-place-credit a { color: inherit; }
.tm-coordinates { margin-top: 10px; font-size: 11px; color: var(--h-secondary); }
.tm-coordinates summary { cursor: pointer; }
.tm-coordinates > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.tm-upload-zone { position: relative; display: flex; gap: 10px; align-items: center; justify-content: center; min-height: 98px; border: 1px dashed var(--h-border); border-radius: 14px; background: var(--h-canvas); cursor: pointer; margin: 16px 0 24px; font-size: 13px; color: var(--h-secondary); }
.tm-upload-zone svg { width: 26px; height: 26px; }
.tm-upload-zone:focus-within { outline: 2px solid var(--h-focus); }
.tm-upload-zone .tm-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.tm-task-comment-compose { border: 1px solid var(--h-border); border-radius: 14px; padding: 12px; }
.tm-task-comment-compose textarea { width: 100%; border: 0 !important; resize: vertical; min-height: 90px; padding: 6px !important; }
.tm-comment-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tm-comment-tools select { border: 0; background: var(--h-canvas); border-radius: 8px; flex: 1; min-width: 100px; width: auto; font-size: 12px; }
.tm-comment-tools .h-button { width: 38px; min-height: 38px; padding: 9px; border-radius: 10px; }
.tm-mention-picker { position: relative; }
.tm-mention-picker summary { display: grid; place-items: center; list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; background: var(--h-canvas); }
.tm-mention-picker summary::-webkit-details-marker { display: none; }
.tm-mention-picker summary svg { width: 19px; height: 19px; }
.tm-mention-choices { position: absolute; bottom: 46px; right: 0; padding: 12px; background: var(--h-content); border: 1px solid var(--h-border); border-radius: 12px; box-shadow: 0 8px 24px #0001; display: grid; gap: 6px; max-height: 220px; overflow: auto; min-width: 190px; z-index: 2; }
@media (max-width: 600px) {
  .tm-task-sections { grid-template-columns: minmax(0,1fr); }
  .tm-task-section-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 12px 12px; gap: 8px; }
  .tm-task-section > summary { padding: 10px; gap: 8px; font-size: 12px; }
  .tm-task-section > summary > svg:first-child { padding: 6px; width: 17px; height: 17px; }
  .tm-task-section-fields .tm-property { padding: 9px; }
  .tm-task-section-fields .tm-inline { grid-template-columns: minmax(0,1fr) 40px; }
  .tm-task-section-fields .tm-inline select { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .tm-task-sections { grid-template-columns: minmax(0,1fr); }
  .tm-task-section-fields { grid-template-columns: minmax(0,1fr); }
}

.tm-task-section-fields [data-property="reminderAt"] { grid-column: span 2; }
.tm-task-section-fields [data-property="tags"] { grid-column: 1 / -1; }
[data-property="weekdays"] .tm-choice-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); max-width: 350px; gap: 5px; }
[data-property="weekdays"] .tm-choice-chip { padding-inline: 0; }
@media (max-width: 600px) {
  .tm-task-section-fields [data-property="startDate"], .tm-task-section-fields [data-property="until"] { grid-column: 1 / -1; }
  .tm-task-section-fields [data-property="interval"] { grid-column: 1 / -1; max-width: 160px; }
}
@media (max-width: 380px) {
  .tm-task-section-fields [data-property="version"], .tm-task-section-fields [data-property="tags"], .tm-task-section-fields [data-property="reminderAt"] { grid-column: auto; }
}

.tm-permission-people { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.tm-permission-person { padding: 10px; border-radius: 12px; background: var(--h-canvas); }
.tm-permission-person > span { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.tm-permission-person select { background: transparent; border: 0; font-size: 12px; }
@media (max-width: 600px) { .tm-permission-people { grid-template-columns: minmax(0,1fr); } }

.tm-autosave { --autosave-success: var(--srm-success, #3e705a); --autosave-warning: var(--srm-warning, #866125); --autosave-error: #b0444a; }
[data-theme=dark] .tm-autosave { --autosave-success: var(--srm-success, #a1ccb6); --autosave-warning: var(--srm-warning, #dac196); --autosave-error: #f1a4a8; }
.tm-autosave[data-state=saved] { color: var(--autosave-success); }
.tm-autosave[data-state=pending] { color: var(--autosave-warning); }
.tm-autosave[data-state=saving] { color: var(--srm-info, #46677e); }
[data-theme=dark] .tm-autosave[data-state=saving] { color: var(--srm-info, #a5bed2); }
.tm-autosave:is([data-state=error], [data-state=conflict], [data-state=invalid]) { color: var(--autosave-error); }
.tm-autosave > .autosave-symbol { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, currentColor 12%, transparent); }
.tm-autosave > .autosave-symbol::before { content: ''; box-sizing: border-box; width: 10px; height: 6px; border-left: 2px solid; border-bottom: 2px solid; transform: translateY(-1px) rotate(-45deg); }
.tm-autosave[data-state=saved] > .autosave-symbol { animation: autosave-confirm .24s ease-out; }
.tm-autosave[data-state=saving] > .autosave-symbol::before { width: 14px; height: 14px; border: 2px solid; border-top-color: transparent; border-radius: 50%; animation: autosave-spin .8s linear infinite; }
.tm-autosave:is([data-state=pending], [data-state=error], [data-state=conflict], [data-state=invalid]) > .autosave-symbol::before { content: '!'; width: auto; height: auto; border: 0; transform: none; font-weight: 700; line-height: 1; }
.tm-autosave[data-state=pending] > .autosave-symbol::before { content: '…'; transform: translateY(-3px); }
@keyframes autosave-spin { to { transform: rotate(360deg); } }
@keyframes autosave-confirm { from { opacity: .4; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tm-autosave[data-state] > .autosave-symbol, .tm-autosave[data-state] > .autosave-symbol::before { animation: none; } }

@media (prefers-reduced-motion:no-preference) {
  .tm :is(.h-button,.tm-choice-chip,.tm-week-day,.tm-view-switcher button) { transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease,box-shadow 140ms ease; }
  .tm :is(input,select,textarea) { transition:border-color 140ms ease,box-shadow 140ms ease; }
  .tm-dialog[open]:not(.tm-ai-drawer) { animation:tm-surface-in 160ms ease-out both; }
  .tm-dialog[open]::backdrop { animation:tm-fade-in 160ms ease-out both; }
  .tm-dropdown-panel:popover-open { animation:tm-surface-in 140ms ease-out both; }
}
@keyframes tm-surface-in { from { opacity:0; translate:0 4px; } to { opacity:1; translate:0 0; } }
@keyframes tm-fade-in { from { opacity:0; } to { opacity:1; } }

.tm-delete-action { color: var(--h-danger, #b42318); }

.tm-team-assignment { display:inline-flex; align-items:center; gap:.3rem; }
.tm-team-assignment svg { width:1rem; height:1rem; }
