:root {
  --bg: #f4f6f8;
  --ink: #111216;
  --muted: #626977;
  --quiet: #8a92a0;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e2e7ef;
  --line-strong: #c8d1df;
  --forest: #101820;
  --forest-2: #2754d8;
  --red: #b23a2f;
  --red-soft: #fff0ec;
  --gold: #b7791f;
  --gold-soft: #fff4dc;
  --green-soft: #e7f5ee;
  --blue: #244f93;
  --blue-soft: #eaf1ff;
  --shadow: 0 24px 70px rgba(21, 23, 18, 0.1);
  --shadow-soft: 0 12px 34px rgba(21, 23, 18, 0.07);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 18, 22, 0.035) 0 1px, transparent 1px 92px),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 54px;
  line-height: 0.96;
  font-weight: 580;
  letter-spacing: 0;
}

h2 {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: 0;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0;
}

.app-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 28px;
  margin: 0 auto;
  padding: 22px;
}

.sidebar {
  position: sticky;
  top: 22px;
  height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: var(--radius);
  color: #f8fbf6;
  background: linear-gradient(180deg, #101216 0%, #1b2432 100%);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-family: ui-serif, Georgia, serif;
  font-size: 24px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 16px;
  font-weight: 820;
}

.brand span {
  margin-top: 2px;
  color: rgba(248, 251, 246, 0.64);
  font-size: 12px;
  line-height: 1.35;
}

.side-nav {
  display: grid;
  gap: 7px;
  margin-top: 32px;
}

.nav-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: rgba(248, 251, 246, 0.72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 760;
}

.nav-link svg,
.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.side-status {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.status-pill,
.priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  width: max-content;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid rgba(31, 93, 79, 0.2);
  border-radius: var(--radius);
  color: var(--forest);
  background: var(--green-soft);
  font-size: 12px;
  line-height: 1;
  font-weight: 820;
  text-transform: lowercase;
}

.status-pill.quiet {
  color: rgba(248, 251, 246, 0.72);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.status-pill.bad,
.bubble.error {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(178, 58, 47, 0.22);
}

.shell {
  min-width: 0;
  display: grid;
  gap: 22px;
  padding-bottom: 28px;
}

.topbar {
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 34px;
}

.lede {
  max-width: 660px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.top-actions,
.panel-head,
.filters,
.review-actions,
.comms-topline,
.channel-strip {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 10px;
}

.icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.icon-btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.focus-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.focus-card {
  min-width: 0;
  display: grid;
  align-content: space-between;
  min-height: 168px;
  padding: 18px;
  border: 1px solid rgba(21, 23, 18, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.focus-card.primary {
  color: #fff;
  background: linear-gradient(135deg, #111216 0%, #24334f 62%, #8a463c 100%);
}

.focus-kicker,
.label {
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 840;
  letter-spacing: 0;
}

.focus-card.primary .focus-kicker,
.focus-card.primary p {
  color: rgba(255, 255, 255, 0.72);
}

.focus-card strong {
  display: block;
  margin-top: 18px;
  font-family: ui-serif, Georgia, serif;
  font-size: 42px;
  line-height: 0.95;
  font-weight: 580;
}

.focus-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.progress-track {
  height: 9px;
  margin-top: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #e66b54, #86d7aa);
  transition: width 180ms ease;
}

#remainingBadge.warn {
  color: #ffd99d;
}

.flow-grid,
.workbench,
.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(340px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(21, 23, 18, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  overflow: clip;
}

.panel-head {
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.label {
  margin-bottom: 8px;
}

.attention-list,
.cron-list,
.job-list,
.jobroom-list,
.comms-list,
.skill-list,
.upgrade-list {
  display: grid;
}

.attention-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.attention-item:first-child {
  border-top: 0;
}

.attention-item:hover,
.job-row:hover,
.jobroom-row:hover {
  background: var(--surface-soft);
}

.attention-item strong {
  display: block;
  font-size: 16px;
  font-weight: 820;
}

.attention-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.attention-mark {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--forest);
}

.attention-mark.red {
  background: var(--red);
}

.attention-mark.gold {
  background: var(--gold);
}

.cron-list {
  padding: 0 20px 14px;
}

.cron-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.cron-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.cron-item span,
.job-meta,
.muted,
.comms-card p,
.reply-editor p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.filters {
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(21, 23, 18, 0.07);
  border-radius: var(--radius);
  background: #eef3ed;
}

.job-source-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.source-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 860;
}

.source-copy p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.source-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.primary-action,
.upgrade-launch,
.button-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 12px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 820;
  text-decoration: none;
}

.primary-action {
  grid-column: 1 / -1;
  background: var(--forest-2);
}

.primary-action:hover,
.upgrade-launch:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 18, 22, 0.12);
}

.primary-action:disabled,
.upgrade-launch:disabled {
  cursor: progress;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.source-card {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.source-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.source-card strong {
  font-size: 13px;
  font-weight: 860;
}

.source-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.seg {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 780;
}

.seg:hover {
  color: var(--ink);
}

.seg.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.13);
}

.seg.primary-action {
  color: #fff;
  background: var(--forest);
}

.seg.primary-action:disabled {
  opacity: 0.68;
  cursor: progress;
}

.channel-strip {
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.channel-strip span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 780;
}

.comms-card {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.comms-card:first-child {
  border-top: 0;
}

.comms-topline {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.comms-topline span:not(.priority) {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
}

.priority.urgent,
.priority.high {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(178, 58, 47, 0.22);
}

.priority.medium {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(183, 121, 31, 0.22);
}

.priority.low {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(36, 79, 147, 0.18);
}

.comms-main {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
}

.comms-main h3 {
  margin-bottom: 6px;
}

.comms-main > div > p:not(.job-meta) {
  margin-top: 16px;
}

.next-action {
  color: var(--forest) !important;
  font-weight: 740;
}

.approval-line {
  color: var(--ink) !important;
  font-weight: 760;
}

.reply-editor {
  display: grid;
  gap: 10px;
}

.integration-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.integration-panel h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.15;
}

.integration-panel p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.integration-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.integration-checks span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.integration-checks .ok {
  color: var(--forest);
  background: var(--green-soft);
  border-color: rgba(31, 93, 79, 0.18);
}

.integration-checks .todo {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(183, 121, 31, 0.22);
}

.integration-missing {
  grid-column: 1 / -1;
  color: var(--gold) !important;
  font-weight: 760;
}

.reply-editor textarea,
.business-form textarea,
.chat-form textarea,
.auth-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  color: var(--ink);
  background: var(--surface-soft);
  resize: vertical;
  font-size: 14px;
  line-height: 1.45;
}

.reply-editor textarea:focus,
.business-form textarea:focus,
.chat-form textarea:focus,
.auth-panel input:focus {
  outline: 2px solid rgba(31, 93, 79, 0.2);
  border-color: rgba(31, 93, 79, 0.42);
}

.review-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.skill-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  gap: 20px;
  padding: 20px;
}

.control-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.control-summary span,
.status-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.skill-row,
.upgrade-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 16px;
  align-items: center;
  padding: 17px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.upgrade-launch {
  width: 100%;
  background: var(--forest-2);
}

.skill-row:first-child,
.upgrade-row:first-child {
  border-top: 0;
}

.skill-row strong,
.upgrade-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 840;
}

