:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f1f5f9;
  --accent: #0f766e;
  --accent-strong: #0f4f66;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --accent-ring: rgba(14, 165, 233, 0.18);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-accent: 0 14px 30px rgba(14, 165, 233, 0.18);
  --mx-navy: #0b1220;
  --mx-blue: #2563eb;
  --mx-cyan: #06b6d4;
  --mx-teal: #0f766e;
  --mx-lime: #84cc16;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: "Geist", "Noto Sans SC", sans-serif;
}

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

.app-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: relative;
  width: 480px;
  min-width: 400px;
  max-width: 600px;
  height: 100vh;
  resize: horizontal;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 0 24px 32px;
}

.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  transition: background 0.25s ease;
}

.sidebar-resize-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 2px;
  height: 54px;
  border-radius: 999px;
  background: transparent;
  transform: translateY(-50%);
  transition: background 0.25s ease;
}

.sidebar:hover .sidebar-resize-handle::after,
.sidebar-resize-handle:hover::after,
.is-resizing-sidebar .sidebar-resize-handle::after {
  background: rgba(14, 165, 233, 0.42);
}

.is-resizing-sidebar {
  cursor: ew-resize;
  user-select: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfeff, #ffffff);
  border: 1px solid #bae6fd;
  box-shadow: var(--shadow-sm);
}

.brand-mark img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

.brand-bar h1 {
  margin: 4px 0 0;
  font-size: 1.24rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.32);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.status-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.status-card strong {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #111827;
  max-height: 4.2em;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.status-card[data-kind="warn"] .status-dot {
  background: #64748b;
  box-shadow: 0 0 0 6px rgba(100, 116, 139, 0.14);
}

.status-card[data-kind="warn"] strong {
  color: #334155;
}

.status-card[data-kind="error"] .status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12);
}

.status-card[data-kind="error"] strong {
  color: #dc2626;
}

.wizard {
  position: relative;
}

.wizard-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  padding-bottom: 18px;
}

.wizard-step:last-child {
  padding-bottom: 0;
}

.step-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.step-rail::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: -18px;
  left: 50%;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.wizard-step:last-child .step-rail::after {
  display: none;
}

.step-badge {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.86rem;
  font-weight: 800;
  transition: all 0.25s ease;
}

.wizard-step.is-active .step-badge {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.34);
}

.step-body {
  min-width: 0;
}

.step-body h2 {
  margin: 3px 0 4px;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.step-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.step-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.select-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
  padding-right: 8px;
}

.select-card {
  position: relative;
  min-height: 64px;
  padding: 10px 30px 10px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.select-card:hover {
  transform: translateY(-1px);
  border-color: #38bdf8;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.select-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.select-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.select-card strong {
  display: block;
  padding-right: 24px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.select-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

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

.form-grid-2 {
  grid-template-columns: minmax(118px, 0.78fr) minmax(0, 1.22fr);
  align-items: end;
}

.compact-product-row {
  margin-bottom: 16px;
}

.compact-product-row .field {
  margin-bottom: 0;
}

.wizard-step[data-step="3"] .step-body {
  display: grid;
  gap: 16px;
}

.wizard-step[data-step="3"] .field {
  margin-bottom: 0;
}

.wizard-step[data-step="3"] .form-grid {
  gap: 16px;
}

label {
  color: #374151;
  font-size: 0.84rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: all 0.25s ease;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.input-with-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  transition: all 0.25s ease;
}

.input-with-select:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.input-with-select input,
.input-with-select select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.input-with-select select {
  cursor: pointer;
  appearance: none;
  border-left: 1px solid var(--line);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1.5l6 6 6-6' stroke='%236B7280' stroke-width='1.7' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/14px 9px no-repeat;
}

.product-picker {
  color: transparent;
  font-size: 0;
}

.product-picker option,
.product-picker optgroup {
  color: var(--ink);
  font-size: 0.92rem;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 9px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

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

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.28);
}

.btn-secondary {
  width: 100%;
  background: #fff;
  border-color: #38bdf8;
  color: var(--accent-strong);
}

.btn-secondary:hover {
  background: #ecfeff;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: #374151;
}

.btn-ghost:hover {
  border-color: #38bdf8;
  color: var(--accent-strong);
  background: #ecfeff;
}

.product-rows {
  display: grid;
  gap: 16px;
  margin: 14px 0;
}

.product-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.product-card-title {
  min-width: 0;
  padding-top: 2px;
}

.product-card-title span {
  display: block;
  max-width: 100%;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-remove {
  margin-left: auto;
  justify-self: end;
  flex-shrink: 0;
  min-height: 30px;
  padding: 5px 10px;
  border-color: transparent;
  color: var(--muted-2);
  background: transparent;
}

.product-card-remove:hover {
  color: #dc2626;
  background: #fef2f2;
}

.product-card-grid {
  display: grid;
  grid-template-columns: minmax(118px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
}

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

.canvas {
  position: relative;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at 16px 16px, #e5e7eb 1px, transparent 1px) 0 0/22px 22px,
    #f9fafb;
}

.canvas-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.canvas-topbar h2 {
  margin: 5px 0 0;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.tabs {
  display: inline-flex;
  gap: 24px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  min-height: 38px;
  padding: 0 0 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.tab.active {
  color: var(--ink);
}

.tab.active::after {
  transform: scaleX(1);
}

.output-stage {
  height: calc(100vh - 112px);
  min-height: 0;
}

.tab-content {
  height: 100%;
}

.tab-content[hidden] {
  display: none;
}

.editor-card,
.article-card {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.prompt-editor {
  border-color: #bae6fd;
  border-left: 4px solid var(--accent);
  background: #f8fafc;
  color: #374151;
}

.editor-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #bae6fd;
  background: linear-gradient(180deg, #ecfeff, #ffffff);
  color: #374151;
  font-family: "Geist Mono", monospace;
  font-size: 0.86rem;
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #bae6fd;
}

.window-dots span:nth-child(1) {
  background: #fb7185;
}

.window-dots span:nth-child(2) {
  background: #38bdf8;
}

.window-dots span:nth-child(3) {
  background: #34d399;
}

.icon-button {
  min-height: 30px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  padding: 5px 12px;
  font-family: "Geist", "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
}

#promptOutput {
  width: 100%;
  height: calc(100% - 52px);
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 22px;
  resize: none;
  background: #f9fafb;
  color: #374151;
  box-shadow: none;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.75;
}

#promptOutput::placeholder {
  color: #9ca3af;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.article-toolbar h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.language-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
}

.language-tab {
  min-height: 30px;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.language-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.22);
}

.translation-state {
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.tdk-style-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 5px 4px 12px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--accent-strong);
}

.tdk-style-control span {
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 800;
}

.tdk-style-dropdown {
  min-width: 168px;
}

#articleOutput {
  min-height: 130px;
  max-height: 190px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  resize: vertical;
  padding: 18px 24px;
  box-shadow: none;
  background: #fcfcfd;
  font-family: "Geist Mono", Consolas, monospace;
  font-size: 0.85rem;
}

.tdk-card {
  margin: 16px 24px 0;
  padding: 16px;
  border: 1px solid #bae6fd;
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  background: linear-gradient(180deg, #ecfeff, #ffffff);
  box-shadow: var(--shadow-sm);
}

.tdk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.tdk-card-header h4 {
  margin: 3px 0 0;
  font-size: 1rem;
}

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

.tdk-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.tdk-item span {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tdk-item strong,
.tdk-item p {
  margin: 0;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.55;
}

.article-preview {
  flex: 1;
  overflow-y: auto;
  padding: 42px 56px 70px;
  color: #1f2937;
  line-height: 1.7;
}

.article-preview:empty::before {
  content: "文章生成后会在这里以 Notion 风格预览。";
  color: var(--muted-2);
}

.article-preview h1 {
  margin: 0 0 26px;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.article-preview h2 {
  margin: 34px 0 12px;
  color: #111827;
  font-size: 1.42rem;
  letter-spacing: -0.03em;
}

.article-preview h3 {
  margin: 24px 0 8px;
  color: #374151;
  font-size: 1.08rem;
}

.article-preview p {
  margin: 0 0 15px;
  color: #374151;
  font-size: 1rem;
}

.translation-card {
  display: none;
}

.translation-card h4 {
  margin: 0 0 10px;
}

@media (min-width: 760px) {
  .product-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tdk-grid {
    grid-template-columns: 1.2fr 1.4fr 1fr;
  }
}

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

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    resize: none;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .canvas {
    height: auto;
    min-height: 720px;
  }

  .output-stage {
    height: 720px;
  }
}

@media (max-width: 640px) {
  .sidebar,
  .canvas {
    padding: 18px;
  }

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

  .form-grid-2,
  .product-card-grid {
    grid-template-columns: 1fr;
  }

  .canvas-topbar,
  .article-toolbar,
  .tdk-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sidebar-resize-handle {
    display: none;
  }

  .article-preview {
    padding: 28px 24px 52px;
  }
}

/* Unified SPA shell: home portal + keep-alive tool views */
body {
  overflow-x: hidden;
  overflow-y: auto;
  background: #f5f7fa;
}

.studio-app {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 24px 24px;
}

.global-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 0 18px;
  flex: 0 0 auto;
}

.global-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.global-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0891b2, var(--accent));
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.24);
}

.global-brand strong {
  display: block;
  margin-top: 0;
  color: #111827;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.global-welcome-copy {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.global-account {
  padding: 9px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.view-shell {
  width: 100%;
  max-width: 1400px;
  height: auto;
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  flex: 1 1 auto;
}

.view {
  height: auto;
  min-height: 100%;
}

.is-hidden {
  display: none !important;
}

.view-home {
  display: block;
}

.home-portal {
  width: min(880px, 100%);
  text-align: center;
  min-height: 100%;
}

.home-portal h1 {
  margin: 10px 0 12px;
  color: #111827;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.home-copy {
  width: min(650px, 100%);
  margin: 0 auto 34px;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.75;
}

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

.home-tool-card {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-height: 220px;
  padding: 28px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.04), 0 2px 8px -2px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.home-tool-card:hover {
  transform: translateY(-4px);
  border-color: #bae6fd;
  box-shadow: 0 22px 42px -18px rgba(14, 165, 233, 0.34), 0 8px 24px rgba(15, 23, 42, 0.07);
}

.home-tool-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #ecfeff;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #bae6fd;
}

.home-tool-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.home-tool-card small {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.7;
}

.view-tool {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  flex: 0 0 auto;
}

.tool-heading h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 1.45rem;
  letter-spacing: -0.045em;
}

.back-to-studio {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.back-to-studio:hover {
  transform: translateY(-1px);
  border-color: #bae6fd;
  color: var(--accent);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.12);
}

.workspace-refresh-button,
.workspace-api-refresh-button {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.88)),
    #fff;
  color: #0f766e;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px -24px rgba(37, 99, 235, 0.45);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.workspace-refresh-button:hover:not(:disabled),
.workspace-api-refresh-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.42);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(239, 246, 255, 0.96)),
    #fff;
  box-shadow: 0 18px 34px -24px rgba(15, 118, 110, 0.46);
}

.workspace-refresh-button:disabled,
.workspace-api-refresh-button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.workspace-refresh-button.is-refreshing,
.workspace-api-refresh-button.is-refreshing {
  color: #2563eb;
}

.workspace-api-refresh-button {
  border-color: rgba(14, 165, 233, 0.34);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(240, 249, 255, 0.96)),
    #fff;
  color: #0369a1;
}

.workspace-dingtalk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgba(15, 118, 110, 0.34);
  border-radius: 999px;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(240, 249, 255, 0.96)), #fff;
  box-shadow: 0 12px 24px -24px rgba(15, 118, 110, 0.46);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.workspace-dingtalk-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.52);
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.92), rgba(224, 242, 254, 0.92)), #fff;
  box-shadow: 0 18px 34px -24px rgba(15, 118, 110, 0.54);
}

.article-route-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.92), rgba(236, 253, 245, 0.72));
}

.article-route-card h2 {
  margin: 3px 0 5px;
  color: #0f172a;
  font-size: 1.02rem;
}

.article-route-status,
.publish-package-note {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.65;
}

.article-route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.route-button {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-radius: 999px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  cursor: pointer;
}

.route-button.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0284c7);
  box-shadow: 0 12px 24px -16px rgba(14, 116, 144, 0.65);
}

.publish-package-card {
  display: grid;
  gap: 18px;
}

.publish-package-toolbar {
  align-items: flex-start;
}

.publish-dingtalk-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.publish-cover-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.publish-assistant-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.9), rgba(239, 246, 255, 0.9));
}

.publish-assistant-strip div {
  display: grid;
  gap: 3px;
}

