/*!
 * NickForge — paper / neo-brutalist theme
 *
 * Fonts are self-hosted rather than loaded from Google. That keeps the site
 * free of third-party requests (better for privacy and for Core Web Vitals)
 * and means the design still works if fonts.gstatic.com is blocked.
 *
 * Only the latin and latin-ext subsets ship. The generator outputs
 * mathematical alphanumerics, hieroglyphs and other exotic ranges that no
 * webfont here covers — those must fall through to the system font stack,
 * which is why .nf-out deliberately does NOT use a webfont.
 */

/* ------------------------------------------------------------- fonts -- */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------ tokens -- */

:root {
  --paper:      #f7f0e4;
  --paper-card: #fffdf7;
  --ink:        #241f1a;
  --ink-soft:   #393027;
  --rust:       #cf4426;
  --rust-dark:  #a63317;
  --rust-deep:  #8c2a12;
  --amber:      #f6a02c;

  --line:       #e3d9c7;
  --line-2:     #ded2be;
  --dash:       #ece2d2;

  --txt:        #241f1a;
  --txt-2:      #5c4d40;
  --txt-3:      #7c6d5c;
  --txt-4:      #8a7b69;
  --txt-5:      #9a8b78;

  --on-dark:    #fdf7ec;
  --on-dark-2:  #c2b5a3;
  --on-dark-3:  #d5c9b8;
  --on-dark-4:  #9c8b76;

  --sans:  'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --head:  'Space Grotesk', var(--sans);
  --mono:  'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Styled Unicode must fall back to whatever the device has. Never a webfont. */
  --glyph: system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'Noto Color Emoji',
           'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', sans-serif;

  --wrap:  1240px;
  --pad:   22px;

  /* Two separate variables on purpose.
     --head-min is a fixed design value and sets the header's own height.
     --head-h is the *measured* header height, written by JS, and is only ever
     read by things positioned below the header.
     Using one variable for both created a feedback loop: measuring the header
     changed its min-height, which changed the measurement, which grew the
     header a pixel per frame until it filled the page. */
  --head-min: 62px;
  --head-h:   62px;
}

/* ------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* `overflow-x: hidden` on html/body makes it a scroll container, which stops
   position:sticky working against the viewport. `clip` prevents the same
   horizontal scrollbar without creating a scroll container. Older Safari
   ignores it and simply allows horizontal scroll — a far smaller problem
   than a broken sticky header. */
html { overflow-x: clip; }

img, svg { max-width: 100%; height: auto; }

a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--rust-deep); }

input, button, textarea, select { font: inherit; }

::selection { background: #ffd9a8; }

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

.nf-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--ink);
  font-weight: 700; padding: 10px 18px;
  border-radius: 0 0 8px 8px; transition: top .15s;
}
.skip-link:focus { top: 0; color: var(--ink); }

:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }

/* ------------------------------------------------------------ header -- */

.nf-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nf-head-bar {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad);
  min-height: var(--head-min);
  display: flex; align-items: center; gap: 26px;
}

.nf-brand {
  display: flex; align-items: baseline; gap: 2px;
  color: var(--paper);
  font-family: var(--head); font-weight: 700; font-size: 21px;
  letter-spacing: -.02em; white-space: nowrap;
}
.nf-brand:hover { color: var(--paper); }
.nf-brand em { font-style: normal; color: var(--amber); }

.nf-nav { flex: 1; min-width: 0; }
.nf-nav ul {
  list-style: none; margin: 0; padding: 4px 0;
  display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none;
}
.nf-nav ul::-webkit-scrollbar { display: none; }
.nf-nav a {
  flex: none; display: block;
  padding: 7px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  color: var(--on-dark-3);
  border: 1px solid rgba(255, 255, 255, .1);
  white-space: nowrap;
}
.nf-nav a:hover,
.nf-nav a[aria-current="page"] {
  background: var(--ink-soft);
  color: #eaf6ea;
  border-color: rgba(255, 255, 255, .18);
}

.nf-burger {
  display: none; margin-left: auto;
  background: var(--ink-soft); border: 1px solid rgba(255,255,255,.14);
  color: var(--paper); border-radius: 10px;
  padding: 9px 12px; line-height: 1; cursor: pointer;
}

