/* LTX Info
   One typeface (Atkinson Hyperlegible), two weights.
   One accent color (Royal Arch crimson). Gold appears only on the next-meeting card.
   One column on every screen; the section buttons at the top jump to each part. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg:      #FFFFFF;
  --band:    #F4F2F1;
  --text:    #1A1718;
  --soft:    #4F4749;
  --accent:  #8E1B2B;
  --fill:    #8E1B2B;
  --header:  #7A1626;
  --line:    #DCD7D4;
  --gold:    #B8901F;
  --gold-bg: #FBF6E8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:      #141213;
    --band:    #1E1B1C;
    --text:    #F6F2F2;
    --soft:    #D2CACC;
    --accent:  #EBCB74;
    --fill:    #A8233A;
    --header:  #5E111D;
    --line:    #3A3436;
    --gold:    #E2BE5C;
    --gold-bg: #231F14;
  }
}
:root[data-theme="dark"] {
  --bg: #141213; --band: #1E1B1C; --text: #F6F2F2; --soft: #D2CACC;
  --accent: #EBCB74; --fill: #A8233A; --header: #5E111D; --line: #3A3436; --gold: #E2BE5C; --gold-bg: #231F14;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.1875rem/1.5 "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.top {
  background: var(--header);
  color: #fff;
  padding: max(0.9rem, env(safe-area-inset-top)) 0 0.9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}
.brand img { display: block; border-radius: 9px; box-shadow: 0 0 0 2px rgba(255,255,255,0.55); }
.brand strong { display: block; font-size: 1.5rem; line-height: 1.1; }
.brand small { display: block; font-size: 1rem; opacity: 0.9; }

/* ---------- Section jump links ---------- */
.jump {
  background: var(--band);
  border-bottom: 1px solid var(--line);
}
.jump .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
@media (min-width: 40rem) {
  .jump .wrap { grid-template-columns: repeat(6, auto); justify-content: start; }
}
.jump a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.75rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 359px) {
  .jump .wrap { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
section { padding: 2rem 0 0.5rem; }
h2 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--text);
}
h3 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
p { margin: 0; }
.fine { margin-top: 0.75rem; color: var(--soft); font-size: 1rem; }

/* ---------- Next meeting card ---------- */
.next {
  background: var(--gold-bg);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 1.1rem 1.25rem 1.2rem;
  margin-bottom: 1.25rem;
}
.next-label { font-weight: 700; color: var(--soft); font-size: 1.05rem; }
.next-date  { font-size: 2rem; font-weight: 700; line-height: 1.15; margin: 0.15rem 0 0.4rem; }
.next-body  { font-size: 1.3rem; font-weight: 700; line-height: 1.3; color: var(--accent); }
.next-note  { margin-top: 0.25rem; color: var(--soft); }
.opens-tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--fill);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.opens-tag[hidden] { display: none; }

.upcoming { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.upcoming li {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0.1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.upcoming .u-date { color: var(--soft); font-weight: 700; font-size: 1.05rem; }
.upcoming strong { font-size: 1.2rem; }
.upcoming li > span:not(.u-date) { color: var(--soft); font-size: 1.05rem; }


/* ---------- Local bodies ---------- */
.body {
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--line);
}
.body:last-child { border-bottom: 1px solid var(--line); }
.body h3 a { text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
.body > p { margin-top: 0.3rem; color: var(--soft); }
.mail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: var(--band);
  border-radius: 8px;
}
.addr span { display: block; }
.addr .k { font-weight: 700; color: var(--soft); font-size: 1rem; }
.copy {
  flex: none;
  min-width: 5.25rem;
  min-height: 44px;
  padding: 0 1rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--fill);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.copy[hidden] { display: none; }

/* ---------- Link lists ---------- */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  padding: 0.6rem 0.25rem;
  text-decoration: none;
  color: var(--text);
}
.list a::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-left: auto;
  border-top: 2.5px solid var(--soft);
  border-right: 2.5px solid var(--soft);
  transform: rotate(45deg);
}
.list a:hover { background: var(--band); }
.list a:hover .t { text-decoration: underline; text-underline-offset: 0.18em; }
.t { font-weight: 700; color: var(--accent); }
.t small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--soft);
}
.lodges .no {
  flex: none;
  width: 3rem;
  font-weight: 700;
  font-size: 1.25rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ---------- Footer ---------- */
.foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 1rem;
}

/* Pin the section menu on wider screens (one row there). Phones scroll normally. */
@media (min-width: 48rem) {
  .jump { position: sticky; top: 0; z-index: 10; }
  html { scroll-padding-top: 5.5rem; }
}
