/*
 * Journal blocks (trip header, day list, entry header, expanding blocks, previous/next).
 * Colours, fonts and radii come from the theme's tokens (--osp-*); the fallbacks make the blocks look right with any theme.
 */
.osp-header-block, .osp-glance, .osp-journey, .osp-details, .osp-pn, .osp-back, .osp-blocks, .osp-homehero, .osp-minis, .osp-tiles, .osp-days, .osp-stats, .osp-tcard, .osp-group {
	--_bg: var(--osp-bg, #f6f2ea); --_surface: var(--osp-surface, #fffdf8); --_ink: var(--osp-ink, #241f18); --_muted: var(--osp-muted, #6f665a);
	--_line: var(--osp-line, #e2dacb); --_accent: var(--osp-accent, #2f5d3a); --_accent-ink: var(--osp-accent-ink, #fff); --_warm: var(--osp-warm, #b5562a);
	--_hl: var(--osp-hl, #fff1c9); --_r: var(--osp-radius, 14px); --_rs: var(--osp-radius-sm, 8px); --_bw: var(--osp-border-w, 1px);
	--_shadow: var(--osp-shadow, 0 1px 2px rgba(60,45,20,.08), 0 6px 20px rgba(60,45,20,.06));
	--_fh: var(--osp-font-heading, Georgia, serif); --_fb: var(--osp-font-body, system-ui, sans-serif); --_fn: var(--osp-font-num, var(--osp-font-heading, Georgia, serif));
}
.osp-muted { color: var(--_muted); font-weight: 400; }

/* ---- header blocks ---- */
.osp-header-block { margin: 0 0 1.25rem; }
.osp-crumbs { font-size: .8125rem; color: var(--_muted); margin: 0 0 6px; }
.osp-crumbs a { color: var(--_muted); }
.osp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.osp-pill { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; border: var(--_bw) solid var(--_line); border-radius: 99px; padding: 3px 10px; color: var(--_muted); background: var(--_surface); }
.osp-pill--ok { color: var(--_accent); border-color: var(--_accent); }
.osp-h1 { font-family: var(--_fh); font-weight: var(--osp-heading-weight, 700); text-transform: var(--osp-heading-transform, none); letter-spacing: var(--osp-heading-tracking, -.01em); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 4px 0 10px; }
.osp-h2 { font-family: var(--_fh); font-weight: var(--osp-heading-weight, 700); text-transform: var(--osp-heading-transform, none); letter-spacing: var(--osp-heading-tracking, -.01em); font-size: 1.6rem; margin: 2.2rem 0 .25rem; }
.osp-sub { color: var(--_muted); font-size: 1.0625rem; max-width: 62ch; margin: 0 0 1rem; }
.osp-sub--small { font-size: .875rem; }
.osp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--_line); border: var(--_bw) solid var(--_line); border-radius: var(--_r); overflow: hidden; box-shadow: var(--_shadow); }
.osp-stat { background: var(--_surface); padding: 14px 16px; }
.osp-stat b { display: block; font: 700 1.6rem var(--_fn); line-height: 1.15; }
.osp-stat span { font-size: .75rem; color: var(--_muted); text-transform: uppercase; letter-spacing: .06em; }
.osp-stat--goal b { color: var(--_warm); }
@media (max-width: 620px) { .osp-stat:last-child:nth-child(odd) { grid-column: 1 / -1; } } /* no empty cell when the count is odd */
.osp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.osp-btn { display: inline-block; padding: 10px 18px; border-radius: var(--_rs); text-decoration: none; font-weight: 600; font-size: .9375rem; border: var(--_bw) solid var(--_accent); background: var(--_accent); color: var(--_accent-ink); cursor: pointer; }
.osp-btn--ghost { background: transparent; color: var(--_accent); }
.osp-allstats { margin: 8px 2px 0; font-size: .875rem; }
.osp-allstats a { color: var(--_accent); }

/* ---- trip bar and progress dots (entry header) ---- */
.osp-tripbar { display: flex; align-items: center; gap: 10px; background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); padding: 8px 14px; font-size: .875rem; margin: 0 0 10px; text-decoration: none; color: var(--_ink); }
.osp-tripbar__em { width: 36px; flex: none; }
.osp-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.osp-dots a { flex: 1 1 8px; max-width: 26px; height: 8px; border-radius: 5px; background: var(--_line); }
.osp-dots a.is-past { background: var(--_accent); opacity: .5; }
.osp-dots a.is-cur { background: var(--_warm); }