@media (max-width: 860px) {
  .nf-head-bar { flex-wrap: wrap; gap: 12px; padding-bottom: 10px; }
  .nf-burger { display: block; }
  .nf-nav { display: none; flex-basis: 100%; }
  .nf-nav.is-open { display: block; }
  .nf-nav ul { flex-wrap: wrap; overflow: visible; }
}

/* --------------------------------------------------------------- hero -- */

.nf-hero { background: var(--ink); }

.nf-hero-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 44px var(--pad) 40px;
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between; gap: 24px;
}

.nf-eyebrow {
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 14px;
}

.nf-hero h1 {
  margin: 0; max-width: 640px;
  font-family: var(--head); font-weight: 700;
  font-size: clamp(30px, 5.4vw, 46px);
  line-height: 1.04; letter-spacing: -.03em;
  color: var(--on-dark); text-wrap: balance;
}

.nf-hero .nf-lede {
  margin: 0; max-width: 330px;
  font-size: 15px; line-height: 1.55;
  color: var(--on-dark-2); text-wrap: pretty;
}

.nf-crumbs { padding: 14px 0 0; font-size: 12.5px; font-family: var(--mono); }
.nf-crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.nf-crumbs li + li::before { content: '/'; color: var(--on-dark-4); margin-right: 6px; }
.nf-crumbs a { color: var(--on-dark-2); }
.nf-crumbs a:hover { color: var(--amber); }
.nf-crumbs [aria-current] { color: var(--on-dark); }

/* --------------------------------------------------- sticky generator -- */

.nf-gen {
  position: sticky; top: var(--head-h); z-index: 30;
  background: rgba(247, 240, 228, .93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nf-gen-inner { max-width: var(--wrap); margin: 0 auto; padding: 16px var(--pad); }

/* The signature element: hard 2px frame with an offset rust shadow. */
.nf-gen-box {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--paper-card);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 4px 4px 0 var(--rust);
}

.nf-gen-label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--txt-3); padding-left: 4px;
}

#nf-input {
  flex: 1 1 260px; min-width: 0;
  border: 0; outline: none; background: transparent;
  font-family: var(--head); font-size: 26px; font-weight: 500;
  letter-spacing: -.01em; color: var(--ink);
  padding: 2px 0;
}
#nf-input::placeholder { color: #b5a795; }

#nf-search {
  flex: 1 1 180px; min-width: 0;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--paper); color: var(--txt);
  padding: 9px 12px; font-size: 14px;
}

.nf-gen-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.nf-count {
  font-family: var(--mono); font-size: 11.5px; color: var(--txt-5);
  white-space: nowrap;
}

.nf-btn {
  border: 1px solid var(--line-2);
  background: var(--paper); color: #59493c;
  border-radius: 10px; padding: 9px 13px;
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.nf-btn:hover { background: #f1e7d6; color: var(--ink); border-color: var(--ink); }

.nf-btn-primary {
  border: 0; background: var(--rust); color: var(--paper-card);
  padding: 10px 16px; font-weight: 700;
}
.nf-btn-primary:hover { background: var(--rust-dark); color: var(--paper-card); }

.nf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nf-chip {
  background: transparent; border: 1px solid var(--line-2);
  color: var(--txt-3); border-radius: 999px;
  padding: 5px 12px; font-size: 12.5px; font-weight: 500;
  cursor: pointer; font-family: var(--mono);
}
.nf-chip:hover { border-color: var(--ink); color: var(--ink); }
.nf-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------- grids -- */

.nf-main { max-width: var(--wrap); margin: 0 auto; padding: 34px var(--pad) 60px; }

.nf-section { margin-bottom: 46px; scroll-margin-top: 150px; }
.nf-section.is-hidden { display: none; }

.nf-section-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
}
.nf-section-head h2 {
  margin: 0; font-family: var(--head);
  font-size: 22px; font-weight: 700; letter-spacing: -.02em;
  color: var(--ink); white-space: nowrap;
}
.nf-section-count {
  font-family: var(--mono); font-size: 11.5px; color: var(--txt-4);
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px;
}
.nf-rule { flex: 1; height: 1px; background: var(--line); }
.nf-section-note {
  font-size: 13px; color: var(--txt-3); text-align: right;
}
@media (max-width: 700px) {
  .nf-section-head { flex-wrap: wrap; gap: 10px; }
  .nf-rule, .nf-section-note { display: none; }
}

.nf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}
@media (max-width: 400px) {
  .nf-grid { grid-template-columns: 1fr; }
}

