/* ================================================
   Section 01 — The Pipeline
   ================================================ */
.pipeline-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-1);
}
.pipeline-diagram {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  align-items: center;
  position: relative;
  min-height: 140px;
}
.pipeline-node {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.45rem;
  padding: 1rem 0.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  z-index: 2;
}
.pipeline-node:hover {
  border-color: var(--text);
  box-shadow: none;
  transform: none;
}
.pipeline-node.active {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: none;
  transform: none;
}
.pipeline-node .icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--surface);
  border-radius: 50%;
  font-size: 1.3rem;
  border: 1px solid var(--line);
  color: var(--text);
}
.pipeline-node.active .icon {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.pipeline-node .label {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}
.pipeline-node .sub {
  font-size: 0.7rem;
  color: var(--text-mute);
  font-family: var(--mono);
}
.pipeline-wire {
  position: absolute;
  top: 50%; left: 2%; right: 2%;
  height: 1px;
  background: var(--line-2);
  z-index: 1;
  transform: translateY(-50%);
}
.pipeline-wire::after { display: none; content: none; }

.pipeline-detail {
  margin-top: 2rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.75;
  min-height: 180px;
}
.pipeline-detail h4 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
}
.pipeline-detail .row { color: var(--text-dim); padding: 0.1rem 0; }
.pipeline-detail .row strong { color: var(--text); }
.pipeline-detail code {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.pipeline-examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.example-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  transition: border-color 0.15s;
  box-shadow: var(--shadow-1);
}
.example-card:hover { border-color: var(--text); transform: none; }
.example-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
}
.example-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.55;
}
.example-card .tag {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.2rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
}
@media (max-width: 800px) {
  .pipeline-diagram { grid-template-columns: 1fr; gap: 0.8rem; }
  .pipeline-wire { display: none; }
  .pipeline-examples { grid-template-columns: 1fr; }
}

/* ================================================
   Section 02 — The Model
   ================================================ */
.schema-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) { .schema-wrap { grid-template-columns: 1fr; } }

.schema-canvas {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  min-height: 460px;
  box-shadow: var(--shadow-1);
}
.schema-table {
  position: absolute;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
  min-width: 160px;
  cursor: pointer;
  transition: border-color 0.15s;
  font-family: var(--mono);
  font-size: 0.76rem;
  z-index: 2;
}
.schema-table:hover,
.schema-table.active {
  border-color: var(--accent);
  box-shadow: none;
}
.schema-table.active { background: var(--surface); }
.schema-table .tname {
  display: block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.schema-table .tcol {
  display: flex; justify-content: space-between;
  padding: 0.16rem 0;
  color: var(--text-dim);
}
.schema-table .tcol .ttype { color: var(--text-mute); }
.schema-table .tcol.pk { color: var(--warn); }
.schema-table .tcol.fk { color: var(--text-mute); }
.schema-lines { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.schema-info {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-1);
}
.schema-info h3 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
}
.schema-info .rls-note {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-2);
  border-left: 3px solid var(--warn);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.search-demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-1);
}
.search-demo h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.search-bar {
  display: flex; gap: 0.5rem;
  margin-top: 1rem;
}
.search-bar input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-bar button {
  padding: 0 1.4rem;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.88rem;
  transition: background 0.15s, border-color 0.15s;
}
.search-bar button:hover { background: var(--accent); border-color: var(--accent); }

.search-chips {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin-top: 0.9rem;
}
.search-chips button {
  padding: 0.3rem 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-family: var(--mono);
  transition: border-color 0.15s, color 0.15s;
}
.search-chips button:hover { border-color: var(--text); color: var(--text); }

.search-results { margin-top: 1.3rem; }
.search-hit {
  padding: 0.9rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.search-hit .title { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.search-hit .meta { font-family: var(--mono); font-size: 0.74rem; color: var(--text-mute); margin-top: 0.3rem; }
.search-hit .score { float: right; color: var(--accent); font-weight: 500; }
.search-hit .snippet { color: var(--text-dim); font-size: 0.86rem; margin-top: 0.45rem; }

/* ================================================
   Section 03 — The Agent
   ================================================ */
.agent-builder {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-1);
}
.builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 900px) { .builder-grid { grid-template-columns: 1fr; } }
.builder-col h4 {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}
.builder-option {
  display: block;
  padding: 0.8rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.88rem;
  color: var(--text);
}
.builder-option:hover { border-color: var(--text); }
.builder-option.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.builder-option .desc {
  display: block;
  color: var(--text-mute);
  font-size: 0.75rem;
  margin-top: 0.18rem;
  font-weight: 400;
}

