/* riksdagen.ai — Kammaren · DM Serif Display + DM Sans · Kalksten & mässing
   (design-relaunch 2026-07 — se docs/design-relaunch.md) */
:root {
  --stone: #e8e2d5;      /* page background — limestone */
  --paper: #faf8f2;      /* cards, composer, inputs */
  --ink: #1c2a2b;
  --accent: #123c63;     /* chamber blue */
  --accent2: #9c7434;    /* brass */
  --line: #cbc2ae;
  --dim: #6a6656;
  --ja: #3f7d4e;
  --nej: #b0503f;
  --avst: #c99a3a;
  --franv: #d3ccbb;
  --green: #3f7d4e;
  --shadow: 28 42 43;
  --max-col: 46rem;
  --font-ui: "DM Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --stone: #151f1e;
    --paper: #1b2624;
    --ink: #ece4d3;
    --accent: #8bb4dc;
    --accent2: #cba75f;
    --line: #33413d;
    --dim: #9a9683;
    --ja: #6fae7c;
    --nej: #d17c68;
    --avst: #d9b25f;
    --franv: #2c3a37;
    --green: #6fae7c;
    --shadow: 0 0 0;
  }
  .rk-badge:not(.rk-badge-mono) { background: #fff; border-color: #2c3a37; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.04rem;
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--accent2) 45%, transparent); }
a:hover { text-decoration-color: var(--accent2); }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-col);
  width: 100%;
  margin: 0 auto;
  padding: 1.15rem 1.35rem 0.85rem;
}
.wordmark { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.wordmark-mark { width: 26px; height: 26px; display: inline-grid; }
.wordmark-mark svg { width: 100%; height: 100%; overflow: visible; }
.wordmark-mark .ring { fill: none; stroke: var(--accent2); stroke-width: 2; }
.wordmark-mark .seat { fill: var(--accent2); opacity: 0.9; }
.wordmark-mark .pod { fill: var(--accent); }
.wordmark-text { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; color: var(--accent); letter-spacing: 0; }
.wordmark-tld { font-style: italic; color: var(--accent2); }
.header-link { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); text-decoration: none; }
.header-link:hover { color: var(--ink); }
.header-rule { height: 2px; background: var(--accent2); opacity: 0.85; max-width: var(--max-col); margin: 0 auto; width: calc(100% - 2.7rem); }

/* ---------- layout ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--max-col);
  margin: 0 auto;
  padding: 0 1.35rem;
  display: flex;
  flex-direction: column;
}

/* ---------- hero (Sigill i mitten) ---------- */
.hero { text-align: center; padding-top: 2.6rem; transition: padding 0.4s ease; }
.chamber { display: flex; justify-content: center; }
.chamber svg { width: 104px; height: 104px; overflow: visible; transition: height 0.4s ease, width 0.4s ease; }
.chamber .ring {
  fill: none; stroke: var(--accent2); stroke-width: 1.6;
  stroke-dasharray: 289; stroke-dashoffset: 289;
  animation: sigil-draw 0.9s ease 0.1s forwards;
}
.chamber .seat {
  fill: var(--accent2);
  opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0);
  animation: seat-pop 0.45s ease forwards; animation-delay: var(--in-delay, 0s);
}
.chamber .pod { fill: var(--accent); opacity: 0; animation: pod-in 0.5s ease 1s forwards; }
.chamber.settled .ring { stroke-dashoffset: 0; animation: none; }
.chamber.settled .seat { opacity: 0.9; transform: none; animation: none; }
.chamber.settled .pod { opacity: 1; animation: none; }
@keyframes sigil-draw { to { stroke-dashoffset: 0; } }
@keyframes seat-pop { to { opacity: 0.9; transform: scale(1); } }
@keyframes pod-in { to { opacity: 1; } }
/* thinking = voteringssvep: a gold wave sweeps the sigill */
body.thinking .chamber.settled .seat { animation: vote-sweep 1.7s ease-in-out infinite; animation-delay: var(--wave-delay, 0s); }
@keyframes vote-sweep { 0%, 100% { opacity: 0.4; } 45% { opacity: 1; } }

