/* Practical matters: the section's own parts. Everything takes its colours and
   type from the Almanac's tokens (assets/almanac.css), so day and night both
   work. No literal colours. The shell's parts (page-head, pic-grid, pic-card,
   tiles, fold, band-head, chip) are used as they are and not restyled. */

.prac :target { scroll-margin-top: 1rem; }
.prac-say { margin: 0; max-width: 42rem; font-family: var(--display); font-size: clamp(1.12rem, 0.5vw + 1rem, 1.3rem); line-height: 1.5; }
.prac-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.prac-jump a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font-size: var(--step--1); font-weight: 600; text-decoration: none; }
.prac-jump a:hover { border-color: var(--ink); }
.prac-jump .sym { width: 1.15rem; height: 1.15rem; stroke-width: 3; }

/* the good news: fewer, wider tiles than the shell's default */
.prac-tiles { grid-template-columns: repeat(auto-fit, minmax(min(13.5rem, 46%), 1fr)); }
.prac-tiles .tile-say { font-size: 0.95rem; color: var(--ink); }
/* a long label may wrap, and never pushes its sign out of the tile; one column on a narrow phone */
.prac-tiles .tile-top > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 26rem) { .prac-tiles { grid-template-columns: 1fr; } }

/* wider cards for pages whose cards hold a list of facts; four picture links on the opening page */
.prac-grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr)); }
.prac-grid--four { grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1rem; }

/* ----- a card's picture where no photograph belongs: one large sign on a tinted panel ----- */
.prac-art { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--land); color: var(--ink); }
.prac-art .sym { width: min(42%, 7rem); height: auto; aspect-ratio: 1; stroke-width: 2.2; }
.prac-art--sun { background: color-mix(in srgb, var(--gold-bright) 26%, var(--sheet)); }
.prac-art--sea { background: var(--water); }
.prac-art--sky { background: color-mix(in srgb, var(--water) 55%, var(--sheet)); }
.prac-art--land { background: color-mix(in srgb, var(--land) 70%, var(--land-edge)); }

/* ----- a small map of the island with a pin, made at build time (src/where.mjs) ----- */
.prac-map-defs { position: absolute; }
.prac-map-link { display: block; width: 100%; height: 100%; }
.prac-map-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.prac-see { margin: 0; font-size: var(--step--1); font-weight: 600; }
.prac-map { display: block; width: 100%; height: 100%; background: var(--water); }
.pm-land { fill: color-mix(in srgb, var(--land-edge) 70%, var(--reef)); }
.pm-other { fill: color-mix(in srgb, var(--land-edge) 55%, var(--water)); }
.pm-road { fill: none; stroke: var(--sheet); stroke-width: 70; stroke-linejoin: round; stroke-linecap: round; }
.pm-road--close { stroke-width: 16; }
.pm-street { fill: none; stroke: var(--sheet); stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; opacity: 0.75; }
.pm-pin circle:first-child { fill: var(--gold-bright); opacity: 0.5; }
.pm-pin circle:last-child { fill: var(--press); stroke: var(--sheet); }
.pm-mark { fill: var(--sheet); stroke: var(--ink); stroke-width: 6; }
.pm-word { fill: var(--ink); font-family: var(--text); font-size: 78px; font-weight: 700; paint-order: stroke; stroke: var(--sheet); stroke-width: 22; stroke-linejoin: round; }
.pm-inset rect { fill: var(--water); stroke: var(--sheet); stroke-width: 14; }
.pm-inset circle { fill: var(--press); stroke: var(--sheet); stroke-width: 10; }

/* ----- the word on a card that says how much it matters ----- */
.chip--learn { background: var(--press); color: var(--on-press); border-color: var(--press); }
.chip--good { background: color-mix(in srgb, var(--gold-bright) 60%, var(--sheet)); border-color: var(--gold); }
.prac-matters { display: flex; gap: 0.45rem; align-items: flex-start; font-size: 0.94rem; line-height: 1.45; color: var(--ink-soft); }
.prac-matters b { color: var(--ink); }
.pic-card:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

