:root {
  --bg: #f4ede2;
  --bg-strong: #ead9c1;
  --surface: rgba(255, 251, 246, 0.94);
  --surface-strong: rgba(255, 246, 235, 0.98);
  --border: rgba(66, 49, 26, 0.14);
  --text: #1d1813;
  --muted: #6e6152;
  --accent: #b85b34;
  --accent-dark: #7e3418;
  --accent-soft: rgba(184, 91, 52, 0.12);
  --ok: #1f6a43;
  --ok-soft: rgba(31, 106, 67, 0.14);
  --warning: #8c5a14;
  --warning-soft: rgba(140, 90, 20, 0.14);
  --error: #932929;
  --error-soft: rgba(147, 41, 41, 0.14);
  --code: #102a35;
  --shadow: 0 24px 64px rgba(89, 58, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 91, 52, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(16, 42, 53, 0.16), transparent 32%),
    linear-gradient(180deg, #faf7f2 0%, var(--bg) 52%, #efe4d4 100%);
}

body.auth-locked {
  overflow: hidden;
}

.auth-overlay,
.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(29, 24, 19, 0.34);
  backdrop-filter: blur(10px);
}

.auth-card,
.settings-card {
  width: min(480px, 100%);
  padding: 20px 22px;
  border-radius: 32px;
  border: 1px solid rgba(66, 49, 26, 0.14);
  background: rgba(255, 251, 246, 0.98);
  box-shadow: var(--shadow);
}

.auth-title {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
}

.auth-copy {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.compact-auth-form {
  margin-bottom: 12px;
}

.auth-inline-links {
  margin: 2px 0 10px;
}

.recovery-panel {
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 247, 238, 0.82);
}

.compact-copy {
  margin: 0 0 8px;
}

.app-authbar {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 14px 12px 0;
}

