/* Claire's Neural map (mc-neural.js). Its own dark panel – the same in the light and dark site themes. */
.mcn_wrap {
    position: relative;
    height: 460px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(90, 190, 210, 0.18);
    background:
        radial-gradient(ellipse 70% 60% at 50% 45%, rgba(20, 70, 110, 0.55) 0%, rgba(8, 24, 48, 0.4) 45%, rgba(0, 0, 0, 0) 75%),
        radial-gradient(ellipse at 50% 50%, #07152a 0%, #040a16 60%, #010309 100%);
    color: #cfeff3;
    color-scheme: dark;
    isolation: isolate;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
@media (max-width: 640px) { .mcn_wrap { height: 360px; border-radius: 12px; } }

.mcn_canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: pan-y; /* phones: up/down scrolls the page, sideways turns the map */
    cursor: grab;
}
.mcn_canvas.mcn_over { cursor: pointer; }
.mcn_canvas.mcn_dragging { cursor: grabbing; }

.mcn_controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
}
.mcn_controls[hidden], .mcn_btn[hidden] { display: none; }
.mcn_btn {
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #dffbff;
    background: rgba(16, 52, 72, 0.6);
    border: 1px solid rgba(120, 220, 235, 0.35);
    border-radius: 999px;
    padding: 7px 13px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
.mcn_btn:hover { background: rgba(26, 80, 104, 0.75); border-color: rgba(150, 235, 245, 0.6); }
.mcn_btn:focus-visible { outline: 2px solid #7fe6f2; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .mcn_btn { transition: none; } }
.mcn_btn_small { min-width: 38px; padding: 7px 9px; font-variant-numeric: tabular-nums; }

.mcn_caption,
.mcn_hint {
    position: absolute;
    bottom: 10px;
    font-size: 12px;
    line-height: 1.3;
    pointer-events: none;
}
.mcn_caption { left: 14px; color: #a9e6ee; font-weight: 600; }
.mcn_caption[hidden], .mcn_hint[hidden] { display: none; }
.mcn_hint { right: 14px; color: rgba(160, 205, 215, 0.55); }

/* "12 new since 28 Nov, 00:18": a line above the caption; the legend moves up for it */
.mcn_new {
    position: absolute;
    left: 14px;
    bottom: 28px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffe7b0;
    pointer-events: none;
}
.mcn_new[hidden] { display: none; }
.mcn_new::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1.5px solid #ffe29a;
    box-shadow: 0 0 6px #ffc860;
    vertical-align: -1px;
}
.mcn_has_new .mcn_legend { bottom: 48px; }

/* legend: bottom-left above the caption; folded to "Key" on phones */
.mcn_legend {
    position: absolute;
    left: 14px;
    bottom: 30px;
    max-width: calc(100% - 28px);
    font-size: 11px;
    line-height: 1.3;
    color: rgba(190, 225, 232, 0.8);
}
.mcn_legend[hidden] { display: none; }
.mcn_lg_sum { display: none; cursor: pointer; width: max-content; font-weight: 600; color: #a9e6ee; }
.mcn_lg_sum:focus-visible { outline: 2px solid #7fe6f2; outline-offset: 2px; border-radius: 4px; }
.mcn_lg_row { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; }
.mcn_lg_states { color: rgba(160, 200, 210, 0.65); }
.mcn_lg::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    vertical-align: -1px;
}
.mcn_lg_t_ability::before { width: 10px; height: 10px; vertical-align: -2px; background: #4fe0d4; box-shadow: 0 0 6px #4fe0d4; }
.mcn_lg_t_learned::before { width: 7px; height: 7px; background: #f0c36e; box-shadow: 0 0 6px #f0c36e; }
.mcn_lg_t_rule::before { width: 5px; height: 5px; vertical-align: 0; background: #e3a6ff; box-shadow: 0 0 5px 1px #c56cff; }
.mcn_lg_t_script::before { background: #ff9a3c; box-shadow: 0 0 6px #ff9a3c; }
.mcn_lg_s_learned::before { background: #dffbff; box-shadow: 0 0 5px #9ff; }
.mcn_lg_s_training::before { background: #8ab8ff; box-shadow: 0 0 6px #8ab8ff; }
.mcn_lg_s_failing::before { background: #f0584c; box-shadow: 0 0 6px #f0584c; }
.mcn_lg_s_planned::before { border: 1px solid #6f87a8; box-sizing: border-box; }
.mcn_lg_s_built::before { background: #4f8f98; box-shadow: 0 0 3px #4f8f98; }
.mcn_lg_row[hidden], .mcn_lg[hidden] { display: none; }
/* new today (mc-today.js): the gold-white ring the map draws round a new skill */
.mcn_lg_new::before { width: 9px; height: 9px; vertical-align: -1px; box-sizing: border-box; border: 1.5px solid #ffe29a; box-shadow: 0 0 6px #ffc860; }
.mcn_lg_links { color: rgba(160, 200, 210, 0.65); align-items: center; }
.mcn_lg_proven::before { width: 16px; height: 2px; border-radius: 1px; vertical-align: 3px; background: #9ff; box-shadow: 0 0 4px #6ff; }
.mcn_lg_toggle { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; pointer-events: auto; }
.mcn_lg_toggle:hover { color: #cfeff4; }
.mcn_lg_toggle:focus-visible { outline: 2px solid #7fe6f2; outline-offset: 2px; border-radius: 4px; }
.mcn_lg_toggle[aria-pressed="false"] { opacity: 0.55; } /* (off = those links hidden – no strike-through, Trish 29 Nov) */
.mcn_lg_toggle[aria-pressed="false"]::after { content: " · hidden"; font-style: italic; }
.mcn_lg_dash { display: inline-block; width: 16px; margin-right: 5px; vertical-align: 3px; border-top: 2px dashed #6fb0b8; }
.mcn_lg_dot { border-top: 2px dotted #5f7898; }
@media (max-width: 640px) {
    .mcn_lg_sum { display: block; }
    .mcn_legend[open] { background: rgba(4, 12, 24, 0.85); border-radius: 8px; padding: 5px 8px; margin-left: -8px; }
}
@media (max-width: 439px) { .mcn_hint { display: none; } }

.mcn_tip {
    position: absolute;
    left: 0;
    top: 0;
    max-width: 250px;
    padding: 6px 9px;
    border-radius: 8px;
    border: 1px solid rgba(120, 220, 235, 0.3);
    background: rgba(5, 14, 26, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    font-size: 12px;
    line-height: 1.35;
    will-change: transform;
}
.mcn_tip[hidden] { display: none; }
.mcn_tip_title { display: block; font-weight: 600; color: #effdff; }
.mcn_tip_desc { display: block; margin: 1px 0 2px; color: rgba(215, 238, 242, 0.85); }
.mcn_tip_desc[hidden] { display: none; }
.mcn_tip_status { display: block; font-size: 11px; color: #8fc9d3; }
.mcn_tip_status::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: 0;
    background: #6f87a8;
}
.mcn_s_learned .mcn_tip_status::before { background: #4fe0d4; box-shadow: 0 0 6px #4fe0d4; }
.mcn_s_training .mcn_tip_status::before { background: #8ab8ff; box-shadow: 0 0 6px #8ab8ff; }
.mcn_s_failing .mcn_tip_status::before { background: #f0584c; box-shadow: 0 0 6px #f0584c; }
.mcn_s_planned .mcn_tip_status::before { background: transparent; border: 1px solid #6f87a8; box-sizing: border-box; }
.mcn_t_learned.mcn_s_learned .mcn_tip_status::before { background: #f0c36e; box-shadow: 0 0 6px #f0c36e; }
.mcn_t_rule.mcn_s_learned .mcn_tip_status::before { background: #d68cff; box-shadow: 0 0 6px #c56cff; }
.mcn_t_script.mcn_s_learned .mcn_tip_status::before { background: #ff9a3c; box-shadow: 0 0 6px #ff9a3c; }
.mcn_t_learned.mcn_s_planned .mcn_tip_status::before { border-color: #a08c6e; }
.mcn_t_rule.mcn_s_planned .mcn_tip_status::before { border-color: #8c6eaf; }
.mcn_t_script.mcn_s_planned .mcn_tip_status::before { border-color: #aa825f; }
.mcn_tip_runs { display: block; font-size: 11px; color: rgba(160, 205, 215, 0.75); }
.mcn_tip_new { display: block; font-size: 11px; color: #ffe29a; }
.mcn_tip_new[hidden] { display: none; }

/* the replay log: right of the map, under the buttons; a foldable strip at the bottom on phones */
.mcn_log {
    position: absolute;
    top: 48px;
    right: 12px;
    bottom: 34px;
    width: 260px;
    max-width: calc(100% - 24px);
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    border: 1px solid rgba(120, 220, 235, 0.22);
    background: rgba(3, 10, 20, 0.78);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    font-size: 11.5px;
    line-height: 1.35;
    color: rgba(215, 238, 242, 0.9);
}
.mcn_log[hidden] { display: none; }
.mcn_log_head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 6px;
    border-bottom: 1px solid rgba(120, 220, 235, 0.14);
}
.mcn_log_fold,
.mcn_log_close {
    font: inherit;
    color: #a9e6ee;
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}
.mcn_log_fold { flex: 1; min-width: 0; text-align: left; font-weight: 600; padding: 4px 5px; }
.mcn_log_fold::after { content: "▾"; display: inline-block; margin-left: 6px; transition: transform 0.15s; }
.mcn_log_fold[aria-expanded="false"]::after { transform: rotate(-90deg); }
.mcn_log_close { font-size: 16px; line-height: 1; padding: 3px 8px; color: rgba(190, 225, 232, 0.8); }
.mcn_log_fold:hover, .mcn_log_close:hover { color: #effdff; background: rgba(40, 110, 135, 0.3); }
.mcn_log_fold:focus-visible, .mcn_log_close:focus-visible { outline: 2px solid #7fe6f2; outline-offset: -2px; }
.mcn_log_list {
    position: relative; /* the lines' offsetTop is measured from here (auto-scroll) */
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 3px 0 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 220, 235, 0.3) transparent;
}
.mcn_log_list[hidden] { display: none; }
.mcn_log_day {
    padding: 7px 10px 2px;
    text-align: center;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(160, 205, 215, 0.6);
}
.mcn_log_line {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    border-left: 2px solid transparent;
    padding: 3px 10px 3px 8px;
    cursor: pointer;
}
.mcn_log_line:hover { background: rgba(40, 110, 135, 0.25); }
.mcn_log_line:focus-visible { outline: 2px solid #7fe6f2; outline-offset: -2px; }
.mcn_log_line.mcn_log_cur { background: rgba(60, 150, 175, 0.32); border-left-color: #7fe6f2; }
.mcn_log_t { display: block; font-size: 10.5px; color: rgba(160, 205, 215, 0.65); font-variant-numeric: tabular-nums; }
.mcn_log_n { font-weight: 600; color: #effdff; }
.mcn_log_v { color: rgba(170, 215, 225, 0.75); }
.mcn_log_new .mcn_log_t::after {
    content: "new";
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 700;
    color: #2a1d04;
    background: #ffe29a;
}
.mcn_log_empty { margin: 0; padding: 10px; color: rgba(170, 215, 225, 0.7); }
@media (min-width: 641px) { .mcn_log_on .mcn_legend { max-width: calc(100% - 300px); } }
@media (max-width: 640px) {
    .mcn_log {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        max-height: 46%;
        border-radius: 0 0 12px 12px;
        border-width: 1px 0 0;
        background: rgba(3, 10, 20, 0.9); /* over the map's labels: needs more cover than on the side */
    }
    /* the strip takes the bottom: the caption, key and hints step aside while it is open */
    .mcn_log_on .mcn_caption, .mcn_log_on .mcn_legend, .mcn_log_on .mcn_hint, .mcn_log_on .mcn_new { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mcn_log_fold::after { transition: none; } }

.mcn_empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 24px;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(170, 215, 225, 0.7);
    pointer-events: none;
}
.mcn_empty[hidden] { display: none; }

/* Skill statuses (28 Nov – Trish + Server 3): each step adds one thing; kind colours stay as hue.
   built dim · learning a thin hollow ring · trained a bright closed ring on a half-lit core · learned full and
   bright (+ a slow orbiting spark) · failing a broken red ring · being tested now an expanding ripple */
.mcn_lg_s_built::before { background: rgba(79, 143, 152, 0.55); box-shadow: none; }
.mcn_lg_s_training::before { background: rgba(79, 224, 212, 0.12); box-shadow: 0 0 0 1px rgba(79, 224, 212, 0.6), 0 0 3px rgba(79, 224, 212, 0.3); }
.mcn_lg_s_trained::before { background: rgba(79, 224, 212, 0.45); box-shadow: 0 0 0 1.5px #4fe0d4, 0 0 5px rgba(79, 224, 212, 0.6); }
.mcn_lg_s_learned::before { background: #dffbff; box-shadow: 0 0 6px #9ff, 0 0 2px #fff; }
.mcn_lg_s_failing::before { background: rgba(240, 88, 76, 0.35); box-shadow: none; border: 1.5px dashed #f0584c; box-sizing: border-box; }
.mcn_lg_s_testing::before { background: none; border: 1px solid #c8ebff; box-sizing: border-box; box-shadow: 0 0 0 3px rgba(200, 235, 255, 0.22); }
.mcn_tip_ev { display: block; font-size: 11px; color: rgba(205, 235, 240, 0.85); white-space: pre-line; }
.mcn_tip_ev[hidden] { display: none; }

.mcn_tip_runs[hidden] { display: none; }
/* legend (28 Nov): the learning chip pulses like the map's learning skills */
.mcn_lg_s_training::before { animation: mcn_lg_pulse 2.6s ease-in-out infinite; }
@keyframes mcn_lg_pulse { 0%, 100% { opacity: 0.55; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .mcn_lg_s_training::before { animation: none; } }

/* Colour = kind, look = progress (Trish 28 Nov) */
.mcn_lg_t_ability::before { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.mcn_lg_t_rule::before { background: #f472b6; box-shadow: 0 0 5px 1px #f472b6; }
.mcn_lg_t_script::before { background: #a86cff; box-shadow: 0 0 6px #a86cff; }
.mcn_lg_s_learned::before { background: #ffffff; box-shadow: 0 0 7px #fff, 0 0 2px #fff; }
.mcn_lg_s_trained::before { background: #b8c2cc; box-shadow: none; border: 0; }
.mcn_lg_s_training::before { background: none; box-shadow: 0 0 0 1.5px #b8c2cc inset; border: 0; }
.mcn_lg_s_built::before { background: rgba(184, 194, 204, 0.42); box-shadow: none; }

/* clearer steps (Trish 28 Nov): trained = solid + a thin bright ring; learning = outline + a small filled centre */
.mcn_lg_s_trained::before { width: 7px; height: 7px; background: #b8c2cc; box-shadow: 0 0 0 1.5px #07111c, 0 0 0 2.7px #ebfff0; }
.mcn_lg_s_training::before { background: radial-gradient(circle, #b8c2cc 0 28%, transparent 32%); box-shadow: 0 0 0 1.5px #b8c2cc inset; }
/* the tooltip at 80% (Trish 29 Nov): the map shows through its background; the text stays fully readable */
.mcn_tip { background: rgba(5, 14, 26, 0.8); }

/* the full pairs (Trish 29 Nov): Building (a dashed ring) and Learning (a single bright dot)
   – in the key so every pair reads whole; they breathe like Training */
.mcn_lg_s_building::before { background: none; border: 1px dashed #4f8f98; box-sizing: border-box; box-shadow: none; animation: mcn_lg_pulse 2.6s ease-in-out infinite; }
.mcn_lg_s_learning::before { background: radial-gradient(circle, #dffbff 0 34%, transparent 40%); box-shadow: 0 0 0 1.5px #dffbff, 0 0 5px rgba(159, 255, 255, 0.6); animation: mcn_lg_pulse 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .mcn_lg_s_building::before, .mcn_lg_s_learning::before { animation: none; } }
/* Training = the outer ring alone, pulsing; Learning = a single bright dot, pulsing the same way (Trish 29 Nov) */
.mcn_lg_s_training::before { background: none; box-shadow: 0 0 0 1.5px #b8c2cc inset; }
.mcn_lg_s_learning::before { background: #ffffff; border: 0; box-shadow: 0 0 7px #fff, 0 0 2px #fff; }

.mcn_s_learning .mcn_tip_status::before { background: #ffffff; box-shadow: 0 0 6px #fff; }
.mcn_s_building .mcn_tip_status::before { background: none; border: 1px dashed #4f8f98; box-sizing: border-box; box-shadow: none; }
