/* Coordinate – stile del sito
   Una colonna di lettura tipografica; la mappa è un reticolo di meridiani e paralleli. */

@font-face { font-family: "Literata"; src: url("font/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("font/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("font/literata-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("font/literata-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("font/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("font/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #f4f5f2;
  --fg: #1c2023;
  --muted: #6b716f;
  --line: #d6d9d4;
  --accent: #2c4f86;
  --accent-soft: #dfe5ee;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131618; --fg: #e3e5e1; --muted: #8d9391; --line: #2c3134;
    --accent: #93b2e4; --accent-soft: #1f2a3b; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 18px; line-height: 1.7;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: env(safe-area-inset-top, 0px) calc(64px + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 640px; margin: 0 auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

header.bar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px;
  padding-block: 20px 14px; border-bottom: 1px solid var(--line); margin-bottom: 36px;
  font-family: var(--font-mono); font-size: 13px;
}
.mark { text-decoration: none; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a, nav button { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
nav a:hover, nav button:hover, nav a[aria-current] { color: var(--fg); }

.meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; font-variant-numeric: tabular-nums; }
.meta .sec { text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
h1 { font-weight: 500; font-size: 2.1rem; line-height: 1.15; margin: 10px 0 28px; text-wrap: balance; }
h2 { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.body p { margin: 0 0 1.1em; }
.body .day { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin: 2em 0 1em; display: flex; align-items: center; gap: 12px; }
.body .day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.body sup { font-family: var(--font-mono); font-size: 0.65em; color: var(--muted); }
.notes { margin-top: 2em; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.notes p { margin: 0 0 0.4em; }
.epigraph { font-style: italic; color: var(--muted); margin: 0 0 32px; max-width: 30em; }
.epigraph span { display: block; font-style: normal; font-family: var(--font-mono); font-size: 12px; margin-top: 6px; }

a.hl { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a.hl:hover { color: var(--accent); }
a.hl.seen { text-decoration-style: dotted; text-decoration-color: var(--muted); }
a.hl[data-type]::after { font-family: var(--font-mono); font-size: 0.68em; color: var(--accent); margin-left: 2px; vertical-align: super; display: inline-block; }
a.hl[data-type="musica"]::after { content: "♪"; }
a.hl[data-type="foto"]::after { content: "▣"; }

.out { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.out .hint { color: var(--muted); }
.btnlink { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn { font-family: var(--font-mono); font-size: 13px; background: none; color: var(--accent); border: 1px solid var(--accent); padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--accent-soft); }

.ph {
  aspect-ratio: 4 / 3; max-width: 100%; margin: 0 0 28px;
  background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 14px);
  border: 1px solid var(--line); display: grid; place-items: center; text-align: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding: 16px;
}
figure.photo { margin: 0 0 28px; }
.artist { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin: -18px 0 24px; }
.listen { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; }
.echo ul { list-style: none; margin: 0; padding: 0; }
.echo li { border-bottom: 1px dashed var(--line); }
.echo a { display: block; padding: 12px 0; text-decoration: none; }
.echo q { font-style: italic; quotes: "«" "»"; }
.echo a:hover q { color: var(--accent); }
.echo .c { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.echo a.seen q { color: var(--muted); }
.echo-note { font-size: 0.95rem; color: var(--muted); margin: 0 0 14px; }

.intro { font-size: 1.15rem; margin: 0 0 6px; max-width: 32em; font-style: italic; }
.intro-src { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0 0 28px; }
.mapbox { margin: 0 0 14px; min-height: 120px; }
.mapbox svg { width: 100%; height: auto; display: block; }
.grat { stroke: var(--line); stroke-width: 1; }
.gratlbl { fill: var(--muted); font-family: var(--font-mono); font-size: 15px; }
.edge { stroke: var(--line); stroke-width: 1.2; }
.route { stroke: var(--accent); stroke-width: 3.5; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.dot { fill: var(--bg); stroke: var(--fg); stroke-width: 2.5; }
.dot.seen { fill: var(--accent); stroke: var(--accent); }
.dot.here { stroke: var(--accent); stroke-width: 5; }
.plbl { fill: var(--fg); font-family: var(--font-body); font-size: 20px; }
.plbl.seen { fill: var(--muted); }
.offlbl { fill: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.node a { cursor: pointer; }
.node a:hover .dot { stroke: var(--accent); }
.node a:hover .plbl { fill: var(--accent); }
.node a:focus-visible { outline: none; }
.node a:focus-visible .dot { stroke: var(--accent); stroke-width: 6; }
.hit { fill: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 36px; }
.legend svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }

.index ul { list-style: none; margin: 0; padding: 0; }
.index a { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; text-decoration: none; border-bottom: 1px dashed var(--line); }
.index .t { min-width: 0; }
.index a:hover .t { color: var(--accent); }
.index a.seen .t { color: var(--muted); }
.index .c { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

.stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 32px; font-variant-numeric: tabular-nums; }
.stats div { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.stats b { display: block; font-family: var(--font-body); font-size: 1.9rem; font-weight: 500; color: var(--fg); letter-spacing: 0; text-transform: none; }
ol.trail { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: step; }
ol.trail li { display: grid; grid-template-columns: 2.4em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); counter-increment: step; }
ol.trail li::before { content: counter(step); font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
ol.trail a { text-decoration: none; }
ol.trail a:hover { color: var(--accent); }
ol.trail .c { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.share { margin: 8px 0 36px; padding: 20px; background: var(--accent-soft); display: grid; gap: 14px; }
.share p { margin: 0; font-size: 0.95rem; }
.share .row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.share img { width: 240px; max-width: 100%; border: 1px solid var(--line); }
.share .small { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.empty { color: var(--muted); }
footer.foot { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 48px; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  h1 { font-size: 1.75rem; }
  .plbl { font-size: 30px; }
  .gratlbl { font-size: 22px; }
  .offlbl { font-size: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  main { animation: in 0.35s ease-out; }
  @keyframes in { from { opacity: 0.4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
