/* :root palette comes from ../../../css/themes.css — this page just
   overrides --text-dim for a slightly lighter prose tone */
:root { --text-dim: #cbbfa8; }

h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  line-height: 1.25;
}

h2 {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  margin: 52px 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
h1 + h2, .lede + h2 { border-top: none; padding-top: 0; }

h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--amber);
  margin: 32px 0 12px;
}

p, li { color: var(--text-dim); font-size: 15.5px; }
p { margin: 0 0 16px; }
.lede { font-size: 17px; color: var(--text-dim); }

ul, ol { padding-left: 22px; margin: 0 0 20px; }
li { margin-bottom: 10px; }
li > ul, li > ol { margin-top: 10px; }

.table-scroll { overflow-x: auto; margin: 0 0 20px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
}
thead th {
  text-align: left;
  font-weight: 500;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line);
}
tbody td {
  padding: 12px 13px;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
}
tbody tr:hover { background: #1f1a13; }
td strong { color: var(--amber); }

/* Below this width, five prose-length columns don't have room to
   breathe even wrapped — stack each row into a labeled card instead
   of forcing a horizontal scrollbar mid-page. */
@media (max-width: 780px) {
  .table-scroll { overflow-x: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  tbody td {
    border-bottom: none;
    padding: 7px 0;
    word-break: break-word;
  }
  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 3px;
  }
  .tbl-langs td:nth-child(1)::before { content: "Language"; }
  .tbl-langs td:nth-child(2)::before { content: "Native inheritance?"; }
  .tbl-langs td:nth-child(3)::before { content: "Native interfaces?"; }
  .tbl-langs td:nth-child(4)::before { content: "Dispatch mechanism"; }
  .tbl-langs td:nth-child(5)::before { content: "Source"; }
  .tbl-summary td:nth-child(1)::before { content: "Language"; }
  .tbl-summary td:nth-child(2)::before { content: "Inheritance polymorphism"; }
  .tbl-summary td:nth-child(3)::before { content: "Inheritance w/ defaults"; }
  .tbl-summary td:nth-child(4)::before { content: "Interface polymorphism"; }
  .tbl-summary td:nth-child(5)::before { content: "Monomorphism"; }
}