/* Lodge Finder — palette & type
   Lodge blue, gilt and parchment; IM Fell (17th-c. printing types) for display,
   Instrument Sans for the interface. */
:root {
  --night:     #0A162E;
  --lodge:     #0F1F3F;
  --lodge-2:   #16295088;
  --line:      #2A3E68;
  --gilt:      #CDAA5C;
  --gilt-hi:   #E6C77E;
  --parchment: #EFE5CF;
  --mist:      #A3B3D1;
  --danger:    #F0A08C;

  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --display-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Modular scale, ratio 1.25 */
  --s-1: .8rem; --s0: 1rem; --s1: 1.25rem; --s2: 1.563rem; --s3: 1.953rem; --s4: 2.441rem; --s5: 3.052rem;
  --gap: clamp(1rem, 3vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0;
  font: 400 var(--s0)/1.55 var(--ui);
  color: var(--parchment);
  background:
    radial-gradient(1200px 600px at 85% -10%, #1B3366 0%, transparent 60%),
    linear-gradient(var(--lodge), var(--night) 900px) var(--night);
  background-repeat: no-repeat;
  min-height: 100vh;
}
:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 3px; border-radius: 3px; }
a { color: var(--gilt-hi); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--parchment); }

/* ---------- Masthead */
.masthead__inner {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gap) clamp(1.25rem, 3vw, 2rem);
  display: flex; align-items: center; gap: 1.25rem;
}
.emblem { width: clamp(52px, 7vw, 72px); height: auto; flex: none; }
.brand {
  margin: 0;
  font: 400 clamp(var(--s4), 6vw, 4.2rem)/1 var(--display-sc);
  letter-spacing: .01em;
  color: var(--gilt);
}
.lede {
  margin: .35rem 0 0; max-width: 46ch; letter-spacing: normal;
  font: italic 400 var(--s1)/1.35 var(--display);
  color: var(--mist);
}
/* The mosaic pavement: a single thin strip */
.pavement {
  height: 14px;
  background:
    repeating-conic-gradient(var(--parchment) 0 25%, var(--night) 0 50%) 0 0 / 14px 14px;
  opacity: .9;
  border-block: 1px solid var(--gilt);
}

main { max-width: 1240px; margin: 0 auto; padding: 0 var(--gap); }

/* ---------- Search band */
.search {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.6fr) auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: end;
}
.search label {
  display: block; margin-bottom: .45rem;
  font: 400 var(--s1)/1.2 var(--display);
  color: var(--parchment);
}
#where {
  width: 100%; max-width: 16rem;
  font: 400 var(--s3)/1.1 var(--display);
  letter-spacing: .03em;
  color: var(--parchment);
  background: transparent;
  border: 0; border-bottom: 2px solid var(--gilt);
  padding: .1em 0 .15em;
}
#where::placeholder { color: #A3B3D155; }
#where:focus { outline: none; border-bottom-color: var(--gilt-hi); background: #ffffff08; }
.link-btn {
  display: block; margin-top: .6rem; padding: 0;
  background: none; border: 0; cursor: pointer;
  font: 500 var(--s-1)/1.4 var(--ui); color: var(--mist);
  text-decoration: underline; text-underline-offset: .2em;
}
.link-btn:hover { color: var(--gilt-hi); }

.compass-row { display: flex; align-items: center; gap: 1rem; }
.compasses { width: 150px; height: 112px; flex: none; overflow: visible; }
.compasses line { stroke: var(--gilt); stroke-width: 5; stroke-linecap: round; }
.compasses .tip { fill: var(--gilt-hi); }
.compasses .hinge { fill: var(--night); stroke: var(--gilt); stroke-width: 3; }
.compasses .hinge-pin { fill: var(--gilt-hi); }
.compasses__arc { fill: none; stroke: var(--mist); stroke-width: 1.5; stroke-dasharray: 3 4; }
#legL, #legR { transform-origin: 80px 14px; transition: transform .35s cubic-bezier(.3,1.4,.5,1); }

.radius-control { flex: 1; min-width: 0; }
#radiusOut { display: block; font: 400 var(--s3)/1 var(--display); color: var(--parchment); margin-bottom: .5rem; }
#radiusNum { color: var(--gilt-hi); }
input[type=range] { width: 100%; appearance: none; background: transparent; height: 28px; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--gilt) var(--fill, 20%), var(--line) 0); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--gilt); }
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; margin-top: -8px;
  background: var(--night); border: 2px solid var(--gilt-hi); transform: rotate(45deg); cursor: grab;
}
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 0;
  background: var(--night); border: 2px solid var(--gilt-hi); transform: rotate(45deg); cursor: grab;
}
.radius-scale { display: flex; justify-content: space-between; font-size: var(--s-1); color: var(--mist); }

.primary {
  font: 600 var(--s0)/1 var(--ui); letter-spacing: .02em;
  color: var(--night); background: var(--gilt);
  border: 0; border-radius: 2px;
  padding: 1rem 1.6rem; cursor: pointer;
  box-shadow: inset 0 -3px 0 #00000030;
  transition: background .15s;
}
.primary:hover { background: var(--gilt-hi); }
.primary[aria-busy=true] { opacity: .7; cursor: progress; }
.form-msg { grid-column: 1 / -1; margin: 0; color: var(--danger); }

/* ---------- Welcome (empty state) */
.welcome {
  max-width: 62ch; margin: 1rem 0 4rem;
  font: 400 var(--s1)/1.6 var(--display); color: var(--mist);
}
.welcome p { margin: 0; }

/* ---------- Every lodge in the state, by town: a quiet index below the search */
.directory { margin: 0 0 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.directory h2 { margin: 0; font: 400 var(--s3)/1.15 var(--display); color: var(--parchment); }
.directory__lede { margin: .4rem 0 1.5rem; color: var(--mist); max-width: 62ch; }
.directory__towns { columns: 15rem; column-gap: 2rem; }
.directory__town { break-inside: avoid; margin: 0 0 1rem; }
.directory__town h3 { margin: 0 0 .2rem; font: 600 var(--s-1)/1.3 var(--ui); color: var(--gilt); letter-spacing: .02em; }
.directory__town ul { list-style: none; margin: 0; padding: 0; }
.directory__town li { font-size: var(--s-1); line-height: 1.5; }
.directory__town a { color: var(--parchment); text-decoration: none; }
.directory__town a:hover { color: var(--gilt-hi); text-decoration: underline; }

/* ---------- Results */
.results {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--gap); align-items: start; margin-bottom: 3rem;
}
.results__head {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(var(--night) calc(100% - .75rem), transparent);
  padding: .5rem 0 1rem;
}
#summary { margin: 0 0 .75rem; font: 400 var(--s2)/1.25 var(--display); color: var(--parchment); }
#summary em { color: var(--gilt-hi); font-style: italic; }

