:root {
  color-scheme: light;
  --bg: oklch(0.998 0 0);
  --text: oklch(0.29 0 0);
  --muted: oklch(0.57 0 0);
  --link: oklch(0.58 0.15 233);
  --link-active: oklch(0.47 0.14 233);
  --border: oklch(0.76 0 0);
  --border-soft: oklch(0.88 0 0);
  --toc: oklch(0.955 0.025 240);
  --toc-border: oklch(0.72 0.015 240);
  --max-width: 1240px;
  --toc-width: 210px;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

a:visited {
  color: var(--link);
}

a:hover,
a:focus-visible {
  color: var(--link-active);
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

code {
  padding: 0.08rem 0.22rem;
  border: 1px solid var(--border-soft);
  background: oklch(0.97 0 0);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.site-header {
  padding: 66px 0 0;
  text-align: center;
}

.site-header__brand a {
  color: var(--text);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.site-header__brand a:hover {
  text-decoration: none;
}

.site-header__brand p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 3rem;
}

.primary-nav a {
  color: var(--link);
  font-size: 1rem;
  white-space: nowrap;
}

.primary-nav a.is-active {
  color: oklch(0.7 0.14 215);
}

.site-main {
  margin-top: 5.9rem;
}

.content-area {
  display: grid;
  grid-template-columns: var(--toc-width) minmax(0, 1fr) var(--sidebar-width);
  column-gap: 2.5rem;
  align-items: start;
}

.article {
  min-width: 0;
}

.article-header h1 {
  margin: 0 0 1.35rem;
  color: var(--text);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.12;
}

.toc-box {
  width: 100%;
  min-height: 86px;
  margin: 0;
  padding: 0.85rem 0.8rem;
  border: 1px solid var(--toc-border);
  border-radius: 4px;
  background: var(--toc);
  box-shadow: 0 1px 2px oklch(0.3 0 0 / 0.15);
}

.toc-rail {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100vh - 3rem);
  overflow: auto;
}

.toc-rail--empty {
  display: none;
}

.toc-inline {
  display: none;
}

.toc-box__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.toc-box h2 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.1;
}

.toc-toggle {
  flex: 0 0 auto;
  margin: 0.1rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.toc-box ol {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.toc-box li {
  margin-top: 0.25rem;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  line-height: 1.35;
}

.read-time {
  margin: 0 0 1.9rem;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.35;
}

.article p,
.article li,
.article td,
.article th {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.6;
}

.article p,
.article ul,
.article ol,
.article table,
.article blockquote {
  max-width: 735px;
}

.article h2 {
  margin: 2rem 0 0.9rem;
  color: var(--text);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.article h3 {
  margin: 1.5rem 0 0.45rem;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
}

.article ul,
.article ol {
  padding-left: 1.55rem;
}

.article li + li {
  margin-top: 0.35rem;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0;
}

.practice-demo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: 735px;
  margin: 1.4rem 0 2rem;
}

.practice-demo-strip figure {
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--border-soft);
  background: oklch(0.982 0 0);
}

.practice-demo-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg);
}

.practice-demo-strip figcaption {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.15rem 0.1rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  line-height: 1.25;
}

.practice-demo-strip figcaption span {
  color: var(--muted);
}

.article th,
.article td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border-soft);
  vertical-align: top;
  text-align: left;
}

.article th {
  background: oklch(0.965 0 0);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.98rem;
}

.article blockquote {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--border);
  background: oklch(0.97 0 0);
}

.article-box {
  max-width: 735px;
  margin: 0 0 1.35rem;
}

.article-box h2 {
  margin-top: 0;
}

.quickstart-list {
  margin: 0;
  padding-left: 1.4rem;
}

.quickstart-list p,
.day-map__rows span {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

.pathway__steps {
  margin: 0;
  padding-left: 1.4rem;
}

.pathway__steps p {
  margin: 0.25rem 0 0;
}

.pathway__count {
  display: none;
}

.day-map__rows {
  display: grid;
  max-width: 735px;
}

.day-map__rows div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--border-soft);
}

.day-map__rows div:first-child {
  border-top: 0;
}

.day-map__rows strong {
  color: var(--text);
}

.wiki-sidebar {
  padding-top: 0.9rem;
}

.widget,
.infobox {
  margin-bottom: 2rem;
}

.widget h2,
.infobox h2 {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.search-widget form {
  margin: 0;
}

.search-widget input {
  width: 200px;
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.sidebar-link-list,
.related-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.sidebar-link-list li,
.related-list li {
  margin-bottom: 0.55rem;
  line-height: 1.3;
}

.sidebar-link-list li[hidden] {
  display: none;
}

.sidebar-link-list a,
.related-list a {
  font-size: 0.95rem;
}

.sidebar-link-list a.is-active {
  color: var(--text);
}

.article .motion-box {
  float: left;
  width: 148px;
  margin: 0.25rem 1.25rem 0.7rem 0;
  padding: 0;
}

@media (max-width: 760px) {
  .article .motion-box {
    width: 112px;
    margin-right: 0.9rem;
  }
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 3rem 0 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.pager__item a,
.pager__edge {
  display: grid;
  gap: 0.2rem;
}

.pager__item span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pager__item strong {
  font-size: 1rem;
}

.pager__item--next {
  text-align: right;
}

@media (max-width: 1100px) {
  .site-shell {
    width: min(100%, 1016px);
    padding: 0 1rem;
  }

  .content-area {
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    column-gap: 3rem;
  }

  .toc-rail {
    display: none;
  }

  .toc-inline {
    display: block;
  }

  .toc-inline .toc-box {
    width: 210px;
    margin-bottom: 1.55rem;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100%, 620px);
    padding: 0 2rem;
  }

  .site-header {
    padding-top: 5.4rem;
  }

  .site-header__brand a {
    display: block;
    font-size: 3rem;
  }

  .site-header__brand p {
    font-size: 1.35rem;
    line-height: 1.35;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 3.6rem;
    padding: 0.6rem 1.45rem;
    border: 3px solid var(--text);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 1.45rem;
    font-weight: 800;
    cursor: pointer;
  }

  .menu-toggle::before {
    content: "\2630";
    font-size: 1.25rem;
  }

  .primary-nav {
    display: none;
    margin: 1.4rem auto 0;
    max-width: 22rem;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
  }

  body.menu-open .primary-nav {
    display: grid;
  }

  .primary-nav a {
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-soft);
    font-size: 1.15rem;
  }

  .primary-nav a:first-child {
    border-top: 0;
  }

  .site-main {
    margin-top: 9rem;
  }

  .content-area {
    display: block;
  }

  .article-header h1 {
    font-size: 3.4rem;
    line-height: 1.12;
  }

  .toc-inline .toc-box {
    width: min(100%, 330px);
    min-height: 150px;
    padding: 1.1rem 1.25rem;
  }

  .toc-box h2 {
    font-size: 2.1rem;
  }

  .toc-toggle {
    font-size: 1rem;
  }

  .read-time {
    font-size: 1.75rem;
  }

  .article p,
  .article li,
  .article td {
    font-size: 1.45rem;
    line-height: 1.65;
  }

  .article h2 {
    font-size: 2.35rem;
  }

  .article h3 {
    font-size: 1.7rem;
  }

  .day-map__rows div {
    grid-template-columns: 1fr;
  }

  .practice-demo-strip {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .wiki-sidebar {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-soft);
  }

  .search-widget input {
    width: 100%;
    font-size: 1.1rem;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager__item--next {
    text-align: left;
  }
}
