/* ==========================================================================
   PeakQR (peakqr.com) — Pre-Press Optical Studio Design System
   Compliant with DESIGN.md & Modern Web Guidance (Dialog, Tabs, Table, Forms)
   ========================================================================== */

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  --surface-0: #F7F9FC;
  --surface-0: oklch(0.982 0.004 250);
  --surface-1: #FFFFFF;
  --surface-1: oklch(1.000 0 0);
  --surface-2: #EEF2F7;
  --surface-2: oklch(0.956 0.008 252);
  --surface-3: #E3EAF3;

  --border-subtle: #DCE3EE;
  --border-subtle: oklch(0.905 0.012 252);
  --border-strong: #BEC9DA;
  --border-strong: oklch(0.810 0.018 252);

  --ink-primary: #0B1220;
  --ink-primary: oklch(0.175 0.028 258);
  --ink-secondary: #3E4C63;
  --ink-secondary: oklch(0.415 0.024 256);
  --ink-muted: #64748B;
  --ink-muted: oklch(0.555 0.020 256);

  --accent: #1447E6;
  --accent: oklch(0.510 0.230 262);
  --accent-hover: #0F38BA;
  --accent-soft: #EBF1FF;
  --accent-border: #BFDBFE;

  --verified: #059669;
  --verified: oklch(0.595 0.155 162);
  --verified-soft: #ECFDF5;
  --verified-border: #A7F3D0;

  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --amber: #D97706;
  --amber-soft: #FFFBEB;

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 56px;
  --radius-outer: 20px;
  --radius-card: 12px;
  --radius-control: 10px;
  --shadow-workbench: 0 18px 44px -12px rgba(11, 18, 32, 0.09), 0 2px 6px rgba(11, 18, 32, 0.04);
  --shadow-card: 0 6px 20px -6px rgba(11, 18, 32, 0.06);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--surface-0);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.pq-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

.pq-mono, .pq-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.pq-hidden {
  display: none !important;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ==================== SECTION 1: 56px ZERO-LEAK HEADER ==================== */
.pq-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.pq-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pq-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink-primary);
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: -0.03em;
}

.pq-brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  letter-spacing: 0.02em;
}

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

.pq-lang-select {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
}

.pq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.pq-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="tab"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pq-btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border-color: var(--border-subtle);
  padding: 7px 12px;
  font-size: 0.83rem;
}

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

.pq-btn-sm-primary {
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 7px 13px;
  font-size: 0.83rem;
}

.pq-btn-sm-primary:hover {
  background: #1E293B;
}

.pq-btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(20, 71, 230, 0.24);
}

.pq-btn-primary:hover {
  background: var(--accent-hover);
}

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

.pq-btn-xl {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.02rem;
  border-radius: 12px;
}

/* ==================== SECTION 2: FOLD 1 HERO + 3-STEP WORKBENCH ==================== */
.pq-hero-section {
  padding-block: 18px 34px;
}

.pq-hero-top {
  text-align: center;
  margin-bottom: 16px;
}

.pq-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.04);
}

.pq-trust-stars {
  color: #F59E0B;
  font-weight: 800;
}

.pq-hero-h1 {
  margin: 0 auto 6px;
  font-size: clamp(1.52rem, 2.75vw, 2.32rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 34ch;
  color: var(--ink-primary);
}

.pq-hero-sub {
  margin: 0 auto;
  font-size: clamp(0.9rem, 1.3vw, 1.02rem);
  color: var(--ink-secondary);
  max-width: 62ch;
}

/* Proprietary ISO Finder-Eye Corner Brackets on Studio Stage */
.pq-workbench {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-workbench);
  padding: 16px;
}

.pq-finder-corners::before,
.pq-finder-corners::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.pq-finder-corners::before {
  top: -1px;
  left: -1px;
  border-top: 3px solid var(--accent);
  border-left: 3px solid var(--accent);
  border-top-left-radius: 6px;
}
.pq-finder-corners::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
  border-bottom-right-radius: 6px;
}

/* 3-Step Wizard Progress Strip */
.pq-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--surface-2);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.pq-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pq-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-primary);
  font-size: 0.74rem;
  font-weight: 800;
}

.pq-step-chip.is-active .pq-step-num {
  background: var(--accent);
  color: #FFFFFF;
}

.pq-step-chip.is-done .pq-step-num {
  background: var(--verified);
  color: #FFFFFF;
}

/* Single-Row Scrollable Tablist (Modern Web Guidance `tabs`) */
.pq-tablist {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  padding-bottom: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  --fade-size: 2rem;
  scroll-padding-inline: var(--fade-size);
}
.pq-tablist::-webkit-scrollbar {
  display: none;
}

