/* ==========================================================================
   whatimeant: a wall of sticky notes
   Shared by every page. Notes are rendered by /js/note.js.
   Theme: <html data-theme="light|dark"> set by /js/theme.js.
   ========================================================================== */

:root {
  --wall: #f3eee4;
  --wall-dot: #e0d6c3;
  --surface: #fffdf8;
  --surface-2: #f8f3ea;
  --ink: #26221d;
  --ink-2: #5b5449;
  --ink-3: #847b6d;
  --line: #e0d6c4;
  --line-strong: #c9bca5;
  --on-ink: #fffdf8;
  --accent: #ffd84d;
  --focus: #2f6fdb;
  --heart: #e0455f;
  --danger: #a3243b;
  --shadow-ink: 40, 30, 10;
  --tape: rgba(255, 255, 255, 0.55);
  --tape-2: rgba(255, 255, 255, 0.32);
  --note-dim: 1;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;
  --type: "Courier Prime", "Courier New", monospace;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color-scheme: light;
}

/* Dark: plain neutral graphite (no warm brown cast). The notes keep their
   paper colours, slightly dimmed, so they read like paper under low light. */
[data-theme="dark"] {
  --wall: #141416;
  --wall-dot: transparent;
  --surface: #1c1c1f;
  --surface-2: #232327;
  --ink: #ededee;
  --ink-2: #b9b9be;
  --ink-3: #8a8a91;
  --line: #2d2d32;
  --line-strong: #404047;
  --on-ink: #141416;
  --focus: #8ab4ff;
  --heart: #ff6b81;
  --danger: #ff8a9b;
  --shadow-ink: 0, 0, 0;
  --tape: rgba(255, 255, 255, 0.17);
  --tape-2: rgba(255, 255, 255, 0.08);
  --note-dim: 0.9;
  color-scheme: dark;
}

/* ---- base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--wall);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  color: #26221d;
  background: var(--accent);
}

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

.hand {
  font-family: var(--hand);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--on-ink);
  background: var(--ink);
  border-radius: 8px;
}
.skip-link:focus {
  top: 8px;
}

.muted {
  color: var(--ink-3);
}

/* ---- top nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}
.nav-logo {
  white-space: nowrap;
  font-family: var(--hand);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- brand ---- */
.brand {
  font-family: var(--hand);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark {
  background: linear-gradient(transparent 52%, var(--accent) 52%, var(--accent) 76%, transparent 76%);
  padding: 0 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
[data-theme="dark"] .brand-mark {
  background: linear-gradient(transparent 80%, var(--accent) 80%, var(--accent) 90%, transparent 90%);
}

.hero {
  padding: 22px 0 40px;
  text-align: center;
}
.hero-title {
  margin: 0;
  font-size: clamp(44px, 7.2vw, 88px);
}
.hero-sub {
  margin: 16px auto 0;
  max-width: 30em;
  font-family: var(--hand);
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.3;
  color: var(--ink-2);
}
.hero-meta {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  min-height: 38px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
/* a number written on a strip of tape */
.tape-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 18px 7px;
  font-size: 13.5px;
  color: var(--ink-2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 50%, rgba(255, 255, 255, 0.2)),
    rgba(255, 252, 240, 0.75);
  box-shadow: 0 1px 2px rgba(var(--shadow-ink), 0.12);
  transform: rotate(var(--r, -1deg));
  clip-path: polygon(
    2% 0%, 0% 25%, 2% 50%, 0% 75%, 2% 100%,
    98% 100%, 100% 75%, 98% 50%, 100% 25%, 98% 0%
  );
}
.tape-label strong {
  font-family: var(--hand);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
}
@media (max-width: 480px) {
  .hero-stats {
    gap: 8px 10px;
  }
  .tape-label {
    gap: 4px;
    padding: 4px 11px 5px;
    font-size: 12px;
  }
  .tape-label strong {
    font-size: 17px;
  }
}
[data-theme="dark"] .tape-label {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 50%, rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.09);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  font: 600 14.5px/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--ink);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn-primary {
  color: var(--on-ink);
  background: var(--ink);
}
.btn-primary:hover {
  box-shadow: 0 3px 0 var(--accent);
}
.btn-lg {
  min-height: 48px;
  padding: 0 22px;
  font-size: 15.5px;
}
.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  gap: 6px;
}
.btn-sm svg {
  width: 16px;
  height: 16px;
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover {
  box-shadow: none;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.icon-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}
.icon-btn:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
/* Language picker: globe + native select. On phones only the globe shows;
   the select still covers it, so tapping opens the system list. */
.lang-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 10px;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.lang-select[hidden] {
  display: none;
}
.lang-select:hover,
.lang-select:focus-within {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.lang-select svg {
  flex: none;
  width: 19px;
  height: 19px;
}
.lang-select select {
  max-width: 9.5em;
  padding: 0;
  font: 600 14px var(--sans);
  color: inherit;
  background: transparent;
  border: 0;
  outline: none;
  appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
}
.lang-select select option {
  color: var(--ink);
  background: var(--surface);
}
@media (max-width: 639px) {
  .lang-select {
    width: 42px;
    padding: 0;
    justify-content: center;
  }
  .lang-select select {
    position: absolute;
    inset: 0;
    max-width: none;
    opacity: 0;
  }
}

.theme-icon-dark {
  display: none;
}
[data-theme="dark"] .theme-icon-dark {
  display: block;
}
[data-theme="dark"] .theme-icon-light {
  display: none;
}

/* ---- form controls ---- */
.field,
.select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  font: 500 15px var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}
.field::placeholder {
  color: var(--ink-3);
  opacity: 0.85;
}
.field:hover,
.select:hover {
  border-color: var(--line-strong);
}
.field:focus,
.select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}
.select {
  padding-right: 36px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23847b6d' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
}
.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

