
/* All years: use the public calendar's shared theme tokens and typography. */
.years-main{padding-top:20px}.years-main .intro{margin-bottom:14px}.years-main h1{font-size:clamp(28px,3.6vw,42px);letter-spacing:-1.3px}.years-symbols{position:absolute;width:0;height:0;overflow:hidden}.years-icon{width:14px;height:14px;stroke:currentColor;fill:none;flex-shrink:0;stroke-width:1.8}.years-overview{padding:12px;margin-bottom:12px}.years-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.years-totals .stat{background:var(--bg);border:1px solid var(--line);padding:8px 10px}.years-totals .stat strong{font-size:21px;font-variant-numeric:tabular-nums}.years-totals .stat span{display:flex;align-items:center;gap:4px}.years-jump{display:flex;flex-wrap:wrap;gap:4px;margin:10px 0 7px}.years-jump .button{font-size:11px;min-height:26px;padding:4px 7px;border-radius:5px}.years-legend{display:flex;align-items:center;gap:15px;flex-wrap:wrap;color:var(--muted);font-size:12px}.years-legend>span{display:inline-flex;align-items:center;gap:4px}.years-legend>span:first-child{color:var(--green)}.years-legend-image{color:var(--blue)}.years-century{margin-bottom:10px;padding:10px;scroll-margin-top:12px}.years-century .section-head{margin:0 0 7px}.years-century h2{margin:0;font-size:15px}.years-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:4px}.years-tile{min-width:0;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:6px;padding:4px 3px;transition:border-color .12s,background .12s;text-decoration:none;font-variant-numeric:tabular-nums}.years-tile.has-events{background:var(--paper);border-color:var(--green)}.years-tile:hover{background:var(--mint);border-color:var(--green);text-decoration:none}.years-number{font-size:15px;line-height:1.2;font-weight:750}.years-tile.is-current{box-shadow:inset 0 0 0 1px var(--green);background:var(--mint)}.years-badges{display:flex;align-self:flex-end;justify-content:flex-end;gap:4px;align-items:center;font-size:10px;line-height:1.15}.years-count{display:inline-flex;align-items:center;gap:2px;font-weight:650;white-space:nowrap}.years-count .years-icon{width:12px;height:12px}.years-event-count{color:var(--green)}.years-image-count{color:var(--blue)}.years-image-count.is-zero{color:var(--muted);opacity:.8}.all-years-page .header-nav a[aria-current=page]{color:var(--green);font-weight:750}.all-years-page .header-nav a[aria-current=page]:hover{text-decoration:underline}@media(max-width:730px){.years-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.years-grid{grid-template-columns:repeat(auto-fill,minmax(72px,1fr))}.years-main .intro{gap:8px}.years-century{padding:7px}.years-main{padding-top:12px}.years-tile{min-height:45px}}

