body.ws-active > div.wrap { max-width: none; padding: 0; }
body.ws-active .mast { padding: 0; margin: 0; border: 0; }
body.ws-active .mast-top { display: none; }
body.ws-active #banner { position: relative; z-index: 42; border-radius: 0; border-color: var(--ws-line-strong); background: var(--ws-sunk); color: var(--ws-ink); padding: 12px 20px; }
.vault-theme-controls { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin-left: auto; }
@media print { .vault-theme-controls { display: none !important; } }
body.ws-active > main.wrap { display: block; max-width: none; padding: 0; }
/* The retained editing tools use the same tape contrast and neutral status language. */
:root { --t-S: #7d4fd0; --t-N: #2f6fca; }
.tape.dark { color: #ffffff; }
.tape[style*="--t-V"] { color: #121416; }
.pill { color: var(--ink); background: transparent; border: 1px solid var(--muted); border-radius: 6px; }
.pill .dot { display: none; }
.ws { background: var(--ws-paper); color: var(--ws-ink); font: 400 15px/1.45 var(--ws-ui); min-height: 100dvh; }
.ws *, .ws *::before, .ws *::after { box-sizing: border-box; }
.ws [hidden] { display: none !important; }
.ws a { color: inherit; text-underline-offset: 3px; }
.ws button, .ws input, .ws select { font-family: var(--ws-ui); color: inherit; }
.ws button, .ws a, .ws input, .ws select { -webkit-tap-highlight-color: transparent; }
.ws :focus-visible { outline: 2px solid var(--ws-ink); outline-offset: 3px; }
.ws h1, .ws h2, .ws h3, .ws p { margin: 0; }
.ws h2 { font: 600 17px/1.3 var(--ws-ui); text-transform: none; }
.ws h3 { font: 600 15px/1.3 var(--ws-ui); text-transform: none; margin-bottom: 12px; }
.ws button { cursor: pointer; }
.ws-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ws-mono { font: 400 var(--ws-label)/1.5 var(--ws-mono); text-transform: uppercase; letter-spacing: .04em; }
.ws-secondary, .ws-fine { color: var(--ws-soft); }
.ws-secondary { font-size: 14px; }
.ws-fine { font-size: var(--ws-meta); margin-top: 10px !important; }
.ws-layout { display: grid; grid-template-columns: 72px 280px minmax(0, 1fr) 280px; min-height: 100dvh; }
.ws-layout > * { min-width: 0; }
.ws-rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 4px; background: var(--ws-rail); color: var(--ws-rail-ink); }
.ws-brand { display: grid; place-items: center; min-height: 44px; min-width: 44px; margin-bottom: 8px; }
.ws-rail .ws-rail-item { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; min-height: 58px; padding: 4px 0; border: 0; border-radius: 0; text-decoration: none; background: transparent; color: var(--ws-rail-soft); font: 500 11px/1.2 var(--ws-ui); }
.ws-rail-item > .ws-icon { box-sizing: content-box; padding: 7px 12px; border-radius: 8px; }
.ws-rail-item.is-active { color: var(--ws-rail-ink); }
.ws-rail-item.is-active > .ws-icon { background: var(--ws-accent); color: var(--ws-on-accent); }
.ws-rail :focus-visible { outline-color: var(--ws-rail-ink); }
.ws-rail-spacer { flex: 1; }
.ws-avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #68716b; border-radius: 50%; background: #23282b; color: #f4f3ee; font-size: 14px; }
.ws-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--ws-line-strong); border-radius: 10px; background: var(--ws-sheet); color: var(--ws-ink); font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; }
.ws-button:hover { background: var(--ws-sunk); }
.ws-button--strong { background: var(--ws-ink); color: var(--ws-sheet) !important; border-color: var(--ws-ink); font-weight: 600; }
.ws-button--strong:hover { background: var(--ws-ink); }
.ws-icon-button { padding: 10px; }
.ws-text-button { border: 0; padding: 8px 0; background: transparent; text-decoration: underline; }
.ws-projects { padding: 22px 16px; border-right: 1px solid var(--ws-line); height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; }
.ws-project-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-project-heading h1 { font: 900 32px/.95 var(--ws-display); text-transform: uppercase; }
.ws-project-heading .ws-button { border-color: transparent; background: var(--ws-accent); color: var(--ws-on-accent); }
.ws-search { position: relative; display: block; }
.ws-search > .ws-icon { position: absolute; left: 12px; top: 12px; color: var(--ws-soft); }
.ws-search input { height: 44px; width: 100%; padding: 8px 10px 8px 40px; border-radius: 10px; background: var(--ws-sheet); border: 1px solid var(--ws-line-strong); font-size: 14px; }
.ws-search input::placeholder { color: var(--ws-soft); opacity: 1; }
.ws-project-groups { overflow: auto; min-height: 0; padding: 2px; margin: -2px; scrollbar-width: thin; }
.ws-group + .ws-group { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--ws-line); }
.ws-group-heading { width: 100%; border: 0; background: transparent; padding: 4px; justify-content: flex-start; }
.ws-group-heading > .ws-icon { margin-left: auto; width: 16px; height: 16px; }
.ws-group-heading[aria-expanded='false'] > .ws-icon { transform: rotate(-90deg); }
.ws-project-row { display: flex; align-items: stretch; flex-direction: column; gap: 12px; width: 100%; min-height: 60px; padding: calc(var(--ws-row-pad) + 3px) 10px; border: 1px solid var(--ws-line); background: transparent; border-radius: 8px; text-align: left; margin: 8px 0; }
.ws-project-row:hover { background: var(--ws-sunk); }
.ws-project-row.is-selected { background: var(--ws-sheet); border-color: var(--ws-ink); outline: 1px solid var(--ws-ink); outline-offset: -1px; }
.ws-project-name { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; width: 100%; overflow-wrap: anywhere; }
.ws-project-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--ws-soft); }
.ws-project-meta > .ws-mono { margin-right: 4px; }
.ws-card-client { display: block; }
.ws-card-client .ws-card-fact { gap: 2px; }
.ws-card-fact { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: var(--ws-ink); font: 400 12px/1.4 var(--ws-ui); overflow-wrap: anywhere; }
.ws-card-label { color: var(--ws-soft); font: 400 var(--ws-label)/1.4 var(--ws-mono); text-transform: uppercase; letter-spacing: .03em; }
.ws-card-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; padding-top: 10px; border-top: 1px solid var(--ws-line); }
.ws-workflow { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.ws-workflow-current { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; color: var(--ws-soft); font: 400 11px/1.4 var(--ws-ui); }
.ws-workflow-current strong { color: var(--ws-ink); font-weight: 500; }
.ws-workflow-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.ws-workflow-step { min-width: 0; display: block; padding: 5px 0; border-top: 2px solid var(--ws-line-strong); color: var(--ws-soft); text-align: center; font: 400 10px/1.3 var(--ws-ui); }
.ws-workflow-step.ws-tape { padding: 5px 0; border-top-color: transparent; color: #121416; font: 500 10px/1.3 var(--ws-ui); text-transform: none; letter-spacing: 0; }
.ws-workflow-step.ws-tape[data-stage='paid'] { color: var(--ws-stage-paid-ink); }
.ws-project-files { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.ws-project-files > .ws-card-label { margin-right: 4px; }
.ws-project-files .ws-tape { padding: 3px 8px 3px 5px; font-size: 9px; }
.ws-date-notes, .ws-recorded-dates { color: var(--ws-soft); font-size: 12px; }
.ws-date-notes summary, .ws-recorded-dates summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 12px; }
.ws-date-notes p, .ws-recorded-dates p { margin-bottom: 8px; line-height: 1.5; }
.ws-projects > .ws-date-notes { margin: -10px 0; flex: none; }
.ws-recorded-dates ul { margin: 0 0 12px; padding: 0; list-style: none; }
.ws-recorded-dates li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--ws-line); }
.ws-recorded-dates time { color: var(--ws-ink); }
.ws-record-summary { display: grid; gap: 14px; }
.ws-record-summary .ws-card-dates { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); }
.ws-record-summary .ws-workflow { max-width: 480px; }
.ws-record-summary .ws-date-notes { margin-top: -20px; }
.ws[data-labels='larger'] .ws-workflow-step { font-size: 11px; }
.ws-record { background: var(--ws-sheet); }
.ws-record-header { padding: 22px 28px 0; }
.ws-record-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ws-breadcrumb { color: var(--ws-soft); overflow-wrap: anywhere; }
.ws-record-actions { flex: none; }
.ws-record-header h1 { font: 900 clamp(38px, 3.7vw, 52px)/.98 var(--ws-display); text-transform: uppercase; overflow-wrap: anywhere; }
.ws-record-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 14px 0 16px; color: var(--ws-soft); font-size: 14px; }
.ws-record-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.ws-record-meta .ws-icon { width: 16px; height: 16px; }
.ws-kind { border: 1px solid var(--ws-line-strong); padding: 2px 6px; border-radius: 4px; }
.ws-tabs { display: flex; gap: 20px; overflow-x: auto; border-bottom: 1px solid var(--ws-line); scrollbar-width: thin; }
.ws-tabs > button { flex: none; min-width: 44px; min-height: 48px; padding: 8px 0; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--ws-soft); font-size: 14.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.ws-tabs > button[aria-selected='true'] { color: var(--ws-ink); border-bottom-color: var(--ws-accent); font-weight: 600; }
.ws-count { border-radius: 999px; padding: 1px 6px; background: var(--ws-sunk); color: var(--ws-ink); font-size: 12px; }
.ws-record-body { padding: 22px 28px 32px; display: flex; flex-direction: column; gap: 26px; }
.ws-section { display: flex; flex-direction: column; gap: 14px; }
.ws-section-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.ws-section-heading .ws-text-button, .ws-section-heading .ws-icon-button { margin-left: auto; }
.ws-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 16px 18px; border-radius: var(--ws-radius); background: var(--ws-sunk); }
.ws-next h2 { margin: 10px 0 4px; }
.ws-next p { font-size: 14px; color: var(--ws-soft); }
.ws-folders { display: flex; flex-direction: column; gap: 10px; }
.ws-folder { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 14px 16px; border: 1px solid var(--ws-line); border-radius: 10px; }
.ws-folder > .ws-tape { justify-self: start; }
.ws-folder-info { min-width: 0; }
.ws-path { font: 400 11px/1.5 var(--ws-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-folder-state { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; margin-top: 6px; font-size: var(--ws-meta); }
.ws-folder-state .ws-icon { width: 15px; height: 15px; }
.ws-outline-label { display: inline-block; padding: 2px 6px; border: 1px dashed var(--ws-line-strong); border-radius: 4px; color: var(--ws-soft); font: 400 var(--ws-label)/1.35 var(--ws-mono); }
.ws-folder-size { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.ws-folder-size strong { font: 800 22px/1 var(--ws-display); }
.ws-folder-size span { color: var(--ws-soft); font-size: var(--ws-meta); margin-top: 4px; }
.ws-folder > .ws-button { grid-column: 2 / -1; justify-self: end; }
.ws-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ws-activity li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.ws-activity-icon { width: 30px; height: 30px; background: var(--ws-sunk); display: grid; place-items: center; border-radius: 50%; }
.ws-activity-icon .ws-icon { width: 16px; height: 16px; }
.ws-activity time { color: var(--ws-soft); }
.ws-activity .ws-tape { margin-right: 4px; }
.ws-details { display: flex; flex-direction: column; gap: 22px; padding: 22px 20px; background: var(--ws-sheet); border-left: 1px solid var(--ws-line); }
.ws-stage-button { justify-content: space-between; width: 100%; padding: 7px 10px; }
.ws-stage-label { padding: 7px 10px; }
.ws-facts { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.ws-facts dt { color: var(--ws-soft); font-size: 12.5px; margin-bottom: 5px; }
.ws-facts dd { margin: 0; font-size: 14px; font-weight: 500; }
.ws-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-tags > span { padding: 3px 10px; border-radius: 999px; background: var(--ws-sunk); }
.ws-facts .ws-storage-total { font: 800 28px/1 var(--ws-display); margin-bottom: 5px; }
.ws-light { padding: 14px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); }
.ws-light h3 { display: flex; align-items: center; gap: 8px; }
.ws-light-unset { display: flex; gap: 8px; align-items: flex-start; padding: 10px 0 14px; }
.ws-light-unset > .ws-icon { color: var(--ws-soft); width: 17px; height: 17px; margin-top: 2px; }
.ws-light-unset strong { display: block; font-size: 13px; font-weight: 500; }
.ws-light-unset p { color: var(--ws-soft); font-size: 12.5px; margin-top: 4px; }
.ws-light .ws-button { width: 100%; }
.ws-billing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--ws-line); border-radius: 10px; overflow: hidden; }
.ws-billing > div { padding: 10px; min-width: 0; }
.ws-billing > div + div { border-left: 1px solid var(--ws-line); }
.ws-billing dt { color: var(--ws-soft); font-size: 12px; }
.ws-billing dd { font: 800 22px/1.2 var(--ws-display); margin: 3px 0 0; overflow-wrap: anywhere; }
.ws-sharing { padding-top: 20px; border-top: 1px solid var(--ws-line); }
.ws-sharing p { margin-bottom: 10px; }
.ws-empty { color: var(--ws-soft); padding: 12px 0; font-size: 14px; }
.ws-no-record { padding: 40px 28px; grid-column: span 2; }
.ws-no-record h1 { font: 900 40px/1 var(--ws-display); }
.ws-preparation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ws-prep { padding: 12px 14px; border: 1px solid var(--ws-line); border-radius: 8px; }
.ws-prep > span { display: block; font-weight: 600; margin-bottom: 6px; }
.ws-prep strong { display: flex; align-items: center; gap: 7px; font-weight: 400; font-size: 13px; color: var(--ws-soft); }
.ws-prep .ws-icon { width: 16px; height: 16px; }
.ws-reference-list { list-style: none; padding: 0; margin: 0; }
.ws-reference-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--ws-line); overflow-wrap: anywhere; }
.ws-reference-list li > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-reference-list a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.ws-reference-list li > div > span, .ws-reference-list li > span { font-size: 13px; color: var(--ws-soft); }
.ws-reference-list .ws-icon { width: 16px; height: 16px; }
.ws-section > .ws-button { align-self: flex-start; }
.ws-settings { position: fixed; left: 86px; bottom: 20px; z-index: 60; width: 320px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 100px); overflow-y: auto; border: 1px solid var(--ws-ink); border-radius: 12px; background: var(--ws-sheet); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ws-settings label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ws-settings select { width: 100%; min-height: 44px; border: 1px solid var(--ws-line-strong); border-radius: 8px; background: var(--ws-paper); padding: 8px 10px; }
.ws-settings-account { display: flex; gap: 8px; border-top: 1px solid var(--ws-line); padding-top: 14px; }
.ws-mobile-back, .ws-inline-details, .ws-mobile-stage { display: none; }
#openWorkspace { margin: 12px 0; min-height: 44px; }
@media (min-width: 1600px) {
  .ws-layout { grid-template-columns: 72px 300px minmax(0, 1fr) 300px; }
  .ws-folder { grid-template-columns: 100px minmax(0, 1fr) 112px auto; }
  .ws-folder > .ws-button { grid-column: auto; }
}
@media (max-width: 1199px) {
  .ws-layout { grid-template-columns: 72px 250px minmax(0, 1fr); }
  .ws-details { display: none; }
  .ws-inline-details { display: block; }
  .ws-inline-details .ws-light { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
  .ws-inline-details .ws-light h3 { width: 100%; margin: 0; }
  .ws-inline-details .ws-light-unset { flex: 1; }
  .ws-inline-details .ws-light > .ws-button { width: auto; }
  .ws-mobile-stage { display: block; margin-bottom: 8px; }
}
@media (max-width: 899px) {
  .ws-layout { display: block; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .ws-rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 40; flex-direction: row; justify-content: space-around; padding: 8px 6px calc(10px + env(safe-area-inset-bottom, 0px)); gap: 0; }
  .ws-rail-item { width: 64px !important; }
  .ws-brand, .ws-rail-spacer { display: none; }
  /* Phone tab bar keeps five items; Gear, Map and Templates stay one tap away on the Directory rail. */
  .ws-rail-wide { display: none !important; }
  .ws-projects { position: static; height: auto; min-height: calc(100dvh - 80px); padding: 24px 18px; border-right: 0; }
  .ws[data-screen='record'] .ws-projects { display: none; }
  .ws[data-screen='list'] .ws-record { display: none; }
  .ws-project-row { min-height: 66px; }
  .ws-project-groups { overflow: visible; }
  .ws-mobile-back { display: inline-flex; border: 0; background: transparent; padding-left: 0; font-size: 16px; }
  .ws-breadcrumb { display: none; }
  .ws-record-header { padding: 12px 16px 0; }
  .ws-record-header h1 { font-size: 40px; }
  .ws-record-body { padding: 18px 16px 28px; gap: 24px; }
  .ws-record-meta { margin: 12px 0; }
  .ws-record-top { margin-bottom: 14px; }
  .ws-tabs { gap: 22px; margin-top: 14px; }
  .ws-next { gap: 14px; }
  .ws-next > .ws-button { flex: none; }
  .ws-folder { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px 12px; }
  .ws-folder > .ws-tape { grid-column: 1; }
  .ws-folder-info { grid-column: 1; grid-row: 2; }
  .ws-folder-size { grid-column: 2; grid-row: 1 / 3; }
  .ws-folder > .ws-button { grid-column: 1 / -1; }
  .ws-path { white-space: normal; overflow-wrap: anywhere; }
  .ws-settings { left: 16px; right: 16px; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .ws-no-record { min-height: calc(100dvh - 80px); }
}
@media (max-width: 400px) {
  .ws-record-actions > .ws-button { padding: 9px 10px; }
  .ws-activity li { grid-template-columns: 30px minmax(0, 1fr); }
  .ws-activity time { grid-column: 2; }
  .ws-next > .ws-button { width: 100%; }
  .ws-rail .ws-rail-item { width: 58px !important; }
  .ws-inline-details .ws-light > .ws-button { width: 100%; }
}
@media print { #workspaceRoot { display: none !important; } }

/* Projects board uses the existing CRM view and workspace navigation. */
.ws .ws-board-layout { grid-template-columns: 72px minmax(0, 1fr); }
.ws-board-main { min-width: 0; padding: 24px 28px 28px; }
#boardView { min-width: 0; }
#boardView .board-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 18px; }
#boardView .board-header h1 { margin: 6px 0 0; font: 900 46px/.98 var(--ws-display); text-transform: uppercase; }
#boardView .board-header p { color: var(--ws-soft); }
#boardView .board-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#boardView .board-search { width: 300px; max-width: 100%; }
#boardView input[type='search'], #boardView select, #boardView .newjob input { min-height: 44px; min-width: 44px; padding: 9px 12px; border: 1px solid var(--ws-line-strong); border-radius: 10px; background: var(--ws-sheet); color: var(--ws-ink); font: 400 14px/1.3 var(--ws-ui); }
#boardView input[type='search'] { width: 100%; }
#boardView input::placeholder { opacity: 1; color: var(--ws-soft); }
#boardView .board-primary { background: var(--ws-accent); color: var(--ws-on-accent); border-color: var(--ws-accent); font-weight: 600; }
#boardView .boardbar { gap: 8px 18px; margin: 0 0 18px; }
#boardView .boardbar > .bmeta { margin-left: auto; }
#boardView summary { min-height: 44px; min-width: 44px; padding: 10px 0; cursor: pointer; font: 500 14px/1.6 var(--ws-ui); }
#boardView .board-filter-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 12px 0; }
#boardView .board-filter-fields > label:not(.toggle), #boardView .newjob label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
#boardView .board-filter-fields select { max-width: 260px; }
#boardView .board-sort { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
#boardView .toggle { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; color: var(--ws-soft); font-size: 13px; }
#boardView .toggle input { width: 18px; height: 18px; accent-color: var(--ws-ink); }
#boardView .board-attention { margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ws #boardView .board-attention h2 { font: 600 14px/1.3 var(--ws-ui); color: var(--ws-soft); margin: 0; }
#boardView .board-attention h2 span { font-weight: 400; margin-left: 6px; }
#boardView .stucklist { display: flex; flex-wrap: wrap; gap: 8px; }
.vault-interface #boardView .stuckrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ws-line); border-radius: 10px; background: var(--ws-sheet); color: var(--ws-ink); text-align: left; font: 400 13px/1.4 var(--ws-ui); }
#boardView .stuckrow b { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#boardView .stuckrow > span:last-child { color: var(--ws-soft); font-size: 13px; }
#boardView .board-more-attention { width: 100%; }
#boardView .board-more-attention .stucklist { max-height: 260px; overflow-y: auto; padding: 3px; }
#boardNotice:empty { display: none; }
#boardNotice { padding: 12px; margin-bottom: 16px !important; background: var(--ws-sunk); border: 1px solid var(--ws-line-strong); border-radius: 10px; font-size: 14px; }
#boardView .board { grid-auto-columns: 236px; gap: 14px; padding: 2px 2px 18px; margin: -2px; overscroll-behavior-x: contain; scrollbar-width: thin; }
#boardView .bcol { background: transparent; border: 0; border-radius: 0; padding: 0; gap: 10px; min-width: 0; }
#boardView .bhead { align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--ws-line); border-radius: 10px; background: var(--ws-sheet); min-height: 60px; }
.ws #boardView .bhead h2 { margin: 0; line-height: 1; }
.ws #boardView .bhead .ws-tape { font: 500 10px/1.2 var(--ws-mono); padding: 7px 11px 7px 8px; }
#boardView .bcount { color: var(--ws-soft); font: 400 11px/1.3 var(--ws-mono); }
#boardView .btotal { margin-left: auto; display: flex; flex-direction: column; align-items: end; gap: 3px; }
#boardView .btotal strong { font: 800 21px/1 var(--ws-display); }
#boardView .btotal span { font-size: 11px; color: var(--ws-soft); }
#boardView .bcard { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--ws-line); border-radius: 10px; background: var(--ws-sheet); }
#boardView .bcard-title { display: flex; align-items: start; gap: 8px; justify-content: space-between; }
#boardView .bcard-title h3 { margin: 0; min-width: 0; flex: 1; }
#boardView .bname { min-height: 44px; min-width: 44px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--ws-ink); font: 600 15px/1.3 var(--ws-ui); text-align: left; overflow-wrap: anywhere; }
#boardView .bname:hover { text-decoration: underline; text-underline-offset: 3px; }
#boardView .bkind { max-width: 72px; flex: none; margin-top: 3px; padding: 3px 5px; border: 1px solid var(--ws-line-strong); border-radius: 4px; color: var(--ws-soft); overflow-wrap: anywhere; }
#boardView .bclient { align-self: start; max-width: 100%; padding: 3px 9px; border-radius: 6px; background: var(--ws-sunk); font: 500 12.5px/1.5 var(--ws-ui); overflow-wrap: anywhere; }
#boardView .bdate { display: flex; align-items: center; gap: 6px; color: var(--ws-soft); font: 400 10.5px/1.5 var(--ws-mono); text-transform: uppercase; }
#boardView .bdate .ws-icon, #boardView .bwaiting .ws-icon { width: 15px; height: 15px; }
#boardView .bmeta, #boardView .bfact { color: var(--ws-soft); font: 400 12.5px/1.4 var(--ws-ui); overflow-wrap: anywhere; }
#boardView .bwaiting { display: inline-flex; align-self: start; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid var(--ws-line-strong); border-radius: 6px; font: 500 12px/1.3 var(--ws-ui); }
#boardView .bprep > p { color: var(--ws-soft); font-size: 11px; }
#boardView .bprep ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 6px 0; padding: 0; list-style: none; }
#boardView .bprep li { display: flex; justify-content: space-between; align-items: center; gap: 4px; border: 1px solid var(--ws-line); border-radius: 4px; padding: 4px; font-size: 11px; }
#boardView .bprep li b { font-weight: 500; }
#boardView .bdrives { display: flex; flex-wrap: wrap; gap: 5px; }
#boardView .bfooter { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--ws-line); }
#boardView .bfooter > div { display: flex; flex-direction: column; gap: 3px; }
#boardView .bvalue { font: 800 24px/1 var(--ws-display); }
#boardView .bvalue-label { font-size: 11px; color: var(--ws-soft); }
#boardView .bfact { text-align: right; max-width: 115px; font-size: 11px; }
#boardView .bmove-label { display: flex; flex-direction: column; gap: 4px; color: var(--ws-soft); font-size: 11px; }
#boardView .bmove { width: 100%; }
#boardView .bempty { border: 1px dashed var(--ws-line-strong); border-radius: 10px; color: var(--ws-soft); padding: 14px; font-size: 13px; }
#boardView .board-empty { padding: 16px; border: 1px solid var(--ws-line-strong); border-radius: 10px; margin-bottom: 16px !important; }
#boardView .newjob { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; width: 100%; padding: 16px; border: 1px solid var(--ws-line-strong); border-radius: 10px; background: var(--ws-sheet); }
#boardView .newjob > p { width: 100%; font-size: 13px; }
#boardView button:disabled, #boardView select:disabled { cursor: wait; opacity: .65; }
#boardView .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 899px) {
  .ws .ws-board-layout { display: block; }
  .ws-board-main { padding: 22px 16px; }
  #boardView .board-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 8px; }
  #boardView .board-header h1 { font-size: clamp(32px, 10vw, 40px); }
  #boardView .board-actions { display: contents; }
  #boardView .board-search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  #boardView .board-actions > button { grid-row: 1; padding: 9px 10px; }
  #boardView .board-actions > [data-board-list] { grid-column: 2; }
  #boardView .board-actions > #newJob { grid-column: 3; }
  #boardView .board-filter-fields { flex-direction: column; align-items: stretch; }
  #boardView .boardbar > .bmeta { margin-left: 0; }
  #boardView .board--phone { display: block; overflow: visible; margin: 0; padding: 0 0 18px; }
  #boardView .board--phone .bcol { width: 100%; }
  #boardView .board--phone .bhead { min-height: 50px; padding: 8px; }
  #boardView .board--phone .bcard { width: 100%; }
  #boardView .board-stage-tabs { position: relative; display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 4px 2px 10px; margin-bottom: 10px; scrollbar-width: thin; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
  #boardView .board-stage-tabs button { flex: none; display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 6px 8px; background: transparent; border: 1px solid var(--ws-line-strong); border-radius: 8px; color: var(--ws-ink); scroll-snap-align: start; }
  #boardView .board-stage-tabs button[aria-selected='true'] { border-color: var(--ws-ink); outline: 1px solid var(--ws-ink); outline-offset: -1px; }
  #boardView .board-stage-tabs button > span:last-child { font: 400 11px/1.3 var(--ws-mono); }
  #boardView details.board-attention { display: block; margin-bottom: 12px; padding: 0; }
  #boardView details.board-attention > summary { padding: 12px 0; color: var(--ws-soft); }
  #boardView details.board-attention > summary span { margin-left: 6px; }
}
#boardView .stuckrow .ws-tape { color: #121416; font: 500 var(--ws-label)/1.2 var(--ws-mono); }
#boardView .stuckrow .ws-tape[data-stage='paid'] { color: var(--ws-stage-paid-ink); }
#boardView .stuckrow .ws-tape:is([data-drive='S'],[data-drive='N'],[data-drive='B'],[data-drive='D']) { color: #ffffff; }

/* Reusable date editor. Storage integration remains deliberately unconnected. */
.pd-editor { display: grid; gap: 12px; max-width: 720px; color: var(--ws-ink); }
.pd-editor fieldset { min-width: 0; padding: 14px; border: 1px solid var(--ws-line-strong); border-radius: 10px; }
.pd-editor legend { padding: 0 5px; font-weight: 600; }
.pd-editor label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; font-size: 14px; }
.pd-editor input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--ws-line-strong); border-radius: 8px; padding: 10px; background: var(--ws-sheet); color: var(--ws-ink); font: 400 14px/1.3 var(--ws-ui); }
.pd-editor button { min-height: 44px; min-width: 44px; padding: 10px 14px; border: 1px solid var(--ws-line-strong); border-radius: 8px; background: var(--ws-sheet); color: var(--ws-ink); font: 500 14px/1.3 var(--ws-ui); cursor: pointer; }
.pd-editor button[type='submit'] { background: var(--ws-ink); color: var(--ws-paper); border-color: var(--ws-ink); }
.pd-editor p, .pd-editor .pd-optional { font-size: 12px; color: var(--ws-soft); }
.pd-editor .pd-optional { display: contents; }
.pd-days { display: grid; gap: 14px; }
.pd-day { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(140px, 2fr) auto; align-items: end; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--ws-line); }
.pd-editor [data-add] { margin-top: 12px; }
.pd-editor .pd-confirm { flex-direction: row; align-items: center; min-height: 44px; padding: 8px; border: 1px solid var(--ws-line-strong); border-radius: 8px; }
.pd-editor .pd-confirm input { width: 22px; height: 22px; min-height: 22px; flex: none; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-errors:empty, .pd-status:empty { display: none; }
.pd-errors { padding: 12px; border: 1px solid var(--ws-ink); border-radius: 8px; }
.pd-errors ul { margin: 0; padding-left: 18px; }
.pd-editor :disabled { opacity: .65; cursor: wait; }
@media (max-width: 599px) {
  .pd-day { grid-template-columns: minmax(0, 1fr); }
  .pd-day [data-remove] { justify-self: start; }
}

/* Add to day dialog (add-to-day.js): flat, ruled, one accent. */
.atd { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--ws-line-strong); border-radius: var(--ws-radius); background: var(--ws-sheet); color: var(--ws-ink); font: 400 15px/1.45 var(--ws-ui); }
.atd::backdrop { background: rgb(18 20 22 / .55); }
.atd-form { display: grid; gap: 8px; padding: 24px; }
.atd h2 { margin: 0; font: 600 22px/1.2 var(--ws-ui); }
.atd-what { margin: 0 0 8px; padding-bottom: 12px; border-bottom: 1px solid var(--ws-line); color: var(--ws-soft); }
.atd label { font-size: 14px; font-weight: 500; }
.atd select, .atd input[type="date"], .atd input:not([type]) { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--ws-line-strong); border-radius: 8px; background: var(--ws-paper); color: var(--ws-ink); font: inherit; }
.atd .atd-check { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ws-soft); font-weight: 400; }
.atd-check input { width: 20px; height: 20px; margin: 0; }
#atdDayRow, #atdStatusRow, .atd-new > div { display: grid; gap: 8px; }
.atd-new { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#atdDayRow[hidden], #atdStatusRow[hidden], .atd-new[hidden] { display: none; }
.atd-note { min-height: 1.45em; margin: 4px 0 0; color: var(--ws-soft); }
.atd-actions { display: flex; gap: 12px; margin-top: 8px; }
.atd-actions button { min-height: 44px; padding: 0 20px; font-size: 15px; }
@media (max-width: 420px) { .atd-new { grid-template-columns: 1fr; } .atd-form { padding: 20px 16px; } }

/* Shoot days tab (days.js): flat, ruled cards. Checks are plain text, no colored marks. */
.ws-day-list { display: flex; flex-direction: column; gap: 16px; }
.ws-day { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--ws-line-strong); border-radius: var(--ws-radius); background: var(--ws-sheet); }
.ws-day-head h3, .ws-day-form h3 { margin: 0; font: 600 20px/1.25 var(--ws-ui); }
.ws-day-head p { margin: 4px 0 0; }
.ws-day-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; margin: 0; padding: 12px 0; border-top: 1px solid var(--ws-line); border-bottom: 1px solid var(--ws-line); }
.ws-day-facts dt { color: var(--ws-soft); font-size: 14px; margin-bottom: 4px; }
.ws-day-facts dd { margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.ws-day-items li { align-items: center; }
.ws-day-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ws-day-status { min-height: 44px; padding: 0 10px; border: 1px solid var(--ws-line-strong); border-radius: 10px; background: var(--ws-paper); color: var(--ws-ink); font: 400 14px/1.2 var(--ws-ui); }
.ws-day-checks { padding: 12px 14px; border: 1px solid var(--ws-line-strong); border-radius: 10px; font-size: 15px; }
.ws-day-checks-title { margin: 0 0 6px; font-weight: 600; }
.ws-day-checks ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ws-day-note { margin: 0; min-height: 1.4em; color: var(--ws-soft); font-size: 15px; }
.ws-day-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ws-day-subhead { margin: 0; font: 600 17px/1.3 var(--ws-ui); }
.ws-day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ws-day-field { display: flex; flex-direction: column; gap: 6px; }
.ws-day-field[hidden] { display: none; }
.ws-day-wide { grid-column: 1 / -1; }
.ws-day-field label { font-size: 14px; font-weight: 500; }
.ws-day-field input, .ws-day-field select, .ws-day-field textarea { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ws-line-strong); border-radius: 10px; background: var(--ws-paper); color: var(--ws-ink); font: 400 15px/1.4 var(--ws-ui); }
.ws-day-field p { margin: 0; }
.ws-day-catalog summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 15px; }
.ws-day-catalog ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
@media (max-width: 560px) { .ws-day-grid { grid-template-columns: minmax(0, 1fr); } .ws-day { padding: 14px; } }
.ws-day-row-actions { flex-wrap: nowrap; flex-shrink: 0; }
@media (max-width: 560px) { .ws-day-items li { flex-wrap: wrap; } .ws-day-row-actions { flex-wrap: wrap; } }

