/* Skip link — visible only on focus */
.skip-link {
  position: fixed;
  top: -100%;
  left: 8px;
  z-index: 10000;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:root {
  color-scheme: light;
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-soft: #f2f6f1;
  --surface-strong: #e7eee5;
  --text: #171917;
  --text-soft: #596258;
  --text-muted: #7c8679;
  --border: #d6ded2;
  --primary: #111111;
  --primary-hover: #30342f;
  --accent: #1b7f63;
  --accent-hover: #15705a;
  --accent-soft: rgba(27, 127, 99, 0.1);
  --success: #26775f;
  --shadow-sm: 0 1px 4px rgba(26, 38, 29, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 38, 29, 0.08);
  --shadow-lg: 0 24px 80px rgba(26, 38, 29, 0.12);
  --radius: 8px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 380px),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.page-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-name {
  font-weight: 800;
}

.brand-tagline {
  display: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

@media (min-width: 600px) {
  .brand {
    gap: 12px;
  }
  .brand-tagline {
    display: inline;
  }
  .brand-tagline::before {
    content: "\00B7";
    margin-right: 12px;
    color: var(--border);
  }
}

.brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid #23211f;
  border-radius: 8px;
  background:
    linear-gradient(to right, transparent 9px, rgba(27, 127, 99, 0.24) 10px, transparent 11px),
    linear-gradient(to bottom, transparent 9px, rgba(27, 127, 99, 0.24) 10px, transparent 11px),
    #ffffff;
  background-size: 10px 10px;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero {
  margin-bottom: 32px;
}

.hero-eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 10px;
}

.hero-desc {
  margin: 0;
  max-width: 660px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  gap: 24px;
  align-items: stretch;
}

.preview-pane,
.control-pane {
  min-width: 0;
}

.preview-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
  font-weight: 800;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

h3,
h4,
p {
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 800;
}

h2, h3, h4 {
  scroll-margin-top: 32px;
}

h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
}

p {
  margin: 0;
}

.paper-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 660px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #edf3ef;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -24px 60px rgba(37, 83, 65, 0.08),
    var(--shadow-lg);
  overflow: hidden;
}

.preview-stage-label {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#puzzleCanvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(76vh, 760px);
  border: 1px solid rgba(23, 25, 23, 0.1);
  border-radius: 3px;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.9) inset,
    0 32px 70px rgba(26, 38, 29, 0.2);
}

.preview-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-size {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.preview-download-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(38, 119, 95, 0.14);
}

