/* Grace Tribute — Warm Heirloom Editorial Stationery Design System (v2) */

:root {
  --bg: #F8F5EE;
  --surface: #FFFFFF;
  --surface-soft: #F2EDE3;
  --ink: #231F1B;
  --muted: #585047;
  --accent: #7A5C35;
  --accent-dark: #5C4323;
  --sage: #445C48;
  --border: #DFD5C3;
  --input-border: #8F8473;
  --danger: #9B3A32;
  --radius: 10px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/eb-garamond-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/lora-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/great-vibes-latin-400-normal.woff2') format('woff2');
}
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/cormorant-garamond-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/cormorant-garamond-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/cormorant-garamond-latin-ext-400-italic.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/cormorant-garamond-vietnamese-400-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/cormorant-garamond-vietnamese-600-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/cormorant-garamond-vietnamese-400-italic.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-latin-ext-400-italic.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/eb-garamond-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-vietnamese-400-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-vietnamese-400-italic.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/eb-garamond-vietnamese-600-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/lora-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/lora-latin-ext-400-italic.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/lora-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/lora-vietnamese-400-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/lora-vietnamese-400-italic.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/lora-vietnamese-600-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; scroll-padding-top: 92px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }

a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Mobile Drawer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 245, 238, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 14px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: lining-nums proportional-nums;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: #FBF9F4;
}
.header-mobile-actions {
  display: none;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.header-mobile-actions .btn-sm {
  white-space: nowrap;
  padding: 0 11px;
  font-size: 0.76rem;
  min-height: 36px;
}
.mobile-menu-btn {
  min-height: 36px;
  min-width: 44px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.mobile-nav-drawer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 20px 18px;
}
.mobile-nav-drawer a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-soft);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.mobile-nav-drawer a:last-child { border-bottom: none; }

