/* ==========================================================================
   Natko Studio — Page-level layout & feature components
   Built on top of design-system.css tokens.
   ========================================================================== */

/* ---- Hero ---- */
.hero { position: relative; padding: var(--sp-9) 0 var(--sp-8); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(232,207,160,0.35), transparent 70%),
    radial-gradient(50% 40% at 10% 90%, rgba(143,161,132,0.18), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: var(--sp-7); text-align: center; max-width: 780px; margin: 0 auto; }
.hero .eyebrow { display: block; text-align: center; }
.hero-cta-row { display: flex; gap: var(--sp-4); justify-content: center; flex-wrap: wrap; margin-top: var(--sp-3); }
.hero-trust { margin-top: var(--sp-6); display: flex; gap: var(--sp-6); justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--mocha-soft); }
.hero-visual { position: relative; z-index: 1; margin-top: var(--sp-8); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-visual img { width: 100%; }

/* ---- How it works ---- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); counter-reset: step; }
.step-card { text-align: center; padding: var(--sp-6); }
.step-num { width: 56px; height: 56px; border-radius: 50%; background: var(--champagne); color: var(--mocha); display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 22px; font-weight: 600; margin: 0 auto var(--sp-5); }
@media (max-width: 800px) { .steps-grid { grid-template-columns: 1fr; } }

/* ---- Template cards / grid ---- */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.template-card { overflow: hidden; }
.template-card-media { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--sandstone); }
.template-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.template-card:hover .template-card-media img { transform: scale(1.05); }
.template-card-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(74,54,39,0.75), transparent 55%); opacity: 0; transition: opacity var(--dur-fast) var(--ease); display: flex; align-items: flex-end; padding: var(--sp-5); }
.template-card:hover .template-card-overlay { opacity: 1; }
.template-card-body { padding: var(--sp-5); }
.template-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.template-card-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
@media (max-width: 980px) { .template-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .template-grid { grid-template-columns: 1fr; } }

/* ---- Filter bar (templates page) ---- */
.filter-bar { display: flex; gap: var(--sp-4); align-items: center; flex-wrap: wrap; padding: var(--sp-5); background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: var(--sp-7); }
.search-input { flex: 1 1 240px; position: relative; }
.search-input input { padding-left: 44px; }
.search-input .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--mocha-faint); }
.filter-select { padding: 12px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--sandstone); background: var(--white); font-size: 14px; color: var(--mocha); }
.chip-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.chip { padding: 8px 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--sandstone); font-size: 13px; font-weight: 600; color: var(--mocha-soft); background: var(--white); transition: all var(--dur-fast) var(--ease); }
.chip:hover { border-color: var(--mocha); color: var(--mocha); }
.chip.active { background: var(--mocha); color: var(--ivory); border-color: var(--mocha); }
.results-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-5); color: var(--mocha-soft); font-size: 14px; }

/* ---- Feature grid ---- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
.feature-card { padding: var(--sp-6); text-align: left; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blush); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: var(--sp-4); }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---- Testimonials ---- */
.testimonial-track { display: flex; gap: var(--sp-6); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--sp-4); scrollbar-width: none; }
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-card { flex: 0 0 min(400px, 85vw); scroll-snap-align: start; padding: var(--sp-6); }
.testimonial-quote { font-family: var(--font-serif); font-size: 20px; color: var(--mocha); margin: var(--sp-4) 0; line-height: 1.4; }
.testimonial-person { display: flex; align-items: center; gap: var(--sp-3); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sandstone); object-fit: cover; }
.carousel-nav { display: flex; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-5); }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sandstone); border: none; padding: 0; transition: all var(--dur-fast); }
.carousel-dot.active { background: var(--mocha); width: 22px; border-radius: var(--radius-pill); }

