/* ==========================================================================
   ExecutiveOrder.ca v2 — Visual Art Direction & Interactive System
   Canada's Unofficial Office of Extremely Immediate Affairs
   ========================================================================== */

:root {
  --ink: #171717;
  --ink-light: #2b2b2b;
  --red: #b51e2e;
  --deep-red: #8d1422;
  --light-red: #fbf0f1;
  --paper: #f7f5ef;
  --paper-doc: #fffef9;
  --paper-card: #fdfcf7;
  --paper-darker: #e9e5dd;
  --rule: #d6d1c7;
  --rule-dark: #171717;
  --muted: #6e6b65;
  --border-focus: #1e70b7;
  --gold-accent: #c49a45;

  --font-ui: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Libre Baskerville", "Georgia", "Times New Roman", serif;
  --font-sig: "Caveat", "Yellowtail", cursive;
  --font-hand: "Caveat", cursive;
  --font-mono: "Courier New", Courier, monospace;

  --shadow-ink: 4px 4px 0 var(--ink);
  --shadow-ink-sm: 2px 2px 0 var(--ink);
  --shadow-ink-lg: 8px 8px 0 var(--ink);
  --shadow-doc: 14px 18px 0 rgba(23, 23, 23, 0.09), 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

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

body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  background-color: var(--paper);
  background-image: 
    radial-gradient(rgba(23, 23, 23, 0.06) 0.85px, transparent 0.85px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.015) 1px, transparent 1px);
  background-size: 8px 8px, 64px 64px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   Breaking News Satire Ticker (Top Bar)
   ========================================================================== */
.breaking-news-ticker {
  background: var(--ink);
  color: #fff;
  border-bottom: 2px solid var(--red);
  padding: 0.35rem 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  user-select: none;
}

.ticker-badge {
  background: var(--red);
  color: #fff;
  padding: 0.2rem 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 1rem;
  margin-right: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ticker-track {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.ticker-content {
  display: inline-block;
  padding-left: 100%;
  animation: tickerSlide 38s linear infinite;
}

.ticker-item {
  display: inline-block;
  margin-right: 3rem;
  color: #f7f5ef;
}

.ticker-item strong {
  color: var(--gold-accent);
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Typography Helpers */
.editorial-serif {
  font-family: var(--font-serif);
}

.mono-docket {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.rule-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.rule-label.red-label {
  color: var(--red);
}

.marginalia {
  font-family: var(--font-hand);
  color: var(--red);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
  display: inline-block;
}

.marginalia.tilt-left { transform: rotate(-3.5deg); }
.marginalia.tilt-right { transform: rotate(3deg); }
.marginalia.tilt-slight { transform: rotate(-1.5deg); }

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.container-narrow {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-wide {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 239, 0.96);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  max-width: 1360px;
  margin: 0 auto;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-wordmark {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: flex;
  align-items: center;
}

.brand-wordmark .maple-dot {
  color: var(--red);
}

.brand-subtext {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.1rem;
  transition: color 0.18s ease;
}

.nav-link:hover, .nav-link:focus-visible {
  color: var(--red);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Bilingual Language Toggle */
.lang-toggle-btn {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-ink-sm);
  transition: all 0.15s ease;
}

.lang-toggle-btn:hover {
  background: var(--ink);
  color: #fff;
}

/* Sound Pack Selector */
.sound-picker-wrap {
  display: flex;
  align-items: center;
}

.sound-select-dropdown {
  background: #fff;
  border: 1.5px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  outline: none;
  cursor: pointer;
}

.icon-btn {
  background: transparent;
  border: 1.5px solid var(--rule);
  color: var(--ink);
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
  background: rgba(0,0,0,0.03);
}

.icon-btn[aria-pressed="true"] {
  border-color: var(--red);
  color: var(--red);
  background: var(--light-red);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  line-height: 1.2;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink) !important;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-ink);
}

.btn-primary:hover {
  background: var(--deep-red);
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: var(--shadow-ink-sm);
}

.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-ink-sm);
}

.btn-secondary:hover {
  background: var(--paper-darker);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 3rem 0 2.5rem 0;
  border-bottom: 2px solid var(--ink);
  background-image: 
    linear-gradient(rgba(23, 23, 23, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  max-width: 620px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light-red);
  border: 1.5px solid var(--red);
  padding: 0.35rem 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-eyebrow-badge span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.25rem 0;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #383632;
  margin: 0 0 1.5rem 0;
}

.hero-subtitle strong {
  color: var(--ink);
}

.hero-disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.75);
  border-left: 4px solid var(--red);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero-visual-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-main-svg {
  width: 100%;
  max-width: 620px;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.12));
}

