@font-face {
    font-family: 'Poppins';
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/poppins-v19-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/poppins-v19-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/poppins-v19-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/poppins-v19-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Literata Variable';
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/literata-latin-wght-normal.woff2') format('woff2-variations');
}

@font-face {
    font-family: 'Literata Variable';
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
    src: url('/fonts/literata-latin-wght-italic.woff2') format('woff2-variations');
}

:root {
    --bg: #F5EFE6;
    --surface: #FBF7F0;
    --surface-2: #EFE6D8;
    --line: #E2D6C6;
    --line-soft: #EBE1D3;
    --ink: #091434;
    --text: #2A2F47;
    --muted: #5E6475;
    --accent: #FF923E;
    --accent-strong: #FF8424;
    --accent-text: #A84E0C;
    --accent-soft: #FCE3CC;
    --night: #0A1128;
    --shadow: 0 1px 2px rgba(9, 20, 52, .04), 0 12px 32px -18px rgba(9, 20, 52, .22);
    --shadow-lift: 0 2px 6px rgba(9, 20, 52, .05), 0 26px 50px -24px rgba(9, 20, 52, .32);

    --sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --serif: 'Literata Variable', Georgia, 'Times New Roman', serif;
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --wide: 1180px;
    --gutter: clamp(20px, 4vw, 40px);
    --radius: 18px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --header-h: 72px;
    --rail-h: 68px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0A1128;
        --surface: #101A36;
        --surface-2: #16213F;
        --line: #243052;
        --line-soft: #1B2647;
        --ink: #F5EFE6;
        --text: #D8D4CC;
        --muted: #9CA2B4;
        --accent-text: #FFA662;
        --accent-soft: #3A2A1E;
        --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 16px 36px -20px rgba(0, 0, 0, .6);
        --shadow-lift: 0 2px 6px rgba(0, 0, 0, .25), 0 30px 60px -26px rgba(0, 0, 0, .75);
        color-scheme: dark;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + var(--rail-h) + 20px);
}

html.is-story {
    overflow: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.01em;
}

p,
ol,
ul,
dl,
dd,
figure {
    margin: 0;
}

ol,
ul {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
}

svg {
    display: block;
}

button,
input {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--accent-soft);
    color: var(--ink);
}

.wrap {
    width: 100%;
    max-width: calc(var(--wide) + var(--gutter) * 2);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform .2s;
}

.skip:focus {
    transform: none;
}

kbd {
    display: inline-block;
    min-width: 20px;
    padding: 0 5px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

/* Header */

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}

.top.is-scrolled {
    border-bottom-color: var(--line-soft);
}

.top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.wordmark-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.wordmark-label {
    color: var(--accent-text);
    font-size: 15px;
    font-weight: 500;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
}

.top-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}

.top-nav a:hover {
    background: var(--surface-2);
}

.top-nav .top-site {
    margin-left: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.top-nav .top-site:hover {
    border-color: var(--accent);
    background: var(--surface);
}

/* Bottoni */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}

.btn svg {
    width: 14px;
    height: 14px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: scale(.98);
}

.btn-primary {
    background: var(--accent);
    color: #091434;
}

.btn-primary:hover {
    background: var(--accent-strong);
    box-shadow: 0 12px 24px -12px rgba(255, 132, 36, .75);
}

.btn-ghost {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--accent);
}

.round {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    transition: background-color .2s, border-color .2s, color .2s, opacity .2s, transform .2s;
}

.round svg {
    width: 16px;
    height: 16px;
}

.round:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent);
    color: #091434;
}

.round:disabled {
    opacity: .35;
    cursor: default;
}

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
    padding-top: clamp(32px, 6vw, 72px);
    padding-bottom: clamp(48px, 7vw, 96px);
}

.hero-title {
    display: flex;
    flex-direction: column;
}

.hero-year {
    display: block;
    margin-left: -.06em;
    color: var(--ink);
    font-size: clamp(104px, 15vw, 196px);
    font-weight: 700;
    line-height: .84;
    letter-spacing: -.055em;
    font-variant-numeric: tabular-nums;
}

