/* =========================================================================
   ONHYM History — Interactive Timeline
   Premium teal / gold design matching brand guidelines.
   ========================================================================= */

.onhym-history {
    --ohh-teal:        #0e3b2e;
    --ohh-teal-dark:   #07261c;
    --ohh-teal-soft:   #15533f;
    --ohh-gold:        #c9a24a;
    --ohh-gold-soft:   #e7c984;
    --ohh-gold-tint:   #f1e4c4;
    --ohh-bg:          #f6f4ee;
    --ohh-card-bg:     #ffffff;
    --ohh-text:        #1d2b25;
    --ohh-text-soft:   #4a5a52;
    --ohh-text-mute:   #8a948f;
    --ohh-line:        #d9d4c5;
    --ohh-line-soft:   #ece7d6;
    --ohh-radius:      28px;
    --ohh-radius-pill: 999px;
    --ohh-shadow:      0 25px 60px rgba(0, 0, 0, .10), 0 8px 20px rgba(0, 0, 0, .06);
    --ohh-trans:       .35s cubic-bezier(.22, 1, .36, 1);

    position: relative;
    background: transparent;
    color: var(--ohh-text);
    padding: clamp(48px, 8vw, 110px) 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

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

.onhym-history__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
}

/* ── HEADER ─────────────────────────────────────────────────────────────── */

.onhym-history__header {
    text-align: center;
    margin-bottom: clamp(28px, 5vw, 56px);
}

.onhym-history__eyebrow {
    display: inline-block;
    padding: 8px 22px;
    border: 1.5px solid var(--ohh-gold);
    color: var(--ohh-gold);
    border-radius: var(--ohh-radius-pill);
    font-size: 12px;
    letter-spacing: .22em;
    font-weight: 700;
    margin-bottom: 22px;
    text-transform: uppercase;
    background: rgba(201, 162, 74, .06);
}

.onhym-history__title {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    margin: 0 0 36px;
    color: var(--ohh-teal);
    font-weight: 800;
    letter-spacing: -.02em;
}

.onhym-history__title-accent {
    color: var(--ohh-gold);
    font-style: italic;
    font-weight: 700;
    margin-left: .25em;
    position: relative;
    display: inline-block;
}

.onhym-history__title-accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 6px;
    background: var(--ohh-gold);
    border-radius: 6px;
    opacity: .35;
}

/* ── TABS ───────────────────────────────────────────────────────────────── */

.onhym-history__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 14px;
}

.onhym-history__tab {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 16px 28px;
    border-radius: 16px;
    background: #e9edee;
    border: none;
    color: var(--ohh-teal);
    font-size: 14px;
    letter-spacing: .04em;
    cursor: pointer;
    transition: var(--ohh-trans);
    min-width: 140px;
    box-shadow: none;
}

.onhym-history__tab:hover {
    background: #d8dee0;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -6px rgba(14,59,46,.18);
}

.onhym-history__tab.is-active {
    background: var(--ohh-teal);
    border: none;
    color: #fff;
    box-shadow: 0 14px 30px -12px rgba(14, 59, 46, .55);
}

/* Prefix: gold uppercase small label (e.g. ONHYM, HYDROCARBONS, MINERALS) */
.onhym-history__tab-prefix {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--ohh-gold);
    text-transform: uppercase;
    line-height: 1;
}
.onhym-history__tab.is-active .onhym-history__tab-prefix {
    color: var(--ohh-gold-soft);
}

/* Suffix: bold larger text below prefix (e.g. Institution, Exploration) */
.onhym-history__tab-suffix {
    font-size: 15px;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--ohh-teal);
    line-height: 1.2;
    letter-spacing: .01em;
}
.onhym-history__tab.is-active .onhym-history__tab-suffix {
    color: #fff;
}

/* ── INTRO ──────────────────────────────────────────────────────────────── */

.onhym-history__intro {
    max-width: 760px;
    margin: 0 auto clamp(36px, 6vw, 64px);
    text-align: center;
}

