/* Processes (processes.js): flat, hairlines, no boxed cards and no thick bars; the board stacks on a phone. */
.prc { padding: 4px 0 24px; }
.prc h2 { font-size: 18px; margin: 0; }
.prc-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 4px 0 14px; }
.prc-head > div:first-child { flex: 1; min-width: 220px; }
.prc-head p { margin: 4px 0 0; }
.prc-k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 0 0 8px; font-weight: 600; }
.prc-back { margin: 0 0 6px; font-size: 13px; }
.prc-back a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; }

/* the list: a row per process, its stages in numbers and a thin bar of where its runs stand */
.prc-list { border-top: 1px solid var(--line); }
.prc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; grid-template-areas: "t s tag" "t bar tag"; gap: 6px 18px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.prc-row:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.prc-t { grid-area: t; display: grid; gap: 2px; min-width: 0; }
.prc-t .dim { font-size: 13px; }
.prc-stages { grid-area: s; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); }
.prc-stages b { color: var(--text); font-variant-numeric: tabular-nums; }
.prc-bar { grid-area: bar; display: flex; gap: 2px; height: 4px; }
.prc-seg { width: var(--w); border-radius: 2px; background: color-mix(in srgb, var(--sky) calc(100% - var(--i) * 18%), var(--text-3)); }
.prc-row > .tag2 { grid-area: tag; }
.prc-new, .prc-startbox { padding: 4px 0 16px; }
.prc-form { display: grid; gap: 12px; max-width: 560px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prc-form p { margin: 0; }
.prc-f { display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.prc-f input, .prc-f select { min-height: 40px; }
.prc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prc-pick { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.prc-pick span { display: grid; gap: 2px; }
.prc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prc-tick { display: flex; gap: 8px; align-items: center; }
.prc-seg-ctl { display: inline-flex; gap: 4px; }

/* a process: the board beside the run */
.prc-page.has-run { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 0 24px; align-items: start; }
.prc-main { min-width: 0; }
.prc-board { display: grid; grid-template-columns: repeat(var(--cols), minmax(200px, 1fr)); gap: 0; overflow-x: auto; border-top: 1px solid var(--line); }
.prc-col { padding: 10px 10px 16px; border-left: 1px solid var(--line); min-height: 160px; transition: background var(--dur-1, 120ms); }
.prc-col:first-child { border-left: 0; padding-left: 0; }
.prc-col h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; display: flex; gap: 6px; }
.prc-col.ended h3 { color: var(--text-2); }
.prc-col.over { background: color-mix(in srgb, var(--sky) 8%, transparent); }
.dragging .prc-col:not(.ended) { background: color-mix(in srgb, var(--text) 2%, transparent); }
.prc-cards { display: grid; }
.prc-card { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.prc-card:first-child { border-top: 1px solid var(--line); }
.prc-card[draggable="true"] { cursor: grab; }
.prc-card:hover, .prc-card.on { background: color-mix(in srgb, var(--text) 4%, transparent); }
.prc-card p { margin: 0; }
.prc-c-t { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.prc-c-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prc-c-t .mono { font-size: 11px; }
.prc-c-s { display: flex; gap: 6px; align-items: center; font-size: 12.5px; margin-top: 4px !important; }
.prc-c-s .grow, .prr-status .grow { flex: 1; }
.prc-none { margin: 0; }
.prc-late { color: var(--bad-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

/* the run */
.prc-run { border-left: 1px solid var(--line); padding-left: 20px; position: sticky; top: 0; max-height: calc(100vh - 120px); overflow-y: auto; }
.prr-head { display: flex; gap: 10px; align-items: flex-start; flex-direction: row-reverse; justify-content: space-between; }
.prr-head h3 { margin: 0; font-size: 18px; }
.prr-head p { margin: 2px 0 0; font-size: 13px; }
.prr-strip { list-style: none; margin: 16px 0 8px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.prr-strip li { font-size: 12px; color: var(--text-3); display: grid; gap: 2px; }
.prr-strip li::before { content: ""; height: 3px; border-radius: 2px; background: var(--line-2); margin-bottom: 4px; }
.prr-strip li.done::before { background: var(--text-3); }
.prr-strip li.now { color: var(--text); }
.prr-strip li.now::before { background: var(--canopy); }
.prr-strip li.end::before { background: var(--ok); }
.prr-strip i { font-style: normal; font-size: 11px; }
.prr-status { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 14px; flex-wrap: wrap; }
.prr-sec { padding: 14px 0; border-top: 1px solid var(--line); margin-top: 14px; }
.prr-sec p { margin: 0 0 6px; }
.prr-asks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prr-asks li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 14px; }
.prr-asks li.ok { color: var(--text-2); }
.prr-asks li.ok svg { color: var(--ok); width: 16px; height: 16px; }
.prr-o { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--text-3); display: inline-block; margin-left: 2px; }
.prr-next { display: grid; gap: 10px; }
.prr-b { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; }
.prr-why { flex-basis: 100%; color: var(--text-2); font-size: 12.5px; margin: 0; }
.prr-confirm { margin: 10px 0 0 !important; font-size: 13px; color: var(--warn); }
.prr-msgs { display: grid; gap: 10px; margin-bottom: 10px; }
.prr-m p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.prr-m p.dim { font-size: 12px; }
.prr-m.subject { padding-left: 10px; border-left: 1px solid var(--line-2); }
.prr-say { display: grid; gap: 8px; }
.prr-say textarea { width: 100%; }
/* Onboarding's drafts (CLIENT-PORTAL §7): the team's to read, change, save or send. */
.prr-draft { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.prr-draft:first-of-type { border-top: 0; padding-top: 0; }
.prr-draft-h { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.prr-draft textarea { width: 100%; font-size: 14px; line-height: 1.45; }
.prr-draft-n { margin: 0; font-size: 12.5px; }
.prr-url { display: flex; gap: 8px; }
.prr-url input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.prr-see { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 2px; }
.prr-hist summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.prr-hist ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.prr-hist li { display: grid; gap: 1px; }
.prc-picks, .prc-found { display: grid; gap: 12px; }
.prc-pick > svg { flex: none; margin-top: 2px; color: var(--text-2); }
.prc-found:empty { display: none; }
/* the third round: the way out in words, steps, what waits for a yes, what it waits for, what they are here */
.prr-exit { margin: 8px 0 0; font-size: 13px; }
.prr-steps li { grid-template-columns: 18px minmax(0, 1fr) auto auto; }
.prr-steps li.dim { color: var(--text-3); }
.prr-act { display: grid; gap: 8px; padding: 8px 0; }
.prr-act + .prr-act { border-top: 1px solid var(--line); }
.prr-act p { margin: 0; }
.prr-quote { padding-left: 10px; border-left: 1px solid var(--line-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.prr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.prr-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; }
.prr-list li.dim { color: var(--text-3); }
.prr-list svg { color: var(--text-3); margin-top: 1px; }
.prr-rel { display: flex; flex-wrap: wrap; gap: 6px; }
/* the fourth round: describe it, job links, supplier jobs, a check's result */
.prc-proj { max-width: 560px; margin: 0 0 4px; }
.prc-describe textarea { width: 100%; box-sizing: border-box; }
.prc-describe .prc-actions { align-items: center; flex-wrap: wrap; }
.prc-or { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 14px 0 0; font-size: 12.5px; }
.prc-or::before, .prc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.prc-or + .prc-form { border-top: 0; }
.prc-applybox { margin: 10px 0 18px; }
.prc-apply { display: grid; gap: 8px; max-width: 640px; }
.prc-apply > p { margin: 0; }
.prc-alist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.prc-alist li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.prc-alist li > span { min-width: 0; overflow-wrap: anywhere; }
.prc-ab { display: block; margin-top: 2px; }
.prc-aform textarea { width: 100%; box-sizing: border-box; }
.prc-days input { width: 80px; }
.prr-sub2, .prr-steps li.prr-sub2 { list-style: none; padding: 2px 0 6px 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-size: 13px; }
.prr-sub2 p { margin: 0; overflow-wrap: anywhere; }
.prr-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prr-pick select { min-width: 0; max-width: 100%; flex: 1 1 180px; }
.prr-pre { margin: 6px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
@media (max-width: 640px) { .prr-sub2, .prr-steps li.prr-sub2 { padding-left: 0; } .prc-alist li { flex-wrap: wrap; } }

@media (max-width: 900px) {
  .prc-page.has-run { display: block; }
  .prc-page.has-run .prc-main { display: none; }
  .prc-run { border-left: 0; padding-left: 0; position: static; max-height: none; }
}
@media (max-width: 640px) {
  .prc-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "s" "bar" "tag"; }
  .prc-row > .tag2 { justify-self: start; }
  .prc-board { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .prc-col { border-left: 0; padding: 12px 0; border-top: 1px solid var(--line); min-height: 0; }
  .prc-col:first-child { border-top: 0; }
  .prc-two { grid-template-columns: 1fr; }
}

/* The one table (task-table.js): editing a cell where it stands, and the Columns menu (PROCESSES §5). */
.tt-ed { cursor: text; }
.tt-ed:hover { box-shadow: inset 0 -1px 0 var(--line-2); }
.tt-ed:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tt-ph, .tt-na { color: var(--text-3); }
.tt-saving { opacity: .55; }
.tt-cell-ed { width: 100%; min-width: 120px; min-height: 32px; font: inherit; padding: 4px 6px; }
.tt-cols { position: relative; }
.tt-cols summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 4px 0; list-style: none; }
.tt-cols summary::-webkit-details-marker { display: none; }
.tt-cols[open] .tt-cols-box { position: absolute; right: 0; top: 100%; z-index: var(--z-popover); width: min(340px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; background: var(--pop-bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--elev-2, 0 8px 24px rgb(0 0 0 / 25%)); }
.tt-cols-l { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.tt-cols-l li { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 13.5px; }
.tt-cols-l label { display: flex; gap: 6px; align-items: center; min-width: 0; }
.tt-add { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.tt-add p { margin: 0; }
.tt-k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.tt-note { font-size: 12px; }
@media (max-width: 640px) { .tt-cols[open] .tt-cols-box { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; } }
.prc .linkbtn, .tt-cols .linkbtn { background: none; border: 0; padding: 0; min-height: 0; color: var(--sky); cursor: pointer; font: inherit; font-size: 13.5px; }
.prc .linkbtn:hover, .tt-cols .linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
/* A template's table with many columns: each keeps a readable width and the table scrolls inside its own box on a desktop. */
@media (min-width: 781px) {
  .tt-t th { white-space: nowrap; }
  .tt-t td { min-width: 96px; }
  .tt-t td.tt-title { min-width: 220px; }
  .tt-t td.tt-ref { white-space: nowrap; }
  .tt-t td:not(.tt-title) { max-width: 320px; }
}

/* The one table, live and shared (task-table.js, TASK-TEMPLATES §18e): who is here and in which cell, sort and group,
   a new task in the last row, a paste's preview, and saved views. Flat: hairlines, a coloured rule, no boxes. */
.tt-pop { position: relative; }
.tt-pop summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 4px 0; list-style: none; display: inline-flex; gap: 6px; align-items: center; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-pop summary::-webkit-details-marker { display: none; }
.tt-pop summary::after { content: ''; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; flex: none; }
.tt-pop[open] .tt-pop-box { position: absolute; right: 0; top: 100%; z-index: var(--z-popover); width: min(320px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; background: var(--pop-bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--elev-2, 0 8px 24px rgb(0 0 0 / 25%)); }
.tt-vl { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 1px; }
.tt-vi { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 4px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.tt-vi:hover { background: var(--ink-2); }
.tt-vi:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tt-vi[aria-pressed="true"] { box-shadow: inset 2px 0 0 var(--canopy); font-weight: 600; }
.tt-tag { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.tt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); display: inline-block; }
.tt-vacts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 2px 0 10px; }
.tt-vacts:empty { display: none; }
.tt-vnew { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.tt-vnew p { margin: 0; }
.tt-vnew input[name="name"] { background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 9px; color: var(--text); font: 13.5px var(--sans); }
.tt-views .linkbtn { background: none; border: 0; padding: 0; min-height: 0; color: var(--sky); cursor: pointer; font: inherit; font-size: 13px; }
.tt-group { flex-direction: row; align-items: center; gap: 6px; }
.tt-group select { padding: 4px 8px; font-size: 12.5px; }

/* Rows from outside waiting for a person: a quiet warn-coloured word on the tools line, not a box. */
.tt-wait { background: none; border: 0; border-left: 2px solid var(--warn); padding: 2px 0 2px 7px; min-height: 26px; color: var(--warn); font: 600 12.5px var(--sans); cursor: pointer; white-space: nowrap; }
.tt-wait:hover { text-decoration: underline; }
.tt-wait[aria-pressed="true"] { color: var(--text); border-left-color: var(--text-2); font-weight: 500; }

/* Who else is on this table: their initials, each in their colour (the same for everyone looking). */
.tt-here { display: inline-flex; align-items: center; gap: 0; min-height: 26px; }
.tt-here:empty { display: none; }
.tt-face { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 10.5px var(--sans); letter-spacing: .02em; color: #fff;
  background: hsl(var(--who, 212) 55% 42%); box-shadow: 0 0 0 2px var(--content-bg, var(--paper)); margin-left: -6px; }
.tt-face:first-child { margin-left: 0; }
.tt-face-n { background: var(--ink-3); color: var(--text); }
.tt-here-w { font-size: 12px; color: var(--text-2); margin-left: 8px; white-space: nowrap; }
/* The cell someone else is in: their colour round it and their name on it. */
.tt-t td.tt-by { position: relative; box-shadow: inset 0 0 0 2px hsl(var(--who, 212) 60% 50%); }
.tt-t td.tt-by::after { content: attr(data-by); position: absolute; top: 2px; right: 2px; font: 600 10px/1.5 var(--sans); padding: 0 5px; border-radius: 2px; color: #fff; background: hsl(var(--who, 212) 60% 42%); pointer-events: none; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
/* A row someone else just changed: a moment's tint, then nothing. */
@keyframes tt-flash { from { background: color-mix(in srgb, var(--canopy) 16%, transparent); } to { background: transparent; } }
.tt-t tr.tt-flash td { animation: tt-flash 1.6s var(--ease-out, ease-out); }
@media (prefers-reduced-motion: reduce) { .tt-t tr.tt-flash td { animation: none; box-shadow: inset 0 -1px 0 var(--canopy); } }

/* Sort by a column's head; groups under a heading line. */
.tt-th { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: baseline; font: inherit; color: inherit; }
.tt-th:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.tt-sort { color: var(--canopy-2); font-size: 11px; }
.tt-t tr.tt-grp th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 14px 0 6px !important; border-bottom: 1px solid var(--line-2); background: none; cursor: default; }
.tt-t tr.tt-grp:hover th { background: none; }

/* The last row: a new task, typed where it will stand. */
.tt-t tfoot tr.tt-new td { padding: 6px 14px 6px 0 !important; border-top: 1px solid var(--line); vertical-align: middle; }
.tt-t tfoot .tt-plus { color: var(--text-3); font-size: 16px; text-align: center; }
.tt-new input, .tt-new select { width: 100%; min-width: 90px; box-sizing: border-box; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 5px 2px; color: var(--text); font: 13.5px var(--sans); outline: 0; }
.tt-new input::placeholder { color: var(--text-3); }
.tt-new input:focus, .tt-new select:focus { border-bottom-color: var(--canopy); }
.tt-new [aria-invalid="true"] { border-bottom: 2px solid var(--bad); }
.tt-new.tt-saving { opacity: .55; pointer-events: none; }
.tt-new-msg { margin: 6px 0 0; font-size: 12.5px; color: var(--bad); }
.tt-new-msg.ok { color: var(--ok); }

/* A paste's preview: each row checked by the Gate, the refused ones with its words. */
.tt-dlg { width: min(880px, 100%); }
.tt-dlg h2 { margin: 0 0 10px; font-size: 17px; }
.tt-paste-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; margin-bottom: 8px; }
.tt-paste-t { max-height: 52vh; overflow: auto; }
.tt-paste-t .tt-t tbody tr { cursor: default; }
.tt-paste-t .tt-t tbody tr:hover td { background: none; }
.tt-mark { width: 22px; color: var(--text-3); }
.tt-good .tt-mark { color: var(--ok); }
.tt-bad .tt-mark, .tt-bad-why td, .tt-err { color: var(--bad); }
.tt-bad-cell { text-decoration: underline wavy var(--bad); text-underline-offset: 3px; }
.tt-t tr.tt-bad-why td { font-size: 12.5px; padding-top: 0 !important; }
.tt-paste-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

@media (max-width: 780px) {
  .tt-t tfoot { display: block; }
  .tt-t tfoot tr.tt-new { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line-2); }
  .tt-t tfoot tr.tt-new td { border: 0 !important; padding: 0 !important; display: flex; align-items: center; gap: 10px; }
  .tt-t tfoot tr.tt-new td.tt-nx, .tt-t tfoot tr.tt-new td.tt-plus { display: none; }
  .tt-t tfoot tr.tt-new td.tt-title { order: -1; }
  .tt-t tr.tt-grp { padding: 0; border-bottom: 0; }
  .tt-t tr.tt-grp th { display: block; padding: 16px 0 6px !important; }
  .tt-t td.tt-by::after { top: 50%; transform: translateY(-50%); right: 4px; }
  .tt-pop[open] .tt-pop-box { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; }
  .tt-paste-t .tt-t thead { display: none; }
  .tt-here-w { display: none; }
}

/* The table takes the room it is given (§18e): one line of tools, then rows to the window's foot; the head sticks, Ref
   and Task stay on the left while the rest scrolls under them, columns are dragged wider, and the next rows come as the
   end nears. On a phone it stays blocks of label and value, the page itself scrolling. */
.tt-table .tt-tools { flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0 0 8px; min-height: 34px; }
.tt-table .tt-tools > * { flex: 0 0 auto; }
.tt-table .tt-tools .tt-sp { flex: 1 1 0; min-width: 0; }
.tt-search { flex: 0 1 280px !important; min-width: 150px; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--text-3); background: transparent; }
.tt-search:focus-within { border-color: var(--canopy); color: var(--text-2); }
.tt-search svg { width: 15px; height: 15px; flex: none; }
.tt-search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--text); font: 13.5px var(--sans); padding: 0; }
.tt-search input::-webkit-search-cancel-button { cursor: pointer; }
.tt-sel { height: 32px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text-2); font: 13px var(--sans); padding: 0 8px; cursor: pointer; max-width: 200px; }
.tt-sel:hover, .tt-sel:focus { border-color: var(--line-2); color: var(--text); outline: 0; }
.tt-table .tt-pop > summary { height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; color: var(--text-2); }
.tt-table .tt-pop > summary:hover, .tt-table .tt-pop[open] > summary { border-color: var(--line-2); color: var(--text); }
.tt-table .tt-pop > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.tt-tools .tt-more { flex-basis: auto; }
.tt-tools .tt-more[open] .tt-pop-box { left: 0; right: auto; width: min(640px, calc(100vw - 32px)); }
.tt-tools .tt-more .tt-filters { border-left: 0; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.tt-exp-box { display: grid; gap: 1px; width: 180px !important; }
.tt-table .tt-cols[open] .tt-cols-box { position: absolute; }
@media (max-width: 640px) { .tt-table .tt-cols[open] .tt-cols-box { position: fixed; } } /* a sheet at the foot on a phone, not squeezed under its button */

/* The rows' room: scrolled inside, to the window's foot (fit() in task-table.js sets the height). */
.tt-table .tt-scroll { overflow: auto; border-top: 0; overscroll-behavior: contain; }
.tt-table .tt-t { border-collapse: separate; border-spacing: 0; }
.tt-table .tt-t thead th { position: sticky; top: 0; z-index: calc(var(--z-raise) + 1); background: var(--content-bg, var(--paper)); box-shadow: inset 0 -1px 0 var(--line-2); font-size: 12px; font-weight: 600; color: var(--text-2); padding: 0 !important; height: 34px; }
.tt-table .tt-t thead th .tt-th { padding: 0 14px 0 10px; height: 34px; box-sizing: border-box; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.tt-table .tt-t td { padding: 9px 14px 9px 10px !important; border-bottom: 1px solid var(--line); background: var(--content-bg, var(--paper)); }
.tt-table .tt-t tbody tr:hover td { background: var(--ink-2); }
.tt-table .tt-t tbody tr:focus-within td, .tt-table .tt-t tbody tr:focus td { background: var(--ink-2); }
.tt-table .tt-t td[data-edit]:focus { outline: 2px solid var(--focus); outline-offset: -2px; }
/* Ref and Task frozen on the left: the second sits after the first's width (--tt-c1, measured). */
@media (min-width: 781px) {
  .tt-table .tt-t tr:not(.tt-grp) > :nth-child(1) { position: sticky; left: 0; z-index: var(--z-raise); }
  .tt-table .tt-t tr:not(.tt-grp) > :nth-child(2) { position: sticky; left: var(--tt-c1, 0px); z-index: var(--z-raise); box-shadow: inset -1px 0 0 var(--line-2); }
  .tt-table .tt-t thead tr > :nth-child(-n+2) { z-index: calc(var(--z-raise) + 2); }
  .tt-table .tt-t thead tr > :nth-child(2) { box-shadow: inset -1px 0 0 var(--line-2), inset 0 -1px 0 var(--line-2); }
  .tt-table .tt-t tfoot td { background: var(--content-bg, var(--paper)); }
  .tt-table .tt-t tfoot tr > :nth-child(-n+2) { position: sticky; z-index: var(--z-raise); }
  .tt-table .tt-t tfoot tr > :nth-child(1) { left: 0; }
  .tt-table .tt-t tfoot tr > :nth-child(2) { left: var(--tt-c1, 0px); box-shadow: inset -1px 0 0 var(--line-2); }
  .tt-table .tt-t tfoot { position: sticky; bottom: 0; z-index: calc(var(--z-raise) + 1); }
  .tt-table .tt-t tfoot tr.tt-new td { border-top: 1px solid var(--line-2); }
  .tt-table .tt-t td.tt-title { min-width: 240px; }
  .tt-table .tt-grp-b { position: sticky; left: 10px; }
}
/* Drag a column's right edge to widen it; a double-click gives it back its own width. */
.tt-rz { position: absolute; top: 6px; bottom: 6px; right: -3px; width: 7px; cursor: col-resize; z-index: calc(var(--z-raise) + 3); }
.tt-rz::after { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: transparent; }
.tt-t thead th:hover .tt-rz::after, .tt-t thead th.tt-rzing .tt-rz::after { background: var(--canopy); }
.tt-table .tt-t thead th { position: sticky; }
.tt-rzing { cursor: col-resize; user-select: none; }
/* Groups: a heading that folds its rows. */
.tt-grp-b { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font: 600 12.5px var(--sans); color: var(--text); padding: 2px 0; }
.tt-grp-b:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tt-chev { display: inline-block; transition: transform var(--dur-1, .12s); color: var(--text-3); }
.tt-grp-b[aria-expanded="true"] .tt-chev { transform: rotate(90deg); }
.tt-table .tt-t tr.tt-grp th { position: static; padding: 14px 10px 6px !important; background: var(--content-bg, var(--paper)); border-bottom: 1px solid var(--line-2); }
/* The end of the rows: more are being read. */
.tt-end { height: 1px; }
.tt-end.on { height: 40px; }
.tt-end.busy::after { content: 'Loading more…'; display: block; text-align: center; font-size: 12px; color: var(--text-3); padding: 12px 0; }
.tt-foot { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding-top: 6px; }
.tt-foot .tt-count { margin: 0; }
.tt-foot .tt-new-msg { margin: 0; }
/* Compact rows. */
.tt-dense .tt-t td { padding-top: 4px !important; padding-bottom: 4px !important; font-size: 13px; }
.tt-dense .tt-t thead th, .tt-dense .tt-t thead th .tt-th { height: 30px; }
.tt-dense-l { margin: 4px 0 8px; }

/* A template's page: its name, what it is and its actions on one line, the tabs flush under it, the table below. */
#tpPage { max-width: none; padding-bottom: 12px; }
#tpPage .tt-area { margin-bottom: 12px; }
.te-head { margin-bottom: 4px; align-items: center; gap: 10px 16px; flex-wrap: nowrap; }
.te-head-t { min-width: 0; flex: 1; }
.te-head h1 { font-size: 21px; }
.te-head .tk-meta { margin: 4px 0 0; font-size: 12.5px; color: var(--text-2); flex-wrap: nowrap; overflow: hidden; }
.te-head .te-desc { margin: 0 0 0 4px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.te-head .te-desc::before { content: '·'; margin-right: 6px; }
.te-head .actions { flex: none; }
#tpPage .te-tabs { margin-bottom: 10px; }

@media (max-width: 780px) {
  .tt-table .tt-tools { flex-wrap: wrap; }
  .tt-search { flex: 1 1 100% !important; }
  .tt-table .tt-tools .tt-sp { display: none; }
  .tt-table .tt-t td { background: none; border-bottom: 0; padding: 2px 0 !important; }
  .tt-table .tt-t tbody tr { border-bottom: 1px solid var(--line); }
  .tt-rz { display: none; }
  .tt-tools .tt-more[open] .tt-pop-box { position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; }
  .te-head { flex-wrap: wrap; }
  .te-head .te-desc { display: none; }
}

/* One line a cell, as a spreadsheet: a long value ends in … (its full words on the task, or widen the column). */
.tt-table .tt-t td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.tt-table .tt-t td .tt-why { display: none; }
.tt-table .tt-t td.tt-title { max-width: 420px; }
@media (max-width: 780px) {
  /* A phone: each row a short block — its title, then label over value, two to a line. */
  .tt-table .tt-t tbody tr[data-row] { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 12px 0; }
  .tt-table .tt-t tbody tr[data-row] td { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; white-space: normal; max-width: none; min-width: 0; overflow: visible; }
  .tt-table .tt-t tbody tr[data-row] td::before { flex: none; font-size: 11px; letter-spacing: .02em; }
  .tt-table .tt-t tbody tr[data-row] td.tt-title { grid-column: 1 / -1; font-size: 15px; }
  .tt-table .tt-t tbody tr[data-row] td.tt-title::before { display: none; }
  .tt-table .tt-t tbody tr[data-row] td.tt-ref { order: -2; grid-column: 1 / -1; font-size: 11.5px; margin-bottom: -6px; }
  .tt-table .tt-t tbody tr[data-row] td.tt-ref::before { display: none; }
  .tt-table .tt-t tbody tr[data-row] td.tt-ed { min-height: 40px; }
  .tt-table .tt-t td.tt-by::after { top: 0; transform: none; }
}

/* Tasks › All shown as the table: only the List · Calendar · Table switch above the table's own tools. */
.tl-as-table > .tl-filters, .tl-as-table > .tl-morebox { display: none !important; }
.tl-as-table .tl-body > .pn-pad { padding-top: 10px; }
.tt-tools .tl-view { display: inline-flex; gap: 4px; margin-left: 4px; }
.tt-tools .tl-view .fchip { height: 30px; }

/* A template's page: its panes as quiet tabs on the title line, so the table is the page. */
.te-head .actions { align-items: center; gap: 12px; }
.te-head .te-tabs { margin: 0; border: 0; gap: 2px; display: flex; }
.te-head .te-tabs button { padding: 6px 10px; font-size: 13px; border-radius: 6px; border-bottom: 0; }
.te-head .te-tabs button.on { background: var(--ink-2); color: var(--text); box-shadow: none; }
@media (max-width: 780px) {
  .te-head .actions { width: 100%; justify-content: space-between; }
  .te-head .te-tabs { overflow-x: auto; }
}

/* Airtable's ways, in the table (§18e): a column's menu on its head, "+" for a new column, heads dragged to reorder,
   rows picked with a tick for one change on all of them, and the board. */
.tt-table .tt-t thead th { position: sticky; }
.tt-hm { all: unset; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; font-size: 10px; color: var(--text-3); opacity: 0; cursor: pointer; }
.tt-t thead th:hover .tt-hm, .tt-hm:focus-visible { opacity: 1; }
.tt-hm:hover { background: var(--ink-3); color: var(--text); }
.tt-hm:focus-visible { outline: 2px solid var(--focus); }
.tt-hpop { position: fixed; z-index: var(--z-menu); min-width: 220px; max-width: min(320px, calc(100vw - 16px)); background: var(--pop-bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px; box-shadow: var(--elev-2, 0 8px 24px rgb(0 0 0 / 25%)); display: grid; gap: 1px; }
.tt-hpop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.tt-hpop .tt-add-pop { border-top: 0; padding: 6px; }
.tt-hpop .tt-add-pop input, .tt-hpop .tt-add-pop select { background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 9px; color: var(--text); font: 13.5px var(--sans); }
.tt-addcol { width: 44px; min-width: 44px; }
.tt-addcol-b { all: unset; width: 100%; height: 34px; display: grid; place-items: center; font-size: 17px; color: var(--text-3); cursor: pointer; }
.tt-addcol-b:hover { color: var(--text); background: var(--ink-2); }
.tt-addcol-b:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tt-t thead th[draggable="true"] { cursor: grab; }
.tt-t thead th.tt-dragging { opacity: .4; }
.tt-t thead th.tt-dropl { box-shadow: inset 2px 0 0 var(--canopy), inset 0 -1px 0 var(--line-2) !important; }
.tt-t thead th.tt-dropr { box-shadow: inset -2px 0 0 var(--canopy), inset 0 -1px 0 var(--line-2) !important; }
/* Picking rows: the tick sits where the Ref is, shown on hover or once any row is picked. */
.tt-refh { white-space: nowrap; }
.tt-refh-in { display: flex; align-items: center; height: 34px; }
.tt-refh .tt-th { display: inline-flex; padding-left: 0 !important; width: auto !important; }
.tt-selall, .tt-selr { display: inline-flex; align-items: center; margin-right: 6px; vertical-align: middle; }
.tt-selall input, .tt-selr input { accent-color: var(--canopy); width: 14px; height: 14px; margin: 0; cursor: pointer; }
.tt-refh .tt-selall { padding-left: 10px; }
@media (hover: hover) { .tt-selr input { opacity: 0; } .tt-t tr:hover .tt-selr input, .tt-selr input:checked, .tt-selr input:focus-visible, .tt-table:has(.tt-bulk) .tt-selr input { opacity: 1; } }
.tt-t tr.tt-picked td { background: color-mix(in srgb, var(--canopy) 9%, var(--content-bg, var(--paper))) !important; }
.tt-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 10px; margin: 0 0 8px; border-left: 2px solid var(--canopy); background: var(--ink-2); font-size: 13px; }
.tt-bulk-set { display: inline-flex; gap: 6px; align-items: center; }
.tt-bulk select, .tt-bulk input { height: 30px; background: var(--content-bg, var(--paper)); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 8px; color: var(--text); font: 13px var(--sans); }
.tt-bulk .linkbtn { background: none; border: 0; color: var(--sky); cursor: pointer; font: inherit; }
/* Table · Board */
.tt-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; height: 30px; }
.tt-seg button { all: unset; padding: 0 10px; font-size: 12.5px; color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.tt-seg button[aria-pressed="true"] { background: var(--ink-2); color: var(--text); font-weight: 600; }
.tt-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tt-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 0; overflow-x: auto; min-height: 420px; border-top: 1px solid var(--line); }
.tt-lane { border-left: 1px solid var(--line); padding: 10px 10px 16px; min-width: 0; }
.tt-lane:first-child { border-left: 0; padding-left: 0; }
.tt-lane h3 { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; gap: 6px; }
.tt-lane.tt-over { background: color-mix(in srgb, var(--canopy) 7%, transparent); }
.tt-lane-b { display: grid; gap: 6px; align-content: start; }
.tt-card { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--content-bg, var(--paper)); cursor: pointer; font-size: 13px; }
.tt-card[draggable="true"] { cursor: grab; }
.tt-card:hover { border-color: var(--line-3, var(--line-2)); }
.tt-card:focus-visible { outline: 2px solid var(--focus); }
.tt-card.tt-dragging { opacity: .4; }
.tt-card .mono { font-size: 11px; }
.tt-card-f { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-as-board .tt-group { display: none; }
@media (max-width: 780px) {
  .tt-board { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; }
  .tt-lane { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0; }
  .tt-hm { opacity: 1; }
}

/* Narrow widths (rows as blocks): a row is one block under the pointer — tinted whole, a canopy rule on its edge — never
   a patchwork of tinted cells; a cell you can edit gets its own quiet underline only on focus. */
@media (max-width: 780px) {
  .tt-table .tt-t tbody tr[data-row] { margin: 0 -10px; padding: 12px 10px; border-radius: 0; transition: background var(--dur-1, .12s); }
  .tt-table .tt-t tbody tr[data-row]:hover td, .tt-table .tt-t tbody tr[data-row]:focus-within td, .tt-table .tt-t tbody tr[data-row]:focus td { background: none !important; }
  .tt-table .tt-t tbody tr[data-row]:hover, .tt-table .tt-t tbody tr[data-row]:focus-within { background: var(--ink-2); box-shadow: inset 2px 0 0 var(--canopy); }
  .tt-table .tt-t tbody tr.tt-picked { background: color-mix(in srgb, var(--canopy) 9%, transparent); }
  .tt-table .tt-t tbody tr.tt-picked td { background: none !important; }
  .tt-table .tt-ed:hover { box-shadow: none; }
  .tt-table .tt-ed:focus-visible { outline: 0; box-shadow: inset 0 -2px 0 var(--focus); }
  .tt-table .tt-t tbody tr[data-row] td.tt-ref { flex-direction: row; align-items: center; gap: 6px; }
  .tt-selr input { opacity: 1 !important; }
  .tt-seg button { padding: 0 8px; }
}

/* A link cell's picker: the rows of the other table, searched; the chosen ones as chips. */
.tt-link { display: grid; gap: 6px; width: min(300px, calc(100vw - 32px)); }
.tt-link p { margin: 0; }
.tt-link input[type=search] { background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 9px; color: var(--text); font: 13.5px var(--sans); }
.tt-link-on { display: flex; flex-wrap: wrap; gap: 4px; }
.tt-link-on:empty { display: none; }
.tt-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ink-3); font-size: 12.5px; }
.tt-chip button { all: unset; cursor: pointer; color: var(--text-3); padding: 0 2px; }
.tt-chip button:hover { color: var(--text); }
.tt-link-l { max-height: 240px; overflow: auto; display: grid; gap: 1px; }
.tt-link-l .tt-vi[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--canopy); font-weight: 600; }
.tt-link-acts { display: flex; align-items: center; gap: 8px; }
.tt-link-acts .linkbtn, .tt-hpop .linkbtn { background: none; border: 0; padding: 0; color: var(--sky); cursor: pointer; font: inherit; font-size: 13px; }
/* A record's panel. */
.tt-rec { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 6px 16px; margin: 12px 0; font-size: 13.5px; }
.tt-rec dt { color: var(--text-3); }
.tt-rec dd { margin: 0; overflow-wrap: anywhere; }
.tt-rec-links { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 4px; font-size: 13.5px; }
.tt-rec-h summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.tt-rec-h ul { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; font-size: 12.5px; max-height: 220px; overflow: auto; }
.tt-empty-view { padding: 24px 0; }
/* The calendar: a month, Monday first; a row on its day. */
.tt-cal-h { display: flex; align-items: center; gap: 8px; padding: 4px 0 10px; }
.tt-cal-h b { font-size: 14px; min-width: 140px; text-align: center; }
.tt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tt-wd { padding: 6px 8px; font-size: 11.5px; color: var(--text-3); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; }
.tt-day { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tt-day-x { background: color-mix(in srgb, var(--ink-2) 50%, transparent); }
.tt-dn { font-size: 12px; color: var(--text-3); }
.tt-today .tt-dn { color: var(--canopy-2); font-weight: 700; }
.tt-ev { all: unset; cursor: pointer; font-size: 12px; padding: 2px 6px; border-left: 2px solid var(--canopy); background: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-ev:hover { background: var(--ink-3); }
.tt-ev:focus-visible { outline: 2px solid var(--focus); }
.tt-more-n { font-size: 11.5px; }
/* The map. */
.tt-map { height: min(62vh, 560px); border-top: 1px solid var(--line); }
.tt-map-l { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.tt-map-l .tt-vi { width: auto; }
@media (max-width: 780px) {
  .tt-cal { grid-template-columns: 1fr; border-left: 0; }
  .tt-wd, .tt-day-x, .tt-day-0 { display: none; }
  .tt-day { min-height: 0; border-right: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 8px 0; }
  .tt-dn { width: 28px; }
  .tt-map { height: 52vh; }
}

/* Tables (tables.js): the list of every table, and one table at full width. */
.tbl-page { max-width: none; }
.tbl-one { padding-bottom: 12px; }
.tbl-head { margin-bottom: 10px; align-items: center; }
.tbl-ul { list-style: none; margin: 0 0 22px; padding: 0; border-top: var(--hair); }
.tbl-row { display: flex; align-items: center; gap: 12px; border-bottom: var(--hair); padding: 8px 0; }
.tbl-a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.tbl-a svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.tbl-a span { display: flex; flex-direction: column; min-width: 0; }
.tbl-a span .dim { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.tbl-pin { display: flex; gap: 6px; flex: none; }
.tbl-new { display: grid; gap: 10px; }
.tbl-new .tt-f input, .tbl-new .tt-f select { width: 100%; }
@media (max-width: 780px) { .tbl-pin .need-owner { display: none; } }

.tt-table [hidden] { display: none !important; }

/* Built-in columns (PROCESSES §9b): read here, changed where they live — drawn plain, the reason on hover. */
.tt-t td.tt-lockd { color: var(--text-2); cursor: default; }
.tt-lock { color: var(--text-3); }
/* The tick in a row's name when Ref is hidden (the least: Task, Assigned). */
.tt-t td.tt-tick { white-space: nowrap; }
.tt-t td.tt-tick .tt-selr { margin-right: 8px; }
@media (min-width: 781px) { .tt-table .tt-t.tt-one-frozen tr:not(.tt-grp) > :nth-child(2), .tt-table .tt-t.tt-one-frozen tfoot tr > :nth-child(2) { position: static; box-shadow: none; } .tt-table .tt-t.tt-one-frozen tr > :nth-child(1) { box-shadow: inset -1px 0 0 var(--line-2); } }
/* A view the table has nothing for: shown, quiet, its reason on hover (and said on a tap). */
.tt-seg button.tt-off { color: var(--text-3); opacity: .55; cursor: not-allowed; }
/* "Add a column": a palette, step by step; a sheet from the bottom on a phone. */
.vw-dlg-back.tt-pal-back { align-items: start; padding-top: 12vh; }
.vw-dlg.tt-pal { width: min(520px, 100%); padding: 0; }
.tt-pal-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--ink-2); color: var(--text-2); font: 600 12.5px var(--sans); }
.tt-pal-o[aria-selected="true"] .tt-pal-ic { background: var(--ink-3); color: var(--text); }
.tt-pal-in { display: grid; gap: 10px; padding: 14px 16px 16px; }
.tt-pal-h { display: flex; align-items: center; gap: 8px; }
.tt-pal-h h2 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-pal-steps { font-size: 11.5px; color: var(--text-3); }
.tt-pal-steps b { color: var(--text); font-weight: 600; }
.tt-pal-q, .tt-pal-in .tt-f input { width: 100%; box-sizing: border-box; height: 40px; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 0 12px; color: var(--text); font: 15px var(--sans); outline: 0; }
.tt-pal-q:focus, .tt-pal-in .tt-f input:focus { border-color: var(--canopy); }
.tt-pal-l { display: grid; gap: 1px; max-height: min(50vh, 420px); overflow: auto; margin: 0 -6px; }
.tt-pal-o { all: unset; box-sizing: border-box; display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.tt-pal-o svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.tt-pal-o > span { display: flex; flex-direction: column; min-width: 0; }
.tt-pal-o b { font-weight: 600; font-size: 14px; }
.tt-pal-o .dim { font-size: 12.5px; }
.tt-pal-o[aria-selected="true"], .tt-pal-o:hover { background: var(--ink-2); box-shadow: inset 2px 0 0 var(--canopy); }
.tt-pal-o:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tt-pal-acts { display: flex; justify-content: flex-end; }
.tt-pal-chips { min-height: 0; }
.tt-addcol-m { width: 100%; margin-top: 4px; }
@media (max-width: 780px) {
  .vw-dlg-back.tt-pal-back { align-items: end; justify-items: stretch; padding: 0; }
  .vw-dlg.tt-pal { width: 100%; max-height: 88dvh; border-radius: 12px 12px 0 0; }
  .tt-table .tt-t tbody tr[data-row] td.tt-tick { flex-direction: row; align-items: center; }
  .tt-pal-in { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .tt-pal-l { max-height: 56dvh; }
}

/* A row's ↗: open it (its panel or its page) when its cells are all for editing. */
.tt-open { all: unset; cursor: pointer; margin-left: 8px; padding: 0 5px; border-radius: 4px; font-size: 12px; color: var(--text-3); border: 1px solid var(--line-2); opacity: 0; }
.tt-t tr:hover .tt-open, .tt-open:focus-visible { opacity: 1; }
.tt-open:hover { color: var(--text); background: var(--ink-2); }
.tt-open:focus-visible { outline: 2px solid var(--focus); }
@media (hover: none), (max-width: 780px) { .tt-open { opacity: 1; } }

/* The palette's "which tasks hold it" (a template's table): this template, or every task (a shared field). */
.tt-pal-for { display: grid; gap: 6px; padding: 2px 0; }
.tt-pal-for .tt-check { align-items: flex-start; }
.tt-pal-for .tt-check > span { display: flex; flex-direction: column; }
.tt-pal-for .dim { font-size: 12.5px; }
.tk-sf { text-decoration: none !important; color: var(--text) !important; }
.tk-sf:hover { text-decoration: underline !important; }

/* The gallery: a tile per row — its picture (or its initial), its name, two of its values. Flat: no box, no shadow;
   the picture alone carries the shape, the words sit under it on the page. */
.tt-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 14px; padding-top: 8px; }
.tt-gcard { cursor: pointer; display: flex; flex-direction: column; min-width: 0; outline: none; }
.tt-gcard:hover b, .tt-gcard:focus-visible b { text-decoration: underline; text-underline-offset: 2px; }
.tt-gcard:focus-visible .tt-gpic { outline: 2px solid var(--focus); outline-offset: 2px; }
.tt-gpic { aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--text) 6%, transparent); display: grid; place-items: center; overflow: hidden; border-radius: 3px; }
.tt-gpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-gnone { font: 600 28px var(--sans); color: var(--text-3); }
.tt-gtxt { padding: 7px 0 0; display: grid; gap: 1px; font-size: 13px; min-width: 0; }
.tt-gtxt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
@media (max-width: 780px) { .tt-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; } }

/* The plain map (console/table-map.js): drawn here when the map tiles can't be reached. WGS 84 points on a Web Mercator
   plane, a quiet grid, a scale in metres; flat, on the page's own background. */
.tpm { display: flex; flex-direction: column; min-height: 240px; background: var(--content-bg, transparent); }
.tpm-svg { flex: 1 1 auto; width: 100%; min-height: 200px; display: block; }
.tpm-grid { stroke: var(--line); stroke-width: 1; }
.tpm-halo { fill: color-mix(in srgb, var(--canopy) 22%, transparent); }
.tpm-dot { fill: var(--canopy); stroke: var(--content-bg, var(--paper, #fff)); stroke-width: 1.5; }
.tpm-label { font: 500 12px var(--sans); fill: var(--text); paint-order: stroke; stroke: var(--content-bg, var(--paper, #fff)); stroke-width: 3px; stroke-linejoin: round; }
.tpm-pin { cursor: pointer; outline: none; }
.tpm-pin:hover .tpm-halo, .tpm-pin:focus-visible .tpm-halo { fill: color-mix(in srgb, var(--canopy) 40%, transparent); }
.tpm-pin:focus-visible .tpm-dot { stroke: var(--focus); stroke-width: 2.5; }
.tpm-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 6px 2px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.tpm-scale { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.tpm-bar { display: inline-block; height: 6px; border: 1.5px solid var(--text-2); border-top: 0; }
.tpm-note { flex: 1 1 220px; }
.tt-map.tt-map-plain { height: auto; min-height: min(62vh, 560px); display: flex; }
.tt-map.tt-map-plain > .tpm { flex: 1 1 auto; }

/* A built-in row opened here (a place, a file), a place's form, a new place, your columns renamed, removed, brought back. */
.vw-dlg.tt-place-dlg { width: min(620px, 100%); }
.tt-bimap { height: 220px; margin: 10px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tt-bimap.tpm { height: auto; min-height: 0; } /* the plain map: its drawing a fixed height, its foot below it */
.tt-bimap.tpm .tpm-svg { flex: none; height: 190px; min-height: 0; }
.tt-own .tt-f, .tt-newpl .tt-f { display: grid; gap: 4px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-2); }
.tt-own input, .tt-own select { font-size: 14px; }
.tt-ren { display: flex; gap: 8px; align-items: center; }
.tt-ren input { flex: 1 1 auto; min-width: 0; font: inherit; }
.tt-gone { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.tt-gone .tt-cols-l li > span { min-width: 0; overflow-wrap: anywhere; }
.tt-cols-l .linkbtn, .tt-cols-l .need-approver { white-space: nowrap; flex: none; }
.tt-placeform .pm-form { padding: 0; border: 0; }

/* PROCESSES §10: one change on many rows (the dry run said, then done), a CSV file in, a column's type. Flat: hairlines,
   no boxes; on a phone the dialogs sit at the foot and every list stacks. */
.tt-imp { height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; background: none; font: 13px var(--sans); color: var(--text-2); cursor: pointer; }
.tt-imp:hover { border-color: var(--line-2); color: var(--text); }
.tt-imp:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.tt-bk-v { display: inline-flex; gap: 6px; align-items: center; min-width: 0; }
.tt-bk-v [data-bkq] { width: 140px; }
.tt-bk-sum { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 10px; font-size: 14px; }
.tt-bk-sum b { font-variant-numeric: tabular-nums; }
.tt-bk-no { color: var(--bad); }
.tt-bk-skip { list-style: none; margin: 0 0 8px; padding: 0; max-height: 40vh; overflow: auto; border-top: 1px solid var(--line-2); }
.tt-bk-skip li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.tt-bk-skip li b { flex: 0 0 34%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tt-bk-skip li span { flex: 1; min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.tt-kept { color: var(--text-2); font-style: italic; text-decoration: underline dotted var(--warn); text-underline-offset: 3px; }
.tt-kept::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--warn); vertical-align: 1px; }
/* the import */
.vw-dlg.tt-im-dlg { width: min(760px, 100%); }
.tt-im-drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 36px 16px; border: 1px dashed var(--line-2); border-radius: 6px; cursor: pointer; }
.tt-im-drop:hover, .tt-im-drop.on { border-color: var(--canopy); background: color-mix(in srgb, var(--canopy) 6%, transparent); }
.tt-im-drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.tt-im-drop .dim { font-size: 12.5px; }
.tt-im-file { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0 0 10px; overflow-wrap: anywhere; }
.tt-im-file .linkbtn { background: none; border: 0; color: var(--sky); cursor: pointer; font: inherit; padding: 0; }
.tt-im-map { border-top: 1px solid var(--line-2); margin-bottom: 10px; max-height: 30vh; overflow: auto; }
.tt-im-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.tt-im-src { display: flex; flex-direction: column; min-width: 0; }
.tt-im-src b, .tt-im-src small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-im-src b { font-weight: 500; font-size: 13.5px; }
.tt-im-src small { font-size: 12px; }
.tt-im-arrow { color: var(--text-3); }
.tt-im-row select, .tt-im-mark select, .tt-ty select, .tt-ty textarea { width: 100%; box-sizing: border-box; min-height: 32px; background: var(--content-bg, var(--paper)); border: 1px solid var(--line-2); border-radius: 4px; padding: 4px 8px; color: var(--text); font: 13px var(--sans); }
.tt-im-mark { margin-bottom: 8px; }
.tt-im-mark .tt-f { display: grid; gap: 4px; max-width: 240px; font-size: 12.5px; color: var(--text-2); }
.tt-paste-t td small { display: block; font-size: 11.5px; }
.tt-paste-t td { overflow-wrap: anywhere; }
.tt-paste-t .tt-im-bad small { color: var(--bad); }
.tt-im-bar { height: 4px; background: var(--ink-3); border-radius: 2px; overflow: hidden; margin: 8px 0 4px; }
.tt-im-bar span { display: block; height: 100%; background: var(--canopy); transition: width .2s; }
@media (prefers-reduced-motion: reduce) { .tt-im-bar span { transition: none; } }
/* a column's type */
.tt-ty-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.tt-ty-k { all: unset; box-sizing: border-box; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--text-2); }
.tt-ty-k:hover { color: var(--text); }
.tt-ty-k.on { border-color: var(--canopy); color: var(--text); background: color-mix(in srgb, var(--canopy) 10%, transparent); }
.tt-ty-k:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.tt-ty .tt-f { display: grid; gap: 4px; margin-bottom: 8px; font-size: 12.5px; color: var(--text-2); max-width: 360px; }
.tt-ty-t { width: 100%; border-collapse: collapse; margin-bottom: 8px; font-size: 13px; }
.tt-ty-t th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 12px; }
.tt-ty-t th, .tt-ty-t td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line-2); overflow-wrap: anywhere; }
@media (max-width: 780px) {
  .vw-dlg.tt-dlg { max-height: 88dvh; overflow: auto; }
  .tt-bulk { gap: 6px 10px; }
  .tt-bulk-set { flex-wrap: wrap; width: 100%; }
  .tt-bulk-set > select, .tt-bk-v { flex: 1 1 100%; }
  .tt-bk-v > * { flex: 1 1 0; min-width: 0; }
  .tt-bk-v [data-bkq] { width: auto; }
  .tt-bk-skip li { flex-direction: column; gap: 2px; }
  .tt-bk-skip li b { flex: none; white-space: normal; }
  .tt-im-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tt-im-map, .tt-im-dlg .tt-paste-t, .tt-bk-skip { max-height: none; } /* one scroll: the sheet's */
  .tt-paste-t .tt-t td { flex-wrap: wrap; }
  .tt-paste-t td small { flex: 1 0 100%; }
  .tt-im-arrow { display: none; }
  .tt-im-mark .tt-f, .tt-ty .tt-f { max-width: none; }
  .tt-ty-t thead { display: none; }
  .tt-ty-t tr { display: block; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
  .tt-ty-t td { display: flex; gap: 10px; border: 0; padding: 2px 0; }
  .tt-ty-t td::before { content: attr(data-label); flex: 0 0 72px; color: var(--text-3); font-size: 12px; }
}
