:root {
  --bg: #FAF7F2;
  --bg-alt: #F3EFE8;
  --card: #EFEAE2;
  --ink: #1C1A17;
  --ink-soft: #55504A;
  --accent: #E8662A;
  --accent-soft: #FBE6D8;
  --line: #E2DCD1;
  --radius: 16px;
  --maxw: 1120px;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

a { color: inherit; text-decoration: none; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 6px 18px rgba(232,102,42,.22);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(232,102,42,.3); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); box-shadow: none;
}
.btn--ghost:hover { background: #fff; border-color: var(--ink); box-shadow: none; }
.btn--small { padding: 9px 18px; font-size: 14px; }
.btn--full { width: 100%; padding: 15px; font-size: 16px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px;
  font-weight: 600; color: var(--accent); margin: 0 0 14px;
}
.accent { color: var(--accent); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(250,247,242,.78);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); }
.brand__mark { color: var(--accent); display: block; }
.knet__logo { color: #fff; }
.nav__links { display: flex; gap: 28px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft); }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

/* Focus accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible { outline-offset: 3px; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: -10%; top: -30%;
  width: 70%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(232,102,42,.10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero__web { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero__inner { position: relative; padding: 110px 24px 96px; max-width: 880px; }
.hero__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(38px, 6vw, 66px); line-height: 1.04;
  letter-spacing: -0.015em; margin: 0 0 24px;
}
.hero__sub { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); max-width: 640px; margin: 0 0 34px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Sections */
.section { padding: 92px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 4vw, 42px); line-height: 1.1;
  letter-spacing: -0.01em; margin: 0 0 20px;
}
.section__lead { font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); margin: 0; }

/* Chips */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 34px 0 0; }
.chips li {
  background: #fff; border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
}

/* Course network (fragmented section) */
.frag__head { margin-bottom: 4px; }
.knet { margin: 14px auto 0; max-width: 760px; }
.knet__svg { width: 100%; height: auto; display: block; overflow: visible; }

/* connectors + travelling balls */
.knet__link { fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: .24; }
.knet__ball { fill: var(--accent); }