.app-authbar-inner {
  width: min(1420px, calc(100% - 24px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 251, 246, 0.92);
  box-shadow: 0 18px 40px rgba(89, 58, 30, 0.1);
  backdrop-filter: blur(10px);
}

.app-authbar-copy {
  display: grid;
  gap: 2px;
}

.tool-launcher {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.launcher-shell {
  width: min(760px, 100%);
}

.launcher-heading {
  text-align: center;
  margin-bottom: 28px;
}

.launcher-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.launcher-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.launcher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 56px rgba(89, 58, 30, 0.16);
  border-color: rgba(184, 91, 52, 0.24);
}

.launcher-card strong {
  font-size: 1.05rem;
}

.launcher-card-active {
  background: linear-gradient(145deg, rgba(255, 247, 238, 0.98), rgba(255, 241, 226, 0.92));
}

.launcher-badge {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.launcher-badge-muted {
  background: rgba(66, 49, 26, 0.08);
  color: var(--muted);
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
}

code,
pre,
table,
.hero-card strong {
  font-family: "IBM Plex Mono", monospace;
}

.page-shell {
  width: min(1420px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.tool-backbar {
  margin-bottom: 16px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.small-eyebrow {
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

h2,
h3,
p {
  margin-top: 0;
}

.hero-copy,
.panel-heading p,
.progress-message,
.summary-line,
.timeline-item p,
.timeline-item small,
.status-text,
.hero-card p {
  color: var(--muted);
}

.hero-card,
.panel {
  backdrop-filter: blur(12px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-card-label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
}

.prefill-panel {
  min-height: 100%;
}

.app-stage {
  display: grid;
  gap: 20px;
}

.image-tool-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(0, 1.12fr);
  gap: 20px;
  align-items: start;
}

.voice-tool-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(0, 1.12fr);
  gap: 20px;
  align-items: start;
}

.image-form-stack {
  display: grid;
  gap: 14px;
}

.image-info-card {
  min-height: 100%;
}

.voice-info-card {
  min-height: 100%;
}

.image-quality-card {
  display: grid;
  gap: 14px;
}

.quality-toggle {
  display: grid;
  gap: 10px;
}

.quality-toggle-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.quality-toggle-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.quality-toggle-option span {
  display: block;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(66, 49, 26, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.quality-toggle-option input:checked + span {
  border-color: rgba(184, 91, 52, 0.42);
  background: linear-gradient(145deg, rgba(255, 247, 238, 0.98), rgba(255, 241, 226, 0.92));
  box-shadow: 0 18px 28px rgba(184, 91, 52, 0.12);
}

.quality-toggle-option:hover span {
  transform: translateY(-1px);
}

.image-metadata-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.image-metadata-grid strong {
  font-size: 0.92rem;
}

.voice-service-facts {
  display: grid;
  gap: 10px;
}

.voice-service-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(66, 49, 26, 0.08);
}

.voice-service-facts span,
.voice-metadata-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.voice-service-facts strong,
.voice-metadata-grid strong {
  font-size: 0.92rem;
}

.voice-form-stack {
  display: grid;
  gap: 14px;
}

.voice-source-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(66, 49, 26, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.voice-source-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.voice-mic-button {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(66, 49, 26, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-dark);
  box-shadow: 0 12px 24px rgba(89, 58, 30, 0.12);
}

.voice-mic-button:hover {
  transform: translateY(-1px);
}

.voice-mic-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.voice-mic-button.is-recording {
  background: linear-gradient(135deg, #b93c30, #db5a43);
  color: #fff8f3;
  box-shadow: 0 16px 28px rgba(147, 41, 41, 0.24);
}

.voice-result-panel textarea[readonly] {
  min-height: 360px;
  background: rgba(255, 255, 255, 0.92);
}

.voice-metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.voice-metadata-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.9);
  border: 1px solid rgba(66, 49, 26, 0.08);
}

.image-result-panel {
  min-height: 100%;
}

.image-preview-shell {
  min-height: 520px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px solid rgba(66, 49, 26, 0.1);
  background:
    radial-gradient(circle at top left, rgba(184, 91, 52, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(255, 249, 242, 0.98), rgba(250, 240, 227, 0.94));
  overflow: hidden;
}

.image-preview-empty {
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.image-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.image-metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.image-metadata-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.9);
  border: 1px solid rgba(66, 49, 26, 0.08);
}

.image-download-link {
  margin-top: 14px;
  width: fit-content;
}

.image-progress-shell {
  margin-top: 14px;
}

.image-progress-track {
  margin: 0 0 10px;
  height: 14px;
}

.image-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
}

.image-advanced-panel {
  padding: 14px 16px;
}

.image-advanced-body {
  display: grid;
  gap: 14px;
}

.intake-stack,
.run-top-grid,
.run-bottom-grid {
  display: grid;
  gap: 16px;
}

.run-top-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  align-items: start;
}

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

.prefill-row,
.inline-actions,
.spotlight-actions,
.progress-meta,
.progress-heading,
.timeline-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.prefill-stack {
  align-items: end;
}

.progress-heading,
.timeline-top {
  justify-content: space-between;
}

.grow-field {
  flex: 1 1 auto;
}

.load-button {
  min-width: 148px;
}

.prefill-actions {
  display: flex;
  gap: 12px;
}

.prefill-progress {
  position: relative;
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(16, 42, 53, 0.08);
}

.prefill-progress-bar {
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(16, 42, 53, 0.08), rgba(184, 91, 52, 0.88), rgba(16, 42, 53, 0.08));
  animation: prefillProgressDrift 1.2s ease-in-out infinite;
}

@keyframes prefillProgressDrift {
  0% {
    transform: translateX(-115%);
  }
  100% {
    transform: translateX(265%);
  }
}

.composer-panel {
  background: linear-gradient(145deg, rgba(255, 247, 238, 0.98), rgba(255, 241, 226, 0.92));
}

.compact-heading {
  margin-bottom: 12px;
}

.panel-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.panel-heading-stack {
  align-items: start;
}

.field-grid,
.settings-stack,
.support-grid {
  display: grid;
  gap: 14px;
}

.settings-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

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

.field-span-2 {
  grid-column: span 2;
}

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

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-grid {
  max-width: 420px;
}

.compact-grid-wide {
  max-width: none;
}

.compact-triple {
  align-items: end;
}

.delivery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.delivery-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(66, 49, 26, 0.05);
  border: 1px solid rgba(66, 49, 26, 0.08);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.delivery-tab-active {
  background: linear-gradient(180deg, rgba(255, 247, 238, 0.98), rgba(255, 241, 226, 0.92));
  border-color: rgba(184, 91, 52, 0.28);
  box-shadow: 0 10px 20px rgba(184, 91, 52, 0.08);
}

.delivery-tab-coming-soon {
  background: rgba(66, 49, 26, 0.04);
}

.title-row-actions {
  justify-content: flex-start;
}

.topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.topic-field,
.topic-side-fields {
  min-height: 100%;
}

.topic-field textarea {
  height: 100%;
  min-height: 250px;
}

.topic-side-fields {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, auto));
  gap: 14px;
  align-content: stretch;
}

.title-suggestions-block {
  display: grid;
  gap: 10px;
}

.title-suggestions-button {
  justify-self: start;
}

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

.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.inline-checkbox-card {
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(66, 49, 26, 0.12);
  background: rgba(255, 255, 255, 0.82);
  margin-top: 0;
}

.inline-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

label span,
summary span {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-dark);
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(66, 49, 26, 0.16);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  border-radius: 16px;
  padding: 11px 13px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

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

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(184, 91, 52, 0.52);
  background: #fffdfa;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(184, 91, 52, 0.08);
}