.hero-eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent2); margin: 1.2rem 0 0.9rem; }
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 6.6vw, 3.6rem); line-height: 1.02; letter-spacing: 0;
  color: var(--ink); margin: 0;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub { color: var(--dim); font-size: 1.08rem; max-width: 32rem; margin: 1rem auto 0; }

/* receded hero once a conversation starts */
body.chatting .hero { padding-top: 1rem; }
body.chatting .hero-eyebrow { display: none; }
body.chatting .hero-title { font-size: 1.2rem; }
body.chatting .hero-title em { color: var(--accent); }
body.chatting .hero-sub { display: none; }
body.chatting .chamber svg { height: 40px; width: 40px; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; flex: 1; padding-bottom: 1.5rem; }
.messages { display: flex; flex-direction: column; gap: 1rem; padding: 1.6rem 0 0.5rem; }
.messages:empty { padding: 0.75rem 0 0; }

.msg { max-width: 100%; }

/* user question = a "FRÅGA" record block */
.msg.user {
  padding-bottom: 0.9rem;
  border-bottom: 3px double var(--accent2);
}
.msg.user::before {
  content: "Fråga"; display: block;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 0.3rem;
}
.msg.user { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; color: var(--ink); }

/* assistant answer = the "SVAR" content, Strukturerad */
.msg.assistant { font-size: 1.02rem; line-height: 1.62; }
.msg.assistant > p:first-child { margin-top: 0; }
.msg.assistant p { margin: 0 0 0.9rem; }
.msg.assistant p:last-child { margin-bottom: 0; }
.msg.assistant strong { font-weight: 700; }
.msg.assistant em { font-style: italic; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 1rem; padding: 0; list-style: none; }
.msg.assistant ul li { position: relative; padding: 0.4rem 0 0.4rem 1.4rem; border-bottom: 1px solid var(--line); }
.msg.assistant ul li:last-child { border-bottom: 0; }
.msg.assistant ul li::before { content: ""; position: absolute; left: 0.2rem; top: 0.95em; width: 0.45rem; height: 0.45rem; background: var(--accent2); border-radius: 50%; }
.msg.assistant ol { counter-reset: n; }
.msg.assistant ol li { counter-increment: n; position: relative; padding: 0.3rem 0 0.3rem 2.1rem; }
.msg.assistant ol li::before { content: counter(n); position: absolute; left: 0; top: 0.2em; width: 1.5rem; height: 1.5rem; background: var(--accent); color: var(--paper); border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; }
.msg.assistant .md-h { font-family: var(--font-display); font-weight: 400; color: var(--ink); line-height: 1.2; }
.msg.assistant h3.md-h { font-size: 1.45rem; margin: 0.2rem 0 0.5rem; }
.msg.assistant h4.md-h, .msg.assistant h5.md-h {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-ui); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent2); margin: 1.5rem 0 0.6rem;
}
.msg.assistant h4.md-h::after, .msg.assistant h5.md-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg.assistant blockquote {
  margin: 1rem 0; padding: 1rem 1.2rem;
  background: color-mix(in srgb, var(--accent2) 8%, var(--paper));
  border-left: 3px solid var(--accent2); border-radius: 0 6px 6px 0;
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--ink);
}
.msg.assistant code { font-family: var(--font-mono); font-size: 0.86em; background: var(--stone); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; }
.msg.assistant hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.md-img { max-width: 100%; border-radius: 0.6rem; margin: 0.5rem 0; }
.table-wrap { overflow-x: auto; margin: 0.3rem 0 1rem; }
.msg.assistant table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.96rem; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.msg.assistant thead th { text-align: left; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent2); background: color-mix(in srgb, var(--accent2) 10%, var(--paper)); padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); }
.msg.assistant tbody td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); }
.msg.assistant tbody tr:last-child td { border-bottom: 0; }

/* status (thinking) */
.msg.status {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--dim); font-size: 0.95rem;
}
.msg.status::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--accent2); animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

/* error */
.msg.error {
  display: flex; align-items: center; gap: 0.6rem;
  background: color-mix(in srgb, var(--nej) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--nej) 38%, var(--line));
  border-radius: 5px; padding: 0.85rem 1.1rem; font-size: 0.94rem; color: var(--ink);
}
.msg.error::before { content: "Fel"; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--nej); border-radius: 3px; padding: 0.12rem 0.4rem; }

