@charset "UTF-8";
/* ==========================================================================
   NDM Content System v2 — article + archive surfaces
   ---------------------------------------------------------------------------
   The chrome is dark (brand identity). Long-form Hebrew reads better on a
   light surface, so content pages invert. These tokens are the light half of
   the system; ndm-design-system.css holds the dark half. One scale, one
   rhythm, shared by single.php and category.php.

   Every colour pair below is annotated with its measured contrast ratio.
   ========================================================================== */

:root {
  /* Light surfaces */
  --ndm-c-bg:       #f5f6f8;
  --ndm-c-surface:  #ffffff;
  --ndm-c-surface-2:#fafbfc;
  --ndm-c-border:   #e3e6ec;
  --ndm-c-border-2: #cfd4de;

  /* Light text — ratios measured on --ndm-c-surface (#fff) */
  --ndm-c-text:     #14161f;   /* 16.9:1 — headings */
  --ndm-c-text-2:   #3b4150;   /*  9.6:1 — body */
  --ndm-c-text-3:   #616878;   /*  5.3:1 — meta, captions */

  /* Light-surface brand — the dark-chrome red is too light on white */
  --ndm-c-red:      #b3241a;   /*  7.6:1 on white */
  --ndm-c-red-soft: #fdf2f1;
  --ndm-c-gold-ink: #8a5a00;   /*  5.4:1 on white — eyebrow text */

  /* Reading measure: Hebrew sits comfortably a little wider than Latin */
  --ndm-measure:    68ch;
}

/* ---------- Page shell ---------- */
.ndm-page {
  background: var(--ndm-c-bg);
  font-family: 'Heebo', system-ui, Arial, sans-serif;
  color: var(--ndm-c-text-2);
  direction: rtl;
}
.ndm-page__inner {
  width: min(100%, var(--ndm-max));
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(16px, 4vw, 48px) clamp(3rem, 7vw, 5.5rem);
}
.ndm-page :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ndm-c-red);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Breadcrumbs ---------- */
.ndm-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0 0 clamp(1rem, 2.5vw, 1.75rem);
  padding: 0;
  font-size: var(--ndm-fs-xs);
  color: var(--ndm-c-text-3);
}
.ndm-crumbs li { display: inline-flex; align-items: center; gap: .25rem; }
.ndm-crumbs a {
  color: var(--ndm-c-text-3);
  text-decoration: none;
  padding: .3rem .35rem;
  border-radius: 6px;
  transition: color var(--ndm-fast) var(--ndm-ease), background var(--ndm-fast) var(--ndm-ease);
}
.ndm-crumbs a:hover { color: var(--ndm-c-red); background: var(--ndm-c-red-soft); }
.ndm-crumbs__sep { opacity: .5; }
.ndm-crumbs [aria-current="page"] { color: var(--ndm-c-text-2); font-weight: 600; }

/* ---------- Section headings on light ---------- */
.ndm-c-h1, .ndm-c-h2, .ndm-c-h3 {
  font-family: 'Rubik', 'Heebo', sans-serif;
  color: var(--ndm-c-text);
  line-height: 1.16;
  letter-spacing: -.015em;
  text-wrap: balance;
  margin: 0;
}
.ndm-c-h1 { font-size: var(--ndm-fs-3xl); font-weight: 900; }
.ndm-c-h2 { font-size: var(--ndm-fs-2xl); font-weight: 800; line-height: 1.2; }
.ndm-c-h3 { font-size: var(--ndm-fs-xl);  font-weight: 700; line-height: 1.3; }

.ndm-c-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: var(--ndm-fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ndm-c-gold-ink);
}

/* ---------- Cards (archive / related) ---------- */
.ndm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ndm-card-post {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius);
  overflow: hidden;
  transition: transform var(--ndm-base) var(--ndm-ease),
              box-shadow var(--ndm-base) var(--ndm-ease),
              border-color var(--ndm-base) var(--ndm-ease);
}
.ndm-card-post:hover {
  transform: translateY(-4px);
  border-color: var(--ndm-c-border-2);
  box-shadow: 0 18px 44px -22px rgba(20,22,31,.28);
}

/* aspect-ratio reserves the space before the image loads — this is the CLS fix */
.ndm-card-post__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--ndm-c-surface-2);
  overflow: hidden;
}
.ndm-card-post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ndm-ease);
}
.ndm-card-post:hover .ndm-card-post__media img { transform: scale(1.04); }

