/* ==========================================================================
   THE SOCIAL DESK (social.html, social-desk*.mjs), 2026-10-23.

   Additions only, on the Office's own system: every colour, size and radius
   is office.css's token (--o-*), every button the Office's (.ofc-primary,
   .ofc-ghost, .ofc-quiet), every field .ofc-fields, every tab row .ofc-addr
   (underline tabs), every drawer .ofc-drawer. Colour only for state (green
   done, amber waiting on the client, red failed); white the one emphasis.
   Each section is a plane on the stage, as the Office's views are. No :root,
   no focus ring of its own: focus is the Office's lit edge. Every padding,
   margin and gap is on the 4px grid.

   The CSP refuses style="": everything is here, by class.
   ========================================================================== */

/* ---------- the desk: the brands over one brand's work -------------------------------- */
#office .sd {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  margin: 0 0 1rem;
}
#office .sd[hidden] { display: none; }
#office .sd > .ofc-card {
  min-width: 0;
  grid-column: auto;
  padding: 20px var(--o-pad-x, 24px) 24px;
  background: var(--o-plane, var(--tk-grey-14));
  border: 1px solid var(--o-plane-edge, var(--tk-grey-23));
  border-radius: var(--o-r-lg);
  box-shadow: var(--o-depth, none);
  --o-bg: var(--o-plane, var(--tk-grey-14));
  --o-panel: var(--o-plane, var(--tk-grey-14));
}
#office .sd > .sd-brands { padding-bottom: 20px; }

/* A state is a dot and a word (the Office's tables, KERNEL §5). */
#office .sd-st { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--o-dim); font: 600 var(--o-t-xs)/1.3 var(--body); white-space: nowrap; }
#office .sd-st::before { content: ''; flex: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--o-neutral); }
#office .sd-st[data-tone="ok"] { color: var(--o-ok); }
#office .sd-st[data-tone="ok"]::before { background: var(--o-ok-mark); }
#office .sd-st[data-tone="attn"] { color: var(--o-warn-ink); }
#office .sd-st[data-tone="attn"]::before { background: var(--o-warn); }
#office .sd-st[data-tone="bad"] { color: var(--o-bad); }
#office .sd-st[data-tone="bad"]::before { background: var(--o-bad-mark); }
#office .sd-st[data-tone="wait"]::before { box-sizing: border-box; background: transparent; border: 1.5px solid var(--o-faint); }
#office .sd-st[data-tone="run"] { color: var(--o-text); }
#office .sd-st[data-tone="run"]::before { background: var(--o-text); }

/* Lines the desk says: what a press did, an empty state, a hint. */
#office .sd-note { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .sd-note:empty, #office .sd-note[hidden] { display: none; }
#office .sd-note[data-tone="ok"] { color: var(--o-ok); }
#office .sd-note[data-tone="bad"] { color: var(--o-bad); }
#office .sd-note[data-tone="attn"] { color: var(--o-warn-ink); }
#office .sd-panel > .sd-note { margin: 0 0 1rem; }
#office .sd-hint { margin: 0; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 500; line-height: 1.5; }
#office .sd-empty { margin: 0; padding: 1rem 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 500; line-height: 1.55; max-width: 44rem; }
#office .sd-state { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .sd-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.5rem 0; }
#office .sd-h3 { margin: 0; color: var(--o-text); font: 650 var(--o-t-md)/1.3 var(--display); }
#office .sd-legend { padding: 0; margin: 0 0 0.5rem; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 600; }
#office .sd-skel { margin: 0; padding: 0; }

