/* =========================================================================
   notapromissoria - site.css
   Design tokens (light/dark), chrome, tool grid + side panel, forms, content.
   Mobile-first. No external dependencies (fonts self-declared via system stack).
   ========================================================================= */

:root {
  --brand: #1e5fbf;
  --brand-strong: #12223a;
  --brand-soft: #e8f0fb;
  --accent: #c9962f;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #dfe4ec;
  --line-strong: #c7cedb;
  --ink: #1a2230;
  --ink-soft: #56617a;
  --ink-faint: #8a94a8;

  --ok: #1f8a4c;
  --danger: #c0392b;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(18,34,58,.06), 0 8px 24px rgba(18,34,58,.06);
  --shadow-lg: 0 12px 40px rgba(18,34,58,.14);

  --maxw: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Menlo", "Consolas", monospace;
}

:root[data-theme="dark"] {
  --brand: #5c9cff;
  --brand-strong: #cdd9ee;
  --brand-soft: #17233b;
  --accent: #e0b458;

  --bg: #0e1420;
  --surface: #161e2c;
  --surface-2: #1b2536;
  --line: #2a3547;
  --line-strong: #3a475d;
  --ink: #e7ecf5;
  --ink-soft: #a7b2c6;
  --ink-faint: #77839a;

  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.32);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.45);
}

/* The site starts in LIGHT by default; dark is opt-in via the theme toggle
   (data-theme="dark"). We deliberately do NOT auto-switch to dark from
   prefers-color-scheme, so the first paint is always light. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); font-weight: 700; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.np-skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.np-skip:focus { left: 0; }

/* ---- Chrome (microbar + header) stick together -------------------------- */
.np-chrome { position: sticky; top: 0; z-index: 40; }

