/* Copyright 2026 Federico Cesarini, Marco Sassarini. SPDX-License-Identifier: AGPL-3.0-or-later */
/* The site in Crow's own design: the app's tokens (graphite, one blue, the crow's red, the brain's eight colours),
   Inter, white pill buttons, soft motion that never springs. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Crow's tokens (llm-wiki-v2-app/src/styles/tokens.css) */
  --bg-deep: #0b0c0f;
  --bg: #0f1113;
  --surface-header: #101214;
  --surface: #141618;
  --raised: #16181c;
  --raised-2: #1a1c1f;
  --control: #25272b;
  --control-hover: #2f3236;
  --active: #2b2d32;
  --hover: rgba(255, 255, 255, 0.045);
  --border: #2b2d30;
  --border-soft: #222429;
  --divider: #1f2123;
  --track: #292c33;
  --text: #ffffff;
  --text-2: #d2d3d7;
  --text-3: #b7bbc1;
  --muted: #8e939a;
  --faint: #62676e;
  --accent: #3d80fc;
  --accent-hi: #4a8bff;
  --accent-lo: #3770fe;
  --accent-soft: rgba(61, 128, 252, 0.16);
  --crow: #f64a44;
  --danger: #f0645f;
  --warn: #f5b85a;
  --ok: #4cc4ae;
  --cta-bg: #f4f4f5;
  --cta-bg-hover: #ffffff;
  --cta-text: #111215;
  --node-root: #9097a0;
  --node-note: #7f868f;
  --node-label: #8a9095;
  --node-label-hi: #86e7f9;
  --area-1: #4cc4ae;
  --area-2: #f5b85a;
  --area-3: #ed6461;
  --area-4: #4389fe;
  --area-5: #a68cf7;
  --area-6: #5ec2f2;
  --area-7: #ef8fb7;
  --area-8: #c3cf6b;
  --font: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r-xs: 5px;
  --r-sm: 7px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-pill: 999px;
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 14px 34px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 3px rgba(61, 128, 252, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-med: 260ms;
  --t-slow: 420ms;

  /* The site's own */
  --page: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(88px, 12vw, 148px);
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 0ms;
    --t-med: 0ms;
    --t-slow: 0ms;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px / 1.55 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent-hi);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A link inside running text is underlined, so it never relies on its colour alone. */
p a:not(.btn):not(.link-arrow):not(.note-link),
main li a:not(.btn):not(.dl):not(.pill-link):not(.post),
dd a,
.md a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 3px;
}

