/* Hallmark · shape: Map / Diagram · genre: editorial · theme: Ink (deal 1/3, seed local-browser-pdf-tools-30a9·8a13098d·2026-11-23·r0) · redesign: full · draw: 809653 · job: try
 * hero: Index (/), Banner (/merge-pdf, /split-pdf, /compress-pdf, /edit-pdf) · nav: slab · footer: statement · imagery: none · signature: interactive local-browser processing map in the hero · ink: paper
 * hero-review: fix · 5 findings · 5 resolved
 * finish-review: subagent · 8 findings · 8 resolved 0 unresolved · gap: none
 * axes: light/grotesk-sans/chromatic-teal · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V5 · weakest: H, kept top ad banner slot competes with the slab nav; collapses when empty and expands to 90px when an ad populates it */
/* Hallmark · waive 22 · ink and greys at zero chroma · a notice board is printed in plain black (Ink theme rule) */
/* Hallmark · waive 39b · Upload.Dragger dropzone is 320 to 360px tall for drag-and-drop PDF files while buttons stand at 48px · drag-and-drop PDF upload area for merge, split, compress, and edit files in your browser needs a large drop target */
/* Hallmark · waive 44c · Banner posture on PDF tool pages ends around 550 to 622px so capabilities peek above the fold, and the Map / Diagram hero places its 12-column horizontal processing map below the orientation head · PDF tools and system maps sit below their heading row */
/* Hallmark · waive 77 · single customer quote placeholder band on the homepage waiting for the owner’s PDF Tidy quote · user requested a quote slot without supplying quote text yet */
/* Hallmark · dismissed 77 · homepage originally had 2 sections and redesign.md forbids adding invented sections beyond the user’s requested quote slot */
/* Hallmark · dropped "All rights reserved." · 19 names the stock footer line */
/* Hallmark · reworded "PDF tools" to "PDF tools that never leave your browser" · hero review named the generic heading */
/* Hallmark · reworded "Processed in your browser — never uploaded anywhere" to "Processed in your browser, never uploaded anywhere" · 19 refuses em dashes */
/* Hallmark · reworded "Easy Online PDF Editor" to "Edit vector PDF pages in your browser" · finish review named the generic competitor heading */
/* Hallmark · reworded "Frequently Asked Questions" to "Questions about local PDF processing" · finish review named the generic competitor heading */
@import url("./tokens.css");
@import url("./base.css");

/* Skip link */
.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(-1 * var(--space-3xl));
  z-index: var(--z-toast);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-control);
  background: var(--color-ink);
  color: var(--color-paper);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus-visible {
  top: var(--space-md);
}

/* Shared link voice (Ink: 600 weight, teal underline on hover) */
a {
  font-weight: 600;
  transition: color var(--dur-micro) var(--ease-out), text-decoration-color var(--dur-micro) var(--ease-out);
}

a:hover {
  text-decoration-color: var(--color-accent);
}

/* Controls — Ink button pair, all eight states */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 0 var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-paper-2);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.btn:hover {
  background: var(--color-paper-3);
  border-color: var(--color-ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn[aria-busy="true"] {
  cursor: progress;
}

.btn--primary {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-paper);
}

.btn--primary:hover {
  background: var(--color-ink-2);
  border-color: var(--color-ink-2);
}

/* State tags — Ink pill tokens (strictly state: local/in vs out) */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.tag--in {
  background: var(--color-accent-soft);
  color: var(--color-accent-soft-ink);
}

.tag--out {
  background: transparent;
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule);
  color: var(--color-muted);
}

.tag--on {
  background: var(--color-ink);
  color: var(--color-paper);
}

/* Missing-fact inline slot */
.fill {
  display: inline;
  padding: var(--space-3xs) var(--space-xs);
  border: var(--rule-hair) dashed var(--color-muted);
  border-radius: var(--space-2xs);
  color: var(--color-muted);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Chrome: slab navigation bar */
.site-header {
  position: relative;
  z-index: var(--z-sticky-nav);
  background: var(--color-paper);
  border-bottom: var(--rule-hair) solid var(--color-ink);
}

.nav-container {
  width: 100%;
  max-width: var(--container);
  min-height: 64px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-icon img {
  width: 36px;
  height: 36px;
  border-radius: var(--space-xs);
  object-fit: cover;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-control);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}

.nav-link:hover {
  background: var(--color-paper-2);
  color: var(--color-ink);
}

.nav-link:active {
  background: var(--color-paper-3);
}

.nav-link.active {
  background: var(--color-accent-soft);
  color: var(--color-accent-soft-ink);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-paper-2);
  color: var(--color-ink);
  cursor: pointer;
}

