/* Amie reference: sunlit white workspace, Inter, sky actions, quiet surfaces. */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --color-pure-canvas: #ffffff;
  --color-fog-surface: #fafafa;
  --color-ash-border: #cdcdcd;
  --color-stone-divider: #ebebeb;
  --color-graphite-body: #5c5c5c;
  --color-silver-muted: #a0a0a0;
  --color-ink-primary: #000000;
  --color-charcoal-dark: #2e2e2e;
  --color-sky-action: #11a8ff;
  --color-amber-highlight: #fbefaf;
  --color-mint-active: #01ca45;
  --color-violet-tag: #a050ff;
  --ink: var(--color-ink-primary);
  --muted: var(--color-graphite-body);
  --accent: var(--color-sky-action);
  --accent-light: var(--color-fog-surface);
  --paper: var(--color-pure-canvas);
  --line: var(--color-stone-divider);
  --white: var(--color-pure-canvas);
  --red: var(--color-charcoal-dark);
  --color-iron: var(--color-charcoal-dark);
  --color-slate: var(--color-charcoal-dark);
  --color-graphite: var(--color-charcoal-dark);
  --color-steel: var(--color-graphite-body);
  --color-fog: var(--color-graphite-body);
  --color-mist: var(--color-ash-border);
  --color-smoke: var(--color-ash-border);
  --color-cloud: var(--color-stone-divider);
  --color-charcoal: var(--color-ink-primary);
  --color-paper: var(--color-fog-surface);
  --color-ash: var(--color-silver-muted);
  --color-midnight-ink: var(--color-charcoal-dark);
  --radius-card: 12px;
  --radius-control: 12px;
  --radius-input: 8px;
  --radius-badge: 4px;
  --radius-large: 16px;
  --page-max: 1200px;
  --section-gap: 80px;
  --font-inter:
    "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: var(--font-inter);
  --shadow-card:
    0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 1px -0.5px rgba(0, 0, 0, 0.06),
    0 3px 3px -1.5px rgba(0, 0, 0, 0.06);
  --shadow-control: 0 0 0 1px rgba(0, 0, 0, 0.06);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  font-family: var(--font-inter);
  font-synthesis: none;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
summary {
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
summary {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
h1:focus,
main:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
::selection {
  background: var(--color-mist);
  color: var(--ink);
}
.icon-defs {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 24px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);

  border-bottom: 1px solid var(--color-ash-border);

  top: 0;
  transition: background 0.2s;
}
.header-inner {
  width: min(var(--page-max), calc(100% - 64px));
  min-height: 64px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.brand-wordmark {
  font-size: 26px;
  line-height: 1;
  font-weight: 600;

  color: var(--ink);
}
.brand-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  min-height: 22px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  color: var(--muted);
  background: transparent;

  border: 0;
}
.hold-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  margin-left: 6px;
  border-radius: 9px;
  background: #fff7e8;
  color: #815321;
  font-size: 11px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.api-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-steel);
  font-size: 12px;
}
.api-link .icon {
  width: 14px;
  height: 14px;
}
.api-link:hover {
  color: var(--ink);
}
main {
  scroll-margin-top: 24px;
  min-width: 0;
  min-height: calc(100dvh - 65px);
  display: flex;
  flex-direction: column;
}

