/* Dashboard → Content (js/content-admin.js) and the public news cards / article window */

/* ---------- category colours ---------- */
.ca-t-news { --ca-c: var(--blue); --ca-s: var(--blue-soft); }
.ca-t-camp { --ca-c: var(--red-deep); --ca-s: var(--red-soft); }
.ca-t-event { --ca-c: var(--go); --ca-s: var(--go-soft); }
.ca-t-education { --ca-c: var(--ok); --ca-s: var(--ok-soft); }

.ca { --ca-r: var(--r-md); }
.ca .ic { width: 18px; height: 18px; flex: none; }

/* ---------- loading ---------- */
.ca-loading { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.ca-loading span { height: 260px; border-radius: var(--ca-r); background: linear-gradient(90deg, var(--wash), var(--surface), var(--wash)); background-size: 200% 100%; animation: ca-sh 1.2s linear infinite; border: 1px solid var(--line); }
@keyframes ca-sh { to { background-position: -200% 0; } }

/* ---------- top: tabs + new ---------- */
.ca-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ca-top .seg { margin-bottom: 0; }
.ca-tabs button { gap: 8px; }
.ca-n { font-size: .72rem; background: var(--surface); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.ca-tabs button[aria-selected="true"] .ca-n { background: var(--blue-soft); color: var(--blue); }
.ca-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--ca-r); background: var(--warn-soft); color: var(--warn); font-size: .9rem; margin-bottom: 16px; }

/* ---------- stats (also filters) ---------- */
.ca-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ca-stat { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--ca-r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; font: inherit; color: var(--ink); }
.ca-stat:hover { border-color: var(--blue); }
.ca-stat[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ca-stat strong { display: block; font-family: var(--f-display); font-size: 1.45rem; line-height: 1.1; }
.ca-stat small { color: var(--muted); font-size: .8rem; font-weight: 600; }
.ca-stat-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--wash); color: var(--blue); flex: none; }
.ca-stat-published .ca-stat-ic { background: var(--ok-soft); color: var(--ok); }
.ca-stat-draft .ca-stat-ic { background: var(--warn-soft); color: var(--warn); }
.ca-stat-top .ca-stat-ic { background: var(--red-soft); color: var(--red-deep); }

