/* ==========================================================================
   WONENZUYD REFINEMENT PASS — Comprehensive rough-edge fixes
   Loaded after all other stylesheets via index.html
   ========================================================================== */

/* ── 1. TYPOGRAPHY & GLOBAL ─────────────────────────────────────────────── */

/* Prevent text orphans by allowing balanced wrapping everywhere */
h1, h2, h3, .hero-main-title, .hero-subtitle {
  text-wrap: balance;
}

/* Consistent select arrow — never wraps native blink chevron below field */
select,
#ontwerpen .settings select,
.form-field select,
.contact-form-col select,
.project-workflow select,
.permit-field select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23556672' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding: 10px 38px 10px 12px !important;
  min-height: 42px !important;
  line-height: 1.35 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis;
  box-sizing: border-box !important;
}
select::picker-icon {
  display: none !important;
  content: none !important;
}
select::-ms-expand {
  display: none !important;
}
select:disabled,
#ontwerpen select:disabled {
  opacity: 0.62;
  background-color: #eef2f5 !important;
  color: #5b6772 !important;
  cursor: not-allowed;
}

/* Dutch HTML5 form validation messages */
input, select, textarea {
  /* Force browser to use our styling for validity states */
}

/* Smooth focus rings globally */
:focus-visible {
  outline: 2.5px solid #b65032 !important;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 2. NAVIGATION ──────────────────────────────────────────────────────── */

/* Active nav indicator with animated underline */
.site-nav-drawer nav a.active {
  background: rgba(182, 80, 50, 0.1);
  color: #b65032;
  font-weight: 700;
}

.site-nav-drawer nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #b65032;
  border-radius: 0 3px 3px 0;
}

.site-nav-drawer nav a {
  position: relative;
  transition: background 0.15s, color 0.15s;
}

/* ── 3. STICKY HEADER & FLOATING MENU BUTTON ────────────────────────────── */

/* Naar 3D Studio pill — compact on mobile, never wraps */
.floating-naar-btn,
a[href="#ontwerpen"].naar-studio-btn,
.main-header .naar-studio-link {
  white-space: nowrap;
  font-size: 13px;
  padding: 9px 16px !important;
  border-radius: 999px;
}

/* Main top header bar — cleaner backdrop */
.main-header {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(245, 246, 247, 0.92);
  border-bottom: 1px solid rgba(220, 226, 230, 0.6);
}

/* Header menu button replaces duplicate floating menu button */
.floating-menu-btn {
  display: none !important;
}

/* ── 4. MOBILE SIDEBAR DRAWER ───────────────────────────────────────────── */

@media (max-width: 760px) {
  /* Fix horizontal layout bug — menu items should be vertical */
  .site-nav-drawer nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    overflow-x: hidden;
  }

  .site-nav-drawer nav a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 11px 14px !important;
    font-size: 15px;
    border-radius: 10px;
  }

  .site-nav-drawer nav span {
    font-size: 15px !important;
    white-space: normal;
  }

  /* Sidebar full height, no overflow */
  .site-nav-drawer {
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* Naar 3D Studio button in mobile nav — always fits */
  .mobile-naar-btn,
  .main-header a[href="#ontwerpen"] {
    font-size: 12px !important;
    padding: 8px 12px !important;
    white-space: nowrap;
    border-radius: 999px;
  }
}

/* ── 5. HERO SECTION ────────────────────────────────────────────────────── */

/* Better contrast scrim on hero background text */
.pro-hero-banner {
  background-image: linear-gradient(
    180deg,
    rgba(12, 20, 25, 0.80) 0%,
    rgba(12, 20, 25, 0.50) 38%,
    rgba(12, 20, 25, 0.88) 100%
  ), url('house-photo.png');
  background-size: cover;
  background-position: center 46%;
}