.control-pane {
  align-self: start;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 60px rgba(26, 38, 29, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .control-pane {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .sticky-cta {
    transition: none;
  }
}

.control-pane-header {
  padding: 16px 20px 8px;
}

.control-pane-header .eyebrow {
  margin-bottom: 4px;
}

.control-pane-header h2 {
  margin-bottom: 8px;
}

.quick-settings {
  padding: 0 20px;
}

.quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-field {
  display: grid;
  gap: 6px;
}

.quick-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.control-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading .eyebrow {
  margin-bottom: 4px;
}

.field,
.range-field,
.colour-field {
  display: grid;
  gap: 8px;
}

.field > span,
.colour-field > span,
.segmented-field legend {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%),
    var(--surface-soft);
  background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px, 100% 0;
  background-size: 6px 6px, 6px 6px, 2.5em 2.5em;
  background-repeat: no-repeat;
  appearance: none;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  cursor: pointer;
  user-select: none;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.checkbox-field span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.checkbox-field:has(input:checked) {
  border-color: var(--primary);
}

.checkbox-field:has(input:checked) span {
  color: var(--text);
}

.segmented-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 44px;
  margin-top: 8px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.segmented-control label {
  min-width: 0;
}

.segmented-control input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.segmented-control input:checked + span {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 8px rgba(26, 38, 29, 0.1);
}

.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
}

.range-field strong {
  font-weight: 800;
}

output {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  accent-color: var(--primary);
}

.colour-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.colour-field {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

input[type="color"] {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  border: 1px solid var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-sm);
}

.primary-button:active,
.ghost-button:active {
  transform: translateY(1px);
}

.primary-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes download-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.primary-button.downloading {
  animation: download-pulse 0.3s ease;
}

.small-primary {
  display: inline-flex;
  padding: 0 14px;
}

.download-button {
  width: 100%;
}

.download-panel {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.download-panel .primary-button {
  min-height: 52px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.download-panel .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.secondary-actions .ghost-button {
  width: 100%;
  min-height: 42px;
  font-size: 13px;
}

.trust-line {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ghost-button {
  padding: 0 14px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
}

.ghost-button:hover {
  border-color: #bbc9b7;
  background: var(--surface);
}

.ad-slot {
  display: none;
  place-items: center;
  min-height: 86px;
  border: 1px dashed #bbc9b7;
  border-radius: var(--radius);
  color: var(--text-muted);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.7) 0,
      rgba(255, 255, 255, 0.7) 10px,
      rgba(231, 238, 229, 0.72) 10px,
      rgba(231, 238, 229, 0.72) 20px
    );
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-slot-side {
  min-height: 248px;
}

.content-band {
  display: grid;
  gap: 32px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.content-intro {
  max-width: 760px;
}

.content-intro h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}

.content-intro p,
.copy-section p,
.size-panel p,
.size-panel li {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.content-intro p + p {
  margin-top: 10px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.guide-main {
  display: grid;
  gap: 40px;
  min-width: 0;
}

.copy-section {
  display: grid;
  gap: 20px;
}

.copy-heading {
  display: grid;
  gap: 4px;
}

.copy-heading .eyebrow {
  margin: 0;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.puzzle-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 214px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.template-meta {
  font-size: 13px;
  font-weight: 800;
}

.text-stack {
  display: grid;
  gap: 12px;
  max-width: 980px;
}

.text-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
}

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

.use-grid article {
  display: grid;
  gap: 8px;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.guide-side {
  display: grid;
  gap: 12px;
}

.guide-ad {
  min-height: 184px;
}

.size-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.size-panel .eyebrow {
  margin: 0;
}

.size-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .control-pane {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .paper-stage {
    min-height: 560px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

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

  .use-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-tagline {
    display: none;
  }

  .hero {
    margin-bottom: 24px;
  }

  h1 {
    font-size: 32px;
  }

  .paper-stage {
    min-height: 430px;
    padding: 16px;
  }

  .preview-actions {
    position: static;
    margin-top: 12px;
  }

  #puzzleCanvas {
    max-height: 58vh;
  }

  .control-section {
    padding: 16px;
  }

  details.control-section {
    padding: 0;
  }

  .control-pane-header {
    padding: 12px 16px 4px;
  }

  .quick-settings {
    padding: 0 16px;
  }

  .quick-row {
    grid-template-columns: 1fr;
  }

  .download-panel {
    padding: 16px;
  }

  .download-panel .primary-button {
    font-size: 15px;
    min-height: 48px;
  }

  .secondary-actions {
    gap: 6px;
  }

  .secondary-actions .ghost-button {
    min-height: 38px;
    font-size: 12px;
  }

  .colour-grid {
    grid-template-columns: 1fr;
  }

  .content-band {
    margin-top: 48px;
    padding-top: 32px;
  }

  .content-intro h2 {
    font-size: 28px;
  }

  .puzzle-grid,
  .use-grid,
  .text-columns {
    grid-template-columns: 1fr;
  }

  .puzzle-grid article {
    min-height: 0;
  }
}

/* Breadcrumbs */
#breadcrumbs {
  margin-bottom: 16px;
}

#breadcrumbs nav ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--border);
}

#breadcrumbs a {
  color: var(--text-soft);
  text-decoration: none;
}

#breadcrumbs a:hover {
  color: var(--text);
  text-decoration: underline;
}

#breadcrumbs [aria-current="page"] {
  color: var(--text);
}

/* Hub Card Grid */
.hub-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.hub-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.hub-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.hub-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.hub-card h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.hub-card p {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

/* Site Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.footer-column h3 {
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.footer-column a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-column a em {
  font-style: normal;
  color: var(--text);
  font-weight: 700;
}

.footer-bottom {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
}

/* Noscript Notice */
.noscript-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px;
  background: #fff3cd;
  border-top: 2px solid #ffc107;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #664d03;
  z-index: 9999;
}

/* Details / control-section collapsible */
details.control-section {
  display: block;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease;
}

details.control-section summary {
  position: relative;
  padding: 16px 44px 16px 20px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  list-style: none;
  transition: background-color 120ms ease;
}

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

details.control-section summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  transform: rotate(45deg);
  transition: transform 200ms ease, margin-top 200ms ease;
}