/* Gear tab (gear-link.js) */
.ws-gear-tools { align-items: center; }
.ws-gear-lines { width: 100%; border-collapse: collapse; font-size: 15px; }
.ws-gear-lines th { text-align: left; font-size: 14px; font-weight: 500; color: var(--ws-soft); padding: 6px 8px; border-bottom: 1px solid var(--ws-line-strong); }
.ws-gear-lines td { padding: 8px; border-bottom: 1px solid var(--ws-line); vertical-align: top; overflow-wrap: anywhere; }
.ws-gear-lines th:nth-child(n+2), .ws-gear-lines td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.ws-gear-lines tfoot td { font-weight: 600; border-bottom: 0; }
.ws-gear-lines tfoot td:first-child { text-align: right; }
@media (max-width: 560px) { .ws-gear-lines { font-size: 14px; } .ws-gear-lines th, .ws-gear-lines td { padding: 6px 4px; } }

/* ---------- Visual pass: the project list is the panel surface, the job record is the page, the selected project
   is a tinted fill. Tabs carry an icon; a tab in a phase takes that phase's underline and icon tint. ---------- */
@media screen {
  .ws-projects { background: var(--ws-panel); }
  .ws-project-row { background: var(--ws-page); border-color: var(--ws-page-edge); }
  .ws-project-row:hover { background: var(--ws-hover); }
  .ws-project-row.is-selected { background: var(--ph-tint); border-color: var(--ws-ink); outline: 1px solid var(--ws-ink); }
  .ws-record-header h1 { font-weight: 900; }
  .ws-tabs > button { display: inline-flex; align-items: center; gap: 8px; }
  .ws-tabs > button .ws-icon { width: 18px; height: 18px; }
  .ws-tabs > button[aria-selected='true'][data-ph] { border-bottom-color: var(--ph-strong); }
  .ws-tabs > button[aria-selected='true'] .ws-icon { color: var(--ph-strong); }
  .ws-details { background: var(--ws-panel); }
}
.ws-day-check { display: flex; gap: 10px; align-items: center; font-weight: 600; min-height: 44px; }
.ws-day-check input { width: 22px; height: 22px; margin: 0; }