/* component holder */
.msg.component { align-self: stretch; max-width: 100%; }

/* sources */
.sources { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.source-chip {
  font-size: 0.75rem; color: var(--accent); background: var(--paper);
  border: 1px solid var(--line); border-radius: 99px; padding: 0.16rem 0.6rem;
  text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.source-chip:hover { border-color: var(--accent2); }

/* ---------- suggestions ---------- */
.suggestions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; padding: 0.6rem 0 1rem; }
body.chatting .suggestions { display: none; }
.chip {
  font-family: var(--font-ui); font-size: 0.9rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 3px;
  padding: 0.5rem 0.95rem; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--accent2); color: var(--accent); }

/* ---------- composer (Talarstol) ---------- */
.composer {
  position: sticky; bottom: 0.75rem;
  display: flex; align-items: flex-end; gap: 0.55rem;
  background: var(--paper); border: 1px solid var(--line); border-top: 4px double var(--accent2);
  border-radius: 0 0 8px 8px; padding: 0.55rem 0.55rem 0.55rem 1.1rem;
  box-shadow: 0 6px 22px -12px rgb(var(--shadow) / 0.3);
}
body.chatting .composer { margin-top: auto; }
.composer:focus-within { border-color: var(--accent); border-top-color: var(--accent2); }
#input {
  flex: 1; border: none; outline: none; resize: none; background: transparent;
  font-family: var(--font-ui); font-size: 1.02rem; line-height: 1.45; color: var(--ink);
  max-height: 10rem; padding: 0.4rem 0;
}
#input::placeholder { color: var(--dim); }
.send {
  flex-shrink: 0; width: 2.6rem; height: 2.6rem; border: none; border-radius: 6px;
  background: var(--accent); color: var(--paper); cursor: pointer; display: grid; place-items: center;
  transition: background 0.15s ease;
}
.send:hover { background: var(--accent2); }
.send:disabled { background: var(--line); color: var(--dim); cursor: default; }
.send.is-stop { background: var(--nej); }
.send.is-stop:hover { background: var(--nej); filter: brightness(1.08); }
.send.is-stop svg { display: none; }
.send.is-stop::after { content: ""; width: 0.8rem; height: 0.8rem; background: var(--paper); border-radius: 2px; }

:is(.chip, .send, #input, a, button):focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: 4px; }

/* ---------- follow-ups + message actions ---------- */
.followups { display: flex; flex-wrap: wrap; gap: 0.5rem; align-self: flex-start; }
.followup-chip { font-size: 0.82rem; border-radius: 99px; }
.followup-chip::before { content: "↳ "; color: var(--dim); }
.msg-actions { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.msg-action {
  font-family: var(--font-ui); font-size: 0.72rem; color: var(--dim);
  background: none; border: 1px solid var(--line); border-radius: 99px;
  padding: 0.14rem 0.6rem; cursor: pointer;
}
.msg-action:hover { border-color: var(--accent2); color: var(--accent); }
.restored-note { align-self: center; display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; color: var(--dim); padding: 0.3rem 0.2rem; }

/* monthly budget lock */
.budget-banner {
  align-self: stretch; margin: 0.5rem 0 0.25rem; padding: 0.85rem 1.1rem; border-radius: 5px;
  background: color-mix(in srgb, var(--accent2) 14%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--accent2) 45%, var(--line));
  color: var(--ink); font-size: 0.9rem; line-height: 1.5;
}
body.budget-locked .composer { opacity: 0.6; }

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--max-col); width: 100%; margin: 0 auto;
  padding: 1.2rem 1.35rem 1.6rem; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 0.78rem; line-height: 1.55;
}
.site-footer p { margin: 0.25rem 0; }
.site-footer strong { color: var(--ink); font-weight: 600; }
.site-footer a { color: var(--dim); }

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

