/* This site's own additions to the design files (tokens, base and calm stay as the design lock pins them). */
/* Home has five tiles: the lead tile and four beside it on a wide screen (DECISIONS.md, 6 Nov). */
@media (min-width: 75.0625rem) { .dash-tiles--five { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); } }
.picks-line { margin: 0; font-size: var(--text-xs); color: var(--color-muted); text-align: center; }
.needs form { margin: 0; }
/* The tracker's switches and calendar steps are links. */
a.step, .tcard-open { text-decoration: none; }
.view-sw .step[aria-current="page"] { background: color-mix(in srgb, var(--color-accent) 22%, var(--color-paper)); }
.td-form { display: grid; gap: var(--space-2xs); }
.td-form .btn { justify-self: start; margin-top: var(--space-xs); }
.td-links form { display: grid; margin: 0; }
.cal-pick { margin: 0; }
@media (prefers-reduced-motion: no-preference) { .tdetail:not([hidden]) { animation: td-in 160ms ease-out; } }
@keyframes td-in { from { transform: translateX(1.5rem); opacity: 0; } to { transform: none; opacity: 1; } }
/* A met goal's tile is tinted, so its "of N" needs the stronger ink to stay readable in dark mode. */
.stat--met .of { color: var(--color-ink-2); }
/* Tables: a wide one scrolls inside its wrapper, never the page. Every table is an adm-table now, so its cells take
   the design's own padding, weight and wrapping (calm.css), as the mockups do. */
.table-wrap { overflow-x: auto; max-width: 100%; }
/* The hero search's field menu shows the jobs page's own field names, which run longer than the mockup's short ones,
   so a long name is cut with an ellipsis in its 11rem column. */
.wl-fpick { min-width: 0; }
.wl-fpick > summary { min-width: 0; }
.wl-fpick-v { overflow: hidden; text-overflow: ellipsis; }
/* With script off the button keeps the first field's name, so the picked field carries a check mark of its own. */
.wl-fmenu label:has(input:checked) { justify-content: space-between; font-weight: 500; }
.wl-fmenu label:has(input:checked)::after { content: ""; flex: none; width: 5px; height: 10px; margin-left: var(--space-sm); border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }

/* Two-step set-up (owner, 11 Nov). The QR code sits on a light square in both modes, since a phone camera reads dark
   modules on light. The long otpauth link breaks anywhere, so it never pushes the card wider than the page */
.setup-qr { display: grid; justify-items: start; gap: var(--space-xs); margin: var(--space-md) 0; }
.setup-qr-img { display: block; width: 200px; height: auto; padding: var(--space-sm); border-radius: var(--r-field); background: oklch(99% 0 0); }
.setup-qr figcaption { color: var(--color-muted); font-size: var(--text-sm); }
.setup-uri, .setup-key { overflow-wrap: anywhere; word-break: break-all; }

/* Signed in as someone (the owner, act as). One line above the top bar on every page, in the warning tag's tint (the
   error colour mixed into the paper) so it is never mistaken for the person's own view, with Stop at its end. */
.acting { background: color-mix(in oklch, var(--color-error) 18%, var(--color-paper)); color: var(--color-ink); border-bottom: var(--rule-hair) solid var(--color-rule); }
.acting .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding-block: var(--space-xs); }
.acting p { margin: 0; font-weight: 500; }
.acting form { margin: 0; }

/* Overview's kept jobs a day: calm.css sets 14 columns, the mockup's window. The page also offers 7 and 30 days, and
   each gets one column a day. */
.adm-days--7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.adm-days--30 { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }

/* The line on every admin page while an open notice is not marked seen: the same band as the acting line, in the
   warning colour, with the link as its only content. */
.adm-notice-line { background: color-mix(in oklch, var(--color-error) 10%, var(--color-paper)); border-bottom: var(--rule-hair) solid var(--color-rule); }
.adm-notice-line .container { padding-block: var(--space-xs); }
.adm-notice-line p { margin: 0; font-weight: 500; }
.adm-notice-line a { color: var(--color-ink); }

/* A one-button form in the settings frame keeps its button at its own width (set-form is a grid, which stretches it). */
.set-form > .btn { justify-self: start; }

/* One person's Role: real radio buttons, drawn as the mockup's pills. The radio itself is hidden but still takes the
   keyboard, and the pill shows its focus. */
