/* JerseyWiki 6.2 — island editorial system
 * Flat publication canvas, expressive type, sharp rules and selective colour.
 * This is the site-wide replacement for the former liquid-glass presentation.
 */
:root {
  --ed-paper: #f5f5f1;
  --ed-surface: #ffffff;
  --ed-surface-alt: #ededeb;
  --ed-ink: #131313;
  --ed-copy: #333333;
  --ed-muted: #626262;
  --ed-rule: #cfcfca;
  --ed-accent: #5200ff;
  --ed-accent-dark: #006c58;
  --ed-mint: #3cffd0;
  --ed-lime: #d6f31f;
  --ed-content-max: 1400px;
  --ed-page-gutter: clamp(16px, 3.2vw, 56px);
  --ed-display: Edition, "Arial Narrow", "Roboto Condensed", sans-serif;
  --ed-sans: "Arial", "Helvetica Neue", Helvetica, sans-serif;
  --ed-serif: Georgia, "Times New Roman", serif;
  --ed-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ed-section: clamp(2.75rem, 6vw, 5.5rem);
  color-scheme: light;
}

html[data-theme="dark"] {
  --ed-paper: #131313;
  --ed-surface: #202020;
  --ed-surface-alt: #2d2d2d;
  --ed-ink: #ffffff;
  --ed-copy: #e9e9e9;
  --ed-muted: #a5a5a5;
  --ed-rule: #3b3b3b;
  --ed-accent: #3cffd0;
  --ed-accent-dark: #3cffd0;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --ed-paper: #131313;
    --ed-surface: #202020;
    --ed-surface-alt: #2d2d2d;
    --ed-ink: #ffffff;
    --ed-copy: #e9e9e9;
    --ed-muted: #a5a5a5;
    --ed-rule: #3b3b3b;
    --ed-accent: #3cffd0;
    --ed-accent-dark: #3cffd0;
    color-scheme: dark;
  }
}

/* Compatibility aliases for old components. They now point at the editorial
 * palette and no longer describe translucent surfaces. */
:root {
  --lg-bg: var(--ed-paper);
  --lg-surface: var(--ed-surface);
  --lg-surface-2: var(--ed-surface-alt);
  --lg-elevated: var(--ed-surface);
  --lg-label: var(--ed-ink);
  --lg-secondary: var(--ed-muted);
  --lg-separator: var(--ed-rule);
  --lg-accent: var(--ed-accent);
  --lg-font: var(--ed-sans);
  --lg-mono: var(--ed-mono);
}

body:not(.news-context) {
  min-height: 100vh;
  background: var(--ed-paper) !important;
  color: var(--ed-ink) !important;
  font-family: var(--ed-sans) !important;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: hidden;
}

body:not(.news-context) * {
  box-shadow: none !important;
  text-shadow: none !important;
}

body:not(.news-context) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--ed-ink) !important;
  font-family: var(--ed-sans) !important;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

body:not(.news-context) h1 { font-size: clamp(3rem, 7vw, 7.2rem); }
body:not(.news-context) h2 { font-size: clamp(1.7rem, 3vw, 3rem); }
body:not(.news-context) h3 { font-size: clamp(1.15rem, 2vw, 1.65rem); }

body:not(.news-context) :is(p, li, dd) {
  color: var(--ed-copy);
  text-wrap: pretty;
}

body:not(.news-context) a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

body:not(.news-context) a:hover { color: var(--ed-accent-dark); }

body:not(.news-context) :is(.eyebrow, small, .small, .muted, time) {
  color: var(--ed-muted) !important;
}