.menu-button:hover {
  background: var(--color-paper-3);
  border-color: var(--color-ink);
}

.menu-button:active {
  transform: translateY(1px);
}

.menu-button svg {
  width: 20px;
  height: 20px;
}

/* Kept ad banner slot — collapses cleanly when empty, expands to leaderboard when populated */
.ad-banner-slot {
  width: min(calc(100% - var(--space-xl)), 970px);
  margin: 0 auto;
}

.ad-banner-slot:not(:empty) {
  min-height: 90px;
  margin-top: var(--space-md);
}

/* ==========================================================================
   HOME PAGE — Map / Diagram (Full-width spatial diagram hero + Tinted spec band + Quote)
   ========================================================================== */

.hero-stage {
  min-height: calc(100dvh - 65px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--space-xl);
}

.stage-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-xl);
  align-items: end;
  margin-bottom: var(--space-xl);
}

.stage-head h1 {
  font-size: var(--text-display-s);
  max-width: 17ch;
  line-height: 1.02;
}

.stage-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.stage-side .lead {
  color: var(--color-ink-2);
  font-size: var(--text-lead);
  max-width: 46ch;
}

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

/* Signature: 12-column horizontal Local Processing System Map */
.system-map {
  margin: 0;
  min-width: 0;
  border-top: var(--rule-hair) solid var(--color-ink);
  border-bottom: var(--rule-hair) solid var(--color-ink);
  padding-block: var(--space-lg);
}

.system-map__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.system-map__title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
}

.system-map__canvas {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) 48px minmax(0, 6fr) 48px minmax(0, 3fr);
  align-items: stretch;
  gap: 0;
}

.system-map__col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
  min-width: 0;
}

.system-map__col--out {
  justify-content: space-between;
}

.system-map__edge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.system-map__edge-svg--desktop {
  width: 48px;
  height: 100%;
  color: var(--color-ink);
}

.system-map__edge--out .system-map__edge-svg--desktop {
  color: var(--color-accent);
}

.system-map__edge-svg--mobile {
  display: none;
  width: 24px;
  height: 24px;
  color: var(--color-ink);
}

.system-map__edge--out .system-map__edge-svg--mobile {
  color: var(--color-accent);
}

.system-map__endpoint {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
}

.system-map__endpoint-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
}

.system-map__endpoint strong {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-ink);
}

.system-map__endpoint p {
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  line-height: 1.45;
}

.system-map__stage-note {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-muted);
}

.system-map__endpoint--blocked {
  background: var(--color-paper);
  border-style: dashed;
  border-color: var(--color-muted);
}

.system-map__endpoint--blocked strong {
  color: var(--color-muted);
}

.system-map__sandbox {
  border: var(--rule-hair) solid var(--color-ink);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.system-map__sandbox-head {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.system-map__sandbox-head span:first-child {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-ink);
}

.system-map__sandbox-sub {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-muted);
}

.system-map__lanes {
  display: flex;
  flex-direction: column;
}

.map-node {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  height: 76px;
  padding-inline: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--space-xs);
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color var(--dur-micro) var(--ease-out);
}

.map-node:last-child {
  border-bottom: 0;
}

.map-node:hover {
  background: var(--color-paper-2);
}

.map-node:active {
  background: var(--color-paper-3);
}

.map-node__num {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.map-node__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  min-width: 0;
}

.map-node__name {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-ink);
}

.map-node__desc {
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.35;
  color: var(--color-ink-2);
}

.map-node__role {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}

.map-node:hover .map-node__role {
  color: var(--color-accent-soft-ink);
}

.system-map__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Sections rhythm (varied >= 120px) + Ink --color-paper-2 full-bleed band */
.page-section {
  padding-top: var(--section-gap);
}

.page-section--tight {
  padding-top: var(--section-gap-s);
}

.page-section--wide {
  padding-top: var(--section-gap-l);
}