.workspace-meta {
  gap: 20px;
}
.service-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 11px;
  color: var(--color-steel);
}
.service-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 9999px;
  background: var(--color-ash);
}
.service-state[data-state="online"] .service-dot {
  background: var(--ink);
}
.service-state[data-state="offline"] {
  border-color: var(--color-iron);
  color: var(--ink);
}
.service-state[data-state="offline"] .service-dot {
  background: transparent;
  border: 1px solid currentColor;
}
.workspace {
  flex: 1;
  width: min(var(--page-max), calc(100% - 64px));
  margin: 0 auto;
  padding: 16px 0 32px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0;
}
.page-title-group { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.page-title-group .badge { white-space: nowrap; }
.collection-schedule {
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--color-fog-surface);
  font-size: 13px;
}
.schedule-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.schedule-title { color: var(--ink); font-weight: 600; }
.schedule-settings { color: var(--muted); font-size: 12px; white-space: nowrap; }
.schedule-settings:hover { color: var(--accent); }
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 10px 24px; }
.schedule-item { display: grid; grid-template-columns: minmax(100px, 1fr) auto; align-items: start; gap: 4px 12px; min-width: 0; }
.schedule-name { color: var(--muted); }
.schedule-time { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; line-height: 1.6; font-variant-numeric: tabular-nums; }
.schedule-time small { margin-left: 8px; color: var(--muted); font-size: 11px; }
.schedule-state { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--muted); font-size: 11px; white-space: nowrap; }
.schedule-state.is-enabled::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--color-mint-active); vertical-align: middle; }
.collection-schedule summary { color: var(--muted); line-height: 1.6; }
.schedule-overview { margin-left: 12px; font-size: 12px; }
.schedule-expanded { padding-top: 12px; }
.schedule-expanded > .schedule-settings { display: block; width: fit-content; margin-bottom: 12px; }
.schedule-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) {
  .collection-schedule { padding: 12px; }
  .schedule-grid { grid-template-columns: minmax(0, 1fr); }
  .schedule-overview { margin-left: 8px; }
}
.eyebrow {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-fog);
}
h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.012em;
}
p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
  font-size: 14px;

  text-align: left;
}
.heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;

  justify-content: flex-start;
}
.refresh-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s var(--ease-out),
    box-shadow 0.18s;
}
.button .icon {
  width: 17px;
  height: 17px;
}
.primary {
  background: var(--accent);
  color: var(--white);

  box-shadow: none;

  border: 1px solid transparent;
  font-weight: 600;
}
.primary:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-1px);

  box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.06);
}
.secondary {
  background: var(--white);
  color: var(--muted);

  border: 1px solid var(--color-ash-border);
  box-shadow: none;
}
.secondary:hover:not(:disabled) {
  background: #fafafa;
  border-color: var(--color-mist);
  transform: translateY(-1px);
}
.button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
.nav-cta {
  border-radius: 12px;
  padding-inline: 24px;
}
.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;

  border-radius: 8px;
}
.button[aria-busy="true"] .refresh-icon {
  animation: rotate 0.85s linear infinite;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat {
  min-width: 0;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stat strong {
  display: block;
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat small {
  color: var(--color-fog);
  font-size: 12px;
  line-height: 1.5;
}
.data-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.platform-mix {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.mix-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9999px;

  background: var(--white);
}
.mix-item strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.context-note {
  line-height: 1.6;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--white);

  box-shadow: var(--shadow-card);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
}
.section-overline {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--color-fog);
}
h2,
.panel-heading h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.14;

  letter-spacing: -0.012em;
}
.panel-heading p {
  font-size: 14px;
}
.panel-icon {
  width: 24px;
  height: 24px;
  color: var(--color-fog);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--color-fog-surface);
  color: var(--color-iron);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}
input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--color-ash-border);
  background: var(--white);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  transition:
    border-color 0.18s,
    background 0.18s;
}
input,
select {
  min-height: 44px;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--color-slate);
}
input::placeholder,
textarea::placeholder {
  color: var(--color-fog);
  opacity: 1;
}
select {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2352525b' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
textarea {
  resize: vertical;
}
.filters > input {
  max-width: 190px;
}
.filters > select {
  max-width: 220px;
}
.search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-ash-border);
  background: var(--white);
  padding: 0 12px;
  border-radius: 8px;
}
.search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.search .icon {
  width: 18px;
  height: 18px;
  color: var(--color-steel);
}
.search input {
  flex: 1;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  border: 0;
  outline: 0;
  background: transparent;
}
.search input:focus-visible {
  outline: none;
}
kbd {
  min-width: 24px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--color-fog);
  font: inherit;
  font-size: 11px;
  text-align: center;

  font-family: inherit;
}
.table-wrap {
  width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-mist) transparent;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}
th {
  padding: 12px 16px;
  background: var(--color-fog-surface);
  color: var(--color-steel);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  border-block: 1px solid var(--line);
}
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--color-graphite);
  transition: background 0.16s;
}
th:first-child,
td:first-child {
  padding-left: 20px;
}
th:last-child,
td:last-child {
  padding-right: 20px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: #fafafa;
}
#data-page table {
  min-width: 900px;
}
#runs-page table {
  min-width: 1100px;
}
.entity-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 330px;
  overflow: hidden;
  white-space: normal;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: var(--ink);
}
.entity-name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.entity-id {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-fog);
  font-variant-numeric: tabular-nums;

  font-family: inherit;
}
.platform-tag,
.region-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  color: var(--color-iron);
  font-size: 12px;
  line-height: 1.4;
}
.region-tag {
  background: var(--white);
}
.muted {
  color: var(--color-fog);
}
.star {
  color: var(--color-steel);
}
.link-button {
  border: 0;
  background: none;
  border-radius: 0;
  padding: 7px 4px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  text-underline-offset: 4px;

  font-weight: 500;
}
.link-button:hover {
  text-decoration: underline;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--color-steel);
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.empty {
  padding: 72px 28px !important;
  text-align: center !important;
  color: var(--color-steel);
  line-height: 1.7;
  white-space: normal;
}
.empty strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}
.empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 24px;
  color: var(--color-fog);
}
.notice {
  margin-bottom: 28px;
  padding: 12px 16px;
  border: 1px solid var(--color-mist);
  border-radius: 12px;
  background: var(--white);
  color: var(--color-iron);
  line-height: 1.7;
}
.notice a {
  text-decoration: underline;
}
footer {
  width: min(var(--page-max), calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--color-steel);
  border-top: 1px solid var(--color-mist);
  font-size: 11px;
}
footer > a {
  color: var(--ink);
  font-weight: 600;
}
.footer-product {
  margin-left: 7px;
  font-weight: 400;
  color: var(--color-steel);
}

