/* Fundament typograficzny i klasy uzytkowe. */
html {
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: var(--tb-font-body);
  font-size: 100%;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: var(--tb-font-body);
  font-size: var(--tb-step-0);
}

.ct-header-search.ct-toggle,
.ct-header-trigger.ct-toggle {
  color: var(--tb-primary);
}

.ct-header-search.ct-toggle .ct-icon,
.ct-header-trigger.ct-toggle .ct-icon {
  color: var(--tb-primary);
  fill: currentColor;
}

:where(p, li, dd, figcaption) {
  color: var(--tb-text-soft);
}

:where(p, .entry-content > ul, .entry-content > ol) {
  max-inline-size: 65ch;
}

:where(h1, h2, h3, h4, h5, h6) {
  color: var(--tb-text);
  font-family: var(--tb-font-display);
  font-stretch: condensed;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: var(--tb-step-5);
}

h2 {
  font-size: var(--tb-step-4);
}

h3 {
  font-size: var(--tb-step-3);
}

h4 {
  font-size: var(--tb-step-2);
}

h5 {
  font-size: var(--tb-step-1);
}

h6 {
  font-size: var(--tb-step-0);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

a {
  color: var(--tb-accent-text);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--tb-accent-text);
  text-decoration-thickness: 0.12em;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--tb-accent);
  outline-offset: 3px;
}

::selection {
  background: var(--tb-accent);
  color: var(--tb-accent-ink);
}

hr {
  border: 0;
  border-block-start: 1px solid var(--tb-border-soft);
}

code,
kbd,
samp,
pre {
  font-family: var(--tb-font-mono);
  font-variant-numeric: tabular-nums;
}

.tb-spec {
  overflow-wrap: anywhere;
  padding: var(--tb-space-4);
  border: 1px solid var(--tb-border);
  border-inline-start: 4px solid var(--tb-accent);
  border-radius: var(--tb-radius);
  background: var(--tb-surface-2);
  color: var(--tb-text);
  font-family: var(--tb-font-mono);
  font-size: var(--tb-step--1);
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

.tb-spec-table {
  width: 100%;
  border: 1px solid var(--tb-border);
  border-collapse: collapse;
  background: var(--tb-surface);
  color: var(--tb-text);
}

.tb-spec-table :where(th, td) {
  padding: var(--tb-space-3) var(--tb-space-4);
  border-block-end: 1px solid var(--tb-border-soft);
  text-align: start;
  vertical-align: top;
}

.tb-spec-table th {
  background: var(--tb-surface-2);
  color: var(--tb-text-soft);
  font-family: var(--tb-font-display);
  font-size: var(--tb-step--1);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tb-spec-table td {
  color: var(--tb-text);
  font-family: var(--tb-font-mono);
  font-variant-numeric: tabular-nums;
}

.tb-spec-table tr:last-child td {
  border-block-end: 0;
}

.tb-btn {
  display: inline-flex;
  min-block-size: 44px;
  align-items: center;
  justify-content: center;
  gap: var(--tb-space-2);
  padding: var(--tb-space-3) var(--tb-space-5);
  border: 2px solid var(--tb-text);
  border-radius: var(--tb-radius);
  background: var(--tb-text);
  color: var(--tb-bg);
  font-family: var(--tb-font-display);
  font-size: var(--tb-step-0);
  font-weight: 750;
  letter-spacing: 0.035em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.tb-btn:hover {
  border-color: var(--tb-text-soft);
  background: var(--tb-text-soft);
  color: var(--tb-bg);
  transform: translateY(-1px);
}

.tb-btn--primary {
  border-color: var(--tb-accent);
  background: var(--tb-accent);
  color: var(--tb-accent-ink);
}

.tb-btn--primary:hover {
  border-color: var(--tb-accent-hover);
  background: var(--tb-accent-hover);
  color: var(--tb-accent-ink);
}

.tb-btn--ghost {
  border-color: var(--tb-border);
  background: transparent;
  color: var(--tb-text);
}

.tb-btn--ghost:hover {
  border-color: var(--tb-text);
  background: var(--tb-surface-2);
  color: var(--tb-text);
}

.tb-btn:disabled,
.tb-btn[aria-disabled="true"] {
  border-color: var(--tb-border-soft);
  background: var(--tb-surface-2);
  color: var(--tb-text-mute);
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.tb-chip {
  display: inline-flex;
  min-block-size: 1.75rem;
  align-items: center;
  padding: var(--tb-space-1) var(--tb-space-2);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background: var(--tb-surface-2);
  color: var(--tb-text-soft);
  font-family: var(--tb-font-mono);
  font-size: var(--tb-step--1);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.tb-chip--ok {
  border-color: var(--tb-ok);
  background: var(--tb-ok-soft);
  color: var(--tb-ok);
}

.tb-chip--warn {
  border-color: var(--tb-warn);
  background: var(--tb-warn-soft);
  color: var(--tb-warn);
}

.tb-chip--info {
  border-color: var(--tb-border);
  background: var(--tb-surface-2);
  color: var(--tb-text);
}

@media (max-width: 600px) {
  .tb-spec-table {
    display: block;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