/* Cards: flat paper with a hard ink border and an offset shadow on hover. */
.nf-card {
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 14px 16px 12px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 116px;
  transition: box-shadow .15s, transform .15s;
}
.nf-card:hover { box-shadow: 3px 3px 0 var(--ink); transform: translateY(-1px); }
.nf-card:focus-visible {
  outline: 3px solid var(--rust); outline-offset: 2px;
  box-shadow: 3px 3px 0 var(--ink);
}
.nf-card.is-hidden { display: none; }
.nf-card.is-copied { box-shadow: 3px 3px 0 var(--rust); border-color: var(--rust); }

.nf-label {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--rust);
}

/* System font stack on purpose — styled Unicode has no webfont coverage. */
.nf-out {
  flex: 1; display: flex; align-items: center;
  font-family: var(--glyph);
  font-size: 21px; line-height: 1.35;
  word-break: break-word; overflow-wrap: anywhere;
  color: var(--ink);
}

.nf-actions {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px dashed var(--dash); padding-top: 10px;
}
.nf-copy-hint {
  font-size: 13px; font-weight: 700; color: var(--rust);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.nf-spacer { flex: 1; }

.nf-deco, .nf-fav {
  border: 1px solid var(--line); background: var(--paper);
  color: #59493c; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
}
.nf-deco:hover, .nf-fav:hover { background: #f1e7d6; border-color: var(--ink); color: var(--ink); }
.nf-fav.is-on { color: var(--rust); border-color: var(--rust); }

.nf-more { font-family: var(--mono); font-size: 11px; color: var(--rust); margin-left: 8px; }

/* ------------------------------------------------------------ toast -- */

@keyframes nfToast {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.nf-toast {
  position: fixed; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(36, 31, 26, .3);
  max-width: 88vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.nf-toast.is-on { opacity: 1; animation: nfToast .18s ease-out; }

/* ----------------------------------------------------------- article -- */

.nf-article {
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 30px;
  margin-top: 10px;
  max-width: none;
}
@media (min-width: 700px) { .nf-article { padding: 34px 40px; } }

.nf-article > *:first-child { margin-top: 0; }

.nf-article h2 {
  font-family: var(--head); font-size: 21px; font-weight: 700;
  letter-spacing: -.02em; color: var(--ink);
  margin: 32px 0 10px;
}
.nf-article h3 {
  font-family: var(--head); font-size: 17px; font-weight: 700;
  color: var(--ink); margin: 24px 0 8px;
}
.nf-article p, .nf-article li {
  font-size: 15px; line-height: 1.7; color: var(--txt-2); text-wrap: pretty;
}
.nf-article ul, .nf-article ol { padding-left: 20px; }
.nf-article li { margin: 6px 0; }
.nf-article strong { color: var(--ink); }
.nf-article a { text-decoration: underline; text-underline-offset: 2px; }

.nf-article .table-wrap { overflow-x: auto; margin: 18px 0; }
.nf-article table {
  width: 100%; border-collapse: collapse; font-size: 14px; min-width: 420px;
}
.nf-article th, .nf-article td {
  border: 1px solid var(--line); padding: 10px 12px; text-align: left;
}
.nf-article th {
  background: var(--paper); color: var(--ink); font-weight: 700;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase;
}
.nf-article td:last-child { font-family: var(--glyph); font-size: 17px; }

.nf-article details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 16px; margin: 10px 0;
}
.nf-article details[open] { border-color: var(--ink); }
.nf-article summary {
  cursor: pointer; font-weight: 700; color: var(--ink);
  list-style: none; font-size: 15px;
}
.nf-article summary::-webkit-details-marker { display: none; }
.nf-article summary::after { content: '+'; float: right; color: var(--rust); font-family: var(--mono); }
.nf-article details[open] summary::after { content: '−'; }
.nf-article details p { margin: 10px 0 0; }

/* three-column explainer from the design */
.nf-explainer {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

/* ----------------------------------------------------------- related -- */

.nf-related { margin: 40px 0 0; }
.nf-related h2 {
  font-family: var(--head); font-size: 19px; font-weight: 700;
  letter-spacing: -.02em; margin: 0 0 14px; color: var(--ink);
}
.nf-related-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.nf-related-grid a {
  display: block; background: var(--paper-card);
  border: 1.5px solid var(--ink); border-radius: 6px;
  padding: 13px 15px;
  color: var(--ink); font-weight: 700; font-size: 14px;
  transition: box-shadow .15s, transform .15s;
}
.nf-related-grid a:hover {
  box-shadow: 3px 3px 0 var(--ink); transform: translateY(-1px); color: var(--ink);
}
.nf-related-grid a small {
  display: block; margin-top: 3px;
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  color: var(--txt-4); text-transform: none;
}

/* ------------------------------------------------------------ footer -- */

.nf-foot { background: var(--ink); color: var(--on-dark-2); margin-top: 10px; }

.nf-foot-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 34px var(--pad);
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}

.nf-foot .nf-brand { font-size: 18px; }

.nf-foot-links {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin: 0; padding: 0; list-style: none; font-size: 13.5px;
}
.nf-foot-links a { color: var(--on-dark-2); }
.nf-foot-links a:hover { color: var(--amber); }

.nf-copy {
  font-family: var(--mono); font-size: 11.5px; color: var(--on-dark-4);
}

/* ------------------------------------------- standard WordPress content -- */

.nf-page { max-width: 780px; margin: 0 auto; padding: 40px var(--pad) 60px; }
.nf-page-title {
  font-family: var(--head); font-size: clamp(26px, 4vw, 36px);
  font-weight: 700; letter-spacing: -.03em; margin: 0 0 20px; color: var(--ink);
}
.nf-entry p, .nf-entry li { font-size: 16px; line-height: 1.75; color: var(--txt-2); }
.nf-entry h2, .nf-entry h3 { font-family: var(--head); color: var(--ink); }
.nf-entry blockquote {
  border-left: 3px solid var(--rust); margin: 22px 0; padding: 4px 0 4px 18px;
  color: var(--txt-3); font-style: italic;
}
.nf-entry code {
  font-family: var(--mono); font-size: .9em;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px;
}
.nf-entry pre {
  background: var(--ink); color: var(--on-dark);
  padding: 16px; border-radius: 6px; overflow-x: auto;
}
.nf-entry pre code { background: none; border: 0; color: inherit; }
.nf-entry img { border: 1.5px solid var(--ink); border-radius: 6px; }

.nf-postlist { display: grid; gap: 14px; }

.nf-pagination { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.nf-pagination .page-numbers {
  border: 1.5px solid var(--ink); background: var(--paper-card);
  border-radius: 6px; padding: 7px 13px; color: var(--ink); font-weight: 700;
}
.nf-pagination .page-numbers.current { background: var(--ink); color: var(--paper); }

/* ------------------------------------- shortcode / block embedding -- */

/* When the generator is dropped into a normal post via [nickfinder], it sits
   inside the theme's content column rather than owning the page. The sticky
   bar and full-bleed background have to be switched off. */
.nf-embed { color: var(--txt); }

.nf-embed .nf-gen,
.nf-embed .gen-embed {
  position: static;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
  margin: 0 0 20px;
}
.nf-embed .nf-gen-inner { padding: 0; max-width: none; }
.nf-embed .nf-section { margin-bottom: 26px; }
.nf-embed .nf-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Some themes reset headings and lists aggressively — re-assert ours. */
.nf-embed h2 { color: var(--ink); font-family: var(--head); }
.nf-embed ul, .nf-embed .nf-grid { list-style: none; margin: 0; padding: 0; }
.nf-embed .nf-out { color: var(--ink); font-family: var(--glyph); }

/* Standalone mode adds this to <body>; harmless in theme mode. */
.nf-body { background: var(--paper); }

/* ------------------------------------------------------------- misc -- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important; animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .nf-head, .nf-gen, .nf-foot, .nf-related, .nf-toast { display: none !important; }
  body { background: #fff; }
  .nf-card { break-inside: avoid; }
}