/* central hub — flat, modern node */
.knet__glow { transform-box: fill-box; transform-origin: center; animation: hubPulse 5s ease-in-out infinite; }
@keyframes hubPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .72; } }
.knet__halo { fill: none; stroke: var(--accent); stroke-opacity: .22; stroke-width: 1.2; }
.knet__orb { fill: var(--accent); filter: drop-shadow(0 10px 26px rgba(232,102,42,.34)); }
.knet__orb-inner { fill: none; stroke: #fff; stroke-opacity: .16; stroke-width: 1; }
.knet__glyph line { stroke: #fff; stroke-opacity: .9; stroke-width: 1.3; }
.knet__glyph circle { fill: #fff; }
.knet__hub-name { fill: #fff; font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: .01em; text-anchor: middle; }

/* content cards */
.knet__card { cursor: default; outline: none; }
.knet__card-bg {
  fill: #fff; stroke: var(--line); stroke-width: 1;
  filter: drop-shadow(0 6px 16px rgba(28,26,23,.07));
  transition: stroke .2s ease;
}
.knet__card:hover .knet__card-bg,
.knet__card:focus-visible .knet__card-bg { stroke: var(--accent); }
.knet__card-badge { fill: var(--accent-soft); }
.knet__card-ic { fill: none; stroke: var(--accent); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.knet__card-tx { fill: var(--ink); font-family: var(--sans); font-weight: 600; font-size: 14.5px; }
.knet__card-ct { fill: var(--ink-soft); font-family: var(--sans); font-weight: 500; font-size: 12.5px; }
.knet__card-num { fill: var(--accent); font-weight: 600; }

/* compact grid (mobile) */
.knet__grid { display: none; text-align: center; }
.kg-hub {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
  padding: 9px 18px 9px 14px; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(232,102,42,.28);
}
.kg-hub-svg { width: 20px; height: 20px; color: #fff; }
.kg-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; text-align: left; }
.kg-card {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; box-shadow: 0 4px 12px rgba(28,26,23,.05);
}
.kg-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }
.kg-ic svg { width: 17px; height: 17px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kg-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.kg-meta strong { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.kg-meta em { font-style: normal; font-size: 11px; color: var(--ink-soft); }
.kg-meta em b { color: var(--accent); font-weight: 600; }

/* auto-sync badge */
.knet__foot { margin-top: 18px; }
.knet__badge {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  box-shadow: 0 6px 16px rgba(28,26,23,.05);
}
.knet__sync { color: var(--accent); font-size: 15px; line-height: 1; display: inline-block; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards — "How Spider works" */
#how { padding: 64px 0; }
#how .section__title { margin-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 24px;
  transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(28,26,23,.07); }
.card__num { font-family: var(--serif); font-size: 14px; color: var(--accent); font-weight: 600; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 9px 0 7px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

/* Split sections */
.split__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.split--reverse .split__inner { direction: rtl; }
.split--reverse .split__text { direction: ltr; }
.split--reverse .split__visual { direction: ltr; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-soft); font-size: 15.5px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* Graph visual */
.split__visual { display: flex; justify-content: center; }
.graph { width: 100%; max-width: 360px; }
.graph__edges line { stroke: var(--accent); stroke-width: 1.4; opacity: .4; }
.graph__nodes circle { fill: var(--ink); }
.graph__node--accent { fill: var(--accent) !important; }

/* Panel mock */
.panel {
  width: 100%; max-width: 380px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: 0 18px 40px rgba(28,26,23,.08);
}
.panel__row { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.panel__bubble {
  background: var(--bg-alt); border-radius: 12px; padding: 14px 16px;
  font-size: 14.5px; margin-bottom: 14px;
}
.panel__answer {
  border-left: 2px solid var(--accent); padding-left: 14px;
  font-size: 14px; color: var(--ink-soft);
}
.panel__src { display: block; font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }

/* Feature: interactive paper viewer */
.feature__head { margin-bottom: 44px; }

.viewer {
  max-width: 920px; margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(28,26,23,.12);
  overflow: hidden;
}

/* Header */
.viewer__top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.viewer__title { margin: 0 0 4px; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.viewer__authors { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.viewer__assistant {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink);
  cursor: default;
}
.viewer__assistant .spark { color: var(--accent); }

/* Meta row */
.viewer__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; border-bottom: 1px solid var(--line); background: #fff;
}
.viewer__toggles { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.vtoggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.vtoggle__sw { width: 30px; height: 17px; border-radius: 999px; background: #cfc8bd; position: relative; transition: background .18s ease; flex: none; }
.vtoggle__sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .18s ease; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.vtoggle.is-on .vtoggle__sw { background: var(--ink); }
.vtoggle.is-on .vtoggle__sw::after { transform: translateX(13px); }
.vtoggle__pill { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pill--blue { color: #2f5fb0; background: #e6eefb; }
.pill--green { color: #2c7a45; background: #e4f4e8; }
.vyear { font-size: 13px; color: var(--ink-soft); }
.vyear__val { color: var(--ink); font-weight: 500; background: var(--bg-alt); padding: 3px 10px; border-radius: 8px; }
.viewer__stats { display: flex; gap: 18px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }

/* Tools row */
.viewer__tools {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 24px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.viewer__tools-left { display: flex; gap: 14px; }
.vtool { font-size: 13px; color: var(--ink-soft); }
.vtool--boxed { border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; background: #fff; color: var(--ink); }

/* Paper body */
.viewer__body { position: relative; padding: 30px 32px 10px; }
/* bottom fade — the paper looks like it continues below */
.viewer__body::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
  backdrop-filter: blur(2.5px); -webkit-backdrop-filter: blur(2.5px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 75%);
  mask-image: linear-gradient(to bottom, transparent, #000 75%);
  pointer-events: none; z-index: 4;
}
.viewer__body::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.94) 88%);
  pointer-events: none; z-index: 5;
}
.doc-title { margin: 0 0 6px; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.2; }
.doc-authors { margin: 0 0 24px; color: var(--ink-soft); font-size: 15px; }
.doc-h { margin: 22px 0 10px; font-size: 16px; font-weight: 600; }
.doc-p { margin: 0 0 16px; font-size: 16px; line-height: 1.85; color: #2a2722; }

/* Highlights — revealed only after Spider "analyses" the paper */
.hl {
  border-radius: 5px; padding: 1px 3px;
  background: transparent; box-shadow: none;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  transition: background .4s ease, box-shadow .3s ease, filter .15s ease;
  outline: none;
}
.viewer:not(.is-analysed) .hl { pointer-events: none; }
.viewer.is-analysed .hl { cursor: pointer; }
.viewer.is-analysed .hl:hover, .viewer.is-analysed .hl:focus-visible, .viewer.is-analysed .hl.is-active { filter: saturate(1.25) brightness(.97); box-shadow: 0 0 0 2px rgba(28,26,23,.12); }
.viewer.is-analysed .hl--connected { background: #d9efdd; box-shadow: inset 0 -2px 0 #5ba86a; }
.viewer.is-analysed .hl--key { background: #dde7f7; box-shadow: inset 0 -2px 0 #5b82c4; }
.viewer.is-analysed .hl--future { background: #ebe1f7; box-shadow: inset 0 -2px 0 #8b5cc4; }
.viewer.is-analysed .hl--connected.is-active { box-shadow: 0 0 0 2px #5ba86a; }
.viewer.is-analysed .hl--key.is-active { box-shadow: 0 0 0 2px #5b82c4; }
.viewer.is-analysed .hl--future.is-active { box-shadow: 0 0 0 2px #8b5cc4; }

/* Toggled-off sources fade back to plain text */
.viewer.hl-hide-personal .hl[data-source="personal"],
.viewer.hl-hide-sample .hl[data-source="sample"] {
  background: transparent; box-shadow: none; cursor: text; pointer-events: none;
}

/* Analyse gate — blur + scrim + button + scan line */
.viewer__paper { transition: filter .45s ease; }
.viewer:not(.is-analysed) .viewer__paper { filter: blur(3px); }
.viewer.is-analysed .viewer__paper { filter: blur(0); }

.viewer__scrim {
  position: absolute; inset: 0; z-index: 8;
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 42%, rgba(250,247,242,.5), rgba(250,247,242,.8));
  transition: opacity .5s ease;
}
.viewer.is-analysed .viewer__scrim { opacity: 0; pointer-events: none; }

.viewer__analyse {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  padding: 14px 26px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 15px;
  box-shadow: 0 12px 28px rgba(232,102,42,.34);
  transition: transform .14s ease, box-shadow .2s ease;
}
.viewer__analyse:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(232,102,42,.42); }
.viewer__analyse:active { transform: translateY(0) scale(.96); }
.viewer__analyse::before {
  content: ""; position: absolute; inset: -3px; border-radius: 999px;
  border: 2px solid var(--accent); opacity: .5;
  animation: analysePulse 2s ease-out infinite;
}
.viewer.is-analysing .viewer__analyse::before { display: none; }
@keyframes analysePulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.32); opacity: 0; } }
.viewer__analyse-spark { font-size: 16px; line-height: 1; }
.viewer.is-analysing .viewer__analyse-spark { animation: spin .8s linear infinite; }

.viewer__scan {
  position: absolute; left: 0; right: 0; top: 0; height: 90px; z-index: 7;
  background: linear-gradient(to bottom, rgba(232,102,42,0), rgba(232,102,42,.16), rgba(232,102,42,0));
  border-bottom: 1px solid rgba(232,102,42,.45);
  opacity: 0; pointer-events: none;
}
.viewer.is-analysing .viewer__scan { animation: scanSweep .52s ease-in-out; }
@keyframes scanSweep {
  0% { opacity: 0; transform: translateY(-30px); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateY(440px); }
}

/* legend fades in with the highlights */
.viewer__legend { transition: opacity .5s ease; }
.viewer:not(.is-analysed) .viewer__legend { opacity: 0; }

/* Concept popover */
.concept-pop {
  position: absolute; z-index: 20; width: 320px; max-width: calc(100% - 24px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px 16px; box-shadow: 0 20px 50px rgba(28,26,23,.18);
  opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease;
  pointer-events: none;
}
.concept-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.concept-pop[hidden] { display: none; }
.concept-pop__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.concept-pop__name { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.concept-pop__badge { flex: none; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge--future { color: #6f3fb0; background: #efe6fa; }
.badge--key { color: #2f5fb0; background: #e6eefb; }
.badge--connected { color: #2c7a45; background: #e4f4e8; }
.concept-pop__text { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.concept-pop__link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.concept-pop__link span { font-size: 16px; line-height: 1; }
.concept-pop__course { display: grid; gap: 4px; padding-top: 12px; }
.concept-pop__course-name { font-size: 13.5px; font-weight: 600; }
.concept-pop__note { font-size: 12.5px; color: var(--ink-soft); }

/* Legend */
.viewer__legend {
  display: flex; gap: 22px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg);
  font-size: 13px; color: var(--ink-soft);
}
.viewer__legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw--connected { background: #d9efdd; box-shadow: inset 0 -2px 0 #5ba86a; }
.sw--key { background: #dde7f7; box-shadow: inset 0 -2px 0 #5b82c4; }
.sw--future { background: #ebe1f7; box-shadow: inset 0 -2px 0 #8b5cc4; }

/* Adaptive learning — understanding panel */
.knowledge__lead2 { margin-top: 16px; }
.kpanel {
  width: 100%; max-width: 440px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 24px 20px; box-shadow: 0 18px 40px rgba(28,26,23,.08);
}
.kpanel__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.kpanel__title { font-weight: 600; font-size: 15px; }
.kpanel__sub { font-size: 12.5px; color: var(--ink-soft); }
.kpanel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 17px; }
.krow {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name status" "bar bar";
  align-items: center; gap: 8px 10px;
}
.krow__name { grid-area: name; font-size: 13.5px; font-weight: 500; }
.kstatus { grid-area: status; justify-self: end; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.kstatus--mastered { color: #2c7a45; background: #e4f4e8; }
.kstatus--forming { color: #b85a16; background: var(--accent-soft); }
.kstatus--miss { color: #b23b35; background: #fbe4e2; }
.kstatus--gap { color: var(--ink-soft); background: var(--bg-alt); }
.kbar { grid-area: bar; height: 8px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.kbar__fill { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.kpanel.is-in .kbar__fill { width: var(--lvl); }
.kpanel.is-in .krow:nth-child(2) .kbar__fill { transition-delay: .08s; }
.kpanel.is-in .krow:nth-child(3) .kbar__fill { transition-delay: .16s; }
.kpanel.is-in .krow:nth-child(4) .kbar__fill { transition-delay: .24s; }
.kpanel.is-in .krow:nth-child(5) .kbar__fill { transition-delay: .32s; }
.kbar__fill--mastered { background: linear-gradient(90deg, #6fbf7f, #4f9e62); }
.kbar__fill--forming { background: linear-gradient(90deg, #f0a060, var(--accent)); }
.kbar__fill--miss { background: linear-gradient(90deg, #e2776f, #d9534f); }
.kbar__fill--gap { background: #d6cfc2; }
.kpanel__foot {
  margin: 20px 0 0; padding-top: 15px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: flex-start; gap: 9px; line-height: 1.45;
}
.kpanel__foot .kdot { margin-top: 4px; }
.kpanel__foot strong { color: var(--ink); }
.kdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-sizing: border-box; }
.kdot--miss { background: #d9534f; }

/* Support calibration band */
.calib {
  display: grid; grid-template-columns: 160px 1fr 160px; align-items: center; gap: 22px;
  max-width: 800px; margin: 60px auto 0;
}
.calib__label { font-size: 13px; color: var(--ink-soft); }
.calib__label span { display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.calib__label small { font-size: 11.5px; line-height: 1.35; display: block; }
.calib__label--left { text-align: right; }
.calib__track { position: relative; height: 44px; display: flex; align-items: center; }
.calib__bar { width: 100%; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #ddd5c8 0%, var(--accent) 50%, #ddd5c8 100%); }
.calib__marker {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 3px solid var(--accent); box-shadow: 0 0 0 5px var(--accent-soft);
  animation: calibBob 5.5s ease-in-out infinite;
}
.calib__flag {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--accent); background: #fff;
  border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px;
  box-shadow: 0 6px 14px rgba(28,26,23,.08);
}
@keyframes calibBob { 0%, 100% { left: 43%; } 50% { left: 57%; } }
.calib__note { color: var(--ink-soft); font-size: 14.5px; max-width: 640px; margin: 24px auto 0; }

/* Researcher match card */
.match {
  max-width: 480px; margin: 44px auto 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: 0 24px 56px rgba(28,26,23,.12);
}
.match__head { display: flex; align-items: center; gap: 13px; }
.match__avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #f0884f, var(--accent));
}
.match__who { flex: 1; min-width: 0; }
.match__name { margin: 0; font-weight: 600; font-size: 16px; }
.match__meta { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.match__badge {
  flex: none; font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.match__line { margin: 16px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.match__paper {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px;
}
.match__paper-ic { color: var(--accent); font-size: 15px; flex: none; }
.match__paper-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match__paper-year { flex: none; font-size: 12.5px; color: var(--ink-soft); }
.match__introhead {
  display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.match__edit { color: var(--accent); cursor: pointer; letter-spacing: 0; text-transform: none; font-size: 13px; }
.match__email { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.match__email-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--line);
}
.match__dots { display: inline-flex; gap: 6px; }
.match__dots i { width: 9px; height: 9px; border-radius: 50%; background: #d8d0c4; }
.match__dots i:nth-child(1) { background: #e6675f; }
.match__dots i:nth-child(2) { background: #e6b14f; }
.match__dots i:nth-child(3) { background: #6ec07a; }
.match__to { font-size: 12.5px; color: var(--ink-soft); }
.match__email-body { padding: 16px 16px 18px; }
.match__email-body p { margin: 0 0 11px; font-size: 13.5px; line-height: 1.6; color: #3a352f; }
.match__email-body p:last-child { margin-bottom: 0; }
.match__actions { display: flex; gap: 12px; margin-top: 18px; }
.match__send { flex: 1; gap: 8px; }

@media (max-width: 540px) {
  .match { padding: 16px; }
  .match__avatar { width: 40px; height: 40px; font-size: 13px; }
  .match__name { font-size: 14.5px; }
  .match__meta { font-size: 11px; }
  .match__badge { font-size: 11px; padding: 4px 9px; }
  .match__line { font-size: 12.5px; margin-top: 13px; }
  .match__paper { padding: 9px 11px; }
  .match__paper-title { font-size: 12px; }
  .match__paper-year { font-size: 11px; }
  .match__introhead { font-size: 10.5px; margin: 16px 0 7px; }
  .match__edit { font-size: 12px; }
  .match__to { font-size: 11.5px; }
  .match__email-body { padding: 13px 13px 15px; }
  .match__email-body p { font-size: 12px; margin-bottom: 9px; }
  .match__actions { flex-direction: column; gap: 10px; margin-top: 16px; }
  .match__send, .match .btn--ghost { width: 100%; font-size: 14px; padding: 12px; }
}

/* Pilot / form */
.pilot { padding-bottom: 100px; }
.form { margin-top: 34px; text-align: left; display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form input, .form select, .form textarea {
  width: 100%; font-family: inherit; font-size: 15px;
  padding: 13px 15px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); resize: vertical;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form__note { font-size: 14px; margin: 4px 0 0; min-height: 20px; }
.form__note.ok { color: var(--accent); }
.form__note.err { color: #c0392b; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer__inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.footer__brand { font-family: var(--serif); font-weight: 600; font-size: 19px; }
.footer__tag { color: var(--ink-soft); font-size: 14px; flex: 1; min-width: 240px; }
.footer__copy { color: var(--ink-soft); font-size: 14px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.cards .card:nth-child(2) { transition-delay: .09s; }
.cards .card:nth-child(3) { transition-delay: .18s; }
.cards .card:hover, .cards .card:focus-within { transition-delay: 0s; }

/* Responsive */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .split__inner { grid-template-columns: 1fr; gap: 36px; }
  .split--reverse .split__inner { direction: ltr; }
  .section { padding: 68px 0; }
  .hero__inner { padding: 80px 24px 70px; }
}
@media (max-width: 720px) {
  .viewer__top { flex-direction: column; gap: 10px; padding: 14px 18px; }
  .viewer__title { font-size: 16px; }
  .viewer__meta { gap: 10px; padding: 10px 18px; }
  .viewer__stats { gap: 12px; }
  .viewer__body { padding: 18px 18px 6px; }
  .doc-title { font-size: 18px; }
  .doc-authors { margin-bottom: 14px; font-size: 12.5px; }
  .doc-h { margin: 15px 0 7px; font-size: 13.5px; }
  .doc-p { font-size: 13px; line-height: 1.65; margin-bottom: 11px; }
  .viewer__body::before, .viewer__body::after { height: 130px; }
  .concept-pop { width: 280px; }
}

@media (max-width: 720px) {
  .calib { grid-template-columns: 1fr; gap: 8px; margin-top: 44px; }
  .calib__label, .calib__label--left { text-align: center; }
  .calib__label--left { order: 1; }
  .calib__track { order: 2; margin: 34px 0 10px; }
  .calib__label--right { order: 3; }
}

@media (max-width: 600px) {
  .knet__svg { display: none; }
  .knet__grid { display: block; }
  .knet { margin-top: 22px; }
}

@media (max-width: 540px) {
  .form__row { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .viewer__stats { display: none; }
  .viewer__tools { display: none; }
  .viewer__top { display: none; }
  .viewer__legend { gap: 12px; font-size: 11.5px; padding: 11px 18px; }
}

@media (max-width: 380px) {
  .kg-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .knet__glow, .knet__sync, .calib__marker, .viewer__analyse::before { animation: none; }
  .viewer__paper { transition: none; }
  .kbar__fill { transition: none; }
  .calib__marker { left: 50%; }
}
