/* LocalMean shared visual standard — derived from the Jamaica regional build. */
:root {
  --paper: #f7f3e8;
  --canvas: #f7f3e8;
  --surface: #fffdf7;
  --surface-2: #eee8d9;
  --ink: #171915;
  --muted: #62675d;
  --line: #d7d1c2;
  --blue: #0f5a3a;
  --blue-dark: #0a422b;
  --green: #0f5a3a;
  --green-2: #0a422b;
  --gold: #d2a21f;
  --red: #a63b2b;
  --pill: #eee8d9;
  --shadow-sm: 0 12px 34px rgba(45, 38, 24, .08);
  --shadow-lg: 0 22px 72px rgba(45, 38, 24, .12);
  --radius: 20px;
  --wide: 1180px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #151713;
  --canvas: #151713;
  --surface: #1d201b;
  --surface-2: #262a23;
  --ink: #f4f0e6;
  --muted: #b4b9ae;
  --line: #3d4339;
  --blue: #78d5a9;
  --blue-dark: #a7e6c7;
  --green: #78d5a9;
  --green-2: #a7e6c7;
  --gold: #edc453;
  --red: #ff9c8f;
  --pill: #262a23;
  --shadow-sm: 0 12px 34px rgba(0, 0, 0, .22);
  --shadow-lg: 0 24px 76px rgba(0, 0, 0, .34);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body.jamaica-standard {
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}
body.jamaica-standard main { min-width: 0; }
body.jamaica-standard a { text-underline-offset: .22em; }
body.jamaica-standard ::selection { background: color-mix(in srgb, var(--green) 24%, transparent); color: var(--ink); }
body.jamaica-standard :focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 30%, transparent); outline-offset: 3px; }

body.jamaica-standard .site-shell { width: min(1180px, calc(100% - 32px)); }
body.jamaica-standard .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(18px);
}
body.jamaica-standard .header-inner { min-height: 72px; gap: 24px; }
body.jamaica-standard .brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: -.04em;
  text-decoration: none;
}
body.jamaica-standard .brand-mark { display: none !important; }
body.jamaica-standard .brand small {
  color: var(--green);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.jamaica-standard .header-nav { gap: 20px; }
body.jamaica-standard .header-nav a {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 750;
}
body.jamaica-standard .header-nav a:hover,
body.jamaica-standard .header-nav a:focus-visible { color: var(--ink); }
body.jamaica-standard .header-contribute,
body.jamaica-standard .primary-action,
body.jamaica-standard .primary-button {
  border-radius: 999px !important;
  background: var(--green-2) !important;
  color: #fffdf7 !important;
  box-shadow: none !important;
}
body.jamaica-standard .theme-toggle,
body.jamaica-standard .nav-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
}
body.jamaica-standard .theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
body.jamaica-standard .theme-toggle svg { width: 18px; height: 18px; }

body.jamaica-standard .hero-section { padding-top: clamp(64px, 9vw, 112px); }
body.jamaica-standard .hero-grid { gap: clamp(42px, 7vw, 92px); }
body.jamaica-standard :is(.hero-title, .term-title, .region-title, .page-title) {
  color: var(--ink);
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.06em;
}
body.jamaica-standard .hero-title { font-size: clamp(3.7rem, 8.2vw, 7rem); }
body.jamaica-standard .hero-title em { color: var(--green); }
body.jamaica-standard .hero-copy,
body.jamaica-standard .lede { color: var(--muted); }
body.jamaica-standard .eyebrow { color: var(--green); }
body.jamaica-standard .eyebrow-light { color: color-mix(in srgb, var(--green) 68%, white); }

body.jamaica-standard :is(.hero-definition, .region-card, .topic-card, .field-note, .preview-panel, .practice-demo, .reference-card, .place-card, .coverage-card, .saved-card, .review-card, .studio-card, .changeset-card, .quiz-card, .panel, .sidebar-card) {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}
body.jamaica-standard :is(.hero-definition, .preview-panel) { box-shadow: var(--shadow-lg); }
body.jamaica-standard .hero-definition { transform: rotate(1deg); }
body.jamaica-standard .hero-definition::before { display: none; }
body.jamaica-standard :is(.region-card, .topic-card, .field-note, .place-card, .reference-card) {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.jamaica-standard :is(.region-card, .topic-card, .field-note, .place-card, .reference-card):hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
}
body.jamaica-standard .region-monogram { border-radius: 12px; border-color: var(--green); color: var(--green); }
body.jamaica-standard :is(.region-card h3, .topic-card strong, .field-note h3, .preview-term, .definition-term-row dfn) {
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-weight: 500;
}
body.jamaica-standard :is(.region-code, .definition-location, .preview-location, .field-note-meta span:first-child) { color: var(--green); }
body.jamaica-standard :is(.region-terms a, .topic-pills a, .filter-button, .pill) {
  border-radius: 999px;
  border-color: var(--line);
  background: var(--surface-2);
}