/* Eyebrow — always readable */
.hero-eyebrow {
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* Hero title — wrap nicely, no orphans */
.hero-main-title {
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* Hero CTA group — always wraps gracefully */
.hero-cta-group {
  flex-wrap: wrap;
  gap: 12px;
}

.hero-cta-primary,
.hero-cta-secondary {
  white-space: nowrap;
  min-width: 0;
}

/* Mobile hero — FABs stay clear of bottom metadata */
@media (max-width: 760px) {
  .pro-hero-banner {
    min-height: 480px;
    padding: 24px 22px 90px; /* bottom pad keeps FABs from overlapping meta */
  }

  .hero-center-content {
    margin-top: 28px;
  }

  .hero-main-title {
    font-size: clamp(32px, 9vw, 52px) !important;
  }

  .hero-cta-primary {
    font-size: 15px;
    padding: 14px 24px;
  }

  .hero-bottom-meta {
    gap: 14px;
    font-size: 12px;
  }
}

/* ── 6. FEATURE / PILLAR CARDS ──────────────────────────────────────────── */

/* Icons always centered in their box */
.pillar-icon,
.feat-icon {
  display: grid;
  place-items: center;
  align-self: flex-start;
}

.pillar-icon svg,
.feat-icon svg {
  display: block;
  margin: auto;
}

/* Feature items — tighter, cleaner */
.feature-item {
  align-items: flex-start;
  gap: 12px;
}

/* Replace $ financial card icon with € — handled via content override on the icon SVG wrapper */
.pillar-card:has(.pillar-icon[data-type="finance"]) .pillar-icon::after {
  content: '€';
  font-size: 18px;
  font-weight: 700;
  color: #b65032;
}

/* ── 7. FOOTER ──────────────────────────────────────────────────────────── */

/* Remove awkward notched border-top seam on rounded footer */
.pro-footer {
  border-top: none;
  position: relative;
}
.pro-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 36px;
  right: 36px;
  height: 3px;
  background: #b65032;
  border-radius: 3px 3px 0 0;
}

/* Footer logo dot — always visible */
.footer-brand h3 span {
  color: #d9583b !important;
}

/* Mobile footer — no overflow */
@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }

  .pro-footer {
    padding: 36px 20px 20px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ── 8. VERGUNNINGEN PAGE ───────────────────────────────────────────────── */

/* Full-width centered card, balanced layout */
.permit-grid {
  max-width: 900px;
  margin: 24px auto;
  grid-template-columns: 1fr 1fr;
}

/* Button alignment within permit cards — all centered */
.permit-location .button,
.permit-location button {
  text-align: center;
  justify-content: center;
  width: 100%;
}

@media (max-width: 650px) {
  .permit-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

/* ── 9. MIJN PROJECT PAGE ───────────────────────────────────────────────── */

/* Consistent button palette — only terra + subtle */
.saved-designs-list .button,
#project .button,
.project-backup .button {
  background: #b65032;
  color: #fff;
  border: 0;
}
.saved-designs-list .button:hover,
#project .button:hover {
  background: #983e25;
}

/* Design delete button — always clear & neutral */
.btn-delete-design,
button[data-delete-design] {
  background: #fff !important;
  color: #c0392b !important;
  border: 1px solid #f5c6c0 !important;
}
.btn-delete-design:hover,
button[data-delete-design]:hover {
  background: #fdf0ee !important;
  border-color: #e57373 !important;
}

/* Step progress bar — visual pills not plain underline links */
.designsteps button {
  font-weight: 600;
  color: #68747d;
  text-decoration: none;
  border-radius: 999px;
  padding: 5px 12px;
  transition: background 0.15s, color 0.15s;
}
.designsteps button:first-child,
.designsteps button.current-step {
  background: #b65032;
  color: #fff;
}

/* Mobile step overflow fix */
@media (max-width: 600px) {
  .designsteps {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .designsteps button {
    flex-shrink: 0;
    font-size: 12px;
    padding: 4px 10px;
  }
}

/* ── 10. CONTACT & OVER ONS ─────────────────────────────────────────────── */

/* Select arrow in contact form — consistent */
.form-field select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23556672' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
  cursor: pointer;
}

/* Case consistency in design summary labels */
.contact-design-badge dd,
.contact-design-badge .label {
  text-transform: capitalize;
}

/* ── 11. BEHEERDER LOGIN ─────────────────────────────────────────────────── */

/* Remove pre-filled password appearance */
#admin-pass::placeholder {
  color: #9dadb8;
  font-size: 13px;
  letter-spacing: 0;
}

