:root {
  --text: #212529;
  --muted: #6c757d;
  --line: #e9ecef;
  --soft: #f8f9fa;
  --link: #0d6efd;
  --link-dark: #0a58ca;
  --green: #1e7e34;
  --green-soft: #e6f4ea;
  --amber: #997404;
  --amber-soft: #fff3cd;
  --gray-soft: #f1f3f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--link-dark);
}

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

h1, h2, h3, p {
  margin-top: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--link-dark);
  color: #fff;
}

.skip-link:focus {
  left: 8px;
}

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 28px 12px;
  text-align: center;
}

.site-header h1 {
  margin-bottom: 8px;
  font-size: 42px;
  line-height: 1.2;
}

.site-subtitle {
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 600;
}

.site-contact {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.site-contact span {
  margin: 0 6px;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

#toc {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}

.toc-title {
  margin: 0 0 8px;
  font-weight: 700;
}

#toc a {
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
}

#toc a:hover {
  color: var(--link);
  background: var(--soft);
}

main {
  min-width: 0;
}

.section {
  padding: 42px 0 38px;
  border-bottom: 1px solid var(--line);
}

.section:first-child {
  padding-top: 28px;
}

.section h2 {
  margin-bottom: 18px;
  font-size: 28px;
  line-height: 1.3;
}

.section h3 {
  margin: 28px 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

.section p {
  margin-bottom: 12px;
}

ol, ul {
  margin: 0 0 14px;
  padding-left: 26px;
}

li {
  margin-bottom: 6px;
}

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e7f1ff;
  color: #084298;
  font-size: 13px;
  font-weight: 600;
  vertical-align: 2px;
}

.note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

.entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.entry:last-child {
  border-bottom: 0;
}

.entry h3 {
  margin: 0 0 6px;
}

.entry p {
  margin: 0;
}

.entry img {
  width: 100%;
  height: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.entry figure {
  margin: 14px 0 0;
}

.entry figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.tech-line,
.status-line {
  margin: 12px 0;
}

.status {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.done {
  background: var(--green-soft);
  color: var(--green);
}

.doing {
  background: var(--amber-soft);
  color: var(--amber);
}

.todo {
  background: var(--gray-soft);
  color: var(--muted);
}

figure {
  margin: 22px 0;
}

figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.video-wrap,
figure video,
.video-embed iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  font-weight: 600;
  white-space: nowrap;
}

.update-list,
.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.update-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.update-list li:last-child {
  border-bottom: 0;
}

.update-list time {
  display: inline-block;
  min-width: 90px;
  color: var(--muted);
  font-weight: 600;
}

.update-list strong {
  margin-right: 10px;
}

.update-list p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.contact-list li {
  padding: 6px 0;
}

.btn {
  display: inline-block;
  padding: 9px 20px;
  border: 1px solid var(--link);
  border-radius: 6px;
  background: var(--link);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: var(--link-dark);
  border-color: var(--link-dark);
  color: #fff;
  text-decoration: none;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 28px 44px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.4);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .page {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .toc-title {
    width: 100%;
    margin-bottom: 2px;
  }

  #toc a {
    padding: 4px 10px;
    border: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 36px 18px 8px;
  }

  .site-header h1 {
    font-size: 32px;
  }

  .site-subtitle {
    font-size: 16px;
  }

  .page {
    padding: 16px 18px 36px;
  }

  .section {
    padding: 32px 0 28px;
  }

  .section h2 {
    font-size: 23px;
  }

  .update-list time {
    display: block;
    margin-bottom: 2px;
  }

  .update-list strong {
    margin-right: 6px;
  }

  .site-footer {
    padding-inline: 18px;
    flex-direction: column;
    gap: 8px;
  }
}

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