/* Baja: Sand and Sea. Internal light/dark values retain saved preferences. */
.n-header .n-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 2px;
  color: inherit;
  border: 0;
  background: none;
  white-space: nowrap;
}
.n-theme-toggle svg { width: 24px; height: 24px; flex: 0 0 auto; }
.n-theme-label { font-size: 11px; line-height: 1; letter-spacing: .035em; }
.n-theme-toggle .n-theme-icon-wave { display: none; }
html[data-theme="light"] .n-theme-toggle .n-theme-icon-desert { display: none; }
html[data-theme="light"] .n-theme-toggle .n-theme-icon-wave { display: block; }
.n-theme-toggle:hover { color: var(--n-gold); }
.n-hero-image-day, .n-page-hero-image-day { display: none; }

@media (max-width: 1100px) {
  .n-theme-label { display: none; }
  .n-header-tools { gap: 12px; }
}
@media (max-width: 600px) {
  .n-header { gap: 8px; padding-inline: 14px; }
  .n-header-tools { gap: 5px; }
  .n-header-tools .n-tool-rule { display: none; }
  .n-header .n-theme-toggle { min-width: 40px; padding-inline: 0; }
}
@media (max-width: 375px) {
  .n-header .n-brand-name { font-size: 21px; letter-spacing: .11em; }
  .n-header .n-brand-sub { font-size: 5.5px; letter-spacing: .13em; }
}

