.top-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.top-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.top-nav a.active,
.top-nav a:hover {
  color: var(--ink);
}

.batch-main {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 24px 80px;
}

.batch-hero {
  margin-bottom: 8px;
}

.batch-lead {
  color: var(--ink-soft);
  margin: 0 0 8px;
  max-width: 36em;
  line-height: 1.55;
}

.batch-alt {
  margin: 0 0 24px;
  max-width: 36em;
  font-size: 13px;
  line-height: 1.5;
  color: #8a8a8a;
}

.batch-alt a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(10, 10, 10, 0.22);
  text-underline-offset: 3px;
}

.batch-alt a:hover {
  color: var(--ink);
  text-decoration-color: rgba(10, 10, 10, 0.45);
}

.mode-banner {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

.batch-list-panel {
  margin-bottom: 16px;
}

.batch-contrast {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fafafa;
}

.batch-contrast-label {
  margin: 0 0 8px;
}

.batch-contrast-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.batch-contrast-row .field {
  margin-bottom: 0;
}

@media (max-width: 800px) {
  .batch-contrast-row {
    grid-template-columns: 1fr 1fr;
  }
}

.batch-list-panel.flash,
.pool-toolbar.flash {
  animation: handoffFlash 1.2s ease;
}

@keyframes handoffFlash {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.18); }
}

.batch-brief-fold {
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
}

.batch-brief-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 18px;
  user-select: none;
}

.batch-brief-fold > summary::-webkit-details-marker {
  display: none;
}

.batch-brief-sum-title {
  font-size: 15px;
  font-weight: 700;
}

.batch-brief-fold .batch-brief-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.batch-brief-fold[open] > summary {
  border-bottom: none;
}

.batch-panel h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea,
#pasteBox {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  width: 100%;
}

.batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-primary,
.btn-secondary,
.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.linkish {
  text-decoration: none;
}

.scan-btn {
  width: 100%;
  margin-top: 12px;
}

.muted {
  color: var(--ink-soft);
  font-size: 13px;
}

.pool-section {
  margin-top: 8px;
}

.pool-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.pool-head h2 {
  margin: 0;
  font-size: 16px;
}

.pool-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.pool-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.pool-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pool-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}

.pool-item.verdict-ok {
  border-color: rgba(10, 10, 10, 0.35);
}

.pool-item.verdict-bad {
  opacity: 0.72;
}

.pool-item h3 {
  margin: 0;
  font-size: 15px;
}

.pool-item .meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.pool-item .hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.pool-score {
  text-align: right;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}

.pool-score small {
  display: block;
  font-family: var(--font);
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fafafa;
}

.tag.ok {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}

.tag.warn {
  background: #fff8e1;
}

.tag.bad {
  background: #fff0f0;
  color: #a11;
}

.report-link {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
}

.report-link a {
  color: var(--ink);
  font-weight: 600;
}

.report-preview {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.report-preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  background: #fafafa;
}

.report-preview-bar a {
  color: var(--ink);
  font-weight: 600;
}

.report-preview iframe {
  display: block;
  width: 100%;
  height: min(78vh, 900px);
  border: 0;
  background: #fff;
}

#reportBtn {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.field.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-top: 8px;
}
.field.check input { width: auto; }
.batch-cross {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: -8px 0 20px;
  font-size: 14px;
}
.batch-cross a { color: var(--ink); font-weight: 600; }

.pool-strategy {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f6f4;
  border: 1px solid rgba(0,0,0,.08);
}
.strat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.strat-grid b { display: block; font-size: 13px; margin-bottom: 4px; }
.strat-grid p { margin: 0; font-size: 13px; color: #444; line-height: 1.4; }
.combo-pyramid {
  margin: 12px 0 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
}
.combo-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 13px;
}
.combo-bars { display: flex; flex-direction: column; gap: 8px; }
.combo-layer {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px 10px;
  align-items: center;
  font-size: 12px;
}
.combo-layer span { font-weight: 700; }
.combo-layer i {
  grid-column: 2;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #111;
  min-width: 4px;
}
.combo-layer em {
  grid-column: 2;
  font-style: normal;
  color: #666;
  line-height: 1.35;
}
.combo-warn {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: #7a5a00;
  line-height: 1.45;
}
.combo-warn li { margin: 4px 0; }
.strat-line { margin: 0; font-size: 13px; color: #555; }
.pool-item {
  display: grid;
  grid-template-columns: 28px 1fr 64px;
  gap: 10px;
  align-items: start;
}
.pool-check { padding-top: 4px; }
.pool-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dossier-draw {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,.06);
}
.dos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  font-size: 13px;
}
.dos-grid h4 { margin: 0 0 4px; font-size: 12px; color: #666; }
.dos-grid p, .dos-grid ul { margin: 0; padding-left: 16px; line-height: 1.45; }
.reason-tag { font-size: 12px; color: #6b5b00; margin: 4px 0 0; }
.talk-preview {
  margin: 10px 0 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f6f6f4;
  border: 1px solid rgba(0,0,0,.08);
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.5;
  max-height: 280px;
  overflow: auto;
}
.reason-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  padding: 20px;
}
.reason-modal[hidden] { display: none !important; }
.reason-card {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  width: min(440px, 94vw);
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
}
.reason-card h3 { margin: 0 0 6px; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.reason-chips .chip {
  border: 1px solid rgba(0,0,0,.12);
  background: #fafafa;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.reason-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  font: inherit;
}
.reason-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
@media (max-width: 720px) {
  .strat-grid, .dos-grid { grid-template-columns: 1fr; }
}