/* ---- Pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); align-items: stretch; }
.pricing-card { padding: var(--sp-7) var(--sp-6); display: flex; flex-direction: column; border: 1.5px solid var(--sandstone); }
.pricing-card.featured { border-color: var(--champagne-deep); box-shadow: var(--shadow-md); position: relative; transform: scale(1.02); }
.pricing-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--champagne); padding: 6px 18px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.price-amount { font-family: var(--font-serif); font-size: 48px; font-weight: 600; margin: var(--sp-4) 0; }
.price-amount span { font-size: 16px; font-family: var(--font-sans); color: var(--mocha-soft); font-weight: 500; }
.price-features { display: flex; flex-direction: column; gap: var(--sp-3); margin: var(--sp-6) 0; flex: 1; }
.price-features li { display: flex; gap: 10px; font-size: 14px; color: var(--mocha-soft); align-items: flex-start; }
.price-features li::before { content: "✓"; color: var(--sage-deep); font-weight: 700; flex-shrink: 0; }
.price-features li.unavailable { opacity: 0.4; }
.price-features li.unavailable::before { content: "–"; color: var(--mocha-faint); }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } .pricing-card.featured { transform: none; } }

.compare-table { width: 100%; border-collapse: collapse; margin-top: var(--sp-9); }
.compare-table th, .compare-table td { padding: var(--sp-4); text-align: center; border-bottom: 1px solid var(--sandstone); font-size: 14px; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; color: var(--mocha-soft); }
.compare-table thead th { font-family: var(--font-serif); font-size: 18px; font-weight: 600; }

/* ---- FAQ layout ---- */
.faq-columns { display: grid; grid-template-columns: 220px 1fr; gap: var(--sp-8); }
.faq-cat-list { display: flex; flex-direction: column; gap: var(--sp-2); position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.faq-cat-list button { text-align: left; padding: 10px 16px; border-radius: var(--radius-sm); border: none; background: none; font-size: 14px; color: var(--mocha-soft); font-weight: 500; }
.faq-cat-list button.active { background: var(--blush); color: var(--mocha); font-weight: 600; }
@media (max-width: 800px) { .faq-columns { grid-template-columns: 1fr; } .faq-cat-list { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ---- Auth pages ---- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual { position: relative; background: linear-gradient(160deg, var(--sandstone), var(--blush)); display: flex; align-items: flex-end; padding: var(--sp-8); }
.auth-visual-quote { color: var(--mocha); font-family: var(--font-serif); font-size: 28px; max-width: 380px; }
.auth-form-col { display: flex; align-items: center; justify-content: center; padding: var(--sp-6); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo { display: block; margin-bottom: var(--sp-6); }
.auth-divider { display: flex; align-items: center; gap: var(--sp-3); color: var(--mocha-faint); font-size: 13px; margin: var(--sp-5) 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--sandstone); }
.auth-switch { text-align: center; margin-top: var(--sp-6); font-size: 14px; color: var(--mocha-soft); }
.auth-switch a { color: var(--mocha); font-weight: 600; text-decoration: underline; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-visual { display: none; } }

/* ---- About page ---- */
.value-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-6); }
@media (max-width: 800px) { .value-grid { grid-template-columns: 1fr; } }

/* ---- Reviews page ---- */
.review-grid { columns: 3 280px; column-gap: var(--sp-6); }
.review-card { break-inside: avoid; margin-bottom: var(--sp-6); padding: var(--sp-5); }
@media (max-width: 900px) { .review-grid { columns: 2 240px; } }
@media (max-width: 560px) { .review-grid { columns: 1; } }
.stat-row { display: flex; justify-content: center; gap: var(--sp-9); text-align: center; margin: var(--sp-7) 0; flex-wrap: wrap; }
.stat-row .num { font-family: var(--font-serif); font-size: 40px; font-weight: 600; }
.stat-row .label { font-size: 13px; color: var(--mocha-soft); }

/* ---- Template preview page ---- */
.preview-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-8); align-items: center; }
.device-switch { display: inline-flex; background: var(--white); border-radius: var(--radius-pill); padding: 4px; box-shadow: var(--shadow-sm); margin-bottom: var(--sp-5); }
.device-switch button { padding: 8px 18px; border-radius: var(--radius-pill); border: none; background: none; font-size: 13px; font-weight: 600; color: var(--mocha-soft); }
.device-switch button.active { background: var(--mocha); color: var(--ivory); }
.device-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 10px solid var(--white); transition: max-width var(--dur-med) var(--ease); margin: 0 auto; }
.device-frame.desktop { max-width: 100%; }
.device-frame.tablet { max-width: 520px; }
.device-frame.mobile { max-width: 320px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-6); margin: var(--sp-6) 0; }
.spec-list dt { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--mocha-faint); margin-bottom: 2px; }
.spec-list dd { margin: 0; font-weight: 600; }
.palette-row { display: flex; gap: var(--sp-3); }
.swatch { width: 40px; height: 40px; border-radius: 50%; box-shadow: var(--shadow-sm); border: 3px solid var(--white); }
.included-pages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.included-page-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); background: var(--white); border-radius: var(--radius-md); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm); }
@media (max-width: 980px) { .preview-hero { grid-template-columns: 1fr; } .included-pages-grid { grid-template-columns: repeat(2,1fr); } }

