/* Time Machine: map + drawer app frame, pins, list, place card, and the server-rendered guide below. NAVIG yellow and ink, hairlines, tabular numerals. */
.tm-page { --tm-sheet-half: var(--ns-half, 50dvh); --tm-sheet-full: var(--ns-full, 80dvh); --tm-paper: #f7f1e1; background: #fff; color: var(--nv-ink); }
.tm-page *, .tm-page *::before, .tm-page *::after { box-sizing: border-box; }
.tm-frame { position: relative; height: calc(100dvh - var(--nv-bar-h)); min-height: 480px; overflow: hidden; }
#tm-map { position: absolute; inset: 0; background: #e9eaec; z-index: 0; }
.tm-nomap { margin: 24px; font-size: 13px; color: var(--nv-muted); }
.tm-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.leaflet-container { font-family: var(--nv-font); background: #e9eaec; }
.leaflet-container a, .leaflet-container button, .leaflet-marker-icon { -webkit-tap-highlight-color: transparent; }
.leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; color: var(--nv-ink); }
.tm-page :focus-visible { outline: 2px solid var(--nv-ink); outline-offset: 2px; }

.tm-link { padding: 0; min-height: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--nv-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tm-thumb, .tm-hero-img { position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #f1e6c4, #e4d6aa); color: rgba(18,19,22,.38); }
.tm-thumb { width: 56px; height: 56px; border-radius: var(--nv-r); }
.tm-thumb svg { width: 24px; height: 24px; }
.tm-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tm-years { font-variant-numeric: tabular-nums; }
.tm-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border: 1px solid var(--nv-ink); border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1; color: var(--nv-ink); background: #fff; }
.tm-badge-standing { background: var(--nv-ink); color: #fff; }
.tm-badge-restricted { background: #fff2cf; border-style: dashed; }
.tm-badge-demolished, .tm-badge-marked-site-only, .tm-badge-relocated, .tm-badge-reused { border-style: dashed; background: rgba(233,184,58,.18); }

/* Place card */
.tm-facts { display: grid; grid-template-columns: 1fr; margin: 12px 0 0; border-top: 1px solid var(--nv-line); }
.tm-facts div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--nv-line); font-size: 13px; }
.tm-facts dt { color: var(--nv-muted); } .tm-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.tm-sources { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--nv-muted); }
.tm-sources a { color: var(--nv-ink); }
.tm-note { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--nv-accent); background: var(--nv-surface); font-size: 13px; line-height: 1.45; }

@keyframes tm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tm-shimmer { to { background-position: -200% 0; } }

/* Phone panel rules live in time-machine-panel.css. */
@media (max-width: 767px) { .leaflet-top.leaflet-right { margin-top: 4px; } }

/* Guide (server rendered, below the app) */
.tm-guide { max-width: 1080px; margin: 0 auto; padding: 40px var(--nv-gut) 56px; font-family: var(--nv-font); }
.tm-guide a { color: inherit; text-underline-offset: 3px; }
.tm-wrap { max-width: 1080px; margin: 0 auto; }
.tm-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; font-size: .8125rem; color: var(--nv-muted); }
.tm-crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.tm-h1 { margin: 0 0 16px; font: 700 clamp(2rem, 4.5vw, 3.25rem)/1.1 var(--nv-font); letter-spacing: -.035em; text-wrap: balance; }
.tm-answer { max-width: 68ch; margin: 0 0 20px; font-size: 1.0625rem; line-height: 1.55; color: var(--nv-muted); }
.tm-hero { margin: 20px 0; }
.tm-hero img, .tm-img { display: block; width: 100%; height: auto; border-radius: 8px; background: #efe6c8; }
.tm-facts-table, .tm-guide .tm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 32px; margin: 20px 0 0; border-top: 1px solid var(--nv-line); }
.tm-guide .tm-facts div { grid-template-columns: 110px 1fr; font-size: .875rem; }
.tm-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 20px 0 0; }
.tm-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 600; }
.tm-actions .tm-primary { padding: 8px 14px; border: 1px solid var(--nv-ink); border-radius: var(--nv-r); background: var(--nv-accent); color: var(--nv-accent-ink); text-decoration: none; }
.tm-section { padding: 24px 0; border-bottom: 1px solid var(--nv-line); }
.tm-section h2 { margin: 0 0 14px; font-size: 1.375rem; font-weight: 650; line-height: 1.2; letter-spacing: -.025em; }
.tm-section h3 { margin: 20px 0 8px; font-size: 1rem; }
.tm-section p { max-width: 68ch; line-height: 1.55; }
.tm-beat { margin: 0 0 18px; }
.tm-beat h3 { display: flex; gap: 12px; align-items: baseline; margin: 0 0 4px; }
.tm-year { font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--nv-muted); }
.tm-linklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 24px; margin: 0; padding: 0; list-style: none; }
.tm-linklist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.tm-linklist span { font-size: .8125rem; color: var(--nv-muted); text-align: right; }
.tm-guide .tm-chips { flex-wrap: wrap; overflow: visible; margin: 0 0 12px; padding: 0; gap: 8px; }
.tm-guide .tm-chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--nv-line); border-radius: var(--nv-r); font-size: .8125rem; text-decoration: none; }
.tm-cards, .tm-collections { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.tm-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tm-card a { text-decoration: none; }
.tm-card-img, .tm-card .tm-thumb { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 8px; object-fit: cover; background: #efe6c8; }
.tm-card-meta { font-size: .8125rem; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.tm-guide .tm-thumb { display: block; }
.tm-table-wrap { overflow-x: auto; }
.tm-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tm-table caption { text-align: left; padding: 0 0 12px; font-size: .8125rem; color: var(--nv-muted); }
.tm-table th, .tm-table td { padding: 12px 8px; border-bottom: 1px solid var(--nv-line); text-align: left; font-variant-numeric: tabular-nums; }
.tm-table thead { font-size: .8125rem; color: var(--nv-muted); }
.tm-sources-note, .tm-guide .tm-note, .tm-verified { font-size: .8125rem; color: var(--nv-muted); max-width: 78ch; }
.tm-guide .tm-note { border-left: 0; padding: 0; background: none; margin: 8px 0 14px; }
.tm-sources { font-size: .8125rem; line-height: 1.55; color: var(--nv-muted); }
.tm-correct { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .875rem; }
.tm-guide details { border-top: 1px solid var(--nv-line); }
.tm-guide summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: .9375rem; cursor: pointer; }
.tm-guide details p { margin: 0 0 14px; color: var(--nv-muted); }


/* Earlier names */
.tm-former { font-size: 12px; line-height: 14px; color: var(--nv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-former { margin: -4px 0 8px; white-space: normal; }
.tm-fact-note { display: block; font-size: 12px; color: var(--nv-muted); }
