/* Fonts are stored in the fonts folder, so the site does not depend on another company to load them. */
@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url(../fonts/baloo-2-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(../fonts/baloo-2-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url(../fonts/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url(../fonts/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(../fonts/nunito-latin-800-normal.woff2) format("woff2"); }

/* Colours are taken from the moose mascot. Change them here to restyle the whole site. */
:root {
  --red: #e5382b;
  --red-dark: #b8261c;
  --gold: #fdc22e;
  --brown: #4a2313;
  --tan: #c97b45;
  --cream: #fff6e3;
  --card: #ffffff;
  --green: #7fb04a;
  --muted: #7a6558;
  --radius: 18px;
  --outline: 3px solid var(--brown);
  --shadow: 5px 5px 0 var(--brown);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--brown);
  background: var(--cream);
}

h1, h2, h3, .brand-name, .btn, .score {
  font-family: "Baloo 2", "Nunito", "Trebuchet MS", system-ui, sans-serif;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 .4em; }
h2 { font-size: 1.8rem; margin: 0 0 .6em; }
h3, .h3 { font-size: 1.3rem; margin: 0 0 .2em; }
a { color: var(--red-dark); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
section { padding: 36px 0; }

/* Header */
.site-header { background: var(--gold); border-bottom: var(--outline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brown); }
.brand img { width: 56px; height: 56px; }
.brand-name { font-size: 1.7rem; font-weight: 800; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--brown); font-weight: 700; }
.site-nav a:hover, .site-nav a.current { background: var(--brown); color: var(--cream); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.hero p { font-size: 1.2rem; max-width: 34em; }
.hero img { width: 100%; max-width: 420px; justify-self: center; }

.btn { display: inline-block; padding: 10px 22px; margin: 6px 8px 0 0; border: var(--outline); border-radius: 999px; background: var(--red); color: #fff; font-size: 1.1rem; font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 var(--brown); }
.btn:hover { background: var(--red-dark); }
.btn.alt { background: #fff; color: var(--brown); }
.btn.alt:hover { background: var(--gold); }

/* Review cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: var(--card); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--brown); }
.card-photo { position: relative; height: 190px; background: var(--gold) center / cover no-repeat; border-bottom: var(--outline); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.meta { color: var(--muted); font-size: .95rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.tag { padding: 2px 10px; border-radius: 999px; background: var(--cream); border: 2px solid var(--brown); font-size: .85rem; font-weight: 700; }
.tag.sample { background: var(--brown); color: #fff; }

.score { flex: none; min-width: 64px; padding: 4px 10px; border: var(--outline); border-radius: 14px; background: var(--red); color: #fff; font-size: 1.6rem; font-weight: 800; text-align: center; white-space: nowrap; }
.score small { font-size: .8rem; font-weight: 600; opacity: .9; }
.score.mid { background: var(--gold); color: var(--brown); }
.score.low { background: #fff; color: var(--brown); }

/* Leaderboard */
.board { list-style: none; margin: 0; padding: 0; background: var(--card); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.board li { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 2px dashed #e6d6bd; }
.board li:last-child { border-bottom: 0; }
.board .rank { font-family: "Baloo 2", sans-serif; font-size: 1.5rem; font-weight: 800; width: 1.6em; color: var(--tan); }
.board a { font-weight: 800; text-decoration: none; color: var(--brown); }
.board a:hover { text-decoration: underline; }
.board .grow { flex: 1; }

/* Filters */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.filters input, .filters select { font: inherit; padding: 8px 12px; border: var(--outline); border-radius: 12px; background: #fff; color: var(--brown); }
.filters input { flex: 1; min-width: 200px; }
.empty { padding: 30px; text-align: center; border: 3px dashed var(--tan); border-radius: var(--radius); }

/* Single review */
.crumbs { margin-bottom: 14px; font-size: .95rem; font-weight: 700; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.review-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.review-head .tags { margin-top: 10px; padding-top: 0; }
.lede { font-size: 1.25rem; max-width: 38em; margin: 14px 0 0; }
.score-box { flex: none; text-align: center; font-weight: 800; }
.score-box span:last-child { display: block; margin-top: 10px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.score.big { display: inline-block; min-width: 150px; padding: 10px 22px 6px; border-width: 4px; border-radius: 26px; font-size: 5rem; line-height: 1; box-shadow: var(--shadow); }
.score.big small { font-size: 1.6rem; }

.photo-btn { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }
.photo-btn img { display: block; width: 100%; border: var(--outline); border-radius: var(--radius); }
.photo-btn.cover { margin: 26px 0 6px; }
.photo-btn.cover img { max-height: 520px; object-fit: cover; box-shadow: var(--shadow); }

.review-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 40px; align-items: start; margin-top: 30px; }
.review-grid aside { position: sticky; top: 16px; }
.panel { background: var(--card); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 22px; }
.panel h3, .panel .h3 { margin: 0 0 .5em; }
.facts { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.facts dt { font-weight: 800; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.bar-row { display: grid; grid-template-columns: 6.5em 1fr 2em; gap: 10px; align-items: center; padding: 4px 0; }
.bar { height: 12px; border: 2px solid var(--brown); border-radius: 999px; background: var(--cream); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--red); }
.bar-row strong { text-align: right; }
.judge { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 2px dashed #e6d6bd; }
.judge:last-child { border-bottom: 0; }
.judge .score { font-size: 1.1rem; min-width: 46px; }
.judge q { display: block; font-style: italic; }

/* Long-form text: reviews, About, How we rate, Privacy */
.prose { font-size: 1.12rem; line-height: 1.7; max-width: 42em; }
.prose h2 { margin: 1.6em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { margin-top: 8px; font-size: .95rem; color: var(--muted); text-align: center; }
.note { padding: 12px 16px; border: 3px dashed var(--tan); border-radius: 14px; background: #fff; font-size: 1rem; }

/* Photo gallery and viewer */
.gallery-title { margin-top: 46px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.gallery .photo-btn:hover img { box-shadow: 4px 4px 0 var(--brown); transform: translate(-2px, -2px); }
.lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(35, 15, 6, .93); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 86vw; text-align: center; }
.lightbox img { max-width: 86vw; max-height: 82vh; border: 4px solid #fff; border-radius: 12px; }
.lightbox figcaption { margin-top: 12px; color: #fff; }
.lightbox button { position: absolute; width: 52px; height: 52px; border: 3px solid #fff; border-radius: 50%; background: var(--red); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* Map */
#map { height: 68vh; min-height: 440px; border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); background: #e8eef0; z-index: 0; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content { font-size: 15px; line-height: 1.45; }
.popup-photo { display: block; width: 100%; height: 100px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.pin { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 3px solid var(--brown); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--red); color: #fff; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1rem; box-shadow: -2px 2px 0 rgba(74, 35, 19, .35); }
.pin span { transform: rotate(45deg); }
.pin.mid { background: var(--gold); color: var(--brown); }
.pin.low { background: #fff; color: var(--brown); }
.map-note { margin: 14px 0 0; color: var(--muted); }
.map-places { margin-top: 34px; }

/* Footer */
.site-footer { margin-top: 40px; padding: 34px 0 18px; background: var(--brown); color: var(--cream); }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-grid p { margin: 8px 0 0; max-width: 24em; opacity: .85; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: "Baloo 2", sans-serif; font-size: 1.4rem; font-weight: 800; }
.footer-brand img { width: 44px; height: 44px; }
.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer nav strong { color: var(--gold); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.footer-legal { margin-top: 26px; padding-top: 14px; border-top: 1px solid rgba(255, 246, 227, .25); font-size: .9rem; opacity: .8; }

@media (max-width: 820px) {
  .hero .wrap, .review-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero img { max-width: 260px; order: -1; }
  .review-grid aside { position: static; }
  .review-head { flex-direction: column-reverse; gap: 16px; }
  .score.big { font-size: 3.6rem; min-width: 0; }
  .score-box { display: flex; align-items: center; gap: 14px; }
  .score-box span:last-child { margin: 0; }
  .lightbox button { width: 44px; height: 44px; }
}

.photo-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(74, 35, 19, .85); color: #fff; font-size: .85rem; font-weight: 700; }
.btn.small { font-size: .95rem; padding: 6px 16px; }
.result-count { margin: -10px 0 18px; color: var(--muted); font-weight: 700; }
.page-intro { font-size: 1.2rem; max-width: 40em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; z-index: 3000; padding: 8px 14px; background: #fff; border: var(--outline); border-radius: 10px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.moose-quote { display: flex; align-items: center; gap: 18px; margin: 0 0 1.6em; padding: 18px 22px; background: var(--gold); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); }
.moose-quote img { flex: none; width: 72px; height: 72px; }
.moose-quote p { margin: 0 0 4px; font-family: "Baloo 2", sans-serif; font-size: 1.5rem; font-weight: 800; line-height: 1.25; }
.moose-quote cite { font-style: normal; font-weight: 700; }
.moose-quote cite::before { content: "— "; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.features .panel { margin: 0; }
.features p { margin: 0; }

.place-links { display: flex; flex-wrap: wrap; gap: 4px 0; }
.place-links .btn { margin-top: 8px; }
.invite { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: center; margin-top: 40px; padding: 26px 30px; background: var(--gold); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); }
.invite h2 { margin-bottom: .4em; }
.invite p { margin: 0 0 .8em; font-size: 1.1rem; max-width: 40em; }
.invite p a { color: var(--brown); font-weight: 700; }
.invite .btn { margin-top: 6px; overflow-wrap: anywhere; }
@media (max-width: 820px) { .invite { grid-template-columns: 1fr; text-align: center; } .invite img { max-width: 180px; margin: 0 auto; } }

.disclosure { margin-top: 2em; padding-top: 12px; border-top: 2px dashed #e6d6bd; font-size: .92rem; color: var(--muted); }

/* ---------- v2: the Places directory ---------- */
.counts { margin: 18px 0 0; font-size: 1.05rem; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard { display: flex; background: var(--card); border: 2px solid #d9c7ad; border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; }
.pcard:hover { border-color: var(--brown); }
.pcard.reviewed { border: var(--outline); box-shadow: 4px 4px 0 var(--brown); background: #fffdf6; }
.pcard-photo { flex: none; width: 96px; background: var(--gold) center / cover no-repeat; border-right: var(--outline); }
.pcard-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 12px; flex: 1; min-width: 0; }
.pcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pcard-top strong { font-family: "Baloo 2", sans-serif; font-size: 1.15rem; line-height: 1.2; }
.pcard .score { font-size: 1.15rem; min-width: 50px; }
.pcard .tags { padding-top: 6px; }
.tag.done { background: var(--green); color: #fff; border-color: var(--brown); }
.tag.featured { background: var(--gold); }
.more { text-align: center; margin: 24px 0 0; }
.credit { margin: 26px 0 0; font-size: .9rem; color: var(--muted); }
.score.none { background: #fff; color: var(--muted); border-style: dashed; }
.place-map { height: 300px; margin: 1.4em 0; border: var(--outline); border-radius: var(--radius); background: #e8eef0; z-index: 0; }
.panel.claim { background: var(--gold); }
.panel p { margin: 0 0 10px; }
.map-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 700; cursor: pointer; }
.map-toggle input { width: 18px; height: 18px; accent-color: var(--red); }
.dot { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 1px var(--brown); }
.cluster { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 3px solid var(--brown); border-radius: 50%; background: #fff; color: var(--brown); font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: .95rem; }
.pin.none { background: #fff; color: var(--muted); border-style: dashed; }

/* ---------- v2: towns, hours, forms, not-found page ---------- */
h2.spaced { margin-top: 1.4em; }
.towns { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.town-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--card); border: var(--outline); border-radius: 14px; box-shadow: 3px 3px 0 var(--brown); text-decoration: none; color: inherit; }
.town-card:hover { background: var(--gold); }
.town-card strong { font-family: "Baloo 2", sans-serif; font-size: 1.25rem; line-height: 1.2; }
.town-card span { color: var(--muted); font-size: .95rem; }
.town-card:hover span { color: var(--brown); }
.checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: -10px 0 18px; font-weight: 700; }
.checks label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--red); }
.checks a { margin-left: auto; }
.filters .btn { margin: 0; white-space: nowrap; font-size: 1rem; }
#hub-found { margin-bottom: 10px; }
#hub-title { font-size: 1.3rem; }
.tag.open { background: #e3f3d3; }
.facts.hours { grid-template-columns: auto 1fr; gap: 3px 14px; font-size: .97rem; }
.facts.hours dt { font-weight: 400; }
.facts.hours .today { font-weight: 800; }
p.small { font-size: .88rem; color: var(--muted); margin: 8px 0 0; }
.map-status { display: inline-block; margin: 0 0 14px 16px; color: var(--muted); }
.bubble { position: relative; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border: 3px solid var(--brown); border-radius: 50%; background: var(--gold); color: var(--brown); font-family: "Baloo 2", sans-serif; box-shadow: 2px 2px 0 rgba(74, 35, 19, .4); cursor: pointer; }
.bubble strong { font-size: 1.05rem; font-weight: 800; }
.bubble span { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .9); font-family: "Nunito", sans-serif; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.form { max-width: 640px; display: flex; flex-direction: column; gap: 6px; }
.form label { margin-top: 10px; font-weight: 800; }
.form input, .form select, .form textarea { font: inherit; padding: 9px 12px; border: var(--outline); border-radius: 12px; background: #fff; color: var(--brown); width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-row > div { display: flex; flex-direction: column; gap: 6px; }
.form .btn { align-self: flex-start; margin-top: 16px; cursor: pointer; }
.lost { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding-top: 30px; padding-bottom: 30px; }
@media (max-width: 820px) {
  .form-row, .lost { grid-template-columns: 1fr; }
  .lost img { max-width: 220px; margin: 0 auto; }
  .lost { text-align: center; }
  .checks a { margin-left: 0; }
}

/* ---------- single place page ---------- */
.place-head { margin-bottom: 6px; }
.place-head .lede { margin: 0 0 12px; }
.place-head .tags { margin: 0 0 8px; padding-top: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1em; padding: 0; }
.chips li { margin: 0; padding: 4px 14px; border: 2px solid var(--brown); border-radius: 999px; background: #fff; font-size: .98rem; font-weight: 700; }
.chips li::before { content: "\2713\00a0"; color: var(--green); }
.place-map { height: 340px; margin: 0 0 1.4em; }
.prose .pcards { margin-bottom: 1.2em; font-size: 1rem; line-height: 1.5; }
.sub { margin: 14px 0 6px; font-size: 1.05rem; }
.panel.quiet { box-shadow: none; border-width: 2px; background: transparent; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plain a { font-weight: 700; }

/* ---------- national directory ---------- */
.town-card[hidden] { display: none; }
.bubble.big { width: 66px; height: 66px; background: var(--red); color: #fff; }
.bubble.big strong { font-size: 1.15rem; }
.bubble.big span { top: 68px; color: var(--brown); }
#hub-prov { max-width: 240px; }
