:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #17191f;
  --panel-2: #20242c;
  --ink: #f5f1e8;
  --muted: #aeb3bc;
  --line: rgba(255, 255, 255, 0.14);
  --red: #d8443f;
  --blue: #2469c9;
  --yellow: #efbd42;
  --green: #42b883;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 2l19 12-7 2 5 10-4 2-5-10-5 6z' fill='%23f5f1e8' stroke='%23101114' stroke-width='2'/%3E%3Cpath d='M12 5l4 3 3-6 2 10z' fill='%23efbd42' stroke='%23101114' stroke-width='1.4'/%3E%3C/svg%3E")
      3 2,
    auto;
  --cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M4 3l18 11-7 2 5 9-4 3-5-10-6 6z' fill='%23efbd42' stroke='%23101114' stroke-width='2'/%3E%3Cpath d='M11 5l4 3 4-5 1 9z' fill='%23d8443f' stroke='%23101114' stroke-width='1.4'/%3E%3C/svg%3E")
      4 3,
    pointer;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px
      64px,
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--bg);
  color: var(--ink);
  cursor: var(--cursor-default);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.has-drawer {
  overflow: hidden;
}

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

a,
button,
select,
input {
  font: inherit;
}

a,
button,
select {
  cursor: var(--cursor-pointer);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(16, 17, 20, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--yellow) 52%, var(--blue));
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #101114;
  font-weight: 950;
  clip-path: polygon(50% 0, 96% 22%, 86% 100%, 14% 100%, 4% 22%);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: 0.94rem;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  padding: 8px 11px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
}

.main-nav a:hover {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.is-active {
  border-color: rgba(239, 189, 66, 0.78);
  color: var(--ink);
  background: rgba(239, 189, 66, 0.14);
}

main {
  padding-bottom: 56px;
}

.page-view[hidden] {
  display: none !important;
}

.workspace {
  position: relative;
  isolation: isolate;
  max-width: 100vw;
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  gap: 24px;
  padding: clamp(28px, 6vw, 64px);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(16, 17, 20, 0.94) 0%, rgba(16, 17, 20, 0.72) 36%, rgba(16, 17, 20, 0.16) 100%),
    linear-gradient(0deg, #101114 0%, rgba(16, 17, 20, 0.22) 36%),
    url("assets/hero-workbench.png") center / cover no-repeat;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(216, 68, 63, 0.22), transparent 24%),
    linear-gradient(0deg, rgba(36, 105, 201, 0.22), transparent 36%);
  mix-blend-mode: screen;
}

.hero-content {
  min-width: 0;
  width: 100%;
  max-width: 680px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--red);
}

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

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 6vw, 5.4rem);
  line-height: 0.96;
  overflow-wrap: anywhere;
  word-break: break-all;
}

h1 span {
  display: block;
}