.set-main .wl-levels-quick .check--radio { position: relative; display: inline-flex; align-items: center; gap: 0; color: var(--color-ink); min-height: 36px; padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--r-pill); cursor: pointer; }
.set-main .wl-levels-quick .check--radio input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.set-main .wl-levels-quick .check--radio:hover { border-color: var(--signal); color: var(--signal); }
.set-main .wl-levels-quick .check--radio:has(input:checked) { border-color: var(--signal); background: var(--color-accent-soft); }
.set-main .wl-levels-quick .check--radio:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* Changelog To do: the title, then each of its notes on a line of its own. On a phone the Area column folds under
   the status, so What keeps a readable width and the whole table fits the card (no status is cut off). */
.adm-todo td.adm-todo-what { min-width: 12rem; }
.adm-todo td.adm-todo-what .adm-mail { display: block; margin-top: var(--space-3xs); }
.adm-todo .adm-todo-area { display: none; }
@media (max-width: 40rem) {
  .adm-todo td.adm-todo-what { min-width: 0; }
  .adm-todo .adm-todo-areacol { display: none; }
  .adm-todo .adm-todo-area { display: block; margin-top: var(--space-3xs); }
}
/* Sources: a source's On or Off tag with a line under it (its notice, or the key it waits for), the tag kept at its
   own width (the Sources mockup, 11 Nov). */
.adm-state { display: grid; justify-items: start; gap: var(--space-2xs); }
/* The jobs page on wide screens (owner, 11 Nov): the 96rem middle column of 10 Nov left wide screens mostly empty.
   The panes fill the window edge to edge, as the approved split view of 6 Nov has them
   (mockups/calm/final/jobs-split.html). The list keeps the mockup's two column width of up to 32rem, since its
   header (count, Filters, Searches, Sort) does not fit in the 30rem the mockup gives it beside a filter column. The
   filter column is the drawer now, and the open job takes its room. calm.css is locked design data (design.lock),
   so the site sets this here. */
@media (min-width: 75rem) {
  .js-filters body:has(.workspace) .workspace { grid-template-columns: minmax(22rem, 32rem) minmax(0, 1fr); max-width: none; margin-inline: calc(-1 * var(--gutter)); }
}
/* A row's facts wrap as whole words on a narrow list, and a list of every field names each row's field (11 Nov) */
.mini .m { flex-wrap: wrap; row-gap: var(--space-3xs); column-gap: var(--space-sm); }
.mini .m > span { white-space: nowrap; }
/* A long place never pushes the list wider than its pane, it ends in an ellipsis instead (14 Nov) */
.mini .m { min-inline-size: 0; }
.mini .m > .pl { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; }
.mini .m .fl { color: var(--color-ink-2); }
/* Why a list is empty: each filter with the jobs the list would hold without it (jobs page, home, Your picks) */
.why-empty { display: grid; gap: var(--space-xs); margin: var(--space-sm) var(--space-md); padding: var(--space-md); border-radius: var(--r-field); background: var(--color-paper); color: var(--color-ink-2); font-size: var(--text-sm); }
.why-empty p { margin: 0; }
.why-empty .why-lead { color: var(--color-ink); font-size: var(--text-md); }
.why-empty .drops { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3xs); }
.why-empty .drops a, .why-empty .drops li > span { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm); margin-inline: calc(-1 * var(--space-sm)); border-radius: var(--r-field); color: var(--color-ink); text-decoration: none; }
.why-empty .drops a:hover { background: var(--color-paper-3); }
.why-empty .drops a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.why-empty .drops .k { min-width: 0; }
.why-empty .drops a .k { text-decoration: underline; text-underline-offset: 0.2em; }
.why-empty .drops .v { flex: none; color: var(--color-ink-2); font-variant-numeric: tabular-nums; }
.why-empty .drops .n { color: var(--color-ink); }
.panel--jobs .why-empty, .picks-count-box .why-empty { margin: 0; }
.picks-count-box { display: grid; gap: var(--space-sm); margin-block: var(--space-md); }
.picks-count-box .su-count { padding-top: 0; border-top: 0; }
.workspace .mini { align-content: start; }
.workspace .mini[hidden] { display: none; }
.why-empty .why-clear { color: var(--color-ink); text-underline-offset: 0.2em; }
/* The list's header (count, Filters, Searches, Sort) wraps to a second line rather than run past its column when
   the count is long or the gutter is wide (11 Nov, review) */
@media (min-width: 48.0625rem) { .workspace > .listcol .list-head { flex-wrap: wrap; row-gap: var(--space-2xs); } }
/* The hero's job just posted: its title is its one link. */
.wl-jt a { text-decoration: none; }
.wl-jt a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
/* With no job just posted, the hero is one column. */
.wl-hero:not(:has(.wl-job)) { grid-template-columns: minmax(0, 1fr); }

/* The tracker's extras (owner, 11 Nov): a tick box on each card for Mark many, its bar above the board, a card's
   note and people in the details panel, and the CSV link beside the view switch. */
