/* Shared layout for the ElyCraft portal, wiki and shop. */
:root[data-theme="dark"] {
  --paper: #0c1016;
  --panel: #151c26;
  --line: #2b3645;
  --ink: #edf2f8;
  --muted: #b0bdcc;
  --link: #a9ceff;
  font-family: system-ui, "Segoe UI", sans-serif;
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--paper); line-height: 1.55; }
[data-theme="dark"] .header {
  position: relative;
  inset: auto;
  width: min(1120px, calc(100% - 48px));
  margin: 20px auto 0;
  background: #10161f;
  border: 1px solid var(--line);
  padding: 8px 12px;
  min-height: 60px;
  gap: 12px;
}
.header .brand { white-space: nowrap; gap: 8px; font-size: 1.1rem; font-weight: 650; }
.header .brand img { width: 36px; height: 36px; }
.header nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; font-size: .9rem; font-weight: 550; }
[data-theme="dark"] .header nav a { padding: 8px 10px; border-radius: 6px; color: var(--muted); }
[data-theme="dark"] .header nav a[aria-current="page"] { color: var(--ink); background: #202b3a; }
[data-theme="dark"] :focus-visible { outline: 2px solid #a9ceff; outline-offset: 3px; }
[hidden] { display: none !important; }
.portal-main, .donate-layout, .wiki-layout { padding-top: clamp(32px, 5vw, 56px); }
.portal-main { min-height: 52vh; }
.portal-main h1, .donate-intro h1, .wiki-article h1 {
  font-family: inherit;
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1.13;
}
.portal-main p { max-width: 74ch; }
.portal-main :is(p,li) a { color: var(--link); text-decoration: underline; text-underline-offset: .2em; }
.portal-main :is(code,pre) { overflow-wrap: anywhere; }
body > main > .hero:has(.wordmark) { padding-top: 40px; }
[data-theme="dark"] .network-footer { background: #0a0e14; }
@media (max-width: 760px) {
  [data-theme="dark"] .header {
    width: calc(100% - 24px);
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }
  .header nav { grid-row: 2; grid-column: 1 / -1; justify-content: start; }
  [data-theme="dark"] .header nav a { padding: 6px 8px; }
  .header .header-tools { grid-column: 2; grid-row: 1; }
  body > main > .hero:has(.wordmark) { padding-top: 28px; min-height: 0; }
}
@media (max-width: 360px) {
  .footer-links { grid-template-columns: 1fr; }
}