/* ---- Live demo shell ---- */
.demo-banner { position: sticky; top: 0; z-index: 200; background: var(--mocha); color: var(--ivory); padding: 12px var(--sp-6); display: flex; align-items: center; justify-content: space-between; font-size: 14px; flex-wrap: wrap; gap: var(--sp-3); }
.demo-banner strong { color: var(--champagne); }
.demo-banner .btn { padding: 8px 18px; font-size: 13px; }
.demo-frame-wrap { background: var(--ivory-deep); padding: var(--sp-8) var(--sp-6); }
.demo-site { max-width: 900px; margin: 0 auto; background: var(--ivory); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.demo-nav { display: flex; justify-content: center; gap: var(--sp-5); padding: var(--sp-4); border-bottom: 1px solid var(--sandstone); flex-wrap: wrap; }
.demo-nav button { background: none; border: none; font-size: 13px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--mocha-soft); padding: 6px 4px; border-bottom: 2px solid transparent; }
.demo-nav button.active { color: var(--mocha); border-color: var(--champagne-deep); }
.demo-section { display: none; padding: var(--sp-8) var(--sp-6); text-align: center; }
.demo-section.active { display: block; }
.demo-opening { padding: var(--sp-10) var(--sp-6); text-align: center; background: linear-gradient(160deg, var(--blush), var(--sandstone)); position: relative; }
.demo-opening.closed { display: none; }
.countdown-row { display: flex; gap: var(--sp-5); justify-content: center; margin-top: var(--sp-6); }
.countdown-unit { text-align: center; }
.countdown-unit .n { font-family: var(--font-serif); font-size: 36px; font-weight: 600; }
.countdown-unit .l { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--mocha-soft); }
.demo-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.demo-gallery-grid img, .demo-gallery-grid .ph { border-radius: var(--radius-sm); aspect-ratio: 1; object-fit: cover; background: var(--sandstone); }
.timeline { text-align: left; max-width: 560px; margin: 0 auto; }
.timeline-item { display: grid; grid-template-columns: 90px 1fr; gap: var(--sp-5); padding-bottom: var(--sp-6); position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 100px; top: 24px; bottom: -8px; width: 1px; background: var(--sandstone); }
.timeline-item:last-child::before { display: none; }
.timeline-date { font-size: 12px; color: var(--sage-deep); font-weight: 700; padding-top: 4px; }
.music-toggle { position: fixed; bottom: 24px; left: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--mocha); color: var(--ivory); border: none; box-shadow: var(--shadow-md); z-index: 210; }

/* ---- Related/recently viewed strips ---- */
.strip-scroller { display: flex; gap: var(--sp-5); overflow-x: auto; padding-bottom: var(--sp-3); }
.strip-card { flex: 0 0 240px; }

/* ==========================================================================
   Hero v2 — split/layered composition (homepage)
   Added without removing the original centered-hero rules above, which
   remain available/unused. Scoped under .hero-split so nothing else breaks.
   ========================================================================== */
