/* ============================================================
   NRM BRAND STYLESHEET — Yellow-forward, editorial, high-contrast
   Consolidated & deduplicated
   ============================================================ */

   :root {
    /* Brand */
    --nrm-yellow: #ffd000;
    --nrm-yellow-dark: #e6b800;
    --nrm-yellow-soft: #fff5cc;
    --nrm-ink: #0a0a0a;
    --nrm-coal: #1a1a1a;
    --nrm-green: #008751;
    --nrm-green-dark: #006b40;

    /* Neutrals */
    --nrm-paper: #fafaf8;
    --nrm-stone: #f5f4f0;
    --nrm-line: #e7e5df;
    --nrm-muted: #6b6b66;

    /* Rhythm */
    --nrm-radius-sm: 10px;
    --nrm-radius: 16px;
    --nrm-radius-lg: 22px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
    background: var(--nrm-paper);
    color: var(--nrm-ink);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-feature-settings: "ss01", "cv11";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Display font — always single-weight, no synthetic bold */
.font-display {
    font-family: 'Archivo Black', 'Inter', system-ui, sans-serif;
    font-weight: 400 !important;
    letter-spacing: -0.015em;
}

/* Better headline wrapping */
h1, h2, h3, .hero-title, .font-display {
    text-wrap: balance;
}
p, li { text-wrap: pretty; }

/* ---------- Focus ring ---------- */
.nrm-focus:focus-visible {
    outline: 3px solid var(--nrm-yellow);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Header / nav ---------- */
.nrm-header {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--nrm-line);
    box-shadow: 0 4px 18px rgba(17, 17, 17, .06);
    backdrop-filter: blur(12px);
}
.nrm-brand { color: var(--nrm-ink); }
.nrm-brand:hover { color: var(--nrm-green); }

.nrm-nav-link {
    position: relative;
    color: var(--nrm-ink);
    transition: color .2s ease;
}
.nrm-nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    height: 3px;
    width: 0;
    background: var(--nrm-yellow);
    transform: translateX(-50%);
    transition: width .25s ease;
    border-radius: 999px;
}
.nrm-nav-link:hover { color: var(--nrm-ink); }
.nrm-nav-link:hover::after { width: 60%; }

/* ---------- Buttons ---------- */
.nrm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .8rem;
    border: 2px solid var(--nrm-ink);
    border-radius: var(--nrm-radius-sm);
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
    cursor: pointer;
    line-height: 1;
}
.nrm-btn-primary {
    background: var(--nrm-yellow);
    color: var(--nrm-ink);
    box-shadow: 4px 4px 0 0 var(--nrm-ink);
}
.nrm-btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--nrm-ink);
}
.nrm-btn-dark {
    background: var(--nrm-ink);
    color: var(--nrm-yellow);
    box-shadow: 4px 4px 0 0 var(--nrm-yellow);
}
.nrm-btn-dark:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--nrm-yellow);
}
.nrm-btn-ghost {
    background: transparent;
    color: var(--nrm-ink);
    border-color: var(--nrm-ink);
}
.nrm-btn-ghost:hover {
    background: var(--nrm-yellow);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 0 var(--nrm-ink);
}

/* Legacy aliases (used in base.html) */
.nrm-join {
    background: var(--nrm-yellow);
    color: var(--nrm-ink);
    box-shadow: 4px 4px 0 0 var(--nrm-ink);
    transition: transform .15s ease, box-shadow .15s ease;
}
.nrm-join:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 var(--nrm-ink); }
.nrm-donate {
    background: var(--nrm-ink);
    color: var(--nrm-yellow);
    box-shadow: 4px 4px 0 0 var(--nrm-yellow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.nrm-donate:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 var(--nrm-yellow); }

/* ---------- Cards ---------- */
.nrm-card {
    position: relative;
    background: #fff;
    border: 1.5px solid rgba(10, 10, 10, .1);
    border-radius: var(--nrm-radius);
    padding: 1.75rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;
    isolation: isolate;
}
.nrm-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 56px; height: 56px;
    background: var(--nrm-yellow);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 0;
}
.nrm-card > * { position: relative; z-index: 1; }
.nrm-card:hover {
    transform: translateY(-4px);
    border-color: var(--nrm-yellow);
    box-shadow: 8px 8px 0 0 var(--nrm-yellow);
}

.nrm-card-dark {
    position: relative;
    background: var(--nrm-ink);
    color: #fff;
    border-radius: var(--nrm-radius);
    padding: 1.75rem;
    overflow: hidden;
    isolation: isolate;
}
.nrm-card-dark::after {
    content: "";
    position: absolute;
    right: -40px; bottom: -40px;
    width: 160px; height: 160px;
    border: 20px solid var(--nrm-yellow);
    border-radius: 50%;
    opacity: .22;
    z-index: 0;
}
.nrm-card-dark > * { position: relative; z-index: 1; }

