:root {
  color-scheme: light;
  --bg: #f6f8ff;
  --bg-2: #eef3ff;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #eef4ff;
  --ink: #142033;
  --muted: #43516a;
  --soft: #768198;
  --line: #dbe3f2;
  --line-strong: #bfcae0;
  --mint: #23d3b8;
  --teal: #0f9f8b;
  --amber: #ffb321;
  --coral: #ff5c7a;
  --blue: #316bff;
  --violet: #7c5cff;
  --radius: 8px;
  --shadow: 0 16px 36px rgba(34, 64, 120, 0.12);
  --focus: 0 0 0 3px rgba(49, 107, 255, 0.18);
  --font: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(49, 107, 255, 0.12), transparent 28%),
    radial-gradient(circle at 78% 10%, rgba(35, 211, 184, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(49, 107, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 107, 255, 0.06) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
  touch-action: manipulation;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-130%);
  padding: 9px 12px;
  color: #111713;
  background: var(--mint);
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
  box-shadow: var(--focus);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 0 24px;
  background: rgba(13, 17, 16, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 950;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #0c1411;
  background: var(--mint);
  border-radius: var(--radius);
}

.brand-mark svg,
button svg,
.icon-tile svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill,
.ghost-button,
.quiet-button,
.small-button,
.mini-button,
.text-button,
.icon-button,
.primary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.nav-pill {
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.nav-pill.active,
.nav-pill:hover {
  color: var(--mint);
  background: rgba(139, 232, 208, 0.08);
  border-color: rgba(139, 232, 208, 0.34);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 42px;
}

.hero-console {
  position: relative;
  min-height: 360px;
  display: block;
  padding: 58px 44px;
  background: #050706;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-console::before,
.hero-console::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-console::before {
  background-image: url("/assets/hero-copy-blast-20260627.png");
  background-position: center right;
  background-size: cover;
  transform: scale(1.01);
}

.hero-console::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.25) 64%, rgba(0, 0, 0, 0.04) 100%),
    linear-gradient(180deg, rgba(13, 17, 16, 0.02) 0%, rgba(13, 17, 16, 0.54) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-width: 0;
  max-width: 650px;
  min-height: 244px;
}

.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding: 7px 12px;
  color: var(--mint);
  background: rgba(139, 232, 208, 0.08);
  border: 1px solid rgba(139, 232, 208, 0.26);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 850;
}

.hero-badge span,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.hero-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: 58px;
  line-height: 1.06;
  overflow-wrap: anywhere;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.42);
}

.hero-title-accent {
  display: inline-block;
  margin-left: 12px;
  color: transparent;
  background: linear-gradient(100deg, #9ff2dc 0%, #73b7ff 42%, #8f77ff 72%, #f2c76f 100%);
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: none;
}

.hero-copy p:not(.hero-badge) {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(244, 241, 232, 0.86);
  font-size: 18px;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-button {
  min-height: 44px;
  padding: 0 17px;
  color: #101411;
  background: var(--amber);
  border-color: var(--amber);
}

.primary-button:hover {
  background: #ffd276;
}

.ghost-button,
.quiet-button,
.small-button,
.mini-button,
.icon-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-strong);
}

.ghost-button,
.quiet-button {
  padding: 0 14px;
}

.small-button,
.mini-button,
.text-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.text-button {
  color: var(--mint);
  background: transparent;
  border-color: transparent;
}

.ghost-button:hover,
.quiet-button:hover,
.small-button:hover,
.mini-button:hover,
.text-button:hover,
.icon-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.route-visual {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(90deg, rgba(139, 232, 208, 0.08) 0 1px, transparent 1px 54px),
    #151a17;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.route-visual-card {
  min-height: 232px;
  box-shadow: var(--shadow);
}

.source-node {
  position: relative;
  z-index: 2;
  width: 142px;
  min-height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: #0d1110;
  background: var(--mint);
  border-radius: var(--radius);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}

.source-node span {
  font-size: 13px;
  font-weight: 850;
}

.source-node strong {
  font-size: 18px;
}