.hero-split-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--sp-9);
  align-items: center; text-align: left;
}
.hero-split-copy .eyebrow { display: inline-block; text-align: left; }
.hero-split-copy h1 { margin-bottom: var(--sp-5); }
.hero-split-copy > p { font-size: 18px; max-width: 460px; margin: 0 0 var(--sp-6); }
.hero-split-copy .hero-cta-row { justify-content: flex-start; margin-top: 0; }
.hero-split-copy .hero-trust { justify-content: flex-start; margin-top: var(--sp-6); }
.hero-split-visual { position: relative; z-index: 1; }
.hero-split-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); transform: rotate(1.2deg); }
.hero-split-media img { width: 100%; display: block; }
.hero-floating-card {
  position: absolute; left: -28px; bottom: -26px;
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 18px 22px; max-width: 220px; transform: rotate(-2deg);
}
.hero-floating-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--sage-deep); font-weight: 700; margin-bottom: 4px; }
.hero-floating-title { font-family: var(--font-serif); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.hero-floating-badge {
  position: absolute; top: -18px; right: 18px;
  background: var(--mocha); color: var(--ivory); font-size: 12px; font-weight: 700;
  padding: 8px 16px; border-radius: var(--radius-pill); box-shadow: var(--shadow-md); transform: rotate(2deg);
}
@media (max-width: 980px) {
  .hero-split-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-split-copy .eyebrow { display: block; text-align: center; }
  .hero-split-copy > p { margin-left: auto; margin-right: auto; }
  .hero-split-copy .hero-cta-row, .hero-split-copy .hero-trust { justify-content: center; }
  .hero-split-media { transform: none; margin-top: var(--sp-7); }
  .hero-floating-card { left: 16px; bottom: -20px; transform: none; }
  .hero-floating-badge { right: 16px; }
}

/* ==========================================================================
   Template gallery cards v2 — larger previews, richer hover state, price chip
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); }
.gallery-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--dur-med) var(--ease); background: var(--white); }
.gallery-card:hover, .gallery-card:focus-within { box-shadow: var(--shadow-lg); }
.gallery-card-media { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--sandstone); }
.gallery-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.gallery-card:hover .gallery-card-media img, .gallery-card:focus-within .gallery-card-media img { transform: scale(1.07); }
.gallery-card-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(74,54,39,0.82) 0%, rgba(74,54,39,0.15) 45%, transparent 70%); }
.gallery-card-price { position: absolute; top: 16px; right: 16px; background: var(--ivory); color: var(--mocha); font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm); }
.gallery-card-header { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--sp-5); color: var(--ivory); }
.gallery-card-header h4 { color: var(--ivory); margin-bottom: 4px; }
.gallery-card-header .template-card-tags .tag { background: rgba(251,247,240,0.16); color: var(--ivory); border: 1px solid rgba(251,247,240,0.35); }
.gallery-card-header .template-card-tags .tag.tag--champagne { background: var(--champagne); color: var(--mocha); border: none; }
.gallery-card-panel {
  max-height: 0; overflow: hidden; transition: max-height var(--dur-med) var(--ease);
  background: var(--white);
}
.gallery-card:hover .gallery-card-panel, .gallery-card:focus-within .gallery-card-panel { max-height: 140px; }
.gallery-card-panel-inner { padding: var(--sp-5); display: flex; gap: var(--sp-3); }
.gallery-card-panel-inner .btn { flex: 1; }
@media (max-width: 980px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card-panel { max-height: 140px; } /* always show actions on touch devices */
}

/* ==========================================================================
   Pricing / template price chip + dual-card grid (used on homepage teaser)
   ========================================================================== */
.price-chip { display: inline-block; font-size: 13px; font-weight: 700; color: var(--sage-deep); margin: 4px 0 0; }
.pricing-grid--dual { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
@media (max-width: 700px) { .pricing-grid--dual { grid-template-columns: 1fr; max-width: 420px; } }

/* ==========================================================================
   Editor shell — shared by the temporary sandbox (editor-demo.html) and the
   real editor (editor.html). Full-screen, two-panel, compact toolbar, per
   the Phase 4 spec. Deliberately distinct from the marketing .site-header.
   ========================================================================== */
.editor-toolbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-5); background: var(--white); border-bottom: 1px solid var(--sandstone);
  position: sticky; top: 0; z-index: 50;
}
.editor-toolbar .logo { font-size: 19px; }
.editor-toolbar-left, .editor-toolbar-right { display: flex; align-items: center; gap: var(--sp-4); }
.editor-toolbar-title { font-size: 14px; font-weight: 600; color: var(--mocha-soft); }
.autosave-status { font-size: 12px; color: var(--mocha-faint); display: flex; align-items: center; gap: 6px; }
.autosave-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.autosave-status.saving .dot { background: var(--champagne-deep); animation: pulse 1s ease infinite; }
.autosave-status.error { color: var(--error); }
.autosave-status.error .dot { background: var(--error); animation: none; }
.autosave-retry { background: none; border: none; padding: 0; margin-left: 2px; font-size: 12px; font-weight: 600; color: var(--error); text-decoration: underline; cursor: pointer; }
@keyframes pulse { 50% { opacity: 0.35; } }