/* pills (choices) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  font: 600 14px var(--sans);
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    color 0.12s ease;
}
.pill:hover {
  border-color: var(--line-strong);
}
.pill.is-on,
.pill[aria-pressed="true"] {
  color: var(--on-ink);
  background: var(--ink);
  border-color: var(--ink);
}
.pill[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.pill.is-suggested {
  border-style: dashed;
  border-color: var(--ink-3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
}

/* segmented control */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 10px;
}
.seg button {
  min-height: 36px;
  padding: 0 14px;
  font: 600 14px var(--sans);
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.seg button[aria-pressed="true"] {
  color: var(--on-ink);
  background: var(--ink);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* ==========================================================================
   Wall toolbar
   ========================================================================== */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -20px 26px;
  padding: 12px 20px;
  background: var(--wall);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.toolbar.is-stuck {
  border-bottom-color: var(--line);
}
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar-row {
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
}
.search {
  position: relative;
  flex: 0 1 420px;
  min-width: 220px;
}
.toolbar-filters {
  display: flex;
}
/* joined edges: only the outer corners are rounded */
.toolbar-row .field,
.toolbar-row .select {
  position: relative;
  border-radius: 0;
}
.toolbar-row .search .field {
  border-radius: 12px 0 0 12px;
}
.toolbar-filters .select {
  margin-left: -1.5px;
}
.toolbar-filters .select:last-child {
  border-radius: 0 12px 12px 0;
}
.toolbar-row .field:focus,
.toolbar-row .select:focus,
.toolbar-row .select:hover,
.toolbar-row .field:hover {
  z-index: 1;
}
.search svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  transform: translateY(-50%);
  pointer-events: none;
}
.search .field {
  min-height: 42px;
  padding-left: 38px;
}
.toolbar .select {
  width: auto;
  min-height: 42px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.chip-row::-webkit-scrollbar {
  display: none;
}
@media (max-width: 899px) {
  /* On phones the filters scroll away with the page instead of covering it. */
  .toolbar {
    position: static;
    margin-bottom: 18px;
    padding-top: 4px;
  }
  .toolbar-row {
    flex-wrap: wrap;
  }
  .search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .toolbar-row .search .field {
    border-radius: 12px 12px 0 0;
  }
  .toolbar-filters {
    flex: 1 1 100%;
    margin-top: -1.5px;
  }
  .toolbar-filters .select {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    border-radius: 0 0 0 12px;
  }
  .toolbar-filters .select:last-child {
    margin-left: -1.5px;
    border-radius: 0 0 12px 0;
  }
  .chip-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    padding-right: 28px;
  }
}
.chip-row .pill {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border-color: transparent;
}
.chip-row .pill:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.chip-row .pill.is-on,
.chip-row .pill[aria-pressed="true"] {
  font-weight: 600;
  color: var(--on-ink);
  background: var(--ink);
}

/* ==========================================================================
   The wall + the note
   ========================================================================== */
.wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 46px 32px;
  padding: 16px 6px 0;
}
@media (max-width: 1023px) {
  .wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 50px 30px;
  }
}
@media (max-width: 639px) {
  .wall {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding: 16px 4px 0;
  }
}

