:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #eee;
  background: #242424;
  --line: #555;
  --muted: #bbb;
  --accent: #90bdf4;
}
.equipment-icon {
  float: right;
  margin: 0 0 12px 12px;
  object-fit: contain;
  border-radius: 5px;
}
.reference-description {
  white-space: pre-line;
  line-height: 1.7;
  overflow-wrap: anywhere;
  max-width: 75ch;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main,
footer {
  max-width: 1200px;
  margin: auto;
  padding: 1.5rem 2rem;
}
header {
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}
nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
}
h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}
p {
  line-height: 1.7;
  max-width: 75ch;
}
.lead,
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  color: var(--accent);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.grid article {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2d2d2d;
}
.grid h2 {
  margin-top: 0.5rem;
}
.actions,
.summary {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.summary {
  padding: 1.5rem 0;
  border-block: 1px solid var(--line);
}
.summary strong {
  font-size: 1.8rem;
  margin-right: 0.4rem;
}
button,
.button {
  background: #205396;
  color: white;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
input {
  min-height: 44px;
  max-width: 100%;
  padding: 0.7rem;
  background: #222;
  color: white;
  border: 1px solid var(--line);
  font: inherit;
  border-radius: 5px;
}
form {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 1.5rem 0;
}
footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
details {
  margin: 1.5rem 0;
  line-height: 1.6;
}
summary {
  cursor: pointer;
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -100px;
}
.skip:focus {
  top: 0;
  background: white;
  color: black;
  padding: 1rem;
}
@media (max-width: 650px) {
  header,
  main,
  footer {
    padding: 1.25rem;
  }
  header {
    flex-wrap: wrap;
    gap: 1rem;
  }
  nav {
    gap: 1rem;
    font-size: 0.85rem;
  }
  th,
  td {
    padding: 0.7rem;
  }
}

nav a,
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.button {
  display: inline-flex;
  align-items: center;
}
body {
  overflow-wrap: anywhere;
}
select {
  font: inherit;
  color: inherit;
  background: #222;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.7rem;
  width: 100%;
}
.library-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 1rem;
  padding: 1.2rem;
  background: #2d2d2d;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.library-filters input {
  width: 100%;
}
.library-filters .actions {
  gap: 0.7rem;
}
.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.breadcrumbs {
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumbs a {
  min-height: 32px;
}
.notice {
  padding: 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
.build-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.build-tags span {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.3rem 0.45rem;
}
.build-library article {
  display: flex;
  flex-direction: column;
  align-items: start;
}
.build-library article p {
  overflow-wrap: anywhere;
}
.card-action {
  margin-top: auto;
  padding-block: 0.8rem;
  min-height: 44px;
}
.pagination {
  margin-block: 2rem;
}
.empty-state {
  padding-block: 2rem;
}
.preserve-lines {
  white-space: pre-wrap;
}
.section {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1rem;
}
.share-link {
  margin-block: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #2d2d2d;
}
.share-link input {
  width: 100%;
  max-width: 700px;
}

/* Community uses native forms and readable editorial rows. */
[hidden] { display: none !important; }
.community-tabs { gap: .5rem; margin: 0 0 2rem; }
.community-tabs a { padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.community-tabs [aria-current=page] { border-color: var(--accent); background: #303c49; color: #fff; }
.forum-search { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.forum-search label:first-child { flex: 1 1 280px; }
.topic-row { display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.topic-row h2 { margin: .3rem 0; font-size: 1.2rem; }
.topic-row p { margin: .25rem 0; }
.topic-row > div { min-width: 0; flex: 1; }
.topic-row a,.forum-post h1 { overflow-wrap: anywhere; }
.reply-count { white-space: nowrap; color: var(--muted); }
.forum-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; max-width: 75ch; }
.forum-post { padding: 1.5rem; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 12px; }
.forum-post h3 { margin-top: 0; }
.forum-compose { max-width: 800px; margin-top: 2rem; }
.forum-compose form,.forum-post form { display: grid; gap: 1rem; margin: 1.25rem 0; }
textarea { font: inherit; color: inherit; background: #292929; border: 1px solid #777; border-radius: 6px; width: 100%; padding: .75rem; resize: vertical; }
.attached-build { display: inline-block; padding: 1rem; margin: 1.5rem 0; border: 1px solid var(--accent); border-radius: 8px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
@media(max-width:600px) { .topic-row { align-items: start; flex-direction: column; gap: .5rem; } .forum-post { padding: 1rem; } .forum-search > * { width: 100%; } }
.forum-post .actions button { background: transparent; border: 1px solid #66809b; color: var(--accent); }
.forum-post .actions [data-delete-topic],.forum-post .actions [data-delete-reply] { color: #f6b8b8; border-color: #805b5b; }
textarea { background: #18212b; }
