.history {
  --story-paper: #f3f3f3;
  --story-ink: #181818;
  position: relative;
  color: var(--story-ink);
  background: var(--story-paper);
}

html[lang="en"] .history [lang="pl"],
html[lang="pl"] .history [lang="en"] { display: none; }

.history-inner {
  --scene-height: clamp(540px, 80svh, 860px);
  --orbit-radius: calc(var(--scene-height) * .545);
  position: relative;
  padding: clamp(28px, 3.4vw, 64px) var(--edge);
}
.history-heading h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.5rem);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -.045em;
}
.history-events {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 2.5rem;
}
.history-events > li { min-width: 0; }
.history-events time {
  display: block;
  margin-bottom: .85rem;
  color: #585858;
  font-size: .875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.orbit-plan {
  display: inline-block;
  justify-self: start;
  align-self: end;
  margin-bottom: .65rem;
  padding: .25em .7em;
  border-radius: 999px;
  background: #e5e5e5;
  color: #454545;
  font-size: .875rem;
  line-height: 1.35;
  font-weight: 500;
}
.is-enhanced li:not(.is-future) > .orbit-plan { display: none; }
.history-events h3 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.15rem, 3.85vw, 4.65rem);
  font-weight: 550;
  line-height: 1.04;
  letter-spacing: -.066em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.history-events p {
  max-width: 49ch;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.18vw, 1.25rem);
  color: #494949;
  line-height: 1.56;
  letter-spacing: -.018em;
  overflow-wrap: anywhere;
}
.story-orbit, .history-navigation, .history-clock[hidden] { display: none; }

