/* District 42 AA: coming soon + meeting finder.
   Palette: Intergroup blue + District yellow on a warm paper ground. */
:root {
  --bg: #F6F3EA;
  --surface: #FFFFFF;
  --surface-2: #EEF3FA;
  --ink: #16213A;
  --muted: #5A6578;
  --line: #DAD5C7;
  --blue: #0B5CB5;
  --blue-deep: #0E3F7A;
  --blue-ink: #0A2E5C;
  --blue-tint: #E3EEFB;
  --heading-accent: #0E3F7A;
  --yellow: #F5C518;
  --yellow-soft: #FFF3C2;
  --green: #1E7D4E;
  --green-tint: #DFF3E7;
  --row-alt: #FAF8F1;
  --focus: #0B5CB5;
  --shadow: 0 10px 30px rgba(14, 63, 122, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1626;
    --surface: #172238;
    --surface-2: #1C2A45;
    --ink: #EDF1F8;
    --muted: #A9B4C8;
    --line: #2C3B58;
    --blue: #6FA8F3;
    --blue-deep: #0E3F7A;
    --blue-ink: #0A2E5C;
    --blue-tint: #1E3252;
    --heading-accent: #6FA8F3;
    --yellow: #F5C518;
    --yellow-soft: #3A3210;
    --green: #7BD6A3;
    --green-tint: #1B3A2B;
    --row-alt: #141F33;
    --focus: #F5C518;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1626;
  --surface: #172238;
  --surface-2: #1C2A45;
  --ink: #EDF1F8;
  --muted: #A9B4C8;
  --line: #2C3B58;
  --blue: #6FA8F3;
  --blue-deep: #0E3F7A;
  --blue-ink: #0A2E5C;
  --blue-tint: #1E3252;
  --heading-accent: #6FA8F3;
  --yellow: #F5C518;
  --yellow-soft: #3A3210;
  --green: #7BD6A3;
  --green-tint: #1B3A2B;
  --row-alt: #141F33;
  --focus: #F5C518;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-variation-settings: "opsz" 144, "SOFT" 60; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--blue-ink); padding: .5rem 1rem; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

/* Header: the Intergroup blue band with the District mark */
.site-header { background: var(--blue-deep); color: #FFFFFF; border-bottom: 6px solid var(--yellow); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 1rem; color: #FFFFFF; text-decoration: none; }
.brand .mark { width: 74px; height: 74px; flex: none; }
.brand-name { font-family: "Fraunces", Georgia, serif; font-size: 1.8rem; font-weight: 600; line-height: 1; }
.brand-area { font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin-top: .3rem; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-nav a { color: #FFFFFF; text-decoration: none; font-weight: 600; font-size: 1.05rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--yellow); }
.site-nav a.helpline { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .15rem; background: var(--yellow); color: var(--blue-ink); text-decoration: none; padding: .55rem 1rem .6rem; font-weight: 700; line-height: 1.1; border-radius: 4px; border-bottom: 0; }
.site-nav a.helpline:hover { filter: brightness(1.05); border-bottom: 0; }
.helpline small { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--blue-ink); opacity: .75; }
.helpline strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--blue-ink); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.hero-copy p { max-width: 36em; margin-top: 1.25rem; font-size: 1.15rem; }
.hero-copy .lede { color: var(--muted); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.25rem; border-radius: 4px; font-weight: 700; text-decoration: none; border: 2px solid transparent; font-size: 1.02rem; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--blue-deep); color: #FFFFFF; border-color: var(--blue-deep); }
.btn-primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* The notice: a yellow sign with square corners, like a card pinned to a church door */
.notice { background: var(--yellow); color: var(--blue-ink); padding: 1.6rem 1.7rem 1.7rem; position: relative; box-shadow: var(--shadow); }
.notice::before { content: ""; position: absolute; inset: 8px; border: 2px solid rgba(10, 46, 92, .35); pointer-events: none; }
.notice .eyebrow { color: var(--blue-ink); opacity: .8; }
.notice h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: .5rem; color: var(--blue-ink); }
.notice p { margin-top: .9rem; font-size: 1.05rem; }
.notice ul { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.notice li { display: flex; gap: .6rem; align-items: baseline; font-weight: 600; }
.notice li::before { content: "\25B2"; font-size: .6rem; color: var(--blue-ink); transform: translateY(-2px); }
.notice a { color: var(--blue-ink); }

/* Meetings */
.meetings { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head p { color: var(--muted); max-width: 46em; margin-top: .4rem; }
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.finder-controls { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.days { display: flex; gap: .3rem; flex-wrap: wrap; }
.days button, .segmented button {
  font: inherit; font-weight: 700; font-size: .95rem; padding: .5rem .85rem; border-radius: 4px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.days button:hover, .segmented button:hover { border-color: var(--blue); }
.days button[aria-pressed="true"], .segmented button[aria-pressed="true"] { background: var(--blue-deep); color: #FFFFFF; border-color: var(--blue-deep); }
.days button.today { position: relative; }
.days button.today::after { content: "today"; position: absolute; top: -.75rem; right: -.25rem; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; background: var(--yellow); color: var(--blue-ink); padding: .1rem .35rem; border-radius: 3px; }
.segmented { display: inline-flex; gap: .3rem; }
.search { flex: 1 1 200px; min-width: 180px; }
.search input { width: 100%; font: inherit; padding: .5rem .8rem; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.count { color: var(--muted); font-size: .95rem; margin-left: auto; white-space: nowrap; }
.day-heading { padding: .9rem 1.1rem 0; font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; font-weight: 600; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .8rem 1rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr.next { background: var(--yellow-soft); box-shadow: inset 4px 0 0 var(--yellow); }
tbody tr.past td { opacity: .6; }
td.t-time { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
td.t-time small { display: block; font-weight: 400; color: var(--muted); }
td.t-name a { font-weight: 700; color: var(--blue); text-decoration: none; }
td.t-name a:hover { text-decoration: underline; }
td.t-name .types { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
td.t-name small, td.t-loc small { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; margin-top: .15rem; }
td.t-loc { font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 4px; font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip svg { width: 15px; height: 15px; flex: none; }
.chip-map { background: var(--blue-tint); color: var(--blue); }
.chip-map:hover { filter: brightness(.96); }
.chip-online { background: var(--green-tint); color: var(--green); }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.badge-next { display: inline-block; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; background: var(--yellow); color: var(--blue-ink); padding: .1rem .4rem; border-radius: 3px; margin-left: .4rem; vertical-align: middle; font-weight: 700; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.finder-foot { padding: .9rem 1.1rem; font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
.legend { display: flex; gap: .35rem 1rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.legend b { color: var(--ink); font-weight: 700; }

/* About */
.about { padding: clamp(2rem, 4vw, 3.5rem) 0; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.about-grid h3 { color: var(--heading-accent); }
.about-grid p { margin-top: .6rem; color: var(--muted); }
.about-grid a.more { display: inline-block; margin-top: .6rem; font-weight: 700; }
.preamble { margin: 2.5rem 0 0; padding: 1.5rem 1.75rem; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--blue-deep); font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; line-height: 1.5; max-width: 60em; }
.preamble cite { display: block; font-family: "Source Sans 3", system-ui, sans-serif; font-style: normal; font-size: .85rem; color: var(--muted); margin-top: .75rem; letter-spacing: .08em; text-transform: uppercase; }

/* Contact */
.contact { padding: clamp(2rem, 4vw, 3.5rem) 0; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem 1.5rem; }
.card h3 { font-family: "Source Sans 3", system-ui, sans-serif; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.card .big { font-size: 1.6rem; font-weight: 700; margin-top: .5rem; font-variant-numeric: tabular-nums; }
.card .big a { text-decoration: none; color: var(--ink); }
.card .big a:hover { color: var(--blue); }
.card p { margin-top: .5rem; color: var(--muted); }
.card address { font-style: normal; margin-top: .5rem; line-height: 1.5; }
.card ul { margin: .5rem 0 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.apps { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.apps a { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 4px; padding: .45rem .8rem; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.apps a:hover { border-color: var(--blue); }

/* Footer */
.site-footer { background: var(--blue-deep); color: #FFFFFF; padding: 2rem 0 2.5rem; margin-top: 2rem; border-top: 6px solid var(--yellow); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.site-footer p { font-size: .95rem; opacity: .9; max-width: 46em; }
.site-footer a { color: #FFFFFF; }
.footer-mark { display: flex; align-items: center; gap: .8rem; }
.footer-mark .mark { width: 44px; height: 44px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .site-header .wrap { justify-content: center; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header .wrap { gap: .9rem; padding: .8rem 0; }
  .brand .mark { width: 56px; height: 56px; }
  .brand-name { font-size: 1.5rem; }
  .brand-area { font-size: .8rem; }
  .site-nav { gap: .5rem 1rem; justify-content: center; width: 100%; }
  .site-nav a:not(.helpline) { font-size: .95rem; }
  .helpline { flex-basis: 100%; align-items: center; }
  .count { margin-left: 0; width: 100%; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tbody tr { padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
  tbody td { padding: .15rem 0; border: 0; }
  td.t-time { font-size: 1.05rem; }
  td.t-time small { display: inline; margin-left: .4rem; }
  td.t-region { font-size: .9rem; color: var(--muted); }
  td.t-addr { padding-top: .5rem; }
}