/* Validation feedback in Dutch — override browser native "Please fill out this field" */
#admin-login-form input:invalid:not(:placeholder-shown) {
  border-color: #e57373;
  box-shadow: 0 0 0 3px rgba(229, 115, 115, 0.15);
}

/* Padlock icon centered & breathing room */
.admin-login-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 8px;
  line-height: 1;
}

/* ── 12. 3D STUDIO — BUTTON PALETTE CONSOLIDATION ──────────────────────── */

/* Primary studio actions — terra */
#ontwerpen .button,
#ontwerpen .studio-heading .button {
  background: #b65032;
  color: #fff;
  border: 0;
  transition: background 0.15s;
}
#ontwerpen .button:hover {
  background: #983e25;
}

/* Secondary / ghost actions */
#ontwerpen .new-design-button,
.studio-heading .new-design-button {
  background: #fff !important;
  color: #25323c !important;
  border: 1px solid #dfe3e6 !important;
}
#ontwerpen .new-design-button:hover {
  background: #f5f6f7 !important;
}

/* Studio view buttons (3D / 2D / Licht / Draaien etc) — consistent */
.viewbutton,
#ontwerpen .viewbottom button {
  background: #fff;
  border: 1px solid #dfe3e6;
  color: #25323c;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 12px;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.viewbutton:hover,
#ontwerpen .viewbottom button:hover {
  background: #f5f6f7;
  border-color: #c8d1d8;
}
.viewbutton[aria-pressed="true"],
#ontwerpen .viewbottom button[aria-pressed="true"],
#ontwerpen #realistic-view[aria-pressed="true"] {
  background: #25323c !important;
  color: #fff !important;
  border-color: #25323c !important;
}

/* Studio step / save button — terra, never forest green */
.studio-statusbar #saved,
#saved {
  color: #b65032;
}

/* Volgende stap — terra not green */
#ontwerpen .workflow-actions .button,
.workflow-actions .button {
  background: #b65032!important;
  color: #fff!important;
  border: 0!important;
}
#ontwerpen .workflow-actions .button:hover {
  background: #983e25!important;
}

/* Forest-green "saved" toast — unified to terra */
.studio-save-toast,
.saved-toast {
  background: #b65032 !important;
  color: #fff !important;
  border-color: #983e25 !important;
}

/* ── 13. 3D STUDIO — QUICK COMMAND BAR ─────────────────────────────────── */

