.dc-checker {
  --dc-navy: #2a363b;
  --dc-blue: #5b90b7;
  --dc-blue-dark: #477a9f;
  --dc-pale: #f7f9fb;
  --dc-border: #e5e7eb;
  --dc-text: #2a363b;
  --dc-muted: #5b6871;
  --dc-success: #277a50;
  --dc-success-pale: #edf8f2;
  --dc-warning: #a66b00;
  --dc-warning-pale: #fff7e5;
  --dc-danger: #a33b3b;
  --dc-danger-pale: #fff0f0;
  --dc-colour: #e5174f;
  --dc-colour-pale: #fff1f5;
  color: var(--dc-text);
  font-family: Raleway, Helvetica, Tahoma, Geneva, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  margin: 0 auto;
  max-width: 1120px;
  padding: 0 0 48px;
}

.dc-checker *,
.dc-checker *::before,
.dc-checker *::after {
  box-sizing: border-box;
}

.dc-checker h1,
.dc-checker h2,
.dc-checker h3 {
  color: var(--dc-navy);
  font-family: Lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.35;
}

.dc-checker h1 {
  font-size: clamp(2rem, 4vw, 2.25rem);
  margin: 0 0 12px;
}

.dc-checker h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin: 0 0 6px;
}

.dc-checker h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
}

.dc-checker button,
.dc-checker input,
.dc-checker select {
  font: inherit;
}

.dc-hero {
  background: #fff;
  border-bottom: 1px solid var(--dc-border);
  color: var(--dc-text);
  margin-bottom: 24px;
  padding: 0 0 26px;
  position: relative;
}

.dc-hero::after {
  background: var(--dc-blue);
  bottom: -1px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  width: 84px;
}

.dc-hero h1,
.dc-hero p {
  color: var(--dc-text);
  max-width: 780px;
}

