/* =====================================================================
   reading.css — how a long article reads (v4.9.330)

   Three changes, all presentation, none of them touching a word of content:

   1. THE CALLOUTS ARE QUIETER. The Land and Property article carries sixty
      callout boxes across ten different labels, each with the same visual
      weight as the last. A coloured panel every nine paragraphs is why a
      36,000-word guide reads as a form. They keep their words and their
      order; they lose the box. A rule down the left, a small label, and
      the page breathes. The warning treatment stays strong, because a
      warning is the one callout that should stop the eye.

   2. THE SECTIONS BREATHE. Forty-six sections running on with uniform
      spacing read as one column. A hairline and more room before each h2
      makes them read as chapters.

   3. THE READING RAIL. A slim fixed line at the top of the viewport and
      the current section at the bottom left, so a reader knows where they
      are in a document this long. Hidden until the script claims it.

   Nothing here is scoped to a template except where it has to be: the
   callout and heading rules apply only inside an article's content, so a
   callout in a page or a tool is unaffected.
   ===================================================================== */

/* ---------------------------------------------------------------
   1. The callouts
   --------------------------------------------------------------- */

.single-post .entry-content .callout {
    background: none;
    border: 0;
    border-left: 2px solid var(--line-dark);
    border-radius: 0;
    padding: .1rem 0 .1rem 1.05rem;
    margin: 1.75rem 0;
}

.single-post .entry-content .callout > :first-child { margin-top: 0; }
.single-post .entry-content .callout > :last-child { margin-bottom: 0; }

/* One label treatment for all ten labels. The label identifies the box; it
   does not need a colour of its own to do that. */
.single-post .entry-content .callout__label,
.single-post .entry-content .callout__title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-soft, #5A5A5A);
    margin: 0 0 .3rem;
}

/* The icon prefixes go. Ten labels with ten symbols is decoration, and at
   sixty callouts it is the decoration a reader notices first. */
.single-post .entry-content .callout__title::before,
.single-post .entry-content .callout__label::before { content: none; }

/* A warning keeps its weight, and only a warning does. */
.single-post .entry-content .callout--warning {
    border-left-color: var(--error);
    background: color-mix(in srgb, var(--error) 4%, transparent);
    padding: .8rem 1rem .8rem 1.05rem;
}

.single-post .entry-content .callout--warning .callout__label,
.single-post .entry-content .callout--warning .callout__title {
    color: var(--error);
}

/* ---------------------------------------------------------------
   2. The sections
   --------------------------------------------------------------- */

.single-post .entry-content > h2 {
    margin-top: 3.4rem;
    padding-top: 1.7rem;
    border-top: 1px solid var(--line, rgba(0,0,0,.12));
}

/* The first heading after the opener does not need a rule above it: the
   article has already been separated from the header. */
.single-post .entry-content > h2:first-of-type {
    margin-top: 2.2rem;
    padding-top: 0;
    border-top: 0;
}

.single-post .entry-content > h3 {
    margin-top: 2.1rem;
}

/* A heading is followed by its text, not by a gap the same size as the one
   before the heading. */
.single-post .entry-content > h2 + p,
.single-post .entry-content > h3 + p {
    margin-top: .55rem;
}

/* ---------------------------------------------------------------
   3. The reading rail
   --------------------------------------------------------------- */

.bd-rail {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: .6rem;
    max-width: min(22rem, calc(100vw - 6rem));
    padding: .45rem .8rem .45rem .7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper, #fff) 92%, transparent);
    border: 1px solid var(--line, rgba(0,0,0,.12));
    backdrop-filter: blur(6px);
    font-size: .78rem;
    line-height: 1.2;
    color: var(--ink-soft, #5A5A5A);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.bd-rail[hidden] { display: none; }

.bd-rail__progress {
    position: relative;
    display: block;
    width: 2.6rem;
    height: 3px;
    border-radius: 2px;
    background: var(--line, rgba(0,0,0,.12));
    overflow: hidden;
    flex: none;
}

.bd-rail__bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--emerald, #0F6B4F);
    transition: width .12s linear;
}

.bd-rail__now {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 13rem;
}

.bd-rail__count {
    flex: none;
    font-variant-numeric: tabular-nums;
    opacity: 1;
    color: var(--ink, #12161A);
}

/* On a phone the rail would sit under the reader's thumb and over the text.
   The progress line is the useful half, so the label goes and the line stays. */
@media (max-width: 640px) {
    .bd-rail {
        left: .6rem;
        bottom: .6rem;
        padding: .35rem .6rem;
        gap: .45rem;
    }
    .bd-rail__now { display: none; }
    .bd-rail__progress { width: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .bd-rail__bar { transition: none; }
}

/* ---------------------------------------------------------------
   4. The table of contents is obviously openable  (v4.9.332)

   Until now the only affordance was a bare "+" glyph floated right, in
   small gold type, with no size, no border and no weight. On a cream
   panel it reads as punctuation rather than as a control, and a reader
   who does not already know the box opens never finds out.

   The marker becomes a control: a bordered disc the size of a thumb,
   dark green on white, with the plus centred in it. It turns to a minus
   when the panel is open, the whole summary row takes a hover and focus
   state so it reads as clickable, and the target is the full width of
   the row rather than the glyph.
   --------------------------------------------------------------- */

.single-post .bd-toc > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .5rem .55rem .5rem .1rem;
    border-radius: 4px;
    cursor: pointer;
}

.single-post .bd-toc > summary:hover,
.single-post .bd-toc > summary:focus-visible {
    background: rgba(20, 90, 67, .06);
}

.single-post .bd-toc > summary::after {
    content: "+";
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    border: 1px solid var(--line-dark, #D9D4C4);
    border-radius: 50%;
    background: #fff;
    color: var(--gold-deep, #104532);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    padding-bottom: .1rem;
}

.single-post .bd-toc[open] > summary::after {
    content: "\2212"; /* a true minus, not an en dash */
}

/* The summary is a control, so it should not look like a label that happens
   to be bold. Uppercase small caps stay, the tracking comes down slightly so
   it reads as a button caption rather than a heading. */
.single-post .bd-toc > summary {
    letter-spacing: .12em;
}