.footer li a,
.nav-links a {
  text-decoration: none;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

::selection {
  background: rgba(61, 128, 252, 0.35);
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

:not(pre) > code {
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 500;
}

.skip:focus {
  top: 12px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #33363b transparent;
}

/* -- layout -------------------------------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  position: relative;
  padding: var(--section) 0 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--accent));
}

.head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.head h2 {
  margin-top: 14px;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.head p {
  margin-top: 18px;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--text-3);
  text-wrap: pretty;
}

.head p + p {
  margin-top: 12px;
}

.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.small {
  font-size: 14px;
  color: var(--muted);
}

.fine {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* -- buttons, as the app's -------------------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  flex: none;
}

.btn-cta {
  background: var(--cta-bg);
  color: var(--cta-text);
}

.btn-cta:hover {
  background: var(--cta-bg-hover);
}

.btn-lg {
  height: 56px;
  padding: 0 34px;
  font-size: 17px;
  box-shadow: var(--shadow-pop);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-outline:hover {
  background: var(--hover);
  border-color: #3a3d43;
}

.btn-dark {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: var(--r-lg);
  background: var(--control);
  color: var(--text);
}

.btn-dark:hover {
  background: var(--control-hover);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.link-arrow svg {
  transition: transform var(--t-fast) var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(2px);
}

/* -- nav ------------------------------------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition:
    background-color var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    backdrop-filter var(--t-med) var(--ease);
  border-bottom: 1px solid transparent;
}

.nav[data-scrolled],
.nav[data-open] {
  background: rgba(15, 17, 19, 0.78);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom-color: var(--divider);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 550;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: auto;
}

.crow-mark {
  filter: drop-shadow(0 0 0.6px rgba(246, 74, 68, 0.55)) drop-shadow(0 4px 14px rgba(246, 74, 68, 0.22));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--text-3);
  transition:
    color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--hover);
}

.nav-links a[aria-current] {
  color: var(--text);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.gh:hover {
  text-decoration: none;
  color: var(--text);
  background: var(--hover);
}

.nav .btn {
  height: 34px;
  padding: 0 16px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--r-lg);
  place-items: center;
  color: var(--text);
}

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: grid;
  }
  .nav-end {
    margin-left: auto;
  }
  .nav[data-open] .nav-links {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 18px;
    background: rgba(15, 17, 19, 0.96);
    border-bottom: 1px solid var(--divider);
  }
  .nav[data-open] .nav-links a {
    padding: 12px 4px;
    font-size: 16px;
    border-radius: 0;
  }
}

@media (max-width: 560px) {
  .gh {
    display: none;
  }
}

/* -- hero ------------------------------------------------------------------------------------------------------ */

.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: min(980px, 100svh);
  padding: 128px var(--gutter) 64px;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgba(20, 22, 24, 0.7);
  color: var(--text-2);
  font-size: 13.5px;
  backdrop-filter: blur(8px);
}

.badge:hover {
  text-decoration: none;
  color: var(--text);
  border-color: #3a3d43;
}

.badge b {
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: #a9c6ff;
  font-weight: 500;
  font-size: 12px;
}

.hero .crow-mark {
  width: 92px;
  margin-top: 40px;
}

.hero h1 {
  margin-top: 30px;
  font-size: clamp(40px, 6.6vw, 76px);
  font-weight: 420;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero .lead {
  margin-top: 22px;
  max-width: 620px;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: balance;
}

.hero .sub {
  margin-top: 14px;
  max-width: 640px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.hero-cta .btn-outline {
  height: 56px;
  padding: 0 28px;
  font-size: 16px;
}

.dl-note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.dl-note a {
  color: var(--text-3);
  text-decoration: underline;
  text-decoration-color: rgba(183, 187, 193, 0.35);
  text-underline-offset: 3px;
}

.dl-note a:hover {
  color: var(--text);
}

.byline {
  margin-top: 30px;
  font-size: 14px;
  color: var(--muted);
}

.byline a {
  color: var(--text-2);
}

/* -- a window frame for the app's own recordings ---------------------------------------------------------------- */

.window {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--divider);
  background: var(--surface-header);
}

.window-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3d42;
}

.window-bar span {
  margin: 0 auto;
  padding-right: 52px;
  font-size: 12.5px;
  color: var(--muted);
}

.window video,
.window img {
  width: 100%;
  height: auto;
  background: var(--bg);
}

.hero-shot {
  position: relative;
  max-width: 1040px;
  margin: -8px auto 0;
  padding: 0 var(--gutter);
}

.hero-shot figcaption {
  margin-top: 14px;
  text-align: center;
}

/* -- the brain explorer ----------------------------------------------------------------------------------------- */

.workspace {
  position: relative;
  overflow-anchor: none; /* on a phone the card opens above the list: the page must not jump to follow the list */
  display: grid;
  grid-template-columns: 268px 1fr;
  height: min(760px, 86vh);
  min-height: 600px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}

.ws-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 18px 10px 16px;
  border-right: 1px solid var(--divider);
  background: var(--bg);
}

.ws-label {
  padding: 0 10px;
  margin: 6px 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ws-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ws-questions {
  margin-bottom: 18px !important;
}

.ws-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: var(--r-lg);
  text-align: left;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-2);
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.ws-row:hover {
  background: var(--hover);
  color: var(--text);
}

.ws-row[data-current] {
  background: var(--active);
  color: var(--text);
}

.ws-questions .ws-row {
  padding-top: 9px;
  padding-bottom: 9px;
}

.ws-row svg {
  flex: none;
  color: var(--faint);
}

.ws-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.ws-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ws-note .ws-name,
.ws-tree .ws-note {
  font-size: 13.5px;
}

