/* ============================================================================
   Clues About You — v1.20 — "the case file"
   Theme: a detective's desk in a night clinic. Deep slate-teal field with a
   faint fingerprint whorl (identity as evidence — the project's honest
   motif); work happens on cool clinical chart paper with ruled lines.
   Typewriter type (Courier Prime) carries everything evidentiary — clue
   words, chart fields, headings — with Public Sans for the interface.
   Each of the student's 5–7 words carries ONE of seven clue colors
   everywhere it appears: under the lens, in the chips, on the chart, in
   the symptom log, and in print.
     clue colors (ink, on paper)  --t1..--t7
     clue colors (light, on dark) --t1L..--t7L  (scoped overrides below)
   Fonts: Courier Prime (evidence + headings) · Public Sans (interface).
   ========================================================================= */

:root {
    --field:  #0d1c21;
    --field2: #13262d;
    --paper:  #f7f9f6;
    --paper2: #edf2ec;
    --paperedge: #d2ddd3;
    --ink:  #1b2421;
    --ink2: #48564f;
    --teal:  #37b59f;
    --tealL: #63d9c4;
    --tealdeep: #1e7f6f;
    --red:  #cd4747;
    --redL: #ff8f8f;
    --mut:  #9db4ae;
    --mut2: #6d8680;

    --t1: #b13434;  --t1L: #ff9494;
    --t2: #bd5c1c;  --t2L: #ffb066;
    --t3: #8f7310;  --t3L: #e8cd66;
    --t4: #2c7d51;  --t4L: #7fd8a4;
    --t5: #1f7290;  --t5L: #6fd0ea;
    --t6: #3c5cab;  --t6L: #98b2f8;
    --t7: #7c48a3;  --t7L: #d0a0f0;

    --mono: 'Courier Prime', 'Courier New', monospace;
    --sans: 'Public Sans', 'Segoe UI', sans-serif;
}

