/* Jackson Hole Journal frame: masthead, footer and type, so the snow
   report reads as part of jhjournal.com. Loaded after the other sheets.
   Danger colors are untouched. Remove this file's link tag to revert. */

:root {
  --serif: "Libre Caslon Display", "Iowan Old Style", Georgia, serif;
  --body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --j-paper: #f8f6f0;
  --j-ink: #263d34;
  --j-line: #d9dcd0;
  --j-accent: #b66b45;
}
body { font-family: var(--body); }
/* Libre Caslon Display has one weight; keep it from being faux-bolded */
h1, .title, .banner-advice, .you-where, .lead-warn { font-weight: 400; }
h1 { letter-spacing: -.01em; }

/* Masthead band, the same layout as jhjournal.com */
.jmast {
  background: var(--j-paper); color: var(--j-ink);
  border-bottom: 1px solid var(--j-line);
  padding-top: env(safe-area-inset-top);
}
.jmast-in {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 14px 5.5%;
}
.jmast a { color: var(--j-ink); text-decoration: none; }
.jword { display: flex; align-items: center; gap: 14px; font-family: "Libre Caslon Display", Georgia, serif; font-size: 20px; line-height: 1.05; letter-spacing: 1px; }
.jword svg { width: 64px; height: auto; flex: none; }
.jword small { display: block; font-family: "Libre Caslon Display", Georgia, serif; font-size: 20px; letter-spacing: 1px; margin-top: 2px; }
.jword small.jby { font-family: "DM Sans", sans-serif; font-size: 8.5px; letter-spacing: 3.4px; margin-top: 8px; }
.jmast nav { display: flex; align-items: center; gap: 28px; font-family: "DM Sans", sans-serif; font-size: 12px; font-weight: 500; }
.jmast nav > a:not(.jbtn):hover { color: var(--j-accent); }
.jbtn { display: inline-flex; align-items: center; gap: 22px; padding: 12px 18px; border: 1px solid var(--j-ink); background: var(--j-ink); color: var(--j-paper) !important; font-size: 12px; font-weight: 500; }
.jbtn:hover { background: #405b49; }

/* With the masthead above it, the app header no longer needs the notch padding */
.jmast + header#top { padding-top: 0; }

/* Footer band */
.jfoot {
  background: var(--j-paper); color: var(--j-ink);
  border-top: 1px solid var(--j-line);
  font-family: "DM Sans", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
.jfoot-in { display: flex; justify-content: space-between; align-items: center; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 28px 5.5%; }
.jfoot svg { width: 48px; height: auto; display: block; margin-bottom: 8px; }
.jfoot strong { font-size: 11px; letter-spacing: 1.5px; }
.jfoot p { margin: 6px 0 0; font-size: 12px; color: #5d6b64; max-width: 34rem; }
.jfoot a { color: var(--j-ink); font-size: 12px; text-decoration: none; }
.jfoot a:hover { color: var(--j-accent); }

@media (max-width: 759px) {
  .jmast-in { padding: 10px 16px; }
  .jword { gap: 9px; font-size: 15px; }
  .jword small { font-size: 15px; }
  .jword small.jby { font-size: 6px; letter-spacing: 1.4px; margin-top: 5px; white-space: nowrap; }
  .jword svg { width: 44px; }
  .jmast nav > a:not(.jbtn) { display: none; }
  .jbtn { gap: 12px; padding: 9px 11px; font-size: 10px; white-space: nowrap; }
  .jfoot-in { flex-wrap: wrap; align-items: flex-start; padding: 22px 16px; }
}

/* ==========================================================================
   Journal look: paper, ink green, thin rules, square corners, rust accent.
   Replaces the alpine sage, contour background and diorama scene.
   Avalanche danger colors (js/danger.js) and map colors are not touched.
   ========================================================================== */

/* Night: the Journal's ink green as the page */
:root {
  --bg: #1b2a24; --bg-2: #1b2a24;
  --topo: none; --hero: none;
  --card: #22342c; --card-2: #2a3e35;
  --ink: #f3f1ea; --muted: #bac5b4; --line: #3d5348;
  --accent: #e8ede3; --accent-ink: #1e302a;
  --hot: #d08a63; --ribbon: #d08a63;
  --shelf: #13201b; --shelf-ink: #f3f1ea; --slab: transparent;
  --ok: #a9c7a0; --warn: #e3a27c;
  --r: 0px; --r-sm: 0px; --shadow: none;
  --j-paper: #1b2a24; --j-ink: #f3f1ea; --j-line: #3d5348; --j-accent: #d08a63;
}
/* Sun: the Journal page itself */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="night"]) {
    --bg: #f8f6f0; --bg-2: #f8f6f0;
    --card: #fdfcf8; --card-2: #ebece2;
    --ink: #263d34; --muted: #5f665d; --line: #d9dcd0;
    --accent: #263d34; --accent-ink: #f8f6f0;
    --hot: #b66b45; --ribbon: #b66b45;
    --shelf: #263d34; --shelf-ink: #f8f6f0; --slab: transparent;
    --ok: #405c45; --warn: #9c5842;
    --j-paper: #f8f6f0; --j-ink: #263d34; --j-line: #d9dcd0; --j-accent: #b66b45;
  }
}
:root[data-theme="sun"] {
  --bg: #f8f6f0; --bg-2: #f8f6f0;
  --card: #fdfcf8; --card-2: #ebece2;
  --ink: #263d34; --muted: #5f665d; --line: #d9dcd0;
  --accent: #263d34; --accent-ink: #f8f6f0;
  --hot: #b66b45; --ribbon: #b66b45;
  --shelf: #263d34; --shelf-ink: #f8f6f0; --slab: transparent;
  --ok: #405c45; --warn: #9c5842;
  --j-paper: #f8f6f0; --j-ink: #263d34; --j-line: #d9dcd0; --j-accent: #b66b45;
}
.jfoot p { color: var(--muted); }
.jbtn { background: var(--j-ink); color: var(--j-paper) !important; border-color: var(--j-ink); }
.jbtn:hover { background: color-mix(in srgb, var(--j-ink) 85%, var(--j-paper)); }

