/* Design tokens for Note by Note.
   ─────────────────────────────────────────────────────────────────────────
   Every colour below earned its place by appearing three or more times with
   one meaning; #1a6e8a alone was written out 52 times across six
   stylesheets. Values are unchanged from what shipped — this file moves
   them, it does not redecide them.

   This sheet is emitted by Base.astro for EVERY page, before any other
   stylesheet, because the landing page opts out of style.css
   (`baseStyle={false}`) and would otherwise resolve every var() to nothing.

   Naming follows DESIGN.md's frontmatter keys so the document and the code
   share one vocabulary: colors.primary is --nb-primary. The --nb- prefix
   keeps these clear of Bootstrap's --bs- namespace.

   Radii are deliberately NOT tokenised. The values in use (50px x7, 50% x7,
   1rem x6, 60px x4, 30px x3, .75rem x3) do not converge on a scale, so a
   radius token set would be inventing one rather than extracting one. That
   is a real inconsistency and it belongs to a refinement pass, not here.   */

:root {
    /* ── Action ──────────────────────────────────────────────────────────
       The colour that does things: every control, and every piece of text
       that has to clear a contrast ratio. */
    --nb-primary: #1a6e8a;
    --nb-primary-pressed: #15596f;
    --nb-primary-deep: #0f4557;
    --nb-primary-disabled: #9bb8c2;
    --nb-primary-light: #0b6fbf;
    --nb-primary-tooltip: #337d8c;

    /* ── Accent ──────────────────────────────────────────────────────────
       Ornament only. Never a label, never a control state — it cannot carry
       either at 1.96:1 against white. */
    --nb-accent: #0dcaf0;
    --nb-accent-deep: #0aafcc;
    --nb-accent-dark: #0d8aa5;

    /* ── Surfaces and text ───────────────────────────────────────────── */
    --nb-surface: #f8f9fa;
    --nb-surface-raised: #ffffff;
    --nb-canvas: #c7ecf2;
    --nb-ink: #2d3436;
    --nb-ink-muted: #636e72;
    --nb-border-faint: #dbe2e6;

    /* ── Button roles ────────────────────────────────────────────────────
       Amber means a concession rather than progress; red is reserved for
       the one control that throws work away. */
    --nb-concede: #9a4a06;
    --nb-concede-pressed: #7d3c05;
    --nb-concede-border-soft: #e2c3a4;
    --nb-concede-disabled: #c9a98c;
    --nb-destructive: #b02a37;
    --nb-destructive-pressed: #8d222c;
    --nb-destructive-disabled: #d8a3a9;

    /* ── Answer marking ──────────────────────────────────────────────────
       The colours a notehead turns once an answer has been marked. Distinct
       from the feedback TEXT colours, which are Bootstrap's success and
       danger.

       NOTE: these measure 3.16:1 and 2.64:1 against white, both under the
       3:1 that WCAG 1.4.11 asks of a graphical object, and they are the
       canonical deuteranopia confusion pair. They are tokenised here at
       their shipped values so the fix has one place to land. */
    --nb-answer-correct: #3da53c;
    --nb-answer-wrong: #f67f09;

    /* ── The animated ground ─────────────────────────────────────────────
       Five stops, sand at both ends so the hundred-second loop closes
       without a seam. */
    --nb-dawn-sand: #f3e1a6;
    --nb-dawn-sky: #95d9fd;
    --nb-dawn-leaf: #b3e1a5;
    --nb-dawn-clay: #e8bf97;

    /* ── Motion ──────────────────────────────────────────────────────────
       The hover lift, written out identically in four places. */
    --nb-lift: transform .2s, box-shadow .2s;
}

/* ── Skip link and the main landmark ──────────────────────────────────────
   Here rather than in style.css because landing.astro sets baseStyle={false}
   and loads no style.css at all — the link rendered there as plain visible
   text above the hero. tokens.css is the one sheet Base emits on every page,
   which is the same reason it exists.
*/
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: .6rem 1rem;
    background: var(--nb-primary);
    color: var(--nb-surface-raised);
    border-radius: 0 0 .75rem 0;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus {
    left: 0;
}

/* The navigation is fixed, so a jump to #main would land under it. */
#main {
    scroll-margin-top: 4rem;

    /* body is `display: flex; flex-direction: column; align-items: center`, so
       a block child does not fill the line — it shrinks to its content and
       centres. On Preferences, whose cards are absolutely positioned by
       Masonry, the content is nearly zero wide, and main collapsed to 24px in
       a 1440px window.

       `body > .navbar` already carries the same width: 100% for the same
       reason. This is the trap the shared stylesheet sets for every new
       full-width element. */
    width: 100%;
}