@media (max-width: 640px) {
    .nrm-card-dark::after { width: 110px; height: 110px; right: -30px; bottom: -30px; border-width: 14px; }
}

/* ---------- Section eyebrow ---------- */
.nrm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--nrm-ink);
}
.nrm-eyebrow::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 3px;
    background: var(--nrm-yellow);
    border-radius: 999px;
}

/* ---------- Hero ---------- */
#nrmHero { isolation: isolate; }
.hero-slide { will-change: opacity; }

.hero-title {
    font-family: 'Archivo Black', 'Inter', system-ui, sans-serif;
    font-weight: 400 !important;
    letter-spacing: -0.025em;
    line-height: .98;
    text-wrap: balance;
}

.hero-mark {
    position: relative;
    display: inline-block;
    z-index: 1;
}
.hero-mark::after {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    bottom: 6px;
    height: 34%;
    background: var(--nrm-yellow);
    z-index: -1;
    transform: skewX(-8deg);
    border-radius: 4px;
}

/* ---------- Dots ---------- */
.hero-dot { transition: all .25s ease; }
.hero-dot:hover { background: var(--nrm-yellow); }

/* ---------- Document tiles ---------- */
.nrm-doc {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    position: relative;
    background: #fff;
    border: 2px solid var(--nrm-ink);
    border-radius: var(--nrm-radius-sm);
    padding: 1.25rem;
    font-weight: 800;
    color: var(--nrm-ink);
    line-height: 1.25;
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
    overflow: hidden;
}
.nrm-doc::after {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    background: var(--nrm-yellow);
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 17L17 7M9 7h8v8' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 17L17 7M9 7h8v8' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
    transition: transform .2s ease, background .2s ease;
}
.nrm-doc:hover {
    background: var(--nrm-yellow);
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 0 var(--nrm-ink);
}
.nrm-doc:hover::after {
    background: var(--nrm-ink);
    transform: translate(2px, -2px);
}

/* ---------- Custom card-list (no markers — for card grids) ---------- */
.nrm-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nrm-list li {
    position: relative;
    padding-left: 1.35rem;
    line-height: 1.65;
}
.nrm-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .65em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--nrm-yellow);
}
.nrm-list li + li { margin-top: .65rem; }

.nrm-card-list,
.nrm-card-list > li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.nrm-card-list > li::before { content: none !important; }

/* ============================================================
   RICH-TEXT / CKEDITOR — BASE PROSE STYLES
   ============================================================ */
.nrm-prose {
    color: #2a2a2a;
    line-height: 1.75;
    font-size: 1rem;
}
.nrm-prose > * + * { margin-top: 1rem; }
.nrm-prose h2, .nrm-prose h3, .nrm-prose h4 {
    font-family: 'Archivo Black', 'Inter', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--nrm-ink);
    margin-top: 1.75rem;
}
.nrm-prose h2 { font-size: 1.5rem; }
.nrm-prose h3 { font-size: 1.2rem; }
.nrm-prose blockquote {
    border-left: 4px solid var(--nrm-yellow);
    padding: .25rem 0 .25rem 1rem;
    color: var(--nrm-muted);
    font-style: italic;
}
.nrm-prose a { color: var(--nrm-ink); border-bottom: 2px solid var(--nrm-yellow); text-decoration: none; }
.nrm-prose a:hover { background: var(--nrm-yellow); }
.nrm-prose img { border-radius: var(--nrm-radius-sm); }
.nrm-prose code {
    background: var(--nrm-stone);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .9em;
}

/* ============================================================
   BULLET / LIST RENDERING — HIGH SPECIFICITY OVERRIDES
   Defeats Tailwind Preflight's `ul, ol { list-style: none }`
   ============================================================ */