body:not(.news-context) .eyebrow {
  font: 600 0.7rem/1.35 var(--ed-mono) !important;
  font-family: var(--ed-mono) !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body:not(.news-context) :is(button, input, select, textarea) {
  border: 1px solid var(--ed-rule) !important;
  border-radius: 2px !important;
  background: var(--ed-surface) !important;
  color: var(--ed-ink) !important;
  box-shadow: none !important;
}

body:not(.news-context) :is(button, input, select, textarea):focus-visible,
body:not(.news-context) a:focus-visible,
body:not(.news-context) summary:focus-visible {
  outline: 3px solid var(--ed-accent) !important;
  outline-offset: 3px !important;
}

body:not(.news-context) :is(.masthead, .site-header) {
  position: relative;
  z-index: 20;
  background: var(--ed-paper) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ed-rule) !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:not(.news-context) .masthead {
  width: min(var(--ed-content-max), calc(100% - 2 * var(--ed-page-gutter))) !important;
  min-height: 72px;
  height: auto;
  margin: 0 auto;
  padding: 10px 0;
  gap: 20px;
}

body:not(.news-context) .header-inner {
  width: min(var(--ed-content-max), calc(100% - 2 * var(--ed-page-gutter))) !important;
  max-width: var(--ed-content-max) !important;
  min-height: 72px;
  margin: 0 auto !important;
  padding: 10px 0 !important;
  gap: 24px;
}

body:not(.news-context) :is(.masthead, .header-inner) .brand {
  color: var(--ed-ink) !important;
  font: 800 1.35rem/0.9 var(--ed-sans) !important;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

body:not(.news-context) :is(.masthead, .header-inner) .brand small {
  margin-top: 5px;
  color: var(--ed-muted) !important;
  font: 600 0.5rem/1 var(--ed-mono) !important;
  letter-spacing: 0.08em;
}

body:not(.news-context) .island-brand,
body:not(.news-context) .brand-mark {
  width: 36px !important;
  height: 36px !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ed-accent-dark) !important;
}

body:not(.news-context) .brand-mark .icon,
body:not(.news-context) .island-brand {
  width: 32px !important;
  height: 32px !important;
}

body:not(.news-context) :is(.desktop, .desktop-nav) {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.8vw, 1.8rem);
  min-width: 0;
  font: 600 0.72rem/1 var(--ed-mono) !important;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

body:not(.news-context) :is(.desktop, .desktop-nav) a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.5rem 0 !important;
  color: var(--ed-muted) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

body:not(.news-context) :is(.desktop, .desktop-nav) a.active,
body:not(.news-context) :is(.desktop, .desktop-nav) a[aria-current="page"] {
  color: var(--ed-ink) !important;
}

body:not(.news-context) :is(.desktop, .desktop-nav) a.active::after,
body:not(.news-context) :is(.desktop, .desktop-nav) a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 3px;
  background: var(--ed-accent-dark);
  content: "";
}

body:not(.news-context) :is(.desktop, .desktop-nav) .icon {
  width: 15px;
  height: 15px;
}

body:not(.news-context) :is(.saved-link, .icon-button) {
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ed-ink) !important;
}

body:not(.news-context) .saved-link {
  min-height: 44px;
  padding: 0.5rem 0.7rem !important;
  border: 1px solid var(--ed-rule) !important;
  font: 600 0.7rem/1 var(--ed-mono) !important;
  text-transform: uppercase;
}

body:not(.news-context) .saved-count {
  border-radius: 0 !important;
  background: var(--ed-mint) !important;
  color: #111 !important;
}

body:not(.news-context) > #main {
  width: min(var(--ed-content-max), calc(100% - 2 * var(--ed-page-gutter))) !important;
  max-width: var(--ed-content-max) !important;
  min-height: 0;
  margin-inline: auto !important;
  padding: 0 !important;
}

body:not(.news-context) > #main > :is(.page-shell, .article, .section, .home-today-layout, .island-atlas, .parish-guide, .wx, .travel, .airport-page, .flight-page, .whats-on, .design-lab) {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

body:not(.news-context) .page-shell { padding-block: clamp(2rem, 5vw, 4.5rem) !important; }
body:not(.news-context) :is(.breadcrumbs, .jw-breadcrumbs) { display: none !important; }

body:not(.news-context) :is(.page-heading, .place-title, .article-heading) {
  max-width: 1040px;
  padding: clamp(2rem, 5vw, 4.5rem) 0 2rem !important;
  margin: 0 0 1.5rem !important;
  border-bottom: 3px solid var(--ed-ink) !important;
}

body:not(.news-context) :is(.page-heading, .place-title, .article-heading) h1 {
  max-width: 16ch;
  margin: 0;
  font: 800 clamp(3.2rem, 7vw, 7rem)/0.92 var(--ed-display) !important;
  letter-spacing: -0.06em;
}

body:not(.news-context) .page-heading > p:last-child {
  max-width: 54ch;
  margin-top: 1.25rem;
  font: 1.18rem/1.45 var(--ed-serif) !important;
}

body:not(.news-context) .article { max-width: none !important; padding: 0 !important; }

body:not(.news-context) .article-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 !important;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ed-rule);
  font: 600 0.7rem/1.3 var(--ed-mono) !important;
  text-transform: uppercase;
}

body:not(.news-context) .article-top :is(button, a) {
  min-height: 36px;
  padding: 0.35rem 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ed-accent-dark) !important;
  text-decoration: underline;
}

