/* cfcrimewatch.com: one hand-written stylesheet. No frameworks, no web fonts, no scripts, no motion. */
:root {
  --navy: #1c2333;
  --gold: #f2b84b;
  --white: #ffffff;
  --page: #f1f3f6;
  --card: #ffffff;
  --text: #1c2333;
  --muted: #4a5262;
  --link: #0b4a8f;
  --line: #d5d9e0;
  --alert: #b3001b;
  --alert-bg: #fff4f4;
  --mark: #c2007a;
  --mark-bg: #fff9c4;
}

* { box-sizing: border-box; }

html { font-size: 18px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 0.15em; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 0.15rem; }

/* Skip link: off-screen until it has keyboard focus. */
.skip { position: absolute; left: -999rem; top: 0.5rem; z-index: 20; padding: 0.5rem 1rem; font-weight: 700; color: var(--navy); background: var(--gold); }
.skip:focus { left: 0.5rem; }

/* Staging only. Stays at the top of the window while scrolling. */
.staging-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.3rem 1rem;
  border-bottom: 3px dashed var(--mark);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: var(--mark-bg);
}

/* Banner and navigation */
header { position: relative; background: var(--navy); }
header img { width: 100%; max-width: 62rem; margin: 0 auto; }
.seal { position: absolute; top: 50%; right: 24px; width: 96px; transform: translateY(-50%); }
.seal img { width: 100%; }
@media (max-width: 760px) {
  .seal { right: 8px; width: 52px; }
}

nav { border-top: 1px solid var(--muted); background: var(--navy); }
nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.4rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.4rem 0.75rem;
  list-style: none;
}
nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.7rem;
  border-radius: 0.3rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
  background: var(--navy);
}
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { color: var(--navy); background: var(--gold); }
nav a:focus-visible, footer a:focus-visible { outline-color: var(--gold); }

/* Emergency line, on every page */
.alert {
  border-top: 4px solid var(--alert);
  border-bottom: 4px solid var(--alert);
  text-align: center;
  color: var(--text);
  background: var(--alert-bg);
}
.alert p { max-width: 62rem; margin: 0 auto; padding: 0.6rem 1rem; font-size: 1.1rem; }
.alert strong { color: var(--alert); }