.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.tabs button {
  position: relative; background: none; border: 0; cursor: pointer;
  padding: .6rem 0; font: 500 var(--s0)/1 var(--ui); color: var(--mist);
}
.tabs button[aria-selected=true] { color: var(--parchment); }
.tabs button[aria-selected=true]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gilt);
}
.count {
  display: inline-block; min-width: 1.6em; margin-left: .3em; padding: .15em .45em;
  font-size: var(--s-1); border-radius: 99px; background: #ffffff10; color: var(--parchment);
}
.event-search { margin: 0 0 .5rem; }
#q {
  width: 100%;
  font: 400 var(--s0)/1.3 var(--ui); color: var(--parchment);
  background: #ffffff0a; border: 1px solid var(--line); border-radius: 2px;
  padding: .65rem .8rem;
}
#q::placeholder { color: #A3B3D199; }
#q:focus { outline: none; border-color: var(--gilt); background: #ffffff12; }
.event-search__count { margin: .3rem 0 0; font-size: var(--s-1); color: var(--mist); min-height: 1.2em; }
mark { background: #CDAA5C40; color: inherit; border-bottom: 1px solid var(--gilt); padding: 0 .05em; }
.link-btn.inline { display: inline; margin: 0; font: inherit; color: var(--gilt-hi); }
.filter-chip {
  margin-top: .75rem; display: flex; align-items: center; gap: .75rem;
  font-size: var(--s-1); color: var(--mist);
}
.filter-chip button { background: none; border: 1px solid var(--line); color: var(--parchment); border-radius: 99px; padding: .25rem .7rem; cursor: pointer; font: inherit; }
.filter-chip button:hover { border-color: var(--gilt); }

/* Lodge list: a register, not a card grid */
.lodges { list-style: none; margin: 0; padding: 0; }
.lodge {
  display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 0 1rem;
  padding: 1.1rem .5rem 1.1rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 14rem;
}
.lodge.is-active { background: linear-gradient(90deg, #CDAA5C14, transparent 70%); }
/* The lodge whose pin the pointer is on: a gilt rule down the left edge, so it's easy to spot while scanning. */
.lodge.is-hover { background: linear-gradient(90deg, #CDAA5C26, transparent 70%); box-shadow: inset 3px 0 0 var(--gilt); }
.leaflet-marker-icon:hover .pin { background: var(--gilt); }
.leaflet-marker-icon:hover .pin span { color: var(--night); }
.lodge__no {
  font: 400 var(--s3)/1 var(--display); color: var(--gilt);
  text-align: right; padding-top: .1rem;
}
.lodge__no small { display: block; font: 400 var(--s-1)/1.6 var(--display); color: var(--mist); }
.lodge h3 { margin: 0; font: 400 var(--s2)/1.15 var(--display); }
.lodge h3 button {
  all: unset; cursor: pointer; color: var(--parchment);
}
.lodge h3 button:hover { color: var(--gilt-hi); }
.lodge h3 button:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 3px; }
.lodge__dist { font: 500 var(--s-1)/1.4 var(--ui); color: var(--mist); white-space: nowrap; padding-top: .35rem; }
.lodge__body { grid-column: 2 / -1; margin-top: .35rem; font-size: .95rem; color: #D6CCB6; }
.lodge__body p { margin: .2rem 0; }
.meet { margin: .5rem 0 .2rem; padding: 0; list-style: none; }
.meet li { margin: .1rem 0; }
.meet strong { font-weight: 600; color: var(--parchment); }
.meet span { color: var(--mist); }
.lodge__actions { margin-top: .7rem; }
.dir-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .95rem; border: 1px solid var(--gilt); border-radius: 2px;
  font: 600 var(--s-1)/1 var(--ui); color: var(--gilt-hi); text-decoration: none;
}
.dir-btn::before {
  content: ""; width: .7rem; height: .7rem; flex: none;
  background: currentColor; clip-path: polygon(0 45%, 100% 0, 55% 100%, 45% 55%);
}
.dir-btn:hover { background: var(--gilt); color: var(--night); }
.event__meta a { color: var(--gilt-hi); }
.popup-dir { display: inline-block; margin-top: .45rem; font-weight: 600; color: #6B4F12 !important; }
.lodge__links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .55rem; font-size: var(--s-1); }
.events-link { background: none; border: 0; padding: 0; cursor: pointer; font: 600 var(--s-1)/1.4 var(--ui); color: var(--gilt-hi); text-decoration: underline; text-underline-offset: .2em; }
.approx { color: var(--mist); font-style: italic; }

/* Events: a trestleboard by day */
.day { margin: 1.4rem 0 0; }
.day h3 {
  margin: 0 0 .25rem; padding-bottom: .35rem;
  font: italic 400 var(--s1)/1.2 var(--display); color: var(--gilt);
  border-bottom: 1px solid var(--line);
}
.event {
  display: grid; grid-template-columns: 5.2rem 1fr; gap: .9rem;
  padding: .75rem 0; border-bottom: 1px solid #2A3E6866;
}
.event__time { font: 500 var(--s-1)/1.5 var(--ui); color: var(--mist); padding-top: .1rem; }
.event__title { margin: 0; font-weight: 500; color: var(--parchment); }
.event__meta { margin: .2rem 0 0; font-size: var(--s-1); color: var(--mist); }
.event__meta button { all: unset; cursor: pointer; color: var(--gilt-hi); text-decoration: underline; text-underline-offset: .2em; }
.event__meta button:focus-visible { outline: 2px solid var(--gilt-hi); }
.event details { margin-top: .3rem; font-size: var(--s-1); color: #CFC5AE; }
.event summary { cursor: pointer; color: var(--mist); }
.event details p { white-space: pre-line; margin: .3rem 0 0; }

.empty { padding: 2rem 0; font: italic 400 var(--s1)/1.5 var(--display); color: var(--mist); max-width: 46ch; }

/* Map */
.results__map { position: sticky; top: 1rem; }
#map {
  height: calc(100vh - 2rem); min-height: 420px;
  border: 1px solid var(--gilt); border-radius: 2px;
  background: #E9DFC8;
}
#map .leaflet-tile-pane { filter: sepia(.45) saturate(.75) hue-rotate(-8deg) brightness(.98); }
.leaflet-container { font: 400 .9rem/1.4 var(--ui); }
.pin {
  display: grid; place-items: center;
  width: 30px; height: 30px; transform: rotate(45deg);
  background: var(--lodge); border: 2px solid var(--gilt);
  box-shadow: 0 2px 6px #0006;
}
.pin span { transform: rotate(-45deg); font: 600 10px/1 var(--ui); color: var(--gilt-hi); letter-spacing: -.02em; }
.pin.is-active { background: var(--gilt); }
.pin.is-active span { color: var(--night); }
/* A lodge in a neighbouring state: same pin, parchment outline instead of gilt. */
.pin--other { border-color: var(--parchment); border-style: dashed; }
.pin--other span { color: var(--parchment); }
.lodge__st {
  display: block; margin-top: .3rem; text-align: right;
  font: 600 .7rem/1 var(--ui); letter-spacing: .06em; color: var(--parchment);
}

.origin { width: 16px; height: 16px; border-radius: 50%; background: #B4432F; border: 3px solid #fff; box-shadow: 0 0 0 6px #B4432F44; }
.leaflet-popup-content-wrapper { background: var(--parchment); color: var(--night); border-radius: 2px; }
.leaflet-popup-tip { background: var(--parchment); }
.leaflet-popup-content { margin: .8rem 1rem; }
.leaflet-popup-content strong { font: 400 1.15rem/1.2 var(--display); display: block; }

/* Footer */
.colophon {
  max-width: 1240px; margin: 0 auto; padding: 2rem var(--gap) 3rem;
  border-top: 1px solid var(--line);
  font-size: var(--s-1); color: var(--mist);
}
.colophon p { max-width: 75ch; margin: .3rem 0; }
.colophon p.colophon__version { margin-top: 1.2rem; font-variant-numeric: tabular-nums; }

/* ---------- Responsive */
@media (max-width: 960px) {
  .search { grid-template-columns: 1fr; align-items: stretch; }
  .primary { justify-self: start; }
  .results { grid-template-columns: 1fr; }
  .results__map { position: relative; top: 0; order: -1; }
  #map { height: 46vh; min-height: 300px; }
  .results__head { top: 0; }
  .lodge { scroll-margin-top: 18rem; }
}
@media (max-width: 480px) {
  .lodge { grid-template-columns: 2.6rem 1fr; }
  .lodge__dist { grid-column: 2; padding-top: .15rem; }
  .compasses { width: 96px; height: 76px; }
  .event { grid-template-columns: 4.4rem 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Filters and tools above the lists */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; margin-top: .8rem; font-size: var(--s-1); color: var(--mist); }
.select { display: inline-flex; align-items: center; gap: .5rem; }
.select select {
  font: 500 var(--s-1)/1.2 var(--ui); color: var(--parchment);
  background: #ffffff0a; border: 1px solid var(--line); border-radius: 2px; padding: .4rem .5rem;
}
.select select:focus-visible { border-color: var(--gilt); }
.select option { background: var(--night); }
.check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
.check input { width: 1rem; height: 1rem; accent-color: var(--gilt); margin: 0; }
.chips { display: inline-flex; gap: .35rem; }
.chip {
  font: 600 var(--s-1)/1 var(--ui); letter-spacing: .04em; color: var(--mist);
  background: none; border: 1px solid var(--line); border-radius: 99px; padding: .4rem .7rem; cursor: pointer;
}
.chip[aria-pressed=true] { background: var(--gilt); border-color: var(--gilt); color: var(--night); }
.chip:hover { border-color: var(--gilt); }

/* ---------- Dropdown menus (Add to calendar, Subscribe) */
.menu { position: relative; display: inline-block; }
.menu > summary {
  list-style: none; cursor: pointer; user-select: none;
  font: 600 var(--s-1)/1.4 var(--ui); color: var(--gilt-hi);
  text-decoration: underline; text-underline-offset: .2em;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: " ▾"; text-decoration: none; display: inline-block; margin-left: .15em; }
.menu__panel {
  position: absolute; z-index: 1000; top: calc(100% + .35rem); left: 0; min-width: 15rem;
  display: grid; gap: .1rem; padding: .45rem;
  background: var(--parchment); color: var(--night); border-radius: 3px; box-shadow: 0 8px 24px #0008;
}
.menu__panel a, .menu__panel button {
  display: block; padding: .5rem .6rem; border-radius: 2px; color: var(--night) !important; text-decoration: none; font: 500 var(--s-1)/1.3 var(--ui); text-align: left;
}
.menu__panel a:hover, .menu__panel button:hover { background: #0F1F3F14; }
.menu__panel p { margin: .2rem .6rem .4rem; font-size: var(--s-1); line-height: 1.4; color: #3d4560; max-width: 30ch; }
#subscribe .menu__panel { left: 0; right: auto; }
/* Weekly email sign-up */
.alertform { min-width: 18rem; padding: .7rem; gap: .45rem; }
.alertform p { margin: 0; max-width: 34ch; }
.alertform input[type=email] {
  width: 100%; font: 400 var(--s0)/1.3 var(--ui); color: var(--night);
  background: #fff; border: 1px solid #C9BFA6; border-radius: 2px; padding: .55rem .6rem;
}
.alertform input[type=email]:focus-visible { outline: 2px solid var(--gilt); outline-offset: 1px; }
.menu__panel .alertform__go {
  background: var(--lodge); color: var(--parchment) !important; border: 0; cursor: pointer;
  font: 600 var(--s-1)/1 var(--ui); padding: .65rem .8rem; text-align: center;
}
.menu__panel .alertform__go:hover { background: var(--night); }
.alertform__msg { font-weight: 600; color: var(--night) !important; }
.alertform__msg.is-bad { color: #9a3412 !important; }
.alertform__fine { font-size: .72rem !important; color: #5C6680 !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.menu__panel { max-width: calc(100vw - 2.5rem); }

/* ---------- Lodge additions */
.next { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin: .45rem 0 .1rem; }
.next p { margin: 0; }
.next__label { color: var(--mist); }
.next strong { font-weight: 600; color: var(--parchment); }
.badge {
  display: inline-block; margin-left: .3rem; padding: .12rem .5rem; border-radius: 99px;
  font: 600 .72rem/1.3 var(--ui); background: var(--gilt); color: var(--night); vertical-align: .1em;
}
.lodge__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ghost-btn {
  font: 600 var(--s-1)/1 var(--ui); color: var(--parchment); background: none;
  border: 1px solid var(--line); border-radius: 2px; padding: .55rem .9rem; cursor: pointer;
}
.ghost-btn:hover { border-color: var(--gilt); color: var(--gilt-hi); }

/* ---------- Event additions */
.event__actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.1rem; margin-top: .35rem; }
.event--meeting .event__title { color: #CFC5AE; font-weight: 400; }
.event--meeting .event__time { opacity: .8; }
.event.is-active { background: linear-gradient(90deg, #CDAA5C1f, transparent 80%); }
.event { scroll-margin-top: 12rem; }

/* ---------- Offline notice and toast */
.offline {
  margin: -1rem 0 1.5rem; padding: .7rem 1rem; border-left: 3px solid var(--gilt);
  background: #ffffff0d; color: var(--parchment); font-size: .95rem;
}
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 2000;
  background: var(--parchment); color: var(--night); padding: .65rem 1.1rem; border-radius: 3px;
  font: 600 var(--s-1)/1.2 var(--ui); box-shadow: 0 8px 24px #0008;
}
@media (max-width: 480px) {
  .menu__panel { min-width: 13rem; }
  .toolbar { gap: .5rem .9rem; }
}
.event__actions .link-btn { font: 600 var(--s-1)/1.4 var(--ui); color: var(--gilt-hi); }

/* ---------- Header link back to the US map */
.masthead__actions { margin-left: auto; align-self: center; display: flex; gap: .5rem; white-space: nowrap; }
/* Phones: the buttons get their own row under the title instead of squeezing it. */
@media (max-width: 560px) {
  .masthead__inner:has(> .masthead__actions > :not([hidden])) { flex-wrap: wrap; row-gap: .9rem; }
  .masthead__inner:has(> .masthead__actions > :not([hidden])) > div:not(.masthead__actions) { flex: 1 1 0; min-width: 0; }
  .masthead__actions { flex-basis: 100%; justify-content: flex-end; }
}
.masthead__actions:not(:has(> :not([hidden]))) { display: none; }
.masthead__home {
  align-self: center; background: none; cursor: pointer;
  font: 500 var(--s-1)/1 var(--ui); color: var(--mist);
  border: 1px solid var(--line); border-radius: 2px; padding: .55rem .85rem; text-decoration: none;
}
.masthead__home:hover { color: var(--gilt-hi); border-color: var(--gilt); }
.masthead__install { color: var(--gilt-hi); border-color: color-mix(in srgb, var(--gilt) 55%, transparent); }
/* Installed: the app has its own window, so links back to the main site would open in the browser instead. */
.is-app .masthead__install { display: none; }

/* ---------- "How to install" box (Safari has no install prompt) */
.install-help { max-width: 26rem; border: 1px solid var(--line); border-radius: 4px; padding: 1.5rem 1.6rem 1.25rem; background: var(--night); color: var(--parchment); }
.install-help::backdrop { background: #0009; }
.install-help h2 { margin: 0 0 .75rem; font: 400 var(--s2)/1.2 var(--display); color: var(--gilt); }
.install-help ol { margin: 0 0 1.25rem; padding-left: 1.25rem; line-height: 1.6; color: var(--mist); }
.install-help li + li { margin-top: .35rem; }
.install-help strong { color: var(--parchment); font-weight: 600; }
.install-help svg { width: 1.1em; height: 1.1em; vertical-align: -.15em; color: var(--gilt-hi); }
.install-help button { font: 600 var(--s-1)/1 var(--ui); padding: .6rem 1.1rem; border-radius: 2px; border: 0; background: var(--gilt); color: var(--night); cursor: pointer; }


/* Lodge list: filter by name or number */
.namefilter input {
  width: 11rem;
  font: 500 var(--s-1)/1.2 var(--ui); color: var(--parchment);
  background: #ffffff0a; border: 1px solid var(--line); border-radius: 2px; padding: .4rem .5rem;
}
.namefilter input::placeholder { color: #A3B3D188; }
.namefilter input:focus-visible { outline: none; border-color: var(--gilt); }

/* ---------- Home: the US map */
.usmap { margin: 0 0 3rem; }
.usmap h2 { margin: 0 0 .75rem; font: 400 var(--s2)/1.2 var(--display); color: var(--parchment); }
.usmap__svg { display: block; width: 100%; height: auto; max-height: 70vh; }
.usmap .st path, .usmap path.st {
  fill: #13244A; stroke: var(--line); stroke-width: .8; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.usmap .st--on path { fill: #1F3B70; stroke: var(--gilt); stroke-width: 1.2; cursor: pointer; transition: fill .15s; }
.usmap .st--on:hover path, .usmap .st--on:focus-visible path { fill: #2B4C88; }
.usmap .st--on:focus-visible { outline: none; }
.usmap .st--on:focus-visible path { stroke: var(--gilt-hi); stroke-width: 2.5; }
.usmap__marks a { cursor: pointer; }
/* The icon grows on hover around its own centre (scaled on a wrapping group: Chrome mis-centres a scaled <use>). It takes no pointer events: hover comes from a fixed,
   invisible square under it, so the growing icon can never slide out from under the pointer and end its own hover. */
.usmap__icon { filter: drop-shadow(0 1px 2px #0009); transition: transform .15s; transform-box: fill-box; transform-origin: center; pointer-events: none; }
.usmap__hit { fill: transparent; }
.usmap__marks a:hover .usmap__icon { transform: scale(1.15); }
.usmap__leader { stroke: var(--gilt); stroke-width: 1; }
.usmap__list { margin-top: 1.25rem; }
.usmap__list h3 { margin: 0 0 .5rem; font: italic 400 var(--s1)/1.2 var(--display); color: var(--gilt); }
.usmap__list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.usmap__list li a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem .5rem .55rem;
  border: 1px solid var(--line); border-radius: 2px; color: var(--parchment); text-decoration: none; font-weight: 500;
}
.usmap__list li a:hover { border-color: var(--gilt); color: var(--gilt-hi); }
/* The small emblem on each state button: a background, not an <img>, since it's decoration. */
.usmap__mark { flex: none; width: 20px; height: 20px; background: url(/favicon.svg) center / contain no-repeat; }
.usmap__list p { color: var(--mist); font-size: var(--s-1); margin: .9rem 0 0; }
.usmap__list p.usmap__claim { margin: 0 0 1.1rem; max-width: 60ch; font: italic 400 var(--s1)/1.4 var(--display); color: var(--parchment); }
.usmap__claim strong { font-style: normal; font-weight: 600; color: var(--gilt-hi); }
.usmap__list p.usmap__app { margin-top: .5rem; }
.usmap__app .link-btn { display: inline; margin: 0; font: inherit; color: var(--gilt-hi); text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; cursor: pointer; }
.usmap__count { font: 500 var(--s-1)/1 var(--ui); color: var(--mist); font-variant-numeric: tabular-nums; }
.usmap__list li a:hover .usmap__count { color: var(--gilt); }

/* ---------- About */
.about { margin-block: 2.5rem 4rem; }
.about > * { max-width: 68ch; }
.about h1 { margin: 0; font: 400 clamp(var(--s3), 5vw, var(--s5))/1.05 var(--display); color: var(--parchment); }
.about__lede { margin: .75rem 0 2.5rem; font: 400 var(--s1)/1.55 var(--display); color: var(--mist); }
.about__lede strong { color: var(--gilt-hi); font-weight: 600; }
.about h2 { margin: 2.5rem 0 .75rem; font: 400 var(--s2)/1.2 var(--display); color: var(--gilt); }
.about h3 { margin: 1.5rem 0 .3rem; font: 600 var(--s0)/1.35 var(--ui); color: var(--parchment); }
.about p { color: var(--mist); line-height: 1.6; margin: 0; }
.about .small { margin-top: .6rem; font-size: var(--s-1); }
.about__states { width: 100%; border-collapse: collapse; font-size: var(--s-1); }
.about__states th, .about__states td { text-align: left; padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.about__states thead th { font-weight: 500; color: var(--mist); }
.about__states tbody th { font-weight: 500; }
.about__states .num { text-align: right; font-variant-numeric: tabular-nums; }
.about__states a { color: var(--parchment); }
.about__states a:hover { color: var(--gilt-hi); }

/* ---------- Message page */
.notice { max-width: 60ch; margin: 3rem 0 5rem; }
.notice h1, .notice h2 { font: 400 var(--s3)/1.2 var(--display); color: var(--parchment); margin: 0 0 .75rem; }
.notice p { color: var(--mist); font-size: var(--s1); }
.notice .primary { display: inline-block; text-decoration: none; margin-top: .5rem; }

@media (max-width: 720px) {
  .masthead__home { padding: .45rem .6rem; }
}

/* ---------- A lodge's own page */
.crumbs { margin: 1.5rem 0 0; font-size: var(--s-1); color: var(--mist); }
.crumbs a { color: var(--mist); }
.crumbs a:hover { color: var(--gilt-hi); }
.lodgepage__head {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 3vw, 2rem); align-items: end;
  margin: clamp(1rem, 3vw, 2rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--line);
}
/* The lodge number set like a charter's seal: the one large thing on the page */
.lodgepage__no {
  margin: 0; min-width: 2ch; text-align: right;
  font: 400 clamp(4rem, 12vw, 7.5rem)/.82 var(--display); color: var(--gilt);
  font-variant-numeric: oldstyle-nums;
}
.lodgepage__no small { display: block; font: italic 400 var(--s1)/1.4 var(--display); color: var(--mist); }
.lodgepage__head h1 { margin: 0; font: 400 clamp(var(--s3), 5vw, var(--s5))/1.05 var(--display); color: var(--parchment); }
.lodgepage__where { margin: .4rem 0 0; font: italic 400 var(--s1)/1.3 var(--display); color: var(--mist); }
.lodgepage__district { margin: .15rem 0 0; font-size: var(--s-1); color: var(--mist); }
.lodgepage__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; margin-bottom: 3rem; }
.lodgepage__main > section { margin-bottom: 2.25rem; }
.lodgepage h3 { margin: 0 0 .75rem; font: 400 var(--s2)/1.2 var(--display); color: var(--gilt); }
.lodgepage .day h4 {
  margin: 0 0 .25rem; padding-bottom: .35rem;
  font: italic 400 var(--s1)/1.2 var(--display); color: var(--gilt);
  border-bottom: 1px solid var(--line);
}
.meet--page { font-size: var(--s1); }
.meet--page li + li { margin-top: .5rem; }
.meet--page span { display: block; font-size: var(--s0); }
.lodgepage__map .leaflet-tile-pane { filter: sepia(.45) saturate(.75) hue-rotate(-8deg) brightness(.98); }
.muted { color: var(--mist); font-style: italic; }
.small { font-size: var(--s-1); }
.dates { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.dates li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; padding: .7rem 0; border-bottom: 1px solid #2A3E6866; }
.dates__when { font-weight: 600; color: var(--parchment); min-width: 13.5rem; }
.dates .cal-menu { margin-left: auto; }
.nearby { list-style: none; margin: 0 0 1rem; padding: 0; columns: 2 16rem; column-gap: 2rem; }
.nearby li { break-inside: avoid; padding: .35rem 0; }
.nearby span { display: block; font-size: var(--s-1); color: var(--mist); }
.lodgepage__side { position: sticky; top: 1rem; display: grid; gap: 1.25rem; }
.lodgepage__map { height: 260px; border: 1px solid var(--gilt); border-radius: 2px; }
.lodgepage__card { padding: 1.1rem 1.2rem; background: #ffffff08; border: 1px solid var(--line); border-radius: 2px; }
.lodgepage__addr { margin: 0; font: 400 var(--s1)/1.35 var(--display); color: var(--parchment); }
.lodgepage .lodge__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.contact { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .45rem; }
.embedcode { font-size: var(--s-1); color: var(--mist); }
.embedcode summary { cursor: pointer; color: var(--gilt-hi); font-weight: 600; }
.embedcode textarea, .code {
  width: 100%; margin: .5rem 0; padding: .6rem; resize: vertical;
  font: 400 .78rem/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--parchment); background: #00000033; border: 1px solid var(--line); border-radius: 2px;
}
@media (max-width: 900px) {
  .lodgepage__grid { grid-template-columns: 1fr; }
  .lodgepage__side { position: static; order: -1; }
  .lodgepage__map { height: 200px; }
}

/* ---------- Widget builder */
.widgetpage__title { margin: 1rem 0 .4rem; font: 400 clamp(var(--s3), 5vw, var(--s4))/1.1 var(--display); color: var(--parchment); }
.widgetpage__intro { margin: 0 0 2rem; max-width: 62ch; color: var(--mist); }
.widgetpage__grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.25fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; margin-bottom: 3rem; }
.widgetform { display: grid; gap: .9rem; align-content: start; }
.widgetform fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: .35rem; }
.widgetform legend, .widgetform label:not(.check) { display: block; margin-bottom: .3rem; font: 400 var(--s1)/1.2 var(--display); color: var(--parchment); }
.widgetform .optional { font: italic 400 var(--s-1)/1 var(--display); color: var(--mist); }
.widgetform input:not([type=radio]):not([type=checkbox]), .widgetform select {
  width: 100%; font: 400 var(--s0)/1.3 var(--ui); color: var(--parchment);
  background: #ffffff0a; border: 1px solid var(--line); border-radius: 2px; padding: .55rem .7rem;
}
.widgetform select option { background: var(--night); }
.widgetform input:focus-visible, .widgetform select:focus-visible { outline: none; border-color: var(--gilt); }
.widgetform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.widgetform [data-for-kind] { display: grid; gap: .6rem; }
.widgetform [data-for-kind][hidden] { display: none; }
.widgetform .primary { justify-self: start; margin-top: .5rem; }
.widgetpage__out h3 { margin: 0 0 .6rem; font: 400 var(--s2)/1.2 var(--display); color: var(--gilt); }
.widgetpage__out h3 + p { margin-top: 0; color: var(--mist); }
.widgetpage__preview { display: block; width: 100%; max-width: 680px; height: 420px; margin-bottom: 1.75rem; border: 1px dashed var(--line); background: transparent; }
@media (max-width: 900px) { .widgetpage__grid { grid-template-columns: 1fr; } }

/* ---------- Suggest a correction */
.suggestpage > * { max-width: 760px; }
.suggestform { margin-bottom: 3rem; }
.suggestform fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.suggestform fieldset > legend { grid-column: 1 / -1; margin-bottom: .2rem; font: italic 400 var(--s2)/1.2 var(--display); color: var(--gilt); }
.suggestform fieldset .widgetform__row, .suggestform fieldset > .hint { grid-column: 1 / -1; }
.suggestform__field { display: grid; gap: .3rem; align-content: start; }
.suggestform__field--wide { grid-column: 1 / -1; }
.suggestform textarea {
  width: 100%; font: 400 var(--s0)/1.45 var(--ui); color: var(--parchment); resize: vertical;
  background: #ffffff0a; border: 1px solid var(--line); border-radius: 2px; padding: .55rem .7rem;
}
.suggestform textarea:focus-visible { outline: none; border-color: var(--gilt); }
.suggestform [aria-invalid=true] { border-color: var(--danger) !important; }
.suggestform .hint { margin: 0; font-size: var(--s-1); color: var(--mist); }
.suggestform .field-error { margin: 0; font-size: var(--s-1); font-weight: 600; color: var(--danger); }
@media (max-width: 640px) { .suggestform fieldset { grid-template-columns: 1fr; } }
.suggestpage > .form-msg { margin: 0 0 1.25rem; }

.usmap .st--here path { fill: #2B4C88; stroke: var(--gilt-hi); stroke-width: 2.2; }

/* ---------- Use my location: a real button, not a footnote */
.locate-btn {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: .8rem;
  padding: .55rem .9rem; border: 1px solid var(--gilt); border-radius: 2px; background: none; cursor: pointer;
  font: 600 var(--s-1)/1 var(--ui); color: var(--gilt-hi);
}
@media (hover: hover) { .locate-btn:hover { background: var(--gilt); color: var(--night); } }
.locate-btn:active { background: #CDAA5C26; }
.locate-btn[aria-busy=true] { opacity: .7; cursor: progress; }
/* A crosshair: ring with a centre dot, drawn in CSS so it follows the text colour */
.locate-btn__icon {
  position: relative; width: .95rem; height: .95rem; flex: none;
  border: 2px solid currentColor; border-radius: 50%;
}
.locate-btn__icon::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: .25rem; height: .25rem; border-radius: 50%; background: currentColor;
}
@media (max-width: 640px) { .locate-btn { display: flex; width: 100%; justify-content: center; padding: .8rem; } }

/* ---------- US map page: the searches live in the header, beside the title */
.home .masthead__inner { flex-wrap: wrap; row-gap: 1.5rem; }
.home .finder { align-self: flex-end; }
.finder { margin-left: auto; width: min(31rem, 100%); }
.finder__here { margin: 0 0 1rem; font: italic 400 var(--s0)/1.4 var(--display); color: var(--mist); }
.finder__here a { font-style: normal; font-family: var(--ui); font-weight: 600; font-size: var(--s-1); white-space: nowrap; }
/* Two tabs made of radio buttons, so they work without JavaScript */
.finder__mode { position: absolute; opacity: 0; pointer-events: none; }
.finder__tabs { display: flex; gap: 1.5rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line); }
.finder__tabs label {
  position: relative; padding: 0 0 .55rem; cursor: pointer;
  font: 500 var(--s-1)/1.2 var(--ui); color: var(--mist);
}
.finder__tabs label:hover { color: var(--parchment); }
#m-place:checked ~ .finder__tabs label[for=m-place],
#m-lodge:checked ~ .finder__tabs label[for=m-lodge] { color: var(--parchment); }
#m-place:checked ~ .finder__tabs label[for=m-place]::after,
#m-lodge:checked ~ .finder__tabs label[for=m-lodge]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gilt);
}
#m-place:focus-visible ~ .finder__tabs label[for=m-place],
#m-lodge:focus-visible ~ .finder__tabs label[for=m-lodge] { outline: 2px solid var(--gilt-hi); outline-offset: 4px; border-radius: 2px; }
#m-place:checked ~ .finder__form--lodge, #m-lodge:checked ~ .finder__form--place { display: none; }

.finder__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; }
.finder__form input, .finder__form select {
  min-width: 0; height: 2.4rem;
  font: 400 var(--s1)/1.2 var(--display); color: var(--parchment);
  background: transparent; border: 0; border-bottom: 2px solid var(--gilt); border-radius: 0; padding: 0 0 .15rem;
}
.finder__form input { flex: 1 1 12rem; }
.finder__form select { flex: 0 0 auto; max-width: 11rem; padding-right: 1.2em; cursor: pointer; }
.finder__form select option { background: var(--night); font-family: var(--ui); }
.finder__form input::placeholder { color: #A3B3D166; }
.finder__form input:focus, .finder__form select:focus { outline: none; border-bottom-color: var(--gilt-hi); background: #ffffff08; }
.finder__form input:focus-visible, .finder__form select:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 3px; }
.finder__form .primary { flex: none; }
.finder__form .form-msg { flex-basis: 100%; }
.home .usmap { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
@media (max-width: 960px) { .finder { margin-left: 0; width: 100%; } }
@media (max-width: 480px) {
  .finder__form .primary { width: 100%; }
  .finder__form select { max-width: none; flex: 1 1 100%; }
}
.finder { width: min(35rem, 100%); }
@media (min-width: 481px) {
  .finder__form--lodge { flex-wrap: nowrap; }
  .finder__form--lodge input { flex: 1 1 6rem; }
  .finder__form--lodge select { max-width: 12rem; font-size: var(--s0); }
}
/* Keep the emblem beside the title when the search wraps below it */
.home .masthead__inner > div:not(.finder) { flex: 1 1 0; min-width: min(16rem, 100%); }

/* ---------- Lodge visit passport */
.passport { margin-block: 2.5rem 4rem; }
.passport > * { max-width: 980px; }
.passport h1 { margin: 0; font: 400 clamp(var(--s3), 5vw, var(--s5))/1.05 var(--display); color: var(--parchment); }
.passport h2 { margin: 0 0 .75rem; font: 400 var(--s2)/1.2 var(--display); color: var(--gilt); }
.passport h3 { margin: 1.5rem 0 .5rem; font: 400 var(--s1)/1.3 var(--display); color: var(--parchment); }
.passport h3 .small { font: 500 var(--s-1)/1 var(--ui); color: var(--mist); margin-left: .4rem; }
.passport p { color: var(--mist); line-height: 1.6; }
.passport .small { font-size: var(--s-1); }
.passport section + section { margin-top: 2.75rem; }
.passport__intro { max-width: 62ch; }
.passport__lede { margin: .75rem 0 1.5rem; font: 400 var(--s1)/1.55 var(--display); }
.passport__perks { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .8rem; color: var(--mist); line-height: 1.55; }
.passport__perks li { padding-left: 1.1rem; border-left: 2px solid var(--gilt); }
.passport__perks strong { color: var(--parchment); font-weight: 600; }
.passport__signin label, .passport__name label { display: block; margin-bottom: .4rem; color: var(--parchment); font-weight: 500; }
.passport__row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.passport__row input:not([type=checkbox]) { flex: 1 1 16rem; min-width: 0; padding: .7rem .8rem; font: 400 var(--s0)/1.2 var(--ui); color: var(--parchment); background: #ffffff0d; border: 1px solid var(--line); border-radius: 2px; }
.passport__row input:focus { border-color: var(--gilt); }
.passport__error { color: #F4B9A0; font-weight: 500; }
.passport__privacy { margin-top: 2rem; }
.passport__code { margin: 1.5rem 0; }
.passport__code label { display: block; margin-bottom: .4rem; color: var(--parchment); font-weight: 500; }
.passport__code input { flex: 0 1 11rem !important; font: 500 var(--s2)/1 var(--ui) !important; letter-spacing: .15em; text-align: center; }
.notice .passport__code p.small { font-size: var(--s-1); }
.passport__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
.passport__head p { margin: .4rem 0 0; }
.passport__totals { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin-top: 1.75rem !important; padding: 1.25rem 0; border-block: 1px solid var(--line); }
.passport__totals p { margin: 0; font: 500 var(--s0)/1 var(--ui); color: var(--mist); }
.passport__totals strong { display: block; margin-bottom: .3rem; font: 400 clamp(2.6rem, 7vw, 3.6rem)/1 var(--display); color: var(--gilt-hi); font-variant-numeric: lining-nums; }
.seals { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.seal { display: grid; padding: .55rem .9rem .55rem 2.4rem; border: 1px solid color-mix(in srgb, var(--gilt) 55%, transparent); border-radius: 2px;
        background: url(/favicon.svg) .7rem center / 1.2rem no-repeat, #CDAA5C10; }
.seal__title { color: var(--gilt-hi); font: 400 var(--s1)/1.2 var(--display); }
.seal__detail { color: var(--mist); font-size: var(--s-1); }
.nextup p { margin: .2rem 0 .35rem; }
.nextup strong { color: var(--parchment); font-weight: 600; }
.nextup progress { width: min(22rem, 100%); height: .5rem; appearance: none; border: 0; border-radius: 99px; background: #ffffff14; overflow: hidden; }
.nextup progress::-webkit-progress-bar { background: #ffffff14; }
.nextup progress::-webkit-progress-value { background: var(--gilt); }
.nextup progress::-moz-progress-bar { background: var(--gilt); }
.nextup + .nextup { margin-top: .8rem; }
.passport__sharegrid { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.5rem 2rem; align-items: start; }
.passport__sharegrid canvas { width: 100%; height: auto; border: 1px solid var(--line); }
.passport__sharebtns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
@media (max-width: 640px) { .passport__sharegrid { grid-template-columns: 1fr; } }
.stamps { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.stamps > li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.stamps__lodge { font: 400 var(--s1)/1.3 var(--display); color: var(--parchment); margin-right: .5rem; }
.stamps__visits { list-style: none; margin: .35rem 0 0; padding: 0; color: var(--mist); font-size: var(--s-1); display: grid; gap: .2rem; }
.stamps__visits form.inline { display: inline; margin-left: .6rem; }
.passport__delete .check { flex: 1 1 20rem; color: var(--mist); display: flex; gap: .5rem; align-items: start; }

/* Lodge page: the passport button by the lodge's name */
.stampbtn { display: inline-flex; align-items: center; gap: .45rem; margin-top: .9rem; padding: .5rem .9rem .5rem .6rem; border: 1px solid var(--gilt); border-radius: 2px;
            font: 600 var(--s-1)/1 var(--ui); color: var(--gilt-hi); text-decoration: none; background: #CDAA5C14; }
.stampbtn::before { content: ""; width: 1.05rem; height: 1.05rem; background: url(/favicon.svg) center / contain no-repeat; }
.stampbtn:hover { background: #CDAA5C29; color: var(--gilt-hi); }
.stampbtn.is-done { border-color: color-mix(in srgb, var(--gilt) 55%, transparent); background: none; color: var(--mist); }
.passbox.is-mine { border-color: var(--gilt); }
.passbox__mine label { display: inline-flex; gap: .45rem; align-items: center; color: var(--parchment); cursor: pointer; }
.passbox__mine { margin-top: .75rem !important; }
.passport__note { margin: .6rem 0 0; }
.passport__mine { margin-top: 2.25rem !important; }
.passport__name .check { display: flex; gap: .5rem; align-items: start; margin-top: .75rem; color: var(--mist); font-weight: 400; }
.mine { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .6rem; }
.mine li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: center; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 2px; }
.mine li.is-main { border-color: color-mix(in srgb, var(--gilt) 55%, transparent); background: #CDAA5C0d; }
.mine__actions { display: flex; gap: 1rem; }
.mine__actions form.inline { display: inline; }
.mine__upcoming h3, .mine__free h3 { margin-top: 1.25rem; }
.mine__free > p { margin: 0 0 .5rem; }

/* Lodge page: stamp a visit */
.passbox { padding: 1.1rem 1.2rem; border: 1px solid color-mix(in srgb, var(--gilt) 45%, transparent); border-radius: 2px; background: #CDAA5C0d; }
.passbox h2 { margin: 0 0 .4rem; font: 400 var(--s1)/1.25 var(--display); color: var(--gilt-hi); }
.passbox p { margin: 0 0 .75rem; color: var(--mist); font-size: var(--s-1); line-height: 1.5; }
.passbox form { display: grid; gap: .5rem; }
.passbox label { font-size: var(--s-1); color: var(--parchment); }
.passbox input { padding: .5rem .6rem; font: 400 var(--s-1)/1.2 var(--ui); color: var(--parchment); background: #ffffff0d; border: 1px solid var(--line); border-radius: 2px; color-scheme: dark; }
.passbox .row2 { display: grid; grid-template-columns: auto 1fr; gap: .5rem .6rem; align-items: center; }
.passbox .primary { justify-self: start; margin-top: .25rem; }
.passbox ul { list-style: none; margin: 0 0 .75rem; padding: 0; font-size: var(--s-1); color: var(--parchment); display: grid; gap: .15rem; }
.passbox ul span { color: var(--mist); }
.passbox__err { color: #F4B9A0 !important; }

/* Search results: lodges in your passport */
.visited { margin-left: .5rem; padding: .15rem .45rem; border: 1px solid color-mix(in srgb, var(--gilt) 55%, transparent); border-radius: 2px;
           font: 600 .7rem/1 var(--ui); letter-spacing: .02em; color: var(--gilt-hi); vertical-align: .25em; }

/* ---------- Notifications */
.masthead__notify { display: inline-flex; align-items: center; gap: .4rem; }
.masthead__notify svg { width: 1.05em; height: 1.05em; }
.masthead__notify.is-on { color: var(--gilt-hi); border-color: color-mix(in srgb, var(--gilt) 55%, transparent); }
@media (max-width: 560px) { .masthead__notify span { display: none; } .masthead__notify { padding-inline: .6rem; } }
.notify { width: min(30rem, calc(100vw - 2rem)); }
.notify__top { display: flex; justify-content: space-between; align-items: start; }
.install-help .notify__x { background: none; border: 0; color: var(--mist); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 .2rem; }
.notify p { color: var(--mist); line-height: 1.55; margin: 0 0 1rem; }
.notify .notify__ok { color: var(--gilt-hi); }
.notify__form { display: grid; gap: .9rem; }
.notify__form .check { display: flex; gap: .65rem; align-items: start; color: var(--parchment); line-height: 1.4; cursor: pointer; }
.notify__form .check input { margin-top: .2rem; accent-color: var(--gilt); }
.notify__form .check:has(input:disabled) { opacity: .6; cursor: default; }
.notify__form .small { color: var(--mist); font-size: var(--s-1); }
.notify__form a { color: var(--gilt-hi); }
.notify__btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }

/* ---------- Contact */
.contact-us { margin-block: 2.5rem 4rem; }
.contact-us > * { max-width: 46rem; }
.contact-us h1 { margin: 0; font: 400 clamp(var(--s3), 5vw, var(--s5))/1.05 var(--display); color: var(--parchment); }
.contact-us__lede { margin: .75rem 0 .5rem; font: 400 var(--s1)/1.55 var(--display); color: var(--mist); }
.contact-us__aside { margin: 0 0 2rem; padding: .8rem 1rem; border-left: 2px solid var(--gilt); background: #CDAA5C0d; color: var(--mist); font-size: var(--s-1); line-height: 1.55; }
.contact-us__aside strong { color: var(--parchment); }
.contact-us__form { display: grid; gap: 1.4rem; }
.contact-us__form fieldset { border: 0; margin: 0; padding: 0; }
.contact-us__form legend, .contact-us__field label { display: block; margin-bottom: .5rem; color: var(--parchment); font-weight: 500; }
.contact-us__kinds { display: flex; flex-wrap: wrap; gap: .5rem; }
.contact-us__kinds label { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 2px; color: var(--mist); cursor: pointer; }
.contact-us__kinds label:has(input:checked) { border-color: var(--gilt); color: var(--parchment); background: #CDAA5C14; }
.contact-us__kinds input { accent-color: var(--gilt); margin: 0; }
.contact-us__field input, .contact-us__field textarea { width: 100%; box-sizing: border-box; padding: .7rem .8rem; font: 400 var(--s0)/1.45 var(--ui); color: var(--parchment); background: #ffffff0d; border: 1px solid var(--line); border-radius: 2px; }
.contact-us__field textarea { resize: vertical; min-height: 9rem; }
.contact-us__field input:focus, .contact-us__field textarea:focus { border-color: var(--gilt); outline: none; box-shadow: 0 0 0 2px #CDAA5C33; }
.contact-us__field [aria-invalid="true"] { border-color: #F4B9A0; }
.contact-us__two { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem; }
.contact-us .opt { color: var(--mist); font-weight: 400; font-size: var(--s-1); }
.contact-us .field-err { margin: .4rem 0 0; color: #F4B9A0; font-size: var(--s-1); font-weight: 500; }
.contact-us .small { color: var(--mist); font-size: var(--s-1); margin: 0; }
.contact-us form p { margin: 0; }
