:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --text: #17212b;
  --hint: #5f6b76;
  --border: #dce2e7;
  --primary: #0f766e;
  --primary-text: #ffffff;
  --info: #2563eb;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b42318;
  --selected: #eaf6f4;
  --disabled: #eef1f3;
  --secondary-bg: #eef1f3;
  --section-bg: #ffffff;
  --separator: #dce2e7;
  --destructive: #b42318;
  --header: #ffffff;
  --accent-text: #0f766e;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: var(--bg);
  font: 400 16px/24px "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 48px;
  height: calc(48px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header h1 {
  min-width: 0;
  flex: 1;
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}

.header .back {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--primary);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.workspace-bar {
  height: 36px;
  min-width: 0;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hint);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 16px;
}

.workspace-bar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  width: 100%;
  max-width: 960px;
  flex: 1;
  margin: 0 auto;
  padding: 20px 16px 112px;
  animation: fade-in 160ms ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.app-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  min-height: 64px;
  padding: 4px 4px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.connection-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.connection-row {
  min-height: 92px;
  padding: 16px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.connection-row:last-child {
  border-bottom: 0;
}

.connection-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hint);
}

.connection-row.connected .connection-mark {
  background: var(--success);
}

.connection-row.needs_attention .connection-mark {
  background: var(--warning);
}