/* Quick bar — slim & clean, doesn't compete with 3D canvas */
.viewer-quick-ai {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.viewer-quick-ai-inner {
  flex-wrap: nowrap;
  gap: 6px;
}

/* Voice and submit buttons — fixed width, no wrap */
.viewer-quick-submit-btn,
.viewer-quick-open-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Quick input — always flexible */
.viewer-quick-ai input {
  min-width: 0;
  flex: 1;
}

/* ── 14. STUDIO PRESET PICKER ───────────────────────────────────────────── */

/* Unified button palette on preset picker — terra only */
.design-start-gate button,
.design-start-gate a,
.studio-setup button[type="submit"],
.model-library .button,
.inspiration-library .button {
  background: #b65032 !important;
  color: #fff !important;
  border: 0 !important;
}
.design-start-gate button:hover,
.design-start-gate a:hover {
  background: #983e25 !important;
}

/* Remove redundant duplicate hero buttons — handled by opacity on the herocard buttons */
.studio-setup .studio-setup-hero-actions {
  gap: 10px;
}

/* ── 15. VOICE TOAST — NEVER BLOCKS INPUT ───────────────────────────────── */

/* Voice toast positions above the AI modal card, not over it */
.voice-live-toast {
  bottom: 86px;
  right: 20px;
  /* When AI modal is open, push toast higher */
}

body:has(#site-assistant-modal:not([hidden])) .voice-live-toast {
  bottom: calc(72px + min(540px, 72vh) + 12px);
}

/* On studio, toast stays above FAB but below 3D canvas */
body:has(#ontwerpen:not([hidden])) .voice-live-toast {
  bottom: 86px;
  right: 20px;
}

/* ── 16. AI ASSISTANT MODAL — POSITIONING & MOBILE ─────────────────────── */

/* Modal never clips viewport edges on small screens */
.site-assistant-modal {
  right: 12px !important;
  bottom: 72px;
  width: min(410px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px);
}

/* Card height on very small screens */
.site-assistant-card {
  height: min(520px, calc(100dvh - 120px));
}

/* Voice mic button in modal form — aligns with input */
.site-assistant-form {
  align-items: center;
}

/* Chips row — scroll instead of wrapping indefinitely */
.chips-row {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chips-row button {
  flex-shrink: 0;
}

/* ── 17. FAB DOCK — NEVER OVERLAPS BODY CONTENT ────────────────────────── */

/* Increase bottom clearance on mobile so FABs don't cover footer links */
@media (max-width: 760px) {
  .site-assistant-dock {
    bottom: 16px;
    right: 12px;
  }

  /* Voice button text — hide label on tiny screens if needed */
  .site-quick-voice-btn span {
    display: inline;
  }

  /* AI button text — keep visible */
  .site-assistant-btn .site-assistant-label {
    display: inline;
  }
}

/* ── 18. SAVED TOAST — AUTO DISMISS, NO PERSISTENT OVERLAY ─────────────── */

#saved:empty { display: none !important; }

/* ── 19. STUDIO RAIL — CLEAN AI TAB CHAT CLIP FIX ──────────────────────── */

/* Chat stream in studio AI — doesn't clip under header */
.studio-ai-copilot {
  overflow: hidden;
}

.studio-ai-chat-stream {
  max-height: 260px;
  overflow-y: auto;
}

/* ── 20. MISCELLANEOUS CONTENT FIXES ────────────────────────────────────── */

/* Folder page — centered card */
#folder .card.prose {
  max-width: 700px;
  margin: 0 auto;
}

/* Folder page size text — updated consistently */
/* (content fix applied via JS/HTML) */

/* Cookie modal — always wraps "Altijd actief" neatly */
.cookie-option-header {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}
.cookie-tag {
  flex-shrink: 0;
}

/* Cookie banner — consistent submit button styling */
#cookie-settings-form button[type="submit"] {
  background: #b65032;
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
#cookie-settings-form button[type="submit"]:hover {
  background: #983e25;
}

/* Ontwerp overzicht modal — consistent spacing */
.develop-overview-modal,
.design-overview {
  margin: 20px;
  border-radius: 16px;
  overflow: auto;
}

/* ── 21. ABOUT PAGE STATS ───────────────────────────────────────────────── */

