html,
body {
  margin: 0;
  background: #fff;
  overflow-x: hidden;
}

/* Avoid site-nav 100vw shift that pushes the article off-screen. */
body > .site-nav {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.tech-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  line-height: 1.65;
}

.tech-page[dir="rtl"] {
  text-align: right;
}

.tech-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 12px 0 20px;
}

.tech-toolbar label {
  font-size: 14px;
  color: #4b5563;
}

.tech-toolbar select {
  font-size: 15px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}

.tech-intro {
  margin: 0 0 20px;
}

.tech-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.tech-tab {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}

.tech-tab.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.tech-rule {
  margin: 0 0 12px;
}

.tech-steps-label {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 6px;
}

.tech-steps {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.tech-steps li {
  margin: 0 0 6px;
}

table.sdk td .sdk-tag {
  position: absolute;
  top: 0;
  left: 1px;
  font-size: 8px;
  font-weight: 700;
  color: #1d4ed8;
  line-height: 1;
  pointer-events: none;
}

.tech-tier {
  margin-bottom: 36px;
}

.tech-tier h2 {
  font-size: 22px;
  margin: 0 0 8px;
  color: #111827;
}

.tech-lead {
  color: #4b5563;
  margin: 0 0 18px;
}

.tech-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  background: #fff;
}

.tech-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.tech-card p {
  margin: 0 0 12px;
}

.sdk-wrap {
  overflow-x: auto;
  margin: 8px 0 8px;
}

table.sdk {
  border-collapse: collapse;
  direction: ltr;
  margin: 0 auto;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

table.sdk td {
  width: 32px;
  height: 32px;
  border: 1px solid #9ca3af;
  text-align: center;
  vertical-align: middle;
  font-size: 15px;
  font-weight: 600;
  box-sizing: border-box;
  position: relative;
  background: #fff;
}

table.sdk td.b-right {
  border-right: 2px solid #111827;
}

table.sdk td.b-bottom {
  border-bottom: 2px solid #111827;
}

table.sdk td.house {
  background: #eff6ff;
}

table.sdk td.peer {
  background: #fef9c3;
}

table.sdk td.focus {
  background: #bfdbfe;
  box-shadow: inset 0 0 0 2px #2563eb;
}

table.sdk td.elim {
  background: #fecaca;
}

table.sdk td.given {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

table.sdk td .cands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.05;
  color: #64748b;
  padding: 2px;
}

table.sdk td .cands span.x {
  color: #b91c1c;
  text-decoration: line-through;
}

.tech-caption {
  font-size: 13px;
  color: #4b5563;
  text-align: center;
  margin: 6px 0 0;
}

.tech-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  margin: 8px 0 16px;
}

.tech-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #9ca3af;
  vertical-align: middle;
  margin: 0 4px 0 0;
}

.tech-legend i.given { background: #fff; font-size: 10px; text-align: center; line-height: 14px; font-style: normal; font-weight: 700; }
.tech-legend i.given::after { content: "5"; }
.tech-legend i.draft { background: #fff; font-size: 8px; text-align: center; line-height: 14px; font-style: normal; color: #64748b; }
.tech-legend i.draft::after { content: "8"; }
.tech-legend i.focus { background: #bfdbfe; }
.tech-legend i.peer { background: #fef9c3; }
.tech-legend i.elim { background: #fecaca; }

.breadcrumb {
  font-size: 14px;
  margin-bottom: 8px;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

@media (max-width: 480px) {
  table.sdk td {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}
