/* Buddy Team portal: applicant and worker screens (web/team/*). Phone first:
   everything is designed at 390 px, then widened. Shared components (.ui-*,
   .buddy-*, .sk-*) are styled in styles.css and account.css; this file only
   adds the team layout and team-specific pieces (.team-app, .tw-*). */

body:has(.team-app) .account-header { max-width: 880px; padding-bottom: 12px; }
body:has(.tw-narrow) .account-header { max-width: 640px; }
body:has(.team-app) .account-legal { padding-bottom: 24px; }

.team-app { display: block; max-width: 880px; margin: 8px auto 48px; padding: 0 24px; }
.team-app.tw-narrow { max-width: 640px; }
.team-app :focus-visible { outline: 2px solid var(--wood); outline-offset: 2px; }
.team-app h1 { font-size: clamp(30px, 5vw, 40px); margin: 0; text-wrap: balance; }
.team-app h1:focus { outline: none; }
.team-app h2 { font-size: 19px; margin: 0 0 12px; letter-spacing: -0.02em; line-height: 1.2; }
.team-app p { margin: 0; }
.team-app > .buddy-loading, .team-app > .buddy-retry { margin-top: 64px; }

.tw-page-head { display: grid; gap: 6px; padding: 16px 0 20px; }
.tw-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tw-head-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tw-head-links .btn { gap: 6px; }
.tw-date, .tw-lede { color: var(--muted); font-size: 16px; line-height: 1.5; }
.tw-lede { max-width: 560px; }
.tw-small { font-size: 13px; line-height: 1.5; }
.tw-small .icon, .tw-small svg { vertical-align: -3px; margin-right: 6px; }
.tw-link, .tw-link-button { color: var(--wood); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.tw-link:hover, .tw-link-button:hover { color: var(--walnut); }
.tw-section { padding: 24px 0; border-top: 1px solid var(--line-strong); }
.tw-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tw-section-head h2 { margin: 0; }
.tw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.tw-actions .btn, .tw-hero-actions .btn, .tw-sticky-actions .btn { gap: 8px; min-height: 48px; }
.tw-wide { width: 100%; }
.team-app .ui-banner { margin: 0 0 12px; }
@media (max-width: 560px) {
  .team-app .ui-banner { flex-wrap: wrap; }
  .team-app .ui-banner-text { flex: 1 1 calc(100% - 40px); }
  .team-app .ui-banner > :is(.btn, a, button):last-child { margin-left: 32px; }
}
.team-app .ui-empty { margin: 16px 0; }

/* Navigation: top on wide screens, a bottom bar on phones. */
.tw-tabs { display: flex; gap: 4px; margin: 0 0 8px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tw-tabs a { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.tw-tabs a:hover { color: var(--ink); background: var(--page); }
.tw-tabs a[aria-current=page] { background: var(--metal-800); color: var(--on-metal); }
.tw-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--walnut); color: var(--on-metal); font-size: 11px; font-weight: 600; }
.tw-tabs a[aria-current=page] .tw-badge { background: var(--oak-light); color: var(--metal-900); }
@media (max-width: 719px) {
  .team-app { padding: 0 16px; margin-top: 0; }
  .tw-worker { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tw-tabs { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; margin: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line-strong); border-radius: 0; }
  .tw-tabs a { flex-direction: column; gap: 2px; min-height: 56px; padding: 6px 4px; font-size: 12px; }
  .tw-tabs a[aria-current=page] { background: var(--panel); color: var(--ink); }
  .tw-tabs a[aria-current=page] svg { color: var(--walnut); }
  .tw-tabs .tw-badge { position: absolute; top: 4px; left: calc(50% + 6px); }
  .tw-tabs a[aria-current=page] .tw-badge { background: var(--walnut); color: var(--on-metal); }
  /* Visit screens are full screen on a phone: the action bar takes the bottom. */
  .tw-worker[data-route^=visit] .tw-tabs { display: none; }
  .tw-worker[data-route^=visit] { padding-bottom: 0; }
  body:has(.tw-worker) .account-legal { padding-bottom: 96px; }
  body:has(.tw-worker[data-route^=visit]) .account-legal { padding-bottom: 24px; }
  .team-app h1 { font-size: 30px; }
}

/* In-progress visit, pinned above every tab. */
.tw-banners:empty { display: none; }
.tw-banners { display: grid; gap: 8px; margin: 8px 0; }
.tw-banners .ui-banner { margin: 0; }
.tw-running { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 12px; background: var(--metal-800); color: var(--on-metal); text-decoration: none; }
.tw-running > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.tw-running small { color: var(--on-metal-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-running-go { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; }
.tw-running svg:first-child { color: var(--oak-light); flex: none; }

/* Rows: time column, status under the text. */
.tw-row-status { display: flex; margin-top: 4px; }
.tw-row { align-items: flex-start; }
.tw-row .ui-row-chevron { align-self: center; }
.tw-when { display: grid; justify-items: start; min-width: 48px; font-variant-numeric: tabular-nums; }
.tw-when strong { font-size: 15px; font-weight: 600; }
.tw-when small { color: var(--muted); font-size: 12px; }
.tw-row-action { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 12px 64px; color: var(--wood); font-size: 14px; }

/* Today: next visit and the day timeline. */
.tw-hero { display: grid; gap: 12px; margin: 0 0 20px; padding: 20px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); }
.tw-hero-when { color: var(--walnut); font-size: 14px; font-weight: 600; }
.tw-hero-time { margin: 0; font-size: 28px; font-variant-numeric: tabular-nums; }
.tw-hero-body { display: flex; gap: 12px; align-items: flex-start; }
.tw-hero-body strong { font-size: 16px; }
.tw-hero-body p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.tw-hero-body p svg { vertical-align: -3px; }
.tw-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tw-hero-actions .btn { flex: 1 1 160px; }
.tw-service-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--wood-tint); color: var(--walnut); }
.tw-tl { position: relative; margin: 8px 0 12px; }
.tw-tl-hour { position: absolute; left: 0; right: 0; transform: translateY(-50%); color: var(--muted); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.tw-tl-hour::after { content: ""; position: absolute; left: 52px; right: 0; top: 50%; border-top: 1px solid var(--line); }
.tw-tl-track { position: absolute; inset: 0 0 0 56px; overflow: hidden; }
.tw-tl-block { position: absolute; left: 4px; width: calc(100% - 4px); display: grid; align-content: start; gap: 2px; padding: 8px 12px; border: 0; border-left: 4px solid var(--oak); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-strong); overflow: hidden; }
.tw-tl-block:hover { box-shadow: inset 0 0 0 1px var(--wood); }
.tw-tl-block strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.tw-tl-block span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-tl-block.is-working { border-left-color: var(--metal-800); background: var(--wood-tint); }
.tw-tl-block.is-done { border-left-color: var(--metal-400); background: var(--page); }
.tw-tl-status { display: inline-flex; align-items: center; gap: 4px; }
.tw-tl-block { z-index: 1; }
.tw-tl-now { position: absolute; z-index: 0; left: 0; right: 0; height: 0; border-top: 2px solid var(--walnut); }
.tw-tl-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--walnut); }

