:root {
  --ink: #142033;
  --muted: #5b6b82;
  --paper: #f8fbff;
  --wash: #e8f1fb;
  --line: #cad9ea;
  --primary: #2f6ea6;
  --primary-soft: #dceafb;
  --rose: #b95c74;
  --rose-soft: #f5dee5;
  --blue: #355c9a;
  --gold: #aa7a24;
  --surface: #f9fcff;
  --surface-strong: #ffffff;
  --surface-soft: #eef6ff;
  --surface-muted: #e4edf8;
  --hover: #ffffff;
  --text-soft: #3c4e66;
  --card-text: #344a61;
  --table-head: #e4eef9;
  --craft-border: #aebfd3;
  --shadow: 0 18px 50px rgb(24 45 78 / 12%);
}

html[data-theme="dark"] {
  --ink: #e7eef8;
  --muted: #aebcd0;
  --paper: #0d1420;
  --wash: #080e18;
  --line: #263549;
  --primary: #7db7ee;
  --primary-soft: #13283f;
  --rose: #ef94a5;
  --rose-soft: #3b1f2a;
  --blue: #aac8f2;
  --gold: #e0bd72;
  --surface: #111a28;
  --surface-strong: #172235;
  --surface-soft: #0d1827;
  --surface-muted: #142338;
  --hover: #18263a;
  --text-soft: #cad6e6;
  --card-text: #d7e3f0;
  --table-head: #17273a;
  --craft-border: #536881;
  --shadow: 0 18px 50px rgb(0 0 0 / 28%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(255 255 255 / 32%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 30%) 1px, transparent 1px);
  background-size: 44px 44px;
}

html[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px);
}

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

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

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