.primary-button,
.secondary-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: default;
  opacity: 0.7;
  transform: none;
}

.primary-button {
  color: #fff8f3;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 18px 32px rgba(184, 91, 52, 0.22);
}

.secondary-button {
  color: var(--text);
  background: var(--bg-strong);
}

.spotlight-actions-sticky {
  position: sticky;
  right: 0;
  bottom: 20px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-bottom: 4px;
  z-index: 20;
}

.spotlight-actions-sticky .primary-button {
  box-shadow: 0 22px 40px rgba(184, 91, 52, 0.26);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.loading {
  background: rgba(16, 42, 53, 0.1);
  color: var(--code);
}

.status-pill.success {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-pill.warning,
.status-text.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill.error,
.status-text.error {
  background: var(--error-soft);
  color: var(--error);
}

.muted-pill {
  background: rgba(66, 49, 26, 0.08);
  color: var(--muted);
}

.status-text {
  font-size: 0.92rem;
  font-weight: 700;
}

.title-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.title-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(184, 91, 52, 0.14);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.title-card input {
  display: none;
}

.title-card.selected,
.title-card:hover {
  border-color: rgba(184, 91, 52, 0.46);
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(184, 91, 52, 0.1);
}

.title-card-copy {
  font-weight: 700;
  line-height: 1.5;
}

.title-card small {
  color: var(--accent-dark);
  font-weight: 800;
}

.details-panel summary,
.technical-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  cursor: pointer;
}

.details-panel summary::-webkit-details-marker,
.technical-panel summary::-webkit-details-marker {
  display: none;
}

.details-body {
  margin-top: 18px;
}

.settings-group {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(66, 49, 26, 0.08);
}

.settings-group + .settings-group {
  padding-top: 18px;
  border-top: 1px solid rgba(66, 49, 26, 0.08);
}

.run-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-panel-compact {
  align-self: start;
}

.progress-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: rgba(66, 49, 26, 0.08);
  overflow: hidden;
  margin: 16px 0 18px;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d1865b 0%, #b85b34 40%, #7e3418 100%);
  box-shadow: 0 0 26px rgba(184, 91, 52, 0.28);
  transition: width 0.35s ease;
}

.progress-meta {
  font-size: 0.95rem;
}

.progress-meta strong {
  font-size: 1.2rem;
}

.activity-log {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 520px;
  overflow: auto;
}

.activity-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(66, 49, 26, 0.06);
  border: 1px solid rgba(66, 49, 26, 0.08);
  font-size: 0.94rem;
}

.activity-item.success {
  background: var(--ok-soft);
  color: var(--ok);
}

.activity-item.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.activity-item.error {
  background: var(--error-soft);
  color: var(--error);
}

.live-article-panel {
  min-height: 0;
}

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

.image-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(66, 49, 26, 0.08);
}

.image-card-empty {
  grid-column: 1 / -1;
  background: rgba(66, 49, 26, 0.05);
  color: var(--muted);
}

.image-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.image-card-top span,
.image-card-purpose,
.image-meta-list dt,
.image-card-details summary {
  color: var(--muted);
}