.ws-tree .ws-note {
  color: var(--text-3);
  min-height: 32px;
}

.ws-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 40% 40%, rgba(255, 255, 255, 0.018), transparent 70%),
    var(--bg);
}

.ws-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.ws-tools {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.ws-tool {
  display: grid;
  place-items: center;
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border-radius: var(--r-lg);
  background: rgba(37, 39, 43, 0.82);
  color: var(--text-2);
  font-size: 13px;
  backdrop-filter: blur(6px);
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.ws-tool:hover {
  background: var(--control-hover);
  color: var(--text);
}

.ws-hint {
  position: absolute;
  left: 18px;
  top: 60px;
  max-width: 40%;
  line-height: 1.5;
  z-index: 2;
  font-size: 12.5px;
  color: var(--muted);
  pointer-events: none;
}

.ws-card {
  position: absolute;
  padding: 0;
  top: 16px;
  right: 16px;
  bottom: 104px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  width: min(400px, 44%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: rise var(--t-med) var(--ease);
}

.ws-card-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 57px;
  padding: 0 10px 0 18px;
  background: var(--surface-header);
  border-bottom: 1px solid var(--divider);
}

.ws-card-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.012em;
}

.ws-card-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 22px 18px;
  overscroll-behavior: contain;
}

.ws-composer {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(620px, calc(100% - 32px));
  min-height: 62px;
  padding: 10px 10px 10px 22px;
  background: var(--raised-2);
  border: 1px solid var(--border);
  border-radius: 34px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

.ws-composer:focus-within {
  border-color: rgba(61, 128, 252, 0.55);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35), var(--ring);
}

.ws-composer > svg {
  flex: none;
  color: var(--text-3);
}

.ws-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  font-size: 16.5px;
  background: transparent;
  border: 0;
  outline: none;
}

.ws-input::placeholder {
  color: var(--text-3);
  opacity: 1;
}

.ws-input:focus-visible {
  box-shadow: none;
}

.ws-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #417afe, #3770fe);
  box-shadow: 0 2px 10px rgba(55, 112, 254, 0.35);
}

.ws-results {
  position: absolute;
  left: 50%;
  bottom: 92px;
  z-index: 6;
  translate: -50% 0;
  width: min(620px, calc(100% - 32px));
  max-height: 300px;
  overflow: auto;
  padding: 6px;
  background: var(--raised-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
}

.ws-none {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-3);
}

.ws-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-lg);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease);
}

.ws-item:hover {
  background: var(--hover);
}

.ws-item-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.ws-item-sum {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.ws-hover {
  position: absolute;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 270px;
  padding: 10px 12px 11px;
  background: var(--raised-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  pointer-events: none;
  animation: fade var(--t-fast) var(--ease);
}

.hc-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
}

.hc-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-3);
}

.hc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* The card's contents: a thread, a note, a folder */
.ws-thread {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ws-turn {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
}

.ws-you-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
}

.ws-crow {
  width: 26px;
  height: auto;
  margin-top: 1px;
  filter: drop-shadow(0 0 0.6px rgba(246, 74, 68, 0.55));
}

.ws-turn-body {
  min-width: 0;
}