.hero-content p {
  max-width: 560px;
  color: #d9dde5;
  font-size: clamp(1rem, 2.1vw, 1.24rem);
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.search-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 660px;
  margin-top: 28px;
  padding: 14px;
  background: rgba(23, 25, 31, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel label,
.sort-box label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #11141a;
  color: var(--ink);
  outline: none;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(239, 189, 66, 0.16);
}

.filter-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.chip.is-active {
  border-color: rgba(239, 189, 66, 0.85);
  background: rgba(239, 189, 66, 0.18);
  color: var(--ink);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  min-width: 0;
  width: 100%;
  max-width: 760px;
}

.status-card {
  padding: 14px;
  background: rgba(16, 17, 20, 0.78);
  border: 1px solid var(--line);
}

.status-card span,
.status-card strong {
  display: block;
}

.status-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.status-card strong {
  margin-top: 8px;
  color: var(--yellow);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.section-shell {
  width: min(1440px, calc(100% - clamp(32px, 8vw, 96px)));
  margin: 42px auto 0;
}

.page-view.section-shell {
  min-height: calc(100vh - 170px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2,
.future-copy h2,
.sources h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

.sort-box {
  display: grid;
  gap: 6px;
  width: min(220px, 42vw);
}

.catalog-controls {
  margin-bottom: 18px;
}

.catalog-controls .search-panel {
  max-width: none;
  margin-top: 0;
  box-shadow: none;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.series-search-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.series-search-panel .search-panel {
  max-width: none;
  margin-top: 0;
  box-shadow: none;
}

.series-search-meta {
  color: var(--muted);
  line-height: 1.6;
}

.series-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.series-result-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 4px 12px;
  min-height: 118px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(23, 25, 31, 0.9);
  color: var(--ink);
  text-align: left;
}

.series-result-card:hover {
  border-color: rgba(239, 189, 66, 0.58);
  background: rgba(239, 189, 66, 0.08);
}

.series-result-card img {
  grid-row: 1 / 4;
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: #eef0f4;
}

.series-result-card span {
  align-self: start;
  width: max-content;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(239, 189, 66, 0.42);
  color: var(--yellow);
  font-size: 0.74rem;
  font-weight: 900;
}

.series-result-card strong {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.series-result-card small {
  color: var(--muted);
  line-height: 1.45;
}

.kit-card,
.series-card,
.knowledge-card,
.tool-card,
.future-card,
.source-list a,
.spec-panel,
.story-panel,
.manual-page,
.gallery-card,
.notes-panel {
  border: 1px solid var(--line);
  background: rgba(23, 25, 31, 0.9);
}

.kit-card {
  overflow: hidden;
}

.series-card {
  overflow: hidden;
  min-height: 154px;
}

.series-card a {
  position: relative;
  display: grid;
  min-height: 154px;
  gap: 10px;
  align-content: space-between;
  padding: 16px;
  color: inherit;
}

.series-card a:hover {
  background:
    linear-gradient(135deg, rgba(239, 189, 66, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.03);
}

.series-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.series-card span,
.series-card i {
  color: var(--yellow);
  font-weight: 950;
  font-style: normal;
}

.series-card i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(239, 189, 66, 0.36);
  background: rgba(239, 189, 66, 0.1);
}

.series-card h3 {
  max-width: 14ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.series-card strong {
  color: var(--ink);
  font-size: 2.8rem;
  line-height: 1;
}

.story-panel a {
  color: var(--yellow);
  font-weight: 800;
}

.kit-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #eef0f4;
}

.kit-image-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: filter 180ms ease;
}

.kit-image-button:hover img {
  filter: brightness(1.06);
}

.kit-image-button span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  background: rgba(16, 17, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--yellow);
  font-weight: 900;
}

.kit-card-body {
  display: grid;
  gap: 11px;
  padding: 14px;
}

.kit-title-row,
.price-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.kit-title-row h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.kit-title-row span {
  color: var(--yellow);
  font-weight: 900;
}

.kit-card p,
.future-card p,
.tool-card p,
.sources p,
.gallery-card span,
.notes-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.kit-card p {
  margin-bottom: 0;
}

.price-row {
  align-items: baseline;
}

.price-row strong,
.future-meta strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.price-row span,
.future-meta em {
  color: var(--green);
  font-style: normal;
  white-space: nowrap;
}

.tag-row span,
.field-list code,
.tool-items b {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d7dce5;
  font-size: 0.78rem;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.empty-state span {
  color: var(--muted);
}

.load-more-panel {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  background: rgba(23, 25, 31, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
}

.load-more-panel button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(239, 189, 66, 0.5);
  background: rgba(239, 189, 66, 0.14);
  color: var(--ink);
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr);
  gap: 24px;
  align-items: start;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(216, 68, 63, 0.16), transparent 38%),
    linear-gradient(315deg, rgba(239, 189, 66, 0.12), transparent 42%),
    var(--panel);
  border-top: 3px solid var(--red);
}

.future-copy {
  position: sticky;
  top: 88px;
}

.future-copy p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.future-list {
  display: grid;
  gap: 10px;
}

.future-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(16, 17, 20, 0.72);
}

.future-card h3 {
  margin: 6px 0;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.future-date {
  color: var(--yellow);
  font-weight: 900;
}

.future-meta {
  display: grid;
  gap: 4px;
  min-width: 110px;
  text-align: right;
}

.future-meta span {
  color: var(--blue);
  font-weight: 950;
}

.future-card a {
  padding: 9px 12px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.knowledge-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.knowledge-path-card {
  min-height: 360px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(23, 25, 31, 0.9);
  color: var(--ink);
  text-align: left;
}

.knowledge-path-card:hover {
  border-color: rgba(239, 189, 66, 0.58);
  background: rgba(239, 189, 66, 0.08);
}

.knowledge-path-card span,
.knowledge-path-card strong {
  display: block;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 950;
}

.knowledge-path-card h3 {
  margin: 8px 0;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.02;
}

.knowledge-path-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.knowledge-steps-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(23, 25, 31, 0.9);
}

.knowledge-steps-head h3 {
  margin: 8px 0 8px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.knowledge-steps-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.knowledge-back-button {
  flex: 0 0 auto;
  padding: 11px 16px;
  border: 1px solid rgba(239, 189, 66, 0.62);
  background: rgba(239, 189, 66, 0.12);
  color: var(--yellow);
  font-weight: 950;
}

.knowledge-back-button:hover {
  background: rgba(239, 189, 66, 0.2);
}

.knowledge-card,
.tool-card {
  padding: 18px;
}

.info-card-image {
  width: calc(100% + 36px);
  margin: -18px -18px 14px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: #11141a;
}

.knowledge-card > span,
.tool-card > span {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
}

.knowledge-card h3,
.tool-card h3 {
  margin: 8px 0 12px;
}

.knowledge-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.tool-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sources {
  display: grid;
  gap: 16px;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.source-list a {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.source-list span {
  font-weight: 800;
}

.source-list small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  visibility: hidden;
}

.detail-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 180ms ease;
}

.detail-drawer.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(980px, 100%);
  height: 100%;
  overflow: auto;
  background: #111318;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

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

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(16, 17, 20, 0.92);
  color: var(--ink);
  font-size: 1.5rem;
}

.close-button {
  position: sticky;
  top: 12px;
  left: calc(100% - 58px);
  z-index: 4;
  margin: 12px 12px 0 auto;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 10px clamp(18px, 4vw, 36px) 24px;
}

.detail-loading {
  display: grid;
  min-height: 55vh;
  align-content: center;
  gap: 12px;
  padding: clamp(28px, 6vw, 64px);
}

.detail-loading h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.02;
}

.detail-loading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(620px, 62vh);
  object-fit: contain;
  background: #eef0f4;
  border: 1px solid var(--line);
}

