/* ============================================================================
   EVIDENCE-BOARD COMPONENT - 2026-05-28 BUILD_SPEC_2
   ----------------------------------------------------------------------------
   Layered above the dossier sheet on bucket pages (smaller bucket-specific
   boards) and on the Services page (16-card wall). Each card:
     - Always-visible FRONT: pin OR tape strip (NOT both) + name + hook line
     - HOVER / TOUCH overlay: reveals bullets + button-styled [ open file ]
     - Single pin OR tape per card; subtle 1-3 deg rotation
   Mobile uses tap-then-tap: first tap reveals overlay, [ open file ] navigates.
   prefers-reduced-motion: instant overlay fade, no transform.
   ============================================================================ */

.cc-board-section {
    margin: 1.75rem 0 2.25rem;
}
.cc-board-section__label {
    font-family: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(28, 24, 20, 0.6);
    margin: 0 0 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed rgba(28, 24, 20, 0.18);
}

.cc-board {
    /* Subtle corkboard surface tone laid over the dossier paper. Kept
       quiet so it reads as a backdrop, not as competing texture. */
    background:
        radial-gradient(circle at 25% 30%, rgba(193, 156, 113, 0.08), transparent 60%),
        radial-gradient(circle at 75% 75%, rgba(120, 90, 60, 0.05), transparent 60%),
        rgba(180, 145, 105, 0.04);
    padding: 1.5rem 1.25rem 1.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem 1.25rem;
    border: 1px solid rgba(28, 24, 20, 0.08);
    border-radius: 2px;
    /* Faint paper-fiber speckle for the corkboard read */
    position: relative;
}
.cc-board::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='c'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4   0 0 0 0 0.28   0 0 0 0 0.18   0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23c)'/></svg>");
    background-size: 220px 220px;
    opacity: 0.35;
    mix-blend-mode: multiply;
    border-radius: inherit;
}

.cc-board--wall {
    /* Services full-wall variant: more columns, denser packing. */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.4rem 1.15rem;
}