/* Schedule: segment, week strip, agenda. */
.tw-segment { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.tw-segment a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.tw-segment a[aria-current=page] { background: var(--metal-800); color: var(--on-metal); }
.tw-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 52px; gap: 6px; margin: 0 -16px 8px; padding: 2px 16px 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.tw-strip-day { display: grid; justify-items: center; gap: 2px; min-height: 76px; padding: 8px 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; scroll-snap-align: start; }
.tw-strip-day > span:first-child { font-size: 12px; color: var(--muted); }
.tw-strip-day strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tw-strip-day.is-today { border-color: var(--walnut); }
.tw-strip-day.is-unavailable { background: var(--page); border-style: dashed; color: var(--muted); }
.tw-strip-day.is-off { background: var(--panel); border-color: var(--panel); color: var(--muted); }
.tw-off-label { font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--walnut); line-height: 6px; }
.tw-strip-day[aria-pressed=true] { background: var(--metal-800); border-color: var(--metal-800); border-style: solid; color: var(--on-metal); }
.tw-strip-day[aria-pressed=true] > span:first-child { color: var(--on-metal-muted); }
.tw-dots { display: flex; gap: 3px; min-height: 6px; }
.tw-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--oak); }
.tw-strip-day[aria-pressed=true] .tw-dots i { background: var(--oak-light); }
.tw-day-note { min-height: 1.5em; margin: 4px 0 8px; color: var(--muted); font-size: 14px; }
.tw-avail-line { margin: 0 0 8px; }
.tw-agenda-day { padding: 16px 0 4px; border-top: 1px solid var(--line-strong); }
.tw-agenda-day h2 { font-size: 16px; margin: 0 0 4px; scroll-margin-top: 16px; }

