/* The document itself: ground, type, and the browser surfaces nobody draws. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: var(--t-14);
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: var(--accent-text); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

::selection { background: color-mix(in srgb, var(--g-500) 28%, transparent); color: var(--ink); }
input, textarea { caret-color: var(--accent); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-2); }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.v-num, time, .num { font-variant-numeric: tabular-nums; }
.ic { flex: none; }
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The mark: Cite's hub, masked so it takes the colour it is given. */
.v-mark {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M62.69 1.64A50.00 50.00 0 1 0 62.69 98.36L60.55 90.21A41.57 41.57 0 1 1 60.55 9.79Z' fill='%23fff'/%3E%3Ccircle cx='50' cy='50' r='30.63' fill='%23fff'/%3E%3Cpolygon points='82.10,12.21 87.79,17.90 82.10,23.59 76.41,17.90' fill='%23fff'/%3E%3Cpolygon points='82.10,76.41 87.79,82.10 82.10,87.79 76.41,82.10' fill='%23fff'/%3E%3Crect x='91.08' y='45.68' width='8.64' height='8.64' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M62.69 1.64A50.00 50.00 0 1 0 62.69 98.36L60.55 90.21A41.57 41.57 0 1 1 60.55 9.79Z' fill='%23fff'/%3E%3Ccircle cx='50' cy='50' r='30.63' fill='%23fff'/%3E%3Cpolygon points='82.10,12.21 87.79,17.90 82.10,23.59 76.41,17.90' fill='%23fff'/%3E%3Cpolygon points='82.10,76.41 87.79,82.10 82.10,87.79 76.41,82.10' fill='%23fff'/%3E%3Crect x='91.08' y='45.68' width='8.64' height='8.64' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}

/*
 * Reduced motion: nothing moves. `transition: none` rather than a tiny
 * duration, because the default transition-property is `all`: a 0.01ms
 * duration would make every style change a transition, and anything reading a
 * colour straight after a theme switch would read the old one.
 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
