/* ==========================================================================
   md5check — design tokens and base
   ========================================================================== */

:root {
  --ink: #0b1220;
  --ink-2: #1e293b;
  --body: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-soft: #f1f5f9;

  --brand: #047857;
  --brand-600: #059669;
  --brand-700: #065f46;
  --brand-soft: #ecfdf5;
  --brand-line: #a7f3d0;

  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-line: #fecaca;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-line: #fde68a;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 12px 32px -16px rgba(15, 23, 42, .22);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --wrap: 1120px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.021em;
  line-height: 1.18;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 2.9rem);
}

h2 {
  font-size: clamp(1.45rem, 1.15rem + 1.1vw, 1.85rem);
}

h3 {
  font-size: 1.16rem;
  letter-spacing: -0.012em;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--brand-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand);
}

img,
svg {
  max-width: 100%;
}

strong {
  color: var(--ink-2);
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: #bbf7d0;
  color: var(--ink);
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 68px 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--tight {
  padding: 48px 0;
}

.stack > * + * {
  margin-top: 1rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header__in {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.026em;
  text-decoration: none;
  flex: none;
}

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

.brand__mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav__link {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 7px;
  color: var(--body);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav__link:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.nav__link[aria-current="page"] {
  color: var(--brand-700);
  background: var(--brand-soft);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 17px;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -5.5px;
}

.nav-toggle__bars::after {
  top: 5.5px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    padding: 11px 12px;
    font-size: 1rem;
  }
}

/* ---------- hero ---------- */

.hero {
  padding: 56px 0 44px;
  background:
    radial-gradient(900px 320px at 12% -8%, #ecfdf5 0%, rgba(236, 253, 245, 0) 62%),
    #fff;
  border-bottom: 1px solid var(--line);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 5px 11px 5px 8px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: 999px;
  color: var(--brand-700);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.hero__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .16);
}

.hero h1 {
  max-width: 18ch;
}

.hero__lead {
  max-width: 60ch;
  margin-top: 14px;
  font-size: 1.0625rem;
  color: var(--muted);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--muted);
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero__meta svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
  flex: none;
}

/* ---------- tool panel ---------- */

.tool {
  margin-top: 30px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool__top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.tabs {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 9px;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 16px;
  border-radius: 6px;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

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

.tab[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
}

.tool__hint {
  margin-left: auto;
  font-size: .8125rem;
  color: var(--muted);
}

.tool__body {
  padding: 18px;
}

.field {
  display: block;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .002em;
}

.field__note {
  font-weight: 400;
  color: var(--faint);
  font-size: .75rem;
}

textarea,
input[type="text"],
input[type="email"],
input[type="search"],
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
  transition: border-color .14s ease, box-shadow .14s ease;
}

textarea {
  min-height: 132px;
  resize: vertical;
  font-family: var(--mono);
  font-size: .875rem;
  line-height: 1.6;
}

textarea::placeholder,
input::placeholder {
  color: var(--faint);
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .14);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.row > .grow {
  flex: 1 1 240px;
  min-width: 0;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.check:has(input:checked) {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-700);
}

.check input {
  accent-color: var(--brand);
  margin: 0;
  width: 14px;
  height: 14px;
}

/* hash result rows */

.results {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}

.results:empty {
  display: none;
}

.algo {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.algo:last-child {
  border-bottom: 0;
}

.algo__name {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.algo__value {
  font-family: var(--mono);
  font-size: .875rem;
  color: var(--ink);
  word-break: break-all;
  line-height: 1.5;
  min-height: 1.5em;
}

.algo__value.is-empty {
  color: var(--faint);
}

.algo__len {
  font-family: var(--mono);
  font-size: .6875rem;
  color: var(--faint);
  white-space: nowrap;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fff;
  color: var(--body);
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.copy:hover {
  border-color: var(--brand-line);
  color: var(--brand-700);
  background: var(--brand-soft);
}

.copy.is-done {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-700);
}

.copy svg {
  width: 13px;
  height: 13px;
}

/* dropzone */

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 34px 20px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-alt);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.drop:hover,
.drop.is-over {
  border-color: var(--brand-600);
  background: var(--brand-soft);
}

.drop__icon {
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.drop:hover .drop__icon,
.drop.is-over .drop__icon {
  color: var(--brand);
}

.drop__title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-2);
}

.drop__sub {
  font-size: .8125rem;
  color: var(--muted);
}

.drop input[type="file"] {
  display: none;
}

.progress {
  margin-top: 14px;
  height: 5px;
  border-radius: 99px;
  background: var(--bg-soft);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: var(--brand-600);
  border-radius: 99px;
  transition: width .18s linear;
}

.filemeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  font-size: .8125rem;
  color: var(--muted);
}

.filemeta strong {
  color: var(--ink-2);
  font-weight: 600;
}

/* verdict box */

.verdict {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: .9375rem;
}

.verdict svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}

.verdict strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.verdict--ok {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.verdict--ok svg {
  color: var(--brand);
}

.verdict--bad {
  border-color: var(--danger-line);
  background: var(--danger-soft);
}

.verdict--bad svg {
  color: var(--danger);
}

.verdict--bad strong {
  color: var(--danger);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .14s ease, transform .14s ease;
}

.btn:hover {
  background: var(--brand-700);
  color: #fff;
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink-2);
}

.btn--ghost:hover {
  background: var(--bg-soft);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--sm {
  padding: 7px 13px;
  font-size: .8125rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

a.card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}

.card__icon {
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  color: var(--brand);
}

.card h3 {
  margin-bottom: 6px;
  font-size: 1.03rem;
}

.card p {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
}

.card__more {
  margin-top: 14px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--brand-700);
}

/* ---------- section head ---------- */