.ws-who {
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

.ws-question {
  margin-top: 2px;
  font-size: 16px;
  line-height: 22px;
}

.ws-shimmer {
  width: fit-content;
  margin-top: 4px;
  font-size: 15px;
  line-height: 22px;
  color: transparent;
  background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 35%, var(--text) 50%, var(--muted) 65%, var(--muted) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 2.4s linear infinite;
}

.ws-answer {
  margin-top: 4px;
}

.rise > * {
  animation: rise var(--t-slow) var(--ease) both;
}

.rise > :nth-child(2) {
  animation-delay: 70ms;
}
.rise > :nth-child(3) {
  animation-delay: 140ms;
}
.rise > :nth-child(4) {
  animation-delay: 210ms;
}
.rise > :nth-child(n + 5) {
  animation-delay: 280ms;
}

.md {
  font-size: 15px;
  line-height: 22px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.md > :first-child {
  margin-top: 0;
}

.md p,
.md ul,
.md ol,
.md table,
.md pre {
  margin: 0 0 10px;
}

.md ul,
.md ol {
  padding-left: 20px;
}

.md li + li {
  margin-top: 3px;
}

.md h3,
.md h4,
.md h5 {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.md h4.see-also {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.md th,
.md td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.md th {
  color: var(--text-3);
  font-weight: 500;
}

.md strong {
  font-weight: 600;
}

.ws-note .md {
  font-size: 15.5px;
  line-height: 24px;
  color: var(--text-2);
}

.cite {
  display: inline-block;
  max-width: 190px;
  margin: 0 1px 0 3px;
  padding: 0 7px;
  overflow: hidden;
  vertical-align: 1px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 19px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xs);
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.cite:hover,
.cite:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(61, 128, 252, 0.45);
}

.note-link {
  color: var(--accent-hi);
}

.ws-trail {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.ws-back {
  margin-bottom: 12px;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-3);
  background: var(--control);
}

.ws-back::before {
  content: "‹ ";
}

.ws-back:hover {
  color: var(--text);
  background: var(--control-hover);
}

.ws-sources {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
}

.ws-sources .ws-label {
  padding: 0;
}

.ws-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 14px;
  color: var(--text-2);
}

.ws-source svg {
  color: var(--muted);
}

.ws-file {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  overflow-wrap: anywhere;
}

.ws-desc {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin-bottom: 16px;
}

.ws-folder .ws-label {
  padding: 0;
}

.ws-list {
  display: flex;
  flex-direction: column;
  margin: 0 -12px;
}

.ws-trace {
  margin-top: 16px;
  border-top: 1px solid var(--divider);
  padding-top: 10px;
}

.ws-trace summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  list-style: none;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-3);
}

.ws-trace summary::-webkit-details-marker {
  display: none;
}

.ws-trace summary:hover {
  color: var(--text);
}

.ws-trace summary svg {
  transition: transform var(--t-fast) var(--ease);
}

.ws-trace[open] summary svg {
  transform: rotate(90deg);
}

.ws-trace-step {
  margin: 14px 0 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.ws-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ws-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--faint);
}

.ws-bar.chosen {
  color: var(--text-2);
}

.ws-bar-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ws-bar[data-note] {
  cursor: pointer;
}

.ws-bar[data-note]:hover .ws-bar-name {
  color: var(--text);
}

.ws-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
}

.ws-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #4a4e55;
}

.ws-bar.chosen .ws-bar-fill {
  background: var(--accent);
}

.ws-bar-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ws-usage {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.ws-touch {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  place-items: end center;
  padding-bottom: 96px;
  pointer-events: none;
}

.ws-touch .btn {
  pointer-events: auto;
}

.ws-done {
  display: none;
}

.ws-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.workspace[data-ready] .ws-loading {
  display: none;
}

.ws-caption {
  margin-top: 18px;
  text-align: center;
}

@media (pointer: coarse) {
  .workspace:not([data-touch-on]) .ws-touch {
    display: grid;
  }
  .workspace[data-touch-on] .ws-done {
    display: grid;
  }
  .ws-hint {
    display: none;
  }
}

@media (max-width: 819px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(460px, 62vh) auto;
    height: auto;
    min-height: 0;
  }
  .ws-sidebar {
    order: 3;
    border-right: 0;
    border-top: 1px solid var(--divider);
    max-height: none;
  }
  .ws-stage {
    order: 1;
    min-height: 460px;
  }
  .ws-card {
    order: 2;
    position: relative;
    inset: auto;
    width: auto;
    max-height: 70vh;
    margin: 0;
    border-radius: 0;
    border-width: 1px 0 0;
    box-shadow: none;
    animation: none;
  }
  .ws-composer {
    bottom: 14px;
    min-height: 54px;
  }
  .ws-results {
    bottom: 78px;
  }
  .ws-hint {
    display: none;
  }
}

/* -- features -------------------------------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tile {
  position: relative;
  padding: 26px 24px 26px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.tile h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tile p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-3);
}

.tile .icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 11px;
  color: var(--c, var(--accent-hi));
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent);
}

.tile-wide {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .tile-wide {
    grid-column: auto;
  }
}

.formats {
  margin-top: 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* -- see it ---------------------------------------------------------------------------------------------------- */