details.control-section[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

details.control-section summary:hover {
  background: var(--surface-soft);
}

details.control-section summary:active {
  background: var(--surface-strong);
}

details.control-section[open] summary {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.control-section-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.control-section-body {
  padding: 16px 20px 20px;
  display: grid;
  gap: 16px;
}

/* Decision Bridge */
.decision-bridge {
  max-width: 760px;
  margin: 32px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.bridge-paths {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.bridge-path {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.bridge-path h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}

.bridge-path p {
  font-size: 13px;
  color: var(--text-soft);
}

.bridge-path a {
  color: var(--accent);
  text-decoration: none;
}

.bridge-path a:hover {
  text-decoration: underline;
}

/* CTA zones */
.cta-zone-top {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.decision-zone {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 8px;
}

.handoff-primary {
  text-align: center;
}

.cta-global {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.cta-contextual {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
}

.handoff-button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 28px;
  font-size: 15px;
  text-decoration: none;
}

/* Exit intent overlay */
.exit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(4px);
}

.exit-overlay.is-visible {
  display: grid;
}

.exit-panel {
  max-width: 400px;
  width: 90%;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: grid;
  gap: 12px;
}

.exit-heading {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.exit-desc {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.exit-download-btn {
  min-height: 48px;
  font-size: 16px;
  justify-content: center;
}

#exitDismissBtn {
  justify-content: center;
  font-size: 13px;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 -4px 24px rgba(26, 38, 29, 0.08);
  transition: transform 0.35s ease;
  transform: translateY(0);
}

.sticky-cta-text {
  margin: 0 16px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.sticky-cta--hidden {
  transform: translateY(100%);
}

#stickyGenerateBtn {
  min-width: 240px;
}

/* Comparison table styles */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  font-weight: 800;
  font-size: 13px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Print intent strip */
.print-intent-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-soft);
}

.print-intent-item {
  font-weight: 600;
}

.print-intent-item strong {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 460px) {
  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .ghost-button,
  .small-primary {
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

  .sticky-cta {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
  }

  .sticky-cta-text {
    margin: 0;
    font-size: 13px;
  }

  #stickyGenerateBtn {
    min-width: 0;
    width: 100%;
  }
}

/* Data-hide-tool overrides */
[data-hide-tool="true"] .workspace {
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
}

[data-hide-tool="true"] .preview-pane,
[data-hide-tool="true"] .control-pane {
  display: none;
}

[data-hide-tool="true"] .content-band {
  margin-top: 0;
  padding-top: 24px;
  border-top: none;
}

/* ── Key facts ─────────────────────────────────────────────────────
   A scannable fact table directly under the hero. Rendered as a real <dl>
   so the key/value pairs survive text extraction as structured data. */
.key-facts {
  max-width: 1280px;
  margin: 20px auto 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.key-facts-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.key-facts dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 28px;
  margin: 0;
}

.key-fact dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 3px;
}

.key-fact dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

@media (max-width: 720px) {
  .key-facts {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .key-facts dl {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Visible freshness stamp — mirrors the schema dateModified. Recency is a
   retrieval input for answer engines, and a claim only carries weight if a
   reader can see the same date the markup asserts. */
.freshness-stamp {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.freshness-stamp a { color: var(--text-muted); text-decoration: underline; }
.freshness-stamp a:hover { color: var(--text); }

/* Glossary — definition list rendered as a readable two-column reference. */
.glossary-list { display: grid; gap: 18px; margin: 0; }
.glossary-list .key-fact dt {
  font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 4px;
  text-transform: none; letter-spacing: 0;
}
.glossary-list .key-fact dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-soft); }
@media (min-width: 900px) { .glossary-list { grid-template-columns: 1fr 1fr; gap: 20px 36px; } }

/* Article contents list — also provides the anchor targets an answer engine
   can deep-link to when citing a specific section. */
.article-toc { margin: 0; padding-left: 20px; }
.article-toc li { margin-bottom: 6px; line-height: 1.5; }