@media (max-width: 760px) {
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

/* ── 22. SMOOTH TRANSITIONS EVERYWHERE ──────────────────────────────────── */

/* Page transitions */
.page {
  animation: fadeInPage 0.18s ease-out;
}
@keyframes fadeInPage {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Button press feedback — consistent */
button:active:not(:disabled) {
  transform: scale(0.98) !important;
}

/* ── 23. STUDIO LOFT KITCHEN INDICATOR ──────────────────────────────────── */

/* "Keuken onder vide" — confirm badge styling */
.loft-kitchen-indicator {
  background: #ebf7ee;
  color: #1c702b;
  border: 1px solid #c2e8c9;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}


/* ── 24. STUDIO GREEN → TERRACOTTA OVERRIDES (must be last) ─────────────── */

/* Model library filter chips — active state: terra not forest green */
.model-filters button[aria-pressed="true"],
.floor-tabs button[aria-pressed="true"] {
  background: #b65032 !important;
  color: #fff !important;
  border-color: #b65032 !important;
}

/* Model card "Selecteer" button — terra not dark green */
.model-card button {
  background: #b65032 !important;
  color: #fff !important;
  border: 0 !important;
}
.model-card button:hover {
  background: #983e25 !important;
}

/* Saved designs restore/action buttons — terra not #35543a */
.saved-design button,
#restore-design {
  background: #b65032 !important;
  color: #fff !important;
  border: 0 !important;
}
.saved-design button:hover,
#restore-design:hover {
  background: #983e25 !important;
}

/* Saved design delete — keep neutral red-tinted, not green */
.saved-design .delete-design {
  background: #fdf0ee !important;
  color: #c0392b !important;
  border: 1px solid #f5c6c0 !important;
}
.saved-design .delete-design:hover {
  background: #fce8e5 !important;
}

/* Save success toast — terra not #1d6241 */
.save-success-toast {
  background: #b65032 !important;
  color: #fff !important;
  border-color: #983e25 !important;
}

/* Resume exterior editing button — terra not #284838 */
#ontwerpen[data-mode="exterior"] .resume-opening {
  background: #b65032 !important;
  color: #fff !important;
}

/* Opening angle range track — terra accent */
#opening-angle {
  accent-color: #b65032 !important;
}

/* ── 25. POLISH: COMPLETION HEADER, PHONE CONTRAST, FULLSCREEN, AI-MODUS, PDOK, BROCHURE & MOBILE ─ */

dialog.completion > header {
  height: auto !important;
  min-height: 0 !important;
  padding: 20px 24px !important;
}

#ontwerpen .home-phone button.viewbutton,
#ontwerpen .home-phone .phone-content button {
  background: #263b40 !important;
  color: #fff !important;
  border: 1px solid #263b40 !important;
}
#ontwerpen .home-phone button.viewbutton:hover,
#ontwerpen .home-phone .phone-content button:hover {
  background: #1b2c30 !important;
}

#ontwerpen .viewer:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: 0 !important;
}
#ontwerpen .viewer:fullscreen .viewtop {
  padding: 14px 18px 8px 136px !important;
}

.option-sub-btn {
  margin-top: 8px;
  width: 100%;
  background: #f2f5f7 !important;
  color: #263b40 !important;
  border: 1px solid #d5dde3 !important;
  font-size: 13px !important;
  padding: 9px 12px !important;
  border-radius: 8px !important;
}
.option-sub-btn:hover {
  background: #e6ecf0 !important;
}

/* Canva / Google AI Mode enhancements */
#ontwerpen[data-ai-mode="true"] .studio-ai-copilot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#ontwerpen[data-ai-mode="true"] .studio-ai-chat-stream {
  min-height: 280px;
  max-height: 46vh;
}
.studio-ai-back-btn {
  background: #f4f6f8;
  color: #263b40;
  border: 1px solid #d6dee4;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.studio-ai-back-btn:hover {
  background: #e9eef2;
}

/* Energy & Roof inspector controls */
dialog.energy-dialog {
  border: 1px solid #dce2e7;
  border-radius: 16px;
  padding: 22px;
  max-width: 560px;
  width: calc(100vw - 28px);
  box-shadow: 0 24px 60px rgba(15, 25, 32, 0.25);
}
dialog.energy-dialog::backdrop {
  background: rgba(15, 25, 32, 0.55);
  backdrop-filter: blur(4px);
}
.roof-editor button,
dialog.energy-dialog button {
  border-radius: 8px;
  font-weight: 600;
}

/* Furniture category selector */
.furniture-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.furniture-filter-row select {
  flex: 1 1 180px;
}