body:not(.news-context) .article-heading .aliases {
  margin-top: 1rem;
  font: 0.8rem/1.45 var(--ed-mono) !important;
}

body:not(.news-context) :is(.article-hero, .place-hero, .parish-hero-banner) {
  border-radius: 0 !important;
  border: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
}

body:not(.news-context) .article-hero {
  max-width: 1160px;
  margin: 0 0 2.5rem;
}

body:not(.news-context) .article-hero img {
  width: 100%;
  max-height: 48rem;
  border-radius: 0 !important;
  object-fit: cover;
}

body:not(.news-context) :is(.article-body, .prose) {
  max-width: 72ch;
  font-family: var(--ed-serif) !important;
  font-size: 1.16rem;
  line-height: 1.72;
}

body:not(.news-context) .article-body .lead {
  max-width: 62ch;
  font: 1.35rem/1.45 var(--ed-serif) !important;
}

body:not(.news-context) :is(.article-body section, .article-section, .prose section) {
  margin-top: clamp(2rem, 4vw, 3.75rem);
  padding-top: 1rem;
  border-top: 2px solid var(--ed-ink);
}

body:not(.news-context) :is(.article-body section h2, .article-section h2, .prose section h2) {
  margin-bottom: 1rem;
  font: 800 clamp(1.7rem, 3vw, 3rem)/1 var(--ed-sans) !important;
}

body:not(.news-context) .article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(16rem, 0.8fr);
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1200px;
  margin: 2rem 0 0;
}

body:not(.news-context) .practical {
  align-self: start;
  position: sticky;
  top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ed-ink);
  font: 0.95rem/1.5 var(--ed-sans) !important;
}

body:not(.news-context) .practical:empty { display: none !important; }

body:not(.news-context) .article-end {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ed-rule);
}

body:not(.news-context) :is(.article-end .button, .button) {
  min-height: 42px;
  border: 1px solid var(--ed-ink) !important;
  border-radius: 0 !important;
  background: var(--ed-ink) !important;
  color: var(--ed-paper) !important;
  font: 600 0.7rem/1.1 var(--ed-mono) !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body:not(.news-context) .button.secondary {
  background: transparent !important;
  color: var(--ed-ink) !important;
}

body:not(.news-context) :is(.card, .place-card, .category-card, .visit-card, .about-card, .sidebar-note, .research-callout, .empty-state, .notice, .directory-filters, .weather-card, .transport-card, .travel-grid > div, .atlas-grid article, .reading-tools) {
  border: 1px solid var(--ed-rule) !important;
  border-radius: 0 !important;
  background: var(--ed-surface) !important;
  box-shadow: none !important;
}

body:not(.news-context) :is(.category-card, .place-card, .news-list > a, .event-card, .tool-grid > a, .guide-card) {
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease !important;
}

body:not(.news-context) :is(.category-card, .place-card, .news-list > a, .event-card, .tool-grid > a, .guide-card):hover {
  transform: none !important;
  border-color: var(--ed-accent-dark) !important;
}

body:not(.news-context) :is(.section, .home-tools, .weather, .research-invitation, .island-guide > section) {
  margin-top: var(--ed-section);
  padding-top: 1rem;
  border-top: 2px solid var(--ed-ink);
}

body:not(.news-context) :is(.section-heading, .news-section-heading) {
  align-items: baseline;
  margin-bottom: 1.25rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--ed-rule);
}

body:not(.news-context) :is(.section-heading h2, .news-section-heading h2) {
  font: 800 clamp(1.7rem, 3vw, 2.7rem)/1 var(--ed-sans) !important;
}

body:not(.news-context) :is(.parish-hero-banner, .hero, .embrasure-hero) {
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--ed-ink) !important;
  box-shadow: none !important;
}

body:not(.news-context) .parish-hero-banner {
  min-height: clamp(18rem, 35vw, 30rem);
  margin-bottom: 1rem;
}

body:not(.news-context) .parish-hero-banner::after {
  background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / 0.78)) !important;
}

body:not(.news-context) .parish-hero-banner figcaption strong { display: none !important; }

body:not(.news-context) .parish-stats {
  gap: 0;
  border-block: 1px solid var(--ed-rule);
}

