.rf-case { color: #10243b; min-width: 0; }
.rf-case [hidden] { display: none !important; }
.rf-case .rf-tool {
  --rf-line: #c5d6d7;
  margin: 0;
  border: 1px solid #56717c;
  border-radius: 1rem;
  overflow: hidden;
  background: #edf3f1;
  color: #142e35;
  box-shadow: 0 1.5rem 4rem #020a102e;
}
.rf-case .rf-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem 1rem;
  min-height: 3.8rem;
  padding: .75rem clamp(1rem, 3vw, 2.25rem);
  color: #f1f7ef; background: #15333b;
  border-bottom: 1px solid #35555c;
}
.rf-case .rf-name { font-weight: 650; font-size: 1.06rem; }
.rf-case .rf-meta { color: #cbded9; font-size: .8125rem; }
.rf-case .rf-toolhead { padding: clamp(1rem, 3vw, 2.25rem); }
.rf-case .rf-toolhead h2 { margin: 0 0 .4rem; color: #173639; font-size: clamp(1.55rem, 3.35vw, 2.65rem); font-weight: 570; letter-spacing: -.045em; line-height: 1.12; }
.rf-case .rf-toolhead p, .rf-case .rf-result p, .rf-case .rf-notes p { margin: 0; font-size: 1rem; line-height: 1.55; }
.rf-case .rf-toolhead p { max-width: 66ch; color: #385657; }
.rf-case .rf-plates, .rf-case .rf-find-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #36545d; }
.rf-case .rf-plate { margin: 0; background: #142e39; min-width: 0; color: #eff9f5; }
.rf-case .rf-plate figcaption { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .6rem; justify-content: space-between; padding: .6rem 1rem; background: #25434a; color: #f2f8f8; font-weight: 650; font-size: .94rem; }
.rf-case .rf-plate figcaption span { color: #cee1de; font-size: .8rem; font-weight: 460; }
.rf-case .rf-plate img, .rf-case .rf-plate canvas, .rf-case .rf-map img { display: block; width: 100%; height: auto; }
.rf-case .rf-controls { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.25rem 2rem; padding: 1.25rem clamp(1rem, 3vw, 2.25rem); }
.rf-case .rf-select, .rf-case .rf-angle label, .rf-case .rf-map-controls > span { color: #193f42; font-size: .95rem; font-weight: 650; }
.rf-case .rf-select select { display: block; margin-top: .45rem; width: 100%; min-width: 0; min-height: 2.85rem; font: inherit; font-size: .95rem; color: #193c42; background: #fff; border: 1px solid #748f91; border-radius: .45rem; padding: .4rem 1.9rem .4rem .65rem; appearance: auto; }
.rf-case .rf-angle label, .rf-case .rf-range-ends { display: flex; justify-content: space-between; gap: .4rem; flex-wrap: wrap; }
.rf-case .rf-angle output { font-size: .85rem; color: #285459; }
.rf-case .rf-angle input { width: 100%; margin: .2rem 0 0; min-height: 2.75rem; accent-color: #176875; }
.rf-case .rf-range-ends { font-size: .8125rem; color: #435f61; }
.rf-case .rf-footnote { padding: .85rem clamp(1rem, 3vw, 2.25rem); font-size: .875rem; line-height: 1.52; border-top: 1px solid var(--rf-line); color: #3a5559; background: #e3ece9; }
.rf-case .rf-map { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; background: #15323e; }
.rf-case .rf-map-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding: .8rem 1rem; color: #fff; background: #25434a; }
.rf-case .rf-map-controls > span { color: #e6efed; }
.rf-case .rf-buttons { display: flex; align-items: stretch; gap: .3rem; flex-wrap: wrap; }
.rf-case .rf-buttons button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 2.8rem;
  padding: .42rem .8rem; margin: 0; font: inherit; color: #254e55; background: #f9fcfa;
  font-size: .9375rem; font-weight: 620; line-height: 1.2;
  border: 1px solid #8aa4a5; border-radius: .4rem; box-shadow: none; cursor: pointer;
}
.rf-case .rf-buttons button[aria-pressed=true] { background: #205c66; color: #fff; border-color: #205c66; }
.rf-case .rf-map-controls button { background: #1c3942; color: #e6f2f1; border-color: #67949c; }
.rf-case .rf-map-controls button[aria-pressed=true] { color: #183e43; background: #cbe9e3; border-color: #cbe9e3; }
.rf-case .rf-result { min-width: 0; background: #f7faf8; padding: clamp(1rem, 2.85vw, 2.2rem); color: #21464c; }
.rf-case .rf-stages { margin-bottom: 1.25rem; }
.rf-case .rf-result .rf-eyebrow { color: #3e6366; font-weight: 700; text-transform: uppercase; font-size: .77rem; letter-spacing: .08em; }
.rf-case .rf-result h3 { margin: .3rem 0 .5rem; color: #163b40; font-size: clamp(1.45rem, 2.85vw, 2.2rem); font-weight: 590; line-height: 1.08; letter-spacing: -.04em; }
.rf-case .rf-result dl { margin: 1rem 0 0; }
.rf-case .rf-result dl div { display: grid; grid-template-columns: minmax(5.7rem, .8fr) minmax(0, 1.6fr); gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--rf-line); font-size: .94rem; line-height: 1.45; }
.rf-case .rf-result dt { margin: 0; color: #476366; }
.rf-case .rf-result dd { margin: 0; color: #193e42; font-weight: 600; }
.rf-case .rf-notes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.6rem 4rem; padding: clamp(1.8rem, 4vw, 3rem) 0 0; }
.rf-case .rf-notes h2 { margin: 0 0 .5rem; font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 620; color: inherit; }
.rf-case .rf-notes p { color: #455a6d; max-width: 65ch; }
.rf-case .rf-project { margin: 1.35rem 0 0; display: flex; gap: .25rem .75rem; flex-wrap: wrap; align-items: baseline; }
.rf-case .rf-project a { color: #0d4a94; text-decoration: underline; text-underline-offset: .2em; font-weight: 620; display: inline-block; padding: .45em 0; }
.rf-case .rf-project span { color: #455a6d; font-size: .9rem; }
.rf-case :is(button, select, input):focus-visible { outline: 3px solid #a33a08; outline-offset: 2px; }
.rf-case .rf-map-controls button:focus-visible { outline-color: #ffd487; }
@media(max-width: 46rem) {
  .rf-case .rf-find-grid, .rf-case .rf-notes { grid-template-columns: minmax(0,1fr); }
  .rf-case .rf-controls { gap: 1rem; }
}
@media(max-width: 36rem) {
  .rf-case .rf-plates, .rf-case .rf-controls { grid-template-columns: minmax(0,1fr); }
  .rf-case .rf-map-controls { align-items: flex-start; flex-direction: column; }
  .rf-case .rf-plate img, .rf-case .rf-plate canvas { max-height: 18rem; object-fit: contain; }
  .rf-case .rf-name, .rf-case .rf-meta { display: block; }
}
