  /* ==========================================================================
     Wiki / Aide — visual system.

     Mirrors public/css/dashboard-new.css: same token block, same component
     recipes (card, dashed dividers, ink-black primary button, ghost button,
     pill, styled scrollbars), same Manrope type stack. The wiki is a reading
     surface rather than a data grid, so the spacing is looser and the prose
     measure is capped around 70ch.

     Five scope roots, deliberately separate so nothing leaks into — or gets
     leaked into by — the rest of the app:
       .wiki-app          — the /aide pages (index + single guide)
       .wiki-overlay      — the help-button backdrop (teleported to <body>)
       .wiki-panel        — the help-button slide-over, child of .wiki-overlay
       .wiki-content      — rendered markdown, owns its own typography
       .wiki-help-trigger — the inline "?" button, which lives on host pages

     SPECIFICITY POLICY — every rule below is prefixed with its scope root, the
     way dashboard-new.css writes `.menage-dash .card` and never a bare `.card`.
     This is not cosmetic. The app loads several global resets whose selectors
     tie with a single class at (0,1,0), and on a tie source order decides:

       [type=text],[type=email],… { padding:.5rem .75rem; border-radius:0;
                                    border-color:#6b7280; font-size:1rem }
       [type=text]:focus,…        { border-color:#2563eb; box-shadow:<blue ring> }

     shipped by BOTH public/vendor/bladewind/css/bladewind-ui.min.css and the
     Tailwind/flowbite build output. A bare `.wiki-search-input` tied with the
     first and lost, putting the magnifier on top of the placeholder; a bare
     `.wiki-search-input:focus` tied with the second and could paint a blue
     focus ring. Scoping takes them to (0,2,0)/(0,3,0), which wins outright
     with no !important needed.

     Bootstrap (via resources/sass/app.scss) and Tailwind preflight also reset
     p / ol / ul / pre / code / hr / table / th / button at (0,0,1); those lose
     to any class, but the rules below are scoped anyway for consistency, and
     the properties they touch are re-declared explicitly.

     Loaded globally from layouts/app.blade.php because the slide-over can be
     opened from any page in the app.

     !important POLICY: 13 declarations, and every one of them exists solely to
     beat resources/css/app.css's global
       a { color: inherit !important; text-decoration: none !important; }
     Specificity cannot beat !important, so link `color` (6 rules) and
     .wiki-content's `text-decoration: underline` / `text-decoration-color`
     keep theirs, as does the prefers-reduced-motion kill switch.

     Note the `text-decoration: none` on .wiki-result / .wiki-gcard /
     .wiki-btn-dark / .btn-ghost / .wiki-back is deliberately NOT important:
     the global reset already forces `none`, so these are belt-and-braces for
     the day that reset goes away, and they must not outrank it in the
     meantime. Ditto .wiki-btn-dark's `background` — nothing in the app sets an
     important background on <a> or <button>, so (0,2,0) is enough.
     ========================================================================== */

  /* TOKENS — lifted verbatim from .menage-dash. CSS variables do not cross
     scope boundaries, so each root declares its own copy. .wiki-content is a
     root too, so the rendered-markdown block stays self-sufficient wherever
     it is injected. */
  .wiki-app,
  .wiki-overlay,
  .wiki-panel,
  .wiki-content,
  .wiki-help-trigger {
    --bg:            #FAFAF7;
    --surface:       #FFFFFF;
    --surface-2:     #F4F2EE;
    --surface-3:     #ECE9E2;
    --border:        #ECE9E2;
    --border-strong: #D9D5CC;
    --ink:           #1B1B17;
    --ink-2:         #4A4A45;
    --muted:         #8A857B;
    --faint:         #B5B0A4;

    --st-confirmed:    oklch(58% 0.10 155);
    --st-confirmed-bg: oklch(96% 0.030 155);
    --st-pending:      oklch(63% 0.11 70);
    --st-pending-bg:   oklch(96% 0.035 70);
    --st-in:           oklch(55% 0.11 230);
    --st-in-bg:        oklch(96% 0.030 230);

    --accent-warm:     oklch(63% 0.12 50);
    --accent-warm-bg:  oklch(96% 0.030 50);

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 1px 0 rgba(15,23,42,0.03), 0 1px 2px rgba(15,23,42,0.04);
  }

  /* ==========================================================================
     SHELL
     ========================================================================== */
  .wiki-app {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: 20px 24px 28px;
    border-radius: 16px;
  }
  .wiki-app * { box-sizing: border-box; }
  .wiki-app button { font-family: inherit; font-size: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
  .wiki-app input  { font-family: inherit; color: inherit; }

  /* Reading column. The index runs a touch wider than a single guide so the
     two-up card grid has room to breathe. */
  .wiki-app .wiki-shell { max-width: 900px; margin: 0 auto; display: grid; gap: 24px; }
  .wiki-app .wiki-shell.narrow { max-width: 780px; }

  /* ==========================================================================
     PAGE HEAD — title + one-line subtitle, sitting directly on the page
     background. Deliberately NOT a card: the guide cards below are the only
     raised surfaces on the index, which is what makes the thumbnails the
     first thing the eye lands on.
     ========================================================================== */
  .wiki-app .wiki-head { padding: 4px 2px 0; }
  .wiki-app .wiki-page-title {
    margin: 8px 0 0;
    font-size: 30px; font-weight: 700;
    letter-spacing: -0.022em; line-height: 1.12;
    color: var(--ink);
  }
  .wiki-app .wiki-page-sub { margin: 7px 0 0; font-size: 13.5px; color: var(--muted); max-width: 62ch; }

  .wiki-app .wiki-eyebrow,
  .wiki-panel .wiki-eyebrow {
    font-size: 10.5px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  /* ==========================================================================
     SEARCH
     Nearly every declaration here is a property the [type=text] reset also
     sets, so the .wiki-app prefix is load-bearing — see the note up top.

     Full-bleed across the shell, directly under the title block. It is its own
     grid item now (it used to sit inside the hero card), so the shell's gap
     supplies the spacing and the rule carries no margin of its own.
     ========================================================================== */
  .wiki-app .wiki-search { position: relative; }
  .wiki-app .wiki-search-ico {
    position: absolute; left: 16px; top: 26px; transform: translateY(-50%);
    color: var(--muted); display: grid; place-items: center; pointer-events: none;
  }
  .wiki-app .wiki-search-input {
    width: 100%; height: 52px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background-color: var(--surface);
    color: var(--ink);
    font-size: 14px; font-weight: 500; line-height: 1.5;
    -webkit-appearance: none; appearance: none;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
  }
  .wiki-app .wiki-search-input::placeholder { color: var(--faint); font-weight: 500; opacity: 1; }
  .wiki-app .wiki-search-input:focus {
    border-color: var(--ink-2);
    box-shadow: 0 0 0 3px rgba(27,27,23,0.06);
    outline: none;
  }
  .wiki-app .wiki-search-note { margin: 6px 0 0; font-size: 11px; color: var(--muted); }

  .wiki-app .wiki-results {
    position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 28px -12px rgba(15,23,42,0.18), var(--shadow-card);
    overflow: hidden;
    max-height: 340px; overflow-y: auto;
  }
  .wiki-app .wiki-results::-webkit-scrollbar { width: 6px; }
  .wiki-app .wiki-results::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
  .wiki-app .wiki-results::-webkit-scrollbar-track { background: transparent; }
  .wiki-app .wiki-result {
    display: block; padding: 10px 14px;
    border-bottom: 1px dashed var(--border);
    text-decoration: none;
    transition: background .12s;
  }
  .wiki-app .wiki-result:last-child { border-bottom: 0; }
  .wiki-app .wiki-result:hover { background: var(--surface-2); }
  .wiki-app .wiki-result-title { font-size: 13px; font-weight: 700; color: var(--ink); }
  .wiki-app .wiki-result-sec   { font-size: 11px; color: var(--muted); margin-top: 1px; }

  /* ==========================================================================
     CARD  (same recipe as .menage-dash .card)
     Now only the index's empty state — the guide listings are .wiki-gcard.
     ========================================================================== */
  .wiki-app .wiki-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    display: flex; flex-direction: column; min-width: 0;
  }

  /* ==========================================================================
     SECTION HEAD — a quiet rule over its own grid.

     The alternative was a section label on every card. Rejected: with 14
     guides over 4-5 sections the same word would repeat 2-5 times inside one
     visual band, and it would sit directly above the large card title where
     it competes with the thing it is meant to introduce. A heading states the
     grouping once and leaves the cards to be nothing but image + title +
     description, which is the reference's whole point.

     Sits on the page background (no card), matching .wiki-head.
     ========================================================================== */
  .wiki-app .wiki-section { display: grid; gap: 12px; }
  .wiki-app .wiki-sec-head {
    display: flex; align-items: center; gap: 10px;
    padding: 0 2px;
  }
  .wiki-app .wiki-sec-title {
    margin: 0;
    font-size: 10.5px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .wiki-app .wiki-sec-count {
    background: var(--surface-3); color: var(--ink-2);
    border-radius: 999px; padding: 1px 8px;
    font-size: 11px; font-weight: 700;
    font-feature-settings: 'tnum' 1;
  }
  /* Hairline filling the rest of the row, so the label reads as a divider
     rather than as a floating word. */
  .wiki-app .wiki-sec-head::after {
    content: ''; flex: 1; height: 1px;
    background: var(--border);
  }

  /* ==========================================================================
     GUIDE GRID — thumbnail-led cards, two up on desktop, one up on narrow.
     minmax(0, 1fr) rather than 1fr: a long unbroken word in a title would
     otherwise blow the column past its share of the track.
     ========================================================================== */
  .wiki-app .wiki-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  /* Related guides: same card, one size down, three up. */
  .wiki-app .wiki-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  /* ==========================================================================
     GUIDE CARD — image region on top, body (title + excerpt) below.
     ========================================================================== */
  .wiki-app .wiki-gcard {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    text-decoration: none;
    transition: border-color .14s, box-shadow .14s;
  }
  /* No lift, no scale on the card itself — the dashboard vocabulary moves
     borders and shadows, not boxes. The only motion is inside the frame. */
  .wiki-app .wiki-gcard:hover {
    border-color: var(--border-strong);
    box-shadow: 0 10px 24px -14px rgba(15,23,42,0.22), var(--shadow-card);
  }

  /* Tinted mat the thumbnail sits on. Our thumbnails are app screenshots and
     are mostly white, so a plain white card would swallow their edges; the
     mat plus the frame border keeps them legible as images. */
  .wiki-app .wiki-gcard-media {
    position: relative; display: block;
    padding: 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
  }
  .wiki-app .wiki-gcard.compact .wiki-gcard-media { padding: 8px; }

  .wiki-app .wiki-gcard-frame {
    display: block; position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color .12s;
  }
  .wiki-app .wiki-gcard:hover .wiki-gcard-frame { border-color: var(--border-strong); }

  /* Tailwind preflight sets `img { display:block; vertical-align:middle }` at
     (0,0,1) and .wiki-content sets its own img rules — neither reaches here,
     but the box properties are declared explicitly all the same. */
  .wiki-app .wiki-guide-thumb {
    display: block;
    width: 100%; height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover; object-position: top center;
    border: 0; border-radius: 0; margin: 0;
    background: var(--surface-2);
    transition: transform .22s ease;
  }
  .wiki-app .wiki-gcard:hover .wiki-guide-thumb { transform: scale(1.03); }

  /* No thumbnail: the frame keeps its 16:10 box and shows the icon tile the
     old list used, enlarged. A card must never collapse for want of an image. */
  .wiki-app .wiki-gcard-placeholder {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background:
      repeating-linear-gradient(45deg,
        var(--surface-2) 0 8px,
        var(--surface-3) 8px 16px);
  }
  .wiki-app .wiki-guide-ico {
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--surface-2); color: var(--ink-2);
    border: 1px solid var(--border);
  }
  .wiki-app .wiki-guide-ico.warm { background: var(--accent-warm-bg); color: var(--accent-warm); border-color: transparent; }
  .wiki-app .wiki-gcard-placeholder .wiki-guide-ico {
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--surface); border-color: var(--border-strong);
  }
  .wiki-app .wiki-gcard-placeholder .wiki-guide-ico.warm {
    background: var(--accent-warm-bg); border-color: transparent;
  }
  .wiki-app .wiki-gcard-placeholder .wiki-guide-ico svg { width: 20px; height: 20px; }
  .wiki-app .wiki-gcard.compact .wiki-gcard-placeholder .wiki-guide-ico { width: 34px; height: 34px; border-radius: 9px; }
  .wiki-app .wiki-gcard.compact .wiki-gcard-placeholder .wiki-guide-ico svg { width: 15px; height: 15px; }

  /* « Visite guidée » badge, floated over the mat. Opaque surface rather than
     .wiki-pill's tinted fill, because it lands on top of arbitrary screenshot
     pixels and has to stay readable. */
  .wiki-app .wiki-gcard-badge {
    position: absolute; top: 20px; left: 20px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em;
    background: var(--surface); color: var(--accent-warm);
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px -2px rgba(15,23,42,0.16);
  }

  .wiki-app .wiki-gcard-body { padding: 15px 17px 17px; min-width: 0; }
  .wiki-app .wiki-gcard.compact .wiki-gcard-body { padding: 11px 13px 13px; }
  .wiki-app .wiki-gcard-title {
    display: block;
    font-size: 17px; font-weight: 700;
    letter-spacing: -0.015em; line-height: 1.25;
    color: var(--ink);
  }
  .wiki-app .wiki-gcard.compact .wiki-gcard-title { font-size: 13.5px; letter-spacing: -0.01em; }
  /* Two lines, hard-clamped. WikiPage::excerpt() already truncates on a word
     boundary; the clamp is the belt to that pair of braces, for a frontmatter
     `excerpt:` an author writes longer than the derivation would. */
  .wiki-app .wiki-gcard-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 6px;
    font-size: 12.5px; line-height: 1.5;
    color: var(--muted);
  }
  /* Section label under a related guide's title — same quiet treatment as the
     search dropdown's .wiki-result-sec. */
  .wiki-app .wiki-guide-sec { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

  /* Empty state */
  .wiki-app .wiki-empty {
    padding: 28px 18px; text-align: center;
    color: var(--muted); font-size: 12.5px;
  }

  /* ==========================================================================
     BUTTONS
     ========================================================================== */
  /* Primary — ink-black. The !important here is not about the resets (the
     scope prefix handles those); it is the only way to beat app.css's
     `a { color: inherit !important }`. */
  .wiki-app .wiki-btn-dark,
  .wiki-app a.wiki-btn-dark,
  .wiki-app button.wiki-btn-dark,
  .wiki-panel .wiki-btn-dark,
  .wiki-panel a.wiki-btn-dark,
  .wiki-panel button.wiki-btn-dark {
    height: 34px; padding: 0 16px;
    background: var(--ink);
    color: #FFFFFF !important;
    border-radius: 8px; font-weight: 600; font-size: 12.5px;
    text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0;
    transition: background .12s;
  }
  .wiki-app .wiki-btn-dark:hover,
  .wiki-panel .wiki-btn-dark:hover { background: #000; color: #FFFFFF !important; }

  /* Ghost — border + text change on hover, never a background fill. */
  .wiki-app .btn-ghost,
  .wiki-app a.btn-ghost,
  .wiki-panel .btn-ghost,
  .wiki-panel a.btn-ghost {
    height: 30px; padding: 0 11px;
    border: 1px solid var(--border-strong);
    background: var(--surface); border-radius: 8px;
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600; font-size: 12px;
    color: var(--ink-2) !important;
    text-decoration: none;
    transition: border-color .12s, color .12s;
  }
  .wiki-app .btn-ghost:hover,
  .wiki-panel .btn-ghost:hover { border-color: var(--ink-2); color: var(--ink) !important; }

  /* Back link — quiet, sits above the article card. */
  .wiki-app .wiki-backbar { line-height: 1; margin-bottom: -4px; }
  .wiki-app .wiki-back {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 600;
    color: var(--muted) !important;
    text-decoration: none;
    transition: color .12s;
  }
  .wiki-app .wiki-back:hover { color: var(--ink) !important; }
  .wiki-app .wiki-back-ico { display: grid; place-items: center; transition: transform .14s ease; }
  .wiki-app .wiki-back:hover .wiki-back-ico { transform: translateX(-2px); }

  /* ==========================================================================
     ARTICLE — rendered inside .wiki-app (guide page) and .wiki-panel (drawer)
     ========================================================================== */
  /* On the guide page the article is wrapped in a stack that also carries the
     thumbnail banner. The stack owns the card chrome and the article gives its
     own up, so banner + article read as one surface with no seam between them.
     Renders identically to a bare article card when there is no banner.
     Not applied in .wiki-panel: the drawer never gets a banner (see
     wiki/show.blade.php) and already flattens .wiki-article below. */
  .wiki-app .wiki-article-stack {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .wiki-app .wiki-article-stack .wiki-article {
    border: 0; border-radius: 0; box-shadow: none;
  }
  .wiki-app .wiki-banner {
    display: block;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
  }
  .wiki-app .wiki-banner-img {
    display: block;
    width: 100%; height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover; object-position: top center;
    border: 0; border-radius: 0; margin: 0;
  }

  .wiki-app .wiki-article,
  .wiki-panel .wiki-article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    padding: 26px 30px 30px;
  }
  .wiki-app .wiki-article-head,
  .wiki-panel .wiki-article-head { padding-bottom: 18px; border-bottom: 1px dashed var(--border); margin-bottom: 20px; }
  .wiki-app .wiki-title,
  .wiki-panel .wiki-title {
    margin: 8px 0 0;
    font-size: 28px; font-weight: 700;
    letter-spacing: -0.02em; line-height: 1.15;
    color: var(--ink);
  }
  /* "Montre-moi" tour CTAs */
  .wiki-app .wiki-tours,
  .wiki-panel .wiki-tours { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

  /* ==========================================================================
     RENDERED MARKDOWN
     Moved out of resources/css/app.css (was Tailwind @apply + blue-600 links).
     Reading surface: ~70ch measure, 1.65 line-height, ink/ink-2 palette.
     .wiki-content is its own scope root, so these rules are prefixed with it
     rather than with .wiki-app/.wiki-panel — it owns this typography wherever
     the markup lands, including when x-html injects it into the drawer.
     ========================================================================== */
  .wiki-content {
    font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--ink-2);
    -webkit-font-smoothing: antialiased;
    max-width: 70ch;
  }
  .wiki-content > :first-child { margin-top: 0; }
  .wiki-content > :last-child  { margin-bottom: 0; }

  .wiki-content h1 {
    margin: 28px 0 10px;
    font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25;
    color: var(--ink);
  }
  .wiki-content h2 {
    margin: 30px 0 10px;
    font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3;
    color: var(--ink);
  }
  .wiki-content h3 {
    margin: 22px 0 6px;
    font-size: 14.5px; font-weight: 700; letter-spacing: -0.005em;
    color: var(--ink);
  }
  .wiki-content h4 {
    margin: 18px 0 6px;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted);
  }
  .wiki-content p { margin: 0 0 14px; }
  .wiki-content ul { margin: 0 0 14px; padding-left: 20px; list-style: disc; }
  .wiki-content ol { margin: 0 0 14px; padding-left: 20px; list-style: decimal; }
  .wiki-content li { margin-bottom: 7px; }
  .wiki-content li::marker { color: var(--faint); font-weight: 700; }
  .wiki-content li > ul, .wiki-content li > ol { margin: 7px 0 0; }
  .wiki-content strong, .wiki-content b { font-weight: 700; color: var(--ink); }
  .wiki-content em { font-style: italic; }

  .wiki-content a {
    color: var(--ink) !important;
    font-weight: 600;
    text-decoration: underline !important;
    text-decoration-color: var(--border-strong) !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color .12s, text-decoration-color .12s;
  }
  .wiki-content a:hover {
    color: var(--accent-warm) !important;
    text-decoration-color: var(--accent-warm) !important;
  }

  /* Bootstrap resets `code { color; font-size; word-wrap }` and
     `pre { display; font-size; margin; overflow }` at (0,0,1); re-declared
     here so nothing is inherited from it by omission. */
  .wiki-content code {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 5px;
    color: var(--ink);
    word-wrap: break-word;
  }
  .wiki-content pre {
    display: block;
    margin: 0 0 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    overflow: auto;
    font-size: 12.5px;
    line-height: 1.55;
  }
  .wiki-content pre code { background: none; border: 0; padding: 0; font-size: 12.5px; }
  .wiki-content pre::-webkit-scrollbar { height: 6px; }
  .wiki-content pre::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
  .wiki-content pre::-webkit-scrollbar-track { background: transparent; }

  .wiki-content img {
    display: block;
    max-width: 100%; height: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 18px 0;
    vertical-align: baseline;
  }
  /* Bootstrap's hr sets height/border/opacity/color/margin — all re-declared. */
  .wiki-content hr {
    height: 0; border: 0; border-top: 1px dashed var(--border);
    margin: 24px 0; opacity: 1; color: inherit;
  }

  /* Blockquote = the "note / à savoir" callout. The one sparing use of the
     warm accent inside prose. */
  .wiki-content blockquote {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: var(--accent-warm-bg);
    border-left: 3px solid var(--accent-warm);
    border-radius: 0 10px 10px 0;
    color: var(--ink-2);
  }
  .wiki-content blockquote > :last-child { margin-bottom: 0; }

  .wiki-content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; caption-side: top; }
  .wiki-content th {
    text-align: left;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted);
    padding: 8px 8px;
    border-bottom: 1px solid var(--border);
  }
  .wiki-content td {
    padding: 9px 8px;
    border-bottom: 1px dashed var(--border);
    color: var(--ink-2);
    vertical-align: top;
  }
  .wiki-content tbody tr:last-child td { border-bottom: 0; }

  /* ==========================================================================
     HELP TRIGGER — the inline "?" button rendered on host pages.
     Keeps its FontAwesome glyph (see components/help-button.blade.php); only
     the chrome is retuned to the ink palette.

     Qualified with `button` so the visual rules land at (0,1,1) and beat the
     `button,[type=button],[type=reset],[type=submit]` reset at (0,1,0), which
     would otherwise tie and reimpose -webkit-appearance:button. The bare class
     stays as the token root.
     ========================================================================== */
  button.wiki-help-trigger {
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; padding: 0;
    border-radius: 6px;
    background-color: transparent; background-image: none;
    color: var(--faint);
    font-family: inherit; font-size: 12px;
    -webkit-appearance: none; appearance: none;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color .12s, color .12s;
  }
  button.wiki-help-trigger:hover { background-color: var(--surface-2); color: var(--ink); }

  /* ==========================================================================
     HELP SLIDE-OVER
     ========================================================================== */
  .wiki-overlay { position: fixed; inset: 0; z-index: 10001; }
  .wiki-overlay .wiki-overlay-scrim { position: absolute; inset: 0; background: rgba(27,27,23,0.32); }

  .wiki-panel {
    position: absolute; right: 0; top: 0;
    height: 100%; width: 100%; max-width: 480px;
    background: var(--surface);
    color: var(--ink);
    font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 44px -20px rgba(15,23,42,0.28);
    overflow-y: auto;
  }
  .wiki-panel * { box-sizing: border-box; }
  .wiki-panel button { font-family: inherit; font-size: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
  .wiki-panel::-webkit-scrollbar { width: 6px; }
  .wiki-panel::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
  .wiki-panel::-webkit-scrollbar-track { background: transparent; }

  .wiki-panel .wiki-panel-head {
    position: sticky; top: 0; z-index: 1;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
  }
  .wiki-panel .wiki-panel-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
  .wiki-panel .wiki-panel-actions { display: flex; align-items: center; gap: 8px; }
  .wiki-panel .wiki-panel-close {
    width: 30px; height: 30px; border-radius: 6px; padding: 0;
    display: grid; place-items: center;
    background-color: transparent; background-image: none;
    color: var(--muted);
    -webkit-appearance: none; appearance: none;
    transition: background-color .12s, color .12s;
    flex-shrink: 0;
  }
  .wiki-panel .wiki-panel-close:hover { background-color: var(--surface-2); color: var(--ink); }
  .wiki-panel .wiki-panel-body { padding: 18px; }
  .wiki-panel .wiki-panel-note { padding: 18px; margin: 0; font-size: 12px; color: var(--muted); }

  /* Inside the 480px drawer the article chrome collapses: no card, no measure
     cap — the drawer itself is already the measure. */
  .wiki-panel .wiki-article { border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .wiki-panel .wiki-title { font-size: 20px; }
  .wiki-panel .wiki-content { max-width: none; font-size: 13.5px; }

  /* ==========================================================================
     RESPONSIVE
     ========================================================================== */
  @media (max-width: 720px) {
    .wiki-app { padding: 14px; border-radius: 12px; }
    .wiki-app .wiki-shell { gap: 20px; }
    .wiki-app .wiki-page-title { font-size: 25px; }
    .wiki-app .wiki-search-input { height: 48px; }
    .wiki-app .wiki-search-ico { top: 24px; }
    /* One up: at this width a two-column grid puts the thumbnail — the whole
       point of the card — below the size at which it can be recognized. */
    .wiki-app .wiki-grid,
    .wiki-app .wiki-grid.compact { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .wiki-app .wiki-gcard-title { font-size: 16px; }
    .wiki-app .wiki-article { padding: 20px 18px 24px; }
    .wiki-app .wiki-title { font-size: 23px; }
    .wiki-panel { max-width: 100%; border-left: 0; }
  }

  /* ==========================================================================
     REDUCED MOTION — same courtesy as the dashboard.
     ========================================================================== */
  @media (prefers-reduced-motion: reduce) {
    .wiki-app *,
    .wiki-panel,
    .wiki-panel *,
    .wiki-content *,
    button.wiki-help-trigger {
      transition: none !important;
      animation: none !important;
    }
    .wiki-app .wiki-gcard:hover .wiki-guide-thumb,
    .wiki-app .wiki-back:hover .wiki-back-ico { transform: none; }
  }