/* ---- emblems ---- */
.osp-emblem { display: block; width: 100%; height: auto; }
.osp-emb--hst { --osp-emb: #2f5d3a; } .osp-emb--pct { --osp-emb: #b5562a; } .osp-emb--at { --osp-emb: #3a5f8a; } .osp-emb--cdt { --osp-emb: #7a5a2a; } .osp-emb--ski { --osp-emb: #4a6f8f; }
.osp-acticon { display: block; width: 100%; height: auto; }

/* ---- journey (day list) ---- */
.osp-journey__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 2rem 0 .75rem; }
.osp-journey__head .osp-h2 { margin: 0; }
.osp-seg { display: none; border: var(--_bw) solid var(--_line); border-radius: var(--_rs); overflow: hidden; background: var(--_surface); }
html.js .osp-seg { display: inline-flex; }
.osp-seg button { border: 0; background: none; padding: 7px 14px; font: inherit; font-size: .875rem; color: var(--_muted); cursor: pointer; }
.osp-seg button[aria-pressed="true"] { background: var(--_accent); color: var(--_accent-ink); }
.osp-days { display: grid; gap: 12px; }
.osp-day { display: grid; grid-template-columns: 150px 1fr; background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); overflow: hidden; box-shadow: var(--_shadow); text-decoration: none; color: var(--_ink); scroll-margin-top: 70px; }
.osp-day:hover { border-color: var(--_accent); }
.osp-day__ph { position: relative; min-height: 128px; display: flex; align-items: flex-end; padding: 10px; overflow: hidden; background: color-mix(in srgb, var(--osp-emb, var(--_accent)) 14%, var(--_surface)); color: var(--osp-emb, var(--_accent)); }
.osp-day__ph--photo { background: var(--_line); color: #fff; padding: 0; }
.osp-day__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.osp-day__ph--emblem .osp-emblem { position: absolute; right: -18px; top: 50%; transform: translateY(-50%); width: 118px; }
.osp-day__ph--icon .osp-acticon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 60px; color: var(--_muted); }
.osp-day__n { position: relative; font: 700 2.1rem/1 var(--_fh); }
.osp-day__ph--photo .osp-day__n { margin: 10px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.osp-day__body { padding: 14px 18px; min-width: 0; }
.osp-day__date { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--_muted); }
.osp-day__title { font: 700 1.25rem/1.25 var(--_fh); margin: 2px 0 8px; text-transform: var(--osp-heading-transform, none); letter-spacing: var(--osp-heading-tracking, -.01em); }
.osp-day__route { color: var(--_muted); font-size: .875rem; margin-bottom: 10px; }
.osp-day__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .875rem; }
.osp-day__bar { height: 4px; background: var(--_line); border-radius: 4px; margin-top: 12px; overflow: hidden; }
.osp-day__bar i { display: block; height: 100%; background: var(--_accent); }
.osp-day__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.osp-badge { font-size: .6875rem; border: var(--_bw) solid var(--_line); border-radius: 6px; padding: 1px 7px; color: var(--_muted); }
.osp-badge--trip { border-color: var(--osp-emb, var(--_accent)); color: var(--osp-emb, var(--_accent)); }
/* compact rows */
.osp-days.is-rows .osp-day { grid-template-columns: 1fr; border-radius: var(--_rs); box-shadow: none; }
.osp-days.is-rows .osp-day__ph, .osp-days.is-rows .osp-day__route, .osp-days.is-rows .osp-day__bar, .osp-days.is-rows .osp-day__badges { display: none; }
.osp-days.is-rows .osp-day__body { display: grid; grid-template-columns: 54px 1fr auto; gap: 2px 14px; align-items: center; padding: 10px 14px; }
.osp-days.is-rows .osp-day__body::before { content: attr(data-n); font: 700 1.4rem var(--_fh); color: var(--_accent); grid-row: 1 / 3; }
.osp-days.is-rows .osp-day__title { font-size: 1rem; margin: 0; }
.osp-days.is-rows .osp-day__date { grid-column: 2; }
.osp-days.is-rows .osp-day__facts { grid-column: 3; grid-row: 1 / 3; gap: 2px 14px; justify-content: flex-end; }
@media (max-width: 620px) {
	.osp-day { grid-template-columns: 1fr; }
	.osp-day__ph { min-height: 72px; }
	.osp-days.is-rows .osp-day__body { grid-template-columns: 40px 1fr; }
	.osp-days.is-rows .osp-day__facts { grid-column: 2; grid-row: auto; justify-content: flex-start; }
}
.osp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.osp-chip { font-size: .8125rem; border: var(--_bw) solid var(--_line); background: var(--_surface); border-radius: 99px; padding: 4px 12px; color: var(--_muted); text-decoration: none; }
.osp-group { background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); margin-bottom: 10px; box-shadow: var(--_shadow); scroll-margin-top: 70px; }
.osp-group > summary { cursor: pointer; padding: 12px 16px; display: flex; justify-content: space-between; gap: 10px; list-style: none; }
.osp-group > summary::-webkit-details-marker { display: none; }
.osp-group > summary span { color: var(--_muted); font-size: .875rem; }
.osp-group .osp-days { padding: 0 12px 12px; }