/* ---- Microbar (thin top bar) ------------------------------------------- */
.np-micro { background: var(--brand-strong); color: #fff; }
:root[data-theme="dark"] .np-micro { background: #0a0f18; }
.np-micro__in {
  max-width: var(--maxw); margin: 0 auto; padding: 5px 16px;
  display: flex; align-items: center; gap: 14px; min-height: 30px;
}
.np-micro__clock { font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 600;
  color: #fff; letter-spacing: .01em; white-space: nowrap; }
.np-micro__msg { font-size: .78rem; color: color-mix(in srgb, #fff 78%, transparent); }
.np-micro .np-theme { margin-left: auto; border-color: color-mix(in srgb, #fff 22%, transparent);
  background: color-mix(in srgb, #fff 10%, transparent); }
.np-micro .np-theme__knob { background: #fff; }
@media (max-width: 620px) { .np-micro__msg { display: none; } }

/* ---- Sticky header ------------------------------------------------------ */
.np-top {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.np-top__in {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
}
.np-brand { display: flex; align-items: center; gap: 9px; color: var(--brand-strong); text-decoration: none; }
.np-brand__glyph { display: inline-flex; color: var(--brand); }
.np-brand__name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.np-brand__accent { color: var(--brand); }

.np-nav { margin-left: auto; }
.np-nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.np-nav__a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-soft); font-weight: 600; font-size: .93rem; text-decoration: none;
}
.np-nav__a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.np-nav__a.is-active { color: var(--brand); background: var(--brand-soft); }

.np-theme {
  border: 1px solid var(--line); background: var(--surface-2); cursor: pointer;
  border-radius: 999px; padding: 4px; width: 46px; height: 28px; flex: none;
}
.np-theme__track { display: block; position: relative; width: 100%; height: 100%; }
.np-theme__knob {
  position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); transition: transform .18s ease;
}
:root[data-theme="dark"] .np-theme__knob { transform: translateX(18px); }

.np-top__cta {
  flex: none; padding: 9px 16px; border-radius: 8px; background: var(--brand); color: #fff;
  font-weight: 700; font-size: .9rem; text-decoration: none;
}
.np-top__cta:hover { background: color-mix(in srgb, var(--brand) 88%, #000); text-decoration: none; }

.np-burger {
  display: none; flex-direction: column; gap: 4px; justify-content: center;
  width: 40px; height: 34px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 8px; cursor: pointer; padding: 0 9px;
}
.np-burger span { height: 2px; background: var(--ink); border-radius: 2px; }

.np-drawer-overlay { position: fixed; inset: 0; background: rgba(10,16,26,.5); z-index: 50; }
.np-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(84vw, 320px); z-index: 51;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 14px; overflow-y: auto;
}
.np-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.np-drawer__title { font-weight: 700; }
.np-drawer__close { border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.np-drawer__list { list-style: none; margin: 0; padding: 0; }
.np-drawer__a { display: block; padding: 12px 10px; border-radius: 8px; color: var(--ink); font-weight: 600; }
.np-drawer__a:hover { background: var(--surface-2); text-decoration: none; }
.np-drawer__a.is-active { color: var(--brand); background: var(--brand-soft); }

@media (max-width: 820px) {
  .np-nav { display: none; }
  .np-top__cta { display: none; }
  .np-burger { display: flex; }
}

/* ---- Layout ------------------------------------------------------------- */
.np-main { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 60px; }
.np-wrap-narrow { max-width: 880px; margin: 0 auto; }
/* Home editorial: left-aligned with the tool (not centered), readable width. */
.np-home-editorial { max-width: 880px; margin: 48px 0 0; }
.np-home-editorial .np-prose h3 { font-size: 1.06rem; margin: 20px 0 6px; }

/* ---- Hero (home) -------------------------------------------------------- */
.np-hero { text-align: center; padding: 8px 0 22px; }
.np-hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); letter-spacing: -.02em; margin: 0 0 10px; }
.np-hero p { color: var(--ink-soft); font-size: 1.06rem; max-width: 640px; margin: 0 auto; }

/* ---- Tool grid: inputs column + sticky preview panel -------------------- */
.np-tool {
  display: grid; grid-template-columns: 1fr; gap: 22px;
}
@media (min-width: 860px) {
  .np-tool { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); align-items: start; gap: 26px; }
}

/* Form column: a stack of clearly separated section cards. */
.np-form-col { display: grid; gap: 16px; min-width: 0; }
.np-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.np-section__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.np-section__head h2 { font-size: 1.08rem; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.np-section__n {
  flex: none; width: 26px; height: 26px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; font-size: .82rem; font-weight: 800;
  background: var(--brand); color: #fff;
}
.np-subgroup { padding: 14px 0 2px; border-top: 1px dashed var(--line); margin-top: 4px; }
.np-subgroup:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.np-subhead { font-size: .95rem; margin: 0 0 12px; color: var(--ink); }
.np-star { color: var(--danger); font-weight: 700; }
.np-form-legend { grid-column: 1 / -1; margin: 0 2px 2px; font-size: .84rem; color: var(--ink-soft); }

/* Collapsible optional sections (native <details>). */
.np-details > summary { list-style: none; cursor: pointer; margin-bottom: 0; user-select: none; }
.np-details > summary::-webkit-details-marker { display: none; }
.np-details > summary::after {
  content: ""; margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg); transition: transform .15s; margin-right: 3px;
}
.np-details[open] > summary::after { transform: rotate(-135deg); }
.np-details[open] > summary { margin-bottom: 16px; }
.np-details > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* Avalistas editor (dynamic rows, like the faixas). */
.np-aval-head { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) 40px; gap: 8px; margin-bottom: 6px; }
.np-aval-head span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.np-avais { display: grid; gap: 8px; margin-bottom: 12px; }
.np-aval-row { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) 40px; align-items: center; gap: 8px; }

/* Saved parties (save/load/edit locally) */
.np-linkbtn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--brand);
  font: inherit; font-weight: 600; font-size: .86rem; text-decoration: underline; text-underline-offset: 2px; }
.np-linkbtn:hover { color: var(--brand-strong); }
.np-badge-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  background: var(--brand-soft); color: var(--brand-strong); font: inherit; font-size: .82rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; }
.np-badge-btn svg { width: 15px; height: 15px; }
.np-badge-btn:hover { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); border-color: var(--brand); }
.np-parties-note { margin: -4px 0 16px; font-size: .84rem; color: var(--ink-soft); }
.np-party-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.np-party-load { height: 38px; padding: 0 12px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  cursor: pointer; max-width: 240px; }
.np-party-load:hover { border-color: var(--brand); color: var(--ink); }

/* Modal (party dashboard) */
.np-modal-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10,16,26,.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.np-modal-overlay[hidden] { display: none; }
.np-modal { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px 22px; }
.np-modal__head { display: flex; align-items: center; justify-content: space-between; }
.np-modal__head h2 { font-size: 1.15rem; margin: 0; }
.np-modal__close { border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.np-modal__note { font-size: .86rem; color: var(--ink-soft); margin: 4px 0 14px; }
.np-modal__list { display: grid; gap: 12px; }
.np-pcard { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--surface-2); }
.np-pcard__row { display: grid; grid-template-columns: 1fr 150px 40px; gap: 8px; align-items: center; }
.np-pcard__row--2 { grid-template-columns: 1fr 130px 100px; margin-top: 8px; }
.np-pcard__del { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  border-radius: var(--radius-sm); font-size: 1.2rem; line-height: 1; cursor: pointer; height: 42px; }
.np-pcard__del:hover { border-color: var(--danger); color: var(--danger); }
.np-modal__add { margin: 14px 0 0; }
.np-modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px;
  border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 520px) {
  .np-pcard__row { grid-template-columns: 1fr 40px; }
  .np-pcard__row .np-pcard-doc { grid-column: 1 / -1; }
  .np-pcard__row--2 { grid-template-columns: 1fr; }
}