.route-lines {
  position: absolute;
  inset: 24px;
  border: 1px dashed rgba(139, 232, 208, 0.28);
  border-radius: var(--radius);
}

.route-lines::before,
.route-lines::after {
  content: "";
  position: absolute;
  inset: 50% 16px auto;
  height: 1px;
  background: rgba(242, 184, 75, 0.36);
}

.route-lines::after {
  inset: 16px auto 16px 50%;
  width: 1px;
  height: auto;
}

.platform-orbit {
  position: absolute;
  inset: 16px;
}

.platform-orbit span {
  position: absolute;
  min-width: 72px;
  padding: 7px 9px;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 850;
}

.platform-orbit span:nth-child(1) { left: 20px; top: 16px; border-color: rgba(242, 184, 75, 0.45); }
.platform-orbit span:nth-child(2) { right: 22px; top: 24px; border-color: rgba(93, 134, 255, 0.45); }
.platform-orbit span:nth-child(3) { right: 30px; bottom: 24px; border-color: rgba(228, 109, 84, 0.48); }
.platform-orbit span:nth-child(4) { left: 24px; bottom: 26px; border-color: rgba(111, 124, 255, 0.5); }
.platform-orbit span:nth-child(5) { left: 50%; top: 8px; transform: translateX(-50%); border-color: rgba(255, 111, 145, 0.48); }
.platform-orbit span:nth-child(6) { left: 48px; top: 50%; transform: translateY(-50%); border-color: rgba(66, 214, 181, 0.5); }
.platform-orbit span:nth-child(7) { right: 50px; top: 50%; transform: translateY(-50%); border-color: rgba(255, 139, 74, 0.5); }

.intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

.right-stack {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  align-content: stretch;
}