/* ---- expanding blocks ---- */
.osp-blocks__tiles { display: none; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
html.js .osp-blocks.is-ready .osp-blocks__tiles { display: grid; }
.osp-blk { position: relative; text-align: left; font: inherit; color: var(--_ink); cursor: pointer; padding: 16px 40px 16px 16px; background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); box-shadow: var(--_shadow); }
.osp-blk:hover, .osp-blk[aria-expanded="true"] { border-color: var(--_accent); }
.osp-blk[aria-expanded="true"] { background: color-mix(in srgb, var(--_accent) 8%, var(--_surface)); }
.osp-blk b { display: block; font: 700 1.1rem var(--_fh); text-transform: var(--osp-heading-transform, none); }
.osp-blk span { color: var(--_muted); font-size: .875rem; }
.osp-blk i { position: absolute; right: 14px; top: 12px; font: 400 1.5rem/1 var(--_fb); font-style: normal; color: var(--_accent); }
.osp-blocks__panels { margin-top: 12px; }
.osp-panel { background: var(--_surface); border: var(--_bw) solid var(--_accent); border-radius: var(--_r); padding: 16px 18px; box-shadow: var(--_shadow); margin-bottom: 12px; }
.osp-panel[hidden] { display: none; }
.osp-panel__title { margin: 0 0 6px; font: 700 1.25rem var(--_fh); text-transform: var(--osp-heading-transform, none); }
.osp-secgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 28px; }
.osp-sec h4 { margin: 12px 0 4px; font: 600 .75rem var(--_fb); text-transform: uppercase; letter-spacing: .06em; color: var(--_muted); }
.osp-kv { margin: 0; }
.osp-kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: var(--_bw) solid var(--_line); font-size: .9375rem; }
.osp-kv dt { color: var(--_muted); }
.osp-kv dd { margin: 0; font-weight: 600; text-align: right; }
.osp-note { color: var(--_muted); font-size: .8125rem; margin: 8px 0 0; }

/* ---- previous / next ---- */
.osp-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 1.6rem; }
@media (max-width: 620px) { .osp-pn { grid-template-columns: 1fr; } }
.osp-pn a { background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); padding: 14px 18px; text-decoration: none; color: var(--_ink); box-shadow: var(--_shadow); }
.osp-pn a:hover { border-color: var(--_accent); }
.osp-pn small { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--_muted); }
.osp-pn b { font: 700 1.05rem var(--_fh); }
.osp-pn__next { text-align: right; }
.osp-back { margin: 1rem 0 0; }

/* ---- archives ---- */
.osp-archive .osp-header-block { margin-bottom: .5rem; }
.osp-year { font: 700 1.4rem var(--_fh); margin: 1.6rem 0 .6rem; text-transform: var(--osp-heading-transform, none); }
.osp-tgrid { grid-template-columns: 1fr; }
.osp-tcard { display: flex; flex-direction: row; align-items: stretch; background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); overflow: hidden; box-shadow: var(--_shadow); text-decoration: none; color: var(--_ink); }
.osp-tcard:hover { border-color: var(--_accent); }
.osp-tcard__hero { position: relative; width: 190px; flex: none; min-height: 170px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--osp-emb, var(--_accent)) 16%, var(--_surface)); color: var(--osp-emb, var(--_accent)); overflow: hidden; }
.osp-tcard__hero .osp-emblem { width: 104px; }
.osp-tcard__hero--icon .osp-acticon { width: 64px; color: var(--_muted); }
.osp-tcard__hero--photo { background: var(--_line); }
.osp-tcard__hero .osp-pill { position: absolute; top: 10px; left: 10px; }
.osp-tcard__body { flex: 1; min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.osp-tcard__title { font: 700 1.35rem/1.2 var(--_fh); margin: 0 0 4px; text-transform: var(--osp-heading-transform, none); letter-spacing: var(--osp-heading-tracking, -.01em); }
.osp-tcard__dates { font-size: .8125rem; color: var(--_muted); margin-bottom: 10px; }
.osp-tcard__desc { font-size: .875rem; color: var(--_muted); margin: 0 0 8px; }
.osp-tcard__snap { position: relative; width: min(38%, 340px); flex: none; border-left: var(--_bw) solid var(--_line); background: var(--_bg); }
.osp-tcard__snap .osp-snap { width: 100%; height: 100%; min-height: 170px; display: block; }
.osp-tcard__snap small { position: absolute; left: 10px; bottom: 6px; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--_muted); }
@media (max-width: 820px) { .osp-tcard__snap { display: none; } }
@media (max-width: 620px) { .osp-tcard { flex-direction: column; } .osp-tcard__hero { width: auto; min-height: 110px; } }
.osp-tgrid.is-rows .osp-tcard { border-radius: var(--_rs); box-shadow: none; align-items: center; }
.osp-tgrid.is-rows .osp-tcard__hero { width: 64px; min-height: 0; align-self: stretch; }
.osp-tgrid.is-rows .osp-tcard__hero .osp-emblem { width: 40px; }
.osp-tgrid.is-rows .osp-tcard__hero .osp-pill, .osp-tgrid.is-rows .osp-tcard__snap, .osp-tgrid.is-rows .osp-tcard__desc { display: none; }
.osp-tgrid.is-rows .osp-tcard__body { padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; }
.osp-tgrid.is-rows .osp-tcard__title { font-size: 1.05rem; margin: 0; }
.osp-tgrid.is-rows .osp-tcard__dates { margin: 0; }
.osp-tgrid.is-rows .osp-day__facts { grid-column: 2; grid-row: 1 / 3; justify-content: flex-end; }
.osp-chip.is-on { background: var(--_accent); color: var(--_accent-ink); border-color: var(--_accent); }
.osp-group__t { display: flex; align-items: center; gap: 10px; }
.osp-group__em { width: 32px; flex: none; display: block; }
.osp-group__em--icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--_muted); color: #fff; }
.osp-group__em--icon .osp-acticon { width: 18px; }
.osp-archive .osp-journey__head { margin-top: 1rem; }

