:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #64748b;
  --line: #d9e0e8;
  --primary: #1f6feb;
  --primary-hover: #185abc;
  --danger-bg: #fff1f2;
  --danger-text: #be123c;
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --warning-bg: #fff7ed;
  --warning-text: #c2410c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header-inner {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1240px;
  min-height: 64px;
  padding: 0 24px;
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand-menu {
  align-items: center;
  display: flex;
  gap: 10px;
}

.icon-button {
  align-items: center;
  background: #eef2f7;
  border-radius: 6px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.icon-button span {
  background: #263548;
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 16px;
}

.icon-button:hover {
  background: #dbe3ee;
}

.main-nav {
  align-items: stretch;
  align-self: stretch;
  display: flex;
  gap: 4px;
}

/* Pages that opt into the hamburger workflow keep navigation collapsed until the shared header script opens it. */
.main-nav[data-collapsible-menu] {
  display: none;
}

.main-nav[data-collapsible-menu].open {
  display: flex;
}

.main-nav a,
.nav-filter-button {
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  padding: 0 14px;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active,
.nav-filter-button:hover {
  border-bottom-color: var(--primary);
  color: var(--text);
}

.nav-filter-button {
  background: transparent;
  border-radius: 0;
}

.account-menu {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.account-menu > span {
  color: var(--muted);
  font-size: 13px;
  max-width: 260px;
  overflow-wrap: anywhere;
}

.page {
  min-height: 100vh;
  padding: 40px 20px;
}

.form-page {
  min-height: calc(100vh - 65px);
}

.panel {
  width: min(920px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
}

.panel-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.task-form {
  display: grid;
  gap: 20px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #263548;
  font-size: 14px;
  font-weight: 700;
}

.field-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
  min-height: 220px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(31, 111, 235, 0.16);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
}

.project-picker {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.project-select-field {
  min-width: 0;
}

.project-delete-button {
  white-space: nowrap;
}

.new-project-fields {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 16px;
  padding: 16px;
}

.new-project-fields[hidden] {
  display: none;
}

button {
  justify-self: start;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 12px 18px;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-link {
  background: var(--primary);
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 16px;
  text-decoration: none;
}

.button-link:hover {
  background: var(--primary-hover);
}

.button-secondary {
  background: #eef2f7;
  color: #263548;
}

.button-small {
  font-size: 13px;
  padding: 8px 11px;
}

.button-secondary:hover {
  background: #dbe3ee;
}

.user-menu {
  align-items: flex-end;
  color: var(--muted);
  display: grid;
  flex: 0 1 auto;
  font-size: 14px;
  gap: 8px;
  justify-items: end;
  min-width: 0;
}

.user-menu span {
  max-width: 280px;
  overflow-wrap: anywhere;
}

.auth-page {
  align-items: center;
  display: flex;
}

.auth-panel {
  max-width: 460px;
}

.auth-panel .panel-header {
  display: block;
}

.kakao-login {
  align-items: center;
  background: #fee500;
  border-radius: 6px;
  color: #191919;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  text-decoration: none;
}

.kakao-login:hover {
  background: #f5dc00;
}

.alert {
  border-radius: 6px;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 13px 14px;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.workspace {
  margin: 0 auto;
  max-width: 1240px;
  min-height: calc(100vh - 65px);
  padding: 32px 24px 56px;
}

.workspace-heading,
.detail-heading {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.workspace-heading {
  margin-bottom: 22px;
}

.heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.status-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.status-tabs a {
  border-bottom: 3px solid transparent;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 14px;
  text-decoration: none;
}

.status-tabs a:hover,
.status-tabs a.active {
  border-bottom-color: var(--primary);
  color: var(--text);
}

.git-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
}

.git-filter-tabs a {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
  text-decoration: none;
}

.git-filter-tabs a:hover,
.git-filter-tabs a.active {
  border-color: var(--primary);
  color: var(--primary);
}

.active-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}

.active-filters span {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #475569;
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 700;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 9px;
}

.filter-layer[hidden] {
  display: none;
}

.filter-layer {
  inset: 0;
  position: fixed;
  z-index: 40;
}

.filter-backdrop {
  background: rgba(15, 23, 42, 0.42);
  inset: 0;
  position: absolute;
}

.task-list-controls {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 20px;
}

.filter-dialog {
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  left: 50%;
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  position: absolute;
  top: 48px;
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 32px));
}

.filter-dialog-heading,
.filter-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.filter-dialog-heading strong {
  font-size: 17px;
}

.filter-actions {
  justify-content: flex-start;
}

.modal-open {
  overflow: hidden;
}

.task-list-controls label {
  gap: 6px;
}

.task-list-controls label span {
  font-size: 12px;
}

.task-list-controls input,
.task-list-controls select {
  padding: 10px 12px;
}

.task-list-controls button,
.task-list-controls .button-link {
  min-height: 42px;
}

.table-section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.task-list-section {
  display: grid;
  gap: 14px;
}

.task-list-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* Task cards replace the wide table so the same list stays scannable on desktop and mobile. */
.task-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
}

.task-card-header,
.task-card-kicker,
.task-card-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.task-card-header {
  justify-content: space-between;
}

.task-card-kicker,
.task-card-actions {
  flex-wrap: wrap;
  min-width: 0;
}

.task-card-id {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.task-card-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.task-card-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.task-card-meta {
  border-top: 1px solid #e8edf2;
  display: grid;
  gap: 12px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding-top: 14px;
}

.task-card-meta > div {
  min-width: 0;
}

.task-card-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 4px;
}

.task-card-meta dd {
  color: #263548;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-card-wide {
  grid-column: 1 / -1;
}

.task-card-actions {
  border-top: 1px solid #e8edf2;
  padding-top: 14px;
}

.task-card-actions form {
  margin: 0;
}

.task-load-more {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px;
  justify-content: center;
  padding: 10px 0 0;
  text-align: center;
}

.task-load-more button {
  min-width: 120px;
}

.table-summary {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 13px 16px;
}

.table-scroll {
  overflow-x: auto;
}

.task-table {
  border-collapse: collapse;
  min-width: 1480px;
  width: 100%;
}

.task-table th,
.task-table td {
  border-bottom: 1px solid #e8edf2;
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

.task-table th {
  background: #f8fafc;
  color: #526174;
  font-size: 12px;
  font-weight: 800;
}

.task-table td {
  color: #334155;
  font-size: 14px;
}

.task-table tbody tr:hover {
  background: #f8fbff;
}

.task-table tbody tr:last-child td {
  border-bottom: 0;
}

.task-id,
.nowrap {
  white-space: nowrap;
}

.task-title-cell {
  min-width: 300px;
}

.task-title-cell a {
  color: var(--text);
  display: block;
  font-weight: 750;
  margin-bottom: 5px;
  text-decoration: none;
}

.task-title-cell a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.task-title-cell span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.project-path-cell {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.commit-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-action form {
  margin: 0;
}

.status-badge,
.priority,
.git-badge {
  border-radius: 4px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 8px;
  white-space: nowrap;
}

.git-pending,
.git-status_requested,
.git-status_checking,
.git-ready,
.git-commit_requested,
.git-committing {
  background: #eef2f7;
  color: #475569;
}

.git-committed {
  background: var(--success-bg);
  color: var(--success-text);
}

.git-failed {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.status-requested {
  background: #eef2f7;
  color: #475569;
}

.status-reference {
  /* Reference badges use a distinct neutral color because they are not actionable queue items. */
  background: #f5f3ff;
  color: #6d28d9;
}

.status-in_progress {
  background: #e8f1ff;
  color: #1456a0;
}

.status-completed {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-failed {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.status-blocked {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status-user_closed {
  background: #e2e8f0;
  color: #334155;
}

.priority {
  background: #f1f5f9;
  color: #475569;
}

.priority-high {
  background: #fff7ed;
  color: #c2410c;
}

.priority-urgent {
  background: #fff1f2;
  color: #be123c;
}

.empty-state {
  color: var(--muted);
  padding: 64px 20px;
  text-align: center;
}

.deployment-workspace {
  display: grid;
  gap: 18px;
}

.deployment-run-list,
.deployment-events {
  display: grid;
  gap: 14px;
}

.deployment-run-card,
.deployment-event {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.deployment-run-header,
.deployment-event-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.deployment-event-header time {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
}

.deployment-meta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 0;
}

.deployment-meta-grid > div,
.deployment-event-meta > div {
  min-width: 0;
}

.deployment-meta-grid dt,
.deployment-event-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.deployment-meta-grid dd,
.deployment-event-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.deployment-event p {
  margin: 12px 0 0;
}

.deployment-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 12px 0 0;
}

.deployment-log-block {
  background: #111827;
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.55;
  margin: 12px 0 0;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.deploy-running,
.deploy-pending,
.deploy-info {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.deploy-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.deploy-failed {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.deploy-skipped {
  background: #eef2f7;
  color: var(--muted);
}

.infinite-scroll-state {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 16px;
  text-align: center;
}

.detail-workspace {
  max-width: 1180px;
}

.detail-back {
  margin-bottom: 18px;
}

.detail-back a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.detail-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.detail-jump-nav {
  background: rgba(244, 246, 248, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  margin: 0 -8px;
  overflow-x: auto;
  padding: 12px 8px;
  position: sticky;
  top: 64px;
  z-index: 10;
}

.detail-jump-nav a {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #475569;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  text-decoration: none;
}

.detail-jump-nav a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.detail-jump-nav .git-jump-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.content-section {
  scroll-margin-top: 128px;
}

.detail-heading h1 {
  font-size: 28px;
  margin-top: 12px;
  overflow-wrap: anywhere;
}

.detail-kicker {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
}

.detail-time {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
  justify-items: end;
  white-space: nowrap;
}

.detail-actions {
  align-items: flex-end;
  display: grid;
  gap: 12px;
  justify-items: end;
}

.detail-time strong {
  color: #334155;
  font-size: 14px;
}

.detail-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) 300px;
  padding-top: 28px;
}

.detail-main,
.detail-sidebar {
  min-width: 0;
}

.content-section,
.side-section {
  border-bottom: 1px solid var(--line);
  padding: 0 0 30px;
}

.content-section + .content-section,
.side-section + .side-section {
  padding-top: 30px;
}

.content-section h2,
.side-section h2 {
  font-size: 17px;
  margin: 0 0 16px;
}

.request-content,
.pre-wrap {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.request-content {
  color: #263548;
  line-height: 1.7;
}

.answer-section {
  border-left: 3px solid #f59e0b;
  padding-left: 18px;
}

.question-content {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #3f2f11;
  line-height: 1.7;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.answer-form {
  display: grid;
  gap: 16px;
}

.answer-form textarea {
  min-height: 150px;
}

.section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.refresh-state {
  color: var(--muted);
  font-size: 12px;
}

.refresh-error {
  color: var(--danger-text);
}

.activity-list,
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  border-left: 3px solid #cbd5e1;
  padding: 2px 0 20px 18px;
}

.activity-item:last-child {
  padding-bottom: 0;
}

.activity-progress {
  border-left-color: var(--primary);
}

.activity-warning {
  border-left-color: #f59e0b;
}

.activity-error {
  border-left-color: #e11d48;
}

.activity-result {
  border-left-color: #059669;
}

.activity-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 10px;
}

.activity-level {
  color: #334155;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-item p {
  line-height: 1.6;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.activity-item pre {
  background: #f6f8fa;
  border: 1px solid #e5eaf0;
  border-radius: 6px;
  font-size: 12px;
  margin: 10px 0 0;
  max-width: 100%;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

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

.result-list,
.metadata-list {
  margin: 0;
}

.result-list > div {
  display: grid;
  gap: 8px;
  grid-template-columns: 120px minmax(0, 1fr);
  padding: 12px 0;
}

.result-list dt,
.metadata-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.result-list dd,
.metadata-list dd {
  line-height: 1.6;
  margin: 0;
  overflow-wrap: anywhere;
}

.error-text {
  color: var(--danger-text);
}

.handoff-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.handoff-synced {
  color: var(--success-text);
}

.plain-file-list,
.next-step-list {
  margin: 0;
  padding-left: 20px;
}

.plain-file-list {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.plain-file-list li + li,
.next-step-list li + li {
  margin-top: 6px;
}

.section-note {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.git-summary {
  margin: 0 0 18px;
}

.git-summary > div {
  display: grid;
  gap: 8px;
  grid-template-columns: 120px minmax(0, 1fr);
  padding: 8px 0;
}

.git-summary dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.git-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.changed-files {
  margin: 0 0 18px;
}

.changed-files strong {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}

.changed-files ul {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  list-style: none;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 12px 14px;
}

.changed-files li + li {
  margin-top: 6px;
}

.git-commit-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.metadata-list > div {
  border-bottom: 1px solid #e8edf2;
  display: grid;
  gap: 6px;
  padding: 12px 0;
}

.metadata-list > div:first-child {
  padding-top: 0;
}

.history-list li {
  border-left: 2px solid #cbd5e1;
  display: grid;
  gap: 5px;
  padding: 0 0 20px 14px;
}

.history-list li:last-child {
  padding-bottom: 0;
}

.history-list span {
  font-size: 13px;
  font-weight: 800;
}

.history-list strong,
.history-list time {
  color: var(--muted);
  font-size: 12px;
}

.history-list p {
  font-size: 13px;
  line-height: 1.5;
  margin: 2px 0 0;
}

@media (max-width: 980px) {
  .task-card-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .app-header-inner {
    gap: 12px;
    grid-template-columns: 1fr auto;
    min-height: auto;
    padding: 12px 14px;
  }

  .brand-menu {
    min-width: 0;
  }

  .main-nav {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 6px;
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav a,
  .nav-filter-button {
    border-bottom: 0;
    border-radius: 6px;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0 12px;
    width: 100%;
  }

  .main-nav a:hover,
  .main-nav a.active,
  .nav-filter-button:hover {
    background: #eef2f7;
    border-bottom-color: transparent;
  }

  .account-menu > span {
    display: none;
  }

  .workspace {
    padding: 24px 12px 44px;
  }

  .page {
    padding: 20px 12px;
  }

  .panel {
    padding: 22px 16px;
  }

  h1 {
    font-size: 24px;
  }

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

  .project-picker {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .panel-header {
    display: grid;
  }

  .workspace-heading,
  .detail-heading {
    align-items: stretch;
    display: grid;
  }

  /* Header action buttons should wrap as controls, not expand like full-width form submit buttons. */
  .heading-actions {
    justify-content: flex-start;
  }

  .heading-actions button,
  .heading-actions .button-link,
  .detail-actions button,
  .detail-actions .button-link {
    width: auto;
  }

  /* Long search/project filters stack on mobile so paths do not create page-level overflow. */
  .active-filters {
    align-items: stretch;
  }

  .active-filters span {
    flex-basis: 100%;
  }

  .task-list-controls {
    grid-template-columns: 1fr;
  }

  .task-card {
    padding: 15px;
  }

  .task-card-header {
    align-items: flex-start;
    display: grid;
  }

  .task-card-meta {
    grid-template-columns: 1fr;
  }

  .task-card-actions {
    align-items: stretch;
  }

  .deployment-run-header,
  .deployment-event-header {
    align-items: stretch;
    flex-direction: column;
  }

  .deployment-meta-grid {
    grid-template-columns: 1fr;
  }

  .task-list-controls button,
  .task-list-controls .button-link {
    width: 100%;
  }

  .detail-jump-nav {
    top: 108px;
  }

  .detail-time {
    justify-items: start;
  }

  .detail-actions {
    justify-items: start;
  }

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

  .detail-sidebar {
    border-top: 1px solid var(--line);
    padding-top: 28px;
  }

  .result-list > div {
    grid-template-columns: 1fr;
  }

  .user-menu {
    align-items: stretch;
    justify-items: stretch;
  }

  button {
    width: 100%;
  }

  .button-small {
    width: auto;
  }

  .button-link {
    justify-content: center;
  }
}