.team-preview {
  margin-top: 1.5rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius);
}
.team-preview h4 {
  margin: 0 0 0.5rem;
  color: var(--ok);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
}
.team-preview .summary {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.team-preview .flow {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.74rem;
}
.team-preview .flow span {
  padding: 0.22rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
}

.classifier-demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-1);
}
.classifier-demo h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.classifier-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}
.tier {
  padding: 1rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.tier .tier-name {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tier .tier-model {
  font-weight: 600;
  margin-top: 0.35rem;
  color: var(--text);
}
.tier .tier-cost {
  font-size: 0.75rem;
  color: var(--ok);
  margin-top: 0.2rem;
  font-family: var(--mono);
}
@media (max-width: 700px) { .classifier-tiers { grid-template-columns: 1fr 1fr; } }

/* ================================================
   Section 04 — The Explorer
   ================================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 3rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 1px;
  background: var(--line-2);
}
.timeline-item {
  position: relative;
  padding: 0.8rem 0 0.8rem 1.6rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px; top: 1.3rem;
  width: 10px; height: 10px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: none;
}
.timeline-item .year {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
}
.timeline-item .what {
  font-weight: 600;
  margin: 0.2rem 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.05rem;
}
.timeline-item .why { color: var(--text-dim); font-size: 0.9rem; line-height: 1.55; }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.cert {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  transition: border-color 0.15s;
  position: relative;
  box-shadow: var(--shadow-1);
}
.cert:hover { border-color: var(--text); transform: none; }
.cert .issuer {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.cert .cname {
  font-weight: 600;
  margin: 0.3rem 0 0.25rem;
  font-size: 0.96rem;
  line-height: 1.35;
  color: var(--text);
}
.cert .code {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent);
}
.cert.in-progress {
  border-style: dashed;
  opacity: 0.9;
}
.cert.in-progress::after {
  content: 'Pågår';
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  padding: 0.12rem 0.5rem;
  background: var(--warn);
  color: var(--bg);
  font-size: 0.65rem;
  font-family: var(--mono);
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.mcp-demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-1);
}
.mcp-demo h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.mcp-rpc {
  background: #16130c;
  color: #e8e1cc;
  border: 1px solid #2a251a;
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
  overflow-x: auto;
  margin-top: 1rem;
}
.mcp-rpc .key { color: #d4a373; }
.mcp-rpc .str { color: #a3b18a; }
.mcp-rpc .num { color: #e9c46a; }
.mcp-rpc .cmt { color: #8a8578; font-style: italic; }

/* ================================================
   Section 05 — The Human
   ================================================ */
.human-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) { .human-grid { grid-template-columns: 1fr; } }

.human-story {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  line-height: 1.75;
  box-shadow: var(--shadow-1);
}
.human-story p {
  color: var(--text-dim);
  margin: 0 0 1rem;
  font-size: 1rem;
}
.human-story p strong { color: var(--text); }
.human-story h3 {
  margin: 2rem 0 0.8rem;
  font-size: 1.25rem;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 500;
}
.human-story h3:first-child { margin-top: 0; }

.human-facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  height: fit-content;
  box-shadow: var(--shadow-1);
}
.human-facts h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 500;
}
.human-facts dl { margin: 0; display: grid; gap: 0.6rem; }
.human-facts dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.human-facts dd { margin: 0 0 0.4rem; font-size: 0.92rem; color: var(--text); }

.work-history {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-1);
}
.work-history h3 {
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--text);
}
.job {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.job:last-child { border-bottom: none; }
.job .years {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.job .title {
  font-weight: 600;
  margin: 0.25rem 0 0.3rem;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.08rem;
}
.job .desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.55;
}

.cta-final {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
}
.cta-final h3 {
  margin: 0 0 0.6rem;
  font-size: 1.8rem;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
}
.cta-final p {
  color: var(--text-dim);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}
.cta-final .btn-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}