.hero-name {
    margin-top: 18px;
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.hero-sub {
    margin-top: 14px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(19px, 1.8vw, 22px);
    font-style: italic;
    line-height: 1.4;
    text-wrap: balance;
}

.hero-intro {
    max-width: 56ch;
    margin-top: 18px;
    color: var(--muted);
    font-size: 16.5px;
    line-height: 1.7;
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    gap: 14px clamp(22px, 3vw, 40px);
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.hero-stats dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.hero-stats dd {
    color: var(--ink);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

/* Anello */

.ring {
    position: relative;
    width: 100%;
    max-width: 560px;
    justify-self: center;
}

.ring-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.ring-track {
    fill: none;
    stroke: var(--c);
    stroke-opacity: .16;
    stroke-width: 1;
}

.ring-month {
    stroke: var(--line);
    stroke-width: .8;
}

.ring-label-link {
    cursor: pointer;
}

.ring-label {
    fill: var(--muted);
    font-family: var(--sans);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-anchor: middle;
    dominant-baseline: central;
    transition: fill .2s;
}

.ring-label-link:hover .ring-label,
.ring-label-link:focus-visible .ring-label {
    fill: var(--accent-text);
}

.ring-progress {
    fill: none;
    stroke: var(--accent-strong);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-dasharray: var(--p) 100;
    transform: rotate(-90deg);
    opacity: .85;
}

.ring-today line {
    stroke: var(--accent-strong);
    stroke-width: 1;
    stroke-dasharray: 2 3;
}

.ring-today circle {
    fill: var(--accent-strong);
}

.ring-dot {
    fill: var(--c);
    stroke: var(--bg);
    stroke-width: 1.2;
    cursor: pointer;
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity .3s, transform .25s var(--ease), fill .3s;
}

.ring-dot.is-key {
    stroke: var(--ink);
    stroke-width: 1.4;
}

.ring-dot:hover,
.ring-dot.is-hover {
    transform: scale(1.5);
}

.ring-dot.is-off {
    opacity: .12;
}

.ring-center-year {
    fill: var(--ink);
    font-family: var(--sans);
    font-size: 46px;
    font-weight: 700;
    letter-spacing: -.04em;
    text-anchor: middle;
    font-variant-numeric: tabular-nums;
}

.ring-center-label {
    fill: var(--muted);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    text-anchor: middle;
}

html.js .ring-dot {
    opacity: 0;
    transform: scale(0);
}

html.js.is-ready .ring-dot {
    opacity: 1;
    transform: none;
    transition: opacity .5s var(--d, 0ms), transform .6s cubic-bezier(.3, 1.5, .5, 1) var(--d, 0ms), fill .3s;
}

html.js.is-ready .ring-dot.is-off {
    opacity: .12;
}

html.js.is-ready .ring-dot:hover,
html.js.is-ready .ring-dot.is-hover {
    transform: scale(1.5);
    transition-delay: 0ms;
}

html.js .ring-progress {
    stroke-dasharray: 0 100;
}

html.js.is-ready .ring-progress {
    stroke-dasharray: var(--p) 100;
    transition: stroke-dasharray 2.4s var(--ease) .2s;
}

.ring-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.ring-legend a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}

.ring-legend a:hover {
    color: var(--ink);
}

.ring-legend span,
.ring-legend a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ring-legend i,
.cat i,
.chip i,
.moment-cat i,
.heat-cat i,
.tip-meta i {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
}

/* Momenti chiave */

.moments {
    padding: clamp(48px, 6vw, 80px) 0 clamp(40px, 5vw, 64px);
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.moments-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-title {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 600;
    letter-spacing: -.02em;
}

.moments-nav {
    display: flex;
    gap: 8px;
}

.moments-track {
    --edge: max(var(--gutter), calc((100vw - var(--wide)) / 2));
    display: grid;
    grid-auto-columns: minmax(260px, 300px);
    grid-auto-flow: column;
    gap: 16px;
    margin-top: 28px;
    padding: 6px var(--edge) 22px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--edge);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.moments-track::-webkit-scrollbar {
    display: none;
}

.moment {
    scroll-snap-align: start;
}

.moment a {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    padding: 26px 24px 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
    isolation: isolate;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}

.moment a::before {
    content: '';
    position: absolute;
    inset: auto -30% -55% auto;
    z-index: -1;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--c);
    opacity: .14;
    transition: transform .6s var(--ease), opacity .4s;
}

.moment a::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--c);
    transform-origin: left;
    transform: scaleX(.18);
    transition: transform .5s var(--ease);
}