.ndm-card-post__cat {
  position: absolute;
  inset-block-start: .7rem;
  inset-inline-start: .7rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(15,17,24,.82);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: var(--ndm-fs-xs);
  font-weight: 700;
  text-decoration: none;
}

.ndm-card-post__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: .55rem;
  padding: clamp(.95rem, 2vw, 1.35rem);
}
.ndm-card-post__title {
  margin: 0;
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: var(--ndm-fs-lg);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ndm-c-text);
}
.ndm-card-post__title a { color: inherit; text-decoration: none; }
/* Whole card is clickable, but the accessible name still comes from the link */
.ndm-card-post__title a::after { content: ""; position: absolute; inset: 0; }
.ndm-card-post { position: relative; }

.ndm-card-post__excerpt {
  margin: 0;
  font-size: var(--ndm-fs-sm);
  line-height: 1.7;
  color: var(--ndm-c-text-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ndm-card-post__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-block-start: auto;
  padding-block-start: .75rem;
  border-block-start: 1px solid var(--ndm-c-border);
  font-size: var(--ndm-fs-xs);
  color: var(--ndm-c-text-3);
}
.ndm-card-post__meta span { display: inline-flex; align-items: center; gap: .3rem; }
.ndm-card-post__meta .ndm-icon { width: 14px; height: 14px; }

/* ---------- Pagination ---------- */
.ndm-pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-block-start: clamp(2rem, 5vw, 3.5rem);
}
.ndm-pager .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  padding-inline: .75rem;
  border-radius: 12px;
  border: 1px solid var(--ndm-c-border);
  background: var(--ndm-c-surface);
  color: var(--ndm-c-text-2);
  font-weight: 700;
  font-size: var(--ndm-fs-sm);
  text-decoration: none;
  transition: background var(--ndm-fast) var(--ndm-ease),
              border-color var(--ndm-fast) var(--ndm-ease);
}
.ndm-pager .page-numbers:hover {
  background: var(--ndm-c-red-soft);
  border-color: var(--ndm-c-red);
  color: var(--ndm-c-red);
}
.ndm-pager .page-numbers.current {
  background: var(--ndm-c-red);
  border-color: var(--ndm-c-red);
  color: #fff;
}
.ndm-pager .page-numbers.dots {
  border-color: transparent;
  background: none;
}

/* ---------- Prose (article body) ---------- */
.ndm-prose {
  max-width: var(--ndm-measure);
  font-size: var(--ndm-fs-base);
  line-height: 1.85;
  color: var(--ndm-c-text-2);
  text-wrap: pretty;
}
.ndm-prose > * + * { margin-block-start: 1.15em; }

.ndm-prose :is(h2, h3, h4) {
  font-family: 'Rubik', 'Heebo', sans-serif;
  color: var(--ndm-c-text);
  line-height: 1.25;
  letter-spacing: -.01em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--ndm-hdr-h, 108px) + 1.5rem);
}
.ndm-prose h2 { font-size: var(--ndm-fs-2xl); font-weight: 800; margin-block-start: 2em; }
.ndm-prose h3 { font-size: var(--ndm-fs-xl);  font-weight: 700; margin-block-start: 1.7em; }
.ndm-prose h4 { font-size: var(--ndm-fs-lg);  font-weight: 700; margin-block-start: 1.5em; }

.ndm-prose a {
  color: var(--ndm-c-red);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: .08em;
}
.ndm-prose a:hover { text-decoration-thickness: .14em; }

.ndm-prose :is(ul, ol) { padding-inline-start: 1.4em; }
.ndm-prose li + li { margin-block-start: .5em; }
.ndm-prose li::marker { color: var(--ndm-c-red); }

.ndm-prose blockquote {
  margin-inline: 0;
  padding: 1.1rem 1.35rem;
  border-inline-start: 4px solid var(--ndm-c-red);
  border-radius: 0 var(--ndm-radius-sm) var(--ndm-radius-sm) 0;
  background: var(--ndm-c-red-soft);
  color: var(--ndm-c-text);
  font-size: var(--ndm-fs-lg);
  line-height: 1.65;
}
.ndm-prose blockquote p { margin: 0; }

.ndm-prose img,
.ndm-prose figure img {
  border-radius: var(--ndm-radius-sm);
  display: block;
  height: auto;
}
.ndm-prose figcaption {
  margin-block-start: .5rem;
  font-size: var(--ndm-fs-xs);
  color: var(--ndm-c-text-3);
  text-align: center;
}