.publish-assistant-strip strong { color: #0f172a; }
.publish-assistant-strip span { color: #64748b; font-size: 0.8rem; }

.publish-assistant-status {
  max-width: 50%;
  padding: 7px 10px;
  border-radius: 999px;
  text-align: right;
  background: rgba(255, 255, 255, 0.72);
}

.publish-assistant-status.is-success { color: #047857; background: #dcfce7; }
.publish-assistant-status.is-error { color: #b91c1c; background: #fee2e2; }
.publish-assistant-status.is-working { color: #0369a1; background: #e0f2fe; }

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

.publish-package-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.publish-package-panel h4 {
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 0.96rem;
  line-height: 1.45;
}

.publish-package-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  margin: 14px 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.publish-package-meta dt {
  color: #0f766e;
  font-weight: 800;
}

.publish-package-meta dd {
  min-width: 0;
  margin: 0;
  color: #334155;
  overflow-wrap: anywhere;
}

.publish-check-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.publish-check-list li {
  position: relative;
  padding-left: 20px;
  color: #475569;
  font-size: 0.83rem;
  line-height: 1.55;
}

.publish-check-list li::before {
  position: absolute;
  left: 0;
  top: 0.12em;
  color: #94a3b8;
  content: "○";
  font-weight: 800;
}

.publish-check-list li.is-pass::before { content: "✓"; color: #059669; }
.publish-check-list li.is-warn::before { content: "!"; color: #d97706; }

.publish-package-state {
  padding: 12px 14px;
  border-radius: 12px;
  color: #0f766e;
  background: rgba(236, 253, 245, 0.75);
  font-size: 0.85rem;
  line-height: 1.55;
}

@media (max-width: 940px) {
  .article-route-card,
  .publish-package-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .publish-package-grid {
    grid-template-columns: 1fr;
  }

  .publish-assistant-strip { align-items: flex-start; flex-direction: column; }
  .publish-assistant-status { max-width: none; text-align: left; }
}

.app-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: transparent;
}

.view-tool > .app-shell {
  flex: 1 1 auto;
  height: auto;
}

.sidebar,
.canvas,
.image-tool-frame {
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.04), 0 2px 8px -2px rgba(0, 0, 0, 0.02);
}

.sidebar {
  width: 430px;
  min-width: 400px;
  max-width: 450px;
  height: auto;
  min-height: 0;
  padding: 20px 24px 28px;
  resize: horizontal;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid #f1f5f9;
  scrollbar-width: none;
}

.canvas {
  display: flex;
  flex-direction: column;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
}

.canvas-topbar {
  flex: 0 0 auto;
  margin-bottom: 18px;
}

.output-stage {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.editor-card,
.article-card {
  border-radius: 16px;
  box-shadow: none;
}

.image-tool-frame {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.image-tool-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

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

  .studio-app {
    padding: 0 16px 20px;
  }

  .global-header {
    padding: 18px 0 14px;
  }

  .view-shell {
    height: auto;
    min-height: calc(100vh - 92px);
  }

  .view-tool {
    min-height: calc(100vh - 92px);
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
    resize: none;
    overflow: visible;
  }

  .canvas {
    min-height: 720px;
  }

  .image-tool-frame {
    min-height: 760px;
  }
}

@media (max-width: 760px) {
  .global-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

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

  .home-tool-card {
    min-height: 190px;
  }

  .tool-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Home portal refinement and article workspace cleanup */
.view-home {
  display: block;
  padding: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(17, 24, 39, 0.045) 1px, transparent 0) 0 0 / 28px 28px,
    #f9fafb;
  border-radius: 18px;
}

.home-portal {
  width: min(1100px, 100%);
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 88px;
}

.home-hero {
  margin-bottom: 48px;
  text-align: center;
}

.home-portal h1 {
  margin: 10px 0 14px;
  color: #111827;
  font-size: 40px;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.home-copy {
  margin: 0 auto;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.65;
}

.home-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.home-tool-card {
  position: relative;
  align-content: start;
  min-height: 280px;
  padding: 40px;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 24px -10px rgba(15, 23, 42, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-tool-card:hover {
  transform: translateY(-4px);
  border-color: #0f766e;
  box-shadow: 0 20px 40px -10px rgba(255, 115, 22, 0.1), 0 14px 28px -20px rgba(15, 23, 42, 0.22);
}

.home-tool-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  border-radius: 20px;
  background: #ecfeff;
  color: var(--accent);
  font-size: 1.35rem;
}

.home-tool-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.home-tool-card small {
  max-width: 92%;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.6;
}

.home-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 850;
}

.home-card-cta span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-tool-card:hover .home-card-cta span {
  transform: translateX(4px);
}

.brand-bar h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.brand-bar h1 span {
  font-weight: 850;
}

.brand-bar h1 small {
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
}

.sidebar {
  width: 480px;
  min-width: 450px;
  max-width: 560px;
}

.select-card {
  padding-right: 38px;
}

.article-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}

.sr-only-data-buffer {
  display: none !important;
}

.metadata-card {
  overflow: visible;
}

.metadata-panel {
  margin: 0 24px 24px;
}

.image-description-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fafc;
}

.image-description-panel h4 {
  margin: 3px 0 0;
  font-size: 1rem;
}

.image-description-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: #374151;
  line-height: 1.65;
}

.image-description-list li {
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 1080px) {
  .home-portal {
    padding: 44px 20px;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

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

  .home-tool-card {
    min-height: 240px;
    padding: 30px;
  }
}

/* Targeted review fixes: sticky status, compact header title, roomier cards, rich markdown */
.global-brand-copy {
  min-width: 0;
}

.global-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 4px;
}

.welcome-title-row {
  display: block;
}

.global-title-divider {
  margin: 0 14px;
  color: #d1d5db;
  font-weight: 500;
}

.global-view-title {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.tool-heading {
  min-height: 38px;
}

.article-history-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  background: #ecfeff;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.chip-button {
  border: 0;
  cursor: pointer;
}

.article-history-card h2 {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.article-history-email {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.article-history-badges,
.article-history-cleanup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.article-history-cleanup {
  gap: 8px;
}

.history-date-wrap {
  position: relative;
  flex: 0 1 130px;
  min-width: 120px;
}

.history-date-input {
  width: 100%;
  padding: 10px 34px 10px 12px;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.history-date-input::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.history-date-separator {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.history-clear-btn {
  min-height: 40px;
  white-space: nowrap;
}

.article-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.article-history-item {
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.article-history-item summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.article-history-item summary::-webkit-details-marker {
  display: none;
}

.article-history-item-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
}

.article-history-item-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.article-history-item-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.article-history-item-block span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-history-item-block strong {
  font-size: 0.9rem;
  color: #111827;
}

.article-history-item-preview,
.article-history-empty {
  padding: 12px;
  border: 1px solid #dbe7ef;
  border-radius: 12px;
  background: #ffffff;
  color: #4b5563;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.72;
  font-size: 0.82rem;
  max-height: 180px;
  overflow: auto;
}

.product-card-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card-grid .field,
.product-card-grid .input-with-select,
.product-card-grid input,
.product-card-grid select,
.product-card-grid textarea {
  width: 100%;
}

.product-card-grid input,
.product-card-grid textarea {
  padding: 10px 12px;
}

.product-card-grid input::placeholder,
.product-card-grid textarea::placeholder {
  font-size: 0.82rem;
  text-overflow: clip;
}

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

.image-view-shell {
  gap: 12px;
  min-height: calc(100vh - 128px);
}

.image-view-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 38px;
}

.status-card {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 10px;
  background-color: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.45), 0 1px 0 rgba(229, 231, 235, 0.9);
}

.sidebar {
  width: 520px;
  min-width: 480px;
  max-width: 620px;
}

.select-card-grid {
  gap: 14px;
  padding-top: 12px;
  padding-right: 12px;
}

.select-card {
  min-height: 86px;
  padding: 16px 46px 15px 16px;
  border-radius: 16px;
}

.select-card strong {
  margin-bottom: 7px;
  padding-right: 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.select-card span {
  margin-top: 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

.article-preview.prose {
  max-width: none;
  color: #374151;
  font-size: 1.02rem;
  line-height: 1.78;
}

.article-preview.prose > *:first-child {
  margin-top: 0;
}

.article-preview.prose h1,
.article-preview.prose h2,
.article-preview.prose h3 {
  color: #111827;
  font-weight: 850;
}

.article-preview.prose h1 {
  margin: 0 0 28px;
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
}

.article-preview.prose h2 {
  margin: 42px 0 14px;
  padding-top: 4px;
  font-size: 1.55rem;
  line-height: 1.25;
}

.article-preview.prose h3 {
  margin: 28px 0 10px;
  font-size: 1.18rem;
  line-height: 1.35;
}

.article-preview.prose p {
  margin: 0 0 18px;
}

.article-preview.prose strong {
  color: #111827;
  font-weight: 800;
}

.article-preview.prose a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 165, 233, 0.28);
}

.article-preview.prose ul,
.article-preview.prose ol {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding-left: 1.35rem;
}

.article-preview.prose li {
  padding-left: 0.2rem;
}

.article-preview.prose blockquote {
  margin: 26px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: #ecfeff;
  color: #4b5563;
}

.article-preview.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #ecfeff;
  color: var(--accent-strong);
  font-family: "Geist Mono", Consolas, monospace;
  font-size: 0.9em;
}

/* Latest review fixes: unified sticky sidebar header and custom product dropdown */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 -24px 18px;
  padding: 12px 24px 14px;
  border-bottom: 1px solid #f3f4f6;
  background-color: #ffffff;
  box-shadow: 0 14px 22px -24px rgba(15, 23, 42, 0.45);
}

.sidebar {
  padding-top: 0;
}

.sticky-header .status-card {
  position: relative;
  top: auto;
  z-index: auto;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.select-card {
  display: block;
}

.select-card strong,
.select-card span {
  display: block;
  width: 100%;
}

.input-with-select {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: visible;
}

.input-with-select .native-product-select {
  display: none !important;
}

.custom-product-select {
  position: relative;
  min-width: 56px;
  border-left: 1px solid var(--line);
}

.custom-style-select {
  position: relative;
  width: 100%;
}

.custom-style-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: #374151;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px -14px rgba(15, 23, 42, 0.35);
  transition: all 0.25s ease;
}

.custom-style-toggle:hover,
.custom-style-select.is-open .custom-style-toggle {
  border-color: #38bdf8;
  box-shadow: 0 10px 26px -20px rgba(14, 165, 233, 0.42);
  color: var(--accent-strong);
}

.custom-style-label {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.custom-style-chevron {
  flex-shrink: 0;
  color: currentColor;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.custom-style-select.is-open .custom-style-chevron {
  transform: rotate(180deg);
}

.custom-style-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: max-content;
  min-width: 100%;
  padding: 10px;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px -36px rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
}

.custom-style-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #1f2937;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  transition: all 0.2s ease;
}

.custom-style-option:hover,
.custom-style-option.is-selected {
  background: rgba(14, 165, 233, 0.08);
  color: var(--accent-strong);
}

.custom-product-count {
  margin-top: 8px;
  color: #9ca3af;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.custom-product-toggle {
  justify-content: center;
  width: 56px;
  min-width: 56px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: var(--accent);
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
}

.custom-product-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.custom-product-toggle:hover,
.custom-product-select.is-open .custom-product-toggle {
  background: #ecfeff;
  color: var(--accent-strong);
  transform: none;
}

.custom-product-chevron {
  color: currentColor;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.custom-product-select.is-open .custom-product-chevron {
  transform: rotate(180deg);
}

.custom-product-menu {
  position: absolute;
  top: calc(100% + 36px);
  right: 0;
  z-index: 90;
  width: min(420px, calc(100vw - 48px));
  padding: 14px 14px 12px;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 48px -22px rgba(15, 23, 42, 0.36), 0 18px 32px -24px rgba(14, 165, 233, 0.36);
}

.custom-product-filters {
  display: flex;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}

.custom-product-filter {
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: none;
}

.custom-product-filter:hover,
.custom-product-filter.is-active {
  border-color: #bae6fd;
  background: #ecfeff;
  color: var(--accent-strong);
  transform: none;
}

.custom-product-list {
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.custom-product-list::-webkit-scrollbar {
  width: 6px;
}

.custom-product-list::-webkit-scrollbar-track {
  background: transparent;
}

.custom-product-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

.custom-product-group {
  padding: 8px 0 7px;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.custom-product-option {
  display: grid;
  width: 100%;
  min-height: 0;
  justify-items: start;
  gap: 3px;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #1f2937;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.compact-product-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}

.compact-product-row > .field {
  flex: 1 1 0;
  min-width: 0;
}

.compact-product-row > .field:first-child {
  flex: 0 0 176px;
}

.compact-product-row > .field:last-child {
  flex: 1 1 auto;
}

.custom-product-option:hover,
.custom-product-option.is-selected {
  background: #ecfeff;
  transform: none;
}

.custom-product-option span {
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
}

.custom-product-option small {
  width: 100%;
  text-align: left;
  color: #9ca3af;
  font-size: 0.74rem;
}

.custom-product-option,
.custom-product-group,
.custom-product-list {
  text-align: left;
}

.custom-product-option {
  justify-content: flex-start;
  align-items: start;
  padding-left: 12px;
}

.custom-product-empty {
  padding: 20px 12px;
  color: #9ca3af;
  font-size: 0.86rem;
  text-align: center;
}

.image-tool-frame {
  position: relative;
  min-height: 720px;
}

.image-frame-fallback {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  padding: 7px 11px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: rgba(240, 249, 255, 0.92);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.image-tool-frame.has-loaded .image-frame-fallback {
  display: none;
}

.image-tool-frame iframe {
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  .sticky-header {
    margin: 0 -18px 16px;
    padding: 18px 18px 12px;
  }

  .compact-product-row {
    flex-direction: column;
  }

  .compact-product-row > .field:first-child,
  .compact-product-row > .field:last-child {
    flex: 1 1 auto;
    width: 100%;
  }

  .custom-product-menu {
    right: auto;
    left: 0;
    width: min(360px, calc(100vw - 48px));
  }
}
/* 2026-04-16 article typography + metadata refinement */
.article-preview {
  padding: 30px 40px 52px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.article-preview .article-document {
  max-width: 860px;
  margin: 0 auto;
  color: #4b5563;
}

.article-preview .article-document > *:first-child {
  margin-top: 0;
}

.article-preview .article-document h1,
.article-preview .article-document h2,
.article-preview .article-document h3 {
  color: #111827;
  text-wrap: balance;
}

.article-preview .article-document h1 {
  max-width: 15ch;
  margin: 0 0 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
  font-size: clamp(1.82rem, 2.7vw, 2.55rem);
  font-weight: 820;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.article-preview .article-document h2 {
  margin: 42px 0 14px;
  padding-top: 18px;
  border-top: 1px solid #eceff3;
  font-size: 1.38rem;
  font-weight: 780;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.article-preview .article-document h3 {
  margin: 28px 0 10px;
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.45;
  color: #374151;
}

.article-preview .article-document p,
.article-preview .article-document li {
  font-size: 1.01rem;
  line-height: 1.92;
  color: #4b5563;
}

.article-preview .article-document p {
  margin: 0 0 18px;
}

.article-preview .article-document ul,
.article-preview .article-document ol {
  margin: 0 0 22px;
  padding-left: 1.35rem;
}

.article-preview .article-document li + li {
  margin-top: 8px;
}

.article-preview .article-document strong {
  color: #111827;
  font-weight: 780;
}

.article-preview .article-document blockquote {
  margin: 28px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: #ecfeff;
}

.tdk-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px;
}

.tdk-item {
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 14px 16px;
}

.tdk-item span {
  margin-top: 2px;
}

.tdk-item strong,
.tdk-item p {
  font-size: 0.96rem;
  line-height: 1.75;
  word-break: break-word;
}

.tdk-smart-slugs {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tdk-smart-slugs p {
  margin: 0;
}

.tdk-smart-slugs b {
  display: inline-block;
  min-width: 92px;
  color: #111827;
  font-weight: 800;
}

.tdk-smart-slugs code {
  display: inline;
  padding: 2px 7px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #ecfeff;
  color: #334155;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.image-description-panel {
  margin-top: 14px;
  padding: 18px;
}

.image-description-list {
  list-style: none;
  gap: 12px;
  padding: 0;
}

.image-description-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
}

.image-description-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.image-description-copy {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.8;
}

@media (max-width: 760px) {
  .article-preview {
    padding: 24px 22px 42px;
  }

  .article-preview .article-document h1 {
    max-width: none;
    font-size: 1.7rem;
  }

  .tdk-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .image-description-list li {
    grid-template-columns: 1fr;
  }
}

/* 2026-04-16b workflow refinements */
.compact-product-row {
  display: block !important;
}

.compact-product-row > .field,
.product-picker-field {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

.product-picker-field .input-with-select {
  width: 100%;
}

.language-tabs,
.translation-state,
.tdk-style-control {
  white-space: nowrap;
}

.metadata-card .article-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.metadata-card .content-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.metadata-card .content-actions .btn,
#generateTdk {
  width: auto;
  flex: 0 0 auto;
}

#generateTdk {
  min-width: 240px;
}

.tdk-item {
  grid-template-columns: 1fr !important;
  gap: 8px;
}

@media (max-width: 1080px) {
  .metadata-card .article-toolbar {
    grid-template-columns: 1fr;
  }

  .metadata-card .content-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* 2026-04-16d article polish + metadata layout cleanup */
.select-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-preview {
  padding: 30px 34px 50px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.article-preview .article-document {
  max-width: 860px;
  margin: 0 auto;
  color: #4b5563;
}

.article-preview .article-document h1 {
  max-width: 28ch;
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eceff3;
  font-size: clamp(1.42rem, 2vw, 1.68rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.article-preview .article-document h2 {
  margin: 34px 0 14px;
  padding: 0 0 0 14px;
  border-top: 0;
  border-left: 4px solid #38bdf8;
  font-size: 1.16rem;
  font-weight: 780;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.article-preview .article-document h3 {
  margin: 24px 0 10px;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.5;
  color: #374151;
}

.article-preview .article-document p,
.article-preview .article-document li {
  font-size: 0.99rem;
  line-height: 1.88;
}

.article-preview .article-document p {
  margin: 0 0 16px;
}

.metadata-card .article-toolbar {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.metadata-card .article-toolbar > div:first-child {
  min-width: 280px;
}

.metadata-card .article-toolbar h3,
.metadata-card .tdk-card-header h4,
.metadata-card .language-tabs,
.metadata-card .translation-state {
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.metadata-card .article-toolbar h3 {
  overflow: visible;
}

.metadata-card .content-actions {
  gap: 12px;
}

.metadata-card .content-actions .btn,
#generateTdk {
  min-width: 0;
}

#generateTdk {
  min-width: 210px;
}

.metadata-card .tdk-item span,
.metadata-card .tdk-item strong,
.metadata-card .tdk-item p,
.metadata-card .image-description-copy {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

@media (max-width: 760px) {
  .article-preview {
    padding: 24px 22px 40px;
  }

  .article-preview .article-document h1 {
    max-width: none;
    font-size: 1.5rem;
  }
}

/* 2026-04-16e final metadata + article polish */
.metadata-card .article-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.metadata-toolbar-main {
  min-width: 0;
  flex: 1 1 320px;
}

.metadata-toolbar-main h3 {
  white-space: nowrap;
  line-height: 1.18;
}

.metadata-toolbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.metadata-card .language-tabs {
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.metadata-card .language-tab,
.metadata-card .translation-state,
.metadata-card .tdk-style-control span {
  white-space: nowrap;
}

.metadata-card .content-actions .btn {
  white-space: nowrap;
}

.metadata-card .tdk-style-control {
  min-width: 240px;
}

.metadata-card .tdk-style-dropdown {
  min-width: 168px;
}

.article-preview .article-document h1 {
  font-size: clamp(1.34rem, 1.85vw, 1.56rem);
  line-height: 1.28;
  letter-spacing: -0.03em;
  max-width: 28ch;
}

.article-preview .article-document h2 {
  margin: 28px 0 12px;
  padding-left: 14px;
  border-left-width: 4px;
  font-size: 1.12rem;
  line-height: 1.42;
}

@media (max-width: 1040px) {
  .metadata-card .article-toolbar {
    flex-direction: column;
  }

  .metadata-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 2026-04-16i metadata/header/history refinement */
.metadata-card .metadata-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.metadata-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.metadata-title-block {
  min-width: 0;
}

.metadata-title-block .eyebrow {
  margin-bottom: 6px;
}

.metadata-title-block h3 {
  margin: 0;
}

.metadata-language-tabs {
  margin-top: 0;
  flex: 0 0 auto;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.metadata-language-tabs::-webkit-scrollbar,
.metadata-toolbar-actions::-webkit-scrollbar {
  display: none;
}

.metadata-card .translation-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 10px;
  color: #6b7280;
}

.metadata-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.metadata-toolbar-actions > * {
  flex: 0 0 auto;
}

.metadata-card .tdk-style-control,
.metadata-card .content-actions .btn,
#generateTdk {
  min-height: 42px;
}

.metadata-card .tdk-style-control {
  min-width: 232px;
  position: relative;
  overflow: visible;
}

.metadata-card .tdk-style-dropdown {
  min-width: 150px;
  position: relative;
  overflow: visible;
  z-index: 160;
}

.metadata-toolbar,
.metadata-toolbar-actions,
.custom-style-select {
  overflow: visible;
}

.custom-style-menu {
  z-index: 220;
}

.article-history-card {
  padding: 20px 18px 18px;
  border-radius: 20px;
  box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.22);
}

.article-history-card .section-kicker {
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.article-history-card h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.article-history-email {
  margin-top: 12px;
  font-size: 0.95rem;
}

.article-history-badges {
  gap: 8px;
  margin-top: 14px;
}

.article-history-cleanup {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.history-date-wrap {
  flex: 0 1 148px;
  min-width: 132px;
}

.history-date-input {
  min-height: 40px;
  padding: 10px 34px 10px 12px;
}

.history-clear-btn {
  min-height: 40px;
  padding-inline: 14px;
  border-radius: 12px;
}

@media (max-width: 1040px) {
  .metadata-toolbar-top {
    align-items: flex-start;
  }

  .metadata-toolbar-actions {
    justify-content: flex-start;
  }
}

/* 2026-04-16j force article history card to match image workspace card */
#articleView .article-history-card {
  margin-bottom: 18px;
  padding: 20px 18px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.24);
}

#articleView .article-history-card .section-kicker {
  margin: 0 0 8px;
  color: #0f766e;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#articleView .article-history-card h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

#articleView .article-history-email {
  margin-top: 12px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
}

#articleView .article-history-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

#articleView .article-history-badges .chip,
#articleView .article-history-badges .chip-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: none;
}

#articleView .article-history-cleanup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}

#articleView .article-history-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}

#articleView .article-history-button-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

#articleView .history-date-wrap {
  position: relative;
  flex: 0 1 126px;
  min-width: 126px;
}

#articleView .history-date-input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 30px 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
}

#articleView .history-date-input:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

#articleView .history-date-input::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 8px;
  width: 12px;
  height: 12px;
  cursor: pointer;
}

#articleView .history-date-separator {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

#articleView .history-clear-btn {
  width: auto;
  min-width: 88px;
  min-height: 40px;
  margin-top: 0;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  white-space: nowrap;
  box-shadow: none;
}

#articleView .history-clear-btn:hover {
  border-color: #0f766e;
  color: #0f766e;
  transform: translateY(-1px);
}

#articleView .article-history-card .helper {
  margin-top: 10px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 520px) {
  #articleView .article-history-date-row {
    flex-wrap: wrap;
  }

  #articleView .history-date-separator {
    display: none;
  }
}

/* 2026-04-17 EXE-style article typography */
.article-preview {
  padding: 28px 34px 44px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.article-preview .article-document {
  max-width: 860px;
  margin: 0 auto;
  color: #374151;
}

.article-preview .article-document h1 {
  max-width: none;
  margin: 0 0 26px;
  padding: 0 0 12px;
  border-bottom: 1px solid #eceff3;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.article-preview .article-document h2 {
  margin: 34px 0 14px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 22px;
  font-weight: 780;
  line-height: 1.42;
  color: #111827;
}

.article-preview .article-document h3 {
  margin: 22px 0 10px;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.5;
  color: #1f2937;
}

.article-preview .article-document p,
.article-preview .article-document li {
  font-size: 15px;
  line-height: 1.9;
  color: #4b5563;
}

.article-preview .article-document p {
  margin: 0 0 18px;
}

.article-preview .article-document p.faq-question,
.article-preview .article-document p.faq-answer {
  margin-bottom: 10px;
  font-weight: 400;
  color: #1f2937;
}

.article-preview .article-document p.faq-question + p.faq-answer {
  margin-top: 0;
  margin-bottom: 22px;
}

.article-preview .article-document strong {
  color: #111827;
  font-weight: 780;
}

.product-card-header {
  align-items: center;
}

.product-card-title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.product-card-remove {
  position: static;
  margin-left: auto;
  white-space: nowrap;
}
/* 2026-04-17h: final EXE-style article layout + product card header alignment */
#articleView .product-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  margin-bottom: 12px;
}

#articleView .product-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#articleView .product-card-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#articleView .product-card-remove {
  justify-self: end;
  align-self: center;
  margin-left: 0;
  white-space: nowrap;
}

#articleView .article-preview {
  padding: 30px 38px 54px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#articleView .article-preview .article-document {
  max-width: 860px;
  margin: 0 auto;
  color: #1f2937;
}

#articleView .article-preview .article-document h1 {
  max-width: none;
  margin: 0 0 26px;
  padding: 0 0 12px;
  border-bottom: 1px solid #eceff3;
  color: #0f766e;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

#articleView .article-preview .article-document h2 {
  margin: 34px 0 14px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  border-left: 0;
  color: rgb(36, 92, 182);
  font-size: 22px;
  font-weight: 780;
  line-height: 1.42;
}

#articleView .article-preview .article-document h3 {
  margin: 22px 0 10px;
  color: rgb(22, 126, 102);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.5;
}

#articleView .article-preview .article-document p,
#articleView .article-preview .article-document li {
  color: #1f2937;
  font-size: 15px;
  line-height: 1.9;
}

#articleView .article-preview .article-document p {
  margin: 0 0 18px;
}

#articleView .article-preview .article-document p.faq-question,
#articleView .article-preview .article-document p.faq-answer {
  margin-bottom: 10px;
}

#articleView .article-preview .article-document p.faq-question + p.faq-answer {
  margin-top: -2px;
  margin-bottom: 18px;
}

#articleView .article-preview .article-document strong {
  color: #111827;
  font-weight: 780;
}

#articleView .article-preview .article-document .article-table-wrap {
  width: 100%;
  margin: 22px 0 24px;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

#articleView .article-preview .article-document table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.5;
}

#articleView .article-preview .article-document th,
#articleView .article-preview .article-document td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

#articleView .article-preview .article-document th {
  background: #f8fafc;
  color: #111827;
  font-weight: 760;
  white-space: nowrap;
}

#articleView .article-preview .article-document tr:last-child td {
  border-bottom: 0;
}


/* 2026-04-20b faq/dropdown/image-frame refinements */
.article-preview .article-document .faq-item {
  margin: 18px 0 22px;
  padding: 16px 18px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
}
.article-preview .article-document .faq-item .faq-question,
.article-preview .article-document .faq-item .faq-answer {
  margin: 0;
  font-weight: 400 !important;
  line-height: 1.85;
  color: #1f2937;
  white-space: pre-wrap;
}
.article-preview .article-document .faq-item .faq-answer {
  margin-top: 12px;
}
#articleView .article-preview .article-document .faq-item p strong,
#articleView .article-preview .article-document p.faq-question strong,
#articleView .article-preview .article-document p.faq-answer strong {
  font-weight: 400 !important;
}
.article-preview .article-document .faq-item .faq-question strong,
.article-preview .article-document .faq-item .faq-answer strong {
  font-weight: 400 !important;
}
.metadata-card .tdk-style-dropdown,
.metadata-card .custom-style-select,
.metadata-card .custom-style-toggle,
.metadata-card .custom-style-menu {
  pointer-events: auto;
}
.metadata-card .tdk-style-dropdown {
  z-index: 260;
}
.image-tool-frame iframe {
  background: #fff;
}

.global-account-shell {
  position: relative;
}

.global-account {
  cursor: pointer;
}

.global-account:disabled {
  cursor: default;
  opacity: 1;
  color: var(--accent);
  background: rgba(236, 254, 255, 0.82);
  border-color: rgba(103, 232, 249, 0.55);
}

.workspace-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 8px;
  min-width: 180px;
  padding: 12px;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.25);
  z-index: 40;
}

.workspace-menu-item {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #fff;
  color: #374151;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
}

.workspace-menu-item:hover {
  border-color: #bae6fd;
  color: var(--accent);
  background: #ecfeff;
}

.workspace-menu-item.is-danger:hover {
  border-color: rgba(239, 68, 68, 0.22);
  color: #dc2626;
  background: #fef2f2;
}

.home-access-panel {
  display: grid;
  gap: 20px;
  justify-items: center;
  max-width: 560px;
  margin: 40px auto 0;
  padding: 28px 32px;
  border: 1px solid #bae6fd;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  box-shadow: 0 18px 40px -28px rgba(14, 165, 233, 0.35);
  text-align: center;
}

.home-admin-note h2 {
  margin: 8px 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.home-admin-note p:last-child {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

.home-auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.portal-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.24);
  z-index: 49;
}

.portal-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: grid;
  gap: 16px;
  width: min(440px, 100vw);
  height: 100vh;
  padding: 24px;
  border-left: 1px solid #f1f5f9;
  background: #fff;
  box-shadow: -20px 0 40px -20px rgba(15, 23, 42, 0.22);
  overflow-y: auto;
}

.portal-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.portal-panel-header h3 {
  margin: 4px 0 0;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
}

.portal-auth-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: #f8fafc;
}

.portal-auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #6b7280;
  font-weight: 700;
  cursor: pointer;
}

.portal-auth-tab.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.35);
}

.portal-auth-form {
  display: grid;
  gap: 14px;
}

.portal-auth-form.is-hidden {
  display: none;
}

.portal-auth-field {
  display: grid;
  gap: 8px;
}

.portal-auth-field span {
  color: #374151;
  font-size: 0.92rem;
  font-weight: 700;
}

.portal-auth-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  outline: none;
  transition: all 0.25s ease;
}

.portal-auth-field input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.portal-auth-status {
  padding: 14px 16px;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  background: #f8fafc;
  color: #6b7280;
  line-height: 1.7;
}

.portal-auth-status[data-kind="success"] {
  color: #15803d;
  background: #f0fdf4;
}

.portal-auth-status[data-kind="warn"] {
  color: #334155;
  background: #ecfeff;
}

.portal-auth-status[data-kind="error"] {
  color: #dc2626;
  background: #fef2f2;
}

.portal-record-list {
  display: grid;
  gap: 14px;
}

.portal-record-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px -24px rgba(15, 23, 42, 0.25);
}

.portal-record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-record-top strong {
  font-size: 1rem;
}

.portal-record-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-record-status.status-pending {
  background: #ecfeff;
  color: #334155;
}

.portal-record-status.status-approved {
  background: #ecfdf5;
  color: #15803d;
}

.portal-record-status.status-rejected {
  background: #fef2f2;
  color: #dc2626;
}

.portal-record-meta,
.portal-record-note {
  color: #6b7280;
  line-height: 1.65;
}

.portal-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-review-footer {
  display: grid;
  gap: 12px;
}

.portal-review-hint {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.6;
}

.portal-review-button {
  flex: 1 1 0;
  width: auto;
  min-height: 50px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  transition: all 0.25s ease;
}

.portal-review-button--approve {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.portal-review-button--approve:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.28);
}

.portal-review-button--reject {
  background: #fff5f5;
  border-color: #fecaca;
  color: #dc2626;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.08);
}

.portal-review-button--reject:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.12);
}