.image-meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.image-meta-list div {
  display: grid;
  gap: 4px;
}

.image-meta-list dt {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.image-meta-list dd {
  margin: 0;
  line-height: 1.5;
}

.image-card-details summary {
  cursor: pointer;
  font-weight: 700;
}

.image-prompt-block {
  margin: 10px 0 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(16, 42, 53, 0.92);
  color: #eef5f7;
  overflow: auto;
  font-size: 0.8rem;
}

.markdown-render {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 247, 242, 0.96));
  border: 1px solid rgba(66, 49, 26, 0.08);
  padding: 28px;
  min-height: 520px;
  line-height: 1.78;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.markdown-render.flash-update {
  animation: articleFlash 0.45s ease;
}

@keyframes articleFlash {
  from {
    box-shadow: 0 0 0 4px rgba(184, 91, 52, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }
  to {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }
}

.markdown-render h1,
.markdown-render h2,
.markdown-render h3 {
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 1.35em 0 0.6em;
}

.markdown-render h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.markdown-render h2 {
  font-size: 1.55rem;
}

.markdown-render h3 {
  font-size: 1.18rem;
}

.markdown-render p,
.markdown-render ul,
.markdown-render ol,
.markdown-render blockquote,
.markdown-render pre {
  margin: 0 0 1.05em;
}

.markdown-render ul,
.markdown-render ol {
  padding-left: 1.4em;
}

.markdown-render blockquote {
  border-left: 4px solid rgba(184, 91, 52, 0.32);
  padding-left: 16px;
  color: var(--muted);
}

.markdown-render code {
  background: rgba(16, 42, 53, 0.08);
  border-radius: 8px;
  padding: 2px 6px;
}

.markdown-render pre {
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(16, 42, 53, 0.92);
  color: #eef5f7;
}

.article-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px dashed rgba(184, 91, 52, 0.38);
  background: linear-gradient(135deg, rgba(184, 91, 52, 0.1), rgba(255, 247, 239, 0.92));
  color: var(--accent-dark);
}

.article-image-placeholder strong {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
}

.article-image-placeholder span {
  font-weight: 700;
}

.markdown-render a {
  color: var(--accent-dark);
}

.empty-article {
  color: var(--muted);
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stats-panel-wide,
.technical-panel-wide {
  grid-column: 1 / -1;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(66, 49, 26, 0.06);
  border: 1px solid rgba(66, 49, 26, 0.08);
}

.stat-card span {
  font-size: 0.82rem;
  color: var(--muted);
}

.stat-card strong {
  font-size: 1.1rem;
}

.table-block + .table-block {
  margin-top: 18px;
}

.table-block table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  table-layout: fixed;
}

.table-block th,
.table-block td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(66, 49, 26, 0.08);
  text-align: left;
  vertical-align: top;
}

.timeline {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(66, 49, 26, 0.08);
  background: rgba(66, 49, 26, 0.05);
}

.timeline-warning {
  background: var(--warning-soft);
}

.timeline-error,
.timeline-blocker {
  background: var(--error-soft);
}

.summary-line {
  font-size: 0.92rem;
}

.code-block {
  margin: 0;
  min-height: 220px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(16, 42, 53, 0.94);
  color: #eef5f7;
  padding: 18px;
  font-size: 0.82rem;
}

body.run-mode .hero {
  display: none;
}

.preview-block {
  max-height: 360px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .launcher-grid,
  .hero,
  .run-top-grid,
  .run-bottom-grid,
  .image-tool-grid,
  .voice-tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .tool-launcher {
    padding: 16px;
  }

  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 20px;
  }

  .prefill-row,
  .prefill-actions,
  .inline-actions,
  .run-topbar,
  .progress-heading,
  .progress-meta,
  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-form-grid,
  .topic-layout,
  .support-grid,
  .two-up,
  .three-up,
  .launcher-grid,
  .title-options,
  .stats-cards,
  .image-plan-grid,
  .image-metadata-grid,
  .voice-metadata-grid,
  .settings-stack,
  .run-top-grid,
  .run-bottom-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .hero-card,
  .panel {
    padding: 16px;
    border-radius: 24px;
  }

  .markdown-render {
    padding: 20px;
  }
}
