.ref-heading { padding-block: 28px 40px; border-bottom: 1px solid var(--line); background-image: linear-gradient(130deg,#142c40,#0a1526 70%); }
.ref-heading h1 { margin-block: 17px 12px; font-size: clamp(2.35rem,5vw,4.7rem); max-width: 22ch; text-wrap: balance; }
.ref-heading p { max-width: 72ch; color: var(--muted); font-size: 1.08rem; line-height: 1.6; margin-bottom: 0; }
.ref-content { padding-block: 30px 60px; }
.ref-group-nav, .ref-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.ref-group-nav a, .ref-links a { display: inline-flex; min-height: 44px; align-items: center; padding: 5px 13px; border: 1px solid var(--line); color: var(--teal); border-radius: 4px; background: #101f30; }
.ref-group-nav a:hover,.ref-links a:hover { border-color: var(--teal); }
.ref-group { padding-top: 37px; scroll-margin-top: 8px; }
.ref-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.ref-cards a { display: block; min-height: 100%; padding: 16px; border: 1px solid var(--line); background: #112234; border-radius: 5px; }
.ref-cards a:hover { border-color: var(--teal); }
.ref-cards h3 { margin: 0 0 7px; color: var(--ivory); font-size: 1.34rem; line-height: 1.23; }
.ref-cards p { color: var(--muted); margin: 0; line-height: 1.48; }
.ref-topic { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,265px); gap: 25px; }
.ref-form { background-color: #142638; border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 20px; }
.ref-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; border: 0; padding: 9px 0 12px; margin: 0; }
.ref-fields legend { color: var(--ivory); padding-top: 6px; font-weight: 700; }
.ref-fields label { display: grid; gap: 5px; align-content: end; min-width: 0; color: var(--muted); font-size: .88rem; }
.ref-fields :is(input, select) { display: block; width: 100%; min-width: 0; margin: 0; color-scheme: dark; font: inherit; color: var(--ivory); background: #0e1b2b; border: 1px solid #718695; border-radius: 4px; min-height: 43px; padding: 6px; }
.ref-city { grid-column: 1 / -1; width: min(100%, 38rem); margin-block: 0 3px; }
.ref-city > label { margin-bottom: 5px; }
.ref-city-picker { position: relative; }
.ref-city .ref-city-source { display: inline-block; color: var(--muted); font-size: .76rem; margin-top: 5px; text-decoration: underline; text-underline-offset: 3px; }
.ref-city .ref-city-status { margin-block: 6px 0; color: var(--muted); font-size: .86rem; }
.ref-city-status:empty { display: none; }
.ref-offset { min-width: 0; align-self: start; }
.ref-fields:has(> .ref-offset) > label { align-content: start; }
.ref-offset input[readonly] { color: #b7e0db; border-color: #638f95; }
.ref-offset .ref-offset-status { margin-top: 5px; font-size: .79rem; color: var(--muted); line-height: 1.35; }
.ref-offset .ref-offset-status:empty { display: none; }
.ref-offset .ref-offset-choice { margin-top: 7px; }
.ref-city-options {
  position: absolute; z-index: 4; inset: calc(100% + 4px) 0 auto;
  list-style: none; margin: 0; padding: 4px;
  max-height: min(19rem, 42vh); overflow-y: auto;
  border: 1px solid #7396a5; border-radius: 5px;
  background: #101b2c; box-shadow: 0 10px 24px #0408129c;
}
.ref-city-options li {
  display: grid; align-content: center; min-height: 48px;
  gap: 2px; padding: 5px 9px; cursor: pointer; border-radius: 3px;
  overflow-wrap: anywhere;
}
.ref-city-options li + li { margin-top: 2px; }
.ref-city-options strong { color: #f7eedc; font-weight: 650; }
.ref-city-options small { color: #c5d7e3; line-height: 1.24; }
.ref-city-options li[aria-selected="true"] { background: #294762; box-shadow: inset 0 0 0 1px #98bdbf; }
@media (hover: hover) {
  .ref-city-options li:hover { background: #294762; }
}
.ref-short-form .ref-fields:empty { display: none; }
.ref-short-form .ref-fields:has(> label:only-child) { grid-template-columns: minmax(0,min(100%,26rem)); }
.ref-form button { min-height: 43px; margin-top: 2px; padding-inline: 16px; color: var(--ivory); }
.ref-result, .ref-error { margin-block: 18px; border: 1px solid #6f8e9a; border-radius: 5px; background: #122436; padding: 14px; scroll-margin-top: 8px; }
.ref-result h2,.ref-result h3 { margin: 0 0 8px; }
.ref-result p { margin-block: 8px 14px; color: var(--muted); }
.ref-result h3 { margin-top: 18px; }
.ref-error { color: #ffd1a1; }
.ref-table { max-width: 100%; overflow-x: auto; margin-block: 7px 16px; }
.ref-table table { width: 100%; border-collapse: collapse; line-height: 1.45; color: var(--muted); font-size: .88rem; }
.ref-table caption { color: var(--teal); text-align: left; padding-block: 4px 8px; font-weight: 650; }
.ref-table th,.ref-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.ref-table th { color: var(--ivory); }
.ref-prose section { margin-block: 24px; }
.ref-prose h2,.ref-related h2,.ref-sources h2,.ref-index-list h2 { font-size: 1.5rem; margin-bottom: 8px; }
.ref-prose p,.ref-index-list dd { line-height: 1.62; color: var(--muted); }
.ref-related section { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 5px; padding: 14px; background-color: #122133; }
.ref-related ul,.ref-sources ul { list-style: none; margin: 0; padding: 0; }
.ref-related li:not(:last-child),.ref-sources li:not(:last-child) { margin-bottom: 7px; }
.ref-related a,.ref-sources a { color: var(--teal); text-decoration: underline; text-underline-offset: .15em; }
.ref-sources { border-top: 1px solid var(--line); padding-top: 15px; }
.ref-index-list { margin-top: 22px; }
.ref-index-list dl { margin: 0; }
.ref-index-list dt { color: var(--ivory); font-weight: 700; }
.ref-index-list dd { margin: 0 0 14px; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.ref-teaser { padding-block: 28px 43px; }
@media (max-width: 900px) {
  .ref-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 690px) {
  .ref-cards,.ref-topic { grid-template-columns: minmax(0,1fr); }
  .ref-heading { padding-block: 20px 27px; }
  .ref-heading h1 { margin-block: 12px; font-size: clamp(2.05rem,8vw,3rem); overflow-wrap: anywhere; }
  .ref-heading p { font-size: .98rem; }
  .ref-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ref-table table { font-size: .79rem; }
}

.ref-cards a,
.ref-group-nav a,
.ref-links a,
.ref-form,
.ref-result,
.ref-related section {
  --ink: #edf5f5;
  --muted: #c1d3de;
  --teal: #a7e4dc;
  --line: #57717d;
  --panel: #204054;
  color: var(--ink);
}
.ref-table th,.ref-index-list dt { color: var(--ink); }
.ref-table tbody a { color: var(--teal); text-decoration: underline; text-underline-offset: .15em; }
.ref-error { color: #743725; background: #fae7d8; border-color: #9c5e45; }