#reviews-page > .panel {
  background: transparent;
  border: 0;
  overflow: visible;
}
#review-filter {
  background: var(--color-fog-surface);
  border: 0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;

  box-shadow: var(--shadow-card);
}
#review-filter > input {
  flex: 1;
  min-width: 120px;
}
/* Keep every review in a comparable table row, including on narrow screens. */
.review-table-wrap {
  border: 0;
  border-radius: 0;
  background: var(--white);
}
.reviews-table {
  min-width: 1400px;
  table-layout: fixed;
  white-space: normal;
}
.reviews-table th:nth-child(1) { width: 168px; }
.reviews-table th:nth-child(2) { width: 120px; }
.reviews-table th:nth-child(3) { width: 74px; }
.reviews-table th:nth-child(4) { width: 112px; }
.reviews-table th:nth-child(6) { width: 112px; }
.reviews-table th:nth-child(7) { width: 168px; }
.reviews-table th:nth-child(8) { width: 148px; }
.reviews-table th:nth-child(9) { width: 112px; }
.review-brand { overflow-wrap: anywhere; font-size: 13px; }
.kickstarter-status { margin: 0; padding: 0 20px 16px; color: var(--muted); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.kickstarter-table { min-width: 1400px; }
.kickstarter-table td { vertical-align: top; }
.kickstarter-project { min-width: 380px; max-width: 540px; white-space: normal; line-height: 1.6; }
.kickstarter-project-summary { display: flex; align-items: flex-start; gap: 12px; }
.kickstarter-thumbnail-wrap { position: relative; width: 112px; height: 63px; flex: 0 0 112px; overflow: hidden; border-radius: 6px; background: #f1f1f1; }
.kickstarter-thumbnail { display: block; width: 112px; height: 63px; object-fit: cover; }
.kickstarter-thumbnail[hidden], .kickstarter-thumbnail-placeholder[hidden] { display: none; }
.kickstarter-thumbnail-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--muted); font-size: 12px; }
.kickstarter-project-copy { min-width: 0; overflow-wrap: anywhere; }
.kickstarter-project-copy > a { font-weight: 500; }
.kickstarter-project-copy > span { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.kickstarter-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kickstarter-description { line-height: 1.8; margin: 16px 0; }
.review-sort { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.review-sort:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
.review-sort-indicator { color: var(--muted); font-size: 12px; }
.reviews-table th[aria-sort="ascending"] .review-sort-indicator,
.reviews-table th[aria-sort="descending"] .review-sort-indicator { color: var(--ink); font-weight: 700; }
.review-row td { vertical-align: top; }
.review-sku strong { font-size: 13px; font-weight: 500; }
.review-variant {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.review-score .star { white-space: nowrap; font-size: 12px; }
.review-score .badge { margin-top: 8px; font-size: 10px; }
.review-title {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.review-text {
  max-height: 4.8em;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--color-steel);
  font-size: 13px;
  line-height: 1.6;
}
.review-row.is-expanded .review-text { max-height: none; }
.review-expand { margin-top: 6px; font-size: 12px; }
.review-date { white-space: nowrap; font-size: 12px; }
.review-model { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-sources { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12px; white-space: nowrap; }
.review-sources a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#reviews-page .pagination {
  margin-top: 28px;
  border-top: 0;
  padding: 16px 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--white);
  color: var(--color-iron);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: currentColor;
}
.status.error,
.status.partial {
  background: var(--color-fog-surface);
  border-color: var(--color-ash-border);
  color: var(--ink);
}
.status.running,
.status.waiting {
  color: var(--ink);
  background: var(--color-stone-divider);
  border-color: var(--color-stone-divider);
}
.status.running::before {
  animation: status-pulse 2s ease-in-out infinite;
}
.status.empty {
  padding: 6px 10px !important;
}
.status.cancelled,
.status.interrupted {
  color: var(--color-steel);
  background: var(--white);
}
.status.cancelled::before,
.status.interrupted::before {
  background: transparent;
  border: 1px solid currentColor;
}

.settings-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--color-fog-surface);

  box-shadow: var(--shadow-card);
}
.banner-icon {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--color-steel);
}
.settings-banner strong {
  font-size: 15px;
  font-weight: 600;
}
.settings-banner p {
  margin-top: 6px;

  font-size: 14px;
}
.settings-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 20px;
  padding: 28px 24px;
  border: 0;
  border-radius: 12px;
  background: var(--white);

  box-shadow: var(--shadow-card);
}
.settings-section h2 {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 10px;

  font-weight: 600;
}
.settings-section > div:first-child p {
  font-size: 12px;
  line-height: 1.8;
}
.settings-section .section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  color: var(--color-steel);
  font-size: 11px;

  font-family: inherit;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.form-field,