.shot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shot .window {
  border-radius: 12px;
}

.shot figcaption {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-3);
}

.shot figcaption b {
  color: var(--text);
  font-weight: 500;
}

.films video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.strip {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.strip figure {
  scroll-snap-align: start;
}

.strip img {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
}

.strip figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-3);
}

/* -- AI apps --------------------------------------------------------------------------------------------------- */

.apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .apps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.app-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--control);
  border: 1px solid var(--border);
  flex: none;
}

.app-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.app h3 {
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.25;
}

.app h3 small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.app p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-3);
}

.app .then {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  font-size: 13.5px;
  color: var(--muted);
}

.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 760px) {
  .tools {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tool {
  padding: 20px 22px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(61, 128, 252, 0.06), transparent 70%), var(--raised);
}

.tool code {
  font-size: 15px;
  color: #a9c6ff;
  background: var(--accent-soft);
  border-color: rgba(61, 128, 252, 0.3);
}

.tool p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-3);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.prose p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-3);
}

.prose p + p {
  margin-top: 14px;
}

.prose strong {
  color: var(--text);
  font-weight: 500;
}

/* -- code ------------------------------------------------------------------------------------------------------ */

.code {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-soft);
  background: var(--bg-deep);
}

.code + .code {
  margin-top: 12px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--divider);
  font-size: 12.5px;
  color: var(--muted);
}

.code pre {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
}

.code .c {
  color: var(--muted);
}

