/* ---- NAV / TITLE BLOCK ---- */
header.titleblock {
  position: sticky;
  z-index: 40;
  top: 0;

  border-bottom: 1px solid var(--line);

  background: var(--header-bg);
  backdrop-filter: blur(8px);
}
.tb-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;

  max-width: 1080px;
  min-height: 56px;
  margin: 0 auto;
  padding: 10px 28px;
}
.tb-mark {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;

  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tb-mark .logo-mark {
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}
nav.tb-links {
  scrollbar-width: none;

  overflow-x: auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;

  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tb-right {
  display: flex;
  gap: 20px;
  align-items: center;
  min-width: 0;
}
nav.tb-links::-webkit-scrollbar {
  display: none;
}
nav.tb-links a {
  position: relative;

  padding: 4px 0;

  color: var(--steel);
  text-decoration: none;
  white-space: nowrap;

  transition: color 0.2s ease;
}
nav.tb-links a::before {
  content: "0" attr(data-i) " \2014 ";
  margin-right: 8px;
  color: var(--line);
}
nav.tb-links a:hover {
  color: var(--paper);
}

@media (max-width: 640px) {
  .tb-row {
    padding: 10px 16px;
  }
  .tb-mark {
    font-size: 15px;
  }
  .tb-right {
    gap: 12px;
  }
  nav.tb-links {
    gap: 14px;
    font-size: 11px;
  }
  nav.tb-links a::before {
    display: none;
  }
}

@media (max-width: 400px) {
  .tb-mark {
    font-size: 13px;
  }
  .tb-right {
    gap: 8px;
  }
  nav.tb-links {
    gap: 10px;
    font-size: 10px;
  }
  .theme-toggle {
    margin-left: 2px;
  }
}

/* ---- THEME TOGGLE ---- */
.theme-toggle {
  cursor: pointer;

  position: relative;

  display: inline-flex;
  flex-shrink: 0;
  align-items: center;

  margin-left: 8px;
}
.theme-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.theme-toggle .track {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 46px;
  height: 24px;
  padding: 0 5px;
  border-radius: 12px;

  background: var(--line);

  transition: background-color 0.2s ease;
}
.theme-toggle input:checked + .track {
  background: var(--accent-btn);
}
.theme-toggle .track .icon {
  position: relative;
  z-index: 1;

  width: 12px;
  height: 12px;

  color: #fff;

  opacity: 0.75;
}
.theme-toggle .thumb {
  position: absolute;
  z-index: 99;
  top: 3px;
  left: 3px;

  width: 18px;
  height: 18px;
  border-radius: 50%;

  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);

  transition: transform 0.2s ease;
}
.theme-toggle input:checked ~ .track .thumb {
  transform: translateX(22px);
}
.theme-toggle:focus-within .track {
  outline: 2px solid var(--accent-btn);
  outline-offset: 2px;
}

/* ---- DIMENSION DIVIDER ---- */
.dim {
  display: flex;
  gap: 14px;
  align-items: center;

  margin: 0 0 48px;

  color: var(--steel);
}
.dim .tick {
  width: 1px;
  height: 14px;
  background: var(--line);
}
.dim .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.dim .label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