.form-grid > label,
dialog form > label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--color-iron);
  font-size: 13px;
  line-height: 1.5;
}
.form-field label {
  font-weight: 500;
}
.form-field-wide {
  grid-column: 1/-1;
}
.form-field input,
.form-field select,
.form-grid input,
.form-grid select {
  width: 100%;
}
.form-field small,
.form-grid small {
  font-size: 12px;
  color: var(--color-fog);
  line-height: 1.7;
}
.secret-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-steel);
  font-size: 12px;
}
.clear-secret {
  border: 0;
  border-radius: 12px;
  background: none;
  padding: 3px 6px;
  color: var(--color-steel);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.clear-secret.pending {
  color: var(--ink);
  font-weight: 600;
}
.settings-save {
  position: sticky;
  bottom: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0;
  padding: 16px 20px;
  background: var(--white);
  border: 0;
  border-radius: 12px;

  box-shadow: var(--shadow-card);
}
.settings-save > span {
  color: var(--color-steel);
  font-size: 12px;
  line-height: 1.7;
}
.settings-save.is-dirty > span {
  color: var(--ink);
  font-weight: 500;
}
.database-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
}
.database-tools h2 {
  font-size: 18px;
}
.database-tools > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: none;
}

.browser-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}
.browser-toolbar select {
  max-width: 110px;
}
#browser-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-left: auto;
  color: var(--color-steel);
  font-size: 12px;
  line-height: 1.7;
}
.browser-message {
  margin: 0 20px 20px;
  padding: 12px 16px;
  border: 1px solid var(--color-mist);
  border-radius: 12px;
  background: #fafafa;
  color: var(--color-iron);
  line-height: 1.6;

  font-size: 14px;
}
.browser-view {
  position: relative;
  margin: 0 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
}
#browser-canvas {
  display: block;
  margin-inline: auto;
  width: 100%;
  height: auto;
  cursor: default;
  touch-action: none;
  max-width: none;
}
.browser-screen {
  height: 65dvh;
  width: 100%;
  min-width: 0;
  overflow: auto;
  max-height: 65dvh;
  overscroll-behavior: contain;
}
.browser-zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser-zoom .button { min-height: 44px; }
.browser-zoom output { min-width: 48px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.browser-zoom [aria-pressed="true"] { border-color: var(--ink); }
.verification-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fafafa;
}
.verification-input-toggle { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 12px; background: #fafafa; }
.verification-input-toggle .button { min-height: 44px; }
.verification-input input { flex: 1; min-width: 140px; font-size: 16px; min-height: 44px; }
.verification-input .button { min-height: 44px; }
.verification-page { width: 100%; min-height: 100dvh; padding: 12px; }
.verification-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 4px 0 12px; }
.verification-heading h1 { margin: 0; font-size: 20px; }
.verification-heading #browser-status { margin-left: auto; font-size: 13px; }
.verification-page .browser-view { margin: 0; }
.verification-page .browser-message { margin: 0 0 12px; }
.verification-page .browser-screen { max-height: 65dvh; }
.browser-login-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; }
.browser-login-form p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.browser-login-form label { display: grid; gap: 6px; flex: 1 1 200px; min-width: 0; font-size: 14px; }
.browser-login-form label:first-of-type { flex: 0 0 84px; }
.browser-login-form input, .browser-login-form select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.browser-login-actions { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 8px; }
.browser-login-actions .button { min-height: 44px; }
.browser-login-panel { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; }
.browser-login-panel > summary { cursor: pointer; padding: 12px 16px; min-height: 44px; font-size: 14px; }
.browser-login-panel[open] > summary { border-bottom: 1px solid var(--line); }
.browser-login-panel .browser-login-form { border: 0; margin: 0; }
.browser-login-collapse-label { float: right; color: var(--muted); font-size: 13px; }
.browser-login-collapse-label::after { content: "展开"; }
.browser-login-panel[open] .browser-login-collapse-label::after { content: "收起"; }
.browser-authenticator { padding: 12px; border-top: 1px solid var(--line); background: #fafafa; }
.browser-authenticator summary { cursor: pointer; min-height: 32px; font-size: 14px; }
.browser-authenticator p { margin: 8px 0 12px; line-height: 1.6; font-size: 13px; color: var(--muted); }
.browser-authenticator label { display: grid; gap: 6px; font-size: 14px; }
.browser-authenticator input[type="password"] { width: 100%; min-height: 44px; font-size: 16px; }
.browser-otp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.browser-otp-actions .button { min-height: 44px; }
.browser-otp-actions output { font-size: 24px; font-weight: 600; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.browser-otp-actions span { font-size: 13px; }
.browser-authenticator .browser-otp-submit { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.browser-otp-submit input { width: 20px; height: 20px; flex: none; }
.recipient-picker { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.recipient-picker summary { cursor: pointer; min-height: 28px; }
.recipient-picker > input { width: 100%; margin-block: 10px; }
.recipient-options { max-height: 260px; overflow-y: auto; }
.recipient-options label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.recipient-options input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; margin: 0; flex: none; }
.recipient-status { display: block; line-height: 1.6; overflow-wrap: anywhere; }
#setting-amazon_auto_check_human_checkbox { width: 22px; height: 22px; min-height: 22px; margin: 8px 0; }
@media (max-width: 760px) {
  .verification-input input { flex-basis: calc(100% - 90px); }
  .verification-input .button { flex: 1; font-size: 13px; padding: 10px; }
  #browser-resume { position: sticky; bottom: 12px; min-height: 44px; }
  #browser-notification { overflow-wrap: anywhere; }
}
#browser-ime {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  resize: none;
  min-height: 0;
}
#browser-empty {
  border-top: 1px solid var(--line);
  background: #fafafa;
}
.browser-accounts {
  margin-top: 32px;
}
.browser-accounts > .browser-toolbar {
  padding-top: 20px;
  align-items: center;
}
.browser-accounts h2 {
  margin-bottom: 8px;
  font-size: 24px;

  font-weight: 600;
}
.browser-accounts p {
  font-size: 13px;
}
.browser-accounts p a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.browser-accounts .badge {
  margin-left: auto;
}
#browser-results td:last-child {
  min-width: 230px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.8;
}
#browser-results td:last-child strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
#browser-results details {
  margin-top: 8px;
  font-size: 12px;
}
#browser-results details > summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#browser-results details p {
  font-size: 12px;
  margin-top: 8px;
}