.code .p {
  color: var(--muted);
  user-select: none;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  color: var(--text-3);
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.copy:hover {
  background: var(--hover);
  color: var(--text);
}

.copy::after {
  content: "Copy";
}

.copy[data-copied] {
  color: var(--ok);
}

.copy[data-copied]::after {
  content: "Copied";
}

/* -- why a wiki ------------------------------------------------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 860px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stat {
  padding: 26px 24px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.stat-value {
  font-size: clamp(44px, 5.4vw, 60px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 12px;
  font-size: 16px;
  color: var(--text);
}

.stat-vs {
  margin-top: 16px;
}

.vs-row {
  display: grid;
  grid-template-columns: 110px 1fr 64px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.vs-row + .vs-row {
  margin-top: 7px;
}

.vs-row b {
  font-weight: 500;
  color: var(--text-2);
}

.vs-bar {
  height: 7px;
  border-radius: 4px;
  background: var(--track);
  overflow: hidden;
}

.vs-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #555a61;
  transform-origin: left;
}

.vs-row.crow .vs-bar i {
  background: var(--accent);
}

.vs-row span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.reveals .reveal .vs-bar i {
  transform: scaleX(0);
  transition: transform 1.1s var(--ease) 0.15s;
}

.reveals .reveal.in .vs-bar i {
  transform: scaleX(1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table-wrap {
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
  overflow-x: auto;
}

.table th,
.table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--divider);
  line-height: 1.5;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table thead th {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
}

.table th[scope="row"] {
  font-weight: 400;
  color: var(--text-3);
}

.table td {
  color: var(--text-2);
}

.table .yes {
  color: var(--text);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.chip-llm {
  color: #ffd79a;
  background: rgba(245, 184, 90, 0.13);
}

.chip-cls {
  color: #a9c6ff;
  background: var(--accent-soft);
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
}

.pipeline b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  white-space: nowrap;
}

.pipeline span {
  padding: 5px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--bg-deep);
}

.pipeline i {
  font-style: normal;
  color: var(--muted);
}

/* -- download -------------------------------------------------------------------------------------------------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .dl-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dl-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.dl-card[data-mine] {
  border-color: rgba(61, 128, 252, 0.5);
  box-shadow: 0 0 0 1px rgba(61, 128, 252, 0.18) inset;
}

.dl-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dl-card-head svg {
  color: var(--text);
}

.dl-card h3 {
  font-size: 19px;
  font-weight: 500;
}

.dl-card .mine {
  display: none;
  margin-left: auto;
  font-size: 12px;
  color: #a9c6ff;
}

.dl-card[data-mine] .mine {
  display: inline;
}

.dl {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  margin: 0 -12px;
  border-radius: var(--r-lg);
  color: var(--text);
  transition: background-color var(--t-fast) var(--ease);
}

.dl:hover {
  background: var(--hover);
  text-decoration: none;
}

.dl + .dl {
  border-top: 1px solid var(--divider);
}

.dl-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dl-for {
  font-size: 15px;
  font-weight: 500;
}

.dl-file {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-size {
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.dl-ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--control);
  color: var(--text);
  flex: none;
}

.dl:hover .dl-ico {
  background: var(--cta-bg);
  color: var(--cta-text);
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

.acc {
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.acc + .acc {
  margin-top: 10px;
}

.acc summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 16.5px;
  font-weight: 500;
}

.acc summary::-webkit-details-marker {
  display: none;
}

.acc summary::after {
  content: "";
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--t-fast) var(--ease);
}

.acc[open] summary::after {
  transform: rotate(-135deg);
}

.acc summary small {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
}

.acc-body {
  padding: 0 22px 22px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-3);
}

.acc-body ol,
.acc-body ul {
  padding-left: 20px;
}

.acc-body li + li {
  margin-top: 8px;
}

.acc-body p + p,
.acc-body p + ul,
.acc-body ol + ul,
.acc-body ol + p,
.acc-body ul + p {
  margin-top: 12px;
}

.acc-body b {
  color: var(--text);
  font-weight: 500;
}

.acc-body img {
  margin: 12px 0;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  list-style: none;
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.steps li {
  counter-increment: step;
  padding: 22px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-3);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #a9c6ff;
  font-weight: 500;
  font-size: 14px;
}

.steps b {
  color: var(--text);
  font-weight: 500;
}

/* -- engine ---------------------------------------------------------------------------------------------------- */

.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 520px) {
  .links {
    grid-template-columns: minmax(0, 1fr);
  }
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
  color: var(--text);
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.link-card:hover {
  text-decoration: none;
  background: #1b1d21;
  border-color: var(--border);
}

.link-card b {
  font-weight: 500;
  font-size: 15px;
}

.link-card span {
  font-size: 13px;
  color: var(--muted);
}

.counter {
  font-variant-numeric: tabular-nums;
}

/* -- paper ----------------------------------------------------------------------------------------------------- */

.paper {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  padding: clamp(26px, 4vw, 44px);
  border-radius: 22px;
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(700px 300px at 0% 0%, rgba(246, 74, 68, 0.07), transparent 70%),
    var(--raised);
}

@media (max-width: 900px) {
  .paper {
    grid-template-columns: minmax(0, 1fr);
  }
}

.paper h3 {
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.paper .authors {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--text-2);
}

.paper .abstract {
  margin-top: 20px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-3);
}

.paper .abstract + .abstract {
  margin-top: 12px;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.paper-side dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  font-size: 14.5px;
}

.paper-side dt {
  color: var(--muted);
}

.paper-side dd {
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.paper-side .code {
  margin-top: 22px;
}

/* -- news ------------------------------------------------------------------------------------------------------ */

.numbers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 980px) {
  .numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.number {
  padding: 22px 20px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.number b {
  display: block;
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 420;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.number > span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-3);
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 26px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline li {
  position: relative;
  padding: 0 0 26px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--dot, var(--node-root));
}

.timeline time {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timeline h4 {
  margin-top: 3px;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.35;
}

.timeline p {
  margin-top: 5px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-3);
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
  color: var(--text);
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.post:hover {
  text-decoration: none;
  background: #1b1d21;
  border-color: var(--border);
}

.post-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--control);
  color: var(--text);
}

.post-logo.li {
  background: #0a66c2;
  color: #fff;
}

.post-logo.x {
  background: #000;
  border: 1px solid #333;
  color: #fff;
}

.post-meta,
.post-title,
.post-text {
  display: block;
}

.post-meta {
  font-size: 12.5px;
  color: var(--muted);
}

