/* World News cards (News Feed > World News, and the cards mixed into "For you"). Theme colours come from the site's variables; dark mode works by itself. */
.wn-list { display: grid; gap: 1.1rem; margin-bottom: 1rem; }
.wn-card { --h1: #0f3d35; --h2: #0b6b5a; --h3: #19c3a0; --mint: var(--brand-primary, #00ffcc); --deep: var(--brand-primary-dark, #0b6b5a);
  position: relative; background: var(--surface, #fff); border: 1px solid var(--line, #dde3e0); border-radius: 20px; overflow: hidden; overflow-wrap: anywhere;
  box-shadow: 0 1px 2px rgba(15,61,53,.06), 0 8px 24px -12px rgba(15,61,53,.25); transition: transform .25s ease, box-shadow .25s ease;
  animation: wn-rise .55s cubic-bezier(.2,.7,.2,1) both; }
.wn-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15,61,53,.08), 0 18px 34px -14px rgba(15,61,53,.38); }
.wn-t-conflict { --h1: #1c2433; --h2: #7d2b3a; --h3: #e5566b; }
.wn-t-climate  { --h1: #0a3340; --h2: #1b7f93; --h3: #4fd1e0; }
.wn-t-economy  { --h1: #1b3a30; --h2: #a9791a; --h3: #f0c24b; }
.wn-t-politics { --h1: #1b2658; --h2: #3f56c9; --h3: #8fa2ff; }
.wn-t-health   { --h1: #0d4a42; --h2: #1fa57f; --h3: #6ff0c0; }
.wn-t-tech     { --h1: #211d4a; --h2: #6a4de0; --h3: #b79bff; }
.wn-t-sport    { --h1: #0e4a2a; --h2: #2f9e44; --h3: #8be28f; }

/* ---- hero (no photo: topic art made of colour, light and a line icon) */
.wn-hero { position: relative; height: 168px; background: linear-gradient(135deg, var(--h1), var(--h2) 58%, var(--h3)); background-size: 160% 160%; animation: wn-shift 14s ease-in-out infinite; color: #fff; overflow: hidden; }
.wn-hero::after { content: ""; position: absolute; left: -5%; right: -5%; bottom: -36px; height: 70px; background: var(--surface, #fff); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.wn-blob { position: absolute; border-radius: 50%; filter: blur(22px); opacity: .5; background: radial-gradient(circle, rgba(255,255,255,.85), rgba(255,255,255,0) 70%); }
.wn-b1 { width: 150px; height: 150px; left: -30px; top: 30px; animation: wn-drift 11s ease-in-out infinite; }
.wn-b2 { width: 120px; height: 120px; right: 18%; top: -20px; animation: wn-drift 15s ease-in-out infinite reverse; }
.wn-globe { position: absolute; right: -34px; top: -10px; width: 210px; height: 210px; color: rgba(255,255,255,.2); }
.wn-mer { transform-box: fill-box; transform-origin: center; animation: wn-spin 9s linear infinite; }
.wn-m2 { animation-delay: -4.5s; }
.wn-topic-ico { position: absolute; right: 22px; top: 50px; width: 78px; height: 78px; color: rgba(255,255,255,.95); filter: drop-shadow(0 6px 14px rgba(0,0,0,.28)); animation: wn-float 5s ease-in-out infinite; }
.wn-topic-ico svg { width: 100%; height: 100%; }
.wn-pill { position: absolute; top: 12px; display: flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 999px; font-size: .8rem; line-height: 1.15; backdrop-filter: blur(6px); max-width: 64%; }
.wn-pill-src { left: 12px; background: rgba(6,28,24,.78); color: #fff; }
.wn-pill-src strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wn-pill-src i { width: 1px; height: 16px; background: rgba(255,255,255,.4); flex: none; }
.wn-pill-src span:last-child { color: var(--mint, #00ffcc); font-weight: 600; flex: none; }
.wn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint, #00ffcc); box-shadow: 0 0 0 0 rgba(0,255,204,.7); animation: wn-ping 2s ease-out infinite; flex: none; }
.wn-pill-date { right: 12px; flex-direction: column; align-items: flex-start; gap: 0; background: rgba(255,255,255,.92); color: #0f3d35; font-weight: 700; padding: .35rem .7rem; }
.wn-pill-date .wn-d2 { font-weight: 600; opacity: .75; }
.wn-ribbon { position: absolute; left: 0; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1.6rem .5rem 1rem; font-weight: 800; font-style: italic; letter-spacing: .04em; font-size: .92rem; color: #06231d;
  background: linear-gradient(110deg, var(--mint, #00ffcc), #6bffe0 55%, var(--mint, #00ffcc)); background-size: 200% 100%; clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); border-radius: 0 0 0 0; animation: wn-shine 4.5s linear infinite; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.wn-ribbon svg { width: 17px; height: 17px; }
.wn-ribbon.wn-live { background: linear-gradient(110deg, #ff3b4e, #ff7a59 55%, #ff3b4e); background-size: 200% 100%; color: #fff; }
.wn-ribbon.wn-live svg { animation: wn-blink 1.1s steps(2, jump-none) infinite; }

/* ---- body */
.wn-body { position: relative; z-index: 1; padding: .2rem 1.15rem 1.05rem; margin-top: -4px; }
.wn-title { font-size: 1.28rem; line-height: 1.3; margin: 0 0 .7rem; padding-left: .8rem; border-left: 5px solid var(--mint, #00ffcc); border-radius: 3px; font-weight: 800; }
.wn-title a { color: inherit; text-decoration: none; }
.wn-title a:hover .wn-hl { filter: brightness(1.08); }
.wn-hl { background: linear-gradient(120deg, var(--mint, #00ffcc), #3ee8c4); color: #06231d; padding: .02em .38em; margin: 0 .05em; border-radius: .45em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.wn-sumrow { display: flex; gap: .8rem; align-items: flex-start; margin: 0 0 .75rem; }
.wn-sico { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--mint, #00ffcc) 22%, transparent); color: var(--deep, #0b6b5a); }
.wn-sico svg { width: 22px; height: 22px; }
.wn-sum { margin: 0; line-height: 1.6; font-size: 1rem; color: var(--ink-soft, #44555a); }
.wn-kp { background: var(--brand-paper, #f1f6f4); border-radius: 14px; padding: .15rem .85rem; margin: 0 0 .85rem; font-size: .93rem; }
.wn-kp summary { cursor: pointer; font-weight: 700; padding: .55rem 0; list-style: none; display: flex; align-items: center; gap: .5rem; color: var(--deep, #0b6b5a); }
.wn-kp summary::-webkit-details-marker { display: none; }
.wn-kp summary::after { content: "▾"; margin-left: auto; transition: transform .25s; }
.wn-kp[open] summary::after { transform: rotate(180deg); }
.wn-kp summary span { background: var(--mint, #00ffcc); color: #06231d; font-size: .72rem; border-radius: 999px; padding: .05rem .5rem; }
.wn-kp ul { margin: 0 0 .6rem; padding-left: 1.15rem; display: grid; gap: .35rem; line-height: 1.5; animation: wn-rise .35s both; }

/* ---- buttons */
.wn-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.wn-read { display: inline-flex; align-items: center; gap: .55rem; background: linear-gradient(135deg, #0f3d35, #0b6b5a); color: #fff; text-decoration: none; padding: .7rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .92rem; max-width: 100%; transition: box-shadow .25s, transform .2s; }
.wn-read svg { width: 19px; height: 19px; flex: none; }
.wn-read span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wn-read b { transition: transform .25s; }
.wn-read:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint, #00ffcc) 55%, transparent), 0 8px 18px -6px rgba(11,107,90,.6); color: #fff; }
.wn-read:hover b { transform: translateX(4px); }
.wn-like, .wn-cardbtn { display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--line, #d3ddda); background: var(--surface, #fff); color: inherit; border-radius: 999px; padding: .55rem .85rem; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.wn-like svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: transform .2s; }
.wn-cardbtn svg { width: 18px; height: 18px; }
.wn-like:hover, .wn-cardbtn:hover { border-color: var(--mint, #00ffcc); background: color-mix(in srgb, var(--mint, #00ffcc) 14%, var(--surface, #fff)); }
.wn-like:active, .wn-cardbtn:active { transform: scale(.94); }
.wn-like.on { border-color: #ff4d6d; color: #e11d48; background: color-mix(in srgb, #ff4d6d 10%, var(--surface, #fff)); }
.wn-like.on svg { fill: #ff4d6d; stroke: #ff4d6d; animation: wn-pop .45s ease; }
.wn-like:disabled { opacity: .6; }
.wn-brk { display: inline-flex; align-items: center; cursor: pointer; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.wn-brk input { position: absolute; opacity: 0; pointer-events: none; }
.wn-brk span { padding: .42rem .7rem; border-radius: 999px; border: 1.5px dashed var(--line, #c4d0cc); color: var(--ink-soft, #55666a); transition: all .2s; }
.wn-brk input:checked + span { background: #ff3b4e; border: 1.5px solid #ff3b4e; color: #fff; }
.wn-brk input:focus-visible + span { outline: 2px solid var(--mint, #00ffcc); outline-offset: 2px; }
.wn-note { margin: .75rem 0 0; font-size: .74rem; color: var(--ink-soft, #7a8a8f); }
.wn-pager { display: flex; justify-content: space-between; gap: .6rem; margin: 1rem 0; }
#nf-list > .wn-card { margin-bottom: 1.1rem; }

/* ---- small strip on the "For you" tab */
.wn-strip { background: var(--surface, #fff); border: 1px solid var(--line, #dde3e0); border-left: 4px solid var(--brand-primary, #00ffcc); border-radius: 14px; padding: .7rem .9rem; margin-bottom: 1rem; }
.wn-strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.wn-strip-head h2 { margin: 0; font-size: 1rem; }
.wn-strip-head a { font-size: .88rem; font-weight: 600; }
.wn-strip ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .35rem; }
.wn-strip li a { color: inherit; text-decoration: none; font-size: .93rem; line-height: 1.4; display: block; }
.wn-strip li a:hover { text-decoration: underline; }
.wn-src { font-weight: 700; color: var(--brand-primary-dark, #0b6b5a); }

/* ---- admin preview */
.wna-grid { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .wna-grid { grid-template-columns: 1fr 1fr; } .wna-grid .wna-wide { grid-column: 1 / -1; } }
.wna-item .wn-card { box-shadow: none; animation: none; }
.wna-item .wn-card:hover { transform: none; }

@media (min-width: 720px) { .wn-hero { height: 180px; } .wn-title { font-size: 1.45rem; } .wn-topic-ico { width: 92px; height: 92px; top: 48px; right: 34px; } }

/* ---- motion */
@keyframes wn-rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes wn-shift { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }
@keyframes wn-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(34px, 16px); } }
@keyframes wn-spin { from { transform: scaleX(1); } 50% { transform: scaleX(.08); } to { transform: scaleX(1); } }
@keyframes wn-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes wn-ping { 0% { box-shadow: 0 0 0 0 rgba(0,255,204,.7); } 80%, 100% { box-shadow: 0 0 0 9px rgba(0,255,204,0); } }
@keyframes wn-shine { to { background-position: -200% 0; } }
@keyframes wn-blink { 50% { opacity: .25; } }
@keyframes wn-pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .wn-card, .wn-hero, .wn-blob, .wn-mer, .wn-topic-ico, .wn-dot, .wn-ribbon, .wn-ribbon svg, .wn-kp ul, .wn-like svg, .wn-rp, .wn-embed, .wn-sharemenu, .wn-repost:hover svg { animation: none !important; } .wn-card { transition: none; } }

/* ---- icon buttons: like, repost, share, download */
.wn-icons { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; width: 100%; margin-top: .15rem; }
.wn-ibtn { width: 42px; height: 42px; padding: 0; justify-content: center; display: inline-grid; place-items: center; border: 1.5px solid var(--line, #d3ddda); background: var(--surface, #fff); color: inherit; border-radius: 50%; cursor: pointer; transition: background .2s, border-color .2s, transform .15s, color .2s; }
.wn-ibtn svg { width: 20px; height: 20px; }
.wn-ibtn:hover, .wn-ibtn[aria-expanded="true"] { border-color: var(--mint, #00ffcc); background: color-mix(in srgb, var(--mint, #00ffcc) 16%, var(--surface, #fff)); color: var(--deep, #0b6b5a); }
.wn-ibtn:active { transform: scale(.92); }
.wn-repost:hover svg { animation: wn-spin-once .6s ease; }
.wn-like { height: 42px; padding: 0 .9rem; }
.wn-brk { margin-left: auto; }
.wn-sharewrap { position: relative; display: inline-block; }
.wn-sharemenu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 170px; display: grid; background: var(--surface, #fff); border: 1px solid var(--line, #d3ddda); border-radius: 14px; box-shadow: 0 14px 34px -10px rgba(0,0,0,.35); overflow: hidden; animation: wn-rise .2s both; }
.wn-sharemenu[hidden] { display: none; }
.wn-sharemenu a, .wn-sharemenu button { padding: .7rem 1rem; text-align: left; background: none; border: 0; color: inherit; font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.wn-sharemenu a:hover, .wn-sharemenu button:hover { background: color-mix(in srgb, var(--mint, #00ffcc) 18%, transparent); }

/* ---- repost box */
.wn-rp { margin: .75rem 0 0; padding: .8rem; border-radius: 16px; background: var(--brand-paper, #f1f6f4); border: 1px dashed var(--mint, #00ffcc); display: grid; gap: .55rem; animation: wn-rise .3s both; }
.wn-rp[hidden] { display: none; }
.wn-rp textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line, #d3ddda); border-radius: 12px; padding: .6rem .75rem; font: inherit; resize: vertical; background: var(--surface, #fff); color: inherit; }
.wn-rp textarea:focus { outline: 2px solid var(--mint, #00ffcc); border-color: transparent; }
.wn-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wn-rp-name { font-size: .85rem; display: flex; align-items: center; gap: .4rem; }
.wn-rp-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wn-rp-note { font-size: .78rem; color: var(--ink-soft, #55666a); margin-right: auto; }
.wn-rp-x, .wn-rp-go { border-radius: 999px; padding: .5rem 1rem; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; border: 1.5px solid var(--line, #d3ddda); background: var(--surface, #fff); color: inherit; }
.wn-rp-go { border: 0; color: #fff; background: linear-gradient(135deg, #0f3d35, #0b6b5a); }
.wn-rp-go:disabled { opacity: .6; }
.wn-rp-msg { font-size: .85rem; min-height: 1em; }
.wn-rp-msg.ok { color: var(--deep, #0b6b5a); font-weight: 700; }
.wn-rp-msg.bad { color: #d6293e; font-weight: 600; }

/* ---- a story shown inside a student's repost (in the feed) */
.wn-embed { --h1: #0f3d35; --h2: #0b6b5a; --h3: #19c3a0; margin: .7rem 0 .2rem; border: 1px solid var(--line, #dde3e0); border-left: 5px solid var(--h3); border-radius: 16px; padding: .8rem .95rem; background: linear-gradient(135deg, color-mix(in srgb, var(--h3) 9%, var(--surface, #fff)), var(--surface, #fff) 60%); animation: wn-rise .45s both; }
.wn-embed-top { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--ink-soft, #55666a); margin-bottom: .35rem; }
.wn-embed-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--h1), var(--h2)); flex: none; }
.wn-embed-ico svg { width: 16px; height: 16px; }
.wn-embed-src { font-weight: 800; color: var(--deep, #0b6b5a); }
.wn-embed-when { margin-left: auto; white-space: nowrap; }
.wn-embed-title { display: block; font-weight: 800; font-size: 1.05rem; line-height: 1.35; color: inherit; text-decoration: none; margin-bottom: .3rem; }
.wn-embed-sum { margin: 0 0 .5rem; font-size: .93rem; line-height: 1.55; color: var(--ink-soft, #44555a); }
.wn-embed-read { font-weight: 700; font-size: .86rem; color: var(--deep, #0b6b5a); text-decoration: none; }
.wn-embed-read:hover { text-decoration: underline; }
.wn-card.wn-spot { outline: 3px solid var(--mint, #00ffcc); outline-offset: 3px; }
.wn-spot-note { margin: 0 0 .8rem; padding: .6rem .9rem; border-radius: 14px; background: color-mix(in srgb, var(--mint, #00ffcc) 18%, var(--surface, #fff)); font-size: .92rem; }
@keyframes wn-spin-once { to { transform: rotate(360deg); } }

/* ---- cover picture (only when the newspaper's own feed has one; the art is the fallback) */
.wn-has-img { height: 196px; }
.wn-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transform-origin: 60% 40%; animation: wn-zoom 16s ease-in-out infinite alternate; }
.wn-has-img::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(4,22,18,.7) 0, rgba(4,22,18,.08) 40%, rgba(4,22,18,0) 58%, rgba(4,22,18,.5) 100%), linear-gradient(135deg, color-mix(in srgb, var(--h2) 38%, transparent), transparent 55%); }
.wn-has-img .wn-blob, .wn-has-img .wn-globe, .wn-has-img .wn-topic-ico { display: none; }
.wn-has-img .wn-pill, .wn-has-img .wn-ribbon { z-index: 3; }
.wn-credit { position: absolute; right: 12px; bottom: 44px; z-index: 3; font-size: .68rem; font-weight: 600; color: #fff; background: rgba(4,22,18,.62); padding: .15rem .55rem; border-radius: 999px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes wn-zoom { from { transform: scale(1); } to { transform: scale(1.09); } }
@media (min-width: 720px) { .wn-has-img { height: 220px; } }
@media (prefers-reduced-motion: reduce) { .wn-cover { animation: none !important; } }
.wn-hero::after { z-index: 2; }

/* ---- "new posts" button and pull-to-refresh (assets/js/feed-refresh.js) */
.nf-newpill { white-space: nowrap; max-width: 92vw; position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 72px); transform: translateX(-50%); z-index: 60; border: 0; border-radius: 999px; padding: .65rem 1.15rem; font: inherit; font-weight: 800; font-size: .92rem; color: #06231d; cursor: pointer;
  background: linear-gradient(110deg, var(--brand-primary, #00ffcc), #6bffe0 55%, var(--brand-primary, #00ffcc)); background-size: 200% 100%; box-shadow: 0 10px 26px -6px rgba(0,0,0,.4), 0 0 0 4px color-mix(in srgb, var(--brand-primary, #00ffcc) 30%, transparent);
  animation: nf-pill-in .45s cubic-bezier(.2,.9,.3,1.3) both, wn-shine 4s linear infinite; }
.nf-newpill[hidden] { display: none; }
.nf-ptr { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 6px); transform: translate(-50%, -56px); z-index: 60; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; color: var(--brand-primary-dark, #0b6b5a); background: var(--surface, #fff); box-shadow: 0 8px 22px -6px rgba(0,0,0,.4); pointer-events: none; }
.nf-ptr.ready { background: var(--brand-primary, #00ffcc); color: #06231d; }
.nf-ptr.spin { animation: nf-spin .8s linear infinite; }
@keyframes nf-pill-in { from { opacity: 0; transform: translate(-50%, -20px) scale(.8); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes nf-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .nf-newpill, .nf-ptr.spin { animation: none !important; } }
.nf-mywork { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .15rem; }
.nf-mywork a { display: block; padding: .55rem .7rem; border-radius: 12px; color: inherit; text-decoration: none; font-weight: 600; transition: background .2s, transform .15s; }
.nf-mywork a:hover { background: color-mix(in srgb, var(--brand-primary, #00ffcc) 18%, transparent); transform: translateX(3px); }

/* ---- "Install app" chip next to the News Feed title (assets/js/pwa.js shows it only when the app can be installed) */
.nf-install { display: inline-flex; align-items: center; gap: .4rem; border: 0; border-radius: 999px; padding: .5rem .95rem; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; color: #06231d;
  background: linear-gradient(110deg, var(--brand-primary, #00ffcc), #6bffe0 55%, var(--brand-primary, #00ffcc)); background-size: 200% 100%; animation: wn-shine 4s linear infinite; box-shadow: 0 6px 16px -6px rgba(0,255,204,.7); }
.nf-install[hidden] { display: none; }
.nf-install:active { transform: scale(.95); }
@media (prefers-reduced-motion: reduce) { .nf-install { animation: none; } }