body:not(.news-context) .parish-stats div {
  border: 0 !important;
  border-right: 1px solid var(--ed-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 1rem;
}

body:not(.news-context) .parish-stats div:last-child { border-right: 0 !important; }
body:not(.news-context) .parish-stats strong { font-family: var(--ed-display) !important; }

body:not(.news-context) :is(.parish-today, .parish-agenda, .parish-discoveries, .parish-shelves) {
  gap: 0;
  border-block: 1px solid var(--ed-rule);
}

body:not(.news-context) :is(.parish-today > *, .parish-agenda section, .parish-discoveries, .parish-discovery-columns > div, .parish-shelves section, .parish-explore) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body:not(.news-context) .parish-today > a {
  background: var(--ed-violet, #5200ff) !important;
  color: #fff !important;
}

body:not(.news-context) :is(.parish-discovery-columns > div + div, .parish-agenda section + section, .parish-today > div + div, .parish-shelves section + section) {
  border-left: 1px solid var(--ed-rule) !important;
}

body:not(.news-context) :is(.footer, .site-footer) {
  width: min(var(--ed-content-max), calc(100% - 2 * var(--ed-page-gutter))) !important;
  max-width: var(--ed-content-max) !important;
  margin: var(--ed-section) auto 0 !important;
  padding: 2rem 0 1rem !important;
  border-top: 2px solid var(--ed-ink) !important;
  background: transparent !important;
  color: var(--ed-muted) !important;
  font: 0.72rem/1.5 var(--ed-mono) !important;
}

body:not(.news-context) :is(.footer, .site-footer) .brand,
body:not(.news-context) .footer-brand {
  color: var(--ed-ink) !important;
  font-family: var(--ed-sans) !important;
}

body:not(.news-context) :is(.tabbar, .bottom-nav) {
  border-top: 1px solid var(--ed-rule) !important;
  border-radius: 0 !important;
  background: var(--ed-paper) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:not(.news-context) :is(.tabbar a, .tabbar button, .bottom-nav a, .bottom-nav button) {
  color: var(--ed-muted) !important;
  border-radius: 0 !important;
}

body:not(.news-context) :is(.tabbar .active, .tabbar .selected, .bottom-nav .active, .bottom-nav .selected) {
  color: var(--ed-accent-dark) !important;
}

body:not(.news-context) :is(.sheet, .lg-sheet, dialog) {
  border: 2px solid var(--ed-ink) !important;
  border-radius: 0 !important;
  background: var(--ed-paper) !important;
  color: var(--ed-ink) !important;
}

body:not(.news-context) :is(.sheet, .lg-sheet)::backdrop,
body:not(.news-context) dialog::backdrop {
  background: rgb(19 19 19 / 0.7) !important;
  backdrop-filter: none !important;
}

body:not(.news-context) .lg-scroll-edge { display: none !important; }

@media (max-width: 900px) {
  body:not(.news-context) .article-grid {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.55fr);
    gap: 2rem;
  }
  body:not(.news-context) :is(.desktop, .desktop-nav) { gap: 0.8rem; }
}

@media (max-width: 700px) {
  body:not(.news-context) :is(.masthead, .header-inner) {
    min-height: 64px;
    padding-block: 8px !important;
  }
  body:not(.news-context) :is(.desktop, .desktop-nav) { display: none; }
  body:not(.news-context) .article-grid { display: block; }
  body:not(.news-context) .practical { position: static; margin-top: 2rem; }
  body:not(.news-context) :is(.page-heading, .place-title, .article-heading) { padding-block: 2.2rem 1.4rem !important; }
  body:not(.news-context) :is(.page-heading, .place-title, .article-heading) h1 {
    max-width: none;
    font-size: clamp(3rem, 14vw, 5rem) !important;
  }
  body:not(.news-context) .article-body { font-size: 1.08rem; line-height: 1.65; }
  body:not(.news-context) :is(.parish-today, .parish-agenda, .parish-discoveries, .parish-shelves) { display: block; }
  body:not(.news-context) :is(.parish-discovery-columns > div + div, .parish-agenda section + section, .parish-today > div + div, .parish-shelves section + section) {
    border-top: 1px solid var(--ed-rule) !important;
    border-left: 0 !important;
  }
  body:not(.news-context) .parish-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.news-context) .parish-stats div:nth-child(2n) { border-right: 0 !important; }
  body:not(.news-context) .parish-stats div:nth-child(n + 3) { border-top: 1px solid var(--ed-rule) !important; }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.news-context) *,
  body:not(.news-context) *::before,
  body:not(.news-context) *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body:not(.news-context) :is(.masthead, .site-header, .tabbar, .bottom-nav, .footer, .site-footer, .article-top, .article-actions, .reading-tools) {
    display: none !important;
  }
}
