/* =============================================================================
   Krakti — Bridge surfaces
   assets/css/bridge.css  —  enqueued as 'krakti-bridge-surfaces' (deps:
   krakti-components) on the dossier hub, author page, corrections log + report
   form, and single posts (dossier link / notices). Tokens only — no raw colors
   or spacing. Animate transform/opacity only. Designed hover/focus/active.

   Sections:
     1. Shared: section header, dossier link pill, honeypot
     2. Dossier hub  (/dossier/<slug>/)  — header + timeline
     3. Author page  (/auteurs/<slug>/)  — identity header
     4. Corrections log  (/correcties/)  — entries
     5. Corrections form (/correcties/melden/) — fields, result, status
     6. Correction / retraction notices (shared with single posts)
   ============================================================================= */

/* =============================================================================
   1. SHARED
   ============================================================================= */

/* Big editorial page header for the bridge surfaces — same loud ink rule the
   archive/river headers use, so these pages read as top-level surfaces. */
.k-dossier__header,
.k-author__header,
.k-corrections__header,
.k-corrections-form__header {
  padding-bottom: var(--k-space-lg);
  margin-bottom: var(--k-space-xl);
  border-bottom: 2px solid var(--k-color-ink);
}

.k-dossier__title,
.k-corrections__title,
.k-corrections-form__title {
  font-family: var(--k-font-display);
  font-weight: var(--k-weight-display);
  font-size: var(--k-fs-h1);
  line-height: var(--k-lh-display);
  letter-spacing: var(--k-ls-display);
  color: var(--k-color-ink);
  text-wrap: balance;
}

.k-dossier__eyebrow {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-meta);
  font-weight: var(--k-weight-bold);
  letter-spacing: var(--k-ls-label-lg);
  text-transform: uppercase;
  color: var(--k-color-accent-strong);
  margin-bottom: var(--k-space-2xs);
}

.k-dossier__intro,
.k-author__bio {
  margin-top: var(--k-space-sm);
  font-family: var(--k-font-serif);
  font-size: var(--k-fs-dek);
  line-height: var(--k-lh-snug);
  color: var(--k-color-soft);
  max-width: 60ch;
}

.k-dossier__count,
.k-author__count,
.k-corrections__count {
  margin-top: var(--k-space-md);
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-small);
  color: var(--k-color-muted);
}

/* Breadcrumb spacing on the bridge surfaces. */
.k-dossier__header .k-breadcrumb,
.k-author__header .k-breadcrumb,
.k-corrections__header .k-breadcrumb,
.k-corrections-form__header .k-breadcrumb {
  margin-bottom: var(--k-space-sm);
}

/* --- Dossier link pill (rendered on single posts by the head/SEO module) ----- */
/* The head module emits `.k-pill k-pill--dossier`; give the modifier its own
   dossier-ink tint + folder glyph spacing so it reads distinctly from category
   pills. A second, richer `.k-dossier-link` variant is available for templates
   that want the "Dossier — <entity>" two-part label. */
.k-pill--dossier {
  color: var(--k-color-on-ink);
  background-color: var(--k-color-ink-deep);
  gap: var(--k-space-3xs);
}

a.k-pill--dossier:hover {
  color: var(--k-color-on-accent);
  background-color: var(--k-color-accent);
}

.k-pill--dossier .k-pill__icon {
  font-size: 0.9em;
  line-height: 1;
}

.k-dossier-link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--k-space-2xs);
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-small);
  color: var(--k-color-soft);
  transition: var(--k-transition-colors);
}

.k-dossier-link__kicker {
  font-size: var(--k-fs-micro);
  font-weight: var(--k-weight-bold);
  letter-spacing: var(--k-ls-label);
  text-transform: uppercase;
  color: var(--k-color-accent-strong);
}

.k-dossier-link__name {
  font-weight: var(--k-weight-semibold);
  color: var(--k-color-ink);
}

.k-dossier-link:hover .k-dossier-link__name {
  color: var(--k-color-accent-strong);
}

/* --- Honeypot (generic, reused by the corrections form) ---------------------- */
.k-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =============================================================================
   2. DOSSIER HUB — timeline
   ============================================================================= */
.k-timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  /* Spine: a hairline running down the left, behind the nodes. */
  padding-left: var(--k-space-lg);
}

.k-timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: calc(var(--k-space-2xs) + 1px);
  width: 2px;
  background-color: var(--k-color-rule);
}

/* Date marker — a small sticky-ish label that opens each day's group. */
.k-timeline__marker {
  position: relative;
  margin: var(--k-space-lg) 0 var(--k-space-sm);
}

.k-timeline__marker:first-child {
  margin-top: 0;
}

.k-timeline__date {
  display: inline-block;
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-meta);
  font-weight: var(--k-weight-bold);
  letter-spacing: var(--k-ls-label);
  text-transform: uppercase;
  color: var(--k-color-soft);
  background-color: var(--k-color-surface);
  padding-right: var(--k-space-sm);
}

/* Each story row, with a node dot on the spine. */
.k-timeline__item {
  position: relative;
  padding-block: var(--k-space-md);
  border-top: 1px solid var(--k-color-rule-faint);
}