/* PDOK Vergunningen UI */
#vergunningen .card.permit-location {
  max-width: 900px;
  margin: 0 auto 24px;
}
.permit-field {
  margin-top: 12px;
  position: relative;
}
.permit-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #25323c;
  margin-bottom: 6px;
}
.permit-autocomplete {
  position: relative;
}
.permit-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid #d7dfe5;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(18, 30, 38, 0.14);
  max-height: 240px;
  overflow-y: auto;
}
.permit-suggestion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #eef2f5;
  padding: 10px 14px;
  font-size: 13px;
  color: #25323c;
  cursor: pointer;
}
.permit-suggestion-item small {
  color: #6b7884;
  text-transform: uppercase;
  font-size: 11px;
}
.permit-suggestion-item:hover {
  background: #fdf4f0;
}
.permit-verdict {
  padding: 14px 16px;
  border-radius: 12px;
  margin-top: 12px;
  border: 1px solid #d8e2e8;
  background: #f5f8fa;
}
.permit-verdict.tone-ok {
  background: #eef8f1;
  border-color: #bde4c7;
  color: #195628;
}
.permit-verdict.tone-warn {
  background: #fff7ed;
  border-color: #fbd2a8;
  color: #8a420f;
}
.permit-place-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #5b6873;
}
.permit-checks {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}
.permit-checks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e3e9ee;
  border-radius: 10px;
  padding: 12px 14px;
}
.permit-checks .chk-icon {
  font-weight: 800;
  font-size: 14px;
  color: #1c702b;
  flex-shrink: 0;
}
.permit-checks li.is-warn .chk-icon {
  color: #b65032;
}
.permit-checks p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #556571;
}
.permit-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.permit-result-actions .button {
  flex: 1 1 200px;
  width: auto !important;
}
.permit-sec-btn {
  background: #eef2f5 !important;
  color: #25323c !important;
  border: 1px solid #d4dde3 !important;
}

/* Brochure preview & PDF print UI */
.brochure-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.brochure-spec-box {
  background: #f8fafb;
  border: 1px solid #e2e8ed;
  border-radius: 12px;
  padding: 14px;
}
.brochure-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #b65032;
  background: #fdf0ec;
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 6px;
}
.brochure-spec-box strong {
  display: block;
  font-size: 14px;
  color: #1f2d36;
  margin-bottom: 4px;
}
.brochure-spec-box p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #5b6a75;
}
.brochure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.brochure-print-btn {
  background: #263b40 !important;
  color: #fff !important;
}

/* Zero horizontal overflow on mobile viewports */
@media (max-width: 760px) {
  html, body, main, .page {
    overflow-x: clip;
    max-width: 100%;
  }
  .page > *, .card, .projectgrid, .permit-grid, .pro-hero-banner, .studio, .wizard-left {
    min-width: 0;
    max-width: 100%;
  }
  .brochure-preview-grid {
    grid-template-columns: 1fr;
  }
  .permit-result-actions, .brochure-actions {
    flex-direction: column;
  }
  #ontwerpen .wizard-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
  #ontwerpen.studio-redesigned .viewtop {
    padding: 58px 12px 6px 12px !important;
  }
  .hero-brand-group {
    flex-wrap: wrap !important;
    row-gap: 4px !important;
  }
  .hero-brand-sub {
    flex-basis: 100%;
    border-left: 0 !important;
    padding-left: 46px !important;
    font-size: 10px !important;
    letter-spacing: 1px !important;
  }
  .main-header {
    padding: 10px 12px !important;
    margin: 0 -16px 18px !important;
    gap: 6px !important;
  }
  .header-left {
    gap: 8px !important;
    min-width: 0 !important;
  }
  .header-menu-btn {
    padding: 7px 11px !important;
    font-size: 12px !important;
  }
  .header-brand-logo {
    font-size: 19px !important;
  }
  .header-cta-pill {
    padding: 7px 10px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .viewer-quick-ai-inner {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .viewer-quick-ai input {
    min-width: 0 !important;
    flex: 1 1 100% !important;
    order: -1 !important;
  }
}
