:root {
  --paper: #f7f5f0;
  --ink: #16161a;
  --accent: #d8322a;
  --mid: #6f6f78;
  --line: #e6e3dc;
  --dark: #26262c;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --wrap: 1120px;
  --read: 720px;
  --gap: 24px;
  --radius: 6px;
}

/* ================= base ================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

dl,
dd {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ================= layout ================= */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header,
.site-footer {
  width: 100%;
}

.site-header .brand,
.site-header .site-nav,
.site-footer .footer-groups,
.site-footer .footer-note,
.site-footer .footer-copy {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
}

/* ================= header & nav ================= */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  position: relative;
  z-index: 20;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 20px;
  font-weight: 700;
  padding: 0 24px;
  color: var(--ink);
}

.site-header .brand:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 6px 0;
  padding: 0;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
}

.nav-toggle::before {
  top: 15px;
}

.nav-toggle::after {
  bottom: 15px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 16px;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-link.is-current {
  font-weight: 700;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ================= footer ================= */

.site-footer {
  margin-top: 56px;
  background: var(--line);
  border-top: 1px solid var(--ink);
  padding: 32px 24px 24px;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.footer-title {
  font-size: 16px;
  margin-bottom: 10px;
}

.footer-list li {
  margin-bottom: 6px;
}

.footer-list a {
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
  color: var(--mid);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
}

.footer-note {
  max-width: var(--wrap);
  margin: 16px auto 0;
  font-size: 14px;
  color: var(--mid);
}

.footer-copy {
  max-width: var(--wrap);
  margin: 6px auto 0;
  font-size: 14px;
  color: var(--mid);
}

/* ================= breadcrumb & page header ================= */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0 0;
  font-size: 14px;
  color: var(--mid);
}

.breadcrumb a {
  color: var(--mid);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.page-header {
  padding: 14px 0 24px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 32px;
}

.page-title {
  font-size: 34px;
  margin-bottom: 10px;
}

.page-description {
  max-width: var(--read);
  margin: 0;
  color: var(--mid);
}

/* ================= shared section bits ================= */

.section-title {
  font-size: 24px;
  margin-bottom: 10px;
}

.section-intro,
.section-lead,
.section-note {
  max-width: var(--read);
  margin: 0 0 20px;
  color: var(--mid);
}

.inner-main > section {
  margin-bottom: 48px;
}

/* ================= home: fact bar ================= */

.fact-bar {
  margin: 0;
  padding: 10px 24px;
  background: var(--dark);
  color: var(--paper);
  font-size: 14px;
  text-align: center;
}

/* ================= home: hero ================= */

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--ink);
}

.hero-title {
  font-size: 34px;
  margin-bottom: 16px;
}

.hero-summary {
  max-width: 560px;
  color: var(--mid);
  margin-bottom: 24px;
}

.hero-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-entries .entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
}

.hero-entries .entry-link:hover,
.hero-entries .entry-link:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.hero-figure {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  font-size: 14px;
}

.hero-item-name {
  font-weight: 700;
}

.hero-item-tag,
.hero-item-status {
  padding: 2px 8px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: var(--mid);
}

/* ================= home: topic overview ================= */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.topic-card {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--paper);
}

.topic-card .topic-name {
  font-size: 18px;
  margin-bottom: 10px;
}

.topic-card .topic-scope,
.topic-card .topic-trait,
.topic-card .topic-organize {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 8px;
}

.topic-card .topic-organize {
  margin-bottom: 0;
}

/* ================= home: cover wall ================= */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink);
}

.tag.is-active {
  background: var(--ink);
  color: var(--paper);
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}

.cover-card {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  transition: transform 0.15s ease, border-width 0.15s ease;
}

.cover-card:hover,
.cover-card:focus-within {
  transform: translateY(-2px);
  border-width: 2px;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--line);
}

.cover-card .cover-name {
  font-size: 16px;
  padding: 10px 12px 4px;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
  margin: 0;
  font-size: 13px;
}

.cover-tag {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--mid);
}

.cover-status {
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
}

/* ================= home: update batches ================= */

.batch-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}

.batch-group {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--paper);
}

.batch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.batch-no,
.batch-code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
}

.batch-date {
  margin: 0;
  font-size: 13px;
  color: var(--mid);
}

.batch-items li,
.batch-rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.batch-items li:last-child,
.batch-rows li:last-child {
  border-bottom: none;
}