/* ==================== interactive components ==================== */
.rk-widget {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 1px 2px rgb(var(--shadow) / 0.04), 0 14px 34px -18px rgb(var(--shadow) / 0.14);
}
.rk-widget-title { font-family: var(--font-display); font-weight: 400; color: var(--ink); font-size: 1.35rem; margin-bottom: 0.6rem; }
.rk-widget-sub { color: var(--dim); font-size: 0.88rem; margin: -0.4rem 0 0.7rem; }
.rk-widget-foot { color: var(--dim); font-size: 0.8rem; margin-top: 0.7rem; }

/* party logo badge */
.rk-badge { --sz: 1.3rem; width: var(--sz); height: var(--sz); flex-shrink: 0; border-radius: 5px; background: #fff; border: 1px solid var(--line); display: inline-grid; place-items: center; overflow: hidden; vertical-align: middle; }
.rk-badge img { width: 100%; height: 100%; object-fit: contain; padding: 1px; }
.rk-badge-mono { background: var(--c, var(--dim)); border-color: transparent; color: #fff; font-size: calc(var(--sz) * 0.5); font-weight: 700; line-height: 1; }

.rk-pill { display: inline-block; font-size: 0.72rem; font-weight: 700; line-height: 1; padding: 0.22rem 0.44rem; border-radius: 4px; vertical-align: middle; }

/* member card — Kammarkort (party-color dossier) */
.rk-membercard { border-left: 6px solid var(--c, var(--accent2)); }
.rk-mc-top { display: flex; gap: 1.1rem; align-items: flex-start; }
.rk-mc-photo { width: 84px; height: 104px; object-fit: cover; border-radius: 6px; background: var(--stone); border: 1px solid var(--line); border-bottom: 4px solid var(--c, var(--accent2)); flex-shrink: 0; }
.rk-mc-head { flex: 1; min-width: 0; }
.rk-mc-name { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; color: var(--ink); }
.rk-mc-party { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0 0.7rem; color: var(--dim); font-size: 0.9rem; }
.rk-facts { display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; }
.rk-fact { display: flex; gap: 0.5rem; font-size: 0.88rem; }
.rk-fact-l { color: var(--dim); }
.rk-fact-v { color: var(--ink); font-weight: 500; }
.rk-mc-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent2); margin: 1.1rem 0 0.5rem; }
.rk-mc-roles { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rk-role-chip { font-size: 0.8rem; color: var(--ink); background: color-mix(in srgb, var(--c, var(--accent2)) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--accent2)) 42%, var(--line)); border-radius: 99px; padding: 0.22rem 0.65rem; }
.rk-mc-bio { font-size: 0.9rem; color: var(--ink); margin: 0; line-height: 1.55; }
.rk-card-link, .rk-widget a.rk-card-link { display: inline-block; margin-top: 0.7rem; font-size: 0.78rem; color: var(--dim); }

/* member grid */
.rk-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.9rem; }
.rk-member-cell { text-align: center; text-decoration: none; color: var(--ink); }
.rk-member-cell img, .rk-member-noimg { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; background: var(--stone); border: 1px solid var(--line); display: block; }
.rk-member-name { font-size: 0.82rem; margin: 0.35rem 0 0.2rem; line-height: 1.2; }
.rk-member-role { font-size: 0.72rem; color: var(--dim); }

/* seat map — Hemicykel */
.rk-seatmap { display: block; max-width: 400px; margin: 0.2rem auto 0; overflow: visible; }
.rk-seatmap-total { font-family: var(--font-display); font-size: 20px; font-weight: 400; fill: var(--accent); }
.rk-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin-top: 0.7rem; justify-content: center; }
.rk-legend-item { font-size: 0.8rem; color: var(--ink); display: inline-flex; align-items: center; gap: 0.3rem; }
.rk-legend-dot { width: 0.7rem; height: 0.7rem; border-radius: 2px; display: inline-block; }

