/* What's new: the header button, its list, and the one-time card on the
   learner's home (whats-new.js). No coloured edge stripes (Mark, 13 Nov). */

.wn-btn {
    position: relative;
    height: 2.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.95rem 0 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-main);
    font: 500 0.92rem/1 var(--font-sans);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.wn-btn:hover,
.wn-btn[aria-expanded="true"] { background: #fff; border-color: var(--border-strong); }
.wn-btn i { font-size: 1.05rem; color: var(--accent-blue); }
.wn-btn:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
.wn-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c2533f;
    box-shadow: 0 0 0 2px var(--bg-color);
}
.wn-dot[hidden],
.wn-btn[hidden] { display: none; }
.wn-sr {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.wn-btn:not(.has-new) .wn-sr { display: none; }

.dark .wn-btn { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); color: #f8fafc; }
.dark .wn-btn:hover,
.dark .wn-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.12); }
.dark .wn-btn i { color: #93b8d8; }
.dark .wn-dot { background: #e2735f; box-shadow: 0 0 0 2px #111827; }

@media (max-width: 600px) {
    .wn-btn { width: 2.45rem; padding: 0; justify-content: center; }
    .wn-btn-label { display: none; }
}

/* ── The list ─────────────────────────────────────────────────────────── */
.wn-panel {
    position: fixed;
    z-index: 1200;
    width: min(430px, calc(100vw - 24px));
    max-height: min(620px, calc(100dvh - 96px));
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 24px 60px -18px rgba(20, 30, 28, 0.35);
    font-family: var(--font-sans);
    animation: wn-in 0.18s ease-out;
}
.wn-panel[hidden] { display: none; }
@keyframes wn-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wn-panel { animation: none; } }

.wn-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0.75rem 0.5rem 1.25rem;
}
.wn-head h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.wn-close,
.wn-card-close {
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
}
.wn-close:hover,
.wn-card-close:hover { background: rgba(24, 33, 31, 0.06); color: var(--text-main); }