.collect-sites {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.collect-sites legend {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
}
.site-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.site-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-size: 12px;
  transition:
    background 0.16s,
    color 0.16s,
    border-color 0.16s;
}
.site-options label:has(input:checked) {
  color: var(--ink);
  background: var(--color-stone-divider);
  border-color: var(--color-ash-border);
}
.site-options label:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.collect-sites small {
  display: block;
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-steel);
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: none;
  accent-color: var(--ink);
  margin: 0;
}
.site-options input {
  accent-color: var(--ink);
}
.collection-policy {
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--color-fog-surface);
  color: var(--color-steel);
  font-size: 12px;
  line-height: 1.6;
}
#review-options {
  margin-top: 24px;
}
dialog {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  scrollbar-width: thin;
  scrollbar-color: var(--color-mist) transparent;
}
dialog[open] {
  animation: dialog-enter 0.25s var(--ease-out);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.25);

  animation: fade-enter 0.2s ease-out;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.dialog-heading h2 {
  margin: 8px 0 0;
  font-size: 24px;
  line-height: 1.33;

  font-weight: 500;
}
.icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--color-steel);
  padding: 0;
  font-size: 22px;
  line-height: 1;
  transition:
    background 0.18s,
    color 0.18s;
}
.icon-button:hover {
  background: var(--paper);
  color: var(--ink);
}
dialog form > label {
  margin-bottom: 20px;
}
.check-label {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.dialog-footer > span {
  font-size: 12px;
  color: var(--color-steel);
  line-height: 1.7;
}
.detail-dialog {
  width: min(960px, calc(100% - 32px));
}
.detail-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--color-steel);
}
.run-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.run-metrics > div {
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--color-fog-surface);

  box-shadow: var(--shadow-card);
}
.run-metrics span,
.run-facts dt {
  display: block;
  font-size: 12px;
  color: var(--color-steel);
  line-height: 1.6;
}
.run-metrics strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.run-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.run-facts dd {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.run-partial-note,
.run-progress {
  padding: 12px 16px;
  border: 1px solid var(--color-mist);
  border-radius: 12px;
  background: var(--color-fog-surface);
  color: var(--color-iron);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.run-section {
  margin: 32px 0;
}
.run-section > h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 16px;
}
.run-target {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.run-target > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  cursor: pointer;
  background: #fafafa;
}
.run-target > summary::before {
  content: "›";
  font-size: 20px;
  color: var(--color-steel);
  transition: transform 0.18s;
}
.run-target[open] > summary::before {
  transform: rotate(90deg);
}
.run-target > summary:focus-visible {
  outline-offset: -4px;
  border-radius: 8px;

  outline-color: var(--accent);
}
.run-target-name {
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;

  font-family: inherit;
}
.run-target-reason {
  font-size: 12px;
  color: var(--color-steel);
}
.run-target-content {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.run-target-content > p {
  margin-top: 16px;
}
.run-target-content .table-wrap {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.run-target-content table {
  min-width: 430px;
}
.run-target-content td,
.run-target-content th {
  padding: 12px 16px;
  font-size: 12px;
}
.run-suggestion {
  color: var(--color-graphite);
  font-weight: 500;
}
.run-error {
  padding: 16px;
  border: 0;
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--color-fog-surface);
  overflow-wrap: anywhere;

  box-shadow: var(--shadow-card);
}
.run-error > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.run-error strong {
  font-size: 14px;
  font-weight: 600;
}
.run-error time,
.run-error small {
  color: var(--color-steel);
  font-size: 12px;
}
.run-error p {
  margin: 12px 0;
}
.run-error-summary {
  min-width: 160px;
  max-width: 250px;
  white-space: normal;
  line-height: 1.7;
}
.run-raw > summary {
  margin: 24px 0 16px;
  color: var(--color-steel);
  font-size: 13px;
  cursor: pointer;
}
pre {
  max-height: 55vh;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  color: var(--color-iron);
  font-family: var(--font-inter);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
code {
  font: inherit;
  font-variant-numeric: tabular-nums;

  font-family: inherit;
  font-size: 0.92em;
}
.snapshot-entry {
  margin-bottom: 24px;
}
.snapshot-entry h3 {
  font-size: 14px;
  color: var(--color-steel);
  font-weight: 500;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: max-content;
  max-width: min(540px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid var(--color-iron);
  border-radius: 12px;
  background: var(--color-graphite);
  color: var(--white);
  font-size: 14px;
  line-height: 1.7;
  animation: toast-enter 0.24s var(--ease-out);
}
#toast.toast-in-dialog {
  position: sticky;
  left: auto;
  bottom: 0;
  transform: none;
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
  animation: fade-enter 0.2s ease-out;
}
#toast.error {
  background: var(--color-slate);
  border-color: var(--color-steel);
}
.is-loading .stat strong {
  display: block;
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat strong {
  display: block;
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.brand-symbol {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--ink);
}
.status.ok,
.status.completed {
  background: var(--color-fog-surface);
  border-color: var(--line);
  color: var(--ink);
}
.status.waiting {
  background: var(--color-stone-divider);
  border-color: var(--color-stone-divider);
  color: var(--ink);
}
.run-facts dd,
.context-note {
  font-variant-numeric: tabular-nums;
}
.panel-heading .badge {
  flex: none;
}
#browser-run-detail,
.run-target-content > a {
  color: var(--ink);
}

.site-header[data-scrolled="true"] {
  backdrop-filter: blur(16px);
}

.stat > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.heading-actions {
  margin-top: 0;
  align-items: center;
  gap: 12px;
}
.heading-actions .button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}
#runs-page > .panel > .filters {
  padding-top: 16px;
}
.panel-heading > div > p {
  display: none;
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes status-pulse {
  50% {
    opacity: 0.35;
  }
}
@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes fade-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 1100px) {
  .header-inner {
    gap: 16px;
  }
  .api-link {
    display: none;
  }
  .page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
  }
  .stat {
    min-width: 0;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .stat strong {
    display: block;
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .settings-section {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
  }
}
@media (max-width: 900px) {
  .header-inner,
  .workspace,
  footer {
    width: calc(100% - 48px);
  }
  .brand-tag {
    display: none;
  }
  .nav-cta {
    padding-inline: 14px;
    font-size: 13px;
  }
  .page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
  }
  h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.012em;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    min-width: 0;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .stat strong {
    display: block;
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .stat small {
    font-size: 11px;
  }
  .settings-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .settings-section .section-number {
    margin: 0 12px 0 0;
  }
  .settings-section > div:first-child {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0;
  }
  .settings-section h2 {
    margin-bottom: 6px;
    flex: 1;
  }
  .settings-section > div:first-child p {
    width: 100%;
    margin-top: 12px;
  }
  .database-tools {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 760px) {
  .header-inner {
    width: calc(100% - 32px);
    gap: 12px;
  }
  .brand-wordmark {
    font-size: 27px;
  }
  .brand-tag {
    display: inline-flex;
    font-size: 10px;
    padding: 6px 8px;
  }
  .nav-cta {
    min-height: 44px;
    padding: 11px 16px;
    font-size: 13px;
  }
  .workspace-meta {
    gap: 8px;
  }

  .service-state {
    font-size: 11px;
    padding: 6px 9px;
  }
  .workspace {
    width: calc(100% - 32px);
    padding: 16px 0 32px;
  }
  .page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
  }
  h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.012em;
  }
  .heading-actions {
    margin-top: 0;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat {
    min-width: 0;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .stat strong {
    display: block;
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .stat small {
    font-size: 11px;
  }
  .data-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
    font-size: 12px;
    color: var(--muted);
  }
  .context-note {
    width: 100%;
  }
  .mix-item {
    padding: 6px 9px;
  }
  .panel {
    border-radius: var(--radius-card);
  }
  .panel-heading {
    padding: 16px;
    align-items: flex-start;
  }
  h2,
  .panel-heading h2 {
    font-size: 20px;
  }
  .panel-heading p {
    font-size: 13px;
  }
  .section-overline {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .panel-heading .badge {
    margin-top: 5px;
    font-size: 11px;
  }
  .filters {
    padding: 0 20px 24px;
    gap: 10px;
  }
  .search {
    flex-basis: 100%;
    min-width: 0;
  }
  .filters > select {
    flex: 1;
    max-width: none;
    min-width: 0;
    font-size: 13px;
  }
  #data-page table {
    min-width: 820px;
  }
  th:first-child,
  td:first-child {
    padding-left: 20px;
  }
  td {
    padding: 17px 16px;
  }
  .entity-name {
    max-width: 240px;
  }
  .pagination {
    padding: 18px 20px;
    gap: 12px;
    font-size: 11px;
  }
  .pagination .small {
    padding: 8px 10px;
    font-size: 11px;
  }
  #review-filter {
    padding: 16px;
    border-radius: 16px;
  }
  #review-filter > input {
    max-width: none;
    flex-basis: calc(50% - 10px);
    min-width: 0;
  }
  #review-filter > select {
    flex-basis: calc(50% - 10px);
  }
  #review-filter > button {
    flex: 1;
  }
  .settings-banner {
    padding: 20px;
    border-radius: 16px;
  }
  .settings-section {
    padding: 24px 20px;
    border-radius: var(--radius-card);
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .settings-save {
    bottom: calc(16px + env(safe-area-inset-bottom));
    padding: 16px;
    gap: 14px;
    border-radius: 12px;
  }
  .settings-save > span {
    font-size: 11px;
  }
  .settings-save .button {
    padding-inline: 12px;
    font-size: 13px;
    flex: none;
  }
  .database-tools {
    padding: 24px 20px;
  }
  .browser-toolbar {
    padding: 0 20px 24px;
    gap: 10px;
  }
  .browser-toolbar .button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .browser-toolbar select {
    flex: 1;
    max-width: none;
  }
  #browser-status {
    width: 100%;
    margin-left: 0;
  }
  .browser-view {
    margin: 0 12px 20px;
  }
  .browser-message {
    margin: 0 20px 20px;
    padding: 14px 16px;
    font-size: 13px;
  }
  .browser-accounts {
    margin-top: 28px;
  }
  .browser-accounts h2 {
    font-size: 24px;
  }
  .browser-accounts .badge {
    margin-left: 0;
  }
  .browser-accounts > .browser-toolbar {
    padding: 24px 20px;
  }
  .empty {
    padding: 52px 20px !important;
  }
  .empty strong {
    font-size: 16px;
  }
  .empty p {
    font-size: 13px;
  }
  footer {
    width: calc(100% - 32px);
    padding: 24px 0 calc(32px + env(safe-area-inset-bottom));
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
  }
  .footer-year {
    margin-left: auto;
  }
  dialog,
  .detail-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    padding: 24px 20px;
    border-radius: 16px;
  }
  .dialog-heading {
    margin-bottom: 24px;
  }
  .dialog-heading h2 {
    font-size: 24px;
  }
  .site-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dialog-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .dialog-footer > .button {
    width: 100%;
  }
  .run-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .run-metrics > div {
    padding: 16px;
    border-radius: 12px;
  }
  .run-metrics strong {
    font-size: 24px;
  }
  .run-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .run-target > summary {
    padding: 16px;
    gap: 10px;
  }
  .run-target-content {
    padding: 0 16px 16px;
  }
  .run-error {
    padding: 16px;
  }
  #toast {
    bottom: calc(20px + env(safe-area-inset-bottom));
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
  }
}
@media (max-width: 380px) {
  .header-inner {
    gap: 12px;
  }
  .brand-tag {
    display: none;
  }
  .nav-cta {
    padding-inline: 12px;
  }
  .refresh-note {
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  .heading-actions .refresh-note {
    display: none;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .heading-actions {
    gap: 8px;
  }
  .stat strong {
    font-size: 24px;
  }
  .panel-heading {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.browser-connection { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; background: #fafafa; }
.browser-connection .button { min-height: 44px; }

.browser-stage { position: relative; width: max-content; min-width: 100%; }

.browser-action-state { margin: 0; padding: 8px 12px; font-size: 13px; line-height: 1.6; background: #fafafa; }
.browser-action-state:empty { display: none; }
.remote-click-marker { position: absolute; z-index: 2; width: 34px; height: 34px; border: 3px solid; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); animation: remote-click-pulse 1s ease-out forwards; }
.remote-click-marker.pending { border-color: #d97706; background: #f59e0b44; }
.remote-click-marker.confirmed { border-color: #16a34a; background: #22c55e44; }
@keyframes remote-click-pulse { from { opacity: 1; transform: translate(-50%, -50%) scale(.6); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } }

.review-holds-panel { margin-bottom: 24px; }
.review-holds-hint { padding: 0 20px 16px; line-height: 1.7; color: var(--color-iron); font-size: 14px; }
.manual-review-tag { display: inline-block; padding: 4px 8px; margin: 5px 0; border: 1px solid #e5b36c; border-radius: 6px; background: #fff7e8; color: #815321; font-size: 12px; line-height: 1.5; }
.review-holds-panel td p { margin: 4px 0; font-size: 13px; }
.review-holds-panel td:last-child { min-width: 220px; }
.review-holds-panel td a { text-decoration: underline; }
.review-hold-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.review-holds-panel .region-tag { margin-left: 8px; }

#data-page table[data-platform="kickstarter"] :is(th, td):nth-child(2),
#data-page table[data-platform="kickstarter"] :is(th, td):nth-child(3) {
  display: none;
}
#data-page table[data-platform="kickstarter"] td:first-child {
  min-width: 240px;
}

/* ------------------------------------------------------------------ sidebar
   Header keeps brand and global actions; page navigation lives in a grouped
   sidebar, which becomes a drawer below 900px. */
:root { --sidebar-width: 232px; --header-height: 65px; }
.header-inner { width: calc(100% - 48px); max-width: none; }
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: start;
}
.sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 12px 24px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.site-nav { display: flex; flex-direction: column; }
.nav-group-title {
  margin: 20px 12px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nav-group-title:first-child { margin-top: 0; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.site-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: var(--radius-input);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}
.site-nav a:hover { color: var(--ink); background: var(--color-fog-surface); }
.site-nav a.active { color: var(--ink); background: var(--color-stone-divider); font-weight: 600; }
.site-nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.nav-icon { display: block; width: 18px; height: 18px; flex: none; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.site-nav .hold-nav-count { margin-left: auto; }
.workspace, footer { width: min(var(--page-max), calc(100% - 64px)); }
.nav-toggle { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .app-shell { display: block; }
  .header-inner { width: calc(100% - 32px); }
  .nav-toggle { display: inline-flex; flex: none; margin-right: -4px; }
  .header-inner > .brand { margin-right: auto; }
  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    width: min(280px, 84vw);
    height: 100dvh;
    padding-top: 24px;
    box-shadow: 0 0 0 1px var(--line), 0 16px 48px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s var(--ease-out, ease-out), visibility 0s linear 0.22s;
  }
  .sidebar[data-open="true"] {
    transform: none;
    visibility: visible;
    transition: transform 0.22s var(--ease-out, ease-out);
  }
  .sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.24);
    animation: fade-enter 0.18s;
  }
  .site-nav a { min-height: 44px; }
  .workspace, footer { width: calc(100% - 32px); }
}