/* ---------- the brands: a row of them, the one open marked in white ------------------------ */
#office .sd-brands__bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.75rem; }
#office .sd-brands__bar h2 { margin: 0; }
#office .sd-blist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.5rem; }
#office .sd-b { min-width: 0; }
#office .sd-b__a {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  height: 100%;
  min-height: 4.5rem;
  padding: 12px;
  border: 1px solid var(--o-line-2);
  border-radius: var(--o-r);
  background: var(--o-inset);
  color: var(--o-text);
  text-decoration: none;
}
#office .sd-b__a:hover { border-color: var(--o-line-3); }
#office .sd-b__a[aria-current="page"] { border-color: var(--tk-white); }
#office .sd-b__top { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
#office .sd-b__name { min-width: 0; overflow-wrap: anywhere; font: 650 var(--o-t-md)/1.3 var(--body); }
#office .sd-b__own { flex: none; padding: 0 0.5rem; border-radius: var(--o-r-sm); background: var(--o-raised); color: var(--o-dim); font: 600 var(--o-t-xs)/1.6 var(--body); }
#office .sd-b__hot { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
#office .sd-b__line { color: var(--o-faint); font-size: var(--o-t-label); font-weight: 500; line-height: 1.45; }

/* ---------- one brand: its head, its tabs ------------------------------------------- */
#office .sd-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1rem; margin: 0 0 0.75rem; }
#office .sd-head__t { min-width: 0; flex: 1 1 18rem; }
#office .sd-head__h { margin: 0; overflow-wrap: anywhere; }
#office .sd-head__s { margin: 0.25rem 0 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 500; line-height: 1.5; }
#office .sd-head__a { display: flex; flex-wrap: wrap; gap: 0.5rem; }
#office .sd-tabs { margin: 0 0 1.25rem; }
#office .sd-panel:focus { outline: none; }

/* ---------- the calendar ------------------------------------------------------------ */
#office .sd-cal__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin: 0 0 1rem; }
#office .sd-cal__views { margin: 0; }
#office .sd-cal__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
#office .sd-cal__range { margin: 0 0.25rem; min-width: 12rem; text-align: center; color: var(--o-text); font: 650 var(--o-t-sm)/1.3 var(--body); font-variant-numeric: tabular-nums; }
#office .sd-cal__help { margin: 0.75rem 0 0; }

#office .sd-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; }
#office .sd-day {
  min-width: 0;
  min-height: 14rem;
  padding: 8px;
  border: 1px solid var(--o-line-2);
  border-radius: var(--o-r);
  background: var(--o-inset);
  display: grid;
  align-content: start;
  gap: 0.5rem;
}
#office .sd-day.is-today { border-color: var(--o-line-3); }
#office .sd-day.is-over, #office .sd-mday.is-over { border-color: var(--focus-edge); box-shadow: 0 0 0 1px var(--focus-halo); }
#office .sd-day__h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.5rem; margin: 0 0 0.25rem; color: var(--o-dim); font: 650 var(--o-t-label)/1.3 var(--body); }
#office .sd-day.is-today .sd-day__h { color: var(--o-text); }
#office .sd-day__today { color: var(--o-text); font-weight: 600; }
#office .sd-day__none { margin: 0; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 500; }

#office .sd-chip {
  position: relative;
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--o-line-2);
  border-radius: var(--o-r-sm);
  background: var(--o-raised);
  cursor: grab;
}
#office .sd-chip::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--o-line-3); }
#office .sd-chip[data-tone="ok"]::before { background: var(--o-ok-mark); }
#office .sd-chip[data-tone="attn"]::before { background: var(--o-warn); }
#office .sd-chip[data-tone="bad"]::before { background: var(--o-bad-mark); }
#office .sd-chip.is-dragging { border-style: dashed; border-color: var(--o-line-3); }
#office .sd-chip__open {
  display: grid;
  gap: 0;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--o-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