.k-timeline__item:first-of-type {
  border-top: 0;
}

.k-timeline__node {
  position: absolute;
  left: calc((-1 * var(--k-space-lg)) + var(--k-space-2xs) - 4px);
  top: calc(var(--k-space-md) + 0.5rem);
  width: 11px;
  height: 11px;
  border-radius: var(--k-radius-pill);
  background-color: var(--k-color-accent);
  box-shadow: 0 0 0 4px var(--k-color-surface);
}

.k-timeline__lane {
  display: inline-block;
  margin-bottom: var(--k-space-2xs);
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-micro);
  font-weight: var(--k-weight-bold);
  letter-spacing: var(--k-ls-label);
  text-transform: uppercase;
  padding: 0.12em 0.5em;
  border-radius: var(--k-radius-xs);
  color: var(--k-color-soft);
  background-color: var(--k-color-surface-2);
}

.k-timeline__lane--b {
  color: var(--k-color-accent-strong);
  background-color: var(--k-color-accent-soft);
}

/* Inside a timeline entry the river card sits flush (the row owns the rule). */
.k-timeline__entry .k-card--river {
  margin-top: 0;
}

.k-timeline__entry .k-river__item,
.k-timeline__entry .k-card--river {
  border-top: 0;
  padding-top: 0;
}

/* =============================================================================
   3. AUTHOR PAGE — identity header
   ============================================================================= */
.k-author__identity {
  display: flex;
  align-items: center;
  gap: var(--k-space-md);
  flex-wrap: wrap;
}

.k-author__avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--k-radius-pill);
  background-color: var(--k-color-accent-soft);
  color: var(--k-color-accent-strong);
  font-family: var(--k-font-display);
  font-weight: var(--k-weight-display);
  font-size: var(--k-fs-h3);
  line-height: 1;
}

.k-author__meta {
  min-width: 0;
  flex: 1 1 16rem;
}

.k-author__role {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-meta);
  font-weight: var(--k-weight-bold);
  letter-spacing: var(--k-ls-label);
  text-transform: uppercase;
  color: var(--k-color-accent-strong);
}

.k-author__name {
  font-family: var(--k-font-display);
  font-weight: var(--k-weight-display);
  font-size: var(--k-fs-h2);
  line-height: var(--k-lh-heading);
  letter-spacing: var(--k-ls-heading);
  color: var(--k-color-ink);
}

.k-author__bio {
  margin-top: var(--k-space-xs);
}

/* =============================================================================
   4. CORRECTIONS LOG — entries
   ============================================================================= */
.k-corrections__intro {
  margin-top: var(--k-space-sm);
  max-width: 64ch;
}

.k-corrections__cta {
  margin-top: var(--k-space-md);
}

.k-corrections__log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.k-corrections__entry {
  padding-block: var(--k-space-lg);
  border-top: 1px solid var(--k-color-rule);
}

.k-corrections__entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.k-correction {
  display: flex;
  flex-direction: column;
  gap: var(--k-space-2xs);
}

.k-correction__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--k-space-2xs);
}

.k-correction__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12em 0.55em;
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-micro);
  font-weight: var(--k-weight-bold);
  letter-spacing: var(--k-ls-label);
  text-transform: uppercase;
  color: var(--k-color-on-accent);
  background-color: var(--k-color-accent);
  border-radius: var(--k-radius-xs);
}

.k-correction__date {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-meta);
  color: var(--k-color-muted);
}

.k-correction__title {
  font-family: var(--k-font-display);
  font-weight: var(--k-weight-display);
  font-size: var(--k-fs-h4);
  line-height: var(--k-lh-heading);
  letter-spacing: var(--k-ls-heading);
  color: var(--k-color-ink);
  text-wrap: balance;
}

.k-correction__title a {
  color: inherit;
}

.k-correction__title a:hover {
  color: var(--k-color-accent-strong);
}

.k-correction__summary {
  font-size: var(--k-fs-body);
  line-height: var(--k-lh-snug);
  color: var(--k-color-soft);
  max-width: 70ch;
}

.k-correction__ref {
  margin-top: var(--k-space-3xs);
}

.k-correction__ref-link {
  display: inline-flex;
  align-items: center;
  gap: var(--k-space-3xs);
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-small);
  font-weight: var(--k-weight-semibold);
  color: var(--k-color-accent-strong);
}

.k-correction__ref-link::after {
  content: "\203A"; /* › */
  font-size: 1.1em;
  line-height: 1;
  transform: translateX(0);
  transition: transform var(--k-dur-fast) var(--k-ease-out);
}

.k-correction__ref-link:hover {
  color: var(--k-color-accent);
}

.k-correction__ref-link:hover::after {
  transform: translateX(3px);
}

/* =============================================================================
   5. CORRECTIONS REPORT FORM
   ============================================================================= */
.k-corrections-form__form {
  display: flex;
  flex-direction: column;
  gap: var(--k-space-lg);
  max-width: var(--k-measure-wide);
}

.k-corrections-form__intro {
  margin-top: var(--k-space-sm);
  max-width: 64ch;
}