/* vote result */
.rk-outcome { display: inline-flex; align-items: center; gap: 0.5rem; background: color-mix(in srgb, var(--ja) 16%, var(--paper)); border: 1px solid color-mix(in srgb, var(--ja) 45%, var(--line)); color: var(--ink); font-size: 0.85rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 99px; margin-bottom: 0.8rem; }
.rk-outcome::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--ja); }
.rk-vote-bars { display: flex; flex-direction: column; gap: 0.4rem; }
.rk-vote-row { display: flex; align-items: center; gap: 0.5rem; }
.rk-vote-track { flex: 1; display: flex; height: 0.7rem; background: color-mix(in srgb, var(--line) 55%, transparent); border-radius: 99px; overflow: hidden; }
.rk-vote-seg { height: 100%; min-width: 2px; }
.rk-vote-total { position: relative; display: flex; height: 0.75rem; margin: 1rem 0 0.3rem; border-radius: 99px; overflow: hidden; background: var(--line); }
.rk-vote-tseg { height: 100%; }
.rk-vote-majority { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; }
.rk-vote-majority::after { content: "175"; position: absolute; top: -1.05rem; left: 50%; transform: translateX(-50%); font-size: 0.62rem; color: var(--dim); white-space: nowrap; }

/* composition bar + legend */
.rk-compbar { display: flex; height: 0.6rem; width: 100%; border-radius: 99px; overflow: hidden; margin-bottom: 0.7rem; background: var(--line); }
.rk-compbar-seg { height: 100%; min-width: 1px; }
.rk-complist { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; }
.rk-complist-item { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; color: var(--ink); }
.rk-complist-item b { font-variant-numeric: tabular-nums; }

/* member roster — party-color headers */
.rk-roster { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.1rem; }
.rk-roster-group { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.rk-roster-group:not([style*="--spine"]) { border-left: 3px solid var(--line); }
.rk-roster-head { display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.85rem; background: var(--spine, transparent); }
.rk-roster-group[style*="--spine"] .rk-roster-head { color: #fff; }
.rk-roster-groupname { font-family: var(--font-display); font-weight: 400; font-size: 1.02rem; }
.rk-roster-count { margin-left: auto; font-size: 0.82rem; font-variant-numeric: tabular-nums; opacity: 0.92; }
.rk-roster-names { columns: 2; column-gap: 1.4rem; padding: 0.7rem 0.9rem; }
@media (min-width: 620px) { .rk-roster-names { columns: 3; } }
.rk-roster-name { display: flex; align-items: center; gap: 0.35rem; font-size: 0.88rem; color: var(--ink); padding: 0.14rem 0; break-inside: avoid; }
.rk-roster-person { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* timeline */
.rk-timeline { list-style: none; margin: 0; padding: 0 0 0 0.3rem; border-left: 2px solid var(--line); }
.rk-timeline li { position: relative; padding: 0 0 0.8rem 1.2rem; }
.rk-timeline li::before { content: ""; position: absolute; left: -6px; top: 0.3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent2); border: 2px solid var(--paper); }
.rk-timeline li:last-child { padding-bottom: 0; }
.rk-timeline-step { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.rk-timeline-date { display: block; font-size: 0.78rem; color: var(--dim); font-variant-numeric: tabular-nums; }

/* document card — Akt */
.rk-doccard { border-left: 4px solid var(--accent2); overflow: hidden; padding: 0; }
.rk-doccard .rk-doc-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.8rem 1.1rem; margin: 0; background: color-mix(in srgb, var(--accent2) 8%, var(--paper)); border-bottom: 2px double var(--accent2); }
.rk-doccard > :not(.rk-doc-top) { margin-left: 1.1rem; margin-right: 1.1rem; }
.rk-doccard .rk-widget-title { margin-top: 0.9rem; margin-bottom: 0.3rem; }
.rk-doc-authors { color: var(--dim); font-size: 0.82rem; }
.rk-doccard-body { font-size: 0.9rem; line-height: 1.6; color: var(--ink); margin-top: 0.7rem; overflow: hidden; white-space: pre-wrap; padding: 0.7rem 0.9rem; background: var(--stone); border: 1px solid var(--line); border-radius: 5px; }
.rk-doccard-body.is-collapsed { max-height: 8rem; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.rk-doc-more { margin-top: 0.4rem; }
.rk-doc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; margin-bottom: 1.1rem; }
.rk-doc-btn { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; text-decoration: none; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 99px; padding: 0.32rem 0.8rem; }
.rk-doc-btn:hover { background: var(--accent2); border-color: var(--accent2); }
.rk-doc-btn-ghost { color: var(--accent); background: var(--paper); border-color: var(--line); font-weight: 500; }
.rk-doc-btn-ghost:hover { background: var(--paper); border-color: var(--accent2); }

/* document list — Akt rows */
.rk-doclist { display: flex; flex-direction: column; gap: 0.5rem; }
.rk-doc { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 0.7rem 0.9rem; transition: border-color 0.15s ease, transform 0.15s ease; }
.rk-doc:hover { border-color: var(--accent2); }
.rk-doc-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.rk-doc-badge { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: var(--accent2); border-radius: 3px; padding: 0.14rem 0.45rem; flex-shrink: 0; }
.rk-doc-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--dim); }
.rk-doc-title { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; line-height: 1.25; }
.rk-doc-by { font-size: 0.78rem; color: var(--dim); margin-top: 0.15rem; }