.portal-review-button[disabled],
.portal-review-button.is-busy {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.portal-review-actions--readonly .portal-review-button {
  pointer-events: none;
}

.portal-record-empty {
  padding: 18px;
  border: 1px dashed #dbe3ee;
  border-radius: 16px;
  color: #6b7280;
  text-align: center;
}

.helper-install-modal.hidden {
  display: none !important;
}

.helper-install-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.helper-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(6px);
}

.helper-install-dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  margin: min(14vh, 120px) auto 0;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.helper-install-dialog h2 {
  margin: 0 0 12px;
}

.helper-install-dialog p {
  margin: 0;
  color: #6b7280;
  line-height: 1.75;
}

.helper-install-platform-note {
  margin-top: 4px !important;
  color: #374151 !important;
  font-size: 0.95rem;
  line-height: 1.7 !important;
}

.helper-install-steps {
  margin: 18px 0 0;
  padding-left: 22px;
  color: #4b5563;
  line-height: 1.8;
}

.helper-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.helper-install-actions .btn {
  width: auto;
  min-width: 156px;
}

.helper-install-status {
  margin-top: 14px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #334155;
}

.helper-install-status[data-tone="success"] {
  color: #15803d;
}

.helper-install-status[data-tone="info"] {
  color: #1d4ed8;
}

.helper-install-download {
  margin-top: 12px;
  font-size: 0.86rem;
  color: #6b7280;
  line-height: 1.6;
  word-break: break-all;
}

@media (max-height: 900px) {
  .view-shell {
    min-height: auto;
  }

  .view-home {
    overflow-y: auto;
  }

  .home-portal {
    padding-top: 36px;
    padding-bottom: 72px;
  }
}

/* 20260423e responsive and history/detail fixes */
html,
body {
  min-height: 100%;
  height: auto;
}

body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.studio-app {
  min-height: 100vh;
  height: auto;
}

.view-shell {
  min-height: calc(100vh - 96px);
  height: auto !important;
  overflow: visible;
}

.view-home {
  min-height: auto;
  overflow-y: visible !important;
}

.home-portal {
  padding-top: clamp(28px, 6vh, 60px);
  padding-bottom: 96px;
}

.home-card-grid {
  align-items: stretch;
}

.image-tool-frame {
  flex: 1 1 auto;
  min-height: min(860px, calc(100vh - 160px));
  height: calc(100vh - 176px);
}

.image-tool-frame iframe {
  display: block;
  width: 100%;
  min-height: 100%;
  height: 100%;
}

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

.article-history-content-block {
  margin-top: 12px;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.article-history-content-block > span {
  display: block;
  padding: 10px 12px 0;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-history-content-block pre {
  margin: 0;
  padding: 10px 12px 14px;
  max-height: 260px;
  overflow: auto;
  color: #374151;
  font-family: "Geist Mono", "Noto Sans SC", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.article-history-content-block.is-article pre {
  max-height: 420px;
}

.helper-install-dialog {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

@media (max-width: 1180px), (max-height: 780px) {
  .global-header {
    padding: 16px 20px 12px;
  }

  .view-shell {
    padding: 18px 16px 36px;
  }

  .home-portal {
    padding: 28px 16px 80px;
  }

  .home-card-grid {
    gap: 20px;
  }

  .home-tool-card {
    min-height: 220px;
    padding: 28px;
  }
}

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

  .image-view-shell,
  .app-shell {
    min-width: 0;
  }

  .image-tool-frame {
    min-height: 760px;
  }

  .article-history-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px), (max-height: 900px) {
  .image-view-shell {
    min-height: auto;
  }

  .image-tool-frame {
    height: 980px;
    min-height: 980px;
  }
}

@media (max-width: 860px) {
  .image-tool-frame {
    height: 1120px;
    min-height: 1120px;
  }
}
/* 20260424l authoritative workspace layout */
@media (min-width: 1081px) and (min-height: 821px) {
  html,
  body {
    height: 100%;
    overflow: hidden !important;
  }

  body {
    overscroll-behavior: none;
  }

  .studio-app {
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
  }

  .view-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    height: calc(100vh - 112px) !important;
    min-height: calc(100vh - 112px) !important;
    overflow: hidden !important;
  }

  .view,
  .view-tool,
  .image-view-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .view-tool > .app-shell {
    display: grid !important;
    grid-template-columns: 430px minmax(0, 1fr) !important;
    gap: 24px !important;
    flex: 1 1 auto;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .sidebar,
  .canvas {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
  }

  .sidebar {
    width: 430px !important;
    min-width: 430px !important;
    max-width: 430px !important;
    resize: none !important;
    padding: 20px 24px 28px !important;
    overflow-y: auto !important;
  }

  .canvas {
    display: flex !important;
    flex-direction: column !important;
    padding: 24px !important;
    overflow-y: hidden !important;
  }

  .canvas-topbar {
    flex: 0 0 auto;
  }

  .output-stage,
  .tab-content,
  #tab-article,
  #tab-prompt,
  #tab-tdk,
  .article-card,
  .metadata-card,
  .metadata-panel,
  .editor-card {
    height: 100% !important;
    min-height: 0 !important;
  }

  .article-card,
  .metadata-card,
  .metadata-panel,
  .editor-card {
    display: flex;
    flex-direction: column;
  }

  .output-stage {
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .tab-content,
  #tab-article,
  #tab-prompt,
  #tab-tdk,
  .article-card,
  .metadata-card,
  .editor-card {
    overflow: hidden !important;
  }

  .metadata-panel {
    flex: 1 1 auto;
    overflow-y: auto !important;
  }

  .article-preview,
  #promptOutput {
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  .image-view-nav {
    flex: 0 0 auto;
  }

  .image-view-shell .image-tool-frame {
    flex: 1 1 auto;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .image-view-shell .image-tool-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    border: 0;
  }
}

@media (max-width: 1080px), (max-height: 820px) {
  html,
  body {
    height: auto !important;
    overflow-y: auto !important;
  }

  .studio-app,
  .view-shell,
  .view,
  .view-tool,
  .image-view-shell,
  .view-tool > .app-shell,
  .sidebar,
  .canvas,
  .image-tool-frame {
    height: auto !important;
    min-height: 0 !important;
  }

  .view-shell,
  .view,
  .view-tool,
  .image-view-shell,
  .view-tool > .app-shell,
  .sidebar,
  .canvas,
  .image-tool-frame {
    overflow: visible !important;
  }

  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    resize: none !important;
  }

  .image-tool-frame iframe {
    min-height: 1100px !important;
  }
}

/* 2026-04-24n: article SEO quality UI fixes */
#articleView .custom-product-menu {
  width: min(460px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  z-index: 260;
}

#articleView .custom-product-list {
  max-height: min(320px, 42vh);
}

#articleView .custom-product-option {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-items: stretch;
  gap: 6px;
  min-height: 64px;
  padding: 14px 16px !important;
  overflow: visible;
  white-space: normal;
}

#articleView .custom-product-option span,
#articleView .custom-product-option small {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
  text-align: left;
}

#articleView .custom-product-option span {
  font-size: 0.96rem;
  font-weight: 800;
  color: #111827;
}

#articleView .custom-product-option small {
  font-size: 0.78rem;
  font-weight: 750;
  color: #9ca3af;
}
/* 20260424q: final independent panel scrolling for tool workspaces
   Desktop/tablet width keeps the page locked while each panel scrolls by itself.
   Small mobile widths fall back to normal page scrolling. */
@media (min-width: 1081px) {
  html,
  body {
    height: 100% !important;
    overflow: hidden !important;
  }

  body {
    overscroll-behavior: none;
  }

  .studio-app {
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  .view-shell {
    height: calc(100dvh - 112px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .view-tool,
  .image-view-shell {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .tool-heading,
  .image-view-nav {
    flex: 0 0 auto !important;
  }

  #articleView > .app-shell {
    display: grid !important;
    grid-template-columns: minmax(400px, 430px) minmax(0, 1fr) !important;
    gap: 24px !important;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #articleView .sidebar,
  #articleView .canvas {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
  }

  #articleView .sidebar {
    width: 430px !important;
    min-width: 400px !important;
    max-width: 450px !important;
    overflow-y: auto !important;
    resize: none !important;
    scrollbar-width: thin !important;
  }

  #articleView .canvas {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  #articleView .canvas-topbar {
    flex: 0 0 auto !important;
  }

  #articleView .output-stage {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  #articleView .tab-content,
  #articleView .article-card,
  #articleView .metadata-card,
  #articleView .editor-card {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  #articleView .article-preview,
  #articleView #promptOutput,
  #articleView .metadata-panel {
    max-height: none !important;
    overflow: visible !important;
  }

  #imageView .image-tool-frame {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #imageView .image-tool-frame iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: block !important;
  }
}

@media (max-width: 1080px) {
  html,
  body {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .studio-app,
  .view-shell,
  .view-tool,
  .image-view-shell,
  #articleView > .app-shell,
  #articleView .sidebar,
  #articleView .canvas,
  #imageView .image-tool-frame {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  #articleView > .app-shell {
    grid-template-columns: 1fr !important;
  }
}


/* 20260424q: hard guard for SPA view visibility.
   The independent-scroll rules must never override .is-hidden. */
#homeView.is-hidden,
#articleView.is-hidden,
#imageView.is-hidden,
.view.is-hidden,
.view-tool.is-hidden,
.image-view-shell.is-hidden {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#homeView:not(.is-hidden),
#articleView:not(.is-hidden),
#imageView:not(.is-hidden) {
  pointer-events: auto !important;
}

@media (min-width: 1081px) {
  #articleView.view-tool:not(.is-hidden),
  #imageView.image-view-shell:not(.is-hidden) {
    display: flex !important;
  }

  #homeView.view-home:not(.is-hidden) {
    display: flex !important;
  }
}


/* 20260427a: article product picker, prompt preview, and independent output repair */
@media (min-width: 1081px) {
  #articleView.view-tool:not(.is-hidden) {
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #articleView > .app-shell {
    display: grid !important;
    grid-template-columns: minmax(420px, 460px) minmax(0, 1fr) !important;
    gap: 24px !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #articleView .sidebar,
  #articleView .canvas {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
  }

  #articleView .sidebar {
    width: 460px !important;
    min-width: 420px !important;
    max-width: 480px !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
  }

  #articleView .canvas {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  #articleView .output-stage {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 640px !important;
    overflow: visible !important;
  }

  #articleView #tab-prompt:not([hidden]) {
    display: flex !important;
    flex-direction: column !important;
    min-height: 640px !important;
    height: auto !important;
    overflow: visible !important;
  }

  #articleView #tab-prompt .prompt-editor {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 640px !important;
    overflow: hidden !important;
  }

  #articleView #promptOutput {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 580px !important;
    max-height: none !important;
    overflow: auto !important;
    white-space: pre-wrap !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }
}

#articleView .input-with-select {
  position: relative !important;
  overflow: visible !important;
  z-index: 80 !important;
}

#articleView .input-with-select:focus-within {
  z-index: 520 !important;
}

#articleView .input-with-select .custom-product-select {
  position: static !important;
}

#articleView .input-with-select .custom-product-menu {
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 10px) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  transform: none !important;
  box-sizing: border-box !important;
  z-index: 800 !important;
  overflow: hidden !important;
}

#articleView .custom-product-list {
  max-height: min(340px, 44vh) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

#articleView .custom-product-option {
  text-align: left !important;
  justify-content: flex-start !important;
  padding: 14px 18px !important;
  min-height: 68px !important;
  box-sizing: border-box !important;
}

#articleView .custom-product-option span,
#articleView .custom-product-option small {
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#articleView .article-preview .article-document p {
  overflow-wrap: break-word;
}

/* 20260427b: precise article panel repair
   - product dropdown is pinned to the product input width
   - prompt preview restores full code-editor style
   - article left/right panels scroll independently on desktop */
@media (min-width: 1081px) {
  #articleView.view-tool:not(.is-hidden) {
    height: calc(100vh - 150px) !important;
    min-height: 680px !important;
    overflow: hidden !important;
  }

  #articleView > .app-shell {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #articleView .sidebar,
  #articleView .canvas {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
  }

  #articleView .sidebar {
    overflow-y: auto !important;
    overflow-x: visible !important;
    padding-right: 28px !important;
  }

  #articleView .canvas {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 24px !important;
  }

  #articleView #tab-prompt:not([hidden]),
  #articleView #tab-prompt .prompt-editor {
    min-height: calc(100vh - 280px) !important;
  }

  #articleView #promptOutput {
    min-height: calc(100vh - 365px) !important;
    height: calc(100vh - 365px) !important;
    max-height: none !important;
    overflow: auto !important;
  }
}

#articleView .product-picker-field {
  position: relative !important;
  overflow: visible !important;
  z-index: 650 !important;
}

#articleView .product-picker-field .input-with-select {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 56px !important;
  width: 100% !important;
  overflow: visible !important;
  isolation: isolate !important;
}

#articleView .product-picker-field .input-with-select > input {
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

#articleView .product-picker-field .custom-product-select {
  position: static !important;
  min-width: 56px !important;
}

#articleView .product-picker-field .custom-product-toggle {
  width: 56px !important;
  min-width: 56px !important;
}

#articleView .product-picker-field .custom-product-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  padding: 14px !important;
  box-sizing: border-box !important;
  z-index: 1200 !important;
  overflow: hidden !important;
}

#articleView .product-picker-field .custom-product-list {
  width: 100% !important;
  max-height: min(320px, 42vh) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  padding-right: 6px !important;
}

#articleView .product-picker-field .custom-product-option {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  align-items: start !important;
  gap: 6px !important;
  padding: 14px 16px !important;
}

#articleView .product-picker-field .custom-product-option span,
#articleView .product-picker-field .custom-product-option small {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.45 !important;
}

#articleView #tab-prompt .prompt-editor {
  border: 1px solid #bae6fd !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: 18px !important;
  background: #fff !important;
  overflow: hidden !important;
}

#articleView #promptOutput {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  resize: none !important;
  background: #f8fafc !important;
  color: #111827 !important;
  white-space: pre-wrap !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace !important;
  line-height: 1.78 !important;
}

/* 20260427c: no-bom redeploy marker */

/* 20260427d: image regex redeploy marker */

/* 20260428a: article workspace final repair
   - keep article input/output as independent scroll islands
   - keep product picker menu pinned inside the input card
   - prevent prompt preview and product options from being clipped */
@media (min-width: 1081px) {
  body:has(#articleView.view-tool:not(.is-hidden)) {
    overflow: hidden !important;
  }

  #articleView.view-tool:not(.is-hidden) {
    height: calc(100vh - 146px) !important;
    max-height: calc(100vh - 146px) !important;
    min-height: 640px !important;
    overflow: hidden !important;
  }

  #articleView.view-tool:not(.is-hidden) > .app-shell {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
  }

  #articleView.view-tool:not(.is-hidden) .sidebar,
  #articleView.view-tool:not(.is-hidden) .canvas {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #articleView.view-tool:not(.is-hidden) .sidebar {
    overflow-x: visible !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas {
    overflow-x: hidden !important;
  }
}

#articleView .product-picker-field,
#articleView .product-card-form,
#articleView .timeline-content,
#articleView .workflow-step {
  overflow: visible !important;
}

#articleView .product-picker-field .input-with-select {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 58px !important;
  overflow: visible !important;
  width: 100% !important;
}

#articleView .product-picker-field .custom-product-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  transform: none !important;
  box-sizing: border-box !important;
  z-index: 2000 !important;
}

#articleView .product-picker-field .custom-product-option {
  padding: 14px 16px !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

#articleView .product-picker-field .custom-product-option span,
#articleView .product-picker-field .custom-product-option small {
  text-align: left !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

#articleView #tab-prompt .prompt-editor,
#articleView #tab-prompt .code-shell {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#articleView #promptOutput {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

/* 2026-04-29: keep article workflow card titles fully readable */
#articleView .select-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#articleView .select-card {
  align-items: flex-start;
  min-height: 96px;
  height: auto;
  padding: 18px 20px;
  overflow: visible;
}

#articleView .select-card strong,
#articleView .select-card span {
  display: block;
  max-width: 100%;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

#articleView .select-card strong {
  margin-bottom: 6px;
  font-size: 15px;
}

#articleView .select-card span {
  font-size: 13px;
}

@media (max-width: 760px) {
  #articleView .select-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Integrated daily SEO topic cards on the Home Portal */
#homeView.view-home:not(.is-hidden) {
  display: block !important;
  overflow-y: auto !important;
  min-height: auto !important;
}

#homeView .home-portal {
  width: min(1180px, 100%) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: clamp(36px, 5vw, 64px) 24px 120px !important;
}

.home-daily-topics-panel {
  width: min(100%, 1100px);
  margin: 34px auto 0;
  padding: 28px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px -44px rgba(15, 23, 42, 0.32), 0 18px 42px -34px rgba(14, 165, 233, 0.28);
  text-align: left;
}

.home-daily-topics-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f3f4f6;
}

.home-daily-topics-header h2 {
  margin: 6px 0 8px;
  color: #0f172a;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  letter-spacing: -0.04em;
}

.home-daily-topics-header p:not(.eyebrow) {
  margin: 0;
  max-width: 680px;
  color: #64748b;
  line-height: 1.75;
}

.home-daily-topic-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.home-daily-topic-status {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #bae6fd;
  border-radius: 16px;
  background: #ecfeff;
  color: #334155;
  font-weight: 800;
}

.home-daily-topic-status[data-kind="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.home-daily-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.home-daily-topic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 40px -34px rgba(15, 23, 42, 0.45);
  transition: all 0.25s ease;
}

.home-daily-topic-card:hover {
  transform: translateY(-3px);
  border-color: #0891b2;
  box-shadow: 0 24px 50px -30px rgba(14, 165, 233, 0.45), 0 18px 40px -38px rgba(15, 23, 42, 0.38);
}

.home-daily-topic-index {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: #ecfeff;
  color: #0f766e;
  font-weight: 900;
}

.home-daily-topic-source {
  max-width: calc(100% - 48px);
  overflow: hidden;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-daily-topic-card strong {
  display: block;
  padding-right: 42px;
  color: #111827;
  font-size: 1.12rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.home-daily-topic-card small {
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.65;
}

.home-daily-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.home-daily-topic-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}

.home-daily-topic-card ul {
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.5;
}

.home-daily-topic-cta {
  margin-top: auto;
  color: #0f766e;
  font-weight: 900;
}

.home-daily-topic-cta b {
  display: inline-block;
  transition: transform 0.25s ease;
}

.home-daily-topic-card:hover .home-daily-topic-cta b {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  #homeView .home-portal {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .home-daily-topics-panel {
    padding: 22px;
  }

  .home-daily-topics-header {
    flex-direction: column;
  }

  .home-daily-topic-actions {
    justify-content: flex-start;
  }

  .home-daily-topic-grid {
    grid-template-columns: 1fr;
  }
}

/* 20260507f: SEO topic preset workspace integration */
.home-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 32px !important;
  max-width: 1100px !important;
  margin: 48px auto 0 !important;
}

.home-tool-card-topics {
  grid-column: 1 / -1;
  width: min(560px, 100%);
  justify-self: center;
}

#homeView .home-access-panel {
  margin-top: 32px !important;
}

#topicsView.view-topics:not(.is-hidden) {
  display: block !important;
  min-height: calc(100vh - 112px) !important;
  overflow: visible !important;
}

#topicsView .tool-heading {
  width: min(1280px, calc(100vw - 48px));
  margin: 0 auto 18px;
}

