/* Cayman field guide — primary pest identification section. */
.fg { padding: 96px var(--gutter) 110px; background: var(--sand); scroll-margin-top: 90px; }
.fg *, .fg *::before, .fg *::after { box-sizing: border-box; }
.fg button { cursor: pointer; }
.fg button, .fg a { -webkit-tap-highlight-color: transparent; }
.fg button:focus-visible, .fg a:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 5px; }
.fg-eyebrow, .fg-season, .fg-meta, .fg-caption, .fg-count, .fg-label, .fg-credit, .fg-cta { font-family: var(--font-mono); font-size: 11px; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; }
.fg .section-head { margin-bottom: clamp(1.5rem, 3.5vw, 2.4rem); }
.fg .section-head::after { display: none; }
.fg-season { display: flex; align-items: center; gap: 10px; margin: 27px 0 30px; color: var(--ink-soft); }
.fg-season::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); border: 1px solid var(--canopy); flex-shrink: 0; }
.fg-season::after { content: ''; height: 1px; background: var(--line); flex: 1; margin-left: 12px; }
.fg-board { background: var(--canopy-deep); color: var(--sand); border: 1px solid var(--canopy); border-radius: 24px; display: grid; grid-template-columns: 220px minmax(0,1fr); overflow: hidden; }
.fg-index { border-right: 1px solid #f6f3ea30; display: grid; grid-template-rows: repeat(8, minmax(67px, 1fr)); }
.fg-choice { position: relative; border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 18px; text-align: left; transition: background .22s, color .22s; }
.fg-choice + .fg-choice { border-top: 1px solid #f6f3ea20; }
.fg-choice:hover { background: #f6f3ea0e; }
.fg-choice[aria-pressed=true] { background: var(--lime); color: var(--ink); }
.fg-choice:focus-visible { outline-offset: -5px; }
.fg-choice-name { font: 600 13px/1.3 var(--font-body); }
.fg-choice-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.fg-choice .fg-art { width: 45.6px; height: 45.6px; flex-shrink: 0; }
.fg-choice.is-seasonal { background: #b6e94a0d; box-shadow: inset 3px 0 #b6e94a80; }
.fg-choice[aria-pressed=true] { background: var(--lime); color: var(--ink); }
.fg-choice .fg-seasonal { font: 8px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; border: 1px solid #b6e94a70; color: var(--lime); border-radius: 99px; padding: 3px 6px; }
.fg-choice[aria-pressed=true] .fg-seasonal { border-color: #14241b55; color: var(--ink); }
.fg-choice .fg-seasonal[hidden] { display: none; }
.fg-art { display: block; aspect-ratio: 1; background-image: url('assets/field-guide-specimens.png'); background-size: 400% 200%; background-position: var(--x,0%) var(--y,0%); mix-blend-mode: multiply; }
.fg-art--light { filter: invert(1); mix-blend-mode: screen; }
.fg-art--extra { background-image: url('assets/field-guide-extras.png'); }
.fg-index .fg-art { filter: invert(1); mix-blend-mode: screen; }
.fg-choice[aria-pressed=true] .fg-art { filter: none; mix-blend-mode: multiply; }
.fg-question { background: none; display: grid; place-items: center; font: 400 40px/1 var(--font-serif); filter: none !important; mix-blend-mode: normal !important; }
.fg-dock { min-width: 0; }
.fg-article { height: 100%; min-width: 0; display: flex; flex-direction: column; }
.fg-scroll { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: 28px; padding: 42px 38px 30px; flex: 1; }
.fg-visual { min-width: 0; position: relative; }
.fg-specimen { position: relative; display: grid; place-items: center; width: 100%; max-width: 340px; margin: auto; aspect-ratio: 1; background: var(--canopy-deep); }
.fg-rings { position: absolute; inset: 5%; border: 1px solid #b6e94a30; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0, transparent calc(25% - 1px), #b6e94a16 25%, transparent calc(25% + 1px)); }
.fg-rings::before, .fg-rings::after { content: ''; position: absolute; background: #b6e94a20; }
.fg-rings::before { width: 1px; height: 116%; top: -8%; left: 50%; }
.fg-rings::after { height: 1px; width: 116%; top: 50%; left: -8%; }
.fg-sweep { position: absolute; inset: 5%; border-radius: 50%; opacity: 0; background: conic-gradient(from 0deg, transparent 0 275deg, #b6e94a24 355deg, #b6e94a80 360deg); }
.fg-specimen-art { display: contents; }
.fg-specimen-art > .fg-art { width: 96%; z-index: 1; filter: invert(1) sepia(1) saturate(3) hue-rotate(40deg); mix-blend-mode: screen; }
.fg-specimen-art > .fg-question { color: var(--lime); font-size: 180px; }
.fg-specimen .fg-pair { width: 100%; display: flex; align-items: center; background: transparent; }
.fg-pair .fg-art { width: 53%; filter: invert(1) sepia(1) saturate(3) hue-rotate(40deg); mix-blend-mode: screen; }
.fg-pair .fg-art + .fg-art { width: 44%; margin-left: -2%; }
.fg-caption { margin-top: 18px; text-align: center; color: #d4dfc5; font-size: 9px; }
.fg-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--lime); font-size: 10px; }
.fg-badge { padding: 4px 8px; border-radius: 99px; border: 1px solid #b6e94a50; font-size: 9px; letter-spacing: .04em; }
.fg-badge[hidden] { display: none; }
.fg-name { font: 600 clamp(32px, 3.3vw, 56px)/1.05 var(--font-display); letter-spacing: -.045em; margin: 14px 0 20px; overflow-wrap: anywhere; }
.fg-tagline { font: italic 400 clamp(21px, 2vw, 28px)/1.25 var(--font-serif); color: var(--sand); margin-bottom: 26px; }
.fg-facts > div { border-top: 1px solid #f6f3ea24; padding: 17px 0; }
.fg-facts dt { color: var(--lime); margin-bottom: 6px; }
.fg-facts dd { font-size: 14px; line-height: 1.6; color: #e5eade; }
.fg-actions { padding: 0 38px 28px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fg-cta { display: flex; justify-content: center; align-items: center; gap: 24px; padding: 17px 24px; min-height: 52px; background: var(--lime); color: var(--ink); border-radius: 99px; font-size: 11px; transition: background .2s, transform .2s; text-decoration: none; }
.fg-cta:hover { background: #c9f276; transform: translateY(-2px); }
.fg-cta span:last-child { font-family: var(--font-body); font-size: 20px; line-height: 1; }
.fg-change { display: none; }
.fg-extras { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; grid-column: 1/-1; }
.fg-extras[hidden], .fg-back[hidden] { display: none; }
.fg-extra { border: 1px solid #f6f3ea30; border-radius: 12px; background: #ffffff06; color: var(--sand); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px 8px; min-height: 119px; font: 500 12px/1.4 var(--font-body); transition: background .2s, border-color .2s; }
.fg-extra:hover { background: #b6e94a16; border-color: var(--lime); }
.fg-extra .fg-art { width: 70px; height: 70px; filter: invert(1); mix-blend-mode: screen; }
.fg-back { display: block; width: fit-content; background: transparent; border: 0; color: var(--lime); padding: 8px 0; margin-bottom: 12px; min-height: 40px; font: 11px var(--font-mono); text-decoration: underline; text-underline-offset: 4px; }
.fg-name:focus { outline: none; }
.fg.is-extras-gallery .fg-scroll { grid-template-columns: 1fr; align-content: start; gap: 0; }
.fg.is-extras-gallery .fg-copy { display: contents; }
.fg.is-extras-gallery .fg-visual, .fg.is-extras-gallery .fg-facts { display: none; }
.fg.is-extras-gallery .fg-meta { order: 0; }
.fg.is-extras-gallery .fg-name { order: 1; margin-bottom: 14px; }
.fg.is-extras-gallery .fg-tagline { order: 2; font-size: 22px; margin-bottom: 24px; }
.fg.is-extras-gallery .fg-extras { order: 3; }
.fg-foot { grid-column: 1/-1; border-top: 1px solid #f6f3ea30; padding: 18px 25px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fg-credit { font-size: 10px; color: #d4dfc5; }
.fg-paging { display: flex; gap: 12px; align-items: center; }
.fg-count { color: #d4dfc5; margin-right: 8px; }
.fg-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #b6e94a90; color: var(--lime); background: transparent; font-size: 24px; transition: background .2s, color .2s; }
.fg-arrow:hover { background: var(--lime); color: var(--ink); }
.fg-help { display: block; margin: 22px auto 0; width: fit-content; border: 0; background: none; font: 14px var(--font-body); color: var(--canopy); padding: 12px; text-decoration: underline; text-underline-offset: 5px; }
.fg-dialog { padding: 0; border: 1px solid #b6e94a35; background: var(--canopy-deep); color: var(--sand); width: min(100%, 540px); max-width: 100%; max-height: calc(100dvh - max(12px, env(safe-area-inset-top))); height: 75dvh; margin: auto auto 0; border-radius: 24px 24px 0 0; overflow: hidden; }
.fg.is-other-flow .fg-dialog { height: calc(100dvh - max(12px, env(safe-area-inset-top))); }
.fg-dialog:not([open]) { display: none; }
.fg-dialog[open] { display: flex; flex-direction: column; }
.fg-dialog::backdrop { background: #14241ba3; backdrop-filter: blur(3px); }
.fg-dialog-head { position: relative; flex-shrink: 0; height: 60px; display: flex; justify-content: flex-end; align-items: flex-start; padding: 10px 12px 0; touch-action: none; }
.fg-handle { position: absolute; width: 42px; height: 4px; border-radius: 4px; background: #f6f3ea60; top: 14px; left: calc(50% - 21px); }
.fg-close { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; font: 300 28px/1 var(--font-body); color: var(--sand); background: transparent; border: 0; border-radius: 10px; transition: color .2s; }
.fg-close:hover { color: var(--lime); }
/* Swipe-to-dismiss: JS drags the sheet with an inline transform. The entrance
   animation fills forwards, so it has to be switched off while dragging or its
   final keyframe would override the inline value. */
.fg-dialog.is-dragging { animation: none; transition: none; }
.fg-dialog.is-settling { animation: none; transition: transform .28s var(--ease); }
.fg-dialog .fg-article { min-height: 0; flex: 1; }
.fg-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.fg.is-changing .fg-specimen-art > .fg-art { animation: fg-specimen-in .55s var(--ease) both; }
.fg.is-changing .fg-sweep { animation: fg-radar 1.1s ease-out both; }
.fg.is-changing .fg-copy { animation: fg-copy-in .35s ease-out both; }
.fg-dialog[open] { animation: fg-sheet-in .4s var(--ease) both; }
@keyframes fg-specimen-in { from { opacity: 0; transform: translateY(12px) rotate(-5deg) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes fg-copy-in { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fg-radar { 0% { opacity: 0; transform: rotate(-90deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: rotate(270deg); } }
@keyframes fg-sheet-in { from { opacity: .4; transform: translateY(70px); } to { opacity: 1; transform: none; } }
@media (min-width: 1600px) { .fg-scroll { gap: 48px; padding: 48px; } .fg-specimen { max-width: 430px; margin: auto; } }
@media (max-width: 1100px) and (min-width: 821px) { .fg-board { grid-template-columns: 180px minmax(0,1fr); } .fg-scroll { gap: 18px; padding: 28px 24px 15px; grid-template-columns: minmax(0,.8fr) minmax(0,1fr); } .fg-choice { gap: 8px; padding: 12px; } .fg-choice-no { display: none; } .fg-name { font-size: 35px; } .fg-actions { padding: 0 24px 25px; } .fg-caption { font-size: 8px; } }
@media (max-width: 820px) {
  .fg { padding: 58px var(--pad) 65px; scroll-margin-top: 78px; }
  .fg-season { margin: 22px 0; font-size: 9px; }
  .fg-board { display: block; border: 0; border-radius: 0; background: none; color: var(--ink); overflow: visible; }
  .fg-index { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: none; border: 0; gap: 10px; }
  .fg-choice { min-height: 132px; border: 1px solid var(--line) !important; border-radius: 13px; flex-direction: column; justify-content: center; gap: 2px; padding: 9px; background: #efe9d94d; text-align: center; color: var(--ink); }
  .fg-choice:hover { background: var(--sand-2); }
  .fg-choice[aria-pressed=true] { background: #b6e94a26; border-color: #71942860 !important; }
  .fg-index .fg-art { width: 80px; height: 80px; filter: none; mix-blend-mode: multiply; }
  .fg-choice-name { font-size: 13px; }
  .fg-choice-copy { align-items: center; }
  .fg-choice.is-seasonal { border-color: #8fc62f70 !important; background: #b6e94a12; box-shadow: none; }
  .fg-choice .fg-seasonal { display: block; position: absolute; right: 7px; top: 7px; font: 7px var(--font-mono); background: var(--lime); color: var(--ink); border-radius: 99px; padding: 3px 5px; text-transform: uppercase; }
  .fg-choice .fg-seasonal[hidden] { display: none; }
  .fg-choice .fg-question { font-size: 61px; }
  .fg-dock, .fg-foot { display: none; }
  .fg-help { margin-top: 15px; font-size: 13px; }
  .fg-scroll { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 24px 16px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; }
  .fg-copy { display: contents; }
  .fg-back { order: -1; flex-shrink: 0; margin-bottom: 8px; }
  .fg-extras { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding-bottom: 8px; }
  .fg-extra { min-height: 100px; padding: 8px 5px; font-size: 11px; }
  .fg-extra .fg-art { width: 68px; height: 68px; }
  .fg-scroll { scrollbar-width: none; }
  .fg-scroll::-webkit-scrollbar { display: none; }
  .fg-meta { order: 0; font-size: 9px; justify-content: space-between; }
  .fg-name { order: 1; font-size: clamp(33px, 9vw, 45px); margin: 10px 0 0; flex-shrink: 0; }
  .fg-visual { order: 2; flex-shrink: 0; width: 100%; }
  .fg-specimen { width: min(100%, 220px); height: 170px; aspect-ratio: auto; margin: 4px auto; }
  .fg-rings, .fg-sweep { width: 154px; height: 154px; inset: 8px auto auto calc(50% - 77px); }
  .fg-specimen-art > .fg-art { width: 170px; height: 170px; }
  .fg-specimen-art > .fg-question { font-size: 120px; }
  .fg-caption { display: none; }
  .fg-tagline { order: 3; font-size: 23px; margin: 8px 0 16px; flex-shrink: 0; }
  .fg-facts { order: 4; }
  .fg-facts > div { padding: 12px 0; }
  .fg-facts dt { font-size: 10px; }
  .fg-facts dd { font-size: 14px; line-height: 1.55; }
  .fg:not(.is-other-flow) .fg-name { margin-top: 4px; }
  .fg:not(.is-other-flow) .fg-scroll { justify-content: space-between; }
  .fg:not(.is-other-flow) .fg-specimen { width: min(100%, 180px); height: 130px; }
  .fg:not(.is-other-flow) .fg-rings,
  .fg:not(.is-other-flow) .fg-sweep { width: 120px; height: 120px; inset: 5px auto auto calc(50% - 60px); }
  .fg:not(.is-other-flow) .fg-specimen-art > .fg-art { width: 130px; height: 130px; }
  .fg:not(.is-other-flow) .fg-specimen-art > .fg-question { font-size: 92px; }
  .fg:not(.is-other-flow) .fg-tagline { font-size: 20px; margin: 4px 0 10px; }
  .fg:not(.is-other-flow) .fg-facts > div { padding: 10px 0; }
  .fg-actions { flex-shrink: 0; align-items: stretch; padding: 14px 24px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid #ffffff20; background: var(--canopy-deep); gap: 9px; }
  .fg-cta { width: 100%; font-size: 11px; letter-spacing: .04em; gap: 12px; padding: 14px 16px; min-height: 50px; }
  .fg-change { display: block; color: #e5eade; border: 0; background: none; min-height: 34px; font-size: 11px; padding: 5px; }
  .fg-change u { color: var(--lime); text-underline-offset: 3px; }
}
@media (max-width: 360px) { .fg-choice { min-height: 120px; } .fg-index .fg-art { width: 68px; height: 68px; } .fg-scroll { padding-inline: 18px; } .fg-actions { padding-inline: 18px; } }
@media (prefers-reduced-motion: reduce) { .fg *, .fg *::before, .fg *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 820px) and (min-height: 741px) and (max-height: 820px) {
  .fg-extra { min-height: 80px; flex-direction: row; text-align: left; gap: 7px; padding: 8px; }
  .fg-extra .fg-art { width: 48px; height: 48px; flex-shrink: 0; }
  .fg-extra > span:last-child { flex: 1; }
}
@media (max-width: 820px) and (max-height: 740px) {
  .fg-dialog-head { height: 54px; padding-top: 8px; }
  .fg-scroll { display: grid; grid-template-columns: minmax(0,1fr) 86px; grid-template-areas: "back back" "meta meta" "name art" "facts facts"; align-content: start; column-gap: 8px; row-gap: 4px; padding-top: 0; padding-bottom: 8px; }
  .fg:not(.is-other-flow) .fg-scroll { justify-content: normal; }
  .fg:not(.is-other-flow) .fg-meta { display: none; }
  .fg-back { grid-area: back; margin: 0; min-height: 40px; }
  .fg-meta { grid-area: meta; }
  .fg-name { grid-area: name; align-self: center; font-size: 30px; margin: 0; }
  .fg-visual { grid-area: art; align-self: center; }
  .fg-specimen { width: 86px; height: 86px; margin: 0; }
  .fg-specimen-art > .fg-art { width: 86px; height: 86px; }
  .fg-rings, .fg-sweep { width: 76px; height: 76px; inset: 5px; }
  .fg:not(.is-other-flow) .fg-specimen { width: 86px; height: 86px; margin: 0; }
  .fg:not(.is-other-flow) .fg-specimen-art > .fg-art { width: 86px; height: 86px; }
  .fg:not(.is-other-flow) .fg-rings,
  .fg:not(.is-other-flow) .fg-sweep { width: 76px; height: 76px; inset: 5px; }
  .fg:not(.is-other-flow) .fg-name { font-size: 27px; }
  .fg:not(.is-other-flow) .fg-facts > div { padding: 5px 0; }
  .fg:not(.is-other-flow) .fg-facts dt { margin-bottom: 3px; font-size: 9px; }
  .fg:not(.is-other-flow) .fg-facts dd { font-size: 13px; line-height: 1.4; }
  .fg-tagline { display: none; }
  .fg-facts { grid-area: facts; }
  .fg-facts > div { padding: 8px 0; }
  .fg-actions { padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); gap: 4px; }
  .fg.is-extras-gallery .fg-scroll { display: flex; }
  .fg.is-extras-gallery .fg-name { align-self: auto; margin: 8px 0; }
  .fg.is-extras-gallery .fg-tagline { display: block; font-size: 19px; margin: 0 0 16px; }
  .fg-extras { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  .fg-extra { min-height: 100px; padding: 8px 3px; font-size: 10px; }
  .fg-extra .fg-art { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .fg .section-head__bug { opacity: 1; } }

/* Keep existing #pests bookmarks aligned with the replacement guide. */
.fg-legacy-anchor { display: block; height: 0; scroll-margin-top: 100px; }
.motion-fallback .fg .section-head__bug { opacity: 1; }
