/* NN Legal — reading-first design for legal documents.
   Lineage: reviews wall tokens (GlobalPaymentsV4/modules/reviews/wall/css/).
   Black and white; the ONE blue (#0072ff) is reserved for links + dot grids.
   Geist for EVERYTHING (per owner: professional, one family). Links use the
   reviews-header grow-underline: ::after scales in left-to-right on hover and
   exits left-to-right (resting origin right) — copied from wall/css/header.css. */

:root {
    --bg:          #ffffff;
    --text:        #1a1a1a;
    --text-muted:  #6b6b6b;
    --text-faint:  #9aa0a6;
    --accent:      #0072ff;
    --accent-hover:#0056cc;
    --accent-soft: rgba(0, 114, 255, 0.10);
    --border:      #e1e4e8;
    --border-soft: #edf0f3;
    --sans:  'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
    --ease-hover:     ease;
    --dur-fast:       180ms;
}

* { box-sizing: border-box; }

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

body.nn-legal-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- The grow-underline (reviews header.css pattern) --------- */
/* Applied to every link on the page: nav, document body, footer. */

.nn-legal-nav a,
.nn-legal-doc a,
.nn-legal-footer a {
    position: relative;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-hover);
}

.nn-legal-nav a::after,
.nn-legal-doc a::after,
.nn-legal-footer a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform var(--dur-fast) var(--ease-out-quart);
}

.nn-legal-nav a:hover::after,
.nn-legal-nav a:focus-visible::after,
.nn-legal-doc a:hover::after,
.nn-legal-doc a:focus-visible::after,
.nn-legal-footer a:hover::after,
.nn-legal-footer a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* ---------- Header ------------------------------------------------ */

.nn-legal-header {
    font-family: var(--sans);
}

.nn-legal-header-inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.nn-legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nn-legal-brand img { display: block; }

.nn-legal-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nn-legal-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 5px 0;
}

.nn-legal-nav a::after {
    bottom: 2px;
}

.nn-legal-nav a:hover,
.nn-legal-nav a:focus-visible {
    color: var(--accent);
}

.nn-legal-nav a.is-current {
    color: var(--accent);
}

.nn-legal-nav a.is-current::after {
    transform: scaleX(1); /* current page keeps its underline planted */
}

/* ---------- Main / dot-grid flourishes ---------------------------- */

.nn-legal-main {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.nn-legal-dot-grid {
    position: absolute;
    z-index: -1;
    width: 180px;
    height: 140px;
    pointer-events: none;
    background-image: radial-gradient(currentColor 1.6px, transparent 1.6px);
    background-size: 15px 15px;
    color: rgba(0, 114, 255, 0.18);
}

.nn-legal-dot-grid--tl { top: 28px; left: -40px; }
.nn-legal-dot-grid--br { bottom: 40px; right: -40px; }

/* ---------- Document typography ------------------------------------ */

.nn-legal-doc {
    max-width: 70ch;
    margin: 0 auto;
}

.nn-legal-doc h1,
.nn-legal-doc h2,
.nn-legal-doc h3,
.nn-legal-doc h4 {
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--text);
}

.nn-legal-doc h1 {
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 650;
    margin: 0 0 0.6em;
}

.nn-legal-doc h2 {
    font-size: 1.35rem;
    font-weight: 600;
    /* generous top margin IS the section divider — no hairlines */
    margin: 2.8em 0 0.7em;
}

.nn-legal-doc h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2em 0 0.6em;
}

.nn-legal-doc h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.8em 0 0.5em;
}

.nn-legal-doc p {
    margin: 0 0 1.25em;
}

.nn-legal-doc ul,
.nn-legal-doc ol {
    margin: 0 0 1.25em;
    /* markers hang outside the text box — 2.25em keeps the list visibly
       indented from paragraph text, near the browser-default 40px */
    padding-left: 2.25em;
}

.nn-legal-doc li {
    margin-bottom: 0.45em;
}

.nn-legal-doc li > ul,
.nn-legal-doc li > ol {
    margin: 0.45em 0 0;
}

.nn-legal-doc li::marker {
    color: var(--text-faint);
}

.nn-legal-doc strong { font-weight: 600; }

.nn-legal-doc blockquote {
    margin: 1.5em 0;
    padding: 0.25em 0 0.25em 1.25em;
    /* classic quotation convention in neutral gray — not a card accent tab */
    border-left: 2px solid var(--border);
    color: var(--text-muted);
}

.nn-legal-doc hr {
    border: 0;
    border-top: 1px solid var(--border-soft);
    margin: 2.5em 0;
}

.nn-legal-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9em;
    display: block;
    overflow-x: auto;
}

.nn-legal-doc th,
.nn-legal-doc td {
    border: 1px solid var(--border);
    padding: 9px 13px;
    text-align: left;
    vertical-align: top;
}

.nn-legal-doc th {
    background: var(--border-soft);
    font-weight: 600;
}

.nn-legal-doc code {
    font-size: 0.88em;
    background: var(--border-soft);
    padding: 0.15em 0.4em;
    border-radius: 5px;
}

.nn-legal-doc a {
    color: var(--accent);
}

.nn-legal-doc a:hover,
.nn-legal-doc a:focus-visible {
    color: var(--accent-hover);
}

.nn-legal-doc a:hover::after,
.nn-legal-doc a:focus-visible::after {
    background: var(--accent-hover);
}

/* ---------- Footer -------------------------------------------------- */

.nn-legal-footer {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-faint);
    text-align: center;
    padding: 26px 24px 34px;
}

.nn-legal-footer p { margin: 0; }

.nn-legal-footer a {
    color: var(--text-muted);
}

.nn-legal-footer a:hover,
.nn-legal-footer a:focus-visible {
    color: var(--accent);
}

/* ---------- Small screens ------------------------------------------- */

@media (max-width: 600px) {
    body.nn-legal-body { font-size: 15.5px; }
    .nn-legal-main { padding: 36px 20px 60px; }
    .nn-legal-dot-grid { width: 120px; height: 100px; }
    .nn-legal-dot-grid--tl { left: -20px; }
    .nn-legal-dot-grid--br { right: -20px; }
    .nn-legal-brand span { display: none; } /* icon-only brand on small screens */
    .nn-legal-nav { gap: 14px; }
}

/* ---------- Reduced motion / print ----------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .nn-legal-nav a,
    .nn-legal-doc a,
    .nn-legal-footer a,
    .nn-legal-nav a::after,
    .nn-legal-doc a::after,
    .nn-legal-footer a::after { transition: none; }
}

@media print {
    .nn-legal-header,
    .nn-legal-footer,
    .nn-legal-dot-grid { display: none; }
    body.nn-legal-body { font-size: 11pt; }
    .nn-legal-doc a { color: var(--text); text-decoration: underline; }
    .nn-legal-doc a::after { display: none; }
}
