*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  background: #f7f7f7;
  color: #111;
  min-height: 100vh;
}

/* ── Decorative red triangles ── */

.decor-right {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-bottom: 280px solid #d62828;
  border-left: 200px solid transparent;
  z-index: 100;
  pointer-events: none;
}

.decor-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-bottom: 280px solid #d62828;
  border-right: 200px solid transparent;
  z-index: 100;
  pointer-events: none;
}

/* ── Antenna ── */

.antenna {
  position: fixed;
  top: 20px;
  right: 160px;
  width: 1px;
  height: 50px;
  background: #111;
  z-index: 101;
  pointer-events: none;
}

.antenna::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #f7f7f7;
}

/* ── Container ── */

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
  padding-right: 160px;
}

/* ── Header / Masthead ── */

.header {
  margin-bottom: 30px;
}

.masthead {
  display: flex;
  align-items: stretch;
  border: 1px solid #111;
}

.logo {
  padding: 8px 12px;
  font-weight: 600;
  text-decoration: underline;
  color: #111;
  border-right: 1px solid #111;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-table {
  border-collapse: collapse;
  flex: 1;
}

.nav-table td {
  border-left: 1px solid #111;
  padding: 4px 12px;
}

.nav-table tr:first-child td {
  border-bottom: 1px solid #111;
}

.nav-table td:first-child {
  border-left: none;
}

.nav-table a {
  color: #111;
  text-decoration: none;
}

.nav-table a:hover {
  text-decoration: underline;
}

/* ── Subhead bar ── */

.subhead {
  display: flex;
  justify-content: space-between;
  border: 1px solid #111;
  border-top: none;
  padding: 4px 12px;
  font-size: 12px;
}

/* ── Sections ── */

.section {
  margin-bottom: 24px;
}

.section h1 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.intro {
  line-height: 1.7;
}

/* ── Box with label ── */

.box {
  position: relative;
  border-left: 1px solid #111;
  padding-left: 12px;
  padding-top: 4px;
}

.box-label {
  position: relative;
  display: inline-block;
  font-weight: 400;
  margin-bottom: 8px;
  padding: 2px 6px 2px 0;
  border-top: 1px solid #111;
}

/* ── Tree list ── */

.tree {
  list-style: none;
  margin-bottom: 8px;
}

.tree li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 4px;
}

.tree li::before {
  content: '├──';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 12px;
}

.tree li.leaf::before {
  content: '└──';
}

.tree a {
  color: #111;
  text-decoration: underline;
}

.meta {
  color: #666;
  font-size: 11px;
}

/* ── View all link ── */

.view-all {
  display: block;
  text-decoration: underline;
  color: #111;
  font-size: 12px;
  margin-top: 4px;
}

/* ── Responsive: tablet ── */

@media (max-width: 700px) {
  .decor-right {
    border-bottom: 180px solid #d62828;
    border-left: 130px solid transparent;
  }

  .decor-bottom {
    border-bottom: 180px solid #d62828;
    border-right: 130px solid transparent;
  }

  .antenna {
    right: 100px;
    height: 35px;
  }

  .container {
    padding-right: 100px;
  }
}

/* ── Responsive: mobile ── */

@media (max-width: 500px) {
  .decor-right {
    border-bottom: 110px solid #d62828;
    border-left: 80px solid transparent;
  }

  .decor-bottom {
    border-bottom: 110px solid #d62828;
    border-right: 80px solid transparent;
  }

  .antenna {
    right: 65px;
    height: 25px;
    top: 15px;
  }

  .antenna::before {
    width: 7px;
    height: 7px;
    top: -3px;
    left: -3px;
  }

  .container {
    padding: 30px 15px;
    padding-right: 65px;
  }

  .masthead {
    flex-direction: column;
  }

  .logo {
    border-right: none;
    border-bottom: 1px solid #111;
  }

  .nav-table td {
    padding: 3px 8px;
    font-size: 11px;
  }

  .subhead {
    flex-direction: column;
    text-align: center;
    gap: 2px;
  }
}

/* ── Print ── */

@media print {
  .decor-right,
  .decor-bottom,
  .antenna {
    display: none;
  }

  .container {
    padding-right: 20px;
    max-width: 100%;
  }
}