.k-corrections-form__source-note {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-small);
  color: var(--k-color-soft);
  padding: var(--k-space-sm);
  background-color: var(--k-color-surface-2);
  border: 1px solid var(--k-color-rule);
  border-radius: var(--k-radius-sm);
}

.k-corrections-form__source-note a {
  color: var(--k-color-accent-strong);
  word-break: break-word;
}

/* Field help + required/optional affordances (extends the .k-field component). */
.k-field__help {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-meta);
  line-height: var(--k-lh-meta);
  color: var(--k-color-muted);
}

.k-field__required {
  color: var(--k-color-danger);
  font-weight: var(--k-weight-bold);
  margin-inline-start: 0.15em;
}

.k-field__optional {
  font-weight: var(--k-weight-regular);
  font-size: var(--k-fs-meta);
  color: var(--k-color-muted);
  margin-inline-start: 0.35em;
  text-transform: none;
  letter-spacing: 0;
}

.k-corrections-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--k-space-md);
}

.k-corrections-form__status {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-small);
  font-weight: var(--k-weight-semibold);
  min-height: 1.4em;
}

.k-corrections-form__status.is-pending {
  color: var(--k-color-muted);
}

.k-corrections-form__status.is-success {
  color: var(--k-color-live);
}

.k-corrections-form__status.is-error {
  color: var(--k-color-danger);
}

/* No-JS result banner (same colour language as the live status). */
.k-corrections-form__result {
  padding: var(--k-space-sm) var(--k-space-md);
  margin-bottom: var(--k-space-lg);
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-small);
  font-weight: var(--k-weight-semibold);
  border-radius: var(--k-radius-sm);
  border: 1px solid var(--k-color-rule);
}

.k-corrections-form__result.is-success {
  color: var(--k-color-live-strong);
  background-color: var(--k-color-live-soft);
  border-color: var(--k-color-live);
}

.k-corrections-form__result.is-error {
  color: var(--k-color-danger);
  background-color: var(--k-color-danger-soft);
  border-color: var(--k-color-danger);
}

.k-corrections-form__privacy {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-meta);
  color: var(--k-color-muted);
}

.k-corrections-form__log-link {
  color: var(--k-color-accent-strong);
  font-weight: var(--k-weight-semibold);
}

.k-corrections-form__log-link:hover {
  color: var(--k-color-accent);
  text-decoration: underline;
}

/* Pending button affordance (set by corrections.js). */
.k-corrections-form__form .k-btn.is-pending {
  opacity: 0.7;
  cursor: progress;
}

/* =============================================================================
   6. CORRECTION / RETRACTION NOTICES
   (the head/SEO module renders .k-notice on single posts; the corrections
    helpers reuse the same classes — style them here so both agree.)
   ============================================================================= */
.k-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--k-space-2xs) var(--k-space-sm);
  padding: var(--k-space-sm) var(--k-space-md);
  margin-bottom: var(--k-space-lg);
  border-radius: var(--k-radius-sm);
  border: 1px solid var(--k-color-rule);
  background-color: var(--k-color-surface-2);
}

.k-notice__badge,
.k-notice__label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.14em 0.6em;
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-micro);
  font-weight: var(--k-weight-bold);
  letter-spacing: var(--k-ls-label);
  text-transform: uppercase;
  border-radius: var(--k-radius-xs);
}

.k-notice__body {
  flex: 1 1 16rem;
  min-width: 0;
}

.k-notice__text {
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-small);
  line-height: var(--k-lh-body);
  color: var(--k-color-ink);
}

.k-notice__link {
  color: var(--k-color-accent-strong);
  font-weight: var(--k-weight-semibold);
}

.k-notice__link:hover {
  color: var(--k-color-accent);
  text-decoration: underline;
}

.k-notice__meta {
  margin-top: var(--k-space-3xs);
  font-family: var(--k-font-sans);
  font-size: var(--k-fs-meta);
  color: var(--k-color-muted);
}

/* Corrected — terracotta accent (an update, not an alarm). */
.k-notice--corrected {
  background-color: var(--k-color-accent-soft);
  border-color: var(--k-color-accent-soft-2);
}

.k-notice--corrected .k-notice__badge,
.k-notice--corrected .k-notice__label {
  color: var(--k-color-on-accent);
  background-color: var(--k-color-accent);
}

/* Retracted — danger language (a strong, unmissable state). */
.k-notice--retracted {
  background-color: var(--k-color-danger-soft);
  border-color: var(--k-color-danger);
}

.k-notice--retracted .k-notice__badge,
.k-notice--retracted .k-notice__label {
  color: var(--k-color-on-accent);
  background-color: var(--k-color-danger);
}

.k-notice--retracted .k-notice__text {
  color: var(--k-color-ink);
}

/* =============================================================================
   RESPONSIVE + MOTION
   ============================================================================= */
@media (min-width: 40rem) {
  .k-corrections-form__form {
    gap: var(--k-space-xl);
  }
}

/* Honor reduced motion: the only motion here is the chevron nudge + card lifts,
   already transform/opacity; disable the transitions for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
  .k-correction__ref-link::after,
  .k-dossier-link,
  .k-pill--dossier {
    transition: none;
  }
}