/* Inbox. */
.tw-unread { background: var(--metal-800) !important; color: var(--on-metal) !important; }
.tw-disclosure { margin: 20px 0 0; border-top: 1px solid var(--line-strong); }
.tw-disclosure > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; list-style: none; cursor: pointer; font-weight: 500; }
.tw-disclosure > summary::-webkit-details-marker { display: none; }
.tw-disclosure > summary > span { flex: 1; }
.tw-disclosure[open] > summary > svg:last-child { transform: rotate(180deg); }
.tw-disclosure > summary > svg:first-child { color: var(--wood); }

/* Me. */
.tw-me-head { display: flex; align-items: center; gap: 16px; padding: 16px 0 20px; }
.tw-me-head h1 { font-size: 28px; }
.tw-me-head p { margin-top: 4px; overflow-wrap: anywhere; font-size: 14px; }
.tw-signout { margin-top: 16px; gap: 8px; min-height: 48px; }

/* Files (CV). */
.tw-file { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.tw-file-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--wood-tint); color: var(--walnut); }
.tw-file-text { display: grid; flex: 1; min-width: 0; }
.tw-file-text strong { overflow-wrap: anywhere; font-size: 15px; }
.tw-file-text small { color: var(--muted); font-size: 13px; }

/* Welcome and sign-in. */
.tw-steps { list-style: none; margin: 8px 0 24px; padding: 0; display: grid; }
.tw-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.tw-step-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wood-tint); color: var(--walnut); }
.tw-steps strong { display: block; font-size: 16px; margin-bottom: 2px; }
.tw-steps p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.tw-steps-compact { max-width: 400px; margin-top: 24px; }
.tw-sticky-actions { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: var(--page); }
.team-auth { display: grid; gap: 16px; align-content: start; }
.tw-auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.tw-auth-switch button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.tw-auth-switch button[aria-pressed=true] { background: var(--metal-800); color: var(--on-metal); }
.team-intro h1 { margin-bottom: 12px; }
@media (max-width: 860px) { .team-intro .tw-steps-compact { display: none; } }

/* Wizard pieces. */
.tw-wizard .ui-flow { padding-top: 8px; }
.tw-chips { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.tw-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tw-chip { position: relative; }
.tw-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tw-chip > span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.tw-chip > span > svg:first-child { color: var(--wood); }
.tw-chip-tick { display: none; }
.tw-chip input:checked + span { background: var(--metal-800); border-color: var(--metal-800); color: var(--on-metal); }
.tw-chip input:checked + span > svg:first-child { color: var(--oak-light); }
.tw-chip input:checked + span .tw-chip-tick { display: inline-flex; }
.tw-chip input:focus-visible + span { outline: 2px solid var(--wood); outline-offset: 2px; }
.tw-chip:hover > span { border-color: var(--wood); }
.tw-phone-row { display: flex; align-items: stretch; }
.tw-phone-prefix { display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 10px 0 0 10px; background: var(--panel); color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ui-field .tw-phone-row input:not([type=checkbox]) { border-radius: 0 10px 10px 0; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tw-photo-pick { display: grid; gap: 6px; }
.tw-photo-pick-row { display: flex; align-items: center; gap: 16px; }
.tw-photo-pick-row .btn { gap: 8px; min-height: 48px; }
.tw-avatar-lg { width: 72px !important; height: 72px !important; flex: none; }
.tw-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.tw-avatar-empty { display: grid; place-items: center; background: var(--panel); color: var(--muted); }
.area-list { list-style: none; margin: 12px 0 0; padding: 0; }
.area-list li { border-top: 1px solid var(--line); }
.area-list li:last-child { border-bottom: 1px solid var(--line); }
.area-list-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 4px; cursor: pointer; }
.area-list-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--panel); color: var(--muted); }
.area-list-text { display: grid; flex: 1; }
.area-list-text strong { font-size: 15px; }
.area-list-text small { color: var(--muted); font-size: 13px; }
.area-list-tick { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; }
.area-list-row.is-on .area-list-icon { background: var(--wood-tint); color: var(--walnut); }
.area-list-row.is-on .area-list-tick { background: var(--metal-800); border-color: var(--metal-800); color: var(--on-metal); }
.tw-areas { border: 0; margin: 0; padding: 0; min-width: 0; }
.tw-upload-tile { display: grid; justify-items: center; gap: 6px; padding: 32px 16px; border: 1.5px dashed var(--line-strong); border-radius: 16px; background: var(--surface); text-align: center; cursor: pointer; }
.tw-upload-tile:hover, .tw-upload-tile:focus-within { border-color: var(--wood); }
.tw-upload-tile strong { font-size: 16px; }
.tw-upload-tile small { color: var(--muted); font-size: 13px; }
.tw-upload-art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--wood-tint); color: var(--walnut); }
.tw-upload.has-file { display: grid; gap: 8px; padding: 4px 16px 16px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); }
.tw-upload-replace { justify-self: start; gap: 8px; }
.tw-review { display: grid; margin: 0 0 20px; }
.tw-review > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tw-review dt { grid-column: 1; color: var(--muted); font-size: 13px; }
.tw-review dd { grid-column: 1; margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.tw-review .tw-link-button { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 44px; padding: 0 4px; font-size: 14px; }
.tw-consent { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: 14px; line-height: 1.5; cursor: pointer; }
.tw-consent input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--metal-800); }

