/* THC News: the public page ([thc_news]) and the small strip ([thc_news_latest]).
   Colors are the theme's tokens (--thc-*, then --wp--preset--color--*, then the brand literals), so THC Core's Display
   switch flips them for Dark (html[data-thc-theme="dark"]) and High contrast (html[data-thc-contrast="high"]) with no rules of
   our own. House rules (WB-147): text on an accent fill uses var(--thc-on-accent); a rule that sets a background also sets the
   text color in every state it changes; the dyslexia-friendly and Hyperlegible fonts come from Core's rule on html[data-thc-font].
   Phone first: one column, tap targets of 44px or more, nothing wider than the screen at 390px. No floating, fixed or sticky
   elements. Sizes in rem so Core's text-size switch carries through. Motion only when the visitor has not asked to reduce it. */

.thc-news, .thc-news-strip {
  --n-canvas: var(--thc-canvas, var(--wp--preset--color--base, #f7f1e4));
  --n-raised: var(--thc-surface-raised, var(--wp--preset--color--accent-5, #fcf8ef));
  --n-muted: var(--thc-surface-muted, var(--wp--preset--color--accent-4, #ece4d9));
  --n-border: var(--thc-border, var(--wp--preset--color--accent-6, #d9d0bc));
  --n-text: var(--thc-text, var(--wp--preset--color--contrast, #332d25));
  --n-leaf: var(--thc-leaf, var(--wp--preset--color--accent-1, #5e7d53));
  --n-deep: var(--thc-leaf-deep, var(--wp--preset--color--accent-3, #3f5c3b));
  --n-stroke: var(--thc-control-stroke, var(--wp--preset--color--control-stroke, #8a7f66));
  --n-on: var(--thc-on-accent, #ffffff);
  --n-head: var(--wp--preset--font-family--platypi, "THC Platypi", Georgia, serif);
  --n-radius: var(--thc-radius-md, 12px);
  color: var(--n-text);
  overflow-wrap: anywhere;
  --n-hide: var(--thc-error, #8a2f29);
  /* 0.2.0: one color per subject, for the card's slim edge and its tag. Each is at least 3:1 against every surface it sits on
     (card, page and muted fills), and every tag also carries its written label and its own shape, so color is never the only
     signal. The ratios are listed in the plugin README. */
  --n-c-research: #4E6CA9; --n-c-conservation: #287747; --n-c-nonnative-species: #9C3207; --n-c-venom-and-medicine: #5D4078;
  --n-c-field-and-natural-history: #7F8227; --n-c-husbandry-and-welfare: #348E9B; --n-c-human-interest: #B14C7E;
  --n-c-event: #EC4459; --n-c-policy-and-law: #3A514D;
}
html[data-thc-theme="dark"] .thc-news {
  --n-c-research: #87A1E3; --n-c-conservation: #21B465; --n-c-nonnative-species: #DA663A; --n-c-venom-and-medicine: #9171AC;
  --n-c-field-and-natural-history: #BABA5E; --n-c-husbandry-and-welfare: #2EDCF2; --n-c-human-interest: #EE84B5;
  --n-c-event: #FEB6B6; --n-c-policy-and-law: #6A837E;
}
html[data-thc-contrast="high"] .thc-news {
  --n-c-research: #2E518C; --n-c-conservation: #005A2D; --n-c-nonnative-species: #6A2409; --n-c-venom-and-medicine: #40255A;
  --n-c-field-and-natural-history: #636707; --n-c-husbandry-and-welfare: #107784; --n-c-human-interest: #922F62;
  --n-c-event: #CF2544; --n-c-policy-and-law: #203632;
}
html[data-thc-contrast="high"][data-thc-theme="dark"] .thc-news {
  --n-c-research: #93ADF0; --n-c-conservation: #34C070; --n-c-nonnative-species: #E56F42; --n-c-venom-and-medicine: #9979B5;
  --n-c-field-and-natural-history: #C8C86B; --n-c-husbandry-and-welfare: #74E9FB; --n-c-human-interest: #FC90C1;
  --n-c-event: #FFB7B7; --n-c-policy-and-law: #728B86;
}
.thc-news *, .thc-news *::before, .thc-news *::after,
.thc-news-strip *, .thc-news-strip *::before, .thc-news-strip *::after { box-sizing: border-box; }
.thc-news [hidden], .thc-news-strip [hidden] { display: none !important; }
:where(.thc-news) :where(button, input, textarea) { font: inherit; color: inherit; }
.thc-news :focus-visible, .thc-news-strip :focus-visible { outline: 3px solid var(--n-deep); outline-offset: 2px; }
.thc-news__sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap;
}
.thc-news { max-width: 56rem; margin-inline: auto; }
.thc-news p, .thc-news ul, .thc-news ol { margin-block: 0; }
.thc-news ul, .thc-news ol { padding: 0; list-style: none; }

/* ---------- How we gather these stories ---------- */
.thc-news__how { margin-block-end: 1rem; max-width: 46rem; font-size: .95rem; line-height: 1.5; }
.thc-news__how > summary {
  display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none;
  color: var(--n-deep); font-weight: 600; text-decoration: underline; text-underline-offset: .15em;
}
.thc-news__how > summary::-webkit-details-marker { display: none; }
.thc-news__how > summary::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-inline-start: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.15em) rotate(45deg); }
.thc-news__how[open] > summary::after { transform: translateY(.1em) rotate(-135deg); }
.thc-news__how-body { margin-block-start: .25rem; padding: .75rem 1rem; background: var(--n-raised); color: var(--n-text); border: 1px solid var(--n-border); border-radius: var(--n-radius); }

/* ---------- topic bar ---------- */
.thc-news__topics { margin-block-end: 1rem; }
.thc-news__scroll { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-block: .25rem; margin-inline: -.25rem; padding-inline: .25rem; }
.thc-news__scroll.has-more-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.75rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2.75rem), transparent); }
.thc-news__scroll.has-more-start { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 2.75rem), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 2.75rem), transparent); }
.thc-news__scroll.has-more-start.has-more-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 2.75rem, #000 calc(100% - 2.75rem), transparent); mask-image: linear-gradient(to right, transparent, #000 2.75rem, #000 calc(100% - 2.75rem), transparent); }
.thc-news__pills { display: flex; flex-wrap: nowrap; gap: .5rem; width: max-content; min-width: 100%; }
.thc-news__pills > li { flex: none; }
.thc-news__pills--more { width: auto; min-width: 0; flex-wrap: wrap; margin-block-start: .5rem; }
/* 0.9.0: "By place" starts the regions on a line of their own. Layout only: the text keeps the page's own color. */
.thc-news__pills--more > .thc-news__pills-label { flex: 0 0 100%; margin-block-start: .25rem; font-size: .875rem; font-weight: 700; }
.thc-news__pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1rem;
  border: 1px solid var(--n-deep); border-radius: 999px; background: var(--n-raised); color: var(--n-deep);
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.thc-news__pill:hover { background: var(--n-muted); color: var(--n-text); text-decoration: none; }
.thc-news__pill:focus-visible { background: var(--n-raised); color: var(--n-deep); outline: 3px solid var(--n-deep); outline-offset: 2px; }
.thc-news__pill[aria-current="true"] { background: var(--n-deep); color: var(--n-on); border-color: var(--n-deep); }
.thc-news__pill[aria-current="true"]:hover, .thc-news__pill[aria-current="true"]:focus-visible { background: var(--n-deep); color: var(--n-on); }
.thc-news__morebtn { border-style: dashed; }
.thc-news__morebtn[aria-expanded="true"] { background: var(--n-muted); color: var(--n-text); }
.thc-news__morebtn[aria-expanded="true"]:hover, .thc-news__morebtn[aria-expanded="true"]:focus-visible { background: var(--n-muted); color: var(--n-text); }
.thc-news__pill.is-hidden-topic { border-style: dashed; font-style: italic; }
.thc-news.has-js .thc-news__pills--more[hidden] { display: none !important; }
/* Without JavaScript the "More" button does nothing, so it is hidden and the rest of the topics are simply shown. */
.thc-news:not(.has-js) .thc-news__more-li { display: none; }
@media (min-width: 760px) {
  .thc-news__scroll { overflow: visible; }
  .thc-news__scroll.has-more-end, .thc-news__scroll.has-more-start { -webkit-mask-image: none; mask-image: none; }
  .thc-news__pills { flex-wrap: wrap; width: auto; min-width: 0; }
}

/* ---------- the Topics button and the plain lines under the bar (0.2.0) ---------- */
.thc-news__tools { display: flex; margin-block: .5rem .6rem; }
/* Without scripting the button would do nothing, so the whole row is left out (it is in the markup so the page does not shift when the script starts). */
@media (scripting: none) { .thc-news__tools { display: none; } }
.thc-news__toolsbtn, .thc-news__savedbtn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem; border: 2px solid var(--n-deep); border-radius: 10px;
  background: var(--n-raised); color: var(--n-deep); font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
}
.thc-news__toolsbtn:hover, .thc-news__savedbtn:hover { background: var(--n-muted); color: var(--n-text); }
.thc-news__toolsbtn:focus-visible, .thc-news__savedbtn:focus-visible { background: var(--n-raised); color: var(--n-deep); outline: 3px solid var(--n-deep); outline-offset: 2px; }
.thc-news__tbadge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--n-deep); color: var(--n-on); font-size: .8rem; font-weight: 700; }
/* 0.4.0: saved stories */
.thc-news__tools { flex-wrap: wrap; gap: .5rem; }
.thc-news__savedbtn .thc-news-card__saveicon, .thc-news-card__save .thc-news-card__saveicon { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.thc-news__savedbtn[aria-pressed="true"] { background: var(--n-deep); color: var(--n-on); }
.thc-news__savedbtn[aria-pressed="true"]:hover { background: var(--n-deep); color: var(--n-on); text-decoration: underline; text-underline-offset: .15em; }
.thc-news__savedbtn[aria-pressed="true"]:focus-visible { background: var(--n-deep); color: var(--n-on); outline: 3px solid var(--n-text); outline-offset: 2px; }
.thc-news__savedbtn[aria-pressed="true"] .thc-news-card__saveicon { fill: currentColor; }
.thc-news__savedbtn[aria-pressed="true"] .thc-news__tbadge { background: var(--n-on); color: var(--n-deep); }
.thc-news-card__save {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--n-deep); border-radius: 10px;
  background: var(--n-raised); color: var(--n-deep); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.thc-news-card__save:hover { background: var(--n-muted); color: var(--n-text); }
.thc-news-card__save:focus-visible { background: var(--n-raised); color: var(--n-deep); outline: 3px solid var(--n-deep); outline-offset: 2px; }
.thc-news-card__save[aria-pressed="true"] { background: var(--n-deep); color: var(--n-on); }
.thc-news-card__save[aria-pressed="true"]:hover { background: var(--n-deep); color: var(--n-on); text-decoration: underline; text-underline-offset: .15em; }
.thc-news-card__save[aria-pressed="true"]:focus-visible { background: var(--n-deep); color: var(--n-on); outline: 3px solid var(--n-text); outline-offset: 2px; }
.thc-news-card__save[aria-pressed="true"] .thc-news-card__saveicon { fill: currentColor; }
.thc-news-card__savemsg { margin: .4rem 0 0; font-size: .9rem; color: var(--n-text); }
a.thc-news__savedsignin, a.thc-news__savedsignin:hover, a.thc-news__savedsignin:focus { color: var(--n-text); text-decoration: underline; text-underline-offset: .15em; }
.thc-news__lines { display: grid; gap: .5rem; }
/* 0.5.0: the line between the Show first stories and the rest */
.thc-news__sep { list-style: none; margin: .25rem 0 0; padding: .5rem 0 0; border-block-start: 2px solid var(--n-border, currentColor); }
.thc-news__sep p { margin: 0; font-size: .95rem; font-weight: 700; color: var(--n-text); }
.thc-news__lines:not(:empty) { margin-block-end: .75rem; }
.thc-news__filter, .thc-news__hidenote {
  font-size: .95rem; line-height: 1.5; background: var(--n-muted); color: var(--n-text); border: 1px solid var(--n-border);
  border-radius: var(--n-radius); padding: .4rem .85rem;
}
.thc-news__linkbtn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .55rem; border: 0; border-radius: 8px; background: transparent; color: var(--n-deep);
  font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; vertical-align: middle;
}
.thc-news__linkbtn:hover { background: var(--n-raised); color: var(--n-text); }
.thc-news__linkbtn:focus-visible { background: transparent; color: var(--n-deep); outline: 3px solid var(--n-deep); outline-offset: 0; }

/* ---------- small lines ---------- */
.thc-news__since { font-size: .95rem; font-weight: 600; color: var(--n-deep); margin-block-end: .75rem; }
.thc-news__saved { font-size: .92rem; background: var(--n-muted); color: var(--n-text); border: 1px solid var(--n-border); border-radius: var(--n-radius); padding: .6rem .85rem; margin-block-end: .75rem; }
.thc-news__state { background: var(--n-raised); color: var(--n-text); border: 1px dashed var(--n-border); border-radius: var(--n-radius); padding: 1.25rem 1rem; line-height: 1.5; }
.thc-news__state a { color: var(--n-deep); font-weight: 600; text-underline-offset: .15em; }
.thc-news__state button { margin-block-start: .6rem; }
.thc-news__body[aria-busy="true"] { opacity: .85; }

/* ---------- cards ---------- */
.thc-news__list { display: grid; gap: 1rem; }
.thc-news-card {
  position: relative; background: var(--n-raised); color: var(--n-text); border: 1px solid var(--n-border);
  border-radius: var(--thc-radius-lg, 16px); padding: 1rem 1rem 1.1rem; display: grid; gap: .5rem; min-width: 0;
}
@media (min-width: 600px) { .thc-news-card { padding: 1.25rem 1.5rem 1.35rem; } }
.thc-news-card.is-new { border-inline-start: 5px solid var(--n-deep); }
.thc-news-card.is-evergreen { border-style: dashed; border-color: var(--n-stroke); background: var(--n-canvas); }
.thc-news-card__kind { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--n-deep); display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.thc-news-card__new { color: var(--n-text); font-weight: 700; text-transform: none; letter-spacing: 0; }
.thc-news-card__title { margin: 0; font-family: var(--n-head); font-weight: 600; font-size: clamp(1.2rem, 1.1rem + .5vw, 1.45rem); line-height: 1.25; letter-spacing: -.01em; color: var(--n-text); text-wrap: balance; }
.thc-news-card__source { font-size: .92rem; display: flex; flex-wrap: wrap; gap: 0 .9rem; color: var(--n-text); }
.thc-news-card__src-name { font-weight: 600; }
.thc-news-card__blurb { font-size: 1.02rem; line-height: 1.55; max-width: 62ch; }
.thc-news-card__notes { display: flex; flex-wrap: wrap; gap: .4rem; }
.thc-news-card__notes li { font-size: .85rem; font-weight: 600; padding: .3rem .6rem; border: 1px solid var(--n-stroke); border-radius: 8px; background: var(--n-muted); color: var(--n-text); }
.thc-news-card__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.thc-news-card__tags li { font-size: .78rem; font-weight: 600; line-height: 1; padding: .35rem .55rem; border: 1px solid var(--n-border); border-radius: 999px; background: var(--n-muted); color: var(--n-text); }
/* 0.2.0: subject colors. The card's slim edge and its tag take the subject's color; the tag always writes the subject out and
   carries its own shape. Where it came from gets a quieter, hue-free treatment: a filled chip for a paper, an outlined pill for
   mass media, a dashed square chip for an agency. */
.thc-news [data-cat="research"] { --cat: var(--n-c-research); --shape: circle(50%); }
.thc-news [data-cat="conservation"] { --cat: var(--n-c-conservation); --shape: polygon(50% 0, 100% 100%, 0 100%); }
.thc-news [data-cat="nonnative-species"] { --cat: var(--n-c-nonnative-species); --shape: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.thc-news [data-cat="venom-and-medicine"] { --cat: var(--n-c-venom-and-medicine); --shape: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.thc-news [data-cat="field-and-natural-history"] { --cat: var(--n-c-field-and-natural-history); --shape: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.thc-news [data-cat="husbandry-and-welfare"] { --cat: var(--n-c-husbandry-and-welfare); --shape: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%); }
.thc-news [data-cat="human-interest"] { --cat: var(--n-c-human-interest); --shape: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.thc-news [data-cat="event"] { --cat: var(--n-c-event); --shape: polygon(0 0, 100% 0, 50% 100%); }
.thc-news [data-cat="policy-and-law"] { --cat: var(--n-c-policy-and-law); --shape: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.thc-news-card[data-cat] { box-shadow: inset 6px 0 0 var(--cat); padding-inline-start: calc(1rem + 3px); }
html[dir="rtl"] .thc-news-card[data-cat] { box-shadow: inset -6px 0 0 var(--cat); }
@media (min-width: 600px) { .thc-news-card[data-cat] { padding-inline-start: calc(1.5rem + 3px); } }
.thc-news-card__tags li[data-cat] {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem .3rem .45rem; border: 2px solid var(--cat);
  background: var(--n-raised); color: var(--n-text);
}
.thc-news-card__tags li[data-cat]::before { content: ""; flex: none; width: .72rem; height: .72rem; background: var(--cat); color: var(--n-text); clip-path: var(--shape); }
.thc-news-card__kindname { display: inline-block; line-height: 1.2; }
.thc-news-card--paper .thc-news-card__kindname { padding: .2rem .55rem; border: 2px solid var(--n-deep); border-radius: 4px; background: var(--n-deep); color: var(--n-on); }
.thc-news-card--media .thc-news-card__kindname { padding: .2rem .7rem; border: 2px solid var(--n-deep); border-radius: 999px; background: var(--n-raised); color: var(--n-deep); }
.thc-news-card--agency .thc-news-card__kindname { padding: .2rem .55rem; border: 2px dashed var(--n-deep); border-radius: 0; background: var(--n-raised); color: var(--n-deep); }
.thc-news-card.is-evergreen .thc-news-card__kindname { background: transparent; color: var(--n-deep); }
.thc-news-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-block-start: .35rem; }
.thc-news-card__read, .thc-news__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.1rem;
  border: 1px solid var(--n-deep); border-radius: 10px; background: var(--n-deep); color: var(--n-on);
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.thc-news-card__read:hover, .thc-news__btn:hover { background: var(--n-deep); color: var(--n-on); text-decoration: underline; text-underline-offset: .15em; }
.thc-news-card__read:focus-visible, .thc-news__btn:focus-visible { background: var(--n-deep); color: var(--n-on); outline: 3px solid var(--n-text); outline-offset: 2px; }
.thc-news__btn[disabled] { opacity: .65; cursor: default; }
.thc-news__btn--quiet { background: var(--n-raised); color: var(--n-deep); }
.thc-news__btn--quiet:hover { background: var(--n-muted); color: var(--n-text); text-decoration: none; }
.thc-news__btn--quiet:focus-visible { background: var(--n-raised); color: var(--n-deep); outline: 3px solid var(--n-deep); }
.thc-news-card__report {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem; border: 0; border-radius: 10px;
  background: transparent; color: var(--n-text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em;
}
.thc-news-card__report:hover { background: var(--n-muted); color: var(--n-text); }
.thc-news-card__report:focus-visible { background: transparent; color: var(--n-text); outline: 3px solid var(--n-deep); outline-offset: 2px; }
.thc-news:not(.has-js) .thc-news-card__report { display: none; }

.thc-news__foot { margin-block-start: 1.25rem; display: grid; gap: .6rem; justify-items: start; }
.thc-news__foot a { color: var(--n-deep); font-weight: 600; text-underline-offset: .15em; display: inline-flex; align-items: center; min-height: 44px; }
.thc-news__older-msg { font-size: .92rem; }

/* ---------- the report dialog ---------- */
.thc-news__dialog {
  width: min(32rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; padding: 1.1rem 1.1rem 1rem;
  border: 2px solid var(--n-deep); border-radius: 16px; background: var(--n-raised); color: var(--n-text);
  font-size: 1rem; line-height: 1.45;
}
.thc-news__dialog::backdrop { background: rgba(20, 18, 14, .6); }
.thc-news__dialog h2 { margin: 0 0 .4rem; font-family: var(--n-head); font-size: 1.4rem; line-height: 1.2; color: var(--n-text); }
.thc-news__dlg-card { margin: 0 0 .6rem; font-weight: 600; }
.thc-news__dialog p { margin: 0 0 .75rem; }
.thc-news__fieldset { border: 0; padding: 0; margin: 0 0 .75rem; min-width: 0; }
.thc-news__fieldset legend { padding: 0; font-weight: 700; margin-block-end: .25rem; }
.thc-news__radio { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; }
.thc-news__radio input { width: 1.25rem; height: 1.25rem; margin: 0; flex: none; accent-color: var(--n-deep); }
.thc-news__label { display: block; font-weight: 700; margin-block-end: .25rem; }
.thc-news__textarea {
  display: block; width: 100%; min-height: 5.5rem; padding: .6rem .7rem; border: 2px solid var(--n-stroke); border-radius: 10px;
  background: var(--n-canvas); color: var(--n-text); resize: vertical;
}
.thc-news__count { font-size: .85rem; margin-block-start: .25rem; text-align: end; }
.thc-news__msg { min-height: 1.4em; font-weight: 600; }
.thc-news__btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-block-start: .5rem; }

/* ---------- the Topics panel (a dialog) ---------- */
.thc-news__dialog--topics { width: min(46rem, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); padding: 0; overflow: hidden; }
.thc-news__dialog--topics[open] { display: flex; flex-direction: column; }
.thc-news__pbody { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 1rem 1.1rem .5rem; overscroll-behavior: contain; }
.thc-news__pbody h2 { margin: 0 0 .4rem; }
.thc-news__pintro { font-size: .95rem; line-height: 1.5; margin: 0 0 .75rem; }
.thc-news__pwarn { font-size: .92rem; background: var(--n-muted); color: var(--n-text); border: 1px solid var(--n-border); border-radius: var(--n-radius); padding: .6rem .85rem; margin: 0 0 .75rem; }
.thc-news__pkind { margin-block-end: 1rem; }
.thc-news__pkind h3 { margin: 0 0 .5rem; font-family: var(--n-head); font-size: 1.1rem; line-height: 1.2; color: var(--n-text); }
.thc-news__pgrid { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .thc-news__pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.thc-news__topic { margin: 0; min-width: 0; padding: .35rem .6rem .6rem; border: 1px solid var(--n-border); border-radius: 12px; background: var(--n-canvas); color: var(--n-text); }
.thc-news__topic legend { padding: 0 .25rem; font-size: .95rem; font-weight: 700; }
.thc-news__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.thc-news__opt { position: relative; display: flex; min-height: 44px; min-width: 0; cursor: pointer; }
.thc-news__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.thc-news__opt span {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-width: 0; padding: .25rem; border: 2px solid var(--n-stroke); border-radius: 10px;
  background: var(--n-raised); color: var(--n-text); font-size: .9rem; font-weight: 600; line-height: 1.15;
}
.thc-news__opt input:not(:checked):hover + span { background: var(--n-muted); color: var(--n-text); }
.thc-news__opt input:checked + span { background: var(--n-muted); color: var(--n-text); border-color: var(--n-deep); box-shadow: inset 0 0 0 1px var(--n-deep); font-weight: 700; }
.thc-news__opt--first input:checked + span { background: var(--n-deep); color: var(--n-on); border-color: var(--n-deep); box-shadow: none; }
.thc-news__opt--hide input:checked + span { background: var(--n-hide); color: var(--n-on); border-color: var(--n-hide); box-shadow: none; }
.thc-news__opt input:focus-visible + span { outline: 3px solid var(--n-text); outline-offset: 2px; }
.thc-news__pnote { margin: .4rem 0 0; font-size: .85rem; line-height: 1.4; }
.thc-news__pfoot { flex: none; padding: .7rem 1.1rem .9rem; border-top: 1px solid var(--n-border); background: var(--n-raised); color: var(--n-text); }
.thc-news__pfoot .thc-news__btns { margin-block-start: 0; }
.thc-news__pmsg { min-height: 1.4em; margin: 0 0 .35rem; font-weight: 600; font-size: .92rem; }
.thc-news__pmsg:empty { min-height: 0; margin: 0; }

/* ---------- the small strip ---------- */
.thc-news-strip { background: var(--n-raised); color: var(--n-text); border: 1px solid var(--n-border); border-radius: var(--thc-radius-lg, 16px); padding: 1rem 1.1rem; max-width: 40rem; }
.thc-news-strip__h { margin: 0 0 .5rem; font-family: var(--n-head); font-size: 1.3rem; line-height: 1.2; color: var(--n-text); }
.thc-news-strip ul { list-style: none; margin: 0; padding: 0; }
.thc-news-strip__item { display: grid; gap: .1rem; padding: .6rem 0; border-block-start: 1px solid var(--n-border); }
.thc-news-strip__item:first-child { border-block-start: 0; }
.thc-news-strip__kind { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--n-deep); }
.thc-news-strip__link { color: var(--n-text); font-weight: 600; line-height: 1.3; text-underline-offset: .15em; }
a.thc-news-strip__link:hover { color: var(--n-deep); }
.thc-news-strip__meta { font-size: .85rem; display: flex; flex-wrap: wrap; gap: 0 .75rem; }
.thc-news-strip__all { margin: .5rem 0 0; }
.thc-news-strip__all a { color: var(--n-deep); font-weight: 600; text-underline-offset: .15em; display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-thc-motion="reduce"]) .thc-news__pill, html:not([data-thc-motion="reduce"]) .thc-news-card__read,
  html:not([data-thc-motion="reduce"]) .thc-news__btn, html:not([data-thc-motion="reduce"]) .thc-news__opt span { transition: background-color .15s ease, color .15s ease; }
  html:not([data-thc-motion="reduce"]) .thc-news__scroll { scroll-behavior: smooth; }
}
html[data-thc-motion="reduce"] .thc-news__scroll { scroll-behavior: auto; }

/* Dark: the on-accent text is Core's own token; the dialog backdrop gets a little darker. */
html[data-thc-theme="dark"] .thc-news__dialog::backdrop { background: rgba(0, 0, 0, .7); }
/* High contrast: solid borders, links underlined, a stronger focus ring (Core adds the 3px outline on :focus-visible). */
html[data-thc-contrast="high"] .thc-news-card, html[data-thc-contrast="high"] .thc-news__state, html[data-thc-contrast="high"] .thc-news-strip { border-width: 2px; border-color: var(--n-text); }
html[data-thc-contrast="high"] .thc-news-card__tags li:not([data-cat]), html[data-thc-contrast="high"] .thc-news-card__notes li { border-color: var(--n-text); }
html[data-thc-contrast="high"] .thc-news-card__tags li[data-cat] { border-width: 3px; }
html[data-thc-contrast="high"] .thc-news__opt span, html[data-thc-contrast="high"] .thc-news__topic, html[data-thc-contrast="high"] .thc-news__filter, html[data-thc-contrast="high"] .thc-news__hidenote { border-color: var(--n-text); }
html[data-thc-contrast="high"] .thc-news__opt input:checked + span { border-color: var(--n-text); }
html[data-thc-contrast="high"] .thc-news-strip__link { text-decoration: underline; }
@media (forced-colors: active) {
  .thc-news__pill[aria-current="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .thc-news-card.is-new { border-inline-start-color: Highlight; }
  .thc-news-card[data-cat] { box-shadow: none; border-inline-start: 6px solid CanvasText; }
  .thc-news-card__tags li[data-cat]::before { forced-color-adjust: none; background: CanvasText; color: CanvasText; }
  .thc-news__opt input:checked + span { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
}
@media print {
  .thc-news__topics, .thc-news__tools, .thc-news__lines, .thc-news-card__actions, .thc-news__foot, .thc-news__since, .thc-news__saved { display: none !important; }
}