/* Tables scroll inside their own container rather than breaking the page */
.ndm-prose__table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ndm-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ndm-fs-sm);
  background: var(--ndm-c-surface);
  border-radius: var(--ndm-radius-sm);
  overflow: hidden;
}
.ndm-prose :is(th, td) {
  padding: .7rem .85rem;
  border: 1px solid var(--ndm-c-border);
  text-align: start;
}
.ndm-prose th {
  background: var(--ndm-c-surface-2);
  color: var(--ndm-c-text);
  font-weight: 700;
}

.ndm-prose :is(code, kbd) {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  padding: .12em .38em;
  border-radius: 6px;
  background: #eef0f4;
  color: #23262f;
  direction: ltr;
  unicode-bidi: embed;
}
.ndm-prose pre {
  padding: 1rem 1.1rem;
  border-radius: var(--ndm-radius-sm);
  background: #14161f;
  color: #e8eaf0;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}
.ndm-prose pre code { background: none; color: inherit; padding: 0; }

.ndm-prose hr {
  border: 0;
  border-block-start: 1px solid var(--ndm-c-border);
  margin-block: 2.25em;
}

/* ==========================================================================
   ARCHIVE
   ========================================================================== */
.ndm-arc-hero {
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-block-end: clamp(1.75rem, 4vw, 2.75rem);
  position: relative;
  overflow: hidden;
}
/* Brand hairline along the inline-start edge */
.ndm-arc-hero::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--ndm-c-red), var(--ndm-gold));
}
.ndm-arc-hero__title { margin-block: .5rem .75rem; }
.ndm-arc-hero__desc {
  max-width: var(--ndm-measure);
  font-size: var(--ndm-fs-lg);
  line-height: 1.7;
  color: var(--ndm-c-text-2);
}
.ndm-arc-hero__desc p:last-child { margin-block-end: 0; }
.ndm-arc-hero__count {
  margin-block: 1rem 0;
  font-size: var(--ndm-fs-sm);
  font-weight: 600;
  color: var(--ndm-c-text-3);
}

.ndm-empty {
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1rem;
}

/* Sibling categories */
.ndm-arc-more {
  margin-block-start: clamp(2.5rem, 6vw, 4.5rem);
  padding-block-start: clamp(1.75rem, 4vw, 2.5rem);
  border-block-start: 1px solid var(--ndm-c-border);
}
.ndm-arc-more__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: .5rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}
.ndm-arc-more__list a {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 56px;
  padding: .5rem .75rem;
  border: 1px solid var(--ndm-c-border);
  border-radius: 14px;
  background: var(--ndm-c-surface);
  color: var(--ndm-c-text-2);
  font-size: var(--ndm-fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--ndm-fast) var(--ndm-ease),
              background var(--ndm-fast) var(--ndm-ease);
}
.ndm-arc-more__list a:hover {
  border-color: var(--ndm-c-red);
  background: var(--ndm-c-red-soft);
  color: var(--ndm-c-red);
}
.ndm-arc-more__ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  color: var(--ndm-c-red);
  background: var(--ndm-c-red-soft);
}
.ndm-arc-more__ico .ndm-icon { width: 18px; height: 18px; }
.ndm-arc-more__label { flex: 1 1 auto; }
.ndm-arc-more__count {
  flex: none;
  color: var(--ndm-c-text-3);
  font-size: var(--ndm-fs-xs);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
.ndm-single__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 1024px) {
  .ndm-single__grid { grid-template-columns: minmax(0, 1fr); }
}

.ndm-art-hero {
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-block-end: clamp(1.5rem, 3vw, 2.25rem);
}
.ndm-art-hero__title { margin-block: .6rem .9rem; }
.ndm-art-hero__sub {
  max-width: var(--ndm-measure);
  font-size: var(--ndm-fs-lg);
  line-height: 1.7;
  color: var(--ndm-c-text-2);
  margin: 0;
}
.ndm-art-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-block-start: 1.5rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--ndm-c-border);
  font-size: var(--ndm-fs-sm);
  color: var(--ndm-c-text-3);
}
.ndm-art-hero__meta span { display: inline-flex; align-items: center; gap: .4rem; }
.ndm-art-hero__meta .ndm-icon { width: 16px; height: 16px; color: var(--ndm-c-red); }

.ndm-art-figure { margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); }
.ndm-art-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--ndm-radius);
  display: block;
}

.ndm-art-body {
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius-lg);
  padding: clamp(1.35rem, 4vw, 3rem);
}
.ndm-art-body .ndm-prose { max-width: none; }
.ndm-art-body .ndm-prose > * { max-width: var(--ndm-measure); }
/* Full-bleed elements keep the card width */
.ndm-art-body .ndm-prose :is(figure, table, pre, .ndm-prose__table-scroll) { max-width: none; }

