:root {
  color-scheme: light;
  --canvas: #eef1f4;
  --surface: #ffffff;
  --surface-muted: #f6f7f9;
  --surface-strong: #171a21;
  --text: #171a21;
  --text-soft: #5e6673;
  --text-faint: #8b929d;
  --line: #dfe3e8;
  --line-strong: #cbd1d8;
  --red: #f32d58;
  --red-deep: #c91842;
  --red-soft: #fff0f4;
  --teal: #087f73;
  --teal-soft: #e9f7f4;
  --blue: #2768d8;
  --blue-soft: #edf3ff;
  --amber: #9b6600;
  --amber-soft: #fff5dc;
  --danger: #b4233c;
  --danger-soft: #fff0f2;
  --shadow-dialog: 0 28px 70px rgba(23, 26, 33, 0.2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(39, 104, 216, 0.45);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
ol,
ul {
  margin: 0;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-faint);
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 18px;
  height: 100vh;
  min-width: 0;
  padding: 20px 14px 14px;
  overflow: hidden;
  color: #f7f8fa;
  background: #15181d;
  border-right: 1px solid #252a31;
}

.app-stage {
  min-width: 0;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: block;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
}

.brand-mark i {
  position: absolute;
  left: 3px;
  width: 25px;
  height: 6px;
  background: var(--text);
  border-radius: 2px;
  transform: skewX(-18deg);
}

.brand-mark i:nth-child(1) {
  top: 3px;
  background: var(--red);
}

.brand-mark i:nth-child(2) {
  top: 12px;
  background: var(--teal);
}

.brand-mark i:nth-child(3) {
  top: 21px;
}

.brand div {
  display: grid;
  gap: 1px;
}

.brand strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
}

.brand span:not(.brand-mark) {
  color: #8f98a5;
  font-size: 11px;
}