.history.is-enhanced .history-inner {
  display: grid;
  grid-template-columns: 55% 45%;
  min-height: var(--scene-height);
  padding: 0;
  isolation: isolate;
  overflow: clip;
}
.is-enhanced .history-heading h2,
.is-enhanced .history-clock,
.is-enhanced .history-navigation {
  position: absolute;
  z-index: 1;
}
.is-enhanced .history-heading { display: contents; }
.is-enhanced .history-heading h2 {
  top: clamp(24px, 3.1vw, 58px);
  left: var(--edge);
}
.history-clock {
  left: var(--edge);
  bottom: clamp(22px, 3vw, 50px);
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: baseline;
  column-gap: 1.1em;
  color: #595959;
  font-size: .8125rem;
  line-height: 1.2;
}
.clock-caption {
  grid-column: 1 / -1;
  margin-bottom: .4rem;
  color: #595959;
}
.clock-unit { display: flex; align-items: baseline; gap: .3em; }
.clock-value { color: #323232; }
.clock-value svg { display: block; height: 1em; width: auto; }

.is-enhanced .story-orbit {
  --orbit-reading-point: 70%;
  display: block;
  position: relative;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: clip;
  clip-path: inset(0 0 0 max(0px, calc(var(--orbit-reading-point) - var(--orbit-radius))));
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.story-orbit.is-dragging, .story-orbit.is-dragging .orbit-stop { cursor: grabbing; }
.orbit-rotor {
  position: absolute;
  right: calc(100% - var(--orbit-reading-point));
  top: calc(50% - var(--orbit-radius));
  width: calc(2 * var(--orbit-radius));
  aspect-ratio: 1;
  transform: rotate(var(--orbit-angle, 0deg));
}
.orbit-rotor::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #d5d5d5;
  border-radius: 50%;
  pointer-events: none;
}
.orbit-stop {
  --pin-offset: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 0 0;
  transform: rotate(var(--stop-angle)) translateX(var(--orbit-radius)) translate(-14px, -50%);
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: .08em .12em .08em clamp(30px, 2.65vw, 56px);
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #b7b7b7;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: clamp(1.45rem, 3.2vw, 3.75rem);
  font-weight: 550;
  line-height: 1;
  letter-spacing: -.082em;
  font-variant-numeric: tabular-nums slashed-zero;
  white-space: nowrap;
  touch-action: pan-y pinch-zoom;
  cursor: pointer;
}
.orbit-stop::before {
  content: '';
  position: absolute;
  left: var(--pin-offset);
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.orbit-stop[data-distance="1"] { color: #939393; }
.orbit-stop[aria-pressed="true"], .orbit-stop:focus-visible { color: var(--story-ink); }
@media (hover: hover) {
  .orbit-stop:hover { color: #323232; }
}

.is-enhanced .history-story {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  min-width: 0;
  margin-inline: clamp(16px, 3.2vw, 66px) var(--edge);
  padding-block: 95px;
}
.is-enhanced .history-events {
  display: grid;
  gap: 0;
  margin: 0;
}
.is-enhanced .history-events > li {
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: start;
}
.is-enhanced .history-events > li[hidden] { visibility: hidden; pointer-events: none; }
.is-enhanced .history-events time { display: none; }
.is-enhanced .history-events h3 { grid-row: 2; }
.is-enhanced .history-events p { grid-row: 3; }

.is-enhanced .history-navigation {
  right: var(--edge);
  bottom: clamp(18px, 2.7vw, 46px);
  display: flex;
  align-items: center;
  gap: 3px;
}
.history-navigation button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
}
.history-navigation button:focus-visible,
.history-navigation button:hover { color: var(--story-ink); background: #e6e6e6; }
.history-prev::before, .history-next::before {
  content: '';
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 1.4px 1.4px 0 0;
}
.history-prev::before { transform: translateX(2px) rotate(-135deg); }
.history-next::before { transform: translateX(-2px) rotate(45deg); }
.orbit-play > span {
  width: 9px;
  height: 11px;
  border-inline: 3px solid currentColor;
}
.orbit-play:is([data-state="paused"], [data-state="replay"]) > span {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5.5px 0 5.5px 9px;
  border-color: transparent transparent transparent currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .orbit-stop { transition: color .28s; }
  .is-enhanced .history-events > li:not([hidden]) h3,
  .is-enhanced .history-events > li:not([hidden]) p {
    animation: orbit-copy-in .34s cubic-bezier(.2,.7,.25,1) both;
  }
  @keyframes orbit-copy-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: none; }
  }
}

@media (min-width: 681px) and (max-width: 1000px) {
  .history-inner { --scene-height: clamp(510px, 70vw, 680px); }
}

@media (min-width: 681px) and (max-width: 1000px), (min-width: 681px) and (max-aspect-ratio: 3/2) {
  .is-enhanced .history-clock {
    top: clamp(24px, 3.1vw, 58px);
    right: var(--edge);
    bottom: auto;
    left: auto;
  }
}

@media (max-width: 680px) {
  .history.is-enhanced .history-inner {
    --dial-height: clamp(248px, 67vw, 355px);
    --orbit-radius: calc(var(--dial-height) * .62);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto var(--dial-height) 1fr auto;
    min-height: min(590px, 80svh);
    padding-block: 24px 18px;
  }
  .is-enhanced .history-heading h2 {
    position: static;
    grid-area: 1 / 1;
    margin: 0 var(--edge) 12px;
  }
  .is-enhanced .story-orbit {
    --orbit-reading-point: 59%;
    grid-area: 2 / 1;
    mask-image: linear-gradient(transparent, black 4%, black 96%, transparent);
  }
  .orbit-stop { font-size: clamp(1.375rem, 6.3vw, 2rem); }
  .is-enhanced .history-story {
    grid-area: 3 / 1;
    margin: 0;
    padding: 24px var(--edge);
  }
  .is-enhanced .history-events > li {
    align-content: start;
    grid-template-rows: auto auto auto;
  }
  .history-events h3 { font-size: clamp(1.95rem, 7.3vw, 2.7rem); max-width: 18ch; }
  .history-events p { margin-top: .75rem; }
  .history-events time { margin-bottom: .55rem; }
  .is-enhanced .history-clock, .is-enhanced .history-navigation {
    position: static;
    grid-row: 4;
    grid-column: 1;
    align-self: center;
  }
  .is-enhanced .history-clock { justify-self: start; margin-left: var(--edge); column-gap: .55rem; }
  .is-enhanced .history-navigation { justify-self: end; margin-right: max(8px, calc(var(--edge) - 8px)); gap: 0; }
}

@media (max-width: 380px) {
  .clock-unit { display: grid; gap: 3px; }
}