.editor-shell { display: grid; grid-template-columns: 380px 1fr; min-height: calc(100vh - 64px); }
.editor-panel { border-right: 1px solid var(--sandstone); background: var(--ivory-deep); padding: var(--sp-6); overflow-y: auto; }
.editor-panel h3 { font-size: 18px; margin-bottom: var(--sp-2); }
.editor-panel .hint { margin-bottom: var(--sp-5); }
.editor-preview-pane { background: var(--sandstone); padding: var(--sp-7); overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; }
.editor-preview-frame { width: 100%; max-width: 640px; background: var(--ivory); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.color-swatch-row { display: flex; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.color-swatch-btn { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: var(--shadow-sm); }
.color-swatch-btn.active { border-color: var(--mocha); }
@media (max-width: 900px) { .editor-shell { grid-template-columns: 1fr; } .editor-panel { border-right: none; border-bottom: 1px solid var(--sandstone); } }

/* Live preview content rendered by renderEditorPreview() in editor-preview.js */
.ep-hero { position: relative; background-size: cover; background-position: center; padding: 72px 32px; text-align: center; color: var(--ivory); }
.ep-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.85; margin-bottom: 8px; }
.ep-names { font-family: var(--font-serif); font-size: 34px; color: var(--ivory); margin-bottom: 6px; }
.ep-date { font-size: 14px; opacity: 0.9; margin-bottom: 0; }
.ep-rsvp-btn { margin-top: 20px; padding: 10px 26px; border-radius: var(--radius-pill); border: none; color: var(--ivory); font-weight: 700; font-size: 13px; }
.ep-body { padding: var(--sp-6); text-align: center; }
.ep-welcome { max-width: 420px; margin: 0 auto var(--sp-4); }
.ep-swatch-row { display: flex; gap: 8px; justify-content: center; }
.ep-swatch { width: 20px; height: 20px; border-radius: 50%; box-shadow: var(--shadow-sm); }

/* ==========================================================================
   Phase 4 production editor — collapsible section nav + field kit
   ========================================================================== */
.editor-shell { grid-template-columns: 400px 1fr; }
.editor-panel { display: flex; flex-direction: column; padding: 0; }
.editor-nav-groups { padding: var(--sp-4) var(--sp-4) 0; }
.editor-nav-group { margin-bottom: var(--sp-3); }
.editor-nav-group-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; padding: 10px 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px; color: var(--mocha-faint); cursor: pointer;
}
.editor-nav-group-header .chevron { transition: transform var(--dur-fast) var(--ease); }
.editor-nav-group.collapsed .editor-nav-group-header .chevron { transform: rotate(-90deg); }
.editor-nav-group-body { display: flex; flex-direction: column; gap: 2px; }
.editor-nav-group.collapsed .editor-nav-group-body { display: none; }
.editor-section-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; padding: 10px 8px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--mocha-soft); cursor: pointer;
}
.editor-section-item:hover { background: rgba(74,54,39,0.05); color: var(--mocha); }
.editor-section-item.active { background: var(--white); color: var(--mocha); box-shadow: var(--shadow-sm); }
.editor-section-item .icon { width: 22px; text-align: center; font-family: var(--font-serif); color: var(--sage-deep); flex-shrink: 0; }
.editor-section-panel { padding: var(--sp-5); border-top: 1px solid var(--sandstone); border-bottom: 1px solid var(--sandstone); background: var(--white); margin: 4px 0 var(--sp-3); }
.editor-section-panel h3 { font-size: 16px; margin-bottom: var(--sp-4); }

