:root {
  color-scheme: light;
  --page: rgb(255, 253, 249);
  --surface-soft: #f7f7f5;
  --ink: #000000;
  --ink-soft: #39414d;
  --secondary: #6d6d6d;
  --line: #d1d1d1;
  --line-strong: #9f9f9f;
  --accent: #2f5f7f;
  --accent-soft: #d1dfe4;
  --gray-blue: #abb8c3;
  --current: #0f766e;
  --danger: #a12a2a;
  --danger-soft: #ead0d0;
  --label-width: 190px;
  --axis-height: 64px;
  --row-height: 62px;
  --region-height: 34px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-weight: 300;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
select,
input {
  font: inherit;
}

button,
select,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid rgba(47, 95, 127, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-180%);
  padding: 0.65rem 0.9rem;
  border-radius: 0;
  background: var(--ink);
  color: var(--page);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(1480px, calc(100% - 34px));
  margin: 0 auto;
  min-height: 64px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-weight: 400;
  font-size: 1rem;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-header nav a {
  color: var(--secondary);
  font-size: 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-header nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

main {
  overflow: clip;
}

.hero,
.explorer,
.reading-path,
footer {
  width: min(1480px, calc(100% - 34px));
  margin-inline: auto;
}

.hero {
  padding: 28px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 980px);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.1;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.1rem, 4.5vw, 4.6rem);
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.2rem;
}

.hero-copy {
  max-width: 770px;
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.hero-meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.hero-meta strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.explorer {
  padding: 20px 0 38px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.section-heading > p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--page);
}

.controls label,
.mobile-timeline > label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 0 36px 0 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--page);
  color: var(--ink);
  font-weight: 300;
  text-transform: none;
  letter-spacing: normal;
}

.controls .check-control {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  white-space: nowrap;
}

.check-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.story-jumps {
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-jumps > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--page);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 300;
}

.preset-button:hover,
.preset-button[aria-pressed="true"] {
  border-color: var(--gray-blue);
  background: var(--accent-soft);
  color: var(--ink);
}

.snapshot-control {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr) minmax(300px, 1.4fr);
  gap: 18px;
  align-items: center;
  margin: 16px 0 24px;
}

.snapshot-control label {
  font-size: 0.93rem;
  font-weight: 300;
}

#snapshot-year-output {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

#snapshot-year {
  width: 100%;
  accent-color: var(--accent);
}

#snapshot-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.error-message {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 4px solid var(--danger);
  background: var(--danger-soft);
}

.desktop-timeline {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 70%, transparent);
}

.sticky-ruler {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 0;
  display: grid;
  grid-template-columns: var(--label-width) minmax(0, 1fr);
  pointer-events: none;
}

.sticky-ruler-label,
.sticky-ruler-window {
  height: var(--axis-height);
  border-bottom: 1px solid var(--line-strong);
  background: var(--page);
}

.sticky-ruler-label {
  padding: 0 12px 12px;
  display: flex;
  align-items: flex-end;
  border-right: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sticky-ruler-window {
  overflow: hidden;
}

.sticky-axis-layer {
  position: relative;
  height: var(--axis-height);
  will-change: transform;
}

.timeline-grid {
  display: grid;
  grid-template-columns: var(--label-width) minmax(0, 1fr);
  min-height: 480px;
}

.label-column {
  position: relative;
  z-index: 6;
  padding-top: var(--axis-height);
  border-right: 1px solid var(--line-strong);
  background: var(--page);
}

.label-row,
.label-region {
  padding: 0 12px;
  display: flex;
  align-items: center;
}

.label-row {
  height: var(--row-height);
  border-top: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
}

.label-row button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  line-height: 1.15;
  font-weight: 300;
}

.label-row button:hover,
.label-row button[aria-pressed="true"] {
  color: var(--accent);
}

.label-row small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 500;
}

.label-row .current-indicator small::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--current);
  vertical-align: 0.02em;
}

.label-region {
  height: var(--region-height);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plot-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: var(--line-strong) var(--surface-soft);
  scrollbar-width: auto;
}

.plot-canvas {
  position: relative;
  min-width: 100%;
}

.axis-layer {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  height: var(--axis-height);
  border-bottom: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--page) 92%, transparent);
}

.axis-tick {
  position: absolute;
  bottom: 0;
  height: 100%;
  border-left: 1px solid var(--line);
}

