/* Park Risk Almanac: a ranger's field journal.
   Handwriting (Caveat) only for titles, annotations and notes; reading text in Lora. Both self-hosted (OFL, /fonts/).
   Sizes in rem; the root size grows on very wide screens. Nothing smaller than .75rem. */
@font-face { font-family: Caveat; src: url(/fonts/caveat-latin-500-700.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: Lora; src: url(/fonts/lora-latin-400-600.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: Lora; src: url(/fonts/lora-latin-italic-400.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --desk: #e7dfcc; --paper: #f8f3e6; --card: #fffdf6; --grid: rgba(70, 110, 150, .10);
  --ink: #2d3436; --pencil: #55595c; --rule: #d3ccbb; --red: #a3402a; --blue: #2f6690; --green: #3a6033; --tape: rgba(226, 207, 146, .78); --sticky: #ffe27a;
  --wash: #d79a76; --wash-2: #e9c9a6; --visits: rgba(201, 170, 120, .28);
  --l0: #9cc0a0; --l1: #e3cf86; --l2: #e7a66f; --l3: #d26a45; --l4: #9e3a22;
  --hand: Caveat, "Segoe Print", cursive; --read: Lora, Georgia, serif;
  --measure: 54ch;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, calc(10px + .3125vw), 22px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 400 1.0625rem/1.65 var(--read); overflow-x: hidden; }
a { color: var(--blue); text-decoration-thickness: .06em; text-underline-offset: .2em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: rgba(255, 226, 122, .8); }
img, svg { max-width: 100%; height: auto; }
.wrap { max-width: 75rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 2400px) { .wrap { max-width: 92rem; } }
.skip { position: absolute; left: -9999px; top: .5rem; z-index: 10; background: var(--ink); color: #fff; padding: .6rem 1rem; }
.skip:focus { left: 1rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.doodle { width: 2.2rem; height: 2.2rem; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough); flex: none; }

/* header & footer */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: .3rem 1.4rem; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; text-decoration: none; color: var(--ink); font: 700 1.75rem/1 var(--hand); }
.brand-mark { width: 1.9rem; height: 1.9rem; stroke: var(--red); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 1.3rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); text-decoration: none; font: 600 1.45rem/1 var(--hand); }
.site-nav a:hover { color: var(--red); text-decoration: underline; }
.page { position: relative; background: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 1.5rem 1.5rem; border-radius: .4rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 24px rgba(60, 45, 20, .12); padding: 1.6rem 2.4rem 2rem; }
.site-foot { padding: 1.8rem 0 2.6rem; color: var(--ink); }
.site-foot p { margin-bottom: .7rem; }
.foot-help { font: 700 1.5rem/1.2 var(--hand); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); }

/* type */
h1 { font: 700 clamp(2.6rem, 4.6vw, 4rem)/1 var(--hand); margin: .2rem 0 .4rem; text-wrap: balance; }
h2 { font: 700 2.1rem/1.1 var(--hand); margin: 0 0 .4rem; }
h3 { font: 600 1.15rem/1.3 var(--read); margin: 1.5rem 0 .4rem; }
.dek, .hand-title { font: 600 1.45rem/1.25 var(--hand); color: var(--pencil); margin: 0 0 .8rem; }
.hand-title { color: var(--ink); font-size: 1.7rem; }
.fact { font-size: 1.15rem; line-height: 1.6; }
.sub { color: var(--pencil); margin-bottom: 1.3rem; }
td.num, .rank-val, .hb-n, .ys-val, .yr-lab { font-variant-numeric: tabular-nums lining-nums; }

/* two-page spread */
.spread { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.4rem; padding: .6rem 0 2rem; }
.spread::before { content: ""; position: absolute; left: 50%; top: -1.6rem; bottom: 0; width: 2rem; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .07), transparent); pointer-events: none; }
.spread .left, .spread .right { min-width: 0; }