.onhym-history__subtitle {
    display: inline-block;
    padding: 6px 18px;
    border-radius: var(--ohh-radius-pill);
    background: rgba(201, 162, 74, .14);
    color: var(--ohh-gold);
    font-size: 11px;
    letter-spacing: .26em;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.onhym-history__legacy {
    font-size: clamp(26px, 3.4vw, 40px);
    margin: 0 0 16px;
    color: var(--ohh-teal);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
}

.onhym-history__legacy-accent {
    color: var(--ohh-gold);
    font-style: italic;
}

.onhym-history__lead {
    color: var(--ohh-text-soft);
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

/* ── STAGE / SCENE ──────────────────────────────────────────────────────── */

.onhym-history__stage {
    position: relative;
}

.onhym-history__scene {
    position: relative;
    border-radius: var(--ohh-radius);
    overflow: hidden;
    min-height: 540px;
    box-shadow: var(--ohh-shadow);
    background: var(--ohh-teal-dark);
}

/* Split layout: card 32% | image 68% */
.onhym-history__scene--split {
    display: grid;
    grid-template-columns: 32% 68%;
    background: var(--ohh-card-bg);
    align-items: stretch;
}

.onhym-history__media {
    position: relative;
    overflow: hidden;
    /* fill the full column height — no beige gap */
    height: 100%;
    min-height: 540px;
    background: linear-gradient(135deg, #f1ead8 0%, #e7dec0 100%);
}

/* Subtle placeholder ornament shown when no image is set */
.onhym-history__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(201, 162, 74, .12), transparent 55%),
        radial-gradient(circle at 70% 80%, rgba(14, 59, 46, .08), transparent 55%);
    pointer-events: none;
    z-index: 1;
}

.onhym-history__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 2;
    /* transition matches the 350ms global var + slow Ken-Burns */
    transition: opacity var(--ohh-trans), transform 1.4s cubic-bezier(.4, 0, .2, 1);
    transform: scale(1.06);
}

/* Settled state after load / render */
.onhym-history__media.is-loaded .onhym-history__bg-img {
    transform: scale(1);
}

.onhym-history__bg-img[hidden] {
    display: none;
}

/* Hide media column entirely when no image and let card take 100% width */
.onhym-history__scene--split:has(.onhym-history__bg-img[hidden]) {
    grid-template-columns: 1fr;
}
.onhym-history__scene--split:has(.onhym-history__bg-img[hidden]) .onhym-history__media {
    display: none;
}

.onhym-history__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: transparent;
    z-index: 2;
    transition: opacity var(--ohh-trans), transform 1.2s ease;
    transform: scale(1.04);
}

.onhym-history__bg.is-changing,
.onhym-history__media.is-changing .onhym-history__bg-img { opacity: 0; }

.onhym-history__bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        /* left-edge vignette so text remains readable */
        linear-gradient(90deg, rgba(7, 38, 28, .18) 0%, rgba(7, 38, 28, 0) 30%),
        /* bottom gradient for caption legibility */
        linear-gradient(to top, rgba(0, 0, 0, .30) 0%, rgba(0, 0, 0, 0) 45%);
}

/* ── CONTENT CARD ──────────────────────────────────────────────────────── */

.onhym-history__card {
    position: relative;
    padding: 48px 40px !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 6px;
    transition: opacity var(--ohh-trans), transform var(--ohh-trans);
    z-index: 2;
    min-width: 0;
    box-sizing: border-box !important;
    /* Reset any theme interference */
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    float: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif !important;
    color: #1d2b25 !important;
}

.onhym-history__card.is-changing {
    opacity: 0;
    transform: translateY(14px);
}

.onhym-history__card-icon {
    width: 54px !important;
    height: 54px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #c9a24a, #e7c984) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 14px 28px -10px rgba(201, 162, 74, .65) !important;
}

.onhym-history__card-icon svg { width: 26px; height: 26px; }
.onhym-history__card-icon .dashicons { font-size: 26px; width: 26px; height: 26px; }