.detail-hero h2 {
  margin: 10px 0;
  font-size: clamp(1.9rem, 4vw, 3.5rem);
  line-height: 1;
}

.detail-hero p {
  color: var(--muted);
}

.detail-price {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.detail-price strong {
  font-size: 1.4rem;
}

.detail-price span {
  padding: 6px 10px;
  background: rgba(66, 184, 131, 0.14);
  color: #98f0c5;
}

.detail-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px clamp(18px, 4vw, 36px);
  background: rgba(17, 19, 24, 0.94);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.detail-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.detail-tabs button.is-active {
  border-color: var(--yellow);
  background: rgba(239, 189, 66, 0.16);
  color: var(--ink);
}

.detail-body {
  padding: 22px clamp(18px, 4vw, 36px) 42px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.spec-panel,
.story-panel,
.notes-panel {
  padding: 18px;
}

.spec-panel h3,
.story-panel h3,
.notes-panel h3 {
  margin-bottom: 14px;
}

dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

.story-panel p,
.notes-panel p {
  margin-bottom: 0;
}

.story-panel p + .compact-labels,
.compact-labels + .rate-note {
  margin-top: 14px;
}

.compact-labels {
  gap: 8px;
}

.compact-labels div {
  grid-template-columns: 140px minmax(0, 1fr);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-labels dt,
.compact-labels dd {
  font-size: 0.9rem;
}

.manual-stack {
  display: grid;
  gap: 16px;
}

.manual-match-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.manual-match-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f4f1ea;
}

.manual-match-card h3 {
  margin: 8px 0 8px;
  font-size: 1.2rem;
}

.manual-match-card p {
  color: var(--muted);
}

.manual-match-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.manual-match-meta b,
.manual-match-meta span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
}

.manual-match-meta b {
  border-color: rgba(239, 189, 66, 0.54);
  color: var(--yellow);
}

.manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.manual-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(239, 189, 66, 0.5);
  background: rgba(239, 189, 66, 0.12);
  color: var(--ink);
  font-weight: 800;
}

