/* St. John Almanac: the home report's page. The shell's parts (the head, bands, tiles, buttons, fields, folds) are
   in assets/almanac.css; only what the shell does not have is here: the search's answers, the map to set the spot
   on, and the report's own drawings and tables. Colours are the shell's tokens, so day and night follow the reader. */
.rp { --rp-ts: #f6b99a; --rp-h1: #eb6834; --rp-h3: #b0451a; --rp-h5: #5c2109; --rp-tint: color-mix(in srgb, var(--accent) 20%, var(--sheet)); }
:root[data-theme="dark"] .rp { --rp-ts: #8a3a17; --rp-h1: #d95926; --rp-h3: #f39266; --rp-h5: #fbd3bd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rp { --rp-ts: #8a3a17; --rp-h1: #d95926; --rp-h3: #f39266; --rp-h5: #fbd3bd; } }

.rp-find { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "a map" "b map"; gap: 1.25rem 2rem; align-items: start; }
.rp-a { grid-area: a; } .rp-b { grid-area: b; } .rp-mapcol { grid-area: map; }      /* in the page's own order: find the place, set the spot on the map, name it and make the report */
@media (max-width: 52rem) { .rp-find { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "a" "map" "b"; } }
#rp-alerts { padding-block: 0.75rem 0; }
/* the reader's own places, first: one press each */
.rp-mine { margin: 0.75rem 0 1.5rem; display: flex; flex-direction: column; gap: 0.45rem; }
.rp-mine-h { margin: 0; font-weight: 600; }
.rp-mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rp-mine-list .button { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.rp-mine-list .rp-more { border-style: dashed; }
.rp-nomine { margin: 0.75rem 0 1.5rem; max-width: var(--measure); }
#rp-here-say:empty { display: none; }
.rp-steps { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.rp-steps .field { max-width: none; }
.rp-steps .field input[type="text"] { width: 100%; box-sizing: border-box; }
.rp-hits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.rp-hits button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; gap: 0.75rem; width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); cursor: pointer; }
.rp-hits button:hover, .rp-hits button[aria-pressed="true"] { border-color: var(--accent); }
.rp-hits button:focus-visible, .rp-mapbox canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rp-hits .k { color: var(--ink-soft); font-size: var(--step--1); white-space: nowrap; }
.rp-row { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; align-items: center; }
.rp-mapcol { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.rp-mapbox { position: relative; border: 1px solid var(--water-edge); border-radius: 10px; overflow: hidden; background: var(--water); aspect-ratio: 20 / 13.6; }
.rp-mapbox canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; cursor: crosshair; }
.rp-zoom { position: absolute; right: 0.5rem; top: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.rp-zoom button { all: unset; box-sizing: border-box; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.rp-zoom button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rp-spot { margin: 0; font-variant-numeric: tabular-nums; }
.rp-status { margin: 0; min-height: 1.5em; color: var(--ink-soft); }
.rp-status.is-bad { color: var(--signal); }
.rp-paper { display: inline-flex; gap: 0.9rem; align-items: center; }

/* the report on the page */
.rp-report { display: flex; flex-direction: column; gap: 2.25rem; }
.rp-cover .rp-title { font-family: var(--display); font-size: var(--step-3, 2rem); line-height: 1.12; margin: 0.2rem 0 0.4rem; overflow-wrap: anywhere; }
.rp-where { margin: 0; color: var(--ink-soft); }
.rp-part { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.rp-part > h2 { font-family: var(--display); margin: 0; }
.rp-part > h3 { margin: 0.9rem 0 0; }
.rp-part > p, .rp-part > ul { margin: 0; max-width: var(--measure); }
.rp-part > ul.tiles { max-width: none; }
.rp-lede { font-size: var(--step-1, 1.15rem); line-height: 1.5; }
.rp-word { font-size: 1.35em; line-height: 1.15; }
.rp-tag { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.rp-fig { margin: 0; max-width: 22rem; }
.rp-fig--wide { max-width: 44rem; }
.rp-fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.rp-fig svg text { font-family: var(--text, sans-serif); }
.rp-fig figcaption { margin-top: 0.4rem; font-size: var(--step--1); color: var(--ink-soft); line-height: 1.45; }
.rp-cover .rp-fig { margin-top: 0.9rem; }
.rp-side { display: grid; grid-template-columns: minmax(12rem, 20rem) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start; }
@media (max-width: 44rem) { .rp-side { grid-template-columns: minmax(0, 1fr); } }
.rp-stack { grid-template-columns: minmax(0, 1fr); }
.rp-list { padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.rp-note { padding: 0.75rem 0.9rem; background: var(--water); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; }
.rp-quote { margin: 0; padding: 0.1rem 0 0.1rem 0.9rem; border-left: 3px solid var(--sun); max-width: var(--measure); }
.rp-quote p { margin: 0 0 0.3rem; }
.rp-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.rp-report a { overflow-wrap: anywhere; }      /* a printed address must break, or it pushes a phone's page wide */
.rp-table { overflow-x: auto; max-width: 100%; }
.rp-table:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rp-table table { border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; min-width: 34rem; }
.rp-table th { text-align: left; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid var(--ink); padding: 0.4rem 0.6rem; vertical-align: bottom; }
.rp-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.rp-table .rp-end { text-align: right; }
.rp-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--land) 55%, transparent); }