.onhym-history__card-year {
    display: block !important;
    font-size: clamp(64px, 7vw, 96px) !important;
    font-weight: 800 !important;
    color: #0e3b2e !important;
    line-height: 1 !important;
    letter-spacing: -.03em !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    transition: opacity var(--ohh-trans), transform var(--ohh-trans);
}

.onhym-history__card-title {
    display: block !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0e3b2e !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    transition: opacity var(--ohh-trans), transform var(--ohh-trans);
}

.onhym-history__card-desc {
    display: block !important;
    color: #4a5a52 !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    font-weight: 400 !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    max-width: 90%;
    max-height: 15em;
    overflow-y: auto;
    padding: 0 4px 0 0 !important;
    margin: 0 !important;
    text-align: center !important;
    border: none !important;
    background: none !important;
    transition: opacity var(--ohh-trans), transform var(--ohh-trans);
}

/* Subtle scrollbar */
.onhym-history__card-desc::-webkit-scrollbar { width: 4px; }
.onhym-history__card-desc::-webkit-scrollbar-thumb { background: rgba(14, 59, 46, .15); border-radius: 4px; }

.onhym-history__card-desc p { margin: 0 0 8px; }
.onhym-history__card-desc p:last-child { margin-bottom: 0; }
.onhym-history__card-desc ul { list-style: none; margin: 0; padding: 0; }
.onhym-history__card-desc ul li { margin: 0 0 6px; padding: 0; }
.onhym-history__card-desc ul li:last-child { margin-bottom: 0; }

.onhym-history__card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 22px;
    background: var(--ohh-teal);
    color: #fff !important;
    border-radius: var(--ohh-radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .04em;
    transition: var(--ohh-trans);
}

.onhym-history__card-cta:hover {
    background: var(--ohh-gold);
    transform: translateY(-2px);
}

.onhym-history__card-cta[hidden],
.onhym-history__card-cta.is-hidden { display: none; }

/* =========================================================================
   ONHYM HISTORY — Standalone Timeline Component
   Namespace : .onhym-history-*  (single-hyphen, fully isolated)
   Zero inheritance. Every property is explicit. No theme vars.
   ========================================================================= */

/* ── Box-sizing reset scoped to this component ──────────────────────────── */
.onhym-history-timeline,
.onhym-history-timeline *,
.onhym-history-timeline *::before,
.onhym-history-timeline *::after { box-sizing: border-box; }

