/* Niemandsland news & patch notes — handcrafted Obsidian / brass UI.
   Shared by the public pages (/news, /news/<slug>) and the administration
   editor. Prefixes: nw- public, ne- editor. Hex values throughout, because
   Tailwind 4 removes unused @theme tokens from the bundle. */

/* ══ Page frame ══════════════════════════════════════════════════════════ */
.nw-page {
  --nw-gold: #d9b65c;
  --nw-gold-dim: #a8843a;
  --nw-muted: #a7a29b;
  --nw-border: #c8a24a2e;
  --nw-panel: #131318;
  min-width: 0;
  padding: 12px 0 28px;
}

.nw-page *,
.ne-panel *,
.ne-modal * {
  box-sizing: border-box;
}

.nw-breadcrumb {
  color: #8f8880;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
}

.nw-breadcrumb a:hover { color: var(--nw-gold); }
.nw-breadcrumb > span[aria-hidden] { color: #55504a; }
.nw-breadcrumb > span:last-child { color: #ded4bc; }

/* ══ Hero ═════════════════════════════════════════════════════════════════ */
.nw-hero {
  border: 1px solid var(--nw-border);
  background:
    radial-gradient(at 82% 40%, #c8a24a12, #0000 62%),
    linear-gradient(128deg, #191820, #0d0d11);
  border-radius: 16px;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 30px;
  padding: 34px 38px 32px;
  display: grid;
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 70px -42px #000, inset 0 1px #ffffff08;
}

.nw-hero::before {
  content: "";
  background: linear-gradient(90deg, #e6cd8a, #0000);
  width: 120px;
  height: 2px;
  position: absolute;
  top: 0;
  left: 38px;
}

.nw-eyebrow {
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #d2b77b;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
}

.nw-icon {
  color: #d2b77b;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
}

.nw-icon svg { width: 100%; height: 100%; }

.nw-hero h1 {
  font-family: var(--font-display);
  letter-spacing: -.6px;
  color: #f3ecdc;
  margin: 14px 0 0;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  font-weight: 700;
}

.nw-hero h1 em {
  color: var(--nw-gold);
  font-style: normal;
}

.nw-lead {
  color: var(--nw-muted);
  margin: 14px 0 0;
  max-width: 54ch;
  line-height: 1.65;
  font-size: 14px;
}

.nw-stats {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nw-stat {
  border: 1px solid #ffffff12;
  background: #0b0b0ecc;
  border-radius: 10px;
  padding: 8px 13px;
  min-width: 104px;
}

.nw-stat b {
  color: var(--nw-gold);
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .5px;
  display: block;
  line-height: 1.2;
}

.nw-stat span {
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #8b8377;
  font-size: 9px;
  font-weight: 600;
  display: block;
  margin-top: 3px;
}

.nw-hero-tags {
  margin-top: 18px;
  color: #8b8377;
  gap: 16px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
}

.nw-hero-tags span { align-items: center; gap: 7px; display: inline-flex; }
.nw-hero-tags svg { width: 15px; height: 15px; color: #8a9a6a; }

.nw-art svg { width: 100%; height: auto; display: block; }

.nw-orbit { transform-origin: 260px 150px; animation: nw-spin 44s linear infinite; }
.nw-orbit-reverse { transform-origin: 260px 150px; animation: nw-spin 68s linear infinite reverse; }
.nw-sweep { transform-origin: 260px 150px; animation: nw-spin 7s linear infinite; }
.nw-ticker { animation: nw-dash 6s linear infinite; }
.nw-pulse { animation: nw-pulse 3.4s ease-in-out infinite; transform-origin: center; }
.nw-paper { animation: nw-float 9s ease-in-out infinite; transform-origin: center; }

@keyframes nw-spin { to { transform: rotate(360deg); } }
@keyframes nw-dash { to { stroke-dashoffset: -80; } }
@keyframes nw-pulse { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes nw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (max-width: 900px) {
  .nw-hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .nw-hero::before { left: 24px; }
  .nw-art { max-width: 420px; justify-self: center; }
}

/* ══ Category filter ══════════════════════════════════════════════════════ */
.nw-filters {
  margin: 26px 0 22px;
  align-items: stretch;
  gap: 10px;
  display: flex;
  flex-wrap: wrap;
}

.nw-filter {
  border: 1px solid #ffffff12;
  background: #101015cc;
  border-radius: 12px;
  padding: 10px 15px;
  color: #b8b1a6;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease;
  display: inline-flex;
}

.nw-filter svg { width: 17px; height: 17px; flex-shrink: 0; }
.nw-filter:hover { color: #efe6d2; border-color: #c8a24a55; }
.nw-filter:focus-visible { outline: 2px solid #c8a24a80; outline-offset: 2px; }

.nw-filter[aria-current="true"] {
  color: #f6efdd;
  border-color: var(--nw-accent, #c8a24a);
  background: linear-gradient(180deg, #ffffff0f, #0000), #12121a;
  box-shadow: inset 0 0 0 1px #ffffff0a;
}

.nw-filter .nw-count {
  border: 1px solid #ffffff1a;
  background: #0000004d;
  border-radius: 999px;
  color: #9d958a;
  padding: 1px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.nw-filter[aria-current="true"] .nw-count {
  color: var(--nw-accent, #d9b65c);
  border-color: #ffffff26;
}

/* ══ Lead entry ═══════════════════════════════════════════════════════════ */
.nw-lead-card {
  border: 1px solid var(--nw-border);
  background: linear-gradient(150deg, #17171e, #0d0d11);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  box-shadow: 0 20px 60px -40px #000;
  transition: border-color .2s ease, transform .2s ease;
}

.nw-lead-card:hover { border-color: #c8a24a55; transform: translateY(-2px); }

.nw-lead-media {
  min-height: 260px;
  background: #0a0a0d;
  position: relative;
  overflow: hidden;
}

.nw-lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.nw-lead-body { padding: 28px 30px; align-self: center; }

.nw-lead-title {
  font-family: var(--font-display);
  color: #f5eeda;
  margin: 12px 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.2;
  font-weight: 700;
}

.nw-lead-card:hover .nw-lead-title { color: var(--nw-gold); }

@media (max-width: 820px) {
  .nw-lead-card { grid-template-columns: 1fr; }
  .nw-lead-media { min-height: 200px; }
  .nw-lead-body { padding: 22px; }
}

/* ══ Cards ════════════════════════════════════════════════════════════════ */
.nw-grid {
  margin-top: 22px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  display: grid;
}

.nw-card {
  border: 1px solid #ffffff12;
  background: linear-gradient(168deg, #141419, #0e0e12);
  border-radius: 14px;
  padding: 0;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}

.nw-card::before {
  content: "";
  background: linear-gradient(90deg, var(--nw-accent, #c8a24a), #0000);
  width: 46%;
  height: 2px;
  position: absolute;
  top: 0;
  left: 0;
  opacity: .85;
}

.nw-card:hover {
  border-color: #c8a24a4d;
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -34px #000;
}

.nw-card:focus-visible { outline: 2px solid #c8a24a80; outline-offset: 2px; }

.nw-card-media {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(at 30% 20%, #c8a24a1a, #0000 60%),
    repeating-linear-gradient(135deg, #ffffff05 0 2px, #0000 2px 9px),
    #0b0b0f;
  border-bottom: 1px solid #ffffff0f;
  position: relative;
  overflow: hidden;
}

.nw-card-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.nw-card-media .nw-sigil {
  color: var(--nw-accent, #c8a24a);
  width: 44px;
  height: 44px;
  opacity: .32;
  position: absolute;
  inset: 0;
  margin: auto;
}

.nw-card-media .nw-sigil svg { width: 100%; height: 100%; }

.nw-card-body { padding: 18px 19px 20px; flex: 1; display: flex; flex-direction: column; }

.nw-card-title {
  font-family: var(--font-display);
  color: #ece5d4;
  margin: 11px 0 0;
  font-size: 16px;
  line-height: 1.32;
  font-weight: 700;
}

.nw-card:hover .nw-card-title { color: var(--nw-gold); }

.nw-excerpt {
  color: #9c9488;
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}

.nw-meta {
  color: #7d766c;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #ffffff0f;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
}

.nw-meta time { color: #a49b8c; }

.nw-badge {
  border: 1px solid var(--nw-accent, #c8a24a);
  background: color-mix(in srgb, var(--nw-accent, #c8a24a) 14%, transparent);
  color: var(--nw-accent, #d9b65c);
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.nw-version {
  border: 1px solid #ffffff1f;
  background: #ffffff0a;
  color: #d8cfbc;
  border-radius: 6px;
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.nw-pin {
  color: #e0996f;
  align-items: center;
  gap: 5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
}

.nw-pin svg { width: 13px; height: 13px; }

/* ══ Empty state & pager ══════════════════════════════════════════════════ */
.nw-empty {
  border: 1px dashed #ffffff1c;
  background: #0d0d1180;
  border-radius: 14px;
  color: #8d857a;
  padding: 42px 24px;
  text-align: center;
  margin-top: 22px;
}

.nw-empty strong {
  color: #e6ddc9;
  font-family: var(--font-display);
  font-size: 17px;
  display: block;
  margin-bottom: 8px;
}

.nw-pager {
  margin-top: 26px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  display: flex;
  flex-wrap: wrap;
}

.nw-pager-link {
  border: 1px solid #ffffff14;
  background: #101015;
  border-radius: 9px;
  color: #b5ada1;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .16s ease, color .16s ease;
}

.nw-pager-link:hover { color: #f0e8d6; border-color: #c8a24a55; }
.nw-pager-link[aria-current="true"] { color: #12120f; background: var(--nw-gold); border-color: var(--nw-gold); }
.nw-pager-link[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.nw-pager-info { color: #7d766c; font-size: 11px; margin-left: 6px; }

/* ══ Entry page ═══════════════════════════════════════════════════════════ */
.nw-entry { padding: 12px 0 30px; }

.nw-progress {
  background: linear-gradient(90deg, var(--nw-gold), #cd7d4c);
  width: 0;
  height: 2px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  transition: width .12s linear;
  box-shadow: 0 0 12px #c8a24a80;
}

.nw-entry-head {
  border: 1px solid var(--nw-border);
  background:
    radial-gradient(at 88% 20%, color-mix(in srgb, var(--nw-accent, #c8a24a) 12%, transparent), #0000 60%),
    linear-gradient(140deg, #191820, #0d0d11);
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.nw-entry-head::before {
  content: "";
  background: linear-gradient(90deg, var(--nw-accent, #e6cd8a), #0000);
  width: 150px;
  height: 2px;
  position: absolute;
  top: 0;
  left: 30px;
}

.nw-entry-title {
  font-family: var(--font-display);
  color: #f5eeda;
  margin: 14px 0 0;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.4px;
}

.nw-entry-meta {
  color: #8d857a;
  margin-top: 16px;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
}

.nw-entry-meta span { align-items: center; gap: 6px; display: inline-flex; }
.nw-entry-meta svg { width: 14px; height: 14px; color: #8b8377; }

.nw-entry-cover {
  border: 1px solid #ffffff12;
  background: #0a0a0d;
  border-radius: 14px;
  margin-bottom: 22px;
  overflow: hidden;
}

.nw-entry-cover img { width: 100%; height: auto; display: block; }

.nw-entry-layout {
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: start;
  gap: 26px;
  display: grid;
}

@media (max-width: 1024px) {
  .nw-entry-layout { grid-template-columns: 1fr; }
  .nw-toc { position: static !important; max-height: none; }
}

.nw-toc {
  border: 1px solid #ffffff12;
  background: #0f0f13cc;
  border-radius: 12px;
  padding: 16px 18px;
  position: sticky;
  top: 84px;
}

.nw-toc h2 {
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #8b8377;
  margin: 0 0 12px;
  font-size: 9px;
  font-weight: 700;
}

.nw-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nw-toc a {
  color: #a49b8c;
  border-left: 2px solid #ffffff12;
  padding: 5px 0 5px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  text-decoration: none;
  display: block;
  transition: color .15s ease, border-color .15s ease;
}

.nw-toc a:hover { color: #ece5d4; }
.nw-toc a[data-level="3"] { padding-left: 22px; font-size: 12px; color: #8d857a; }
.nw-toc a.is-active { color: var(--nw-gold); border-color: #c8a24a; }

.nw-toc-foot {
  color: #6f6860;
  border-top: 1px solid #ffffff0f;
  margin-top: 13px;
  padding-top: 12px;
  font-size: 11px;
  line-height: 1.5;
}

/* ══ Rendered Markdown ════════════════════════════════════════════════════ */
.nw-md { color: #cdc6b8; font-size: 15px; line-height: 1.72; }
.nw-md > *:first-child { margin-top: 0; }
.nw-md > *:last-child { margin-bottom: 0; }

.nw-md h1,
.nw-md h2,
.nw-md h3,
.nw-md h4 {
  font-family: var(--font-display);
  color: #f0e9d8;
  scroll-margin-top: 92px;
  margin: 2em 0 .6em;
  font-weight: 700;
  line-height: 1.24;
}

.nw-md h1 { font-size: 1.6rem; }
.nw-md h2 { font-size: 1.32rem; }
.nw-md h3 { font-size: 1.12rem; }
.nw-md h4 { font-size: 1rem; }

.nw-md h2 { border-left: 3px solid var(--nw-accent, #c8a24a); padding-left: 12px; }

.nw-md p { margin: 1.05em 0; }
.nw-md strong { color: #f2ebda; font-weight: 700; }
.nw-md em { color: #ded6c5; }
.nw-md del { color: #7d766c; }

.nw-md a {
  color: #e6cd8a;
  text-decoration: none;
  border-bottom: 1px solid #c8a24a55;
}

.nw-md a:hover { color: #fff3d0; border-color: #e6cd8a; }

.nw-md ul,
.nw-md ol { margin: 1.05em 0; padding-left: 1.35em; }
.nw-md li { margin: .38em 0; }
.nw-md li::marker { color: var(--nw-accent, #c8a24a); }
.nw-md ul ul,
.nw-md ol ol,
.nw-md ul ol,
.nw-md ol ul { margin: .38em 0; }

.nw-md blockquote {
  border-left: 3px solid #cd7d4c88;
  background: #cd7d4c0f;
  color: #c6b8a6;
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin: 1.2em 0;
  font-size: 14px;
}

.nw-md blockquote p { margin: .4em 0; }

.nw-md hr {
  border: 0;
  border-top: 1px solid #ffffff14;
  margin: 2.2em 0;
}

.nw-md code {
  border: 1px solid #ffffff14;
  background: #0a0a0e;
  color: #e8b98f;
  border-radius: 5px;
  padding: .12em .4em;
  font-family: var(--font-mono);
  font-size: .88em;
  word-break: break-word;
}

.nw-md pre {
  border: 1px solid #ffffff14;
  background: #08080b;
  border-radius: 11px;
  padding: 14px 16px;
  margin: 1.3em 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

.nw-md pre code {
  border: 0;
  background: none;
  padding: 0;
  color: #cbd5c8;
  font-size: inherit;
}

.nw-md img {
  border: 1px solid #ffffff14;
  border-radius: 11px;
  margin: 1.3em 0;
  max-width: 100%;
  height: auto;
}

.nw-md table {
  border: 1px solid #ffffff14;
  background: #0d0d1180;
  border-collapse: collapse;
  border-radius: 11px;
  width: 100%;
  margin: 1.4em 0;
  font-size: 13.5px;
  display: block;
  overflow-x: auto;
}

.nw-md thead { background: #ffffff08; }
.nw-md th {
  border-bottom: 1px solid #ffffff1f;
  color: #e6ddc9;
  padding: 9px 13px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.nw-md td { border-bottom: 1px solid #ffffff0f; padding: 8px 13px; }
.nw-md tbody tr:last-child td { border-bottom: 0; }
.nw-md tbody tr:hover { background: #ffffff06; }

/* ══ Related entries ══════════════════════════════════════════════════════ */
.nw-related { margin-top: 30px; }

.nw-section-label {
  color: #8b8377;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
}

.nw-section-label span { color: var(--nw-gold-dim); font-family: var(--font-mono); }
.nw-section-label::after { content: ""; height: 1px; background: #ffffff12; flex: 1; }

.nw-back {
  color: #9d958a;
  text-decoration: none;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  display: inline-flex;
}

.nw-back:hover { color: var(--nw-gold); }
.nw-back svg { width: 15px; height: 15px; }

/* ══ Editor (administration) ══════════════════════════════════════════════ */
.ne-panel {
  --ne-border: #ffffff14;
  color: inherit;
}

/* Visually hidden but reachable by label clicks and screen readers. */
.ne-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ne-bar {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  display: flex;
}

.ne-bar h2 {
  font-family: var(--font-display);
  letter-spacing: .16em;
  color: #d9b65c;
  text-transform: uppercase;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.ne-bar p { color: #7d766c; margin: 4px 0 0; font-size: 11.5px; }

.ne-card {
  border: 1px solid var(--ne-border);
  background: #121217;
  border-radius: 13px;
  margin-bottom: 16px;
  overflow: hidden;
}

.ne-card-head {
  border-bottom: 1px solid var(--ne-border);
  background: #ffffff05;
  padding: 11px 15px;
  align-items: center;
  gap: 10px;
  display: flex;
}

.ne-card-head h3 {
  letter-spacing: .12em;
  color: #b9b0a0;
  text-transform: uppercase;
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
}

.ne-card-head .ne-step {
  color: #6f6860;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
}

.ne-card-body { padding: 16px; }

.ne-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .ne-grid2 { grid-template-columns: 1fr; } }

.ne-field { margin-bottom: 14px; }
.ne-field:last-child { margin-bottom: 0; }

.ne-field > label {
  color: #a49b8c;
  letter-spacing: .08em;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
}

.ne-field .ne-hint { color: #6f6860; margin: 6px 0 0; font-size: 11px; line-height: 1.5; }

.ne-input,
.ne-select,
.ne-textarea {
  border: 1px solid #26262f;
  background: #0b0b0f;
  color: #e7e5e4;
  border-radius: 9px;
  width: 100%;
  padding: 9px 11px;
  font-size: 13.5px;
  box-shadow: inset 0 1px 3px #00000066;
}

.ne-input:focus,
.ne-select:focus,
.ne-textarea:focus { border-color: #c8a24a80; outline: none; box-shadow: 0 0 0 3px #c8a24a1f; }
.ne-input::placeholder,
.ne-textarea::placeholder { color: #565049; }
.ne-input[aria-invalid="true"],
.ne-textarea[aria-invalid="true"] { border-color: #934a24; }
.ne-input:disabled,
.ne-select:disabled,
.ne-textarea:disabled { opacity: .55; cursor: not-allowed; }

.ne-input-mono { font-family: var(--font-mono); font-size: 12.5px; }

.ne-error { color: #e0996f; margin: 6px 0 0; font-size: 11px; }
.ne-error:empty { display: none; }

.ne-count { color: #6f6860; margin-left: auto; font-family: var(--font-mono); font-size: 10px; }
.ne-count.is-over { color: #e0996f; }

/* Category radio cards */
.ne-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }

.ne-cat {
  border: 1px solid #26262f;
  background: #0b0b0f;
  border-radius: 11px;
  padding: 12px 13px;
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background-color .16s ease;
  display: block;
}

.ne-cat:hover { border-color: #ffffff2e; }

.ne-cat[aria-checked="true"] {
  border-color: var(--nw-accent, #c8a24a);
  background: color-mix(in srgb, var(--nw-accent, #c8a24a) 9%, #0b0b0f);
}

.ne-cat-top { align-items: center; gap: 8px; display: flex; }
.ne-cat-top svg { color: var(--nw-accent, #c8a24a); width: 17px; height: 17px; }
.ne-cat-top b { color: #e7e5e4; font-size: 12.5px; font-weight: 700; }
.ne-cat p { color: #7d766c; margin: 7px 0 0; font-size: 11px; line-height: 1.45; }
.ne-cat:focus-visible { outline: 2px solid #c8a24a80; outline-offset: 2px; }

/* Toggles */
.ne-switch {
  border: 1px solid #26262f;
  background: #0b0b0f;
  border-radius: 11px;
  padding: 11px 13px;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  display: flex;
}

.ne-switch input { accent-color: #c8a24a; margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; }
.ne-switch b { color: #e7e5e4; font-size: 12.5px; display: block; }
.ne-switch span { color: #7d766c; font-size: 11px; line-height: 1.45; display: block; margin-top: 3px; }
.ne-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 720px) { .ne-switches { grid-template-columns: 1fr; } }

/* Toolbar */
.ne-toolbar {
  border: 1px solid #26262f;
  border-bottom: 0;
  background: #0f0f14;
  border-radius: 11px 11px 0 0;
  padding: 7px 8px;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  display: flex;
}

/* Wrapper around one toolbar slot: keeps the flex row of .ne-toolbar intact. */
.ne-tool-slot { display: contents; }

.ne-btn {
  border: 1px solid transparent;
  background: #ffffff08;
  color: #b8b1a6;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ne-btn svg { width: 14px; height: 14px; }
.ne-btn:hover { color: #f0e8d6; background: #ffffff12; border-color: #ffffff1f; }
.ne-btn:focus-visible { outline: 2px solid #c8a24a80; outline-offset: 1px; }
.ne-btn[aria-pressed="true"] { color: #12120f; background: var(--nw-gold, #d9b65c); border-color: var(--nw-gold, #d9b65c); }
.ne-btn:disabled { opacity: .4; cursor: not-allowed; }
.ne-sep { width: 1px; height: 18px; background: #ffffff14; margin: 0 4px; }

/* Split editor */
.ne-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  border: 1px solid #26262f;
  border-radius: 0 0 11px 11px;
  overflow: hidden;
}

.ne-split.is-single { grid-template-columns: 1fr; }
.ne-split.is-single .ne-pane { display: none; }

@media (max-width: 1100px) {
  .ne-split { grid-template-columns: 1fr; }
  .ne-split .ne-pane { border-right: 0; border-bottom: 1px solid #26262f; }
}

.ne-pane { background: #08080b; min-width: 0; display: flex; flex-direction: column; }
.ne-pane + .ne-pane { border-left: 1px solid #26262f; }

.ne-pane-head {
  border-bottom: 1px solid #ffffff0f;
  background: #0f0f14;
  color: #6f6860;
  padding: 6px 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ne-source {
  border: 0;
  background: none;
  color: #d6cfc0;
  padding: 14px 15px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.68;
  resize: none;
  flex: 1;
  min-height: 420px;
  tab-size: 2;
}

.ne-source:focus { outline: none; }
.ne-source::placeholder { color: #4d4841; }

.ne-preview { padding: 16px 18px; overflow-y: auto; flex: 1; max-height: 620px; }
.ne-preview .nw-md { font-size: 14px; }
.ne-preview .nw-md h1 { font-size: 1.35rem; }
.ne-preview .nw-md h2 { font-size: 1.15rem; }
.ne-preview .nw-md h3 { font-size: 1.02rem; }

.ne-empty-preview { color: #565049; font-size: 13px; text-align: center; padding: 40px 10px; }

/* Footer bar of the editor */
.ne-statusbar {
  border: 1px solid #26262f;
  border-top: 0;
  background: #0f0f14;
  border-radius: 0 0 11px 11px;
  color: #6f6860;
  padding: 8px 13px;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
}

.ne-statusbar b { color: #b8b1a6; font-weight: 600; }
.ne-statusbar .ne-dirty { color: #e0996f; }
.ne-statusbar .ne-flash { color: #8a9a6a; }

/* Drop zone */
.ne-drop {
  border: 1px dashed #ffffff26;
  background: #0b0b0f;
  border-radius: 12px;
  color: #8d857a;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.ne-drop:hover,
.ne-drop.is-drag { border-color: #c8a24a80; background: #c8a24a0d; color: #e6ddc9; }
.ne-drop input { display: none; }
.ne-drop-icon { color: #d2b77b; width: 22px; height: 22px; margin: 0 auto 8px; display: block; }
.ne-drop b { color: #e7e5e4; display: block; font-size: 13px; }
.ne-drop span { margin-top: 5px; font-size: 11px; display: block; }

.ne-figure {
  border: 1px solid #26262f;
  background: #0b0b0f;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ne-figure img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.ne-figure-bar {
  border-top: 1px solid #ffffff0f;
  color: #7d766c;
  padding: 9px 12px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  flex-wrap: wrap;
  display: flex;
}

.ne-figure-bar code {
  color: #b8b1a6;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  word-break: break-all;
}

.ne-actions { align-items: center; gap: 9px; flex-wrap: wrap; display: flex; }

.ne-btn-primary,
.ne-btn-ghost,
.ne-btn-danger {
  border-radius: 9px;
  cursor: pointer;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  display: inline-flex;
}

.ne-btn-primary { border: 1px solid #c8a24a; background: #c8a24a; color: #14110a; }
.ne-btn-primary:hover { background: #dcb85c; }
.ne-btn-ghost { border: 1px solid #ffffff1f; background: #ffffff08; color: #cdc6b8; }
.ne-btn-ghost:hover { border-color: #c8a24a66; color: #f0e8d6; }
.ne-btn-danger { border: 1px solid #934a24; background: #934a2433; color: #e0996f; }
.ne-btn-danger:hover { background: #934a2455; }
.ne-btn-primary:disabled,
.ne-btn-ghost:disabled,
.ne-btn-danger:disabled { opacity: .45; cursor: not-allowed; }
.ne-btn-primary svg,
.ne-btn-ghost svg,
.ne-btn-danger svg { width: 14px; height: 14px; }

/* Entry list in the admin panel */
.ne-list { display: grid; gap: 9px; }

.ne-row {
  border: 1px solid var(--ne-border);
  background: #101014;
  border-radius: 11px;
  padding: 11px 13px;
  align-items: center;
  gap: 12px;
  transition: border-color .16s ease, background-color .16s ease;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
}

.ne-row:hover { border-color: #ffffff24; background: #14141a; }
.ne-row.is-active { border-color: #c8a24a66; background: #16161d; }
.ne-row.is-open { border-color: #c8a24a; box-shadow: 0 0 0 1px #c8a24a40; }

.ne-row-thumb {
  border: 1px solid #ffffff12;
  background: #0b0b0f;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nw-accent, #c8a24a);
}

.ne-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ne-row-thumb svg { width: 18px; height: 18px; opacity: .5; }

.ne-row-main { min-width: 0; }
.ne-row-main b {
  color: #e7e5e4;
  font-size: 13px;
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ne-row-meta {
  color: #6f6860;
  margin-top: 4px;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  flex-wrap: wrap;
  display: flex;
}

.ne-row-side { align-items: center; gap: 8px; display: flex; }

.ne-mini {
  border: 1px solid #ffffff1a;
  background: #ffffff08;
  color: #a49b8c;
  border-radius: 7px;
  cursor: pointer;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  transition: color .14s ease, border-color .14s ease;
}

.ne-mini:hover { color: #f0e8d6; border-color: #c8a24a66; }
.ne-mini.is-danger:hover { color: #e0996f; border-color: #934a24; }

.ne-toolbar-list {
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  display: flex;
}

.ne-chip {
  border: 1px solid #ffffff14;
  background: #0b0b0f;
  border-radius: 999px;
  color: #a49b8c;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  transition: color .14s ease, border-color .14s ease;
}

.ne-chip:hover { color: #f0e8d6; border-color: #c8a24a55; }
.ne-chip[aria-pressed="true"] { color: #12120f; background: #c8a24a; border-color: #c8a24a; }

.ne-empty-row { color: #6f6860; padding: 26px 0; text-align: center; font-size: 12.5px; }

/* ══ Shared motion opt-out ════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .nw-page *, .nw-page::before, .ne-panel *, .ne-panel::before {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}