.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar .tw {
  max-width: 520px;
  height: 50px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crumb {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--ink);
}

.crumb .sep {
  margin: 0 6px;
  opacity: .5;
}

.crumb .cur {
  color: var(--ink);
  font-weight: 700;
}

.themebtn {
  flex: 0 0 auto;
  appearance: none;
  margin-left: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.themebtn:hover {
  border-color: var(--primary);
}

.page-head {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 16px 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1.page {
  margin: 0 0 8px;
  font-size: clamp(20px, 3.4vw, 26px);
  letter-spacing: -.01em;
  text-wrap: balance;
}

.page-title-row {
  margin: 0 0 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.page-title-row h1.page {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.page-title-row .helpbtn {
  margin-top: 2px;
}

p.lede {
  margin: 0 0 20px;
  color: var(--muted);
}

footer.site {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding: 26px 16px 40px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

footer.site .fl {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

footer.site .fl a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

footer.site .fl a:hover {
  color: var(--ink);
}

footer.site .fl .tool-list-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface);
  color: var(--ink);
}

footer.site .fl .tool-list-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

footer.site .fl .tool-list-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

footer.site .note {
  max-width: 460px;
  margin: 0 auto;
  font-size: 11.5px;
  line-height: 1.7;
}

.helpbtn {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.helpbtn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

dialog.toolhelp {
  width: min(460px, 92vw);
  max-height: 82vh;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(12, 20, 30, .38);
}

dialog.toolhelp::backdrop {
  background: rgba(10, 16, 22, .55);
}

.toolhelp-head {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolhelp-head h3 {
  flex: 1;
  margin: 0;
  font-size: 14.5px;
}

.toolhelp-close {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 2px 7px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.toolhelp-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.toolhelp-body {
  max-height: calc(82vh - 53px);
  padding: 12px 14px 16px;
  overflow-y: auto;
}

.toolhelp-body h4 {
  margin: 14px 0 7px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.toolhelp-body h4:first-child {
  margin-top: 0;
}

.toolhelp-body dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 7px 12px;
}

.toolhelp-body dt,
.toolhelp-body dd {
  margin: 0;
}

.toolhelp-body dd {
  color: var(--muted);
  font-size: 12.5px;
}

.toolhelp-body ol,
.toolhelp-body ul {
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.toolhelp-body li {
  margin-bottom: 5px;
}

.toolhelp-body li:last-child {
  margin-bottom: 0;
}

.toolhelp-body b {
  color: var(--ink);
}

.toolhelp-body code {
  border-radius: 4px;
  padding: 1px 4px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 11.5px;
}

.toolhelp-foot {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.toolhelp-body kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.toolhelp-body .sep {
  margin: 0 2px;
  color: var(--muted);
  font-size: 11px;
}