/* ----- the keep-left drawing ----- */
.prac-road { display: block; width: 100%; height: 100%; }
.prac-road .pr-ground { fill: color-mix(in srgb, var(--land) 70%, var(--land-edge)); }
.prac-road .pr-tar { fill: color-mix(in srgb, var(--ink) 62%, var(--sheet)); }
.prac-road .pr-edge { fill: none; stroke: var(--sheet); stroke-width: 3; }
.prac-road .pr-mid { fill: none; stroke: var(--gold-bright); stroke-width: 3; stroke-dasharray: 16 14; }
.prac-road .pr-you rect { fill: var(--gold-bright); stroke: var(--ink); stroke-width: 2; }
.prac-road .pr-them rect { fill: var(--sheet); stroke: var(--ink); stroke-width: 2; }
.prac-road .pr-glass { fill: var(--water); stroke: var(--ink); stroke-width: 1.5; }
.prac-road .pr-driver { fill: var(--ink); }
.prac-road .pr-arrow { fill: none; stroke: var(--gold-bright); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.prac-road .pr-arrow--soft { stroke: var(--sheet); opacity: 0.75; }
.prac-road .pr-lead { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.prac-road .pr-word { fill: var(--ink); font-family: var(--text); font-size: 19px; font-weight: 600; }
.prac-road .pr-word--big { font-family: var(--display); font-size: 44px; font-weight: 600; letter-spacing: 0.02em; }

/* ----- a number to call: large, and the whole tile is pressed ----- */
.prac-calls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16.5rem, 100%), 1fr)); gap: 0.9rem; }
.prac-call { min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.05rem 0.4rem; border-radius: 12px; background: var(--land); border: 1px solid var(--land-edge); }
.prac-call > * { margin: 0; }
.prac-call--sun { background: color-mix(in srgb, var(--gold-bright) 22%, var(--sheet)); border-color: color-mix(in srgb, var(--gold-bright) 55%, var(--sheet)); }
.prac-call--sea { background: var(--water); border-color: var(--water-edge); }
.prac-call--sky { background: color-mix(in srgb, var(--water) 55%, var(--sheet)); border-color: var(--water-edge); }
.prac-call-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.prac-call-top .sym { width: 2.1rem; height: 2.1rem; color: var(--ink); }
.prac-call-n { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 1vw + 1.45rem, 2.05rem); line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: lining-nums; white-space: nowrap; }
.prac-call-n a { color: var(--ink); text-decoration: none; }
.prac-call-n a:hover { color: var(--accent); }
/* the emergency number: the whole row, and the largest figure on the page */
.prac-call--first { grid-column: 1 / -1; }
.prac-call--first .prac-call-n { font-size: clamp(2.15rem, 8.6vw, 4.2rem); }
.prac-call--first .prac-call-say { max-width: 46rem; }
.prac-call .prac-own { align-self: flex-start; background: var(--sheet); }
.prac-call-small { font-size: 0.9rem; line-height: 1.4; color: var(--ink-soft); }
.prac-call-small a { color: inherit; }
.prac-call-say { font-size: 0.94rem; line-height: 1.45; }
.prac-call .fold { margin-top: auto; }

/* the telephone line on a place's card, and the small "checked" line under a number */
.prac-tel { display: flex; align-items: center; gap: 0.45rem; font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.prac-tel a { color: var(--ink); text-decoration: none; }
.prac-tel a:hover { color: var(--accent); }
.prac-tel .sym { width: 1.25rem; height: 1.25rem; stroke-width: 3; color: var(--ink-soft); }
.prac-checked { font-size: 0.76rem; line-height: 1.4; color: var(--ink-soft); }
.prac-facts { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.prac-facts dt { font-weight: 700; font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); }
.prac-facts dd { margin: 0.1rem 0 0; font-size: 0.95rem; line-height: 1.45; }

/* a short list of further numbers */
.prac-more { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 0.9rem; }
.prac-more > li { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; align-items: start; align-content: start; padding: 0.9rem 1rem 0.3rem; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); }
.prac-more > li { padding-bottom: 0.8rem; }
.prac-more > li > .sym { width: 2rem; height: 2rem; grid-row: span 4; margin-top: 0.1rem; }
.prac-more > li > :not(.sym):not(.fold) { grid-column: 2; }
.prac-more h3 { margin: 0; font-size: 1rem; }
.prac-more p { margin: 0; font-size: 0.94rem; line-height: 1.45; }
.prac-more .prac-tel { font-size: 1.3rem; }
.prac-more .fold { grid-column: 1 / -1; }

/* three plain steps, drawn large */
.prac-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 0.9rem; }
.prac-steps > li { counter-increment: step; min-width: 0; padding: 1rem 1.05rem; border-radius: 12px; background: var(--sheet); border: 1px solid var(--water-edge); display: flex; flex-direction: column; gap: 0.35rem; }
.prac-steps > li::before { content: counter(step); font-family: var(--display); font-weight: 600; font-size: 2.2rem; line-height: 1; color: var(--accent); }
.prac-steps b { font-size: 1.02rem; }
.prac-steps span { font-size: 0.94rem; line-height: 1.45; color: var(--ink-soft); }

/* the same boxes for tips that are not a sequence: no numbers */
.prac-steps--plain > li::before { content: none; }

/* the sources at the foot */
.prac-sources { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; }
.prac-sources li { font-size: var(--step--1); line-height: 1.5; }
.prac-sources q { quotes: "\201C" "\201D"; }

/* a shop's card on the groceries page */
.prac-hours { margin: 0; font-size: 0.92rem; line-height: 1.45; }
.prac-hours b { font-weight: 700; }
.prac-own { margin: 0; padding: 0.55rem 0.75rem; border-radius: 8px; background: color-mix(in srgb, var(--gold-bright) 18%, var(--sheet)); font-family: var(--display); font-size: 1.04rem; line-height: 1.45; }
.prac-own b { display: block; font-family: var(--text); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