#office .sd-chip__open:hover .sd-chip__t { text-decoration: underline; text-underline-offset: 2px; }
#office .sd-chip__time { color: var(--o-dim); font: 600 var(--o-t-xs)/1.4 var(--body); font-variant-numeric: tabular-nums; }
#office .sd-chip__t { min-width: 0; overflow-wrap: anywhere; font: 650 var(--o-t-sm)/1.35 var(--body); }
#office .sd-chip__m { display: grid; gap: 0.25rem; }
#office .sd-chip__p { color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
#office .sd-chip__move { justify-self: start; min-height: 24px; padding: 0 0.25rem; font-size: var(--o-t-xs); }
/* A control's corners (rule 8): the pro theme gives every button its 12px, which on this 24px button is a capsule. */
html:not([data-theme="classic"]) #office :is(.ofc-main, .ofc-drawer) .sd-chip__move.ofc-quiet { border-radius: var(--tk-r-sm); }
/* The preview's caption in the Office takes the Office's quiet ink (the sheet's or the dark's), not social-frames.css's
   #A3A3A3, written for the dark Office: 2.52:1 on the light sheet (social-desk-check, 2 Nov). */
#office .sf-label { color: var(--o-faint); }
#office .sd-chip--sm { padding: 4px 4px 4px 8px; }
#office .sd-chip--sm::before { top: 4px; bottom: 4px; }
#office .sd-chip--sm { overflow: hidden; }
#office .sd-chip--sm .sd-chip__open { display: flex; gap: 0.25rem; align-items: baseline; width: 100%; min-width: 0; }
#office .sd-chip--sm .sd-chip__time { flex: none; }
#office .sd-chip--sm .sd-chip__t { min-width: 0; font-size: var(--o-t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#office .sd-month { display: grid; gap: 0.25rem; }
#office .sd-month__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }
#office .sd-month__wd { padding: 0 4px; color: var(--o-faint); font: 600 var(--o-t-label)/1.6 var(--body); }
#office .sd-mday {
  min-width: 0;
  min-height: 6.5rem;
  padding: 4px;
  border: 1px solid var(--o-line-2);
  border-radius: var(--o-r-sm);
  background: var(--o-inset);
  display: grid;
  align-content: start;
  gap: 0.25rem;
}
#office .sd-mday.is-other { background: transparent; }
#office .sd-mday.is-other .sd-mday__n { color: var(--o-faint); }
#office .sd-mday.is-today { border-color: var(--o-line-3); }
#office .sd-mday__n { padding: 0 4px; color: var(--o-dim); font: 600 var(--o-t-label)/1.6 var(--body); font-variant-numeric: tabular-nums; }
#office .sd-mday.is-today .sd-mday__n { color: var(--o-text); }
#office .sd-mday__more { justify-self: start; min-height: 24px; padding: 0 4px; border: 0; border-radius: var(--o-r-sm); background: transparent; color: var(--o-dim); font: 600 var(--o-t-xs)/1 var(--body); cursor: pointer; }
#office .sd-mday__more:hover { color: var(--o-text); }

#office .sd-loose { margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
#office .sd-loose__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.5rem; }

/* The time picker and its three suggestions. */
#office .sd-slot { display: grid; gap: 0.75rem; }
#office .sd-slot__l { margin: 0; color: var(--o-text); font: 650 var(--o-t-sm)/1.3 var(--body); }
#office .sd-sug { display: grid; gap: 0.5rem; }
#office .sd-sug__h { margin: 0; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 600; }
#office .sd-sug__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
#office .sd-sug__i { display: grid; grid-template-columns: minmax(10rem, max-content) minmax(0, 1fr); align-items: baseline; gap: 0.25rem 0.75rem; }
#office .sd-sug__b {
  min-height: 32px;
  padding: 0 0.75rem;
  border: 1px solid var(--o-line-3);
  border-radius: var(--o-r-sm);
  background: var(--o-inset);
  color: var(--o-text);
  font: 600 var(--o-t-sm)/1 var(--body);
  font-variant-numeric: tabular-nums;
  text-align: left;
  cursor: pointer;
}
#office .sd-sug__b:hover { border-color: var(--o-dim); }
#office .sd-sug__b[aria-pressed="true"] { border-color: var(--tk-white); color: var(--tk-white); }
#office .sd-sug__why { color: var(--o-dim); font-size: var(--o-t-label); font-weight: 500; line-height: 1.45; }
#office .sd-sug__why b { color: var(--o-text); font-weight: 600; }