.note {
  --tilt: 0deg;
  --tape-tilt: -2deg;
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  padding: 28px 24px 14px;
  color: var(--note-ink);
  background-color: var(--note-bg);
  background-image:
    var(--noise),
    linear-gradient(180deg, rgba(0, 0, 0, 0.035), transparent 16%),
    linear-gradient(160deg, transparent 62%, rgba(0, 0, 0, 0.045));
  border-radius: 2px 2px 3px 14px / 2px 2px 3px 6px;
  box-shadow:
    0 1px 1px rgba(var(--shadow-ink), 0.1),
    0 4px 8px -4px rgba(var(--shadow-ink), 0.16),
    -6px 22px 22px -18px rgba(var(--shadow-ink), 0.5);
  transform: rotate(var(--tilt));
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  filter: brightness(var(--note-dim));
  overflow-wrap: anywhere;
}
.note[role="button"] {
  cursor: pointer;
}
@media (hover: hover) {
  .note[role="button"]:hover {
    transform: rotate(0deg) translateY(-5px);
    box-shadow:
      0 2px 2px rgba(var(--shadow-ink), 0.1),
      0 8px 14px -6px rgba(var(--shadow-ink), 0.18),
      -8px 30px 30px -20px rgba(var(--shadow-ink), 0.55);
    z-index: 2;
  }
}
.note:focus-visible {
  outline-offset: 8px;
}

/* clear tape */
.note-tape {
  position: absolute;
  top: -15px;
  left: 50%;
  z-index: 3;
  width: 118px;
  height: 32px;
  transform: translateX(-50%) rotate(var(--tape-tilt));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 45%, rgba(255, 255, 255, 0.18)),
    linear-gradient(90deg, var(--tape-2), var(--tape) 20%, var(--tape) 80%, var(--tape-2));
  box-shadow: 0 1px 2px rgba(var(--shadow-ink), 0.12);
  -webkit-backdrop-filter: brightness(1.06) saturate(1.05);
  backdrop-filter: brightness(1.06) saturate(1.05);
  clip-path: polygon(
    3% 6%, 0% 22%, 2% 38%, 0% 55%, 3% 72%, 0% 88%, 2% 100%,
    98% 96%, 100% 80%, 97% 63%, 100% 46%, 98% 30%, 100% 14%, 97% 0%
  );
  pointer-events: none;
}

.note-to {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}
.note-to-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-tag {
  flex-shrink: 0;
  padding: 2px 9px;
  font: 700 11px/1.5 var(--sans);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--note-ink);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
}

.note-body {
  flex: 1;
  min-height: 0;
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  white-space: pre-line;
  overflow: hidden;
}
.note-body.is-placeholder {
  color: var(--note-muted);
}
.note-more {
  font: 700 0.62em var(--sans);
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--note-muted);
}