/* Footer */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 44px 0 36px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}
.footer-grid h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 10px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* Typography & Buttons */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
h1, h2, h3, .price-tag {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: lining-nums proportional-nums;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); margin: 0 0 12px; }
h3 { font-size: 1.25rem; margin: 0 0 8px; }
.muted { color: var(--muted); }
.lead { font-size: 1.04rem; color: var(--muted); max-width: 650px; margin: 0 0 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #FBF9F4; }
.btn-primary:hover { background: #3A332C; color: #FBF9F4; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--input-border); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-accent { background: var(--accent); color: #FFFFFF; }
.btn-accent:hover { background: var(--accent-dark); color: #FFFFFF; }
.btn-danger { background: transparent; color: var(--danger); border-color: #E5C2BF; }
.btn-danger:hover { background: #FDF2F1; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.8rem; }
.btn[disabled] { opacity: 0.52; cursor: not-allowed; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Transparency Fact Strip */
.fact-strip {
  margin: 18px 0 0;
  padding: 12px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}
.fact-strip strong { color: var(--ink); }

/* Editorial Split Hero */
.hero { padding: 44px 0 36px; }
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.96fr);
  gap: 36px;
  align-items: center;
}
.hero-visual {
  position: relative;
  padding: 18px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-fan {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-fan-card {
  position: absolute;
  width: 188px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #D9CFC0;
  box-shadow: 0 14px 36px rgba(35, 31, 27, 0.16);
  background: #FFFFFF;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-fan-card img { display: block; width: 100%; height: auto; }
.hero-fan-card.left { transform: translate(-112px, 16px) rotate(-6deg); z-index: 1; }
.hero-fan-card.right { transform: translate(112px, 20px) rotate(6deg); z-index: 1; }
.hero-fan-card.center { width: 212px; transform: translate(0, -8px); z-index: 2; }
.hero-fan-card.center:hover { transform: translate(0, -14px); box-shadow: 0 20px 44px rgba(35, 31, 27, 0.22); }
.hero-fan-card.left:hover { transform: translate(-118px, 8px) rotate(-7deg); z-index: 3; }
.hero-fan-card.right:hover { transform: translate(118px, 10px) rotate(7deg); z-index: 3; }
.hero-fan-caption {
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
}

.section { padding: 44px 0; }
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Filterable Real 8-Sample Gallery */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 22px;
}
.filter-pill {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-pill:hover { border-color: var(--accent); color: var(--ink); }
.filter-pill.active { background: var(--ink); border-color: var(--ink); color: #FBF9F4; }

.sample-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.sample-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sample-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(35, 31, 27, 0.08);
}
.sample-thumb-btn {
  display: block;
  width: 100%;
  border: 0;
  padding: 14px;
  background: #EFEAE0;
  cursor: pointer;
  position: relative;
}
.sample-thumb-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 5.5 / 8.5;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(35, 31, 27, 0.14);
  background: #FFFFFF;
}
.sample-thumb-badge {
  position: absolute;
  bottom: 22px;
  right: 22px;
  background: rgba(35, 31, 27, 0.84);
  color: #FBF9F4;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.sample-card-body {
  padding: 14px 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.sample-card-tag {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.sample-card-body h3 {
  font-size: 1.12rem;
  margin: 0;
  line-height: 1.2;
}
.sample-card-body p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.45;
}
.sample-card-actions {
  margin-top: auto;
  padding-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sample-card-actions .btn { padding: 0 8px; font-size: 0.75rem; min-height: 36px; }
.gallery-footnote {
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
}
.show-all-samples-wrap {
  display: none;
  margin-top: 16px;
  text-align: center;
}
.hero-cta-sub {
  margin: 10px 0 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
}
.hero-obit-link {
  margin: 10px 0 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
}

/* GEO Factual Comparison Table */
.geo-fact-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
}
.geo-fact-table th,
.geo-fact-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.geo-fact-table th {
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
}
.geo-fact-table tbody tr:first-child td {
  background: #FAF6EE;
}

/* 4-Page Sample Viewer Modal */
.sample-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24, 21, 18, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sample-modal-backdrop[hidden] { display: none; }
.sample-modal-dialog {
  width: 100%;
  max-width: 960px;
  max-height: 92dvh;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.sample-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sample-modal-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sample-modal-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.sample-modal-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14px 48px;
  background: #E8E2D7;
}
.sample-modal-pages {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
  margin: auto;
  max-width: 100%;
}
.svm-sheet {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.svm-sheet img {
  max-height: 54dvh;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(35, 31, 27, 0.22);
  background: #FFFFFF;
}
.sample-modal-pages.is-spread .svm-sheet img {
  max-width: 390px;
  max-height: 52dvh;
}
.svm-sheet figcaption {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--muted);
}
.stage-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.stage-arrow.prev { left: 10px; }
.stage-arrow.next { right: 10px; }
.sample-modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.check-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 0.87rem;
}
.check-list li::before {
  content: "✓";
  color: var(--sage);
  font-weight: 700;
  margin-right: 10px;
}

/* Pricing Box */
.price-box {
  max-width: 640px;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px;
}
.price-tag {
  font-size: 2.75rem;
  line-height: 1;
}
.price-sub {
  font-family: var(--font-ui);
  font-size: 0.84rem;
  color: var(--muted);
  margin-left: 8px;
}

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-top: 18px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.faq-item p { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }

/* Forms */
label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field { margin-bottom: 15px; }
.field-hint {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 4px;
}
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.94rem;
}
textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.alert {
  padding: 13px 15px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  margin-bottom: 15px;
}
.alert-warn { background: #FFF8EB; border: 1px solid #E2BE79; color: #5D3E0D; }
.alert-error { background: #FDF2F1; border: 1px solid #E2A9A3; color: var(--danger); }
.alert-ok { background: #EFF6F0; border: 1px solid #A9CCA9; color: #224627; }

/* Editor Layout (Zero horizontal overflow at any viewport!) */
.editor-banner {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
}
.editor-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.editor-banner strong { color: var(--ink); }
.save-pill {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--sage);
  white-space: nowrap;
}
.save-pill.is-error { color: var(--danger); }

.editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 24px;
  padding: 20px 20px 72px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.editor-shell > * { min-width: 0; }
#editor-step-body h2 { scroll-margin-top: 98px; }
.step-tabs { scroll-margin-top: 96px; }

/* Accessible 44px touch switch (used for cross emblem toggle) */
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.switch-pill {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #CFC7BA;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.switch-pill span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.switch-pill.is-on { background: var(--ink); }
.switch-pill.is-on span { transform: translateX(16px); }
.preset-picker-row select { flex: 1 1 220px; min-width: 0; }
.share-link-out {
  margin-top: 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.preview-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

/* 6-column non-scrolling step bar on desktop */
.step-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 18px;
}
.step-tab {
  min-height: 44px;
  padding: 5px 4px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  text-align: center;
}
.step-tab .step-num {
  font-size: 0.65rem;
  opacity: 0.75;
}
.step-tab.active {
  background: var(--ink);
  color: #FBF9F4;
  border-color: var(--ink);
}
.step-tab.is-done {
  border-color: var(--sage);
  color: var(--ink);
}

/* Template visual picker inside Step 1 */
.tpl-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.tpl-pick-card {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.tpl-pick-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(35, 31, 27, 0.08);
}
.tpl-pick-card img {
  width: 100%;
  aspect-ratio: 5.5 / 8.5;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #EAE2D4;
  background: #FFFFFF;
}
.tpl-pick-badge {
  position: absolute;
  top: 13px;
  right: 13px;
  background: var(--ink);
  color: #FBF9F4;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}
.tpl-pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.tpl-swatches {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.tpl-swatch-mini {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
}
.tpl-pick-card .tpl-name { font-size: 0.76rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.tpl-pick-card .tpl-sub {
  font-size: 0.67rem;
  color: var(--muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tpl-pick-card.active {
  border-color: var(--ink);
  background: #FAF6EE;
  box-shadow: 0 0 0 1px var(--ink), 0 8px 18px rgba(35, 31, 27, 0.09);
}

.palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.palette-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.palette-chip.active { border-color: var(--ink); background: var(--ink); color: #FBF9F4; }
.palette-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Styled Photo Dropzone & Crop Controls */
.photo-dropzone {
  border: 1.5px dashed var(--input-border);
  border-radius: 10px;
  padding: 20px 16px;
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.photo-dropzone:hover, .photo-dropzone.is-drag {
  border-color: var(--accent);
  background: #F4EFE4;
}
.photo-dropzone input[type="file"] { display: none; }
.crop-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}
.crop-preview-frame {
  position: relative;
  width: 184px;
  aspect-ratio: 4 / 5;
  margin: 0 auto 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  box-shadow: 0 6px 16px rgba(35, 31, 27, 0.1);
}
.crop-preview-frame.is-draggable {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.crop-preview-frame.is-dragging {
  cursor: grabbing;
  border-color: var(--accent);
}
.crop-preview-frame img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.crop-drag-hint {
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  background: rgba(35, 31, 27, 0.74);
  color: #FBF9F4;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

/* Step 3 Live Page-2 Fit Meter & Step 5 Quick Presets */
.fit-meter {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 0.76rem;
}
.fit-meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.fit-meter-status { font-weight: 700; color: var(--sage); }
.fit-meter.is-tight .fit-meter-status { color: #7C510C; }
.fit-meter.is-over { border-color: #E2A9A3; background: #FDF2F1; }
.fit-meter.is-over .fit-meter-status { color: var(--danger); }
.fit-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #E5DDD0;
  overflow: hidden;
}
.fit-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--sage);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.fit-meter.is-tight .fit-bar-fill { background: #B87B1F; }
.fit-meter.is-over .fit-bar-fill { background: var(--danger); }

.ack-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ack-chip {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.ack-chip:hover { border-color: var(--accent); background: #FAF6EE; }

/* Print Copy & Paper Estimator Card */
.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.calc-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.calc-stat-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.calc-stat-val {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin-top: 3px;
}
.calc-stat-sub {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 3px;
}
@media (max-width: 700px) {
  .calc-result-grid { grid-template-columns: 1fr; }
}
.crop-eye-guide {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 34%;
  border-top: 1px dashed rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.crop-eye-guide span {
  position: absolute;
  right: 0;
  top: -16px;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  background: rgba(35, 31, 27, 0.65);
  color: #FFFFFF;
  padding: 1px 5px;
  border-radius: 3px;
}
.range-row {
  display: grid;
  grid-template-columns: 95px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  margin-bottom: 8px;
}
.range-row input[type="range"] { width: 100%; accent-color: var(--accent); }

/* Preview Pane (Shadow DOM Host) */
.preview-pane {
  position: sticky;
  top: 76px;
  background: radial-gradient(circle at 50% 25%, #EFECE5 0%, #E4DED3 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  font-family: var(--font-ui);
  font-size: 0.78rem;
}
.preview-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  font-family: var(--font-ui);
  font-size: 0.74rem;
}
.page-switcher { display: flex; gap: 5px; flex-wrap: wrap; }
.page-pill {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.page-pill.active { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.preview-viewport {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  min-height: 460px;
}
.preview-scaler { transform-origin: top center; }

/* Order of Service Card Rows (Clean & Spacious on Mobile + Desktop) */
.oos-card-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--bg);
  margin-bottom: 10px;
}
.oos-card-row.is-heading {
  background: #F4EFE4;
  border-left: 3px solid var(--accent);
}
.oos-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--muted);
}
.oos-card-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.oos-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn-label {
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
}
.icon-btn-label.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

/* Readiness Checklist on Step 6 */
.readiness-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.83rem;
}
.readiness-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.readiness-item.is-warn { border-color: #E2BE79; background: #FFF8EB; }
.readiness-item.is-bad { border-color: #E2A9A3; background: #FDF2F1; }

/* Undo Toast */
.undo-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 76px;
  max-width: 460px;
  margin: 0 auto;
  z-index: 90;
  background: var(--ink);
  color: #FBF9F4;
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.undo-toast[hidden] { display: none; }
.undo-toast-msg { flex: 1; min-width: 0; }
.undo-toast-actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.undo-toast button {
  background: #FBF9F4;
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  min-height: 38px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}
.undo-toast .undo-dismiss-btn {
  background: transparent;
  color: rgba(251, 249, 244, 0.85);
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.1rem;
}

/* Mobile Sticky Bottom Bar + Full-Screen Preview Drawer */
.mobile-editor-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 -6px 20px rgba(35, 31, 27, 0.08);
}
.mobile-preview-close { display: none; }

/* Example & SEO Cards */
.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.example-text {
  background: var(--bg);
  border-left: 3px solid var(--border);
  padding: 14px 16px;
  margin: 12px 0 14px;
  white-space: pre-line;
  font-size: 0.92rem;
}
.toggle-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg);
}
.toggle-tabs button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.toggle-tabs button.active { background: var(--ink); color: #FBF9F4; }

.order-main { padding: 36px 20px 72px; max-width: 860px; }
.wizard-step {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  background: var(--bg);
}

/* Round 4: Duplex Diagram, How-It-Prints Strip, Interactive Order Builder, AI Stats, Wording Library & Editor Polish */
.duplex-diagram-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0 0;
  text-align: center;
}
.duplex-diagram-wrap svg {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
}
.duplex-diagram-cap {
  margin: 10px 0 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
}

.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.how-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.how-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: #FBF9F4;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.how-step-card p {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.editor-banner-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.banner-switch-btn {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--input-border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
}
.banner-switch-btn:hover { border-color: var(--ink); }

.sample-clear-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #FAF6EE;
  border: 1px solid #D9C8AA;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink);
}
.readiness-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.ai-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 7px;
  background: #EFF6F0;
  border: 1px solid #B7D4B9;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: #224627;
}
.ai-stats-bar.is-tight {
  background: #FFF8EB;
  border-color: #E2BE79;
  color: #5D3E0D;
}
.ai-stats-fit { font-weight: 600; }

.oos-builder-rows {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}
.oos-builder-row {
  display: grid;
  grid-template-columns: 32px 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.oos-builder-row.is-heading {
  background: #F4EFE4;
  border-left: 3px solid var(--accent);
}
.oos-builder-row.is-disabled { opacity: 0.55; }
.oos-builder-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}
.oos-builder-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.oos-builder-row input[type="text"] {
  min-height: 38px;
  padding: 6px 10px;
  font-size: 0.86rem;
}
.oos-builder-heading-tag {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.wording-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.wording-item-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.wording-item-row {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.wording-item-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.wording-item-text {
  font-size: 0.96rem;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.5;
}
@media (max-width: 820px) {
  .how-steps-grid { grid-template-columns: 1fr; }
  .oos-builder-row { grid-template-columns: 28px 1fr; }
  .oos-builder-row > *:nth-child(3) { grid-column: 2; }
}

/* Round 5 SEO + GEO: Breadcrumbs, Direct-Answer Lead, Topic Cluster Strip, Related Guides & Sample Details */
.breadcrumb {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--input-border);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--ink); font-weight: 600; }

.direct-answer {
  font-size: 1.02rem;
  color: var(--ink);
  max-width: 740px;
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  line-height: 1.62;
}

.cluster-strip {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
}
.cluster-strip-label {
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}
.cluster-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.cluster-chip:hover { border-color: var(--accent); background: #FAF6EE; }

.sample-text-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.sample-text-details summary {
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.sample-text-details p { margin: 8px 0 0; line-height: 1.55; }

.related-guides-box {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.related-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(35, 31, 27, 0.07);
}
.related-card strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--ink);
  line-height: 1.25;
}
.related-card span {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}
.page-updated-note {
  margin-top: 22px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
}
@media (max-width: 820px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-split { grid-template-columns: 1fr; gap: 24px; }
  .hero-fan { height: 310px; }
  .hero-fan-card { width: 158px; }
  .hero-fan-card.center { width: 178px; }
  .hero-fan-card.left { transform: translate(-88px, 14px) rotate(-6deg); }
  .hero-fan-card.right { transform: translate(88px, 16px) rotate(6deg); }
}

@media (max-width: 960px) {
  .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .editor-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 12px 92px;
    gap: 16px;
  }
  .preview-pane {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    border-radius: 0;
    overflow: auto;
    padding: 14px 14px 28px;
  }
  .preview-pane.is-mobile-open { display: block; }
  .mobile-preview-close { display: inline-flex; }
  .mobile-editor-bar { display: flex; }
  .mobile-editor-bar.is-keyboard { display: none; }
  .oos-card-inputs { grid-template-columns: 1fr; }
  .tpl-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .header-mobile-actions { display: flex; }
  .brand { font-size: 1.32rem; }
  .sample-grid { grid-template-columns: 1fr; }
  .sample-grid.is-mobile-collapsed .sample-card:nth-child(n+4) { display: none; }
  .sample-grid.is-mobile-collapsed + .show-all-samples-wrap { display: block; }
  .sample-modal-backdrop { padding: 8px; }
  .sample-modal-dialog { max-height: 94dvh; }
  .sample-modal-head { padding: 10px 12px; }
  .sample-modal-head h2 { font-size: 1.15rem !important; }
  .sample-modal-controls { padding: 8px 12px; gap: 6px; }
  .sample-modal-stage { padding: 10px 10px; min-height: 200px; }
  .svm-sheet img { max-height: 46dvh; }
  .sample-modal-pages.is-spread { flex-direction: column; align-items: center; }
  .sample-modal-pages.is-spread .svm-sheet img { max-height: 42dvh; max-width: 100%; }
  .sample-modal-foot { padding: 10px 12px; gap: 8px; }
  .sample-modal-foot .cta-row { width: 100%; }
  .sample-modal-foot .cta-row .btn { flex: 1 1 auto; }
  .stage-arrow { display: none; }
  .card { padding: 16px; }
  .hero { padding: 18px 0 20px; }
  .hero h1 { font-size: 1.95rem; margin-bottom: 10px; }
  .hero .lead { font-size: 0.96rem; margin-bottom: 14px; }
  .hero-cta-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .hero-cta-row .btn { width: 100%; }
  .fact-strip-compact { margin-top: 12px; padding: 10px 12px; font-size: 0.78rem; line-height: 1.45; }
  .hero-visual { padding: 6px 8px 4px; }
  .hero-fan { height: 270px; }
  .hero-fan-card { width: 142px; }
  .hero-fan-card.center { width: 160px; }
  .hero-fan-card.left { transform: translate(-78px, 12px) rotate(-6deg); }
  .hero-fan-card.right { transform: translate(78px, 14px) rotate(6deg); }
  .preset-picker-row { flex-direction: column; align-items: stretch; }
  .preset-picker-row select { flex: 0 0 auto; width: 100%; }
  .preset-picker-row .btn { width: 100%; }
}