.axis-tick span {
  position: absolute;
  bottom: 12px;
  left: 7px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lane-layer {
  position: absolute;
  inset: var(--axis-height) 0 auto;
}

.plot-region {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--region-height);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 52%, transparent);
}

.plot-row {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--row-height);
  border-top: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
}

.phase-segment,
.rule-segment,
.reign-mark,
.relationship-button {
  position: absolute;
  margin: 0;
  cursor: pointer;
}

.phase-segment {
  z-index: 1;
  top: 8px;
  height: 24px;
  min-width: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface-soft);
}

.phase-segment.current {
  background: color-mix(in srgb, var(--current) 10%, var(--surface-soft));
}

.rule-segment {
  z-index: 2;
  top: 11px;
  height: 18px;
  min-width: 2px;
  overflow: hidden;
  padding: 0 7px;
  border: 0;
  border-left: 3px solid var(--house-color);
  border-radius: 0;
  background: color-mix(in srgb, var(--house-color) 22%, var(--page));
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 18px;
  text-align: left;
  white-space: nowrap;
}

.rule-segment:hover,
.rule-segment:focus-visible,
.rule-segment.house-match {
  background: color-mix(in srgb, var(--house-color) 44%, var(--page));
}

.house-filtering .rule-segment:not(.house-match) {
  opacity: 0.18;
}

.reign-duration {
  position: absolute;
  z-index: 2;
  top: 40px;
  height: 2px;
  min-width: 2px;
  background: var(--ink-soft);
  opacity: 0.55;
}

.reign-mark {
  z-index: 4;
  top: 35px;
  width: 11px;
  height: 11px;
  padding: 0;
  transform: translateX(-50%);
  border: 2px solid var(--page);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.reign-mark.importance-3 {
  width: 13px;
  height: 13px;
  top: 34px;
  background: var(--accent);
}

.reign-label {
  position: absolute;
  z-index: 3;
  top: 49px;
  transform: translateX(-50%);
  color: var(--ink-soft);
  font-size: 0.64rem;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}

.relationship-layer {
  position: absolute;
  z-index: 3;
  top: var(--axis-height);
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.relationship-layer path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  opacity: 0.42;
  vector-effect: non-scaling-stroke;
}

.relationship-layer .personal_union,
.relationship-layer .dynastic_union,
.relationship-layer .composite_monarchy {
  stroke-dasharray: 5 4;
}

.relationship-layer .partition,
.relationship-layer .conquest,
.relationship-layer .dissolution {
  stroke: var(--ink-soft);
  stroke-dasharray: 2 4;
}

.relationship-layer .restoration {
  stroke-dasharray: 8 3 2 3;
}

.relationships-hidden .relationship-layer,
.relationships-hidden .relationship-controls-layer {
  display: none;
}

.relationship-controls-layer {
  position: absolute;
  z-index: 7;
  top: var(--axis-height);
  left: 0;
  pointer-events: none;
}

.relationship-button {
  width: 18px;
  height: 18px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--page);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1;
  pointer-events: auto;
}

.relationship-button:hover,
.relationship-button:focus-visible {
  background: var(--accent-soft);
}

.crosshair {
  position: absolute;
  z-index: 4;
  top: 0;
  width: 1px;
  border-left: 2px solid var(--accent);
  pointer-events: none;
}