/* Toggle switch */
.toggle-row { display: flex; align-items: center; gap: 10px; }
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--sandstone); border-radius: var(--radius-pill); transition: background var(--dur-fast) var(--ease); cursor: pointer; }
.toggle-slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--white); border-radius: 50%; transition: transform var(--dur-fast) var(--ease); box-shadow: var(--shadow-sm); }
.toggle-switch input:checked + .toggle-slider { background: var(--sage); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-label { font-size: 14px; font-weight: 600; color: var(--mocha); }
.toggle-field { margin-bottom: var(--sp-4); }

/* Color inputs */
.color-input-row { display: flex; gap: 10px; align-items: center; }
.color-native-input { width: 44px; height: 40px; padding: 2px; border-radius: var(--radius-sm); border: 1.5px solid var(--sandstone); background: var(--white); cursor: pointer; }
.color-hex-input { flex: 1; }
.color-swatch-row { display: flex; gap: 10px; margin-bottom: var(--sp-4); }

/* Image picker */
.image-picker-preview { aspect-ratio: 16/9; border-radius: var(--radius-sm); background-size: cover; background-position: center; background-color: var(--sandstone); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.image-picker-preview.empty span { font-size: 12px; color: var(--mocha-faint); }
.image-picker-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.image-picker-thumb { aspect-ratio: 1; border-radius: 6px; background-size: cover; background-position: center; border: 2px solid transparent; padding: 0; cursor: pointer; }
.image-picker-thumb:hover { border-color: var(--sage); }

/* Dynamic list (drag-and-drop reorderable) */
.dynamic-list { margin-bottom: var(--sp-4); }
.list-row { display: flex; align-items: flex-start; gap: 10px; background: var(--ivory); border: 1px solid var(--sandstone); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; cursor: grab; }
.list-row.dragging { opacity: 0.4; }
.list-row.drag-over { border-color: var(--sage); box-shadow: 0 0 0 2px rgba(143,161,132,0.25); }
.list-row-handle { color: var(--mocha-faint); padding-top: 8px; user-select: none; }
.list-row-body { flex: 1; min-width: 0; }
.list-row-body .field { margin-bottom: 10px; }
.list-row-body .field:last-child { margin-bottom: 0; }
.list-row-remove { background: none; border: none; color: var(--mocha-faint); font-size: 14px; padding: 4px; cursor: pointer; flex-shrink: 0; }
.list-row-remove:hover { color: var(--error); }
.list-row--simple { align-items: center; }
.list-row--simple input { flex: 1; }

/* Editor toolbar additions: device switch + profile menu */
.editor-toolbar .device-switch { margin: 0; }
.profile-menu { position: relative; }
.profile-menu-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--champagne); color: var(--mocha); border: none; font-weight: 700; font-size: 13px; cursor: pointer; }
.profile-menu-dropdown { position: absolute; top: 44px; right: 0; background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); min-width: 160px; padding: 6px; display: none; z-index: 60; }
.profile-menu.open .profile-menu-dropdown { display: block; }
.profile-menu-dropdown a { display: block; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--mocha); }
.profile-menu-dropdown a:hover { background: var(--ivory-deep); }

/* ==========================================================================
   Live site render output (renderFullSite in site-renderer.js). Scoped
   under .ws-root with CSS custom properties set per-document so the same
   markup works for the editor preview and the read-only preview.html.
   ========================================================================== */
/* Every color in this block reads one of the five document colors — see
   the setProperty() calls at the top of renderFullSite() in
   site-renderer.js. Nothing under .ws-root should hardcode a color
   (outside the necessarily-white hero overlay text, which sits on a photo
   and is a legibility choice, not a theme color). If you add a new
   .ws-* rule, it must reference --color-primary/secondary/accent/
   background/text, or a color control will silently do nothing. */
