:root {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #edf2f7;
  background: #111518;
  color-scheme: dark;
  --paper: #111518;
  --surface: #191f24;
  --surface-muted: #202830;
  --cat-bg: #12171b;
  --ink: #edf2f7;
  --dark-band: #0b0e10;
  --dark-ink: #edf2f7;
  --dark-muted: #9aa5b1;
  --line: #2a323a;
  --muted: #9aa5b1;
  --accent: #e59a3c;
  --endfield: #e59a3c;
  --endfield-bg: #282117;
  --endfield-ink: #f6c478;
  --wuwa: #4db8d9;
  --wuwa-bg: #16272e;
  --wuwa-ink: #82d4ed;
  --radius: 2px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

button,
input,
select {
  font: inherit;
}

a,
button,
input,
select {
  outline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
}

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

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

p {
  line-height: 1.7;
}

.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;
}

.wrap {
  max-width: 1200px;
  margin: auto;
  padding-left: 36px;
  padding-right: 36px;
}

.preview-bar {
  background: #181e23;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 7px 15px;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
  border-bottom: 2px solid var(--line);
}

.brand {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.site-header nav a:hover {
  color: var(--ink);
}

.site-header nav a:last-child {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.eyebrow,
.story-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--accent);
}

.story-label {
  color: var(--accent);
  line-height: 1.6;
}

.story-label span {
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.card.lime .story-label {
  color: var(--endfield);
}

.card.blue .story-label {
  color: var(--wuwa);
}

/* Home Intro & Inline Search */
.home-intro {
  padding-top: 32px;
  padding-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.intro-copy {
  max-width: 560px;
}

.home-intro .eyebrow {
  margin-bottom: 10px;
}

.home-intro h1 {
  font-weight: 700;
  font-size: 40px;
  margin: 0 0 10px;
  line-height: 1.14;
}

.intro-copy > p:last-child {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.home-search {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 410px;
}

.home-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid #333c46;
  border-right: 0;
  background: var(--cat-bg);
  color: var(--ink);
  font-size: 13px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.home-search input::placeholder {
  color: #707c8a;
}

.home-search .button {
  padding: 11px 18px;
  white-space: nowrap;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Dual-Game Portal */
.portals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 26px;
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--endfield);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-card.blue {
  border-top-color: var(--wuwa);
}

.portal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.portal-head h2 {
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 4px;
  line-height: 1.25;
}

.portal-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.portal-all {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--endfield);
  white-space: nowrap;
  padding-top: 2px;
}

.portal-card.blue .portal-all {
  color: var(--wuwa);
}

.game-abbr {
  flex-shrink: 0;
  width: 54px;
  height: 46px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  background: var(--endfield-bg);
  color: var(--endfield-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-left: 3px solid var(--endfield);
  border-radius: var(--radius);
}

.blue .game-abbr {
  background: var(--wuwa-bg);
  color: var(--wuwa-ink);
  border-color: var(--wuwa);
}

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

.portal-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--cat-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  min-height: 38px;
}

.portal-cats a:hover {
  background: var(--surface-muted);
  text-decoration: none;
  border-color: #3f4b57;
}

/* Dark Obsidian Featured Guide Band */
.featured-wrap {
  padding-bottom: 10px;
}

.featured-band {
  background: var(--dark-band);
  color: var(--dark-ink);
  padding: 24px 28px 26px;
  border: 1px solid #303942;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.featured-rule {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.featured-rule span:last-child {
  font-weight: 400;
}

.featured-body {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 28px;
  align-items: end;
}

.featured-band .story-label {
  color: var(--endfield);
  margin-bottom: 8px;
}

.featured-band .story-label.blue {
  color: var(--wuwa);
}

.featured-band .story-label span {
  color: var(--dark-muted);
}

.featured-band h2 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
  max-width: 660px;
}

.featured-excerpt {
  font-size: 14px;
  color: var(--dark-muted);
  margin: 0;
  max-width: 600px;
  line-height: 1.65;
}

.featured-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-size: 11px;
  color: var(--dark-muted);
}

.featured-meta a {
  background: var(--accent);
  color: #111518;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: var(--radius);
}

.featured-meta a:hover {
  background: #f0ad54;
  text-decoration: none;
}

/* Latest Updates Grid */
.section {
  padding-top: 32px;
  padding-bottom: 44px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 2px solid var(--line);
  padding-top: 16px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-weight: 700;
  font-size: 24px;
  margin: 0;
}

.section-heading > a {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--muted);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}

.card.lime {
  border-top-color: var(--endfield);
}

.card.blue {
  border-top-color: var(--wuwa);
}

.card > a {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card a:hover {
  text-decoration: none;
}

.card a:hover h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.card-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h3 {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  margin: 10px 0 9px;
}

.card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 14px;
}

.meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.editorial-note {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  padding-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: baseline;
}

.editorial-note h2 {
  font-size: 15px;
  margin: 0;
}

.editorial-note p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.editorial-note > a {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
}

