@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courier-prime-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courier-prime-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courier-prime-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --night: #0c1511;
  --murk: #16261d;
  --moon: #efe6a8;
  --reed: #9fb5a3;
  --paper: #f3efe2;
  --paper-edge: #cfc8b4;
  --paper-press: #e7e0cb;
  --ink: #1d1c19;
  --ink-soft: #6a6557;
  --up: #1f6b43;
  --down: #a8321f;
  --type: "Courier Prime", "Courier New", Courier, ui-monospace, monospace;
}

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

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--type);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--paper);
  background:
    radial-gradient(60rem 30rem at 50% -8rem, #1f3a2a 0%, transparent 70%),
    radial-gradient(40rem 40rem at 0% 60%, #13241b 0%, transparent 70%),
    radial-gradient(40rem 40rem at 100% 90%, #13241b 0%, transparent 70%),
    var(--night);
  background-attachment: fixed;
}

/* ── heading ─────────────────────────────────────────────────────────── */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem 0;
  text-align: center;
}
.mascot {
  width: 5.5rem;
  height: 5.5rem;
  display: block;
}
h1 {
  margin: 0;
  font-size: clamp(1.9rem, 7.5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 700;
  color: var(--moon);
}

/* ── the column ──────────────────────────────────────────────────────── */
.column {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subhead {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 400;
  font-style: italic;
  color: var(--reed);
  text-align: center;
}
.subhead::before,
.subhead::after {
  content: "";
  flex: 1;
  border-top: 1px dashed #3d5245;
}

/* ── cards ───────────────────────────────────────────────────────────── */
.card {
  position: relative;
  padding: 1.1rem 1.25rem 0.75rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 3px;
  box-shadow: 0 1px 0 #fff inset, 0 10px 24px -12px rgba(0, 0, 0, 0.8);
  scroll-margin-top: 1rem;
}
.card:target {
  outline: 3px solid var(--moon);
  outline-offset: 3px;
}

.no {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.no:hover { text-decoration: underline; }

.blurb p {
  margin: 0;
  overflow-wrap: break-word;
}
.blurb p + p { margin-top: 0.55em; }

.actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--paper-edge);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 2.75rem;
  min-height: 2.5rem;
  padding: 0 0.7rem;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  color: #45423a;
  background: transparent;
  border: 1px solid var(--paper-edge);
  border-radius: 3px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:hover:not(:disabled) { background: var(--paper-press); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; }
button:focus-visible,
.no:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.vote.up[aria-pressed="true"],
.vote.up[aria-pressed="true"]:hover {
  color: #fff;
  background: var(--up);
  border-color: var(--up);
}
.vote.down[aria-pressed="true"],
.vote.down[aria-pressed="true"]:hover {
  color: #fff;
  background: var(--down);
  border-color: var(--down);
}

.count {
  min-width: 1ch;
  font-variant-numeric: tabular-nums;
  /* Courier Prime sits a little high against the icon */
  position: relative;
  top: 0.08em;
}

.copy { margin-left: auto; }
.copy.done {
  color: var(--up);
  border-color: var(--up);
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .masthead { padding-top: 1.75rem; }
  .column { padding-left: 0.75rem; padding-right: 0.75rem; }
  .card { padding: 1rem 1rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  button:active:not(:disabled) { transform: none; }
}