.pq-tab {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 9px 9px 4px 4px;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.pq-tab:hover {
  background: var(--surface-3);
  color: var(--ink-primary);
}

/* Mandatory non-color-only 3px underline indicator from `aria-selected` */
.pq-tab[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.pq-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 4px -7px 4px;
  border-block-end: 3px solid var(--accent);
}

/* Split Workbench Grid */
.pq-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(310px, 0.82fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .pq-workbench-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .pq-steps-bar {
    font-size: 0.75rem;
  }
}

.pq-panel-box {
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 14px;
}

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

.pq-panel-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.pq-boost-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--verified-soft);
  color: var(--verified);
  border: 1px solid var(--verified-border);
  font-size: 0.73rem;
  font-weight: 800;
}

/* Dropzone & Inputs */
.pq-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-1);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pq-dropzone:hover,
.pq-dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pq-dropzone-title {
  display: block;
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--ink-primary);
  margin-top: 6px;
}

.pq-dropzone-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

.pq-uploaded-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--verified-soft);
  border: 1px solid var(--verified-border);
  color: #065F46;
  font-size: 0.85rem;
  font-weight: 700;
}

.pq-field {
  margin-bottom: 12px;
}
.pq-field:last-child {
  margin-bottom: 0;
}

.pq-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.pq-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.pq-input, .pq-select, .pq-textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.pq-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 560px) {
  .pq-grid-2 { grid-template-columns: 1fr; }
}

/* Validate Input After Interaction (`:user-invalid` + fallback) */
.pq-error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 5px;
}

:is(input:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger);
  background-color: var(--danger-soft);
}

:is(input:user-invalid, .user-invalid-fallback) + .pq-error-msg {
  display: block;
}

input:user-valid {
  border-color: var(--verified);
}

/* IKEA Customization Chips (Frames, Presets, Colors, Dots) */
.pq-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pq-chip {
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.pq-chip:hover {
  border-color: var(--border-strong);
}

.pq-chip[aria-pressed="true"] {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

.pq-swatch-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pq-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
  padding: 0;
}

.pq-swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2.5px var(--accent);
  transform: scale(1.08);
}

/* Right Column: Live iPhone Optical Viewfinder */
.pq-preview-stage {
  position: sticky;
  top: 72px;
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.pq-iphone-shell {
  width: 100%;
  max-width: 286px;
  margin: 0 auto 12px;
  background: #0F172A;
  border-radius: 34px;
  padding: 10px;
  box-shadow: 0 14px 32px rgba(11, 18, 32, 0.18);
}

.pq-iphone-screen {
  background: #FFFFFF;
  border-radius: 25px;
  padding: 12px 14px 14px;
  position: relative;
}

.pq-iphone-notch {
  width: 76px;
  height: 18px;
  border-radius: 999px;
  background: #0F172A;
  margin: 0 auto 10px;
}

.pq-viewfinder-wrap {
  position: relative;
  padding: 8px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1px dashed var(--border-strong);
}

#qr-preview-canvas {
  display: block;
  width: 100%;
  max-width: 224px;
  height: auto;
  margin: 0 auto;
  user-select: none;
  -webkit-touch-callout: none;
}

.pq-optical-gauge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--verified-soft);
  border: 1px solid var(--verified-border);
  color: #065F46;
  font-size: 0.72rem;
  font-weight: 700;
}

.pq-formats-caption {
  margin-top: 8px;
  font-size: 0.77rem;
  color: var(--ink-muted);
  font-weight: 600;
}

/* ==================== SECTION 3: COMMERCIAL PRINT TRUST STRIP ==================== */
.pq-trust-strip {
  padding-block: 20px;
  background: var(--surface-1);
  border-block: 1px solid var(--border-subtle);
}

.pq-trust-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pq-sector-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pq-sector-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

/* ==================== SECTION 4: RESPONSIVE COMPARISON TABLE ==================== */
.pq-section {
  padding-block: 52px;
}

.pq-section-alt {
  background: var(--surface-1);
  border-block: 1px solid var(--border-subtle);
}

.pq-section-head {
  text-align: center;
  margin-bottom: 30px;
}

.pq-section-h2 {
  margin: 0 auto 8px;
  font-size: clamp(1.38rem, 2.2vw, 1.88rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 38ch;
}

.pq-section-sub {
  margin: 0 auto;
  color: var(--ink-secondary);
  max-width: 60ch;
  font-size: 0.96rem;
}

/* Modern Web Guidance `responsive-table` */
.pq-table-wrap {
  overflow: auto;
  max-inline-size: 100%;
  container-type: inline-size;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.pq-cmp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  --label-2: "Free Amateur QR";
  --label-3: "PeakQR Dynamic Pro";
}

.pq-cmp-table caption {
  padding: 14px 18px;
  text-align: left;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--ink-muted);
  background: var(--surface-0);
  border-bottom: 1px solid var(--border-subtle);
}

