:root {
  color-scheme: dark;
  --bg: #090b11;
  --surface: #11141d;
  --surface-2: #171b27;
  --surface-3: #1e2332;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7ff;
  --muted: #969caf;
  --muted-2: #6f7588;
  --purple: #8b5cf6;
  --blue: #38bdf8;
  --green: #3ddc97;
  --amber: #f4b740;
  --red: #fb7185;
  --seal: #c63d2f;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family:
    Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at 85% -10%,
      rgba(91, 74, 231, 0.2),
      transparent 32rem
    ),
    radial-gradient(
      circle at 5% 28%,
      rgba(30, 119, 200, 0.1),
      transparent 28rem
    ),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

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

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  background: rgba(9, 11, 17, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  width: fit-content;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(145deg, #181c28, #292f43);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
  place-items: center;
}

.brand strong,
.brand small {
  display: block;
}

.brand-seal {
  display: inline-grid;
  min-width: 2.2em;
  min-height: 2.2em;
  margin-left: 0.45em;
  padding: 0.18em;
  color: #fff4ea;
  font-size: 0.66em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  background: var(--seal);
  border: 1px solid rgba(255, 244, 234, 0.42);
  border-radius: 3px;
  place-items: center;
  transform: rotate(-2deg);
}

.auth-brand {
  margin-bottom: 28px;
}

.brand-static {
  pointer-events: none;
}

.owner-entry[hidden] {
  display: none;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.03em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.desktop-nav {
  display: flex;
  gap: 8px;
}

.desktop-nav a {
  padding: 9px 13px;
  color: var(--muted);
  font-size: 13px;
  border-radius: 10px;
}

.desktop-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.runtime-state {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
}

.health-dot {
  width: 7px;
  height: 7px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(244, 183, 64, 0.1);
}

.health-dot.is-healthy {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.1);
}

.health-dot.is-error {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.1);
}

.version {
  padding: 4px 7px;
  color: #b5a6ff;
  background: rgba(139, 92, 246, 0.12);
  border-radius: 6px;
}

.account-link {
  color: #b5a6ff;
  font-size: 11px;
}

.public-case-header {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
}

.public-case-shell,
.public-case-footer {
  width: min(920px, calc(100% - 40px));
  margin-inline: auto;
}

.public-case-shell {
  padding: clamp(44px, 8vw, 96px) 0;
}