/* the retheme trap: any id display rule would beat [hidden] without this */
[hidden] { display: none !important; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font: 400 1rem/1.6 var(--sans);
    color: #e9f2ef;
    background-color: var(--field);
    /* the whorl: a fingerprint in faint teal, top right — identity as evidence */
    background-image:
        linear-gradient(rgba(13, 28, 33, .45), rgba(13, 28, 33, .88)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%236ad4bd' stroke-opacity='.30' stroke-width='3' stroke-linecap='round' transform='rotate(-22 200 200)'%3E%3Cellipse cx='200' cy='200' rx='18' ry='24' stroke-dasharray='70 18'/%3E%3Cellipse cx='200' cy='200' rx='34' ry='43' stroke-dasharray='120 24 60 16'/%3E%3Cellipse cx='200' cy='200' rx='50' ry='63' stroke-dasharray='90 20 140 18'/%3E%3Cellipse cx='200' cy='200' rx='66' ry='83' stroke-dasharray='200 26 80 20'/%3E%3Cellipse cx='200' cy='200' rx='82' ry='103' stroke-dasharray='150 22 180 24'/%3E%3Cellipse cx='200' cy='200' rx='98' ry='123' stroke-dasharray='260 28 120 22'/%3E%3Cellipse cx='200' cy='200' rx='114' ry='143' stroke-dasharray='180 24 240 26'/%3E%3Cellipse cx='200' cy='200' rx='130' ry='163' stroke-dasharray='320 30 160 24'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center, right -140px top -100px;
    background-size: cover, 760px 760px;
    background-attachment: fixed, fixed;
}

/* ── Topbar ────────────────────────────────────────────────────────────── */
.cay-topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 8px 18px;
    background: rgba(13, 28, 33, .88);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    border-bottom: 1px solid rgba(55, 181, 159, .30);
}
.cay-owl img { display: block; }
.cay-wordmark {
    font: 700 1.22rem/1 var(--mono);
    color: #eef6f2; text-decoration: none; letter-spacing: .02em;
    white-space: nowrap;
}
.cay-wordmark b { font-style: italic; font-weight: 700; color: var(--tealL); }
.cay-ver {
    font: 600 .62rem/1 var(--sans); font-style: normal;
    color: var(--mut2); margin-left: 7px; letter-spacing: .08em;
    vertical-align: 2px;
}
.cay-modes {
    display: flex; margin-left: 14px; overflow: hidden;
    border: 1px solid rgba(55, 181, 159, .42); border-radius: 999px;
}
.cay-mode {
    padding: 7px 15px; text-decoration: none;
    font: 600 .72rem/1 var(--sans); letter-spacing: .14em; color: var(--mut);
    transition: background .18s ease, color .18s ease;
}
.cay-mode:hover { color: #eef6f2; }
.cay-mode.is-on { background: rgba(55, 181, 159, .18); color: #eef6f2; }
/* paper mode: the digital step rail and Save make no sense — hide them */
body.cay-paper .cay-steps, body.cay-paper #SaveButton { display: none; }
.cay-steps { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.cay-step {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; border-radius: 8px;
    font: 600 .78rem/1 var(--sans); letter-spacing: .12em;
    color: var(--mut); text-decoration: none;
    border: 1px solid transparent;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.cay-step:hover { color: #eef6f2; background: rgba(255, 255, 255, .05); }
.cay-step.is-active {
    color: #eef6f2; border-color: rgba(55, 181, 159, .55);
    background: rgba(55, 181, 159, .10);
}
.cay-step.is-locked { opacity: .42; }
.cay-step.is-locked::after { content: "🔒"; font-size: .7rem; }
.cay-stepnum {
    display: inline-grid; place-items: center;
    width: 19px; height: 19px; border-radius: 50%;
    font: 700 .68rem/1 var(--sans); color: #0d1c21;
}
.cay-stepnum.n1 { background: var(--tealL); }
.cay-stepnum.n2 { background: var(--t3L); }
.cay-stepnum.n3 { background: var(--redL); }
.cay-sep { width: 1px; height: 20px; background: rgba(55, 181, 159, .35); margin: 0 5px; }
.cay-actions { display: flex; align-items: center; gap: 10px; }
.cay-login {
    font: 600 .74rem/1 var(--sans); letter-spacing: .1em;
    color: var(--mut); text-decoration: none;
}
.cay-login:hover { color: #eef6f2; }
/* confirmed signed out: the page is open to everyone, so this is the only
   cue that there IS a way to save to your own file — muted grey text alone
   read as decoration and students walked past it */
.cay-login.is-signedout {
    padding: 6px 13px; border-radius: 999px;
    border: 1px solid rgba(55, 181, 159, .55); color: #cfe4dd;
}
.cay-login.is-signedout:hover { background: rgba(55, 181, 159, .14); color: #eef6f2; }
/* signed in: the slot holds a NAME, not a link — the label letter-spacing
   that suits "LOG IN" reads as an air-gapped mess on a real name, and there
   is nowhere to click through to. owlet.js sits its owl in front of it. */
.cay-login.is-signedin {
    display: inline-flex; align-items: center;
    font: 600 .86rem/1 var(--mono); letter-spacing: .01em;
    color: #dfece7; cursor: default; white-space: nowrap;
}
.cay-login.is-signedin:hover { color: #dfece7; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.cay-btn {
    display: inline-block; cursor: pointer;
    padding: 9px 18px; border-radius: 9px; border: 1px solid rgba(55, 181, 159, .5);
    font: 600 .8rem/1 var(--sans); letter-spacing: .09em;
    color: #eef6f2; background: transparent; text-decoration: none;
    transition: background .18s ease, transform .12s ease;
}
.cay-btn:hover { background: rgba(55, 181, 159, .12); }
.cay-btn--primary {
    background: linear-gradient(160deg, var(--tealL), var(--teal) 55%, var(--tealdeep));
    border-color: transparent; color: #06211c;
}
.cay-btn--primary:hover { background: linear-gradient(160deg, #83e6d3, var(--teal) 60%, var(--tealdeep)); transform: translateY(-1px); }
.cay-btn:active { transform: translateY(0) scale(.98); }

/* ── Main / parts ──────────────────────────────────────────────────────── */
.cay-main { max-width: 1080px; margin: 0 auto; padding: 34px 20px 70px; }
.cay-part { margin-bottom: 26px; }
.cay-parthead { max-width: 760px; margin: 6px auto 26px; text-align: center; }
.cay-eyebrow {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 0 0 6px; font: 600 .72rem/1 var(--sans);
    letter-spacing: .22em; text-transform: uppercase; color: var(--teal);
}
.cay-eyebrow svg { flex: 0 0 auto; }
.cay-parthead h2 {
    margin: 0 0 12px; font: 700 2.1rem/1.15 var(--mono);
    color: #f0f7f3; letter-spacing: .01em;
}
.cay-guide { margin: 0; color: var(--mut); font-size: .95rem; }
.cay-guide b, .cay-guide a { color: #dfece7; }
.cay-guide a { color: var(--tealL); }

/* ── The case panel (the lens is the centerpiece) ──────────────────────── */
.cay-casepanel {
    position: relative; overflow: hidden;
    margin: 0 0 26px; padding: 30px 28px 26px;
    border: 1px solid rgba(55, 181, 159, .32); border-radius: 16px;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(55, 181, 159, .10), transparent 55%),
        repeating-linear-gradient(0deg, transparent 0 23px, rgba(99, 217, 196, .045) 23px 24px),
        repeating-linear-gradient(90deg, transparent 0 23px, rgba(99, 217, 196, .045) 23px 24px),
        linear-gradient(170deg, rgba(20, 42, 48, .94), rgba(13, 26, 31, .96));
    text-align: center;
}
.cay-casepanel--tight { padding: 22px 24px 20px; }
.cay-lens svg {
    display: block; margin: 0 auto;
    width: min(100%, 440px); height: auto;
}
.cay-casepanel--tight .cay-lens svg { width: min(100%, 390px); }
/* a newly added clue pops into the lens */
.cay-lens text.is-new {
    animation: cayWordIn .7s cubic-bezier(.2, .9, .3, 1.2) both;
    transform-box: fill-box; transform-origin: center;
}
@keyframes cayWordIn {
    from { opacity: 0; transform: translateY(14px) scale(.8); }
    to   { opacity: 1; transform: none; }
}
.cay-casecap {
    max-width: 640px; margin: 18px auto 0;
    font-size: .8rem; color: var(--mut2); line-height: 1.65;
}
.cay-casecap b { color: var(--mut); }

/* paper-context clue colors (chips, chart, print) */
.t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); }
.t4 { color: var(--t4); } .t5 { color: var(--t5); } .t6 { color: var(--t6); }
.t7 { color: var(--t7); }
/* dark-context clue colors (symptom log rail) */
.cay-logside .t1 { color: var(--t1L); }
.cay-logside .t2 { color: var(--t2L); }
.cay-logside .t3 { color: var(--t3L); }
.cay-logside .t4 { color: var(--t4L); }
.cay-logside .t5 { color: var(--t5L); }
.cay-logside .t6 { color: var(--t6L); }
.cay-logside .t7 { color: var(--t7L); }

/* ── Part 1 entry card (chart paper) ───────────────────────────────────── */
.cay-entry {
    max-width: 720px; margin: 0 auto;
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(30, 127, 111, .07) 27px 28px),
        linear-gradient(178deg, var(--paper), var(--paper2));
    border: 1px solid var(--paperedge); border-radius: 14px;
    padding: 22px 26px 20px; color: var(--ink);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.cay-entry label { display: block; font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); margin-bottom: 9px; }
.cay-entryrow { display: flex; gap: 10px; }
#WordInput, #FutureInput {
    flex: 1 1 auto; min-width: 0;
    font: 700 1.15rem/1.3 var(--mono); font-style: italic; color: var(--ink);
    background: rgba(255, 255, 255, .6);
    border: none; border-bottom: 2px solid var(--tealdeep); border-radius: 6px 6px 0 0;
    padding: 8px 12px; outline: none;
}
#WordInput:focus, #FutureInput:focus { background: rgba(255, 255, 255, .9); }
#WordInput::placeholder, #FutureInput::placeholder { color: #93a89f; font-size: .95rem; font-weight: 400; }
.cay-catlabel {
    margin: 16px 0 7px; font: 600 .72rem/1 var(--sans);
    letter-spacing: .12em; text-transform: uppercase; color: var(--ink2);
}
.cay-catlabel em {
    font-style: normal; font-weight: 700; color: var(--tealdeep);
    letter-spacing: .1em;
}
.cay-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
/* ADD was pressed with no kind chosen — draw the eye to the pills */
.cay-cats.is-asking .cay-cat {
    border-color: var(--red); color: var(--ink);
    animation: cayAsk .5s ease 2;
}
@keyframes cayAsk {
    0%, 100% { transform: none; }
    30% { transform: translateY(-3px); }
    60% { transform: none; }
}
.cay-cat {
    cursor: pointer; padding: 6px 13px; border-radius: 999px;
    border: 1px solid #b4c6bb; background: transparent;
    font: 600 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink2);
    transition: background .15s ease, border-color .15s ease;
}
.cay-cat:hover { border-color: var(--tealdeep); }
.cay-cat.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cay-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cay-chip {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 10px 7px 13px; border-radius: 10px;
    background: rgba(255, 255, 255, .55); border: 1px solid #c4d4c9;
    border-left: 4px solid currentColor;
    animation: cayChipIn .35s ease both;
}
@keyframes cayChipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* the word is a BUTTON now (click to retype it), stripped back to looking
   like the plain text it replaced — only the cursor gives it away */
.cay-chip .w {
    font: 700 1.05rem/1.1 var(--mono); font-style: italic;
    cursor: pointer; border: none; background: transparent; color: inherit;
    padding: 1px 3px; margin-left: -3px; border-radius: 5px; text-align: left;
    transition: background .15s ease;
}
.cay-chip .w:hover { background: rgba(30, 127, 111, .12); }
/* the kind is a live <select>, styled down to look like the label it replaced
   — the caret is the only hint that it can be changed, which is enough */
.cay-chip select.c {
    -webkit-appearance: none; appearance: none;
    display: inline-block; max-width: 100%; cursor: pointer;
    border: 1px solid transparent; background-color: transparent; border-radius: 5px;
    font: 600 .6rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink2); padding: 2px 15px 2px 5px; margin-left: -5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2348564f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center; background-size: 7px;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.cay-chip select.c:hover { background-color: rgba(30, 127, 111, .12); color: var(--ink); }
.cay-chip select.c:focus { outline: none; border-color: var(--tealdeep); background-color: rgba(30, 127, 111, .12); color: var(--ink); }
.cay-chip select.c option { font: 400 .85rem/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
/* scoped to .x — when this was a bare `.cay-chip button` it also captured the
   word button and painted it remove-red on hover */
.cay-chip .x {
    cursor: pointer; border: none; background: transparent; color: var(--ink2);
    font: 600 .9rem/1 var(--sans); padding: 2px 4px; border-radius: 5px;
}
.cay-chip .x:hover { color: var(--t1); background: rgba(177, 52, 52, .12); }
.cay-count { margin: 14px 0 0; font-size: .82rem; color: var(--ink2); }
.cay-count.is-good { color: var(--t4); font-weight: 600; }
/* ── Part 1 spelling: flagged tile, inline editor, hint rows ───────────────
   Deliberately quiet — amber, never red: a flagged clue is a question, not
   an error, and "spelled right" sits beside the fixes because plenty of real
   clues (familia, abuela, a nickname) belong in no dictionary. */
.cay-chip .w.is-bad {
    text-decoration: underline wavy var(--t2);
    text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}
.cay-chip .wedit {
    font: 700 1.05rem/1.1 var(--mono); font-style: italic; color: var(--ink);
    width: 7.5em; max-width: 100%;
    background: #fff; border: 1px solid var(--tealdeep); border-radius: 6px;
    padding: 1px 6px; outline: none;
}
.cay-spellhint { margin-top: 14px; }
.cay-spellcap {
    margin: 0 0 8px; font: 600 .72rem/1.45 var(--sans);
    letter-spacing: .04em; color: var(--t2);
}
.cay-spellrow {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    margin: 0 0 7px;
}
.cay-spellrow .is-bad {
    font: 700 1rem/1.2 var(--mono); font-style: italic; color: var(--ink2);
    text-decoration: underline wavy var(--t2); text-underline-offset: 3px;
    margin-right: 2px;
}
.cay-spellrow button {
    cursor: pointer; border-radius: 999px; padding: 5px 12px;
    font: 700 .82rem/1 var(--mono); font-style: italic;
    border: 1px solid var(--t2); background: rgba(255, 255, 255, .7); color: var(--t2);
    transition: background .15s ease, color .15s ease;
}
.cay-spellrow button:hover { background: var(--t2); color: #fff; }
.cay-spellrow .sp-ok {
    margin-left: auto; font: 600 .66rem/1 var(--sans); font-style: normal;
    letter-spacing: .08em; text-transform: uppercase;
    border-color: #b4c6bb; color: var(--ink2); background: transparent;
}
.cay-spellrow .sp-ok:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.cay-future { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #c4d4c9; }
.cay-futurenote { margin: 10px 0 0; font-size: .78rem; color: var(--ink2); line-height: 1.6; }
/* the end of Part 1 — students finished the career field and had no idea
   the next move was the RANK tab, so give the step an actual door */
.cay-checkbar {
    margin-top: 20px; padding-top: 18px; border-top: 2px solid #cfdcd2;
    text-align: center;
}
.cay-check { font-size: .92rem; padding: 13px 30px; letter-spacing: .11em; }
.cay-check:disabled { opacity: .6; cursor: default; }
.cay-checknote {
    margin: 9px 0 0; font-size: .76rem; line-height: 1.55; color: var(--ink2);
}
.cay-checknote b { color: var(--ink); }

/* ── Part 2: rank the evidence ─────────────────────────────────────────── */
.cay-orderlist { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cay-orow {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 10px;
    background: rgba(255, 255, 255, .55); border: 1px solid #c4d4c9;
    transition: transform .18s ease;
}
.cay-orow.is-dragging {
    transition: none; position: relative; z-index: 5;
    background: #fdfffb; box-shadow: 0 12px 28px rgba(0, 0, 0, .30);
}
.cay-orow .grip {
    cursor: grab; touch-action: none; user-select: none;
    color: #9fb3a7; font: 700 1.05rem/1 var(--sans); letter-spacing: -2px;
    padding: 4px 6px 4px 2px;
}
.cay-orow.is-dragging .grip { cursor: grabbing; }
.cay-orow .rrank {
    min-width: 1.3em; text-align: center;
    font: 700 1.3rem/1 var(--mono); color: var(--tealdeep);
}
.cay-orow .rword { font: 700 1.15rem/1.2 var(--mono); font-style: italic; }
.cay-orow .rcat {
    margin-left: auto; font: 600 .62rem/1 var(--sans);
    letter-spacing: .1em; text-transform: uppercase; color: var(--ink2);
}
.cay-orow .rbtns { display: flex; gap: 4px; }
.cay-orow .rbtns button {
    cursor: pointer; border: 1px solid #b4c6bb; background: transparent;
    border-radius: 6px; padding: 3px 8px; color: var(--ink2); font-size: .72rem;
}
.cay-orow .rbtns button:hover:not(:disabled) { border-color: var(--tealdeep); color: var(--ink); }
.cay-orow .rbtns button:disabled { opacity: .3; cursor: default; }
.cay-ordernote { margin: 12px 0 0; font-size: .8rem; color: var(--ink2); }
.cay-orderbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }

/* ── Part 3: the medical chart + symptom log ───────────────────────────── */
.cay-chartgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.cay-chart {
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(30, 127, 111, .06) 27px 28px),
        linear-gradient(178deg, var(--paper), var(--paper2));
    border: 1px solid var(--paperedge); border-radius: 14px;
    padding: 0 0 26px; color: var(--ink); overflow: hidden;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.ch-band {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(90deg, #14332e, #1e514a);
    color: #d9efe9; padding: 10px 22px;
    font: 700 .74rem/1 var(--mono); letter-spacing: .24em; text-transform: uppercase;
}
.ch-band span:last-child { color: var(--tealL); }
.ch-fields {
    display: flex; flex-wrap: wrap; gap: 14px 26px;
    padding: 18px 22px 4px;
}
.ch-f { display: flex; flex-direction: column; gap: 2px; }
.ch-f .fl {
    font: 600 .58rem/1 var(--sans); letter-spacing: .16em;
    text-transform: uppercase; color: var(--ink2);
}
.ch-f .fv {
    font: 700 1.02rem/1.4 var(--mono); color: var(--ink);
    border: none; border-bottom: 1.5px dotted #9fb3a7; border-radius: 0;
    background: transparent; outline: none; padding: 1px 2px; min-width: 2.2em;
}
input.ch-f-name { width: 13em; }
input.ch-f-per { width: 3.5em; }
.ch-f .fv--set { border-bottom-color: transparent; color: var(--tealdeep); }
.ch-f input.fv:focus { border-bottom-color: var(--tealdeep); background: rgba(255, 255, 255, .7); }
.ch-cc {
    margin: 12px 22px 0; font: 400 .85rem/1.5 var(--sans); color: var(--ink2);
}
.ch-cc b { font: 700 .74rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.ch-symhead {
    margin: 18px 22px 4px; padding-top: 14px; border-top: 2px solid #cfdcd2;
    font: 700 .82rem/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.ch-symhead span { font: 400 .76rem/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink2); }
.ch-symhead span b { color: var(--ink); }
.ch-symp { padding: 10px 22px 4px; }
.ch-symp + .ch-symp { border-top: 1px dashed #cfdcd2; }
.ch-symp .sh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch-symp .rank {
    font: 700 .95rem/1.3 var(--mono); color: var(--tealdeep); min-width: 1.2em;
}
.ch-symp .w { font: 700 1.2rem/1.3 var(--mono); font-style: italic; }
.ch-symp .cat { font: 600 .6rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.ch-symp .stat { margin-left: auto; font: 600 .68rem/1.3 var(--sans); letter-spacing: .08em; color: #9fb3a7; }
.ch-symp .stat.is-part { color: var(--t2); }
.ch-symp .stat.is-done { color: var(--tealdeep); }
.ch-symp textarea {
    display: block; width: 100%; margin-top: 4px;
    font: 400 .95rem/1.65 var(--mono); color: var(--ink);
    background: transparent; border: none; outline: none; resize: none;
    overflow: hidden; min-height: 58px; padding: 2px 2px 6px 1.6em;
}
.ch-symp textarea::placeholder { color: #9fb3a7; font-style: italic; }
.ch-symp textarea:focus { background: rgba(255, 255, 255, .55); border-radius: 6px; }
/* spelling fixes offered under a symptom's explanation */
.ch-spell { display: none; }
.ch-spell.is-on {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin: 2px 0 6px 1.6em;
}
.ch-spell .sp-q {
    font: 600 .6rem/1 var(--sans); letter-spacing: .14em;
    text-transform: uppercase; color: var(--t2);
}
.ch-spell .sp-fix {
    cursor: pointer; border-radius: 999px; padding: 3px 10px;
    border: 1px solid rgba(189, 92, 28, .45); background: rgba(189, 92, 28, .08);
    font: 400 .74rem/1.3 var(--mono); color: var(--ink2);
    transition: background .15s ease, color .15s ease;
}
.ch-spell .sp-fix b { color: var(--t2); }
.ch-spell .sp-fix:hover { background: var(--t2); color: #fff; }
.ch-spell .sp-fix:hover b { color: #fff; }
.ch-empty { margin: 16px 22px 6px; font-size: .85rem; color: var(--ink2); }
.cay-logside {
    position: sticky; top: 84px;
    border: 1px solid rgba(55, 181, 159, .32); border-radius: 14px;
    background: linear-gradient(170deg, rgba(20, 42, 48, .94), rgba(13, 26, 31, .96));
    padding: 18px 20px 20px;
}
.cay-logside .cay-eyebrow { justify-content: flex-start; margin-bottom: 12px; }
#SymptomLog { list-style: none; margin: 0 0 14px; padding: 0; }
#SymptomLog li {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 2px; border-bottom: 1px dashed rgba(55, 181, 159, .16);
    font: 700 1.02rem/1.2 var(--mono); font-style: italic;
    opacity: .5; transition: opacity .3s ease;
}
#SymptomLog li.is-used { opacity: 1; }
#SymptomLog .dot {
    flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid currentColor; background: transparent;
    transition: background .3s ease, box-shadow .3s ease;
}
#SymptomLog li.is-used .dot { background: currentColor; box-shadow: 0 0 10px currentColor; }
#SymptomLog .st { margin-left: auto; font: 600 .7rem/1 var(--sans); letter-spacing: .1em; color: var(--mut2); font-style: normal; }
#SymptomLog li.is-used .st { color: var(--t4L); }
.cay-progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
#LogProgressBar {
    height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, var(--tealdeep), var(--teal), var(--tealL));
    transition: width .45s cubic-bezier(.3, .8, .3, 1);
}
#LogProgressText { margin: 9px 0 0; font-size: .78rem; color: var(--mut); }
#LogProgressText.is-done { color: var(--tealL); font-weight: 600; }
.cay-logside.is-done { border-color: rgba(99, 217, 196, .65); box-shadow: 0 0 34px rgba(55, 181, 159, .20); }
.cay-help { display: block; width: 100%; margin-top: 16px; text-align: center; }
.cay-helpnote { margin: 8px 0 0; font-size: .72rem; line-height: 1.45; color: var(--mut2); text-align: center; }

/* ── Sentence-starter modal ────────────────────────────────────────────────
   Hand-rolled: this page loads no Bootstrap, so the dialog brings its own
   backdrop, scroll lock and Esc handling. It wears the chart's own paper +
   record-band styling, because it is read while writing the chart. */
.cay-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cay-modal-back { position: absolute; inset: 0; background: rgba(6, 16, 19, .72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cay-modal-card {
    position: relative; z-index: 1;
    width: min(100%, 760px); max-height: min(88vh, 900px);
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 14px; border: 1px solid var(--paperedge);
    background: linear-gradient(178deg, var(--paper), var(--paper2));
    color: var(--ink); box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
    animation: cayModalIn .22s cubic-bezier(.2, .9, .3, 1.1) both;
}
@keyframes cayModalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.cay-modal-band {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(90deg, #14332e, #1e514a); color: #d9efe9; padding: 10px 14px 10px 22px;
    font: 700 .74rem/1 var(--mono); letter-spacing: .24em; text-transform: uppercase;
}
.cay-modal-x {
    cursor: pointer; border: none; background: transparent; color: #9dc4bb;
    font: 600 1rem/1 var(--sans); padding: 5px 9px; border-radius: 6px;
}
.cay-modal-x:hover { background: rgba(255, 255, 255, .12); color: #eef6f2; }
.cay-modal-body { flex: 1 1 auto; overflow-y: auto; padding: 20px 26px 6px; }
.cay-modal-body h3 { margin: 0 0 6px; font: 700 1.5rem/1.2 var(--mono); color: var(--ink); }
.cay-modal-lead { margin: 0 0 16px; font-size: .86rem; line-height: 1.6; color: var(--ink2); }
.cay-modal-lead b { color: var(--ink); }
.cay-stgroup {
    margin: 16px 0 6px; padding-top: 10px; border-top: 1px solid #cfdcd2;
    font: 700 .68rem/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--tealdeep);
}
.cay-starters { margin: 0; padding-left: 1.9em; columns: 2; column-gap: 30px; }
.cay-starters li {
    break-inside: avoid; margin-bottom: 7px;
    font: 400 .92rem/1.55 var(--mono); color: var(--ink);
}
.cay-starters li::marker { color: #9fb3a7; font-size: .8em; }
.cay-modal-foot {
    flex: 0 0 auto; padding: 14px 26px 18px; text-align: center;
    border-top: 1px solid #cfdcd2; background: rgba(255, 255, 255, .45);
}
.cay-modal-foot .cay-btn { color: #06211c; }
body.cay-locked { overflow: hidden; }
@media (max-width: 640px) {
    .cay-starters { columns: 1; }
    .cay-modal-body { padding: 16px 18px 6px; }
}

/* ── Print preview ─────────────────────────────────────────────────────── */
.cay-toolrow { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cay-hint { font-size: .82rem; color: var(--mut); max-width: 480px; }
.cay-hint.is-warn { color: var(--t2L); }
.cay-hint.is-done { color: var(--tealL); font-weight: 600; }
.cay-sheets { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.cay-sheet {
    width: min(100%, 8.3in); min-height: 10.6in;
    background: #fcfdfa; color: var(--ink);
    border: 1px solid var(--paperedge); border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    padding: .85in .9in; position: relative;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.cay-sheet .mast { text-align: center; margin-bottom: 20px; }
.cay-sheet .mast h1 { margin: 0; font: 700 2.2rem/1.1 var(--mono); color: var(--ink); }
.cay-sheet .mast h1 i { color: var(--tealdeep); }
.cay-rule { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; max-width: 4.6in; color: var(--tealdeep); font: 700 1rem/1 var(--mono); }
.cay-rule::before, .cay-rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--tealdeep)); }
.cay-rule::after { background: linear-gradient(90deg, var(--tealdeep), transparent); }
/* the case line reads as one phrase — muted "the case of" snug against the
   name, centered as a unit. field-sizing lets the input hug its text
   (Chrome 123+); the fallback keeps it modest and left-aligned. */
.cay-byline {
    display: flex; justify-content: center; align-items: baseline; gap: 9px;
    margin: 0 0 10px; font: italic 400 .92rem/1.3 var(--mono); color: #7d9187;
}
.cay-sheetname {
    font: 700 1.3rem/1.3 var(--mono); font-style: italic; color: var(--ink);
    background: transparent; border: none; outline: none; padding: 0;
    text-align: left; min-width: .8in;
    field-sizing: content;
}
/* the glass is the poster — it takes the full width of the sheet, and the
   masthead/byline/footer are all that share the page with it */
.cay-printlens svg { display: block; width: 100%; height: auto; margin: 0 auto; }
/* the printed chart (sheet 2) */
.chp-band {
    background: #16413b; color: #e4f3ee; text-align: center;
    padding: 8px 14px; margin-bottom: 18px;
    font: 700 .78rem/1.4 var(--mono); letter-spacing: .26em; text-transform: uppercase;
}
.chp-fields { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 6px; }
.chp-fields .f { font: 400 .78rem/1.6 var(--sans); color: var(--ink2); }
.chp-fields .f b { font: 600 .62rem/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-right: 6px; }
.chp-fields .fv { font: 700 .95rem/1.4 var(--mono); color: var(--ink); }
.chp-fields .fv.is-blank { display: inline-block; min-width: 1.6in; border-bottom: 1.5px dotted #9fb3a7; height: 1em; vertical-align: bottom; }
.chp-fields .fv--set { color: var(--tealdeep); }
.chp-cc { margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 2px solid #cfdcd2; font: 400 .82rem/1.5 var(--sans); color: var(--ink2); }
.chp-cc b { font: 700 .72rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.chp-symhead { font: 700 .8rem/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 4px; }
.chp-symp { padding: 8px 0 2px; }
.chp-symp + .chp-symp { border-top: 1px dashed #cfdcd2; }
.chp-symp .sh { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.chp-symp .rank { font: 700 .9rem/1.3 var(--mono); color: var(--tealdeep); min-width: 1.1em; }
.chp-symp .w { font: 700 1.1rem/1.3 var(--mono); font-style: italic; }
.chp-symp .cat { font: 600 .58rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.chp-symp .ex { margin: 2px 0 6px 1.55em; font: 400 .92rem/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: break-word; }
.chp-symp .exblank { margin: 6px 0 8px 1.55em; }
.chp-symp .exblank span { display: block; border-bottom: 1.5px solid #b6c6bb; height: .3in; }
.cay-sheet .sfoot {
    position: absolute; left: .9in; right: .9in; bottom: .55in;
    text-align: center; font: 500 .68rem/1.5 var(--sans); color: #7d9187;
    border-top: 1px solid #d8e2d9; padding-top: 8px;
}
/* ── PAPER worksheets ──────────────────────────────────────────────────── */
.cay-wsheet { min-height: 10.6in; }
.ws-mast {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    border-bottom: 2px solid var(--ink); padding-bottom: 9px; margin-bottom: 8px;
}
.ws-title { font: 700 1.25rem/1 var(--mono); white-space: nowrap; }
.ws-title i { color: var(--tealdeep); }
.ws-id { display: flex; align-items: baseline; gap: 7px; font: 500 .8rem/1.4 var(--sans); color: var(--ink2); flex: 1; justify-content: flex-end; letter-spacing: .06em; }
.ws-fill { display: inline-block; width: 2.1in; border-bottom: 1.5px solid #9fb3a7; height: 1em; }
.ws-fill--s { width: .55in; }
.ws-h { display: flex; align-items: center; gap: 9px; font: 700 1.05rem/1.2 var(--mono); margin: 16px 0 5px; }
.ws-num {
    display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    font: 700 .8rem/1 var(--sans); font-style: normal; color: #fcfdfa;
}
.ws-num.n1 { background: var(--tealdeep); }
.ws-num.n2 { background: var(--t3); }
.ws-num.n3 { background: var(--red); }
/* the empty-lens page isn't a numbered part — it wears a lens, not a digit */
.ws-num.nL { background: var(--ink); font-size: 1rem; }
/* max-width keeps the square lens inside the 9.7in print budget once the
   masthead and directions have taken their share of the page */
.ws-lens { display: block; width: 100%; max-width: 6.5in; height: auto; margin: 10px auto 0; }
.ws-dir { font: 500 .82rem/1.5 var(--sans); color: var(--ink2); margin: 0 0 12px; }
.ws-line { flex: 1; border-bottom: 1.5px solid #9fb3a7; height: .28in; }
.ws-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 9px; }
.ws-n { font: 700 .8rem/1.6 var(--mono); color: var(--tealdeep); width: 1em; text-align: right; }
.ws-circ { font: 500 .68rem/1.4 var(--sans); color: var(--ink2); white-space: nowrap; }
.ws-fut { margin: 12px 0 0; font: 500 .82rem/1.5 var(--sans); color: var(--ink2); }
.ws-fut p { margin: 0 0 2px; }
.ws-line--full { display: block; height: .32in; }
.ws-ranks {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto);
    grid-auto-flow: column; gap: 9px 30px; margin: 2px 0 8px;
}
.ws-rank { display: flex; align-items: flex-end; gap: 8px; }
.ws-rn { font: 700 1rem/1.35 var(--mono); color: var(--tealdeep); width: 1.1em; text-align: right; }
.ws-rank .ws-line { height: .26in; }
.ws-chfields {
    display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-end;
    border: 1.5px solid #cfdcd2; border-radius: 6px; padding: 10px 14px 12px;
    margin: 0 0 12px; font: 500 .78rem/1.5 var(--sans); color: var(--ink2);
}
.ws-chf { display: flex; align-items: flex-end; gap: 8px; }
.ws-chf .ws-line { width: 1.7in; flex: none; height: .24in; }
.ws-chf--s .ws-line { width: .5in; }
.ws-chf--set b { font: 700 .85rem/1.4 var(--mono); color: var(--tealdeep); }
.ws-symhead { font: 700 .78rem/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 6px; }
.ws-symp { margin-bottom: 10px; }
.ws-symp .ws-row { margin-bottom: 4px; }
.ws-symp .ws-row .ws-line { max-width: 3.2in; }
.ws-line--ex { display: block; height: .27in; margin-left: 1.6em; }

/* ── Footer / toast ────────────────────────────────────────────────────── */
.cay-foot {
    max-width: 1080px; margin: 0 auto; padding: 22px 20px 40px;
    border-top: 1px solid rgba(55, 181, 159, .18);
    font-size: .78rem; color: var(--mut2); text-align: center;
}
.cay-foot b { color: var(--mut); }
.cay-foot a { color: var(--tealL); text-decoration: none; }
.cay-foot a:hover { text-decoration: underline; }
.cay-toast {
    position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
    background: rgba(20, 42, 48, .96); color: #eef6f2;
    border: 1px solid rgba(55, 181, 159, .5); border-radius: 10px;
    padding: 11px 20px; font: 500 .85rem/1.4 var(--sans);
    opacity: 0; pointer-events: none; z-index: 60;
    transition: opacity .25s ease, transform .25s ease;
    max-width: min(92vw, 480px); text-align: center;
}
.cay-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.cay-toast.is-err { border-color: var(--redL); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .cay-chartgrid { grid-template-columns: 1fr; }
    .cay-logside { position: static; order: -1; }
    .cay-sheet { padding: .55in .5in; min-height: 0; }
    .cay-sheet .sfoot { position: static; margin-top: 30px; }
    .cay-parthead h2 { font-size: 1.7rem; }
}

/* ── Reduced motion: everything lands in its resting pose ──────────────── */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ── Print: only the sheets, one per page ──────────────────────────────── */
@media print {
    /* half-inch margins and nothing else: the sheet adds NO horizontal
       padding of its own, so the glass spans the full 7.5in of live area */
    @page { size: letter; margin: 0.5in; }
    body { background: #fff !important; color: var(--ink); }
    .cay-topbar, .cay-foot, .cay-toast, #StarterModal, #Part1, #Part2, #Part3,
    #PrintContainer .cay-parthead, #PrintContainer .cay-toolrow,
    #PaperContainer .cay-parthead, #PaperContainer .cay-toolrow { display: none !important; }
    /* DIGITAL prints the finished-case sheets (even via Ctrl+P from any
       part); PAPER mode (body.cay-paper) prints the worksheets instead */
    #PrintContainer, #PrintContainer[hidden] { display: block !important; }
    #PaperContainer { display: none !important; }
    body.cay-paper #PrintContainer, body.cay-paper #PrintContainer[hidden] { display: none !important; }
    body.cay-paper #PaperContainer, body.cay-paper #PaperContainer[hidden] { display: block !important; }
    .cay-wsheet { min-height: 0; }
    .cay-main { max-width: none; padding: 0; }
    .cay-part { margin: 0; }
    .cay-sheets { display: block; }
    .cay-sheet {
        width: 100%; min-height: 0; border: none; border-radius: 0;
        box-shadow: none; padding: 0.1in 0; margin: 0;
        break-after: page;
    }
    .cay-sheet:last-child { break-after: auto; }
    .cay-sheet .sfoot { position: static; margin-top: 36px; }
}

/* ============================================================================
   THE GALLERY (Gallery.html) — v1.20
   The filed cases, laid out on the desk. A card is the lens itself on a dark
   evidence panel — the clue colours stay light-on-dark exactly as they are in
   the project's own case panel — and opening a card lifts the patient chart out
   from under it, on the same ruled chart paper Part 3 writes on. Nothing here
   is editable: no textareas, no spelling marks, no name fields.
   ========================================================================= */
.cay-galhead { max-width: 760px; margin: 6px auto 30px; text-align: center; }
.cay-galstatus {
    margin: 12px 0 0; font: 600 .74rem/1.5 var(--mono); color: var(--mut2);
    letter-spacing: .16em; text-transform: uppercase;
}
.cay-galwrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 20px; }

/* the year, filed as a case-drawer label */
.cay-galyear {
    display: flex; align-items: center; gap: 14px;
    margin: 34px 0 20px; font: 700 .92rem/1.2 var(--mono);
    color: var(--tealL); letter-spacing: .24em; text-transform: uppercase;
}
.cay-galyear::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(55, 181, 159, .55), transparent);
}
.cay-galyear .n {
    font: 600 .62rem/1 var(--sans); letter-spacing: .12em; color: var(--mut2);
    border: 1px solid rgba(55, 181, 159, .38); border-radius: 999px; padding: 3px 9px;
}

.cay-galgrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px; align-items: start;
}

.cay-galcard {
    display: flex; flex-direction: column; gap: 10px; width: 100%;
    margin: 0; padding: 14px 16px 13px; cursor: pointer; text-align: left;
    font: inherit; color: #e9f2ef;
    border: 1px solid rgba(55, 181, 159, .28); border-radius: 14px;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(55, 181, 159, .10), transparent 58%),
        linear-gradient(170deg, rgba(23, 46, 53, .94), rgba(14, 30, 35, .96));
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cay-galcard:hover, .cay-galcard:focus-visible {
    transform: translateY(-4px); border-color: rgba(55, 181, 159, .70);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .55); outline: none;
}
.cay-galcard .cay-lenssvg { display: block; width: 100%; height: auto; }

.cay-galby {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding-top: 9px; border-top: 1px dashed rgba(55, 181, 159, .30);
}
.cay-galby .who { font: 700 1rem/1.3 var(--mono); color: #eef6f2; }
.cay-galby .who span { font: 600 .58rem/1 var(--sans); letter-spacing: .16em;
    text-transform: uppercase; color: var(--mut2); display: block; margin-bottom: 3px; }
.cay-galby .more {
    font: 600 .58rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
    color: var(--tealL); white-space: nowrap;
}

/* ── the opened case ───────────────────────────────────────────────────── */
.cay-gallight {
    position: fixed; inset: 0; z-index: 80; display: none;
    align-items: flex-start; justify-content: center;
    padding: 40px 20px; overflow: auto;
    background: rgba(6, 16, 19, .92); cursor: zoom-out;
}
.cay-gallight.is-open { display: flex; }
.cay-gallight .case { width: min(100%, 760px); cursor: auto; }
/* the lens rides above the chart, as it does on the project's own Part 3 */
.cay-gallight .caselens { max-width: 330px; margin: 0 auto 18px; }
.cay-gallight .caselens svg { display: block; width: 100%; height: auto; }
.cay-gallight .close {
    position: fixed; top: 16px; right: 24px; z-index: 81;
    background: none; border: none; cursor: pointer;
    font: 300 2.6rem/1 var(--sans); color: #dfece7; opacity: .8;
}
.cay-gallight .close:hover { opacity: 1; }
/* a read-only symptom note: the chart's own row, with the textarea replaced by
   the sentences the student wrote */
.cay-galnote {
    margin: 4px 0 0; font: 400 .92rem/1.65 var(--sans); color: var(--ink2);
    white-space: pre-wrap; overflow-wrap: break-word;
}

@media (max-width: 620px) {
    .cay-galgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
    .cay-gallight { padding: 20px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .cay-galcard { transition: none; }
    .cay-galcard:hover, .cay-galcard:focus-visible { transform: none; }
}
