/* ------------------------------------------------------------------
   og.css — og.texs.org

   Two halves. The first is this site's own: tokens, the page, the form,
   the results. The second is the texs.org chrome — home badge, controls
   cluster, hamburger panel, auth modal, changelog card, bug form,
   selection colour — lifted from poster-flag's poster.css with the poster
   parts removed, so the corner matches every sibling site. Geometry in
   that half is the spec's (../../CHROME-SPEC.md); do not re-tune it here.
   ------------------------------------------------------------------ */

/* ==================================================================
   1. tokens
   ================================================================== */

:root {
  --site-bg: #F6F0EB;          /* texs.org's cream */
  --paper: #FFFFFF;
  --ink: #17130E;
  --ink-2: #4A4238;
  --muted: #948A7C;
  --rule: #E3DBCF;
  --rule-hard: #C9BFAF;
  --band: #F0E8D9;
  --field: #F6F2ED;
  --hover-quiet: rgba(0, 0, 0, 0.06);
  --accent: #1D9BF0;           /* the bird's old blue — the thing being previewed */
  --accent-hover: #1A8CD8;
  --on-accent: #FFFFFF;
  --ok: #16A34A;
  --warn: #D97706;
  --err: #DC2626;
  --info: #6B7280;
  --shadow: 0 1px 2px rgba(23, 19, 14, .04), 0 8px 24px rgba(23, 19, 14, .06);

  /* X's own card palette, kept separate so the preview looks like X and not
     like this site — light and dark X both. */
  --x-border: #CFD9DE;
  --x-text: #0F1419;
  --x-dim: #536471;
  --x-fill: #E7ECF0;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI",
    "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --site-bg: #111318;          /* the shared texs.org dark canvas */
  --paper: #191C22;
  --ink: #F3F1EE;
  --ink-2: #C9C5BF;
  --muted: #8D887F;
  --rule: #2A2E37;
  --rule-hard: #3A3F4A;
  --band: #20242C;
  --field: #20242C;
  --hover-quiet: rgba(255, 255, 255, 0.08);
  --accent: #1D9BF0;
  --accent-hover: #3AA9F3;
  --ok: #4ADE80;
  --warn: #FBBF24;
  --err: #F87171;
  --info: #9CA3AF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);

  --x-border: #2F3336;
  --x-text: #E7E9EA;
  --x-dim: #71767B;
  --x-fill: #202327;
}

/* ==================================================================
   2. the page
   ================================================================== */

* { box-sizing: border-box; }
html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--site-bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
b { font-weight: 600; }
code { font: 12.5px var(--mono); background: var(--band); padding: 1px 5px; border-radius: 5px; }

.wrap {
  width: min(760px, 100% - 32px);
  margin: 0 auto;
  /* Clear the 72px badge + its 32px inset, with air. */
  padding: 136px 0 96px;
}
@media (max-width: 768px) { .wrap { padding-top: 112px; } }

/* ---- hero ---- */
.hero { margin-bottom: 28px; }
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.hero h1 .x {
  display: inline-block;
  font-weight: 900;
  transform: translateY(1px);
}
.lede { margin: 0; font-size: 16.5px; color: var(--ink-2); max-width: 60ch; }

/* ---- the form ---- */
.checker { margin-bottom: 28px; }
.field {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 155, 240, .18), var(--shadow); }
.field input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 16px var(--font);
  outline: none;
}
.field input::placeholder { color: var(--muted); }
.field button {
  padding: 10px 20px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 15px var(--font);
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.field button:hover { background: var(--accent-hover); }
.field button[disabled] { opacity: .6; cursor: default; }

.opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 10px 6px 0;
  font-size: 13px;
  color: var(--ink-2);
}
.opts label { display: inline-flex; align-items: center; gap: 8px; }
.opts select {
  padding: 5px 28px 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 500 13px var(--font);
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23948A7C" stroke-width="2" stroke-linecap="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  cursor: pointer;
}
.hint { color: var(--muted); }