.moment a:hover::after {
    transform: none;
}

.moment a:hover {
    border-color: color-mix(in srgb, var(--c) 45%, var(--line));
    box-shadow: var(--shadow-lift);
    transform: translateY(-4px);
}

.moment a:hover::before {
    opacity: .24;
    transform: scale(1.25);
}

.moment-when {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.moment-title {
    margin-top: 10px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.01em;
    text-wrap: balance;
}

.moment-summary {
    display: -webkit-box;
    margin-top: 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.moment-cat {
    display: inline-flex;
    margin-top: auto;
    padding-top: 20px;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

/* Rail */

.rail {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    transition: box-shadow .3s;
}

.rail.is-stuck {
    box-shadow: 0 14px 30px -26px rgba(9, 20, 52, .5);
}

.rail-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 66px;
}

.rail-months {
    position: relative;
    display: grid;
    flex: 1;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    min-width: 0;
    scrollbar-width: none;
}

.rail-months::-webkit-scrollbar {
    display: none;
}

.rail-month {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 4px 12px 0;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: color .2s, opacity .3s;
}

.rail-month:hover {
    color: var(--ink);
}

.rail-month.is-active {
    color: var(--ink);
    font-weight: 600;
}

.rail-month.is-empty {
    opacity: .35;
}

.rail-long {
    display: none;
}

.rail-dots {
    position: relative;
    display: block;
    height: 12px;
    margin-right: 6px;
    border-radius: 6px;
    background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}

.rail-dot {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--c);
    transition: opacity .3s, transform .2s var(--ease);
}

.rail-dot.is-key {
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    box-shadow: 0 0 0 1.5px var(--bg), 0 0 0 2.5px var(--c);
}

.rail-dot.is-hover {
    transform: scale(1.6);
}

.rail-dot.is-off {
    opacity: .12;
}

.rail-cursor {
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 2px;
    height: 24px;
    margin-left: -1px;
    border-radius: 2px;
    background: var(--accent-strong);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s var(--ease), opacity .3s;
}

.rail-cursor::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-strong);
}

.rail-tools {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 8px 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    cursor: text;
    transition: border-color .2s, box-shadow .2s;
}

.search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.search svg {
    flex: none;
    width: 15px;
    height: 15px;
}

.search input {
    width: 150px;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    color: var(--ink);
    font-size: 14px;
}

.search input::placeholder {
    color: var(--muted);
}

.search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search:focus-within kbd {
    opacity: 0;
}

.tool {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 15px 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    transition: border-color .2s, background-color .2s;
}

.tool svg {
    width: 15px;
    height: 15px;
}

.tool:hover,
.tool[aria-expanded='true'] {
    border-color: var(--accent);
}

.tool[aria-expanded='true'] {
    background: var(--accent-soft);
}

.tool-badge {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #091434;
    font-size: 11.5px;
    font-weight: 700;
}

.filters {
    border-top: 1px solid var(--line-soft);
    background: var(--bg);
    animation: drop .3s var(--ease);
}

@keyframes drop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.filters-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
    padding-bottom: 18px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 8px 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
}

