.x-page {
  position: relative;
}

.x-hall {
  min-height: 100svh;
  overflow: clip;
}

.x-hall::before {
  position: fixed;
}

.x-layout {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: calc(100svh - 5.6rem - (var(--frame) * 2));
  border-top: 1px solid var(--grout);
  grid-template-columns: minmax(18rem, 0.3fr) minmax(0, 0.7fr);
}

.x-rail {
  min-width: 0;
  border-right: 1px solid var(--cobalt);
  background: rgb(246 244 235 / 96%);
}

.x-rail-inner {
  position: sticky;
  top: 0;
  display: flex;
  min-height: calc(100svh - 5.6rem - (var(--frame) * 2));
  flex-direction: column;
  padding: clamp(2.4rem, 4vw, 4.5rem) clamp(1.5rem, 3.6vw, 3.7rem) 2.2rem;
}

.x-source-lockup {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.x-source-lockup svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.x-rail h1 {
  max-width: 7ch;
  margin: 1rem 0 0;
  font-size: clamp(3.8rem, 5.5vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.88;
}

.x-intro {
  max-width: 32ch;
  margin: 2rem 0 0;
  color: var(--cobalt-copy);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.62;
}

.x-filter {
  margin-top: clamp(2rem, 3vw, 3rem);
  font-family: Arial, Helvetica, sans-serif;
}

.x-filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.x-filter-label span {
  font-weight: 700;
}

.x-filter-label strong {
  color: var(--cobalt-copy);
  font-size: inherit;
}

.x-controls {
  display: grid;
  border: 1px solid var(--cobalt);
  grid-template-columns: 1fr 1fr;
}

.x-controls button {
  position: relative;
  display: grid;
  min-height: 5.6rem;
  gap: 0.35rem;
  align-content: space-between;
  padding: 0.9rem;
  border: 0;
  border-radius: 0;
  background: var(--milk);
  color: var(--cobalt);
  cursor: pointer;
  text-align: left;
  transition:
    background-color 220ms var(--ease-out),
    color 220ms var(--ease-out);
}

.x-controls button:nth-child(even) {
  border-left: 1px solid var(--cobalt);
}

.x-controls button:nth-child(n + 3) {
  border-top: 1px solid var(--cobalt);
}

.x-controls button > span {
  color: var(--cobalt-copy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}

.x-controls button > strong {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.x-controls button::after {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 0.45rem;
  aspect-ratio: 1;
  border: 1px solid var(--cobalt);
  content: "";
  transform: rotate(45deg);
  transition:
    background-color 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.x-controls button:hover {
  background: #dce4f2;
}

.x-controls button:focus-visible {
  z-index: 2;
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

.x-controls button.is-active {
  background: var(--cobalt);
  color: var(--milk);
}

.x-controls button.is-active > span {
  color: var(--mustard);
}

.x-controls button.is-active::after {
  border-color: var(--mustard);
  background: var(--mustard);
  transform: rotate(135deg);
}

.x-updated {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin: auto 0 0;
  color: var(--cobalt-copy);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  line-height: 1.4;
}

.x-updated span {
  width: 0.5rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  background: var(--mustard);
  transform: rotate(45deg);
}

.x-field {
  --timeline-gutter: clamp(2.8rem, 5vw, 5.25rem);
  container: x-timeline / inline-size;
  position: relative;
  display: flex;
  min-width: 0;
  gap: clamp(1rem, 2vw, 2rem);
  flex-direction: column;
  margin: 0;
  padding: clamp(2.2rem, 3.2vw, 3.5rem) clamp(2.2rem, 5vw, 5.5rem) clamp(4rem, 6vw, 6rem);
  background: rgb(246 244 235 / 88%);
  list-style: none;
  view-transition-name: x-filter-region;
}

.x-field::before {
  position: absolute;
  top: clamp(2.2rem, 3.2vw, 3.5rem);
  bottom: clamp(4rem, 6vw, 6rem);
  left: 50%;
  border-left: 1px dashed rgb(18 63 152 / 52%);
  content: "";
}

.x-field::after {
  position: absolute;
  top: clamp(2.2rem, 3.2vw, 3.5rem);
  bottom: clamp(4rem, 6vw, 6rem);
  left: 50%;
  border-left: 1px dashed var(--cobalt);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: top;
}

.x-item {
  position: relative;
  z-index: 1;
  width: calc(50% - var(--timeline-gutter));
  min-width: 0;
  transition:
    opacity 520ms var(--ease-out),
    transform 620ms var(--ease-out);
}

.x-item.is-timeline-left {
  align-self: flex-start;
}

.x-item.is-timeline-right {
  align-self: flex-end;
}

.x-item::before {
  position: absolute;
  top: 2rem;
  display: grid;
  width: 2.2rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--cobalt);
  border-radius: 50%;
  background: var(--milk);
  color: var(--cobalt);
  content: attr(data-sequence);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  transition:
    background-color 360ms var(--ease-out),
    color 360ms var(--ease-out),
    transform 520ms var(--ease-out);
}

.x-item::after {
  position: absolute;
  top: 3.05rem;
  width: var(--timeline-gutter);
  border-top: 1px dashed rgb(18 63 152 / 52%);
  content: "";
}

.x-item.is-timeline-left::before {
  right: calc((var(--timeline-gutter) * -1) - 1.1rem);
  left: auto;
}

.x-item.is-timeline-left::after {
  right: calc(var(--timeline-gutter) * -1);
  left: auto;
}

.x-item.is-timeline-right::before {
  right: auto;
  left: calc((var(--timeline-gutter) * -1) - 1.1rem);
}

.x-item.is-timeline-right::after {
  right: auto;
  left: calc(var(--timeline-gutter) * -1);
}

.x-visual {
  position: relative;
  display: flex;
  min-height: 24rem;
  overflow: hidden;
  background: #dce4f2;
  color: var(--cobalt);
  text-decoration: none;
  transition:
    background-color 300ms var(--ease-out),
    box-shadow 420ms var(--ease-out);
}

.x-visual:focus-visible,
.x-actions a:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 4px;
}

.x-authored-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 4;
  padding: 0.45rem 0.55rem;
  background: var(--milk);
  color: var(--cobalt);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.x-editorial-number {
  height: clamp(22rem, 25vw, 26rem);
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 3.5vw, 3.5rem);
  background: var(--cobalt);
  color: var(--milk);
}

.x-visual-metric {
  font-size: clamp(6rem, 10vw, 9rem);
  letter-spacing: -0.04em;
  line-height: 0.7;
}

.x-visual-copy {
  max-width: 14ch;
  font-size: clamp(2.1rem, 3.2vw, 3.2rem);
  line-height: 0.98;
}

.x-visual-source {
  align-self: flex-end;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: right;
  text-transform: uppercase;
}

.x-source-visual {
  min-height: 19rem;
  background: var(--cobalt);
}

.x-source-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 19rem;
  object-fit: cover;
  transition: transform 420ms var(--ease-out);
}

.x-source-visual:hover img {
  transform: scale(1.025);
}

.x-media-badge {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.5rem 0.65rem;
  background: var(--milk);
  color: var(--cobalt);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
}

.x-editorial-flow {
  min-height: 29rem;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 4rem);
}

.x-flow-title {
  max-width: 12ch;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 500;
  line-height: 0.96;
}

.x-flow {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.x-flow i {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--cobalt);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.x-flow b {
  color: var(--mustard-active);
}

.x-profile-visual {
  min-height: 0;
  flex-direction: column;
  border: 1px solid var(--cobalt);
  background: var(--milk);
  text-align: left;
}

.x-profile-header {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3;
  flex: none;
  overflow: hidden;
  border-bottom: 1px solid var(--cobalt);
  background: #dce4f2;
}

.x-profile-header::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgb(18 63 152 / 18%));
  content: "";
  pointer-events: none;
}

