:root {
  color-scheme: light;
  --brand-maroon: #4a1118;
  --brand-maroon-dark: #2b080d;
  --brand-maroon-soft: #7b2630;
  --brand-gold: #d4af6a;
  --brand-white: #ffffff;
  --brand-light-gray: #d0d0d0;
  --surface-warm: #f6f1e7;
  --text-main: #241c19;
  --border-subtle: #d8cbb8;
  --bg: var(--surface-warm);
  --surface: #fffdfa;
  --surface-muted: #fbf7ef;
  --text: var(--text-main);
  --muted: #675f58;
  --line: var(--border-subtle);
  --accent: var(--brand-maroon);
  --accent-dark: var(--brand-maroon-dark);
  --warning-bg: #fff7e7;
  --warning-line: var(--brand-gold);
  --focus: var(--brand-gold);
  --shadow-soft: 0 10px 24px rgba(43, 8, 13, 0.08);
  --shadow-workspace: 0 16px 32px rgba(43, 8, 13, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1600px, calc(100% - 28px));
  height: 100vh;
  margin: 0 auto;
  padding: 8px 0 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 58px;
  border: 1px solid color-mix(in srgb, var(--brand-maroon-soft) 65%, var(--brand-maroon-dark));
  border-bottom: 2px solid var(--brand-gold);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--brand-maroon), var(--brand-maroon-dark));
  color: var(--brand-white);
  padding: 7px 14px;
}

.app-header h1,
.app-header p {
  margin: 0;
}