.chip b {
    min-width: 22px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.chip:hover {
    border-color: var(--c);
}

.chip[aria-pressed='true'] {
    border-color: var(--c);
    background: color-mix(in srgb, var(--c) 16%, var(--surface));
}

.chip[aria-pressed='true'] b {
    background: var(--c);
    color: #fff;
}

.chip.is-zero {
    opacity: .45;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.switch input {
    position: relative;
    flex: none;
    width: 40px;
    height: 23px;
    margin: 0;
    border-radius: 999px;
    background: var(--line);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color .25s;
}

.switch input::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(9, 20, 52, .2);
    transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}

.switch input:checked {
    background: var(--accent);
}

.switch input:checked::after {
    transform: translateX(17px);
}

.filters-count {
    color: var(--muted);
    font-size: 14px;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.link-btn:hover {
    color: var(--accent-text);
}

/* Timeline */

.timeline {
    min-height: calc(100svh - var(--header-h) - var(--rail-h, 0px));
    padding-top: 8px;
    padding-bottom: 40px;
}

.month {
    display: grid;
    grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    padding: clamp(48px, 6vw, 80px) 0;
}

.month + .month {
    border-top: 1px solid var(--line);
}

.month-sticky {
    position: sticky;
    top: calc(var(--header-h) + var(--rail-h) + 28px);
}

.month-name {
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(40px, 4.4vw, 56px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.025em;
}

.month-summary {
    margin-top: 16px;
    color: var(--text);
    font-family: var(--serif);
    font-size: 16.5px;
    line-height: 1.6;
    text-wrap: pretty;
}

.month-count {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
}

.month-page {
    display: block;
    width: fit-content;
    margin-top: 4px;
    color: var(--accent-text);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s;
}

.month-page:hover {
    text-decoration-color: var(--accent);
}

.month-count span {
    color: var(--accent-text);
    font-weight: 700;
}

.month-blog {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.month-blog-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.month-blog ul {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.month-blog li {
    display: grid;
    gap: 2px;
}

.month-blog a {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
    transition: background-size .3s var(--ease), color .2s;
}

.month-blog a:hover {
    color: var(--accent-text);
    background-size: 100% 2px;
}

.month-blog time {
    color: var(--muted);
    font-size: 12px;
}

.events {
    position: relative;
    display: grid;
    gap: 18px;
    padding-left: 68px;
}

.events::before {
    content: '';
    position: absolute;
    top: 30px;
    bottom: 30px;
    left: 21px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(var(--line), var(--line) 85%, transparent);
}

.ev {
    position: relative;
    scroll-margin-top: calc(var(--header-h) + var(--rail-h) + 20px);
}

.ev-pin {
    position: absolute;
    top: 20px;
    left: -68px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
}

.ev-pin span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 2px solid var(--c);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: transform .3s var(--ease);
}

.ev-pin.is-month span {
    border-style: dashed;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.ev.is-key .ev-pin span {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--c);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px color-mix(in srgb, var(--c) 40%, transparent);
}

.ev:hover .ev-pin span {
    transform: scale(1.08);
}

.ev-card {
    position: relative;
    padding: 22px 24px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    outline: 0;
    transition: border-color .3s, box-shadow .3s var(--ease), transform .3s var(--ease);
}

.ev:hover .ev-card {
    border-color: color-mix(in srgb, var(--c) 40%, var(--line));
    box-shadow: var(--shadow);
}

.ev.is-key .ev-card {
    padding: 28px 30px 22px;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--c) 35%, var(--line));
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 60%),
        var(--surface);
}

.ev.is-key .ev-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--c);
}

.ev-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}

.ev-key {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 600;
}

.ev-title {
    margin-top: 10px;
    font-size: 20px;
    line-height: 1.3;
    text-wrap: balance;
}

.ev-title-link {
    color: inherit;
    text-decoration: none;
    background: linear-gradient(var(--c, var(--accent)), var(--c, var(--accent))) 0 100% / 0 2px no-repeat;
    transition: background-size .35s var(--ease);
}

.ev-title-link:hover {
    background-size: 100% 2px;
}

.ev.is-key .ev-title {
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.2;
    letter-spacing: -.02em;
}

.ev-summary {
    margin-top: 10px;
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.65;
    text-wrap: pretty;
}

.ev.is-key .ev-summary {
    font-size: 16.5px;
}

.ev-body {
    margin-top: 12px;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 15.5px;
    line-height: 1.7;
    text-wrap: pretty;
}

.ev-article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 14px;
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
    transition: border-color .2s, background-color .2s;
}

.ev-article:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 50%, var(--bg));
}

.ev-article-label {
    grid-column: 1;
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 600;
}

.ev-article-title {
    grid-column: 1;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
}

.ev-article svg {
    grid-row: 1 / span 2;
    grid-column: 2;
    width: 18px;
    height: 18px;
    color: var(--accent-text);
    transition: transform .25s var(--ease);
}

.ev-article:hover svg {
    transform: translateX(3px);
}