/* ---------- the composer ------------------------------------------------------------- */
#office .sd-pick { margin: 0 0 1.25rem; display: grid; gap: 0.5rem; }
#office .sd-pick__h { margin: 0; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 600; }
#office .sd-pick__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
#office .sd-pick__b { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 32px; padding: 0 0.75rem; border: 1px solid var(--o-line-2); border-radius: var(--o-r-sm);
  background: var(--o-inset); color: var(--o-text); font: 600 var(--o-t-sm)/1 var(--body); cursor: pointer; }
#office .sd-pick__b:hover { border-color: var(--o-line-3); }
#office .sd-compose__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 30rem); gap: 1.5rem; align-items: start; }
#office .sd-compose { display: grid; gap: 1.25rem; min-width: 0; }
#office .sd-compose__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; }
#office .sd-compose__st { margin: 0; display: inline-flex; align-items: center; gap: 0.25rem; color: var(--o-dim); font-size: var(--o-t-label); }
#office .sd-compose__f { grid-template-columns: minmax(0, 1fr); }
#office .sd-plats { display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
#office .sd-plats > .sd-legend { flex: 1 1 100%; }
#office .ofc-fields label.sd-plat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--o-line-2);
  border-radius: var(--o-r-sm);
  background: var(--o-inset);
  color: var(--o-text);
  font: 600 var(--o-t-sm)/1 var(--body);
  cursor: pointer;
}
#office .ofc-fields label.sd-plat:has(input:checked) { border-color: var(--o-line-3); }
#office .sd-plat input { width: 16px; height: 16px; margin: 0; accent-color: var(--tk-white); }
#office .sd-plat__h { color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 500; }
#office .sd-caps { display: grid; gap: 1rem; }
#office .sd-cap { display: grid; gap: 0.25rem; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 600; }
#office .sd-cap__top { display: flex; justify-content: space-between; gap: 0.5rem; }
#office .sd-cap__n { color: var(--o-faint); font-weight: 500; font-variant-numeric: tabular-nums; }
#office .sd-cap__n[data-tone="attn"] { color: var(--o-warn-ink); }
#office .sd-cap__n[data-tone="bad"] { color: var(--o-bad); font-weight: 650; }
#office .sd-cap textarea { min-height: 72px; padding: 0.5rem; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm); background: var(--o-inset);
  color: var(--o-text); font: 500 var(--o-t-sm)/1.5 var(--body); resize: vertical; }
#office .sd-cap textarea:focus { outline: 1px solid var(--focus-edge); outline-offset: -1px; border-color: var(--focus-edge); box-shadow: 0 0 0 1px var(--focus-halo); }
#office .sd-cap__back { justify-self: start; min-height: 24px; padding: 0 0.25rem; font-size: var(--o-t-xs); }
#office .sd-mpick { min-width: 0; margin: 0; padding: 0; border: 0; }
#office .sd-mpick__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.5rem; }
#office .sd-m {
  display: grid;
  gap: 0.25rem;
  padding: 4px;
  border: 1px solid var(--o-line-2);
  border-radius: var(--o-r-sm);
  background: var(--o-inset);
  color: var(--o-dim);
  font: 500 var(--o-t-xs)/1.3 var(--body);
  text-align: left;
  cursor: pointer;
}
#office .sd-m:hover { border-color: var(--o-line-3); }
#office .sd-m[aria-pressed="true"] { border-color: var(--tk-white); color: var(--tk-white); }
#office .sd-m__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--o-r-sm); background: var(--o-raised); display: grid; place-items: center; color: var(--o-faint); }
#office .sd-m__n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#office .sd-preview { position: sticky; top: 0; display: grid; gap: 0.75rem; min-width: 0; }
#office .sd-preview .sf-row { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 22rem); overflow: visible; }
#office .sd-said { display: grid; gap: 0.75rem; padding: 12px 16px; border: 1px solid var(--o-line-2); border-radius: var(--o-r); background: var(--o-inset); }
#office .sd-said__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
#office .sd-said__i { display: grid; gap: 0.25rem; }
#office .sd-said__top { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 600; line-height: 1.45; }
#office .sd-said__i[data-action="suggest"] .sd-said__top b, #office .sd-said__i[data-action="decline"] .sd-said__top b { color: var(--o-warn-ink); }
#office .sd-said__who { color: var(--o-faint); font-weight: 500; }
#office .sd-said__chips, #office .sd-said__at { margin: 0; color: var(--o-dim); font-size: var(--o-t-label); font-weight: 600; }
#office .sd-said__t { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
#office .sd-changes { display: grid; gap: 0.25rem; padding-top: 0.75rem; border-top: 1px solid var(--o-line-2); }
#office .sd-changes__i { margin: 0; color: var(--o-dim); font-size: var(--o-t-label); line-height: 1.5; overflow-wrap: anywhere; }
#office .sd-changes__i b { color: var(--o-text); font-weight: 600; }