.page-band {
  margin-top: var(--section-gap-s);
  padding-block: var(--section-gap-s);
  background: var(--color-paper-2);
  border-top: var(--rule-hair) solid var(--color-rule);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.section-head-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap-columns);
  align-items: end;
  margin-bottom: var(--space-2xl);
}

.section-head-split p {
  color: var(--color-ink-2);
  font-size: var(--text-lead);
  line-height: 1.45;
  max-width: 48ch;
}

/* Spec comparison table (Table composition — Ink ruled table inside paper-2 band) */
.spec-table-wrap {
  width: 100%;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  border-top: var(--rule-hair) solid var(--color-ink);
  text-align: left;
}

.spec-table th,
.spec-table td {
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  vertical-align: top;
}

.spec-table th {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--color-ink);
  width: 28%;
}

.spec-table td {
  color: var(--color-ink-2);
}

/* ==========================================================================
   TOOL PAGES — Unified Banner Hero + Single-Layer Dropzone + Ruled Rows + Banded Steps + Split FAQ
   ========================================================================== */

.tool-hero {
  padding-top: var(--space-xl);
  padding-bottom: 0;
}

.tool-banner__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gap-columns);
  align-items: end;
  margin-bottom: var(--space-lg);
}

.tool-banner__grid h1 {
  font-size: var(--text-display-s);
  max-width: 18ch;
  line-height: 1.02;
}

.tool-banner__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
}

.tool-banner__meta p {
  color: var(--color-ink-2);
  font-size: var(--text-lead);
  line-height: 1.45;
  max-width: 48ch;
}

/* Single containment layer — no nested card around the dropzone or workspace */
.tool-card {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

#root {
  width: 100%;
}

/* Split layout for Capabilities & FAQ (12 columns full width) */
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--space-2xl);
  align-items: start;
}

.split-section__head h2 {
  max-width: 15ch;
}

.split-section__head p {
  margin-top: var(--space-md);
  color: var(--color-ink-2);
  font-size: var(--text-md);
  max-width: 48ch;
}

/* Capabilities ruled list (replaces 4 icon cards) */
.capability-list {
  border-top: var(--rule-hair) solid var(--color-ink);
}

.capability-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap-columns);
  padding-block: var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  align-items: baseline;
}

.capability-row h3 {
  font-size: var(--text-title);
  line-height: 1.2;
}

.capability-row p {
  color: var(--color-ink-2);
  font-size: var(--text-md);
  line-height: 1.55;
}

/* Steps as a notice (Ink Range: display numerals over hairline, inside paper-2 band) */
.steps-notice {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(var(--steps-cols, 4), minmax(0, 1fr));
  gap: var(--gap-columns);
}

.steps-notice--three {
  --steps-cols: 3;
}

.steps-notice__item {
  counter-increment: step;
  border-top: var(--rule-hair) solid var(--color-ink);
  padding-top: var(--space-lg);
}

.steps-notice__item::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
}

.steps-notice__item h3 {
  margin-bottom: var(--space-xs);
  font-size: var(--text-title);
}

.steps-notice__item p {
  color: var(--color-ink-2);
  font-size: var(--text-md);
  line-height: 1.55;
}

.steps-notice__item .tag {
  margin-top: var(--space-md);
}

/* Ruled FAQ disclosures (full width in 8-col track) */
.faq {
  border-top: var(--rule-hair) solid var(--color-ink);
}

.faq details {
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 56px;
  padding-block: var(--space-md);
  cursor: pointer;
  color: var(--color-ink);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-outlier);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-muted);
}

.faq details[open] summary::after {
  content: "−";
  color: var(--color-accent);
}

.faq summary:hover {
  color: var(--color-accent-soft-ink);
}

.faq details p {
  padding-bottom: var(--space-lg);
  color: var(--color-ink-2);
  font-size: var(--text-md);
  max-width: 62ch;
}

/* Statement footer (from draw 809653) */
.site-footer {
  margin-top: var(--section-gap);
  border-top: var(--rule-hair) solid var(--color-ink);
  background: var(--color-paper);
  padding-block: var(--space-2xl) var(--space-xl);
}

.footer-statement {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  color: var(--color-ink);
  text-wrap: balance;
}