.crosshair span {
  position: sticky;
  top: 7px;
  display: block;
  width: max-content;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.legend {
  display: grid;
  gap: 16px;
  margin: 16px 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.legend-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
}

.legend-heading {
  flex: 0 0 122px;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legend-group span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-line {
  display: inline-block;
  width: 32px;
  border-top: 2px solid var(--accent);
}

.legend-line.personal {
  border-top-style: dashed;
}

.legend-line.rupture {
  border-top-color: var(--ink-soft);
  border-top-style: dotted;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.legend-marker {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--page);
  color: var(--accent);
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1;
}

.detail-toggle {
  position: fixed;
  z-index: 45;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  min-height: 44px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--gray-blue);
  border-radius: 0;
  background: var(--accent-soft);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.detail-toggle:hover {
  border-color: var(--ink-soft);
}

.detail-toggle span {
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-toggle strong {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 300;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-panel {
  position: fixed;
  z-index: 50;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  min-height: 0;
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 20px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--page);
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(100% + 36px));
  transition: transform 160ms ease, opacity 160ms ease, visibility 160ms;
}

.detail-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.detail-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-close {
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--page);
  color: var(--ink);
  font-weight: 300;
  cursor: pointer;
}

.detail-close:hover {
  border-color: var(--ink-soft);
}

.detail-type {
  margin: 0;
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-dates {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

#detail-copy {
  max-width: 680px;
  margin-bottom: 0;
}

.detail-secondary h4 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  font-weight: 300;
}

.detail-secondary ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.detail-secondary li + li {
  margin-top: 0.45rem;
}

.source-links {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.78rem;
}

.source-links a {
  color: var(--accent);
}

.mobile-timeline {
  display: none;
}

.reading-path {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.reading-path h2,
.reading-path > p:not(.eyebrow) {
  max-width: 900px;
}

.reading-path > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.reading-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 2rem;
}

.reading-links a {
  font-weight: 400;
}

footer {
  padding: 30px 0 54px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
}

footer p {
  margin: 0;
}

.article-page {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.article-page header {
  margin-bottom: 2.8rem;
}

.article-page h1 {
  font-size: clamp(2.1rem, 5vw, 4.6rem);
}

.article-page .dek {
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.article-page h2 {
  margin: 3.2rem 0 0.8rem;
  font-size: 1.5rem;
}

.article-page h3 {
  margin-top: 2.4rem;
  font-size: 1.15rem;
}

.article-page p,
.article-page li {
  font-size: 0.96rem;
}

.article-page .note,
.article-page table {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
}

.article-page .note {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.article-page table {
  width: 100%;
  border-collapse: collapse;
}

.article-page th,
.article-page td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-page code {
  padding: 0.1em 0.3em;
  border-radius: 0;
  background: var(--surface-soft);
  font-size: 0.88em;
}

@media (max-width: 1120px) {
  .controls {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .check-control {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  :root {
    --label-width: 128px;
  }

  body {
    background: var(--page);
  }

  .site-header,
  .hero,
  .explorer,
  .reading-path,
  footer {
    width: min(100% - 30px, 1440px);
  }

  .site-header {
    align-items: flex-start;
    padding: 16px 0;
  }

  .site-header nav {
    justify-content: flex-end;
    gap: 9px 14px;
  }

  .hero {
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(2.1rem, 12vw, 3.45rem);
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .story-jumps {
    align-items: flex-start;
    flex-direction: column;
  }

  .snapshot-control {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .desktop-timeline {
    display: none;
  }

  .mobile-timeline {
    display: grid;
    gap: 12px;
    margin-top: 22px;
  }

  .vertical-chart {
    position: relative;
    height: 760px;
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--page) 72%, transparent);
  }

  .vertical-axis {
    position: absolute;
    top: 34px;
    bottom: 34px;
    left: 58px;
    width: 1px;
    background: var(--line-strong);
  }

  .vertical-tick {
    position: absolute;
    left: -42px;
    width: 48px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
  }

  .vertical-tick span {
    position: absolute;
    top: -0.65em;
    right: 9px;
  }

  .vertical-phase {
    position: absolute;
    left: 76px;
    right: 12px;
    min-height: 4px;
    padding: 7px 9px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: 0.68rem;
    font-weight: 400;
    text-align: left;
  }

  .vertical-rule {
    position: absolute;
    left: 82px;
    width: 8px;
    min-height: 3px;
    border: 0;
    border-radius: 0;
    background: var(--house-color);
    cursor: pointer;
  }

  .vertical-chart.house-filtering .vertical-rule:not(.house-match) {
    opacity: 0.16;
  }

  .vertical-rule.house-match {
    width: 12px;
  }

  .vertical-reign {
    position: absolute;
    left: 58px;
    width: 12px;
    height: 12px;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 2px solid var(--page);
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
  }

  .vertical-reign-label {
    position: absolute;
    left: 74px;
    max-width: calc(100% - 88px);
    transform: translateY(-50%);
    color: var(--ink-soft);
    font-size: 0.68rem;
    pointer-events: none;
  }

  .legend {
    margin-top: 20px;
  }

  .legend-group {
    gap: 10px 18px;
  }

  .legend-heading {
    flex-basis: 100%;
  }

  .detail-toggle {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .detail-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(72vh, 640px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    transform: translateY(calc(100% + 12px));
  }

  .detail-panel.is-open {
    transform: translateY(0);
  }

  footer {
    flex-direction: column;
  }

  .article-page {
    width: min(100% - 30px, 820px);
  }

  .article-page table {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