#office .sd-form { display: grid; gap: 1rem; }
#office .sd-form__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
#office .ofc-fields .sd-hint { font-weight: 500; }

/* ---------- rows: media, ideas, shot lists, what needs a look ------------------------------ */
#office .sd-rows, #office .sd-media__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--o-line-2); }
#office .sd-row, #office .sd-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.5rem 1.25rem;
  min-height: var(--o-row);
  padding: 12px 0;
  border-bottom: 1px solid var(--o-line-2);
}
#office .sd-media { grid-template-columns: 4rem minmax(0, 1fr) auto; }
#office .sd-row:last-child, #office .sd-media:last-child { border-bottom: 0; }
#office .sd-row > .sd-note, #office .sd-media > .sd-note { grid-column: 1 / -1; }
#office .sd-row__main, #office .sd-media__main { display: grid; gap: 0.25rem; min-width: 0; }
#office .sd-row__top, #office .sd-media__top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: 0; color: var(--o-text); font-size: var(--o-t-md); line-height: 1.35; }
#office .sd-row__top b, #office .sd-media__n { font-weight: 650; overflow-wrap: anywhere; }
#office .sd-row__body, #office .sd-media__sum { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.55; max-width: 48rem; overflow-wrap: anywhere; }
#office .sd-row__meta, #office .sd-media__meta { margin: 0; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 500; line-height: 1.45; }
#office .sd-row__acts, #office .sd-media__acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; max-width: 28rem; }
#office .sd-row__url { min-height: 32px; width: 14rem; padding: 0 0.5rem; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm); background: var(--o-inset); color: var(--o-text);
  font: 500 var(--o-t-sm)/1 var(--body); }
#office .sd-media__pic { width: 4rem; height: 4rem; border-radius: var(--o-r-sm); overflow: hidden; background: var(--o-inset); display: grid; place-items: center; }
#office .sd-media__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
#office .sd-media__kind { color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 600; }
#office .sd-media__note { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); line-height: 1.5; overflow-wrap: anywhere; }
#office .sd-media__k { color: var(--o-faint); }
#office .sd-media__err { margin: 0; color: var(--o-bad); font-size: var(--o-t-sm); line-height: 1.5; }
#office .sd-notes { margin: 0.25rem 0 0; }
#office .sd-notes__s { display: inline-flex; align-items: center; min-height: 24px; color: var(--o-dim); font-size: var(--o-t-label); font-weight: 600; cursor: pointer; }
#office .sd-notes__s:hover { color: var(--o-text); }
#office .sd-notes__dl { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); gap: 0.5rem 1rem; margin: 0.75rem 0 0; }
#office .sd-notes__dl dt { color: var(--o-faint); font-size: var(--o-t-label); font-weight: 600; }
#office .sd-notes__dl dd { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); line-height: 1.5; overflow-wrap: anywhere; }
#office .sd-notes__ul { margin: 0; padding: 0 0 0 1rem; display: grid; gap: 0.25rem; }
#office .sd-sec__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.5rem; }
#office .sd-ideas, #office .sd-shots, #office .sd-needs, #office .sd-log, #office .sd-mlist { display: grid; gap: 0.75rem; }
#office .sd-shots { margin: 2rem 0 0; }
#office .sd-shot__steps { margin: 0.25rem 0 0; padding: 0 0 0 1.25rem; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.55; }
#office .sd-shotf { display: grid; gap: 0.75rem; margin: 1rem 0 0; padding: 16px; border: 1px solid var(--o-line-2); border-radius: var(--o-r); background: var(--o-inset); }
#office .sd-shotf__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
#office .sd-shotf__row { padding: 12px 0 0; border-top: 1px solid var(--o-line-2); }