.note-from {
  margin: 8px 0 8px;
  font-size: 17px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* fonts: handwritten (default), regular, typewriter */
.note,
.note.f-hand {
  font-family: var(--hand);
}
.note.f-sans .note-to,
.note.f-sans .note-body,
.note.f-sans .note-from {
  font-family: var(--sans);
  letter-spacing: -0.005em;
}
.note.f-sans .note-body {
  font-weight: 500;
}
.note.f-type .note-to,
.note.f-type .note-body,
.note.f-type .note-from {
  font-family: var(--type);
}

.note-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding-top: 8px;
  font: 500 12.5px var(--sans);
  color: var(--note-muted);
  border-top: 1.5px dashed var(--note-line);
}
.note-info {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
}
.note-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  min-width: 32px;
  justify-content: center;
  padding: 0 8px;
  font: 700 13px var(--sans);
  color: var(--note-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.note-btn:hover {
  color: var(--note-ink);
  background: rgba(255, 255, 255, 0.5);
}
.note-btn svg {
  width: 17px;
  height: 17px;
}
.note-heart.hearted {
  color: #d63452;
}
.note-heart.hearted svg {
  fill: currentColor;
}
.note-heart.pop svg {
  animation: pop 0.35s ease;
}
@keyframes pop {
  40% {
    transform: scale(1.4);
  }
}
.note-yours {
  padding: 2px 8px;
  font: 700 11px var(--sans);
  color: var(--note-ink);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

/* Full note (modal / posted): grows to fit the whole message */
.note.is-full {
  aspect-ratio: auto;
}
.note.is-full .note-body {
  overflow: visible;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(20, 17, 13, 0.8);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade 0.15s ease;
}
.overlay[hidden] {
  display: none;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.sheet {
  position: relative;
  width: max(280px, min(100%, 480px, calc(100vh - 340px)));
  margin: auto 0;
  animation: rise 0.2s ease;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #fffdf8;
}
.sheet-bar .icon-btn {
  color: #fffdf8;
  background: rgba(255, 255, 255, 0.12);
}
.sheet-bar .icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 0;
}
.details dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.details dd {
  margin: 3px 0 0;
  font-weight: 600;
}

/* ---- toast, back to top ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  font-weight: 600;
  color: var(--on-ink);
  background: var(--ink);
  border-radius: 999px;
  visibility: hidden;
  transform: translate(-50%, 160%);
  transition:
    transform 0.25s ease,
    visibility 0.25s;
}
.toast.show {
  visibility: visible;
  transform: translate(-50%, 0);
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top svg {
  width: 20px;
  height: 20px;
}

.footer {
  padding: 48px 0 32px;
  font-size: 14px;
  text-align: center;
  color: var(--ink-3);
}
.footer a {
  color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Server-rendered pages: topic headings, pager, footer links, shared note
   ========================================================================== */
.hero-title-sm {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
}
.hero-title-sm a {
  color: inherit;
  text-decoration: none;
}
.page-h1 {
  margin: 18px auto 0;
  max-width: 22em;
  font-family: var(--hand);
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 700;
  line-height: 1.15;
}
.page-intro {
  margin: 12px auto 0;
  max-width: 36em;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}
.shared-note {
  max-width: 420px;
  margin: 36px auto 8px;
  text-align: left;
}
.shared-note .note {
  aspect-ratio: auto;
  min-height: 0;
}
.shared-note .note-body {
  overflow: visible;
  font-size: 24px;
}
/* A full-card link for crawlers and no-JS readers; the app replaces these
   notes with interactive ones once it loads. */
.note-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 36px 0 8px;
}
.js .pager {
  display: none;
}
.footer .browse {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.2fr;
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
  padding-top: 32px;
  text-align: left;
  border-top: 1px solid var(--line);
}
.footer h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 1;
}
.footer .browse > div:nth-child(2) ul {
  columns: 3;
}
.footer li {
  margin: 0 0 6px;
}
.footer a {
  color: var(--ink-2);
  text-decoration: none;
}
.footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
@media (max-width: 760px) {
  .footer .browse {
    grid-template-columns: 1fr 1fr;
  }
  .footer .browse > div:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
  }
  .footer .browse > div:nth-child(2) ul {
    columns: 2;
  }
}

/* Note modal: one row of equal actions (Download, Story, Copy, Delete/Report) */
.note-actions-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 8px;
  font: 600 14px var(--sans);
  color: var(--ink);
  white-space: nowrap;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}
.act svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.act:hover {
  border-color: var(--ink);
  background: var(--surface);
}
.act-danger {
  color: var(--danger);
}
.act-danger:hover {
  border-color: var(--danger);
}
.act-quiet {
  color: var(--ink-3);
}
@media (max-width: 480px) {
  .note-actions-row {
    gap: 6px;
  }
  .act {
    flex-direction: column;
    gap: 3px;
    min-height: 56px;
    font-size: 12px;
  }
}

/* Reading pages (About, Unsent Project alternative) */
.prose-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.prose-wrap h1 {
  margin: 10px 0 0;
  font-family: var(--hand);
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
}
.prose-wrap .lead {
  margin: 16px 0 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
}
.prose-wrap h2 {
  margin: 44px 0 10px;
  padding-top: 28px;
  font-size: 22px;
  font-weight: 600;
  border-top: 1px solid var(--line);
}
.prose-wrap p,
.prose-wrap li {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
}
.prose-wrap p + p {
  margin-top: 14px;
}
.prose-wrap ul {
  margin: 8px 0 0;
  padding-left: 22px;
  list-style: disc;
}
.prose-wrap li::marker {
  color: var(--ink-3);
}
.prose-wrap li {
  margin: 6px 0;
}
.prose-wrap a:not(.btn) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.prose-wrap a:not(.btn):hover {
  text-decoration-color: var(--ink);
}
.prose-wrap .small {
  font-size: 14px;
  color: var(--ink-3);
}
.prose-wrap h3 {
  margin: 22px 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.compare {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 15px;
}
.compare th,
.compare td {
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.compare thead th {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.compare tbody th {
  font-weight: 600;
  color: var(--ink-2);
  width: 32%;
}
.compare td:nth-child(2) {
  font-weight: 600;
}
.steps {
  counter-reset: step;
  list-style: none !important;
  padding-left: 0 !important;
}
.steps li {
  position: relative;
  padding-left: 40px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font: 700 13px var(--sans);
  color: var(--on-ink);
  background: var(--ink);
  border-radius: 50%;
}