body.jamaica-standard .global-search-control,
body.jamaica-standard :is(input, textarea, select) {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}
body.jamaica-standard .global-search-control { min-height: 60px; box-shadow: var(--shadow-sm); }
body.jamaica-standard .global-search-control:focus-within,
body.jamaica-standard :is(input, textarea, select):focus {
  border-color: var(--green);
  outline: 3px solid color-mix(in srgb, var(--green) 20%, transparent);
}
body.jamaica-standard .global-search-results { border-radius: 14px; border-color: var(--line); background: var(--surface); }
body.jamaica-standard .search-result:hover,
body.jamaica-standard .search-result:focus { background: var(--surface-2); }

body.jamaica-standard :is(.dictionary-section, .topic-home-section, .field-notes-section, .practice-home-section, .editorial-trust-section, .reference-desk-section) {
  padding-block: clamp(70px, 9vw, 112px);
}
body.jamaica-standard .meaning-section,
body.jamaica-standard .method-section,
body.jamaica-standard .term-ribbon-section { border-color: var(--line); }
body.jamaica-standard :is(.meaning-section, .method-section) { background: var(--surface-2); }
body.jamaica-standard .method-section { background: var(--ink); color: var(--paper); }
body.jamaica-standard .method-section .eyebrow { color: var(--gold); }
body.jamaica-standard .method-section p { color: color-mix(in srgb, var(--paper) 76%, transparent); }
body.jamaica-standard .section-heading-row h2,
body.jamaica-standard .meaning-intro h2,
body.jamaica-standard .practice-home-copy h2,
body.jamaica-standard .method-heading h2,
body.jamaica-standard .editorial-trust-copy h2 {
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.05em;
}
body.jamaica-standard .section-heading-row > p,
body.jamaica-standard .section-heading-row p,
body.jamaica-standard .editorial-trust-copy > p { color: var(--muted); }

body.jamaica-standard .page,
body.jamaica-standard .page-wide { padding-top: clamp(36px, 6vw, 70px); }
body.jamaica-standard .breadcrumbs { margin-bottom: clamp(36px, 6vw, 62px); }
body.jamaica-standard .breadcrumbs a { color: var(--green); }
body.jamaica-standard :is(.page h1, .page h2, .page h3) { text-wrap: balance; }
body.jamaica-standard :is(.page p, .page li, .region-card p, .field-note p, .topic-card p) { overflow-wrap: anywhere; }

body.jamaica-standard .browser-voice-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
body.jamaica-standard .browser-voice-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
}
body.jamaica-standard .browser-voice-button svg { width: 18px; height: 18px; }
body.jamaica-standard .browser-voice-button:hover,
body.jamaica-standard .browser-voice-button:focus-visible,
body.jamaica-standard .browser-voice-button.is-speaking {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}
body.jamaica-standard .browser-voice-button[disabled] { cursor: not-allowed; opacity: .62; }
body.jamaica-standard .browser-voice-note { max-width: 460px; color: var(--muted); font-size: .78rem; }

body.jamaica-standard .site-footer { border-top-color: var(--line); background: var(--surface-2); }
body.jamaica-standard .footer-brand { color: var(--ink); font-family: Georgia, Cambria, "Times New Roman", serif; }
body.jamaica-standard .footer-links a { color: var(--muted); }
body.jamaica-standard .footer-links a:hover { color: var(--ink); }

@media (max-width: 900px) {
  body.jamaica-standard .hero-definition { max-width: 660px; transform: none; }
  body.jamaica-standard .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body.jamaica-standard .site-shell { width: min(100% - 22px, 1180px); }
  body.jamaica-standard .header-nav {
    inset: 73px 0 auto;
    padding: 16px 12px 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  body.jamaica-standard .header-nav a {
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    overflow-wrap: anywhere;
  }
  body.jamaica-standard .header-contribute { grid-column: 1 / -1; text-align: center; }
  body.jamaica-standard .theme-toggle { justify-self: start; }
  body.jamaica-standard .hero-section { padding-top: 52px; }
  body.jamaica-standard .hero-title { font-size: clamp(3.25rem, 15vw, 5.4rem); }
  body.jamaica-standard .hero-stats { margin-top: 44px; }
  body.jamaica-standard :is(.section-heading-row, .meaning-grid, .method-grid, .editorial-trust-section, .practice-home-section) { gap: 28px; }
}

@media (max-width: 430px) {
  body.jamaica-standard .brand small { display: none; }
  body.jamaica-standard .site-shell { width: min(100% - 18px, 1180px); }
  body.jamaica-standard .hero-title { font-size: clamp(3rem, 16vw, 4.7rem); }
  body.jamaica-standard .global-search-control { padding-inline: 11px; }
  body.jamaica-standard .search-key { display: none; }
  body.jamaica-standard .hero-stats { grid-template-columns: 1fr 1fr; }
  body.jamaica-standard .hero-stats div { min-width: 0; padding: 16px 9px; }
  body.jamaica-standard .browser-voice-wrap { align-items: stretch; flex-direction: column; }
  body.jamaica-standard .browser-voice-button { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  body.jamaica-standard *, body.jamaica-standard *::before, body.jamaica-standard *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  body.jamaica-standard .theme-toggle,
  body.jamaica-standard .browser-voice-wrap { display: none !important; }
}
