/* InTension — the instrument is a document. Paper, ink, hairlines. */
@import url("/fonts/fonts.css");

:root {
  --paper: oklch(0.966 0.009 85);
  --paper-deep: oklch(0.935 0.013 83);
  --paper-shade: oklch(0.895 0.016 82);
  --ink: oklch(0.27 0.022 60);
  --ink-soft: oklch(0.44 0.018 65);
  --ink-faint: oklch(0.58 0.014 70);
  --hairline: oklch(0.72 0.018 78);

  --amber: oklch(0.70 0.125 72);        /* today */
  --blue: oklch(0.53 0.105 248);        /* future */
  --oxblood: oklch(0.42 0.125 25);      /* the stamp, the one primary action, an objection */
  --oxblood-deep: oklch(0.36 0.12 25);

  --serif: "Libre Caslon Text", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Avenir Next", system-ui, sans-serif;

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

.serif { font-family: var(--serif); }
.smallcaps {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.faint { color: var(--ink-faint); }
.soft { color: var(--ink-soft); }
.ox { color: var(--oxblood); }

/* ---------- the rule (horizontal continuum) ---------- */
.rule-wrap { position: relative; width: 100%; }
.rule { position: relative; height: 1px; background: var(--hairline); }
.rule::before, .rule::after {
  /* end ticks only — the centre gets no privilege */
  content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--hairline);
}
.rule::before { left: 0; }
.rule::after { right: 0; }

.mark {
  position: absolute; top: 50%;
  --size: 13px;
  width: var(--size); height: var(--size);
  transform: translate(-50%, -50%);
  transition: opacity 600ms var(--ease-out), translate 600ms var(--ease-out);
}
.mark.amber { border-radius: 50%; background: var(--amber); }
.mark.blue  { background: var(--blue); rotate: 45deg; --size: 12px; }
.mark.enter { opacity: 0; translate: 0 -16px; }
.layer-dim .mark.amber { opacity: 0.4; }

/* reference pennant — an annotation above the rule, clearly not a vote */
.pennant {
  position: absolute; bottom: 40px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.pennant .label {
  font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); white-space: nowrap; font-weight: 500;
}
.pennant .flag {
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 7px solid var(--ink-faint);
}
.pennant::after { content: ""; width: 1px; height: 28px; background: var(--hairline); }

.consent-flag {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 3px; height: 26px; background: var(--oxblood);
}
.proposal-mark {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--oxblood); background: var(--paper);
}

/* ---------- stamp ---------- */
.stamp {
  display: inline-block;
  border: 2px solid var(--oxblood); color: var(--oxblood);
  padding: 6px 18px;
  font-family: var(--sans); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.8rem;
  rotate: -1.2deg;
  animation: stamp-in 250ms var(--ease-out) both;
}
@keyframes stamp-in { from { opacity: 0; scale: 1.4; } to { opacity: 1; scale: 1; } }

/* ---------- controls ---------- */
button, .btn {
  font-family: var(--sans); font-size: 1rem;
  border: 1px solid var(--hairline); background: var(--paper); color: var(--ink);
  padding: 10px 18px; cursor: pointer; border-radius: 2px; text-decoration: none; display: inline-block; line-height: 1.3;
}
button:active, .btn:active { background: var(--paper-deep); }
button.primary, .btn.primary { background: var(--oxblood); border-color: var(--oxblood); color: var(--paper); font-weight: 500; }
button.primary:active { background: var(--oxblood-deep); }
button.ghost, .btn.ghost { border-color: transparent; color: var(--ink-soft); }
button:disabled { opacity: 0.45; cursor: default; }
button.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

input[type="text"], input[type="number"], input[type="password"], input[type="url"], textarea, select {
  font-family: var(--sans); font-size: 1rem;
  border: 1px solid var(--hairline); border-radius: 2px;
  background: var(--paper); color: var(--ink);
  padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
label.field { display: flex; flex-direction: column; gap: 4px; }
label.field > .smallcaps { font-size: 0.66rem; }
label.check { display: inline-flex; align-items: center; gap: 8px; }
input[type="range"] { width: 100%; accent-color: var(--oxblood); }

.notice {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 8px 14px; font-size: 0.85rem; border-radius: 2px;
  opacity: 0; transition: opacity 200ms; pointer-events: none; z-index: 10; max-width: 90vw; text-align: center;
}
.notice.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .mark { transition: opacity 300ms ease; }
  .mark.enter { translate: 0 0; }
  .stamp { animation: none; }
}