/* Guard-rail warning (juros/multa acima do usual). */
.np-warn { margin: 8px 0 0; padding: 9px 12px; border-radius: var(--radius-sm); font-size: .84rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--ink); }

.np-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.np-card__title { font-size: 1.06rem; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.np-card__hint { color: var(--ink-soft); font-size: .9rem; margin: 0 0 16px; }

/* Form fields */
.np-field { margin-bottom: 15px; }
.np-field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.np-field .np-sub { font-weight: 400; color: var(--ink-faint); }
.np-input, .np-select, .np-textarea {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.np-input:focus, .np-select:focus, .np-textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.np-input--valid { border-color: var(--ok); }
.np-input--valid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.np-input--invalid { border-color: var(--danger); }
.np-input--invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.np-textarea { resize: vertical; min-height: 66px; }
.np-help { font-size: .8rem; color: var(--ink-faint); margin: 5px 0 0; }
.np-row { display: grid; gap: 12px; }
@media (min-width: 520px) { .np-row.np-row-2 { grid-template-columns: 1fr 1fr; } }

.np-fieldset { border: 0; padding: 0; margin: 0 0 6px; }
.np-legend { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-faint); margin: 20px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.np-fieldset:first-of-type .np-legend { margin-top: 0; }

/* Segment toggle (vias per sheet, vencimento tipo) */
.np-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 3px; gap: 2px; }
.np-seg__btn { border: 0; background: none; cursor: pointer; padding: 7px 16px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .88rem; color: var(--ink-soft); }
.np-seg__btn.is-active { background: var(--brand); color: #fff; }

/* Installment (parcelamento) editor */
.np-faixa-head { display: grid; grid-template-columns: 88px 1fr 42px; gap: 8px; margin-bottom: 6px; }
.np-faixa-head span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.np-faixas { display: grid; gap: 8px; margin-bottom: 10px; }
.np-faixa-row { display: grid; grid-template-columns: 88px 1fr 42px; align-items: center; gap: 8px; }
.np-faixa-row .faixa-qtd { text-align: center; }
.np-faixa-row .faixa-valor[readonly] { background: var(--brand-soft); color: var(--ink); }
.np-checkline { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 12px; font-size: .88rem;
  color: var(--ink-soft); cursor: pointer; line-height: 1.4; }
.np-checkline input { margin-top: 2px; flex: none; width: 17px; height: 17px; accent-color: var(--brand); }
.np-faixa-del { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  border-radius: var(--radius-sm); font-size: 1.3rem; line-height: 1; cursor: pointer; height: 42px; }
.np-faixa-del:hover { border-color: var(--danger); color: var(--danger); }
.np-btn--sm { padding: 9px 14px; font-size: .88rem; }
.np-seg--wide { display: flex; width: 100%; }
.np-seg--wide .np-seg__btn { flex: 1; }
.np-dist { margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: .86rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }
.np-dist--ok { background: color-mix(in srgb, var(--ok) 12%, transparent);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); color: var(--ink); }
.np-dist--over { background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--ink); }

/* Installment preview summary */
.np-parc-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: var(--radius-sm); padding: 12px; }
.np-parc-summary > div { display: flex; flex-direction: column; }
.np-parc-summary span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.np-parc-summary b { font-size: 1.05rem; color: var(--brand-strong); }

/* Amount in words readout */
.np-extenso {
  margin-top: 6px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  font-size: .92rem; color: var(--ink);
}
.np-extenso b { color: var(--brand-strong); }

/* Buttons */
.np-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.np-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; font: inherit; font-weight: 700; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1;
}
.np-btn svg { width: 18px; height: 18px; }
.np-btn--primary { background: var(--brand); color: #fff; }
.np-btn--primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); text-decoration: none; }
.np-btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.np-btn--ghost:hover { background: var(--surface-2); text-decoration: none; }
.np-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- Preview panel (side) ---------------------------------------------- */
.np-preview-col { position: relative; }
@media (min-width: 860px) { .np-preview-col { position: sticky; top: 98px; align-self: start; } }
.np-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.np-preview-head h2 { font-size: 1.02rem; margin: 0; }
.np-preview-scale { color: var(--ink-faint); font-size: .8rem; }

.np-preview-frame {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; overflow: auto;
}
/* The note document itself is styled by js/nota.js (NOTE_CSS, "nn-*" classes),
   the single source of truth shared by preview + A4 print + PDF. */