.notes-panel code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  background: #0c0e12;
  border: 1px solid var(--line);
  color: #98f0c5;
  overflow-wrap: anywhere;
}

.manual-page {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.manual-art {
  display: grid;
  gap: 14px;
  min-height: 300px;
  padding: 16px;
  background: #f4f1ea;
  color: #15171d;
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 6px #ffffff;
}

.manual-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  border-bottom: 3px solid #15171d;
  padding-bottom: 8px;
}

.manual-diagram {
  position: relative;
  min-height: 150px;
  border: 2px solid #15171d;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px) 0 0 / 18px 18px;
}

.manual-diagram i {
  position: absolute;
  display: block;
  border: 3px solid #15171d;
  background: #dfe5ec;
}

.manual-diagram i:nth-child(1) {
  width: 58px;
  height: 78px;
  left: 30px;
  top: 34px;
  transform: skewY(-10deg);
}

.manual-diagram i:nth-child(2) {
  width: 92px;
  height: 36px;
  right: 34px;
  top: 38px;
  transform: rotate(-8deg);
}

.manual-diagram i:nth-child(3) {
  width: 72px;
  height: 44px;
  right: 56px;
  bottom: 28px;
  transform: rotate(10deg);
}

.manual-diagram i:nth-child(4) {
  width: 0;
  height: 0;
  left: 106px;
  top: 72px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 72px solid #d8443f;
  background: transparent;
}

.manual-lines {
  display: grid;
  gap: 7px;
}

.manual-lines span {
  display: block;
  height: 8px;
  background: #15171d;
}

.manual-lines span:nth-child(2) {
  width: 82%;
}

.manual-lines span:nth-child(3) {
  width: 68%;
}

.manual-lines span:nth-child(4) {
  width: 46%;
}

.manual-copy {
  align-self: center;
}

.manual-copy > span {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
}

.manual-copy h3 {
  margin: 8px 0 16px;
  font-size: 1.5rem;
}

.manual-copy dl div {
  grid-template-columns: 82px minmax(0, 1fr);
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-card {
  margin: 0;
  overflow: hidden;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-card figcaption {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.rate-note {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace {
    min-height: auto;
    padding-top: 92px;
  }

  .hero-media {
    background-position: 62% center;
  }

  .status-grid,
  .overview-grid,
  .detail-hero,
  .manual-match-card,
  .manual-page,
  .split-section {
    grid-template-columns: 1fr;
  }

  .future-copy {
    position: static;
  }

  .future-card {
    grid-template-columns: 1fr;
  }

  .future-meta {
    text-align: left;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-steps-head {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-back-button {
    width: 100%;
  }

  .sort-box {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .main-nav a {
    padding: 7px 8px;
    font-size: 0.82rem;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: 1.06;
  }

  .hero-content p {
    font-size: 1rem;
    max-width: 320px;
  }

  .chip {
    flex: 1 1 calc((100% - 8px) / 2);
    min-width: 0;
    padding-inline: 8px;
  }

  .section-shell {
    width: calc(100% - 28px);
    margin-top: 30px;
  }

  .search-panel {
    padding: 12px;
  }

  dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
