/* Announcements on the signed-in pages: the strip at the top of every page (js/announcements.js), and the
   dashboard's News list and article (/dashboard/news/). The public News pages have their own look in /news/news.css.

   Poppins under its own name here, never the "titles" font: that one is a trial that draws digits as blocks, and the
   strip always shows a date. A type's colour arrives as --t on the element, set by the script once it reads as
   #RRGGBB; without it everything falls back to the News blue. */
@font-face { font-family: 'YCP News'; font-weight: 400; font-display: swap; src: url(/fonts/poppins-latin-400.woff2) format('woff2'); }
@font-face { font-family: 'YCP News'; font-weight: 500; font-display: swap; src: url(/fonts/poppins-latin-500.woff2) format('woff2'); }
@font-face { font-family: 'YCP News'; font-weight: 600; font-display: swap; src: url(/fonts/poppins-latin-600.woff2) format('woff2'); }

.ann-i { display: inline-block; flex: none; vertical-align: middle; }

/* ------------------------------------------------------------------ the strip */

.ann-strip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    padding: 10px 20px 10px 30px;
    font-family: 'YCP News', Arial, sans-serif;
    color: #ECEEF4;
    text-decoration: none;
    background: #0B0E12;
    background: linear-gradient(90deg, color-mix(in srgb, var(--t, #6EA8FF) 13%, #0B0E12) 0%, #0B0E12 60%);
    border-bottom: 1px solid #1C2130;
    -webkit-font-smoothing: antialiased;
}
.ann-strip[hidden] { display: none; }
.ann-strip * { box-sizing: border-box; font-family: inherit; }
.ann-strip::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--t, #6EA8FF); }
.ann-strip:hover { background: #0F131A; background: linear-gradient(90deg, color-mix(in srgb, var(--t, #6EA8FF) 18%, #0B0E12) 0%, #0F131A 60%); }
.ann-strip:focus-visible { outline: 2px solid #7E7BFF; outline-offset: -2px; }
.ann-strip-words { display: flex; flex: 1; align-items: baseline; gap: 12px; min-width: 0; overflow: hidden; white-space: nowrap; }
.ann-strip-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; font-weight: 600; color: #ECEEF4; }
.ann-strip-sum { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: #8A92A5; }
.ann-strip-date { flex: none; font-size: 13px; color: #8A92A5; }
.ann-strip-more { display: inline-flex; flex: none; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: #A9B8FF; transition: gap .15s; }
.ann-strip:hover .ann-strip-more { gap: 9px; }

/* The type, as a pill in its own colour. */
.ann-pill {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px 0 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: var(--t, #6EA8FF);
    background: rgba(255, 255, 255, .06);
    background: color-mix(in srgb, var(--t, #6EA8FF) 14%, transparent);
    border-radius: 999px;
}

@media (max-width: 750px) {
    .ann-strip { min-height: 0; gap: 12px; padding: 12px 12px 12px 16px; }
    .ann-strip .ann-pill { justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 10px; }
    .ann-strip .ann-pill-name, .ann-strip-sum, .ann-strip-date, .ann-strip-more-words { display: none; }
    .ann-strip-words { display: block; white-space: normal; }
    .ann-strip-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; line-height: 1.35; white-space: normal; }
    .ann-strip-more { color: #8A92A5; }
}

/* ------------------------------------------------------------------ the dashboard's News pages */

.ann-page { max-width: 860px; }
.ycp .ann-page-head { margin-bottom: 24px; }
.ycp .ann-page-head h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.ycp .ann-page-head p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.ycp .ann-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.ycp .ann-back:hover { color: var(--text); }
.ycp [aria-busy="true"] { min-height: 240px; border-radius: 18px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: ann-wait 1.4s ease-in-out infinite; }
@keyframes ann-wait { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .ycp [aria-busy="true"] { animation: none; } }

/* The one on the bar, at the top of the list. */
.ycp .ann-feat {
    display: block;
    padding: 24px 26px;
    color: var(--text);
    background: radial-gradient(600px 200px at 0% 0%, color-mix(in srgb, var(--t, #6EA8FF) 14%, transparent), transparent 70%), var(--surface);
    border: 1px solid var(--line);
    border-color: color-mix(in srgb, var(--t, #6EA8FF) 35%, var(--line));
    border-radius: 18px;
}
.ycp .ann-feat:hover { border-color: color-mix(in srgb, var(--t, #6EA8FF) 55%, var(--line)); }
.ycp .ann-feat-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.ycp .ann-feat-date { margin-left: auto; }
.ycp .ann-feat-title { display: block; margin: 14px 0 8px; font-size: 22px; font-weight: 600; line-height: 1.3; }
.ycp .ann-feat-sum { display: block; margin-bottom: 16px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.ycp .ann-feat-more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--link); }
.ycp .ann-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--text); }
.ycp .ann-live i { width: 8px; height: 8px; background: var(--t, #6EA8FF); border-radius: 50%; box-shadow: 0 0 0 4px rgba(110, 168, 255, .2); }

.ycp .ann-sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 34px 0 12px; }
.ycp .ann-sec { margin: 30px 0 12px; font-size: 18px; font-weight: 600; color: var(--text); }
.ycp .ann-sec-h .ann-sec { margin: 0; }
.ycp .ann-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--link); }

/* A list of announcements: the type's tile, the title and short text, the date. */
.ycp .ann-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.ycp .ann-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text); }
.ycp .ann-row + .ann-row { border-top: 1px solid var(--line); }
.ycp .ann-row:hover { background: var(--surface-2); }
.ycp .ann-tile { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; color: var(--t, #6EA8FF); background: rgba(255, 255, 255, .06); background: color-mix(in srgb, var(--t, #6EA8FF) 15%, transparent); border-radius: 11px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t, #6EA8FF) 22%, transparent); }
.ycp .ann-row-main { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.ycp .ann-row-top { display: none; }
.ycp .ann-row-top:has(.ann-live) { display: flex; margin-bottom: 4px; }
.ycp .ann-row-top .ann-pill { display: none; }
.ycp .ann-row-title { overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ycp .ann-row-sum { overflow: hidden; font-size: 13px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.ycp .ann-row-date { flex: none; font-size: 12.5px; color: var(--muted); }
.ycp .ann-row-go { display: inline-flex; flex: none; color: var(--muted-2); }

.ycp .ann-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: 18px; }
.ycp .ann-empty .ann-i { margin-bottom: 8px; color: #9B7BFF; }
.ycp .ann-empty b { font-size: 17px; font-weight: 600; color: var(--text); }
.ycp .ann-empty span { max-width: 420px; font-size: 14px; line-height: 1.5; }
.ycp .ann-empty .ann-back, .ycp .ann-empty .ann-btn { margin: 14px 0 0; }
.ycp .ann-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; }
.ycp .ann-btn:hover { background: var(--surface-3); }

/* One article. */
.ycp .ann-article, .ycp .ann-article ~ * { max-width: 720px; }
.ycp .ann-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.ycp .ann-dot { width: 3px; height: 3px; background: var(--muted-2); border-radius: 50%; }
.ycp .ann-title { margin: 0 0 14px; font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.ycp .ann-lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); }
.ycp .ann-rule { height: 1px; margin: 26px 0; background: var(--line); }
.ycp .ann-updates { margin-top: 28px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.ycp .ann-updates h2 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.ycp .ann-updates ol { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ycp .ann-updates li { position: relative; display: flex; flex-direction: column; gap: 2px; padding-left: 22px; font-size: 14px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.ycp .ann-updates li::before { content: ""; position: absolute; top: 6px; left: 2px; width: 9px; height: 9px; background: var(--in); border-radius: 50%; box-shadow: 0 0 0 4px rgba(61, 214, 140, .15); }
.ycp .ann-updates time { font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* The article's own text, from js/article-md.js. */
.ycp .art { font-size: 15.5px; line-height: 1.75; color: var(--text-2); overflow-wrap: anywhere; }
.ycp .art > :first-child { margin-top: 0; }
.ycp .art > :last-child { margin-bottom: 0; }
.ycp .art p { margin: 0 0 14px; }
.ycp .art h2 { margin: 30px 0 8px; font-size: 19px; font-weight: 600; color: var(--text); }
.ycp .art h3 { margin: 22px 0 6px; font-size: 16.5px; font-weight: 600; color: var(--text); }
.ycp .art ul, .ycp .art ol { margin: 0 0 14px; padding-left: 22px; }
.ycp .art li { margin: 5px 0; padding-left: 4px; }
.ycp .art li::marker { color: #9B7BFF; }
.ycp .art strong { font-weight: 600; color: var(--text); }
.ycp .art a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.ycp .art hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.ycp .art-box { margin: 0 0 14px; padding: 14px 18px; background: rgba(155, 123, 255, .08); border-left: 3px solid #9B7BFF; border-radius: 10px; }
.ycp .art-box > :last-child { margin-bottom: 0; }
.ycp .art-figure { margin: 6px 0 18px; }
.ycp .art-picture { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; }

@media (max-width: 750px) {
    .ycp .ann-title { font-size: 25px; }
    .ycp .ann-lead { font-size: 16px; }
    .ycp .ann-feat { padding: 20px; }
    .ycp .ann-feat-title { font-size: 19px; }
    .ycp .ann-feat-date { margin-left: 0; }
    .ycp .ann-row-date { display: none; }
    .ycp .ann-row-title { white-space: normal; }
    .ycp .ann-row-sum { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