/* ---------- toolbar ---------- */
.ca-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--ca-r); background: var(--surface); margin-bottom: 16px; }
.ca-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--wash); min-height: 42px; color: var(--muted); }
.ca-search:focus-within { border-color: var(--blue); background: var(--surface); }
.ca-search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; height: 40px; color: var(--ink); }
.ca-bar-r { display: flex; gap: 8px; align-items: center; }
.ca-bar-r select { min-height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; background: var(--surface); }
.ca-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ca-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.ca-chip .ic { width: 15px; height: 15px; color: var(--ca-c, var(--blue)); }
.ca-chip b { font-size: .74rem; color: var(--muted); background: var(--wash); border-radius: 999px; padding: 0 7px; }
.ca-chip:hover { border-color: var(--ca-c, var(--blue)); }
.ca-chip[aria-pressed="true"] { background: var(--ca-c, var(--blue)); border-color: var(--ca-c, var(--blue)); color: #fff; }
.ca-chip[aria-pressed="true"] .ic { color: #fff; }
.ca-chip[aria-pressed="true"] b { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- bulk bar ---------- */
.ca-bulk { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--ca-r); background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.ca-bulk .btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.ca-bulk .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .22); color: #fff; border-color: #fff; }
.ca-bulk .btn-ghost.danger { color: #fff; }
.ca-bulk .btn-ghost.danger:hover { background: var(--bad); border-color: var(--bad); }
.ca-bulk .link-btn { color: #fff; }
.ca-bulk-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ca-check-inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; cursor: pointer; }
.ca-check-inline input { width: 18px; height: 18px; }


/* ---------- table pieces (thumbnail, checkbox, category label) ---------- */
.ca-cover-none { display: grid; place-items: center; background: linear-gradient(135deg, var(--ca-s), var(--surface)); color: var(--ca-c); }
.ca-check { display: grid; place-items: center; cursor: pointer; }
.ca-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.ca-type { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--ca-c); text-transform: uppercase; letter-spacing: .03em; }
.ca-type .ic { width: 14px; height: 14px; }
.ca-date { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ca-acts { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.ca-pub { border: 1.5px solid var(--ok); background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; margin-right: 2px; white-space: nowrap; }
.ca-pub:hover { background: var(--ok); color: #fff; }
.ca-pub.is-pub { border-color: var(--line); background: none; color: var(--muted); }
.ca-pub.is-pub:hover { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.ca-pub:disabled { opacity: .5; cursor: wait; }
.ca-acts .icon-btn .ic { width: 17px; height: 17px; }
.ca-acts .ca-del:hover { color: var(--bad); background: var(--bad-soft); }

/* status chips */
.ca-st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.ca-st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ca-st.is-pub { background: var(--ok-soft); color: var(--ok); }
.ca-st.is-draft { background: var(--warn-soft); color: var(--warn); }
.ca-st.is-top { background: var(--red); color: #fff; }
.ca-st .ic { width: 12px; height: 12px; }

/* ---------- list view ---------- */
.ca-table { border: 1px solid var(--line); border-radius: var(--ca-r); background: var(--surface); overflow: hidden; }
.ca-row { position: relative; display: grid; grid-template-columns: 28px 84px minmax(0, 1fr) 170px 170px 120px 220px; gap: 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.ca-head { position: sticky; top: 0; z-index: 3; padding-top: 11px; padding-bottom: 11px; background: var(--wash); font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ca-row.ca-head:hover { background: var(--wash); }
.ca-head-acts { text-align: right; }
.ca-row .ca-acts { justify-content: flex-end; }
.ca-row-st { flex-wrap: wrap; }
.ca-row-date .ca-date { font-weight: 600; }
.ca-row-date .ca-date .ic { width: 14px; height: 14px; color: var(--muted); }
.ca-table { overflow: visible; }
.ca-row:first-child { border-top: 0; }
.ca-row:hover { background: var(--wash); }
.ca-row.is-sel { background: var(--blue-soft); }
.ca-row .ca-check { position: static; opacity: 1; box-shadow: none; background: none; width: auto; height: auto; }
.ca-row-img { cursor: pointer; }
.ca-thumb { display: block; width: 84px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--wash); }
.ca-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ca-thumb.ca-cover-none .ic { width: 22px; height: 22px; }
.ca-row.is-draft .ca-thumb { filter: grayscale(.55); }
.ca-row-main { min-width: 0; display: grid; gap: 2px; }
.ca-row-main button { all: unset; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-row-main button:hover { color: var(--blue); }
.ca-row-main small { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-row-st { display: flex; gap: 6px; align-items: center; }
.ca-row-date { font-size: .84rem; font-weight: 600; display: grid; }
.ca-row-date small { color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- empty ---------- */
.ca-empty { text-align: center; padding: 48px 20px; border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); }
.ca-empty > .ic { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--blue); opacity: .6; }
.ca-empty h3 { color: var(--ink); }
.ca-empty.sm { padding: 28px 20px; }
.ca-empty.sm > .ic { width: 28px; height: 28px; }

/* ---------- service status tab ---------- */
.ca-svc-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 16px; }
.ca-svc-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.ca-svc-name { font-weight: 600; min-width: 0; }
.ca-svc-sel { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; background: var(--surface); min-height: 38px; }

/* =====================================================================
   EDITOR (full screen)
   ===================================================================== */
.ca-ed-wrap { position: fixed; inset: 0; z-index: 85; background: rgba(10, 20, 40, .55); display: flex; justify-content: center; align-items: stretch; animation: fade .15s; }
.ca-ed { position: relative; width: min(1240px, 100%); margin: 2vh 16px; background: var(--wash); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); animation: up .22s ease-out; }
.ca-ed .ic { width: 18px; height: 18px; flex: none; }
.ca-ed-h { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ca-ed-ttl { min-width: 0; flex: 1; display: grid; }
.ca-ed-ttl small { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ca-ed-ttl strong { font-family: var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-ed-state { font-size: .8rem; font-weight: 600; color: var(--warn); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.ca-ed-state.on { opacity: 1; }
.ca-ed-acts { display: flex; gap: 8px; }
.ca-restore { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; background: var(--info-soft); color: var(--info); font-size: .9rem; font-weight: 600; }
.ca-restore span { flex: 1; min-width: 200px; }
.ca-ed-body { flex: 1; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; padding: 20px; align-items: start; overscroll-behavior: contain; }

.ca-ed-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--ca-r, 12px); padding: 18px 22px 20px; min-width: 0; }
.ca-lang { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-sm); background: var(--wash); margin-bottom: 14px; }
.ca-lang button { border: 0; background: none; padding: 6px 14px; border-radius: 6px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.ca-lang button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ca-lang i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.ca-lang i.on { background: var(--ok); }
.ca-hint { display: block; color: var(--muted); font-size: .8rem; margin: 6px 0 0; }
.ca-ed-main > .ca-hint { margin: -6px 0 10px; }
.ca-headline { width: 100%; border: 0; border-bottom: 2px solid transparent; outline: none; padding: 6px 0; margin-bottom: 12px; font-family: var(--f-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.2; background: none; color: var(--ink); }
.ca-headline:focus { border-bottom-color: var(--blue-soft); }
.ca-headline::placeholder { color: color-mix(in srgb, var(--muted) 60%, transparent); }

.ca-rte { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.ca-rte:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ca-tb { position: sticky; top: -20px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.ca-tb select { min-height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: var(--surface); font-size: .86rem; }
.ca-tb-b { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; }
.ca-tb-b:hover { background: var(--wash); color: var(--blue); }
.ca-tb-b[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); }
.ca-tb-b .ic { width: 17px; height: 17px; }
.ca-tb-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ca-tb-sp { flex: 1; }
.ca-doc { position: relative; min-height: 320px; padding: 16px 18px; outline: none; max-width: none; font-size: 1rem; line-height: 1.7; }
.ca-doc.is-empty::before { content: attr(data-ph); color: var(--muted); opacity: .7; pointer-events: none; position: absolute; }
.ca-doc > :first-child { margin-top: 0; }
.ca-rte-foot { display: flex; justify-content: flex-end; padding: 6px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 600; }

/* article typography (editor + public window) */
.ca-prose h2 { font-size: 1.3rem; margin: 22px 0 8px; }
.ca-prose h3 { font-size: 1.1rem; margin: 18px 0 6px; }
.ca-prose h4 { font-size: 1rem; margin: 14px 0 6px; }
.ca-prose ul, .ca-prose ol, .ca-doc ul, .ca-doc ol { margin: 0 0 12px; padding-left: 24px; }
.ca-prose li, .ca-doc li { margin-bottom: 4px; }
.ca-prose blockquote, .ca-doc blockquote { margin: 14px 0; padding: 10px 16px; border-left: 4px solid var(--red); background: var(--wash); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-style: italic; }
.ca-prose hr, .ca-doc hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.ca-prose a, .ca-doc a { color: var(--blue); text-decoration: underline; }
.ca-doc h2 { font-size: 1.3rem; margin: 20px 0 8px; }
.ca-doc h3 { font-size: 1.1rem; margin: 16px 0 6px; }
.ca-doc p { margin: 0 0 12px; }

.ca-sum { display: grid; gap: 6px; margin-top: 16px; }
.ca-sum > span { display: flex; justify-content: space-between; font-size: .84rem; font-weight: 700; }
.ca-sum > span small { color: var(--muted); font-weight: 600; }
.ca-sum textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; resize: vertical; background: var(--surface); }
.ca-sum textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ca-sum > small { color: var(--muted); font-size: .78rem; }

/* sidebar */
.ca-ed-side { display: grid; gap: 14px; position: sticky; top: 0; }
.ca-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.ca-box h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 10px; font-family: var(--f-body); font-weight: 700; }
.ca-box.ca-bad { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.ca-req { color: var(--bad); }
.ca-in { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; background: var(--surface); }
.ca-status { display: grid; gap: 8px; }
.ca-status label, .ca-types label { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.ca-status label:hover, .ca-types label:hover { border-color: var(--blue); }
.ca-status input, .ca-types input { position: absolute; opacity: 0; pointer-events: none; }
.ca-status label > span, .ca-types label > span:last-child { display: grid; line-height: 1.3; }
.ca-status strong, .ca-types strong { font-size: .9rem; }
.ca-status small, .ca-types small { color: var(--muted); font-size: .76rem; }
.ca-status label::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.ca-status label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.ca-status label:has(input:checked)::before { border: 5px solid var(--blue); }
.ca-status label:has(input[value="1"]:checked) { border-color: var(--ok); background: var(--ok-soft); }
.ca-status label:has(input[value="1"]:checked)::before { border-color: var(--ok); }
.ca-status label:has(input:focus-visible), .ca-types label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.ca-types { display: grid; gap: 8px; }
.ca-types-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ca-s); color: var(--ca-c); flex: none; }
.ca-types label:has(input:checked) { border-color: var(--ca-c); background: var(--ca-s); }
.ca-types label:has(input:checked) .ca-types-ic { background: var(--ca-c); color: #fff; }
.ca-switch { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .86rem; font-weight: 600; cursor: pointer; }
.ca-switch > span:last-child { display: inline-flex; gap: 6px; align-items: center; }
.ca-switch > span:last-child .ic { width: 15px; height: 15px; color: var(--red); }
.ca-switch input { position: absolute; opacity: 0; }
.ca-switch-ui { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.ca-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.ca-switch input:checked + .ca-switch-ui { background: var(--red); }
.ca-switch input:checked + .ca-switch-ui::after { transform: translateX(16px); }
.ca-switch input:focus-visible + .ca-switch-ui { outline: 3px solid var(--focus); outline-offset: 2px; }

.ca-drop { position: relative; display: grid; place-items: center; gap: 8px; text-align: center; min-height: 150px; padding: 16px; border: 2px dashed var(--line); border-radius: 10px; background: var(--wash); color: var(--muted); font-size: .84rem; cursor: pointer; overflow: hidden; }
.ca-drop:hover, .ca-drop.is-over { border-color: var(--blue); color: var(--blue); }
.ca-drop-ic .ic { width: 32px; height: 32px; }
.ca-drop.has-img { padding: 0; border-style: solid; min-height: 0; }
.ca-drop.has-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ca-drop-acts { position: absolute; inset: auto 8px 8px 8px; display: flex; gap: 6px; justify-content: center; opacity: 0; transition: opacity .15s; }
.ca-drop.has-img:hover .ca-drop-acts, .ca-drop.has-img:focus-within .ca-drop-acts { opacity: 1; }
@media (hover: none) { .ca-drop-acts { opacity: 1; } }
.ca-drop-acts .btn { min-height: 32px; padding: 4px 10px; font-size: .8rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.ca-drop-acts .ic { width: 15px; height: 15px; }

.ca-pv-card { border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 10px; padding: 12px; display: grid; gap: 4px; overflow: hidden; }
.ca-pv-img { display: block; margin: -12px -12px 8px; aspect-ratio: 16 / 9; overflow: hidden; }
.ca-pv-img img { width: 100%; height: 100%; object-fit: cover; }
.ca-pv-card .news-type { margin-bottom: 2px; }
.ca-pv-card strong { font-family: var(--f-display); line-height: 1.25; }
.ca-pv-card p { margin: 0; color: var(--muted); font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ca-pv-card time { font-size: .76rem; font-weight: 600; color: var(--blue); }

/* article preview inside the editor */
.ca-pv-wrap { position: absolute; inset: 0; z-index: 3; background: rgba(10, 20, 40, .5); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.ca-pv-modal { position: relative; width: min(780px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); padding: 24px; }
.ca-pv-x { position: absolute; top: 10px; right: 10px; }

/* ---------- public: news list (photo left, title and summary right) ---------- */
.news-grid.nl-list { grid-template-columns: minmax(0, 1fr) !important; gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.nl-item { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 18px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); transition: background .15s; }
.nl-item:first-child { border-top: 0; }
.nl-item:hover { background: var(--wash); color: var(--ink); }
.nl-item:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.nl-thumb { display: block; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: var(--wash); }
.nl-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.nl-item:hover .nl-thumb img { transform: scale(1.04); }
.nl-noimg { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--ca-s), var(--surface)); color: var(--ca-c); }
.nl-noimg .ic { width: 40px; height: 40px; opacity: .6; }
.nl-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .8rem; }
.nl-meta time { color: var(--muted); font-weight: 600; }
.nl-cats { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.nl-cat { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--ca-s); color: var(--ca-c); font-size: .74rem; font-weight: 700; }
.nl-cat .ic { width: 13px; height: 13px; }
.nl-title { font-family: var(--f-display); font-size: 1.18rem; line-height: 1.3; color: var(--blue-deep, var(--ink)); }
.nl-item:hover .nl-title { color: var(--blue); }
.nl-sum { color: var(--muted); font-size: .93rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nl-more { display: inline-flex; align-items: center; gap: 4px; padding-top: 2px; font-size: .86rem; font-weight: 700; color: var(--red); }
.nl-more .ic { width: 15px; height: 15px; transition: transform .15s; }
.nl-item:hover .nl-more .ic { transform: translateX(3px); }
/* compact rows ("More news" beside a story) */
.nl-compact .nl-item { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; }
.nl-compact .nl-title { font-size: .95rem; }
.nl-compact .nl-sum, .nl-compact .nl-more, .nl-compact .nl-cats { display: none; }

/* ---------- public: a story on its own page (#/news/<id>) ---------- */
.na-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.na-main { min-width: 0; }
.na-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; }
.na-date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.na-date .ic { width: 16px; height: 16px; }
.na-img { margin: 0 0 20px; border-radius: var(--r-md); overflow: hidden; background: var(--wash); }
.na-img img { width: 100%; max-height: 520px; object-fit: cover; }
.na-lead { font-size: 1.12rem; line-height: 1.6; color: var(--ink); font-weight: 500; margin: 0 0 16px; }
.na-prose { max-width: 72ch; }
.na-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.na-share > span { font-weight: 700; font-size: .9rem; margin-right: 4px; }
.na-share .ic, .na-back .ic { width: 16px; height: 16px; }
.na-side { position: sticky; top: calc(var(--head-h) + 16px); }
.na-side .h-sm { margin-top: 0; }
@media (max-width: 900px) {
  .na-wrap { grid-template-columns: minmax(0, 1fr); }
  .na-side { position: static; }
}
@media (max-width: 640px) {
  .nl-item { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .nl-title { font-size: 1rem; }
  .nl-sum { -webkit-line-clamp: 2; font-size: .86rem; }
  .nl-more { display: none; }
}

/* article preview in the dashboard editor */
.ca-read { display: grid; gap: 4px; }
.ca-read-img { margin: 28px 0 14px; aspect-ratio: 16 / 8; overflow: hidden; border-radius: var(--r-md); }
.ca-read-img img { width: 100%; height: 100%; object-fit: cover; }
.modal .modal-close, .ca-pv-x { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); z-index: 2; }
.ca-read h2 { padding-right: 36px; margin-bottom: 4px; }
.ca-read-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; font-weight: 600; margin-bottom: 10px; }
.ca-read-meta .ic { width: 15px; height: 15px; }

/* ---------- several categories ---------- */
.ca-types-row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ca-row .ca-types-row { flex-direction: column; gap: 2px; }
.nc-types { display: flex; flex-wrap: wrap; gap: 0 14px; }

/* category checklist in the editor: always open, tick as many as needed */
.ca-cats { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ca-cats li + li { border-top: 1px solid var(--line); }
.ca-cat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; transition: background .15s; }
.ca-cat:hover { background: var(--wash); }
.ca-cat input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ca-c); cursor: pointer; }
.ca-cat > span:last-child { display: grid; line-height: 1.3; min-width: 0; }
.ca-cat strong { font-size: .9rem; }
.ca-cat small { color: var(--muted); font-size: .76rem; }
.ca-cat-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ca-s); color: var(--ca-c); flex: none; }
.ca-cat-ic .ic { width: 16px; height: 16px; }
.ca-cat:has(input:checked) { background: var(--ca-s); }
.ca-cat:has(input:checked) .ca-cat-ic { background: var(--ca-c); color: #fff; }
.ca-box.ca-bad .ca-cats { border-color: var(--bad); }

/* moving the old health blogs */
.ca-move { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.ca-move > .ic { width: 26px; height: 26px; color: var(--ok); flex: none; }
.ca-move > div { flex: 1; min-width: 240px; }
.ca-move strong { display: block; }
.ca-move p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }

/* the old "Health blogs" editor in Website content: articles are managed in Dashboard → Content now */
.wc-nav [data-sec="blogs"] { display: none !important; }

/* web address (slug) */
.ca-slug { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.ca-slug:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ca-slug-pre { display: flex; align-items: center; padding: 0 8px; background: var(--wash); color: var(--muted); font-size: .72rem; font-weight: 600; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.ca-slug .ca-in { border: 0; border-radius: 0; min-width: 0; flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: .84rem; outline: none; }
.ca-slug-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.ca-slug-acts .link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; text-decoration: none; }
.ca-slug-acts .ic { width: 14px; height: 14px; }

/* announcement pop-up settings */
.ca-flash { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); }
.ca-flash .ca-switch { margin-top: 0; }
.ca-flash .ca-switch > span:last-child .ic { color: var(--red-deep); }
.ca-flash-until { display: grid; gap: 4px; margin-top: 10px; font-size: .8rem; font-weight: 700; }
.ca-st.is-flash { background: var(--red-deep); color: #fff; }
.ca-st.is-flash .ic { width: 12px; height: 12px; }

/* ---------- public: announcement pop-up ---------- */
.ca-ann { position: fixed; left: 20px; bottom: 20px; z-index: 70; width: min(380px, calc(100vw - 32px)); display: flex; gap: 0; flex-direction: column; background: var(--surface); border-radius: var(--r-md); box-shadow: 0 12px 40px rgba(10, 20, 40, .28); border: 1px solid var(--line); border-top: 4px solid var(--red); overflow: hidden; animation: ca-ann-in .35s cubic-bezier(.2, .9, .3, 1.2); }
.ca-ann.out { animation: ca-ann-out .25s ease-in forwards; }
@keyframes ca-ann-in { from { transform: translateY(24px) scale(.96); opacity: 0; } }
@keyframes ca-ann-out { to { transform: translateY(24px); opacity: 0; } }
.ca-ann-x { position: absolute; top: 10px; right: 10px; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); cursor: pointer; color: var(--ink); }
.ca-ann-x .ic { width: 16px; height: 16px; }
.ca-ann-img { display: block; aspect-ratio: 16 / 7; overflow: hidden; }
.ca-ann-img img { width: 100%; height: 100%; object-fit: cover; }
.ca-ann-b { display: grid; gap: 6px; padding: 14px 16px 14px; }
.ca-ann-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red-deep); padding-right: 36px; }
.ca-ann-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red); animation: ca-ann-pulse 1.6s infinite; }
@keyframes ca-ann-pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ca-ann strong { font-family: var(--f-display); font-size: 1.05rem; line-height: 1.3; padding-right: 30px; }
.ca-ann-img + .ca-ann-b strong { padding-right: 0; }
.ca-ann p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ca-ann-foot { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--blue); }
.ca-ann-foot .ic { width: 14px; height: 14px; }
.ca-ann-acts { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.ca-ann-acts .link-btn { font-size: .82rem; color: var(--muted); }
@media (max-width: 900px) { .ca-ann { left: 16px; right: 16px; width: auto; bottom: calc(var(--dock-h) + var(--safe-b) + 12px); } }
@media (max-width: 640px) {
  .ca-ann-img { display: none; }   /* compact on phones: text only */
  .ca-ann-b { padding: 12px 14px; gap: 4px; }
  .ca-ann p { -webkit-line-clamp: 2; }
}
@media (prefers-reduced-motion: reduce) { .ca-ann, .ca-ann.out, .ca-ann-tag i { animation: none; } }

/* ---------- smaller screens ---------- */
@media (max-width: 1250px) {
  .ca-row { grid-template-columns: 28px 72px minmax(0, 1fr) 150px 150px 170px; }
  .ca-row > :nth-child(6) { display: none; }   /* date column: the date still shows in the editor */
  .ca-thumb { width: 72px; }
}
@media (max-width: 980px) {
  .ca-row { grid-template-columns: 28px 64px minmax(0, 1fr) 140px; }
  .ca-row > :nth-child(4) { display: none; }   /* categories column */
  .ca-row .ca-acts { grid-column: 3 / -1; justify-self: end; }
  .ca-head .ca-head-acts { display: none; }
  .ca-thumb { width: 64px; }
}
@media (max-width: 900px) {
  .ca-ed { margin: 0; border-radius: 0; width: 100%; }
  .ca-ed-body { display: flex; flex-direction: column; gap: 14px; padding: 12px; }
  .ca-ed-main, .ca-ed-side { flex: none; }
  .ca-ed-side { position: static; }
  .ca-ed-acts [data-preview] span { display: none; }
  .ca-ed-state { display: none; }
}
@media (max-width: 720px) {
  .ca-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca-bar { grid-template-columns: minmax(0, 1fr); }
  .ca-bar-r { justify-content: space-between; }
  .ca-bar-r select { flex: 1; }
  .ca-row { grid-template-columns: 24px 56px minmax(0, 1fr); gap: 4px 10px; }
  .ca-head { grid-template-columns: 24px minmax(0, 1fr); }
  .ca-head > :not(:first-child):not(:nth-child(3)) { display: none; }
  .ca-row > .ca-row-st { grid-column: 3; }
  .ca-thumb { width: 56px; }
  .ca-row .ca-acts { grid-column: 1 / -1; justify-self: end; }
  .ca-ed-h { flex-wrap: wrap; }
  .ca-ed-ttl { flex-basis: calc(100% - 60px); }
  .ca-ed-acts { flex-basis: 100%; }
  .ca-ed-acts .btn { flex: 1; }
  .ca-ed-main { padding: 14px; }
  .ca-tb { top: -12px; }
  .ca-doc { min-height: 240px; padding: 12px; }
}