.app-header h1 {
  color: var(--brand-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.24rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--brand-light-gray);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-anchor {
  color: var(--brand-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.trust-line {
  color: var(--brand-light-gray);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
}

.workspace-frame {
  display: grid;
  grid-template-columns: clamp(280px, 22vw, 340px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.navigation-zone,
.workspace-zone {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.navigation-zone {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  overflow: hidden;
}

.nav-search {
  display: grid;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-gold) 13%, #ffffff);
  padding: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

label {
  color: var(--brand-maroon-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

button,
summary,
.task-tree-node,
.task-tree-parent,
.task-link {
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
}

select:focus,
input:focus,
textarea:focus,
button:focus,
#assignmentOutput:focus,
#assignmentEditor:focus,
summary:focus,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible,
#assignmentOutput:focus-visible,
#assignmentEditor:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 58%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(180, 137, 48, 0.18);
}

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

.task-tree {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.task-tree-branch {
  margin-bottom: 6px;
}

.task-tree-parent {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--brand-maroon) 20%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand-maroon) 3%, var(--surface));
  color: var(--brand-maroon-dark);
  padding: 5px 8px;
  font-size: 0.8rem;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.task-tree-parent::-webkit-details-marker {
  display: none;
}

.tree-disclosure::before {
  content: "\25b6";
  display: inline-block;
  color: var(--brand-maroon);
  font-size: 0.7rem;
}

.task-tree-branch[open] > .task-tree-parent .tree-disclosure::before {
  content: "\25bc";
}

.task-tree-parent-label {
  min-width: 0;
}

.task-tree-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.task-tree-children {
  display: grid;
  gap: 4px;
  margin: 5px 0 8px 9px;
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.task-tree-node {
  display: grid;
  grid-template-columns: 10px auto minmax(0, 1fr);
  gap: 2px 7px;
  align-items: start;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 6px 7px;
  text-align: left;
}

.task-tree-node:hover,
.task-tree-node.is-selected {
  border-color: color-mix(in srgb, var(--brand-maroon) 28%, var(--line));
  background: color-mix(in srgb, var(--brand-maroon) 5%, #ffffff);
}

.task-tree-node.is-selected {
  border-color: var(--brand-maroon);
  box-shadow: inset 3px 0 0 var(--brand-maroon);
}

.tree-spacer {
  width: 10px;
  height: 100%;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transform: translateY(-6px);
}

.task-tree-code {
  color: var(--brand-maroon);
  font-size: 0.78rem;
  font-weight: 850;
}

.task-tree-title {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
}

.task-tree-node .status-indicator {
  grid-column: 3;
  justify-self: start;
  margin-left: 0;
}

.task-tree-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.workspace-zone {
  display: grid;
  grid-template-rows:
    auto
    auto
    auto
    minmax(260px, 1fr)
    minmax(96px, 112px)
    auto;
  gap: 8px;
  overflow: hidden;
  padding: 10px;
  box-shadow: var(--shadow-soft);
}

.workspace-zone:has(.materials-panel[hidden]) {
  grid-template-rows:
    auto
    auto
    auto
    minmax(280px, 1fr)
    0
    auto;
}

.workspace-zone:has(.task-audit[open]) {
  grid-template-rows:
    auto
    auto
    auto
    minmax(150px, 0.6fr)
    minmax(64px, 72px)
    minmax(230px, 1.4fr);
}

.workspace-zone:has(.materials-panel[hidden]):has(.task-audit[open]) {
  grid-template-rows:
    auto
    auto
    auto
    minmax(220px, 1fr)
    0
    minmax(150px, 1fr);
}

.current-task,
.dynamic-inputs,
.perspective-selection,
.prompt-group,
.materials-needed,
.task-audit,
.prompt-secondary-actions {
  min-width: 0;
}

.current-task {
  grid-row: 1;
  display: grid;
  gap: 2px;
  align-items: start;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-maroon) 18%, var(--line));
  padding: 1px 0 5px;
}

.current-task h2 {
  margin: 0;
  color: var(--brand-maroon);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.location-breadcrumb {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.current-task-meta {
  display: none;
}

.current-task-meta div,
.workflow-context div,
.task-reference div {
  display: grid;
  gap: 2px;
}

.current-task-meta dt,
.workflow-context dt,
.task-reference dt {
  color: var(--brand-maroon-dark);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.current-task-meta dd,
.workflow-context dd,
.task-reference dd {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.dynamic-inputs {
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 45%, var(--line));
  border-left: 4px solid color-mix(in srgb, var(--brand-gold) 86%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-gold) 10%, #ffffff);
  padding: 8px 10px;
}

.field-group {
  display: grid;
  gap: 5px;
  margin: 0;
}

#taskForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

#taskForm[hidden] {
  display: none !important;
}

#taskForm textarea {
  min-height: 48px;
  resize: vertical;
}

.perspective-selection {
  grid-row: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--brand-gold) 5%, #ffffff);
  min-height: 34px;
  padding: 4px 8px;
}

.perspective-selection.no-perspective {
  grid-template-columns: minmax(0, 1fr) auto;
  background: transparent;
  border-color: transparent;
  padding-block: 2px;
}

.perspective-selection.no-perspective .feedback-button {
  grid-column: 2;
}

.perspective-selection.has-perspective .feedback-button {
  grid-column: 3;
}

.feedback-button {
  justify-self: end;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 750;
}

.feedback-button:hover {
  border-color: var(--accent);
  color: var(--brand-maroon-dark);
}

.role-actions,
.primary-actions,
.prompt-secondary-actions,
.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.role-actions button,
.primary-actions button,
.prompt-secondary-actions button,
.status-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  padding: 7px 12px;
  font-weight: 700;
}

.role-actions button:hover,
.prompt-secondary-actions button:hover,
.status-actions button:hover {
  border-color: var(--accent);
}

.role-actions button.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #ffffff);
  color: var(--accent-dark);
}

.prompt-group {
  grid-row: 4;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  border: 5px solid color-mix(in srgb, var(--brand-maroon) 50%, var(--line));
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-workspace);
}

.prompt-workspace {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.prompt-workspace.is-editing {
  grid-template-rows: minmax(0, 1fr);
}

#assignmentOutput,
#assignmentEditor {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--brand-maroon) 24%, var(--line));
  border-radius: 6px;
  background: #ffffff;
  padding: 18px;
  color: #25282d;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.62;
  white-space: pre-wrap;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-gold) 12%, transparent);
}

#assignmentEditor {
  resize: none;
}

