.tm-workspace { max-width: 54rem; color: var(--ink); }
.tm-workspace :is(p, dl, li, h2, h3, h4, a, dd, summary, figcaption) { overflow-wrap: anywhere; }
.tm-workspace :is(h2,h3,h4) { line-height: 1.22; margin: 0 0 .6rem; }
.tm-workspace h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
.tm-workspace h3 { font-size: 1.2rem; }
.tm-workspace p { max-width: 65ch; margin: .35rem 0 .8rem; }
.tm-workspace .tm-status:empty { display: none; }
.tm-status, .tm-state { color: #713607; font-weight: 650; }
.tm-workspace .tm-status { border-left: 3px solid #aa4b12; padding: .4rem .7rem; }
.tm-assignment, .tm-block { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: clamp(1rem, 3vw, 1.75rem); margin: 1rem 0; min-width: 0; }
.tm-assignment { background: #efefe8; }
.tm-meta { color: #53594f; }
.tm-facts, .tm-visit { margin: .6rem 0; }
.tm-facts { display: grid; grid-template-columns: minmax(7rem, 30%) minmax(0, 1fr); gap: .35rem .8rem; }
.tm-workspace dt { font-weight: 650; }
.tm-workspace dd { margin: 0; white-space: pre-wrap; }
.tm-field { display: grid; gap: .35rem; margin: .65rem 0; font-weight: 600; }
.tm-field :is(input, textarea) { box-sizing: border-box; display: block; width: 100%; padding: .6rem .8rem; border: 1px solid #7d8478; border-radius: var(--radius-sm); font: inherit; font-weight: 400; color: var(--ink); background: #fff; }
.tm-field input { min-height: 44px; }
.tm-field textarea { resize: vertical; }
.tm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .75rem 0 0; }
.tm-primary { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.tm-refresh { margin-block: 1.2rem; }
.tm-workspace :is(.tm-correction, .tm-assignment) > summary, .tm-assignment details > summary { padding: .6rem 0; min-height: 44px; cursor: pointer; }
.tm-visit > div, .tm-observation + .tm-observation, .tm-history li + li { border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .7rem; }
.tm-correction summary { color: #85400e; text-decoration: underline; text-underline-offset: .18em; }
.tm-requests { padding-left: 1.25rem; margin: .5rem 0; }
.tm-workspace .tm-observation figure { margin: .75rem 0 0; }
.tm-observation img { display: block; max-width: 100%; max-height: 22rem; object-fit: contain; }
.tm-observation figcaption { margin-top: .4rem; }
.tm-text, .tm-requests p { white-space: pre-wrap; }
.tm-history { list-style: none; padding: 0; margin: .7rem 0; }
.tm-history li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .85rem; }
.tm-snapshot:not(:empty) { border-top: 2px solid var(--ink); margin-top: 1rem; padding-top: 1rem; }
.tm-snapshot .tm-block { margin-inline: 0; }
@media(max-width: 520px) {
  .tm-facts { display: block; }
  .tm-facts dt:not(:first-child) { margin-top: .55rem; }
  .tm-history li { align-items: flex-start; flex-direction: column; }
}
@media print {
  .tm-workspace :is(button,form,.tm-status,.tm-actions,.tm-correction,.tm-field) { display: none !important; }
  .tm-assignment, .tm-block { border: 0; padding: 0; background: transparent; }
  .tm-workspace img { max-height: 3in; }
}