/* ---------- Generic prose lists (any .nrm-prose container) ---------- */
.nrm-prose ul,
.nrm-prose ol,
.nrm-prose-light ul,
.nrm-prose-light ol,
.nrm-prose-dark ul,
.nrm-prose-dark ol,
.nrm-richtext ul,
.nrm-richtext ol {
    list-style-position: outside !important;
    padding-left: 1.75rem !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.nrm-prose ul,
.nrm-prose-light ul,
.nrm-prose-dark ul,
.nrm-richtext ul { list-style-type: disc !important; }

.nrm-prose ol,
.nrm-prose-light ol,
.nrm-prose-dark ol,
.nrm-richtext ol { list-style-type: decimal !important; }

/* Nested lists — deeper styles */
.nrm-prose ul ul,
.nrm-prose-light ul ul,
.nrm-prose-dark ul ul,
.nrm-richtext ul ul { list-style-type: circle !important; }

.nrm-prose ul ul ul,
.nrm-prose-light ul ul ul,
.nrm-prose-dark ul ul ul,
.nrm-richtext ul ul ul { list-style-type: square !important; }

.nrm-prose ol ol,
.nrm-prose-light ol ol,
.nrm-prose-dark ol ol,
.nrm-richtext ol ol { list-style-type: lower-alpha !important; }

.nrm-prose ol ol ol,
.nrm-prose-light ol ol ol,
.nrm-prose-dark ol ol ol,
.nrm-richtext ol ol ol { list-style-type: lower-roman !important; }

/* ---------- List items — force display: list-item so markers render ---------- */
.nrm-prose li,
.nrm-prose-light li,
.nrm-prose-dark li,
.nrm-richtext li {
    display: list-item !important;
    list-style-type: inherit;
    margin-top: .6rem !important;
    margin-bottom: .35rem !important;
    padding-left: .35rem;
    line-height: 1.75;
    text-wrap: pretty;
}

/* Kill any pseudo-element bullets that might collide */
.nrm-prose ul > li::before,
.nrm-prose-light ul > li::before,
.nrm-prose-dark ul > li::before,
.nrm-richtext ul > li::before {
    content: none !important;
    display: none !important;
}

/* ---------- Marker styling (the visible bullet / number) ---------- */
.nrm-prose li::marker,
.nrm-prose-light li::marker,
.nrm-richtext li::marker {
    color: var(--nrm-yellow-dark) !important;
    font-weight: 900;
    font-size: 1.05em;
}

.nrm-prose-dark li::marker {
    color: var(--nrm-yellow) !important;
    font-weight: 900;
    font-size: 1.05em;
}

/* ---------- Paragraphs inside li (CKEditor often wraps content in <p>) ---------- */
.nrm-prose li > p,
.nrm-prose-light li > p,
.nrm-prose-dark li > p,
.nrm-richtext li > p {
    margin: .15rem 0 .35rem 0 !important;
    display: inline;
}

/* ============================================================
   PROSE — LIGHT BACKGROUND VARIANT
   ============================================================ */
.nrm-prose-light {
    color: #2a2a2a;
}
.nrm-prose-light > * + * { margin-top: 1rem; }
.nrm-prose-light h2,
.nrm-prose-light h3,
.nrm-prose-light h4 {
    font-family: 'Archivo Black', 'Inter', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--nrm-ink);
    margin-top: 1.75rem;
}
.nrm-prose-light h2 { font-size: 1.5rem; }
.nrm-prose-light h3 { font-size: 1.2rem; }
.nrm-prose-light blockquote {
    border-left: 4px solid var(--nrm-yellow);
    padding: .5rem 0 .5rem 1rem;
    color: var(--nrm-muted);
    font-style: italic;
}
.nrm-prose-light img { border-radius: var(--nrm-radius-sm); }
.nrm-prose-light a {
    color: var(--nrm-ink);
    border-bottom: 2px solid var(--nrm-yellow);
    text-decoration: none;
    font-weight: 600;
}
.nrm-prose-light a:hover { background: var(--nrm-yellow); }

/* ============================================================
   PROSE — DARK BACKGROUND VARIANT
   ============================================================ */
.nrm-prose-dark {
    color: rgba(255, 255, 255, .88);
}
.nrm-prose-dark > * + * { margin-top: 1rem; }
.nrm-prose-dark h2,
.nrm-prose-dark h3,
.nrm-prose-dark h4 {
    font-family: 'Archivo Black', 'Inter', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #fff;
    margin-top: 1.75rem;
}
.nrm-prose-dark h2 { font-size: 1.5rem; }
.nrm-prose-dark h3 { font-size: 1.2rem; }
.nrm-prose-dark blockquote {
    border-left: 4px solid var(--nrm-yellow);
    padding: .5rem 0 .5rem 1rem;
    color: rgba(255, 255, 255, .75);
    font-style: italic;
}
.nrm-prose-dark img { border-radius: var(--nrm-radius-sm); }
.nrm-prose-dark strong { color: #fff; }
.nrm-prose-dark em { color: rgba(255, 255, 255, .95); }
.nrm-prose-dark a {
    color: var(--nrm-yellow);
    border-bottom: 2px solid rgba(255, 208, 0, .5);
    text-decoration: none;
    font-weight: 600;
}
.nrm-prose-dark a:hover {
    border-bottom-color: var(--nrm-yellow);
    color: #fff;
}

/* ============================================================
   RICHTEXT WRAPPER (generic CKEditor container alias)
   ============================================================ */
.nrm-richtext {
    color: #2a2a2a;
    line-height: 1.75;
}
.nrm-richtext li::marker {
    color: var(--nrm-yellow-dark) !important;
    font-weight: 700;
}
.nrm-richtext p {
    margin-top: .5rem;
    margin-bottom: .75rem;
}

/* ============================================================
   NEWS CARD
   ============================================================ */
.nrm-news-card {
    position: relative;
    background: #fff;
    border: 1.5px solid rgba(10, 10, 10, .1);
    border-radius: var(--nrm-radius);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;
}
.nrm-news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px -20px rgba(10, 10, 10, .35);
    border-color: var(--nrm-yellow);
}
.nrm-news-card .read-more {
    color: var(--nrm-ink);
    border-bottom: 2px solid var(--nrm-yellow);
    padding-bottom: 2px;
    transition: border-color .2s ease;
}
.nrm-news-card:hover .read-more { border-color: var(--nrm-ink); }