.ws-root { font-family: var(--site-body-font, var(--font-sans)); color: var(--color-text, var(--mocha)); background: var(--color-background, var(--ivory)); }
.ws-root .ws-heading, .ws-root h1, .ws-root h2, .ws-root h3, .ws-root h4 { font-family: var(--site-heading-font, var(--font-serif)); color: var(--color-primary, var(--mocha)); }
.ws-music-badge { text-align: center; font-size: 12px; padding: 8px; background: var(--color-secondary, var(--sandstone)); color: var(--color-text, var(--mocha)); }
.ws-nav { display: flex; justify-content: center; gap: var(--sp-4); padding: var(--sp-4); background: var(--color-secondary, transparent); border-bottom: 2px solid var(--color-accent, rgba(0,0,0,0.08)); flex-wrap: wrap; }
.ws-nav-btn { background: none; border: none; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--color-text, inherit); opacity: 0.65; padding: 4px 2px; border-bottom: 2px solid transparent; transition: opacity var(--dur-fast), color var(--dur-fast); }
.ws-nav-btn.active, .ws-nav-btn:hover { opacity: 1; color: var(--color-accent, var(--champagne-deep)); border-color: var(--color-accent, var(--champagne-deep)); }
.ws-hero { background-size: cover; background-position: center; padding: 64px 24px; text-align: center; color: #fff; }
.ws-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.9; margin-bottom: 8px; }
.ws-names { color: #fff; font-size: 32px; margin-bottom: 6px; }
.ws-headline, .ws-date { font-size: 14px; opacity: 0.95; margin: 0; }
.ws-countdown { margin-top: 14px; display: inline-block; font-size: 12px; font-weight: 700; background: var(--color-primary, rgba(255,255,255,0.18)); color: var(--color-background, #fff); padding: 6px 14px; border-radius: var(--radius-pill); }
.ws-cta-btn { margin-top: var(--sp-4); display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.3px; background: var(--color-primary, var(--mocha)); color: var(--color-background, #fff); border: none; padding: 10px 24px; border-radius: var(--radius-pill); cursor: default; }
.ws-link { color: var(--color-accent, var(--sage-deep)); font-size: 13px; font-weight: 600; text-decoration: underline; }
.ws-body { padding: var(--sp-6); text-align: center; }
.ws-welcome-msg { max-width: 440px; margin: 0 auto var(--sp-3); }
.ws-parents, .ws-venue { font-size: 13px; opacity: 0.8; margin-bottom: 6px; }
.ws-section { padding: var(--sp-6); min-height: 200px; }
.ws-empty { text-align: center; color: var(--mocha-faint); font-size: 14px; padding: var(--sp-6) 0; }
.ws-timeline { max-width: 460px; margin: 0 auto; text-align: left; }
.ws-timeline-item { display: flex; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.ws-timeline-photo { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.ws-timeline-date { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--color-accent, inherit); opacity: 0.9; margin-bottom: 2px; }
.ws-party-grid, .ws-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); text-align: center; }
.ws-party-card img, .ws-party-photo-empty { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--color-secondary, rgba(0,0,0,0.08)); margin-bottom: 8px; }
.ws-party-role { font-size: 12px; opacity: 0.7; }
.ws-info-card { background: var(--color-secondary, rgba(0,0,0,0.03)); border: 1px solid var(--color-accent, transparent); border-radius: var(--radius-sm); padding: var(--sp-4); text-align: left; }
.ws-price { font-size: 13px; font-weight: 700; opacity: 0.8; }
.ws-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.ws-gallery-item figcaption { font-size: 11px; opacity: 0.7; margin-top: 4px; }
.ws-faq-list { max-width: 480px; margin: 0 auto; text-align: left; }
.ws-faq-item { margin-bottom: var(--sp-4); }
.ws-root .tag { background: var(--color-secondary, var(--blush)); color: var(--color-text, var(--mocha)); border-color: var(--color-accent, transparent); }
.ws-footer { text-align: center; padding: var(--sp-5); border-top: 1px solid var(--color-accent, rgba(0,0,0,0.08)); font-size: 13px; opacity: 0.75; }
@media (max-width: 700px) { .ws-party-grid, .ws-card-grid, .ws-gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Dashboard */
.dash-topbar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp-6); background: var(--white); border-bottom: 1px solid var(--sandstone); }
.dash-shell { padding: var(--sp-8) 0; }
.website-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.website-card-media { aspect-ratio: 16/10; background: var(--sandstone); position: relative; overflow: hidden; }
.website-card-media img { width: 100%; height: 100%; object-fit: cover; }
.website-card-body { padding: var(--sp-5); }
.website-card-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
@media (max-width: 980px) { .website-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .website-grid { grid-template-columns: 1fr; } }