.panel,
.report-section {
  background: rgba(23, 27, 24, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.source-panel {
  border-left: 5px solid var(--teal);
}

.config-panel {
  border-left: 5px solid var(--amber);
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.panel-title,
.report-head,
.history-head,
.platform-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-title {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.icon-tile {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--mint);
  background: rgba(139, 232, 208, 0.1);
  border: 1px solid rgba(139, 232, 208, 0.22);
  border-radius: var(--radius);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 950;
}

h2,
h3 {
  margin: 0;
  line-height: 1.18;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

.field {
  display: grid;
  gap: 7px;
  margin: 13px 0;
}

.field span,
.check-row,
.source-field small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.field-hint {
  color: var(--soft);
  font-size: 12px;
  font-weight: 750;
}

.field b {
  color: var(--coral);
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.source-field textarea {
  min-height: 176px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--mint);
  box-shadow: var(--focus);
}

.source-field small {
  justify-self: end;
}

.inline-actions,
.api-actions,
.run-actions,
.report-actions,
.prompt-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-head {
  margin: 18px 0 12px;
}

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

.platform-option {
  position: relative;
  min-height: 72px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.platform-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.platform-option strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.platform-option small {
  color: var(--soft);
  font-size: 12px;
}

.platform-option .mark {
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.platform-option:has(input:checked) {
  background: rgba(139, 232, 208, 0.085);
  border-color: var(--platform-accent, var(--mint));
}

.platform-option:has(input:checked) .mark {
  background: var(--platform-accent, var(--mint));
  border-color: var(--platform-accent, var(--mint));
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 13px;
}

.status-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--mint);
  background: rgba(139, 232, 208, 0.08);
  border: 1px solid rgba(139, 232, 208, 0.25);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 850;
}

.status-chip.muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
}

.fixed-model-chip {
  color: #111713;
  background: var(--mint);
  border-color: var(--mint);
}

.fixed-model-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.fixed-model-card div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 13px 14px;
  background: rgba(139, 232, 208, 0.07);
  border: 1px solid rgba(139, 232, 208, 0.22);
  border-radius: var(--radius);
}

.fixed-model-card span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
}

.fixed-model-card strong {
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.status-chip.ok .status-dot {
  background: var(--mint);
}

.status-chip.error {
  color: #ffd9d2;
  background: rgba(228, 109, 84, 0.1);
  border-color: rgba(228, 109, 84, 0.4);
}

.status-chip.error .status-dot {
  background: var(--coral);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.secret-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 9px;
}

.icon-button {
  width: 44px;
  padding: 0;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.api-actions {
  margin: 8px 0 14px;
}

.compact-actions {
  align-items: center;
  justify-content: space-between;
}

.config-panel {
  padding: 18px;
}

.config-panel .panel-title {
  margin-bottom: 12px;
}

.config-panel .icon-tile {
  width: 34px;
  height: 34px;
}

.config-panel h2 {
  font-size: 22px;
}

.config-panel .field {
  margin: 9px 0;
}

.config-panel input {
  height: 38px;
}

.config-panel .secret-row {
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
}

.config-panel .icon-button {
  width: 40px;
  min-height: 38px;
}

.config-panel .api-actions {
  gap: 8px;
  margin: 6px 0 10px;
}

.config-panel .status-chip {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.config-note {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(49, 107, 255, 0.06);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
}

.config-note strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.config-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.52;
}

.run-actions {
  margin-top: auto;
  padding-top: 12px;
}

.run-actions > * {
  flex: 1 1 180px;
}

.progress-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.progress-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 850;
}

.progress-item span {
  width: 9px;
  height: 9px;
  background: var(--soft);
  border-radius: 50%;
}

.progress-item.active {
  color: var(--amber);
  border-color: rgba(242, 184, 75, 0.35);
  background: rgba(242, 184, 75, 0.08);
}

.progress-item.done {
  color: var(--mint);
  border-color: rgba(139, 232, 208, 0.32);
  background: rgba(139, 232, 208, 0.08);
}

.progress-item.active span,
.progress-item.done span {
  background: currentColor;
}

.report-section {
  padding: 22px;
}

.report-head {
  margin-bottom: 16px;
}

.report-head p:not(.eyebrow),
.history-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.result-alert {
  display: grid;
  gap: 5px;
  margin: 0 0 16px;
  padding: 12px 14px;
  color: #ffe2d9;
  background: rgba(228, 109, 84, 0.1);
  border: 1px solid rgba(228, 109, 84, 0.34);
  border-radius: var(--radius);
}

.result-alert strong {
  color: var(--ink);
  font-size: 13px;
}

.result-alert span {
  color: #f2b8aa;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.summary-strip div,
.strategy-card {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-strip span,
.strategy-card span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
}

.summary-strip strong,
.strategy-card strong {
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.platform-strip {
  gap: 10px;
}

.platform-strip-label {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: var(--mint);
}

.platform-strip-label svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.platform-strip-label div {
  display: grid;
  gap: 1px;
}

.platform-strip-label strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.platform-strip-label span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}

.platform-tab-list {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.tab-button {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
}

.tab-button.active {
  color: #0d1110;
  background: var(--mint);
  border-color: var(--mint);
}

.platform-tab-button {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
}

.platform-tab-button.is-selected {
  color: #0d1110;
  background: var(--platform-accent, var(--mint));
  border-color: var(--platform-accent, var(--mint));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--platform-accent, var(--mint)) 32%, transparent);
}

.platform-tab-button.is-muted {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
}

.platform-tab-button.is-disabled:not(.is-selected) {
  opacity: 0.68;
}

.platform-tab-button.has-result {
  cursor: pointer;
}

.platform-tab-button.active,
.platform-tab-button.is-selected.active {
  color: #0d1110;
  background: var(--platform-accent, var(--mint));
  border-color: var(--platform-accent, var(--mint));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--platform-accent, var(--mint)) 24%, transparent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state svg {
  width: 32px;
  height: 32px;
}

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

.overview-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(139, 232, 208, 0.055);
  border: 1px solid rgba(139, 232, 208, 0.16);
  border-radius: var(--radius);
}

.overview-card span {
  color: var(--mint);
  font-size: 12px;
  font-weight: 950;
}

.overview-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

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

.result-card {
  min-width: 0;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-top: 4px solid var(--platform-accent, var(--mint));
  border-radius: var(--radius);
  overflow: hidden;
}

.result-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.result-card h3 {
  margin-bottom: 6px;
}

.result-card small {
  color: var(--soft);
}

.result-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 6px;
}