ul,
dl,
dd {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px max(22px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.site-header,
.brand-icon,
.main-nav a,
.button,
.card,
.interface-card,
.mini-card,
.table-card,
.recipe-card,
.details div,
.interface-art,
.humor-grid div,
.compat-list,
.compat-list div,
.banner-photo,
.banner-items img,
.craft-image,
.site-footer {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #b7c9df;
  border-radius: 8px;
  background: var(--primary-soft);
}

.brand-icon img,
.recipe-title img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.brand strong {
  display: block;
  font-size: 0.96rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.menu-toggle {
  display: none;
}

.header-panel {
  display: contents;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.language-toggle,
.theme-toggle {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    transform 180ms ease;
}

.language-toggle {
  display: inline-flex;
  min-width: 116px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 12px;
}

.dropdown-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.language-control.is-language-open .dropdown-chevron {
  transform: translateY(2px) rotate(225deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  visibility: hidden;
  min-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow);
  opacity: 0;
  padding: 6px;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease,
    background-color 220ms ease,
    border-color 220ms ease;
  backdrop-filter: blur(14px);
}

.language-control.is-language-open .language-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.language-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 10px;
  text-align: left;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.language-menu button:hover,
.language-menu button:focus-visible,
.language-menu button[aria-selected="true"] {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 12px;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.language-toggle:hover,
.language-toggle:focus-visible {
  border-color: var(--primary);
  outline: none;
}

.theme-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  transition:
    border-color 220ms ease,
    transform 220ms ease;
}

.theme-icon::after {
  content: "";
  position: absolute;
  inset: 2px 0 2px 7px;
  border-radius: 50%;
  background: var(--surface-strong);
  transition:
    background-color 220ms ease,
    inset 220ms ease;
}

html[data-theme="dark"] .theme-icon::after {
  inset: -2px -2px -2px 6px;
}

.theme-toggle[aria-pressed="true"] .theme-icon {
  transform: rotate(-25deg);
}

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

.main-nav a:hover,
.main-nav a:focus-visible {
  border-color: var(--line);
  background: var(--hover);
  color: var(--ink);
  outline: none;
}

.section {
  padding: 72px max(22px, calc((100% - 1180px) / 2));
}

.section-alt {
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 50px;
  min-height: 480px;
  background: var(--surface-soft);
}

.eyebrow {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin-top: 14px;
  font-size: 3.35rem;
  line-height: 1.02;
}

.hero-text {
  max-width: 680px;
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  padding: 0 18px;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
}

.hero-banner {
  display: grid;
  align-self: center;
  gap: 14px;
}

.hero .hero-banner .banner-photo {
  position: relative;
  height: 180px;
  max-height: 180px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.hero .hero-banner .banner-image {
  width: 100%;
  height: 180px;
  max-height: 180px;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

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

.banner-items img {
  width: 100%;
  height: 88px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  image-rendering: pixelated;
  padding: 18px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: 2.1rem;
  line-height: 1.14;
}

.section-heading p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.mod-grid,
.interface-grid,
.system-grid,
.split-grid,
.recipe-grid {
  display: grid;
  gap: 18px;
}

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

.interface-grid,
.system-grid,
.recipe-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.interface-card,
.mini-card,
.table-card,
.recipe-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 10px 28px rgb(24 45 78 / 7%);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .interface-card,
html[data-theme="dark"] .mini-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .recipe-card {
  box-shadow: 0 10px 28px rgb(0 0 0 / 22%);
}

.card,
.mini-card,
.recipe-card {
  padding: 22px;
}

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

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 10px;
}

.tag-primary {
  background: var(--primary-soft);
  color: #225e92;
}

.tag-blue {
  background: #e1edf5;
  color: #315b7c;
}

.tag-gold {
  background: #f2e7cf;
  color: #7a5519;
}

.tag-rose {
  background: var(--rose-soft);
  color: #864148;
}

html[data-theme="dark"] .tag-primary {
  color: #c4dff8;
}

html[data-theme="dark"] .tag-blue {
  background: #1a2d3b;
  color: #b8d8ee;
}

html[data-theme="dark"] .tag-gold {
  background: #332815;
  color: #ead096;
}

html[data-theme="dark"] .tag-rose {
  color: #f0c0c4;
}

.card h3,
.interface-card h3,
.mini-card h3,
.table-card h3,
.recipe-card h3 {
  margin-top: 16px;
  font-size: 1.15rem;
}

.card p,
.interface-card p,
.mini-card p,
.table-card p,
.recipe-card p {
  color: var(--muted);
  line-height: 1.65;
}

.card > p {
  margin-top: 10px;
}

.coming-note {
  color: var(--rose);
  font-size: 1.05rem;
  font-weight: 850;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.details div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 12px;
}

.details dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.details dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
}

.check-list li {
  position: relative;
  padding-left: 18px;
  color: var(--card-text);
  line-height: 1.55;
}

.check-list li + li {
  margin-top: 8px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--primary);
}

.interface-card {
  overflow: hidden;
}

.interface-art {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.ui-preview {
  width: min(72%, 210px);
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 18px rgb(24 45 78 / 18%));
}

.item-preview {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.interface-copy {
  padding: 20px;
}

.interface-copy p,
.interface-copy ul {
  margin-top: 12px;
}

.mini-card span {
  display: inline-block;
  color: var(--blue);
  font-weight: 900;
}

.mini-card h3 {
  margin-top: 10px;
}

.mini-card p {
  margin-top: 8px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.info-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(96px, 0.5fr) minmax(0, 1.7fr);
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.info-list strong {
  font-weight: 850;
}

.info-list span,
.humor-grid span {
  color: var(--gold);
  font-weight: 850;
}

.info-list p {
  font-size: 0.92rem;
}

.table-card {
  margin: 18px 0;
  overflow: hidden;
}

.table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.table-heading h3 {
  margin-top: 0;
}

.table-heading p {
  max-width: 560px;
}

.responsive-table {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--table-head);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--text-soft);
}

td:first-child {
  color: var(--ink);
  font-weight: 850;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.humor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.humor-grid div {
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 14px;
}

.humor-grid strong,
.humor-grid span,
.humor-grid small {
  display: block;
}

.humor-grid span,
.humor-grid small {
  margin-top: 8px;
}

.humor-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.expressions-coming .section-heading {
  max-width: none;
  margin-bottom: 0;
  text-align: center;
}

.coming-title {
  color: var(--rose);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.08;
}

.recipe-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recipe-title h3 {
  margin-top: 0;
}

.recipe-title p {
  margin-top: 4px;
  font-size: 0.9rem;
}

.craft-image {
  width: min(100%, 260px);
  margin: 22px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  image-rendering: pixelated;
  padding: 10px;
}

.compat-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.compat-list div {
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 54px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.compat-list div:last-child {
  border-bottom: 0;
}

.compat-list span {
  color: var(--muted);
}

.site-footer {
  padding: 24px max(22px, calc((100% - 1180px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
}

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

  .main-nav {
    justify-content: flex-start;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .hero,
  .mod-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

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

@media (max-width: 680px) {
  .section {
    padding: 44px 18px;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding: 12px 18px;
    overflow: visible;
  }

  .brand {
    min-width: 0;
  }

  .menu-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    color: var(--ink);
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .menu-toggle span + span {
    margin-top: 4px;
  }

  .site-header.is-menu-open .menu-toggle span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .site-header.is-menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-menu-open .menu-toggle span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .header-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 18px;
    left: 18px;
    display: grid;
    gap: 12px;
    visibility: hidden;
    width: auto;
    max-height: calc(100vh - 96px);
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow);
    opacity: 0;
    padding: 12px;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 180ms ease,
      background-color 220ms ease,
      border-color 220ms ease,
      box-shadow 220ms ease;
    backdrop-filter: blur(14px);
  }

  .site-header.is-menu-open .header-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .main-nav a {
    border-color: var(--line);
    background: var(--surface-strong);
    padding: 10px 12px;
  }

  .header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .language-control,
  .theme-toggle {
    width: 100%;
  }

  .language-control {
    display: grid;
    align-items: stretch;
    gap: 6px;
  }

  .language-toggle {
    width: 100%;
  }

  .language-menu {
    right: 0;
    left: 0;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .interface-grid,
  .system-grid,
  .recipe-grid,
  .details,
  .humor-grid {
    grid-template-columns: 1fr;
  }

  .hero .hero-banner .banner-photo {
    height: 140px;
    max-height: 140px;
    min-height: 0;
  }

  .hero .hero-banner .banner-image {
    height: 140px;
    max-height: 140px;
    min-height: 0;
  }

  .banner-items {
    gap: 10px;
  }

  .banner-items img {
    height: 68px;
    padding: 14px;
  }

  .info-list div {
    grid-template-columns: 1fr;
  }

  .table-heading {
    align-items: start;
    flex-direction: column;
  }

  .compat-list div {
    grid-template-columns: 1fr;
  }

  .coming-title {
    font-size: 2.1rem;
  }
}