/* Hover/focus event preview: one floating panel, shared calendar colors. */
.years-preview[hidden]{display:none!important}
.years-preview{position:fixed;z-index:1000;display:flex;flex-direction:column;width:min(780px,calc(100vw - 20px));max-height:calc(100dvh - 20px);overflow:hidden;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 28px #0004;font-size:12px;line-height:1.4}
.years-preview-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex:0 0 auto;padding:9px 12px;background:var(--bg);border-bottom:1px solid var(--line)}
.years-preview-header strong{font-size:14px;color:var(--ink)}
.years-preview-header a{font-size:11px;white-space:nowrap;color:var(--green)}
.years-preview-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 10px 8px;scrollbar-width:thin}
.years-preview-message{margin:8px 2px;color:var(--muted)}
.years-preview-scope{font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--green);margin:9px 0 3px}
.years-preview-event{display:flex;align-items:flex-start;gap:8px;padding:7px 0;border-bottom:1px solid var(--line)}
.years-preview-event:last-child{border-bottom:0}
.years-preview-copy{flex:1;min-width:0;overflow-wrap:anywhere}
.years-preview-event-title{display:block;font-size:12px;line-height:1.4;color:var(--ink)}
.years-preview-date{display:block;font-size:10px;color:var(--muted);margin-bottom:2px}
.years-preview-description{font-size:11px;line-height:1.4;margin:3px 0 0;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* Image figures share the calendar's square thumbnail component. */

/* Stronger separation of the floating preview from the year cards. */
.years-preview{border:2px solid var(--green);box-shadow:0 10px 34px #0005,0 0 0 3px var(--paper)}
.years-preview-header{background:var(--mint);border-bottom:1px solid var(--green)}
.years-preview-header strong{font-weight:750}
.years-preview-event-title{font-weight:700}
html[data-theme="dark"] .years-preview{background:#283747;border-color:#80d9c4;box-shadow:0 12px 38px #000b,0 0 0 3px #101820}
html[data-theme="dark"] .years-preview-header{background:#172d35;border-bottom-color:#527e81}
html[data-theme="dark"] .years-preview-description,html[data-theme="dark"] .years-preview-message{color:#e0e8ef}
html[data-theme="dark"] .years-preview-photo figcaption{color:#c7d4de}
html[data-theme="dark"] .years-preview-event{border-bottom-color:#4a5b6c}
html[data-theme="black"] .years-preview{background:#242424;border-color:#ffe35b;box-shadow:0 12px 38px #000d,0 0 0 3px #101010}
html[data-theme="black"] .years-preview-header{background:#35321d;border-bottom-color:#857a3d}
html[data-theme="black"] .years-preview-description{color:#ededed}

/* Keep long image attributions out of the narrow thumbnail column. */
.years-preview-photo{align-self:flex-start;min-width:0}.years-preview-attribution{margin:4px 0 0;min-width:0;max-width:100%;font-size:10px;line-height:1.35;color:var(--muted)}.years-preview-credit-label{cursor:pointer;color:var(--green);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.years-preview-credit{padding:5px 7px;margin-top:4px;background:var(--bg);border:1px solid var(--line);border-radius:4px;max-height:100px;overflow:auto;overflow-wrap:anywhere;white-space:normal}.years-preview-credit a{color:var(--green)}

/* Use available screen space; keep scrolling only if content cannot fit. */
.years-preview{box-sizing:border-box;max-height:calc(100dvh - 20px)}.years-preview-body{flex:1 1 auto}.years-preview-event{padding:6px 0}.years-preview-scope{margin:7px 0 3px}.years-preview-event-title{line-height:1.35}

/* Same history-card / history-image / history-thumb component as the annual view. */
.years-preview-body .history-card.years-preview-event{min-width:0;align-items:flex-start;gap:10px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--paper);margin:5px 0;overflow-wrap:anywhere}
.years-preview-body .history-card .history-image.years-preview-photo{width:min(96px,26%);flex:0 0 min(96px,26%);margin:0;height:auto;align-self:flex-start}
.years-preview-body .history-image .history-thumb{aspect-ratio:1/1;background:var(--bg);border-radius:8px;overflow:hidden}
.years-preview-body .history-thumb img.event-photo{display:block;width:100%;height:100%;max-height:none;max-width:none;object-fit:cover;object-position:center;border-radius:0}
.years-preview-body .history-card.history-text-only{display:block}
.years-preview-body .history-content{min-width:0;flex:1}
.years-preview-body .years-preview-attribution{margin:3px 0 0}
@media(max-width:730px){.years-preview-body .history-card .history-image.years-preview-photo{width:min(88px,28%);flex-basis:min(88px,28%)}}

/* V8: event cards in pairs, within each national/world group. */
.years-preview-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;align-items:stretch;margin:4px 0 8px}
.years-preview[data-columns="2"] .years-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.years-preview-body .years-preview-grid .history-card.years-preview-event{box-sizing:border-box;display:flex;min-width:0;margin:0;padding:8px;gap:8px;border:1px solid var(--line);border-radius:8px;align-items:flex-start}
.years-preview-body .years-preview-grid .history-card.history-text-only{display:block}
.years-preview-body .years-preview-grid .history-card .history-image.years-preview-photo{width:min(88px,30%);flex:0 0 min(88px,30%);margin:0}
.years-preview-body .years-preview-grid .history-content{min-width:0;flex:1}
.years-preview-body .years-preview-grid .years-preview-event-title{font-size:12px;line-height:1.35}
.years-preview-body .years-preview-grid .years-preview-description{-webkit-line-clamp:4;line-clamp:4}
.years-preview-body .years-preview-grid .years-preview-credit-label{max-width:100%;font-size:10px}
.years-preview-body .years-preview-grid .years-preview-credit{max-height:100px}

/* Preview navigation: calendar link first, close at the right edge. */
.years-preview-header{justify-content:flex-start;gap:10px}
.years-preview-header #years-preview-link{flex:0 0 auto;font-weight:650}
.years-preview-header #years-preview-title{flex:1;min-width:0;overflow-wrap:anywhere}
.years-preview-header .years-preview-close{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;min-height:0;padding:0;margin:0;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font:600 22px/1 system-ui,sans-serif;cursor:pointer}
.years-preview-header .years-preview-close:hover{border-color:var(--green);background:var(--bg)}
.years-preview-header .years-preview-close:focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* V10: use a denser preview only when the normal cards cannot fit. */
.years-preview-body{overflow-y:auto;scrollbar-width:auto;scrollbar-color:var(--muted) var(--bg)}
.years-preview[data-compact="true"] .years-preview-header{padding:5px 9px;gap:6px}
.years-preview[data-compact="true"] .years-preview-body{padding:4px 6px 6px}
.years-preview[data-compact="true"] .years-preview-grid{gap:4px;margin:0}
.years-preview[data-compact="true"] .years-preview-grid .history-card.years-preview-event{padding:5px 6px;gap:5px}
.years-preview[data-compact="true"] .years-preview-grid .years-preview-event-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;line-height:1.2}
.years-preview[data-compact="true"] .years-preview-grid .years-preview-description{-webkit-line-clamp:2;line-clamp:2;line-height:1.25;margin-top:2px}
.years-preview[data-compact="true"] .years-preview-grid .history-card .history-image.years-preview-photo{width:min(62px,24%);flex-basis:min(62px,24%)}
.years-preview-more{flex:0 0 auto;margin:0;padding:4px 8px;background:var(--bg);border-top:1px solid var(--line);color:var(--ink);text-align:center;font-size:11px;line-height:1.3}
.years-preview-more[hidden]{display:none}

.years-preview-future{display:inline-block;color:var(--accent,#80d8b0);font-weight:700;font-size:11px;line-height:1.2;margin-left:5px}.years-preview-date>.years-preview-future:first-child{margin-left:0}