/* Page content */
main { max-width: 62rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

h1, h2, h3 { line-height: 1.25; }
h1 { margin: 0 0 0.5rem; font-size: 2rem; }
h2 {
  margin: 2.2rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
h3 { margin: 1.6rem 0 0.3rem; font-size: 1.15rem; }

p, ul, dl { margin: 0 0 1rem; }
ul { padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

main > h1:first-of-type, main > p.lead { text-align: center; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--muted); }
.big { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.small { font-size: 0.9rem; color: var(--muted); }
.dates, .year-dates { font-weight: 600; }

/* Monthly-meeting highlight (home page) */
.highlight { margin: 1.5rem 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.highlight h2 { margin-top: 0; }

/* Two-column block: "Find us" / "This week" */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 2rem; margin: 1.5rem 0; }
@media (min-width: 48rem) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 h2 { margin-top: 0; }

/* Boxed one-line sections (home page) */
.boxes { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.box { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 0.4rem; background: var(--card); }
.box h2 { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card, .event {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-top: 0.35rem solid var(--gold);
  border-radius: 0.4rem;
  background: var(--card);
}
.card h2, .event h3 { margin-top: 0; padding-left: 0; border-left: 0; font-size: 1.25rem; }
.card > :last-child, .event > :last-child { margin-bottom: 0; }
.event { margin-bottom: 1rem; }

/* Calendar grid (/calendar/) */
.cal-month { margin: 1.5rem 0; scroll-margin-top: 1rem; }
.cal-nav { margin: 0 0 0.6rem; font-size: 0.95rem; font-weight: 600; }
.cal-none { margin: 0.6rem 0 1.5rem; color: var(--muted); }
table.month {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--card);
}
table.month th, table.month td {
  border: 1px solid var(--line);
  vertical-align: top;
  padding: 0.3rem;
  font-size: 0.85rem;
}
table.month td.day { height: 5.5em; }
table.month .num { display: block; font-weight: 600; }
table.month .day.past .num { color: var(--muted); font-weight: 400; }
table.month .day.today { outline: 3px solid var(--gold); outline-offset: -3px; }
table.month .day.today .num { font-weight: 700; }
table.month .today-label { display: block; font-size: 0.75rem; color: var(--muted); }
table.month .dow { display: none; }
table.month .ev {
  display: block;
  margin-top: 0.2rem;
  text-decoration: none;
}
table.month .ev .t { display: block; white-space: nowrap; color: var(--muted); }
table.month .ev .n {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-decoration: underline;
}
.event { scroll-margin-top: 1rem; }
.event:target { border-left: 3px solid var(--gold); background: var(--mark-bg); }

@media screen and (max-width: 559px) {
  table.month, table.month tbody, table.month tr, table.month td { display: block; width: 100%; }
  table.month thead, table.month td.pad, table.month td.day:not(.has-ev) { display: none; }
  table.month td.day { height: auto; border-width: 0 0 1px; padding: 0.5rem 0.4rem; }
  table.month .num { display: inline; }
  table.month .dow { display: inline; margin-left: 0.4rem; color: var(--muted); }
  table.month .ev { white-space: normal; min-height: 44px; padding: 0.3rem 0; }
  table.month .ev .t, table.month .ev .n { display: inline; }
  table.month .ev .n { -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
}

/* News cards */
.news-list { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.news-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-top: 0.35rem solid var(--gold);
  border-radius: 0.4rem;
  background: var(--card);
}
.news-item h3 { margin-top: 0; padding-left: 0; border-left: 0; font-size: 1.25rem; }
.news-item > :last-child { margin-bottom: 0; }
.news-img { display: block; width: 100%; max-height: 320px; object-fit: contain; margin-bottom: 0.8rem; border-radius: 0.3rem; }
.news-date { color: var(--muted); font-size: 0.9rem; }

/* Button-style link: a large tap target */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--navy);
  border-radius: 0.4rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  background: var(--navy);
}
.btn:hover { color: var(--navy); background: var(--gold); }

/* Boxes */
.note { padding: 0.8rem 1rem; border: 2px solid var(--navy); border-left-width: 0.5rem; border-radius: 0.3rem; background: var(--card); }

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--card);
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.faq h3 { padding-top: 1rem; border-top: 1px solid var(--line); }

/* Open placeholder (staging only): impossible to miss */
.placeholder {
  padding: 0.1rem 0.4rem;
  border: 3px dashed var(--mark);
  font-weight: 600;
  color: var(--text);
  background: var(--mark-bg);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
p.placeholder { padding: 0.8rem 1rem; }

/* Forms */
.site-form { margin: 1.5rem 0; }
.hp { position: absolute; left: -999rem; top: auto; width: 1px; height: 1px; overflow: hidden; }
.field { margin: 0 0 1.1rem; }
.field label, fieldset legend { display: block; margin: 0 0 0.3rem; font-weight: 600; }
.field input, .field textarea, .field select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--line);
  border-radius: 0.3rem;
  font: inherit;
  color: var(--text);
  background: var(--white);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible,
fieldset input:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 1px;
}
.site-form fieldset {
  margin: 0 0 1.1rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--line);
  border-radius: 0.3rem;
}
.site-form fieldset label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-weight: 400;
}
.site-form fieldset input { width: auto; min-height: 0; }
.site-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--navy);
  border-radius: 0.4rem;
  font: inherit;
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
}
.site-form button[type="submit"]:hover { color: var(--navy); background: var(--gold); }
.site-form button[type="submit"]:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* Footer */
footer { padding: 1.5rem 1rem; font-size: 0.95rem; text-align: center; color: var(--white); background: var(--navy); }
footer p { max-width: 62rem; margin: 0.3rem auto; }
footer a { display: inline-block; padding: 0.4rem 0.1rem; color: var(--gold); }

/* Small screens: one column for the fact lists */
@media (max-width: 30rem) {
  h1 { font-size: 1.7rem; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 0.5rem; }
}

@media print {
  nav, .skip, .staging-bar { display: none; }
  body { background: var(--white); }
  main { max-width: none; padding: 0; }
}