/* The upload, with measured progress. */
#office .sd-up { display: grid; gap: 0.75rem; margin: 2rem 0 0; padding: 16px; border: 1px solid var(--o-line-2); border-radius: var(--o-r); background: var(--o-inset); }
#office .sd-up__tray { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
#office .sd-up__tray:empty { display: none; }
#office .sd-up__i { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 14rem) auto auto; align-items: center; gap: 0.75rem; }
#office .sd-up__n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--o-text); font-size: var(--o-t-sm); }
#office .sd-up__w { color: var(--o-dim); font-size: var(--o-t-label); font-variant-numeric: tabular-nums; }
#office .sd-up__bar { width: 100%; height: 4px; appearance: none; border: 0; border-radius: var(--tk-r-2xs); background: var(--o-line-2); overflow: hidden; }
#office .sd-up__bar::-webkit-progress-bar { background: var(--o-line-2); }
#office .sd-up__bar::-webkit-progress-value { background: var(--tk-white); }
#office .sd-up__bar::-moz-progress-bar { background: var(--tk-white); }

/* The TikTok composer, moved into the desk's tab: its sections stand on the desk's own plane. */
#office .sd-panel > .so-grid > .so-card { padding: 0 0 24px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
#office .sd-panel > .so-grid > .so-card + .so-card { padding-top: 24px; border-top: 1px solid var(--o-line-2); }

/* The log: the Office's table. */
#office .sd-logt td.sd-logt__when { color: var(--o-dim); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- drawers: settings, a new brand, moving a post ---------------------------------- */
#office .sd-drawer { width: min(36rem, 100vw); }
#office .sd-limits { margin: 0; padding: 0; border: 0; display: grid; gap: 0.5rem; }
#office .sd-limit { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 9rem) minmax(0, 9rem); align-items: center; gap: 0.5rem; }
#office .sd-limit__p { color: var(--o-text); font-size: var(--o-t-sm); font-weight: 600; }
#office .sd-limit select { min-height: 32px; padding: 0 1.75rem 0 0.5rem; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm); background-color: var(--o-inset);
  color: var(--o-text); font: 500 var(--o-t-sm)/1 var(--body); }
#office .sd-accounts { display: grid; gap: 0.75rem; margin: 2rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--o-line-2); }
#office .sd-acc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--o-line-2); }
#office .sd-acc__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.25rem 1rem; min-height: var(--o-row); padding: 8px 0; border-bottom: 1px solid var(--o-line-2); }
#office .sd-acc__row > .sd-note { grid-column: 1 / -1; }
#office .sd-acc__w { display: grid; gap: 0.25rem; min-width: 0; }
#office .sd-acc__top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: 0; color: var(--o-text); font-size: var(--o-t-sm); }
#office .sd-acc__h { margin: 0; color: var(--o-dim); font-size: var(--o-t-label); }
#office .sd-acc__err { margin: 0; color: var(--o-bad); font-size: var(--o-t-label); }
#office .sd-acc__a { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }

/* ---------- narrower: one column; the week as a list of days ------------------------------ */
@media (max-width: 75rem) {
  #office .sd-compose__grid { grid-template-columns: minmax(0, 1fr); }
  #office .sd-preview { position: static; }
  #office .sd-preview .sf-row { grid-auto-flow: column; grid-auto-columns: minmax(15.5rem, 18.5rem); grid-template-columns: none; overflow-x: auto; }
}
@media (max-width: 62rem) {
  #office .sd { grid-template-columns: minmax(0, 1fr); }
  #office .sd-brands { position: static; }
  #office .sd-week { grid-template-columns: minmax(0, 1fr); }
  #office .sd-day { min-height: 0; }
  #office .sd-day .sd-chip { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  #office .sd-day .sd-chip__m { grid-column: 1; }
  #office .sd-day .sd-chip__move { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 40rem) {
  #office .sd > .ofc-card { padding: 16px 16px 20px; }
  /* The brands, one line each: what needs someone, beside the name; the rest is on the brand itself. */
  #office .sd-blist { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #office .sd-b__a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; padding: 8px 12px; }
  #office .sd-b__line { display: none; }
  #office .sd-cal__bar { align-items: stretch; }
  #office .sd-cal__nav { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  #office .sd-cal__range { min-width: 0; margin: 0; font-size: var(--o-t-label); }
  #office .sd-cal__nav > .ofc-quiet { grid-column: 1 / -1; justify-self: center; }
  #office .sd-media__acts .ofc-primary { grid-column: 1 / -1; }
  #office .sd-mday { min-height: 3rem; }
  #office .sd-mday .sd-chip { display: none; }
  #office .sd-mday:has(.sd-chip)::after { content: ''; justify-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--o-text); }
  #office .sd-row, #office .sd-media { grid-template-columns: minmax(0, 1fr); }
  #office .sd-media { grid-template-columns: 3rem minmax(0, 1fr); }
  #office .sd-media__pic { width: 3rem; height: 3rem; }
  /* A row's moves as a grid on a phone, never a wrapped line with one alone at its end. */
  #office .sd-media__acts, #office .sd-row__acts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); justify-content: stretch; max-width: none; }
  #office .sd-row__url { width: 100%; grid-column: 1 / -1; }
  /* Fields are 16px on a phone (Safari zooms into anything smaller). */
  #office .sd-cap textarea, #office .sd-row__url, #office .sd-limit select { font-size: 16px; }
  #office .sd-sug__i { grid-template-columns: minmax(0, 1fr); }
  #office .sd-notes__dl { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  #office .sd-notes__dl dd { margin-bottom: 0.5rem; }
  #office .sd-up__i { grid-template-columns: minmax(0, 1fr) auto; }
  #office .sd-up__bar { grid-column: 1 / -1; grid-row: 2; }
  #office .sd-limit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #office .sd-limit__p { grid-column: 1 / -1; }
  #office .sd-logt thead { display: none; }
  #office .sd-logt, #office .sd-logt tbody, #office .sd-logt tr, #office .sd-logt td { display: block; }
  #office .sd-logt tr { padding: 8px 0; border-bottom: 1px solid var(--o-line-2); }
  #office .sd-logt td { height: auto; padding: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #office .sd-chip { transition: none; }
}

/* THE INBOX (Queue 54): a person's words as text, the replies beside them. */
#office .sd-inbox__text{white-space:pre-wrap; overflow-wrap:anywhere}
#office .sd-inbox__reply{margin:4px 0 0; padding-left:10px; border-left:2px solid var(--o-line-2, rgba(127,127,127,.3)); white-space:pre-wrap; overflow-wrap:anywhere}
#office .sd-inbox__reply b{font-weight:600}
#office .sd-inbox__state{color:var(--o-dim)}
#office .sd-inbox__ta{width:100%; min-height:3.2em; resize:vertical}
#office .sd-inbox .sd-row__acts{flex-wrap:wrap; align-items:flex-start}