/* ---- list <-> map highlight ---- */
.osp-day.is-hot { outline: 3px solid var(--_warm); outline-offset: -3px; background: var(--_hl); }
.osp-pin--hot > span { outline: 3px solid #b5562a; transform: scale(1.3); position: relative; z-index: 1000; }
.osp-day:focus-visible { outline: 3px solid var(--_warm); outline-offset: 2px; }

/* sub-headings that the older renderers print inside a panel (Conditions, Climbs, Stream crossings...) */
.osp-panel .osp-metrics__sub { font: 700 1.05rem var(--_fh); margin: 1rem 0 .4rem; text-transform: var(--osp-heading-transform, none); letter-spacing: 0; }
.osp-panel .osp-metrics__sub:first-of-type { margin-top: .4rem; }
.osp-panel ol.osp-crossings { margin: 0 0 .5rem; padding-left: 1.4rem; }

/* ---- home page blocks ---- */
.osp-homehero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: center; margin: 1.6rem 0 0; }
@media (max-width: 820px) { .osp-homehero { grid-template-columns: 1fr; } }
.osp-homehero .osp-h1 { margin: 4px 0 8px; }
.osp-homehero .osp-h1 a { color: inherit; text-decoration: none; }
.osp-homehero__facts { margin: 0 0 4px; }
.osp-homehero__m { position: relative; display: block; background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); box-shadow: var(--_shadow); overflow: hidden; color: var(--osp-emb, var(--_accent)); }
.osp-homehero__m svg { display: block; width: 100%; height: auto; }
.osp-homehero__m .osp-emblem { width: 160px; margin: 24px auto; }
.osp-homehero__m small { position: absolute; left: 12px; bottom: 8px; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--_muted); }
.osp-minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.osp-mini { display: flex; flex-direction: column; gap: 6px; background: var(--_surface); border: var(--_bw) solid var(--_line); border-radius: var(--_r); padding: 14px; text-decoration: none; color: var(--_ink); box-shadow: var(--_shadow); }
.osp-mini:hover { border-color: var(--_accent); }
.osp-mini__em { width: 52px; display: block; }
.osp-mini__em--icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--_muted); color: #fff; }
.osp-mini__em--icon .osp-acticon { width: 28px; }
.osp-mini b { font: 700 1rem/1.2 var(--_fh); text-transform: var(--osp-heading-transform, none); }
.osp-mini small { color: var(--_muted); font-size: .8125rem; }
.osp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.osp-tile { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; background: var(--_surface); border: var(--_bw) solid var(--_line); border-left: 4px solid var(--_accent); border-radius: var(--_rs); padding: 12px 14px; text-decoration: none; color: var(--_ink); }
.osp-tile:hover { border-color: var(--_accent); }
.osp-tile__ic { grid-row: 1 / 3; color: var(--_accent); }
.osp-tile__ic .osp-acticon { width: 30px; }
.osp-tile b { font: 700 1.05rem var(--_fh); text-transform: var(--osp-heading-transform, none); }
.osp-tile small { color: var(--_muted); font-size: .8125rem; }
