purecrypto 0.6.29

A pure-Rust cryptography toolkit with no foreign-code dependencies, from constant-time primitives up to keys, X.509 and TLS.
Documentation
/* purecrypto — design system.
   Direction: a precision instrument. Deep midnight field, machine-voice mono,
   and a two-tone semantic accent that encodes meaning throughout:
   VIOLET = secret / private key material,  TEAL = public / verified output. */

:root {
  --ink: #090b13;
  --ink-1: #0d1020; /* raised surface */
  --ink-2: #12162a; /* panel */
  --ink-3: #171c33; /* inset / input */
  --line: #232a4a;
  --line-soft: #1a2039;

  --paper: #e9ebf6;
  --dim: #aab2cc;
  --muted: #737c9c;

  --violet: #8b6cff; /* secret / private */
  --violet-2: #a88dff;
  --violet-glow: rgba(139, 108, 255, 0.16);
  --teal: #2fe0c8; /* public / verified */
  --teal-2: #6df0dd;
  --teal-glow: rgba(47, 224, 200, 0.14);
  --amber: #ffb454; /* entropy / caution */

  --font-display: 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1140px;
  --radius: 14px;
  --radius-sm: 9px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--violet-glow);
  color: var(--paper);
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.section {
  padding: clamp(64px, 10vw, 128px) 0;
  position: relative;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin: 14px 0 18px;
}

.section-head p {
  color: var(--dim);
  font-size: 1.05rem;
  margin: 0;
}

/* --- machine-voice text --- */
.mono {
  font-family: var(--font-mono);
}

.hex {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  word-break: break-all;
  color: var(--dim);
}
.hex.secret {
  color: var(--violet-2);
}
.hex.public {
  color: var(--teal-2);
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--paper);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}
.btn:hover {
  border-color: var(--violet);
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(180deg, var(--violet), #6f4bff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 30px -12px var(--violet);
}
.btn-primary:hover {
  border-color: transparent;
  filter: brightness(1.06);
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* --- panels --- */
.panel {
  background: var(--ink-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dim);
}
.tag.secret {
  color: var(--violet-2);
  border-color: rgba(139, 108, 255, 0.35);
  background: var(--violet-glow);
}
.tag.public {
  color: var(--teal-2);
  border-color: rgba(47, 224, 200, 0.3);
  background: var(--teal-glow);
}
.tag.pq {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.3);
  background: rgba(255, 180, 84, 0.09);
}

/* form controls */
input[type='text'],
textarea,
select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--paper);
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.16s ease;
}
input[type='text']:focus,
textarea:focus,
select:focus {
  border-color: var(--violet);
  outline: none;
}
textarea {
  resize: vertical;
  min-height: 52px;
  line-height: 1.6;
}
label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

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