.topics-shell {
  width: min(1280px, calc(100vw - 48px));
  min-height: calc(100vh - 210px);
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.topics-list-panel,
.topics-detail-panel {
  min-width: 0;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #eef2f7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px -42px rgba(15, 23, 42, 0.35), 0 12px 30px -28px rgba(14, 165, 233, 0.28);
  scrollbar-width: thin;
}

.topics-list-panel {
  padding: 26px 22px;
}

.topics-detail-panel {
  padding: 32px;
}

.topics-panel-header h2,
.topics-detail-content h2,
.topics-detail-empty h2 {
  margin: 8px 0 10px;
  color: #0f172a;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.topics-panel-header p:not(.eyebrow),
.topics-detail-empty p:not(.eyebrow) {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.topics-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 16px;
}

.topic-filter,
.topic-date-field,
.topics-refresh-button {
  width: 100%;
}

.topic-filter {
  min-height: 40px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #475569;
  font-weight: 800;
}

.topic-filter.is-active {
  border-color: #38bdf8;
  background: #ecfeff;
  color: #2563eb;
}

.topic-date-field {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.topic-date-field input {
  min-height: 40px;
}

.topics-refresh-button {
  grid-column: 1 / -1;
}

.topics-title-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.topics-title-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  width: 100%;
  min-height: 104px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  text-align: left;
  box-shadow: 0 10px 28px -26px rgba(15, 23, 42, 0.4);
}

.topics-title-item:hover,
.topics-title-item.is-selected {
  transform: translateY(-2px);
  border-color: #0891b2;
  background: #ecfeff;
  box-shadow: 0 18px 42px -30px rgba(14, 165, 233, 0.45);
}

.topics-title-index {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #ecfeff;
  color: #0f766e;
  font-weight: 900;
}

.topics-title-source {
  overflow: hidden;
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.topics-title-item strong {
  min-width: 0;
  color: #111827;
  font-size: 0.98rem;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.topics-title-item small {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.topics-detail-empty {
  min-height: 420px;
  display: grid;
  place-content: center;
  text-align: center;
}

.topics-detail-topline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.topics-detail-topline > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ecfeff;
  color: #0f766e;
  font-weight: 900;
}

.topics-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 22px;
}

.topics-detail-actions .btn {
  width: auto;
  min-width: 148px;
}

.topics-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.topic-info-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: #f8fafc;
}

.topic-info-card span {
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topic-info-card strong {
  min-width: 0;
  color: #0f172a;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.topic-info-card .topic-product-url {
  display: inline-block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  overflow-wrap: anywhere;
}

.topics-detail-section {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  background: #fff;
}

.topics-detail-section h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 1.06rem;
}

.topics-detail-section p,
.topics-detail-section li {
  color: #475569;
  line-height: 1.75;
}

.topics-detail-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 1100px) {
  .topics-shell {
    grid-template-columns: 1fr;
    width: min(860px, calc(100vw - 32px));
  }

  .topics-list-panel,
  .topics-detail-panel {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .home-card-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .home-tool-card-topics {
    grid-column: auto;
    width: 100%;
  }

  #topicsView .tool-heading,
  .topics-shell {
    width: calc(100vw - 24px);
  }

  .topics-list-panel,
  .topics-detail-panel {
    padding: 20px 16px;
    border-radius: 20px;
  }

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

/* 20260508b: homepage four-workbench layout with equal card heights */
.home-card-grid.home-card-grid-workbench {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(280px, 1fr) !important;
  gap: 32px !important;
  max-width: 1100px !important;
  margin: 48px auto 0 !important;
  align-items: stretch !important;
}

.home-card-grid-workbench .home-tool-card,
.home-card-grid-workbench .home-access-panel.home-tool-card {
  width: 100% !important;
  min-height: 280px !important;
  margin: 0 !important;
  padding: 40px !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 18px 40px -32px rgba(15, 23, 42, 0.35) !important;
  height: 100% !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
}

.home-card-grid-workbench .home-tool-card-topics {
  grid-column: auto !important;
  justify-self: stretch !important;
  width: 100% !important;
}

.home-card-grid-workbench .home-login-card {
  display: grid !important;
  justify-items: start !important;
  align-content: start !important;
  gap: 14px !important;
  max-width: none !important;
  text-align: left !important;
  height: 100% !important;
}

.home-card-grid-workbench .home-login-card:hover {
  transform: translateY(-4px);
  border-color: #bae6fd !important;
  box-shadow: 0 22px 42px -18px rgba(14, 165, 233, 0.24), 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

.home-card-grid-workbench .home-admin-note {
  display: grid !important;
  gap: 8px !important;
  width: 100% !important;
}

.home-card-grid-workbench .home-admin-note h2 {
  margin: 0 !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.04em !important;
}

.home-card-grid-workbench .home-admin-note p {
  margin: 0 !important;
  color: #6b7280 !important;
  line-height: 1.65 !important;
}

.home-card-grid-workbench .home-admin-note p strong {
  color: #111827 !important;
}

.home-card-grid-workbench .home-auth-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  margin-top: auto !important;
}

.home-card-grid-workbench .home-auth-actions .btn {
  width: auto !important;
  min-width: 138px !important;
}

#homeView .home-card-grid-workbench + .home-access-panel {
  display: none !important;
}

@media (max-width: 900px) {
  .home-card-grid.home-card-grid-workbench {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    max-width: 620px !important;
    gap: 20px !important;
  }

  .home-card-grid-workbench .home-tool-card,
  .home-card-grid-workbench .home-access-panel.home-tool-card {
    min-height: 230px !important;
    padding: 30px !important;
  }
}

/* 20260508c: hard-lock home workbench cards to the same visual height on desktop. */
.home-card-grid.home-card-grid-workbench {
  grid-auto-rows: 300px !important;
}

.home-card-grid-workbench > .home-tool-card,
.home-card-grid-workbench > .home-access-panel.home-tool-card,
.home-card-grid-workbench > .home-login-card {
  min-height: 300px !important;
  height: 300px !important;
  max-height: 300px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

.home-card-grid-workbench > .home-login-card .home-auth-actions {
  margin-top: auto !important;
}

/* 20260508c: keep the article multi-product add/remove actions from overlapping labels. */
#articleView .step-heading-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  column-gap: 14px !important;
}

#articleView #addProductRow {
  width: auto !important;
  min-width: 116px !important;
  max-width: 140px !important;
  justify-self: end !important;
  margin-left: auto !important;
  white-space: nowrap !important;
  position: static !important;
  flex: 0 0 auto !important;
}

#articleView .product-card-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
}

#articleView .product-card-remove {
  justify-self: end !important;
  position: static !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

#articleView .product-card-title,
#articleView .product-card-title span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  .home-card-grid.home-card-grid-workbench {
    grid-auto-rows: auto !important;
  }

  .home-card-grid-workbench > .home-tool-card,
  .home-card-grid-workbench > .home-access-panel.home-tool-card,
  .home-card-grid-workbench > .home-login-card {
    min-height: 230px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #articleView .step-heading-row {
    grid-template-columns: 1fr !important;
  }

  #articleView #addProductRow {
    justify-self: stretch !important;
    max-width: none !important;
    width: 100% !important;
  }
}

/* 20260508d: remove legacy access-panel drift and lock the four homepage cards as one grid system. */
#homeView .home-card-grid.home-card-grid-workbench {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 300px !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  gap: 32px !important;
}

#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  width: 100% !important;
  height: 300px !important;
  min-height: 300px !important;
  max-height: 300px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  padding: 40px !important;
  overflow: hidden !important;
}

#homeView .home-card-grid-workbench > button.home-tool-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

#homeView .home-card-grid-workbench > .home-login-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 14px !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-actions {
  margin-top: auto !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-tool-icon {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  border-radius: 18px !important;
  display: inline-grid !important;
  place-items: center !important;
}

@media (max-width: 900px) {
  #homeView .home-card-grid.home-card-grid-workbench {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 20px !important;
  }

  #homeView .home-card-grid-workbench > .home-tool-card,
  #homeView .home-card-grid-workbench > .home-login-card {
    height: auto !important;
    min-height: 230px !important;
    max-height: none !important;
    padding: 30px !important;
    overflow: visible !important;
  }
}

/* 20260527c: final cascade lock for home card wash colors */
#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
}

#homeView .home-card-grid-workbench > .home-tool-card > *,
#homeView .home-card-grid-workbench > .home-login-card > * {
  position: relative !important;
  z-index: 2 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card::before,
#homeView .home-card-grid-workbench > .home-login-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1 !important;
  height: 8px !important;
  opacity: 0.96 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card::after,
#homeView .home-card-grid-workbench > .home-login-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: 0.92 !important;
  transition: opacity 0.24s ease, transform 0.24s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover::before,
#homeView .home-card-grid-workbench > .home-login-card:hover::before {
  height: 11px !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover::after,