/* ── Component shell ─────────────────────────────────────────────────────── */
.onhym-history-timeline {
    /* Own design tokens — NOT from theme */
    --tl-teal:       #0e3b2e;
    --tl-gold:       #c9a24a;
    --tl-gray:       #d8d2c5;
    --tl-gray-text:  #8a9490;
    --tl-text-dark:  #1d2b25;
    --tl-white:      #ffffff;
    --tl-line-h:     4px;
    --tl-dot:        16px;
    --tl-dot-active: 24px;
    /* JS-controlled vars */
    --tl-count:      1;
    --tl-p:          0;
    /* Item width — fixed per dot so track can scroll */
    --tl-item-w:     56px;

    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: start;
    gap: 20px;
    margin-top: 56px;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Track wrapper ───────────────────────────────────────────────────────── */
.onhym-history-track {
    position: relative;
    padding: 60px 0 24px;
    overflow: visible;   /* default: items spread full width, no scroll needed */
}

/* ── Base line & progress line — DEFAULT (few items, stretch mode) ────────── */
.onhym-history-track-base,
.onhym-history-progress {
    position: absolute;
    top: calc(60px + (var(--tl-dot-active) - var(--tl-line-h)) / 2);
    height: var(--tl-line-h);
    border-radius: 999px;
    pointer-events: none;
}

.onhym-history-track-base {
    left:  calc(50% / var(--tl-count));
    right: calc(50% / var(--tl-count));
    background: #d8d2c5;
}

.onhym-history-progress {
    left:  calc(50% / var(--tl-count));
    width: calc((100% - 100% / var(--tl-count)) * var(--tl-p));
    right: auto;
    background: linear-gradient(90deg, #0e3b2e 0%, #c9a24a 100%);
    transition: width 350ms cubic-bezier(.4, 0, .2, 1);
}

/* ── Items row ───────────────────────────────────────────────────────────── */
.onhym-history-items {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
}

/* ── Single item (div, not button) ──────────────────────────────────────── */
.onhym-history-item {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
    flex: 1 1 0;          /* default: spread evenly across full width */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
    color: inherit;
}

.onhym-history-item:focus-visible {
    outline: 2px solid #c9a24a;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ── Floating pill (active year label above dot) ─────────────────────────── */
.onhym-history-pill {
    display: block;
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #ffffff;
    color: #0e3b2e;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    padding: 8px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 24px -8px rgba(14,59,46,.30), 0 2px 8px -2px rgba(14,59,46,.15);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 280ms ease, transform 350ms cubic-bezier(.4,0,.2,1);
    z-index: 10;
}

.onhym-history-pill::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 1px;
    box-shadow: 2px 2px 4px -2px rgba(14,59,46,.12);
}

.onhym-history-item.is-active .onhym-history-pill {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Dot marker ──────────────────────────────────────────────────────────── */
.onhym-history-dot {
    display: block;
    width: var(--tl-dot);
    height: var(--tl-dot);
    border-radius: 50%;
    margin-top: 3px;
    background: #ffffff;
    border: 2px solid #d8d2c5;
    box-shadow: 0 2px 8px -4px rgba(14,59,46,.20);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    transition:
        width  320ms cubic-bezier(.4,0,.2,1),
        height 320ms cubic-bezier(.4,0,.2,1),
        border-color  320ms ease,
        border-width  320ms ease,
        background    320ms ease,
        box-shadow    320ms ease,
        transform     320ms ease;
}

/* ── Year label below dot ─────────────────────────────────────────────────── */
.onhym-history-year {
    display: block;
    margin-top: calc(var(--tl-dot-active) - var(--tl-dot) + 12px);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .01em;
    color: #8a9490;
    white-space: nowrap;
    transition: color 320ms ease, font-weight 320ms ease;
}

/* ── Hover ───────────────────────────────────────────────────────────────── */
.onhym-history-item:hover .onhym-history-dot {
    border-color: #c9a24a;
    transform: scale(1.15);
    box-shadow: 0 4px 14px -4px rgba(201,162,74,.40);
}
.onhym-history-item:hover .onhym-history-year { color: #1d2b25; }

/* ── Active ──────────────────────────────────────────────────────────────── */
.onhym-history-item.is-active .onhym-history-dot {
    width:  var(--tl-dot-active);
    height: var(--tl-dot-active);
    background: #c9a24a;
    border: 4px solid #0e3b2e;
    box-shadow:
        0 0 0 3px  rgba(201,162,74,.20),
        0 0 18px 4px rgba(201,162,74,.38),
        0 6px 20px -4px rgba(14,59,46,.35);
    animation: tl-dot-pulse 2.4s ease-out infinite;
}
.onhym-history-item.is-active .onhym-history-year {
    color: #0e3b2e;
    font-weight: 700;
    margin-top: 12px;
}

@keyframes tl-dot-pulse {
    0%   { box-shadow: 0 0 0 3px rgba(201,162,74,.20), 0 0 18px 4px rgba(201,162,74,.38), 0 6px 20px -4px rgba(14,59,46,.35); }
    50%  { box-shadow: 0 0 0 8px rgba(201,162,74,.06), 0 0 26px 6px rgba(201,162,74,.25), 0 6px 20px -4px rgba(14,59,46,.35); }
    100% { box-shadow: 0 0 0 3px rgba(201,162,74,.20), 0 0 18px 4px rgba(201,162,74,.38), 0 6px 20px -4px rgba(14,59,46,.35); }
}

/* ── Navigation arrows ───────────────────────────────────────────────────── */
.onhym-history-arrow {
    -webkit-appearance: none;
    appearance: none;
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width:  48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    color: #0e3b2e;
    cursor: pointer;
    box-shadow: 0 10px 28px -8px rgba(14,59,46,.28), 0 3px 8px -3px rgba(14,59,46,.14);
    transition: background 280ms ease, color 280ms ease, transform 280ms ease, box-shadow 280ms ease;
    /* vertical alignment: track padding-top 60 + dot-active/2 12 - button/2 24 = 48px */
    margin-top: 48px;
    flex-shrink: 0;
    outline: none;
}
.onhym-history-arrow svg { display: block; flex-shrink: 0; }

.onhym-history-arrow:hover {
    background: #c9a24a;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 14px 32px -8px rgba(201,162,74,.60), 0 4px 12px -4px rgba(201,162,74,.35);
}
.onhym-history-arrow:active  { transform: scale(.94); }
.onhym-history-arrow:focus-visible {
    outline: 2px solid #c9a24a;
    outline-offset: 3px;
}
.onhym-history-arrow:disabled,
.onhym-history-arrow[disabled] {
    opacity: .30;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 3px 8px -4px rgba(14,59,46,.12);
    pointer-events: none;
}

/* ── Dense mode — many items (>20): fixed-width items + horizontal scroll ─── */
.onhym-history-timeline.is-dense .onhym-history-track {
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.onhym-history-timeline.is-dense .onhym-history-track::-webkit-scrollbar { display: none; }

.onhym-history-timeline.is-dense .onhym-history-items {
    min-width: calc(var(--tl-count) * var(--tl-item-w));
}

.onhym-history-timeline.is-dense .onhym-history-item {
    flex: 0 0 var(--tl-item-w);
}

/* Dense: line/progress use pixel-based formulas */
.onhym-history-timeline.is-dense .onhym-history-track-base {
    left:  calc(var(--tl-item-w) / 2);
    width: calc((var(--tl-count) - 1) * var(--tl-item-w));
    right: auto;
}
.onhym-history-timeline.is-dense .onhym-history-progress {
    left:  calc(var(--tl-item-w) / 2);
    width: calc((var(--tl-count) - 1) * var(--tl-item-w) * var(--tl-p));
    right: auto;
}

/* Dense: hide year labels to prevent overlap; show only active/hovered */
.onhym-history-timeline.is-dense .onhym-history-year {
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}
.onhym-history-timeline.is-dense .onhym-history-item.is-active .onhym-history-year,
.onhym-history-timeline.is-dense .onhym-history-item:hover .onhym-history-year {
    opacity: 1;
    pointer-events: auto;
}

/* ── Responsive — tablet ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .onhym-history-timeline { gap: 12px; }
    .onhym-history-year     { font-size: 13px; }
}

/* ── Responsive — mobile timeline ───────────────────────────────────────── */
@media (max-width: 640px) {
    /* Keep arrows — just smaller */
    .onhym-history-timeline {
        grid-template-columns: 36px 1fr 36px;
        gap: 6px;
        margin-top: 24px;
    }
    .onhym-history-arrow {
        width:  36px !important;
        height: 36px !important;
        margin-top: 36px !important;
    }

    /* Track: always scrollable on mobile regardless of dense mode */
    .onhym-history-track {
        overflow-x: auto !important;
        overflow-y: visible !important;
        scroll-behavior: smooth !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch;
        padding: 52px 8px 16px !important;
    }
    .onhym-history-track::-webkit-scrollbar { display: none; }

    /* Items: fixed width so they don't collapse */
    .onhym-history-items {
        min-width: calc(var(--tl-count) * var(--tl-item-w)) !important;
    }
    .onhym-history-item {
        flex: 0 0 var(--tl-item-w) !important;
        scroll-snap-align: center;
    }

    /* Line/progress: pixel-based (same as dense mode) */
    .onhym-history-track-base {
        left:  calc(var(--tl-item-w) / 2) !important;
        width: calc((var(--tl-count) - 1) * var(--tl-item-w)) !important;
        right: auto !important;
    }
    .onhym-history-progress {
        left:  calc(var(--tl-item-w) / 2) !important;
        width: calc((var(--tl-count) - 1) * var(--tl-item-w) * var(--tl-p)) !important;
        right: auto !important;
    }

    /* Hide all year labels; show only active/hovered */
    .onhym-history-year {
        opacity: 0 !important;
        font-size: 11px;
        transition: opacity 200ms ease;
    }
    .onhym-history-item.is-active .onhym-history-year,
    .onhym-history-item:hover   .onhym-history-year {
        opacity: 1 !important;
    }

    .onhym-history-pill {
        font-size: 13px;
        padding: 6px 12px;
        top: -40px;
    }
}

/* ── EMPTY ──────────────────────────────────────────────────────────────── */

.onhym-history__empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: var(--ohh-radius);
    color: var(--ohh-text-soft);
    box-shadow: var(--ohh-shadow);
}

/* ── LOADING ────────────────────────────────────────────────────────────── */

.onhym-history.is-loading .onhym-history__scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 38, 28, .35);
    backdrop-filter: blur(4px);
    z-index: 5;
}

.onhym-history.is-loading .onhym-history__scene::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 38px; height: 38px;
    margin: -19px 0 0 -19px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: var(--ohh-gold);
    animation: ohh-spin .9s linear infinite;
    z-index: 6;
}

@keyframes ohh-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE — tablet ≤900px ────────────────────────────────────────── */
@media (max-width: 900px) {
    /* Scene: stack card on top, image below */
    .onhym-history__scene--split {
        grid-template-columns: 1fr;
        grid-template-rows: auto 220px;
    }
    .onhym-history__card  { order: 1; }
    .onhym-history__media { order: 2; min-height: 220px; height: 220px; }

    .onhym-history__card-year {
        font-size: clamp(48px, 10vw, 72px) !important;
    }

    /* Timeline */
    .onhym-history-timeline { gap: 12px; }
    .onhym-history-year     { font-size: 13px; }
}

/* ── RESPONSIVE — mobile ≤600px ─────────────────────────────────────────── */
@media (max-width: 600px) {

    /* ─ Outer padding ─ */
    .onhym-history {
        padding: 32px 0 !important;
    }
    .onhym-history__inner {
        padding: 0 16px;
    }

    /* ─ Header ─ */
    .onhym-history__title {
        font-size: clamp(24px, 7vw, 34px);
        margin-bottom: 20px;
    }
    .onhym-history__header {
        margin-bottom: 20px;
    }

    /* ─ Tabs: wrap, smaller, full-width on tiny screens ─ */
    .onhym-history__tabs {
        gap: 8px;
        justify-content: center;
    }
    .onhym-history__tab {
        padding: 10px 16px !important;
        min-width: unset !important;
        border-radius: 12px !important;
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 4px);
    }
    .onhym-history__tab-prefix {
        font-size: 10px !important;
        letter-spacing: .08em !important;
    }
    .onhym-history__tab-suffix {
        font-size: 13px !important;
    }

    /* ─ Intro ─ */
    .onhym-history__intro {
        margin-bottom: 24px;
    }
    .onhym-history__legacy {
        font-size: clamp(20px, 5.5vw, 28px);
    }
    .onhym-history__lead {
        font-size: 14px;
    }

    /* ─ Scene: single column, no image on mobile ─ */
    .onhym-history__scene {
        min-height: unset !important;
        border-radius: 16px !important;
    }
    .onhym-history__scene--split {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
    .onhym-history__card  { order: 1 !important; }
    .onhym-history__media { display: none !important; }

    /* ─ Card ─ */
    .onhym-history__card {
        padding: 28px 20px !important;
    }
    .onhym-history__card-icon {
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
        margin-bottom: 12px !important;
    }
    .onhym-history__card-year {
        font-size: clamp(44px, 12vw, 64px) !important;
    }
    .onhym-history__card-title {
        font-size: 17px !important;
        margin-bottom: 10px !important;
    }
    .onhym-history__card-desc {
        font-size: 14px !important;
        line-height: 1.7 !important;
        max-width: 100% !important;
        max-height: 12em !important;
    }

    /* ─ Timeline: handled by the 640px block above ─ */
}

/* ── REDUCED MOTION ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .onhym-history *,
    .onhym-history *::before,
    .onhym-history *::after {
        transition: none !important;
        animation: none !important;
    }
}