.result-meta-row span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 850;
}

.result-meta-row .content-count-pill {
  color: #111713;
  background: var(--platform-accent, var(--mint));
  border-color: var(--platform-accent, var(--mint));
}

.card-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.result-content {
  margin: 0;
  padding: 15px;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.78;
}

.note-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 15px 15px 31px;
  color: var(--muted);
  font-size: 13px;
}

.publish-pack {
  --pack-accent: var(--platform-accent, var(--mint));
  --pack-bg: rgba(255, 255, 255, 0.035);
  margin: 0 15px 12px;
  padding: 12px 13px;
  background: var(--pack-bg);
  border: 1px solid var(--line);
  border-top: 1px solid color-mix(in srgb, var(--pack-accent) 38%, transparent);
  border-left: 3px solid var(--pack-accent);
  border-radius: var(--radius);
}

.publish-pack.pack-layout {
  --pack-accent: #ff6574;
  --pack-bg: rgba(255, 101, 116, 0.075);
}

.publish-pack.pack-voice {
  --pack-accent: #8be8d0;
  --pack-bg: rgba(139, 232, 208, 0.07);
}

.publish-pack.pack-visual {
  --pack-accent: #72a3ff;
  --pack-bg: rgba(114, 163, 255, 0.07);
}

.result-content + .tag-pack,
.result-content + .publish-pack,
.tag-pack + .publish-pack {
  margin-top: 8px;
}

.publish-pack h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--pack-accent);
  font-size: 13px;
  font-weight: 950;
}

.publish-pack h4 span {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}

.publish-pack ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.tag-pack {
  margin: 0 15px 12px;
  padding: 12px 13px;
  background: rgba(242, 184, 75, 0.07);
  border: 1px solid rgba(242, 184, 75, 0.18);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
}

.tag-pack h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 950;
}

.tag-pack h4 span {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
}

.tag-row span {
  padding: 4px 8px;
  color: #171b18;
  background: #8be8d0;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 850;
}

.tag-row span:nth-child(3n+2) {
  background: #f2b84b;
}

.tag-row span:nth-child(3n) {
  background: #72a3ff;
}

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

.strategy-card.wide {
  grid-column: 1 / -1;
}

.strategy-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

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

.guide-card {
  min-height: 160px;
  display: grid;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-top: 4px solid var(--platform-accent, var(--mint));
  border-radius: var(--radius);
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.prompt-toolbar {
  justify-content: flex-end;
  margin-bottom: 10px;
}

.prompt-output {
  min-height: 520px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
}

.history-head {
  margin-bottom: 14px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.history-item h4 {
  margin: 0 0 5px;
  font-size: 15px;
}

.history-item p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 100;
  max-width: min(520px, calc(100% - 32px));
  padding: 11px 14px;
  color: #0d1110;
  background: var(--mint);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Light theme overrides: clear borders, readable type, no dark translucent glass. */
.app-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(34, 64, 120, 0.06);
}

.brand,
.nav-pill,
.ghost-button,
.quiet-button,
.small-button,
.mini-button,
.icon-button,
.result-card h3,
.history-item h4 {
  color: var(--ink);
}

.brand-mark,
.icon-tile,
.source-node {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--mint));
  border-color: transparent;
}

.nav-pill,
.ghost-button,
.quiet-button,
.small-button,
.mini-button,
.icon-button {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(34, 64, 120, 0.05);
}

.nav-pill.active,
.nav-pill:hover,
.text-button:hover {
  color: var(--blue);
  background: #eef4ff;
  border-color: #b9c9ff;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(49, 107, 255, 0.22);
}