.prompt-workspace.is-editing #assignmentEditor {
  grid-row: 1;
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

.prompt-workspace.is-editing .edit-prompt-notice,
.prompt-workspace.is-editing .placeholder-warning {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  left: 10px;
  max-height: 64px;
  overflow: auto;
  box-shadow: 0 4px 12px rgba(74, 17, 24, 0.12);
}

#assignmentOutput.is-expanded,
#assignmentEditor.is-expanded {
  min-height: 0;
}

.primary-actions {
  border-top: 1px solid color-mix(in srgb, var(--brand-maroon) 18%, var(--line));
  padding: 8px 10px;
  background: color-mix(in srgb, var(--brand-gold) 7%, #ffffff);
  flex-wrap: nowrap;
  min-width: 0;
}

#copyButton {
  border-color: var(--brand-gold);
  background: var(--brand-gold);
  color: var(--brand-maroon-dark);
  min-height: 38px;
  padding-inline: 16px;
  font-weight: 850;
  box-shadow: 0 4px 10px rgba(74, 17, 24, 0.13);
}

#copyButton:hover {
  background: #e0bf7a;
}

#resetPromptButton {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

#editPromptButton,
#downloadPacketButton {
  background: #ffffff;
  color: var(--muted);
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
}

#editPromptButton {
  color: var(--brand-maroon-dark);
  font-weight: 800;
}

.prompt-secondary-actions {
  margin-left: auto;
  justify-content: flex-end;
}

#copyStatus {
  color: var(--muted);
  font-weight: 650;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.feedback-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--brand-maroon) 32%, var(--line));
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(45, 34, 31, 0.28);
}

.feedback-dialog::backdrop {
  background: rgba(28, 24, 22, 0.42);
}

.feedback-form {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.feedback-header h2 {
  margin: 0;
  font-size: 1rem;
}

.feedback-close,
.feedback-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  padding: 6px 10px;
  font-weight: 750;
}

.feedback-close:hover,
.feedback-actions button:hover {
  border-color: var(--accent);
}

.feedback-warning {
  margin: 0;
  border-left: 4px solid var(--brand-gold);
  background: color-mix(in srgb, var(--brand-gold) 14%, #ffffff);
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.4;
}

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

.feedback-wide {
  grid-column: 1 / -1;
}

.feedback-form label {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--brand-maroon) 26%, var(--line));
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 9px;
  font: inherit;
}

.feedback-form textarea {
  min-height: 96px;
  resize: vertical;
}

.feedback-form input[readonly] {
  background: color-mix(in srgb, var(--surface-muted) 62%, #ffffff);
}

.feedback-bot-field {
  display: none;
}

.optional-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.feedback-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#feedbackSubmitButton {
  border-color: var(--brand-gold);
  background: var(--brand-gold);
  color: var(--brand-maroon-dark);
}

.materials-needed {
  grid-row: 5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-gold) 4%, #ffffff);
  padding: 8px 10px;
}

.panel-guidance {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.materials-block {
  min-height: 0;
  overflow: auto;
}

.materials-block ul,
#nextTasksList {
  margin: 0;
  padding-left: 20px;
}

.material-item {
  margin: 3px 0;
  font-size: 0.82rem;
}

.material-item-referenced {
  border-left: 3px solid color-mix(in srgb, var(--brand-gold) 65%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand-gold) 5%, var(--surface));
  padding: 5px 8px;
}

.material-text {
  display: block;
}

.material-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.material-reference-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--brand-maroon-dark);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 800;
}

