/* 0.16.30: shared hierarchy, legible navigation and focused page journeys. */
:root {
  /* Shared pale field: warm mineral stone in place of the blue-grey wash.
     Keep the token name for existing components and contrast-mode overrides. */
  --crg-mist-soft: oklch(92.5% .014 80);
  --crg-link-on-dark: oklch(86% .065 245);
}
/* These surfaces contain unfilled editorial links, not light cards. */
:is(.crg-institute-practice, .crg-research-line:nth-child(2),
    .crg-comms-feature--diffusion, .crg-home-results, .crg-home-field-projects,
    .crg-projects-next, .crg-footer)
  a:not(.crg-button):is(:hover, :focus-visible) {
  color: var(--crg-link-on-dark);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: .25em;
}
html[data-crg-contrast="inverse"] { --crg-link-on-dark: var(--crg-ink); }
@media (forced-colors: active) {
  :root { --crg-link-on-dark: LinkText; }
}
.crg-photo-albums:not([hidden]) { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 28px; }
.crg-photo-albums label { font-weight: 700; color: var(--crg-blue-deep); }
.crg-photo-albums select { width: min(100%, 420px); min-height: 48px; padding: 10px 40px 10px 14px; border: 1px solid oklch(70% .03 245); border-radius: 3px; color: var(--crg-blue-deep); background-color: var(--crg-paper); font: inherit; }
.crg-photo-archive__item[hidden] { display: none !important; }
.crg-icon { width: 24px; height: 24px; flex: 0 0 24px; vertical-align: middle; }
.crg-channel-archive .crg-pagination--editorial {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid oklch(85% .02 245);
  border-bottom: 0;
}
.crg-pagination--editorial .crg-pagination__pages { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.crg-pagination--editorial :is(.page-numbers, .crg-pagination__step) {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 48px; min-height: 48px; margin: 0; padding: 10px 16px;
  border: 1px solid oklch(82% .025 245); border-radius: 3px;
  color: var(--crg-blue-deep); background: transparent;
  font-size: 1rem; font-weight: 700; line-height: 1.3; text-decoration: none; font-variant-numeric: tabular-nums;
  transition: background-color .16s ease-out, color .16s ease-out, border-color .16s ease-out;
}
.crg-pagination--editorial .crg-pagination__previous { justify-self: start; }
.crg-pagination--editorial .crg-pagination__next { justify-self: end; }
.crg-pagination--editorial a:hover { color: var(--crg-blue-deep); background: oklch(91% .03 245); border-color: var(--crg-blue-deep); }
.crg-pagination--editorial .page-numbers.current { color: oklch(98% .006 245); background: var(--crg-blue-deep); border-color: var(--crg-blue-deep); }
.crg-pagination--editorial .page-numbers.dots { min-width: 24px; padding-inline: 0; border-color: transparent; }
.crg-pagination--editorial .crg-pagination__step:disabled { color: oklch(56% .02 245); border-color: transparent; opacity: 1; background: transparent; cursor: default; }
@media (max-width: 560px) {
  .crg-channel-archive .crg-pagination--editorial { grid-template-columns: 1fr 1fr; gap: 16px; }
  .crg-pagination--editorial .crg-pagination__pages { grid-column: 1 / -1; grid-row: 1; }
  .crg-pagination--editorial .crg-pagination__step { grid-row: 2; padding-inline: 12px; }
}
.crg-utility-bar__inner { justify-content: flex-end; min-height: 48px; }
.crg-utility-bar a, .crg-a11y-shortcut { font-size: 1rem; min-height: 48px; }
.crg-utility-bar .crg-a11y-shortcut:is(:hover, [aria-expanded="true"]) { background: oklch(89% .035 245); color: oklch(24% .065 252); }
.crg-a11y-shortcut > span:last-child { display: inline; position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
.crg-header__inner { grid-template-columns: 180px minmax(0, 1fr) auto auto; gap: clamp(12px, 1.5vw, 24px); min-height: 142px; }
/* Give the complete institutional lockup real height, not just an empty wider box. */
.crg-header .crg-brand, .crg-header .custom-logo-link { width: 180px; height: 126px; }
.crg-header .crg-nav a { font-size: 1rem; line-height: 1.35; }
/* Grid item on desktop, fixed on mobile: place menus above the reading
   progress (4) and the optional DNA edge (2), without changing their layout. */
.crg-header .crg-nav { z-index: 5; }
.crg-nav__main, .crg-menu { gap: clamp(8px, .85vw, 14px); }
.crg-search-open { font-size: 1rem; }
.crg-a11y-dialog .crg-segmented label span { font-size: .95rem; }
.crg-a11y-dialog .crg-segmented input:checked + span { background: oklch(27% .075 252); color: oklch(98% .006 245); box-shadow: none; }
.crg-a11y-toggle input:checked + .crg-a11y-toggle__control { background: oklch(27% .075 252); }
html[data-crg-links="highlight"] :where(.crg-main, .crg-footer) a { text-decoration-color: currentColor; text-decoration-thickness: .14em; text-underline-offset: .25em; }
body.crg-site :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid oklch(53% .15 245); outline-offset: 4px; box-shadow: 0 0 0 2px oklch(98% .006 245); }
.crg-home-story-nav a { display: flex; gap: 10px; align-items: center; font-size: 1rem; }
.crg-main :is(.crg-content-heading, .crg-atlas__header, .crg-directory__heading, .crg-brand-library__head) { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; }
.crg-main :is(.crg-content-heading, .crg-atlas__header, .crg-directory__heading, .crg-brand-library__head) > div { width: 100%; }
.crg-main :is(.crg-content-heading, .crg-atlas__header, .crg-directory__heading, .crg-brand-library__head) h2 { max-width: 26ch; margin: 0; font-size: clamp(2rem, 3.6vw, 3.5rem); line-height: 1.15; letter-spacing: -.025em; }
.crg-main :is(.crg-content-heading, .crg-atlas__header, .crg-directory__heading, .crg-brand-library__head) p { max-width: 68ch; }
.crg-home-research { background: oklch(93% .022 245); }
.crg-research-study__copy .crg-research-study__area { min-height: 0; font-size: .95rem; color: var(--crg-blue-deep); }
.crg-research-study h3 { font-size: clamp(1.4rem, 1.9vw, 1.9rem); line-height: 1.25; }
.crg-research-study figure { aspect-ratio: 16 / 10; }
.crg-research-study a { gap: 24px; }
.crg-research-study__copy { display: flex; flex-direction: column; }
.crg-research-study__copy > p:last-of-type { margin-top: auto; padding-top: 8px; }
.crg-atlas__header .crg-text-link { margin-top: 12px; }
.crg-atlas__region { font-size: 1rem; }
.crg-atlas__observation { padding: 0; margin-block: 20px 8px; border: 0; background: none; }
.crg-atlas__observation span { font-size: .95rem; font-weight: 700; }
.crg-atlas__description { max-width: 55ch; }
.crg-atlas__register-label { display: none; }
.crg-atlas__project { margin-top: 20px; font-size: .95rem; line-height: 1.6; }
.crg-atlas__project strong { display: block; color: var(--crg-blue-deep); }
.crg-atlas__map--chile .crg-atlas__marker > b { font-size: .8rem; }
.crg-atlas__map--chile .crg-atlas__marker[data-map-x] { transform: translate(-50%, -50%); }
.crg-people-group-heading { grid-column: 1 / -1; margin: 32px 0 8px; padding-top: 28px; border-top: 1px solid var(--crg-line); font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.25; }
.crg-people-group-heading:first-child { margin-top: 0; }
.crg-person__meta .crg-person__role { font-weight: 700; color: var(--crg-blue-deep); font-size: .95rem; }
.crg-directory .crg-results-status, .crg-directory .crg-filter span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; }
.crg-directory .crg-filter { position: relative; }
.crg-directory .crg-filter span { top: 0; left: 0; min-width: 0; min-height: 0; }
.crg-contact-hero { padding-block: clamp(48px, 6vw, 88px); background: oklch(25% .065 252); color: oklch(97% .008 245); }
.crg-contact-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.crg-contact-hero h1, .crg-contact-hero h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin: 0 0 24px; color: inherit; }
.crg-contact-hero p { max-width: 55ch; }
.crg-contact-hero address { font-style: normal; margin-top: 28px; line-height: 1.8; }
.crg-contact-hero a { color: inherit; text-underline-offset: .25em; }
.crg-contact-map { width: 100%; min-height: 420px; height: clamp(420px, 55vw, 640px); background: oklch(92% .025 245); color: oklch(25% .065 252); }
.crg-contact-map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
.crg-language > [aria-disabled="true"] { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 48px; padding-inline: 9px; color: oklch(80% .012 245); cursor: not-allowed; }
.crg-language > [aria-disabled="true"]:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
.crg-content-language { display: block; margin-top: 12px; font-size: .85rem; font-weight: 700; }
.crg-landscapes-hero h1 { max-width: 100%; font-size: clamp(2.5rem, 5vw, 5.8rem); line-height: 1; }
@media (max-width: 700px) {
  .crg-landscapes-hero h1 { max-width: 100%; font-size: clamp(2.5rem, 10vw, 3.7rem); word-break: normal; overflow-wrap: normal; }
}
.crg-document-format { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; }
.crg-resource-library__filters { margin-top: 28px; }
.crg-resource-library__filters button { font-size: .95rem; }
.crg-resource-library__status { font-size: .9rem; }
.crg-resource-library__grid { display: block; }
.crg-resource-library__grid article { display: grid; grid-template-columns: 130px minmax(0, 1fr) 170px; gap: 8px 24px; min-height: 0; padding: 24px 0; align-items: start; border-left: 0; }
.crg-resource-library__grid article:nth-child(even) { border-left: 0; }
.crg-resource-library__grid article > p { grid-row: 1 / 3; flex-direction: column; gap: 8px; font-size: .9rem; color: var(--crg-ink-soft); }
.crg-resource-library__grid h3 { margin: 0; max-width: none; font-size: 1.2rem; line-height: 1.4; letter-spacing: 0; }
.crg-resource-library__grid article > div { grid-column: 2; margin: 0; font-size: .95rem; }
.crg-resource-library__grid article footer { grid-column: 3; grid-row: 1 / 3; padding: 0; border: 0; justify-content: flex-end; }
.crg-resource-library__grid footer a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .95rem; }
.crg-photo-archive__item a > span { background: oklch(24% .065 252); color: oklch(98% .006 245); padding: 8px 12px; font-size: .9rem; opacity: 1; }
.crg-photo-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: oklch(17% .025 252); color: oklch(97% .008 245); }
.crg-photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.crg-photo-viewer::backdrop { background: oklch(17% .025 252); }
.crg-photo-viewer__bar, .crg-photo-viewer__controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px max(20px, env(safe-area-inset-right)); }
.crg-photo-viewer__bar p { margin: 0; font-variant-numeric: tabular-nums; }
.crg-photo-viewer button { min-height: 48px; padding: 10px 18px; border: 1px solid oklch(72% .02 245); border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.crg-photo-viewer button:is(:hover, :focus, :active) { background: oklch(32% .055 252); color: oklch(97% .008 245); }
.crg-atlas__latitudes, .crg-atlas__map--chile::after { display: none; }
.crg-atlas__map--chile .crg-atlas__marker[data-atlas-trigger="chiloe"] > b { left: auto; right: 31px; }
.crg-atlas__map--chile .crg-atlas__marker[data-atlas-trigger="patagonia-fiordos"] > b { left: 31px; right: auto; }
.crg-atlas__news-link { font-size: 1rem; line-height: 1.5; }
.crg-atlas__map--chile .crg-atlas__marker:is([data-atlas-trigger="frutillar"], [data-atlas-trigger="chiloe"]) { pointer-events: none; }
.crg-atlas__map--chile .crg-atlas__marker:is([data-atlas-trigger="frutillar"], [data-atlas-trigger="chiloe"]) > :is(span, b) { pointer-events: auto; }
.crg-atlas__map--chile .crg-atlas__marker > b { display: flex; align-items: center; min-height: 44px; }
.crg-photo-viewer__stage { display: grid; place-items: center; min-height: 0; padding: 0 20px; overflow: hidden; }
.crg-photo-viewer__stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.crg-photo-viewer__controls p { max-width: 65ch; margin: 0; text-align: center; }
@media (max-width: 1280px) {
  .crg-header__inner { grid-template-columns: 180px minmax(0, 1fr) auto; }
}
@media (max-width: 700px) {
  .crg-header__inner { min-height: 104px; grid-template-columns: 120px minmax(0, 1fr) auto; }
  .crg-header .crg-brand, .crg-header .custom-logo-link { width: 120px; height: 88px; }
  .crg-contact-hero__grid { grid-template-columns: 1fr; }
  .crg-home-story-nav a { min-width: max-content; }
  .crg-photo-viewer__controls { flex-wrap: wrap; }
  .crg-photo-viewer__controls p { order: 3; width: 100%; font-size: .9rem; }
  .crg-atlas__map--chile .crg-atlas__marker > b { font-size: .75rem; }
  .crg-resource-library__grid article { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .crg-resource-library__grid article > p { grid-row: 1; grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 16px; }
  .crg-resource-library__grid article h3 { grid-column: 1 / -1; }
  .crg-resource-library__grid article > div { grid-column: 1 / -1; }
  .crg-resource-library__grid article footer { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; }
}
@media (forced-colors: active) {
  body.crg-site :focus-visible { outline-color: Highlight; box-shadow: none; }
  .crg-photo-viewer button { border-color: ButtonText; }
}