.public-case-shell > h1 {
  max-width: 16ch;
  font-size: clamp(2.35rem, 8vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.public-case-lead {
  max-width: 700px;
  color: #c4c9d8;
  font-size: clamp(1.08rem, 2.5vw, 1.45rem);
  line-height: 1.7;
}

.public-case-byline,
.public-case-date,
.public-case-footer {
  color: var(--muted);
}

.public-case-facts {
  display: grid;
  grid-template-columns: minmax(110px, 0.3fr) 1fr;
  gap: 0;
  margin: 64px 0;
  border-top: 1px solid var(--line);
}

.public-case-facts dt,
.public-case-facts dd {
  margin: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.public-case-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.public-case-facts dd {
  white-space: pre-wrap;
  line-height: 1.75;
}

.public-case-section {
  margin: 72px 0;
}

.public-case-section li {
  margin: 12px 0;
  line-height: 1.65;
}

.public-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.public-metric {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.public-metric dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.public-metric dd {
  margin: 10px 0 0;
  font-size: 1.6rem;
  font-weight: 750;
}

.public-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}

.public-gallery figure {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.public-gallery img,
.showcase-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.public-gallery figcaption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.public-case-footer {
  padding: 0 0 44px;
  font-size: 0.78rem;
}

.showcase-manage-shell,
.cli-guide-shell {
  width: min(1320px, calc(100% - 32px));
  margin-inline: auto;
}

.showcase-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  gap: 18px;
}

.showcase-list-panel {
  align-self: start;
  position: sticky;
  top: 88px;
}

.showcase-list-item {
  width: 100%;
  margin: 5px 0;
  padding: 12px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
}

.showcase-list-item:hover,
.showcase-list-item.is-active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

.showcase-form,
.showcase-images,
.showcase-publish {
  margin-bottom: 40px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
}

.showcase-preview {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

.cli-guide-card:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.copy-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  margin: 12px 0;
}

.copy-block pre {
  min-width: 0;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #d8d1ff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #090b11;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.cli-command-list > li {
  margin-bottom: 24px;
}

.cli-exit-list {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
}

.cli-exit-list dd {
  margin: 0;
}

@media (max-width: 760px) {
  .brand small {
    display: none;
  }

  .showcase-layout,
  .cli-guide-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .showcase-list-panel {
    position: static;
  }

  .cli-guide-card:nth-child(n + 3) {
    grid-column: auto;
  }

  .public-case-facts {
    grid-template-columns: 1fr;
  }

  .public-case-facts dt {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 50% 10%,
      rgba(139, 92, 246, 0.16),
      transparent 42%
    ),
    var(--bg);
}

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

.auth-card {
  width: min(460px, 100%);
  padding: clamp(28px, 6vw, 52px);
  background: rgba(17, 20, 29, 0.95);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-bottom: 12px;
  font-size: 34px;
}
.auth-intro,
.auth-maintenance {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}
.auth-form label {
  color: var(--muted);
  font-size: 11px;
}
.auth-form input,
.auth-form textarea {
  width: 100%;
  margin-top: 7px;
}

.auth-form textarea {
  min-height: 92px;
  resize: vertical;
}
.auth-feedback {
  min-height: 24px;
  margin-top: 16px;
  color: #ffb1bd;
  font-size: 12px;
}
.redemption-panel {
  margin: 24px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.redemption-panel summary {
  color: #b5a6ff;
  cursor: pointer;
  font-size: 12px;
}
.compact-form {
  margin-top: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 12px;
}
.account-topbar {
  grid-template-columns: 1fr auto;
}
.account-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 100px;
}
.account-hero {
  margin-bottom: 36px;
}
.account-hero h1 {
  font-size: clamp(38px, 6vw, 66px);
}
.account-hero p:last-child {
  color: var(--muted);
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.account-owner-panel {
  grid-column: 1 / -1;
}
.security-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.security-row:last-child {
  border-bottom: 0;
}
.security-row strong,
.security-row small {
  display: block;
}
.security-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.security-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.one-time-output {
  margin-bottom: 14px;
  padding: 14px;
  color: var(--amber);
  background: rgba(244, 183, 64, 0.07);
  border: 1px solid rgba(244, 183, 64, 0.2);
  border-radius: 10px;
  overflow-wrap: anywhere;
}

.app-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 60px 0 110px;
}

.command-header {
  display: flex;
  gap: 40px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 34px;
}

.command-header h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.command-header > div > p:last-child {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.eyebrow,
.panel-kicker {
  margin-bottom: 12px;
  color: #a58bff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 360px;
}

.button,
.text-button,
.icon-button {
  border: 0;
}

.button {
  min-height: 40px;
  padding: 0 15px;
  color: #d7daea;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.button:hover {
  color: white;
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, #7c55eb, #5751e8);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(89, 75, 224, 0.24);
}

.button.danger {
  color: #ffb1bd;
  background: rgba(251, 113, 133, 0.09);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.text-button {
  padding: 7px;
  color: #a58bff;
  font-size: 12px;
  background: transparent;
}

.icon-button {
  width: 38px;
  height: 38px;
  color: var(--muted);
  font-size: 24px;
  background: transparent;
  border-radius: 10px;
}

.icon-button:hover {
  color: white;
  background: var(--surface-3);
}

.safety-note {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 72px;
  padding: 12px 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  background: rgba(244, 183, 64, 0.05);
  border: 1px solid rgba(244, 183, 64, 0.13);
  border-radius: 12px;
}

.safety-note span {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

section + section {
  margin-top: 100px;
}

.section-heading {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
}

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

.panel {
  min-width: 0;
  padding: 22px;
  background: linear-gradient(
    145deg,
    rgba(23, 27, 39, 0.94),
    rgba(15, 18, 27, 0.94)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel.span-3 {
  grid-column: span 3;
}

.panel.span-4 {
  grid-column: span 4;
}

.panel.span-5 {
  grid-column: span 5;
}

.panel.span-6 {
  grid-column: span 6;
}

.panel.span-7 {
  grid-column: span 7;
}

.panel.span-8 {
  grid-column: span 8;
}

.panel.span-12,
.loading-panel {
  grid-column: span 12;
}

.loading-panel,
.empty-panel {
  display: grid;
  min-height: 180px;
  color: var(--muted);
  place-content: center;
  text-align: center;
}

.empty-panel h3 {
  margin-bottom: 9px;
  color: var(--text);
}

.empty-panel p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  line-height: 1.7;
}

.panel-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-header h3 {
  margin-bottom: 0;
  font-size: 15px;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.metric-value {
  margin: 4px 0 8px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.metric-value small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.metric-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.metric-accent {
  color: #c0b1ff;
}

.progress-track {
  display: block;
  width: 100%;
  padding: 0;
  appearance: none;
  height: 7px;
  margin: 18px 0 12px;
  overflow: hidden;
  background: #0a0c12;
  border-radius: 99px;
}

.progress-track::-webkit-progress-bar {
  background: #0a0c12;
  border-radius: 99px;
}

.progress-track::-webkit-progress-value {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: 99px;
}

.progress-track::-moz-progress-bar {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: 99px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.mini-stats div {
  padding: 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.mini-stats span,
.meta-list dt {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-stats strong {
  font-size: 13px;
}

.queue-list,
.session-list,
.timeline,
.source-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-item,
.session-item,
.source-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.queue-code {
  display: grid;
  min-width: 42px;
  height: 30px;
  color: #bdafff;
  font-size: 10px;
  font-weight: 800;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  place-items: center;
}

.queue-item strong,
.session-item strong,
.source-item strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item small,
.session-item small,
.source-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  white-space: nowrap;
}

.badge.accepted,
.badge.completed,
.badge.ready,
.badge.active {
  color: #78e9b5;
  background: rgba(61, 220, 151, 0.09);
}

.badge.invalid,
.badge.rejected,
.badge.blocked {
  color: #ff9bad;
  background: rgba(251, 113, 133, 0.08);
}

.badge.pending_review,
.badge.in_progress,
.badge.preparing {
  color: #8bd9ff;
  background: rgba(56, 189, 248, 0.08);
}

.episode-select-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  color: var(--text);
  background: #0d1018;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

select:focus,
input:focus,
textarea:focus {
  border-color: rgba(139, 92, 246, 0.75);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

.episode-select-label select {
  min-width: 230px;
  padding: 9px 38px 9px 11px;
  font-size: 12px;
}

.episode-hero {
  grid-column: span 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.episode-hero h3 {
  margin-bottom: 8px;
  font-size: 24px;
}

.episode-hero p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.episode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.timeline {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.stage {
  position: relative;
  min-width: 0;
  padding: 13px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 11px;
}

.stage::before {
  display: block;
  width: 8px;
  height: 8px;
  margin-bottom: 10px;
  content: "";
  background: var(--muted-2);
  border-radius: 50%;
}

.stage.completed::before {
  background: var(--green);
}

.stage.in_progress::before {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.stage strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage small {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

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

th {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: #d7daea;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.row-title strong,
.row-title small {
  display: block;
}

.row-title small {
  margin-top: 4px;
  color: var(--muted-2);
}

.row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.row-actions button {
  padding: 6px 8px;
  color: #a99aff;
  font-size: 9px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.source-disclosure {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.source-disclosure summary {
  padding: 16px 0 0;
  color: #a99aff;
  font-size: 11px;
  cursor: pointer;
}

.source-list {
  margin-top: 12px;
}

.source-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.node-source-details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}

.node-source-details > summary {
  padding-top: 10px;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.source-input-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.source-input-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 7px;
}

.source-input-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.meta-list div {
  min-width: 0;
  padding: 9px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
}

.meta-list dd {
  overflow: hidden;
  margin: 0;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: #0c0f17;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.segmented button {
  padding: 7px 12px;
  color: var(--muted);
  font-size: 10px;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.segmented button.is-active {
  color: white;
  background: var(--surface-3);
}

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

.credit-metric {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.credit-metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 9px;
}

.credit-metric strong {
  font-size: 20px;
}

dialog {
  width: min(650px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: #11141d;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

dialog:focus-visible {
  outline: none;
}

dialog::backdrop {
  background: rgba(2, 3, 7, 0.76);
  backdrop-filter: blur(6px);
}

.wide-dialog {
  width: min(820px, calc(100% - 30px));
}

.dialog-form > header,
.dialog-form > footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
}

.dialog-form > header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(17, 20, 29, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.dialog-form > header span {
  display: block;
  margin-bottom: 5px;
  color: #a58bff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.dialog-form > header h2 {
  margin: 0;
  font-size: 20px;
}

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

.form-grid {
  display: grid;
  gap: 16px;
  padding: 22px;
}

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

.form-grid label,
.form-grid fieldset {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.form-grid label input,
.form-grid label select,
.form-grid label textarea {
  margin-top: 7px;
  font-size: 12px;
}

.form-grid fieldset {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.form-grid legend {
  padding: 0 6px;
}

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

.check-list,
.asset-link-picker,
.result-fields,
.credit-entry-fields {
  display: grid;
  gap: 8px;
}

.check-row,
.asset-link-row,
.result-row,
.credit-entry-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
}

.check-row input,
.asset-link-row input {
  width: 16px;
  margin: 0;
}

.asset-link-row select,
.result-row select,
.result-row input,
.credit-entry-row input {
  width: auto;
  max-width: 150px;
  padding: 8px;
  font-size: 10px;
}

.result-row {
  grid-template-columns: minmax(100px, 1fr) repeat(4, minmax(80px, 0.65fr));
}

.credit-entry-row {
  grid-template-columns: minmax(0, 1fr) 130px minmax(130px, 1fr);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(380px, calc(100% - 30px));
  padding: 13px 16px;
  color: white;
  font-size: 12px;
  line-height: 1.5;
  background: #24293a;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast.is-error {
  background: #3a1e29;
  border-color: rgba(251, 113, 133, 0.3);
}

.mobile-dock {
  display: none;
}

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

  .desktop-nav {
    display: none;
  }

  .app-shell {
    width: min(100% - 32px, 920px);
    padding-top: 44px;
  }

  .command-header {
    display: block;
  }

  .quick-actions {
    justify-content: flex-start;
    min-width: 0;
    margin-top: 24px;
  }

  .dashboard-grid,
  .episode-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .panel.span-3,
  .panel.span-4,
  .panel.span-5,
  .panel.span-6,
  .panel.span-7,
  .panel.span-8 {
    grid-column: span 4;
  }

  .panel.span-12,
  .episode-hero,
  .loading-panel {
    grid-column: span 8;
  }

  .timeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 600px) {
  .topbar {
    min-height: 64px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 12px;
  }

  .brand small,
  .runtime-state .version {
    display: none;
  }

  .runtime-state {
    gap: 6px;
    font-size: 9px;
  }

  .runtime-state .account-link {
    font-size: 9px;
  }

  .runtime-state .owner-entry {
    max-width: 2.7em;
    overflow: hidden;
    white-space: nowrap;
  }

  .app-shell {
    width: min(100% - 24px, 560px);
    padding: 36px 0 100px;
  }

  .command-header h1 {
    font-size: 39px;
  }

  .command-header > div > p:last-child {
    font-size: 12px;
  }

  .quick-actions .button {
    flex: 1 1 calc(50% - 8px);
  }

  .safety-note {
    align-items: flex-start;
    margin-bottom: 56px;
  }

  section + section {
    margin-top: 72px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .workspace-heading {
    display: block;
  }

  .episode-select-label,
  .segmented {
    margin-top: 16px;
  }

  .episode-select-label select {
    min-width: 0;
  }

  .dashboard-grid,
  .episode-grid {
    grid-template-columns: 1fr;
  }

  .panel.span-3,
  .panel.span-4,
  .panel.span-5,
  .panel.span-6,
  .panel.span-7,
  .panel.span-8,
  .panel.span-12,
  .episode-hero,
  .loading-panel {
    grid-column: 1;
  }

  .panel {
    padding: 18px;
    border-radius: 16px;
  }

  .episode-hero {
    grid-template-columns: 1fr;
  }

  .episode-actions {
    justify-content: flex-start;
  }

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

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

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

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

  .result-row,
  .credit-entry-row {
    grid-template-columns: 1fr;
  }

  .result-row select,
  .result-row input,
  .credit-entry-row input {
    width: 100%;
    max-width: none;
  }

  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(82px, 0.4fr) minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .responsive-table td::before {
    color: var(--muted-2);
    font-size: 9px;
    text-align: left;
    content: attr(data-label);
  }

  .responsive-table .row-actions {
    justify-content: flex-end;
  }

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

  .mobile-dock {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 5px;
    background: rgba(18, 21, 31, 0.94);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
  }

  .mobile-dock a,
  .mobile-dock button {
    display: grid;
    min-width: 0;
    min-height: 40px;
    padding: 4px;
    color: var(--muted);
    font-size: 9px;
    text-align: center;
    background: transparent;
    border: 0;
    border-radius: 9px;
    place-items: center;
  }

  .mobile-dock button {
    color: #c4b7ff;
    background: rgba(139, 92, 246, 0.09);
  }

  .toast {
    right: 15px;
    bottom: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
.site-filing {
  padding: 24px 16px 32px;
  text-align: center;
  color: var(--muted, #667085);
  font-size: 13px;
}

.site-filing a,
.public-case-footer a {
  color: inherit;
  text-decoration: none;
}

.site-filing a:hover,
.public-case-footer a:hover {
  text-decoration: underline;
}

.public-case-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