.connection-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.connection-body span,
.connection-body small {
  overflow: hidden;
  color: var(--hint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-body small {
  font-size: 12px;
  line-height: 16px;
}

.connection-actions {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.connection-actions .text-action {
  min-height: 32px;
  padding: 4px 0;
}

@media (max-width: 520px) {
  .connection-row {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .connection-actions {
    grid-column: 2;
    justify-items: start;
  }
}

.nav-item {
  min-width: 0;
  min-height: 56px;
  padding: 5px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 6px;
  color: var(--hint);
  background: transparent;
  font-size: 11px;
  line-height: 16px;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--disabled);
}

.nav-item.active {
  color: var(--primary);
  background: var(--selected);
}

.nav-symbol {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  font-size: 22px;
  line-height: 24px;
  font-weight: 500;
}

.next-action {
  padding: 24px;
  margin-bottom: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
}

.eyebrow,
.meta {
  color: var(--hint);
  font-size: 12px;
  line-height: 16px;
}

.next-action h2,
.form-intro h2,
.assist-intro h2,
.screen-state h2,
.empty-state h2,
.error-state h2 {
  margin: 6px 0 8px;
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
}

.next-action p,
.form-intro p,
.assist-intro p,
.section-copy,
.screen-state p,
.empty-state p,
.error-state p,
.info-state p {
  margin: 0 0 20px;
  color: var(--hint);
}

.primary-action,
.secondary-action,
.text-action,
.icon-action,
.cta,
.cc-btn {
  min-height: 44px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.primary-action,
.cta {
  padding: 12px 16px;
  border: 1px solid var(--primary);
  color: var(--primary-text);
  background: var(--primary);
}

.primary-action:hover,
.cta:hover {
  background: #0b625c;
}

.primary-action:disabled,
.cta:disabled,
.secondary-action:disabled,
.cc-btn:disabled {
  color: #7b858e;
  background: var(--disabled);
  border-color: var(--border);
  cursor: not-allowed;
}

.secondary-action,
.cc-btn,
.cta.secondary {
  padding: 11px 15px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.secondary-action:hover,
.cc-btn:hover,
.cta.secondary:hover {
  background: var(--disabled);
}

.text-action {
  min-height: 44px;
  padding: 10px 4px;
  border: 0;
  color: var(--primary);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.icon-action {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 24px;
}

.full-width,
.cta {
  width: 100%;
  margin-bottom: 12px;
}

.cta.danger,
.secondary-action.danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.compact-section {
  margin: 0 0 28px;
}

.section-heading {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.section-heading h2,
.section-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  text-transform: none;
}

.section-heading span {
  color: var(--hint);
  font-size: 12px;
}

.work-list,
.material-list,
.more-list,
.facts-list,
.group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.work-row,
.more-list button,
.row {
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.work-row:last-child,
.more-list button:last-child,
.row:last-child {
  border-bottom: 0;
}

.work-row:hover,
.more-list button:hover,
.row:hover {
  background: var(--selected);
}

.work-row > span:first-child,
.more-list button > span:first-child,
.row .body {
  min-width: 0;
  flex: 1;
}

.work-row strong,
.more-list strong,
.row .title {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.work-row small,
.more-list small,
.row .sub {
  display: block;
  margin-top: 3px;
  color: var(--hint);
  font-size: 12px;
  line-height: 16px;
}

.empty-copy {
  margin: 12px 0 0;
  color: var(--hint);
  font-size: 14px;
}

.create-commands {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-row {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.filter-row button {
  min-height: 44px;
  padding: 9px 12px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--hint);
  background: var(--surface);
}

.field-error {
  min-height: 18px;
  margin-top: 4px;
  color: var(--destructive);
  font-size: 12px;
  line-height: 18px;
}

[aria-invalid="true"] {
  border-color: var(--destructive) !important;
}

.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: grid;
  gap: 14px;
}

.onboarding-step h3,
.confirmed-facts h3 {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}

.facts-section.hidden {
  display: none;
}

.source-actions,
.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 16px;
  display: grid;
  place-items: center;
  background: rgba(20, 24, 28, .58);
}

.dialog-card {
  width: min(100%, 520px);
  max-height: min(720px, calc(100dvh - 32px));
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.dialog-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 24px;
}

.assist-group {
  border-bottom: 1px solid var(--border);
}

.assist-group summary {
  min-height: 48px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}

.assist-basis {
  margin: 8px 0 0;
  color: var(--hint);
  font-size: 13px;
  line-height: 19px;
}

.confirmed-facts,
.channel-results {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--success);
  background: var(--surface-alt);
}

.confirmed-facts ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.channel-results span {
  display: block;
  margin-top: 4px;
  color: var(--hint);
  font-size: 13px;
}

.fact-sources {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.filter-row button.active {
  color: var(--primary);
  background: var(--selected);
  border-color: var(--primary);
}

.material-row {
  min-height: 130px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.material-row:last-child {
  border-bottom: 0;
}

.material-thumb {
  width: 80px;
  height: 106px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: var(--hint);
  background: var(--disabled);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.material-thumb.missing span {
  font-size: 26px;
}

.material-body {
  min-width: 0;
  flex: 1;
}

.material-title {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 22px;
  font-weight: 650;
}

.material-meta {
  margin-top: 4px;
  color: var(--hint);
  font-size: 12px;
  line-height: 16px;
}

.editor-form,
.facts-section,
.review-summary {
  width: 100%;
  max-width: 680px;
}

.form-intro,
.assist-intro {
  margin-bottom: 24px;
}

.field {
  margin-bottom: 16px;
}

.field label,
label {
  display: block;
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.field label span {
  color: var(--hint);
  font-size: 12px;
  font-weight: 400;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input:not([type]),
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font-size: 15px;
  line-height: 22px;
}

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

input::placeholder,
textarea::placeholder {
  color: #7b858e;
}

.form-grid,
.truth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.form-status {
  min-height: 24px;
  margin-top: 8px;
  color: var(--hint);
  font-size: 14px;
}

.facts-section {
  margin-top: 40px;
}

.fact-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.fact-row {
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--warning);
}

.fact-row:last-child {
  border-bottom: 0;
}

.fact-row.confirmed {
  border-left-color: var(--success);
}

.fact-row.conflict,
.fact-row.stale {
  border-left-color: var(--danger);
}

.fact-row strong,
.fact-row small {
  display: block;
  margin-top: 6px;
}

.fact-row small {
  color: var(--hint);
  font-size: 12px;
}

.status-label,
.badge {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--hint);
  background: var(--disabled);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-transform: none;
}

.badge.approved,
.badge.published,
.badge.confirmed,
.cc-btn.ok {
  color: var(--success);
  background: #ecfdf3;
}

.badge.failed,
.cc-btn.danger {
  color: var(--danger);
  background: #fef3f2;
}

.badge.queued,
.badge.publishing,
.badge.processing,
.badge.uploading,
.badge.trimming,
.cc-btn.warn {
  color: var(--warning);
  background: #fffaeb;
}

.wizard-head {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wizard-head span {
  color: var(--hint);
  font-size: 12px;
}

.wizard-head strong {
  font-size: 18px;
  line-height: 26px;
}

.choice-group {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
}

.radio-row {
  min-height: 64px;
  margin: 0;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: var(--surface);
  cursor: pointer;
}

.radio-row:first-of-type {
  border-radius: 8px 8px 0 0;
}

.radio-row:last-of-type {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
}

.radio-row:has(input:checked) {
  background: var(--selected);
  border-color: var(--primary);
}

.radio-row input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.radio-row strong,
.radio-row small {
  display: block;
}

.radio-row small {
  margin-top: 3px;
  color: var(--hint);
  font-weight: 400;
}

.wizard-actions {
  position: sticky;
  bottom: calc(64px + env(safe-area-inset-bottom));
  z-index: 15;
  margin: 24px -16px 0;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 8px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.full-cycle-link {
  margin-top: 12px;
  margin-bottom: 4px;
}

.workflow-details {
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.workflow-details summary {
  min-height: 44px;
  padding: 12px 0;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.assist-list {
  display: grid;
  gap: 12px;
}

.assist-row {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.assist-source span,
.assist-proposal span,
.truth-grid span {
  color: var(--hint);
  font-size: 12px;
  line-height: 16px;
}

.assist-source p {
  margin: 4px 0 14px;
}

.assist-proposal textarea {
  margin-top: 6px;
}

.assist-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.assist-actions button {
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
}

.assist-actions button.selected {
  color: var(--primary);
  background: var(--selected);
  border-color: var(--primary);
}

.truth-grid {
  margin-bottom: 20px;
}

.truth-grid > div {
  min-height: 72px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.truth-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.provider-note,
.info-state,
.error-inline,
.error-state {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--info);
  border-radius: 8px;
  background: var(--surface);
}

.provider-note.warn,
.error-inline,
.error-state {
  border-left-color: var(--warning);
}

.provider-note.ok {
  border-left-color: var(--success);
}

.info-state strong,
.info-state span,
.error-inline strong,
.error-inline span,
.error-inline small {
  display: block;
}

.info-state span,
.error-inline span {
  margin-top: 4px;
}

.info-state p,
.error-inline small {
  margin: 6px 0 0;
  color: var(--hint);
}

.publish-contract {
  margin: 0 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.publish-contract div {
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.publish-contract div:last-child {
  border-bottom: 0;
}

.publish-contract dt {
  color: var(--hint);
}

.publish-contract dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.screen-state,
.empty-state,
.empty {
  max-width: 560px;
  padding: 40px 0;
  text-align: left;
}

.status-summary {
  min-height: 44px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.skeleton-line {
  width: 100%;
  height: 14px;
  margin-bottom: 10px;
  background: var(--disabled);
  border-radius: 4px;
}

.skeleton-line.short {
  width: 62%;
}

.card,
.section {
  margin-bottom: 16px;
}

.card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
}

.dialog-sheet {
  position: fixed !important;
  right: 12px !important;
  bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  left: 12px !important;
  z-index: 90 !important;
  max-height: min(72vh, 560px);
  overflow: auto;
  box-shadow: 0 16px 40px rgba(23, 33, 43, 0.18) !important;
}

.card .title,
.card .headline {
  margin: 6px 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 26px;
  font-weight: 650;
}

.card .text {
  color: var(--text);
  white-space: pre-wrap;
}

.card .sub,
.hint {
  color: var(--hint);
}

.preview-media {
  width: 100%;
  max-height: 540px;
  display: block;
  object-fit: contain;
  background: #000;
  border-radius: 6px;
}

.row .icon {
  width: 32px;
  min-width: 32px;
  color: var(--primary);
  text-align: center;
}

.chev {
  color: var(--hint);
}

.tiles,
.cc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tile {
  min-height: 88px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tile .emoji {
  display: none;
}

.play-btn {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--primary);
  background: var(--surface);
}

.brand-picker {
  display: grid;
  gap: 6px;
  color: var(--hint);
  font-size: 12px;
}

.brand-select {
  width: 100%;
  max-width: 320px;
}

.loading {
  padding: 30px 0;
  color: var(--hint);
}

.loading .spin {
  display: inline-block;
}

.progress {
  height: 6px;
  overflow: hidden;
  background: var(--disabled);
  border-radius: 3px;
}

.progress > div {
  height: 100%;
  background: var(--primary);
}

.dept-flow,
.path-steps,
.cc-hero,
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.dept-flow,
.path-steps {
  padding: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.dept-step,
.path-steps span {
  min-height: 36px;
  padding: 7px 9px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--hint);
  background: var(--surface);
}

.dept-step.active,
.path-steps span.active,
.cc-btn.priority {
  color: var(--primary);
  background: var(--selected);
  border-color: var(--primary);
  box-shadow: none;
  animation: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 560px) {
  .form-grid,
  .truth-grid {
    grid-template-columns: 1fr 1fr;
  }

  .material-thumb {
    width: 96px;
    height: 128px;
  }

  .filter-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  #app {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: 52px 36px minmax(0, 1fr);
    padding-bottom: 0;
  }

  .header {
    grid-column: 2;
    grid-row: 1;
    padding: 8px 24px;
  }

  .workspace-bar {
    grid-column: 2;
    grid-row: 2;
    padding: 6px 24px;
  }

  .content {
    grid-column: 2;
    grid-row: 3;
    padding: 24px 24px 64px;
  }

  .app-nav {
    position: sticky;
    top: 0;
    grid-column: 1;
    grid-row: 1 / -1;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 12px 8px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 0;
    border-right: 1px solid var(--border);
  }

  .nav-item {
    width: 56px;
    min-height: 56px;
  }

  .nav-item > span:last-child {
    font-size: 9px;
  }

  .wizard-actions {
    bottom: 0;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .assist-row {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 16px;
  }

  .assist-actions {
    grid-column: 2;
  }
}

@media (min-width: 1200px) {
  #app {
    grid-template-columns: 208px minmax(0, 1fr);
  }

  .app-nav {
    padding: 20px 12px;
  }

  .nav-item {
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
  }

  .nav-item > span:last-child {
    font-size: 14px;
  }

  .header,
  .workspace-bar {
    padding-right: 32px;
    padding-left: 32px;
  }

  .content {
    padding: 32px 32px 80px;
  }
}

@media (min-width: 1440px) {
  #app {
    grid-template-columns: 224px minmax(0, 1fr);
  }
}

@media (max-width: 380px) {
  .content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .next-action {
    padding: 18px;
  }

  .nav-item {
    font-size: 10px;
  }

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

  .wizard-actions {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .publish-contract div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-height: 560px), (pointer: coarse) and (max-width: 767px) {
  .content:has(input:focus) .wizard-actions,
  .content:has(textarea:focus) .wizard-actions,
  .content:has(select:focus) .wizard-actions {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