/* Reading progress */
.ndm-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 10000;
  background: transparent;
  pointer-events: none;
}
.ndm-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ndm-c-red), var(--ndm-gold));
  transition: width .1s linear;
}

/* Sidebar */
.ndm-side { position: sticky; top: calc(var(--ndm-hdr-h, 108px) + 1rem); display: grid; gap: 1rem; }
@media (max-width: 1024px) { .ndm-side { position: static; } }

.ndm-side__box {
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius);
  padding: 1.25rem;
}
.ndm-side__title {
  margin: 0 0 .85rem;
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: var(--ndm-fs-sm);
  font-weight: 800;
  color: var(--ndm-c-text);
}

.ndm-toc { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; }
.ndm-toc a {
  display: block;
  padding: .5rem .6rem;
  border-inline-start: 2px solid var(--ndm-c-border);
  color: var(--ndm-c-text-3);
  font-size: var(--ndm-fs-sm);
  line-height: 1.5;
  text-decoration: none;
  transition: color var(--ndm-fast) var(--ndm-ease),
              border-color var(--ndm-fast) var(--ndm-ease),
              background var(--ndm-fast) var(--ndm-ease);
}
.ndm-toc a:hover { color: var(--ndm-c-red); background: var(--ndm-c-red-soft); }
.ndm-toc a.is-active {
  color: var(--ndm-c-red);
  border-inline-start-color: var(--ndm-c-red);
  font-weight: 700;
}
.ndm-toc__h3 a { padding-inline-start: 1.4rem; font-size: var(--ndm-fs-xs); }

.ndm-side__cta {
  background: linear-gradient(150deg, #14161f, #23131a);
  border-color: transparent;
  color: #fff;
  text-align: center;
  display: grid;
  gap: .75rem;
  justify-items: center;
}
.ndm-side__cta .ndm-side__title { color: #fff; }
.ndm-side__cta p { margin: 0; font-size: var(--ndm-fs-sm); color: rgba(255,255,255,.75); line-height: 1.6; }
.ndm-side__cta .ndm-btn { width: 100%; }

/* Author / E-E-A-T */
.ndm-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block-start: clamp(1.5rem, 3vw, 2.25rem);
  padding: 1.25rem;
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius);
}
.ndm-author__avatar {
  flex: none;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ndm-c-red-soft);
  color: var(--ndm-c-red);
  overflow: hidden;
}
.ndm-author__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ndm-author__name {
  margin: 0 0 .2rem;
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: var(--ndm-fs-base);
  font-weight: 700;
  color: var(--ndm-c-text);
}
.ndm-author__bio { margin: 0; font-size: var(--ndm-fs-sm); color: var(--ndm-c-text-3); line-height: 1.6; }

/* Related posts */
.ndm-related {
  margin-block-start: clamp(2.5rem, 6vw, 4.5rem);
  padding-block-start: clamp(1.75rem, 4vw, 2.5rem);
  border-block-start: 1px solid var(--ndm-c-border);
}
.ndm-related .ndm-cards { margin-block-start: 1.5rem; }

/* Share row */
.ndm-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block-start: 1.75rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--ndm-c-border);
}
.ndm-share__label { font-size: var(--ndm-fs-sm); font-weight: 700; color: var(--ndm-c-text); }
.ndm-share a {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--ndm-c-border);
  color: var(--ndm-c-text-3);
  transition: all var(--ndm-fast) var(--ndm-ease);
}
.ndm-share a:hover { border-color: var(--ndm-c-red); color: var(--ndm-c-red); background: var(--ndm-c-red-soft); }

/* FAQ */
.ndm-faq { margin-block-start: clamp(2rem, 5vw, 3rem); }
.ndm-faq__item {
  background: var(--ndm-c-surface);
  border: 1px solid var(--ndm-c-border);
  border-radius: var(--ndm-radius-sm);
  margin-block-start: .6rem;
  overflow: hidden;
}
.ndm-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 56px;
  padding: .9rem 1.1rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: start;
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: var(--ndm-fs-base);
  font-weight: 700;
  color: var(--ndm-c-text);
}
.ndm-faq__q::-webkit-details-marker { display: none; }
.ndm-faq__q .ndm-icon { flex: none; transition: transform var(--ndm-fast) var(--ndm-ease); }
.ndm-faq__item[open] .ndm-faq__q .ndm-icon { transform: rotate(180deg); }
.ndm-faq__a {
  padding: 0 1.1rem 1.1rem;
  font-size: var(--ndm-fs-sm);
  line-height: 1.75;
  color: var(--ndm-c-text-2);
}
.ndm-faq__a p:first-child { margin-block-start: 0; }