/* --- Individual card ----------------------------------------------------- */
.cc-card {
    position: relative;
    display: block;
    /* Each card wears its product's theme palette (surface bg, ink text,
       accent title). The theme classes (.theme-edgar, .theme-cgap, etc.)
       on the card itself set --pt-surface / --pt-ink / --pt-accent, which
       these properties pick up. The fallbacks (cream/oil-black) apply only
       to cards with no theme class. */
    background: var(--pt-surface, #f4f1ea);
    color: var(--pt-ink, #08070a);
    text-decoration: none;
    padding: 1.85rem 1.2rem 1.35rem;
    min-height: 200px;
    box-shadow:
        2px 3px 0 rgba(0, 0, 0, 0.22),
        1px 2px 4px rgba(0, 0, 0, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    /* Subtle hand-pinned rotation; alternate via :nth-child below */
    transform: rotate(-1deg);
}
.cc-card:nth-child(even) { transform: rotate(1.5deg); }
.cc-card:nth-child(3n) { transform: rotate(-0.5deg); }
.cc-card:nth-child(5n) { transform: rotate(2deg); }

.cc-card:hover,
.cc-card:focus-within {
    transform: rotate(0deg) translateY(-3px);
    box-shadow:
        4px 5px 0 rgba(0, 0, 0, 0.32),
        2px 3px 8px rgba(0, 0, 0, 0.25);
    z-index: 3;
}

/* --- Pin OR tape strip (one only) --------------------------------------- */
.cc-card__pin {
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff, var(--tape, #cccccc) 45%, color-mix(in srgb, var(--tape, #cccccc) 70%, #000) 100%);
    box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.35),
        inset 0 -1px 1px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.cc-card__tape {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 64px;
    height: 22px;
    background: var(--tape, #cccccc);
    opacity: 0.85;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.cc-card:nth-child(even) .cc-card__tape {
    transform: translateX(-50%) rotate(2deg);
}

/* Cards that use a pin should NOT have a tape strip, and vice versa. The
   markup picks one; this is just belt-and-suspenders for the visual rule. */
.cc-card__pin + .cc-card__tape,
.cc-card__tape + .cc-card__pin { display: none; }

/* --- Front face (always visible) --------------------------------------- */
.cc-card__title {
    /* Each card's name renders in ITS product's own display font (the app's
       own type), not a generic military stencil. Themed cards pick up
       --pt-display-font from their .theme-X class; unthemed cards fall back to
       a clean condensed sans — still not stencil. Casing is left to the markup
       so each wordmark reads the way the product actually styles it
       (SourceIQ, eTrax, ConManagement, Vector Death, …). */
    font-family: var(--pt-display-font, 'Anton', 'Big Shoulders Display', sans-serif) !important;
    font-weight: 700 !important;
    font-size: 1.6rem !important;
    /* Title uses the theme's accent on its themed surface - high-contrast
       per theme (EDGAR amber on dark navy, CGAP legal-pad on dark navy,
       SourceIQ phosphor on near-black, etc.). Fallback to oil-black for
       unthemed cards. !important needed to outrank .theme-X h3 cascade in
       themes-products.css. */
    color: var(--pt-accent, #08070a) !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
    line-height: 1.1 !important;
    margin: 0.5rem 0 0.7rem !important;
    font-style: normal !important;
}
/* Per-product size corrections — some display fonts read large or small per
   em, mirroring the featured-card tuning in themes-products.css. */
.theme-recon   .cc-card__title { font-size: 2.05rem !important; }                       /* VT323 is small per em */
.theme-drifter .cc-card__title { font-size: 1.2rem !important; letter-spacing: 0 !important; } /* Major Mono is wide */
.theme-roc     .cc-card__title { font-size: 1.45rem !important; }                       /* Cinzel Decorative reads large */
.theme-d20craps .cc-card__title { font-size: 1.4rem !important; }                       /* Limelight stretches */
.theme-conmgmt .cc-card__title { font-size: 1.75rem !important; }
.theme-trench  .cc-card__title { text-transform: uppercase !important; }                /* Big Shoulders Stencil IS its brand */
.cc-card__title--logo {
    /* Brand wordmark stands in for the text title (RiskTape). Drop the
       text-oriented spacing so the image sits flush like a title would. */
    padding: 0 !important;
    margin: 0.4rem 0 0.7rem !important;
    line-height: 0 !important;
}
.cc-card__logo {
    display: block;
    height: 2rem;
    width: auto;
    max-width: 100%;
}
.cc-card__title--redacted {
    /* Censor bar reads as a redaction regardless of card surface (works on
       both dark themes like EDD-i navy and the unthemed cream fallback). */
    background: #1a1a1a !important;
    color: #1a1a1a !important;
    padding: 0 0.5em;
    user-select: none;
    letter-spacing: 0.5em;
}

/* Whiskey card theme — dark blood-red bg, bone-cream ink, gold accent.
   The bottle aesthetic. The tape color stays the inline-set red. */
.theme-whiskey {
    --pt-bg: #1a050a;
    --pt-surface: #2a0810;
    --pt-ink: #f0e0c0;
    --pt-ink-dim: #c8a578;
    --pt-accent: #d4af37;
    --pt-accent-2: #c8302e;
}
.cc-card__hook {
    font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif !important;
    font-size: 1.05rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    /* Hook reads in the theme's ink-dim (or ink) on the themed surface bg.
       Fallback to dark oil-ink for unthemed cards. */
    color: var(--pt-ink-dim, var(--pt-ink, #1a1612)) !important;
    font-style: normal !important;
    margin: 0 !important;
}

/* --- Overlay (reveal on hover/tap) ------------------------------------- */
.cc-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 7, 10, 0.94);
    color: #f0e8d8;
    padding: 1rem 1rem 1.05rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 220ms ease;
    transform: translateY(8px);
    display: flex;
    flex-direction: column;
    z-index: 4;
    overflow-y: auto;
}
.cc-card:hover .cc-card__overlay,
.cc-card:focus-within .cc-card__overlay,
.cc-card.is-revealed .cc-card__overlay {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.cc-card__bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
}
.cc-card__bullets li {
    font-family: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
    color: #e0d8c8;
    padding-left: 0.8rem;
    position: relative;
}
.cc-card__bullets li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--tape, #fac638);
    font-weight: 800;
}
.cc-card__action {
    display: inline-block;
    margin-top: auto;
    padding: 0.5rem 0.85rem;
    background: var(--tape, var(--tt-caution, #fac638));
    color: #08070a;
    font-family: 'Anton', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    border: 2px solid #08070a;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
    align-self: flex-start;
}
.cc-card__action:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}
.cc-card__action--external::after {
    content: " \2197";
    font-size: 0.8em;
}
.cc-card__action--locked {
    background: transparent;
    color: #c0c8d6;
    border-color: rgba(192, 200, 214, 0.4);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- prefers-reduced-motion: instant fade, no transform ----------------- */
@media (prefers-reduced-motion: reduce) {
    .cc-card,
    .cc-card:nth-child(n) { transform: none !important; transition: none !important; }
    .cc-card:hover,
    .cc-card:focus-within { transform: none !important; }
    .cc-card__overlay {
        transition: opacity 80ms linear !important;
        transform: none !important;
    }
    .cc-card__action:hover { transform: none !important; }
}

/* --- Responsive: collapse to single column on phones ------------------- */
@media (max-width: 640px) {
    .cc-board,
    .cc-board--wall {
        grid-template-columns: 1fr;
        gap: 1.1rem;
        padding: 1rem 0.85rem 1.25rem;
    }
    .cc-card,
    .cc-card:nth-child(n) { transform: rotate(0deg); }
}

/* ============================================================================
   CARD → FULL-WINDOW MODAL  (2026-06-22)
   ----------------------------------------------------------------------------
   Clicking a card no longer flips to a cramped in-card "back side". Instead
   evidence-board.js opens a centered, readable modal populated from the card's
   (now hidden) overlay content. The card keeps its theme class, so the modal
   inherits the product's palette + display font. Close → pick another card.
   ============================================================================ */

/* The in-card overlay is now a hidden CONTENT SOURCE for the modal, not a
   hover reveal. Kept in the DOM (JS reads it); never shown in place. */
.cc-card__overlay { display: none !important; }

.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(1rem, 5vh, 4rem) 1rem;
    overflow-y: auto;
}
.cc-modal.is-open { display: flex; }
.cc-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 7, 10, 0.82);
    backdrop-filter: blur(2px);
}
.cc-modal__panel {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    margin: auto 0;
    background: var(--pt-surface, #14110f);
    color: var(--pt-ink, #f0e8d8);
    border: 1px solid rgba(240, 232, 216, 0.14);
    border-top: 4px solid var(--tape, var(--pt-accent, #fac638));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    padding: 2.4rem 2rem 2rem;
    border-radius: 3px;
}
.cc-modal__close {
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--pt-ink, #f0e8d8);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0.25rem 0.5rem;
}
.cc-modal__close:hover,
.cc-modal__close:focus-visible { opacity: 1; }
.cc-modal__title {
    font-family: var(--pt-display-font, 'Anton', sans-serif);
    color: var(--pt-accent, var(--pt-ink, #f0e8d8));
    font-size: 2.4rem;
    line-height: 1.05;
    margin: 0 0 0.4rem;
    word-break: break-word;
}
.cc-modal__title--logo { line-height: 0; margin-bottom: 0.9rem; }
.cc-modal__title img {
    height: 2.6rem;
    width: auto;
    max-width: 100%;
    display: block;
}
.cc-modal__hook {
    font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--pt-ink, #f0e8d8);
    margin: 0 0 1.2rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px dashed rgba(240, 232, 216, 0.2);
}
/* Full prose writeup — the product's single home for the long story. The
   intro paragraph reads as body; each <strong>-led paragraph is a point. */
.cc-modal__writeup {
    margin: 0 0 1.5rem;
}
.cc-modal__writeup p {
    font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--pt-ink-dim, rgba(240, 232, 216, 0.85));
    margin: 0 0 0.9rem;
}
.cc-modal__writeup p:last-child { margin-bottom: 0; }
.cc-modal__writeup strong {
    color: var(--pt-accent, var(--pt-ink, #f0e8d8));
    font-weight: 700;
}
.cc-modal__writeup a {
    color: var(--tape, var(--pt-accent, #fac638));
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cc-modal__bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.cc-modal__bullets li {
    font-family: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--pt-ink-dim, rgba(240, 232, 216, 0.85));
    padding-left: 1rem;
    position: relative;
}
.cc-modal__bullets li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--tape, var(--pt-accent, #fac638));
    font-weight: 800;
}
.cc-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.cc-modal__action {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    background: var(--tape, var(--pt-accent, #fac638));
    color: #08070a;
    font-family: 'Anton', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #08070a;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
.cc-modal__action:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5); }
.cc-modal__action--external::after { content: " \2197"; font-size: 0.8em; }
.cc-modal__action--locked {
    background: transparent;
    color: var(--pt-ink-dim, rgba(240, 232, 216, 0.7));
    border: 1px dashed rgba(240, 232, 216, 0.35);
    box-shadow: none;
    cursor: default;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    padding: 0.55rem 1rem;
}
body.cc-modal-open { overflow: hidden; }

@media (max-width: 640px) {
    .cc-modal__panel { padding: 2.1rem 1.25rem 1.5rem; }
    .cc-modal__title { font-size: 1.9rem; }
    .cc-modal__hook { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .cc-modal__backdrop { backdrop-filter: none; }
    .cc-modal__action:hover { transform: none; }
}
