/* MOLT reset, type, primitives. No cards-in-cards, no glow, no gradient text. */

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

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ground);
  color: var(--ink);
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  letter-spacing: 0;
  overflow-wrap: break-word;
}

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

[hidden] { display: none !important; }

canvas[data-molt-object] {
  width: 100%;
  height: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: var(--track-display);
  line-height: var(--leading-display);
  margin: 0;
  color: var(--ink);
}

h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 500; }

p { margin: 0; }

p + p { margin-top: var(--space-16); }

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.mono,
.anno,
.nav-links a,
.kicker,
.status-mark,
.rail-index,
dt,
.lab-out dt,
.lab-history time {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1.35;
}

.lede {
  font-size: var(--step-1);
  font-weight: 500;
  max-width: 46ch;
  color: var(--ink);
}

.ink-soft { color: var(--ink-soft); }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: var(--space-12) var(--space-20);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--ground);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: normal;
  text-align: center;
  transition: transform var(--fx-hover) var(--ease-out-expo);
}

.btn:hover {
  background: var(--ground);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--ground);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.field {
  display: grid;
  gap: var(--space-8);
}

.field label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.field input[type="number"],
.field input[type="text"] {
  min-height: var(--touch);
  padding: var(--space-12) var(--space-16);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--step-1);
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius);
}

.field input:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}