/* ==========================================================================
   SEARCH
   ========================================================================== */
.ndm-search__hero { margin-block-end: clamp(1.75rem, 4vw, 2.75rem); }

.ndm-search__form {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-block-start: 1.5rem;
}
.ndm-search__icon {
  position: absolute;
  inset-inline-start: .95rem;
  display: grid;
  place-items: center;
  color: var(--ndm-c-text-3);
  pointer-events: none;
}
.ndm-search__form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  padding-inline: 3rem .95rem;
  border: 1px solid var(--ndm-c-border-2);
  border-radius: 999px;
  background: var(--ndm-c-surface);
  color: var(--ndm-c-text);
  font-family: 'Heebo', system-ui, Arial, sans-serif;
  font-size: var(--ndm-fs-base);
  transition: border-color var(--ndm-fast) var(--ndm-ease),
              box-shadow var(--ndm-fast) var(--ndm-ease);
}
.ndm-search__form input[type="search"]::placeholder { color: var(--ndm-c-text-3); }
.ndm-search__form input[type="search"]:focus {
  outline: none;
  border-color: var(--ndm-c-red);
  box-shadow: 0 0 0 4px rgba(216,30,44,.14);
}
.ndm-search__form .ndm-btn { flex: none; min-height: 52px; }

@media (max-width: 560px) {
  .ndm-search__form { flex-wrap: wrap; }
  .ndm-search__form .ndm-btn { width: 100%; }
}

.ndm-search__quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-block-start: 1.1rem;
}
.ndm-search__quick-label {
  font-size: var(--ndm-fs-xs);
  font-weight: 700;
  color: var(--ndm-c-text-3);
  margin-inline-end: .25rem;
}

/* Chips — shared by quick filters and tag lists */
.ndm-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding-inline: .85rem;
  border: 1px solid var(--ndm-c-border);
  border-radius: 999px;
  background: var(--ndm-c-surface);
  color: var(--ndm-c-text-2);
  font-size: var(--ndm-fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--ndm-fast) var(--ndm-ease),
              background var(--ndm-fast) var(--ndm-ease),
              color var(--ndm-fast) var(--ndm-ease);
}
.ndm-chip .ndm-icon { width: 16px; height: 16px; color: var(--ndm-c-red); }
.ndm-chip:hover {
  border-color: var(--ndm-c-red);
  background: var(--ndm-c-red-soft);
  color: var(--ndm-c-red);
}
.ndm-chip--sm {
  min-height: 36px;
  padding-inline: .7rem;
  font-size: var(--ndm-fs-xs);
  font-weight: 600;
}

/* Sidebar category + tag lists */
.ndm-side__cats { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.ndm-side__cats a {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 48px;
  padding: .35rem .5rem;
  margin-inline: -.5rem;
  border-radius: 11px;
  color: var(--ndm-c-text-2);
  font-size: var(--ndm-fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--ndm-fast) var(--ndm-ease), color var(--ndm-fast) var(--ndm-ease);
}
.ndm-side__cats a:hover { background: var(--ndm-c-red-soft); color: var(--ndm-c-red); }
.ndm-side__cat-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--ndm-c-red-soft);
  color: var(--ndm-c-red);
}
.ndm-side__cat-ico .ndm-icon { width: 17px; height: 17px; }
.ndm-side__cat-label { flex: 1 1 auto; }
.ndm-side__cat-count {
  flex: none;
  color: var(--ndm-c-text-3);
  font-size: var(--ndm-fs-xs);
  font-variant-numeric: tabular-nums;
}

.ndm-side__tags { display: flex; flex-wrap: wrap; gap: .35rem; }

/* Ghost button on a light surface — the dark-chrome variant uses white text
   and is invisible here. */
.ndm-btn-ghost--light {
  color: var(--ndm-c-text);
  border-color: var(--ndm-c-border-2);
  background: var(--ndm-c-surface);
}
.ndm-btn-ghost--light:hover { background: var(--ndm-c-red-soft); border-color: var(--ndm-c-red); color: var(--ndm-c-red); }

.ndm-empty__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.ndm-empty p { max-width: 52ch; margin: 0; }

/* Search results sit in the same two-column grid as articles; the sidebar is
   secondary content, so it follows the results in source order on mobile. */
@media (max-width: 1024px) {
  .ndm-search .ndm-side { margin-block-start: 2rem; }
}
