.history-page {
    background: var(--paper);
    padding-bottom: 120px;
}

.history-hero {
    padding-bottom: 80px;
    padding-top: 110px;
}

.history-eyebrow,
.history-kicker,
.history-card-label {
    color: var(--mint-dark);
    font-family: "DM Sans", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.history-eyebrow {
    margin-bottom: 24px;
}

.history-hero h1 {
    font-size: clamp(3rem, 7vw, 6.3rem);
    font-weight: 800;
    letter-spacing: -0.075em;
    line-height: 1.02;
    margin: 0 0 30px;
    max-width: 940px;
}

.history-hero h1 em {
    color: var(--mint-dark);
    font-style: normal;
}

.history-hero > p:last-child {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.85;
    margin: 0;
    max-width: 650px;
}

.history-content {
    border-top: 1px solid var(--line);
    padding-top: 54px;
}

.history-intro {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
}

.history-kicker,
.history-basis {
    margin-bottom: 12px;
}

.history-intro h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    letter-spacing: -0.06em;
    margin: 0;
}

.history-basis {
    color: var(--muted);
    font-size: 0.8rem;
}

.history-tools {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
}

.history-sort {
    background: #edf1f7;
    border-radius: 999px;
    display: inline-flex;
    gap: 2px;
    padding: 4px;
}

.history-sort-button {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 13px;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.history-sort-button.is-active {
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
    color: var(--ink);
}

.history-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.history-timeline::before {
    background: var(--line);
    bottom: 26px;
    content: "";
    left: 14px;
    position: absolute;
    top: 26px;
    width: 1px;
}

.history-item {
    position: relative;
}

.history-item-link {
    align-items: center;
    color: inherit;
    display: grid;
    gap: 10px;
    grid-template-columns: 28px 58px 48px minmax(0, 680px);
    position: relative;
    z-index: 1;
}

.history-item:not(:last-child) {
    padding-bottom: 22px;
}

.history-marker {
    align-self: center;
    background: var(--mint);
    border: 4px solid var(--paper);
    border-radius: 50%;
    height: 16px;
    justify-self: center;
    margin-top: 0;
    position: relative;
    width: 16px;
    z-index: 2;
}

.history-date {
    display: contents;
}

.history-date > span {
    align-self: center;
    color: var(--muted);
    font-family: "DM Sans", sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    grid-column: 2;
    line-height: 1.15;
    text-align: right;
}

.history-date > strong {
    align-self: center;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    grid-column: 3;
    line-height: 1.15;
    white-space: nowrap;
}

.history-date .is-hidden {
    visibility: hidden;
}

.history-marker.is-hidden {
    visibility: hidden;
}

.history-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    min-height: 116px;
    padding: 20px 24px 20px 20px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.history-item-link:hover .history-card,
.history-item-link:focus-visible .history-card {
    border-color: #bcc7d9;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.history-card-main {
    align-items: center;
    display: flex;
    gap: 18px;
    min-width: 0;
}

.history-card-main > div {
    min-width: 0;
}

.history-card-main img {
    border-radius: 17px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    flex: 0 0 68px;
    height: 68px;
    object-fit: cover;
    width: 68px;
}

.history-card-label {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    margin: 0 0 6px;
}

.history-card h3 {
    font-size: 1.08rem;
    letter-spacing: -0.04em;
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.history-card-subtitle {
    color: var(--muted);
    font-size: 0.78rem;
    margin: 3px 0 0;
}

.history-card-link {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
}

.history-card-link span {
    display: inline-block;
    margin-left: 5px;
    transition: transform 180ms ease;
}

.history-card-link:hover span {
    transform: translate(3px, -3px);
}

@media (max-width: 620px) {
    .history-page { padding-bottom: 80px; }
    .history-hero { padding-bottom: 56px; padding-top: 72px; }
    .history-intro { align-items: flex-start; flex-direction: column; margin-bottom: 34px; }
    .history-tools { align-items: flex-start; margin-top: 16px; }
    .history-basis { margin-bottom: 12px; }
    .history-timeline::before { left: 11px; }
    .history-item-link { gap: 5px; grid-template-columns: 22px 46px 32px minmax(0, 1fr); }
    .history-date > strong { font-size: 0.96rem; }
    .history-date > span { font-size: 0.62rem; }
    .history-card { align-items: flex-start; flex-direction: column; gap: 14px; padding: 16px; }
    .history-card-main { gap: 13px; }
    .history-card-main img { flex-basis: 56px; height: 56px; width: 56px; }
    .history-card-link { border-top: 1px solid var(--line); padding-top: 12px; width: 100%; }
}