/* field notes */
.fnotes { list-style: none; margin: .4rem 0 1.2rem; padding: 0; }
.fnotes li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .7rem; align-items: start; padding: .5rem 0; border-bottom: 1px dashed var(--rule); }
.fnotes b { display: block; font: 700 1.6rem/1.1 var(--hand); color: var(--red); }
.fnotes span { display: block; font-size: .95rem; line-height: 1.45; color: var(--pencil); }
.sticky { background: var(--sticky); padding: .8rem 1.1rem; font: 600 1.45rem/1.2 var(--hand); transform: rotate(1.4deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .14); max-width: 24rem; margin-top: 1.2rem; }

/* watercolour plate */
.plate { position: relative; margin: .8rem 0 1.4rem; background: #fbf8ef; padding: .7rem .7rem .5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .14); transform: rotate(-1.2deg); }
.plate-img { position: relative; }
.plate .wash { display: block; width: 100%; filter: url(#wc); }
.plate .pencil { position: absolute; inset: 0; width: 100%; height: 100%; filter: url(#pencil); }
.plate figcaption { font: 600 1.3rem/1.35 var(--hand); color: var(--pencil); padding-top: .5rem; max-width: 60ch; }
.tape { position: absolute; top: -.75rem; width: 6.5rem; height: 1.8rem; background: var(--tape); z-index: 1; }
.tape.l { left: 1.4rem; transform: rotate(-6deg); }
.tape.r { right: 1.4rem; transform: rotate(7deg); }
.scale { display: block; font: 600 1.15rem/1.35 var(--hand); color: var(--ink); margin-bottom: .7rem; }
.scale i { display: block; height: .45rem; border: 1.5px solid var(--ink); border-top: 0; margin-bottom: .25rem; }
.plate.small { margin: .9rem 0 .8rem; padding: .45rem; }
.plate.small .tape { width: 4rem; height: 1.3rem; top: -.6rem; }
.doodles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; text-align: center; }
.doodles svg { margin: 0 auto; width: 2.4rem; height: 2.4rem; display: block; }
.doodles b { display: block; font: 700 1.7rem/1.1 var(--hand); color: var(--red); margin-top: .2rem; }
.doodles span { display: block; font-size: .85rem; line-height: 1.3; color: var(--pencil); }
.big-doodle svg { width: 9rem; height: 9rem; margin: 1rem auto; display: block; stroke-width: 1.2; }

/* home */
.finder { margin-top: 1.4rem; max-width: 30rem; }
.finder-label { display: block; font: 700 1.5rem/1.2 var(--hand); margin-bottom: .3rem; }
.finder-row { display: flex; gap: .5rem; }
.finder input { flex: 1; min-width: 0; min-height: 2.9rem; font: inherit; padding: .4rem .2rem; border: 0; border-bottom: 2px solid var(--pencil); background: transparent; color: var(--ink); }
.finder button { min-height: 2.9rem; font: 700 1.45rem/1 var(--hand); padding: 0 1.1rem; border: 0; border-radius: .4rem; background: var(--blue); color: #fff; cursor: pointer; }
.finder-none { color: var(--red); margin-top: .6rem; }
.entries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2rem; }
.entry-card a { display: block; color: var(--ink); text-decoration: none; }
.entry-card b { display: block; font: 700 1.6rem/1.1 var(--hand); margin-top: .3rem; }
.entry-card span { display: block; color: var(--pencil); font-size: .95rem; }
.entry-card a:hover b { color: var(--red); text-decoration: underline; }
.entry-card:nth-child(2) .plate { transform: rotate(1.3deg); }
.entry-card:nth-child(3) .plate { transform: rotate(-.6deg); }

/* sections */
.sec { padding: 2.2rem 0; border-top: 2px dashed var(--rule); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; font-size: .85rem; color: var(--pencil); margin-top: .8rem; }
.legend span[class^="lg-"] { display: inline-block; width: .9rem; height: .7rem; margin-right: -.7rem; }
.lg-band { background: var(--wash); opacity: .7; }
.lg-one, .lg-ref { width: 2px !important; height: 1rem !important; background: var(--green); }
.lg-ci { width: 2px !important; height: 1rem !important; background: var(--ink); }
.lg-thin { width: .7rem !important; height: .7rem !important; border-radius: 50%; border: 1.5px solid var(--ink); }
.lg-visits { background: var(--visits); }

/* trip note */
.trip h2 { color: var(--blue); }
.trip-grid { display: grid; grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); gap: 2.6rem; align-items: start; }
.trip-form label { display: block; font: 700 1.45rem/1.2 var(--hand); margin: .6rem 0 .1rem; }
.trip-form select { width: 100%; min-height: 2.75rem; font: 400 1.05rem var(--read); color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--pencil); padding: .3rem .1rem; }
.trip-form button { margin-top: 1.2rem; min-height: 2.9rem; width: 100%; font: 700 1.6rem/1 var(--hand); border: 0; border-radius: .4rem; background: var(--blue); color: #fff; cursor: pointer; box-shadow: 0 3px 0 #1e4a6b; }
.trip-form button:active { transform: translateY(2px); box-shadow: 0 1px 0 #1e4a6b; }
.tearoff { position: relative; background: var(--card); background-image: repeating-linear-gradient(transparent 0 1.85rem, rgba(47, 102, 144, .16) 1.85rem calc(1.85rem + 1px)); padding: 1.6rem 1.5rem 1.1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); transform: rotate(-.6deg); max-width: 40rem; }
.tearoff::before { content: ""; position: absolute; left: 0; right: 0; top: -.35rem; height: .7rem; background: radial-gradient(circle at .35rem .35rem, var(--paper) .22rem, transparent .24rem) 0 0 / .7rem .7rem repeat-x; }
.tn-title { font: 700 1.75rem/1.1 var(--hand); color: var(--blue); margin-bottom: .3rem; }
.tn-big { font: 700 2.1rem/1.1 var(--hand); color: var(--red); margin-bottom: .3rem; }
.tn-pips { display: flex; gap: .35rem; margin: .1rem 0 .6rem; max-width: 18rem; }
.tn-pips i { flex: 1; height: .6rem; border-radius: .3rem; background: #e6dfcd; }
.tn-pips i.on.l0 { background: var(--l0); } .tn-pips i.on.l1 { background: var(--l1); } .tn-pips i.on.l2 { background: var(--l2); } .tn-pips i.on.l3 { background: var(--l3); } .tn-pips i.on.l4 { background: var(--l4); }
.tn-line { margin-bottom: .6rem; }
.tn-check { display: flex; align-items: baseline; gap: .6rem; font: 600 1.4rem/1.25 var(--hand); color: var(--ink); margin: .8rem 0 0; }
.tn-check i { flex: none; width: 1.05rem; height: 1.05rem; border: 2px solid var(--ink); border-radius: .15rem; transform: translateY(.1rem); }
.tearoff.writing > * { animation: write .7s ease-out both; }
.tearoff.writing > *:nth-child(2) { animation-delay: .12s; } .tearoff.writing > *:nth-child(3) { animation-delay: .24s; } .tearoff.writing > *:nth-child(4) { animation-delay: .36s; } .tearoff.writing > *:nth-child(5) { animation-delay: .48s; }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .tearoff.writing > * { animation: none; } }

/* the ruler */
.ru { position: relative; display: block; height: 1rem; }
.ru i { position: absolute; display: block; }
.ru-seg { top: 38%; height: 24%; opacity: .75; filter: url(#rough); }
.ru-seg.l0 { background: var(--l0); } .ru-seg.l1 { background: var(--l1); } .ru-seg.l2 { background: var(--l2); } .ru-seg.l3 { background: var(--l3); } .ru-seg.l4 { background: var(--l4); }
.ru-one { top: -.2rem; bottom: -.2rem; border-left: 2px dashed var(--green); }
.ru-band { top: 26%; height: 48%; background: var(--pencil); opacity: .35; border-radius: .3rem; }
.ru-band.above { background: var(--red); opacity: .35; }
.ru-pt { top: 50%; width: .75rem; height: .75rem; margin: -.375rem 0 0 -.375rem; border-radius: 50%; background: var(--ink); }
.ru-pt.above { background: var(--red); }
.ruler { margin: 0 0 1.2rem; max-width: 44rem; }
.ruler figcaption { font: 700 1.6rem/1.2 var(--hand); margin-bottom: .6rem; }
.ru-big { height: 1.6rem; margin-bottom: 1.6rem; }
.ru-big .ru-pt { width: 1.05rem; height: 1.05rem; margin: -.525rem 0 0 -.525rem; }
.ru-tick { position: absolute; top: 100%; transform: translateX(-50%); margin-top: .3rem; font: 700 1.15rem/1 var(--hand); color: var(--pencil); }
.ru-tick.one { color: var(--green); }
.ru-names { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; font-size: .8rem; line-height: 1.25; color: var(--pencil); }
.ru-names li { padding-top: .35rem; border-top: 4px solid var(--rule); }
.ru-names li:nth-child(1) { border-color: var(--l0); } .ru-names li:nth-child(2) { border-color: var(--l1); } .ru-names li:nth-child(3) { border-color: var(--l2); } .ru-names li:nth-child(4) { border-color: var(--l3); } .ru-names li:nth-child(5) { border-color: var(--l4); }
.ru-names li.on { color: var(--ink); font-weight: 600; }
.ru-stat { margin: .8rem 0 0; color: var(--pencil); }
.caution { padding: .8rem 1.1rem; background: rgba(255, 226, 122, .45); border-radius: .3rem; }
.caution b { font: 700 1.35rem/1 var(--hand); margin-right: .3rem; }

/* ranked list */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row { display: grid; grid-template-columns: 2rem minmax(0, 1.2fr) minmax(6rem, 1fr) 4.6rem; gap: .9rem; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--rule); }
.rank-no { font: 700 1.5rem/1 var(--hand); color: var(--pencil); }
.rank-name { line-height: 1.25; min-width: 0; }
.rank-name > a, .rank-name > span { font-weight: 600; display: inline-block; padding: .15rem 0; min-height: 1.5rem; }
.rank-name > span { color: var(--ink); }
.rank-name small { display: block; font-size: .85rem; color: var(--pencil); }
.rank-val { text-align: right; font: 700 1.6rem/1 var(--hand); }
.rank-val small { display: block; font: 400 .8rem/1.3 var(--read); color: var(--pencil); }

/* watercolour bars */
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: minmax(7rem, 42%) minmax(0, 1fr) 3.6rem; gap: .8rem; align-items: center; padding: .3rem 0; }
.hb-label { line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.hb-label a { display: inline-block; padding: .15rem 0; min-height: 1.5rem; }
.hb-track { display: block; height: .75rem; }
.hb-track i { display: block; height: 100%; background: var(--wash); border-radius: .4rem; opacity: .85; filter: url(#rough); }
.hb-n { text-align: right; font: 700 1.4rem/1 var(--hand); }

/* the year strip */
.ystrip { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .3rem; --plot: 10rem; }
.ystrip.seasons { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 36rem; }
.ys-col { min-width: 0; text-align: center; }
.ys-plot { position: relative; height: var(--plot); border-bottom: 2px solid var(--pencil); }
.ys-plot i { position: absolute; display: block; left: 50%; }
.ys-plot .ys-visits { bottom: 0; left: 8%; right: 8%; background: var(--visits); border-radius: .3rem .3rem 0 0; }
.ys-ci { width: 2px; margin-left: -1px; background: var(--ink); }
.ys-ci.above { background: var(--red); }
.ys-pt { width: .8rem; height: .8rem; margin: 0 0 -.4rem -.4rem; border-radius: 50%; background: var(--ink); }
.ys-pt.above { background: var(--red); }
.ys-pt.thin { background: var(--paper); border: 1.5px solid var(--pencil); }
.ys-ref { position: absolute; left: 0; right: 0; top: calc(var(--plot) - var(--ref) * var(--plot) / 100); border-top: 2px dashed var(--green); z-index: 1; pointer-events: none; }
.ys-lab { display: block; font: 700 1.2rem/1.1 var(--hand); margin-top: .3rem; }
.ys-val { display: block; font-size: .8rem; color: var(--pencil); min-height: 1rem; }

/* years */
.years { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .25rem; align-items: end; }
.yr { text-align: center; min-width: 0; }
.yr-bar { height: 6rem; display: flex; align-items: flex-end; border-bottom: 2px solid var(--pencil); }
.yr-bar i { display: block; width: 100%; background: var(--wash); border-radius: .25rem .25rem 0 0; }
.yr.pre .yr-bar i { background: repeating-linear-gradient(135deg, var(--wash) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--wash); }
.yr.inc .yr-bar i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pencil); }
.yr-lab { display: block; font-size: .75rem; color: var(--pencil); margin-top: .25rem; }
.lg-pre { background: repeating-linear-gradient(135deg, var(--wash) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--wash); }
.lg-inc { box-shadow: inset 0 0 0 1.5px var(--pencil); }

/* tables */
.as-table { margin-top: .9rem; }
.as-table summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 1.8rem; font: 700 1.3rem/1 var(--hand); color: var(--blue); }
.table-scroll { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; margin-top: .4rem; }
th { text-align: left; font-weight: 600; font-size: .9rem; color: var(--pencil); padding: .45rem .6rem; border-bottom: 2px solid var(--pencil); }
td { padding: .45rem .6rem; border-bottom: 1px dashed var(--rule); vertical-align: top; }
td a { display: inline-block; min-height: 1.5rem; padding: .1rem 0; }
th.num, td.num { text-align: right; white-space: nowrap; }

/* entry extras */
.crumbs { font-size: .95rem; color: var(--pencil); margin-bottom: .4rem; }
.crumbs a { display: inline-block; min-height: 1.5rem; padding: .15rem 0; }
.help { border: 2px solid var(--green); border-radius: .4rem; padding: 1rem 1.2rem .2rem; margin: 1.2rem 0 0; max-width: 44rem; background: rgba(255, 253, 246, .7); }
.help h2 { font-size: 1.7rem; color: var(--green); }
.faq h3:first-of-type { margin-top: .6rem; }
.adjoin { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }
.adjoin a, .adjoin span { display: inline-flex; align-items: center; min-height: 2.75rem; font: 700 1.5rem/1.1 var(--hand); }
.source p { color: var(--pencil); overflow-wrap: anywhere; }
.plain { max-width: var(--measure); padding-left: 1.2rem; }
.plain li { margin-bottom: .5rem; }
.text-head { padding: .4rem 0 1rem; }
.prose { padding-bottom: 1rem; }
.prose h2 { margin-top: 1.6rem; }

@media (max-width: 960px) {
  .spread, .two-col, .trip-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .spread::before { display: none; }
  .spread.entry .right { order: -1; }
  .page { padding: 1.2rem 1.4rem 1.6rem; }
}
@media (max-width: 700px) {
  .page { padding: 1rem 1rem 1.4rem; border-radius: 0; margin: 0 -1rem; }
  .ystrip { gap: .1rem; --plot: 8rem; }
  .ys-val { display: none; }
  .ys-lab { font-size: 1rem; }
  .ys-pt { width: .65rem; height: .65rem; margin: 0 0 -.325rem -.325rem; }
  .yr:nth-child(even) .yr-lab { visibility: hidden; }
  .rank-row { grid-template-columns: 1.4rem minmax(0, 1fr) 4rem; gap: .2rem .6rem; }
  .rank-ru { grid-column: 2 / 4; grid-row: 2; }
  .hbars li { grid-template-columns: minmax(6.5rem, 44%) minmax(0, 1fr) 3rem; gap: .5rem; }
  .doodles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ru-names { font-size: .75rem; }
  .site-nav a { font-size: 1.3rem; }
}