.dc-eyebrow {
  color: var(--dc-blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.dc-lead {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.7;
  margin: 0;
}

.dc-privacy {
  align-items: flex-start;
  background: var(--dc-pale);
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  padding: 17px 20px;
}

.dc-privacy-icon {
  align-items: center;
  background: var(--dc-blue);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 26px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
}

.dc-privacy p {
  line-height: 1.55;
  margin: 2px 0 0;
}

.dc-panel,
.dc-results,
.dc-progress {
  background: #fff;
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  box-shadow: none;
  margin-top: 20px;
  padding: clamp(20px, 4vw, 32px);
}

.dc-panel-heading {
  display: block;
  margin-bottom: 22px;
}

.dc-panel-heading > div {
  min-width: 0;
}

.dc-panel-heading p {
  color: var(--dc-muted);
  line-height: 1.6;
  margin: 0;
}

.dc-checker .dc-step-label {
  background: var(--dc-blue);
  border-radius: 8px;
  color: #fff;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0 0 10px;
  padding: 7px 11px;
}

.dc-dropzone {
  border: 2px dashed #c3cfd7;
  border-radius: 12px;
  min-height: 195px;
  overflow: hidden;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dc-dropzone:hover,
.dc-dropzone:focus-within,
.dc-dropzone.dc-is-dragging {
  background: var(--dc-pale);
  border-color: var(--dc-blue);
}

.dc-file-input {
  height: 1px;
  left: 50%;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  top: 50%;
  width: 1px;
}

.dc-dropzone-label {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  padding: 28px;
  position: absolute;
  text-align: center;
}

.dc-upload-icon {
  align-items: center;
  background: var(--dc-danger-pale);
  border: 1px solid #f1b5c6;
  border-radius: 8px;
  color: var(--dc-colour);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  letter-spacing: 0.05em;
  margin-bottom: 13px;
  width: 48px;
}

.dc-drop-title {
  color: var(--dc-navy);
  font-size: 1.08rem;
  font-weight: 700;
}

.dc-drop-help {
  color: var(--dc-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.dc-selected-file {
  align-items: center;
  background: var(--dc-pale);
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 13px 16px;
}

.dc-selected-file div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dc-selected-file strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-selected-file span {
  color: var(--dc-muted);
  font-size: 0.9rem;
}

.dc-text-button {
  background: transparent;
  border: 0;
  color: var(--dc-blue);
  cursor: pointer;
  font-weight: 600;
  padding: 7px;
}

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

.dc-field-wide,
.dc-size-inputs {
  grid-column: 1 / -1;
}

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

.dc-startup-status {
  background: var(--dc-pale);
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  color: var(--dc-muted);
  margin: 18px 0;
  padding: 12px 16px;
  text-align: center;
}

.dc-startup-status.dc-startup-error {
  background: var(--dc-danger-pale);
  border-color: #e6b6b6;
  color: var(--dc-danger);
  font-weight: 700;
}

.dc-field label {
  color: var(--dc-navy);
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.dc-field input,
.dc-field select {
  background: #fff;
  border: 1px solid #e0e0e5;
  border-radius: 4px;
  color: var(--dc-text);
  min-height: 44px;
  padding: 6px 20px;
  width: 100%;
}

.dc-field input:focus,
.dc-field select:focus {
  border-color: var(--dc-blue);
  box-shadow: 0 0 0 3px rgba(47, 101, 140, 0.15);
  outline: 0;
}

.dc-field input[readonly] {
  background: #f4f5f7;
  color: var(--dc-muted);
}

.dc-margin-guide {
  background: #f6f8fb;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  color: var(--dc-muted);
  line-height: 1.55;
  padding: 16px 18px;
}

.dc-margin-guide-ready {
  background: #eef7fb;
  border-color: #b8d5e5;
  color: var(--dc-text);
}

.dc-margin-guide-warning {
  background: #fff8e8;
  border-color: #e9d09d;
  color: #7a5511;
  font-weight: 600;
}

.dc-binding-summary {
  border-left: 4px solid var(--dc-border);
  border-radius: 6px;
  margin-top: 12px;
  padding: 14px 16px;
}

.dc-binding-summary p {
  margin: 7px 0 0;
}

.dc-binding-pass {
  background: #eef8f1;
  border-left-color: var(--dc-success);
}

.dc-binding-fail {
  background: var(--dc-danger-pale);
  border-left-color: var(--dc-danger);
}

.dc-binding-review {
  background: #fff8e8;
  border-left-color: #c28a22;
}

.dc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 25px 0;
}

.dc-primary-button,
.dc-secondary-button {
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  min-height: 44px;
  padding: 9px 14px;
}

.dc-primary-button {
  background: var(--dc-blue);
  border: 1px solid var(--dc-blue);
  color: #fff;
  min-width: 190px;
}

.dc-primary-button:hover:not(:disabled),
.dc-primary-button:focus:not(:disabled) {
  background: var(--dc-blue-dark);
  border-color: var(--dc-blue-dark);
}

.dc-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.dc-secondary-button {
  background: #fff;
  border: 1px solid var(--dc-blue);
  color: var(--dc-blue-dark);
}

.dc-secondary-button:hover,
.dc-secondary-button:focus {
  background: var(--dc-pale);
}

.dc-message {
  border-radius: 12px;
  margin: 18px 0;
  padding: 15px 18px;
}

.dc-message-error {
  background: var(--dc-danger-pale);
  border: 1px solid #e7b9b9;
  color: #7c2929;
}

.dc-progress-heading,
.dc-results-heading {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.dc-progress progress {
  accent-color: var(--dc-blue);
  display: block;
  height: 18px;
  margin: 10px 0;
  width: 100%;
}

.dc-progress p {
  color: var(--dc-muted);
  font-size: 0.92rem;
  margin: 0;
}

.dc-results-heading {
  border-bottom: 1px solid var(--dc-border);
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.dc-results-heading .dc-eyebrow {
  color: var(--dc-success);
}

.dc-comparison {
  border-radius: 12px;
  margin-bottom: 20px;
  padding: 16px 18px;
}

.dc-comparison.dc-comparison-pass {
  background: var(--dc-success-pale);
  border: 1px solid #b9ddc9;
}

.dc-comparison.dc-comparison-fail {
  background: var(--dc-danger-pale);
  border: 1px solid #e7b9b9;
}

.dc-comparison.dc-comparison-review {
  background: var(--dc-warning-pale);
  border: 1px solid #e9d09d;
}

.dc-comparison h3 {
  margin-bottom: 8px;
}

.dc-comparison ul {
  margin: 0;
  padding-left: 21px;
}

.dc-stat-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 20px;
}

.dc-stat-card {
  background: #fff;
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
}

.dc-stat-value {
  color: var(--dc-navy);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
}

.dc-stat-label {
  color: var(--dc-muted);
  font-size: 0.86rem;
  margin-top: 5px;
}

.dc-stat-colour {
  background: var(--dc-colour-pale);
  border-color: #d6c1ed;
}

.dc-stat-review {
  background: var(--dc-warning-pale);
  border-color: #e9d09d;
}

.dc-stat-blank {
  background: #fafafa;
}

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

.dc-result-panel {
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 19px;
}

.dc-result-panel > p {
  color: var(--dc-muted);
  font-size: 0.92rem;
  margin: 0 0 10px;
}

.dc-colour-panel {
  border-top: 4px solid var(--dc-colour);
}

.dc-bw-panel {
  border-top: 4px solid var(--dc-navy);
}

.dc-review-panel {
  border-top: 4px solid var(--dc-warning);
}

.dc-blank-panel {
  border-top: 4px solid #98a5af;
}

.dc-size-row {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 9px 0;
}

.dc-size-row + .dc-size-row {
  border-top: 1px solid var(--dc-border);
}

.dc-size-name {
  color: var(--dc-navy);
  font-weight: 800;
}

.dc-size-pages {
  color: var(--dc-muted);
  text-align: right;
}

.dc-page-list {
  color: var(--dc-text);
  overflow-wrap: anywhere;
}

.dc-page-list:empty::before {
  color: var(--dc-muted);
  content: "None detected";
  font-style: italic;
}

.dc-bleed-note {
  background: var(--dc-pale);
  border-radius: 6px;
  color: var(--dc-muted);
  margin: 14px 0 0;
  padding: 11px 13px;
}

.dc-details {
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  margin-top: 3px;
  overflow: hidden;
}

.dc-details summary {
  color: var(--dc-navy);
  cursor: pointer;
  font-weight: 800;
  padding: 16px 18px;
}

.dc-details[open] summary {
  border-bottom: 1px solid var(--dc-border);
}

.dc-table-wrap {
  max-height: 560px;
  overflow: auto;
}

.dc-table {
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 900px;
  width: 100%;
}

.dc-table th,
.dc-table td {
  border-bottom: 1px solid var(--dc-border);
  padding: 10px 13px;
  text-align: left;
}

.dc-table th {
  background: var(--dc-pale);
  color: var(--dc-navy);
  position: sticky;
  top: 0;
  z-index: 1;
}

.dc-result-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
}

.dc-badge-colour {
  background: var(--dc-colour-pale);
  color: #5d249e;
}

.dc-badge-bw {
  background: #e8edf1;
  color: var(--dc-navy);
}

.dc-badge-review {
  background: var(--dc-warning-pale);
  color: #7a4e00;
}

.dc-badge-blank {
  background: #efefef;
  color: #59636b;
}

.dc-limitations {
  background: var(--dc-warning-pale);
  border-left: 5px solid var(--dc-warning);
  border-radius: 12px;
  margin-top: 20px;
  padding: 17px 19px;
}

.dc-limitations p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .dc-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .dc-form-grid,
  .dc-size-inputs,
  .dc-result-grid {
    grid-template-columns: 1fr;
  }

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

  .dc-results-heading,
  .dc-progress-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dc-results-heading .dc-secondary-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .dc-checker {
    padding-top: 0;
  }

  .dc-hero {
    margin-left: 0;
    margin-right: 0;
  }

  .dc-stat-grid {
    grid-template-columns: 1fr;
  }

  .dc-size-row {
    flex-direction: column;
    gap: 3px;
  }

  .dc-size-pages {
    text-align: left;
  }
}

@media print {
  .dc-panel,
  .dc-actions,
  .dc-privacy,
  .dc-progress,
  .dc-results-heading .dc-secondary-button {
    display: none !important;
  }

  .dc-results {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .dc-table-wrap {
    max-height: none;
    overflow: visible;
  }
}

/* Visual PDF preview — guides never alter the uploaded PDF. */
.dc-workflow-choice { margin: 22px 0; max-width: 650px; }
.dc-visual-preview { border: 1px solid #cbd9e2; border-radius: 12px; padding: 18px; margin: 0 0 24px; }
.dc-visual-preview h3 { font-size: 1.35rem; }
.dc-pv-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 0; }
.dc-pv-controls label { display: flex; align-items: center; gap: 6px; font-size: .88rem; }
.dc-pv-controls input[type=number] { width: 74px; }
.dc-pv-controls input, .dc-pv-controls select, .dc-pv-review select { padding: 6px; min-height: 38px; border: 1px solid #aebcc6; border-radius: 5px; background: white; color: #2a363b; }
.dc-pv-controls input[type=checkbox] { min-height: 20px; width: 20px; accent-color: #477a9f; }
.dc-pv-controls button:disabled { opacity: .45; cursor: default; }
.dc-pv-controls button:focus-visible, .dc-pv-review select:focus-visible, .dc-pv-controls input:focus-visible, .dc-pv-controls select:focus-visible { outline: 3px solid #477a9f; outline-offset: 2px; }
.dc-pv-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .8rem; }
.dc-pv-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dc-pv-legend i { display: inline-block; width: 24px; height: 12px; }
.dc-key-safe { border: 1px solid #e88e8e; background: #fff0f0; }
.dc-key-trim { border-bottom: 2px dashed #1474af; }
.dc-key-binding { border-bottom: 2px dashed #8a4a9b; }
.dc-pv-caption, .dc-cover-notice { font-size: .85rem; line-height: 1.6; color: #52616a; }
.dc-pv-review { padding: 12px; background: #f2f6f9; border-radius: 8px; }
.dc-pv-review label { font-size: .9rem; display: block; }
.dc-pv-review select { max-width: 100%; margin: 5px 10px; }
.dc-pv-review span { font-size: .85rem; }
.dc-pv-status { margin: 12px 0 8px; font-size: .9rem; }
.dc-pv-viewport { overflow: auto; max-height: 850px; background: #e8edf0; border: 1px solid #d5dde2; border-radius: 8px; padding: 20px 10px; }
.dc-pv-book { min-width: 100%; width: max-content; }
.dc-pv-spread { display: flex; align-items: flex-start; justify-content: center; gap: 12px; }
.dc-pv-page { flex: 0 0 auto; margin: 0; min-width: 0; }
.dc-pv-stage { position: relative; box-shadow: 0 3px 12px #26394226; line-height: 0; background: #fff; }
.dc-pv-stage canvas { width: 100%; height: auto; display: block; }
.dc-pv-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.dc-pv-overlay rect, .dc-pv-overlay line { vector-effect: non-scaling-stroke; }
.dc-pv-safe { fill: none; stroke: #e88e8e; stroke-width: 1.2; }
.dc-pv-shade { fill: #ec7777; fill-opacity: .12; stroke: none; }
.dc-pv-trim { fill: none; stroke: #1474af; stroke-width: 1.4; stroke-dasharray: 6 3; }
.dc-pv-binding { fill: none; stroke: #8a4a9b; stroke-width: 1.4; stroke-dasharray: 5 3; }
.dc-pv-text-warning { fill: #d83f3f; fill-opacity: .08; stroke: #c94d4d; stroke-width: 1; }
.dc-pv-cover-label { font-family: Arial,sans-serif; font-size: 11px; font-weight: bold; fill: #1474af; text-anchor: middle; paint-order: stroke; stroke: white; stroke-width: 3; }
.dc-pv-hide-guides .dc-pv-overlay { visibility: hidden; }
.dc-pv-page figcaption { text-align: center; font-size: .8rem; padding: 10px 3px 0; color: #344651; }
.dc-pv-placeholder { flex: 0 0 auto; padding: 35px 12px; color: #647580; font-size: .8rem; text-align: center; }
.dc-pv-note-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 12px; margin-top: 16px; }
.dc-pv-note { border: 1px solid #dce3e8; border-radius: 8px; padding: 14px; font-size: .88rem; line-height: 1.65; }
.dc-pv-note h4 { margin: 0 0 8px; font-size: 1rem; }
.dc-pv-note ul { margin: 0; padding-left: 20px; }
.dc-pv-note li + li { margin-top: 9px; }
@media (max-width: 600px) {
  .dc-visual-preview { padding: 10px; }
  .dc-pv-viewport { padding: 14px 6px; }
  .dc-pv-spread { gap: 6px; }
  .dc-pv-controls { gap: 8px; }
}
@media print { .dc-workflow-choice, .dc-pv-controls, .dc-pv-review { display: none !important; } .dc-pv-viewport { max-height: none; overflow: visible; } }

/* Only the extra binding strip is shaded on internal pages. */
.dc-pv-binding-area { fill: #d95353; fill-opacity: .24; stroke: none; }
.dc-pv-binding-boundary { stroke: #b33b3b; stroke-width: 1.4; stroke-dasharray: 4 3; }
.dc-key-binding-area { border: 1px solid #b33b3b; background: #f6d6d6; }
.dc-pv-colour-note { padding: 12px 14px; border-radius: 8px; background: #f2f6f9; font-size: .85rem; line-height: 1.6; }
.dc-pv-colour-only .dc-pv-legend, .dc-pv-hide-guides .dc-pv-legend { display: none; }
.dc-pv-controls input:disabled { opacity: .5; }