.ev-foot {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.ev-foot:empty {
    display: none;
}

.ev-actors {
    color: var(--muted);
    font-size: 13px;
}

.ev-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.term {
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.term:hover {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.ev-sources {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    color: var(--muted);
    font-size: 12.5px;
}

.ev-sources-label {
    margin-right: 2px;
    color: var(--ink);
    font-weight: 600;
}

.ev-sources a {
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 3px;
    transition: color .2s, text-decoration-color .2s;
}

.ev-sources a:hover {
    color: var(--ink);
    text-decoration-color: var(--accent);
}

.ev-source-note {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent);
    color: var(--ink);
    font-size: 11.5px;
    font-style: normal;
    font-weight: 500;
    white-space: nowrap;
}

.ev-verify {
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.ev-verify .ev-sources-label {
    margin-right: 8px;
}

.ev-sources .sep {
    opacity: .5;
}

.ev-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 14px -10px 0;
}

.ev-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    transition: background-color .2s, color .2s;
}

.ev-action svg {
    width: 14px;
    height: 14px;
}

.ev-action:hover {
    background: var(--surface-2);
    color: var(--ink);
}

@media (hover: hover) {
    .ev-actions {
        opacity: 0;
        transition: opacity .25s;
    }
}

@media (hover: hover) and (min-width: 961px) {
    .ev-actions {
        position: absolute;
        top: 14px;
        right: 16px;
        margin: 0;
    }
}

@media (hover: hover) {

    .ev:hover .ev-actions,
    .ev:focus-within .ev-actions {
        opacity: 1;
    }
}

.ev.is-flash .ev-card {
    animation: flash 1.6s var(--ease);
}

@keyframes flash {
    0%,
    30% {
        border-color: var(--c);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 28%, transparent), var(--shadow-lift);
    }
}

html.js .ev,
html.js .month-head,
html.js .figure,
html.js .heat-row:not(.heat-head) {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

html.js .ev.in,
html.js .month-head.in,
html.js .figure.in,
html.js .heat-row.in {
    opacity: 1;
    transform: none;
}

html.js .figure:nth-child(2),
html.js .heat-row:nth-child(3n) {
    transition-delay: .08s;
}

html.js .figure:nth-child(3),
html.js .heat-row:nth-child(3n + 1) {
    transition-delay: .16s;
}

.empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 80px 20px 40px;
    color: var(--muted);
    text-align: center;
}

.empty-title {
    color: var(--ink);
    font-size: 22px;
    font-weight: 600;
}

.empty .btn {
    margin-top: 14px;
}

/* Bilancio */