.sec-head {
  max-width: 62ch;
  margin-bottom: 32px;
}

.sec-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand);
}

.sec-head h2 {
  margin-bottom: 10px;
}

.sec-head p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- prose ---------- */

.prose {
  max-width: 70ch;
  font-size: 1.0125rem;
  line-height: 1.72;
  color: var(--body);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 2.2em;
  margin-bottom: .55em;
  padding-top: .2em;
  font-size: 1.5rem;
}

.prose h3 {
  margin-top: 1.9em;
  margin-bottom: .45em;
  font-size: 1.16rem;
}

.prose p {
  margin-bottom: 1.15em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: .5em;
}

.prose li::marker {
  color: var(--faint);
}

.prose code {
  padding: .12em .38em;
  border-radius: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .855em;
  color: var(--ink-2);
  word-break: break-word;
}

.prose pre {
  margin: 0 0 1.4em;
  padding: 15px 17px;
  background: #0f172a;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .8125rem;
  line-height: 1.65;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #e2e8f0;
  font-size: inherit;
  word-break: normal;
}

.prose blockquote {
  margin: 0 0 1.3em;
  padding: 3px 0 3px 17px;
  border-left: 3px solid var(--brand-line);
  color: var(--ink-2);
  font-size: 1.03rem;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose a {
  font-weight: 500;
}

.prose hr {
  margin: 2.4em 0;
}

.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}

/* tables */

.table-wrap {
  margin: 0 0 1.5em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

th,
td {
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--ink-2);
  font-size: .8125rem;
  letter-spacing: .01em;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td code {
  white-space: nowrap;
}

/* callout */

.callout {
  display: flex;
  gap: 12px;
  margin: 0 0 1.5em;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  font-size: .9375rem;
  line-height: 1.65;
}

.callout svg {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 2px;
  color: var(--muted);
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout strong {
  color: var(--ink);
}

.callout--warn {
  border-color: var(--warn-line);
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.callout--warn svg {
  color: var(--warn);
}

.callout--info {
  border-color: var(--brand-line);
  border-left-color: var(--brand-600);
  background: var(--brand-soft);
}

.callout--info svg {
  color: var(--brand-700);
}

/* ---------- faq ---------- */

.faq {
  max-width: 74ch;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 2px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq details[open] summary {
  padding-bottom: 8px;
}

.faq__a {
  padding: 0 2px 18px;
  color: var(--body);
  font-size: .9375rem;
  line-height: 1.7;
  max-width: 66ch;
}

.faq__a p:last-child {
  margin-bottom: 0;
}

/* ---------- breadcrumb ---------- */

.crumbs {
  padding: 16px 0 0;
  font-size: .8125rem;
  color: var(--muted);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line-2);
}

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

.crumbs a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* ---------- page header (inner pages) ---------- */

.page-head {
  padding: 22px 0 34px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.page-head h1 {
  max-width: 22ch;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.4rem);
}

.page-head p {
  max-width: 64ch;
  margin: 12px 0 0;
  font-size: 1.0125rem;
  color: var(--muted);
}

/* ---------- layout with sidebar ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 52px;
  align-items: start;
  padding: 46px 0 64px;
}

.aside {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  font-size: .875rem;
}

.aside__box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.aside__title {
  margin: 0 0 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aside li + li {
  margin-top: 9px;
}

.aside a {
  color: var(--body);
  text-decoration: none;
}

.aside a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.aside__cta {
  margin-top: 18px;
}

@media (max-width: 940px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding-top: 32px;
  }

  .aside {
    position: static;
  }
}

/* ---------- article meta ---------- */

.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 16px;
  font-size: .8125rem;
  color: var(--muted);
}

.art-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- toc ---------- */

.toc {
  margin: 0 0 2rem;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: .9rem;
}

.toc__title {
  margin: 0 0 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
}

.toc li {
  margin-bottom: 5px;
}

.toc a {
  color: var(--body);
  text-decoration: none;
}

.toc a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* ---------- next / prev ---------- */

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.pager a {
  display: block;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

.pager a:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.pager span {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}

.pager strong {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- footer ---------- */

.footer {
  padding: 54px 0 26px;
  background: #0b1220;
  color: #94a3b8;
  font-size: .875rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 30px;
}

.footer .brand {
  color: #fff;
  margin-bottom: 12px;
}

.footer__blurb {
  max-width: 30ch;
  margin: 0;
  font-size: .8438rem;
  line-height: 1.65;
  color: #94a3b8;
}

.footer__title {
  margin: 0 0 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer li + li {
  margin-top: 9px;
}

.footer a {
  color: #94a3b8;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  font-size: .8125rem;
  color: #64748b;
}

/* ---------- consent ---------- */

.consent {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 80;
  width: min(420px, calc(100vw - 40px));
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -18px rgba(15, 23, 42, .35);
  font-size: .875rem;
  line-height: 1.6;
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0 0 12px;
  color: var(--body);
}

.consent__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- misc ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 8px 0;
}

.skip:focus {
  left: 0;
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notice {
  margin-top: 14px;
  font-size: .8125rem;
  color: var(--muted);
}

.notice--warn {
  color: var(--warn);
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.pill--ok {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand-700);
}

.pill--bad {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}

.lead-box {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}

.lead-box h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.lead-box p:last-child {
  margin-bottom: 0;
}

.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 820px) {
  .section {
    padding: 50px 0;
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding: 40px 0 34px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .algo {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px 10px;
    padding: 12px;
  }

  .algo__name {
    grid-column: 1 / -1;
  }

  .algo__len {
    display: none;
  }

  .tool__body {
    padding: 14px;
  }

  .tool__hint {
    display: none;
  }

  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .lead-box {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .header,
  .footer,
  .consent,
  .tool__top,
  .pager {
    display: none;
  }
}