.material-badge-task {
  border-color: color-mix(in srgb, var(--brand-maroon) 28%, var(--line));
  background: color-mix(in srgb, var(--brand-maroon) 7%, #ffffff);
}

.material-badge-file {
  border-color: color-mix(in srgb, var(--brand-gold) 55%, var(--line));
  background: color-mix(in srgb, var(--brand-gold) 14%, #ffffff);
}

.material-badge-tool {
  border-color: color-mix(in srgb, var(--muted) 35%, var(--line));
  background: color-mix(in srgb, var(--muted) 8%, #ffffff);
}

.task-audit {
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--surface-muted));
}

.task-audit {
  grid-row: 6;
}

.task-audit[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.task-audit > summary {
  min-height: 30px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.task-audit:not([open]) {
  align-self: start;
  min-height: 0;
}

.task-audit:not([open]) .audit-sections {
  display: none;
}

.audit-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  grid-template-areas:
    "status next"
    "warnings warnings"
    "reference navigation";
  align-content: start;
  gap: 6px 9px;
  min-height: 0;
  max-height: 34vh;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding: 7px 9px 9px;
}

.task-audit[open] .audit-sections {
  height: 100%;
  max-height: 100%;
}

.audit-section {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, #ffffff 74%, var(--surface-muted));
  padding: 6px 8px;
}

.audit-status {
  grid-area: status;
}

.audit-next {
  grid-area: next;
}

.audit-warnings {
  grid-area: warnings;
}

.audit-reference {
  grid-area: reference;
}

.audit-navigation {
  grid-area: navigation;
}

.audit-section h3 {
  margin: 0 0 4px;
  color: var(--brand-maroon-dark);
  font-size: 0.74rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.workflow-context,
.task-reference {
  display: grid;
  gap: 4px 8px;
  margin: 0 0 6px;
}

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

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

.task-reference div,
.workflow-context div {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
}

.task-reference dt,
.workflow-context dt {
  font-size: 0.64rem;
  white-space: nowrap;
}

.task-reference dd,
.workflow-context dd {
  overflow-wrap: anywhere;
  font-size: 0.76rem;
  line-height: 1.25;
}

.status-current {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.status-actions {
  gap: 5px;
}

.status-actions button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.72rem;
}

#nextTasksList {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

#nextTasksList li {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.25;
}

#currentTaskStatus {
  color: var(--text);
}

#currentTaskStatus[data-status="inProgress"] {
  color: #6d5200;
}

#currentTaskStatus[data-status="complete"] {
  color: var(--accent);
}

.status-save-message,
.navigation-reminder {
  margin: 5px 0 0;
  color: #8a4b00;
  font-size: 0.76rem;
  font-weight: 650;
}

.warning,
.placeholder-warning,
.edit-prompt-notice {
  border-left: 3px solid var(--brand-gold);
  border-radius: 6px;
  background: var(--warning-bg);
  padding: 6px 8px;
  color: var(--brand-maroon-dark);
  font-size: 0.78rem;
  line-height: 1.3;
  font-weight: 650;
}

.placeholder-warning,
.edit-prompt-notice {
  margin: 0 0 8px;
}

.verification-reminder {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
  font-weight: 650;
}

.sequence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: center;
}

#currentSequenceTask {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.task-link {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand-maroon);
  padding: 0;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
}

.audit-section .task-link {
  font-size: 0.76rem;
  line-height: 1.25;
}

.task-link:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.next-task-description {
  display: inline;
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 800;
  vertical-align: middle;
}

.status-inProgress {
  border-color: #d7a947;
  background: #fff5df;
  color: #6d5200;
}

.status-complete {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, #ffffff);
  color: var(--accent);
}

@media (max-width: 1080px) {
  body {
    height: auto;
    overflow: auto;
  }

  .app-shell {
    height: auto;
  }

  .app-header,
  .workspace-frame,
  .current-task-meta,
  .dynamic-inputs,
  #taskForm,
  .audit-sections {
    grid-template-columns: 1fr;
  }

  .navigation-zone,
  .workspace-zone {
    overflow: visible;
  }

  .workspace-zone {
    grid-template-rows: none;
  }

  .prompt-group {
    min-height: 520px;
  }
}