.skill-row p,
.upgrade-row p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.skill-row em,
.upgrade-row em {
  display: block;
  margin-top: 6px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.35;
  font-style: normal;
  font-weight: 740;
}

.status-chip.production,
.status-chip.configured {
  color: var(--forest);
  background: var(--green-soft);
  border-color: rgba(31, 93, 79, 0.18);
}

.status-chip.quarantine,
.status-chip.recommended {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(183, 121, 31, 0.22);
}

.status-chip.archived,
.status-chip.missing {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(178, 58, 47, 0.22);
}

.skill-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.skill-meta,
.skill-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skill-meta span,
.skill-files span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 780;
}

.skill-files {
  margin-top: 14px;
}

.business-form {
  display: grid;
  gap: 10px;
}

.business-form button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #fff;
  background: var(--forest);
  font-size: 13px;
  font-weight: 820;
}

.business-form button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line);
}

.business-form p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.job-row,
.jobroom-row {
  display: grid;
  gap: 14px;
  padding: 17px 20px;
  border-top: 1px solid var(--line);
}

.job-row:first-child,
.jobroom-row:first-child {
  border-top: 0;
}

.job-row {
  grid-template-columns: 52px minmax(0, 1fr) 168px;
  align-items: start;
}

.jobroom-row {
  grid-template-columns: 94px minmax(0, 1fr) 88px;
  align-items: start;
}