.x-profile-header img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 560ms var(--ease-out),
    transform 700ms var(--ease-out);
}

.x-profile-body {
  position: relative;
  display: grid;
  min-height: 15rem;
  width: 100%;
  flex: 1;
  padding: clamp(4.5rem, 8vw, 6.25rem) clamp(1.35rem, 3vw, 2.5rem) clamp(1.8rem, 3vw, 2.5rem);
}

.x-profile-avatar {
  position: absolute;
  top: 0;
  left: clamp(1.35rem, 3vw, 2.5rem);
  display: block;
  width: clamp(6.5rem, 10vw, 8.5rem);
  aspect-ratio: 1;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--cobalt);
  border-radius: 50%;
  background: var(--milk);
  box-shadow: 0.45rem 0.65rem 1.25rem rgb(18 63 152 / 18%);
  transform: translateY(-50%);
  transition:
    box-shadow 520ms var(--ease-out),
    transform 620ms var(--ease-out);
}

.x-profile-avatar::after {
  position: absolute;
  inset: 0.28rem;
  border: 1px solid rgb(246 244 235 / 90%);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.x-profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.x-profile-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.x-profile-name {
  font-size: clamp(2rem, 3.8vw, 3.15rem);
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.x-profile-handle {
  margin-top: 0.55rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.x-profile-field {
  max-width: 28ch;
  margin-top: 1.75rem;
  color: var(--cobalt-copy);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.45;
}

.x-profile-visual:hover,
.x-profile-visual:focus-visible {
  box-shadow: 0.55rem 0.7rem 0 var(--mustard);
}

.x-profile-visual:hover .x-profile-header img,
.x-profile-visual:focus-visible .x-profile-header img {
  filter: saturate(1.05);
  transform: scale(1.025);
}

.x-profile-visual:hover .x-profile-avatar,
.x-profile-visual:focus-visible .x-profile-avatar {
  box-shadow: 0.65rem 0.85rem 1.5rem rgb(18 63 152 / 25%);
  transform: translateY(calc(-50% - 0.3rem));
}

.x-editorial-keywords {
  display: grid;
  min-height: 30rem;
  padding: clamp(2rem, 5vw, 5rem);
  border: 1px solid var(--cobalt);
  background: var(--milk);
  grid-template-rows: auto 1fr auto;
}

.x-keywords {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.x-keywords i {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--cobalt);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.x-keyword-title {
  max-width: 11ch;
  align-self: center;
  font-size: clamp(3rem, 6vw, 5.6rem);
  font-weight: 500;
  line-height: 0.93;
}

.x-caption {
  display: grid;
  gap: clamp(1.2rem, 2vw, 2rem);
  margin-top: 1.5rem;
  grid-template-columns: clamp(2rem, 4vw, 4rem) minmax(0, 1fr);
}

.x-caption-rule {
  height: 1px;
  margin-top: 0.45rem;
  background: var(--cobalt);
}

.x-source-line,
.x-note-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.x-source-line {
  margin: 0 0 0.75rem;
}

.x-caption h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.x-note-label {
  margin: 1.4rem 0 0;
}

.x-note {
  max-width: 62ch;
  margin: 0.65rem 0 0;
  color: var(--cobalt-copy);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.93rem;
  line-height: 1.55;
}

.x-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-family: Arial, Helvetica, sans-serif;
}

.x-actions a {
  position: relative;
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.8rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
}

.x-actions a::after {
  position: absolute;
  right: 0;
  bottom: 0.45rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0.22);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}

.x-actions a:hover::after,
.x-actions a:focus-visible::after {
  transform: scaleX(1);
}

.x-item-lead .x-caption {
  gap: clamp(0.9rem, 1.5vw, 1.4rem);
  margin-top: 1rem;
  grid-template-columns: clamp(2rem, 3vw, 3rem) minmax(0, 1fr);
}

.x-item-lead .x-caption h2 {
  max-width: 22ch;
  font-size: clamp(1.45rem, 1.8vw, 1.8rem);
}

.x-item-lead .x-note-label {
  margin-top: 0.85rem;
}

.x-item-lead .x-note {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.x-item-lead .x-actions a {
  margin-top: 0.4rem;
}

@container x-timeline (max-width: 70rem) {
  .x-editorial-number {
    padding: clamp(1.5rem, 2.2vw, 2rem);
  }

  .x-visual-metric {
    font-size: clamp(5rem, 7vw, 6rem);
  }

  .x-visual-copy {
    font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  }

  .x-visual-source {
    max-width: 22ch;
    font-size: 0.62rem;
  }
}

@media (max-width: 940px) {
  .x-layout {
    grid-template-columns: 1fr;
  }

  .x-rail {
    border-right: 0;
    border-bottom: 1px solid var(--cobalt);
  }

  .x-rail-inner {
    position: static;
    min-height: auto;
  }

  .x-rail h1 {
    max-width: 9ch;
  }

  .x-updated {
    margin-top: 2rem;
  }
}

@media (max-width: 700px) {
  .x-rail-inner {
    padding: 3rem 1.2rem;
  }

  .x-rail h1 {
    font-size: clamp(4rem, 19vw, 5.5rem);
  }

  .x-controls button {
    min-height: 5rem;
  }

  .x-field {
    --timeline-gutter: 0;
    gap: 4rem;
    padding: 2rem 1.2rem 5rem 3.2rem;
  }

  .x-field::before {
    top: 2rem;
    bottom: 5rem;
    left: 1.2rem;
  }

  .x-field::after {
    top: 2rem;
    bottom: 5rem;
    left: 1.2rem;
  }

  .x-item {
    width: 100%;
    align-self: stretch;
  }

  .x-item::before,
  .x-item.is-timeline-left::before,
  .x-item.is-timeline-right::before {
    right: auto;
    left: -3.1rem;
  }

  .x-item::after,
  .x-item.is-timeline-left::after,
  .x-item.is-timeline-right::after {
    right: auto;
    left: -2rem;
    width: 2rem;
  }

  .x-visual,
  .x-editorial-flow,
  .x-profile-visual,
  .x-editorial-keywords {
    min-height: 24rem;
  }

  .x-profile-visual {
    min-height: 0;
  }

  .x-profile-body {
    min-height: 15rem;
    padding-top: 4.6rem;
  }

  .x-profile-avatar {
    width: 6.5rem;
  }

  .x-editorial-number {
    height: auto;
    min-height: 28rem;
  }

  .x-visual-metric {
    font-size: 6rem;
  }

  .x-visual-copy,
  .x-flow-title {
    font-size: clamp(2.3rem, 11vw, 3.1rem);
  }

  .x-caption {
    grid-template-columns: 2rem 1fr;
  }

  .x-caption h2 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .x-motion-ready .x-item:not(.is-revealed) {
    opacity: 0;
    transform: translateY(2rem);
  }

  .x-motion-ready .x-item:not(.is-revealed)::before {
    transform: scale(0.72);
  }

  .x-motion-ready .x-item.is-revealed::before {
    background: var(--cobalt);
    color: var(--milk);
  }

  .x-motion-ready .x-profile-header img {
    clip-path: inset(0 100% 0 0);
  }

  .x-motion-ready .x-item.is-revealed .x-profile-header img {
    animation: x-profile-header-reveal 780ms 100ms var(--ease-out) both;
  }

  @supports (animation-timeline: scroll()) {
    .x-field::before {
      opacity: 0.18;
    }

    .x-field::after {
      opacity: 0.9;
      animation: x-timeline-draw linear both;
      animation-timeline: scroll(root block);
      animation-range: 8% 92%;
    }
  }

  ::view-transition-old(x-filter-region) {
    animation: 160ms ease-out both x-filter-old;
  }

  ::view-transition-new(x-filter-region) {
    animation: 340ms var(--ease-out) both x-filter-new;
  }
}

@media (prefers-reduced-motion: reduce) {
  .x-controls button,
  .x-controls button::after,
  .x-item,
  .x-item::before,
  .x-visual,
  .x-source-visual img,
  .x-profile-header img,
  .x-profile-avatar,
  .x-actions a::after {
    animation: none;
    transition: none;
  }
}

@keyframes x-profile-header-reveal {
  from {
    clip-path: inset(0 100% 0 0);
    filter: saturate(0.75);
  }

  to {
    clip-path: inset(0);
  }
}

@keyframes x-timeline-draw {
  to {
    transform: scaleY(1);
  }
}

::view-transition {
  pointer-events: none;
}

@keyframes x-filter-old {
  to {
    opacity: 0;
  }
}

@keyframes x-filter-new {
  from {
    clip-path: inset(0 0 1.5rem);
    opacity: 0;
  }
}

@media (forced-colors: active) {
  .x-updated span,
  .x-controls button::after {
    border: 1px solid CanvasText;
  }
}