/* ---- Content pages ------------------------------------------------------ */
.np-page-head { margin-bottom: 20px; }
.np-page-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 8px; letter-spacing: -.02em; }
.np-page-head .np-lede { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.np-prose { color: var(--ink); font-size: 1.02rem; line-height: 1.72; }
.np-prose > h2 { font-size: 1.42rem; margin: 34px 0 12px; letter-spacing: -.01em; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.np-prose h3 { font-size: 1.12rem; margin: 24px 0 8px; }
.np-prose p { margin: 0 0 15px; }
.np-prose ul, .np-prose ol { margin: 0 0 16px; padding-left: 22px; }
.np-prose li { margin-bottom: 7px; }
.np-prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.np-prose strong { color: var(--ink); }

/* Callout: a restrained editorial note (no colored side stripe). */
.np-callout {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 15px 17px; margin: 20px 0; font-size: .96rem;
}
.np-callout p { margin: 0; }
.np-callout--warn {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

/* Prose tables: clean, striped, readable. */
.np-prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .94rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.np-prose th, .np-prose td { padding: 10px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.np-prose thead th { background: var(--brand-soft); color: var(--brand-strong); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .03em; }
.np-prose tbody tr:nth-child(even) { background: var(--surface-2); }
.np-prose tbody tr:last-child td { border-bottom: 0; }
.np-prose td:first-child, .np-prose th:first-child { font-weight: 600; }
.np-prose td:first-child { color: var(--ink); }
.np-table-wrap { overflow-x: auto; }

.np-crumbs { font-size: .85rem; color: var(--ink-faint); margin-bottom: 14px; }
.np-crumbs a { color: var(--ink-soft); }

/* ---- Articles (hub + article page) ------------------------------------- */
/* Article page: 2-column (readable prose + sticky sidebar) to fill the width. */
.np-article-layout { max-width: 1160px; margin: 0 auto; }
@media (min-width: 940px) {
  .np-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 306px; gap: 48px; align-items: start; }
  .np-article-aside { position: sticky; top: 98px; }
}
.np-article-main { min-width: 0; }
.np-article__meta { color: var(--ink-faint); font-size: .88rem; margin: 0; }
.np-article__disclaimer { margin-top: 16px; }
.np-article__basis { font-size: .88rem; color: var(--ink-soft); border-top: 1px solid var(--line);
  padding-top: 14px; margin-top: 26px; }
.np-article-aside { display: grid; gap: 16px; margin-top: 30px; align-content: start; }
@media (min-width: 940px) { .np-article-aside { margin-top: 0; } }
.np-aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; }
.np-aside-cta h2 { font-size: 1.06rem; margin: 0 0 8px; }
.np-aside-cta p { font-size: .9rem; color: var(--ink-soft); margin: 0 0 14px; }
.np-aside-cta .np-btn { width: 100%; }
.np-related h2 { font-size: 1rem; margin: 0 0 10px; }
.np-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.np-related a { color: var(--brand); font-weight: 600; font-size: .92rem; }

.np-article-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
@media (min-width: 680px) { .np-article-list { grid-template-columns: 1fr 1fr; } }
.np-article-card a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; text-decoration: none;
}
.np-article-card a:hover { border-color: var(--line-strong); text-decoration: none; }
.np-article-card__cluster { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.np-article-card__title { font-size: 1.06rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.np-article-card__desc { font-size: .9rem; color: var(--ink-soft); flex: 1; }
.np-article-card__date { font-size: .78rem; color: var(--ink-faint); margin-top: 2px; }

/* ---- 404 ---------------------------------------------------------------- */
.np-404 { text-align: center; padding: 40px 0; }
.np-404 .np-code { font-size: 4rem; font-weight: 800; color: var(--brand); letter-spacing: -.03em; }

/* ---- Footer ------------------------------------------------------------- */
.np-foot { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; }
.np-foot__in { max-width: var(--maxw); margin: 0 auto; padding: 34px 16px 20px;
  display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .np-foot__in { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.np-foot__brand { color: var(--brand-strong); }
.np-foot__glyph { color: var(--brand); display: inline-flex; vertical-align: middle; margin-right: 6px; }
.np-foot__name { font-weight: 800; }
.np-foot__tag { color: var(--ink-soft); font-size: .9rem; margin: 8px 0 0; max-width: 280px; }
.np-foot__col { list-style: none; margin: 0; padding: 0; }
.np-foot__h { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); margin-bottom: 8px; }
.np-foot__col li { margin-bottom: 6px; }
.np-foot__col a { color: var(--ink-soft); font-size: .92rem; }
.np-foot__col a:hover { color: var(--brand); }
.np-foot__bar { border-top: 1px solid var(--line); }
.np-foot__bar p { max-width: var(--maxw); margin: 0 auto; padding: 14px 16px; color: var(--ink-faint); font-size: .82rem; text-align: center; }

.np-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