.score {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--forest);
  background: var(--green-soft);
  font-weight: 880;
}

.job-main,
.jobroom-main {
  min-width: 0;
}

.job-title {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 820;
  text-decoration: none;
}

.job-title-line,
.upgrade-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.source-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 820;
}

.job-title:hover {
  color: var(--forest-2);
}

.job-meta + .job-meta {
  margin-top: 4px;
}

.job-actions {
  display: grid;
  gap: 7px;
  align-content: start;
}

.job-actions button,
.job-actions .button-link,
.chat-form button,
.auth-panel button,
.jobroom-actions button,
.review-actions button {
  min-height: 37px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 12px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.job-actions button:hover,
.chat-form button:hover,
.auth-panel button:hover,
.review-actions button:hover {
  background: #2a2e25;
}

.job-actions button.secondary,
.button-link.secondary,
.jobroom-actions button,
.review-actions button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.review-actions button.ghost {
  color: var(--red);
  background: transparent;
  border-color: rgba(178, 58, 47, 0.2);
}

.job-actions button.secondary:hover,
.button-link.secondary:hover,
.jobroom-actions button:hover,
.review-actions button.secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.job-actions button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.ready-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.ready-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}

.ready-dot.ok {
  background: var(--forest-2);
}

.jobroom-actions {
  display: grid;
}

.chat-panel {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  max-height: calc(100vh - 44px);
}

.chat-log {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 20px;
  overflow: auto;
}

.bubble {
  padding: 12px 13px;
  border: 1px solid rgba(21, 23, 18, 0.06);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bubble.user {
  background: var(--green-soft);
}

.chat-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.package-panel {
  display: grid;
  gap: 12px;
  margin: 0 14px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.package-panel.hidden {
  display: none;
}

.package-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
}

.package-head span {
  color: var(--forest);
  font-weight: 820;
}

.package-links {
  display: grid;
  gap: 7px;
}

.package-links a {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--forest-2);
  background: var(--surface);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.auth {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(245, 247, 244, 0.92);
  backdrop-filter: blur(12px);
}

.auth.hidden {
  display: none;
}

.auth-panel {
  width: min(380px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  font-family: inherit;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 820;
}

.empty {
  padding: 30px 20px;
  color: var(--muted);
}

.empty.compact {
  padding: 14px 20px;
}

@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .side-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    margin-top: 0;
  }

  .side-status {
    grid-auto-flow: column;
    margin-left: auto;
  }

  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-grid,
  .workbench,
  .control-grid,
  .skill-body,
  .integration-panel,
  .comms-main {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    position: static;
    min-height: 460px;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    gap: 14px;
    padding: 10px;
  }

  .sidebar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .side-status {
    grid-auto-flow: row;
    margin-left: 0;
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    min-height: 128px;
    padding-top: 18px;
  }

  h1 {
    font-size: 38px;
  }

  .lede {
    font-size: 16px;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .focus-card {
    min-height: 136px;
  }

  .focus-card strong {
    font-size: 34px;
  }

  .filters,
  .review-actions {
    width: 100%;
  }

  .job-source-panel {
    grid-template-columns: 1fr;
  }

  .source-actions {
    grid-template-columns: 1fr;
  }

  .seg,
  .review-actions button {
    flex: 1 1 auto;
  }

  .job-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .jobroom-row {
    grid-template-columns: 1fr;
  }

  .skill-row,
  .upgrade-row {
    grid-template-columns: 1fr;
  }

  .job-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .job-actions .button-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 32px;
  }

  .panel-head,
  .comms-card,
  .job-row,
  .jobroom-row,
  .attention-item {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand {
    align-items: flex-start;
  }

  .side-nav {
    grid-auto-flow: row;
  }
}