.recap {
    padding: clamp(56px, 7vw, 96px) 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.recap-text {
    max-width: 760px;
    margin-top: 18px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.6;
    text-wrap: pretty;
}

.figures {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 14px;
    margin-top: 40px;
}

.figure {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}

.figure-value {
    color: var(--ink);
    font-size: clamp(32px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.03em;
}

.figure-label {
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.figure-source {
    margin-top: auto;
    padding-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.recap-sub {
    margin-top: 64px;
    font-size: 22px;
}

.recap-more {
    margin-top: 40px;
}

.heat {
    display: grid;
    gap: 5px;
    margin-top: 22px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.heat-row {
    display: grid;
    grid-template-columns: 180px repeat(12, minmax(36px, 1fr));
    gap: 5px;
    min-width: 680px;
}

.heat-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.heat-cat {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-right: 10px;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s;
}

a.heat-cat:hover {
    color: var(--accent-text);
}

.heat-cat b {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.heat-cell {
    position: relative;
    display: grid;
    place-items: center;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
    isolation: isolate;
    transition: transform .2s var(--ease), box-shadow .2s;
}

.heat-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--c);
    opacity: var(--a);
}

button.heat-cell:hover {
    z-index: 1;
    transform: scale(1.12);
    box-shadow: 0 8px 18px -8px rgba(9, 20, 52, .5);
}

.heat-cell.is-empty {
    background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.heat-cell.is-empty::before {
    display: none;
}

/* Footer */

.foot {
    padding: 48px 0 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.foot-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) auto auto;
    gap: 32px 56px;
}

.foot-title {
    color: var(--ink);
    font-size: 17px;
    font-weight: 600;
}

.foot-about p + p {
    margin-top: 6px;
}

.foot-about a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

.foot-note {
    max-width: 56ch;
    font-size: 13px;
}

.foot-links,
.foot-legal {
    display: grid;
    align-content: start;
    gap: 8px;
}

.foot-links a,
.foot-legal a,
.foot-legal button {
    justify-self: start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s;
}

.foot-links a:hover,
.foot-legal a:hover,
.foot-legal button:hover {
    color: var(--accent-text);
}

.foot-keys {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 36px;
    font-size: 12.5px;
}

/* Racconto */

.story {
    --c: var(--accent);
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    padding: 18px var(--gutter) calc(22px + env(safe-area-inset-bottom));
    background:
        radial-gradient(90% 70% at 85% 10%, color-mix(in srgb, var(--c) 34%, transparent), transparent 65%),
        radial-gradient(70% 60% at 0% 100%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%),
        var(--night);
    color: #D8D4CC;
    opacity: 0;
    transition: opacity .3s ease, background-color .5s;
}

.story.is-visible {
    opacity: 1;
}

.story-bar {
    display: flex;
    gap: 4px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.story-bar i {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(245, 239, 230, .18);
    transition: background-color .3s;
}

.story-bar i.is-done {
    background: #F5EFE6;
}

.story-bar.is-continuous {
    height: 3px;
    border-radius: 3px;
    background: rgba(245, 239, 230, .18);
    overflow: hidden;
}

.story-bar.is-continuous i {
    flex: none;
    width: 100%;
    background: #F5EFE6;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform .4s var(--ease);
}

.story-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 960px;
    margin: 14px auto 0;
}

.story-count {
    color: rgba(245, 239, 230, .7);
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.story .round {
    border-color: rgba(245, 239, 230, .2);
    background: rgba(245, 239, 230, .06);
    color: #F5EFE6;
}

.story .round:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent);
    color: #091434;
}

.story-stage {
    display: grid;
    align-items: center;
    width: 100%;
    max-width: 960px;
    min-height: 0;
    margin: 0 auto;
    overflow-y: auto;
    padding: 24px 0;
    position: relative;
}

.slide {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.slide-day {
    position: absolute;
    top: 50%;
    right: 0;
    color: color-mix(in srgb, var(--c) 26%, transparent);
    font-family: var(--serif);
    font-size: clamp(150px, 16vw, 240px);
    font-style: italic;
    line-height: 1;
    letter-spacing: -.04em;
    pointer-events: none;
    transform: translateY(-50%);
    animation: day-in .7s var(--ease);
}

@keyframes day-in {
    from {
        opacity: 0;
        transform: translateY(-46%);
    }
}

.story-year {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 22px;
}

.sy-track {
    position: relative;
    height: 34px;
    border-bottom: 1px solid rgba(245, 239, 230, .16);
}

.sy-month {
    position: absolute;
    top: 0;
    padding-left: 6px;
    border-left: 1px solid rgba(245, 239, 230, .14);
    color: rgba(245, 239, 230, .45);
    font-size: 11px;
    font-weight: 500;
    line-height: 34px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sy-dot {
    position: absolute;
    bottom: -4px;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--c) 55%, var(--night));
    transition: background-color .3s;
}

.sy-dot.is-past {
    background: var(--c);
}

.sy-now {
    position: absolute;
    bottom: -9px;
    width: 17px;
    height: 17px;
    margin-left: -8.5px;
    border: 2px solid #F5EFE6;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 25%, transparent);
    transition: left .5s var(--ease), background-color .3s;
}

@media (max-width: 1100px) {
    .slide-day {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slide-day,
    .sy-now {
        animation: none;
        transition: none;
    }
}

.slide.from-right {
    animation: slide-right .5s var(--ease);
}

.slide.from-left {
    animation: slide-left .5s var(--ease);
}

@keyframes slide-right {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
}

@keyframes slide-left {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
}

.slide-month {
    color: color-mix(in srgb, var(--c) 70%, #F5EFE6);
    font-family: var(--serif);
    font-size: clamp(22px, 2.6vw, 30px);
    font-style: italic;
    line-height: 1;
}

.slide-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin-top: 22px;
    color: rgba(245, 239, 230, .7);
    font-size: 14px;
    font-weight: 500;
}

.slide-meta .cat {
    color: #F5EFE6;
}

.slide-meta .ev-key {
    background: rgba(255, 146, 62, .18);
    color: #FFB37A;
}

.slide-title {
    margin-top: 14px;
    color: #F5EFE6;
    font-size: clamp(30px, 4.4vw, 54px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.025em;
    text-wrap: balance;
}

.slide-summary {
    margin-top: 20px;
    color: #F5EFE6;
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.6;
    text-wrap: pretty;
}

.slide-body {
    margin-top: 14px;
    color: rgba(245, 239, 230, .72);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.7;
    text-wrap: pretty;
}

.slide-actors {
    margin-top: 18px;
    color: rgba(245, 239, 230, .55);
    font-size: 14px;
}

.story .ev-article {
    max-width: 520px;
    margin-top: 24px;
    border-color: rgba(245, 239, 230, .18);
    background: rgba(245, 239, 230, .05);
    color: #F5EFE6;
}

.story .ev-article:hover {
    border-color: var(--accent);
    background: rgba(255, 146, 62, .1);
}

.story .ev-article-label,
.story .ev-article svg {
    color: #FFB37A;
}

.story-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.story-goto {
    border-color: rgba(245, 239, 230, .2);
    background: transparent;
    color: #F5EFE6;
}

.story-goto:hover {
    border-color: var(--accent);
}

/* Tooltip e toast */

.tip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    display: grid;
    gap: 3px;
    max-width: 280px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-lift);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
}

.tip.is-visible {
    opacity: 1;
}

.tip-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.tip-title {
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
}

.toast {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom));
    left: 50%;
    z-index: 95;
    padding: 11px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lift);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .25s, transform .3s var(--ease);
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Consenso */

.consent {
    --consent-shadow: 0 2px 6px rgba(9, 20, 52, .05), 0 30px 70px -28px rgba(9, 20, 52, .38);
    --consent-switch-off: #D9CCBA;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 70;
    width: 368px;
    max-width: calc(100vw - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--consent-shadow);
    color: var(--text);
    opacity: 0;
    transform: translateY(24px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
    .consent {
        --consent-shadow: 0 2px 6px rgba(0, 0, 0, .25), 0 30px 70px -24px rgba(0, 0, 0, .75);
        --consent-switch-off: #2E3B62;
    }
}

.consent.consent-visible {
    opacity: 1;
    transform: none;
}

.consent-view {
    animation: consent-view-in .35s ease;
}

@keyframes consent-view-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

.consent-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.consent-head-prefs {
    justify-content: space-between;
}

.consent-cookie {
    flex: none;
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 6px 8px rgba(201, 133, 60, .25));
}

.consent-visible .consent-cookie {
    animation: consent-cookie-in .9s cubic-bezier(.3, 1.6, .5, 1) .15s both;
}

@keyframes consent-cookie-in {
    from {
        opacity: 0;
        transform: rotate(-40deg) scale(.4);
    }
}

.consent-title {
    font-size: 19px;
    line-height: 1.25;
}

.consent-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    text-wrap: pretty;
}