.track-csv { margin-left: auto; }
/* The bar and the line after a press are rows of their own above the board, which keeps the row that fills. */
.track:has(> .tmany) { grid-template-rows: auto auto minmax(0, 1fr); }
.track:has(> .tmany-done) { grid-template-rows: auto auto auto minmax(0, 1fr); }
/* calm.css sets the two columns again after its own one column rule for narrow screens, which left the board 0 px
   wide on a phone. Below 75rem the board and Applied stack, as calm.css meant. */
@media (max-width: 75rem) { .track-grid { grid-template-columns: minmax(0, 1fr); } }
/* On a phone the board is one strip of stages that scrolls sideways inside its own region and snaps to a stage, with
   the next stage showing at the edge, so the page itself never scrolls sideways. */
@media (max-width: 40rem) {
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(14rem, 82%); scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: var(--space-2xs); }
  .board > .tcol { scroll-snap-align: start; }
}
.tcard { grid-template-columns: auto minmax(0, 1fr) auto; }
.tpick-l { grid-template-columns: auto; align-self: start; min-height: 0; padding: var(--space-sm) 0 var(--space-xs) var(--space-sm); }
.tcard .extra { font-size: var(--text-xs); color: var(--color-muted); }
.tmany { position: sticky; top: calc(var(--nav-h) + var(--space-2xs)); z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin: 0; padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md); border-radius: var(--r-panel); background: var(--color-paper-2); }
/* On a narrow screen the bar only follows the page while something is ticked, with or without script. */
@media (max-width: 60rem) { .tmany { position: static; } .track:has(.tpick:checked) > .tmany { position: sticky; } }
.tmany-n { flex: 1 1 12rem; margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.tmany .sel { min-width: 11rem; }
.tmany-done { margin: 0; padding: var(--space-xs) var(--space-md); border-radius: var(--r-panel); font-size: var(--text-sm); background: color-mix(in srgb, var(--color-accent) 14%, var(--color-paper)); }
.td-note { min-height: 6rem; padding-block: var(--space-xs); resize: vertical; line-height: 1.45; }
.td-hint { margin: 0; font-size: var(--text-xs); color: var(--color-muted); }
.td-hint[hidden] { display: none; }
.td-people { display: grid; gap: var(--space-xs); }
.td-people h3 { margin: 0; }
.td-people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.td-person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3xs) var(--space-xs); padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-sm); border-radius: var(--r-panel); background: var(--color-paper); }
.td-person > :not(form) { grid-column: 1; }
.td-person > form { grid-column: 2; grid-row: 1 / span 3; align-self: start; margin: 0; }
.td-person .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-xs); margin: 0; font-size: var(--text-sm); }
.td-person .who b { font-weight: 500; }
.td-person .who span, .td-person .pnote { font-size: var(--text-xs); color: var(--color-ink-2); }
.td-person .pnote { margin: 0; }
.td-person .reach { font-size: var(--text-xs); overflow-wrap: anywhere; }
.td-add > summary { display: flex; align-items: center; min-height: var(--control); font-size: var(--text-sm); color: var(--color-ink-2); cursor: pointer; }
.td-add[open] > summary { margin-bottom: var(--space-2xs); }
/* Where a job was found (owner decision 2, 11 Nov): a note under the job's title, as the job-cyber-found-site mockup
   draws it. The row's Found on item is one more of its facts, which wrap as whole words. */
.job-note { margin: var(--space-2xs) 0 0; color: var(--color-ink-2); font-size: var(--text-sm); }

/* A list menu opens inward: the Sort menu sits at the left of the list, so it opens from its left edge (calm.css
   right-aligns every menu in the list head). No menu is wider than the window. The phone sheet keeps its full width. */
.list-head .dd-panel { max-inline-size: calc(100vw - 2 * var(--space-sm)); }
.list-head .dd--sort > .dd-panel { left: 0; right: auto; }
@media (max-width: 48rem) { .workspace .dd:not(.dd--all)[open] > .dd-panel { max-inline-size: none; } }

/* The notice box (templates/_notice.html): a saved or info line with a Close button, shown without script as plain text. */
.notice { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin: 0 0 var(--space-md); padding: var(--space-xs) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--r-panel); background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-md); }
.notice--error { border-color: var(--color-error); background: color-mix(in oklch, var(--color-error) 10%, var(--color-paper)); }
.notice p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.notice .notice-close { flex: none; }
.notice .notice-close[hidden] { display: none; }
.notice:has(.notice-close:not([hidden])) { padding-block: var(--space-3xs); padding-right: var(--space-3xs); }