.item-name,
.row-name {
  font-weight: 600;
  flex: 1 1 140px;
}

.item-topic,
.row-topic {
  color: var(--mid);
  flex: 0 1 auto;
}

.item-range,
.row-range {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--mid);
}

.row-status {
  font-size: 13px;
  color: var(--accent);
}

.batch-note {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--mid);
}

.batch-note a,
.ranking-note a,
.fields-note a,
.field-note a,
.entry-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* ================= home: ranking + fields ================= */

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.ranking-column,
.fields-column {
  min-width: 0;
}

.column-title {
  font-size: 18px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
}

.ranking-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.rank-no {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.rank-name {
  font-weight: 600;
}

.rank-topic,
.rank-status {
  font-size: 13px;
  color: var(--mid);
}

.rank-status {
  color: var(--accent);
}

.ranking-note,
.fields-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--mid);
}

.fields-column {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}

.field-list dt {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}

.field-list dt:first-child {
  margin-top: 0;
}

.field-list dd {
  font-size: 14px;
  color: var(--mid);
  margin-top: 2px;
}

/* ================= home: guide steps ================= */

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
  margin-bottom: 28px;
}

.step-item {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  background: var(--accent);
  color: var(--paper);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.step-name {
  font-size: 18px;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 12px;
}

.step-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
}

.boundary-block {
  border: 1px solid var(--ink);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.boundary-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.boundary-desc {
  color: var(--mid);
  margin-bottom: 10px;
}

.boundary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
}

/* ================= home: site index ================= */

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap);
}

.index-item {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
}

.index-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.index-desc {
  display: block;
  font-size: 14px;
  color: var(--mid);
}

/* ================= topic page ================= */

.topic-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.topic-block:last-child {
  border-bottom: none;
}

.topic-block-info .topic-name {
  font-size: 22px;
  margin-bottom: 12px;
}

.topic-block-info .topic-scope,
.topic-block-info .topic-trait,
.topic-block-info .topic-organize {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 10px;
}

.field-label {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.topic-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.topic-cards .cover-card {
  display: flex;
  flex-direction: column;
}

.cover-figure {
  border-bottom: 1px solid var(--line);
}

.cover-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--line);
}

.topic-cards .cover-name {
  font-size: 15px;
  padding: 10px 12px 4px;
}

.cover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 12px;
  margin: 0;
}

.cover-tags .tag {
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

.tag-status {
  color: var(--accent);
  border-color: var(--accent);
}

.advice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.advice-item {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 15px;
  color: var(--mid);
}

.topic-entries .entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.topic-entries .entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
}

.topic-entries .entry-link:hover,
.topic-entries .entry-link:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.entry-note {
  font-size: 14px;
  color: var(--mid);
}

.entry-note a + a {
  margin-left: 12px;
}

/* ================= updates page ================= */

.batch-intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}

.intro-block {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}

.intro-block .block-title {
  font-size: 18px;
  margin-bottom: 10px;
}

.intro-block p {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 8px;
}

.intro-block p:last-child {
  margin-bottom: 0;
}

.batch-list .batch-group {
  margin-bottom: var(--gap);
}

.batch-list .batch-group:last-child {
  margin-bottom: 0;
}

.row-topic a {
  color: var(--mid);
  text-decoration: underline;
}

.row-topic a:hover,
.row-topic a:focus-visible {
  color: var(--accent);
}

.cover-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
}

.cover-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--line);
}