#homeView .home-card-grid-workbench > .home-login-card:hover::after {
  opacity: 1 !important;
  transform: translateY(2px) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) {
  background: linear-gradient(150deg, #f4f7fb 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::before {
  background: linear-gradient(90deg, #475569 0%, #7dd3fc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::after {
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.16) 0%, rgba(125, 211, 252, 0.09) 24%, rgba(255, 255, 255, 0) 62%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) .home-tool-icon {
  background: #eef4fb !important;
  color: #334155 !important;
  box-shadow: inset 0 0 0 1px #cbd5e1 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2) {
  background: linear-gradient(150deg, #f5faff 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::before {
  background: linear-gradient(90deg, #3b82f6 0%, #bae6fd 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::after {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.14) 0%, rgba(186, 230, 253, 0.1) 26%, rgba(255, 255, 255, 0) 64%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) {
  background: linear-gradient(150deg, #f2fbf8 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::before {
  background: linear-gradient(90deg, #14b8a6 0%, #a7f3d0 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::after {
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.15) 0%, rgba(167, 243, 208, 0.1) 26%, rgba(255, 255, 255, 0) 64%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card {
  background: linear-gradient(150deg, #f3fbf4 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card::before {
  background: linear-gradient(90deg, #22c55e 0%, #bbf7d0 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card::after {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.15) 0%, rgba(187, 247, 208, 0.11) 26%, rgba(255, 255, 255, 0) 64%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-tool-icon {
  background: #f0fdf4 !important;
  color: #15803d !important;
  box-shadow: inset 0 0 0 1px #bbf7d0 !important;
}

/* 20260701 final MingXi visual override: keep this block at the end. */
body[data-current-view="home"] {
  background:
    radial-gradient(circle at 12% 12%, rgba(45, 212, 191, 0.18), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(132, 204, 22, 0.12), transparent 26%),
    linear-gradient(180deg, #f5f9fc 0%, #ffffff 64%, #f8fafc 100%) !important;
}

body[data-current-view="home"] .global-header,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-header {
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.94) 0%, rgba(255, 255, 255, 0.98) 46%, rgba(239, 246, 255, 0.94) 100%) !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  box-shadow: 0 22px 56px -38px rgba(15, 23, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body[data-current-view="home"] .global-logo,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-logo {
  background: linear-gradient(135deg, #0f766e 0%, #2563eb 54%, #0b1220 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 18px 36px -20px rgba(37, 99, 235, 0.68) !important;
}

body[data-current-view="home"] .global-welcome-copy,
#homeView .eyebrow,
body[data-current-view="home"] .home-card-cta,
body[data-current-view="home"] .global-account {
  color: #0f766e !important;
}

#homeView .home-hero h1 {
  background: linear-gradient(135deg, #0b1220 0%, #0f766e 44%, #2563eb 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* 20260702: generated article document must use MingXi cool typography only. */
#articleView #articlePreview.article-preview,
#articleView #articlePreview.article-preview.prose,
#articleView #articlePreview.article-preview.prose-mingxi {
  color: #1f2937 !important;
}

#articleView #articlePreview .article-document h1,
#articleView #articlePreview.prose h1 {
  color: #0f766e !important;
  border-bottom-color: #dbeafe !important;
}

#articleView #articlePreview .article-document h2,
#articleView #articlePreview.prose h2 {
  color: #2563eb !important;
  border-top-color: #e2e8f0 !important;
}

#articleView #articlePreview .article-document h3,
#articleView #articlePreview.prose h3 {
  color: #0f766e !important;
}

#articleView #articlePreview .article-document a,
#articleView #articlePreview.prose a {
  color: #0f766e !important;
  border-bottom-color: rgba(14, 165, 233, 0.32) !important;
}

#articleView #articlePreview .article-document strong,
#articleView #articlePreview.prose strong {
  color: #0b1220 !important;
}

#articleView #articlePreview .article-document blockquote,
#articleView #articlePreview.prose blockquote {
  border-left-color: #0f766e !important;
  background: #ecfeff !important;
}

/* 20260702: solid output header mask, prevents scrolled article text from showing behind sticky controls. */
@media (min-width: 1081px) {
  #articleView.view-tool:not(.is-hidden) .canvas {
    padding: 0 24px 24px !important;
    background: #f8fafc !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar {
    top: 0 !important;
    z-index: 520 !important;
    min-height: 104px !important;
    margin: 0 -24px !important;
    padding: 24px 24px 16px !important;
    background: #f8fafc !important;
    overflow: visible !important;
    isolation: isolate !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 -8px -2px -8px !important;
    background: #f8fafc !important;
    box-shadow: 0 18px 34px -32px rgba(15, 23, 42, 0.45) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar > * {
    position: relative !important;
    z-index: 1 !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar {
    z-index: 500 !important;
    background: #ffffff !important;
    overflow: visible !important;
    isolation: isolate !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar::after,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar::after {
    content: "" !important;
    position: absolute !important;
    inset: -2px 0 -20px 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar > *,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar > * {
    position: relative !important;
    z-index: 1 !important;
  }
}

/* 20260827 publisher interaction and layout guardrails */
body[data-current-view="home"] {
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body[data-current-view="home"] .studio-app,
body[data-current-view="home"] .view-shell,
body[data-current-view="home"] #homeView,
body[data-current-view="home"] #homeView .home-portal {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-gutter: auto !important;
}

body[data-current-view="publisher"] #publisherView.publisher-view-shell:not(.is-hidden),
body[data-current-view="publisher"] .publisher-screen.is-active {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  align-self: stretch !important;
}

body[data-current-view="publisher"] #publisherProcessingScreen > .publisher-screen-nav,
body[data-current-view="publisher"] #publisherProcessingScreen > .publisher-progress-stage,
body[data-current-view="publisher"] #publisherGenerateScreen > .publisher-screen-nav,
body[data-current-view="publisher"] #publisherGenerateScreen > .publisher-focus-panel {
  width: min(100%, 1120px) !important;
  max-width: 1120px !important;
  margin-inline: auto !important;
}

.publisher-check-gemini {
  margin-left: auto;
  white-space: nowrap;
}

.publisher-cover-error-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
}

.publisher-cover-preview[data-kind="error"] .publisher-cover-placeholder {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 18px 20px;
}

.publisher-cover-preview[data-kind="error"] .publisher-cover-placeholder > strong {
  flex: 1 1 520px;
  min-width: 0;
}

body[data-current-view="publisher"] #publisherProcessingScreen > .publisher-progress-stage,
body[data-current-view="publisher"] #publisherGenerateScreen > .publisher-focus-panel {
  min-height: 390px !important;
}

.publisher-topic-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.publisher-topic-card {
  height: auto;
  min-height: 0;
}

.publisher-card-slider {
  display: grid;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  isolation: isolate;
}

.publisher-card-face {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  height: auto;
  overflow: visible;
  border-radius: inherit;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

.publisher-card-face-front {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.publisher-card-face-front > button,
.publisher-card-face-back > button { min-height: 100%; }

.publisher-card-face-back {
  padding: 0;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  overflow: visible;
  background: #fff;
  visibility: hidden;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease, visibility 0s linear 420ms;
}

.publisher-topic-card.is-showing-translation .publisher-card-face-front,
.publisher-version-card.is-showing-translation .publisher-card-face-front {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease, visibility 0s linear 420ms;
}

.publisher-topic-card.is-showing-translation .publisher-card-face-back,
.publisher-version-card.is-showing-translation .publisher-card-face-back {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.publisher-translation-copy { display: grid; gap: 9px; }
.publisher-translation-copy > strong { color: #0f766e; font-size: 13px; }
.publisher-translation-copy p { margin: 0; color: #455468; font-size: 12px; line-height: 1.6; }
.publisher-topic-select { overflow: visible; }
.publisher-topic-copy { align-content: start; min-width: 0; overflow: visible; }

.publisher-topic-copy h3 {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.publisher-topic-detail { min-height: 0; padding: 8px 10px; }
.publisher-topic-detail > span {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.publisher-version-card { height: auto; min-height: 0; }
.publisher-version-select { overflow: visible; }
.publisher-version-copy { align-content: start; overflow: visible; }
.publisher-version-row span {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.publisher-review-version-pane .publisher-link-preview {
  flex: 0 0 auto;
  min-height: 170px;
  max-height: 240px;
  overflow: auto;
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
  background: #f8fafc;
}

.publisher-review-version-pane .publisher-link-preview > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.publisher-review-version-pane .publisher-link-preview span {
  display: grid;
  grid-template-columns: auto 12px minmax(0, 1fr);
  border-radius: 8px;
}

.publisher-review-title {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
}

.publisher-review-title .publisher-secondary-button {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .publisher-topic-list { grid-template-columns: minmax(0, 1fr); }
  .publisher-review-title { grid-template-columns: 42px minmax(0, 1fr); }
  .publisher-review-title .publisher-secondary-button { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .publisher-card-face { transition: none; }
}

/* Publisher-only shortcuts remain reachable after a long article review. */
.publisher-floating-actions {
  position: fixed;
  right: clamp(18px, 3vw, 44px);
  bottom: clamp(22px, 4vh, 42px);
  z-index: 90;
  display: grid;
  gap: 10px;
  width: 132px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.publisher-floating-action {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.publisher-floating-action:hover {
  transform: translateY(-1px);
  border-color: #9fb8b4;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.publisher-floating-action:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 2px;
}

.publisher-floating-action-primary {
  border-color: #0f766e;
  background: linear-gradient(135deg, #0f766e, #0b8a7d);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.22);
}

.publisher-floating-action-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 8px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 15px;
  line-height: 1;
}

.publisher-floating-action-primary .publisher-floating-action-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

@media (max-width: 760px) {
  .publisher-floating-actions {
    right: 12px;
    bottom: 14px;
    width: auto;
    grid-auto-flow: column;
  }

  .publisher-floating-action {
    min-height: 42px;
    padding: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .publisher-floating-action { transition: none; }
}

/* 20260702 eof: lock output workspace controls while the right panel scrolls. */
@media (min-width: 1081px) {
  #articleView.view-tool:not(.is-hidden) .canvas {
    --output-toolbar-offset: 104px;
    --output-sticky-bg: #ffffff;
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-gutter: stable both-edges;
    scroll-padding-top: 196px;
    background: #f8fafc !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 220 !important;
    margin: -24px -24px 0 !important;
    padding: 24px 24px 16px !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.78) !important;
    background: #f8fafc !important;
    backdrop-filter: none !important;
    box-shadow: 0 18px 34px -34px rgba(15, 23, 42, 0.46) !important;
    isolation: isolate !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar::after {
    content: "" !important;
    position: absolute !important;
    right: 0 !important;
    bottom: -1px !important;
    left: 0 !important;
    height: 2px !important;
    background: #f8fafc !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  #articleView.view-tool:not(.is-hidden) .output-stage,
  #articleView.view-tool:not(.is-hidden) .tab-content,
  #articleView.view-tool:not(.is-hidden) #tab-article,
  #articleView.view-tool:not(.is-hidden) #tab-prompt,
  #articleView.view-tool:not(.is-hidden) #tab-tdk,
  #articleView.view-tool:not(.is-hidden) .article-card,
  #articleView.view-tool:not(.is-hidden) .metadata-card,
  #articleView.view-tool:not(.is-hidden) .editor-card {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  #articleView.view-tool:not(.is-hidden) .output-stage {
    padding-top: 0 !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-card,
  #articleView.view-tool:not(.is-hidden) .metadata-card,
  #articleView.view-tool:not(.is-hidden) .editor-card {
    min-height: calc(100vh - 286px) !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar {
    position: sticky !important;
    top: calc(var(--output-toolbar-offset) - 1px) !important;
    z-index: 210 !important;
    margin-top: 0 !important;
    background: var(--output-sticky-bg) !important;
    backdrop-filter: none !important;
    box-shadow: 0 14px 28px -28px rgba(15, 23, 42, 0.38) !important;
    isolation: isolate !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar::before,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar::before {
    content: "" !important;
    position: absolute !important;
    top: -18px !important;
    right: 0 !important;
    left: 0 !important;
    height: 18px !important;
    background: var(--output-sticky-bg) !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar {
    align-items: stretch !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-preview,
  #articleView.view-tool:not(.is-hidden) .metadata-panel {
    flex: none !important;
    overflow: visible !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-preview {
    min-height: calc(100vh - 390px) !important;
  }

  #articleView.view-tool:not(.is-hidden) .metadata-panel {
    margin-top: 16px !important;
  }
}

.business-switch {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: min(780px, calc(100% - 32px)) !important;
  margin: 28px auto 34px !important;
  padding: 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 26px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(240, 253, 250, 0.78)),
    radial-gradient(circle at 12% 8%, rgba(14, 165, 233, 0.12), transparent 34%) !important;
  box-shadow: 0 18px 44px -36px rgba(15, 23, 42, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.business-switch-button {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 96px !important;
  padding: 18px !important;
  border: 1px solid transparent !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.62) !important;
  color: #475569 !important;
  cursor: pointer !important;
  text-align: left !important;
}

.business-switch-button.is-active {
  border-color: rgba(15, 118, 110, 0.32) !important;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(239, 246, 255, 0.98)) !important;
  color: #0b1220 !important;
  box-shadow: 0 18px 42px -34px rgba(37, 99, 235, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

.business-mark {
  display: grid !important;
  place-items: center !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #0f766e, #2563eb) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
  box-shadow: 0 18px 30px -22px rgba(37, 99, 235, 0.72) !important;
}

.business-switch-button strong {
  display: block !important;
  color: #0b1220 !important;
  font-size: 1.05rem !important;
  letter-spacing: -0.02em !important;
}

.business-switch-button small {
  display: block !important;
  margin-top: 6px !important;
  color: #64748b !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
}

.business-switch-button[data-business="rackmountai"].is-active {
  border-color: rgba(37, 99, 235, 0.32) !important;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(240, 249, 255, 0.98)) !important;
}

.business-switch-button[data-business="rackmountai"] .business-mark {
  background: linear-gradient(135deg, #1d4ed8, #06b6d4) !important;
}

#homeView .home-card-grid.home-card-grid-workbench {
  margin-top: 0 !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::before {
  background: linear-gradient(90deg, #1d4ed8, #67e8f9) !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::before {
  background: linear-gradient(90deg, #0891b2, #a5f3fc) !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::before {
  background: linear-gradient(90deg, #475569, #cbd5e1) !important;
}

@media (max-width: 760px) {
  .business-switch {
    grid-template-columns: 1fr !important;
    width: min(100%, calc(100% - 24px)) !important;
    margin-top: 22px !important;
  }
}

/* 20260701: MingXi Studio parent-brand shell and business switch */
body[data-current-view="home"] {
  background:
    radial-gradient(circle at 12% 12%, rgba(45, 212, 191, 0.18), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(132, 204, 22, 0.12), transparent 26%),
    linear-gradient(180deg, #f5f9fc 0%, #ffffff 64%, #f8fafc 100%) !important;
}

body[data-current-view="home"] .global-header,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-header {
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.94) 0%, rgba(255, 255, 255, 0.98) 46%, rgba(239, 246, 255, 0.94) 100%) !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  box-shadow: 0 22px 56px -38px rgba(15, 23, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body[data-current-view="home"] .global-logo,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-logo {
  background: linear-gradient(135deg, #0f766e 0%, #2563eb 54%, #0b1220 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 18px 36px -20px rgba(37, 99, 235, 0.68) !important;
}

body[data-current-view="home"] .global-header:hover .global-logo,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-header:hover .global-logo {
  box-shadow: 0 22px 42px -22px rgba(15, 118, 110, 0.72) !important;
}

body[data-current-view="home"] .global-welcome-copy,
#homeView .eyebrow {
  color: #0f766e !important;
}

#homeView .home-hero {
  max-width: 820px !important;
  margin-inline: auto !important;
}

#homeView .home-hero h1 {
  background: linear-gradient(135deg, #0b1220 0%, #0f766e 44%, #2563eb 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

.business-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(780px, calc(100% - 32px));
  margin: 28px auto 34px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(240, 253, 250, 0.78)),
    radial-gradient(circle at 12% 8%, rgba(14, 165, 233, 0.12), transparent 34%);
  box-shadow: 0 18px 44px -36px rgba(15, 23, 42, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.business-switch-button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  color: #475569;
  cursor: pointer;
  text-align: left;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.business-switch-button:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 36px -32px rgba(15, 23, 42, 0.6);
}

.business-switch-button.is-active {
  border-color: rgba(15, 118, 110, 0.32);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(239, 246, 255, 0.98));
  color: #0b1220;
  box-shadow: 0 18px 42px -34px rgba(37, 99, 235, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.business-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 18px 30px -22px rgba(37, 99, 235, 0.72);
}

.business-switch-button strong {
  display: block;
  color: #0b1220;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.business-switch-button small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.business-switch-button[data-business="rackmountai"].is-active {
  border-color: rgba(37, 99, 235, 0.32);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(240, 249, 255, 0.98));
}

.business-switch-button[data-business="rackmountai"] .business-mark {
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

#homeView .home-card-grid.home-card-grid-workbench {
  margin-top: 0 !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::before {
  background: linear-gradient(90deg, #1d4ed8, #67e8f9) !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) .home-tool-icon {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  box-shadow: inset 0 0 0 1px #bfdbfe !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::before {
  background: linear-gradient(90deg, #0891b2, #a5f3fc) !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(2) .home-tool-icon {
  background: #ecfeff !important;
  color: #0e7490 !important;
  box-shadow: inset 0 0 0 1px #a5f3fc !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::before {
  background: linear-gradient(90deg, #475569, #cbd5e1) !important;
}

body[data-active-business="rackmountai"] #homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) .home-tool-icon {
  background: #f8fafc !important;
  color: #334155 !important;
  box-shadow: inset 0 0 0 1px #cbd5e1 !important;
}

body[data-current-view="home"] .home-card-cta,
body[data-current-view="home"] .global-account {
  color: #0f766e !important;
}

body[data-current-view="home"] .home-tool-card:hover,
body[data-current-view="home"] .home-login-card:hover {
  border-color: rgba(15, 118, 110, 0.26) !important;
  box-shadow: 0 26px 64px -40px rgba(15, 23, 42, 0.58), 0 12px 30px -26px rgba(14, 165, 233, 0.42) !important;
}

@media (max-width: 760px) {
  .business-switch {
    grid-template-columns: 1fr;
    width: min(100%, calc(100% - 24px));
    margin-top: 22px;
  }

  .business-switch-button {
    min-height: 86px;
  }
}

/* 2026-06-15 TDK per-field copy controls */
.tdk-field-heading {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.tdk-inline-copy {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 60px !important;
  min-height: 30px !important;
  padding: 7px 14px !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
  user-select: none !important;
}

.tdk-inline-copy:hover {
  transform: translateY(-1px) !important;
  filter: saturate(1.08) !important;
}

.tdk-inline-copy:active {
  transform: translateY(0) scale(0.98) !important;
}

.tdk-copy-title,
.tdk-copy-description,
.tdk-copy-keywords,
.tdk-copy-slug {
  background: #ecfeff !important;
  border-color: #38bdf8 !important;
  color: #334155 !important;
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.12) !important;
}

.tdk-copy-alt {
  align-self: center !important;
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: #4338ca !important;
  box-shadow: 0 10px 22px rgba(67, 56, 202, 0.12) !important;
}

.tdk-smart-slugs p {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.tdk-smart-slugs code {
  max-width: 100% !important;
}

.image-description-list li {
  grid-template-columns: 32px minmax(0, 1fr) auto !important;
  align-items: center !important;
}

.image-description-copy {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

#tdkDescription,
.metadata-card .tdk-item p {
  display: block !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

@media (max-width: 760px) {
  .image-description-list li {
    grid-template-columns: 32px minmax(0, 1fr) !important;
  }

  .tdk-copy-alt {
    grid-column: 2 !important;
    justify-self: start !important;
  }
}

/* 20260527b: refined home card palettes with soft downward color wash */
#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
}

#homeView .home-card-grid-workbench > .home-tool-card > *,
#homeView .home-card-grid-workbench > .home-login-card > * {
  position: relative !important;
  z-index: 2 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card::before,
#homeView .home-card-grid-workbench > .home-login-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1 !important;
  height: 8px !important;
  opacity: 0.96 !important;
  transition: height 0.24s ease, opacity 0.24s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card::after,
#homeView .home-card-grid-workbench > .home-login-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: 0.92 !important;
  transition: opacity 0.24s ease, transform 0.24s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover::before,
#homeView .home-card-grid-workbench > .home-login-card:hover::before {
  height: 11px !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover::after,
#homeView .home-card-grid-workbench > .home-login-card:hover::after {
  opacity: 1 !important;
  transform: translateY(2px) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) {
  background: linear-gradient(150deg, #f4f7fb 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::before {
  background: linear-gradient(90deg, #475569 0%, #7dd3fc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::after {
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.16) 0%, rgba(125, 211, 252, 0.09) 24%, rgba(255, 255, 255, 0) 62%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) .home-tool-icon {
  background: #eef4fb !important;
  color: #334155 !important;
  box-shadow: inset 0 0 0 1px #cbd5e1 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2) {
  background: linear-gradient(150deg, #f5faff 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::before {
  background: linear-gradient(90deg, #3b82f6 0%, #bae6fd 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::after {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.14) 0%, rgba(186, 230, 253, 0.1) 26%, rgba(255, 255, 255, 0) 64%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2) .home-tool-icon {
  background: #eff6ff !important;
  color: #2563eb !important;
  box-shadow: inset 0 0 0 1px #bfdbfe !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) {
  background: linear-gradient(150deg, #f2fbf8 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::before {
  background: linear-gradient(90deg, #14b8a6 0%, #a7f3d0 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::after {
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.15) 0%, rgba(167, 243, 208, 0.1) 26%, rgba(255, 255, 255, 0) 64%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) .home-tool-icon {
  background: #ecfdf5 !important;
  color: #0f766e !important;
  box-shadow: inset 0 0 0 1px #a7f3d0 !important;
}

#homeView .home-card-grid-workbench > .home-login-card {
  background: linear-gradient(150deg, #f3fbf4 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card::before {
  background: linear-gradient(90deg, #22c55e 0%, #bbf7d0 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card::after {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.15) 0%, rgba(187, 247, 208, 0.11) 26%, rgba(255, 255, 255, 0) 64%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-tool-icon {
  background: #f0fdf4 !important;
  color: #15803d !important;
  box-shadow: inset 0 0 0 1px #bbf7d0 !important;
}

/* 20260527: polished home portal header + differentiated workflow cards */
body[data-current-view="home"] .global-header,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-header {
  max-width: 1400px !important;
  margin-top: 16px !important;
  padding: 16px 18px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(135deg, rgba(240, 249, 255, 0.92) 0%, rgba(255, 255, 255, 0.98) 46%, rgba(239, 246, 255, 0.9) 100%) !important;
  box-shadow: 0 18px 48px -34px rgba(15, 23, 42, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body[data-current-view="home"] .global-logo,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-logo {
  box-shadow: 0 16px 30px -18px rgba(14, 165, 233, 0.7) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

body[data-current-view="home"] .global-header:hover .global-logo,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-header:hover .global-logo {
  transform: translateY(-1px) rotate(-2deg) !important;
  box-shadow: 0 20px 34px -18px rgba(14, 165, 233, 0.82) !important;
}

#homeView .home-card-grid.home-card-grid-workbench {
  max-width: 1040px !important;
}

#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  position: relative !important;
  isolation: isolate !important;
  border-color: rgba(226, 232, 240, 0.92) !important;
  box-shadow: 0 18px 42px -34px rgba(15, 23, 42, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card::before,
#homeView .home-card-grid-workbench > .home-login-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  z-index: -1 !important;
  width: 100% !important;
  height: 6px !important;
  opacity: 0.75 !important;
  transition: height 0.25s ease, opacity 0.25s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover,
#homeView .home-card-grid-workbench > .home-login-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(251, 146, 60, 0.35) !important;
  box-shadow: 0 24px 58px -36px rgba(15, 23, 42, 0.58), 0 12px 26px -22px rgba(14, 165, 233, 0.55) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover::before,
#homeView .home-card-grid-workbench > .home-login-card:hover::before {
  height: 9px !important;
  opacity: 1 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) {
  background: linear-gradient(150deg, #f4f7fb 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::before {
  background: linear-gradient(90deg, #0891b2, #bae6fd) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) .home-tool-icon {
  background: #ecfeff !important;
  color: #0f766e !important;
  box-shadow: inset 0 0 0 1px #bae6fd !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2) {
  background: linear-gradient(150deg, #f7fbff 0%, #ffffff 52%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::before {
  background: linear-gradient(90deg, #60a5fa, #bfdbfe) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2) .home-tool-icon {
  background: #eff6ff !important;
  color: #2563eb !important;
  box-shadow: inset 0 0 0 1px #bfdbfe !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) {
  background: linear-gradient(150deg, #f4fbf8 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::before {
  background: linear-gradient(90deg, #2dd4bf, #bae6fd) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) .home-tool-icon {
  background: #ecfeff !important;
  color: #0f766e !important;
  box-shadow: inset 0 0 0 1px #a7f3d0 !important;
}

#homeView .home-card-grid-workbench > .home-login-card {
  background: linear-gradient(150deg, #f3fbf4 0%, #ffffff 54%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card::before {
  background: linear-gradient(90deg, #22c55e 0%, #bbf7d0 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-tool-icon {
  background: #f0fdf4 !important;
  color: #15803d !important;
  box-shadow: inset 0 0 0 1px #bbf7d0 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card .home-card-cta span {
  display: inline-block !important;
  transition: transform 0.22s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover .home-card-cta span {
  transform: translateX(4px) !important;
}

#homeView .home-card-grid-workbench > .home-login-card > small {
  max-width: 500px !important;
}

@media (max-width: 900px) {
  body[data-current-view="home"] .global-header,
  .studio-app:not(:has(.view-tool:not(.is-hidden))) .global-header {
    margin-top: 10px !important;
    border-radius: 20px !important;
  }
}

/* 20260508e: normalize the account card internals with the other three workflow cards. */
#homeView .home-card-grid-workbench > .home-login-card {
  gap: 16px !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-admin-note {
  display: grid !important;
  gap: 10px !important;
  width: 100% !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-admin-note .eyebrow {
  display: none !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-admin-note h2 {
  display: flex !important;
  align-items: baseline !important;
  gap: 12px !important;
  margin: 0 !important;
  color: #111827 !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.03em !important;
  white-space: nowrap !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-admin-inline {
  display: inline-block !important;
  color: #111827 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-admin-note p {
  margin: 0 !important;
  max-width: 430px !important;
  color: #6b7280 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-actions {
  margin-top: 2px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-actions .btn {
  width: auto !important;
  min-width: 128px !important;
  height: 42px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  #homeView .home-card-grid-workbench > .home-login-card .home-admin-note h2 {
    flex-wrap: wrap !important;
    white-space: normal !important;
  }
}

/* 20260508f: force the account card title/admin label to stay on one line on desktop. */
#homeView .home-card-grid-workbench > .home-login-card .home-admin-note h2 {
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-admin-note h2 .home-admin-inline {
  display: inline-flex !important;
  width: auto !important;
  white-space: nowrap !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

@media (max-width: 720px) {
  #homeView .home-card-grid-workbench > .home-login-card .home-admin-note h2 {
    flex-wrap: wrap !important;
    white-space: normal !important;
  }
}

/* 20260508g: final homepage card normalization.
   Keep the four workbench entries visually identical and prevent the audit button from
   drifting outside the account card. */
#homeView .home-card-grid.home-card-grid-workbench {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 320px !important;
  gap: 32px !important;
  align-items: stretch !important;
  justify-items: stretch !important;
}

#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: 320px !important;
  min-height: 320px !important;
  max-height: 320px !important;
  margin: 0 !important;
  padding: 40px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-align: left !important;
}

#homeView .home-card-grid-workbench > .home-tool-card .home-tool-icon,
#homeView .home-card-grid-workbench > .home-login-card .home-tool-icon {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  margin: 0 0 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 18px !important;
}

#homeView .home-card-grid-workbench > .home-tool-card > strong,
#homeView .home-card-grid-workbench > .home-login-card > strong {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 0 14px !important;
  color: #111827 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.03em !important;
  text-align: left !important;
  white-space: normal !important;
}

#homeView .home-card-grid-workbench > .home-login-card > strong .home-admin-inline {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  color: #111827 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

#homeView .home-card-grid-workbench > .home-login-card > strong {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

#homeView .home-card-grid-workbench > .home-tool-card > small,
#homeView .home-card-grid-workbench > .home-login-card > small {
  display: block !important;
  width: 100% !important;
  max-width: 460px !important;
  margin: 0 !important;
  color: #6b7280 !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.65 !important;
  text-align: left !important;
}

#homeView .home-card-grid-workbench > .home-tool-card .home-card-cta,
#homeView .home-card-grid-workbench > .home-login-card .home-auth-actions {
  margin-top: auto !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-entry,
#homeView .home-card-grid-workbench > .home-login-card .home-review-entry {
  appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #0f766e !important;
  cursor: pointer !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-decoration: none !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-entry span,
#homeView .home-card-grid-workbench > .home-login-card .home-review-entry span {
  display: inline-block !important;
  transition: transform 0.22s ease !important;
}

#homeView .home-card-grid-workbench > .home-login-card:hover .home-auth-entry span,
#homeView .home-card-grid-workbench > .home-login-card .home-auth-entry:hover span,
#homeView .home-card-grid-workbench > .home-login-card:hover .home-review-entry span,
#homeView .home-card-grid-workbench > .home-login-card .home-review-entry:hover span {
  transform: translateX(4px) !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  overflow: visible !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-actions .btn {
  width: auto !important;
  min-width: 132px !important;
  max-width: 220px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-auth-entry[disabled] {
  cursor: default !important;
  opacity: 0.72 !important;
  pointer-events: none !important;
}

/* Keep the disabled account notice on the same CTA baseline as the other home cards. */
#homeView .home-card-grid-workbench > .home-login-card .home-login-status {
  margin-top: auto !important;
  pointer-events: none !important;
}

/* JingleMining-only evidence publisher. RackMountAI keeps its existing fourth card. */
body[data-active-business="jinglemining"] [data-business-only="rackmountai"],
body[data-active-business="rackmountai"] [data-business-only="jinglemining"] {
  display: none !important;
}

#homeView .home-card-grid-workbench > .home-publisher-card {
  background: linear-gradient(150deg, #fff7ed 0%, #ffffff 58%, #f8fafc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-publisher-card::before {
  background: #f28c28 !important;
}

#homeView .home-card-grid-workbench > .home-publisher-card .home-tool-icon {
  background: #fff7ed !important;
  color: #c65f00 !important;
  box-shadow: inset 0 0 0 1px #fed7aa !important;
}

.publisher-view-shell {
  --publisher-accent: #0f766e;
  --publisher-action: #c65f00;
  --publisher-line: #d9e1e8;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 48px) 64px;
  color: #172033;
}

.publisher-console-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.publisher-console-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.publisher-console-title h1 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.publisher-console-title p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.publisher-runtime-status {
  display: grid;
  grid-template-columns: 12px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-bottom: 22px;
  padding: 10px 14px;
  border: 1px solid #d9e1e8;
  border-radius: 12px;
  background: #ffffff;
  color: #475569;
}

.publisher-runtime-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.publisher-runtime-label { color: #64748b; font-size: 12px; font-weight: 800; }
.publisher-runtime-status strong { min-width: 0; color: #263448; font-size: 13px; font-weight: 650; }
.publisher-runtime-status time { color: #8490a2; font-size: 11px; font-variant-numeric: tabular-nums; }
.publisher-runtime-status[data-kind="working"] .publisher-runtime-indicator { border: 2px solid #0f766e; border-top-color: transparent; background: transparent; animation: publisher-spin 900ms linear infinite; }
.publisher-runtime-status[data-kind="success"] .publisher-runtime-indicator { background: #16a34a; }
.publisher-runtime-status[data-kind="error"] .publisher-runtime-indicator { background: #dc2626; }
.publisher-runtime-status[data-kind="paused"] .publisher-runtime-indicator { background: #d97706; }

.publisher-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.6fr);
  gap: 24px;
  align-items: start;
}

.publisher-evidence-panel,
.publisher-topic-stage,
.publisher-config-stage,
.publisher-progress-stage,
.publisher-result-stage,
.publisher-focus-panel,
.publisher-review-stage {
  border: 1px solid var(--publisher-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 42px -36px rgba(15, 23, 42, 0.42);
}

.publisher-evidence-panel {
  position: sticky;
  top: 24px;
  padding: 24px;
}

.publisher-main-panel {
  display: grid;
  gap: 18px;
}

.publisher-topic-stage,
.publisher-config-stage,
.publisher-progress-stage,
.publisher-result-stage,
.publisher-focus-panel,
.publisher-review-stage {
  padding: 26px;
}

body[data-current-view="publisher"] {
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-current-view="publisher"] .studio-app,
body[data-current-view="publisher"] .view-shell {
  height: auto !important;
  min-height: 100dvh;
  overflow: visible !important;
}

html[data-current-view="publisher"],
body[data-current-view="publisher"] {
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto;
}

body[data-current-view="publisher"] .studio-app,
body[data-current-view="publisher"] .view-shell,
body[data-current-view="publisher"] #publisherView,
body[data-current-view="publisher"] .publisher-workbench,
body[data-current-view="publisher"] .publisher-screen.is-active {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.publisher-screen[hidden] { display: none !important; }
.publisher-screen.is-active { animation: publisher-screen-in 220ms ease-out both; }

@keyframes publisher-screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.publisher-screen-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  color: #64748b;
  font-size: 13px;
}

.publisher-back-button,
.publisher-secondary-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.publisher-back-button:hover,
.publisher-secondary-button:hover { border-color: #75aaa5; color: #0f766e; }
.publisher-back-button:disabled,
.publisher-secondary-button:disabled { cursor: not-allowed; opacity: 0.5; }

.publisher-section-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.publisher-section-toolbar .publisher-section-title { flex: 1; }
.publisher-focus-panel,
.publisher-review-stage,
.publisher-progress-stage,
.publisher-result-stage { max-width: 1120px; margin: 0 auto; }

.publisher-screen,
.publisher-progress-stage,
.publisher-focus-panel,
.publisher-result-stage {
  width: 100%;
}

.publisher-progress-stage,
.publisher-focus-panel {
  min-height: 390px;
}

.publisher-review-stage { max-width: 1380px; }

.publisher-review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.publisher-review-pane {
  display: flex;
  min-width: 0;
  height: min(72dvh, 760px);
  min-height: 560px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 14px;
  background: #f8fafc;
}

.publisher-pane-header,
.publisher-version-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.publisher-pane-header h3,
.publisher-version-heading h3 { margin: 0 0 3px; font-size: 17px; }
.publisher-pane-header p,
.publisher-version-heading p { margin: 0; color: #697386; font-size: 12px; }

.publisher-selected-topic {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid #d7e2e8;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fcfb 0%, #fff 72%);
}

.publisher-selected-topic h3 { margin: 6px 0 18px; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; }
.publisher-selected-topic > p:last-child { margin: 18px 0 0; color: #526074; line-height: 1.7; }
.publisher-selected-kicker { margin: 0; color: #0f766e; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.publisher-selected-facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 9px 16px; padding-top: 18px; border-top: 1px solid #dce7e5; }
.publisher-selected-facts span { color: #718096; font-size: 12px; }
.publisher-selected-facts strong { color: #243247; font-size: 13px; line-height: 1.55; }

.publisher-language-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; }
.publisher-language-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eef2f6; }
.publisher-language-tabs button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: #5b6678; font-weight: 700; cursor: pointer; }
.publisher-language-tabs button.is-active { background: #fff; color: #0f766e; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); }
.publisher-copy-full-button { min-height: 42px; padding: 0 16px; border: 1px solid #b9d5d1; border-radius: 10px; background: #fff; color: #0f766e; font-weight: 800; white-space: nowrap; cursor: pointer; }
.publisher-copy-full-button:hover { border-color: #0f766e; background: #f0fdfa; }
.publisher-copy-full-button:disabled { cursor: not-allowed; opacity: .55; }

.publisher-article-preview { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0 clamp(18px, 3vw, 42px); overflow: auto; border: 0; border-radius: 0; background: #fff; scrollbar-gutter: stable; box-sizing: border-box; }
.publisher-article-document { width: 100%; max-width: 920px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) 0 clamp(30px, 5vw, 58px); color: #263448; line-height: 1.75; box-sizing: border-box; }
.publisher-article-document h1 { margin: 0 0 24px; color: #111827; font-size: clamp(27px, 3vw, 38px); line-height: 1.25; }
.publisher-article-document h2 { margin: 32px 0 14px; color: #172033; font-size: 22px; }
.publisher-article-document h3 { margin: 24px 0 10px; color: #243247; font-size: 18px; }
.publisher-article-document p, .publisher-article-document li { color: #465469; }
.publisher-article-document a { color: #b85f0a; font-weight: 700; text-decoration: none; }
.publisher-article-document a:hover { text-decoration: underline; }
.publisher-article-document hr { border: 0; border-top: 1px solid #d6dee8; margin: 30px 0; }
.publisher-article-document table { width: 100%; margin: 24px 0; border-collapse: collapse; background: #fff; }
.publisher-article-document th,
.publisher-article-document td { padding: 11px 12px; border: 1px solid #cbd5e1; text-align: left; vertical-align: top; }
.publisher-article-document th { background: #f1f5f9; color: #243247; }
.publisher-article-document [data-mingxi-inline-image] { display: grid; gap: 8px; }
.publisher-article-document [data-mingxi-inline-image] img { width: 100%; height: auto; border-radius: 12px; }
.publisher-article-document [data-mingxi-inline-image] small { color: #64748b; font-size: 11px; }

.publisher-cover-preview {
  display: block;
  min-height: 118px;
  margin: -2px 0 18px;
  padding: 14px;
  border: 1px solid #dce3ea;
  border-radius: 14px;
  background: #f8fafc;
}
.publisher-image-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.publisher-image-preview-card { display: grid; grid-template-columns: minmax(150px, 42%) minmax(0, 1fr); align-items: center; gap: 14px; min-width: 0; padding: 10px; border: 1px solid #d7e2e8; border-radius: 12px; background: #fff; color: inherit; text-align: left; cursor: zoom-in; transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.publisher-image-preview-card:hover { border-color: #75aaa5; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 118, 110, 0.08); }
.publisher-image-preview-card img { width: 100%; aspect-ratio: 410 / 230; object-fit: cover; border-radius: 9px; background: #e8eef3; }
.publisher-image-preview-card > span { display: grid; gap: 5px; min-width: 0; }
.publisher-image-preview-card small { color: #64748b; font-size: 11px; line-height: 1.5; }
.publisher-cover-preview b { color: #243247; }
.publisher-cover-preview span { color: #64748b; font-size: 12px; line-height: 1.6; }
.publisher-cover-placeholder { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 88px; color: #526074; }
.publisher-cover-preview[data-kind="working"] .publisher-runtime-indicator { border: 2px solid #0f766e; border-top-color: transparent; background: transparent; animation: publisher-spin 900ms linear infinite; }
.publisher-cover-preview[data-kind="error"] { border-color: #fecaca; background: #fff7f7; }

.publisher-image-lightbox[hidden] { display: none; }
.publisher-image-lightbox { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 24px; }
.publisher-image-lightbox-backdrop { position: absolute !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: rgba(8, 15, 28, 0.88) !important; box-shadow: none !important; cursor: zoom-out; }
.publisher-image-lightbox-dialog { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(1680px, 96vw); height: min(94vh, 1040px); overflow: hidden; border-radius: 14px; background: #101827; box-shadow: 0 28px 80px rgba(0,0,0,.42); }
.publisher-image-lightbox-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; background: rgba(255,255,255,.96); }
.publisher-image-lightbox-tools { display: flex; align-items: center; gap: 8px; }
.publisher-image-lightbox-tools button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #d6dee8; border-radius: 9px; background: #fff; color: #243247; font-size: 20px; cursor: pointer; }
.publisher-image-lightbox-tools span { min-width: 64px; color: #526074; font-size: 12px; text-align: center; }
.publisher-image-lightbox-tools a { padding: 8px 11px; border: 1px solid #b9d3d0; border-radius: 9px; color: #0f766e; font-size: 12px; font-weight: 700; text-decoration: none; }
.publisher-image-lightbox-stage { flex: 1 1 auto; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 20px; background: #101827; }
.publisher-image-lightbox-stage img { display: block; width: 100%; height: auto; max-width: none; transform-origin: center center; transition: width 140ms ease; }
body.publisher-lightbox-open { overflow: hidden !important; }

@media (max-width: 760px) {
  .publisher-image-preview-grid { grid-template-columns: 1fr; }
}

.publisher-link-preview {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #526074;
  font-size: 11px;
}
.publisher-link-preview > b { color: #0f766e; }
.publisher-link-preview > div { display: flex; flex-wrap: wrap; gap: 6px; }
.publisher-link-preview span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #dbe5e3; border-radius: 999px; background: #fff; overflow-wrap: anywhere; }
.publisher-link-preview strong { color: #eb903a; }
.publisher-link-preview i { color: #94a3b8; font-style: normal; }
.publisher-image-recommendation { margin-top: 14px; padding: 15px; border: 1px solid #d8e9e5; border-radius: 12px; background: #f4faf8; color: #263b38; }
.publisher-image-recommendation[hidden] { display: none; }
.publisher-image-recommendation > b { display: block; color: #0f766e; font-size: 14px; }
.publisher-image-recommendation-item { margin-top: 12px; }
.publisher-image-recommendation-item strong { display: inline-block; color: #174b43; font-size: 12px; }
.publisher-image-recommendation-item p { margin: 5px 0; font-size: 12px; line-height: 1.65; }
.publisher-image-recommendation-item a { color: #0f766e; font-size: 12px; text-decoration: underline; }
.publisher-image-recommendation > small { display: block; margin-top: 10px; color: #647976; line-height: 1.5; }
.publisher-bilingual-link-audit {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.publisher-bilingual-link-audit.is-valid { color: #0f766e; background: #e7f7f3; }
.publisher-bilingual-link-audit.is-error { color: #b42318; background: #fff0ed; }

.publisher-version-list { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; gap: 12px; min-height: 0; padding: 14px; overflow-y: auto; scrollbar-gutter: stable; }
.publisher-review-version-pane .publisher-version-list { flex: 1 1 auto; align-content: start; }
.publisher-review-version-pane .publisher-confirm-button { flex: 0 0 auto; width: auto; margin: 0 14px 14px; }
.publisher-version-card { position: relative; display: block; min-width: 0; overflow: hidden; border: 1px solid #d9e1e8; border-radius: 14px; background: #fff; color: #243247; }
.publisher-version-card:hover { border-color: #75aaa5; }
.publisher-version-card.is-selected { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.publisher-version-select { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; width: 100%; padding: 18px 50px 18px 18px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.publisher-version-check { display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid #a6b2c1; border-radius: 50%; color: #fff; font-size: 12px; }
.publisher-version-card.is-selected .publisher-version-check { border-color: #0f766e; background: #0f766e; }
.publisher-version-copy { display: grid; gap: 9px; min-width: 0; }
.publisher-version-copy > strong { font-size: 16px; }
.publisher-version-copy > span { color: #637083; font-size: 12px; line-height: 1.55; }
.publisher-version-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; min-width: 0; padding-top: 9px; border-top: 1px solid #eef2f6; overflow-wrap: anywhere; word-break: break-word; }
.publisher-version-row b { color: #0f766e; font-size: 11px; }
.publisher-version-row span { display: block; min-width: 0; color: #526074; font-size: 12px; line-height: 1.55; }

.publisher-section-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 20px;
}

.publisher-section-title h2 {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.3;
}

.publisher-section-title p {
  margin: 0;
  color: #697386;
  font-size: 14px;
  line-height: 1.6;
}

.publisher-step {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e8f4f2;
  color: var(--publisher-accent);
  font-size: 13px;
  font-weight: 800;
}

.publisher-dropzone {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 152px;
  padding: 24px;
  place-content: center;
  text-align: center;
  border: 1.5px dashed #86bcb6;
  border-radius: 14px;
  background: #f5fbfa;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.publisher-dropzone::after {
  content: "";
  position: absolute;
  left: -45%;
  top: 0;
  width: 38%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(83, 191, 174, .13), transparent);
  transform: skewX(-14deg);
  opacity: 0;
}

.publisher-dropzone:hover {
  border-color: var(--publisher-accent);
  background: #eef9f7;
}

.publisher-dropzone.is-dragging {
  border-color: #0f766e;
  border-style: solid;
  background: #e6f6f3;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.publisher-dropzone.is-dragging strong {
  color: #0f766e;
}

.publisher-dropzone.is-busy {
  cursor: progress;
  opacity: 0.76;
}

.publisher-dropzone.is-busy::after {
  opacity: 1;
  animation: publisher-dropzone-scan 1.45s ease-in-out infinite;
}

.publisher-dropzone:active,
.publisher-confirm-button:active,
.publisher-admin-link:active {
  transform: translateY(1px);
}

.publisher-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.publisher-dropzone strong {
  color: #134e4a;
  line-height: 1.4;
}

.publisher-dropzone span {
  color: #6b7280;
  font-size: 12px;
}

.publisher-file-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.publisher-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  animation: publisher-file-arrive 220ms ease-out both;
}

.publisher-file-item:nth-child(2) { animation-delay: 45ms; }
.publisher-file-item:nth-child(3) { animation-delay: 90ms; }
.publisher-file-item:nth-child(4) { animation-delay: 135ms; }

@keyframes publisher-dropzone-scan { from { left: -45%; } to { left: 108%; } }
@keyframes publisher-file-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.publisher-file-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publisher-inline-status {
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
  color: #526074;
  font-size: 13px;
  line-height: 1.55;
}

.publisher-extension-download {
  display: inline-flex;
  margin-top: 14px;
  color: #0f766e;
  font-weight: 700;
  text-underline-offset: 3px;
}

.publisher-extension-note {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.publisher-inline-status[data-kind="working"] { border-left-color: #0f766e; color: #115e59; }
.publisher-inline-status[data-kind="success"] { border-left-color: #16a34a; color: #166534; }
.publisher-inline-status[data-kind="error"] { border-left-color: #dc2626; color: #991b1b; }

.publisher-saved-workspace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 22px;
  border: 1px solid #cde5e2;
  border-radius: 16px;
  background: #f5fbfa;
}
.publisher-saved-workspace[hidden] { display: none; }
.publisher-saved-workspace p { margin: 6px 0 0; color: #64748b; overflow-wrap: anywhere; }
.publisher-saved-workspace-actions { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 10px; }
@media (max-width: 760px) {
  .publisher-saved-workspace { align-items: stretch; flex-direction: column; }
}

.publisher-evidence-insights {
  position: relative;
  margin-top: 14px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid #cfe3df;
  border-radius: 14px;
  background:
    radial-gradient(circle at 94% 6%, rgba(40, 181, 157, 0.12), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f4fbf9 62%, #edf8f5 100%);
  color: #223047;
  box-shadow: 0 14px 30px -24px rgba(15, 78, 72, 0.42);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.publisher-evidence-insights:hover {
  transform: translateY(-1px);
  border-color: #93c9c0;
  box-shadow: 0 18px 34px -24px rgba(15, 78, 72, 0.5);
}

.publisher-insight-heading { display: flex; align-items: center; gap: 11px; }
.publisher-insight-heading > div { display: grid; gap: 2px; min-width: 0; }
.publisher-insight-heading strong { color: #183448; font-size: 13px; letter-spacing: .01em; }
.publisher-insight-heading span:last-child { color: #6e8589; font-size: 10px; }
.publisher-insight-orbit { position: relative; display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid #aed9d1; border-radius: 50%; background: rgba(255,255,255,.72); }
.publisher-insight-orbit::before { content: ""; position: absolute; inset: 4px; border: 1px dashed #71bfb1; border-radius: 50%; }
.publisher-insight-orbit i { width: 7px; height: 7px; border-radius: 50%; background: #169986; box-shadow: 0 0 12px rgba(22,153,134,.38); }
.publisher-evidence-insights[data-state="loading"] .publisher-insight-orbit::before { animation: publisher-insight-orbit 2.2s linear infinite; }
.publisher-evidence-insights[data-state="ready"] .publisher-insight-orbit i { animation: publisher-insight-pulse 2.4s ease-in-out infinite; }

.publisher-insight-empty { margin-top: 12px; color: #667b82; font-size: 11px; line-height: 1.6; }
.publisher-insight-loading { display: grid; gap: 8px; margin-top: 14px; }
.publisher-insight-loading[hidden] { display: none; }
.publisher-insight-loading span { height: 9px; overflow: hidden; border-radius: 999px; background: linear-gradient(90deg, #e2efec 20%, #bee1db 46%, #e2efec 72%); background-size: 220% 100%; animation: publisher-insight-shimmer 1.25s ease-in-out infinite; }
.publisher-insight-loading span:nth-child(2) { width: 82%; animation-delay: 100ms; }
.publisher-insight-loading span:nth-child(3) { width: 64%; animation-delay: 200ms; }
.publisher-insight-content { display: grid; gap: 12px; margin-top: 13px; animation: publisher-insight-reveal 260ms ease-out both; }
.publisher-insight-content[hidden] { display: none; }
.publisher-insight-headline { margin: 0; color: #26384c; font-size: 12px; font-weight: 750; line-height: 1.55; }
.publisher-insight-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.publisher-insight-metric { display: grid; gap: 2px; padding: 8px 7px; border: 1px solid #d9eae7; border-radius: 9px; background: rgba(255,255,255,.78); }
.publisher-insight-metric b { color: #087f70; font-size: 15px; font-variant-numeric: tabular-nums; }
.publisher-insight-metric span { color: #718489; font-size: 9px; }
.publisher-insight-label { color: #288e80; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.publisher-insight-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.publisher-insight-tag { padding: 5px 7px; border: 1px solid #c9e4df; border-radius: 999px; background: #edf8f5; color: #356d66; font-size: 9px; }
.publisher-insight-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.publisher-insight-list li { position: relative; padding-left: 13px; color: #526970; font-size: 10px; line-height: 1.55; }
.publisher-insight-list li::before { content: ""; position: absolute; left: 0; top: .58em; width: 5px; height: 5px; border-radius: 50%; background: #f6a13a; box-shadow: 0 0 0 3px rgba(246,161,58,.12); }
.publisher-insight-details { border-top: 1px solid #d9e8e5; padding-top: 9px; }
.publisher-insight-details summary { color: #287e73; font-size: 10px; font-weight: 700; cursor: pointer; list-style: none; }
.publisher-insight-details summary::-webkit-details-marker { display: none; }
.publisher-insight-details summary::after { content: "＋"; float: right; color: #2ca18f; }
.publisher-insight-details[open] summary::after { content: "−"; }
.publisher-insight-details p { margin: 8px 0 0; color: #718287; font-size: 9px; line-height: 1.55; }

@keyframes publisher-insight-orbit { to { transform: rotate(360deg); } }
@keyframes publisher-insight-pulse { 50% { transform: scale(1.22); box-shadow: 0 0 20px rgba(110,231,212,.95); } }
@keyframes publisher-insight-shimmer { from { background-position: 100% 0; } to { background-position: -110% 0; } }
@keyframes publisher-insight-reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .publisher-insight-orbit::before,
  .publisher-insight-orbit i,
  .publisher-insight-loading span,
  .publisher-insight-content,
  .publisher-dropzone::after,
  .publisher-file-item { animation: none !important; }
  .publisher-evidence-insights { transition: none; }
}

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

.publisher-topic-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.publisher-topic-select {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  padding: 18px 52px 18px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.publisher-topic-card:hover {
  border-color: #75aaa5;
  box-shadow: 0 14px 28px -24px rgba(15, 118, 110, 0.65);
}

.publisher-topic-card.is-selected {
  border-color: var(--publisher-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.11);
}

.publisher-topic-card.is-published {
  border-color: #86c9a0;
  background: #f3fbf6;
}

.publisher-topic-card.is-published .publisher-topic-select {
  cursor: not-allowed;
  opacity: 0.78;
}

.publisher-topic-radio {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 2px solid #9aa7b7;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #fff;
}

.publisher-topic-card.is-selected .publisher-topic-radio {
  border-color: var(--publisher-accent);
  background: var(--publisher-accent);
}

.publisher-topic-copy {
  display: grid;
  gap: 8px;
}

.publisher-topic-copy h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.publisher-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #697386;
  font-size: 12px;
}

.publisher-topic-detail {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f2f8f7;
  color: #27625d;
  font-size: 12px;
  line-height: 1.5;
}
.publisher-topic-detail b { color: #0f766e; }

.publisher-topic-published-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}

.publisher-card-translate {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #0f766e;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  z-index: 2;
}
.publisher-card-translate:hover { border-color: #0f766e; background: #f0fdfa; }
.publisher-card-translate { min-width: 32px; min-height: 32px; max-height: 32px; white-space: nowrap; overflow: hidden; }
.publisher-card-translation-status { margin: 0; padding: 10px 18px 14px; color: #52647a; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; white-space: normal; }
.publisher-card-translate[aria-busy="true"] { cursor: progress; }
.publisher-card-translation { display: grid; gap: 6px; padding: 13px 18px 16px; border-top: 1px solid #dce7e5; background: #f8fcfb; }
.publisher-card-translation b { color: #0f766e; font-size: 12px; }
.publisher-card-translation p { margin: 0; color: #455468; font-size: 12px; line-height: 1.65; }

.publisher-topic-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.publisher-topic-pager button { min-height: 38px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #334155; font-weight: 700; cursor: pointer; }
.publisher-topic-pager button:disabled { cursor: not-allowed; opacity: 0.42; }
.publisher-topic-pager span { color: #64748b; font-size: 12px; font-variant-numeric: tabular-nums; }

/* Connected filter run adapted from m3e-canvas's Material 3 expressive ButtonRun. */
.publisher-topic-filter-run {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  margin: 2px 0 16px;
  padding: 3px;
  border-radius: 25px;
  background: #e8f0ef;
}

.publisher-topic-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #405451;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.publisher-topic-filter:first-child {
  border-top-left-radius: 22px;
  border-bottom-left-radius: 22px;
}

.publisher-topic-filter:last-child {
  border-top-right-radius: 22px;
  border-bottom-right-radius: 22px;
}

.publisher-topic-filter:hover { background: rgba(255, 255, 255, 0.62); }
.publisher-topic-filter.is-active {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 3px 11px rgba(15, 76, 70, 0.12);
}

.publisher-topic-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  box-sizing: border-box;
  background: #d2dfdd;
  color: #405451;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.publisher-topic-filter.is-active .publisher-topic-filter-count {
  background: #0f766e;
  color: #fff;
}

.publisher-topic-history-copy {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.publisher-topic-history-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: #16835b;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.publisher-topic-history-time { color: #5f716d; font-size: 12px; }

@media (max-width: 620px) {
  .publisher-topic-filter-run { width: 100%; }
  .publisher-topic-filter { flex: 1; min-width: 0; padding: 0 8px; }
}

.publisher-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.publisher-review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.publisher-mark-published:disabled {
  border-color: #86c9a0;
  background: #ecfdf3;
  color: #166534;
  opacity: 1;
  cursor: default;
}

.publisher-empty-state {
  display: grid;
  gap: 7px;
  min-height: 170px;
  place-content: center;
  text-align: center;
  color: #8490a2;
}

.publisher-empty-state strong { color: #526074; }

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

.publisher-config-grid label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.publisher-config-grid select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #fff;
  color: #172033;
}

.publisher-config-grid select:focus-visible,
.publisher-confirm-button:focus-visible,
.publisher-topic-select:focus-visible,
.publisher-version-select:focus-visible,
.publisher-card-translate:focus-visible,
.publisher-dropzone:focus-within {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.publisher-confirm-button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  white-space: nowrap;
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #fff !important;
}

.publisher-progress-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.publisher-progress-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  color: #5b6678;
  font-size: 13px;
  line-height: 1.55;
}

.publisher-progress-text { min-width: 0; }
.publisher-step-duration {
  align-self: start;
  color: #8490a2;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.publisher-progress-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 2px solid #a9b5c3;
  border-radius: 50%;
}

.publisher-progress-list li.is-working::before { border-color: #0f766e; border-top-color: transparent; animation: publisher-spin 900ms linear infinite; }
.publisher-progress-list li.is-done::before { border-color: #16a34a; background: #16a34a; }
.publisher-progress-list li.is-error::before { border-color: #dc2626; background: #dc2626; }

@keyframes publisher-spin { to { transform: rotate(360deg); } }

.publisher-result-stage {
  border-color: #a7d8d2;
  background: #f8fcfb;
}

.publisher-result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.publisher-result-summary div {
  padding: 12px;
  border-radius: 10px;
  background: #fff;
}

.publisher-result-summary span { display: block; color: #748093; font-size: 11px; }
.publisher-result-summary strong { display: block; margin-top: 4px; color: #1d2939; font-size: 13px; line-height: 1.45; }

.publisher-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  white-space: nowrap;
  background: #c65f00 !important;
  border-color: #c65f00 !important;
  color: #fff !important;
  text-decoration: none;
}

.publisher-save-note { margin: 12px 0 0; color: #667085; font-size: 12px; }
.publisher-image-bridge { position: fixed; left: -10000px; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }

@media (max-width: 980px) {
  .publisher-layout { grid-template-columns: 1fr; }
  .publisher-evidence-panel { position: static; }
  .publisher-review-workspace { grid-template-columns: 1fr; }
  .publisher-review-pane { height: min(68dvh, 680px); min-height: 480px; }
}

@media (max-width: 680px) {
  .publisher-console-header { grid-template-columns: 1fr; gap: 10px; }
  .publisher-console-title { align-items: flex-start; flex-direction: column; gap: 2px; }
  .publisher-runtime-status { grid-template-columns: 12px auto minmax(0, 1fr) auto; }
  .publisher-runtime-status time { display: inline; }
  .publisher-pane-header { align-items: stretch; flex-direction: column; }
  .publisher-config-grid, .publisher-result-summary { grid-template-columns: 1fr; }
  .publisher-confirm-button, .publisher-admin-link { white-space: normal; }
  .publisher-screen-nav, .publisher-section-toolbar { align-items: stretch; flex-direction: column; }
  .publisher-secondary-button { width: 100%; }
  .publisher-selected-facts { grid-template-columns: 1fr; }
  .publisher-cover-preview { grid-template-columns: 1fr; }
  .publisher-topic-pager { align-items: stretch; flex-direction: column; text-align: center; }
}

/* 20260827 publisher layout lock: equal topic pages + TDK-above-article review. */
@keyframes publisher-face-slide-from-left {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes publisher-face-slide-from-right {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

body[data-current-view="publisher"] .publisher-card-slider {
  display: block;
}

body[data-current-view="publisher"] .publisher-card-face {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: none;
  will-change: auto;
}

body[data-current-view="publisher"] .publisher-card-face-front {
  display: block;
  animation: publisher-face-slide-from-left 360ms cubic-bezier(.22, 1, .36, 1);
}

body[data-current-view="publisher"] .publisher-card-face-back {
  display: none;
  background: transparent;
}

body[data-current-view="publisher"] .publisher-topic-card.is-showing-translation .publisher-card-face-front,
body[data-current-view="publisher"] .publisher-version-card.is-showing-translation .publisher-card-face-front {
  display: none;
}

body[data-current-view="publisher"] .publisher-topic-card.is-showing-translation .publisher-card-face-back,
body[data-current-view="publisher"] .publisher-version-card.is-showing-translation .publisher-card-face-back {
  display: block;
  transform: none;
  opacity: 1;
  visibility: visible;
  animation: publisher-face-slide-from-right 360ms cubic-bezier(.22, 1, .36, 1);
}

body[data-current-view="publisher"] .publisher-topic-stage {
  min-height: 1124px;
  display: flex;
  flex-direction: column;
}

body[data-current-view="publisher"] .publisher-topic-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 468px);
  min-height: 948px;
  align-items: stretch;
}

body[data-current-view="publisher"] .publisher-topic-card,
body[data-current-view="publisher"] .publisher-card-slider,
body[data-current-view="publisher"] .publisher-topic-card .publisher-card-face,
body[data-current-view="publisher"] .publisher-topic-card .publisher-topic-select {
  height: 100%;
  min-height: 0;
}

body[data-current-view="publisher"] .publisher-topic-card .publisher-card-face {
  overflow: hidden;
}

body[data-current-view="publisher"] .publisher-topic-select {
  padding: 18px 52px 18px 18px;
  border-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
}

body[data-current-view="publisher"] .publisher-topic-copy {
  grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 1fr);
  align-content: stretch;
  gap: 8px;
  min-width: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
}

body[data-current-view="publisher"] .publisher-topic-copy h3 {
  margin: 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body[data-current-view="publisher"] .publisher-topic-meta {
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
}

body[data-current-view="publisher"] .publisher-topic-detail {
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: none;
  padding: 9px 11px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  box-sizing: border-box;
}

body[data-current-view="publisher"] .publisher-topic-detail > span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-current-view="publisher"] .publisher-card-face-back .publisher-topic-copy,
body[data-current-view="publisher"] .publisher-card-face-back .publisher-topic-copy * {
  font-family: inherit;
}

body[data-current-view="publisher"] .publisher-review-title {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
}

body[data-current-view="publisher"] .publisher-review-heading-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

body[data-current-view="publisher"] .publisher-review-heading-row > div { min-width: 0; }
body[data-current-view="publisher"] .publisher-review-heading-row .publisher-secondary-button {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
}

body[data-current-view="publisher"] .publisher-review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

body[data-current-view="publisher"] .publisher-review-version-pane {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body[data-current-view="publisher"] .publisher-version-list,
body[data-current-view="publisher"] .publisher-review-version-pane .publisher-version-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 430px;
  gap: 14px;
  min-height: 430px;
  padding: 16px;
  overflow: visible;
  scrollbar-gutter: auto;
}

body[data-current-view="publisher"] .publisher-version-card,
body[data-current-view="publisher"] .publisher-version-card .publisher-card-slider,
body[data-current-view="publisher"] .publisher-version-card .publisher-card-face,
body[data-current-view="publisher"] .publisher-version-card .publisher-version-select {
  height: 100%;
  min-height: 0;
}

body[data-current-view="publisher"] .publisher-version-card .publisher-card-face {
  overflow: hidden;
}

body[data-current-view="publisher"] .publisher-version-select {
  padding: 18px 48px 18px 16px;
  border-radius: 0;
  overflow: hidden;
}

body[data-current-view="publisher"] .publisher-version-copy {
  align-content: start;
  gap: 8px;
  min-width: 0;
  max-height: 100%;
  overflow: hidden;
}

body[data-current-view="publisher"] .publisher-version-copy > strong {
  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body[data-current-view="publisher"] .publisher-version-copy > span,
body[data-current-view="publisher"] .publisher-version-row span {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-current-view="publisher"] .publisher-review-version-pane .publisher-link-preview {
  min-height: 138px;
  max-height: none;
  overflow: visible;
}

body[data-current-view="publisher"] .publisher-review-version-pane .publisher-confirm-button {
  width: auto;
  margin: 0 16px 16px;
}

body[data-current-view="publisher"] .publisher-review-article-pane {
  width: 100%;
  height: min(76dvh, 820px);
  min-height: 620px;
}

@media (max-width: 1100px) {
  body[data-current-view="publisher"] .publisher-topic-stage { min-height: 0; }
  body[data-current-view="publisher"] .publisher-topic-list {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: 468px;
    min-height: 0;
  }
  body[data-current-view="publisher"] .publisher-version-list,
  body[data-current-view="publisher"] .publisher-review-version-pane .publisher-version-list {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 430px;
  }
}

@media (max-width: 680px) {
  body[data-current-view="publisher"] .publisher-review-heading-row { flex-direction: column; }
  body[data-current-view="publisher"] .publisher-review-heading-row .publisher-secondary-button { width: 100%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .publisher-dropzone, .publisher-topic-card, .publisher-confirm-button, .publisher-admin-link { transition: none; }
  .publisher-screen.is-active { animation: none; }
}

@media (max-width: 900px) {
  #homeView .home-card-grid.home-card-grid-workbench {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 20px !important;
  }

#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  height: auto !important;
  min-height: 250px !important;
  max-height: none !important;
  padding: 30px !important;
  overflow: visible !important;
}
}

/* 20260526: readable image-generator container width */
@media (min-width: 1081px) {
  body[data-current-view="image"] .studio-app {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body[data-current-view="image"] .global-header,
  body[data-current-view="image"] .view-shell {
    width: calc(100% - 96px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body[data-current-view="image"] .view-shell {
    height: calc(100vh - 112px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-current-view="image"] #imageView.image-view-shell:not(.is-hidden) {
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-current-view="image"] #imageView .image-tool-frame {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-current-view="image"] #imageView .image-tool-frame iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }
}


/* 20260519a final home/card/layout guardrails */
html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

#homeView,
#homeView .home-portal {
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
}

#homeView .home-card-grid.home-card-grid-workbench {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 320px !important;
  gap: 32px !important;
  max-width: 980px !important;
  margin: 48px auto 0 !important;
  align-items: stretch !important;
  justify-items: stretch !important;
}

#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  min-height: 320px !important;
  height: 320px !important;
  max-height: 320px !important;
  padding: 40px !important;
  border-radius: 18px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  overflow: hidden !important;
}

#homeView .home-card-grid-workbench .home-tool-icon {
  width: 58px !important;
  height: 58px !important;
  margin: 0 0 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 18px !important;
}

#homeView .home-card-grid-workbench > .home-tool-card > strong,
#homeView .home-card-grid-workbench > .home-login-card > strong {
  display: block !important;
  margin: 0 0 14px !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  white-space: normal !important;
}

#homeView .home-card-grid-workbench > .home-tool-card > small,
#homeView .home-card-grid-workbench > .home-login-card > small {
  display: block !important;
  max-width: 460px !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  font-weight: 650 !important;
  color: #6b7280 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card .home-card-cta,
#homeView .home-card-grid-workbench > .home-login-card .home-auth-actions {
  margin-top: auto !important;
}

#homeView .home-auth-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  justify-content: flex-start !important;
}

#homeView .home-auth-actions .btn {
  width: auto !important;
  min-width: 132px !important;
  max-width: 220px !important;
  height: 44px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  #homeView .home-card-grid.home-card-grid-workbench {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 20px !important;
  }

  #homeView .home-card-grid-workbench > .home-tool-card,
  #homeView .home-card-grid-workbench > .home-login-card {
    height: auto !important;
    min-height: 250px !important;
    max-height: none !important;
    padding: 30px !important;
    overflow: visible !important;
  }
}

/* 20260527e: lighter, more separated home card palette override */
#homeView .home-card-grid-workbench > .home-tool-card,
#homeView .home-card-grid-workbench > .home-login-card {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
}

#homeView .home-card-grid-workbench > .home-tool-card > *,
#homeView .home-card-grid-workbench > .home-login-card > * {
  position: relative !important;
  z-index: 2 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card::before,
#homeView .home-card-grid-workbench > .home-login-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1 !important;
  height: 8px !important;
  opacity: 0.96 !important;
  transition: height 0.24s ease, opacity 0.24s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card::after,
#homeView .home-card-grid-workbench > .home-login-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: 0.68 !important;
  transition: opacity 0.24s ease, transform 0.24s ease !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover::before,
#homeView .home-card-grid-workbench > .home-login-card:hover::before {
  height: 11px !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:hover::after,
#homeView .home-card-grid-workbench > .home-login-card:hover::after {
  opacity: 0.84 !important;
  transform: translateY(2px) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) {
  background: linear-gradient(150deg, #f7f9fc 0%, #ffffff 58%, #fafbfc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::before {
  background: linear-gradient(90deg, #64748b 0%, #bae6fd 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1)::after {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.08) 0%, rgba(186, 230, 253, 0.045) 26%, rgba(255, 255, 255, 0) 66%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(1) .home-tool-icon {
  background: #f3f6fa !important;
  color: #475569 !important;
  box-shadow: inset 0 0 0 1px #cbd5e1 !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2) {
  background: linear-gradient(150deg, #f7fbff 0%, #ffffff 58%, #fafbfc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::before {
  background: linear-gradient(90deg, #60a5fa 0%, #dbeafe 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(2)::after {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.08) 0%, rgba(219, 234, 254, 0.055) 28%, rgba(255, 255, 255, 0) 68%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) {
  background: linear-gradient(150deg, #f1f5f9 0%, #ffffff 58%, #fafbfc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::before {
  background: linear-gradient(90deg, #64748b 0%, #bfdbfe 100%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3)::after {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.08) 0%, rgba(253, 230, 138, 0.055) 28%, rgba(255, 255, 255, 0) 68%) !important;
}

#homeView .home-card-grid-workbench > .home-tool-card:nth-child(3) .home-tool-icon {
  background: #f8fafc !important;
  color: #334155 !important;
  box-shadow: inset 0 0 0 1px #bfdbfe !important;
}

#homeView .home-card-grid-workbench > .home-login-card {
  background: linear-gradient(150deg, #f4fbf6 0%, #ffffff 58%, #fafbfc 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card::before {
  background: linear-gradient(90deg, #34d399 0%, #bbf7d0 100%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card::after {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.08) 0%, rgba(187, 247, 208, 0.055) 28%, rgba(255, 255, 255, 0) 68%) !important;
}

#homeView .home-card-grid-workbench > .home-login-card .home-tool-icon {
  background: #f0fdf4 !important;
  color: #15803d !important;
  box-shadow: inset 0 0 0 1px #bbf7d0 !important;
}

/* 20260701 eof MingXi visual override: keep this block last. */
body[data-current-view="home"] .global-logo,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-logo {
  background: linear-gradient(135deg, #0f766e 0%, #2563eb 54%, #0b1220 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 18px 36px -20px rgba(37, 99, 235, 0.68) !important;
}

body[data-current-view="home"] .global-header,
.studio-app:not(:has(.view-tool:not(.is-hidden))) .global-header {
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.94) 0%, rgba(255, 255, 255, 0.98) 46%, rgba(239, 246, 255, 0.94) 100%) !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
}

.business-switch {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: min(780px, calc(100% - 32px)) !important;
  margin: 28px auto 34px !important;
  padding: 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 26px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 253, 250, 0.82)) !important;
}

.business-switch-button {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 96px !important;
  padding: 18px !important;
  border: 1px solid transparent !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.64) !important;
  text-align: left !important;
}

.business-switch-button.is-active {
  border-color: rgba(15, 118, 110, 0.32) !important;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(239, 246, 255, 0.98)) !important;
}

.business-mark {
  display: grid !important;
  place-items: center !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #0f766e, #2563eb) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

.business-switch-button[data-business="rackmountai"] .business-mark {
  background: linear-gradient(135deg, #1d4ed8, #06b6d4) !important;
}

#homeView .home-hero h1 {
  background: linear-gradient(135deg, #0b1220 0%, #0f766e 44%, #2563eb 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

@media (max-width: 760px) {
  .business-switch {
    grid-template-columns: 1fr !important;
  }
}

/* 20260702 eof: generated article document must use MingXi cool typography only. */
#articleView #articlePreview.article-preview,
#articleView #articlePreview.article-preview.prose,
#articleView #articlePreview.article-preview.prose-mingxi {
  color: #1f2937 !important;
}

#articleView #articlePreview .article-document h1,
#articleView #articlePreview.prose h1 {
  color: #0f766e !important;
  border-bottom-color: #dbeafe !important;
}

#articleView #articlePreview .article-document h2,
#articleView #articlePreview.prose h2 {
  color: #2563eb !important;
  border-top-color: #e2e8f0 !important;
}

#articleView #articlePreview .article-document h3,
#articleView #articlePreview.prose h3 {
  color: #0f766e !important;
}

#articleView #articlePreview .article-document a,
#articleView #articlePreview.prose a {
  color: #0f766e !important;
  border-bottom-color: rgba(14, 165, 233, 0.32) !important;
}

#articleView #articlePreview .article-document strong,
#articleView #articlePreview.prose strong {
  color: #0b1220 !important;
}

#articleView #articlePreview .article-document blockquote,
#articleView #articlePreview.prose blockquote {
  border-left-color: #0f766e !important;
  background: #ecfeff !important;
}

/* 20260702 final: keep output sticky masks as the last article-workspace override. */
@media (min-width: 1081px) {
  #articleView.view-tool:not(.is-hidden) .canvas {
    padding: 0 24px 24px !important;
    background: #f8fafc !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 520 !important;
    min-height: 104px !important;
    margin: 0 -24px !important;
    padding: 24px 24px 16px !important;
    background: #f8fafc !important;
    overflow: visible !important;
    isolation: isolate !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 -8px -2px -8px !important;
    background: #f8fafc !important;
    box-shadow: 0 18px 34px -32px rgba(15, 23, 42, 0.45) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  #articleView.view-tool:not(.is-hidden) .canvas-topbar > * {
    position: relative !important;
    z-index: 1 !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar {
    position: sticky !important;
    top: 103px !important;
    z-index: 500 !important;
    background: #ffffff !important;
    overflow: visible !important;
    isolation: isolate !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar::after,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar::after {
    content: "" !important;
    position: absolute !important;
    inset: -2px 0 -20px 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  #articleView.view-tool:not(.is-hidden) .article-toolbar > *,
  #articleView.view-tool:not(.is-hidden) .metadata-card .metadata-toolbar > * {
    position: relative !important;
    z-index: 1 !important;
  }
}

/* 20260827 final publisher source-order guardrail */
body[data-current-view="home"] .studio-app,
body[data-current-view="home"] .view-shell,
body[data-current-view="home"] #homeView,
body[data-current-view="home"] #homeView .home-portal {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-current-view="publisher"] #publisherView.publisher-view-shell:not(.is-hidden),
body[data-current-view="publisher"] .publisher-screen.is-active {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  align-self: stretch !important;
}

body[data-current-view="publisher"] #publisherProcessingScreen > .publisher-screen-nav,
body[data-current-view="publisher"] #publisherProcessingScreen > .publisher-progress-stage,
body[data-current-view="publisher"] #publisherGenerateScreen > .publisher-screen-nav,
body[data-current-view="publisher"] #publisherGenerateScreen > .publisher-focus-panel {
  width: min(100%, 1120px) !important;
  max-width: 1120px !important;
  margin-inline: auto !important;
}

.publisher-review-version-pane .publisher-link-preview {
  min-height: 170px !important;
  max-height: 240px !important;
  overflow: auto !important;
  border-top: 1px solid #e2e8f0 !important;
  border-bottom: 0 !important;
}

body[data-current-view="home"] #homeView.view.view-home,
body[data-current-view="home"] #homeView.view.view-home .home-portal {
  height: auto !important;
  max-height: none !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* Publisher review clarity and one-pass image workflow */
body[data-current-view="publisher"] .publisher-runtime-status time,
body[data-current-view="publisher"] .publisher-step-duration {
  color: #0f766e !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 8px;
  background: #e9f5f3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body[data-current-view="publisher"] .publisher-topic-detail {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-gutter: auto;
}

body[data-current-view="publisher"] .publisher-topic-detail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body[data-current-view="publisher"] .publisher-version-card .publisher-card-face,
body[data-current-view="publisher"] .publisher-version-card .publisher-version-select,
body[data-current-view="publisher"] .publisher-version-card .publisher-version-copy {
  overflow: hidden !important;
  scrollbar-width: none;
}

body[data-current-view="publisher"] .publisher-version-card .publisher-card-face-back .publisher-version-copy > strong,
body[data-current-view="publisher"] .publisher-version-card .publisher-card-face-front .publisher-version-copy > strong {
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

body[data-current-view="publisher"] .publisher-version-card .publisher-card-face-back .publisher-version-row,
body[data-current-view="publisher"] .publisher-version-card .publisher-card-face-front .publisher-version-row {
  min-height: 0;
}

body[data-current-view="publisher"] .publisher-review-version-pane .publisher-link-preview {
  min-height: 176px !important;
  max-height: none !important;
  padding: 16px 18px !important;
  overflow: visible !important;
  color: #334155;
  font-size: 13px !important;
  line-height: 1.55;
}

body[data-current-view="publisher"] .publisher-review-version-pane .publisher-link-preview > b {
  font-size: 13px;
  font-weight: 800;
}

body[data-current-view="publisher"] .publisher-review-version-pane .publisher-link-preview span {
  padding: 7px 10px;
  font-size: 12.5px;
  line-height: 1.45;
}

body[data-current-view="publisher"] .publisher-article-document blockquote {
  display: block;
  margin: 24px 0;
  padding: 16px 18px;
  border: 0;
  border-left: 4px solid #0f766e;
  border-radius: 0 10px 10px 0;
  background: #eef8f6;
  color: #334155;
  line-height: 1.7;
}

body[data-current-view="publisher"] .publisher-article-document blockquote strong {
  color: #0f766e;
}

/* Publisher equal-height audit cards and bottom selection controls */
body[data-current-view="publisher"] .publisher-topic-stage {
  min-height: 0;
}

body[data-current-view="publisher"] .publisher-topic-list {
  grid-template-rows: none;
  grid-auto-rows: auto;
  min-height: 0;
}

body[data-current-view="publisher"] .publisher-topic-select {
  position: relative;
  display: block;
  min-height: 480px;
  padding: 16px 16px 46px;
}

body[data-current-view="publisher"] .publisher-topic-card,
body[data-current-view="publisher"] .publisher-topic-card .publisher-card-slider,
body[data-current-view="publisher"] .publisher-topic-card .publisher-card-face,
body[data-current-view="publisher"] .publisher-topic-card .publisher-topic-select {
  height: auto;
  min-height: 480px;
}

body[data-current-view="publisher"] .publisher-topic-card .publisher-card-face {
  overflow: visible;
}

body[data-current-view="publisher"] .publisher-topic-radio {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  transform: translateX(-50%);
}

body[data-current-view="publisher"] .publisher-topic-copy {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 8px;
  height: auto;
  overflow: visible;
}

body[data-current-view="publisher"] .publisher-topic-copy h3 {
  display: block;
  width: calc(100% - 52px);
  min-height: 68px;
  height: auto;
  padding-right: 0;
  line-height: 1.32;
  overflow: visible;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
}

body[data-current-view="publisher"] .publisher-topic-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  min-height: 68px;
  height: auto;
  padding-right: 0;
  overflow: visible;
  align-content: start;
}

body[data-current-view="publisher"] .publisher-topic-type,
body[data-current-view="publisher"] .publisher-topic-products {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="publisher"] .publisher-topic-intent {
  display: block;
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 42px;
  height: auto;
  overflow: visible;
  -webkit-line-clamp: unset;
}

body[data-current-view="publisher"] .publisher-topic-detail {
  min-height: 98px;
  height: auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}

body[data-current-view="publisher"] .publisher-topic-detail > span {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-line-clamp: unset;
}

body[data-current-view="publisher"] .publisher-card-translate {
  top: 14px;
  right: 14px;
}

@media (min-width: 981px) {
  body[data-current-view="publisher"] .publisher-view-shell {
    max-width: 1640px;
  }

  body[data-current-view="publisher"] .publisher-layout {
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  }
}

body[data-current-view="publisher"] .publisher-version-list,
body[data-current-view="publisher"] .publisher-review-version-pane .publisher-version-list {
  grid-auto-rows: 470px;
  min-height: 470px;
}

body[data-current-view="publisher"] .publisher-version-select {
  position: relative;
  display: block;
  padding: 18px 18px 52px;
}

body[data-current-view="publisher"] .publisher-version-check {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  transform: translateX(-50%);
}

body[data-current-view="publisher"] .publisher-version-copy {
  display: grid;
  grid-template-rows: 36px 50px 64px 94px 48px 52px;
  gap: 7px;
  height: 379px;
  align-content: start;
}

body[data-current-view="publisher"] .publisher-version-copy > strong,
body[data-current-view="publisher"] .publisher-version-copy > span,
body[data-current-view="publisher"] .publisher-version-row,
body[data-current-view="publisher"] .publisher-version-row span {
  min-height: 0;
  max-height: 100%;
  overflow: hidden !important;
}

body[data-current-view="publisher"] .publisher-version-copy > strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-current-view="publisher"] .publisher-version-row span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

body[data-current-view="publisher"] .publisher-review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

body[data-current-view="publisher"] .publisher-review-article-pane {
  order: 1;
}

body[data-current-view="publisher"] .publisher-review-version-pane {
  order: 2;
}

body[data-current-view="publisher"] .publisher-finalize-button {
  display: block;
  width: 100%;
  margin: 18px 0 0;
}

/* Compact official publication ledger. Keep this after the equal-height topic-card lock. */
body[data-current-view="publisher"] .publisher-topic-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 14px;
}

body[data-current-view="publisher"] .publisher-topic-filter-run { margin: 0; }

body[data-current-view="publisher"] .publisher-published-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #b8d1cd;
  border-radius: 21px;
  background: #fff;
  color: #0f766e;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px -16px rgba(15, 76, 70, 0.8);
}

body[data-current-view="publisher"] .publisher-published-refresh:hover { border-color: #0f766e; background: #f0fdfa; }
body[data-current-view="publisher"] .publisher-published-refresh:disabled { cursor: wait; opacity: 0.68; }
body[data-current-view="publisher"] .publisher-published-refresh.is-loading .publisher-published-refresh-icon { animation: publisher-refresh-spin 850ms linear infinite; }
@keyframes publisher-refresh-spin { to { transform: rotate(360deg); } }

body[data-current-view="publisher"] .publisher-published-refresh-status {
  margin: -4px 0 14px;
  padding: 9px 12px;
  border-left: 3px solid #0f766e;
  border-radius: 7px;
  background: #f0f7f6;
  color: #45615d;
  font-size: 12px;
  line-height: 1.5;
}

body[data-current-view="publisher"] .publisher-published-refresh-status[data-kind="success"] { border-left-color: #16835b; color: #166534; }
body[data-current-view="publisher"] .publisher-published-refresh-status[data-kind="error"] { border-left-color: #dc2626; color: #991b1b; }

body[data-current-view="publisher"] .publisher-topic-list.is-published-view { display: block; min-height: 0; }

body[data-current-view="publisher"] .publisher-published-table {
  overflow: hidden;
  border: 1px solid #d9e4e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 34px -30px rgba(15, 76, 70, 0.72);
}

body[data-current-view="publisher"] .publisher-published-head,
body[data-current-view="publisher"] .publisher-published-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) minmax(115px, .95fr) minmax(140px, 1.05fr) minmax(145px, 1fr) minmax(105px, .78fr) minmax(145px, 1fr);
  align-items: center;
}

body[data-current-view="publisher"] .publisher-published-head {
  min-height: 46px;
  padding: 0 18px;
  background: #eaf3f1;
  color: #46635f;
  font-size: 12px;
  font-weight: 850;
}

body[data-current-view="publisher"] .publisher-published-row {
  min-height: 72px;
  padding: 0 18px;
  border-top: 1px solid #e5eceb;
  color: #3e4d5f;
  font-size: 13px;
}

body[data-current-view="publisher"] .publisher-published-row:hover { background: #f8fbfa; }
body[data-current-view="publisher"] .publisher-published-cell { min-width: 0; padding: 12px 14px 12px 0; line-height: 1.45; }

body[data-current-view="publisher"] .publisher-published-title a,
body[data-current-view="publisher"] .publisher-published-title > span {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}

body[data-current-view="publisher"] .publisher-published-title a:hover { color: #0f766e; }
body[data-current-view="publisher"] .publisher-published-time { color: #536b67; font-variant-numeric: tabular-nums; }

body[data-current-view="publisher"] .publisher-published-type {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf6f4;
  color: #0f766e;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

body[data-current-view="publisher"] .publisher-published-tracking {
  display: inline-block;
  color: #496762;
  font-size: 11px;
  line-height: 1.55;
  white-space: nowrap;
}

body[data-current-view="publisher"] .publisher-published-tracking strong { color: #0f766e; font-weight: 850; }

body[data-current-view="publisher"] .publisher-topic-history-card,
body[data-current-view="publisher"] .publisher-topic-history-card .publisher-topic-history-copy {
  height: auto !important;
  min-height: 0 !important;
}

/* Publisher upload workspace visual polish: deliberately scoped to this view only. */
body[data-current-view="publisher"] .publisher-runtime-status {
  position: relative;
  overflow: hidden;
  border-color: #d4e3e0;
  background: linear-gradient(90deg, #ffffff 0%, #fbfefd 64%, #f1f9f7 100%);
  box-shadow: 0 12px 30px -28px rgba(15, 76, 70, .72);
}

body[data-current-view="publisher"] .publisher-runtime-status::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, #26a995, transparent);
  transform: translateX(-100%);
  opacity: 0;
}

body[data-current-view="publisher"] .publisher-runtime-status[data-kind="working"]::after {
  opacity: 1;
  animation: publisher-status-sweep 1.45s ease-in-out infinite;
}

body[data-current-view="publisher"] .publisher-evidence-panel,
body[data-current-view="publisher"] .publisher-topic-stage {
  position: relative;
  overflow: hidden;
  border-color: #d7e4e1;
  box-shadow: 0 24px 52px -42px rgba(15, 61, 67, .55);
}

body[data-current-view="publisher"] .publisher-evidence-panel::before,
body[data-current-view="publisher"] .publisher-topic-stage::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  content: "";
  background: linear-gradient(90deg, transparent, #86cfc3 24%, #128b7c 50%, #86cfc3 76%, transparent);
  opacity: .72;
}

body[data-current-view="publisher"] .publisher-step {
  position: relative;
  overflow: hidden;
  border: 1px solid #d5e9e5;
  background: linear-gradient(145deg, #f4fbf9, #e1f2ee);
  box-shadow: 0 9px 20px -14px rgba(15, 118, 110, .65);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

body[data-current-view="publisher"] .publisher-section-title:hover .publisher-step {
  transform: translateY(-2px) rotate(-3deg);
  box-shadow: 0 13px 24px -14px rgba(15, 118, 110, .72);
}

body[data-current-view="publisher"] .publisher-dropzone {
  min-height: 174px;
  border-color: #85c6bc;
  background:
    radial-gradient(circle at 50% -12%, rgba(41, 169, 148, .16), transparent 48%),
    linear-gradient(155deg, #fbfefd 0%, #eff9f7 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.82), 0 16px 32px -30px rgba(15,118,110,.8);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

body[data-current-view="publisher"] .publisher-dropzone:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 19px 34px -25px rgba(15,118,110,.58);
}

body[data-current-view="publisher"] .publisher-upload-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 2px;
  border: 1px solid #bee1da;
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 9px 24px -16px rgba(15,118,110,.7);
}

body[data-current-view="publisher"] .publisher-upload-emblem::before {
  width: 15px;
  height: 15px;
  border-top: 2px solid #128b7c;
  border-left: 2px solid #128b7c;
  content: "";
  transform: translateY(3px) rotate(45deg);
}

body[data-current-view="publisher"] .publisher-upload-emblem::after {
  position: absolute;
  top: 13px;
  width: 2px;
  height: 19px;
  border-radius: 2px;
  content: "";
  background: #128b7c;
}

body[data-current-view="publisher"] .publisher-file-item {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #edf2f1;
  background: linear-gradient(90deg, #fbfdfd, #f5f9f8);
  transition: border-color 150ms ease, transform 150ms ease;
}

body[data-current-view="publisher"] .publisher-file-item::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: #28a78f;
  box-shadow: 0 0 0 3px rgba(40,167,143,.11);
}

body[data-current-view="publisher"] .publisher-file-item:hover {
  border-color: #cfe3df;
  transform: translateX(2px);
}

body[data-current-view="publisher"] .publisher-evidence-insights {
  padding: 17px;
}

body[data-current-view="publisher"] .publisher-insight-heading { gap: 12px; }
body[data-current-view="publisher"] .publisher-insight-heading strong { font-size: 15px; }
body[data-current-view="publisher"] .publisher-insight-heading span:last-child { font-size: 12px; }
body[data-current-view="publisher"] .publisher-insight-orbit { width: 34px; height: 34px; flex-basis: 34px; }
body[data-current-view="publisher"] .publisher-insight-empty { font-size: 12.5px; line-height: 1.65; }
body[data-current-view="publisher"] .publisher-insight-content { gap: 14px; margin-top: 15px; }
body[data-current-view="publisher"] .publisher-insight-headline { font-size: 13.5px; line-height: 1.65; }
body[data-current-view="publisher"] .publisher-insight-metrics { gap: 8px; }
body[data-current-view="publisher"] .publisher-insight-metric { gap: 3px; padding: 10px 8px; border-radius: 10px; }
body[data-current-view="publisher"] .publisher-insight-metric b { font-size: 18px; }
body[data-current-view="publisher"] .publisher-insight-metric span { font-size: 10.5px; }
body[data-current-view="publisher"] .publisher-insight-label { font-size: 10.5px; letter-spacing: .06em; }
body[data-current-view="publisher"] .publisher-insight-tags { gap: 7px; margin-top: 5px; }
body[data-current-view="publisher"] .publisher-insight-tag { padding: 6px 9px; font-size: 10.5px; }
body[data-current-view="publisher"] .publisher-insight-list { gap: 8px; margin-top: 5px; }
body[data-current-view="publisher"] .publisher-insight-list li { padding-left: 15px; font-size: 11.5px; line-height: 1.65; }
body[data-current-view="publisher"] .publisher-insight-details { padding-top: 11px; }
body[data-current-view="publisher"] .publisher-insight-details summary { font-size: 11.5px; }
body[data-current-view="publisher"] .publisher-insight-details p { font-size: 10.5px; line-height: 1.65; }

body[data-current-view="publisher"] .publisher-topic-filter-run {
  padding: 4px;
  border: 1px solid #dce8e6;
  background: linear-gradient(180deg, #eef4f3, #e7f0ee);
  box-shadow: inset 0 1px 2px rgba(15,76,70,.04);
}

body[data-current-view="publisher"] .publisher-topic-filter {
  min-height: 44px;
  border-radius: 19px;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body[data-current-view="publisher"] .publisher-topic-filter:hover { transform: translateY(-1px); }
body[data-current-view="publisher"] .publisher-topic-filter.is-active { box-shadow: 0 7px 18px -12px rgba(15,76,70,.58); }

body[data-current-view="publisher"] .publisher-secondary-button,
body[data-current-view="publisher"] .publisher-published-refresh,
body[data-current-view="publisher"] .publisher-topic-pager button {
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

body[data-current-view="publisher"] .publisher-secondary-button:hover,
body[data-current-view="publisher"] .publisher-published-refresh:hover,
body[data-current-view="publisher"] .publisher-topic-pager button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -18px rgba(15,76,70,.65);
}

body[data-current-view="publisher"] .publisher-topic-card {
  isolation: isolate;
  border-color: #d8e3e1;
  box-shadow: 0 15px 34px -32px rgba(15,61,67,.72);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body[data-current-view="publisher"] .publisher-topic-card::before {
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  z-index: 3;
  height: 3px;
  border-radius: 0 0 999px 999px;
  content: "";
  background: linear-gradient(90deg, transparent, #75c9bb, transparent);
  opacity: 0;
  transform: scaleX(.55);
  transition: opacity 180ms ease, transform 180ms ease;
}

body[data-current-view="publisher"] .publisher-topic-card:hover {
  transform: translateY(-3px);
  border-color: #8fc8bf;
  box-shadow: 0 22px 42px -30px rgba(15,76,70,.58);
}

body[data-current-view="publisher"] .publisher-topic-card:hover::before,
body[data-current-view="publisher"] .publisher-topic-card.is-selected::before { opacity: 1; transform: scaleX(1); }
body[data-current-view="publisher"] .publisher-topic-card.is-selected { background: linear-gradient(180deg, #fff 0%, #fbfefd 100%); }
body[data-current-view="publisher"] .publisher-card-translate { transition: border-color 160ms ease, background-color 160ms ease, transform 180ms ease; }
body[data-current-view="publisher"] .publisher-topic-card:hover .publisher-card-translate { transform: translateX(2px); }

body[data-current-view="publisher"] .publisher-topic-detail {
  border: 1px solid #e3eeec;
  background: linear-gradient(135deg, #f5faf9, #edf7f5);
}

body[data-current-view="publisher"] .publisher-topic-radio { transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
body[data-current-view="publisher"] .publisher-topic-card.is-selected .publisher-topic-radio { box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px rgba(15,118,110,.11); transform: translateX(-50%) scale(1.06); }

body[data-current-view="publisher"] .publisher-topic-list.is-loading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-current-view="publisher"] .publisher-topic-skeleton {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 480px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #dce7e5;
  border-radius: 14px;
  background: #fbfdfd;
}

body[data-current-view="publisher"] .publisher-topic-skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.9) 48%, transparent 66%);
  transform: translateX(-100%);
  animation: publisher-card-shimmer 1.55s ease-in-out infinite;
  animation-delay: var(--skeleton-delay);
}

body[data-current-view="publisher"] .publisher-skeleton-line,
body[data-current-view="publisher"] .publisher-skeleton-block,
body[data-current-view="publisher"] .publisher-skeleton-radio {
  display: block;
  border-radius: 8px;
  background: #e6efed;
}

body[data-current-view="publisher"] .publisher-skeleton-line.is-title { width: 74%; height: 22px; }
body[data-current-view="publisher"] .publisher-skeleton-line.is-meta { width: 48%; height: 12px; }
body[data-current-view="publisher"] .publisher-skeleton-block { height: 116px; margin-top: 12px; }
body[data-current-view="publisher"] .publisher-skeleton-block.is-short { height: 92px; }
body[data-current-view="publisher"] .publisher-skeleton-radio { position: absolute; bottom: 14px; left: 50%; width: 18px; height: 18px; border-radius: 50%; transform: translateX(-50%); }

@keyframes publisher-status-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes publisher-card-shimmer { to { transform: translateX(100%); } }

@media (max-width: 980px) {
  body[data-current-view="publisher"] .publisher-topic-list.is-loading-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-current-view="publisher"] .publisher-runtime-status::after,
  body[data-current-view="publisher"] .publisher-topic-skeleton::after { animation: none !important; }
  body[data-current-view="publisher"] .publisher-topic-card,
  body[data-current-view="publisher"] .publisher-step,
  body[data-current-view="publisher"] .publisher-dropzone { transition: none !important; }
}

@media (max-width: 1060px) {
  body[data-current-view="publisher"] .publisher-published-head { display: none; }
  body[data-current-view="publisher"] .publisher-published-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    background: #f5f9f8;
  }
  body[data-current-view="publisher"] .publisher-published-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    align-content: start;
    min-height: 0;
    padding: 16px;
    border: 1px solid #dfe9e7;
    border-radius: 12px;
    background: #fff;
  }
  body[data-current-view="publisher"] .publisher-published-cell { padding: 0; }
  body[data-current-view="publisher"] .publisher-published-cell::before {
    display: block;
    margin-bottom: 4px;
    color: #80908d;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
  }
  body[data-current-view="publisher"] .publisher-published-title { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid #edf2f1; }
}

@media (max-width: 700px) {
  body[data-current-view="publisher"] .publisher-topic-filter-toolbar { align-items: stretch; flex-direction: column; }
  body[data-current-view="publisher"] .publisher-topic-filter-run { width: 100%; }
  body[data-current-view="publisher"] .publisher-published-refresh { align-self: flex-end; }
  body[data-current-view="publisher"] .publisher-published-body { grid-template-columns: 1fr; }
}
.publisher-image-brief,
.publisher-distribution-preview {
  border: 1px solid rgba(184, 95, 10, 0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 250, 244, 0.96), rgba(255, 255, 255, 0.98));
  padding: 18px;
  margin-top: 16px;
}

.publisher-image-brief h3,
.publisher-distribution-preview b {
  color: #71380a;
}

.publisher-image-brief ol,
.publisher-distribution-preview ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.publisher-image-brief li,
.publisher-distribution-preview li {
  margin: 10px 0;
}

.publisher-image-brief li strong,
.publisher-distribution-preview li strong,
.publisher-distribution-preview li span,
.publisher-distribution-preview li small {
  display: block;
}

.publisher-image-brief li span,
.publisher-distribution-preview li span,
.publisher-distribution-preview li small,
.publisher-distribution-preview p {
  color: #5d6878;
  line-height: 1.65;
}

.publisher-distribution-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(184, 95, 10, 0.28);
  font-size: 12px;
}

.publisher-distribution-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.publisher-distribution-heading button { flex: 0 0 auto; border: 1px solid rgba(184, 95, 10, .26); border-radius: 999px; background: #fff; color: #9a4c08; padding: 7px 11px; font-weight: 800; cursor: pointer; }

.publisher-asset-library { margin-top: 16px; border: 1px solid rgba(15, 118, 110, .22); border-radius: 18px; background: #fff; overflow: hidden; }
.publisher-asset-library > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; cursor: pointer; list-style: none; background: linear-gradient(145deg, rgba(240, 253, 250, .95), #fff); }
.publisher-asset-library > summary::-webkit-details-marker { display: none; }
.publisher-asset-library > summary span:first-child { display: grid; gap: 4px; }
.publisher-asset-library > summary b { color: #115e59; }
.publisher-asset-library > summary small { color: #64748b; line-height: 1.5; }
.publisher-asset-library > summary span:last-child { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font-weight: 800; }
.publisher-asset-library-body { padding: 18px; border-top: 1px solid #e2e8f0; }
.publisher-asset-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.publisher-asset-form label { display: grid; gap: 6px; color: #475569; font-size: 12px; font-weight: 800; }
.publisher-asset-form input:not([type="checkbox"]), .publisher-asset-form select, .publisher-asset-match select { width: 100%; min-height: 42px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; padding: 8px 10px; color: #0f172a; }
.publisher-asset-url-field, .publisher-asset-tags-field { grid-column: span 2; }
.publisher-asset-check { display: flex !important; align-items: center; grid-auto-flow: column; justify-content: start; align-self: center; }
.publisher-asset-check input { width: 18px; height: 18px; }
.publisher-asset-status { min-height: 20px; margin: 10px 0 0; color: #0f766e; font-size: 12px; }
.publisher-asset-list { display: grid; gap: 8px; margin-top: 12px; }
.publisher-asset-list > p { margin: 0; color: #64748b; }
.publisher-asset-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.publisher-asset-list article div { display: grid; gap: 4px; min-width: 0; }
.publisher-asset-list article span, .publisher-asset-list article a { color: #64748b; font-size: 12px; overflow-wrap: anywhere; }
.publisher-asset-list article a { color: #0f766e; }
.publisher-asset-list article button { border: 0; background: transparent; color: #b91c1c; cursor: pointer; }
.publisher-asset-match { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); align-items: center; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #cbd5e1; }
.publisher-asset-match div { display: grid; gap: 4px; }
.publisher-asset-match small { color: #64748b; line-height: 1.5; }

.publisher-image-workbench-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.98));
}

.publisher-image-workbench-entry h3 { margin: 2px 0 6px; color: #115e59; }
.publisher-image-workbench-entry p { margin: 0; color: #53625f; line-height: 1.6; }
.publisher-image-workbench-actions { display: flex; flex: 0 0 auto; gap: 10px; }

@media (max-width: 820px) {
  .publisher-image-workbench-entry { align-items: stretch; flex-direction: column; }
  .publisher-image-workbench-actions { flex-direction: column; }
  .publisher-asset-form { grid-template-columns: 1fr; }
  .publisher-asset-url-field, .publisher-asset-tags-field { grid-column: auto; }
  .publisher-asset-match { grid-template-columns: 1fr; }
  .publisher-distribution-heading { align-items: flex-start; flex-direction: column; }
}

/* Publisher review: one clear review -> image -> publish journey. */
.publisher-review-stage {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
}

.publisher-review-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.publisher-review-flow li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 13px 14px;
  border: 1px solid #dfe7e7;
  border-radius: 14px;
  background: #fff;
}

.publisher-review-flow li > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #edf3f3;
  color: #536564;
  font-weight: 900;
}

.publisher-review-flow b { color: #273737; font-size: 13px; }
.publisher-review-flow small { margin-top: 2px; color: #7a8a89; font-size: 11px; line-height: 1.35; }
.publisher-review-flow .is-complete { border-color: #c8e8e3; background: #f4fbfa; }
.publisher-review-flow .is-complete > span { background: #d8f3ed; color: #0f766e; }
.publisher-review-flow .is-current { border-color: #efc99f; background: #fffaf4; box-shadow: 0 10px 24px -22px rgba(184, 95, 10, .65); }
.publisher-review-flow .is-current > span { background: #fbe8d1; color: #a54f08; }

.publisher-review-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.publisher-review-tool-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dce6e5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px -32px rgba(15, 76, 70, .62);
}

.publisher-review-tool-card-image { background: linear-gradient(145deg, #f2fbf9 0%, #fff 58%); }
.publisher-review-tool-card-assets { background: linear-gradient(145deg, #f7fafc 0%, #fff 62%); }
.publisher-tool-card-heading { display: flex; align-items: flex-start; gap: 12px; }
.publisher-tool-card-heading h3 { margin: 1px 0 5px; color: #183d3a; font-size: 18px; }
.publisher-tool-card-heading p:not(.eyebrow) { margin: 0; color: #64748b; font-size: 12px; line-height: 1.55; }
.publisher-tool-card-index {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #d9f3ee;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.publisher-review-tool-card .publisher-cover-preview {
  min-height: 70px;
  margin: 14px 0 12px;
  padding: 10px;
  border-color: #dce8e6;
  background: rgba(255,255,255,.82);
}

.publisher-review-tool-card .publisher-cover-placeholder { min-height: 54px; justify-content: flex-start; padding: 0 4px; }
.publisher-review-tool-card .publisher-image-workbench-actions { justify-content: flex-end; }
.publisher-review-tool-card .publisher-image-workbench-actions .btn { min-width: min(100%, 250px); white-space: normal; line-height: 1.25; }
.publisher-tool-details { margin-top: 12px; border-top: 1px solid #e3ebea; }
.publisher-tool-details > summary { padding: 12px 0 6px; color: #3d5d5a; font-size: 12px; font-weight: 800; cursor: pointer; }
.publisher-tool-details .publisher-image-brief { margin: 6px 0 10px; padding: 13px; border-color: #ead8c4; border-radius: 13px; }
.publisher-tool-details .publisher-image-brief h3 { font-size: 15px; }
.publisher-tool-details .publisher-image-brief p,
.publisher-tool-details .publisher-image-brief li { font-size: 12px; }

.publisher-asset-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
.publisher-asset-metrics > span { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid #e1e8ec; border-radius: 13px; background: rgba(248,250,252,.9); }
.publisher-asset-metrics b { color: #0f766e; font-size: 22px; line-height: 1; }
.publisher-asset-metrics small { color: #718096; font-size: 11px; }
.publisher-review-tool-card .publisher-asset-status { min-height: 0; margin: 12px 0 0; color: #596a70; line-height: 1.55; }
.publisher-review-tool-card .publisher-asset-list { gap: 7px; margin-top: 10px; }
.publisher-review-tool-card .publisher-asset-list article { align-items: flex-start; padding: 10px 11px; border-color: #e6ecef; background: #fbfcfd; }
.publisher-review-tool-card .publisher-asset-list article b { color: #314155; font-size: 12px; line-height: 1.4; }
.publisher-review-tool-card .publisher-asset-list article a { flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; background: #eef7f5; font-size: 11px; text-decoration: none; }

.publisher-distribution-preview {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid #e2e8f0;
  border-radius: 0;
  background: #fff;
}

.publisher-distribution-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
}
.publisher-distribution-details > summary::-webkit-details-marker { display: none; }
.publisher-distribution-details > summary span { display: grid; gap: 3px; }
.publisher-distribution-details > summary b { color: #254d49; font-size: 13px; }
.publisher-distribution-details > summary small { color: #788887; font-size: 10px; line-height: 1.4; }
.publisher-distribution-details > summary em { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #eef7f5; color: #0f766e; font-size: 10px; font-style: normal; font-weight: 800; }
.publisher-distribution-body { padding: 0 18px 16px; border-top: 1px solid #edf1f3; }
.publisher-distribution-body > p { margin: 12px 0; font-size: 11px; }
.publisher-distribution-body ol { margin: 0; padding: 0; list-style: none; }
.publisher-distribution-body li { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; padding: 10px; border: 1px solid #e6ebef; border-radius: 11px; background: #fbfcfd; }
.publisher-distribution-body li > div { min-width: 0; }
.publisher-distribution-body li strong { color: #334155; font-size: 12px; }
.publisher-distribution-body li span,
.publisher-distribution-body li small { font-size: 10px; line-height: 1.45; }
.publisher-distribution-body li button { flex: 0 0 112px; min-height: 34px; padding: 5px 8px; border: 1px solid #b7d5d0; border-radius: 9px; background: #fff; color: #0f766e; font-size: 10px; font-weight: 800; white-space: normal; cursor: pointer; }
.publisher-distribution-body li button:disabled { border-color: #e2e8f0; background: #f8fafc; color: #94a3b8; cursor: not-allowed; }

@media (max-width: 1050px) {
  .publisher-review-tools-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .publisher-review-flow { grid-template-columns: 1fr; }
  .publisher-review-tool-card { padding: 15px; }
  .publisher-asset-metrics { grid-template-columns: 1fr; }
  .publisher-distribution-body li { align-items: stretch; flex-direction: column; }
  .publisher-distribution-body li button { width: 100%; flex-basis: auto; }
}