/* Page: plain paper, no contour layer */
html, body { background: var(--bg); }
body::before { background: none; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
a:hover { color: var(--ribbon); }
:focus-visible { outline-color: var(--ribbon); }

/* Type: Journal headline and eyebrow styles */
h1 { font-size: clamp(2.1rem, 9vw, 3.2rem); letter-spacing: -.02em; line-height: 1.05; }
h1::after { width: 23px; height: 1px; margin-top: 14px; border-radius: 0; background: var(--ribbon); }
h2 { font-weight: 600; font-size: .78rem; letter-spacing: .16em; }
h3 { font-weight: 600; }
.tile-label { font-weight: 600; letter-spacing: .14em; font-size: .7rem; }
.tile-value { font-family: var(--serif); font-weight: 400; font-size: 2rem; letter-spacing: -.01em; }

/* Header: a ruled strip, no wave ribbon, no round chips */
header#top {
  background: var(--bg); border-radius: 0; box-shadow: none;
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
header#top::after { display: none; }
.brand { display: none; }
.title { font-size: clamp(1.15rem, 5.4vw, 1.5rem); }
.icon-btn { border-radius: 0; border: 1px solid var(--line); background: transparent; box-shadow: none; }
.icon-btn:hover { border-color: var(--ink); }
.tabs a { font-weight: 600; letter-spacing: .12em; border-radius: 0; opacity: 1; color: var(--ink); }
.tabs a.on { background: var(--ink); color: var(--bg); box-shadow: none; }

/* Journal line drawing of the Teton skyline in place of the diorama */
main::before {
  height: 64px; margin: 4px 0 18px; border-radius: 0; box-shadow: none;
  background: var(--ink);
  -webkit-mask: url('../img/skyline-line.svg') center bottom / 100% 100% no-repeat;
          mask: url('../img/skyline-line.svg') center bottom / 100% 100% no-repeat;
  opacity: .55;
}
@media (min-width: 760px) { main::before { margin: 8px 0 22px; height: 90px; border-radius: 0; } }
main.dash::before { height: 56px; margin-bottom: 14px; }
@media (min-width: 760px) { main.dash::before { height: 80px; } }
main.wide-map::before { height: 48px; }

/* Cards: ruled boxes on paper, like the Journal's project cards */
.card { border: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--card); }
.card::before { display: none; }
.tile { border: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--card); transition: border-color .2s, background .2s; }
.tile:hover { border-color: color-mix(in srgb, var(--ink) 45%, var(--line)); }
.tile.alert { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.tile-more, .btn, .btn.ghost, .chev, .segtabs, .segtabs button, .links a, .stat, .note-box, .readout, .cue, .course, .report, .flags li, .switch, .obs-chip, .flag-tag, .select, .place-input, .place-pick, .rmap-full-btn, .seg button, .pill, .learning, .lead-warn, .sheet, .rmap, .map-box, .video-frame, .toast { border-radius: 0; box-shadow: none; }
.tile-more, .btn.ghost { border: 1px solid var(--ink); background: transparent; color: var(--ink); font-weight: 600; }
.tile-more:hover, .btn.ghost:hover { background: var(--card-2); }
.btn { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); font-weight: 600; }
.chev { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.links a { background: transparent; border: 1px solid var(--line); }
.links a:hover { border-color: var(--ink); }
.stat { background: var(--card-2); }
.switch.on, .seg button.on, .pill.on { box-shadow: none; }
.scope, .bottom-line, .squad { border-left-color: var(--ribbon); }
.squad { background: color-mix(in srgb, var(--ribbon) 8%, transparent); }
.lead-warn { background: var(--shelf); color: var(--shelf-ink); }

/* Footer shelf: the Journal's dark "Support the work" band */
footer#foot { border-radius: 0; margin-top: 36px; }
footer#foot .scope { border-radius: 0; border-left-color: var(--ribbon); }
footer#foot a { color: var(--shelf-ink); text-decoration-color: color-mix(in srgb, var(--shelf-ink) 45%, transparent); }

/* Phone bar: ink band, square marks */
@media (max-width: 759px) {
  .bottombar { box-shadow: none; border-top: 1px solid var(--line); }
  .bottombar a { border-radius: 0; font-weight: 600; }
  .bottombar a.on { color: var(--shelf-ink); background: color-mix(in srgb, var(--shelf-ink) 14%, transparent); box-shadow: inset 0 2px 0 var(--ribbon); }
}

/* Section titles read like Journal card headlines */
.fold > summary h2 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; letter-spacing: -.005em; text-transform: none; line-height: 1.15; }
.fold > summary .chev { border-radius: 0; }
.pill, .pill-link, .chips button, .flag, .toast, .q { border-radius: 0; }
.pill-link { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.pill-link:hover { background: var(--card-2); color: var(--ink); }
.play-icon { border-radius: 0; background: var(--ink); color: var(--bg); }
.select { border-radius: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888f86' stroke-width='1.6'/%3E%3C/svg%3E"); background-size: 12px 8px; background-position: right 14px center; background-repeat: no-repeat; }
.jmast-in, .jfoot-in { max-width: none; }
/* Notices: a tinted strip with a rust rule, readable in sun and night */
.warn { background: color-mix(in srgb, var(--warn) 13%, var(--card)); color: var(--ink); border-left: 3px solid var(--warn); border-radius: 0; font-weight: 600; }
.chip { border-radius: 2px; }
.jmast-in { padding-left: 12px; padding-right: 12px; }
/* Report type chips: square, rule line when on (matches .switch.on) */
.obs-chip.on { box-shadow: inset 0 0 0 1px var(--accent); }