.consent-link {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    white-space: nowrap;
    transition: color .2s;
}

.consent-link:hover {
    color: var(--accent-text);
}

.consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.consent-button {
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s, transform .2s, box-shadow .2s;
}

.consent-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -10px rgba(9, 20, 52, .45);
}

.consent-button:active {
    transform: scale(.98);
}

.consent-button-primary {
    background: var(--accent);
    color: #091434;
}

.consent-button-primary:hover {
    background: var(--accent-strong);
    box-shadow: 0 10px 22px -10px rgba(255, 132, 36, .7);
}

.consent-more {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 9px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.consent-more:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.consent-close {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    transition: background-color .25s, border-color .25s, color .25s, transform .25s;
}

.consent-close svg {
    width: 14px;
    height: 14px;
}

.consent-close:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #091434;
    transform: rotate(90deg);
}

.consent-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.consent-category {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg);
}

.consent-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.consent-category-name {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

label.consent-category-name {
    cursor: pointer;
}

.consent-always {
    color: var(--accent-text);
    font-size: 13px;
    font-weight: 500;
}

.consent-category p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.consent code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--ink);
    font-family: var(--mono);
    font-size: .9em;
    white-space: nowrap;
}

.consent-switch {
    position: relative;
    flex: none;
    width: 46px;
    height: 26px;
    margin: 0;
    border-radius: 999px;
    background: var(--consent-switch-off);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color .25s;
}

.consent-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(9, 20, 52, .2);
    transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}

.consent-switch:checked {
    background: var(--accent);
}

.consent-switch:checked::after {
    transform: translateX(20px);
}

.consent-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

#consent-record {
    font-size: 12px;
    opacity: .85;
}

/* Responsive */

