*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, "Times New Roman", serif;
  color: #222;
  background: #fafafa;
  line-height: 1.7;
}

header {
  padding: 12px 32px;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.25rem;
  font-weight: bold;
  text-decoration: none;
  color: #222;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  flex-shrink: 0;
}
.logo-atom {
  font-weight: 400;
  color: #6a7b8b;
  font-size: 0.95em;
}

/* ── Language switcher ───────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: sans-serif;
  font-size: 0.82rem;
  position: relative;
}
.lang-switcher a {
  color: #777;
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.lang-switcher a:hover { color: #222; border-color: #ccc; }
.lang-switcher a.lang-active {
  color: #222;
  border-color: #888;
  font-weight: 600;
}
.lang-sep { color: #ccc; }
.lang-gt-btn {
  color: #777;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid transparent;
  user-select: none;
}
.lang-gt-btn:hover { color: #222; border-color: #ccc; }
#google_translate_element {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 4px;
  z-index: 100;
  margin-top: 4px;
}

main {
  max-width: 980px;
  margin: 48px auto;
  padding: 0 24px;
}

footer {
  text-align: center;
  padding: 24px 32px;
  color: #aaa;
  font-size: 0.85rem;
  border-top: 1px solid #e0e0e0;
  margin-top: 64px;
  line-height: 2;
}
footer a { color: #888; }
footer a:hover { color: #444; }
.footer-company { font-size: 0.8rem; }

/* Flash messages */
.flash-messages {
  list-style: none;
  background: #fff3cd;
  border-left: 4px solid #e6b800;
  padding: 12px 16px;
  margin-bottom: 24px;
  border-radius: 2px;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero { margin-bottom: 36px; }
.hero-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.hero-logo { flex-shrink: 0; }
.hero-brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: bold;
  color: #1B365D;
  letter-spacing: 0.02em;
}
.hero-brand-atom {
  font-weight: 400;
  color: #8A9BAD;
  font-size: 0.85em;
}
.hero h1 { font-size: 2rem; margin-bottom: 8px; }
.hero p { color: #555; font-size: 1.05rem; max-width: 620px; }
.paper-title-hero { font-size: 1.1rem; color: #333; margin-bottom: 4px; max-width: 680px; }
.paper-title-display { font-size: 0.93rem; color: #555; margin-top: 2px; margin-bottom: 16px; }

/* ── Two-column layout ───────────────────────────────────────── */
.page-columns {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 720px) {
  .page-columns { grid-template-columns: 1fr; }
}

/* ── Signed-in card ─────────────────────────────────────────── */
.signed-in-card {
  background: #f0f7f0;
  border: 1px solid #b2d8b2;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 28px;
}
.signed-in-email {
  font-size: 1rem;
  color: #2a5f2a;
}
.signed-in-icon {
  display: inline-block;
  background: #2a5f2a;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 0.75rem;
  margin-right: 6px;
}
.btn-link {
  background: none;
  border: none;
  color: #888;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}
.btn-link:hover { color: #333; }

/* ── Upload section ──────────────────────────────────────────── */
.upload-section h2 { font-size: 1.2rem; margin-bottom: 16px; }

.auth-note {
  background: #f0f4ff;
  border-left: 4px solid #5566cc;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 2px;
  font-size: 0.95rem;
  color: #333;
}

.coupon-banner {
  background: #fdf6ec;
  border: 1px solid #e8c976;
  padding: 10px 16px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #8a6d2b;
  text-align: center;
}

.upload-form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 36px; }

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #333;
}
.field-label input[type="email"] {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: normal;
}
.field-label input[type="email"]:focus { outline: 2px solid #5566cc; border-color: transparent; }

.field-hint { font-size: 0.82rem; color: #777; font-weight: normal; margin-top: 4px; }
.field-hint strong { color: #444; }

.drop-zone {
  display: block;
  border: 2px dashed #aaa;
  border-radius: 6px;
  padding: 36px;
  text-align: center;
  cursor: pointer;
  color: #666;
  font-weight: normal;
  transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover { border-color: #444; background: #f0f0f0; }
.drop-zone input[type="file"] { display: none; }

.upload-progress { margin-top: 16px; }
.upload-progress-status {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem; color: #444; margin-bottom: 6px;
}
.upload-progress-track {
  height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden;
}
.upload-progress-bar {
  height: 100%; width: 0; background: linear-gradient(90deg, #D4AF37, #B8962E);
  border-radius: 4px; transition: width 0.2s ease;
}

/* .how-it-works removed — content moved to .info-strip */
.note { font-size: 0.84rem; color: #888; margin-top: 10px; }

/* ── Track / Resend sidebar ──────────────────────────────────── */
.track-section { display: flex; flex-direction: column; gap: 24px; }

.track-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px;
}
.track-card h2 { font-size: 1rem; margin-bottom: 8px; }
.track-card p { font-size: 0.9rem; color: #555; margin-bottom: 12px; }
.track-card .note { margin-top: 10px; }

.id-form { display: flex; flex-direction: column; gap: 8px; }
.id-form input[type="text"] {
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: monospace;
}
.id-form input[type="text"]:focus { outline: 2px solid #888; border-color: transparent; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 11px 24px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  text-align: center;
}
.btn-primary { background: #222; color: #fff; }
.btn-primary:hover { background: #000; }
.btn-secondary { background: #eee; color: #333; border: 1px solid #ccc; }
.btn-secondary:hover { background: #e0e0e0; }

/* ── Scope select ────────────────────────────────────────────── */
form fieldset { border: 1px solid #ddd; border-radius: 4px; padding: 16px; margin-bottom: 20px; }
form legend { font-weight: bold; padding: 0 8px; }
form label { display: block; padding: 6px 0; cursor: pointer; }
form label input[type="checkbox"] { margin-right: 8px; }
.page-badge { font-size: 0.78rem; color: #888; background: #f0f0f0; padding: 2px 6px; border-radius: 3px; margin-left: 6px; }

.price-summary {
  background: #f4f4f4;
  border-radius: 4px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 1.05rem;
}

/* ── Scope select extras ─────────────────────────────────────── */
.price-note { font-size: 0.82rem; color: #888; margin-top: 6px; font-weight: normal; }
.scope-fallback { background: #f8f8f8; border-radius: 4px; padding: 8px 12px; }

/* ── Checkout ────────────────────────────────────────────────── */
.order-summary { background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 4px; padding: 16px; margin-bottom: 16px; }
.order-summary table { width: 100%; border-collapse: collapse; }
.order-summary td { padding: 6px 8px; vertical-align: top; }
.order-summary .total td { border-top: 1px solid #ddd; padding-top: 12px; }
.edit-link { font-size: 0.82rem; color: #c0392b; margin-left: 10px; }

.checkout-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

/* ── Job status page ─────────────────────────────────────────── */
.job-status-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 24px; }

.status-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

.status-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-family: sans-serif;
  font-weight: bold;
}
.status-pending  { background: #f0f0f0; color: #666; }
.status-paid     { background: #fff3cd; color: #856404; }
.status-processing { background: #cce5ff; color: #004085; }
.status-done     { background: #d4edda; color: #155724; }
.status-failed   { background: #f8d7da; color: #721c24; }
.status-cancelled { background: #e9e9e9; color: #555; }

.job-meta { font-size: 0.85rem; color: #888; }
.job-meta code { font-family: monospace; color: #555; }

.job-detail-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.job-detail-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; }
.job-detail-table td:first-child { color: #777; width: 140px; }

.status-note { font-size: 0.92rem; color: #555; margin-bottom: 14px; }

.inline-form { display: inline; }

.error-detail {
  background: #fff0f0;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 12px;
  font-size: 0.82rem;
  overflow-x: auto;
  margin-top: 8px;
}

/* ── Confirm ─────────────────────────────────────────────────── */
.confirm { text-align: center; padding: 48px 0; }
.confirm h1 { margin-bottom: 16px; }
.confirm p { color: #555; margin-bottom: 12px; }
.job-id { background: #f4f4f4; padding: 12px 20px; border-radius: 4px; margin: 24px auto; max-width: 480px; font-size: 0.88rem; color: #555; }
.job-id code { font-family: monospace; font-size: 1rem; color: #222; display: block; margin-top: 4px; word-break: break-all; }

.error { color: #c0392b; }

/* ── Spinner (generating page) ───────────────────────────────── */
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #e0e0e0;
  border-top-color: #222;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Review summary box ──────────────────────────────────────── */
.summary-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.summary-title {
  font-size: 0.88rem;
  color: #666;
  font-family: sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.summary-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.summary-count-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 10px 12px 8px;
  background: #fafafa;
  border-radius: 4px;
}
.summary-count-number {
  font-size: 2rem;
  font-weight: bold;
  font-family: sans-serif;
  line-height: 1;
  margin-bottom: 4px;
}
.summary-count-label {
  font-size: 0.8rem;
  color: #666;
  font-family: sans-serif;
  white-space: nowrap;
}

/* ── Level summary bar ───────────────────────────────────────── */
.level-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 14px 16px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.level-pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1.5px solid currentColor;
  border-radius: 20px;
  font-size: 0.88rem;
  font-family: sans-serif;
  white-space: nowrap;
}
.level-pill-total { color: #333; border-color: #333; }

/* ── Issue table ─────────────────────────────────────────────── */
.issue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-bottom: 24px;
}
.issue-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #ddd;
  background: #f4f4f4;
  font-family: sans-serif;
  font-size: 0.82rem;
  color: #555;
}
.issue-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.issue-table tr:hover td { background: #fafafa; }

.level-badge {
  display: inline-block;
  padding: 2px 9px;
  border: 1.5px solid currentColor;
  border-radius: 12px;
  font-family: sans-serif;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
}

/* ── Preview sections ────────────────────────────────────────── */
.preview-section {
  margin-bottom: 32px;
  padding: 20px 24px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.preview-section h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.free-badge {
  display: inline-block;
  background: #d4edda;
  color: #155724;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: sans-serif;
  font-weight: normal;
}

.preview-locked {
  background: #fafafa;
  border-color: #ddd;
  opacity: 0.85;
}
.preview-locked h2 { color: #888; }
.lock-icon { color: #bbb; font-size: 0.9rem; }

.locked-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.locked-overlay { position: relative; overflow: hidden; max-height: 80px; }
.locked-blur {
  filter: blur(3px);
  user-select: none;
  pointer-events: none;
}
.locked-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, #fafafa 80%);
}

.preview-locked-banner {
  background: #fff3cd;
  border: 1px solid #e6b800;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  color: #7a5c00;
}

/* ── Pay CTA ─────────────────────────────────────────────────── */
.pay-cta {
  background: #f0f4ff;
  border: 2px solid #5566cc;
  border-radius: 8px;
  padding: 24px 28px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pay-cta-info { font-size: 0.95rem; color: #333; }
.pay-cta-email-only { background: #f5f5f5; border-color: #aaa; }
.pay-cta-amount {
  font-size: 2rem;
  font-weight: bold;
  color: #222;
  font-family: sans-serif;
}

.coupon-redeem { margin-top: 12px; border-top: 1px solid #dde; padding-top: 12px; }
.coupon-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.coupon-input {
  font-size: 0.95rem; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px;
  width: 200px; font-family: monospace; letter-spacing: 0.05em;
}

/* ── Status badges (new statuses) ───────────────────────────── */
.status-queued      { background: #f0f0f0; color: #666; }
.status-generating  { background: #cce5ff; color: #004085; }
.status-preview_ready { background: #fff3cd; color: #856404; }
.status-report_sent { background: #d4edda; color: #155724; }

/* ── Preview page — new free-tier rules ─────────────────────── */
.free-tier-notice {
  background: #f0f4ff;
  border-left: 3px solid #5566cc;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #334;
  border-radius: 0 4px 4px 0;
  margin-bottom: 24px;
}

.fmm-summary {
  background: #fff8f0;
  border: 1px solid #fd7e14;
  border-radius: 4px;
  padding: 9px 14px;
  font-size: 0.9rem;
  color: #7a3c00;
  margin-bottom: 14px;
}
.fmm-summary .lock-icon { color: #fd7e14; margin-right: 4px; }

.issue-group-heading {
  font-size: 0.82rem;
  font-family: sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 16px 0 6px;
}

.locked-row {
  font-size: 0.88rem;
  color: #888;
  padding: 8px 12px;
  background: #f8f8f8;
  border: 1px dashed #ddd;
  border-radius: 3px;
  margin-top: 6px;
}
.locked-row .lock-icon { color: #bbb; margin-right: 4px; }

/* ── Info strip (3-column on home page) ─────────────────────── */
.info-strip {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 48px;
}

.info-card {
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  padding: 26px 26px 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.045);
}
/* Accent top stripe — each card gets its own colour */
.info-card:nth-child(1) { border-top: 3px solid #222; }
.info-card:nth-child(2) { border-top: 3px solid #4a5bbf; }
.info-card:nth-child(3) { border-top: 3px solid #198754; }

.info-card h3 {
  font-size: 0.68rem;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #bbb;
  margin-bottom: 20px;
}

/* Numbered steps — single column, line by line */
.info-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: steps;
  color: #444;
  font-size: 0.91rem;
}
.info-steps li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
  line-height: 1.5;
}
.info-steps li:last-child { border-bottom: none; padding-bottom: 0; }
.info-steps li::before {
  content: counter(steps);
  font-family: sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: #444;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Pricing rows — 3 columns at full card width */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: #444;
  table-layout: fixed;
}
.pricing-table tr { border-bottom: 1px solid #f0f0f0; }
.pricing-table tr:last-child { border-bottom: none; }
.pricing-table td { padding: 10px 16px 10px 0; vertical-align: middle; line-height: 1.4; }
.pricing-table td:last-child {
  text-align: right;
  white-space: nowrap;
  padding-right: 0;
  padding-left: 16px;
  font-family: sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: #222;
  width: 180px;
}

/* What we check — single column for sidebar */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  color: #444;
}
.check-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 7px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid #f2f2f2;
  line-height: 1.4;
}
.check-list li:last-child { border-bottom: none; padding-bottom: 0; }
.level-dot { font-size: 0.65rem; padding-top: 3px; }

/* Sidebar variant of info-card — flush border-radius to fit aside */
.info-card-sidebar {
  border-top-color: #198754;
}

/* Manage card — 4 actions side by side */
.info-card-manage { border-top-color: #888; }
.manage-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
@media (max-width: 900px) {
  .manage-actions { grid-template-columns: 1fr 1fr; gap: 24px; }
  .manage-divider { display: none; }
}
@media (max-width: 600px) {
  .manage-actions { grid-template-columns: 1fr; }
}
.manage-divider {
  width: 1px;
  background: #eee;
  margin: 0 28px;
  align-self: stretch;
}
.manage-action h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #333;
}
.manage-action p {
  font-size: 0.84rem;
  color: #777;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* Scope / options form helper text */
.option-note {
  font-size: 0.82rem;
  color: #888;
  font-family: sans-serif;
  font-weight: normal;
  margin-left: 4px;
}

.ai-parse-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-sm {
  font-size: 0.85rem;
  padding: 5px 12px;
}

.ai-parse-status {
  font-size: 0.84rem;
  color: #555;
  font-family: sans-serif;
}

.ai-detect-note {
  font-size: 0.84rem;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #7dd3fc;
  border-radius: 4px;
  padding: 6px 10px;
  margin: 0 0 10px;
  font-family: sans-serif;
}

.math-limit-warn {
  font-size: 0.84rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 6px 10px;
  margin: 8px 0 2px;
  font-family: sans-serif;
}

/* ── SmartChair integration ── */
.sc-invalid-banner {
  font-size: 0.84rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 0 0 12px;
  font-family: sans-serif;
}
.sc-auth-badge {
  display: inline-block;
  font-size: 0.82rem;
  color: #1d6f42;
  background: #e6f4ea;
  border: 1px solid #a8d5b5;
  border-radius: 12px;
  padding: 3px 10px;
  margin-top: 6px;
  font-family: sans-serif;
}

/* ── Model info ── */
.model-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.model-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  line-height: 1.5;
}
.model-list li:last-child { border-bottom: none; }

.scope-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 6px 0;
}
.select-all-label {
  margin-bottom: 2px;
}
.model-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 12px;
  background: #f7f7f7;
  border-radius: 14px;
  font-size: 0.8rem;
  font-family: sans-serif;
  color: #555;
}
.model-indicator-math {
  margin-top: 4px;
  background: #f3f0ff;
  color: #5b21b6;
}
.model-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.model-dot-opus   { background: #7c3aed; }
.model-dot-sonnet { background: #0d6efd; }
.report-lang-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.report-lang-label {
  font-size: 0.9rem;
  color: #555;
  font-family: sans-serif;
  white-space: nowrap;
}
.report-lang-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  font-family: sans-serif;
  cursor: pointer;
}

/* Reference not-found row */
.ref-not-found td { background: #fff8f0; }
.ref-not-found td:nth-child(2) { color: #7a3c00; font-weight: 500; }

/* ── Job detail page — issue count row ──────────────────────── */
.issue-counts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0 4px;
  font-size: 0.9rem;
}
.issue-counts-label {
  color: #555;
  margin-right: 4px;
}

/* ── Data retention notice & delete button ───────────────────── */
.retention-notice {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #444;
  margin-top: 20px;
  line-height: 1.6;
}
.retention-purged {
  background: #fff3cd;
  border-color: #e6b800;
  color: #7a5c00;
}

.delete-data-form { margin-top: 10px; }

.btn-danger-outline {
  background: #fff;
  color: #dc3545;
  border: 1px solid #dc3545;
  border-radius: 3px;
  padding: 6px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: Georgia, serif;
  transition: background 0.15s;
}
.btn-danger-outline:hover {
  background: #dc3545;
  color: #fff;
}

/* ── Receipt confirmation page ─────────────────────────── */
.receipt-confirm-intro {
  color: #555;
  margin-bottom: 24px;
}
.receipt-confirm-wrap {
  max-width: 560px;
}
.receipt-confirm-card {
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 28px 28px 20px;
  background: #fafafa;
}
.receipt-confirm-heading {
  font-size: 1.1rem;
  margin: 0 0 6px;
  font-family: Georgia, serif;
  letter-spacing: 0.01em;
  color: #222;
}
.receipt-confirm-paper-title {
  color: #555;
  font-size: 0.92em;
  margin: 0 0 18px;
  line-height: 1.5;
  word-break: break-word;
}
.receipt-addressee-block {
  background: #f0f4ff;
  border-left: 4px solid #4a5bbf;
  padding: 10px 16px;
  margin-bottom: 20px;
  border-radius: 0 4px 4px 0;
}
.receipt-addressee-label {
  display: block;
  font-size: 0.78em;
  color: #666;
  margin-bottom: 3px;
  font-family: sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.receipt-addressee-name {
  font-size: 1.1em;
}
.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}
.receipt-table td {
  padding: 8px 0;
  vertical-align: top;
  border-bottom: 1px solid #ebebeb;
}
.receipt-table td:first-child {
  color: #777;
  width: 160px;
  padding-right: 16px;
  white-space: nowrap;
}
.receipt-table tr:last-child td {
  border-bottom: none;
}
.receipt-total-row td {
  font-weight: bold;
  border-top: 2px solid #ccc;
  border-bottom: none;
  padding-top: 12px;
}
.receipt-action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* ── Preview: paper summary + locked reviewer report ──────────── */
.paper-summary-box {
  background: #fcfcfc;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #4a5bbf;
  border-radius: 0 6px 6px 0;
  padding: 18px 24px;
  margin-bottom: 20px;
}
.paper-summary-box h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}
.paper-summary-box p {
  margin: 0;
  line-height: 1.65;
  color: #333;
}
.reviewer-report-locked {
  background: #f7f6fb;
  border: 1px dashed #b9b2d6;
  border-radius: 6px;
  padding: 18px 24px;
  margin-bottom: 24px;
}
.reviewer-report-locked .rrl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  color: #4a3f7a;
  margin-bottom: 6px;
}
.reviewer-report-locked p {
  margin: 0 0 10px;
  color: #555;
  line-height: 1.6;
  font-size: 0.92rem;
}
.reviewer-report-locked .rrl-items {
  margin: 0;
  padding-left: 22px;
  color: #4a3f7a;
  line-height: 1.7;
}

/* ── Free preview: trust-building blocks ───────────────────────── */
.verdict-badge {
  display: inline-block;
  background: #4a3f7a;
  color: #fff;
  font-family: sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.strengths-box {
  background: #f3faf3;
  border: 1px solid #cfe8cf;
  border-left: 4px solid #2a8a2a;
  border-radius: 0 6px 6px 0;
  padding: 14px 22px;
  margin-bottom: 20px;
}
.strengths-heading { margin: 0 0 6px; font-size: 1.02rem; color: #1f6b1f; }
.strengths-list { margin: 0; padding-left: 20px; line-height: 1.65; }

.concerns-box {
  background: #fbf7f7;
  border: 1px solid #e6cccc;
  border-left: 4px solid #c0392b;
  border-radius: 0 6px 6px 0;
  padding: 16px 22px;
  margin-bottom: 22px;
}
.concerns-heading { margin: 0 0 10px; font-size: 1.05rem; color: #a3271b; }
.concern-list { margin: 0 0 12px; padding-left: 26px; }
.concern-item { padding: 6px 0; line-height: 1.5; border-bottom: 1px dotted #e6cccc; }
.concern-item:last-child { border-bottom: none; }
.concern-title { font-weight: 600; color: #2a2a2a; }
.concern-loc { color: #999; font-size: 0.86em; font-family: sans-serif; margin-left: 4px; }
.concern-lock { margin-left: 6px; opacity: 0.7; }
.concerns-unlock {
  margin: 0;
  font-size: 0.9rem;
  color: #7a3c34;
  font-style: italic;
}

.dist-box { margin-bottom: 24px; }
.dist-heading { margin: 0 0 10px; font-size: 1.05rem; }
.dist-table {
  width: 100%;
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 0.84rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.dist-table th {
  background: #f6f6f6;
  padding: 8px 6px;
  text-align: center;
  border-bottom: 2px solid #ddd;
  font-size: 0.78rem;
  line-height: 1.3;
}
.dist-table td {
  padding: 7px 6px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}
.dist-table .dist-sec { text-align: left; font-family: Georgia, serif; }
.dist-table .dist-zero { color: #ccc; }
.dist-total-col { background: #fafafa; }
.dist-totals-row td { border-top: 2px solid #ccc; font-weight: bold; background: #fafafa; }

.fmm-locs { font-style: italic; color: #555; }
.fmm-unlock { color: #a3271b; font-style: italic; margin-left: 4px; }

/* AI disclosure note under the preview title */
.ai-disclosure {
  font-size: 0.82rem;
  color: #777;
  font-style: italic;
  margin-top: 10px;
  max-width: 640px;
  line-height: 1.5;
}

/* ── Full review report page ──────────────────────────────────── */
.report { max-width: 820px; margin: 0 auto; }
.report-head { border-bottom: 2px solid #eee; padding-bottom: 18px; margin-bottom: 28px; }
.report-head h1 { font-size: 1.7rem; margin-bottom: 6px; }
.report-file { color: #999; font-size: 0.9em; margin-bottom: 8px; }
.report-dates {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-family: sans-serif; font-size: 0.82rem; color: #555;
  margin: 12px 0 8px;
}
.report-dates strong { color: #333; font-weight: 600; }
.report-actions { margin-top: 14px; }

.report-block { margin-bottom: 36px; }
.report-block > h2 {
  font-size: 1.3rem; border-bottom: 1px solid #e6e6e6;
  padding-bottom: 6px; margin-bottom: 16px;
}
.report-h3 { font-size: 1.05rem; margin: 20px 0 8px; }
.report-prose { line-height: 1.75; color: #2a2a2a; margin-bottom: 12px; }
.report-list { line-height: 1.75; padding-left: 22px; }
.report-callout {
  background: #f0f4ff; border-left: 4px solid #4a5bbf;
  padding: 14px 18px; margin-bottom: 18px; line-height: 1.7;
}

/* Major-concern cards (holistic) */
.concern-cards { list-style: none; padding: 0; counter-reset: cc; }
.concern-card {
  counter-increment: cc;
  border: 1px solid #e6cccc; border-left: 4px solid #c0392b;
  border-radius: 0 6px 6px 0; padding: 14px 18px; margin-bottom: 14px; background: #fdfafa;
}
.concern-card-head { margin-bottom: 6px; }
.concern-card-head::before { content: counter(cc) ". "; font-weight: bold; color: #a3271b; }
.concern-card-title { font-weight: 600; }

/* Detailed issue cards (Fatal/Major/Moderate) */
.report-section { margin-bottom: 26px; }
.report-section-title {
  font-size: 1.1rem; margin: 22px 0 12px;
  padding-bottom: 4px; border-bottom: 1px dashed #ddd;
}
.issue-card {
  border: 1px solid #d0d0d0; border-left: 5px solid #999;
  border-radius: 0 6px 6px 0; padding: 14px 18px; margin-bottom: 16px;
  background: #fff;
}
.issue-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.issue-num {
  font-family: sans-serif; font-size: 0.8rem; font-weight: 700;
  color: #999; min-width: 1.4em; text-align: center;
}
.issue-badge {
  color: #fff; font-family: sans-serif; font-size: 0.72rem; font-weight: 700;
  padding: 2px 9px; border-radius: 10px; letter-spacing: 0.02em;
}
.issue-loc { font-style: italic; color: #666; font-size: 0.9em; }
.issue-label {
  display: block; font-family: sans-serif; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: #888; margin-bottom: 2px;
}
.issue-problem { margin-bottom: 10px; }
.issue-problem p, .issue-fix p { margin: 0; line-height: 1.65; }
.issue-fix {
  background: #f3faf3; border-radius: 4px; padding: 8px 12px;
  border-left: 3px solid #2a8a2a;
}

/* Minor issues (Literature/Language/Typo) — numbered list */
.minor-heading { font-size: 0.95rem; margin: 14px 0 6px; }
.minor-list { padding-left: 1.6em; }
.minor-list li {
  padding: 8px 0; border-bottom: 1px solid #ddd;
  font-size: 0.92rem; line-height: 1.55;
}
.minor-list li:last-child { border-bottom: none; }
.minor-loc { font-style: italic; color: #777; font-size: 0.88em; margin-bottom: 2px; }
.minor-desc { margin-bottom: 3px; }
.minor-fix { color: #2a6b2a; font-size: 0.9em; }

.revision-text {
  white-space: pre-wrap; word-wrap: break-word;
  background: #fafafa; border: 1px solid #e6e6e6; border-radius: 6px;
  padding: 16px; font-family: "Courier New", monospace; font-size: 0.85rem; line-height: 1.6;
}

.report-foot { border-top: 1px solid #eee; padding-top: 18px; margin-top: 12px; }

/* Print / Save-as-PDF — strip chrome, keep content */
@media print {
  header, footer, .no-print, .lang-switcher { display: none !important; }
  main { margin: 0; max-width: none; }
  .report { max-width: none; }
  .issue-card, .concern-card { break-inside: avoid; page-break-inside: avoid; }
  body { background: #fff; }
}

/* Reference / citation issues — table with type markers */
.ref-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.86rem; margin-bottom: 16px;
  border: 1px solid #e6e6e6; border-radius: 6px; overflow: hidden;
}
.ref-table th {
  background: #f6f6f6; text-align: left; padding: 7px 9px;
  border-bottom: 2px solid #ddd; font-family: sans-serif;
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; color: #555;
}
.ref-table td {
  padding: 8px 9px; border-bottom: 1px solid #f1f1f1;
  vertical-align: top; line-height: 1.55;
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table .ref-loc { font-style: italic; color: #666; font-size: 0.86em; word-break: break-word; }
.ref-tag {
  display: inline-block; color: #fff; font-family: sans-serif;
  font-size: 0.7rem; font-weight: 700; padding: 2px 8px;
  border-radius: 9px; white-space: nowrap;
}
.ref-sug { color: #2a6b2a; }
@media (max-width: 640px) {
  .ref-table, .ref-table thead, .ref-table tbody, .ref-table th, .ref-table td, .ref-table tr { display: block; }
  .ref-table thead { display: none; }
  .ref-table tr { border-bottom: 2px solid #eee; padding: 6px 0; }
  .ref-table td { border: none; padding: 3px 9px; }
  .ref-table .ref-loc { white-space: normal; }
}

/* Unverifiable references — shared explanation + full records */
.unverifiable-box {
  border: 1px solid #f0d0d0; border-left: 4px solid #dc3545;
  border-radius: 0 6px 6px 0; background: #fdf7f7;
  padding: 12px 18px; margin-bottom: 16px;
}
.unverifiable-notice {
  font-size: 0.88rem; color: #7a3c34; line-height: 1.6; margin: 0 0 10px;
}
.unverifiable-list {
  margin: 0; padding-left: 22px; line-height: 1.65;
  font-size: 0.86rem; color: #333;
}
.unverifiable-list li { padding: 3px 0; word-break: break-word; }

.ref-search-link {
  font-family: sans-serif; font-size: 0.78rem; white-space: nowrap;
  color: #0d6efd; text-decoration: none; margin-left: 4px;
}
.ref-search-link:hover { text-decoration: underline; }