.cover-caption {
  grid-column: 1 / -1;
  font-size: 14px;
  color: var(--mid);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.entry-block {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}

.entry-block .block-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.entry-block p {
  font-size: 15px;
  color: var(--mid);
  margin: 0;
}

.entry-block p a {
  color: var(--accent);
  text-decoration: underline;
}

.boundary-note p {
  max-width: var(--read);
  color: var(--mid);
}

/* ================= ranking page ================= */

.page-layout {
  display: grid;
  gap: 40px;
}

.rank-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.rank-list-panel,
.rank-caliber-panel {
  min-width: 0;
}

.rank-list-panel h2,
.rank-caliber-panel h2,
.field-section h2,
.entry-section h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 40px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-index {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}

.rank-thumb {
  width: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.rank-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-body .rank-name {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--mid);
}

.rank-caliber-panel {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}

.caliber-lead {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 14px;
}

.caliber-block {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.caliber-block:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.caliber-name {
  font-size: 16px;
  margin-bottom: 6px;
}

.caliber-block p {
  font-size: 14px;
  color: var(--mid);
  margin: 0;
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.field-caption {
  text-align: left;
  font-size: 14px;
  color: var(--mid);
  padding-bottom: 10px;
}

.field-table th,
.field-table td {
  border: 1px solid var(--ink);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.field-table thead th {
  background: var(--dark);
  color: var(--paper);
  font-weight: 700;
}

.field-table tbody th {
  font-family: var(--font-mono);
  font-size: 14px;
  white-space: nowrap;
}

.field-table tbody td {
  color: var(--mid);
}

.field-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--mid);
}

.entry-card {
  display: block;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}

.entry-card:hover,
.entry-card:focus-visible {
  border-color: var(--accent);
}

.entry-card .entry-name {
  font-size: 18px;
  margin-bottom: 8px;
}

.entry-card .entry-desc {
  font-size: 15px;
  color: var(--mid);
  margin: 0;
}

/* ================= guide page ================= */

.guide-map {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--line);
}

.guide-map img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-map figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  font-size: 14px;
  color: var(--mid);
}

.guide-steps .step-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
  align-items: start;
}

.guide-steps .step-index {
  grid-row: span 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: var(--paper);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
}

.guide-steps .step-title {
  font-size: 18px;
  margin-bottom: 6px;
}

.guide-steps .step-text {
  font-size: 15px;
  color: var(--mid);
  margin: 0;
}

.guide-steps .step-text a {
  color: var(--accent);
  text-decoration: underline;
}

.field-item {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--paper);
}

.field-item:last-child {
  margin-bottom: 0;
}

.field-item .field-name {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.field-item .field-name::-webkit-details-marker {
  display: none;
}

.field-item .field-name::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--accent);
}

.field-item[open] .field-name::after {
  content: "−";
}

.field-item .field-desc {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 15px;
  color: var(--mid);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  margin-bottom: 24px;
}

.boundary-columns .boundary-block {
  border: 1px solid var(--ink);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
}

.boundary-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--mid);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.boundary-feedback {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}

.boundary-feedback .boundary-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.boundary-text {
  font-size: 15px;
  color: var(--mid);
  margin: 0;
}

.boundary-text a {
  color: var(--accent);
  text-decoration: underline;
}

.boundary-text a + a {
  margin-left: 10px;
}

.entry-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.entry-item a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
}

.entry-item a:hover,
.entry-item a:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

/* ================= 404 page ================= */

.error-main {
  display: block;
}

.error-block {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 32px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.error-block h1 {
  font-size: 30px;
  margin-bottom: 12px;
}

.error-text {
  max-width: var(--read);
  color: var(--mid);
  margin-bottom: 20px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.btn-primary,
.btn-plain {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--paper);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-plain {
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn-plain:hover,
.btn-plain:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.error-paths h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.error-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.error-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
}

.error-list a:hover,
.error-list a:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

/* ================= responsive ================= */

@media (max-width: 768px) {
  .site-main {
    padding: 0 16px;
  }

  .site-header .brand,
  .site-nav,
  .fact-bar,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-nav {
    flex-wrap: wrap;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    border-top: 1px solid var(--line);
  }

  .nav-link {
    width: 100%;
    padding: 0 4px;
    border-bottom: none;
  }

  .nav-link.is-current {
    border-bottom: none;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 0 32px;
  }

  .hero-title {
    font-size: 26px;
  }

  .ranking-layout,
  .rank-columns,
  .topic-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .rank-item {
    grid-template-columns: 32px 60px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-thumb {
    width: 60px;
  }

  .ranking-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .rank-status {
    grid-column: 2 / -1;
  }

  .page-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 21px;
  }

  .cover-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .field-table {
    font-size: 14px;
  }

  .field-table th,
  .field-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .hero-entries {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-entries .entry-link,
  .topic-entries .entry-link {
    justify-content: center;
  }

  .topic-entries .entry-links {
    flex-direction: column;
    align-items: stretch;
  }

  .cover-grid,
  .topic-cards {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .error-code {
    font-size: 44px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-plain {
    justify-content: center;
  }

  .field-table tbody th {
    white-space: normal;
  }
}