/* speech card */
.rk-speech { border-left: 3px solid var(--accent2); }
.rk-speech-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.rk-speech-who { font-size: 0.85rem; color: var(--dim); }
.rk-speech-quote { margin: 0.3rem 0 0; padding: 0; font-family: var(--font-display); font-style: italic; font-size: 1.25rem; line-height: 1.45; color: var(--ink); }

/* vote history + comparison */
.rk-vh-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.rk-vh-list { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.6rem; }
.rk-vh-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0.1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 0.86rem; }
.rk-vh-row:last-child { border-bottom: none; }
a.rk-vh-row:hover .rk-vh-label { color: var(--accent); text-decoration: underline; }
.rk-votechip { font-size: 0.74rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 99px; border: 1px solid transparent; white-space: nowrap; }
.rk-cmp-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.rk-cmp-party { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.rk-cmp-vs { color: var(--dim); font-size: 0.85rem; }
.rk-cmp-summary { margin-left: auto; font-size: 0.82rem; color: var(--ink); background: var(--stone); border: 1px solid var(--line); border-radius: 99px; padding: 0.2rem 0.6rem; }
.rk-cmp-table { display: flex; flex-direction: column; gap: 0.3rem; }
.rk-cmp-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 5px; border: 1px solid var(--line); }
.rk-cmp-row.is-diff { border-color: color-mix(in srgb, var(--nej) 35%, var(--line)); background: color-mix(in srgb, var(--nej) 6%, var(--paper)); }
.rk-cmp-punkt { font-size: 0.85rem; color: var(--ink); }
.rk-cmp-mark { font-size: 0.72rem; color: var(--dim); width: 3.4rem; text-align: right; }
.rk-cmp-row.is-diff .rk-cmp-mark { color: var(--nej); font-weight: 600; }

/* calendar */
.rk-cal { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 0.3rem; }
.rk-cal-day { display: grid; grid-template-columns: 4.8rem 1fr; gap: 0.7rem; }
.rk-cal-date { font-family: var(--font-display); color: var(--accent); font-size: 0.95rem; }
.rk-cal-events { display: flex; flex-direction: column; gap: 0.4rem; }
.rk-cal-event { display: flex; gap: 0.6rem; font-size: 0.86rem; padding-left: 0.7rem; border-left: 2px solid var(--accent2); }
.rk-cal-time { color: var(--dim); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.rk-cal-rubrik { color: var(--ink); }

/* ==================== motion (Uttrycksfull) ==================== */
.messages > .msg { animation: msg-in 0.55s cubic-bezier(0.34, 1.4, 0.5, 1) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.rk-doc, .rk-member-cell { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.rk-doc:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgb(var(--shadow) / 0.4); }

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  .header-link { display: none; }
  .rk-mc-top { flex-direction: column; }
  .rk-cmp-row { grid-template-columns: 1fr auto auto; }
}

@media (prefers-reduced-motion: reduce) {
  .chamber .ring { stroke-dashoffset: 0; animation: none; }
  .chamber .seat { opacity: 0.9; transform: none; animation: none; }
  .chamber .pod { opacity: 1; animation: none; }
  body.thinking .chamber .seat { animation: none; }
  .hero, .chamber svg { transition: none; }
  .messages > .msg { animation: none; }
  .msg.status::before { animation: none; }
}
