/* ══════════════════════════════════════════════════════════════════════
   PREMIUM — the 26 October 2026 pass
   ══════════════════════════════════════════════════════════════════════

   The founder's verdict on the running product: "really stiff and not like a
   premium product", and features that "feel underwhelming relative to their
   actual effect". Rated 4/10 against what a £450-a-month product should look
   like. The causes, measured on screen rather than guessed:

     1. Every panel was the same box with the same sage header band, so
        nothing on a page was primary.
     2. Hairlines, card borders, header bands and table rows were all one
        green-grey, so the page read as a single flat wash.
     3. Monospace on every date and in the rail made it read as a developer
        tool.
     4. Clip-art icons glued to page titles.
     5. Nothing moved, so nothing felt alive.

   The Ledger direction (refinement.css) stays: tabular numbers, hairline
   tables, no gratuitous colour. This evolves it from "drawn on the page" to
   "sits on the page". Loaded after refinement.css and before accessibility.css,
   so the presentation preferences still win.
   ══════════════════════════════════════════════════════════════════════ */


/* ══ 1. SURFACES ══════════════════════════════════════════════════════ */

.card, .profile-card {
    border: 1px solid var(--kc-line);
    border-radius: var(--kc-radius-lg);
    box-shadow: var(--kc-shadow-sm);
    overflow: hidden;
}

/* A card that is a link lifts under the cursor; one that is not does not
   pretend to be clickable. */
a.card, .card.is-link, a.profile-card {
    transition:
        box-shadow var(--kc-duration) var(--kc-ease),
        transform var(--kc-duration) var(--kc-ease),
        border-color var(--kc-duration) var(--kc-ease);
}
a.card:hover, .card.is-link:hover, a.profile-card:hover {
    box-shadow: var(--kc-shadow);
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--kc-evergreen) 25%, var(--kc-line));
}

/* The header is the top of its card, not a band across it. */
.card-header, .profile-card-header {
    background: var(--kc-header-bg);
    border-bottom: 1px solid var(--kc-line);
    padding: var(--kc-space-4) var(--kc-space-5);
    font-size: 0.9375rem;
    font-weight: var(--kc-weight-heading);
    letter-spacing: -0.011em;
    color: var(--kc-ink);
}

.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6,
.profile-card-header h1, .profile-card-header h2, .profile-card-header h3,
.profile-card-header h4, .profile-card-header h5, .profile-card-header h6 {
    font-size: inherit;
    margin: 0;
}

/* Header icons are tinted rather than black, so they label the card
   without competing with its title. */
.card-header > .bi, .card-header :is(h1, h2, h3, h4, h5, h6) > .bi,
.profile-card-header > .bi, .profile-card-header :is(h1, h2, h3, h4, h5, h6) > .bi {
    color: var(--kc-evergreen);
    margin-right: var(--kc-space-1);
}

.card-footer {
    background: var(--kc-surface-2);
    border-top: 1px solid var(--kc-line);
}


/* ══ 2. PAGE TITLES ═══════════════════════════════════════════════════

   Every page title carried a Bootstrap icon in front of it — a house with a
   gear, a pill, a clipboard. At 2rem beside a heading it reads as clip-art.
   The rail already says where you are; the title only has to say what. */

.content h1 > .bi:first-child,
.content .h1 > .bi:first-child { display: none; }

.content h1, .content .h1 {
    font-size: clamp(1.75rem, 1.35rem + 1.2vw, 2.25rem);
    letter-spacing: -0.026em;
    font-weight: var(--kc-weight-heading);
}


/* ══ 3. TABLES ════════════════════════════════════════════════════════ */

.table > thead > tr > th {
    background: var(--kc-surface-2);
    border-bottom: 1px solid var(--kc-line);
    color: var(--kc-slate);
    padding-top: var(--kc-space-3);
    padding-bottom: var(--kc-space-3);
}

.table > tbody > tr > td { border-bottom-color: var(--kc-line); }
.table > tbody > tr:hover > td { background: var(--kc-evergreen-50); }

/* A table that is the whole of a card runs edge to edge. */
.card > .table, .card > .table-responsive > .table,
.card-body > .table:only-child, .card-body > .table-responsive:only-child { margin: 0; }


/* ══ 4. CONTROLS ══════════════════════════════════════════════════════ */

.btn, .btn-action, .btn-action-outline {
    border-radius: var(--kc-radius);
    min-height: 2.25rem;
}

/* A link dressed as a button is a button: Bootstrap underlines every <a>, and
   most pages only cancelled that in their own scoped copy of .btn-action. */
a.btn-action, a.btn-action-outline, a.btn-draft, a.btn-draft-quiet,
a.btn-action:hover, a.btn-action-outline:hover { text-decoration: none; }

.btn-action, .btn-primary {
    color: var(--kc-on-primary);
    box-shadow: 0 1px 2px rgba(26, 46, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-action-outline, .btn-outline-secondary, .btn-outline-primary {
    background: var(--kc-card-bg);
    border: 1px solid var(--kc-line);
    color: var(--kc-ink);
    box-shadow: 0 1px 2px rgba(26, 46, 42, 0.05);
}
.btn-action-outline:hover:not(:disabled),
.btn-outline-secondary:hover:not(:disabled),
.btn-outline-primary:hover:not(:disabled) {
    background: var(--kc-surface-2);
    border-color: color-mix(in srgb, var(--kc-evergreen) 35%, var(--kc-line));
    color: var(--kc-evergreen-700);
}

.form-control, .form-select { border-color: var(--kc-line); }

/* Links are the brand colour, not the template blue app.css still sets. */
a, .btn-link { color: var(--kc-evergreen); }
a:hover, .btn-link:hover { color: var(--kc-evergreen-700); }


/* ══ 5. BADGES ════════════════════════════════════════════════════════

   Soft pills rather than filled blocks. A filled block shouts; a status is
   information, and the few things that should shout keep their own colour
   in their own component stylesheet. */

.badge, .profile-badge {
    border-radius: var(--kc-radius-full);
    font-weight: var(--kc-weight-body-medium);
    letter-spacing: 0.005em;
    padding: 0.25em 0.65em;
}


/* ══ 6. THE RAIL ══════════════════════════════════════════════════════ */

.nav-rail .nav-link { border-radius: var(--kc-radius); }


/* ══ 7. MOTION ════════════════════════════════════════════════════════

   One entrance for page content: a short fade and a 4px rise. Enough that a
   page arrives rather than appears. accessibility.css removes it for
   anybody who has asked for less movement, as it does every animation. */

@keyframes kc-arrive {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

.content > * {
    animation: kc-arrive var(--kc-duration-lg) var(--kc-ease) both;
}

@media (prefers-reduced-motion: reduce) {
    .content > * { animation: none; }
}


/* ══ 8. DETAILS ═══════════════════════════════════════════════════════ */

::selection { background: var(--kc-evergreen-100); color: var(--kc-ink); }

/* Quiet scrollbars where the platform allows it. */
* { scrollbar-color: color-mix(in srgb, var(--kc-slate) 35%, transparent) transparent; }