/* Bureaucratic Dividers */
.bureaucratic-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
  position: relative;
}

.bureaucratic-divider::before,
.bureaucratic-divider::after {
  content: "";
  flex: 1;
  border-bottom: 2px dashed var(--rule);
}

.divider-badge {
  background: var(--paper-darker);
  border: 1.5px solid var(--ink);
  padding: 0.35rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Generator Workstation ("Intake Desk")
   ========================================================================== */
.generator-section {
  padding: 3.5rem 0;
  position: relative;
}

.section-intro {
  margin-bottom: 2rem;
  position: relative;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.generator-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}

.form-panel {
  background: var(--paper-card);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-ink);
  padding: 2rem;
  position: relative;
}

.panel-paperclip-tag {
  position: absolute;
  top: -18px;
  right: 28px;
  width: 32px;
  height: 42px;
  z-index: 10;
}

.form-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

/* One-Tap Inspiration Quick Pills */
.inspiration-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0,0,0,0.025);
  border: 1px dashed var(--rule);
}

.insp-pill-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.2rem;
}

.insp-pill {
  background: #fff;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.insp-pill:hover {
  border-color: var(--red);
  background: var(--light-red);
  color: var(--red);
}

/* Rename Device (Before ➔ After) */
.rename-visual-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--paper-darker);
  border: 1.5px solid var(--ink);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.rename-box-col {
  flex: 1;
}

.rename-box-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.rename-box-tag.red-tag {
  color: var(--red);
}

.rename-box-val {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.rename-arrow-svg {
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 1.4rem;
  position: relative;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.field-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.field-label .required-star {
  color: var(--red);
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.input-field {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--rule);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  border-radius: 0;
  -webkit-appearance: none;
}

.input-field:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 3px 3px 0 rgba(23,23,23,0.1);
}

.input-field.field-error {
  border-color: var(--red);
  background: var(--light-red);
}

.field-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.field-inline-btn-group {
  display: flex;
  gap: 0.5rem;
}

.field-inline-btn-group .input-field {
  flex: 1;
}

/* Collapsible Advanced */
.advanced-details {
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.5rem;
}

.advanced-summary {
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  color: var(--ink);
}

.advanced-summary::-webkit-details-marker { display: none; }
.advanced-summary::after { content: "+"; font-size: 1.2rem; font-weight: 700; color: var(--red); }
details[open] .advanced-summary::after { content: "−"; }
details[open] .advanced-summary { border-bottom: 1px solid var(--rule); background: rgba(0,0,0,0.02); }
.advanced-body { padding: 1.25rem 1rem; }

/* Signature Controls */
.signature-section-wrapper {
  border-top: 2px dashed var(--rule);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  position: relative;
}

.signature-pen-icon {
  width: 32px;
  height: 28px;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.signature-pen-icon.pen-wiggle {
  animation: penWiggleMotion 0.25s ease-in-out;
}

@keyframes penWiggleMotion {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(15deg) translateY(-3px); }
  100% { transform: rotate(0deg); }
}

.sig-tab-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sig-tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1.5px solid var(--rule);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sig-tab-btn.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.signature-mode-box {
  background: #fff;
  border: 1.5px solid var(--ink);
  padding: 1rem;
  position: relative;
}

.sig-preview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: var(--paper-doc);
  border: 1px dashed var(--rule);
  padding: 0.75rem;
  position: relative;
}

