* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: #0f172a;
  font: 15.5px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", "Segoe UI", sans-serif;
  --blue: #0052cc;
  --blue-hover: #0043a8;
  --surface: #f4f6f9;
  --line: #dfe4ec;
  --muted: #475569;
}

header {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.bar {
  max-width: 1200px;
  margin: auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--blue);
  display: inline-block;
}

header nav {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
}

header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

header nav a:hover {
  color: var(--blue);
}

.top-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 24px 24px;
}

.top-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

h1 {
  font: 800 clamp(26px, 3.2vw, 40px)/1.08 inherit;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
}

.lead {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 15.5px;
}

.notice {
  background: #e0ecff;
  color: #0f2c59;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  margin: 10px 0 0;
  display: inline-block;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.meta-pills li {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 7px 11px;
  border-radius: 5px;
  color: #0f172a;
}

.meta-pills li strong {
  color: var(--blue);
}

main {
  max-width: 1200px;
  margin: 28px auto 52px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 32px;
  align-items: start;
}

main.result-grid {
  grid-template-columns: 1.22fr 0.78fr;
}

.panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font: 800 19px/1.2 inherit;
  letter-spacing: -0.02em;
}

.badge {
  background: #e8f0fe;
  color: var(--blue);
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 5px 10px;
  border-radius: 999px;
}

.form-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 7px;
}

.tab {
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 8px 14px;
  font: 600 13.5px/1.2 inherit;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  font: 600 12.5px/1.2 inherit;
  color: var(--muted);
  cursor: pointer;
}

.btn-reset:hover {
  color: #0f172a;
  border-color: #94a3b8;
}

label {
  display: block;
  margin-bottom: 13px;
  font-weight: 600;
  font-size: 13.5px;
}

.label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.inline-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.opt {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input:not([type]),
input[type="file"],
textarea {
  display: block;
  width: 100%;
  padding: 9px 11px;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  margin-top: 4px;
  font: 14.5px/1.4 inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

textarea {
  font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
}

.pair {
  display: flex;
  gap: 12px;
}

.pair > label {
  flex: 1;
}

.range-preview {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 6px;
  padding: 8px 12px;
  font: 600 13px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  margin: -2px 0 14px;
}

.range-preview.bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.choice-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px 8px;
  margin: 0 0 14px;
  background: var(--surface);
}

.choice-group legend {
  font: 700 11.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 5px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 8px;
  cursor: pointer;
}

.choice input,
.check-inline input {
  width: auto;
  margin: 0;
  accent-color: var(--blue);
}

.sample-pdf-bar {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
}

.swatches {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #94a3b8;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease;
}

.swatch.selected {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--blue);
  transform: scale(1.06);
}

input[type="color"] {
  width: 34px;
  height: 28px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
}

.btn-primary,
.action {
  display: inline-block;
  width: 100%;
  text-align: center;
  margin-top: 8px;
  background: var(--blue);
  color: #ffffff;
  border: 0;
  border-radius: 7px;
  padding: 13px 18px;
  font: 700 15px/1.2 inherit;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover,
.action:hover {
  background: var(--blue-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-secondary {
  display: inline-block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  background: #ffffff;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 7px;
  padding: 9px 14px;
  font: 600 13.5px/1.2 inherit;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #eff6ff;
}

.btn-ghost {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 11px;
  font: 600 13px/1.2 inherit;
  cursor: pointer;
}

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

.sticky-aside {
  position: sticky;
  top: 20px;
}

.proof-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 0;
}

.proof-bar {
  display: flex;
  justify-content: space-between;
  font: 600 11.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.proof-box img,
.proof-box canvas,
.preview {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
}

.preview-zoom-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
}

.zoom-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.proof-box figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.batch-summary {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 13px;
  margin-bottom: 12px;
}

.batch-title {
  font-weight: 700;
  font-size: 14.5px;
  color: #0f172a;
  margin: 0 0 4px;
}

.batch-line {
  font: 600 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  margin: 0;
}

.warn-list {
  margin: 10px 0 0;
  padding: 9px 12px 9px 26px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 12.5px;
  color: #92400e;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

.spec-table td {
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.spec-table td:last-child {
  text-align: right;
  font: 600 12.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #0f172a;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.pager-btns {
  display: inline-flex;
  gap: 6px;
}

.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
}

.page-jump input {
  width: 60px;
  margin: 0;
  padding: 5px 8px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

dialog.lightbox {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  max-width: min(94vw, 900px);
  max-height: 92vh;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
}

dialog.lightbox::backdrop {
  background: rgba(15, 23, 42, 0.65);
}

dialog.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: auto;
  border: 1px solid var(--line);
}

.lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.fine {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.pending {
  background: #e8f0fe;
  color: #0f2c59;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  margin: 0;
}

.text-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.alert {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin: 0 0 14px;
}

.band {
  max-width: 1200px;
  margin: 0 auto 44px;
  padding: 30px 24px 0;
  border-top: 1px solid var(--line);
}

.band h2 {
  font: 800 22px/1.2 inherit;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.cell h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.cell p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 8px;
  max-width: 840px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 16px;
  background: #ffffff;
}

.faq-list summary {
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}

.faq-list details p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 24px;
  font-size: 13px;
  color: var(--muted);
}

footer p {
  max-width: 1200px;
  margin: auto;
}

a {
  color: var(--blue);
}

@media (max-width: 860px) {
  main,
  main.result-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .sticky-aside {
    position: static;
  }
  /* Put the purchase summary & CTA above the proof image on phone viewports */
  main.result-grid .sticky-aside {
    order: -1;
  }
}

@media (max-width: 520px) {
  .pair {
    flex-direction: column;
    gap: 0;
  }
}