/* ---- verdict ---- */
.verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.verdict-main, .verdict-side { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.verdict-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
}
.v-good .verdict-chip { background: rgba(22, 163, 74, .14); color: var(--ok); }
.v-meh  .verdict-chip { background: rgba(217, 119, 6, .14); color: var(--warn); }
.v-bad  .verdict-chip { background: rgba(220, 38, 38, .12); color: var(--err); }
.v-wait .verdict-chip { background: var(--band); color: var(--ink-2); }
.verdict-url { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.verdict-url a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-hard); }
.verdict-ms { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font: 500 13px var(--font); cursor: pointer; }
.linkish:hover { color: var(--accent-hover); text-decoration: underline; }

.spin {
  width: 12px; height: 12px;
  border: 2px solid var(--rule-hard);
  border-top-color: var(--ink-2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- result cards ---- */
.card {
  padding: 20px 22px;
  margin-bottom: 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card-quiet { box-shadow: none; padding: 12px 22px; }
.card h2 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.section-lede { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }

/* ---- the X post ---- */
.post {
  display: flex;
  gap: 12px;
  padding: 14px 16px 16px;
  border: 1px solid var(--x-border);
  border-radius: 16px;
  color: var(--x-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.post-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--x-fill);
}
.post-body { flex: 1; min-width: 0; }
.post-head { font-size: 15px; line-height: 20px; }
.post-head span { color: var(--x-dim); font-weight: 400; margin-left: 4px; }
.post-text { font-size: 15px; line-height: 20px; margin: 2px 0 12px; }
.post-link { color: #1D9BF0; }

.xcard {
  border: 1px solid var(--x-border);
  border-radius: 16px;
  overflow: hidden;
  max-width: 516px;
}
.xcard-img {
  position: relative;
  aspect-ratio: 2 / 1;
  background: var(--x-fill);
}
.xcard-img img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.xcard-img--none::before, .xcard-img--broken::before,
.xcard-thumb--none::before, .xcard-thumb--broken::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--x-fill) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23536471" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="m21 15-5-5L5 21"/></svg>') center / 40px no-repeat;
}
.xcard-img--broken img, .xcard-thumb--broken img { visibility: hidden; }
.xcard-overlay {
  position: absolute;
  left: 12px; bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .77);
  color: #fff;
  font-size: 13px; line-height: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcard-play {
  position: absolute; left: 50%; top: 50%;
  width: 67px; height: 67px;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgba(29, 155, 240, .9) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') center / 32px no-repeat;
  border: 4px solid #fff;
}
.xcard-from { margin-top: 4px; font-size: 13px; line-height: 16px; color: var(--x-dim); }

.xcard-small { display: flex; }
.xcard-thumb {
  position: relative;
  width: 130px; flex-shrink: 0;
  aspect-ratio: 1;
  border-right: 1px solid var(--x-border);
  background: var(--x-fill);
}
.xcard-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.xcard-text {
  display: flex; flex-direction: column; justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 12px;
  font-size: 15px; line-height: 20px;
}
.xcard-domain { color: var(--x-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xcard-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xcard-desc {
  color: var(--x-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 480px) {
  .xcard-thumb { width: 96px; }
  .xcard-text { font-size: 14px; line-height: 18px; }
}

.xcard-bare { padding: 12px 14px; border-style: dashed; }
.xcard-link { color: #1D9BF0; word-break: break-all; }
.preview-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.preview-type { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* ---- the chain ---- */
.hops {
  list-style: none;
  margin: 0; padding: 0;
  position: relative;
}
.hop {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  position: relative;
}
/* The thread between hops. */
.hop:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 21px; top: 32px; bottom: -8px;
  width: 2px;
  background: var(--rule);
}
.st {
  flex-shrink: 0;
  min-width: 44px;
  padding: 3px 0;
  border-radius: 7px;
  text-align: center;
  font: 700 12.5px var(--mono);
  letter-spacing: .02em;
  position: relative; z-index: 1;
}
.st-2xx { background: rgba(22, 163, 74, .14); color: var(--ok); }
.st-3xx { background: rgba(217, 119, 6, .14); color: var(--warn); }
.st-4xx, .st-5xx { background: rgba(220, 38, 38, .12); color: var(--err); }
.st-err { background: var(--band); color: var(--muted); }
.hop-body { min-width: 0; flex: 1; padding-top: 1px; }
.hop-url {
  display: block;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.hop-final .hop-url { font-weight: 600; }
a.hop-url:hover { color: var(--accent); }
.hop-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
}
.note {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--band);
  color: var(--ink-2);
  font-size: 11.5px;
}
.note-err { background: rgba(220, 38, 38, .12); color: var(--err); }
.hops-mini { margin-top: 10px; }
.hops-mini .hop { padding: 4px 0; }
.hops-mini .hop:not(:last-child)::after { top: 26px; bottom: -4px; }
.hops-mini .hop-url { font-size: 13px; }

/* ---- issues ---- */
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issue {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; line-height: 1.5;
  color: var(--ink-2);
}
.issue .dot {
  flex-shrink: 0;
  width: 9px; height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--info);
}
.issue-error .dot { background: var(--err); }
.issue-warn .dot { background: var(--warn); }
.issue-ok .dot { background: var(--ok); }
.issue-error { color: var(--ink); }

/* ---- fields ---- */
.fields, .tags { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fields th, .tags th {
  width: 110px;
  padding: 8px 12px 8px 0;
  text-align: left;
  vertical-align: top;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.fields td, .tags td { padding: 8px 0; vertical-align: top; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.fields th { border-top: 1px solid var(--rule); }
.fields tr:first-child th, .fields tr:first-child td { border-top: 0; }
.fields td:last-child { width: 150px; padding-left: 12px; text-align: right; white-space: nowrap; }
.val { color: var(--ink); }
.val-none { color: var(--muted); }
.val-hint { margin-top: 3px; font-size: 12px; color: var(--muted); }
.src {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font: 600 11px var(--mono);
  letter-spacing: .01em;
}
.src-tw { background: rgba(29, 155, 240, .14); color: var(--accent); }
.src-og { background: rgba(217, 119, 6, .14); color: var(--warn); }
.src-def { background: var(--band); color: var(--ink-2); }
.src-none { background: rgba(220, 38, 38, .12); color: var(--err); }
@media (max-width: 560px) {
  .fields, .fields tbody, .fields tr, .fields th, .fields td { display: block; width: auto; }
  .fields th { padding: 10px 0 0; border-top: 1px solid var(--rule); }
  .fields td { border-top: 0; padding: 2px 0 10px; }
  .fields td:last-child { text-align: left; padding-left: 0; padding-top: 0; }
  .fields tr:first-child th { border-top: 0; }
}

/* ---- image ---- */
.imgfacts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--ink-2); }
.imgfacts .ok { color: var(--ok); }
.bad { color: var(--err); }
.imglink { display: block; margin-top: 8px; font-size: 13px; overflow-wrap: anywhere; }

/* ---- all tags ---- */
.alltags summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.alltags summary:hover { color: var(--ink); }
.alltags[open] summary { margin-bottom: 10px; }
.tags th { font: 12.5px var(--mono); width: 200px; white-space: normal; }
.tags td { font-size: 13px; color: var(--ink-2); }
.tags tr:first-child th, .tags tr:first-child td { border-top: 0; }
.tags th { border-top: 1px solid var(--rule); }

/* ---- recent ---- */
.recent { margin-top: 24px; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.recent-head h2 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent-item {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0; border-radius: 8px;
  background: none;
  color: var(--ink-2);
  font: 13.5px var(--font);
  text-align: left;
  cursor: pointer;
}
.recent-item:hover { background: var(--hover-quiet); color: var(--ink); }
.recent-item .dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; translate: 0 -1px; }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--err); }
.recent-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-title { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }

/* ---- how it works ---- */
.notes { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); }
.notes h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.notes dl { margin: 0; display: grid; gap: 14px; }
.notes dt { font-weight: 600; color: var(--ink); }
.notes dd { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }

footer.foot { margin-top: 48px; font-size: 13px; color: var(--muted); }
footer.foot a { color: var(--ink-2); }

/* ---- toast ---- */
#toast {
  position: fixed;
  left: 50%; bottom: 24px;
  translate: -50% 12px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, translate .2s;
  z-index: 130;
  max-width: calc(100% - 32px);
  overflow-wrap: anywhere;
}
#toast.on { opacity: 1; translate: -50% 0; }

/* ==================================================================
   3. texs.org chrome — see ../../CHROME-SPEC.md. Lifted from poster-flag.
   ================================================================== */

/* ---- §9 the home badge ---- */
a #menu {
  position: absolute;
  top: 32px;
  left: 32px;
  width: 72px;
  height: 72px;
  border: 0;
  cursor: pointer;
  background-color: initial;
  background-image: url(https://texs.org/assets/tex-sound.avif);
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  border-radius: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
  z-index: 9999;
  display: inline-block;
}
a #menu:hover { transform: scale(1.1); }
@media (max-width: 768px) { a #menu { top: 24px; left: 24px; } }

/* ---- §1 the cluster ---- */
.controls {
  position: absolute;
  z-index: 60;
  top: 16px;
  right: 16px;
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 4px;
}
.controls button {
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: 500 13px var(--font);
  outline: none;
  box-shadow: none;
  cursor: pointer;
}
.controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.controls button:hover { background: var(--hover-quiet); }

/* ---- §3–§6 the hamburger and its panel ---- */
.tm-wrap {
  position: relative;
  --panel: #FFF;
  --line: #E7E0D7;
  --tm-row: var(--ink-2);
  --tm-dim: var(--ink-2);
  --tm-faint: var(--ink-2);
  --tm-bright: var(--ink);
  --tm-wash: rgba(0, 0, 0, .05);
  --tm-field: var(--field);
  --tm-on-bg: rgba(29, 155, 240, .12);
  --tm-faint-op: .6;
  --tm-dim-op: .8;
  /* Concept colours, NOT theme colours — §5 fixes these across every app. */
  --tm-changelog: #A855F7;
  --tm-bug: #EF4444;
}

.controls .tm-wrap button {
  padding: 0; border: none; border-radius: 0; background: none;
  backdrop-filter: none; box-shadow: none; color: inherit; font: inherit;
}
.controls .tm-wrap button:hover { border-color: transparent; background: none; }

/* The wrapper carries the radius and the hover; the trigger inside is
   transparent. One element lights — CHROME-SPEC §3. */
.tm-button {
  display: inline-flex; align-items: center;
  border-radius: 8px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.tm-button:hover { color: var(--ink); background: var(--hover-quiet); }

.controls .tm-wrap .tm-trigger {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 8px;
  border: none; background: none;
  color: inherit; cursor: pointer; box-shadow: none;
}
.controls .tm-wrap .tm-trigger svg { width: 24px; height: 24px; }

.tm-panel {
  position: absolute; right: 0; top: 100%; margin-top: 4px; width: 288px;
  background: var(--panel); border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0,0,0,.14); padding: 8px 0; z-index: 200;
  text-align: start;
  color: var(--tm-row);
}
.tm-panel[hidden] { display: none; }

.tm-section { padding: 4px 0; }
.tm-divider { border-bottom: 1px solid var(--line); }

.tm-item--nested { padding-inline-start: 44px; }
.tm-apps[hidden] { display: none; }
.tm-blurb {
  margin: 0; padding: 0 16px 6px 44px;
  font-size: 11px; color: var(--tm-faint); opacity: var(--tm-faint-op);
}

.more-sites-icon { display: flex; color: #ff1800; }
:root[data-theme="dark"] .more-sites-icon { color: #5eead4; }

/* The turning globe — CHROME-SPEC §5. The keyframes are the sampled sine of
   a half rotation; the step-end twin flips which half is drawn. Poster-flag's
   poster.css carries the full derivation. */
.more-sites-globe { flex-shrink: 0; overflow: visible; }
.more-sites-globe-m {
  animation:
    more-sites-globe-turn 9s linear infinite,
    more-sites-globe-half 9s step-end infinite;
}
@keyframes more-sites-globe-turn {
  0%     { rx: 0.1px; }
  12.5%  { rx: 4.018px; }
  25%    { rx: 7.425px; }
  37.5%  { rx: 9.701px; }
  45%    { rx: 10.371px; }
  50%    { rx: 10.5px; }
  55%    { rx: 10.371px; }
  62.5%  { rx: 9.701px; }
  75%    { rx: 7.425px; }
  87.5%  { rx: 4.018px; }
  100%   { rx: 0.1px; }
}
@keyframes more-sites-globe-half {
  0%, 100% { stroke-dashoffset: 75px; }
  50%      { stroke-dashoffset: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .more-sites-globe-m { animation: none; }
}

/* §6 the version row */
.tm-version {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
}
.tm-version-stack { display: flex; align-items: center; gap: 6px; }
.tm-version-actions { display: flex; align-items: center; gap: 12px; }
.controls .tm-wrap .tm-theme {
  display: flex; align-items: center;
  padding: 0; border: none; background: none;
  color: var(--tm-faint); cursor: pointer; transition: color .15s;
}
.controls .tm-wrap .tm-theme:hover { color: var(--tm-bright); }
.controls .tm-wrap .tm-theme > svg { width: 20px; height: 20px; }
.tm-version-text { display: flex; flex-direction: column; }
.tm-version-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--tm-faint); opacity: var(--tm-faint-op);
  font-weight: 600; line-height: 1;
}
.tm-version-value { font-size: 12px; color: var(--tm-dim); opacity: var(--tm-dim-op); }
.controls .tm-wrap .tm-version-info {
  display: flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 50%;
  color: var(--tm-changelog); cursor: pointer;
  transition: background .15s, color .15s;
}
.controls .tm-wrap .tm-version-info svg { width: 16px; height: 16px; }
.controls .tm-wrap .tm-panel .tm-version-info:hover { background: var(--tm-wash); }

/* §5 rows */
.controls .tm-wrap .tm-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 16px; border: none; background: none;
  font: inherit; font-size: 14px; color: var(--tm-row);
  cursor: pointer; text-decoration: none; text-align: start; transition: background .15s;
}
.controls .tm-wrap .tm-panel .tm-item:hover { background: var(--tm-wash); }
.controls .tm-wrap .tm-panel .tm-item--on,
.controls .tm-wrap .tm-panel .tm-item--on:hover {
  color: var(--accent); background: var(--tm-on-bg); font-weight: 500;
}
.tm-item-name { flex: 1; unicode-bidi: plaintext; }
.tm-here { font-size: 10px; color: var(--accent); opacity: .7; }
.tm-chevron { display: flex; opacity: .5; transition: transform .2s; }
.tm-chevron.open { transform: rotate(180deg); }

.tm-icon { display: flex; align-items: center; flex-shrink: 0; color: var(--tm-row); opacity: .75; }
.tm-item[data-changelog] .tm-icon { color: var(--tm-changelog); opacity: 1; }
.tm-item[data-bug] .tm-icon { color: var(--tm-bug); opacity: 1; }
.tm-signin .tm-icon, .tm-signout .tm-icon { color: var(--tm-dim); opacity: 1; }

.tm-member { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.tm-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tm-member-text { font-size: 12px; color: var(--tm-dim); line-height: 1.3; }

/* vhs's dark ladder in a neutral ramp — see poster-flag's note. */
:root[data-theme="dark"] .tm-wrap {
  --panel: #1D1D1D;
  --line: #3A3A3A;
  --tm-row: #D4D4D4;
  --tm-dim: #A3A3A3;
  --tm-faint: #8A8A8A;
  --tm-bright: #FAFAFA;
  --tm-wash: #2E2E2E;
  --tm-field: #2A2A2A;
  --tm-on-bg: rgba(29, 155, 240, .14);
  --tm-faint-op: 1;
  --tm-dim-op: 1;
}
:root[data-theme="dark"] .controls .tm-wrap button {
  background: none; border-color: transparent; box-shadow: none; backdrop-filter: none;
}
/* One hover, not two: the trigger never paints its own wash. Left last in
   the chrome block so source order backs the specificity up. */
.controls .tm-wrap .tm-button > button:hover,
:root[data-theme="dark"] .controls .tm-wrap .tm-button > button:hover {
  background: none;
}

/* ---- the sign-in modal ---- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.4);
}
.auth-card {
  position: relative;
  width: min(24rem, 100%);
  margin: auto;
  background: var(--paper);
  color: var(--ink);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(20, 14, 6, 0.45);
}
.auth-x {
  position: absolute;
  top: 14px;
  inset-inline-end: 16px;
  padding: 2px;
  border: 0;
  background: none;
  font: 400 22px/1 var(--font);
  color: var(--muted);
  cursor: pointer;
  z-index: 1;
}
.auth-x:hover { color: var(--ink); }
.auth-center { text-align: center; }
.auth-head { margin-bottom: 24px; }
.auth-wave { font-size: 40px; margin-bottom: 12px; }
.auth-circle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
}
:root[data-theme="dark"] .auth-circle { background: rgba(20, 83, 45, 0.4); color: #4ade80; }
.auth-title { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.auth-sub { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: -8px; }
.auth-label--start { text-align: start; }
.auth-modal .auth-input,
.auth-modal .auth-code {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  outline: none;
}
.auth-modal .auth-input:focus,
.auth-modal .auth-code:focus { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; }
.auth-modal .auth-code { text-align: center; font-size: 24px; letter-spacing: 5px; }
.auth-modal .auth-btn {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  font: 600 14px var(--font);
  background: #3b82f6;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.auth-modal .auth-btn:hover { background: #2563eb; }
.auth-modal .auth-btn[disabled] { opacity: 0.5; cursor: default; }
.auth-modal .auth-btn--dark { background: var(--ink); color: var(--paper); }
.auth-modal .auth-btn--dark:hover { background: var(--ink-2); }
.auth-err {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  text-align: start;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
}
:root[data-theme="dark"] .auth-err {
  border-color: rgba(127, 29, 29, 0.8);
  background: rgba(69, 10, 10, 0.4);
  color: #fca5a5;
}
.auth-note {
  margin-top: 24px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  text-align: start;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
}
:root[data-theme="dark"] .auth-note {
  border-color: rgba(120, 53, 15, 0.8);
  background: rgba(69, 26, 3, 0.4);
  color: #fde68a;
}
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; }
.auth-hint { font-size: 11.5px; color: var(--muted); }
.auth-resend { border: 0; background: none; font: 400 13px var(--font); color: var(--muted); cursor: pointer; }
.auth-resend:hover { color: var(--ink-2); }
.auth-resend[disabled] { opacity: 0.5; cursor: default; }

/* passkeys: the big leading button, the outline twin, the "or" rule, the offer */
.auth-modal .auth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-modal .auth-btn--big { padding: 12px 16px; font-size: 16px; }
.auth-modal .auth-btn--outline {
  background: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  font-weight: 500;
}
.auth-modal .auth-btn--outline:hover { background: var(--field); }
.auth-or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.auth-or span { flex: 1; height: 1px; background: var(--rule); }
.auth-circle--blue { background: #dbeafe; color: #2563eb; }
:root[data-theme="dark"] .auth-circle--blue { background: rgba(23, 37, 84, 0.5); color: #93c5fd; }
.auth-sub--offer { margin-bottom: 24px; }
.auth-offer-err { margin-bottom: 16px; }
.auth-offer-err .auth-err { text-align: center; }
.auth-modal .auth-pk-save { width: 100%; }
.auth-skip {
  margin-top: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: 500 14px var(--font);
  color: var(--muted);
  cursor: pointer;
}
.auth-skip:hover { background: var(--field); color: var(--ink-2); }
.auth-skip[disabled] { opacity: 0.5; cursor: default; }
.auth-spin { animation: auth-spin 0.8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ---- what's new ---- */
.chlog {
  position: fixed;
  inset: 0;
  z-index: 118;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 24px;
  background: rgba(20, 14, 6, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.chlog[hidden] { display: none; }
.chlog.on { opacity: 1; }
.chlog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(34rem, 100%);
  max-height: 100%;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 30px clamp(20px, 4vw, 34px) 8px;
  box-shadow: 0 24px 70px rgba(20, 14, 6, 0.45);
  transform: translateY(8px);
  transition: transform 0.2s ease;
}
.chlog.on .chlog-card { transform: none; }
.chlog-card::after {
  content: '';
  position: absolute;
  inset-inline: 1px;
  bottom: 1px;
  height: 44px;
  border-radius: 0 0 15px 15px;
  background: linear-gradient(to top, var(--paper), transparent);
  pointer-events: none;
}
.chlog-x {
  position: absolute;
  top: 12px;
  inset-inline-end: 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.chlog-x:hover { color: var(--ink); }
.chlog-card h2 { margin: 0 0 6px; font: 700 20px/1.2 var(--font); color: var(--ink); }
.chlog-sub { margin: 0 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.chlog-body { flex: 1; overflow-y: auto; padding: 14px 0 26px; overscroll-behavior: contain; }
.chlog-date {
  display: inline-block;
  margin: 20px 0 8px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--band);
  font: 600 12px/1 var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  color: var(--ink);
}
.chlog-body > .chlog-date:first-child { margin-top: 0; }
.chlog-list { margin: 0; padding-inline-start: 20px; list-style: disc; }
.chlog-list li { margin-bottom: 7px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.chlog-list li::marker { color: var(--muted); }
.chlog-list b { color: var(--ink); font-weight: 700; }
.chlog-list a { color: var(--accent); }
.chlog-p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.newver {
  position: fixed;
  z-index: 119;
  bottom: 18px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--rule-hard);
  border-radius: 999px;
  background: var(--band);
  color: var(--ink);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
}
.newver.over { z-index: 121; }
.newver button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; padding: 10px 16px; background: none;
  font: 600 13px var(--font); color: inherit; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.newver button:hover { background: var(--hover-quiet); }
.newver-what { color: var(--ink-2); }
.newver-what:hover { color: var(--ink); }
.newver-rule { width: 1px; background: var(--rule-hard); }

/* ---- report a bug ---- */
.bugbox {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 24px 48px;
  overflow: auto;
  background: rgba(20, 14, 6, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.bugbox[hidden] { display: none; }
.bugbox.on { opacity: 1; }
.bugbox-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(28rem, 100%);
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 30px clamp(20px, 4vw, 32px) 26px;
  box-shadow: 0 24px 70px rgba(20, 14, 6, 0.45);
  transform: translateY(8px);
  transition: transform 0.2s ease;
}
.bugbox.on .bugbox-card { transform: none; }
.bugbox-x {
  position: absolute; top: 12px; inset-inline-end: 14px;
  border: 0; background: none; color: var(--muted);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.bugbox-x:hover { color: var(--ink); }
.bugbox-card h2 { margin: 0 0 6px; font: 700 20px/1.2 var(--font); color: var(--ink); }
.bugbox-sub { margin: 0 0 20px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.bugbox-card label { font: 600 12px var(--font); color: var(--ink-2); margin-bottom: 5px; }
.bugbox-card textarea,
.bugbox-card input[type="email"] {
  width: 100%;
  padding: 9px 11px;
  margin-bottom: 16px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  outline: none;
}
.bugbox-card textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
.bugbox-card textarea:focus,
.bugbox-card input[type="email"]:focus { border-color: var(--accent); }
.bugbox-card ::placeholder { color: var(--muted); }
.bugbox-note { margin: 0 0 4px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.bugbox-msg { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--accent); }
.bugbox-msg:empty { display: none; }
.bugbox-msg.bad { color: #C4442E; }
:root[data-theme="dark"] .bugbox-msg.bad { color: #F08A72; }
.bugbox-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.bugbox-alt { border: 0; background: none; font: 600 13px var(--font); color: var(--ink-2); padding: 8px 6px; cursor: pointer; }
.bugbox-alt:hover { color: var(--ink); }
.bugbox-go {
  border: 0; padding: 9px 18px; border-radius: 999px;
  font: 700 13px var(--font); background: var(--accent); color: var(--on-accent); cursor: pointer;
}
.bugbox-go[disabled] { opacity: .6; cursor: default; }

/* ---- §10 text selection: the texs.org marker ---- */
::selection {
  background: rgba(255, 232, 41, 0.75);
  color: currentColor;
  text-shadow: none;
}
:root[data-theme="dark"] ::selection {
  background: rgba(0, 255, 181, 0.42);
}
