/* Shared across every version of the site: type, tokens, and the version
   selector that hangs off the profile photo. Page-specific CSS stays inline. */

@font-face {
  font-family: 'Roboto Mono';
  src: url('fonts/RobotoMono-latin.woff2') format('woff2');
  font-weight: 400 700; font-display: swap;
}

:root {
  --bg: #fff;
  --fg: #0d0d0f;
  --quiet: #8b8b90;
  --rule: #e4e4e8;
  --rule-hard: #c6c6cd;
  --accent: #3834f5;
  --flag: #c2410c;                      /* unwritten content, never real copy */
  --mono: 'Roboto Mono', ui-monospace, Menlo, monospace;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --pad: clamp(20px, 4vw, 64px);
  --fill: color-mix(in srgb, var(--fg) 3.5%, var(--bg));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0c; --fg: #f4f4f6; --quiet: #76767e; --rule: #22222a; --rule-hard: #3a3a45;
    --accent: #8c89ff; --flag: #f0894f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 14px/1.6 var(--mono); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-size: inherit; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.kicker { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--quiet); }
.q { color: var(--quiet); }

/* Content that does not exist yet. Designed, so it is never mistaken for copy. */
.unwritten {
  border: 1px dashed color-mix(in srgb, var(--flag) 45%, var(--rule));
  border-radius: 4px; padding: 14px 16px; color: var(--quiet);
  font-size: 12px; line-height: 1.7; max-width: 60ch;
}
.unwritten b { color: var(--flag); font-weight: 400; letter-spacing: .18em;
               text-transform: uppercase; font-size: 9px; display: block; margin-bottom: 5px; }

/* ---------------- the profile photo, and what it opens ---------------- */
.me {
  display: block; padding: 0; border-radius: 50%; position: relative; flex: none;
  line-height: 0; cursor: pointer;
}
.me img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
          background: var(--rule); }
.me::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0; transition: opacity .18s;
}
.me:hover::after, .me[aria-expanded="true"]::after { opacity: 1; }
.me .pip {
  position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-size: 9px; line-height: 1; border: 2px solid var(--bg); font-weight: 700;
}
@media (prefers-color-scheme: dark) { .me .pip { color: #0a0a0c; } }

#vs-back {
  position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .2s;
}
#vs-back[data-on] { opacity: 1; pointer-events: auto; }
#vs {
  position: fixed; z-index: 91; width: min(420px, calc(100vw - 32px));
  background: var(--bg); border: 1px solid var(--rule-hard); border-radius: 8px;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.35); padding: 20px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s;
}
#vs[data-on] { opacity: 1; transform: none; pointer-events: auto; }
#vs .vs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
               padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
#vs .vs-grp { margin-top: 16px; }
#vs .vs-grp > .kicker { display: block; margin-bottom: 8px; }
#vs a.vs-item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-decoration: none;
  padding: 9px 10px; margin: 0 -10px; border-radius: 5px; align-items: baseline;
}
#vs a.vs-item:hover { background: var(--fill); }
#vs a.vs-item[aria-current="page"] { background: color-mix(in srgb, var(--accent) 9%, transparent); }
#vs .vs-nm { font-weight: 700; }
#vs .vs-note { grid-column: 1 / -1; color: var(--quiet); font-size: 11.5px; line-height: 1.5; }
#vs .vs-here { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
#vs .vs-go { color: var(--quiet); }
#vs a.vs-item:hover .vs-go { color: var(--accent); }
#vs .vs-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule);
               color: var(--quiet); font-size: 11px; line-height: 1.6; }