/* Screen-only palette keeps the guides' existing economical print treatment. */
@media screen {
  html[data-theme="light"] {
    --n-bg: #f5eddf;
    --n-paper: #3c342b;
    --n-muted: #6b6053;
    --n-gold: #815b35;
    --n-line: rgba(85, 76, 58, .23);
    --n-surface: #e9decb;
    color-scheme: light;
  }
  html[data-theme="light"] body { background: var(--n-bg); color: var(--n-paper); }
  html[data-theme="light"] ::selection { background: #d7c5a3; color: #17221c; }
  html[data-theme="light"] :is(button, a, summary, input, select, textarea):focus-visible {
    outline-color: #815b35;
  }

  /* Limestone glass: a bright edge, bronze hairline, and quiet depth. */
  html[data-theme="light"] .n-header {
    color: #3c342b;
    background: linear-gradient(115deg, rgba(255, 253, 246, .91), rgba(246, 243, 234, .77));
    border-color: rgba(116, 103, 76, .29);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .85) inset, 0 12px 35px rgba(41, 48, 38, .07);
  }
  html[data-theme="light"] .n-header.is-scrolled {
    background: rgba(249, 247, 241, .96);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .85) inset, 0 10px 32px rgba(41, 48, 38, .09);
  }
  html[data-theme="light"] .n-brand-name { color: #3c342b; }
  html[data-theme="light"] .n-brand-sub { color: #5e6459; }
  html[data-theme="light"] .n-menu {
    color: var(--n-paper);
    background: rgba(248, 245, 237, .98);
    border-color: rgba(116, 103, 76, .28);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .85) inset, 0 24px 65px rgba(40, 48, 37, .16);
  }
  html[data-theme="light"] .n-menu-note { color: var(--n-muted); }

  /* Daylight is a distinct photograph, with a soft ivory field behind the type. */
  html[data-theme="light"] :is(.n-hero-image-night, .n-page-hero-image-night) { display: none; }
  html[data-theme="light"] :is(.n-hero-image-day, .n-page-hero-image-day) { display: block; }
  html[data-theme="light"] .n-hero { background: #d8ded5; }
  html[data-theme="light"] .n-hero-image {
    filter: saturate(.72) brightness(1.04);
    object-position: center 54%;
    background: #e4e7df;
  }
  html[data-theme="light"] .n-hero-shade {
    background:
      radial-gradient(ellipse 68% 54% at 50% 43%, rgba(248, 245, 235, .96) 0%, rgba(248, 245, 235, .84) 42%, rgba(248, 245, 235, .18) 100%),
      linear-gradient(180deg, rgba(245, 237, 223, .20) 0%, rgba(245, 237, 223, .09) 55%, rgba(245, 237, 223, .36) 77%, #f5eddf 100%);
  }
  html[data-theme="light"] .n-hero h1 { color: #3c342b; text-shadow: 0 2px 28px rgba(255, 253, 247, .22); }
  html[data-theme="light"] .n-hero h1 em { color: #7b603b; }
  html[data-theme="light"] .n-hero-kicker p { color: #514d3f; font-weight: 600; }
  html[data-theme="light"] .n-hero-kicker > span { background: rgba(107, 88, 56, .46); }
  html[data-theme="light"] .n-hero-copy { color: #51483d; }
  html[data-theme="light"] .n-hero-proof { color: #4f584c; }
  html[data-theme="light"] .n-hero-link { color: #3c342b; }
  html[data-theme="light"] .n-outline-link {
    border-color: #95866b;
    background: rgba(255, 253, 247, .24);
    color: var(--n-paper);
  }
  html[data-theme="light"] .n-outline-link:hover {
    background: #785331;
    border-color: #785331;
    color: #f8f4e9;
  }
  html[data-theme="light"] .n-hero .n-outline-link {
    background: #785331;
    border-color: #785331;
    color: #fbf7ee;
    box-shadow: 0 8px 24px rgba(29, 49, 36, .12);
  }
  html[data-theme="light"] .n-hero .n-outline-link:hover { background: #624329; border-color: #624329; }
  html[data-theme="light"] .n-hero .n-text-link { color: #3c342b; border-color: rgba(70, 78, 62, .42); }
  html[data-theme="light"] .n-hero .n-text-link:hover { color: #765a32; border-color: #765a32; }

  /* Daytime image panels keep the architecture present above a pale reading field. */
  html[data-theme="light"] .n-journey { background: #e3e2d7; border-color: #d5cdbb; }
  html[data-theme="light"] .n-journey > img { filter: saturate(.76) brightness(1.04); }
  html[data-theme="light"] .n-journey-shade {
    background: linear-gradient(180deg, rgba(248, 245, 235, .02) 0%, rgba(248, 245, 235, .36) 25%, rgba(248, 245, 235, .92) 57%, #f4f0e5 100%);
  }
  html[data-theme="light"] .n-journey p:not(.n-eyebrow) { color: #625647; }
  html[data-theme="light"] .n-property-image { background: #e6e2d5; }
  html[data-theme="light"] .n-property-image img { filter: saturate(.83) brightness(1.025); }
  html[data-theme="light"] .n-property-image:hover img { filter: saturate(.95) brightness(1.035); }
  html[data-theme="light"] .n-property-tag {
    background: rgba(251, 248, 239, .93);
    color: #354336;
    border-color: rgba(133, 117, 85, .35);
  }
  html[data-theme="light"] .n-property-go { background: rgba(251, 248, 239, .88); color: #354336; border-color: rgba(133, 117, 85, .4); }
  html[data-theme="light"] .n-peninsula { background: #e8ddc8; }
  html[data-theme="light"] .n-peninsula-background img { filter: saturate(.65) brightness(1.08); }
  html[data-theme="light"] .n-peninsula-background::after {
    background: linear-gradient(90deg, rgba(244, 243, 233, .96), rgba(235, 237, 225, .82));
  }
  html[data-theme="light"] .n-peninsula h2 em { color: var(--n-gold); }
  html[data-theme="light"] .n-peninsula-copy,
  html[data-theme="light"] .n-region-list p { color: #4c5b4e; }
  html[data-theme="light"] .n-region-list small { color: #596652; }
  html[data-theme="light"] .n-region-list a { border-color: rgba(72, 91, 67, .3); }
  html[data-theme="light"] .n-editorial-media { background: #e4dfd1; }
  html[data-theme="light"] .n-editorial-media > img { filter: saturate(.8) brightness(1.03); }
  html[data-theme="light"] .n-image-note { background: rgba(249, 246, 236, .92); color: #4d5648; border: 1px solid rgba(135, 119, 85, .26); }
  html[data-theme="light"] .n-monogram { background: #eee8da; border-color: #c9baa0; }

  /* Interior mastheads fade naturally into the warm paper of the reading pages. */
  html[data-theme="light"] .n-page-hero { background: #e9e6db; }
  html[data-theme="light"] .n-page-hero-image { filter: saturate(.65) brightness(1.04); object-position: center 48%; }
  html[data-theme="light"] .n-page-hero-shade {
    background:
      linear-gradient(90deg, rgba(245, 237, 223, .98) 0%, rgba(245, 237, 223, .91) 42%, rgba(245, 237, 223, .25) 100%),
      linear-gradient(180deg, rgba(245, 237, 223, .12) 0%, rgba(245, 237, 223, .12) 40%, #f5eddf 100%);
  }
  html[data-theme="light"] .n-breadcrumb { color: #5b6256; }
  html[data-theme="light"] .n-breadcrumb a { text-decoration-color: #b09b79; }
  html[data-theme="light"] .n-page-intro { color: #625647; }
  html[data-theme="light"] .n-page-toc a { color: #5b6256; }
  html[data-theme="light"] .n-page-toc a:hover { color: #765a32; }
  html[data-theme="light"] .n-copy-section p,
  html[data-theme="light"] .n-prose p,
  html[data-theme="light"] .n-clean-list li,
  html[data-theme="light"] .n-step-list > li,
  html[data-theme="light"] .n-step-list p,
  html[data-theme="light"] .n-timeline > div > span,
  html[data-theme="light"] .n-area-communities > p { color: #625647; }
  html[data-theme="light"] .n-copy-section .n-eyebrow { color: var(--n-gold); }
  html[data-theme="light"] .n-clean-list li { border-color: rgba(116, 103, 77, .18); }
  html[data-theme="light"] .n-resource-card {
    background: linear-gradient(135deg, #fffdf6, #eee8da);
    border-color: #d6ccb9;
    box-shadow: 0 1px 0 #fffdf9 inset;
  }
  html[data-theme="light"] .n-callout { background: #ece7da; border-left-color: #977646; }
  html[data-theme="light"] .n-empty-state { background: #efebdf; border-color: #d3c9b7; }
  html[data-theme="light"] .n-faq-list details[open] summary { color: #765a32; }
  html[data-theme="light"] .n-faq-list details > div,
  html[data-theme="light"] .n-faq-list details > p { color: #625647; }

  /* Inputs are ivory insets, with readable native options and visible focus. */
  html[data-theme="light"] .n-filter-bar label,
  html[data-theme="light"] .n-form label,
  html[data-theme="light"] .n-faq-search,
  html[data-theme="light"] .n-faq-search label { color: #465241; }
  html[data-theme="light"] .n-filter-bar input,
  html[data-theme="light"] .n-filter-bar select,
  html[data-theme="light"] .n-form input,
  html[data-theme="light"] .n-form select,
  html[data-theme="light"] .n-form textarea,
  html[data-theme="light"] .n-faq-search input {
    background: #fffdf7;
    border-color: #b5ac98;
    color: #3c342b;
    box-shadow: 0 1px 3px rgba(81, 73, 53, .025) inset;
  }
  html[data-theme="light"] :is(.n-filter-bar, .n-form, .n-faq-search) :is(input, select, textarea):hover { border-color: #815b35; }
  html[data-theme="light"] :is(.n-filter-bar, .n-form, .n-faq-search) :is(input, textarea)::placeholder { color: #707367; opacity: 1; }
  html[data-theme="light"] .n-filter-bar option,
  html[data-theme="light"] .n-form option { background: #fffdf7; color: #3c342b; }
  html[data-theme="light"] .n-inquiry-result { background: #efebdf; border-color: #d0c4ae; }
  html[data-theme="light"] .n-inquiry-preview,
  html[data-theme="light"] .n-inquiry-preview pre,
  html[data-theme="light"] pre.n-inquiry-preview { color: #374737; }

  /* The property viewer uses the same paper and glass materials as the site. */
  html[data-theme="light"] .n-dialog { background: #f8f5ed; border-color: #b6a582; box-shadow: 0 30px 110px rgba(23, 38, 26, .3); }
  html[data-theme="light"] .n-dialog::backdrop { background: rgba(35, 45, 35, .57); }
  html[data-theme="light"] .n-dialog-close { background: rgba(250, 247, 237, .96); border-color: #a69980; color: #785331; }
  html[data-theme="light"] .n-gallery { background: #e0e0d3; }
  html[data-theme="light"] .n-gallery > .n-small {
    background: rgba(250, 247, 237, .95);
    color: #414e3e;
    border: 1px solid rgba(139, 124, 91, .35);
  }
  html[data-theme="light"] .n-gallery-controls button,
  html[data-theme="light"] .n-gallery .n-controls button { background: rgba(250, 247, 237, .96); border-color: #a69980; color: #785331; }
  html[data-theme="light"] .n-gallery-controls span,
  html[data-theme="light"] .n-gallery .n-controls span { background: rgba(250, 247, 237, .94); color: #414e3e; }
  html[data-theme="light"] .n-dialog-content p:not(.n-eyebrow) { color: #625647; }
  html[data-theme="light"] .n-footer-grid a:not(.n-brand) { color: #515e4e; }
  html[data-theme="light"] .n-footer-grid a:hover { color: #765a32; }
  html[data-theme="light"] .n-contact-float {
    background: #785331;
    border-color: #51654e;
    color: #faf6e9;
    box-shadow: 0 7px 25px rgba(40, 59, 43, .17);
  }
  html[data-theme="light"] .n-contact-float:hover { background: #624329; }

  @media (max-width: 600px) {
    html[data-theme="light"] .n-hero-image { object-position: 55% center; }
    html[data-theme="light"] .n-hero-shade {
      background:
        radial-gradient(ellipse 100% 65% at 50% 44%, rgba(248, 245, 235, .96) 0%, rgba(248, 245, 235, .9) 46%, rgba(248, 245, 235, .32) 100%),
        linear-gradient(180deg, rgba(245, 237, 223, .16) 0%, rgba(245, 237, 223, .1) 60%, #f5eddf 100%);
    }
    html[data-theme="light"] .n-page-hero-shade {
      background: linear-gradient(90deg, rgba(245, 237, 223, .94), rgba(245, 237, 223, .78)), linear-gradient(180deg, transparent 10%, #f5eddf 100%);
    }
    html[data-theme="light"] .n-peninsula-background::after { background: rgba(242, 242, 230, .91); }
  }
}

@media (prefers-reduced-motion: no-preference) {
  body { transition: color .22s ease, background-color .22s ease; }
  .n-theme-toggle { transition: color .2s ease; }
}

/* Sea: deep Gulf blue, pale sea glass, and warm shell-white type. */
@media screen {
  html[data-theme="dark"] {
    --n-bg: #091f2b; --n-surface: #102e3b; --n-paper: #f0eee5;
    --n-muted: #b5cbd0; --n-gold: #96cec7; --n-line: rgba(175,218,220,.24);
    color-scheme: dark;
  }
  html[data-theme="dark"] body { background: var(--n-bg); color: var(--n-paper); }
  html[data-theme="dark"] ::selection { background: #96cec7; color: #091f2b; }
  html[data-theme="dark"] .n-header { background: linear-gradient(115deg,rgba(9,31,43,.88),rgba(24,61,73,.73)); border-color: rgba(174,216,222,.35); }
  html[data-theme="dark"] .n-header.is-scrolled { background: rgba(9,31,43,.96); }
  html[data-theme="dark"] .n-hero-shade { background: linear-gradient(180deg,#091f2b66,#091f2b55 28%,#091f2b88 66%,#091f2b); }
  html[data-theme="dark"] .n-page-hero-shade { background: linear-gradient(90deg,#091f2bee 8%,#091f2b66 90%),linear-gradient(180deg,#091f2b22 38%,#091f2b); }
  html[data-theme="dark"] :is(.n-hero,.n-page-hero,.n-journey,.n-peninsula,.n-property-image,.n-editorial-media,.n-dialog,.n-gallery) { background-color: var(--n-surface); }
  html[data-theme="dark"] .n-journey-shade { background: linear-gradient(180deg,#091f2b11 15%,#091f2bcc 65%,#091f2bf5); }
  html[data-theme="dark"] .n-peninsula-background::after { background: linear-gradient(90deg,#091f2bf2,#123f50bb); }
  html[data-theme="dark"] :is(.n-hero h1 em,.n-peninsula h2 em) { color: var(--n-gold); }
  html[data-theme="dark"] :is(.n-page-intro,.n-copy-section p,.n-prose p,.n-clean-list li,.n-step-list p,.n-step-list > li,.n-page-toc a,.n-breadcrumb,.n-region-list p,.n-region-list small,.n-footer-grid a,.n-footer-bottom) { color: var(--n-muted); }
  html[data-theme="dark"] .n-copy-section .n-eyebrow { color: var(--n-gold); }
  html[data-theme="dark"] :is(.n-contact-float,.n-gallery-controls button) { background: #96cec7; color: #091f2b; border-color: #b5dfd9; }
  html[data-theme="dark"] .n-contact-float:hover { background: #b5dfd9; }
  html[data-theme="dark"] :is(.n-property-tag,.n-image-note,.n-dialog-close) { background: rgba(9,31,43,.92); color: var(--n-paper); }
  html[data-theme="dark"] :is(.n-form,.n-filter-bar,.n-faq-search) :is(input,select,textarea),
  html[data-theme="dark"] :is(.n-form,.n-filter-bar) option { background: #102e3b; color: var(--n-paper); border-color: var(--n-line); }
  html[data-theme="dark"] :is(.n-resource-card,.n-callout,.n-empty-state,.n-inquiry-result) { background: #102e3b; }
  html[data-theme="dark"] .n-beta .n-header .n-menu.menu-panel { background: linear-gradient(130deg,rgba(26,65,79,.96),rgba(9,31,43,.95)); border-color: rgba(175,218,220,.4); }
  html[data-theme="light"] .n-beta .n-header .n-menu.menu-panel { color: #3c342b; background: linear-gradient(135deg,rgba(255,248,234,.96),rgba(237,224,202,.95)); }
}