.post-title {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.post-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -- people ---------------------------------------------------------------------------------------------------- */

.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 760px) {
  .people {
    grid-template-columns: minmax(0, 1fr);
  }
}

.person {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.person-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--control);
  flex: none;
}

.person h3 {
  font-size: 19px;
  font-weight: 500;
}

.person blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-3);
}

.person blockquote cite {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-style: normal;
  color: var(--muted);
}

.person p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-3);
}

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-2);
}

.pill-link:hover {
  text-decoration: none;
  color: var(--text);
  background: var(--hover);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 22px 26px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-soft);
  background: var(--raised);
}

.contact p {
  font-size: 15.5px;
  color: var(--text-2);
}

.contact .person-links {
  gap: 8px;
}

/* -- FAQ ------------------------------------------------------------------------------------------------------- */

.faq {
  max-width: 860px;
}

/* -- final call and footer ------------------------------------------------------------------------------------- */

.final {
  padding-bottom: var(--section);
}

.final-box {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  border-radius: 26px;
  border: 1px solid var(--border-soft);
  background: var(--bg-deep);
  text-align: center;
}

.final-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.final-box > *:not(canvas) {
  position: relative;
}

.final-box h2 {
  margin-top: 24px;
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 430;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.final-box .crow-mark {
  width: 76px;
  margin: 0 auto;
}

.final-box .hero-cta {
  margin-top: 30px;
}

.footer {
  border-top: 1px solid var(--divider);
  padding: 56px 0 40px;
  background: var(--bg-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 28px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-about {
    grid-column: 1 / -1;
  }
}

.footer-about p {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 340px;
}

.footer .footer-h {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 12px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li + li {
  margin-top: 8px;
}

.footer li a {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.footer li a:hover {
  color: var(--text);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  color: var(--muted);
}

.footer-base a {
  color: var(--muted);
}

/* -- motion ---------------------------------------------------------------------------------------------------- */

.reveals .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.reveals .reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-shimmer {
    animation: none;
    color: var(--text-3);
  }
  .rise > *,
  .ws-card,
  .ws-hover {
    animation: none;
  }
}

@media (max-width: 640px) {
  :not(pre) > code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* -- review fixes -------------------------------------------------------------------------------------------- */

.table-note {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.ws-recorded {
  display: inline-block;
  margin-left: 8px;
  padding: 0 7px;
  vertical-align: 1px;
  border-radius: var(--r-pill);
  background: rgba(245, 184, 90, 0.13);
  color: #ffd79a;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 19px;
}

.ws-aside {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: rgba(245, 184, 90, 0.08);
  border: 1px solid rgba(245, 184, 90, 0.2);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-3);
}

.ws-wiki summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
}

.ws-wiki summary::-webkit-details-marker {
  display: none;
}

.ws-wiki summary .ws-count {
  letter-spacing: 0;
  text-transform: none;
}

.ws-wiki summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--t-fast) var(--ease);
}

.ws-wiki[open] summary::after {
  transform: rotate(-135deg);
}

.ws-wiki summary .ws-count {
  margin-left: auto;
  margin-right: 12px;
}

.ws-card-title:focus-visible {
  box-shadow: none;
  outline: none;
}

/* Between a phone and a wide window the list goes under the brain, so the brain keeps the width beside the card. */
@media (min-width: 820px) and (max-width: 1100px) {
  .workspace {
    --stage-h: min(720px, 84vh);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--stage-h) auto;
    height: auto;
    min-height: 0;
  }
  .ws-stage {
    grid-row: 1;
  }
  .ws-sidebar {
    grid-row: 2;
    border-right: 0;
    border-top: 1px solid var(--divider);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    column-gap: 18px;
    align-items: start;
  }
  .ws-sidebar > .ws-label,
  .ws-sidebar > .ws-questions {
    grid-column: 1;
  }
  .ws-sidebar > .ws-wiki {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .ws-tree {
    columns: 2;
    column-gap: 12px;
  }
  .ws-tree li {
    break-inside: avoid;
  }
  .ws-card {
    bottom: auto;
    height: calc(var(--stage-h) - 120px);
  }
}
