/*  Kirin is an autonomous chess system that allows you to play against an AI
 *  opponent in the real world.
 *  Copyright (C) 2026 Kirin Autonomy Inc. All rights reserved.
 *
 *  kirin.css — house styling on top of Furo.
 *
 *  Furo is already close to right, so this is deliberately small: brand colours
 *  live in html_theme_options in conf.py, and only what CSS variables cannot
 *  express belongs here. Resist growing it — every rule is one more thing to
 *  re-check when the theme is bumped (docs/api-docs/PLAN.md §2).
 */

/* Breathe renders each signature as its own block. At Furo's defaults a file
 * page of 40 free functions is an undifferentiated wall; a rule makes the
 * boundaries scannable without adding colour the palette does not have. */
dl.cpp > dt {
    border-top: 1px solid var(--color-background-border);
    padding-top: 0.6rem;
    margin-top: 1.2rem;
}

dl.cpp > dt:first-of-type {
    border-top: none;
    margin-top: 0;
}

/* Sidebar entries are full paths ('hardware/piece_tracker.h') because that is how
 * these files are named in review and in the plans. They are long, so let them
 * break at the separators rather than wrapping mid-extension. */
.sidebar-tree .reference {
    overflow-wrap: anywhere;
    hyphens: none;
}

/* Decision records (_ext/kirin_decisions.py). These are the manual's load-bearing
 * unit — a reader skimming a chapter should register "this is a decision, with
 * alternatives that were weighed" at a glance, the way the boxed LaTeX version
 * read. Furo styles them as a generic admonition; the brand navy left border and
 * the run-in field headings are what make them their own thing. */
.kirin-decision {
    border-left: 4px solid var(--color-brand-primary);
}

.kirin-decision > .admonition-title {
    background-color: var(--color-background-secondary);
    color: var(--color-foreground-primary);
    font-weight: 600;
}

/* Furo puts an icon before every admonition title; a decision is not a note. */
.kirin-decision > .admonition-title::before {
    content: none;
}

.kirin-decision > .admonition-title {
    padding-left: 0.9rem;
}

/* The Origin/Status line under the title is metadata, not prose. */
.kirin-decision-meta {
    font-size: 0.85em;
    font-style: italic;
    color: var(--color-foreground-secondary);
    margin-top: 0.4rem;
}

/* Context / Decision / Rejected / Consequences read as run-in headings. */
.kirin-decision > p > strong:first-child {
    color: var(--color-brand-content);
}

/* A superseded decision is history, kept for the record — greyed so a reader
 * scanning a chapter can see at a glance it is no longer load-bearing. Mirrors
 * the LaTeX \begin{decisionsuperseded} treatment. */
.kirin-decision-superseded {
    border-left-color: var(--color-foreground-muted);
    opacity: 0.72;
}

.kirin-decision-superseded > .admonition-title {
    color: var(--color-foreground-secondary);
}

/* The same greying in the register table row (a plain <tr>, no admonition). */
tr.kirin-decision-superseded {
    opacity: 0.6;
}