/* Application home and outcomes. */
.tw-sent + .tw-page-head { padding-top: 24px; }
.tw-sent { display: flex; gap: 14px; align-items: flex-start; margin: 16px 0 0; padding: 16px; border-radius: 14px; background: var(--metal-800); color: var(--on-metal); }
.tw-sent p { color: var(--on-metal-muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.tw-sent-art { color: var(--oak-light); }
.tw-app-home .tw-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tw-app-home .tw-section { border-top: 1px solid var(--line-strong); }
.tw-outcome { display: grid; justify-items: start; gap: 14px; padding-top: 32px; }
.tw-outcome-art, .tw-done-art { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--panel); color: var(--metal-700); }
.tw-photo-sheet .btn { width: 100%; }

/* Visit screens. */
.tw-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 4px 0 0 -6px; padding: 0 6px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.tw-back:hover { color: var(--wood); }
.tw-visit-head { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0 20px; }
.tw-visit-head .tw-service-icon { width: 52px; height: 52px; }
.tw-visit-head h1 { font-size: 28px; }
.tw-visit-when { margin: 6px 0 8px !important; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.tw-address { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; }
.tw-address-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wood-tint); color: var(--walnut); }
.tw-address address { font-style: normal; font-size: 16px; line-height: 1.5; align-self: center; }
.tw-address-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tw-address-actions .btn { gap: 6px; }
.tw-fact { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px !important; font-size: 15px; line-height: 1.5; }
.tw-fact svg { flex: none; color: var(--wood); margin-top: 1px; }
.tw-locked { padding: 12px; border-radius: 10px; background: var(--panel); color: var(--metal-700); font-size: 14px; }
.tw-locked svg { color: var(--metal-700); }
.tw-crew { list-style: none; margin: 0; padding: 0; }
.tw-crew li { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.tw-crew li:last-child { border-bottom: 0; }
.tw-crew li > span:nth-child(2) { flex: 1; font-weight: 500; }
.tw-checklist-preview { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tw-checklist-preview li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.tw-checklist-preview svg { flex: none; color: var(--line-strong); margin-top: 2px; }
.tw-end-note { padding: 16px 0 8px; }

/* Sticky action bar at the thumb. */
.tw-actionbar { position: sticky; bottom: 0; z-index: 5; display: grid; gap: 8px; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--page); }
.tw-actionbar-note { color: var(--walnut); font-size: 14px; }
.tw-actionbar-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.tw-actionbar-buttons .btn { flex: 1 1 auto; gap: 8px; min-height: 52px; }
.tw-actionbar-buttons .btn-primary { flex: 2 1 180px; }
.tw-actionbar-buttons .btn-primary[aria-disabled=true] { background: var(--metal-400); cursor: not-allowed; }
@media (min-width: 720px) {
  .tw-actionbar { margin: 16px 0 0; padding-inline: 0; }
  .tw-actionbar-buttons { justify-content: flex-end; }
  .tw-actionbar-buttons .btn { flex: 0 0 auto; min-width: 140px; }
  .tw-actionbar-buttons .btn-primary { min-width: 200px; }
}

/* In progress. */
.tw-run-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tw-run-top .btn { gap: 6px; }
.tw-run-head { display: flex; align-items: center; gap: 16px; padding: 12px 0 20px; }
.tw-run-head h1 { font-size: 24px; }
.tw-run-timer { margin-top: 4px !important; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.tw-run-progress { position: relative; flex: none; width: 64px; height: 64px; }
.tw-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.tw-ring circle { fill: none; stroke-width: 5; }
.tw-ring-track { stroke: var(--panel); }
.tw-ring-fill { stroke: var(--walnut); stroke-linecap: round; transition: stroke-dashoffset .3s ease; }
.tw-ring-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.tw-ring-text strong { font-size: 18px; color: var(--ink); }
.tw-ring-text { grid-auto-flow: column; place-content: center; }
@media (prefers-reduced-motion: reduce) { .tw-ring-fill { transition: none; } }
.tw-form { display: grid; gap: 24px; }
.tw-checklist { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.tw-check { position: relative; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; }
.tw-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tw-check-box { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1.5px solid var(--line-strong); border-radius: 8px; background: #fff; color: transparent; }
.tw-check-text { font-size: 16px; line-height: 1.4; }
.tw-check:has(input:checked) { background: var(--page); border-color: var(--line); }
.tw-check:has(input:checked) .tw-check-box { background: var(--metal-800); border-color: var(--metal-800); color: var(--on-metal); }
.tw-check:has(input:checked) .tw-check-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.tw-check:has(input:focus-visible) { outline: 2px solid var(--wood); outline-offset: 2px; }
.tw-check.is-nudged:not(:has(input:checked)) { border-color: var(--walnut); box-shadow: 0 0 0 3px var(--wood-tint); }

/* Photos. */

/* Help sheet options and report forms. */
.tw-options { display: grid; gap: 8px; }
.tw-option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.tw-option:hover { border-color: var(--wood); }
.tw-option > svg:first-child { flex: none; color: var(--walnut); }
.tw-option > span { display: grid; flex: 1; gap: 2px; }
.tw-option strong { font-size: 16px; }
.tw-option small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.tw-report-intro { padding: 12px 14px; border-left: 3px solid var(--oak); background: var(--surface); font-size: 14px; line-height: 1.5; color: var(--ink); }
.tw-count { min-height: 1.3em; font-size: 13px; }

/* Finish and summary. */
.tw-done { display: grid; justify-items: start; gap: 12px; padding-top: 24px; }
.tw-done-art { background: var(--metal-800); color: var(--oak-light); }
.tw-done .ui-kv { width: 100%; }

/* Availability and time off. */
.tw-form.is-pending .ui-avail-cell input:checked + .ui-avail-box { background: var(--walnut); border-color: var(--walnut); }
.tw-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--page); }
.tw-savebar[hidden] { display: none; }
.tw-savebar-note { color: var(--muted); font-size: 14px; }
.tw-savebar .btn { min-height: 52px; flex: 1 1 200px; }
@media (max-width: 719px) { .tw-worker:not([data-route^=visit]) .tw-savebar { bottom: calc(69px + env(safe-area-inset-bottom)); } }
@media (min-width: 720px) { .tw-savebar { margin: 0; padding-inline: 0; } .tw-savebar .btn { flex: 0 0 auto; min-width: 220px; } }
.tw-warn-box { display: grid; gap: 8px; margin: 8px 0 12px; padding: 14px; border: 1px solid var(--oak); border-radius: 12px; background: var(--wood-tint); }
.tw-warn-box .ui-kv { margin: 0; }
.tw-conflicts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.tw-conflicts li { display: flex; gap: 8px; align-items: flex-start; }
.tw-conflicts svg { flex: none; margin-top: 2px; color: var(--walnut); }
.tw-timeoff > li { padding-bottom: 4px; }
.tw-timeoff-row { display: flex; align-items: center; gap: 8px; }
.tw-timeoff-row .ui-row { flex: 1; min-width: 0; }
.tw-timeoff-row .btn { gap: 6px; flex: none; }
@media (max-width: 480px) { .tw-timeoff-row .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .tw-timeoff-row .btn { width: 44px; padding: 0; justify-content: center; } }
