/* Blue identity: a monumental ASCII mark and quiet blue-white working surfaces.
   Document mechanics remain in their own layer. */
@layer legacy, tokens, components, responsive, accessibility;
@import url('/styles.css?v=20261116') layer(legacy);
@import url('/jobs.css?v=20261116') layer(legacy);
@import url('/preferences.css?v=20261116') layer(legacy);
@font-face { font-family: 'Pixelify'; src: url('/fonts/pixelify-sans.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@layer tokens {
  :root {
    color-scheme: light dark;
    --blue: #006fb6; --blue-soft: #e9f5fd; --ink: #17344b; --muted: #587084;
    --line: #dce9f2; --bg: #f4f9fd; --surface: #fff; --surface-soft: #f1f7fc;
    --control-line: #939399; --green: #207552; --danger: #b63042;
    --nav-bg: #f4f9fd; --nav-ink: #17344b; --nav-muted: #587084;
    --nav-active: #deeffb; --nav-line: #dce9f2; --nav-width: 216px;
    --primary-bg: #006fb6; --primary-ink: #fff; --radius: 12px;
    --font-body: 'Noto Sans CJK SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  }
  :root[data-theme='light'] { color-scheme: light; }
  :root[data-theme='dark'] {
    color-scheme: dark;
    --blue: #86cdf8; --blue-soft: #14334a; --ink: #eaf5ff; --muted: #a5bed0;
    --line: #294257; --bg: #0b1a28; --surface: #102333; --surface-soft: #172e42;
    --control-line: #787880; --green: #8edbb4; --danger: #ffa6b1;
    --nav-bg: #0b1a28; --nav-ink: #eaf5ff; --nav-muted: #a5bed0; --nav-line: #294257; --nav-active: #14334a;
    --primary-bg: #86cdf8; --primary-ink: #132330;
  }
  .jobs-workspace { --job-paper: var(--surface); --job-bg: var(--surface-soft); --job-ink: var(--ink); --job-muted: var(--muted); --job-line: var(--line); --job-accent: var(--blue); --job-soft: var(--blue-soft); }
}
@layer components {
  html { scrollbar-gutter: stable; accent-color: var(--blue); background: var(--bg); }
  body { margin: 0; font-family: var(--font-body); font-size: .875rem; line-height: 1.65; color: var(--ink); background: var(--bg); }
  ::selection { color: var(--ink); background: var(--blue-soft); }
  :where(button,input,select,textarea) { font: inherit; }
  :where(button,summary,a) { touch-action: manipulation; }
  :where(button) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, scale 120ms ease; }
  :where(button:hover:not(:disabled)) { background: var(--surface-soft); border-color: var(--control-line); }
  :where(button:disabled) { opacity: .45; cursor: not-allowed; }
  button:active:not(:disabled), summary:active { scale: .98; }
  button.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-ink); box-shadow: none; }
  button.primary:hover:not(:disabled) { background: var(--primary-bg); filter: brightness(1.08); }
  .textbtn { border: 0; background: transparent; color: var(--muted); padding: 5px 8px; }
  .textbtn:hover:not(:disabled) { color: var(--ink); background: var(--surface-soft); }
  .danger, .job-delete-link:hover:not(:disabled) { color: var(--danger); }
  button.danger:not(.textbtn) { border-color: var(--danger); }
  button.danger:hover:not(:disabled) { background: var(--danger); color: var(--surface); }
  :where(input:not([type='checkbox'],[type='radio'],[type='range']),select,textarea) { border: 1px solid var(--control-line); border-radius: 9px; background: var(--surface); color: var(--ink); padding: 10px 12px; min-height: 42px; }
  :where(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
  input[type='checkbox'], input[type='radio'] { accent-color: var(--blue); }
  select { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 38px 10px 14px; border: 1px solid var(--control-line); border-radius: 10px; background-color: var(--surface); color: var(--ink); font-size: .8125rem; cursor: pointer; text-overflow: ellipsis; }
  select:hover:not(:disabled) { border-color: var(--blue); background-color: var(--blue-soft); }
  select:disabled { opacity: .5; cursor: not-allowed; }
  @supports (appearance: base-select) {
    select, select::picker(select) { appearance: base-select; }
    select { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; }
    select:open { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
    select::picker-icon { content: ''; width: 8px; height: 8px; flex: none; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); rotate: 45deg; margin: -4px 3px 0 auto; }
    select:open::picker-icon { rotate: 225deg; margin-top: 4px; }
    select::picker(select) { font: inherit; min-width: anchor-size(width); max-width: min(440px,calc(100dvw - 24px)); max-height: min(360px,55dvh); margin-block: 7px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 14px 40px #001c3326; overflow-y: auto; overscroll-behavior: contain; }
    select option { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 10px 12px; border-radius: 7px; color: var(--ink); cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
    select option:hover, select option:focus-visible { background: var(--blue-soft); color: var(--blue); outline-offset: -2px; }
    select option:checked { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
    select option::checkmark { content: '✓'; color: var(--blue); order: 1; margin-inline-start: auto; }
  }
  .formlabel { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
  .form-error { color: var(--danger); font-size: 13px; }
  .form-error:empty { margin: 0; }
  .sub { color: var(--muted); }
  .icon { width: 18px; height: 18px; stroke-width: 1.65; }
  :where(h1,h2,h3) { color: var(--ink); }
  .actions { gap: 10px; }
  button[aria-busy='true'] { cursor: progress; opacity: .8; }
  button[aria-busy='true']::before { content: ''; flex: none; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }

  .layout { min-height: 100dvh; }
  .sidebar { position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--nav-width); padding: 28px 14px 18px; background: var(--nav-bg); border: 0; color: var(--nav-ink); overflow-y: auto; }
  .sidebar .brand { gap: 10px; padding: 0 10px; }
  .sidebar .brand .logo { width: 34px; height: 38px; padding: 0; background: transparent; border: 0; border-radius: 0; }
  .sidebar .brand-logo { width: 34px; height: 34px; }
  .brand-title { font-size: 23px; font-weight: 550; letter-spacing: .01em; line-height: 1.25; }
  .sidebar .brand-title { color: var(--nav-ink); }
  .brand-caption { display: block; font-family: 'Pixelify', monospace; font-size: 13px; line-height: 1.3; margin: 2px 0 0; color: var(--nav-muted); }
  .workspace-label { font-size: 11px; color: var(--muted); padding: 0 10px; margin: 30px 0 12px; }
  .console-command-trigger { width: 100%; justify-content: flex-start; min-height: 38px; padding: 8px 10px; margin-bottom: 28px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
  .console-command-trigger .icon { width: 15px; }
  kbd { font: inherit; color: var(--muted); font-size: 10px; white-space: nowrap; border-radius: 3px; background: var(--surface-soft); padding: 0 3px; }
  .console-command-trigger kbd { margin-inline-start: auto; }
  .module-nav { display: flex; flex-direction: column; gap: 26px; margin: 0; }
  .navigation-parent { padding: 0 10px; margin: 0 0 8px; color: var(--nav-muted); font-size: 11px; font-weight: 400; }
  .navigation-parent > .icon { display: none; }
  .module-nav :is(.job-subnav,.connection-subnav) { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; margin: 0; overflow: visible; }
  .module-nav .nav button { display: flex; gap: 10px; justify-content: flex-start; min-height: 42px; padding: 9px 10px; color: var(--nav-muted); border: 0; border-radius: 8px; font-size: 13px; font-weight: 400; background: transparent; }
  .module-nav .nav button:hover:not(.active):not(:disabled) { background: var(--surface); color: var(--ink); }
  .module-nav .nav button.active { color: var(--nav-ink); background: var(--nav-active); font-weight: 550; }
  .module-nav .nav button.active::after { content: ''; width: 4px; height: 4px; background: var(--blue); border-radius: 50%; margin-inline-start: auto; }
  .sidebar-bottom { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding: 24px 0 0; border: 0; }
  .sidebar-bottom button { justify-content: flex-start; gap: 10px; min-height: 40px; color: var(--nav-muted); padding-inline: 10px; background: transparent; border: 0; font-size: 12px; }
  .sidebar-bottom button:hover { color: var(--nav-ink); background: var(--nav-active); }
  .main { margin-inline-start: var(--nav-width); width: calc(100% - var(--nav-width)); min-width: 0; min-height: 100dvh; margin-block: 0; background: var(--surface); border: 0; border-inline-start: 1px solid var(--line); border-radius: 0; }
  .topbar { display: flex; height: 62px; padding-inline: 32px; color: var(--muted); background: transparent; border: 0; }
  .console-breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 11px; }
  .console-breadcrumb > .icon { width: 14px; height: 14px; }
  .console-breadcrumb > .icon:nth-of-type(2) { width: 10px; transform: rotate(-90deg); }
  .console-breadcrumb strong { font-weight: 400; color: var(--ink); }
  .console-account { display: flex; align-items: center; gap: 10px; font-size: 11px; }
  .cli-download-link { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue); background: var(--blue-soft); font: 12px 'Pixelify',monospace; text-decoration: none; }
  .cli-download-link:hover { border-color: var(--blue); background: var(--surface-soft); color: var(--ink); }
  .console-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--muted); background: var(--surface-soft); }
  .console-avatar .icon { width: 14px; height: 14px; }
  .content { max-width: 1480px; margin-inline: auto; padding: 24px 36px 56px; }
  .jobs-workspace { max-width: none; min-width: 0; font-size: .875rem; }
  .job-page-heading { margin-bottom: 26px; gap: 24px; align-items: center; }
  .job-page-heading h1 { font-size: clamp(25px,2.5vw,32px); font-weight: 550; letter-spacing: -.04em; line-height: 1.35; gap: 12px; }
  .job-page-heading p { margin-top: 8px; color: var(--muted); font-size: 13px; max-width: 70ch; line-height: 1.8; }
  .job-heading-count { font-size: 12px; font-weight: 400; color: var(--muted); background: var(--surface-soft); border: 0; padding: 3px 8px; border-radius: 5px; letter-spacing: 0; }
  .job-page-heading .actions > button { min-height: 40px; padding-inline: 14px; }

  .job-library-tools { display: flex; align-items: center; padding: 0 0 22px; gap: 12px; }
  .job-library-tools .job-search-label { flex: 1; max-width: 480px; padding: 3px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
  .job-library-tools .library-view-switch { margin-inline-start: auto; }
  .job-search-label { color: var(--muted); gap: 10px; }
  .jobs-workspace .job-search-label input { font-size: 13px; min-height: 34px; border: 0; background: transparent; }
  .job-search-label:focus-within { border-color: var(--blue); }
  .library-view-switch { border: 0; padding: 3px; border-radius: 8px; background: var(--surface-soft); gap: 2px; }
  .library-view-switch button { min-height: 32px; padding: 5px 10px; color: var(--muted); font-size: 12px; background: transparent; border: 0; border-radius: 6px; }
  .library-view-switch button.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px #0000000c; }
  .library-section-heading { padding: 0 0 18px; min-height: 38px; gap: 14px; border: 0; background: transparent; }
  .library-section-heading h2 { font-size: 14px; font-weight: 500; }
  .library-section-heading h2 > span { color: var(--muted); margin-inline-start: 8px; font-size: 12px; }
  .library-section-heading h2 > .library-group-heading { font-size: inherit; color: inherit; margin: 0; font-weight: inherit; }
  .library-section-heading button { font-size: 12px; min-height: 34px; }
  .group-card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr)); gap: 18px; padding: 0; }
  .group-card { position: relative; display: flex; flex-direction: column; min-width: 0; container-type: inline-size; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .group-card::before { content: none; }
  .group-card:hover, .group-card:focus-within { border-color: var(--control-line); }
  .jobs-workspace .group-card-open { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; min-height: 258px; flex: 1; width: 100%; padding: 20px 20px 14px; border: 0; border-radius: inherit; background: transparent; color: var(--ink); text-align: start; font-weight: 400; }
  .jobs-workspace .group-card-open:hover:not(:disabled) { background: transparent; }
  .group-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
  .group-card-symbol { width: 30px; height: 30px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 7px; }
  .group-card-symbol .icon { width: 18px; height: 18px; fill: none; }
  .group-card-count { padding: 0; border: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
  .group-card h3 { font-size: 19px; font-weight: 550; color: var(--ink); line-height: 1.5; margin: 16px 0 14px; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .group-card-documents, .group-card-empty { display: block; min-height: 90px; padding: 0; margin: 0 0 18px; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.85; list-style: none; }
  .group-card-documents li { display: flex; align-items: flex-start; gap: 8px; min-height: 27px; }
  .group-card-documents li > span { min-width: 0; overflow: clip; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; }
  .group-card-documents .icon { opacity: .65; width: 12px; height: 15px; margin-top: 3px; flex: none; }
  .group-card-empty { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; }
  .group-card-empty .icon { flex: none; width: 14px; }
  .group-card-bottom { display: flex; align-items: center; gap: 7px; color: var(--muted); padding: 12px 80px 0 0; margin-top: auto; border-top: 1px solid var(--line); min-height: 38px; font-size: 11px; }
  .group-card-bottom .icon { width: 12px; height: 12px; transform: rotate(-90deg); }
  .group-card-actions { inset: auto 10px 10px auto; gap: 2px; }
  .jobs-workspace .group-card-actions button { width: 32px; min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
  .jobs-workspace .group-card-actions button:hover { background: var(--surface-soft); color: var(--ink); }
  .jobs-workspace .group-card-actions .job-delete-link:hover { color: var(--danger); }
  .group-card-ungrouped { border-style: dashed; background: var(--surface-soft); }
  .group-card-ungrouped .group-card-symbol { background: var(--surface); color: var(--muted); }
  .library-import-note { border: 0; padding: 16px 0 0; font-size: 11px; color: var(--muted); }
  .job-library-layout { grid-template-columns: 150px minmax(0,1fr); gap: 22px; }
  .job-collections { padding-top: 0; }
  .job-collections-heading { padding-bottom: 16px; }
  .job-collections-heading h2 { font-size: 12px; }
  .job-collections-heading button { font-size: 11px; padding: 3px; }
  .jobs-workspace .job-collection { font-size: 12px; padding: 10px 12px; border-radius: 7px; }
  .jobs-workspace .job-collection.active { background: var(--surface-soft); color: var(--ink); }
  .job-library-content { background: transparent; border: 0; overflow: visible; }
  .library-table-scroll, .folder-document-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .library-table th { background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 400; padding: 14px 16px; }
  .library-table td { padding: 18px 16px; border-bottom-color: var(--line); font-size: 12px; }
  .library-table .job-title-button { font-size: 14px; color: var(--ink); }
  .library-table-excerpt { color: var(--muted); font-size: 12px; }
  .library-table-actions button { font-size: 12px; }
  .library-row-menu summary { min-height: 36px; padding: 6px 10px; border-radius: 6px; color: var(--muted); }
  .library-row-menu[open] > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 5px; box-shadow: 0 10px 25px #00000014; min-width: 144px; }
  .library-row-menu[open] > div button { color: var(--ink); min-height: 38px; border-radius: 6px; }
  .library-row-menu[open] > div button.danger { color: var(--danger); }
  .job-document-item { padding: 24px 28px; background: var(--surface); }
  .job-document-title .job-title-button { color: var(--ink); font-size: 18px; font-weight: 550; }
  .job-document-meta { font-size: 11px; gap: 14px; }
  .job-row-excerpt { font-size: 14px; line-height: 1.9; max-width: 72ch; color: var(--muted); }
  .job-row-actions button { font-size: 12px; }
  .library-word-count { font-size: 11px; }
  .job-publication { font-size: 11px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; }
  .job-publication.live { color: var(--green); background: var(--surface-soft); }
  .job-publication.changed { color: var(--blue); background: var(--blue-soft); }

  /* A document workspace rather than a stack of form boxes. */
  .job-editor-heading, .job-editor { max-width: 1000px; }
  .job-back { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
  .job-editor { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .job-editor-fields { grid-template-columns: minmax(0,1fr) 200px; padding: 30px 36px; gap: 30px; }
  .job-editor .formlabel { color: var(--muted); font-size: 12px; }
  .job-title-field input { font-size: 22px; font-weight: 600; border-color: var(--control-line); color: var(--ink); padding: 10px 0; border-width: 0 0 1px; border-radius: 0; }
  .job-document-toolbar { background: var(--surface-soft); border-block: 1px solid var(--line); padding: 12px 36px; }
  .job-body-label > span { font-size: 12px; color: var(--muted); }
  .job-document-toolbar button { min-height: 34px; font-size: 12px; background: var(--surface); border-color: var(--control-line); }
  .job-editor .job-document { padding: 30px 36px; min-height: 440px; font-size: 15px; line-height: 2; color: var(--ink); background: var(--surface); border: 0; border-radius: 0; }
  .job-editor-foot { color: var(--muted); padding: 16px 36px; font-size: 12px; }
  .job-editor #jobEditorError:not(:empty) { margin: 0; padding: 12px 36px; }

  /* Publication: recipient context, library selection, ordered release. */
  .recipient-context { display: flex; align-items: center; gap: 14px; padding: 18px 22px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .recipient-context-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--line); border-radius: 8px; color: var(--blue); background: var(--surface-soft); }
  .recipient-context label { font-size: 13px; font-weight: 600; }
  .recipient-context p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
  .recipient-context select { width: min(280px,40%); margin-inline-start: auto; }
  .push-status { padding: 0 2px 20px; margin-bottom: 0; color: var(--muted); font-size: 12px; }
  .push-status > span:first-child { color: var(--ink); }
  .push-status button { font-size: 12px; }
  .jobs-workspace :is(.dispatch-queue-jump,.dispatch-focus-link) { display: none; }
  .dispatch-workbench { grid-template-columns: minmax(260px,.85fr) minmax(0,1.15fr); gap: 22px; align-items: start; }
  .push-library, .push-draft { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .push-draft { border-top: 1px solid var(--line); }
  .dispatch-panel-heading { padding: 20px 22px; gap: 10px; }
  .dispatch-panel-heading h2 { font-size: 16px; }
  .dispatch-panel-heading h2 > span { font-size: 12px; margin-inline-start: 8px; padding: 3px 8px; background: var(--blue-soft); border-radius: 5px; }
  .dispatch-panel-heading p { color: var(--muted); font-size: 12px; }
  .dispatch-queue-actions button { font-size: 12px; }
  .dispatch-filters { padding: 16px 20px 10px; gap: 10px; }
  .dispatch-filters .job-search-label, .dispatch-queue-filter .job-search-label { border: 1px solid var(--control-line); border-radius: 7px; padding-inline: 10px; background: var(--surface); }
  .dispatch-filters select { font-size: 12px; }
  .dispatch-bulk { padding: 6px 20px 12px; font-size: 12px; }
  .dispatch-bulk .textbtn { font-size: 12px; }
  .dispatch-picker-scroll { max-height: min(500px,50dvh); }
  .dispatch-queue-scroll { max-height: min(420px,45dvh); overflow-y: auto; overscroll-behavior: contain; }
  .push-picker-item { padding: 18px 20px; gap: 6px; }
  .push-picker-item strong { font-size: 13px; font-weight: 600; color: var(--ink); }
  .push-picker-item small { font-size: 12px; }
  .push-picker-excerpt { font-size: 12px; line-height: 1.8; }
  .push-picker-item.selected { background: var(--blue-soft); }
  .push-draft .job-selected-row { padding: 24px; background: transparent; }
  .selected-document-number { border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink); font-size: 12px; border-radius: 7px; }
  .selected-document-heading h3 { font-size: 15px; color: var(--ink); }
  .selected-document-body summary { color: var(--blue); font-size: 12px; }
  .job-order-actions button { color: var(--muted); }
  .job-order-actions button:hover:not(:disabled) { background: var(--surface-soft); color: var(--ink); }
  .push-submit { padding: 20px 24px; background: var(--surface-soft); }
  .push-submit p { font-size: 12px; }
  .push-submit > button { min-height: 44px; font-size: 13px; }
  .job-preview-empty { min-height: 220px; color: var(--muted); }
  .job-preview-empty > .icon { color: var(--blue); }
  .job-preview-empty strong { color: var(--ink); font-size: 15px; }
  .dispatch-pagination { font-size: 12px; }
  .dispatch-pagination button { min-width: 34px; min-height: 34px; }
  .push-history-heading h2 { font-size: 18px; }
  .push-history-heading p { font-size: 12px; }
  .push-history-layout { grid-template-columns: 224px minmax(0,1fr); gap: 24px; }
  .jobs-workspace .push-history-event { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 16px; }
  .jobs-workspace .push-history-event.active { border-color: var(--blue); background: var(--blue-soft); }
  .push-history-detail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .push-history-detail > header { background: var(--surface-soft); padding: 24px 28px; }
  .push-history-detail h2 { font-size: 24px; }
  .push-snapshot-jobs { padding-inline: 28px; }
  .push-snapshot-job summary strong { font-size: 15px; }

  /* Receiving groups and instance directory. */
  .connection-setup { display: block; padding: 24px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); margin-bottom: 24px; }
  .connection-section-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
  .connection-section-title h2 { font-size: 15px; }
  .connection-section-title p { font-size: 12px; color: var(--muted); margin: 0; }
  .recipient-groups { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 12px; }
  .recipient-chip { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); padding: 14px; min-width: 0; }
  .recipient-chip > .icon { color: var(--blue); flex: none; }
  .recipient-chip > span { min-width: 0; flex: 1; }
  .recipient-chip strong { display: block; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }
  .recipient-chip small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
  .recipient-chip button { width: 32px; min-height: 32px; padding: 6px; border: 0; background: transparent; color: var(--muted); }
  .recipient-chip button .icon { width: 15px; height: 15px; }
  .connection-directory { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
  .connection-filters { padding: 20px 24px; gap: 10px; border-bottom: 1px solid var(--line); }
  .connection-filters input { min-width: 160px; font-size: 12px; }
  .connection-filters select { font-size: 12px; }
  .connection-bulk { padding: 12px 24px; background: var(--blue-soft); font-size: 12px; }
  .connection-directory-heading { padding: 20px 24px; gap: 14px; }
  .connection-directory-heading h2 { font-size: 14px; }
  .connection-directory-heading p { font-size: 12px; color: var(--green); }
  .connection-table-scroll { max-width: 100%; }
  .connection-table-scroll table { min-width: 880px; }
  .connection-table-scroll th { padding: 14px 18px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
  .connection-table-scroll td { padding: 20px 18px; border-color: var(--line); font-size: 12px; color: var(--ink); }
  .connection-table-scroll td strong { font-weight: 600; }
  .connection-table-scroll details { margin-top: 5px; font-size: 12px; color: var(--muted); }
  .connection-table-scroll details code { font-size: 10px; }
  .connection-table-scroll td button { font-size: 12px; min-height: 32px; border-color: var(--control-line); }
  .client-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
  .client-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; }
  .client-status.online { color: var(--green); }
  .client-status.online::before { background: currentColor; }
  .connection-pagination { padding: 16px 24px; font-size: 12px; }

  /* Native dialogs: the UA owns modality and focus, CSS owns presentation. */
  dialog.overlay { position: fixed; inset: 0; width: min(760px,calc(100% - 40px)); max-width: none; height: fit-content; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: auto; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px #0c142d30; }
  dialog.overlay:not([open]) { display: none; }
  dialog.overlay[open] { display: flex; }
  dialog.overlay:has(.job-small-drawer,.confirm-dialog) { width: min(500px,calc(100% - 40px)); }
  dialog.overlay:has(.publication-confirm) { width: min(740px,calc(100% - 40px)); }
  dialog:modal { overscroll-behavior: contain; }
  dialog::backdrop { background: #00000078; overflow: hidden; overscroll-behavior: contain; }
  .drawer, .confirm-dialog { display: flex; flex-direction: column; width: 100%; height: auto; max-height: calc(100dvh - 50px); border: 0; border-radius: 0; background: var(--surface); box-shadow: none; animation: none; overflow: auto; }
  .drawerhead { flex: none; align-items: flex-start; padding: 24px 28px; border-bottom: 1px solid var(--line); }
  .drawerhead h2 { color: var(--ink); font-size: 19px; line-height: 1.5; }
  .drawerhead .sub { margin-top: 6px; font-size: 12px; }
  .drawerhead .close { width: 32px; min-height: 32px; padding: 0; font-size: 24px; color: var(--muted); border: 0; background: var(--surface-soft); border-radius: 7px; }
  .drawerbody, .confirm-dialog .drawerbody { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 28px; overscroll-behavior: contain; }
  .drawerbody :where(input:not([type='checkbox'],[type='radio']),select,textarea) { width: 100%; margin-block-start: 6px; }
  .drawerfoot { flex: none; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--line); background: var(--surface-soft); }
  .drawerfoot > .sub { margin-inline-end: auto; }
  .job-prose { font-family: var(--font-body); color: var(--ink); font-size: 15px; line-height: 1.95; max-width: 76ch; }
  .job-prose :is(h1,h2,h3) { color: var(--ink); letter-spacing: -.3px; }
  .job-prose table { background: var(--surface); }
  .job-prose th { background: var(--surface-soft); color: var(--ink); }
  .job-prose :is(td,th) { border-color: var(--line); }
  .job-prose pre { background: var(--surface-soft); color: var(--ink); }
  .publish-final-list { overflow: visible; }
  .notice { color: var(--ink); background: var(--blue-soft); border-color: var(--line); font-size: 12px; }
  .toast { color: var(--primary-ink); background: var(--primary-bg); border: 1px solid var(--control-line); box-shadow: 0 8px 30px #1017291a; border-radius: 9px; font-size: 12px; z-index: 100; max-width: calc(100% - 32px); }
  .preferences-dialog { color: var(--ink); background: var(--surface); padding: 28px; border: 1px solid var(--line); border-radius: 16px; }
  .preferences-dialog h2 { font-size: 20px; }
  .preferences-dialog select { color: var(--ink); background: var(--surface); border-color: var(--control-line); }
  .theme-option { border: 1px solid var(--control-line); color: var(--ink); background: var(--surface); }
  .theme-option:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); }
  .preferences-dialog footer { font-size: 12px; }

  /* The dimensional scene is the page's visual field, not a small demo card. */
  .ascii-studio { position: relative; min-height: clamp(500px,72dvh,720px); margin: -24px -36px 36px; background: radial-gradient(ellipse at 68% 40%,#087eb06b,transparent 60%),#001c33; color: #fff; overflow: clip; isolation: isolate; content-visibility: auto; contain-intrinsic-size: auto 620px; }
  .ascii-studio::after { content: ''; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: linear-gradient(0deg,#001c33eb,transparent 42%); }
  .ascii-scene-copy { position: absolute; z-index: 1; inset: 38px auto 74px 40px; width: 46%; display: flex; flex-direction: column; pointer-events: none; }
  .ascii-scene-copy h2 { color: #fff; margin: auto 0 0; font-weight: 400; text-wrap: balance; }
  .ascii-wordmark { font: 400 clamp(1.25rem,1rem + .6vw,1.75rem)/1.1 'Pixelify',monospace; color: #bcefff; margin: 0; }
  .ascii-brand-name { display: block; font-size: clamp(2rem,1.5rem + 1.5vw,3rem); font-weight: 500; line-height: 1.2; letter-spacing: -.04em; margin-bottom: 14px; }
  .ascii-headline { display: block; font-size: clamp(1.5rem,1rem + 1.5vw,2.5rem); line-height: 1.4; font-weight: 450; letter-spacing: -.045em; }
  .ascii-stage { position: absolute; z-index: 0; inset: -14% -24% -14% 10%; container-type: size; min-width: 0; display: grid; place-items: center; cursor: grab; touch-action: pan-y; outline-offset: -8px; }
  .ascii-stage.dragging { cursor: grabbing; user-select: none; }
  .ascii-output { display: block; margin: 0; width: 100%; font: 500 7px/1 'DejaVu Sans Mono',Consolas,monospace; font-size: min(.83cqi,1.2cqh); white-space: pre; color: #55caff; text-shadow: 0 0 14px #2aadd940; background: transparent; border: 0; padding: 0; text-align: center; overflow: clip; user-select: none; }
  .ascii-scene-footer { position: absolute; inset: auto 32px 22px 40px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none; }
  .ascii-hint { font-size: 11px; color: #b1d6ec; }
  .ascii-scene-footer button { pointer-events: auto; width: 38px; min-height: 38px; padding: 6px; border-radius: 50%; border: 1px solid #9ddfff60; color: #dcf6ff; background: #003b5d99; font-size: 15px; }
  .ascii-scene-footer button:hover { background: #006fa0; border-color: #bcefff; }
  .ascii-studio :is(button,.ascii-stage):focus-visible { outline: 2px solid #bcefff; }

  /* Search and recipient tags form a single quiet filtering surface. */
  .connection-directory { background: transparent; border: 0; overflow: visible; }
  .connection-search { display: block; padding: 20px 0 24px; border-block: 1px solid var(--line); margin: 20px 0; }
  .connection-search form > label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 10px; }
  .connection-search-line { display: flex; align-items: center; gap: 12px; padding: 5px 6px 5px 14px; border: 1px solid var(--control-line); border-radius: 10px; background: var(--surface); }
  .connection-search-line > .icon { color: var(--muted); flex: none; }
  .connection-search-line input { width: 100%; min-width: 0; border: 0; min-height: 36px; padding: 4px; background: transparent; font-size: 14px; }
  .connection-search-line button { flex: none; min-height: 36px; }
  .connection-tag-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 24px; margin-top: 22px; }
  .connection-tag-row { margin: 0; padding: 0; border: 0; min-width: 0; }
  .connection-tag-row:last-child { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); }
  .connection-tag-row legend { padding: 0; margin-bottom: 8px; font-size: 11px; color: var(--muted); }
  .connection-tag-row > div { display: flex; flex-wrap: wrap; flex-wrap: balance; gap: 6px; }
  .connection-tag-row button { min-height: 32px; padding: 5px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; gap: 7px; }
  .connection-tag-row button[aria-pressed='true'] { color: var(--ink); border-color: var(--control-line); background: var(--surface-soft); font-weight: 550; }
  .connection-tag-row button[aria-pressed='true']::before { content: ''; width: 8px; height: 5px; border-inline-start: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-top: -3px; }
  .connection-tag-row button:hover:not(:disabled) { border-color: var(--control-line); }
  .tag-status { width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
  .tag-status.online { background: currentColor; }
  .connection-scope-note { margin: 18px 0 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
  .connection-no-results { padding: 48px 20px; text-align: center; }
  .connection-no-results strong { font-size: 15px; font-weight: 500; }
  .connection-no-results p { font-size: 13px; margin: 8px 0 0; color: var(--muted); }

  .command-dialog.overlay { width: min(620px,calc(100% - 32px)); margin-top: min(16dvh,140px); }
  .command-dialog .drawerbody { padding-top: 0; }
  .command-search { display: flex; align-items: center; gap: 12px; border: 1px solid var(--control-line); background: var(--surface-soft); border-radius: 10px; padding: 0 14px; }
  .command-search input { min-width: 0; margin: 0; background: transparent; border: 0; }
  .command-results { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; max-height: 45dvh; overflow-y: auto; }
  .command-results button { min-height: 52px; padding: 10px 14px; border: 0; border-radius: 8px; text-align: start; justify-content: flex-start; background: transparent; }
  .command-results button:hover, .command-results button:focus-visible { background: var(--surface-soft); }
  .command-results button > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .command-results strong { font-weight: 500; display: block; }
  .command-results small { display: block; color: var(--muted); font-size: 12px; }
  .command-empty { padding: 20px 10px; color: var(--muted); }

  .login-shell { position: relative; min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1fr) 388px; align-items: center; gap: 32px; padding: 44px; background: #001c33; }
  .login-cli-link { position: absolute; top: 28px; right: 180px; z-index: 4; color: #bcefff; font: 12px 'Pixelify',monospace; text-decoration: none; }
  .login-cli-link:hover { color: #fff; text-decoration: underline; }
  .login-preferences { position: absolute; top: 28px; right: 36px; z-index: 4; min-height: 36px; font-size: 12px; background: #003b5d; color: #dff5ff; border-color: #8bd7ff50; }
  .login-intro { position: static; min-width: 0; align-self: stretch; padding: 0; display: block; background: transparent; color: #fff; }
  .login-intro .brand { position: absolute; top: 34px; left: 44px; z-index: 2; padding: 0; gap: 12px; }
  .login-intro .login-mark { display: grid; place-items: center; width: 40px; height: 40px; }
  .login-intro .brand-logo { width: 40px; height: 40px; filter: brightness(0) invert(1); }
  .login-intro .brand-title { color: #fff; font-size: 24px; }
  .login-intro .brand-lockup small { color: #bcefff; font-family: 'Pixelify',monospace; font-size: 14px; }
  .login-intro .ascii-studio { position: absolute; inset: 0; margin: 0; min-height: 100%; }
  .login-intro .ascii-stage { inset: -12% 14% -12% -24%; }
  .login-intro .ascii-scene-copy { inset: 120px auto 90px 44px; width: 50%; }
  .login-intro .ascii-wordmark { display: none; }
  .login-intro .ascii-brand-name { font-size: clamp(2rem,1.5rem + 1.5vw,3rem); }
  .login-intro .ascii-scene-footer { right: 36px; left: 44px; }
  .login-intro-foot { display: none; }
  .login-form { position: relative; z-index: 2; width: 100%; padding: 36px 30px; margin: 50px 0; border: 1px solid #dff5ff70; border-radius: 16px; background: var(--surface); box-shadow: 0 24px 100px #00000030; }
  .login-form-symbol { display: none; }
  .login-form h2 { font-size: 28px; font-weight: 500; margin-bottom: 8px; letter-spacing: -.04em; }
  .login-form .sub { font-size: 13px; }
  .login-form form { margin-top: 32px; }
  .login-form .formlabel { font-size: 12px; }
  .login-password-label { margin-top: 20px; }
  .login-form input { min-height: 46px; padding: 11px 12px; }
  .login-form .secret-field > input { padding-inline-end: 48px; }
  .login-form .secret-toggle { width: 38px; min-height: 38px; height: 38px; padding: 0; margin: 0; border: 0; color: var(--muted); background: transparent; }
  .login-form button.primary { margin-top: 24px; min-height: 46px; width: 100%; font-size: 13px; }
  .login-form button.primary .icon { margin-inline-start: auto; transform: rotate(180deg); width: 17px; height: 17px; }
  .login-note { color: var(--muted); font-size: 11px; text-align: center; margin-top: 22px; }
  .loading { color: var(--muted); }
  @media (prefers-reduced-motion: no-preference) {
    button[aria-busy='true']::before { animation: busy-turn .7s linear infinite; }
    dialog.overlay[open], .preferences-dialog[open] { animation: dialog-arrive 160ms ease-out; }
  }
  @keyframes busy-turn { to { rotate: 360deg; } }
  @keyframes dialog-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}
@layer responsive {
  @media (max-width: 1200px) {
    :root { --nav-width: 196px; }
    .content { padding-inline: 28px; }
    .ascii-studio { margin-inline: -28px; padding-inline: 28px; }
    .login-intro .ascii-studio { margin: 0; padding: 0; }
    .connection-tag-filters { grid-template-columns: 1fr 1fr; }
    .dispatch-workbench { grid-template-columns: 1fr; }
    .jobs-workspace :is(.dispatch-queue-jump,.dispatch-focus-link) { display: inline-flex; }
    .dispatch-picker-scroll { max-height: 400px; }
  }
  @media (max-width: 760px) {
    .sidebar { position: static; width: 100%; padding: 16px; overflow: visible; display: grid; grid-template-columns: 1fr auto; gap: 18px 12px; }
    .sidebar .brand { padding: 0; gap: 8px; }
    .sidebar .brand .logo, .sidebar .brand-logo { width: 28px; height: 28px; }
    .sidebar .brand-title { font-size: 18px; }
    .brand-caption { font-size: 11px; margin: 0; }
    .workspace-label { display: none; }
    .console-command-trigger { grid-column: 2; grid-row: 1; width: 36px; min-height: 36px; margin: 0 80px 0 0; padding: 8px; }
    .console-command-trigger span, .console-command-trigger kbd { display: none; }
    .sidebar-bottom { grid-column: 2; grid-row: 1; display: flex; flex-direction: row; gap: 2px; padding: 0; margin: 0; align-items: center; justify-self: end; }
    .sidebar-bottom button { width: 36px; min-height: 36px; padding: 5px; font-size: 0; }
    .sidebar-bottom button > .icon { width: 17px; height: 17px; }
    .module-nav { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 12px; margin: 0; }
    .navigation-parent { font-size: 10px; padding: 0 4px; margin: 0 0 6px; }
    .module-nav .job-subnav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .module-nav .connection-subnav { display: flex; }
    .module-nav .nav button { min-height: 40px; padding: 8px; gap: 6px; font-size: 12px; white-space: normal; }
    .module-nav .nav button.active::after { display: none; }
    .module-nav .nav .icon { width: 15px; height: 15px; }
    .layout { display: block; }
    .main { width: 100%; margin: 0; border: 0; border-radius: 0; min-height: auto; }
    .topbar { display: none; }
    .content { padding: 24px 18px max(32px,env(safe-area-inset-bottom)); }
    .ascii-studio { min-height: 540px; margin: -24px -18px 26px; }
    .ascii-scene-copy { inset: 26px 24px 68px; width: auto; }
    .ascii-wordmark { font-size: 1.375rem; }
    .ascii-brand-name { font-size: 1.75rem; margin-bottom: 8px; }
    .ascii-headline { font-size: 1.625rem; }
    .ascii-stage { inset: -8% -32% 0 -32%; }
    .ascii-scene-footer { inset: auto 20px 18px 24px; }
    .job-page-heading { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
    .job-page-heading h1 { font-size: 26px; }
    .job-page-heading p { font-size: 12px; }
    .job-page-heading .actions { width: 100%; }
    .job-page-heading .actions > button { flex: 1; }
    .job-library-tools { flex-wrap: wrap; }
    .job-library-tools .job-search-label { max-width: none; flex: 1 1 100%; }
    .jobs-workspace .job-search-label input { font-size: 16px; }
    .library-view-switch { margin-inline-start: auto; }
    .group-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .jobs-workspace .group-card-open { padding: 18px 18px 12px; }
    .group-card h3 { font-size: 18px; }
    .job-library-layout { grid-template-columns: 1fr; gap: 16px; }
    .job-collections { display: none; }
    .library-table-scroll { overflow-x: auto; }
    .library-table { min-width: 760px; }
    .job-document-item { padding: 22px 18px; }
    .job-editor-fields { grid-template-columns: 1fr; padding: 24px 20px; gap: 20px; }
    .job-document-toolbar { padding: 12px 20px; flex-wrap: wrap; gap: 12px; }
    .job-editor .job-document { padding: 24px 20px; font-size: 16px; }
    .job-editor-foot { padding: 16px 20px; flex-wrap: wrap; gap: 10px; }
    .recipient-context { flex-wrap: wrap; padding: 16px; }
    .recipient-context select { width: 100%; margin: 0; }
    .dispatch-workbench { display: grid; grid-template-columns: 1fr; }
    .push-history-layout { grid-template-columns: 1fr; }
    .push-history-detail > header, .push-snapshot-jobs { padding-inline: 18px; }
    .connection-setup { padding: 18px; }
    .connection-tag-filters { grid-template-columns: 1fr; gap: 16px; }
    .connection-search-line { flex-wrap: wrap; gap: 6px; padding: 8px; }
    .connection-search-line input { width: calc(100% - 36px); flex: 1; font-size: 16px; }
    .connection-search-line button { flex: 1; }
    .connection-bulk { display: flex; flex-wrap: wrap; }
    .connection-bulk[hidden] { display: none; }
    .connection-bulk select { min-width: 0; flex: 1; }
    .connection-pagination { flex-wrap: wrap; gap: 8px; }
    .drawerhead, .drawerbody, .drawerfoot { padding-inline: 20px; }
    dialog.overlay { width: calc(100% - 24px); }
    .preferences-dialog { padding: 22px; width: calc(100% - 24px); }
    .login-shell { display: block; padding: 0 18px 28px; }
    .login-intro { min-height: 580px; }
    .login-cli-link { top: 24px; left: 24px; right: auto; }
    .login-intro .brand { top: 68px; left: 24px; }
    .login-intro .ascii-studio { position: absolute; inset: 0 0 auto; min-height: 580px; height: 580px; margin: 0; padding: 0; }
    .login-intro .ascii-stage { inset: -6% -30% 0 -30%; }
    .login-intro .ascii-scene-copy { inset: 100px 24px 70px; width: auto; }
    .login-intro .ascii-scene-footer { left: 24px; right: 24px; }
    .login-preferences { top: 24px; right: 24px; }
    .login-form { max-width: 440px; width: 100%; margin: -4px auto 0; padding: 28px 24px; }
    .login-form input { font-size: 16px; }
  }
  @media (max-width: 520px) { .group-card-grid { grid-template-columns: 1fr; } }
  @media (pointer: coarse) { .connection-tag-row button { min-height: 40px; } }
  @container (max-width: 300px) { .group-card h3 { font-size: 18px; } }
}
@layer accessibility {
  :where(button,input,select,textarea,summary,a):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
  .group-card-open:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
  .jobs-workspace .job-search-label input:focus-visible { outline-offset: -1px; }
  .skip-link { z-index: 1000; color: var(--blue); background: var(--surface); }
  @media (prefers-reduced-motion: reduce) { button { transition: none; } button:active:not(:disabled), summary:active { scale: none; } }
  @media (forced-colors: active) {
    :root, :root[data-theme='dark'] { --blue: LinkText; --blue-soft: Canvas; --ink: CanvasText; --muted: CanvasText; --line: CanvasText; --surface: Canvas; --surface-soft: Canvas; --bg: Canvas; --control-line: ButtonText; --primary-bg: ButtonFace; --primary-ink: ButtonText; --nav-bg: Canvas; --nav-ink: CanvasText; --nav-muted: CanvasText; --nav-line: CanvasText; --nav-active: Canvas; --green: CanvasText; --danger: LinkText; }
    .module-nav .nav button.active, .library-view-switch button.active { outline: 2px solid Highlight; }
    .group-card { border-color: CanvasText; }
    .ascii-studio, .login-intro { background: Canvas; color: CanvasText; border-color: CanvasText; }
    .ascii-studio :is(h2,p,pre,label,span,button) { color: CanvasText; }
    .ascii-studio::after { display: none; }
  }
}