.sig-text-display {
  font-family: var(--font-sig);
  font-size: 2.2rem;
  line-height: 1.1;
  color: var(--ink);
  text-align: center;
  user-select: none;
  transform: rotate(-2deg);
}

.sig-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  gap: 0.5rem;
}

.draw-canvas-container {
  position: relative;
  width: 100%;
  background: #fffef8;
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.draw-canvas {
  width: 100%;
  height: 120px;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.canvas-baseline {
  position: absolute;
  bottom: 25px;
  left: 20px;
  right: 20px;
  height: 1px;
  border-bottom: 1px dashed rgba(23,23,23,0.3);
  pointer-events: none;
}

.canvas-guide-arrow {
  position: absolute;
  bottom: 10px;
  right: 18px;
  font-family: var(--font-hand);
  color: var(--muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.draw-hint {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.form-submit-row {
  margin-top: 2rem;
}

.btn-make-official {
  width: 100%;
  font-size: 1.15rem;
  padding: 1.1rem;
}

.privacy-notice-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--muted);
  justify-content: center;
}

/* ==========================================================================
   Live Document Preview & Interactive Stamp Palette
   ========================================================================== */
.preview-panel-sticky {
  position: sticky;
  top: 5rem;
  z-index: 10;
}

.preview-status-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.odometer-badge {
  background: var(--paper-darker);
  border: 1px solid var(--rule);
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-tag {
  background: var(--ink);
  color: #fff;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
}

.status-tag.is-official {
  background: var(--red);
}

/* Interactive Stamp Dropper Bar */
.interactive-stamp-palette {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  padding: 0.4rem 0.6rem;
  background: #fff;
  border: 1px dashed var(--rule);
  font-size: 0.68rem;
  font-weight: 700;
}

.stamp-palette-btn {
  background: var(--light-red);
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stamp-palette-btn:hover {
  background: var(--red);
  color: #fff;
}

/* Document Container */
.executive-order-doc {
  background-color: var(--paper-doc);
  background-image: 
    linear-gradient(90deg, rgba(181,30,46,0.02) 1px, transparent 1px),
    linear-gradient(rgba(23,23,23,0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-doc);
  padding: 2.25rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-inner-border {
  border: 1px solid rgba(23, 23, 23, 0.4);
  padding: 1.75rem;
  position: relative;
}

.doc-watermark-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  opacity: 0.045;
  pointer-events: none;
  z-index: 1;
}

.doc-empty-state-note {
  position: absolute;
  top: 45%;
  right: 18px;
  background: rgba(251, 240, 241, 0.95);
  border: 1.5px dashed var(--red);
  padding: 0.45rem 0.75rem;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--red);
  transform: rotate(4deg);
  z-index: 20;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.doc-empty-state-note.is-hidden {
  opacity: 0;
  transform: scale(0.9) rotate(0deg);
}

.doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1.25rem;
  position: relative;
  z-index: 2;
}

.doc-header-text { flex: 1; }

.doc-office-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.doc-main-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.25rem 0 0.2rem 0;
  color: var(--ink);
  line-height: 1.2;
}

.doc-subhead-warning {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0;
}

.parody-seal-vector {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
}

.doc-docket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.doc-docket-number { color: var(--ink); }
.doc-date { color: var(--muted); }

.doc-subject-banner {
  background: var(--light-red);
  border-left: 4px solid var(--red);
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.doc-subject-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.2rem;
}

.doc-subject-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.doc-subject-text .rename-arrow {
  color: var(--red);
  margin: 0 0.35rem;
}

.doc-body-sections {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #242424;
  position: relative;
  z-index: 2;
}

.doc-clause-p { margin-bottom: 1.1rem; }
.doc-section-head { font-weight: 700; color: var(--ink); }
.doc-highlight-name { font-weight: 700; text-decoration: underline; text-decoration-color: rgba(181, 30, 46, 0.4); text-underline-offset: 3px; }

.doc-signature-block {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.doc-sig-left { flex: 1; max-width: 260px; }

.doc-rendered-signature {
  min-height: 52px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0.25rem;
}

.doc-sig-image { max-height: 54px; max-width: 220px; object-fit: contain; }
.doc-sig-text { font-family: var(--font-sig); font-size: 2.1rem; line-height: 0.9; color: var(--ink); transform: rotate(-2deg); }

.doc-signer-line { border-top: 1px solid var(--ink); padding-top: 0.35rem; }
.doc-signer-name { font-family: var(--font-ui); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink); line-height: 1.2; }
.doc-signer-title { font-family: var(--font-serif); font-size: 0.72rem; font-style: italic; color: var(--muted); line-height: 1.3; }

.doc-official-stamp-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.doc-official-stamp {
  border: 3px double var(--red);
  color: var(--red);
  padding: 0.4rem 0.75rem;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  line-height: 1.15;
  transform: rotate(-10deg);
  user-select: none;
  background: rgba(251, 240, 241, 0.6);
  box-shadow: 0 0 0 1px rgba(181, 30, 46, 0.2);
}

.doc-secondary-stamp {
  border: 2px solid var(--deep-red);
  color: var(--deep-red);
  padding: 0.2rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(6deg);
  background: rgba(255,255,255,0.7);
}

/* Bureaucracy & Implementation Cost Calculator Card */
.bureaucracy-cost-card {
  margin-top: 1rem;
  background: var(--paper-darker);
  border: 1px solid var(--rule);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cost-stat-item {
  display: flex;
  flex-direction: column;
}

.cost-stat-label {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.cost-stat-val {
  font-weight: 700;
  color: var(--ink);
}

/* Post-Generation Action Panel */
.action-dispatch-panel {
  background: var(--ink);
  color: #fff;
  padding: 1.75rem;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-ink);
  margin-top: 1.5rem;
  display: none;
}

.action-dispatch-panel.is-visible {
  display: block;
  animation: slide-fade-up 0.35s ease both;
}

@keyframes slide-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.dispatch-header {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.dispatch-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: #fff;
}

.dispatch-subtitle {
  font-size: 0.78rem;
  color: #ccc;
  margin: 0;
}

.format-selector-row {
  margin-bottom: 1.25rem;
}

.format-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 0.4rem;
  display: block;
}

.format-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.format-pill-btn {
  flex: 1;
  min-width: 110px;
  background: #2b2b2b;
  border: 1px solid #444;
  color: #eee;
  padding: 0.45rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.format-pill-btn:hover { background: #3a3a3a; }
.format-pill-btn.is-selected { background: var(--red); border-color: var(--red); color: #fff; }

.dispatch-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn-share-hero {
  grid-column: 1 / -1;
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #000;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-share-hero:hover {
  background: var(--deep-red);
  transform: translate(1px, 1px);
}

.btn-share-subtext {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}

.btn-download-instagram {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #b51e2e 0%, #8d1422 100%);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
  font-size: 1.02rem;
  padding: 0.85rem 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-download-instagram:hover {
  background: #8d1422;
  transform: translate(1px, 1px);
}

.btn-download-square {
  background: #2563eb !important;
  color: #fff !important;
  border: 1.5px solid #fff !important;
  font-weight: 800 !important;
}

.btn-download-square:hover {
  background: #1d4ed8 !important;
}

.btn-download-primary {
  grid-column: 1 / -1;
  background: #2563eb;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-download-primary:hover {
  background: #1d4ed8;
}

.btn-print-highlight {
  background: var(--paper-doc) !important;
  color: var(--ink) !important;
  border: 1.5px solid #fff !important;
  font-weight: 800 !important;
}

.btn-print-highlight:hover {
  background: #fff !important;
  color: var(--ink) !important;
}

.btn-share-highlight {
  background: var(--red) !important;
  color: #fff !important;
  border: 1.5px solid #fff !important;
}

.btn-share-highlight:hover {
  background: var(--deep-red) !important;
}

.btn-social-wa {
  background: #128c7e !important;
  border-color: #128c7e !important;
  color: #fff !important;
}

.btn-social-wa:hover {
  background: #075e54 !important;
}

.btn-social-tw {
  background: #1da1f2 !important;
  border-color: #1da1f2 !important;
  color: #fff !important;
}

.btn-social-tw:hover {
  background: #0c85d0 !important;
}

.btn-social-fb {
  background: #1877f2 !important;
  border-color: #1877f2 !important;
  color: #fff !important;
}

.btn-social-fb:hover {
  background: #0d65d9 !important;
}

.dispatch-secondary-btn {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dispatch-secondary-btn:hover { background: #3e3e3e; border-color: #666; }

/* Floating Mobile Jump-to-Decree Peek Button */
.mobile-peek-pill {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-peek-pill {
    display: inline-flex;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: #fff;
    border: 2px solid var(--red);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    padding: 0.65rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    border-radius: 50px;
    z-index: 99;
    cursor: pointer;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
  }

  .mobile-peek-pill:active {
    transform: translateX(-50%) scale(0.95);
  }
}

.btn-reset-order {
  width: 100%;
  margin-top: 0.75rem;
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.4);
  color: #bbb;
  font-size: 0.75rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-reset-order:hover { color: #fff; border-color: #fff; }

/* Quick Action Strip above Document (Always visible on Desktop once generated) */
.quick-action-strip {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.quick-action-strip .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

/* Idea Starters */
.starters-section {
  padding: 4rem 0;
  background: var(--paper-darker);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.category-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.75rem 0;
}

.category-chip {
  background: var(--paper-doc);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: var(--shadow-ink-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.category-chip .cat-icon { width: 16px; height: 16px; flex-shrink: 0; }
.category-chip:hover { background: var(--ink); color: #fff; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.category-chip.is-active { background: var(--red); color: #fff; border-color: var(--ink); }

.preset-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.preset-card {
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  padding: 1.25rem;
  box-shadow: var(--shadow-ink-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.preset-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-ink); }
.preset-category-tag { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-bottom: 0.5rem; }
.preset-from-to { margin-bottom: 1rem; }
.preset-from { font-size: 0.85rem; color: var(--muted); text-decoration: line-through; }
.preset-to { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; color: var(--ink); line-height: 1.3; margin-top: 0.2rem; }
.preset-reason { font-size: 0.78rem; color: #4a4742; font-style: italic; margin-bottom: 1.2rem; line-height: 1.45; }

/* Recent Orders */
.recent-orders-section {
  padding: 4rem 0;
  border-bottom: 2px solid var(--ink);
}

.recent-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.recent-order-card {
  background: var(--paper-doc);
  border: 1.5px solid var(--ink);
  padding: 1.1rem;
  box-shadow: var(--shadow-ink-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recent-order-docket { font-size: 0.7rem; font-weight: 700; color: var(--muted); margin-bottom: 0.4rem; }
.recent-order-from-to { margin-bottom: 0.75rem; }
.recent-order-from { font-size: 0.8rem; color: var(--muted); text-decoration: line-through; }
.recent-order-to { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-top: 0.15rem; }
.recent-order-meta { font-size: 0.72rem; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 0.85rem; }
.recent-card-actions { display: flex; gap: 0.5rem; }
.recent-btn-load { flex: 1; font-size: 0.72rem; padding: 0.35rem 0.5rem; }
.recent-btn-del { font-size: 0.72rem; padding: 0.35rem 0.5rem; color: var(--muted); border-color: #ccc; }
.recent-btn-del:hover { color: var(--red); border-color: var(--red); }
.empty-history-note { font-size: 0.9rem; color: var(--muted); font-style: italic; }

/* How It Works */
.how-it-works-section {
  padding: 4.5rem 0;
  background: var(--paper-doc);
  border-bottom: 2px solid var(--ink);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step-card {
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  padding: 1.5rem;
  box-shadow: var(--shadow-ink-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}

.step-illustration-box {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-illustration-box img {
  max-width: 75px;
  max-height: 75px;
  object-fit: contain;
}

.step-number {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-copy {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #4a4742;
}

/* About / Satire Section */
.about-section {
  padding: 4.5rem 0;
  background: var(--paper-darker);
  border-bottom: 2px solid var(--ink);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.satire-statement-box {
  background: var(--paper-card);
  border: 2px solid var(--red);
  padding: 1.75rem;
  box-shadow: var(--shadow-ink);
  position: relative;
}

.satire-box-paperclip {
  position: absolute;
  top: -14px;
  right: 24px;
  width: 22px;
  height: 28px;
}

.satire-title {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.satire-text {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 0.8rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 3.5rem 0 2rem 0;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  max-width: 450px;
}

.footer-wordmark {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.footer-descriptor {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #bbb;
}

.footer-legal-bar {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.72rem;
  color: #888;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-message {
  background: var(--ink);
  color: #fff;
  border-left: 4px solid var(--red);
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-message.toast-show { transform: translateY(0); opacity: 1; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .generator-grid { grid-template-columns: 1fr; gap: 2rem; }
  .preview-panel-sticky { position: static; order: 2; }
  .form-panel { order: 1; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .site-shell, main, .site-header, .hero-section, .generator-section, .starters-section, .recent-orders-section, .how-it-works-section, .about-section, .site-footer {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .container-wide, .container-narrow {
    padding: 0 0.75rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Header & Navigation Fix — Guaranteed Clean Left/Right Spacing */
  .site-header {
    padding: 0;
    width: 100%;
    overflow: hidden;
  }

  .nav-container {
    padding: 0.45rem 0.75rem;
    gap: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  .brand-wrapper {
    gap: 0.35rem;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }

  .brand-logo-mark {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .brand-wordmark {
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-subtext {
    display: none;
  }

  .nav-menu {
    display: none;
  }

  .nav-actions {
    gap: 0.35rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .nav-actions #nav-btn-create {
    display: none;
  }

  .lang-toggle-btn {
    padding: 0.28rem 0.5rem;
    font-size: 0.65rem;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 2px 2px 0 var(--ink);
  }

  /* Breaking News Ticker */
  .breaking-news-ticker {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    font-size: 0.68rem;
  }

  .ticker-badge {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.6rem;
  }

  /* Form & Rename Device */
  .hero-section { padding: 2rem 0; }
  .form-panel {
    padding: 1.1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .rename-visual-device {
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
    width: 100%;
    box-sizing: border-box;
  }

  .rename-arrow-svg {
    width: 32px;
    height: 18px;
  }

  .rename-box-val {
    font-size: 0.82rem;
    word-break: break-word;
  }

  .inspiration-pills-wrap {
    gap: 0.3rem;
    padding: 0.5rem;
  }

  .insp-pill {
    padding: 0.2rem 0.4rem;
    font-size: 0.68rem;
  }

  .interactive-stamp-palette {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .stamp-palette-btn {
    padding: 0.2rem 0.35rem;
    font-size: 0.58rem;
  }

  /* Document Preview */
  .executive-order-doc {
    padding: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .doc-inner-border {
    padding: 0.75rem !important;
  }

  .doc-header {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .parody-seal-vector {
    width: 55px;
    height: 55px;
  }

  .doc-signature-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .doc-official-stamp-container {
    width: 100%;
    align-items: flex-start;
  }

  .dispatch-streamlined-grid { grid-template-columns: 1fr; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
}

@media (max-width: 360px) {
  .input-field { font-size: 16px; padding: 0.6rem 0.75rem; }
  .hero-title { font-size: 1.85rem; }
  .btn-lg { padding: 0.85rem 1.25rem; font-size: 0.95rem; }
  .brand-wordmark { font-size: 0.82rem; }
}

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

.stamp-palette-btn.is-active-stamp {
  background: var(--red) !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px var(--ink) !important;
  transform: scale(1.05);
}

@page {
  size: portrait;
  margin: 8mm 10mm;
}

@media print {
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #ffffff !important;
    color: #171717 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .site-shell, main, .generator-section, .container-wide, .generator-grid, .preview-panel-sticky {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    position: static !important;
  }

  /* Explicitly hide EVERYTHING except the document */
  .breaking-news-ticker,
  .site-header,
  .hero-section,
  .section-intro,
  .form-panel,
  .action-dispatch-panel,
  .starters-section,
  .recent-orders-section,
  .how-it-works-section,
  .about-section,
  .site-footer,
  .toast-container,
  .preview-status-ribbon,
  .interactive-stamp-palette,
  .bureaucratic-divider,
  .bureaucracy-cost-card,
  .marginalia,
  .doc-empty-state-note,
  .inspiration-pills-wrap,
  .no-print {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Clean, crisp single-page decree certificate matching PNG export */
  .executive-order-doc {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 190mm !important;
    min-height: 250mm !important;
    margin: 0 auto !important;
    padding: 1.4rem 1.6rem !important;
    background: #fffef9 !important;
    border: 2px solid #171717 !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
    break-inside: avoid !important;
    position: relative !important;
  }

  .doc-inner-border {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex: 1 !important;
    border: 1px solid rgba(23, 23, 23, 0.4) !important;
    padding: 1.2rem 1.4rem !important;
  }

  .doc-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 2px solid #171717 !important;
  }

  .doc-office-label {
    color: #6e6b65 !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
  }

  .doc-main-title {
    color: #171717 !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
  }

  .doc-subhead-warning {
    color: #b51e2e !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
  }

  .parody-seal-vector {
    width: 76px !important;
    height: 76px !important;
    display: block !important;
  }

  .doc-docket-row {
    margin: 0.6rem 0 !important;
    padding-bottom: 0.4rem !important;
    font-size: 0.72rem !important;
    display: flex !important;
    justify-content: space-between !important;
    border-bottom: 1px solid #d6d1c7 !important;
  }

  .doc-subject-banner {
    background: #fbf0f1 !important;
    border-left: 4px solid #b51e2e !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.9rem !important;
  }

  .doc-subject-label {
    color: #b51e2e !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
  }

  .doc-subject-text {
    font-size: 1.15rem !important;
    color: #171717 !important;
    font-weight: 700 !important;
  }

  .rename-arrow {
    color: #b51e2e !important;
  }

  .doc-body-sections {
    font-size: 0.95rem !important;
    line-height: 1.58 !important;
    color: #242424 !important;
    margin: 0.4rem 0 !important;
  }

  .doc-clause-p {
    margin-bottom: 0.8rem !important;
  }

  .doc-section-head {
    color: #171717 !important;
    font-weight: 700 !important;
  }

  .doc-highlight-name {
    color: #b51e2e !important;
    font-weight: 700 !important;
  }

  .doc-signature-block {
    margin-top: auto !important;
    padding-top: 1rem !important;
    border-top: 1px solid #d6d1c7 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
  }

  .doc-signer-name {
    color: #171717 !important;
    font-weight: 800 !important;
  }

  .doc-signer-title {
    color: #6e6b65 !important;
    font-style: italic !important;
  }

  .doc-official-stamp {
    border: 2.5px double #b51e2e !important;
    color: #b51e2e !important;
    background: #fbf0f1 !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    padding: 0.4rem 0.7rem !important;
    transform: rotate(-4deg) !important;
    display: inline-block !important;
  }

  .doc-secondary-stamp {
    border: 1.5px solid #8d1422 !important;
    color: #8d1422 !important;
    background: #ffffff !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    padding: 0.2rem 0.5rem !important;
    transform: rotate(3deg) !important;
    display: inline-block !important;
  }

  .doc-footer-legal {
    margin-top: 1rem !important;
    padding-top: 0.5rem !important;
    font-size: 0.65rem !important;
    color: #6e6b65 !important;
    border-top: 1px solid #171717 !important;
    text-align: center !important;
  }
}
