/* ==========================================================
   变形金刚资料库 — wiki stylesheet
   A quiet, readable wiki layout.
   ========================================================== */

:root {
  --page: #f4f3ef;
  --paper: #ffffff;
  --text: #202122;
  --muted: #54595d;
  --faint: #72777d;
  --border: #a2a9b1;
  --border-light: #c8ccd1;
  --line: #eaecf0;
  --link: #3366cc;
  --link-visited: #795cb2;
  --link-hover: #4477dd;
  --red: #b32424;
  --red-dark: #8a1c1c;
  --green: #2f6b45;
  --amber: #8a5a18;
  --blue-soft: #eaf3ff;
  --gray-soft: #f8f9fa;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --content-width: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:visited { color: var(--link-visited); }
a.new { color: var(--red); }
p { margin: 0 0 1em; }
ul, ol { margin: 0.4em 0 1em; padding-left: 1.6em; }
li { margin-bottom: 0.25em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.35; color: #101418; }
h2 { margin: 1.5em 0 0.55em; font-size: 1.45rem; border-bottom: 1px solid var(--border-light); padding-bottom: 0.2em; }
h3 { margin: 1.25em 0 0.45em; font-size: 1.12rem; }
strong { font-weight: 600; }
code, kbd { font-family: var(--mono); }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000;
  background: var(--paper); color: var(--text); padding: 8px 14px;
  border: 1px solid var(--border); transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

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

/* ------------------------------ Header ------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}
.header-inner {
  width: min(var(--content-width), calc(100% - 40px));
  height: 64px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
}
.wordmark { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text); }
.wordmark:hover { text-decoration: none; color: var(--text); }
.wordmark-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--red); color: #fff;
  font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: -0.04em;
  border-radius: 2px;
}
.wordmark-text { display: flex; flex-direction: column; line-height: 1.15; }
.wordmark-text strong { font-family: var(--serif); font-size: 16px; letter-spacing: 0.04em; }
.wordmark-text small { color: var(--faint); font-family: var(--sans); font-size: 8px; letter-spacing: 0.18em; margin-top: 2px; }

.search-form { display: flex; flex: 1; max-width: 480px; height: 34px; }
.search-form input {
  flex: 1; min-width: 0; padding: 0 10px;
  border: 1px solid var(--border); border-right: 0;
  background: #fff; color: var(--text);
  font-family: var(--sans); font-size: 13px; outline: none;
}
.search-form input:focus { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.search-form button {
  padding: 0 14px; border: 1px solid var(--border);
  background: var(--gray-soft); color: var(--muted);
  font-family: var(--sans); font-size: 12px; cursor: pointer;
}
.search-form button:hover { background: #eef1f4; color: var(--text); }

.top-links { display: flex; gap: 18px; margin-left: auto; }
.top-links a { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.top-links a:hover { color: var(--link); text-decoration: none; }

.menu-toggle {
  display: none; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--border-light); background: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.menu-toggle span { width: 16px; height: 1px; background: var(--text); }

/* ------------------------------ Layout ------------------------------ */

.site-body {
  width: min(var(--content-width), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0 60px;
  align-items: start;
}
.sidebar {
  position: sticky; top: 88px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.6;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 4px;
}
.sidebar-section { margin-bottom: 22px; }
.sidebar h2 {
  margin: 0 0 6px; padding-bottom: 4px;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  color: var(--faint); letter-spacing: 0.12em;
  border-bottom: 1px solid var(--border-light);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0; }
.sidebar a {
  display: block; padding: 3px 8px; margin-left: -8px;
  color: var(--muted); border-left: 2px solid transparent;
}
.sidebar a:hover { color: var(--link); background: #eef3fa; text-decoration: none; }
.sidebar a.active { color: var(--red); border-left-color: var(--red); background: #fbf1f1; font-weight: 600; }

.content {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--border-light);
  padding: 30px 38px 42px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* ------------------------------ Breadcrumb / headings ------------------------------ */

.breadcrumb {
  font-family: var(--sans); font-size: 11.5px; color: var(--faint);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb span { color: var(--faint); margin: 0 4px; }
.article-head { margin-bottom: 18px; }
.article-head h1 {
  margin: 0; padding-bottom: 8px;
  font-size: clamp(1.9rem, 3.4vw, 2.45rem);
  font-weight: 600; letter-spacing: -0.015em;
  border-bottom: 1px solid var(--border);
}
.article-sub {
  margin: 7px 0 0; color: var(--faint);
  font-family: var(--sans); font-size: 12px;
}
.article-body { position: relative; max-width: 100%; }
.lead { font-size: 16.5px; line-height: 1.8; margin-bottom: 1.1em; }

/* ------------------------------ Infobox ------------------------------ */

.infobox {
  float: right;
  width: 306px;
  margin: 0 0 20px 28px;
  border: 1px solid var(--border);
  border-collapse: collapse;
  background: var(--gray-soft);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.55;
}
.infobox caption {
  padding: 10px 12px;
  background: #eef1f4;
  border: 1px solid var(--border);
  border-bottom: 0;
  font-family: var(--serif); font-size: 18px; font-weight: 600;
  text-align: center;
}
.infobox caption span {
  display: block; margin-top: 2px;
  font-family: var(--sans); font-size: 10px; font-weight: 400;
  letter-spacing: 0.08em; color: var(--faint);
}
.infobox th, .infobox td { padding: 7px 10px; vertical-align: top; border-top: 1px solid var(--border-light); }
.infobox th {
  width: 34%; text-align: left; font-weight: 600; color: var(--muted);
  background: #f1f3f5;
}
.infobox td { color: var(--text); }
.infobox tr:first-child th, .infobox tr:first-child td { border-top: 0; }
.infobox td.infobox-picture { padding: 0; background: #fff; border-top: 1px solid var(--border-light); }
.infobox tr.infobox-picture:first-child td { border-top: 0; }
.infobox-image {
  padding: 10px; text-align: center;
  border-top: 1px solid var(--border-light);
  background: #fff;
}
.infobox-image img { max-height: 320px; margin: 0 auto; object-fit: contain; }
.infobox-image.noimage {
  padding: 40px 12px; color: var(--faint);
  font-family: var(--sans); font-size: 12px;
}
.image-credit {
  margin-top: 5px; color: var(--faint);
  font-family: var(--sans); font-size: 9.5px; line-height: 1.45;
}
.image-credit a { color: var(--faint); text-decoration: underline; }

/* ------------------------------ TOC / lists ------------------------------ */

.toc {
  display: inline-block;
  min-width: 240px;
  margin: 6px 0 22px;
  padding: 12px 18px 12px 14px;
  border: 1px solid var(--border-light);
  background: var(--gray-soft);
  font-family: var(--sans); font-size: 12.5px;
}
.toc-title { font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 1px 0; }
.toc a { color: var(--link); }

.plain-list { margin: 0.5em 0 1.2em; }
.plain-list.two-col { columns: 2; column-gap: 36px; }
.references { font-size: 13px; color: var(--muted); }
.references li { margin-bottom: 5px; }
.article-footer {
  clear: both; margin-top: 34px; padding-top: 14px;
  border-top: 1px solid var(--border-light);
  color: var(--faint); font-family: var(--sans); font-size: 11px; line-height: 1.65;
}
.article-footer p { margin-bottom: 4px; }
.categories { color: var(--muted); }

/* ------------------------------ Home ------------------------------ */

.home-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 42px; align-items: center;
  padding-bottom: 24px; border-bottom: 1px solid var(--border-light);
}
.home-kicker { color: var(--red); font-family: var(--sans); font-size: 11px; letter-spacing: 0.16em; margin-bottom: 8px; }
.home-intro h1 {
  margin: 0 0 14px; font-size: clamp(2.3rem, 5vw, 3.5rem);
  line-height: 1.1; letter-spacing: -0.03em; font-weight: 600;
}
.home-lead { max-width: 42em; color: var(--muted); font-size: 15.5px; line-height: 1.9; }
.home-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-family: var(--sans); font-size: 13px; }
.home-featured { border-left: 1px solid var(--border-light); padding-left: 28px; }
.featured-label { color: var(--faint); font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.home-featured img { max-height: 230px; width: auto; margin: 10px auto 12px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.12)); }
.home-featured h2 { margin: 0; border: 0; padding: 0; font-size: 1.5rem; }
.home-featured p { color: var(--muted); font-size: 13px; line-height: 1.75; margin-top: 4px; }

.notice {
  margin: 22px 0;
  padding: 12px 16px;
  border: 1px solid #c8d9ee;
  border-left: 4px solid #6b9bd1;
  background: #f2f7fd;
  color: #31465f;
  font-family: var(--sans); font-size: 12.5px; line-height: 1.7;
}
.notice.compact { margin: 14px 0 20px; }
.notice a { color: #245b9e; }

.movie-feature {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  margin: 24px 0 0; padding: 20px 24px;
  border: 1px solid var(--border-light); border-left: 4px solid var(--red);
  background: #fff;
}
.movie-feature h2 { margin: 0 0 4px; border: 0; padding: 0; font-size: 1.55rem; }
.movie-feature p { max-width: 620px; margin: 0; color: var(--muted); font-family: var(--sans); font-size: 12.5px; line-height: 1.75; }
.movie-feature .home-kicker { margin-bottom: 4px; }
.movie-feature-link { flex-shrink: 0; font-family: var(--sans); font-size: 12.5px; white-space: nowrap; }
.movie-faces { display: flex; gap: 6px; flex-shrink: 0; }
.movie-faces a { display: block; width: 52px; height: 68px; border: 1px solid var(--border-light); background: var(--gray-soft); }
.movie-faces img { width: 100%; height: 100%; object-fit: contain; }
.home-section { margin-top: 34px; }

/* Movie portal */
.movie-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 18px 0 14px; padding: 10px 0;
  border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
  font-family: var(--sans); font-size: 11px; color: var(--faint);
}
.movie-toolbar .chip-group { display: flex; flex-wrap: wrap; gap: 5px; }
.movie-toolbar .result-count { margin-left: auto; }
.movie-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0 30px; }
.movie-card { display: flex; flex-direction: column; border: 1px solid var(--border-light); background: #fff; }
.movie-card:hover { border-color: var(--border); }
.movie-card-image { display: flex; align-items: center; justify-content: center; height: 190px; padding: 10px; background: var(--gray-soft); border-bottom: 1px solid var(--line); }
.movie-card-image img { max-width: 100%; max-height: 170px; object-fit: contain; }
.movie-card-body { padding: 12px 14px 14px; }
.film-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.film-badge { padding: 1px 5px; border: 1px solid #d9c2c2; background: #fbf1f1; color: var(--red); font-family: var(--sans); font-size: 9px; }
.movie-card h2 { margin: 0; border: 0; padding: 0; font-size: 17px; line-height: 1.35; }
.movie-card h2 span { display: block; color: var(--faint); font-family: var(--sans); font-size: 9px; font-weight: 400; letter-spacing: 0.04em; }
.movie-meta { margin: 5px 0 6px; color: var(--faint); font-family: var(--sans); font-size: 10.5px; }
.movie-card-body > p:not(.movie-meta) { margin-bottom: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.movie-status { display: inline-block; color: var(--faint); font-family: var(--sans); font-size: 10px; }
.film-roster-table td:first-child { white-space: nowrap; }
.film-roster-table td:last-child { font-size: 11.5px; line-height: 1.8; }
.film-history { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 12px; }
.film-history-item { padding: 12px 0; border-top: 1px solid var(--line); }
.film-history-item h3 { margin: 0 0 4px; font-size: 1rem; }
.film-history-item p { color: var(--muted); font-size: 12.5px; line-height: 1.75; margin-bottom: 5px; }
.film-history-roster { font-family: var(--sans); font-size: 10.5px !important; color: var(--faint) !important; }
.section-link { font-family: var(--sans); font-size: 11.5px; }
.section-heading {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 14px; border-bottom: 1px solid var(--border-light);
}
.section-heading h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 1.35rem; }
.section-heading span { color: var(--faint); font-family: var(--sans); font-size: 11px; }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.topic-card {
  display: block; padding: 16px 16px 14px;
  border: 1px solid var(--border-light);
  background: #fff; color: var(--text);
  transition: border-color .15s, background .15s;
}
.topic-card:hover { border-color: var(--border); background: var(--gray-soft); text-decoration: none; }
.topic-no { display: block; color: var(--red); font-family: var(--mono); font-size: 10px; margin-bottom: 8px; }
.topic-card strong { display: block; font-family: var(--serif); font-size: 19px; }
.topic-card p { margin: 4px 0 10px; color: var(--muted); font-family: var(--sans); font-size: 11.5px; line-height: 1.65; min-height: 4.8em; }
.topic-card em { color: var(--link); font-family: var(--sans); font-size: 11.5px; font-style: normal; }

.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.era-list, .fact-list, .update-list { list-style: none; margin: 0; padding: 0; }
.era-list li { border-top: 1px solid var(--line); }
.era-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; color: var(--text); }
.era-list a:hover { text-decoration: none; background: #fafbfc; }
.era-list strong { font-family: var(--serif); font-size: 15px; }
.era-list span { color: var(--faint); font-family: var(--mono); font-size: 10px; align-self: center; }
.era-list small { grid-column: 1 / -1; color: var(--muted); font-family: var(--sans); font-size: 11.5px; }
.fact-list li { position: relative; padding: 8px 0 8px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.fact-list li::before { content: "·"; position: absolute; left: 2px; top: 6px; color: var(--red); font-size: 20px; }
.update-list { border-top: 1px solid var(--line); }
.update-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.update-list span { flex-shrink: 0; padding: 1px 5px; border: 1px solid var(--border-light); color: var(--faint); font-family: var(--sans); font-size: 9px; }
.update-list a { font-size: 14px; }
.update-list small { flex-basis: 100%; color: var(--faint); font-family: var(--sans); font-size: 11px; }
.source-note p { color: var(--muted); font-size: 13.5px; }

/* ------------------------------ Index / tables ------------------------------ */

.index-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin: 8px 0 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.filter-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 480px; font-family: var(--sans); font-size: 12px; }
.filter-search span { color: var(--faint); flex-shrink: 0; }
.filter-search input {
  flex: 1; height: 32px; padding: 0 9px;
  border: 1px solid var(--border); background: #fff;
  font-family: var(--sans); font-size: 12.5px; outline: none;
}
.filter-search input:focus { border-color: var(--link); }
.filter-actions { display: flex; align-items: center; gap: 14px; }
.text-button { border: 0; background: none; color: var(--link); font-family: var(--sans); font-size: 11.5px; cursor: pointer; padding: 0; }
.text-button:hover { text-decoration: underline; }
.result-count { color: var(--faint); font-family: var(--sans); font-size: 11px; white-space: nowrap; }
.filter-groups { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.filter-group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.filter-group > span { width: 34px; color: var(--faint); font-family: var(--sans); font-size: 11px; }
.chip {
  padding: 2px 8px; border: 1px solid var(--border-light);
  background: #fff; color: var(--muted);
  font-family: var(--sans); font-size: 11px; cursor: pointer;
}
.chip span { color: var(--faint); margin-left: 3px; }
.chip:hover { border-color: var(--border); color: var(--text); }
.chip.active { border-color: var(--red); background: #fbf1f1; color: var(--red); }

.table-wrap { max-width: 100%; overflow-x: auto; margin: 8px 0 14px; }
.wikitable {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--sans); font-size: 12px; line-height: 1.5;
}
.wikitable th, .wikitable td { padding: 7px 9px; border: 1px solid var(--border-light); text-align: left; vertical-align: middle; }
.wikitable th { background: #eaecf0; color: var(--text); font-weight: 600; white-space: nowrap; }
.wikitable tbody tr:hover { background: #f8fafc; }
.character-table .col-img { width: 58px; padding: 4px 6px; }
.character-table .col-img img { width: 44px; height: 56px; object-fit: contain; margin: 0 auto; }
.character-table th:nth-child(3), .character-table td:nth-child(3),
.character-table th:nth-child(4), .character-table td:nth-child(4) { white-space: nowrap; }
.character-table .col-name { min-width: 150px; }
.character-table .col-name a { font-family: var(--serif); font-size: 14px; }
.character-table .col-name span { display: block; color: var(--faint); font-size: 9.5px; letter-spacing: 0.02em; }
.character-table .col-first { min-width: 180px; color: var(--muted); font-size: 11px; }
.thumb-placeholder { display: block; text-align: center; color: var(--faint); }
.table-note { color: var(--faint); font-family: var(--sans); font-size: 11px; }
.member-table .col-img { width: 58px; }
.member-table img { width: 44px; height: 56px; object-fit: contain; margin: auto; }
.en-sub { display: block; color: var(--faint); font-size: 9.5px; }
.source-table td { font-size: 11px; }
.source-table td:first-child { white-space: nowrap; }

/* ------------------------------ Timeline ------------------------------ */

.timeline { list-style: none; margin: 20px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 86px; top: 6px; bottom: 6px; width: 1px; background: var(--border-light); }
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 22px; padding-bottom: 24px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 81px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--red);
}
.timeline-year { padding-top: 4px; text-align: right; color: var(--red); font-family: var(--mono); font-size: 11px; }
.timeline-body { padding-left: 10px; }
.timeline-body h2 { margin: 0 0 4px; border: 0; padding: 0; font-size: 1.12rem; }
.timeline-body p { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.timeline-tag { display: inline-block; padding: 1px 6px; border: 1px solid var(--border-light); color: var(--faint); font-family: var(--sans); font-size: 9px; }

/* ------------------------------ Glossary ------------------------------ */

.glossary-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 12px 0 22px; padding: 10px;
  border: 1px solid var(--border-light); background: var(--gray-soft);
}
.glossary-nav a { font-family: var(--sans); font-size: 11px; padding: 1px 5px; }
.glossary-list { margin: 0; }
.glossary-entry {
  display: grid; grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px; padding: 14px 0;
  border-top: 1px solid var(--line);
}
.glossary-entry dt { font-weight: 600; font-size: 15px; }
.glossary-entry dt span { display: block; color: var(--faint); font-family: var(--sans); font-size: 10px; font-weight: 400; letter-spacing: 0.04em; }
.glossary-entry dd { margin: 0; color: var(--muted); font-size: 13.5px; }
.glossary-links { margin-top: 4px; font-family: var(--sans); font-size: 10.5px; color: var(--faint); }
.glossary-links a { margin-right: 6px; }

/* ------------------------------ Search ------------------------------ */

.search-page-form { display: flex; align-items: center; gap: 8px; max-width: 620px; margin: 18px 0 10px; font-family: var(--sans); font-size: 12px; }
.search-page-form label { color: var(--faint); }
.search-page-form input { flex: 1; height: 36px; padding: 0 10px; border: 1px solid var(--border); font-family: var(--sans); font-size: 13px; }
.search-page-form button { height: 36px; padding: 0 16px; border: 1px solid var(--border); background: var(--gray-soft); color: var(--muted); font-family: var(--sans); font-size: 12px; cursor: pointer; }
.search-hint { color: var(--faint); font-family: var(--sans); font-size: 12px; }
.search-results { margin-top: 20px; border-top: 1px solid var(--border-light); }
.search-result { padding: 14px 0; border-bottom: 1px solid var(--line); }
.search-result .type { display: inline-block; margin-right: 8px; padding: 1px 5px; border: 1px solid var(--border-light); color: var(--faint); font-family: var(--sans); font-size: 9px; }
.search-result h3 { margin: 0; font-size: 1.1rem; }
.search-result h3 span { color: var(--faint); font-family: var(--sans); font-size: 10px; font-weight: 400; margin-left: 6px; }
.search-result p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.search-empty { padding: 30px 0; color: var(--faint); font-family: var(--sans); font-size: 13px; }

/* ------------------------------ Prose / about ------------------------------ */

.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { color: #2f3438; }
.faction-article .lead { max-width: 760px; }

/* ------------------------------ Footer ------------------------------ */

.site-footer { border-top: 1px solid var(--border-light); background: #fff; }
.footer-inner {
  width: min(var(--content-width), calc(100% - 40px)); margin: 0 auto;
  padding: 22px 0 34px;
  color: var(--faint); font-family: var(--sans); font-size: 10.5px; line-height: 1.7;
}
.footer-inner p { margin-bottom: 4px; }
.footer-inner a { color: var(--muted); }

/* ------------------------------ Responsive ------------------------------ */

@media (max-width: 1100px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .home-hero { gap: 28px; }
  .home-featured { padding-left: 20px; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .movie-faces { display: none; }
}

@media (max-width: 900px) {
  .header-inner { width: calc(100% - 24px); gap: 12px; }
  .wordmark-text small { display: none; }
  .top-links { display: none; }
  .menu-toggle { display: flex; margin-left: auto; }
  .search-form { max-width: none; }
  .site-body { width: calc(100% - 24px); grid-template-columns: 1fr; gap: 14px; padding-top: 14px; }
  .sidebar {
    position: fixed; z-index: 60; top: 64px; left: 0; bottom: 0;
    width: 260px; max-height: none; padding: 18px 16px 30px;
    background: #fff; border-right: 1px solid var(--border);
    transform: translateX(-102%); transition: transform .2s ease;
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 12px 0 30px rgba(0,0,0,.12); }
  .content { padding: 22px 22px 32px; }
  .home-hero { grid-template-columns: 1fr; }
  .home-featured { border-left: 0; border-top: 1px solid var(--border-light); padding: 18px 0 0; }
  .home-featured img { max-height: 200px; margin-left: 0; }
  .home-columns { grid-template-columns: 1fr; gap: 8px; }
  .movie-feature { display: block; }
  .movie-feature-link { display: inline-block; margin-top: 8px; }
}

@media (max-width: 680px) {
  .movie-grid { grid-template-columns: 1fr; }
  .movie-card-image { height: 170px; }
  .movie-card-image img { max-height: 150px; }
  .film-history { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  html { scroll-padding-top: 112px; }
  .header-inner { height: auto; min-height: 58px; flex-wrap: wrap; padding: 7px 0; row-gap: 6px; }
  .wordmark-mark { width: 30px; height: 30px; font-size: 14px; }
  .wordmark-text strong { font-size: 14px; }
  .search-form { order: 3; flex: 1 0 100%; max-width: none; height: 32px; }
  .search-form button { padding: 0 10px; }
  .menu-toggle { margin-left: auto; flex-shrink: 0; }
  .sidebar { top: 104px; }
  .site-body { padding-bottom: 36px; }
  .content { padding: 18px 15px 28px; }
  .article-head h1 { font-size: 1.75rem; }
  .infobox { float: none; width: 100%; margin: 0 0 18px; }
  .infobox-image img { max-height: 300px; }
  .toc { display: block; width: 100%; }
  .plain-list.two-col { columns: 1; }
  .home-intro h1 { font-size: 2.35rem; }
  .home-lead { font-size: 14.5px; }
  .home-links { gap: 12px; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card p { min-height: 0; }
  .index-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-search { max-width: none; }
  .filter-actions { justify-content: space-between; }
  .filter-group > span { width: 100%; }
  .character-table { font-size: 11px; }
  .character-table th:nth-child(5), .character-table td:nth-child(5),
  .character-table th:nth-child(6), .character-table td:nth-child(6) { display: none; }
  .character-table .col-first { min-width: 120px; }
  .timeline::before { left: 54px; }
  .timeline li { grid-template-columns: 42px 1fr; gap: 14px; }
  .timeline li::before { left: 49px; }
  .timeline-year { font-size: 9px; }
  .timeline-body { padding-left: 6px; }
  .glossary-entry { grid-template-columns: 1fr; gap: 4px; }
  .glossary-nav { max-height: 120px; overflow-y: auto; }
  .search-page-form { flex-wrap: wrap; }
  .search-page-form input { flex-basis: 100%; }
  .source-table td { font-size: 10px; }
}

@media print {
  .site-header, .sidebar, .site-footer, .menu-toggle, .search-form, .breadcrumb { display: none !important; }
  .site-body { display: block; width: 100%; padding: 0; }
  .content { border: 0; padding: 0; box-shadow: none; }
  .infobox { width: 260px; }
  a { color: #000; text-decoration: none; }
}