.nrm-news-card .corner-tag {
    position: absolute;
    top: 0; left: 0;
    width: 44px; height: 44px;
    background: var(--nrm-ink);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 2;
}

/* ============================================================
   FOOTER
   ============================================================ */
.nrm-footer { background: var(--nrm-ink); color: #fff; }
.nrm-footer a { color: rgba(255, 255, 255, .7); transition: color .2s ease; }
.nrm-footer a:hover { color: var(--nrm-yellow); }
.nrm-footer-accent { border-top: 1px solid rgba(255, 255, 255, .14); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-on-dark { color: rgba(255, 255, 255, .72); }
.text-on-dark-strong { color: #fff; }

/* ---------- Image polish ---------- */
.nrm-news-card img,
.media-thumb img,
article img {
    transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .4s ease;
}
.hero-slide img,
.hero-slide video {
    backface-visibility: hidden;
    transform: translateZ(0);
}

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

/* ============================================================
   FORM PRIMITIVES — .nrm-label + .nrm-input
   Used by: Join, Dues, Login, and any future forms
   Overrides Tailwind Preflight's input reset
   ============================================================ */

   .nrm-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.nrm-input {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e7e5df;
    border-radius: 12px;
    background-color: #ffffff;
    color: #0a0a0a;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    box-shadow: none;
}

.nrm-input::placeholder {
    color: #a8a29e;
    font-weight: 400;
    opacity: 1; /* Firefox lowers opacity by default */
}

.nrm-input:hover:not(:focus):not(:disabled) {
    border-color: #d6d3d1;
}

.nrm-input:focus {
    border-color: #ffd000;
    box-shadow: 0 0 0 4px rgba(255, 208, 0, 0.18);
    background-color: #fffef7;
}

.nrm-input:disabled {
    background-color: #f5f4f0;
    color: #a8a29e;
    cursor: not-allowed;
}

/* Native validation feedback (only after user typed something) */
.nrm-input:required:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #dc2626;
    background-color: #fef2f2;
}

/* Textarea variant */
textarea.nrm-input {
    min-height: 7rem;
    resize: vertical;
    padding: 0.85rem 1rem;
}

/* Custom select arrow — always use brand ink chevron */
select.nrm-input {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.75rem;
    cursor: pointer;
}

/* Number input — hide spinner buttons for a cleaner look */
.nrm-input[type="number"]::-webkit-outer-spin-button,
.nrm-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.nrm-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Autofill fix — Chrome paints inputs with a yellow/blue overlay by default */
.nrm-input:-webkit-autofill,
.nrm-input:-webkit-autofill:hover,
.nrm-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #0a0a0a;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #0a0a0a;
}
.nrm-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fffef7 inset,
                        0 0 0 4px rgba(255, 208, 0, 0.18);
}

/* ---------- Rich-text biography wrapper (CKEditor content) ---------- */
.prose-nrm {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #1a1a1a;
}
.prose-nrm p { margin: 0 0 1.15rem; }
.prose-nrm p:last-child { margin-bottom: 0; }
.prose-nrm h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 2.5rem 0 1rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.prose-nrm h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  text-transform: uppercase;
}
.prose-nrm a {
  color: #0a0a0a;
  font-weight: 700;
  border-bottom: 2px solid #ffd000;
}
.prose-nrm a:hover { background: #ffd000; }
.prose-nrm blockquote {
  border-left: 4px solid #ffd000;
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.75rem 0;
  font-style: italic;
  color: #3a3a3a;
}
.prose-nrm ul { list-style: disc; padding-left: 1.5rem; margin: 1rem 0; }
.prose-nrm ol { list-style: decimal; padding-left: 1.5rem; margin: 1rem 0; }
.prose-nrm li { margin-top: 0.4rem; }
.prose-nrm ul li::marker,
.prose-nrm ol li::marker { color: #e6b800; font-weight: 900; }
.prose-nrm img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
}
.prose-nrm hr { border: 0; border-top: 1px solid #e7e5df; margin: 2rem 0; }