/* Knox County warming centers.
   Warm paper, amber, and deep brown. No cold blues.
   Layout echoes a calm centered column: floating pill bar, stacked cards, roomy type. */

:root {
  --bg: #F8F1E3;
  --bg-deep: #F3E6D2;
  --card: #FFFCF6;
  --ink: #2B160C;
  --ink-2: #4E3424;
  --muted: #5E4636;
  --line: rgba(43, 22, 12, 0.14);
  --amber: #C45C12;
  --amber-deep: #7C2D12;
  --amber-darker: #5C220C;
  --brown: #3F2415;
  --soft: #FDE7C7;
  --gold: #F8E0B0;
  --gold-line: #E6C98A;
  --open: #1B5E34;
  --closed-bg: #F3E4D4;
  --shadow: 0 1px 2px rgba(43, 22, 12, 0.05), 0 12px 32px -18px rgba(43, 22, 12, 0.35);
  --radius: 18px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 64px;
}

* { box-sizing: border-box; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: 8.5rem;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 480px at 50% -12%, #FFF9F0 0%, var(--bg) 58%, var(--bg-deep) 100%);
  background-attachment: fixed;
  line-height: 1.5;
  letter-spacing: -0.006em;
}

@supports (min-height: 100dvh) {
  body { min-height: 100dvh; }
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
}

p { margin: 0.7rem 0; }

a { color: var(--amber-deep); text-underline-offset: 0.16em; }

a:focus,
button:focus,
.directions:focus,
.primary a:focus,
.brand:focus,
.skip:focus {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

::selection { background: #F0C48A; color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0;
  transform: translateY(-140%);
  background: var(--brown);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 80;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { transform: none; }

.navbar {
  position: sticky;
  top: 0.65rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  width: calc(100% - 1.25rem);
  max-width: 1100px;
  min-height: var(--bar-h);
  margin: 0.65rem auto 0;
  padding: 0.4rem 0.45rem 0.4rem 1rem;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .navbar { background: #FFFCF6; }
}

@media (prefers-reduced-transparency: reduce) {
  .navbar {
    background: #FFFCF6;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
  padding: 0.35rem 0.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.brand:hover { color: var(--amber-deep); }

.primary {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
}

.primary a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 700;
}

.primary a:hover { background: rgba(43, 22, 12, 0.06); color: var(--ink); }

.primary a[aria-current="page"] {
  background: var(--brown);
  color: #FFF8EE;
}

.primary a[aria-current="page"]:hover { color: #fff; background: #2A160C; }

.page {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.25rem 1.15rem 3.5rem;
}

.eyebrow,
.eyebrow-sub {
  margin: 0;
  color: var(--ink-2);
  font-weight: 700;
}

.eyebrow-sub { margin-bottom: 0.85rem; }

h1 {
  font-size: 2.15rem;
  margin: 0 0 0.8rem;
}

.lede { font-size: 1.2rem; margin-bottom: 0.25rem; }

.dates { font-size: 1.15rem; margin-top: 0.2rem; }

.fine { color: var(--muted); }

.local-time:empty { display: none; }

.local-time { color: var(--ink-2); font-weight: 700; }

.banner {
  background: var(--gold);
  color: var(--brown);
  border: 2px solid var(--gold-line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  font-weight: 700;
}

.start {
  background: #FFF8EE;
  border: 1px solid #E7C39A;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.25rem;
  margin: 1.35rem 0 0.4rem;
}

.start h2,
#places > h2,
.card h2 {
  font-size: 1.55rem;
  margin: 0 0 0.75rem;
}

.start-list {
  display: grid;
  gap: 0.75rem;
}

.section-note { color: var(--ink-2); margin-top: 0; }

.places {
  display: grid;
  gap: 1.1rem;
}

.place,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.place { padding: 1.2rem 1.25rem 1.25rem; }

.place.is-always,
.place.is-whiteflag {
  background: #FFF8EE;
  border-color: #E7C39A;
  border-top: 6px solid var(--amber);
}

.place-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 0.8rem;
}

.place-top h3 {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 1.5rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 800;
  line-height: 1.2;
}

.pill-open { background: var(--open); color: #fff; }
.pill-24 { background: var(--amber-deep); color: #fff; }
.pill-call { background: var(--gold); color: #5C3208; border-color: var(--gold-line); }
.pill-closed { background: var(--closed-bg); color: var(--brown); border-color: #E4D0BA; }
.pill-wait { background: #fff; color: var(--brown); border-color: #E4D0BA; }

.facts { margin: 0.85rem 0 0; }

.facts div {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

.facts dt { font-weight: 800; }
.facts dd { margin: 0; }

.hours-line { display: block; }

.hours-line + .hours-line { margin-top: 0.15rem; }

.place-note { margin: 0.75rem 0 0; font-weight: 700; }

.directions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  width: 100%;
  margin-top: 0.95rem;
  padding: 0.9rem 1rem;
  min-height: 64px;
  border-radius: 14px;
  background: var(--amber-deep);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.directions:hover,
.directions:focus {
  background: var(--amber-darker);
  color: #fff;
}

.directions-kicker {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.start-dir .directions-kicker { font-size: 1rem; }

.directions-address {
  font-size: 1.28rem;
  line-height: 1.25;
  font-weight: 800;
}

.directions-meta {
  font-weight: 700;
}

.directions-go {
  display: block;
  margin-top: 0.35rem;
  white-space: nowrap;
}

.start-dir { margin-top: 0; }

.card {
  padding: 1.25rem 1.3rem 1.35rem;
  margin-top: 1.15rem;
}

.card h2 { margin-bottom: 0.45rem; }

.rules {
  margin: 0.4rem 0 0.2rem;
  padding-left: 1.3rem;
}

.rules li { margin: 0.55rem 0; padding-left: 0.15rem; }

.rules li::marker { color: var(--amber-deep); }

#places { margin-top: 1.75rem; }

.foot {
  color: var(--muted);
  text-align: center;
  padding: 0.4rem 1.1rem 2.2rem;
  font-size: 1rem;
}

.foot::before {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 4px;
  background: var(--amber);
  margin: 0 auto 0.9rem;
}

.foot p { margin: 0.3rem auto; max-width: 40rem; }

@media (max-width: 860px) {
  .navbar {
    border-radius: 22px;
    flex-wrap: wrap;
    align-items: stretch;
    padding: 0.45rem 0.55rem 0.5rem 0.85rem;
    top: 0.4rem;
  }

  .primary {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0.15rem;
  }

  .primary a { flex: 0 0 auto; }
}

@media (max-width: 560px) {
  .brand { white-space: normal; line-height: 1.2; }
  h1 { font-size: 1.85rem; }
  .page { padding: 1.5rem 0.85rem 2.75rem; }
  .place, .card, .start { padding-left: 1rem; padding-right: 1rem; }
  .facts div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .place-top h3 { font-size: 1.35rem; }
  .directions-address { font-size: 1.2rem; }
}

@media (prefers-contrast: more) {
  .place,
  .card,
  .start,
  .directions,
  .pill,
  .navbar {
    border-width: 3px;
  }
}

@media print {
  html { font-size: 12pt; scroll-padding-top: 0; }
  body { background: #fff; min-height: 0; }
  .navbar, .skip, .local-time, .directions-go, noscript { display: none !important; }
  .page { max-width: none; padding: 0; }
  .place, .card, .start {
    box-shadow: none;
    break-inside: avoid;
    border-color: #000;
  }
  .directions {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 0.4rem 0;
  }
  a { color: #000; }
  .pill-open, .pill-24 { background: #fff; color: #000; border-color: #000; }
}