.pq-cmp-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
}

.pq-cmp-table th,
.pq-cmp-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--surface-2);
  font-size: 0.92rem;
  vertical-align: top;
}

.pq-cmp-table thead th {
  background: var(--surface-2);
  font-weight: 800;
  color: var(--ink-primary);
}

.pq-cmp-table thead th:nth-child(3) {
  background: var(--accent-soft);
  color: var(--accent);
}

.pq-cmp-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--surface-1);
  font-weight: 700;
  color: var(--ink-primary);
}

.pq-cmp-bad {
  color: #991B1B;
}

.pq-cmp-good {
  background: #F8FAFF;
  color: #065F46;
  font-weight: 700;
}

@container (width < 600px) {
  .pq-cmp-table,
  .pq-cmp-table thead,
  .pq-cmp-table tbody,
  .pq-cmp-table tr,
  .pq-cmp-table th,
  .pq-cmp-table td {
    display: block;
  }
  .pq-cmp-table thead {
    display: none;
  }
  .pq-cmp-table tr {
    margin: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
  }
  .pq-cmp-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--surface-2);
  }
  .pq-cmp-table td:nth-child(2)::before {
    content: var(--label-2) ": ";
    font-weight: 800;
    color: var(--ink-primary);
  }
  .pq-cmp-table td:nth-child(3)::before {
    content: var(--label-3) ": ";
    font-weight: 800;
    color: var(--accent);
  }
}

/* ==================== SECTION 5: 4 CLICKABLE REAL-WORLD USE-CASE CARDS ==================== */
.pq-usecase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .pq-usecase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .pq-usecase-grid { grid-template-columns: 1fr; }
}

.pq-usecase-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  font-family: var(--font-sans);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.pq-usecase-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pq-usecase-art {
  width: 100%;
  height: 126px;
  border-radius: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-0);
  border: 1px solid var(--surface-2);
}

.pq-usecase-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin: 0 0 6px;
}

.pq-usecase-desc {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin: 0 0 14px;
}

.pq-usecase-cta {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent);
}

/* ==================== SECTION 6: B2B SOCIAL PROOF ==================== */
.pq-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 860px) {
  .pq-reviews-grid { grid-template-columns: 1fr; }
}

.pq-review-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.pq-review-quote {
  margin: 10px 0 16px;
  font-size: 0.93rem;
  color: var(--ink-primary);
  line-height: 1.55;
}

.pq-review-author {
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.pq-review-role {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ==================== SECTION 7: FAQ & COMPLIANCE FOOTER ==================== */
.pq-faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pq-faq-item {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 15px 18px;
}

.pq-faq-item summary {
  font-weight: 800;
  font-size: 0.96rem;
  cursor: pointer;
  color: var(--ink-primary);
}

.pq-faq-item p {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.pq-footer {
  background: #0B1220;
  color: #CBD5E1;
  padding-block: 38px 28px;
  font-size: 0.85rem;
}

.pq-footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pq-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pq-footer-links a {
  color: #CBD5E1;
  text-decoration: none;
  font-weight: 600;
}

.pq-footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* ==================== NATIVE MODAL DIALOGS (Modern Web Guidance `dialog`) ==================== */
dialog {
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 0;
  background: var(--surface-1);
  color: var(--ink-primary);
  width: min(94vw, 540px);
  max-height: 92dvh;
  box-shadow: 0 25px 60px rgba(11, 18, 32, 0.28);
}

/* MANDATORY: Prevent scroll chaining without mutating root overflow */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(11, 18, 32, 0.62);
  backdrop-filter: blur(3px);
}

.pq-modal-body {
  padding: 22px;
}

.pq-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pq-modal-close {
  background: var(--surface-2);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-secondary);
  cursor: pointer;
}

/* 3-Tier Paywall Selector */
.pq-tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.pq-tier-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--border-subtle);
  background: var(--surface-1);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--font-sans);
}

.pq-tier-card[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pq-tier-pop {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.66rem;
  font-weight: 800;
  margin-left: 6px;
}

.pq-bump-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--amber-soft);
  border: 1px dashed #F59E0B;
  margin-bottom: 12px;
  font-size: 0.81rem;
  cursor: pointer;
}

.pq-bump-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.pq-whop-box {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-0);
  margin-bottom: 12px;
  min-height: 155px;
}

.pq-rosca-note {
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-top: 10px;
  text-align: center;
}