footer {
  border-top: 2px solid var(--line);
  padding-top: 25px;
  padding-bottom: 25px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

footer .brand {
  font-size: 22px;
}

footer p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

footer > div {
  display: flex;
  margin-left: auto;
  gap: 20px;
  font-size: 11px;
  color: #cbd5e1;
}

footer small {
  flex-basis: 100%;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

/* Subpages */
.page-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin: 15px 0 20px;
  max-width: 900px;
}

.intro {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
}

.source-link {
  font-size: 12px;
  color: var(--accent);
}

.game-subnav {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 28px 0 0;
  gap: 0 26px;
}

.game-subnav a {
  font-size: 13px;
  padding: 15px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}

.game-subnav a:hover {
  color: var(--ink);
}

.game-subnav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.filters {
  display: flex;
  align-items: end;
  gap: 16px;
  margin: 28px 0 20px;
}

.filters label:first-child {
  flex: 1;
}

.filters label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters input,
.filters select,
.preview-form input {
  padding: 12px;
  border: 1px solid #333c46;
  background: var(--cat-bg);
  color: var(--ink);
  min-width: 0;
  border-radius: var(--radius);
}

.button {
  background: var(--accent);
  color: #111518;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.button:hover {
  background: #f0ad54;
  border-color: #f0ad54;
  text-decoration: none;
}

.results {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 26px;
}

.notice {
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  line-height: 1.7;
  margin: 22px 0;
  font-size: 14px;
  color: var(--ink);
}

.pagination {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  font-size: 13px;
}

.article {
  max-width: 830px;
  padding-top: 40px;
  padding-bottom: 60px;
}

.article h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin: 20px 0 25px;
}

.article-meta {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.prose {
  font-size: 17px;
  line-height: 1.85;
  margin: 35px 0;
  color: #dbe3ec;
}

.prose h2 {
  font-size: 25px;
  line-height: 1.3;
  margin: 34px 0 16px;
  color: var(--ink);
}

.prose h3 {
  font-size: 20px;
  color: var(--ink);
}

.prose a,
.sources a {
  color: var(--accent);
  text-decoration: underline;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose figure {
  margin: 28px 0;
}

.prose figcaption {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.prose li {
  margin: 8px 0;
}

.table-scroll {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

caption {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

th,
td {
  text-align: left;
  padding: 13px;
  border: 1px solid var(--line);
}

th {
  background: #181e23;
  color: var(--ink);
}

.sources {
  border-top: 1px solid var(--line);
  padding-top: 25px;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.sources h2 {
  font-size: 20px;
  color: var(--ink);
}

.preview-form {
  max-width: 500px;
  display: grid;
  gap: 16px;
}

.preview-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.narrow {
  max-width: 830px;
}

.narrow h1 {
  font-size: 38px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }

  .portals {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .featured-body {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .featured-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

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

  .site-header nav {
    gap: 18px;
  }

  .editorial-note {
    grid-template-columns: 1fr 2fr;
  }

  .editorial-note > a {
    grid-column: 2;
    text-align: left;
  }

  footer > div {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-header {
    align-items: start;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .brand {
    font-size: 28px;
  }

  .site-header nav {
    width: 100%;
    gap: 6px 14px;
    flex-wrap: wrap;
    font-size: 13px;
  }

  .site-header nav a {
    min-height: 44px;
    padding: 8px 4px;
  }

  .site-header nav a:last-child {
    padding-left: 4px;
    border: 0;
    margin-left: auto;
  }

  .home-intro {
    padding-top: 24px;
    padding-bottom: 20px;
    gap: 18px;
  }

  .home-intro h1 {
    font-size: 32px;
  }

  .home-search {
    max-width: none;
  }

  .portal-card {
    padding: 16px;
  }

  .portal-head {
    flex-wrap: wrap;
  }

  .portal-all {
    margin-left: 66px;
  }

  .game-abbr {
    width: 52px;
    height: 44px;
    font-size: 13px;
  }

  .portal-cats {
    grid-template-columns: 1fr;
  }

  .portal-cats a {
    min-height: 44px;
  }

  .featured-band {
    padding: 20px 18px;
  }

  .featured-band h2 {
    font-size: 24px;
  }

  .featured-meta {
    flex-wrap: wrap;
    gap: 12px;
  }

  .section {
    padding-top: 28px;
    padding-bottom: 32px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .editorial-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .editorial-note > a {
    grid-column: auto;
  }

  .page-title {
    font-size: 34px;
  }

  .article h1 {
    font-size: 32px;
  }

  .article {
    padding-top: 30px;
  }

  .prose {
    font-size: 16px;
  }

  .filters {
    flex-wrap: wrap;
  }

  .filters label:first-child {
    flex-basis: 100%;
  }

  .filters label:nth-child(2) {
    flex: 1;
  }

  .game-subnav {
    gap: 0 20px;
  }

  .game-subnav a {
    font-size: 12px;
    padding: 12px 0;
  }

  .preview-bar {
    font-size: 10px;
  }

  .intro {
    font-size: 15px;
  }

  footer {
    gap: 16px;
  }

  footer p {
    flex-basis: 100%;
  }
}
