.launcher {
  gap: 28px;
}

.launcher .template-market {
  display: none;
}

.launcher-promo {
  min-height: 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.launcher-copy h2 {
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

.launcher-copy p {
  font-size: 16px;
}

.workflow-card,
.feature-card,
.template-card,
.creation-market-card,
.recent-project-row,
.catalog-card,
.content-card,
.direction-card,
.admin-card,
.info-card,
.engineering-history-panel,
.engineering-table-block,
.image-history-card,
.project-library-layout,
.project-table-shell,
.planning-context-panel,
.catalog-workbench-panel,
.engineering-config-panel,
.engineering-preview-panel,
.image-config-panel,
.image-preview-panel,
.content-section-editor,
.catalog-subsection-editor,
.requirement-live-results,
.service-list-live-panel,
.package-selection-panel {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.workflow-card,
.feature-card,
.template-card {
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.workflow-card:hover,
.feature-card:hover,
.template-card:hover,
.catalog-card:hover,
.content-card:hover,
.direction-card:hover,
.admin-card:hover,
.image-history-card:hover {
  border-color: rgba(40, 87, 125, 0.22);
  box-shadow: var(--shadow-md);
}

.workflow-title {
  font-size: var(--font-size-section);
  font-weight: 700;
}

.workflow-desc {
  font-size: var(--font-size-body);
  font-weight: 600;
}

.workflow-detail,
.workflow-action,
.feature-card strong,
.feature-card em {
  font-size: var(--font-size-body);
}

.feature-tag,
.template-type-badge,
.template-card-copy em,
.template-card-tags i {
  font-size: var(--font-size-caption);
}

.market-head h3,
.recent-projects-head h3,
.project-library-head h2,
.image-studio-head h2,
.image-history-head h3,
.admin-page-head h2 {
  font-size: var(--font-size-section);
  font-weight: 700;
  line-height: 1.3;
}

.recent-projects-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recent-projects-head-actions .danger-outline {
  border: 1px solid rgba(167, 70, 70, 0.28);
  background: #fff;
  color: var(--danger);
}

.recent-projects-head-actions .danger-outline:hover {
  border-color: rgba(167, 70, 70, 0.46);
  background: var(--danger-soft);
}

.recent-projects-head-actions .danger-outline:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.metric {
  min-height: 118px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.metric strong {
  font-size: var(--font-size-page);
}

.admin-section-nav {
  gap: 6px;
}

.admin-section-nav button {
  min-height: 48px;
  font-size: var(--font-size-body);
}

.admin-section-nav button span,
.admin-section-nav button b {
  font-size: var(--font-size-caption);
}

.admin-card,
.user-create-card,
.ai-config-card,
.image-config-card {
  padding: 18px;
  border-radius: var(--radius);
}

.admin-stage-head {
  align-items: center;
}

.admin-create-toggle {
  flex: 0 0 auto;
  min-width: 132px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.admin-create-toggle:hover {
  filter: brightness(0.94);
}

.admin-create-toggle[aria-expanded="true"] {
  border-color: var(--line);
  background: #f3f5f6;
  color: var(--text);
  filter: none;
}

.admin-create-card {
  border-color: rgba(40, 87, 125, 0.2);
  background: #fbfdff;
  box-shadow: 0 8px 24px rgba(31, 57, 82, 0.07);
}

.admin-create-card:hover {
  border-color: rgba(40, 87, 125, 0.2);
  box-shadow: 0 8px 24px rgba(31, 57, 82, 0.07);
}

.admin-create-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.field label,
.field-full > label,
.image-field-head label,
.image-setting-block > strong,
.content-section-title > strong,
.catalog-form label {
  font-size: var(--font-size-body);
  font-weight: 600;
}

.form-grid {
  gap: 16px;
}

.upload-card,
.inline-upload-row,
.private-image-upload {
  min-height: 64px;
  border-radius: var(--radius);
}

.upload-card strong,
.inline-upload-row strong,
.private-image-upload strong {
  font-size: var(--font-size-body);
}

.upload-card span,
.inline-upload-row em,
.private-image-upload em {
  font-size: var(--font-size-caption);
}

.file-item,
.requirement-file-card,
.technical-basis-row,
.content-generation-active-item,
.catalog-subsection-row,
.subsection-item {
  border-radius: var(--radius);
}

.project-library-nav button,
.project-row-actions button,
.content-section-controls button,
.catalog-subsection-actions button,
.file-retry,
.file-remove {
  border-radius: var(--radius-control);
  font-size: 13px;
}

.project-table th {
  font-size: var(--font-size-caption);
  font-weight: 600;
}

.project-table td {
  font-size: 13px;
}

.project-library-nav button b,
.project-table td > strong + span {
  font-size: var(--font-size-caption);
}

.project-row-actions {
  flex-wrap: nowrap;
}

.project-row-actions button {
  min-width: max-content;
  min-height: 36px;
  padding-right: 10px;
  padding-left: 10px;
  white-space: nowrap;
}

.cover-preview em {
  font-size: var(--font-size-caption);
}

.cover-card-grid {
  grid-auto-columns: 174px;
  gap: 12px;
}

.cover-preview {
  position: relative;
  isolation: isolate;
  height: 248px;
  padding: 30px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #dfe7f0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.cover-preview > i,
.cover-preview > b,
.cover-preview-fields {
  position: relative;
  z-index: 1;
}

.cover-preview i {
  color: #111827;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.cover-preview b {
  margin-top: 44px;
  color: #050505;
  font-size: 21px;
  line-height: 1.2;
}

.cover-preview-fields {
  width: max-content;
  max-width: calc(100% - 8px);
  align-self: center;
  margin-top: auto;
  display: grid;
  gap: 3px;
  padding-bottom: 4px;
  text-align: left;
  overflow: hidden;
}

.cover-preview-fields em {
  color: #526174;
  font-size: 8px;
  font-style: normal;
  line-height: 1.3;
  white-space: nowrap;
}

.cover-default {
  border: 2px solid #1769d2;
}

.cover-wave {
  background:
    linear-gradient(160deg, transparent 0 76%, #eef7ff 76% 79%, transparent 79%),
    linear-gradient(164deg, transparent 0 81%, #a9d5ff 81% 85%, transparent 85%),
    linear-gradient(166deg, transparent 0 86%, #4e92e9 86% 90%, #d8edff 90% 93%, #1e6ac5 93% 100%),
    #fff;
}

.cover-city {
  background:
    linear-gradient(170deg, #294f92 0 7%, #6d97ce 7% 12%, transparent 12%),
    linear-gradient(0deg, #294f92 0 10%, #6f9acd 10% 15%, #e3eef9 15% 18%, transparent 18%),
    #fff;
}

.cover-city::after {
  position: absolute;
  right: -10px;
  bottom: 28px;
  left: -10px;
  z-index: 0;
  height: 24px;
  background: repeating-linear-gradient(90deg, rgba(72, 109, 158, 0.26) 0 7px, transparent 7px 12px);
  content: "";
  opacity: 0.55;
}

.cover-angle {
  background:
    linear-gradient(122deg, #2eafc6 0 13%, #173360 13% 14%, transparent 14%),
    linear-gradient(302deg, #173360 0 15%, #2eafc6 15% 17%, transparent 17%),
    #fff;
}

.cover-line {
  background:
    linear-gradient(180deg, #0874bd 0 6%, transparent 6% 88%, #d8ebf9 88% 94%, #0874bd 94% 100%),
    #fff;
}

.image-process,
.engineering-process {
  border-radius: var(--radius);
}

.image-process span,
.engineering-process span {
  font-size: 13px;
}

.image-config-panel,
.image-preview-panel {
  border-radius: var(--radius);
}

.image-option-card,
.image-ratio-card,
.image-style-toggle label {
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.image-option-card strong,
.image-ratio-card strong,
.image-style-toggle strong {
  font-size: var(--font-size-body);
}

.image-option-card span,
.image-ratio-card span,
.image-style-toggle span {
  font-size: var(--font-size-caption);
}

.content-card,
.content-section-editor {
  padding: 18px;
}

.content-section-title > input,
.content-section-editor textarea,
.catalog-subsection-row input {
  font-size: var(--font-size-body);
}

.content-section-title > small,
.content-section-meta,
.content-section-evidence,
.content-section-warnings {
  font-size: var(--font-size-caption);
}

.requirement-live-preview,
.requirement-live-preview p,
.requirement-live-preview li {
  font-size: var(--font-size-body);
  line-height: 1.7;
}

.requirement-live-preview h3 {
  font-size: var(--font-size-section);
}

.requirement-live-preview h4 {
  font-size: var(--font-size-group);
}

.requirement-analysis-progress {
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.requirement-analysis-progress > div strong {
  font-size: var(--font-size-body);
}

.requirement-analysis-progress > div span,
.requirement-analysis-progress > em {
  font-size: var(--font-size-caption);
}

.style-preview-dialog,
.docx-preview-dialog,
.custom-style-dialog,
.technical-basis-dialog,
.requirement-catalog-dialog,
.image-settings-dialog,
.private-image-dialog,
.project-preview-dialog,
.project-rename-dialog,
.template-detail-dialog {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(32, 36, 33, 0.2);
}

.style-preview-dialog header,
.docx-preview-dialog > header,
.custom-style-dialog header,
.technical-basis-dialog header,
.requirement-catalog-dialog header,
.image-settings-dialog header,
.private-image-dialog header {
  min-height: 64px;
}

.style-preview-dialog header strong,
.docx-preview-dialog > header strong,
.custom-style-dialog header strong,
.technical-basis-dialog header strong,
.requirement-catalog-dialog header strong,
.image-settings-dialog header strong,
.private-image-dialog header strong {
  font-size: var(--font-size-group);
}

.style-preview-dialog header span,
.docx-preview-dialog > header span,
.custom-style-dialog header span,
.technical-basis-dialog header span,
.requirement-catalog-dialog header span,
.image-settings-dialog header span,
.private-image-dialog header span,
.project-preview-dialog header span,
.project-rename-dialog header span,
.template-detail-dialog header span {
  font-size: var(--font-size-caption);
}

.flash {
  padding-right: 48px;
  border-radius: var(--radius);
  font-size: var(--font-size-body);
  box-shadow: var(--shadow-md);
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.flash.is-dragging {
  cursor: grabbing;
  box-shadow: 0 18px 42px rgba(32, 36, 33, 0.18);
  transition: none;
}

.flash.is-dismissing {
  pointer-events: none;
}

.flash-message {
  display: block;
  overflow-wrap: anywhere;
}

.flash .flash-close {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: currentColor;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.64;
  cursor: pointer;
}

.flash .flash-close:hover,
.flash .flash-close:focus-visible {
  background: rgba(32, 36, 33, 0.08);
  opacity: 1;
}

.login-panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.login-panel .brand-copy strong {
  font-size: var(--font-size-section);
}

.login-panel .brand-copy span,
.login-panel .tiny {
  font-size: var(--font-size-caption);
}

@media (max-width: 1420px) {
  .header-copy h1 {
    font-size: 22px;
  }

  .header-actions button {
    padding-right: 11px;
    padding-left: 11px;
    font-size: 13px;
  }

  .project-table {
    min-width: 790px;
  }

  .project-table th:nth-child(6),
  .project-table td:nth-child(6) {
    width: 190px;
  }

  .project-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(76px, 1fr));
    gap: 6px;
  }
}

@media (max-width: 900px) {
  body.document-studio-theme {
    font-size: var(--font-size-body);
  }

  body.document-studio-theme input,
  body.document-studio-theme select,
  body.document-studio-theme textarea {
    font-size: 16px;
  }

  .sidebar,
  .workspace-shell .sidebar {
    min-height: 64px;
    padding: 8px 10px;
  }

  .side-nav button,
  .workspace-shell .side-nav button {
    width: 56px;
    min-height: 48px;
    flex-basis: 56px;
    border-radius: var(--radius);
  }

  .side-nav button span {
    font-size: 12px;
  }

  .side-nav button em,
  .workspace-shell .side-nav button em {
    font-size: 12px;
  }

  .topbar {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .header-copy h1 {
    font-size: 22px;
  }

  .header-copy p {
    font-size: var(--font-size-caption);
  }

  .header-actions button {
    min-height: 40px;
    font-size: 13px;
  }

  .workspace-shell .step-strip {
    gap: 8px;
  }

  .workspace-shell .step-item {
    flex-basis: 172px;
    border-radius: var(--radius);
  }

  .workspace-shell .step-copy em {
    min-height: 34px;
  }

  .settings-stage {
    padding: 24px 20px 88px;
  }

  .settings-stage > .stage-head {
    margin: -24px -20px 0;
    padding: 23px 20px 19px;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .stage-head h2 {
    font-size: var(--font-size-section);
  }

  .admin-stage-head {
    align-items: stretch;
  }

  .admin-create-toggle {
    width: 100%;
  }

  .launcher-copy h2 {
    font-size: 26px;
  }

  .settings-sticky-actions,
  .info-fill-sticky-actions {
    min-height: 82px;
  }
}

@media (max-width: 560px) {
  .recent-projects-head-actions {
    width: 100%;
  }

  .recent-projects-head-actions button {
    flex: 1;
  }

  .admin-create-actions button {
    flex: 1 1 120px;
  }

  .header-actions button {
    flex-basis: calc(50% - 8px);
  }

  .workspace-shell .step-item {
    flex-basis: 156px;
  }

  .settings-stage {
    padding-right: 16px;
    padding-left: 16px;
  }

  .settings-stage > .stage-head {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

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