.wn-list {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem 0.6rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.wn-item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 0.9rem;
    padding: 0.9rem 0.75rem;
}
.wn-item + .wn-item { border-top: 1px solid var(--border-color); }
.wn-art {
    display: block;
    width: 84px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-alt);
}
.wn-art svg,
.wn-card-art svg { display: block; width: 100%; height: 100%; }
.wn-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.wn-date { font-size: 0.78rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.4rem; }
.wn-new {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(35, 77, 111, 0.1);
    color: var(--accent-blue);
}
.wn-title { margin-top: 0.15rem; font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.wn-line { margin-top: 0.2rem; font-size: 0.88rem; line-height: 1.45; color: var(--text-muted); }
.wn-try {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.8rem;
    border: 1px solid var(--accent-blue);
    border-radius: 999px;
    background: transparent;
    color: var(--accent-blue);
    font: 600 0.85rem/1 var(--font-sans);
    cursor: pointer;
}
.wn-try:hover { background: var(--accent-blue); color: #fff; }
.wn-try i { font-size: 0.85rem; }

@media (max-width: 600px) {
    .wn-panel { left: 12px; right: 12px; top: 76px; width: auto; max-height: calc(100dvh - 92px); }
    .wn-item { grid-template-columns: 72px 1fr; gap: 0.75rem; }
    .wn-art { width: 72px; height: 48px; }
}

.dark .wn-panel { background: #1f2937; border-color: #374151; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.7); }
.dark .wn-head h2, .dark .wn-title { color: #f9fafb; }
.dark .wn-line, .dark .wn-date { color: #a7b0bd; }
.dark .wn-item + .wn-item { border-top-color: #374151; }
.dark .wn-art, .dark .wn-card-art { background: #111827; }
.dark .wn-close:hover, .dark .wn-card-close:hover { background: rgba(255, 255, 255, 0.08); color: #f9fafb; }
.dark .wn-new { background: rgba(147, 184, 216, 0.16); color: #93b8d8; }
.dark .wn-try { border-color: #93b8d8; color: #93b8d8; }
.dark .wn-try:hover { background: #93b8d8; color: #111827; }

/* ── The card on the home ─────────────────────────────────────────────── */
.wn-card {
    position: relative;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.4rem;
    align-items: center;
    margin: 0 0 1.5rem;
    padding: 1.25rem 3.25rem 1.25rem 1.25rem;
    background: var(--bg-panel);
    border: 1px solid rgba(24, 33, 31, 0.08);
    border-radius: 22px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.06);
    font-family: var(--font-sans);
}
.wn-card-art {
    display: block;
    width: 150px;
    height: 100px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-alt);
}
.wn-card-tag {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-blue);
}
.wn-card-title { margin: 0.25rem 0 0; font-size: 1.3rem; font-weight: 600; line-height: 1.25; color: var(--text-main); }
.wn-card-line { margin: 0.35rem 0 0; font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); max-width: 62ch; }
.wn-card-actions { margin-top: 0.85rem; }
.wn-card-try {
    padding: 0.65rem 1.2rem;
    border: 0;
    border-radius: var(--btn-radius, 10px);
    background: var(--accent-blue);
    color: #fff;
    font: 600 0.95rem/1.2 var(--font-sans);
    text-align: left;
    cursor: pointer;
}
.wn-card-try:hover { background: #1b3d59; }
.wn-card-close { position: absolute; top: 0.7rem; right: 0.7rem; }

@media (max-width: 600px) {
    .wn-card { grid-template-columns: 1fr; gap: 0.8rem; padding: 1rem 1rem 1.1rem; margin-bottom: 1rem; }
    .wn-card-art { display: none; }
    .wn-card-title { font-size: 1.15rem; }
    .wn-card-try { width: 100%; text-align: center; }
}

.dark .wn-card { background: #1f2937; border-color: #374151; }
.dark .wn-card-title { color: #f9fafb; }
.dark .wn-card-line { color: #a7b0bd; }
.dark .wn-card-tag { color: #93b8d8; }
.dark .wn-card-try { background: #3b6e98; }
.dark .wn-card-try:hover { background: #4a80ad; }

/* ── The pictures' paints ─────────────────────────────────────────────── */
.wn-a-grey { fill: #dcdfe3; }
.wn-a-grey2 { fill: #b9c0c7; }
.wn-a-blue { fill: #2f7ae5; }
.wn-a-dot { fill: #9aa3ad; }
.wn-a-line { fill: none; stroke: #8a949e; stroke-width: 2; stroke-linecap: round; }
.wn-a-thick { stroke-width: 3; }
.wn-a-dash { stroke-dasharray: 2 6; }
.wn-a-gold { fill: #c79a52; }
.wn-a-bars rect { fill: var(--accent-blue); }
.wn-a-film { fill: #1d2a36; }
.wn-a-disc { fill: #e9edf1; }
.wn-a-disc2 { fill: #8fa9c0; }
.wn-a-letter { font: 700 9px/1 var(--font-sans); fill: #1d2a36; text-anchor: middle; }
.wn-a-film ~ .wn-a-line { stroke: #8fa9c0; }

.dark .wn-a-grey { fill: #374151; }
.dark .wn-a-grey2 { fill: #4b5563; }
.dark .wn-a-dot, .dark .wn-a-line { fill: none; stroke: #6b7280; }
.dark .wn-a-dot { fill: #6b7280; stroke: none; }
.dark .wn-a-bars rect { fill: #93b8d8; }
.dark .wn-a-film { fill: #0b1220; }

/* The list's way to the full page (whats-new.html). */
.wn-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--accent-blue);
    font: 600 0.9rem/1.2 var(--font-sans);
    text-decoration: none;
    border-radius: 0 0 18px 18px;
}
.wn-all:hover { background: rgba(35, 77, 111, 0.05); }
.wn-all i { font-size: 0.85rem; }
.dark .wn-all { border-top-color: #374151; color: #93b8d8; }
.dark .wn-all:hover { background: rgba(255, 255, 255, 0.05); }

/* ── The full page: every update, with more detail (whats-new-page.js) ─── */
.wnp { padding: 2.25rem 0 4.5rem; }
.wnp-shell { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }
.wnp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    text-decoration: none;
}
.wnp-back:hover { color: var(--accent-blue); }
.wnp-title {
    margin: 0.9rem 0 0.5rem;
    font-size: clamp(2rem, 5vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-main);
}
.wnp-lead { margin: 0; max-width: 38rem; font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); }
.wnp-lead a { color: var(--accent-blue); }

.wnp-month { margin-top: 2.6rem; }
.wnp-month > h2 {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.wnp-entry {
    display: grid;
    grid-template-columns: 208px 1fr;
    grid-template-areas: "art head" "art body";
    grid-template-rows: auto 1fr;
    column-gap: 1.75rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--border-color);
    scroll-margin-top: 90px;
}
.wnp-art {
    grid-area: art;
    width: 208px;
    height: 139px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-alt);
}
.wnp-art svg { display: block; width: 100%; height: 100%; }
.wnp-head { grid-area: head; min-width: 0; }
.wnp-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}
.wnp-kind { font-weight: 600; }
.wnp-head h3 {
    margin: 0.3rem 0 0.55rem;
    font-size: 1.3rem;
    font-weight: 650;
    line-height: 1.3;
    color: var(--text-main);
}
.wnp-body { grid-area: body; min-width: 0; }
.wnp-body p { margin: 0 0 0.7rem; font-size: 1rem; line-height: 1.65; color: var(--text-main); }
.wnp-points { margin: 0 0 0.85rem; padding-left: 1.2rem; list-style: disc; }
.wnp-points li { margin: 0 0 0.4rem; font-size: 1rem; line-height: 1.6; list-style: disc; }
.wnp-try {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
    padding: 0.55rem 1.05rem;
    border: 1px solid var(--accent-blue);
    border-radius: 999px;
    color: var(--accent-blue);
    font: 600 0.92rem/1 var(--font-sans);
    text-decoration: none;
}
.wnp-try:hover { background: var(--accent-blue); color: #fff; }
.wnp-entry.is-target .wnp-art { box-shadow: 0 0 0 3px rgba(47, 122, 229, 0.35); }

@media (max-width: 640px) {
    .wnp { padding-top: 1.5rem; }
    .wnp-entry {
        grid-template-columns: 96px 1fr;
        grid-template-areas: "art head" "body body";
        column-gap: 1rem;
        padding: 1.4rem 0;
    }
    .wnp-art { width: 96px; height: 64px; border-radius: 12px; }
    .wnp-head h3 { font-size: 1.12rem; margin-bottom: 0.7rem; }
    .wnp-body p, .wnp-points li { font-size: 0.97rem; }
}

.dark .wnp-title, .dark .wnp-head h3, .dark .wnp-body p, .dark .wnp-points li { color: #f9fafb; }
.dark .wnp-lead, .dark .wnp-meta, .dark .wnp-back, .dark .wnp-month > h2 { color: #a7b0bd; }
.dark .wnp-lead a { color: #93b8d8; }
.dark .wnp-entry { border-top-color: #374151; }
.dark .wnp-art { background: #111827; }
.dark .wnp-try { border-color: #93b8d8; color: #93b8d8; }
.dark .wnp-try:hover { background: #93b8d8; color: #111827; }
