/* ============================================================================
   Crafty Captain — tokens + self-hosted faces
   "Cutting mat" (house-design.md override, Stitch direction C; project
   9670125207233415483, design system assets/8017080127575750999, 2026-09-30).
   Paper ground, a deep-green self-healing cutting mat with a measuring grid,
   white project tiles snapped to it, ruler yellow for tick marks only.
   Loads FIRST, before main.css and cc.css.
   ========================================================================= */

/* --- Faces: Baloo 2 (display, 400–800), Nunito (text + UI, 400–800 + italic),
   Space Mono (measurements, 400/700). latin + latin-ext each. */
@font-face {
    font-family: 'Baloo 2';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/baloo-2-400-800-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Baloo 2';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/baloo-2-400-800-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/nunito-italic-400-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Nunito';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/nunito-italic-400-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/nunito-400-800-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/nunito-400-800-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/space-mono-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/space-mono-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/space-mono-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/space-mono-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    /* --- Palette (WCAG contrast, measured) --------------------------------------
       1.2.0 (2026-10-04): green swapped for the old logo captain's blue.
       ink    on paper 14.6 · white 16.0
       meta   on paper  7.0 · white  7.7
       accent (#0A6690) on paper 5.8 · white on accent 6.3 · on tint 5.7  (links, buttons)
       mat (#2BA8D6, the shirt) is a surface only: white on it 2.7, so the
       ruler numbers on the mat are ink (5.9), never white or yellow (1.7).
       white  on tray 12.0 · tray-muted on tray cell 7.4 · ruler yellow on tray 7.6 */
    --cc-paper:       #F6F4EE;
    --cc-card:        #FFFFFF;
    --cc-tint:        #EAF4F9;
    --cc-rule:        #DDD8CC;
    --cc-rule-strong: #BDB6A6;
    --cc-ink:         #1C2321;
    --cc-meta:        #4B5550;
    --cc-green:       #0A6690;   /* the one accent: deep captain blue (text-safe) */
    --cc-green-dark:  #084E6E;
    --cc-on-green:    #FFFFFF;
    --cc-mat:         #2BA8D6;   /* the old logo captain's shirt */
    --cc-mat-ink:     #1C2321;   /* ruler ticks + numbers on the mat */
    --cc-mat-line:    rgba(255,255,255,.10);
    --cc-mat-line-strong: rgba(255,255,255,.22);
    --cc-tray:        #0E3A52;
    --cc-tray-cell:   #164863;
    --cc-tray-muted:  #CFE3EE;
    --cc-sun:         #F2C94C;   /* ruler ticks only */
    --cc-shadow:      0 1px 2px rgba(28,35,33,.08), 0 8px 18px -10px rgba(28,35,33,.30);

    /* --- Type --------------------------------------------------------------------- */
    --cc-display: 'Baloo 2', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --cc-text:    'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --cc-ui:      'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --cc-mono:    'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    --cc-size-body: clamp(1.0625rem, 1.02rem + 0.25vw, 1.1875rem);   /* 17–19px */
    --cc-size-meta: 0.8125rem;
    --cc-lh-body:   1.7;
    --cc-lh-head:   1.12;
    --cc-h1:    clamp(2.125rem, 1.6rem + 1.9vw, 3.25rem);
    --cc-title: clamp(2rem, 1.45rem + 1.8vw, 3rem);
    --cc-h2:    clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
    --cc-h3:    clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);

    /* --- Shape & metrics ----------------------------------------------------------- */
    --cc-radius-sm: 4px;
    --cc-radius:    8px;
    --cc-radius-lg: 12px;
    --cc-page-max:  1200px;
    --cc-sidebar:   304px;
    --cc-side-gap:  2.5rem;
    --cc-gutter:    clamp(1rem, 3vw, 2.5rem);
    --cc-cell:      24px;          /* one grid unit on the mat */
    --cc-tap:       44px;
    --cc-nav-tap:   48px;

    /* --- Bridge to main.css (do not restyle main.css) ------------------------------ */
    --font-size-body-min: 1.0625rem;
    --font-size-body-max: 1.1875rem;
    --font-size-body-fluid: calc(1.02rem + 0.25vw);
    --font-size-h1-min: 2.125rem;
    --font-size-h1-max: 3.25rem;
    --font-size-h1-fluid: calc(1.6rem + 1.9vw);
    --font-size-h2-min: 1.5rem;
    --font-size-h2-max: 2rem;
    --font-size-h2-fluid: calc(1.25rem + 0.9vw);
    --font-size-h3-min: 1.25rem;
    --font-size-h3-max: 1.5rem;
    --font-size-h3-fluid: calc(1.1rem + 0.5vw);
    --font-size-h4-min: 1.125rem;
    --font-size-h4-max: 1.25rem;
    --font-size-h4-fluid: calc(1.05rem + 0.3vw);
    --font-size-h5-min: 1.0625rem;
    --font-size-h5-max: 1.125rem;
    --font-size-h5-fluid: calc(1rem + 0.2vw);
    --font-size-h6-min: 1rem;
    --font-size-h6-max: 1.0625rem;
    --font-size-h6-fluid: calc(0.96rem + 0.12vw);
    --line-height-body: 1.7;
    --line-height-heading: 1.12;
    --color-primary: #0A6690;
    --color-primary-hover: #084E6E;
    --color-heading: #1C2321;
    --color-accent: #0A6690;
    --color-text-dark: #1C2321;
    --color-text-medium: #4B5550;
    --color-text-light: #4B5550;
    --color-background: #F6F4EE;
    --color-background-light: #FFFFFF;
    --color-background-tint: #EAF4F9;
    --color-border: #DDD8CC;
    --color-border-soft: #E6E2D8;
    --color-footer-bg: #0E3A52;
    --color-error: #B42318;
    --color-warning: #8A5A00;
    --font-family-display: 'Baloo 2', 'Nunito', Arial, sans-serif;
    --font-family-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --content-max: 760px;
    --page-max: 1200px;
    --color-border-light: #DDD8CC;
    --color-footer-border: #DDD8CC;
    --color-footer-text: #1C2321;
    --color-copyright: #4B5550;
    --color-facebook: #1C2321; --color-facebook-hover: #0A6690;
    --color-twitter: #1C2321; --color-twitter-hover: #0A6690;
    --color-pinterest: #1C2321; --color-pinterest-hover: #0A6690;
    --color-linkedin: #1C2321; --color-linkedin-hover: #0A6690;
    --color-error-bg: #F9E3E8; --color-error-text: #8A1C12;
    --color-warning-bg: #F6EBD2; --color-warning-text: #6B4600;
    --font-primary: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-heading: 'Baloo 2', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