.page-context {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.context-scope {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #c9d9fb;
  border-radius: 5px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.context-scope.shared {
  border-color: #b9ddd7;
  color: var(--teal);
  background: var(--teal-soft);
}

.page-context > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.page-context h1 {
  font-size: 17px;
  line-height: 1.25;
}

.page-context p {
  display: flex;
  gap: 8px;
  min-width: 0;
  color: var(--text-faint);
  font-size: 11px;
}

.page-context p strong {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-tabs,
.requirement-filter-tabs {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  padding: 3px;
}

.filter-tab,
.requirement-filter-tab {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 4px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 650;
  white-space: nowrap;
}

.filter-tab.active,
.requirement-filter-tab.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(23, 26, 33, 0.12);
}

.view-tabs {
  display: grid;
  align-content: start;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.view-nav-group {
  display: grid;
  gap: 4px;
}

.view-nav-label {
  padding: 0 9px 6px;
  color: #6f7884;
  font-size: 10px;
  font-weight: 800;
}

.view-tab {
  display: grid;
  gap: 2px;
  min-height: 49px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #c4cbd4;
  background: transparent;
  text-align: left;
}

.view-tab span {
  font-size: 13px;
  font-weight: 760;
}

.view-tab small {
  color: #747e8a;
  font-size: 10px;
}

.view-tab:hover {
  color: #fff;
  background: #1d2229;
}

.view-tab.active {
  color: #fff;
  background: #262c34;
  border-color: #343c46;
  box-shadow: inset 3px 0 0 var(--teal);
}

.view-tab.active small {
  color: #aeb7c2;
}

.header-actions,
.action-buttons,
.save-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.button,
.icon-button {
  min-height: 36px;
  border-radius: 6px;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 13px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--text);
}

.button.primary:hover:not(:disabled) {
  background: #2a2e37;
}

.button.quiet,
.icon-button {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
}

.button.quiet:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.button.secondary {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #c9d9fb;
}

.button.generate {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.button.generate:hover:not(:disabled) {
  background: #066b62;
  border-color: #066b62;
}

.button.publish {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.button.publish:hover:not(:disabled) {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.small-icon {
  width: 32px;
  min-height: 32px;
  font-size: 16px;
}

.full-width {
  width: 100%;
}

.account-band {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 17px 0;
  border-top: 1px solid #282e36;
  border-bottom: 1px solid #282e36;
}

.account-band-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
}

.account-band-title > div {
  display: grid;
  gap: 3px;
}

.account-band-title strong {
  color: #e6e9ed;
  font-size: 13px;
}

.account-band-title .section-kicker {
  color: #6f7884;
}

.account-band-title .button {
  min-height: 28px;
  padding: 0 9px;
  color: #aeb7c2;
  background: transparent;
  border-color: #343c46;
}

.account-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 174px;
  gap: 5px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.account-tab {
  display: grid;
  grid-template-columns: 30px minmax(120px, 1fr) 12px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #dce1e7;
  background: transparent;
  text-align: left;
}

.account-tab:hover,
.account-tab.active {
  border-color: #343c46;
  background: #20252c;
}

.account-tab.active {
  background: #f7f8fa;
  border-color: #f7f8fa;
  color: var(--text);
  box-shadow: none;
}

.account-tab[aria-busy="true"] {
  cursor: progress;
}

.platform-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 6px;
  color: #fff;
  background: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.platform-mark.douyin {
  background: var(--text);
  box-shadow: inset 3px 0 0 var(--teal), inset -3px 0 0 var(--red);
}

.platform-mark.xiaohongshu {
  background: #e51d35;
}

.account-tab-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-tab-copy strong,
.account-tab-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-tab-copy strong {
  font-size: 12px;
}

.account-tab-copy small {
  color: #7f8995;
  font-size: 10px;
}

.account-tab.active .account-tab-copy small {
  color: var(--text-faint);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid #282e36;
}

.sidebar-service {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sidebar-service span {
  overflow: hidden;
  color: #8f98a5;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-service b {
  color: #78c7bb;
  font-size: 10px;
}

.sidebar-footer .access-button {
  width: 100%;
  color: #c4cbd4;
  background: #1d2229;
  border-color: #343c46;
}

.sidebar-footer .access-button.unlocked {
  color: #8ad2c7;
  background: #192723;
  border-color: #2b5c54;
}

.account-online {
  width: 8px;
  height: 8px;
  justify-self: center;
  border-radius: 50%;
  background: var(--text-faint);
}

.account-online.online {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.account-online.offline {
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.account-online.planned {
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.account-tab.switching .account-online {
  width: 12px;
  height: 12px;
  border: 2px solid #cbd2da;
  border-top-color: var(--teal);
  background: transparent;
  box-shadow: none;
  animation: account-switch-spin 700ms linear infinite;
}

@keyframes account-switch-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-tab.switching .account-online {
    animation: none;
  }
}

.summary-band {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(620px, 2fr);
  align-items: stretch;
  min-height: 76px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.summary-date {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-right: 1px solid var(--line);
}

.summary-date span {
  color: var(--text-faint);
}

.summary-date strong {
  font-size: 16px;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.summary-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 22px;
  border-right: 1px solid var(--line);
}

.summary-metrics div:last-child {
  border-right: 0;
}

.summary-metrics dt {
  color: var(--text-soft);
  font-size: 12px;
}

.summary-metrics dd {
  font-size: 22px;
  font-weight: 760;
  line-height: 1;
}

main {
  padding: 18px;
}

.publish-view {
  display: grid;
  gap: 14px;
}

.quality-control-band {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(300px, 0.8fr) minmax(360px, 1.25fr);
  min-height: 142px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quality-mode,
.quality-experiment {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 17px 19px;
}

.quality-mode {
  border-right: 1px solid var(--line);
}

.quality-mode .state-pill {
  justify-self: start;
}

.quality-mode .state-pill.critical {
  color: var(--danger);
  background: var(--danger-soft);
}

.quality-mode .state-pill.attention {
  color: var(--amber);
  background: var(--amber-soft);
}

.quality-mode .state-pill.steady {
  color: var(--blue);
  background: var(--blue-soft);
}

.quality-mode .state-pill.positive {
  color: var(--teal);
  background: var(--teal-soft);
}

.quality-mode h2 {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.45;
}

.quality-mode p,
.quality-experiment p {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.quality-targets {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  border-right: 1px solid var(--line);
}

.quality-targets div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.quality-targets div:last-child {
  border-bottom: 0;
}

.quality-targets dt {
  color: var(--text-faint);
  font-size: 11px;
}

.quality-targets dd {
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 14px;
  font-weight: 760;
}

.quality-experiment strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.4;
}

.quality-experiment small {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.quality-experiment .button {
  justify-self: start;
  margin-top: 2px;
}

.today-plan-panel {
  display: grid;
  grid-template-columns: minmax(380px, 1.25fr) minmax(300px, 0.9fr) minmax(320px, 1fr);
  scroll-margin-top: 78px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 26, 33, 0.06);
}

.daily-generation-plan {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(260px, 0.72fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 13px 18px 0;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
}

.daily-generation-heading,
.daily-generation-next {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.daily-generation-heading strong,
.daily-generation-next strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-generation-heading small,
.daily-generation-next small {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-generation-next .state-pill {
  justify-self: start;
}

.daily-generation-workflow {
  display: grid;
  grid-template-columns: repeat(8, minmax(74px, 1fr));
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
}

.daily-generation-workflow li {
  position: relative;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  gap: 2px 5px;
  min-width: 74px;
  padding: 4px 8px;
  border-left: 1px solid var(--line);
}

.daily-generation-workflow li:first-child {
  border-left: 0;
}

.daily-generation-workflow small {
  color: var(--text-faint);
  font-size: 9px;
}

.daily-generation-workflow strong {
  grid-column: 2;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.3;
}

.daily-generation-step-state {
  grid-row: 1 / span 2;
  align-self: center;
  width: 8px;
  height: 8px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.daily-generation-workflow li.done .daily-generation-step-state {
  border-color: var(--teal);
  background: var(--teal);
}

.daily-generation-workflow li.pending .daily-generation-step-state {
  border-color: var(--blue);
  background: var(--blue);
}

.daily-generation-workflow li.blocked .daily-generation-step-state,
.daily-generation-workflow li.attention .daily-generation-step-state {
  border-color: var(--amber);
  background: var(--amber-soft);
}

.daily-generation-upcoming {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  min-width: 0;
  margin-top: 2px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.daily-generation-day {
  display: grid;
  grid-template-rows: auto minmax(28px, auto) auto auto;
  gap: 3px;
  min-width: 120px;
  padding: 9px 10px 11px;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.daily-generation-day:first-child {
  border-left: 0;
}

.daily-generation-day span,
.daily-generation-day small {
  color: var(--text-faint);
  font-size: 9px;
}

.daily-generation-day strong {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-generation-day:not(:disabled):hover {
  background: #f3f7fb;
}

.daily-generation-day:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.daily-generation-day:disabled {
  cursor: default;
}

.daily-generation-day .daily-generation-action {
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.daily-generation-day:disabled .daily-generation-action {
  color: var(--text-faint);
}

.daily-generation-day.ready strong {
  color: var(--teal);
}

.daily-generation-day.published {
  background: rgba(8, 137, 115, 0.05);
}

.today-task-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.tomorrow-plan-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f4f8fb;
}

.tomorrow-candidate-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.tomorrow-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 9px;
  border-left: 3px solid var(--blue);
  background: rgba(255, 255, 255, 0.72);
}

.tomorrow-candidate-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tomorrow-candidate-copy small {
  color: var(--text-faint);
  font-size: 9px;
}

.tomorrow-candidate-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tomorrow-plan-ready {
  color: var(--teal);
  font-size: 11px;
  font-weight: 750;
}

.daily-matrix-heading {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.daily-matrix-heading strong {
  font-size: 14px;
}

.daily-matrix-heading small {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-task-list {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.today-task-item,
.today-missing-task {
  display: grid;
  grid-template-columns: 24px minmax(130px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 218px;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.today-task-item {
  cursor: pointer;
}

.today-task-item:hover,
.today-task-item.active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.today-task-item.published .today-task-index {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.today-task-item:disabled {
  cursor: default;
  opacity: 0.72;
}

.today-task-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
}

.today-task-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.today-task-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-task-copy small,
.today-task-state {
  color: var(--text-faint);
  font-size: 9px;
}

.today-task-state {
  flex: 0 0 auto;
  font-weight: 750;
}

.today-task-item.published .today-task-state {
  color: var(--teal);
}

.today-missing-task {
  grid-template-columns: 24px minmax(130px, 1fr);
  border-style: dashed;
  color: var(--text-faint);
  background: transparent;
}

.today-missing-task .today-task-index {
  border-style: dashed;
}

.today-plan-main,
.today-progress,
.today-script-preview {
  min-width: 0;
  padding: 17px 19px;
}

.today-plan-main,
.today-progress {
  border-right: 1px solid var(--line);
}

.today-plan-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.today-plan-heading {
  min-width: 0;
}

.today-plan-heading h1 {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.35;
}

.today-plan-goal {
  max-width: 720px;
  margin: 8px 0 11px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.today-plan-actions {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
}

.today-plan-actions .button {
  width: 112px;
}

.today-section-head {
  display: grid;
  gap: 5px;
  margin-bottom: 11px;
}

.today-section-head strong {
  font-size: 15px;
}

.today-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(45px, 1fr));
  gap: 5px;
  padding: 0;
  list-style: none;
}

.today-pipeline li {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--text-faint);
  font-size: 10px;
  text-align: center;
}

.today-pipeline li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.today-pipeline li.ready {
  color: var(--teal);
}

.today-pipeline li.ready span {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.today-pipeline li.current {
  color: var(--blue);
  font-weight: 750;
}

.today-pipeline li.current span {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.today-next {
  display: grid;
  gap: 3px;
  margin-top: 13px;
  padding: 10px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
}

.today-next span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.today-next strong {
  font-size: 12px;
  line-height: 1.5;
}

.today-audio {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.today-audio > span {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-audio audio {
  width: 100%;
  height: 32px;
}

.today-script-preview pre {
  max-height: 168px;
  margin: 0;
  overflow: auto;
  color: #323842;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.today-generation {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(390px, 0.95fr) minmax(430px, 1.35fr) minmax(240px, 0.7fr);
  align-items: center;
  min-width: 0;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.generation-controls,
.generation-status,
.generation-log {
  min-width: 0;
  padding: 14px 18px;
}

.generation-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  border-right: 1px solid var(--line);
}

.generation-controls .today-section-head {
  flex: 0 0 88px;
  margin: 0 3px 0 0;
}

.compact-field {
  display: grid;
  flex: 1 1 180px;
  gap: 5px;
  min-width: 145px;
}

.compact-field > span {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 750;
}

.compact-field select {
  width: 100%;
  min-height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.upload-audio {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
}

.generation-audio-state {
  display: none;
}

.visual-provider-meta {
  flex: 1 0 100%;
  min-width: 0;
  padding-left: 102px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.4;
}

.visual-provider-meta::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #a9b0bb;
  content: "";
  vertical-align: 1px;
}

.visual-provider-meta.ready::before {
  background: var(--teal);
}

.visual-provider-meta.queueable::before {
  background: #c18a13;
}

.visual-provider-meta.unavailable::before {
  background: var(--red);
}

.grok-web-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 0.55fr) minmax(420px, 1.55fr) minmax(260px, auto);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 18px;
  border-top: 1px solid #cfe0da;
  background: #f2f8f6;
}

.grok-web-panel.hidden {
  display: none;
}

.grok-web-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.grok-web-copy strong {
  font-size: 13px;
}

.grok-video-state {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grok-worker-state {
  overflow: hidden;
  color: #427266;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grok-worker-state.attention {
  color: #a45d12;
}

.grok-worker-state.offline {
  color: var(--danger);
}

#grokPrompt {
  width: 100%;
  min-height: 86px;
  max-height: 150px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #c7d9d3;
  border-radius: 6px;
  background: #fff;
  color: #34433f;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.5;
}

.grok-web-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.generation-status {
  display: grid;
  gap: 11px;
  border-right: 1px solid var(--line);
}

.generation-status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.generation-status-line strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 6px;
  padding: 0;
  list-style: none;
}

.generation-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
}

.generation-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.generation-steps li small {
  font-size: 10px;
}

.generation-steps li.done {
  color: var(--teal);
}

.generation-steps li.done span {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.generation-steps li.active {
  color: var(--blue);
  font-weight: 750;
}

.generation-steps li.active span {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.generation-steps li.failed {
  color: var(--danger);
}

.generation-steps li.failed span {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.generation-log {
  align-self: stretch;
  overflow: hidden;
}

.generation-voice-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #b7ddd4;
  border-radius: 6px;
  background: #f1faf7;
}

.generation-voice-preview.diagnostic {
  border-color: #efb8bd;
  background: #fff5f5;
}

.generation-voice-preview-copy {
  min-width: 0;
}

.generation-voice-preview-copy strong,
.generation-voice-preview-copy span {
  display: block;
}

.generation-voice-preview-copy strong {
  color: var(--text);
  font-size: 13px;
}

.generation-voice-preview-copy span,
.generation-voice-preview-copy p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
}

.generation-voice-preview audio {
  width: 100%;
  min-width: 0;
  height: 34px;
}

.generation-log summary {
  color: var(--text-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.generation-log pre {
  max-height: 82px;
  margin: 9px 0 0;
  overflow: auto;
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.today-plan-panel.empty .today-progress,
.today-plan-panel.empty .today-script-preview,
.today-plan-panel.empty .today-plan-actions .button:not(#todayImportBtn) {
  opacity: 0.45;
}

.publish-layout {
  display: grid;
  grid-template-columns: 290px minmax(600px, 1fr) 310px;
  min-height: calc(100vh - 176px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 26, 33, 0.06);
}

.queue-panel,
.editor-panel,
.rail-panel {
  min-width: 0;
  background: var(--surface);
}

.queue-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 0 0;
  border-right: 1px solid var(--line);
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
}

.panel-title-row.compact {
  padding: 0;
}

.panel-title-row h1,
.records-header h1 {
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.2;
}

.panel-title-row h2 {
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.2;
}

.section-kicker {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.count-badge,
.check-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin: 15px 16px 10px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-faint);
  background: var(--surface-muted);
}

.search-control:focus-within {
  border-color: #9cb9ed;
  background: var(--surface);
}

.search-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.queue-panel .filter-tabs {
  margin: 0 16px 11px;
  align-self: flex-start;
}

.queue-panel .filter-tab {
  min-height: 29px;
  padding: 0 9px;
  font-size: 12px;
}

.pack-queue {
  min-height: 260px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.pack-item {
  position: relative;
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 14px 15px 14px 18px;
  text-align: left;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.pack-item::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: transparent;
  content: "";
}

.pack-item:hover {
  background: var(--surface-muted);
}

.pack-item.active {
  background: var(--red-soft);
}

.pack-item.active::before {
  background: var(--red);
}

.pack-item-top,
.pack-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.pack-item-title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 720;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pack-item-meta {
  color: var(--text-faint);
  font-size: 11px;
}

.mini-state {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
}

.mini-state.pending {
  color: var(--blue);
  background: var(--blue-soft);
}

.mini-state.published {
  color: var(--teal);
  background: var(--teal-soft);
}

.mini-state.rejected {
  color: var(--danger);
  background: var(--danger-soft);
}

.queue-empty {
  padding: 30px 16px;
  color: var(--text-faint);
  text-align: center;
}

.editor-panel {
  min-height: 0;
  border-right: 1px solid var(--line);
}

.empty-state {
  display: grid;
  min-height: 520px;
  place-content: center;
  justify-items: center;
  gap: 13px;
  color: var(--text-soft);
}

.empty-mark,
.file-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-soft);
  font-size: 24px;
}

.workspace {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.workspace-heading-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.workspace-header h2 {
  max-width: 680px;
  margin-bottom: 9px;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.3;
}

.inline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-meta span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 11px;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 760;
}

.state-pill.pending,
.state-pill.running,
.state-pill.queued {
  color: var(--blue);
  background: var(--blue-soft);
}

.state-pill.published,
.state-pill.finished {
  color: var(--teal);
  background: var(--teal-soft);
}

.state-pill.idle {
  color: var(--text-soft);
  background: var(--surface-muted);
}

.state-pill.failed,
.state-pill.published_unverified,
.state-pill.needs_attention {
  color: var(--danger);
  background: var(--danger-soft);
}

.state-pill.verifying {
  color: var(--amber);
  background: var(--amber-soft);
}

.save-state {
  flex: 0 0 auto;
}

.save-state > span {
  color: var(--text-faint);
  font-size: 12px;
}

.workspace-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.preview-column {
  padding: 18px;
  background: var(--surface-muted);
  border-right: 1px solid var(--line);
}

.video-stage {
  position: relative;
  width: min(100%, 214px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  background: #101217;
  border-radius: 8px;
  box-shadow: 0 16px 35px rgba(23, 26, 33, 0.18);
}

.video-stage video,
.confirm-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101217;
}

.video-missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: #fff;
  background: #252a33;
}

.video-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.video-file-row div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.video-file-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-file-row span {
  color: var(--text-faint);
  font-size: 11px;
}

.video-file-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.video-file-actions label {
  cursor: pointer;
}

.metadata-form {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 19px;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.form-section-head h3 {
  margin-top: 4px;
  font-size: 17px;
}

.field-counter {
  color: var(--text-faint);
  font-size: 12px;
}

.form-row {
  display: grid;
  gap: 12px;
}

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

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

.field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.field > span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.field-hint {
  min-height: 17px;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.45;
}

.field-hint.ready {
  color: var(--teal);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input,
.field select {
  height: 38px;
  padding: 0 10px;
}

.field textarea {
  min-height: 118px;
  padding: 10px;
  line-height: 1.65;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #85a8e7;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(39, 104, 216, 0.09);
}

.action-dock {
  position: sticky;
  z-index: 8;
  top: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.action-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ready-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-faint);
}

.ready-dot.ready {
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.ready-dot.blocked {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.action-status div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.action-status strong {
  font-size: 13px;
}

.action-status span:last-child {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-panel {
  min-height: 0;
  overflow: auto;
  background: var(--surface-muted);
}

.rail-section {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.lifecycle-source {
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.45;
}

.lifecycle-steps {
  display: grid;
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
  list-style: none;
}

.lifecycle-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  background: var(--surface);
}

.lifecycle-step > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 800;
}

.lifecycle-step div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.lifecycle-step strong {
  font-size: 11px;
}

.lifecycle-step small,
.lifecycle-step > span:last-child {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lifecycle-step.done > span:first-child {
  color: var(--teal);
  border-color: #9dd7ce;
  background: var(--teal-soft);
}

.lifecycle-step.active > span:first-child {
  color: var(--blue);
  border-color: #a8c0eb;
  background: var(--blue-soft);
}

.lifecycle-step.failed > span:first-child {
  color: var(--danger);
  border-color: #efb2b8;
  background: var(--danger-soft);
}

.check-list {
  display: grid;
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.check-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  background: var(--surface);
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.check-item.pass .check-icon {
  color: var(--teal);
  background: var(--teal-soft);
}

.check-item.warn .check-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.check-item.block .check-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

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

.check-copy strong {
  font-size: 12px;
}

.check-copy small {
  overflow-wrap: anywhere;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.4;
}

.job-steps {
  display: grid;
  gap: 0;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.job-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  min-height: 48px;
}

.job-steps li:not(:last-child)::after {
  position: absolute;
  top: 26px;
  bottom: 0;
  left: 12px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.job-steps li > span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-faint);
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.job-steps li.done > span {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.job-steps li.active > span {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.job-steps li.failed > span {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.job-steps li div {
  display: grid;
  align-content: start;
  gap: 2px;
  padding-top: 3px;
}

.job-steps strong {
  font-size: 12px;
}

.job-steps small {
  color: var(--text-faint);
  font-size: 10px;
}

.job-result {
  margin: 8px 0 12px;
  padding: 10px;
  border: 1px solid #bfe1d9;
  border-radius: 6px;
  color: #09695f;
  background: var(--teal-soft);
  font-size: 11px;
  line-height: 1.55;
}

.log-drawer {
  margin: 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.log-drawer summary {
  padding: 9px 10px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.log-drawer pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 10px;
  border-top: 1px solid #2d333e;
  color: #d9ece8;
  background: var(--surface-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.records-view,
.growth-view {
  min-height: calc(100vh - 176px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 26, 33, 0.06);
}

.growth-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.growth-header h1 {
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.2;
}

.growth-site-link {
  display: inline-block;
  max-width: min(680px, 70vw);
  margin-top: 6px;
  overflow: hidden;
  color: var(--blue);
  font-size: 11px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.growth-site-link.disabled {
  color: var(--text-faint);
  pointer-events: none;
}

.growth-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.growth-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.growth-metrics > div {
  display: grid;
  min-width: 0;
  min-height: 108px;
  align-content: center;
  gap: 3px;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
}

.growth-metrics > div:last-child {
  border-right: 0;
}

.growth-metrics span,
.growth-metrics small {
  overflow-wrap: anywhere;
  color: var(--text-faint);
  font-size: 10px;
}

.growth-metrics strong {
  overflow-wrap: anywhere;
  font-size: 27px;
  line-height: 1.15;
}

#growthContentVersion {
  font-size: 18px;
}

.growth-score.healthy {
  color: var(--teal);
}

.growth-score.warning {
  color: var(--amber);
}

.growth-score.critical {
  color: var(--danger);
}

.growth-overview-band {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  border-bottom: 1px solid var(--line);
}

.growth-technical-panel,
.growth-actions-panel {
  min-width: 0;
}

.growth-technical-panel {
  border-right: 1px solid var(--line);
}

.growth-section-header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}

.growth-section-header h2 {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.25;
}

.growth-technical-list,
.growth-actions-list {
  min-height: 248px;
}

.growth-check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 49px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
}

.growth-check-row:last-child,
.growth-action-row:last-child {
  border-bottom: 0;
}

.growth-check-row > div,
.growth-action-row > div,
.growth-row-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.growth-check-row strong,
.growth-action-row strong,
.growth-row-title strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.growth-check-row small,
.growth-action-row small,
.growth-row-title span {
  overflow-wrap: anywhere;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.45;
}

.growth-console-link {
  color: var(--blue);
  text-decoration: none;
}

.growth-console-link:hover {
  text-decoration: underline;
}

.growth-check-row > span:last-child {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
}

.growth-check-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.growth-check-mark.ok {
  color: var(--teal);
  border-color: #9dd7ce;
  background: var(--teal-soft);
}

.growth-check-mark.warning {
  color: var(--amber);
  border-color: #edcf89;
  background: var(--amber-soft);
}

.growth-check-mark.error {
  color: var(--danger);
  border-color: #e9b5bf;
  background: var(--danger-soft);
}

.growth-action-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  min-height: 62px;
  align-items: start;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}

.growth-priority {
  padding-top: 1px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.growth-priority.P0 {
  color: var(--danger);
}

.growth-priority.P1 {
  color: var(--amber);
}

.growth-empty {
  display: grid;
  min-height: 220px;
  place-content: center;
  padding: 20px;
  color: var(--text-faint);
  font-size: 11px;
  text-align: center;
}

.growth-data-section {
  border-bottom: 1px solid var(--line);
}

.growth-data-section:last-child {
  border-bottom: 0;
}

.growth-table-wrap {
  overflow: auto;
}

.growth-table {
  min-width: 1180px;
}

.growth-table th,
.growth-table td {
  padding: 9px 10px;
  vertical-align: middle;
}

.growth-table input,
.growth-table select {
  width: 100%;
  min-width: 82px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-size: 10px;
}

.search-growth-table th:nth-child(1),
.search-growth-table td:nth-child(1) {
  width: 150px;
}

.search-growth-table th:nth-child(2),
.search-growth-table td:nth-child(2) {
  width: 160px;
}

.search-growth-table th:nth-child(3),
.search-growth-table td:nth-child(3),
.search-growth-table th:nth-child(4),
.search-growth-table td:nth-child(4),
.search-growth-table th:nth-child(5),
.search-growth-table td:nth-child(5) {
  width: 96px;
}

.search-growth-table th:nth-child(6),
.search-growth-table td:nth-child(6) {
  width: 136px;
}

.model-growth-table {
  min-width: 1320px;
}

.model-growth-table th:nth-child(1),
.model-growth-table td:nth-child(1) {
  width: 120px;
}

.model-growth-table th:nth-child(2),
.model-growth-table td:nth-child(2) {
  width: 190px;
}

.model-growth-table th:nth-child(3),
.model-growth-table td:nth-child(3) {
  width: 135px;
}

.model-growth-table th:nth-child(4),
.model-growth-table td:nth-child(4),
.model-growth-table th:nth-child(5),
.model-growth-table td:nth-child(5) {
  width: 105px;
  text-align: center;
}

.model-growth-table th:nth-child(6),
.model-growth-table td:nth-child(6) {
  width: 140px;
}

.model-growth-table th:nth-child(7),
.model-growth-table td:nth-child(7) {
  width: 260px;
}

.growth-checkbox-cell input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.growth-history-table {
  min-width: 1020px;
}

.growth-evidence-table {
  min-width: 1080px;
}

.growth-version-table,
.growth-audit-table {
  min-width: 1040px;
}

.growth-ledger-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.growth-ledger-meta strong {
  font-size: 11px;
  font-weight: 650;
}

.growth-ledger-ok {
  color: var(--teal);
}

.growth-ledger-error {
  color: var(--danger);
}

.growth-hash {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
}

.growth-score-pill {
  display: inline-grid;
  min-width: 34px;
  min-height: 25px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 800;
}

.growth-score-pill.healthy {
  color: var(--teal);
  border-color: #9dd7ce;
  background: var(--teal-soft);
}

.growth-score-pill.warning {
  color: var(--amber);
  border-color: #edcf89;
  background: var(--amber-soft);
}

.growth-score-pill.critical {
  color: var(--danger);
  border-color: #e9b5bf;
  background: var(--danger-soft);
}

.requirements-view {
  min-height: calc(100vh - 176px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 26, 33, 0.06);
}

.requirements-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.requirements-header h1 {
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.2;
}

.requirements-context {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.8fr);
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.strategy-context,
.capability-context {
  min-width: 0;
  padding: 18px 20px;
}

.strategy-context {
  display: grid;
  gap: 7px;
  border-right: 1px solid var(--line);
}

.strategy-context strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.strategy-context p {
  max-width: 880px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.65;
}

.context-meta {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.capability-context {
  display: grid;
  align-content: start;
  gap: 9px;
}

.production-health-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.production-health-item {
  display: grid;
  grid-template-columns: 10px 82px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 8px;
  background: var(--surface);
}

.production-health-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
}

.production-health-item.ready i {
  background: var(--teal);
}

.production-health-item.warning i {
  background: var(--amber);
}

.production-health-item.blocked i {
  background: var(--danger);
}

.production-health-item strong {
  font-size: 11px;
}

.production-health-item span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.capability-line span {
  color: var(--text-faint);
  font-size: 11px;
}

.capability-line strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 750;
}

.capability-line strong.available {
  color: var(--teal);
}

.capability-line strong.unavailable {
  color: var(--danger);
}

.capability-line strong.paused {
  color: var(--amber);
}

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

.requirements-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 1fr));
  min-width: min(100%, 480px);
}

.requirements-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
}

.requirements-metrics div:first-child {
  padding-left: 0;
}

.requirements-metrics div:last-child {
  border-right: 0;
}

.requirements-metrics dt {
  color: var(--text-faint);
  font-size: 10px;
}

.requirements-metrics dd {
  font-size: 20px;
  font-weight: 780;
}

.requirement-filter-tabs {
  flex: 0 0 auto;
}

.requirement-filter-tab {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.requirements-list {
  display: grid;
}

.requirement-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 18px;
  min-height: 108px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

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

.requirement-row:hover {
  background: #fbfcfd;
}

.requirement-row.done {
  color: var(--text-soft);
  background: var(--surface-muted);
}

.requirement-priority {
  display: grid;
  align-self: stretch;
  align-content: center;
  gap: 4px;
  padding-left: 12px;
  border-left: 3px solid var(--line-strong);
}

.requirement-row.p0 .requirement-priority {
  border-left-color: var(--red);
}

.requirement-row.p1 .requirement-priority {
  border-left-color: var(--amber);
}

.requirement-row.p2 .requirement-priority {
  border-left-color: var(--blue);
}

.requirement-priority strong {
  font-size: 17px;
}

.requirement-priority span {
  color: var(--text-faint);
  font-size: 10px;
}

.requirement-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.requirement-copy h2 {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.4;
}

.requirement-copy p {
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.requirement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--text-faint);
  font-size: 10px;
}

.requirement-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.requirement-status-select {
  min-width: 108px;
  min-height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 11px;
}

.requirement-auto-state {
  color: var(--red-deep);
  font-size: 11px;
  font-weight: 750;
}

.requirement-action {
  min-width: 72px;
}

.requirements-empty {
  display: grid;
  min-height: 260px;
  place-content: center;
  color: var(--text-faint);
}

.records-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.records-header-actions,
.experiment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.access-button {
  min-width: 58px;
}

.access-button.unlocked {
  border-color: #9ed7ca;
  color: var(--teal);
  background: var(--teal-soft);
}

.experiment-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.experiment-summary > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.experiment-summary > div:last-child {
  border-right: 0;
}

.experiment-summary span,
.experiment-summary small {
  color: var(--text-soft);
  font-size: 10px;
}

.experiment-summary strong {
  font-size: 24px;
  line-height: 1.1;
}

.experiment-section {
  padding: 18px 20px 20px;
  border-bottom: 1px solid var(--line);
}

.records-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.records-section-header h2 {
  margin-top: 2px;
  font-size: 18px;
}

.experiment-list {
  display: grid;
  gap: 8px;
}

.experiment-row {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1.5fr) minmax(180px, 0.8fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.experiment-date,
.experiment-copy,
.experiment-result {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.experiment-date span,
.experiment-copy span,
.experiment-result > span,
.experiment-result > small {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.experiment-verdict {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 10px;
  line-height: 1;
}

.experiment-verdict.failed {
  border-color: #e9a8a2;
  color: #a83b32;
  background: #fff1ef;
}

.experiment-verdict.passed {
  border-color: #9ed7ca;
  color: var(--teal);
  background: var(--teal-soft);
}

.experiment-empty {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  color: var(--text-soft);
  text-align: center;
}

.button.compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.trend-adopted {
  color: var(--teal);
  font-size: 11px;
  font-weight: 750;
}

.trend-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.records-table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 750;
}

td {
  font-size: 12px;
  line-height: 1.5;
}

.record-title {
  display: grid;
  max-width: 260px;
  gap: 3px;
}

.record-title strong,
.record-note strong {
  overflow-wrap: anywhere;
}

.record-title span,
.record-note span {
  color: var(--text-faint);
  font-size: 10px;
}

.record-note {
  display: grid;
  max-width: 390px;
  gap: 4px;
}

.app-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}

.app-dialog::backdrop {
  background: rgba(17, 20, 26, 0.58);
  backdrop-filter: blur(4px);
}

.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
}

.dialog-header {
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin-top: 3px;
  font-size: 19px;
}

.dialog-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.dialog-body {
  display: grid;
  gap: 14px;
  padding: 17px;
}

.dialog-context {
  padding: 10px 12px;
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  color: #15675f;
  font-size: 12px;
  font-weight: 750;
}

.content-generate-dialog {
  width: min(880px, calc(100vw - 28px));
}

.content-generate-body {
  gap: 16px;
}

.content-generate-status {
  min-height: 40px;
  padding: 11px 13px;
  border-left: 3px solid var(--line-strong);
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 12px;
  line-height: 1.5;
}

.content-generate-status.running {
  border-left-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.content-generate-status.ready {
  border-left-color: var(--teal);
  color: #15675f;
  background: var(--teal-soft);
}

.content-generate-status.failed {
  border-left-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.content-series-summary,
.content-series-note {
  padding: 9px 11px;
  border-left: 3px solid #d49a16;
  color: #6f4d06;
  background: #fff8df;
  font-size: 11px;
  line-height: 1.5;
}

.content-generate-preview {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.content-candidate-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 14px 0;
}

.content-candidate-option {
  display: grid;
  min-width: 0;
  min-height: 64px;
  align-content: center;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-soft);
  background: var(--surface);
  text-align: left;
}

.content-candidate-option:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.content-candidate-option.active {
  border-color: var(--teal);
  color: #15675f;
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 24%, transparent);
}

.content-candidate-option strong,
.content-candidate-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-candidate-option strong {
  font-size: 12px;
}

.content-candidate-option small {
  color: inherit;
  font-size: 10px;
  opacity: 0.78;
}

.content-performance-note {
  padding: 9px 11px;
  border-left: 3px solid var(--blue);
  color: var(--text-soft);
  background: var(--blue-soft);
  font-size: 11px;
  line-height: 1.5;
}

.content-origin-note {
  padding: 9px 11px;
  border-left: 3px solid var(--teal);
  color: #15675f;
  background: var(--teal-soft);
  font-size: 11px;
  line-height: 1.5;
}

.content-generate-preview > header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
}

.content-preview-state {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.state-pill.candidate-score {
  color: #15675f;
  background: var(--teal-soft);
}

.content-generate-preview > header h3 {
  min-width: 0;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.content-score-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 13px;
}

.content-score-reasons span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 10px;
  line-height: 1.35;
}

.content-contract-review {
  border-top: 1px solid var(--line);
}

.content-contract-review > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 12px;
}

.content-contract-review > header > div {
  display: grid;
  gap: 3px;
}

.content-contract-review > header span,
.content-contract-review > header small {
  color: var(--text-faint);
  font-size: 10px;
}

.content-contract-review > header strong {
  font-size: 13px;
  line-height: 1.45;
}

.content-contract-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.content-contract-columns > section {
  min-width: 0;
  padding: 14px;
}

.content-contract-columns > section:first-child {
  padding-left: 0;
}

.content-contract-columns > section + section {
  border-left: 1px solid var(--line);
}

.content-contract-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  margin-bottom: 10px;
}

.content-contract-heading > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 10px;
  font-weight: 750;
}

.content-contract-heading strong {
  font-size: 12px;
}

.content-contract-heading small {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-contract-columns dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.content-contract-row {
  display: grid;
  gap: 3px;
}

.content-contract-row dt {
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 650;
}

.content-contract-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.55;
}

.content-preview-block {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.content-preview-block > span,
.content-preview-grid span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
}

.content-preview-block pre,
.content-preview-block p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.75;
}

.content-preview-block ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-preview-block li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.content-preview-block li:first-child {
  border-top: 0;
}

.content-preview-block li > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.content-preview-block li > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.content-preview-block li strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.5;
}

.content-preview-block li small {
  color: var(--text-soft);
  line-height: 1.5;
}

.content-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.content-preview-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px 14px 0;
}

.content-preview-grid > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.content-preview-grid strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.accounts-dialog {
  width: min(920px, calc(100vw - 28px));
}

.account-dialog-body {
  gap: 18px;
}

.account-management-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.account-management-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}

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

.account-management-row.active {
  box-shadow: inset 3px 0 0 var(--teal);
  background: color-mix(in srgb, var(--teal) 5%, var(--surface));
}

.account-management-row > div {
  display: grid;
  gap: 3px;
}

.account-management-row strong {
  font-size: 12px;
}

.account-management-row div span {
  color: var(--text-faint);
  font-size: 10px;
}

.account-management-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px !important;
}

.account-login-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.account-login-button:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.account-login-button:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}

.account-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 11px;
  cursor: pointer;
}

.account-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.account-toolchain-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-toolchain-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}

.account-toolchain-panel > summary::-webkit-details-marker { display: none; }

.account-toolchain-panel > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.account-toolchain-panel > summary strong { font-size: 13px; }
.account-toolchain-panel > summary small { color: var(--text-faint); font-size: 10px; }
.account-toolchain-panel > summary > span:last-child { color: var(--blue); font-size: 10px; }
.account-toolchain-panel[open] > summary > span:last-child { visibility: hidden; }
.account-toolchain-panel[open] > summary > span:last-child::after { content: "收起"; visibility: visible; }

.account-toolchain-form {
  display: grid;
  gap: 13px;
  padding: 5px 0 17px;
}

.account-toolchain-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.account-toolchain-head > div {
  display: grid;
  gap: 3px;
}

.account-toolchain-head small {
  color: var(--text-faint);
  font-size: 10px;
}

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

.platform-action-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.platform-action {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  background: var(--surface);
}

.platform-action i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}

.platform-action.ready i { background: var(--teal); }
.platform-action.pending i { background: var(--amber); }
.platform-action.unsupported i { background: var(--danger); }

.platform-action strong,
.platform-action small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-action strong { font-size: 10px; }
.platform-action small { color: var(--text-faint); font-size: 9px; }

.account-create-form {
  display: grid;
  gap: 13px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .account-toolchain-head {
    align-items: stretch;
    flex-direction: column;
  }

  .account-toolchain-grid,
  .platform-action-list {
    grid-template-columns: 1fr;
  }

  .account-management-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .account-management-actions {
    grid-column: 1 / -1;
  }
}

.account-create-form .button {
  justify-self: end;
}

.new-pack-dialog {
  width: min(820px, calc(100vw - 28px));
}

.text-card-template-editor {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: var(--surface-muted);
}

.text-card-template-editor > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.text-card-template-editor > header div {
  display: grid;
  gap: 4px;
}

.text-card-template-editor > header small {
  color: var(--text-faint);
  font-size: 10px;
}

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

.text-card-input-grid textarea {
  min-height: 94px;
  background: var(--surface);
}

.music-file-state {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.music-file-state span {
  color: var(--text-faint);
  font-size: 10px;
}

.music-file-state strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  color: var(--text-soft);
  font-size: 11px;
  cursor: pointer;
}

.template-checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.file-drop {
  position: relative;
  display: grid;
  min-height: 150px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-muted);
  cursor: pointer;
}

.file-drop:hover,
.file-drop.has-file {
  border-color: #85a8e7;
  background: var(--blue-soft);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.file-drop small {
  color: var(--text-faint);
}

.create-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
}

.create-progress span {
  width: 16px;
  height: 16px;
  border: 2px solid #b9cdf2;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.confirm-dialog {
  width: min(720px, calc(100vw - 28px));
}

.confirm-body {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.confirm-video {
  width: 164px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 7px;
  background: #11141a;
}

.confirm-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.confirm-copy h3 {
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.4;
}

.confirm-copy dl {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.confirm-copy dl div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.confirm-copy dl div:last-child {
  border-bottom: 0;
}

.confirm-copy dt {
  color: var(--text-faint);
  font-size: 11px;
}

.confirm-copy dd {
  font-size: 12px;
  font-weight: 700;
}

.confirm-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.confirm-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--red);
}

.editorial-review-list {
  display: grid;
  gap: 6px;
}

.editorial-review-list .confirm-check {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  background: #1b1f27;
  box-shadow: 0 12px 30px rgba(23, 26, 33, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--danger);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.trends-view {
  min-height: calc(100vh - 112px);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trends-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
}

.trends-header > div:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.trends-header h1 {
  font-size: 24px;
  line-height: 1.2;
}

.trends-header p {
  color: var(--text-soft);
  line-height: 1.5;
}

.trends-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.trends-header-actions .button {
  min-height: 38px;
  text-decoration: none;
}

.trends-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.trends-metrics > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 18px 24px;
  border-right: 1px solid var(--line);
}

.trends-metrics > div:last-child {
  border-right: 0;
}

.trends-metrics span,
.trends-metrics small {
  color: var(--text-faint);
  font-size: 11px;
}

.trends-metrics strong {
  font-size: 28px;
  line-height: 1;
}

.trends-focus-band {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.75fr);
  border-bottom: 1px solid var(--line);
}

.trend-recommendation-panel,
.trend-method-panel,
.trends-data-section {
  min-width: 0;
  padding: 24px 26px;
}

.trend-method-panel {
  border-left: 1px solid var(--line);
  background: var(--surface-muted);
}

.trends-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.trends-section-header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.trends-section-header h2 {
  font-size: 16px;
  line-height: 1.25;
}

.trend-list-subtitle {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.45;
}

.trends-section-header > .trend-list-actions {
  display: flex;
  grid-auto-flow: initial;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.trend-list-tabs {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.trend-list-tab {
  min-height: 30px;
  padding: 0 11px;
  color: var(--text-soft);
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.trend-list-tab:hover {
  color: var(--text);
}

.trend-list-tab.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(15 23 42 / 10%);
}

.trend-list-tab span {
  margin-left: 4px;
  color: var(--teal);
}

.trend-score-pill,
.trend-score-small,
.trend-decision {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

.trend-score-pill {
  min-width: 72px;
  min-height: 36px;
  padding: 0 10px;
  background: var(--surface-muted);
}

.trend-score-pill.use_now,
.trend-score-small.use_now,
.trend-decision.use_now {
  color: var(--teal);
  border-color: #a7d8d0;
  background: var(--teal-soft);
}

.trend-score-pill.watch,
.trend-score-small.watch,
.trend-decision.watch {
  color: var(--amber);
  border-color: #ead28f;
  background: var(--amber-soft);
}

.trend-score-pill.reject,
.trend-score-small.reject,
.trend-decision.reject {
  color: var(--danger);
  border-color: #efbdc7;
  background: var(--danger-soft);
}

.trend-decision.pending {
  color: var(--text-soft);
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.trend-keyword > .trend-momentum-signal {
  width: fit-content;
  padding: 3px 6px;
  color: var(--blue);
  border: 1px solid #b9cff7;
  border-radius: 4px;
  background: var(--blue-soft);
  font-weight: 700;
}

.trend-keyword > .trend-momentum-signal.new {
  color: var(--teal);
  border-color: #a7d8d0;
  background: var(--teal-soft);
}

.trend-keyword > .trend-momentum-signal.rank_and_heat,
.trend-keyword > .trend-momentum-signal.heating {
  color: var(--amber);
  border-color: #ead28f;
  background: var(--amber-soft);
}

.trend-recommendation-empty,
.trend-history-empty {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 24px;
  color: var(--text-faint);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  text-align: center;
}

.trend-recommendation {
  display: grid;
  gap: 18px;
}

.trend-recommendation-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.trend-recommendation-title > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.trend-recommendation-title span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.trend-recommendation-title h3 {
  font-size: 21px;
  line-height: 1.35;
}

.trend-recommendation-title a {
  color: inherit;
  text-decoration: none;
}

.trend-recommendation-title a:hover {
  color: var(--blue);
}

.trend-recommendation-title > strong {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 5px;
  font-size: 12px;
}

.trend-recommendation-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.trend-recommendation-details > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trend-recommendation-details dt {
  color: var(--text-faint);
  font-size: 11px;
}

.trend-recommendation-details dd {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.trend-pipeline {
  display: grid;
  gap: 0;
  list-style: none;
}

.trend-pipeline li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.trend-pipeline li:last-child {
  border-bottom: 0;
}

.trend-pipeline li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.trend-pipeline li > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trend-pipeline small {
  color: var(--text-faint);
  line-height: 1.45;
}

.trend-automation-state {
  margin-top: 14px;
  padding: 11px 12px;
  color: var(--text-soft);
  background: var(--surface);
  border-left: 3px solid var(--teal);
  line-height: 1.5;
}

.trends-data-section {
  border-bottom: 1px solid var(--line);
}

.trends-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.trends-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.trends-table th,
.trends-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.trends-table tr:last-child td {
  border-bottom: 0;
}

.trends-table th {
  color: var(--text-faint);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 600;
}

.trends-table th:nth-child(1) { width: 18%; }
.trends-table th:nth-child(2) { width: 25%; }
.trends-table th:nth-child(3) { width: 27%; }
.trends-table th:nth-child(4) { width: 8%; }
.trends-table th:nth-child(5) { width: 9%; }
.trends-table th:nth-child(6) { width: 13%; }

.trend-keyword,
.trend-table-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.trend-keyword > span,
.trend-keyword small,
.trend-table-copy span {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.45;
}

.trend-keyword a {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.trend-keyword a:hover {
  color: var(--blue);
}

.trend-table-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.trend-score-small,
.trend-decision {
  min-width: 45px;
  min-height: 28px;
  padding: 0 7px;
  font-size: 11px;
}

.trend-history-list {
  border-top: 1px solid var(--line);
}

.trend-history-row {
  display: grid;
  grid-template-columns: 110px 90px 90px 90px minmax(220px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}

.trend-history-row > span {
  color: var(--text-soft);
  font-size: 12px;
}

.trend-history-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.trend-history-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-history-row small {
  flex: 0 0 auto;
  color: var(--teal);
  font-weight: 700;
}

.recommendations-view {
  display: grid;
  gap: 14px;
}

.account-view-header,
.recommendation-priority,
.section-heading,
.shared-trend-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-view-header {
  min-height: 78px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-view-header > div,
.section-heading > div {
  display: grid;
  gap: 4px;
}

.account-view-header h1 {
  font-size: 20px;
}

.account-view-header p {
  color: var(--text-soft);
  font-size: 12px;
}

.account-diagnosis-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.account-diagnosis-band > div {
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.account-diagnosis-band > div:last-child {
  border-right: 0;
}

.account-diagnosis-band span {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 750;
}

.account-diagnosis-band strong {
  font-size: 18px;
  line-height: 1.25;
}

.account-diagnosis-band small {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.recommendation-priority {
  min-height: 142px;
  padding: 22px;
  background: #1a1e24;
  border: 1px solid #2a3038;
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  color: #fff;
}

.recommendation-priority-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.recommendation-priority .section-kicker {
  color: #7fcfc2;
}

.recommendation-priority h2 {
  font-size: 23px;
  line-height: 1.25;
}

.recommendation-priority p {
  max-width: 760px;
  color: #b4bdc8;
  font-size: 12px;
  line-height: 1.65;
}

.recommendation-priority .inline-meta span {
  color: #c7d0da;
  background: #252b33;
  border-color: #353d47;
}

.recommendation-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.recommendation-list-panel,
.shared-trend-preview {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.section-heading {
  min-height: 68px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: 16px;
}

.recommendation-list {
  display: grid;
}

.recommendation-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 94px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.recommendation-item:last-child {
  border-bottom: 0;
}

.recommendation-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #b9ddd7;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 11px;
  font-weight: 800;
}

.recommendation-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.recommendation-copy strong {
  font-size: 14px;
}

.recommendation-copy p {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.recommendation-copy small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.shared-trend-preview {
  display: grid;
}

.shared-trend-body,
.shared-trend-empty {
  display: grid;
  gap: 10px;
  min-height: 194px;
  padding: 18px;
}

.shared-trend-empty {
  place-items: center;
  color: var(--text-faint);
  font-size: 12px;
  text-align: center;
}

.shared-trend-body h3 {
  font-size: 17px;
}

.shared-trend-body p {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.65;
}

.shared-trend-body dl {
  display: grid;
  gap: 7px;
}

.shared-trend-body dl div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
}

.shared-trend-body dt {
  color: var(--text-faint);
  font-size: 10px;
}

.shared-trend-body dd {
  font-size: 11px;
  line-height: 1.5;
}

.shared-trend-actions {
  padding: 13px 17px;
  border-top: 1px solid var(--line);
}

.shared-trend-actions .button {
  flex: 1;
}

@media (max-width: 1280px) {
  .app-header {
    grid-template-columns: minmax(190px, 1fr) auto auto;
    padding: 0 14px;
  }

  .today-plan-panel {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .today-progress {
    border-right: 0;
  }

  .today-script-preview {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

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

  .generation-log {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .grok-web-panel {
    grid-template-columns: minmax(170px, 0.5fr) minmax(360px, 1.5fr);
  }

  .grok-web-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .publish-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .rail-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .rail-section {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .rail-section:last-child {
    border-right: 0;
  }
}

@media (max-width: 960px) {
  .app-header {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .action-dock {
    top: 116px;
  }

  .view-tabs {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .view-tab {
    flex: 1;
  }

  .header-actions .button.quiet {
    display: none;
  }

  .account-band {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px 14px;
  }

  .account-band-title {
    display: none;
  }

  .summary-band {
    grid-template-columns: 1fr;
  }

  .daily-generation-plan {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }

  .daily-generation-workflow,
  .daily-generation-next {
    grid-column: 1 / -1;
  }

  .daily-generation-upcoming {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
  }

  .today-task-strip {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .tomorrow-plan-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tomorrow-candidate-list {
    grid-template-columns: 1fr;
  }

  .today-task-list {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .today-task-item,
  .today-missing-task {
    min-width: 205px;
  }

  .trends-header {
    align-items: stretch;
    flex-direction: column;
  }

  .trends-header-actions {
    justify-content: flex-start;
  }

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

  .trends-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .trends-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .trends-focus-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .trend-method-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .growth-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .growth-metrics > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .growth-metrics > div:last-child {
    grid-column: auto;
  }

  .growth-overview-band {
    grid-template-columns: 1fr;
  }

  .growth-technical-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-date {
    min-height: 56px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .summary-metrics div:nth-child(2) {
    border-right: 0;
  }

  .summary-metrics div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .requirements-context {
    grid-template-columns: 1fr;
  }

  .strategy-context {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .requirements-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .requirement-filter-tabs {
    align-self: flex-start;
  }

  .requirement-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .requirement-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  main {
    padding: 10px;
  }

  .today-plan-panel {
    grid-template-columns: 1fr;
  }

  .today-plan-main,
  .today-progress {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .today-script-preview {
    grid-column: auto;
    border-top: 0;
  }

  .today-generation {
    grid-template-columns: 1fr;
  }

  .generation-controls,
  .generation-status {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .generation-log {
    grid-column: auto;
    border-top: 0;
  }

  .grok-web-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .grok-web-actions {
    grid-column: auto;
  }

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

  .queue-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pack-queue {
    display: grid;
    grid-auto-columns: minmax(260px, 310px);
    grid-auto-flow: column;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .pack-item {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .editor-panel {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .generation-voice-preview {
    grid-template-columns: 1fr;
  }

  .action-dock {
    position: static;
  }

  .content-preview-grid {
    grid-template-columns: 1fr;
  }

  .content-contract-review > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .content-contract-columns {
    grid-template-columns: 1fr;
  }

  .content-contract-columns > section,
  .content-contract-columns > section:first-child {
    padding: 13px 0;
  }

  .content-contract-columns > section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .content-candidate-switcher {
    grid-template-columns: 1fr;
  }

  .content-candidate-option {
    min-height: 52px;
  }

  .content-preview-grid > div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .content-preview-block li {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .content-generate-dialog .dialog-footer {
    flex-wrap: wrap;
  }

  .records-header,
  .records-header-actions {
    align-items: stretch;
  }

  .records-header,
  .records-header-actions,
  .experiment-actions {
    flex-direction: column;
  }

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

  .experiment-summary > div {
    border-bottom: 1px solid var(--line);
  }

  .experiment-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .experiment-actions .button {
    width: 100%;
  }
  .brand span:not(.brand-mark) {
    display: none;
  }

  .header-actions .button.primary {
    width: 36px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .header-actions .button.primary span {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1;
  }

  .header-actions .button.access-button {
    display: inline-flex;
    min-width: 52px;
    padding: 0 10px;
  }

  .brand,
  .brand > div {
    min-width: 0;
  }

  .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    overflow: visible;
  }

  .view-tab {
    min-width: 0;
    padding: 0 8px;
  }

  .trends-header,
  .trend-recommendation-panel,
  .trend-method-panel,
  .trends-data-section {
    padding: 15px 14px;
  }

  .trends-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trends-header-actions .muted {
    grid-column: 1 / -1;
  }

  .trends-header-actions .button {
    width: 100%;
  }

  .trends-metrics > div {
    min-height: 94px;
    padding: 14px;
  }

  .trends-metrics strong {
    font-size: 22px;
  }

  .trend-recommendation-title,
  .trends-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .trends-section-header > .trend-list-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .trend-list-tabs {
    width: 100%;
  }

  .trend-list-tab {
    flex: 1;
  }

  .trend-recommendation-title > strong,
  .trend-score-pill {
    align-self: flex-start;
  }

  .trend-recommendation-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .trends-table {
    min-width: 840px;
  }

  .trend-history-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
  }

  .trend-history-row > div {
    grid-column: 1 / -1;
  }

  .summary-metrics div {
    padding: 14px;
  }

  .growth-header {
    align-items: stretch;
    flex-direction: column;
    padding: 15px 14px;
  }

  .growth-header-actions {
    justify-content: space-between;
  }

  .growth-site-link {
    max-width: calc(100vw - 48px);
  }

  .growth-metrics > div {
    min-height: 94px;
    padding: 14px;
  }

  .growth-metrics strong {
    font-size: 22px;
  }

  .growth-section-header,
  .growth-check-row,
  .growth-action-row {
    padding-right: 14px;
    padding-left: 14px;
  }

  .growth-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .growth-section-header .button {
    width: 100%;
  }

  .growth-check-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .growth-check-row > span:last-child {
    grid-column: 2;
  }

  .growth-technical-list,
  .growth-actions-list {
    min-height: 0;
  }

  .account-band {
    gap: 8px;
    padding: 8px 10px;
  }

  .account-tab {
    grid-template-columns: 28px minmax(100px, 1fr) 12px;
    min-width: 190px;
  }

  .account-band > .button {
    width: 38px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .account-band > .button::before {
    content: "+";
    font-size: 19px;
  }

  .summary-metrics dd {
    font-size: 18px;
  }

  .requirements-header,
  .strategy-context,
  .capability-context,
  .requirements-overview,
  .requirement-row {
    padding-right: 14px;
    padding-left: 14px;
  }

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

  .requirements-metrics div {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
  }

  .requirements-metrics div:nth-child(2) {
    border-right: 0;
  }

  .requirements-metrics div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .requirement-filter-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .requirement-filter-tab {
    flex: 0 0 auto;
  }

  .requirement-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .requirement-priority {
    display: flex;
    align-self: auto;
    align-items: baseline;
  }

  .requirement-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .requirement-status-select,
  .requirement-action {
    flex: 1;
  }

  .today-plan-main {
    align-items: stretch;
    flex-direction: column;
  }

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

  .today-plan-actions .button {
    width: auto;
    min-width: 0;
    padding: 0 8px;
    white-space: normal;
  }

  .generation-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .generation-controls .today-section-head {
    flex-basis: 100%;
  }

  .visual-provider-meta {
    padding-left: 0;
  }

  .compact-field {
    flex-basis: 100%;
  }

  .generation-steps {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .generation-steps li {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
  }

  .workspace-header,
  .action-dock {
    align-items: stretch;
    flex-direction: column;
  }

  .save-state,
  .action-buttons {
    justify-content: stretch;
  }

  .save-state .button,
  .action-buttons .button {
    flex: 1;
  }

  .workspace-body {
    grid-template-columns: 1fr;
  }

  .preview-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .video-stage {
    width: 190px;
  }

  .form-row.two,
  .form-row.three {
    grid-template-columns: 1fr;
  }

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

  .text-card-template-editor > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-management-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .account-toggle {
    grid-column: 2;
  }

  .account-management-actions {
    grid-column: 2;
    justify-content: space-between;
  }

  .account-create-form .button {
    width: 100%;
  }

  .rail-panel {
    grid-template-columns: 1fr;
  }

  .rail-section {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .confirm-body {
    grid-template-columns: 1fr;
  }

  .confirm-video {
    width: 150px;
    margin: 0 auto;
  }
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .app-header {
    grid-template-columns: none;
  }

  .recommendation-workspace {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  }
}

@media (max-width: 960px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px 14px;
    width: 100%;
    height: auto;
    padding: 12px 14px;
    overflow: visible;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .account-band {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    border: 0;
  }

  .account-band-title {
    display: none;
  }

  .account-list {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .account-tab {
    width: auto;
    min-width: 210px;
  }

  .view-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .view-nav-group {
    display: flex;
    gap: 7px;
  }

  .view-nav-label {
    display: none;
  }

  .view-tab {
    min-width: 142px;
  }

  .sidebar-footer {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    padding: 0;
    border: 0;
  }

  .sidebar-service {
    display: none;
  }

  .sidebar-footer .access-button {
    min-width: 64px;
  }

  .app-header {
    grid-template-columns: none;
    min-height: 68px;
  }

  .recommendation-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .sidebar-footer {
    grid-column: 2;
    grid-row: 1;
  }

  .account-band {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .view-tabs {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .view-nav-group {
    display: flex;
  }

  .view-tab {
    min-width: 130px;
    padding: 7px 9px;
  }

  .view-tab small {
    display: none;
  }

  .account-tab {
    min-width: 198px;
  }

  .app-header {
    display: flex;
    min-height: 64px;
    padding: 8px 10px;
  }

  .page-context {
    gap: 8px;
  }

  .page-context h1 {
    font-size: 15px;
  }

  .page-context p span {
    display: none;
  }

  .context-scope {
    min-height: 25px;
    padding: 0 7px;
  }

  .account-view-header,
  .recommendation-priority {
    align-items: stretch;
    flex-direction: column;
  }

  .account-view-header .button,
  .recommendation-priority .button {
    width: 100%;
  }

  .account-diagnosis-band {
    grid-template-columns: 1fr;
  }

  .account-diagnosis-band > div {
    min-height: 90px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .account-diagnosis-band > div:last-child {
    border-bottom: 0;
  }

  .recommendation-priority h2 {
    font-size: 20px;
  }

  .recommendation-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .recommendation-item .button {
    grid-column: 2;
    justify-self: start;
  }

  .shared-trend-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.comments-view {
  display: grid;
  min-height: calc(100vh - 176px);
  align-content: start;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comments-header,
.comments-header-actions,
.comments-toolbar,
.comment-row-head,
.comment-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comments-header {
  min-height: 86px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.comments-header > div:first-child {
  display: grid;
  gap: 4px;
}

.comments-header h1 {
  font-size: 21px;
}

.comments-header p {
  color: var(--text-soft);
  font-size: 12px;
}

.comments-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.comments-summary > div {
  display: grid;
  min-width: 0;
  min-height: 94px;
  align-content: center;
  gap: 3px;
  padding: 14px 20px;
  border-right: 1px solid var(--line);
}

.comments-summary > div:last-child {
  border-right: 0;
}

.comments-summary span,
.comments-summary small {
  color: var(--text-faint);
  font-size: 10px;
}

.comments-summary strong {
  font-size: 26px;
  line-height: 1;
}

.comments-toolbar {
  min-height: 54px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line);
}

.comment-filter-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.comment-filter-tab {
  min-height: 31px;
  padding: 0 12px;
  color: var(--text-soft);
  background: transparent;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.comment-filter-tab.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(23, 26, 33, 0.08);
}

.comments-list {
  display: grid;
}

.comment-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

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

.comment-row:hover {
  background: #fbfcfd;
}

.comment-row-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.comment-row-head strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-work-title {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-state {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--text-soft);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
}

.comment-state.pending,
.comment-state.reply_failed {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #ead7a2;
}

.comment-state.reply_queued {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #cbdaf8;
}

.comment-state.replied {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: #b9ddd7;
}

.comment-content {
  max-width: 920px;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.comment-suggestion {
  display: grid;
  gap: 4px;
  max-width: 920px;
  padding: 10px 12px;
  color: var(--text-soft);
  background: var(--surface-muted);
  border-left: 3px solid var(--teal);
  font-size: 12px;
  line-height: 1.6;
}

.comment-suggestion-head,
.comment-reply-source {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.comment-suggestion-head small {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-suggestion p {
  color: var(--text-soft);
}

.comment-source {
  flex: 0 0 auto;
  padding: 2px 6px;
  color: var(--text-soft);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
}

.comment-source.yunjie {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: #b9ddd7;
}

.comment-source.fallback {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #ead7a2;
}

.comment-suggestion > span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
}

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

.comment-signal {
  color: var(--text-faint);
  font-size: 11px;
}

.comments-empty,
.comments-locked {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 280px;
  padding: 32px;
  color: var(--text-soft);
  text-align: center;
}

.comments-locked strong,
.comments-empty strong {
  color: var(--text);
  font-size: 16px;
}

.comment-reply-dialog {
  width: min(680px, calc(100vw - 28px));
}

.comment-reply-body {
  display: grid;
  gap: 16px;
}

.comment-reply-context {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.comment-reply-context span {
  color: var(--text-faint);
  font-size: 11px;
}

.comment-reply-context p {
  font-size: 13px;
  line-height: 1.65;
}

.comment-reply-source {
  padding: 9px 11px;
  background: var(--surface-muted);
  border-left: 3px solid var(--teal);
}

.comment-reply-source strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

@media (max-width: 720px) {
  .comments-header {
    align-items: stretch;
    flex-direction: column;
  }

  .comments-header-actions {
    justify-content: space-between;
  }

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

  .comments-summary > div:nth-child(2) {
    border-right: 0;
  }

  .comments-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .comments-toolbar,
  .comment-row-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-row-head > div {
    flex-wrap: wrap;
  }
}

@media (max-width: 1280px) {
  .quality-control-band {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  }

  .quality-targets {
    border-right: 0;
  }

  .quality-experiment {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .quality-control-band {
    grid-template-columns: 1fr;
  }

  .quality-mode,
  .quality-targets {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quality-experiment {
    grid-column: auto;
    border-top: 0;
  }

  .quality-experiment .button {
    width: 100%;
  }

  .production-health-item {
    grid-template-columns: 10px 74px minmax(0, 1fr);
  }
}

.real-cases-view {
  min-width: 0;
  padding: 28px;
}

.real-cases-header,
.real-cases-header-actions,
.real-case-pause-gate,
.real-case-row-head,
.real-case-row-actions,
.real-case-question-actions {
  display: flex;
  align-items: center;
}

.real-cases-header {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.real-cases-header h1 {
  margin: 3px 0 6px;
  font-size: 28px;
  line-height: 1.2;
}

.real-cases-header p {
  color: var(--text-soft);
}

.real-cases-header-actions {
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.real-case-funnel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 -28px;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.real-case-funnel > div {
  min-width: 0;
  padding: 20px 28px;
  border-right: 1px solid var(--line);
}

.real-case-funnel > div:last-child {
  border-right: 0;
}

.real-case-funnel span,
.real-case-funnel small {
  display: block;
  color: var(--text-soft);
}

.real-case-funnel strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 30px;
  line-height: 1;
}

.real-case-funnel small {
  min-height: 34px;
  font-size: 12px;
  line-height: 1.4;
}

.real-case-pause-gate {
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0;
  padding: 18px 20px;
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
}

.real-case-pause-gate.paused {
  background: var(--danger-soft);
  border-left-color: var(--danger);
}

.real-case-pause-gate strong {
  display: block;
  margin: 4px 0;
  font-size: 17px;
}

.real-case-pause-gate p {
  color: var(--text-soft);
}

.real-cases-workspace {
  display: block;
}

.real-case-list-panel,
.real-case-comparison-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
}

.real-case-list-panel > .section-heading,
.real-case-comparison-panel > .section-heading {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.real-case-list {
  min-width: 0;
}

.real-case-empty {
  padding: 56px 24px;
  color: var(--text-faint);
  text-align: center;
}

.real-case-row {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

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

.real-case-row-head {
  justify-content: space-between;
  gap: 12px;
}

.real-case-row-head > div,
.real-case-row-actions,
.real-case-question-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.real-case-origin {
  margin: 14px 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-wrap;
}

.real-case-meta,
.real-case-background {
  color: var(--text-soft);
  line-height: 1.55;
}

.real-case-background {
  margin-top: 8px;
}

.real-case-question {
  margin: 14px 0;
  padding: 14px;
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
}

.real-case-question strong,
.real-case-question span {
  display: block;
}

.real-case-question span {
  margin: 5px 0 10px;
  line-height: 1.5;
}

.real-case-question input {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.real-case-final {
  margin: 14px 0;
  padding: 14px;
  color: #075e55;
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
}

.real-case-final span,
.real-case-final strong {
  display: block;
}

.real-case-final strong {
  margin-top: 5px;
  line-height: 1.55;
}

.real-case-derived {
  margin: 12px 0;
  border-top: 1px solid var(--line);
}

.real-case-derived summary {
  padding: 10px 0;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.real-case-derived pre {
  overflow: auto;
  margin: 0;
  padding: 12px;
  color: var(--text-soft);
  white-space: pre-wrap;
  background: var(--surface-muted);
  border-radius: 6px;
}

.real-case-record {
  margin: 12px 0;
  border-top: 1px solid var(--line);
}

.real-case-record summary,
.real-case-advanced summary,
.real-case-analytics > summary,
.real-case-evidence-form > summary {
  padding: 12px 0;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.real-case-record pre {
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  color: var(--text-soft);
  white-space: pre-wrap;
  background: var(--surface-muted);
  border-radius: 6px;
}

.real-case-row-actions {
  margin-top: 14px;
}

.real-case-confirmation-note {
  margin: 14px 0 0;
  padding: 11px 12px;
  color: #6f4d00;
  line-height: 1.55;
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
}

.real-case-evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.real-case-effect {
  border-left-color: #0f8f7c;
  background: #f1fbf8;
}

.real-case-evidence-form {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.real-case-evidence-form h3,
.real-case-evidence-form p {
  margin: 0;
}

.real-case-evidence-form p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.real-case-evidence-form .form-row {
  margin-top: 14px;
}

.real-case-primary-note {
  margin: -4px 0 14px;
  color: var(--text-soft);
  line-height: 1.5;
}

.real-case-privacy-note {
  margin: -6px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--amber);
  color: var(--text-soft);
  line-height: 1.5;
}

.real-case-basic-confirmation {
  align-items: flex-start;
}

.real-case-advanced {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.real-case-advanced .form-row {
  padding-top: 6px;
}

.real-case-analytics {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.real-case-analytics > summary {
  color: var(--text-soft);
}

.real-case-analytics .real-case-funnel {
  margin: 4px 0 0;
}

.real-case-analytics .real-case-comparison-panel {
  margin-top: 18px;
}

.real-case-comparison {
  padding: 4px 20px 20px;
}

.real-case-comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.real-case-comparison-row:last-child {
  border-bottom: 0;
}

.real-case-comparison-row strong,
.real-case-comparison-row span,
.real-case-comparison-row small {
  display: block;
}

.real-case-comparison-row span,
.real-case-comparison-row small {
  margin-top: 3px;
  color: var(--text-soft);
}

.real-case-comparison-row b {
  font-size: 20px;
}

.real-case-dialog {
  width: min(760px, calc(100vw - 32px));
}

.real-case-dialog .check-line {
  margin: 16px 0;
}

#contentGenerateEvidenceState {
  display: block;
  margin-top: 6px;
  color: var(--text-faint);
  line-height: 1.4;
}

.content-ending-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 32px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.content-ending-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.content-ending-toggle small {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 980px) {
  .real-cases-view {
    padding: 20px;
  }

  .real-cases-header,
  .real-case-pause-gate {
    align-items: flex-start;
    flex-direction: column;
  }

  .real-case-funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 0;
  }

  .real-case-funnel > div:nth-child(2) {
    border-right: 0;
  }

  .real-case-funnel > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

}

@media (max-width: 560px) {
  .real-case-funnel {
    grid-template-columns: 1fr;
  }

  .real-case-funnel > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .real-case-funnel > div:last-child {
    border-bottom: 0;
  }
}

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