@media (max-width: 960px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .ring {
        max-width: 520px;
    }

    .top-nav .hide-lg {
        display: none;
    }

    .figures {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .month {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .month-head,
    .month-sticky {
        display: contents;
    }

    .events {
        order: 1;
        margin-top: 28px;
    }

    .month-blog {
        order: 2;
        margin-top: 28px;
    }

    .month-name {
        font-size: 44px;
    }

    .rail-inner {
        gap: 12px;
    }

    .rail-months {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .rail-month {
        flex: none;
        width: 74px;
        scroll-snap-align: center;
    }

    .search {
        padding: 0 12px;
    }

    .search input {
        width: 0;
        transition: width .3s var(--ease);
    }

    .search:focus-within input,
    .search input:not(:placeholder-shown) {
        width: 120px;
    }

    .search kbd {
        display: none;
    }

    .tool span {
        display: none;
    }

    .tool {
        padding: 0 12px;
    }

    .foot-inner {
        grid-template-columns: 1fr 1fr;
    }

    .foot-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    :root {
        --header-h: 60px;
    }

    .figures {
        grid-template-columns: minmax(0, 1fr);
    }

    .heat {
        gap: 4px;
        overflow: visible;
    }

    .heat-row {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 3px;
        min-width: 0;
    }

    .heat-row:not(.heat-head) + .heat-row {
        margin-top: 10px;
    }

    .heat-head {
        position: sticky;
        top: var(--header-h);
        z-index: 2;
        padding: 8px 0;
        background: var(--surface);
        font-size: 10px;
    }

    .heat-head > span:first-child {
        display: none;
    }

    .heat-cat {
        grid-column: 1 / -1;
        padding: 0 0 4px;
        font-size: 13px;
    }

    .heat-cat b {
        margin-left: 0;
    }

    .heat-cell {
        height: 30px;
        border-radius: 6px;
        font-size: 11px;
    }

    .top-inner {
        min-height: 60px;
    }

    .wordmark-name {
        font-size: 16px;
    }

    .wordmark-label {
        font-size: 14px;
    }

    .top-nav {
        font-size: 14px;
    }

    .top-nav a {
        padding: 7px 10px;
    }

    .top-nav .hide-md {
        display: none;
    }

    .hero-stats {
        grid-template-columns: repeat(2, auto);
    }

    .hero-actions .btn {
        flex: 1 1 auto;
    }

    .moments-head .moments-nav {
        display: none;
    }

    .moments-track {
        grid-auto-columns: 78vw;
    }

    .events {
        padding-left: 0;
    }

    .events::before {
        display: none;
    }

    .ev-pin {
        display: none;
    }

    .ev-card,
    .ev.is-key .ev-card {
        padding: 20px 20px 14px;
    }

    .ev-card {
        border-left: 3px solid var(--c);
    }

    .ev.is-key .ev-card {
        border-left-width: 1px;
    }

    .story-nav {
        gap: 8px;
    }

    .sy-month {
        padding-left: 4px;
        font-size: 9.5px;
        letter-spacing: .02em;
    }

    .story-goto {
        padding: 0 16px;
        font-size: 14px;
    }

    .consent {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 24px);
        padding: 20px 18px 16px;
        border-radius: 22px;
        transform-origin: bottom center;
    }

    .consent-cookie {
        width: 38px;
        height: 38px;
    }

    .consent-title {
        font-size: 18px;
    }

    .consent-text {
        font-size: 13.5px;
    }

    .consent-actions {
        margin-top: 16px;
    }
}

@media (max-width: 520px) {
    .top-nav .hide-sm {
        display: none;
    }
}

@media (max-width: 420px) {
    .wordmark-label {
        display: none;
    }
}

@media (hover: none) {
    .foot-keys {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    html.js .ev,
    html.js .month-head,
    html.js .figure,
    html.js .heat-row:not(.heat-head),
    html.js .ring-dot {
        opacity: 1;
        transform: none;
    }

    html.js .ring-progress {
        stroke-dasharray: var(--p) 100;
    }
}

@media print {
    .top,
    .rail,
    .moments,
    .story,
    .tip,
    .toast,
    .consent,
    .ev-actions {
        display: none !important;
    }

    html.js .ev,
    html.js .month-head {
        opacity: 1;
        transform: none;
    }
}
