:root {
  --bw-ink: #10231f;
  --bw-muted: #5c6f68;
  --bw-panel: #ffffff;
  --bw-line: #dfe8e3;
  --bw-teal: #0f766e;
  --bw-teal-dark: #115e59;
  --bw-green: #84cc16;
  --bw-amber: #f59e0b;
  --bw-sky: #38bdf8;
}

.md-content {
  font-size: 0.82rem;
}

.md-grid {
  max-width: 1220px;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--bw-ink);
  letter-spacing: 0;
}

.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background: #eef8f5;
  color: var(--bw-ink);
}

.md-typeset code {
  border-radius: 5px;
}

.bw-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(16, 35, 31, 0.92)),
    linear-gradient(45deg, rgba(132, 204, 22, 0.16), rgba(56, 189, 248, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 35, 31, 0.2);
  color: #fff;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  margin: 0 0 2rem;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem);
  position: relative;
}

.bw-hero::after {
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  position: absolute;
}

.bw-hero__content,
.bw-hero__visual {
  position: relative;
  z-index: 1;
}

.bw-kicker {
  color: #b8f7e4;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.md-typeset .bw-hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 0.95;
  margin: 0;
}

.bw-lead {
  color: #e9fff7;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.6;
  margin: 1.1rem 0 1.6rem;
  max-width: 720px;
}

.bw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bw-button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #fff !important;
  display: inline-flex;
  font-weight: 800;
  padding: 0.72rem 1rem;
  text-decoration: none !important;
}

.bw-button--primary {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #13231f !important;
}

.bw-hero__visual {
  aspect-ratio: 1;
  min-height: 300px;
}

.bw-cube {
  border-radius: 8px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.22), inset -12px -12px 0 rgba(0,0,0,.16), inset 10px 10px 0 rgba(255,255,255,.2);
  position: absolute;
  transform: rotate(10deg) skew(-8deg);
}

.bw-cube--grass {
  background: linear-gradient(135deg, #84cc16 0 35%, #a16207 36% 100%);
  height: 44%;
  left: 16%;
  top: 14%;
  width: 44%;
}

.bw-cube--stone {
  background: linear-gradient(135deg, #cbd5e1, #64748b);
  height: 30%;
  right: 13%;
  top: 27%;
  width: 30%;
}

.bw-cube--water {
  background: linear-gradient(135deg, #38bdf8, #0369a1);
  bottom: 14%;
  height: 32%;
  left: 30%;
  width: 32%;
}

.bw-cube--wood {
  background: linear-gradient(135deg, #d6a35b, #7c3f16);
  bottom: 29%;
  height: 22%;
  right: 10%;
  width: 22%;
}

.bw-cube--ore {
  background: linear-gradient(135deg, #334155 0 62%, #fbbf24 63% 76%, #334155 77%);
  bottom: 10%;
  height: 20%;
  right: 33%;
  width: 20%;
}

.bw-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.2rem 0 2rem;
}

.bw-card {
  background: var(--bw-panel);
  border: 1px solid var(--bw-line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 35, 31, 0.08);
  color: var(--bw-ink) !important;
  display: block;
  min-height: 145px;
  padding: 1.1rem;
  text-decoration: none !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.bw-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 18px 36px rgba(15, 35, 31, 0.13);
  transform: translateY(-2px);
}

.bw-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.bw-card span {
  color: var(--bw-muted);
  display: block;
  line-height: 1.55;
}

.bw-system-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 2rem;
}

.bw-system-strip span {
  background: #edf8f5;
  border: 1px solid #cfe7df;
  border-radius: 999px;
  color: var(--bw-teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.42rem 0.72rem;
}

@media (max-width: 900px) {
  .bw-hero {
    grid-template-columns: 1fr;
  }

  .bw-hero__visual {
    display: none;
  }

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