:root {
  color-scheme: light;
  --brand: #1E88E5;
  --action: #1565C0;
  --action-hover: #0D47A1;
  --navy: #102A43;
  --ink: #172B42;
  --muted: #465D76;
  --canvas: #F5F6F8;
  --surface: #fff;
  --soft: #F7F8FA;
  --selected: #E7F2FF;
  --line: #E2E7EE;
  --control-line: #BBC6D3;
  --danger: #A52836;
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 15px/1.6 Inter, "Microsoft YaHei", system-ui, sans-serif;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 14px max(20px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy);
}
.brand { font-size: 20px; font-weight: 750; }
.brand span { color: var(--brand); }
#version { color: var(--muted); font-size: 13px; }
main {
  max-width: 1320px;
  margin: auto;
  padding: 28px 20px 44px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
}
aside { align-self: start; }
nav { display: grid; gap: 6px; }
.config-main { display: block; }
.config-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.config-toolbar nav { display: flex; flex-wrap: wrap; }
.workspace {
  min-width: 0;
  padding: clamp(16px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 24px #102A4309;
}
h1 { margin: 0 0 20px; font-size: clamp(25px, 4vw, 36px); line-height: 1.25; }
h2 { margin: 20px 0 8px; font-size: 18px; line-height: 1.4; }
p { margin: 8px 0 12px; }
small, dd { color: var(--muted); }
dd { margin: 0 0 10px; overflow-wrap: anywhere; }
dt, summary { font-weight: 650; }
summary { cursor: pointer; }
a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--action-hover); }
button, input, textarea, select { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--action);
  color: white;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
}
button:hover:not(:disabled), .button:hover { background: var(--action-hover); color: white; }
button:disabled { opacity: .6; cursor: wait; }
.secondary, .theme-select, nav button {
  border-color: var(--control-line);
  background: var(--surface);
  color: var(--action);
}
.secondary:hover:not(:disabled), .theme-select:hover:not(:disabled), nav button:hover:not(:disabled) {
  background: var(--selected);
  color: var(--action-hover);
}
nav button { justify-content: flex-start; border-color: transparent; }
nav button[aria-current], .theme-select[aria-pressed=true] { border-color: var(--brand); background: var(--selected); color: var(--action-hover); }
.theme-select[aria-pressed=true] { background: var(--action); color: white; }
.theme-select[aria-pressed=true]:hover { background: var(--action-hover); color: white; }
.step-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--selected);
  font-size: 12px;
}
[aria-current] .step-number { background: var(--action); color: white; }
:where(button, a, input, textarea, select, summary, .theme-body):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
label { display: grid; gap: 6px; margin: 12px 0; font-weight: 650; }
input, textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink);
  font-weight: 400;
}
textarea { min-height: 96px; resize: vertical; }
.primary-color-field { display: grid; gap: 8px; }
.primary-color-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; }
.primary-color-row input[type="color"] { height: 100%; padding: 5px; cursor: pointer; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 17px; min-height: 0; height: 17px; margin: 0; accent-color: var(--action); }
.grid, .themes, .profile-pair { display: grid; gap: 16px; }
.grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); }
.grid label { margin: 0; align-content: start; }
.themes, .profile-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-pair {
  min-width: 0;
  margin: 16px 0;
  padding: 8px 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.profile-pair legend { padding: 0 6px; font-weight: 700; }
.profile-pair label { margin: 0; }
.profile-pair textarea { min-height: 112px; }
.theme, .history-row {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.theme-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: 340px;
  gap: 10px 14px;
}
.theme-heading { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.theme-heading h2 { margin: 0; }
.theme-media, .theme-body { min-width: 0; min-height: 0; overflow: auto; overflow-wrap: anywhere; padding-right: 4px; }
.theme img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--soft); border-radius: 8px; }
.theme p { font-size: 14px; }
.theme-media .links { margin-top: 8px; font-size: 13px; }
.links, footer, .history-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
footer { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
footer:empty, #notice:empty, #admin-notice:empty { display: none; }
.history-row { justify-content: space-between; margin: 8px 0; }
.history-row a { flex: 1 1 200px; overflow-wrap: anywhere; }
.history-row button { color: var(--danger); }
.history-row button:hover { background: #FDECEF; color: var(--danger); }
.history-row + .history-row, #admin-view > .theme + .theme { margin-top: 10px; }
#view > .button + button, #admin-view button + button, #admin-view select + button { margin-inline-start: 8px; }
#admin-view > select { width: auto; max-width: 100%; }
#notice, #admin-notice { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--danger); }
pre, .template-preview {
  max-height: 72vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  overflow-wrap: anywhere;
}
pre { white-space: pre-wrap; }
.template-preview { margin-top: 16px; }
.template-preview table { width: 100%; margin: 12px 0; border-collapse: collapse; }
.template-preview th, .template-preview td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.template-preview th { background: var(--selected); }
.template-actions { justify-content: flex-end; }
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  aside nav { display: flex; flex-wrap: wrap; }
  .themes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  main { padding: 16px 12px 28px; }
  .config-toolbar nav { gap: 4px; }
  nav button { padding-inline: 8px; }
  .profile-pair, .theme-row { grid-template-columns: minmax(0, 1fr); }
  .theme-row { height: 460px; grid-template-rows: auto 150px minmax(0, 1fr); }
  .theme-media img { height: 108px; }
}

.header-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.brand small { display: inline-block; border-left: 1px solid var(--line); margin-left: 8px; padding-left: 12px; font-size: 13px; font-weight: 600; }
.config-main { max-width: 1140px; padding-top: 34px; }
.config-toolbar {
  padding: 7px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.config-toolbar nav { display: grid; width: 100%; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.config-toolbar nav button { justify-content: center; min-height: 46px; padding-inline: 6px; font-size: 14px; color: var(--muted); }
.config-toolbar nav button[aria-current] { color: var(--action-hover); border-color: transparent; }
.step-number { flex: none; background: #EEF1F5; }
.workspace { box-shadow: 0 12px 30px #102A4308; }
.workspace-heading { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.workspace-heading h1 { margin: 0; }
.workspace-heading p { margin: 8px 0 0; color: var(--muted); }
.intake-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: stretch; gap: clamp(20px, 4vw, 44px); }
.intake-fields { display: flex; flex-direction: column; }
.intake-fields label:first-child { margin-top: 0; }
.intake-fields label:last-child { flex: 1; grid-template-rows: auto minmax(152px, 1fr); margin-bottom: 0; }
.intake-fields textarea { min-height: 152px; }
.intake-guide {
  margin-top: 30px;
  border: 1px solid #DCEAFE;
  border-radius: 12px;
  padding: 18px;
  background: #F1F7FF;
  color: var(--muted);
  font-size: 14px;
}
.intake-guide h2 { margin: 0; color: var(--navy); font-size: 15px; }
.intake-guide ul { margin: 10px 0; padding-inline-start: 19px; }
.intake-guide li + li { margin-top: 5px; }
.intake-example { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #DCEAFE; }
.intake-example strong { display: block; color: var(--navy); }
#actions { justify-content: flex-end; }
.admin-main { width:100%; max-width:none; grid-template-columns:210px minmax(0,1fr); padding:24px; gap:24px; }
.admin-main aside:has(button) { padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
#admin-view > h1 { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
#admin-view > form { width:100%; max-width:none; }
@media (max-width: 700px) {
  .config-toolbar nav { display: flex; }
  .config-toolbar nav button { justify-content: flex-start; min-height: 40px; }
  .intake-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .intake-guide { margin-top: 0; padding: 13px; }
  #actions { justify-content: space-between; }
  .workspace-intake #actions { justify-content: flex-end; }
}

/* Keep the scrollbar space stable while its thumb is hidden. */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
@media (hover: hover) {
  *:hover { scrollbar-color: var(--brand) transparent; }
}
@supports not (scrollbar-color: transparent transparent) {
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
  @media (hover: hover) {
    *:hover::-webkit-scrollbar-thumb { background: var(--brand); }
  }
}

.theme-auto-choice { margin: 18px 0; justify-content: flex-end; }

.site-details-group { min-width: 0; margin: 0 0 20px; padding: 14px 18px 18px; border: 1px solid var(--line); border-radius: 12px; }
.site-details-group legend { padding: 0 6px; font-weight: 700; }
.site-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.site-details-wide { grid-column: 1 / -1; }
.site-details-grid textarea { min-height: 96px; }
@media (max-width: 600px) { .site-details-grid { grid-template-columns: minmax(0, 1fr); } }

.review-details > summary { margin-bottom: 16px; }
.review-group { margin-bottom: 16px; padding: 14px 18px 18px; border: 1px solid var(--line); border-radius: 12px; }
.review-group h2 { margin: 0 0 12px; font-size: 16px; }
.review-group dl { margin: 0; }
.review-group dl > div { min-width: 0; padding: 10px 12px; background: var(--soft); border-radius: 8px; }
.review-group dd { margin: 2px 0 0; white-space: pre-wrap; }
.review-actions { justify-content: space-between; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.review-actions .check { margin: 4px 0; }
.review-actions button { margin-inline-start: auto; }

.site-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 64px #102A4333;
}
.site-dialog::backdrop { background: #102A4366; }
.site-dialog h2 { margin: 0 0 8px; color: var(--navy); }
.site-dialog p { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.site-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.history-row .history-open {
  flex: 1 1 220px;
  min-width: 0;
  justify-content: flex-start;
  padding-inline: 0;
  background: transparent;
  color: var(--action);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.history-row .history-open:hover { background: transparent; color: var(--action-hover); }
.history-row .history-actions { margin-inline-start: auto; }
.history-row .history-actions a { flex: none; }
.history-dialog {
  width: min(1000px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
}
.history-dialog[open] { display: flex; flex-direction: column; }
.history-dialog h2 { overflow-wrap: anywhere; }
.history-dialog .history-preview { min-height: 0; margin-top: 8px; }
.history-dialog .history-preview p { margin: 8px 0 12px; color: var(--ink); white-space: normal; }
.history-dialog .history-preview h2 { margin: 20px 0 8px; }

.member-settings { margin-inline-start: auto; }
.member-settings label { min-width: 110px; margin: 0; }
.member-settings input { width: 120px; }

.trust-page { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.trust-page textarea { margin-bottom: 8px; }
.trust-editor textarea { min-height: 288px; }
.trust-page .links { flex-wrap: wrap; }

.theme-row.theme-with-previews {
  height: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 128px auto auto auto;
}
.theme-preview-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.theme-preview-gallery figure { margin: 0; min-width: 0; }
.theme-preview-gallery img { object-fit: cover; object-position: top; }
.theme-preview-gallery figcaption { display: flex; gap: 4px 8px; flex-wrap: wrap; margin-top: 5px; font-size: 12px; }
.theme-preview-links { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 13px; }

.theme-preview-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.theme-download { position: relative; flex: none; }
.theme-download summary { cursor: pointer; list-style: none; }
.theme-download summary::-webkit-details-marker { display: none; }
.theme-download-menu { position: absolute; inset-inline-end: 0; bottom: calc(100% + 6px); z-index: 2; min-width: max-content; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel, white); box-shadow: 0 6px 18px #162a4626; }
.theme-download-menu a { display: block; padding: 7px 10px; }
.theme-download-menu a:hover { background: var(--soft); }

.theme-download-menu { margin: 0; padding: 10px; }
.theme-download-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-download-menu .check { display: flex; margin: 0; font-size: 13px; }
.theme-download-option a { padding: 6px 0; font-size: 12px; }
.theme-download-menu button { width: 100%; margin-top: 8px; }

.config-main { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 22px; max-width: 1400px; }
.config-content { min-width: 0; }
.site-sidebar { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; padding: 18px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.site-sidebar h2 { margin: 0 0 16px; font-size: 18px; }
.site-sidebar > button { width: 100%; margin-bottom: 14px; }
.site-sidebar nav { display: grid; gap: 8px; }
.site-sidebar nav button { width: 100%; text-align: left; overflow-wrap: anywhere; font-size: 13px; }
.site-sidebar p { font-size: 13px; }
.site-sidebar [aria-current="page"] { background: #e6f2ff; border-color: #1e88e5; }
@media(max-width:900px) {
  .config-main { grid-template-columns: minmax(0,1fr); }
  .site-sidebar { position: static; max-height: none; }
  .site-sidebar nav { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); }
}

.site-functions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 64px; margin-bottom: 22px; padding: 8px 0; }
.site-functions button { background: #e8f2fd; border: 1px solid #c4ddf7; border-radius: 10px; padding: 13px 28px; min-height: 52px; font-size: 18px; font-weight: 650; color: #225985; }
.site-functions button.secondary:hover, .site-functions button.secondary:active { background: #d7eafb; border-color: #a9cef2; color: #174c78; }
.site-functions button[aria-pressed="true"], .site-functions button.secondary[aria-pressed="true"]:hover, .site-functions button.secondary[aria-pressed="true"]:active { color: #fff; background: #1E88E5; border-color: #1E88E5; }
.workspace > .config-toolbar { padding: 0 0 24px; margin-bottom: 28px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.config-toolbar[hidden] { display: none; }
.operations-placeholder { padding: 0; }
.operations-placeholder > .ops-nav:first-child { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.operations-placeholder h2 { font-size: 20px; overflow-wrap: anywhere; }



.ops-nav,.ops-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.ops-nav [aria-current] { background: #e6f2ff; color: #1565c0; }
.ops-table-wrap { overflow: auto; margin: 18px 0; }
.ops-table-wrap table { border-collapse: collapse; width: 100%; min-width: 700px; }
.ops-table-wrap td,.ops-table-wrap th { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; white-space: pre-wrap; }
.ops-editor-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ops-audiences { padding: 6px 20px 16px; }
.operations-placeholder pre,#admin-view pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 600px; overflow: auto; }
.ops-edit-dialog { max-height: 65vh; overflow: auto; padding: 8px; }

.ops-generation-status { padding: 14px 16px; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.ops-generation-status p { margin: 6px 0; }

.ops-industry-row { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.ops-industry-row > label { flex: 1; min-width: 0; margin: 0; }
.ops-industry-row > button { flex: none; margin: 0; }
.ops-results-summary { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.ops-results-summary h3 { margin: 0 0 10px; font-size: 16px; }

.ops-candidate-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 16px 0; }
.ops-candidate-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; transition: border-color .15s,background-color .15s; }
.ops-candidate-card.is-selected { border-color: #1E88E5; background: #f0f7ff; }
.ops-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.ops-card-choice { color: #4a6178; border: 0; background: transparent; padding: 4px 0; }
.ops-card-choice[aria-pressed="true"] { color: #1565c0; }
.ops-candidate-card textarea { min-height: 44px; height: auto; overflow: hidden; resize: vertical; line-height: 1.6; }
.ops-candidate-card > label { display: block; margin: 10px 0; }
.ops-candidate-card .ops-remove-icon { width: 32px; min-height: 32px; height: 32px; padding: 0; font-size: 24px; line-height: 1; color: #8a4a50; border: 0; background: transparent; }
.ops-candidate-card .ops-remove-icon:hover { color: #b42318; background: #fff0ed; }
.ops-audience-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ops-audience-chips button { white-space: normal; text-align: left; font-size: 13px; }
.ops-audience-chips button[aria-pressed="true"] { background: #1E88E5; border-color: #1E88E5; color: white; }
@media(max-width:700px){ .ops-candidate-grid { grid-template-columns: minmax(0,1fr); } }

.ops-candidate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.ops-next-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
@media(min-width:701px) and (max-width:1050px) { .ops-candidate-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }

.ops-confirmed-categories .ops-candidate-card h3 { margin: 12px 0; font-size: 16px; overflow-wrap: anywhere; }
.ops-confirmed-categories .ops-candidate-card p { white-space: pre-wrap; overflow-wrap: anywhere; }
.ops-confirmed-categories .ops-card-head > span { color: #1565c0; }

.ops-category-bottom-actions { margin-top: 18px; margin-bottom: 22px; }
.ops-candidate-actions button.ops-primary-action, .ops-candidate-actions button.ops-primary-action:hover { color: #fff; background: #1E88E5; border-color: #1E88E5; }

.ops-audience-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.ops-audience-heading button { font-size: 13px; padding: 5px 9px; min-height: 32px; }
.ops-audience-dialog { width: min(760px, calc(100vw - 32px)); max-width: 760px; }
.ops-full-audiences { max-height: 60vh; overflow: auto; padding: 6px 4px 16px; align-content: start; }

.ops-offering-list { margin: 16px 0; }
.ops-offering-row { display: grid; grid-template-columns: 76px minmax(170px,1fr) 120px minmax(250px,1.8fr) 32px; align-items: start; gap: 16px; padding: 20px 10px; border-bottom: 1px solid var(--line); }
.ops-offering-row.is-selected { background: #f0f7ff; box-shadow: inset 3px 0 #1E88E5; }
.ops-offering-row > label { min-width: 0; margin: 0; }
.ops-offering-row .ops-card-head { margin: 24px 0 0; }
.ops-offering-row textarea { min-height: 44px; resize: vertical; overflow: hidden; line-height: 1.6; }
.ops-offering-audiences { min-width: 0; }
.ops-offering-row .ops-audience-heading { margin: 0 0 5px; }
.ops-offering-row .ops-remove-icon { padding: 0; width: 32px; min-height: 32px; font-size: 24px; margin-top: 24px; border: 0; background: transparent; color: #8a4a50; }
.ops-offering-row .ops-remove-icon:hover { color: #b42318; background: #fff0ed; }
.ops-confirmed-offering { display: grid; grid-template-columns: minmax(170px,1fr) minmax(220px,2fr) auto; align-items: start; gap: 16px; padding: 18px 10px; border-bottom: 1px solid var(--line); }
.ops-confirmed-offering h3,.ops-confirmed-offering p { margin: 0; overflow-wrap: anywhere; }
@media(max-width:1100px){.ops-offering-row { grid-template-columns: 66px minmax(150px,1fr) 110px 32px; }.ops-offering-audiences { grid-column: 2 / 4; }.ops-offering-row > .ops-remove-icon { grid-column: 4; grid-row: 1; }}
@media(max-width:600px){.ops-offering-row { grid-template-columns: 60px minmax(0,1fr) 32px; gap: 12px; }.ops-offering-row > label { grid-column: 2; }.ops-offering-row .ops-offering-audiences { grid-column: 2; }.ops-offering-row > .ops-remove-icon { grid-column: 3; }.ops-confirmed-offering { grid-template-columns: minmax(0,1fr) auto; }.ops-confirmed-offering p { grid-column: 1; }}

.ops-offering-row { grid-template-columns: minmax(200px,1.1fr) 120px minmax(260px,1.8fr) 32px; gap: 14px; padding: 14px 8px; }
.ops-audience-text { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; line-height: 1.7; margin-top: 4px; font-size: 14px; }
.ops-offering-row > .ops-remove-icon { grid-column: auto; grid-row: auto; }
@media(min-width:701px) { .ops-offering-row > label { grid-column: auto; } .ops-offering-row .ops-offering-audiences { grid-column: auto; } }
@media(max-width:900px) { .ops-offering-row { grid-template-columns: minmax(170px,1fr) 110px 32px; } .ops-offering-row .ops-offering-audiences { grid-column: 1/3; } .ops-offering-row > .ops-remove-icon { grid-column: 3; grid-row: 1; } }
@media(max-width:600px) { .ops-offering-row { grid-template-columns: minmax(0,1fr) 100px 28px; gap: 8px; } .ops-offering-row > label { grid-column: auto; } }

/* Compact product controls and per-category folding. */
.ops-category-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:22px 0 12px; }
.ops-category-heading h3 { margin:0; }
.ops-category-heading button { flex:none; }
.ops-category-body[hidden] { display:none; }
.ops-offering-row { grid-template-columns:minmax(190px,1.1fr) 115px minmax(220px,1.8fr) 146px; }
.ops-offering-actions { display:flex; align-items:flex-start; justify-content:flex-end; gap:8px; }
.ops-offering-actions button { min-height:32px; padding:5px 10px; font-size:13px; white-space:nowrap; }
.ops-offering-select[aria-pressed="true"], .ops-offering-select[aria-pressed="true"]:hover { color:white; background:#1E88E5; border-color:#1E88E5; }
.ops-offering-remove { color:#b42318; }
.ops-confirmed-offering > label { margin:0; min-width:0; }
.ops-confirmed-offering textarea { min-height:44px; overflow:hidden; }
@media(max-width:1100px) { .ops-offering-row { grid-template-columns:minmax(160px,1fr) 110px 146px; } .ops-offering-row .ops-offering-audiences { grid-column:1/3; } .ops-offering-actions { grid-column:3; grid-row:1; } }
@media(max-width:600px) { .ops-offering-row { grid-template-columns:minmax(0,1fr) 100px; } .ops-offering-row .ops-offering-audiences { grid-column:1/-1; } .ops-offering-actions { grid-column:1/-1; grid-row:1; } }

.ops-audience-toolbar { display:flex; gap:10px; align-items:center; margin:12px 0; }
.ops-audience-add { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:12px 0; }
.ops-audience-add[hidden] { display:none; }
.ops-audience-add input { flex:1; min-width:180px; margin:0; }
.ops-audience-add small { flex-basis:100%; }

/* Align source arrows and let audience names use the space below row actions. */
.ops-offering-row select { appearance:none; -webkit-appearance:none; padding-right:32px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23384f68' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; background-size:12px 12px; }
.ops-audience-text { white-space:normal; text-overflow:clip; overflow:visible; overflow-wrap:anywhere; }
@media(min-width:1101px) {
 .ops-offering-row .ops-offering-audiences { grid-column:3/-1; grid-row:1; }
 .ops-offering-row .ops-audience-heading { margin-right:160px; min-height:32px; }
 .ops-offering-actions { grid-column:4; grid-row:1; position:relative; }
}
@media(min-width:601px) and (max-width:1100px) { .ops-offering-row .ops-offering-audiences { grid-column:1/-1; grid-row:2; } }
@media(max-width:600px) {
 .ops-offering-row > label { grid-row:2; }
 .ops-offering-row .ops-offering-audiences { grid-row:3; }
}

.ops-offering-toolbar { gap:12px; padding-top:4px; }
.ops-offering-toolbar > button { margin:0; }

@media(min-width:1101px) { .ops-offering-row.is-confirmed .ops-audience-heading { margin-right:0; } }

.ops-p03-scope { border:1px solid var(--line); border-radius:10px; padding:16px; margin-bottom:20px; min-width:0; }
.ops-p03-scope-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.ops-p03-scope-toolbar p { margin:0; font-size:14px; }
.ops-p03-category { padding:16px 0; border-top:1px solid var(--line); }
.ops-p03-category-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.ops-p03-category-heading .check { margin:0; }
.ops-p03-products { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 14px; }
.ops-p03-product { display:flex; align-items:center; gap:8px; min-width:0; padding:8px 10px; border:1px solid var(--line); border-radius:8px; }
.ops-p03-product.is-selected { border-color:#1E88E5; background:#f0f7ff; }
.ops-p03-product > .check { margin:0; flex:none; }
.ops-p03-product-name.secondary { border:0; background:transparent; text-align:left; padding:4px 0; min-height:32px; color:var(--ink,#17334e); white-space:normal; overflow-wrap:anywhere; }
.ops-p03-product-name.secondary:hover { color:#1565c0; text-decoration:underline; background:transparent; }
.ops-p03-audience-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; max-height:50vh; overflow:auto; padding:8px 0; }
.ops-p03-audience-options .check { margin:0; }
@media(max-width:1050px) { .ops-p03-products { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .ops-p03-products,.ops-p03-audience-options { grid-template-columns:minmax(0,1fr); } }

.ops-region-picker { border:1px solid var(--line); border-radius:10px; padding:16px; min-width:0; margin-bottom:20px; }
.ops-region-picker > p { font-size:14px; margin:0 0 16px; }
.ops-region-rows { display:grid; gap:14px; margin-bottom:16px; }
.ops-region-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 130px; gap:16px; align-items:end; }
.ops-region-row > label { min-width:0; margin:0; }
.ops-region-row > button { margin:0; }
.ops-region-row > small { align-self:center; padding-top:24px; }
@media(max-width:600px) { .ops-region-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .ops-region-row > button,.ops-region-row > small { grid-column:1/-1; justify-self:end; padding-top:0; } }

.ops-stage-picker { border:1px solid var(--line); border-radius:10px; padding:16px; margin-bottom:20px; min-width:0; }
.ops-stage-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 24px; padding:4px 0; }
.ops-stage-options .check { margin:0; align-items:flex-start; }
.ops-plan-dialog { width:min(1100px,calc(100vw - 40px)); max-width:1100px; max-height:90vh; }
.ops-plan-dialog .ops-plan-preview { max-height:calc(90vh - 200px); overflow:auto; padding:0 4px; }
.ops-plan-dialog .site-dialog-actions { gap:12px; margin-top:20px; }
@media(max-width:900px) { .ops-stage-options { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:500px) { .ops-stage-options { grid-template-columns:minmax(0,1fr); } .ops-plan-dialog { width:calc(100vw - 24px); padding:18px; } }

.ops-stage-options { gap:12px 24px; align-items:stretch; }
.ops-stage-options .check { display:grid; grid-template-columns:17px 32px minmax(0,1fr); gap:9px; align-items:center; min-height:36px; line-height:1.5; }
.ops-stage-options .check input { display:block; width:17px; height:17px; margin:0; }
.ops-stage-code { font-variant-numeric:tabular-nums; }
.ops-stage-name { min-width:0; overflow-wrap:anywhere; }

.ops-library-toolbar { display:flex; justify-content:flex-end; gap:12px; margin:0 0 18px; }
.ops-task-history-dialog { width:min(1100px,calc(100vw - 40px)); max-width:1100px; max-height:90vh; }
.ops-task-history-body { max-height:calc(90vh - 210px); overflow:auto; padding:0 5px; }
.ops-task-history-body .review-group { margin:0 0 16px; }
.ops-task-history-body .review-group > button { margin:8px 12px 0 0; }
.ops-task-history-body .ops-table-wrap { margin:12px 0; }
.ops-task-history-status:empty { display:none; }

/* Shared select affordance across the site and administration screens. */
select:not([multiple]) { appearance:none; -webkit-appearance:none; padding-right:38px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23384f68' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; background-size:12px 12px; }
.ops-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px 16px; align-items:end; padding:18px; border:1px solid var(--line); border-radius:10px; }
.ops-filters > label { margin:0; min-width:0; }
.ops-filters select,.ops-filters input { height:44px; }
.ops-filter-search { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:end; grid-column:1/-1; }
.ops-filter-search > label { margin:0; min-width:0; }
.ops-filter-search > button { margin:0; height:44px; }
.ops-library-progress { padding:16px 18px; border:1px solid var(--line); border-radius:10px; background:var(--soft); margin-bottom:20px; }
.ops-progress-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:10px; }
.ops-progress-heading > button { border:0; background:transparent; color:var(--muted); min-height:30px; width:30px; padding:0; font-size:23px; }
.ops-library-progress progress { display:block; width:100%; height:10px; border:0; border-radius:8px; overflow:hidden; background:var(--line); accent-color:var(--brand); }
.ops-library-progress progress::-webkit-progress-bar { background:var(--line); border-radius:8px; }
.ops-library-progress progress::-webkit-progress-value { background:var(--brand); border-radius:8px; transition:width .25s; }
.ops-library-progress p { margin:10px 0 0; font-size:14px; }
@media(max-width:1050px) { .ops-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .ops-filters { grid-template-columns:minmax(0,1fr); padding:14px; } }

.ops-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ops-main-nav { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:14px; align-items:stretch; justify-content:center; }
.ops-main-nav > button { width:100%; justify-content:center; gap:8px; padding:10px 8px; }
.ops-nav-number { display:inline-grid; place-items:center; flex:none; width:22px; height:22px; border-radius:50%; background:var(--selected); font-size:12px; font-variant-numeric:tabular-nums; }
.ops-main-nav > button[aria-current] .ops-nav-number { background:var(--action); color:white; }
.ops-main-nav > .ops-autosave-status { grid-column:1/-1; text-align:center; }
.ops-main-nav > .ops-autosave-status:empty { display:none; }
.ops-library-task-context { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:14px; font-size:14px; }
@media(max-width:1050px) { .ops-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:900px) { .ops-main-nav { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; } }
@media(max-width:600px) { .ops-filters { grid-template-columns:minmax(0,1fr); } .ops-main-nav { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.ops-library-actions { gap:12px; margin-bottom:18px; }
.ops-library-table table { table-layout:fixed; }
.ops-library-table th:nth-child(1) { width:58px; }
.ops-library-table th:nth-child(2) { width:42%; }
.ops-library-table th:nth-child(4) { width:108px; }
.ops-library-table td { overflow-wrap:anywhere; }

.sidebar-module { margin:0 0 14px; }
.sidebar-module:last-child { margin-bottom:0; }
.site-sidebar .sidebar-module-toggle { width:100%; text-align:center; justify-content:center; min-height:46px; font-size:15px; margin:0; }
.site-sidebar .sidebar-module-toggle[aria-pressed="true"] { color:white; background:var(--brand); border-color:var(--brand); }
.sidebar-module-sites { margin:12px 0 0; padding:0 0 0 10px; border-left:2px solid var(--line); }
.sidebar-module-sites > button { width:100%; margin-bottom:12px; }
.sidebar-module-sites > small { display:block; padding:4px 6px; }
.sidebar-module-sites nav { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
@media(max-width:900px) { .site-sidebar .sidebar-module-sites nav { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); } }

/* Keep module trees visible; scroll long site lists independently. */
.sidebar-module { margin-bottom:18px; }
.sidebar-module-sites { padding-left:8px; margin-top:8px; }
.site-sidebar .sidebar-new-site { justify-content:flex-start; font-size:13px; min-height:32px; padding:5px 8px; margin-bottom:6px; background:transparent; border:0; }
.site-sidebar .sidebar-site-list { display:grid; grid-template-columns:minmax(0,1fr); gap:2px; max-height:340px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-gutter:stable; }
.site-sidebar .sidebar-site-list button { width:100%; min-height:30px; padding:5px 6px; margin:0; border:0; border-radius:5px; background:transparent; text-align:left; justify-content:flex-start; font-size:12px; line-height:1.6; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
.site-sidebar .sidebar-site-list button:hover { background:var(--soft); color:var(--action); }
.site-sidebar .sidebar-site-list button[aria-current="page"] { background:var(--selected); color:var(--action); font-weight:650; }
.site-sidebar .sidebar-site-row { display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; gap:2px; min-width:0; }
.site-sidebar .sidebar-site-row .sidebar-site-more { padding:0; text-align:center; font-size:20px; line-height:1; color:var(--action); }
.sidebar-site-menu { position:fixed; inset:auto; margin:0; box-sizing:border-box; width:120px; padding:4px; border:1px solid #dbe3ee; border-radius:8px; background:#fff; box-shadow:0 6px 20px #17334f26; }
.site-sidebar .sidebar-site-menu .sidebar-site-action { padding:7px 12px; text-align:left; font-size:12px; color:var(--ink); }
.site-sidebar .sidebar-site-row .sidebar-site-action:hover { background:var(--soft); color:var(--action); }
.site-sidebar .sidebar-site-row .sidebar-site-delete:hover { color:#b42318; background:#fff1f0; }
.site-sidebar .sidebar-site-row.is-pinned { border-left:2px solid var(--action); padding-left:2px; }
.knowledge-member-workspace>label { display:grid; gap:8px; margin:20px 0; }
.knowledge-member-filters { display:grid; grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr)) auto; align-items:end; gap:14px; margin:20px 0; }
.knowledge-member-filters[hidden] { display:none; }
.knowledge-member-filters label { display:grid; gap:8px; min-width:0; }
.knowledge-member-card { padding:20px; margin:16px 0; border:1px solid #dbe3ee; border-radius:10px; overflow-wrap:anywhere; }
.knowledge-member-card h3 { margin-top:0; }
.knowledge-member-card p { white-space:pre-wrap; }
.knowledge-member-card a { display:inline-block; margin-top:12px; }
.knowledge-member-notice { padding:18px; background:var(--soft); border-radius:8px; }
.knowledge-member-dialog { width:min(900px,calc(100vw - 40px)); }
.knowledge-member-dialog>label { display:grid; gap:8px; }
.knowledge-member-card form { display:grid; gap:14px; }
.knowledge-member-card form>label { display:grid; gap:8px; }
.knowledge-member-card form>.knowledge-member-enable { display:flex; align-items:center; gap:8px; }
.knowledge-member-enable input { width:auto; }
@media(max-width:800px){ .knowledge-member-filters { grid-template-columns:minmax(0,1fr); } }
@media(max-width:900px) { .site-sidebar .sidebar-module-sites .sidebar-site-list { grid-template-columns:minmax(0,1fr); } }

.site-sidebar .sidebar-module-toggle { justify-content:space-between; gap:10px; padding:10px 12px; }
.sidebar-module-plus { flex:none; font-size:21px; line-height:1; font-weight:400; }

/* Continuous sidebar, joined to the header and viewport bottom. */
body.app-shell { height:100vh; height:100dvh; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; }
.app-shell > header { padding:14px 20px; }
.app-shell > .config-main { width:100%; max-width:none; margin:0; padding:0; display:grid; grid-template-columns:230px minmax(0,1fr); gap:0; min-height:0; overflow:hidden; }
.app-shell .site-sidebar { position:static; align-self:stretch; height:100%; min-height:0; max-height:none; padding:22px 14px; border:0; border-right:1px solid var(--line); border-radius:0; background:var(--surface); overflow-y:auto; }
.app-shell .config-content { min-height:0; overflow:auto; padding:28px 24px 44px; scrollbar-gutter:stable; }
@media(max-width:900px) { .app-shell > .config-main { grid-template-columns:200px minmax(0,1fr); } .app-shell .config-content { padding:20px 16px 32px; } }
@media(max-width:600px) { .app-shell > .config-main { grid-template-columns:160px minmax(0,1fr); } .app-shell .site-sidebar { padding:16px 10px; } .app-shell .sidebar-module-toggle { font-size:13px; padding:8px; } .app-shell .config-content { padding:16px 12px 24px; } }

.brand { display:flex; align-items:center; gap:8px; }
.brand-logo { display:block; flex:none; width:22px; height:22px; }

.ops-question-actions { display:flex; align-items:center; justify-content:flex-start; gap:14px; white-space:nowrap; }
.ops-question-actions .ops-text-action { display:inline; min-height:0; border:0; border-radius:0; padding:0; background:transparent; color:var(--action); font-size:14px; font-weight:500; line-height:1.6; }
.ops-question-actions .ops-text-action:hover:not(:disabled) { background:transparent; color:var(--action-hover); text-decoration:underline; }
.ops-question-actions .ops-delete-action { color:var(--danger); }
.ops-question-actions .ops-delete-action:hover:not(:disabled) { color:var(--danger); }
.ops-library-table th:nth-child(4) { width:116px; }

.collection-config-section { border:1px solid var(--line); border-radius:10px; padding:18px; margin:20px 0; min-width:0; }
.collection-config-section legend { padding:0 6px; font-weight:650; }
.collection-config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 20px; align-items:start; }
.collection-config-grid > label { margin:0; min-width:0; }
.collection-config-grid > .check { align-self:center; }
.collection-wide { grid-column:1/-1; }
.collection-platform-table { max-height:580px; }
.collection-platform-table th { position:sticky; top:0; background:var(--surface); z-index:1; }
.collection-platform-table label.check { font-size:12px; font-weight:500; margin:0; }
.collection-platform-table input:not([type=checkbox]) { min-width:180px; }
.collection-health { border-top:1px solid var(--line); margin-top:24px; padding-top:12px; }
.collection-health-values { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.collection-health-values > div { padding:10px; background:var(--soft); border-radius:8px; }
.collection-health-values dd { margin:4px 0 0; }
@media(max-width:700px) { .collection-config-grid,.collection-health-values { grid-template-columns:minmax(0,1fr); } }

.collection-task-toolbar { display:flex; align-items:end; gap:14px; margin:16px 0; }
.collection-task-toolbar label { flex:1; min-width:0; margin:0; }
.collection-task-summary { padding:18px; border:1px solid var(--line); border-radius:10px; background:var(--soft); margin:20px 0; }
.collection-task-summary progress { width:100%; height:10px; accent-color:var(--brand); display:block; }
.collection-question { border:1px solid var(--line); border-radius:10px; padding:14px; margin:14px 0; }
.collection-question > summary { line-height:1.7; }
.collection-answer { border-top:1px solid var(--line); margin-top:18px; padding-top:12px; min-width:0; }
.collection-answer h3 { font-size:16px; }
.collection-submitted-question { padding:10px 12px; background:var(--soft); white-space:pre-wrap; overflow-wrap:anywhere; }
.collection-answer-body { padding:12px 0; }
.collection-sources { background:var(--soft); border-radius:8px; padding:12px 16px; margin:16px 0; }
.collection-sources h4 { margin:0 0 8px; }
.collection-sources li { margin:10px 0; overflow-wrap:anywhere; }
.collection-sources p { margin:4px 0; font-size:13px; }
.collection-answer pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:400px; overflow:auto; }
.collection-result-error { color:var(--danger); }
.collection-site-choices { display:flex; flex-wrap:wrap; gap:12px; }
@media(max-width:600px) { .collection-task-toolbar { flex-wrap:wrap; } }

.collection-search-keywords { margin:16px 0; padding:12px 16px; background:var(--soft); border-radius:8px; }
.collection-search-keywords h4 { margin:0 0 8px; }
.collection-search-keywords ul { margin:8px 0 0; padding-left:22px; }
.collection-search-keywords li { margin:6px 0; overflow-wrap:anywhere; }
.collection-sources .collection-source-list { max-height:300px; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; margin:0; padding:0 12px 0 26px; }

/* Comfortable Markdown reading layout for collected answers. */
.template-preview.collection-answer-body { padding:24px 28px; margin:20px 0; max-height:none; overflow:visible; background:var(--surface); font-size:15px; line-height:1.85; }
.collection-answer-body > :first-child { margin-top:0; }
.collection-answer-body > :last-child { margin-bottom:0; }
.collection-answer-body p { margin:0 0 1em; }
.collection-answer-body h1,.collection-answer-body h2,.collection-answer-body h3,.collection-answer-body h4,.collection-answer-body h5,.collection-answer-body h6 { margin:1.6em 0 .7em; line-height:1.5; font-weight:700; }
.collection-answer-body h1 { font-size:26px; }
.collection-answer-body h2 { font-size:22px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.collection-answer-body h3 { font-size:19px; }
.collection-answer-body h4,.collection-answer-body h5,.collection-answer-body h6 { font-size:16px; }
.collection-answer-body ul,.collection-answer-body ol { margin:.7em 0 1.2em; padding-left:1.8em; }
.collection-answer-body li { margin:.4em 0; padding-left:.15em; }
.collection-answer-body li > p { margin:.3em 0; }
.collection-answer-body blockquote { margin:1.2em 0; padding:12px 18px; border-left:4px solid var(--brand); background:var(--soft); color:var(--muted); }
.collection-answer-body blockquote > :last-child { margin-bottom:0; }
.collection-answer-body :not(pre) > code { padding:2px 5px; border-radius:4px; background:var(--soft); font-size:.9em; }
.collection-answer-body pre { padding:16px; margin:1.2em 0; white-space:pre; overflow:auto; overflow-wrap:normal; font-size:13px; line-height:1.7; }
.collection-answer-body hr { margin:1.6em 0; border:0; border-top:1px solid var(--line); }
.collection-markdown-table { max-width:100%; overflow-x:auto; margin:1.2em 0; }
.collection-markdown-table table { min-width:460px; margin:0; }
.collection-answer-body th,.collection-answer-body td { padding:10px 12px; line-height:1.7; }
@media(max-width:600px) { .template-preview.collection-answer-body { padding:18px 16px; font-size:14px; } .collection-answer-body h1 { font-size:23px; } .collection-answer-body h2 { font-size:20px; } }

.collection-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; padding-bottom:22px; margin-bottom:24px; border-bottom:1px solid var(--line); }
.collection-steps button { justify-content:center; border:1px solid var(--control-line); }
.collection-question > summary { display:flex; align-items:center; gap:12px; list-style:none; }
.collection-question > summary::-webkit-details-marker { display:none; }
.collection-question > summary::before { content:'▸'; flex:none; }
.collection-question[open] > summary::before { content:'▾'; }
.collection-question-title { flex:1; min-width:0; overflow-wrap:anywhere; }
.collection-question .collection-generate-article { flex:none; font-size:13px; padding:8px 12px; min-height:36px; }
.collection-article-stage { padding:18px 0; }
.collection-article-stage h2 { margin-top:0; }
@media(max-width:700px) { .collection-steps { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .collection-question > summary { gap:8px; } .collection-question .collection-generate-article { padding:7px 9px; font-size:12px; } }

.collection-generated-article { padding:18px; margin:16px 0; border:1px solid var(--line); border-radius:10px; }

.collection-generated-article > progress {display:block;width:100%;margin-top:16px;}
.collection-article-question {color:var(--muted);margin-top:0;}

.collection-generated-article .collection-answer-body > h1:first-child { margin-top:0; margin-bottom:24px; line-height:1.45; }

.collection-article-header {display:flex;align-items:center;gap:12px;list-style:none;}
.collection-article-header::-webkit-details-marker {display:none;}
.collection-article-header::before {content:"▸";flex:none;}
.collection-generated-article[open] > .collection-article-header::before {content:"▾";}
.collection-article-header .collection-article-question {flex:1;min-width:0;margin:0;color:var(--text);font-weight:700;line-height:1.65;overflow-wrap:anywhere;}

.collection-generated-article .collection-answer-body {max-height:520px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;}

@media(max-width:600px) {.collection-article-header {gap:12px;} .collection-generated-article .collection-answer-body {max-height:60vh;}}

.collection-article-references li {margin:.65em 0;overflow-wrap:anywhere;}

.collection-organize-button {flex:none;font-size:13px;padding:8px 12px;}
.collection-organized-article {padding:18px;border:1px solid var(--line);border-radius:10px;margin:16px 0;}
.collection-organized-article > progress {width:100%;}
.article-organize-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px;align-items:start;}
.article-organize-wide {grid-column:1/-1;}
.article-organize-grid input,.article-organize-grid select,.article-organize-grid textarea {width:100%;box-sizing:border-box;}
.article-organize-form {margin-top:20px;}
@media(max-width:650px){.article-organize-grid {grid-template-columns:minmax(0,1fr);}.collection-organize-button {padding:7px 9px;}}

.article-country-field > span {display:block;font-weight:650;margin-bottom:8px;}
.article-country-select {position:relative;min-width:0;}
.article-country-select > summary {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;box-sizing:border-box;border:1px solid var(--control-line);border-radius:10px;background:var(--surface);padding:10px 36px 10px 14px;list-style:none;position:relative;font-weight:400;overflow-wrap:anywhere;}
.article-country-select > summary::-webkit-details-marker {display:none;}
.article-country-select > summary::after {content:'⌄';position:absolute;right:14px;top:50%;transform:translateY(-60%);}
.article-country-popup {position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:20;padding:12px;background:white;border:1px solid var(--control-line);border-radius:10px;box-shadow:0 8px 24px #132d4924;}
.article-country-options {max-height:260px;overflow-y:auto;margin-top:10px;overscroll-behavior:contain;}
.article-country-options label {display:flex;align-items:center;gap:10px;padding:8px 4px;margin:0;font-weight:400;cursor:pointer;}
.article-country-options input[type=checkbox] {width:16px;height:16px;min-height:0;margin:0;flex:none;}
.article-country-options label[hidden] {display:none;}

.article-cover-field {display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;}
.article-cover-field .links {margin:0;}
.article-cover-preview {max-width:220px;max-height:160px;object-fit:contain;border:1px solid var(--line);border-radius:8px;}
.article-cover-field small {overflow-wrap:anywhere;}

.publication-dialog {width:min(680px,calc(100vw - 40px));max-width:680px;max-height:85vh;overflow:auto;box-sizing:border-box;}
.publish-config-form {display:grid;gap:14px;margin:18px 0;}
.publish-config-form label {display:block;}
.publish-config-form input:not([type=checkbox]) {width:100%;box-sizing:border-box;}
.publication-target-choice {display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px;border:1px solid var(--line);border-radius:8px;margin:10px 0;cursor:pointer;}
.publication-target-choice small {flex:1 1 100%;margin-left:26px;overflow-wrap:anywhere;}
.publication-target-choice input {width:16px;height:16px;min-height:0;}
.publish-target-card {padding:18px;border:1px solid var(--line);border-radius:10px;margin:16px 0;overflow-wrap:anywhere;}
.publish-target-card h3 {margin-top:0;}
.publish-target-card > a,.publish-target-card > small {display:block;margin-top:12px;}

.article-organize-grid > label {align-content:start;min-width:0;}
.article-organize-grid > label > input,.article-organize-grid > label > select {height:44px;align-self:start;}

.cover-crop-dialog {width:min(760px,calc(100vw - 32px));max-width:760px;max-height:92vh;overflow:auto;box-sizing:border-box;}
.cover-crop-dialog canvas {display:block;width:100%;height:auto;aspect-ratio:16/9;border-radius:8px;touch-action:none;cursor:grab;}
.cover-crop-dialog canvas.dragging {cursor:grabbing;}
.cover-crop-dialog input[type=range] {width:100%;padding:0;min-height:28px;}
.article-cover-preview {aspect-ratio:16/9;object-fit:contain;}

.publish-card-header {display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px;}
.publish-card-header h3 {flex:1;min-width:0;margin:0;}
.publish-card-actions {display:flex;flex-wrap:wrap;gap:10px;flex:none;}
.publication-update-status {color:var(--action);font-weight:650;}
@media(max-width:700px){.publish-card-header {flex-direction:column;gap:12px;}.publish-card-actions {align-self:flex-end;}}

.collection-article-heading {display:flex;flex-direction:column;gap:8px;flex:1;min-width:0;}
.collection-article-heading .collection-article-question {flex:none;}
.collection-article-title {display:block;font-size:14px;line-height:1.65;font-weight:400;color:var(--muted);overflow-wrap:anywhere;}

.collection-question-translation {display:block;margin-top:8px;font-size:14px;font-weight:400;line-height:1.7;color:var(--muted);overflow-wrap:anywhere;}

.collection-selection-dialog {width:min(720px,calc(100vw - 32px));max-width:720px;max-height:88vh;overflow:auto;box-sizing:border-box;}
.collection-selection-dialog fieldset {border:1px solid var(--line);border-radius:10px;margin:16px 0;padding:14px;}
.collection-selection-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 16px;}
.collection-selection-options label {display:flex;gap:8px;align-items:center;margin:0;font-weight:400;cursor:pointer;}
.collection-selection-options input {width:16px;height:16px;min-height:0;margin:0;flex:none;}
@media(max-width:600px){.collection-selection-options {grid-template-columns:repeat(2,minmax(0,1fr));}}

.ops-filters.ops-library-filters {grid-template-columns:repeat(3,minmax(0,1fr));}
@media(max-width:1100px){.ops-filters.ops-library-filters {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.ops-filters.ops-library-filters {grid-template-columns:minmax(0,1fr);}}

.ops-filter-search.ops-language-search {grid-template-columns:minmax(140px,200px) minmax(0,1fr) auto;gap:14px;align-items:end;}
@media(max-width:600px){.ops-filter-search.ops-language-search {grid-template-columns:minmax(100px,130px) minmax(0,1fr) auto;gap:8px;}.ops-language-search > button {padding:8px 10px;}}

.publication-edit-dialog {width:min(1100px,calc(100vw - 32px));max-width:1100px;max-height:90vh;overflow:auto;box-sizing:border-box;}
.publication-edit-dialog .collection-organized-article > summary {display:none;}
.publication-edit-dialog .collection-organized-article {padding:0;border:0;margin:0;}
.publication-edit-dialog > .site-dialog-actions {position:sticky;bottom:-24px;background:var(--surface);padding:16px 0;margin-top:16px;border-top:1px solid var(--line);}
.publication-times {display:flex;flex-direction:column;gap:6px;margin-top:12px;color:var(--muted);}

.automation-dialog{width:min(920px,94vw);max-height:90vh;overflow:auto}.automation-dialog form>fieldset{margin:16px 0;padding:16px;border:1px solid #dbe3ef;border-radius:10px}.automation-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0}.automation-settings label{display:flex;flex-direction:column;gap:8px}.automation-targets{display:grid;gap:12px;margin-bottom:14px}.automation-targets label{display:flex;gap:8px;align-items:center}.automation-preview:empty{display:none}.automation-preview{background:#f1f7ff;border:1px solid #c8deff;border-radius:10px;padding:18px;margin-top:20px}.automation-workspace:empty{display:none}.automation-workspace{margin-bottom:24px}.automation-job{border:1px solid #dbe3ef;border-radius:12px;padding:18px;margin:14px 0}.automation-job>summary{cursor:pointer;font-weight:700;line-height:1.7}.automation-job>progress{width:100%;margin:16px 0}.automation-item{border-top:1px solid #dbe3ef;padding:18px 0}.automation-item p{margin:8px 0}.automation-item>button{margin-top:12px}@media(max-width:640px){.automation-settings{grid-template-columns:1fr}}

.automation-items{max-height:520px;overflow:auto;overscroll-behavior:contain;padding:0 8px}

.automation-targets label{justify-content:flex-start;margin:0;font-weight:500;overflow-wrap:anywhere}.automation-targets input[type=checkbox]{width:17px;height:17px;min-height:0;margin:0;padding:0;flex:0 0 17px}.automation-dialog .check{margin:18px 0}.automation-dialog>h2{margin-top:0}.automation-settings label{margin:0}

.automation-field-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.automation-field-help{display:inline-flex;color:#59779c;font-size:15px;cursor:help;font-weight:400}.automation-field-help:focus-visible{outline:2px solid #2187e4;outline-offset:3px;border-radius:50%}

.ops-library-table th:nth-child(2){width:auto}.ops-library-table th:nth-child(3){width:auto}.ops-library-table th:nth-child(4){width:170px}.ops-library-table th:nth-child(5){width:92px}.ops-collection-count small{display:block;margin-top:6px;color:var(--muted);font-size:12px;line-height:1.7}.ops-collection-count .ops-text-action{border:0;background:transparent;padding:0;min-height:0;color:var(--action);font-size:14px;line-height:1.6}.ops-collection-count .ops-text-action:hover{text-decoration:underline;background:transparent}.ops-filter-search.ops-language-search{grid-template-columns:minmax(110px,150px) minmax(110px,150px) minmax(0,1fr) auto}@media(max-width:760px){.ops-filter-search.ops-language-search{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-filter-search.ops-language-search>label:nth-child(3){grid-column:1/-1}.ops-filter-search.ops-language-search>button{grid-column:2;justify-self:end}.ops-library-table table{min-width:780px}}

.automation-manager-filters{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(150px,1fr) auto;gap:16px;align-items:end;margin:24px 0 16px}.automation-manager-filters label{margin:0;min-width:0}.automation-manager-filters button{height:44px}.automation-manager-list .automation-job{margin:14px 0}.automation-pagination{justify-content:flex-end;margin-top:18px}@media(max-width:640px){.automation-manager-filters{grid-template-columns:1fr}.automation-manager-filters button{justify-self:end}}

.ops-products-scroll{overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:10px}.ops-products-scroll:focus-visible{outline:2px solid var(--action);outline-offset:3px;border-radius:8px}

.ops-failure-reasons{max-height:60vh;overflow-y:auto;overscroll-behavior:contain;padding:2px 12px 2px 2px;overflow-wrap:anywhere}.ops-failure-reasons .review-group{margin-bottom:16px}.ops-failure-reasons li{margin:6px 0}

.article-publication-records{display:flex;flex-direction:column;gap:5px;margin-top:6px;font-size:13px;font-weight:400;line-height:1.6;color:#52677e}.article-publication-record{overflow-wrap:anywhere}.article-publication-record.is-published{color:#187348}

.ops-library-pagination{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin:18px 0}.ops-library-pagination small{margin-right:auto}.ops-library-actions small{align-self:center;color:#52677e}

.automation-field-description{display:block;margin-top:7px;font-size:12px;font-weight:400;line-height:1.7;color:#52677e}.automation-strategy-guide,.automation-strategy-presets,.automation-strategy-summary{margin:18px 0;padding:18px;border:1px solid #dbe4f0;border-radius:10px;line-height:1.8}.automation-strategy-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.automation-strategy-guide summary{cursor:pointer;font-weight:600}.automation-strategy-summary{background:#f5f9ff}@media(max-width:800px){.automation-strategy-presets{grid-template-columns:1fr}}

.ops-library-filter-context{margin:12px 0;padding:12px 16px;background:#f5f9ff;border:1px solid #dbe4f0;border-radius:10px}.ops-library-filter-context p{margin:0 0 10px}.ops-library-pagination label{display:flex;align-items:center;gap:6px;margin:0;white-space:nowrap}.ops-library-pagination input{width:76px;margin:0}.ops-library-pagination [aria-current="page"]{background:#e6f2ff;border-color:#2189ed;color:#0863bd;opacity:1}.ops-library-pagination{gap:8px}

/* Administration: let every page use the available workspace width. */
.admin-main #admin-view { width:100%; min-width:0; }
.admin-main #admin-view > :is(form,fieldset,section,details,.ops-table-wrap,.template-preview) { min-width:0; max-width:100%; }
.admin-main #admin-view fieldset { min-inline-size:0; }
.admin-main #admin-view :is(input,textarea,select) { max-width:100%; }
.admin-main #admin-view table { width:100%; }
.admin-main #admin-view .collection-config-grid > p { margin:0; overflow-wrap:anywhere; }
.admin-main #admin-view .collection-config-grid > .collection-wide { grid-column:1/-1; }
.admin-main #admin-view > .admin-login-form { max-width:440px; }
@media(min-width:1400px) {
 .admin-main #admin-view .collection-config-grid { gap:20px 28px; }
}
@media(max-width:900px) {
 .admin-main { grid-template-columns:180px minmax(0,1fr); padding:16px; gap:16px; }
 .admin-main .workspace { padding:24px; }
}
@media(max-width:600px) {
 .admin-main { grid-template-columns:minmax(0,1fr); padding:12px; gap:12px; }
 .admin-main .workspace { padding:18px; }
 .admin-main #admin-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .admin-main #admin-nav button { min-width:0; }
}

.automation-strategy-presets { align-items:start; }
.automation-strategy-card { min-width:0; }
.automation-strategy-card > label { margin-top:0; }
.automation-strategy-custom { min-inline-size:0; margin:14px 0; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--soft); }
.automation-strategy-custom legend { padding:0 5px; font-weight:650; font-size:13px; }
.automation-strategy-custom > label { margin:0 0 16px; }
.automation-strategy-custom > label:last-child { margin-bottom:0; }
.automation-strategy-custom .automation-field-description { font-weight:400; }

/* A consistent close action on all modal dialogs, also visible while scrolling. */
.dialog-close-bar { position:sticky; top:0; height:0; z-index:20; overflow:visible; }
.dialog-close-button { position:absolute; top:0; right:0; display:inline-flex; width:34px; height:34px; min-height:34px; padding:0; margin:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--muted); font-size:24px; font-weight:400; line-height:1; box-shadow:0 2px 6px #102a430a; }
.dialog-close-button:hover:not(:disabled) { background:var(--selected); color:var(--action); }
.has-close-button > :is(h1,h2,h3) { padding-inline-end:46px; }

.collection-article-usage { display:inline-block; padding:4px 10px; border-radius:6px; background:var(--selected); color:var(--action); font-size:13px; }
.collection-article-usage.is-unused { color:#885500; background:#fff5dc; border:1px solid #efd79f; }

.automation-full-production { min-inline-size:0; padding:18px; margin:18px 0; border:1px solid var(--line); border-radius:10px; }
.automation-full-production > fieldset { min-inline-size:0; padding:14px; margin:16px 0; border:1px solid var(--line); border-radius:8px; }
.automation-locale-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(110px,.6fr) auto; gap:12px; align-items:center; }
@media(max-width:650px){.automation-locale-row{grid-template-columns:repeat(2,minmax(0,1fr));}}

.automation-country-picker { width:min(1000px,calc(100vw - 32px)); max-width:1000px; max-height:90vh; overflow:auto; }
.automation-country-block { margin:12px 0; padding:14px; border:1px solid var(--line); border-radius:10px; }
.automation-country-block > summary { font-weight:650; }
.automation-country-block > .links { margin:12px 0; }
.automation-country-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 18px; max-height:320px; overflow:auto; padding:4px; }
.automation-country-grid > label { margin:0; font-size:13px; align-items:flex-start; }
.automation-country-grid input { flex-shrink:0; margin-top:3px; }
.automation-country-grid .is-unavailable { color:var(--muted); opacity:.7; }
@media(max-width:750px){.automation-country-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:480px){.automation-country-grid{grid-template-columns:minmax(0,1fr);}}

.automation-full-production > button { margin:8px 12px 8px 0; }

.automation-platform-issues,.automation-save-error { border:1px solid #de9d9d; border-radius:10px; background:#fff3f3; color:#92242b; padding:14px 16px; margin:16px 0; }
.automation-platform-issues p,.automation-save-error p { margin:8px 0 0; }
.automation-full-production input[aria-invalid=true] { outline:2px solid #b33d44; outline-offset:3px; }

.automation-pagination{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.automation-pagination [aria-current="page"]{background:#e6f2ff;border-color:#2189ed;color:#0863bd;opacity:1}

/* Automation plan workspace */
.automation-sidebar{display:grid;gap:8px;margin:10px 6px 0;min-width:0}.automation-sidebar input,.automation-sidebar select{width:100%;min-width:0;height:34px;padding:6px 9px;font-size:12px}.automation-sidebar-list{max-height:480px;overflow:auto;display:grid;gap:3px}.automation-sidebar-list .sidebar-site{display:block;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:4px;padding:8px;font-size:12px;min-height:32px}.automation-sidebar-list [aria-current=true]{background:#e5f1ff;color:#075aba;font-weight:700}.automation-sidebar small{font-size:11px;color:#58708e}.automation-plan-identity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:24px;border:1px solid #dbe3ee;border-radius:10px;margin:24px 0}.automation-plan-identity h2,.automation-plan-identity>label:first-of-type{grid-column:1/-1}.automation-plan-identity label{display:grid;gap:8px;min-width:0}.automation-station-editor{padding:24px;border:1px solid #dbe3ee;border-radius:10px;margin-bottom:24px}.automation-station-editor form{max-width:none}.automation-station-editor .publish-card-header{gap:16px;align-items:center;flex-wrap:wrap}.automation-editor-actions{display:flex;gap:12px;justify-content:flex-end;position:sticky;bottom:0;background:#fff;padding:16px 0;border-top:1px solid #dbe3ee;z-index:2}.automation-plan-tabs{display:flex;flex-wrap:wrap;gap:12px;padding:20px 0;border-bottom:1px solid #dbe3ee;margin-bottom:24px}.automation-plan-tabs button{flex:1;white-space:nowrap}.automation-plan-tabs [aria-current=true]{background:#e5f1ff;border-color:#1685ef;color:#075aba}.automation-overview-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0}.automation-overview-metrics section{display:grid;gap:12px;border:1px solid #dbe3ee;border-radius:10px;padding:20px;background:#f8faff}.automation-overview-metrics strong{font-size:26px}.automation-plan-header .links{align-items:center}.automation-plan-header h1{overflow-wrap:anywhere}@media(max-width:800px){.automation-plan-identity,.automation-overview-metrics{grid-template-columns:1fr}.automation-plan-identity h2{grid-column:auto}.automation-station-editor{padding:16px}.automation-plan-tabs button{flex:1 1 40%}}

.automation-sidebar-list [aria-current=page],.automation-plan-tabs [aria-current=page]{background:#e5f1ff;color:#075aba;font-weight:700}.automation-station-editor .publish-config-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px}.automation-station-editor .publish-config-form>fieldset,.automation-station-editor .publish-config-form>.links,.automation-station-editor .publish-config-form>p,.automation-station-editor .publish-config-form>small,.automation-station-editor .publish-config-form>.check{grid-column:1/-1}.automation-station-editor .publish-config-form>fieldset{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:18px}.automation-plan-identity label{margin:0}.automation-plan-identity h2{margin:0}.automation-station-editor label{margin:0}.automation-plan-identity small,.automation-station-editor small{font-size:12px;font-weight:400;color:#58708e}@media(max-width:800px){.automation-station-editor .publish-config-form,.automation-station-editor .publish-config-form>fieldset{grid-template-columns:1fr}}

.automation-sidebar-header{display:flex;border:1px solid var(--line,#bac9dc);border-radius:10px;overflow:hidden}.automation-sidebar-header .sidebar-module-toggle{flex:1;border:0;border-radius:0;min-width:0;margin:0}.automation-sidebar-header .automation-sidebar-add{border:0;border-left:1px solid #c9d9ec;border-radius:0;margin:0;min-width:38px;padding:8px;font-size:20px}.automation-sidebar-header:has([aria-pressed=true]){background:var(--action);border-color:var(--action)}.automation-sidebar-header:has([aria-pressed=true]) button{color:#fff;background:transparent}.automation-dashboard-heading>button{margin-right:10px}.automation-dashboard-filters{display:grid;grid-template-columns:minmax(200px,2fr) minmax(160px,1fr) auto;gap:16px;align-items:center;margin:24px 0}.automation-dashboard-filters input,.automation-dashboard-filters select{width:100%;margin:0}.automation-dashboard-plan{padding:22px;border:1px solid #dbe3ee;border-radius:10px;margin:16px 0}.automation-dashboard-plan-title{display:inline-block;font-size:17px;font-weight:700;text-align:left;max-width:80%;margin-right:16px;border:0;padding:0;background:none;overflow-wrap:anywhere}.automation-dashboard-plan>strong{font-size:13px;color:#58708e}.automation-dashboard-plan p{margin:12px 0}.automation-dashboard-plan-title:hover{text-decoration:underline}@media(max-width:700px){.automation-dashboard-filters{grid-template-columns:1fr}.automation-dashboard-plan-title{max-width:100%;display:block;margin-bottom:12px}}

.automation-target-select-row{display:flex;gap:10px;align-items:center;min-width:0}.automation-target-select-row select{flex:1;min-width:0;width:0;margin:0}.automation-target-select-row button{flex:none;white-space:nowrap;margin:0}.automation-target-tools button{border:0;padding:0;background:none;font-size:12px;min-height:24px}.publication-target-editor{width:min(960px,94vw);max-height:90vh;overflow:auto;padding:26px}.publication-target-editor .publish-config-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px}.publication-target-editor .publish-config-form>fieldset,.publication-target-editor .publish-config-form>.check,.publication-target-editor .publish-config-form>.links,.publication-target-editor .publish-config-form>p,.publication-target-editor .publish-config-form>small{grid-column:1/-1}.publication-target-editor .publish-config-form>fieldset{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:18px;border:1px solid #dbe3ee;border-radius:8px}.publication-target-editor .publish-config-form label{margin:0}.publication-target-editor .publish-config-form .links{justify-content:flex-end;flex-wrap:wrap}@media(max-width:640px){.publication-target-editor .publish-config-form,.publication-target-editor .publish-config-form>fieldset{grid-template-columns:1fr}.publication-target-editor{padding:18px}.automation-target-select-row{flex-wrap:wrap}.automation-target-select-row select{width:100%;flex-basis:100%}}

/* Keep automation field captions, controls and adjacent actions aligned. */
.automation-plan-identity{align-items:start}.automation-plan-identity>label{align-content:start;align-items:start;gap:8px}.automation-plan-identity input,.automation-plan-identity select,.automation-target-select-row,.automation-target-select-row>button{height:44px;min-height:44px;box-sizing:border-box;margin:0}.automation-target-select-row{align-items:stretch}.automation-target-tools{margin:0}.automation-locale-row{align-items:end;margin:14px 0}.automation-locale-row>label{margin:0;gap:8px;min-width:0;align-content:start}.automation-locale-row input,.automation-locale-row select,.automation-locale-row>button{height:44px;min-height:44px;margin:0;box-sizing:border-box}.automation-locale-row>button{align-self:end;white-space:nowrap}@media(max-width:640px){.automation-target-select-row{height:auto;min-height:44px}}

.automation-overview-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:20px}.automation-overview-actions>button{margin:0}

.knowledge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}.knowledge-actions{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0}.knowledge-panel{padding:18px;margin:14px 0;border:1px solid #d9e2f0;border-radius:12px}.knowledge-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto}.knowledge-panel p{overflow-wrap:anywhere}@media(max-width:760px){.knowledge-grid{grid-template-columns:1fr}}

.knowledge-content input[type="checkbox"]{width:18px;height:18px;min-height:18px;padding:0;display:inline-block;flex:0 0 18px}.knowledge-content label:has(>input[type="checkbox"]){display:flex;align-items:center;gap:8px}.knowledge-content details{margin:12px 0}.knowledge-content pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto}

.knowledge-actions{align-items:flex-end}.knowledge-actions>label{min-width:160px;flex:1}.registry-item summary{font-weight:700}.registry-item a{overflow-wrap:anywhere}
.option-label-heading { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.option-help-icon { display:inline-flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; min-width:18px; height:18px; padding:0; margin:0; border:1px solid #7993b2; border-radius:50%; background:transparent; color:#486d97; font-size:12px; font-weight:700; line-height:1; cursor:help; }
.option-help-icon:hover,.option-help-icon:focus-visible { background:#eaf3ff; color:#1465bd; outline:2px solid #90bafa; outline-offset:2px; }
.option-help-popup { position:fixed; z-index:2147483647; box-sizing:border-box; width:max-content; max-width:min(380px,calc(100vw - 16px)); max-height:calc(100vh - 16px); overflow:auto; padding:10px 13px; border:1px solid #ccdae9; border-radius:8px; background:#fff; color:#173753; box-shadow:0 5px 20px #132b4926; font-size:13px; font-weight:400; line-height:1.7; white-space:pre-wrap; }
[data-help-attached][hidden] { display:none !important; }

/* Keep help icons circular despite global form/button sizing. */
button.option-help-icon { box-sizing:border-box !important; width:18px !important; min-width:18px !important; max-width:18px !important; height:18px !important; min-height:18px !important; max-height:18px !important; aspect-ratio:1; flex:0 0 18px !important; padding:0 !important; align-self:center; vertical-align:middle; }
.knowledge-member-filters label { margin:0; }
.knowledge-member-filters input,.knowledge-member-filters select,.knowledge-member-filters>button { box-sizing:border-box; height:44px; min-height:44px; margin:0; }
.knowledge-member-pagination { justify-content:flex-end; align-items:center; gap:12px; }
.knowledge-member-pagination button { margin:0; height:42px; min-height:42px; }
.knowledge-source-heading { display:flex; align-items:center; gap:12px; }
.knowledge-source-heading h3 { flex:1; min-width:0; margin:0; font-size:16px; }
.knowledge-source-heading>button { flex:none; margin:0; min-height:34px; padding:6px 12px; }
.knowledge-source-tags { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.knowledge-category-tag { display:inline-flex; padding:3px 8px; border-radius:5px; background:#eaf3ff; color:#2463a8; font-size:12px; white-space:nowrap; }
.knowledge-source-detail[hidden] { display:none; }
.knowledge-member-results { overflow-anchor:none; }
@media(max-width:640px){.knowledge-source-heading{flex-wrap:wrap;gap:8px}.knowledge-source-heading h3{flex-basis:calc(100% - 70px)}.knowledge-source-tags{order:3;justify-content:flex-start}.knowledge-member-pagination{justify-content:center}}
.intent-stage-tag { display:inline-flex; vertical-align:middle; align-items:center; margin-left:8px; padding:3px 8px; border-radius:5px; background:#eaf3ff; color:#2463a8; font-size:12px; font-weight:500; white-space:nowrap; }
.ops-library-table td:last-child .intent-stage-tag { margin:0; }
.automation-locale-block { padding:16px; margin:16px 0; border:1px solid #dbe3ee; border-radius:10px; }
.automation-locale-stages { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 18px; margin:16px 0 0; }
.automation-locale-stages label { margin:0; min-width:0; }
.automation-locale-stages input { height:42px; min-height:42px; margin:0; }
.automation-locale-row input[readonly] { background:#edf3f9; font-weight:700; }
@media(max-width:640px){.automation-locale-stages{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ops-library-table th:nth-child(6) { width:172px; }
.ops-library-table td:last-child .intent-stage-tag { white-space:normal; line-height:1.6; }
.automation-report-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:16px; align-items:end; margin:20px 0; }
.automation-report-filters label { margin:0; min-width:0; }
.automation-report-filters input,.automation-report-filters select,.automation-report-filters button { height:44px; min-height:44px; margin:0; box-sizing:border-box; }
.automation-report-table { overflow:auto; margin:18px 0; }
.automation-report-table table { width:100%; min-width:620px; border-collapse:collapse; }
.automation-report-table th,.automation-report-table td { padding:10px 12px; border:1px solid #dbe3ee; text-align:center; }
.automation-report-table th { background:#f3f7fc; }
.automation-published-article { border:1px solid #dbe3ee; border-radius:8px; padding:16px; margin:12px 0; }
.automation-published-article h3 { display:inline; font-size:16px; }
.automation-report-pagination { display:flex; gap:8px; align-items:center; justify-content:flex-end; margin:16px 0; }
@media(max-width:640px){.automation-report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Automation overview: stable sections and aligned controls. */
.automation-plan-overview{display:grid;gap:24px;min-width:0}
.automation-overview-section,.automation-report-panel{padding:24px;border:1px solid #dbe3ee;border-radius:12px;background:#fff;min-width:0}
.automation-plan-overview h2{font-size:20px;margin:0 0 20px}.automation-plan-overview h3{font-size:16px;margin:20px 0 12px}
.automation-current-metrics{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 24px}
.automation-report-filters{grid-template-columns:repeat(4,minmax(0,1fr)) auto;margin:0 0 12px;gap:16px}
.automation-report-filters label{display:grid;gap:8px;line-height:1.5}
.automation-report-filters input,.automation-report-filters select{width:100%;min-width:0}
.automation-report-quick{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.automation-report-quick button{padding:6px 12px;min-height:34px;font-size:13px}
.automation-report-status{min-height:24px;line-height:24px;margin:0;color:#58708e}
.automation-report-empty{padding:24px;text-align:center;background:#f8faff;border-radius:8px;color:#58708e}
.automation-report-table{margin:12px 0 20px;border-radius:8px}
.automation-report-table td:first-child,.automation-report-table th:first-child{text-align:left;white-space:nowrap}
.automation-plan-info{display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px 20px;margin:0}
.automation-plan-info dt{color:#58708e}.automation-plan-info dd{margin:0;overflow-wrap:anywhere}
.automation-plan-notices p{margin:16px 0 0;padding:12px 16px;background:#f8faff;border-radius:8px;line-height:1.7}
.automation-overview-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
@media(max-width:1100px){.automation-report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.automation-report-filters>button{justify-self:end;grid-column:1/-1;min-width:100px}}
@media(max-width:640px){.automation-overview-section,.automation-report-panel{padding:16px}.automation-current-metrics{grid-template-columns:1fr}.automation-plan-info{grid-template-columns:1fr;gap:6px}.automation-plan-info dd{margin-bottom:12px}.automation-report-filters{gap:12px}}

/* Compact collection controls: override full-width text-input sizing. */
.collection-config-section input[type="checkbox"]{appearance:auto;width:17px;height:17px;min-width:17px;min-height:17px;max-width:17px;max-height:17px;padding:0;margin:0;flex:0 0 17px;vertical-align:middle;accent-color:var(--action);cursor:pointer}
.collection-config-section label.check{display:flex;align-items:center;gap:9px;line-height:1.5;font-size:14px;font-weight:500;min-height:36px;margin:0}
.collection-platform-table table{width:100%;table-layout:auto}
.collection-platform-table th,.collection-platform-table td{padding:12px 14px;vertical-align:middle}
.collection-platform-table th{font-size:13px;line-height:1.5;white-space:nowrap}
.collection-platform-table th:first-child,.collection-platform-table td:first-child,.collection-platform-table th:last-child,.collection-platform-table td:last-child{width:96px;text-align:center}
.collection-platform-table td:nth-child(2){min-width:170px;line-height:1.5}
.collection-platform-table td:nth-child(3){white-space:nowrap;color:var(--muted)}
.collection-platform-table input:not([type="checkbox"]){width:100%;min-width:150px;height:38px;min-height:38px;margin:0;padding:7px 10px;font-size:14px}
.collection-config-section input[type="checkbox"]:disabled{cursor:not-allowed;opacity:.5}

[data-config-field] [aria-invalid="true"]{border-color:#c73737;box-shadow:0 0 0 2px #c737371a}.config-field-error{display:block;color:#b3261e;margin-top:6px;font-size:13px;}

.knowledge-source-heading{flex-wrap:wrap}.knowledge-source-meta{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 12px;font-size:12px;color:#526a86}.knowledge-source-meta time{white-space:nowrap}.knowledge-source-meta .knowledge-source-use{margin:0;min-height:32px;padding:5px 10px;font-size:12px;white-space:nowrap}.knowledge-source-usage-article{padding:16px 0;border-bottom:1px solid #dbe5f2}.knowledge-source-usage-article h3{font-size:16px;margin:0 0 8px}.knowledge-source-usage-dialog>p{overflow-wrap:anywhere}.knowledge-source-usage-article>div{margin-top:16px;overflow-wrap:anywhere}.knowledge-source-usage-article>div img{max-width:100%}@media(max-width:1000px){.knowledge-source-meta{flex-basis:100%;justify-content:flex-start;order:4}}

.knowledge-source-meta{flex-basis:100%;order:4}.knowledge-source-usage-article>button{margin-top:4px}