.primary-button:hover {
  background: linear-gradient(135deg, #215cff, #6b4aff);
}

.text-button {
  color: var(--blue);
}

.hero-console {
  background: #050817;
  border-color: #c9d6ef;
  box-shadow: 0 18px 44px rgba(23, 40, 86, 0.18);
}

.hero-console::before {
  opacity: 1;
}

.hero-console::after {
  background:
    linear-gradient(90deg, rgba(5, 8, 23, 0.92) 0%, rgba(5, 8, 23, 0.72) 34%, rgba(5, 8, 23, 0.28) 64%, rgba(5, 8, 23, 0.06) 100%),
    linear-gradient(180deg, rgba(5, 8, 23, 0.04) 0%, rgba(5, 8, 23, 0.42) 100%);
}

.hero-badge {
  color: #dff9ff;
  background: rgba(11, 19, 46, 0.72);
  border-color: rgba(124, 214, 255, 0.36);
}

.hero-copy h1 {
  color: #ffffff;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.hero-title-accent {
  background: linear-gradient(100deg, #75f6ff 0%, #7c74ff 42%, #ff39c8 76%, #b8ff4d 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-copy p:not(.hero-badge) {
  color: rgba(231, 241, 255, 0.9);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}

.route-visual {
  background:
    linear-gradient(180deg, #ffffff, #f3f7ff),
    repeating-linear-gradient(90deg, rgba(49, 107, 255, 0.09) 0 1px, transparent 1px 54px);
  border-color: var(--line);
}

.route-lines {
  border-color: rgba(49, 107, 255, 0.22);
}

.route-lines::before,
.route-lines::after {
  background: rgba(49, 107, 255, 0.2);
}

.platform-orbit span {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: 0 5px 14px rgba(34, 64, 120, 0.08);
}

.panel,
.report-section,
.result-card,
.overview-card,
.strategy-card,
.summary-strip div,
.guide-card,
.history-item,
.empty-state,
.tabs {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 10px 26px rgba(34, 64, 120, 0.08);
}

.source-panel {
  border-left-color: var(--mint);
}

.config-panel {
  border-left-color: var(--blue);
}

.eyebrow,
.overview-card span,
.platform-strip-label {
  color: var(--blue);
}

.field span,
.check-row,
.source-field small,
.fixed-model-card span,
.summary-strip span,
.strategy-card span,
.report-head p:not(.eyebrow),
.history-head p,
.result-card small,
.history-item p,
.platform-option small,
.field-hint,
.platform-strip-label span,
.publish-pack ul,
.note-list,
.strategy-card ul,
.guide-card p {
  color: var(--muted);
}

input,
select,
textarea {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line-strong);
}

input::placeholder,
textarea::placeholder {
  color: #8a95aa;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.platform-option,
.progress-item,
.fixed-model-card div {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.platform-option:has(input:checked) {
  background: color-mix(in srgb, var(--platform-accent, var(--blue)) 10%, #ffffff);
  border-color: var(--platform-accent, var(--blue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--platform-accent, var(--blue)) 16%, transparent);
}

.platform-option .mark {
  background: #ffffff;
  border-color: var(--line-strong);
}

.status-chip,
.fixed-model-chip {
  color: #073f37;
  background: #e8fbf7;
  border-color: #a8eee0;
}

.status-chip.muted {
  color: var(--muted);
  background: #f5f7fb;
  border-color: var(--line);
}

.status-chip.error,
.result-alert {
  color: #9f213e;
  background: #fff0f4;
  border-color: #ffc1ce;
}

.result-alert strong {
  color: #8a1732;
}

.result-alert span {
  color: #a33a52;
}

.progress-item {
  color: var(--muted);
}

.progress-item span {
  background: #aab5c8;
}

.progress-item.active {
  color: #8a5a00;
  border-color: #ffd28a;
  background: #fff7e6;
}

.progress-item.done {
  color: #087d6d;
  border-color: #a8eee0;
  background: #e8fbf7;
}

.summary-strip strong,
.strategy-card strong,
.overview-card strong,
.fixed-model-card strong {
  color: var(--ink);
}

.platform-strip {
  background: #ffffff;
  border-color: var(--line);
}

.platform-strip-label strong {
  color: var(--ink);
}

.tab-button {
  color: var(--muted);
}

.tab-button.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.platform-tab-button {
  color: var(--muted);
  background: #f5f7fb;
  border-color: var(--line);
}

.platform-tab-button.is-selected {
  color: #ffffff;
  background: var(--platform-accent, var(--blue));
  border-color: var(--platform-accent, var(--blue));
}

.platform-tab-button.is-muted {
  color: #7a8497;
  background: #f5f7fb;
  border-color: #d9e1ef;
}

.platform-tab-button.active,
.platform-tab-button.is-selected.active {
  color: #ffffff;
  background: var(--platform-accent, var(--blue));
  border-color: var(--platform-accent, var(--blue));
}

.overview-card {
  background: #f9fbff;
  border-color: #dbe6ff;
}

.result-card {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 12px 28px rgba(34, 64, 120, 0.08);
}

.result-card-head {
  border-bottom-color: var(--line);
}

.result-content {
  color: var(--ink);
  background: #ffffff;
}

.result-meta-row span {
  color: var(--muted);
  background: #f5f7fb;
  border-color: var(--line);
}

.result-meta-row .content-count-pill {
  color: #ffffff;
  background: var(--platform-accent, var(--blue));
  border-color: var(--platform-accent, var(--blue));
}

.tag-pack {
  background: #fff8e8;
  border-color: #ffe1a8;
  border-left-color: var(--amber);
}

.tag-pack h4 {
  color: #9a6200;
}

.tag-row span {
  color: #12334d;
  background: #e7f7ff;
  border-color: #bde5ff;
}

.tag-row span:nth-child(3n+2) {
  background: #fff0c7;
  border-color: #ffd887;
}

.tag-row span:nth-child(3n) {
  background: #eef0ff;
  border-color: #cbd2ff;
}

.publish-pack {
  --pack-bg: #f8fbff;
  background: var(--pack-bg);
  border-color: var(--line);
  border-top-color: color-mix(in srgb, var(--pack-accent) 32%, #ffffff);
}

.publish-pack.pack-layout {
  --pack-accent: #ff4f70;
  --pack-bg: #fff2f5;
}

.publish-pack.pack-voice {
  --pack-accent: #00a891;
  --pack-bg: #ecfbf8;
}

.publish-pack.pack-visual {
  --pack-accent: #316bff;
  --pack-bg: #eff4ff;
}

.prompt-output {
  background: #ffffff;
  color: var(--ink);
}

.toast {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(49, 107, 255, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .intake-grid {
    grid-template-columns: 1fr;
  }

  .route-visual-card {
    min-height: 260px;
  }

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

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .app-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .top-nav > * {
    min-width: 0;
  }

  .top-nav > *:last-child {
    grid-column: 1 / -1;
  }

  .nav-pill {
    width: 100%;
    padding: 0 8px;
    font-size: 14px;
  }

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

  .page-shell > *,
  .app-header > *,
  .hero-copy,
  .hero-badge {
    max-width: 100%;
  }

  .hero-console {
    min-height: 350px;
    padding: 26px 20px;
  }

  .hero-console::before {
    background-position: 68% center;
  }

  .hero-console::after {
    background:
      linear-gradient(90deg, rgba(5, 8, 23, 0.9) 0%, rgba(5, 8, 23, 0.72) 58%, rgba(5, 8, 23, 0.28) 100%),
      linear-gradient(180deg, rgba(5, 8, 23, 0.08) 0%, rgba(5, 8, 23, 0.48) 100%);
  }

  .hero-copy {
    min-height: 298px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-title-accent {
    display: block;
    margin-left: 0;
  }

  .hero-copy p:not(.hero-badge) {
    font-size: 16px;
    max-width: min(100%, 310px);
  }

  .source-field small {
    justify-self: start;
  }

  .platform-head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .platform-head .inline-actions {
    justify-content: flex-start;
  }

  .compact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-actions .status-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .platform-grid,
  .form-row,
  .fixed-model-card,
  .progress-rail,
  .summary-strip,
  .overview-grid,
  .result-grid,
  .strategy-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .report-head,
  .history-head {
    align-items: stretch;
    flex-direction: column;
  }

  .report-actions,
  .hero-actions,
  .run-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .report-actions > *,
  .hero-actions > *,
  .run-actions > * {
    width: 100%;
  }

  .run-actions > * {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .route-visual {
    min-height: 220px;
  }

  .platform-orbit span:nth-child(6),
  .platform-orbit span:nth-child(7) {
    display: none;
  }
}