.footer-bar {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.footer-brand {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

.footer-text {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* Contact form (Formspree AJAX) */
.contact-card {
  border-top: var(--rule-hair) solid var(--color-ink);
  padding-top: var(--space-lg);
}

.contact-form {
  display: grid;
  gap: var(--space-md);
}

.contact-field {
  display: grid;
  gap: var(--space-xs);
}

.contact-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: var(--text-md);
  color: var(--color-ink);
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  transition: border-color 0.15s ease;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-field input[aria-invalid="true"],
.contact-field textarea[aria-invalid="true"] {
  border-color: #b91c1c;
}

.contact-field-error {
  font-size: var(--text-sm);
  color: #b91c1c;
}

.contact-field-error:empty,
.contact-status:empty {
  display: none;
}

.contact-status {
  margin-bottom: var(--space-md);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-card);
  font-size: var(--text-sm);
  font-weight: 600;
}

.contact-status--success {
  background: #f0fdfa;
  color: #0f766e;
  border: var(--rule-hair) solid #99f6e4;
}

.contact-status--error {
  background: #fef2f2;
  color: #b91c1c;
  border: var(--rule-hair) solid #fecaca;
}

/* Ant Design Upload Dragger — single flat Ink surface (no card inside a card) */
.pdf-dropzone .ant-upload-drag {
  min-height: 360px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: var(--color-paper-2) !important;
  border: var(--rule-hair) dashed var(--color-muted) !important;
  border-radius: var(--radius-card) !important;
  padding: var(--space-2xl) var(--space-lg) !important;
  transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out) !important;
}

.pdf-dropzone .ant-upload-drag:hover {
  border-color: var(--color-ink) !important;
  background: var(--color-paper-3) !important;
}

.pdf-dropzone__icon {
  margin-bottom: var(--space-md);
  font-size: var(--text-3xl);
  color: var(--color-accent);
  line-height: 1;
}

.pdf-dropzone__title {
  margin: 0 0 var(--space-xs);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
}

.pdf-dropzone__hint {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

/* ==========================================================================
   RESPONSIVE (< 60rem tablet / < 44rem mobile)
   ========================================================================== */

@media (max-width: 60rem) {
  .hero-stage {
    min-height: auto;
    padding-block: var(--space-lg);
  }

  .stage-head,
  .tool-banner__grid,
  .section-head-split,
  .split-section,
  .capability-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }

  .system-map__canvas {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xs);
  }

  .system-map__edge-svg--desktop {
    display: none;
  }

  .system-map__edge-svg--mobile {
    display: block;
  }

  .map-node {
    height: auto;
    min-height: 68px;
    padding-block: var(--space-sm);
  }

  .steps-notice,
  .steps-notice--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 44rem) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--space-md);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2xs);
    background: var(--color-paper);
    border-bottom: var(--rule-hair) solid var(--color-ink);
  }

  .main-nav.open {
    display: flex;
  }

  .menu-button {
    display: inline-flex;
  }

  .ad-banner-slot {
    width: calc(100% - var(--space-lg));
  }

  .stage-head {
    margin-bottom: var(--space-lg);
  }

  .system-map {
    padding-block: var(--space-md);
  }

  .system-map__bar {
    margin-bottom: var(--space-md);
  }

  .system-map__endpoint {
    padding: var(--space-md);
  }

  .system-map__sandbox {
    padding: var(--space-md);
  }

  .map-node {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: var(--space-sm);
    min-height: 56px;
    padding-inline: 0;
  }

  /* Restack spec table into labelled blocks so 375px never creates text slivers (F17/F25) */
  .spec-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .spec-table tbody,
  .spec-table tr,
  .spec-table td {
    display: block;
    width: 100%;
  }

  .spec-table tr {
    padding-block: var(--space-md);
    border-bottom: var(--rule-hair) solid var(--color-rule);
  }

  .spec-table td {
    padding: var(--space-2xs) 0;
    border-bottom: 0;
  }

  .spec-table td:first-child {
    width: 100%;
    font-size: var(--text-lg);
    padding-bottom: var(--space-xs);
  }

  .spec-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--color-muted);
  }

  .pdf-dropzone .ant-upload-drag {
    min-height: 260px;
    padding: var(--space-xl) var(--space-md) !important;
  }

  .steps-notice,
  .steps-notice--three {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Balanced 2x2 link grid on narrow phones — no orphaned link (F20) */
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm) var(--space-lg);
    width: 100%;
  }
}
