/* ==========================================================================
   26 Branding Agency - PUBLIC DOCUMENT skin
   Loaded ONLY by /newdesign/doc.php around the client-facing contract and
   NDA pages. Same identity family as the admin new design (Manrope, paper,
   ink, brand red) but with no admin chrome at all: a signer sees a clean,
   formal branded document and nothing that pulls them away from signing.
   The original design never loads this file and is never affected by it.
   ========================================================================== */

:root {
    --doc-w: 940px;
    --doc-pad: clamp(18px, 3.5vw, 26px);
    --nd-paper: #f6f5f1;
    --nd-surface: #ffffff;
    --nd-panel: #fbfaf7;
    --nd-ink: #0b0f1e;
    --nd-ink-body: #262c3d;
    --nd-ink-2: #5e6473;
    --nd-ink-3: #9aa2b5;
    --nd-line: #e5e1d6;
    --nd-line-2: #d8d3c6;
    --nd-accent: #dc1f1f;
    --nd-accent-2: #b81818;
    --nd-accent-soft: #fce4e4;
    --nd-r: 18px;
    --nd-shadow: 0 1px 2px rgba(11,15,30,0.04), 0 14px 40px -18px rgba(11,15,30,0.14);
}

/* --- Base identity ----------------------------------------------------- */
html, body {
    background: #ffffff !important;
}
body, body * {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: -0.01em;
}
body {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--nd-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--nd-accent-soft); }

/* --- The retired marketing chrome never shows on a document ------------ */
#header { display: none !important; }
body > footer, footer { display: none !important; }
.mobile-nav-panel, .hamburger { display: none !important; }
.visitor-toast-final { display: none !important; }
/* Admin breadcrumbs (Admin Dashboard / Contracts) are not for a signer. */
.breadcrumbs { display: none !important; }
/* The old banner duplicated the document's own masthead title and left the
   page top-heavy and empty. The document opens on the card itself. */
.header-section { display: none !important; }

/* --- Branded topbar and foot line (injected by doc.php) ---------------- */
.nddoc-top {
    background: var(--nd-surface);
    border-bottom: 3px solid var(--nd-accent);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nddoc-top-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: var(--doc-w);
    margin: 0 auto;
    padding: 14px var(--doc-pad);
}
.nddoc-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none !important;
    color: var(--nd-ink) !important;
    font-weight: 800;
    font-size: 16.5px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.nddoc-brand img { height: 30px; width: auto; display: block; }
.nddoc-dl {
    display: inline-block;
    text-decoration: none !important;
    background: var(--nd-surface);
    border: 1px solid var(--nd-line-2);
    color: var(--nd-ink) !important;
    font-weight: 700;
    font-size: 13.5px;
    padding: 8px 15px;
    border-radius: 11px;
    white-space: nowrap;
    transition: border-color 0.15s ease;
}
.nddoc-dl:hover { border-color: var(--nd-ink-3); }
.nddoc-right { display: inline-flex; align-items: center; gap: 10px; }
.nddoc-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em !important;
    color: #8a6d1a;
    background: #fdf6e3;
    border: 1px solid #f0e2b6;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.nddoc-chip-ok { color: var(--nd-ok); background: #eef7f0; border-color: #cfe5d4; }
/* Admin-only action bar under the header on a still-unsigned document. */
.nddoc-actionbar { background: #fdf6e3; border-bottom: 1px solid #f0e2b6; }
.nddoc-actionbar-in {
    max-width: var(--doc-w);
    margin: 0 auto;
    padding: 9px var(--doc-pad);
    display: flex;
    justify-content: flex-end;
}
.nddoc-sign-link {
    background: var(--nd-accent);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 11px;
    text-decoration: none !important;
    transition: background 0.15s ease;
}
.nddoc-sign-link:hover { background: var(--nd-accent-2); }
.nddoc-foot {
    max-width: var(--doc-w);
    margin: 46px auto 0;
    text-align: center;
    color: var(--nd-ink-2);
    font-size: 13px;
    line-height: 1.75;
    border-top: 1px solid var(--nd-line);
    padding: 22px var(--doc-pad) 48px;
}
.nddoc-foot-name {
    font-weight: 800;
    color: var(--nd-ink);
    font-size: 14px;
    margin-bottom: 2px;
}
.nddoc-foot-line { color: var(--nd-ink-2); }

/* --- The document card -------------------------------------------------- */
.main-content-section {
    background: transparent !important;
    background-color: transparent !important;
    padding: clamp(26px, 4vw, 48px) 0 10px !important;
}
/* The retired site's .container capped and padded the column twice over;
   the document is the page here: one column, same geometry as the topbar,
   so the lockup and the text share a left edge. */
.main-content-section .container {
    width: auto !important;
    max-width: var(--doc-w) !important;
    margin: 0 auto !important;
    padding: 0 var(--doc-pad) !important;
}
.contract-container, .nda-container {
    max-width: none !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    position: relative;
}

/* --- Masthead: emblem, title, effective date ---------------------------- */
.contract-header, .nda-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 28px;
    text-align: left !important;
    margin: 0 0 2.3rem !important;
    padding: 0.5rem 0 1.5rem !important;
    border-bottom: 1px solid var(--nd-line);
}

.contract-header h2, .nda-header h2 {
    font-size: clamp(30px, 3.8vw, 40px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: var(--nd-ink) !important;
    margin: 0 !important;
}
.contract-header p, .nda-header p {
    color: var(--nd-ink-2) !important;
    font-size: 14px !important;
    margin: 0 !important;
}

/* --- Document body ------------------------------------------------------ */
.contract-body, .nda-body,
.contract-body p, .nda-body p {
    color: var(--nd-ink-body) !important;
    font-size: 15.5px !important;
    line-height: 1.8 !important;
}
/* The opening recital reads as a lede. */
.contract-body > p:first-of-type, .nda-body > p:first-of-type {
    font-size: 17.5px !important;
    color: var(--nd-ink-2) !important;
    line-height: 1.7 !important;
}
.contract-body p strong, .nda-body p strong { color: var(--nd-ink); }
.contract-body h3, .nda-body h3 {
    color: var(--nd-ink) !important;
    font-size: clamp(19px, 2.2vw, 22px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    line-height: 1.3 !important;
    margin-top: 3.1rem !important;
    margin-bottom: 1.1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--nd-line);
}
.contract-body h3::before, .nda-body h3::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    background: var(--nd-accent);
    border-radius: 2px;
    margin-right: 11px;
}
.contract-body p, .nda-body p { margin-bottom: 1rem; }

/* The two parties presented as formal panels, not floating paragraphs. */
.parties-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 1.4rem 0 0.4rem;
}
.parties-section p {
    background: var(--nd-panel);
    border: 1px solid var(--nd-line);
    border-radius: 14px;
    padding: 1.2rem 1.35rem !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
}
.parties-section p strong:first-child {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em !important;
    color: var(--nd-ink-3);
    margin-bottom: 0.55rem;
}
/* The source writes a <br> right after the label; the label is already a
   block, so that <br> would add an empty line inside the panel. */
.parties-section p strong:first-child + br { display: none; }

/* --- Signature block ---------------------------------------------------- */
.signature-block {
    margin-top: 3rem !important;
    border-top: none !important;
    padding-top: 0 !important;
}
.signature-block > p {
    font-size: 14.5px;
    color: var(--nd-ink-2) !important;
    margin-bottom: 1.2rem;
}
.signature-area {
    background: var(--nd-panel);
    border: 1px solid var(--nd-line);
    border-radius: 14px;
    padding: 1.4rem 1.5rem 1.6rem;
}
/* A signed panel reads as done: soft green wash and a check by the name. */
.signature-area:has(.signature-info) {
    background: #f6faf6;
    border-color: #d8e8dc;
}
.signature-area:has(.signature-info) h4::after {
    content: " \2713";
    color: var(--nd-ok);
    font-size: 13px;
}
/* The panel holding the live sign action draws the eye. */
.signature-area:has(.signature-form) {
    background: var(--nd-surface);
    border-color: #efc9c9;
    box-shadow: 0 0 0 3px var(--nd-accent-soft);
}
/* The signer's name renders as a signature. */
.signature-info strong {
    display: block;
    font-family: 'Caveat', cursive !important;
    font-size: 31px;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    color: var(--nd-ink) !important;
    margin: 4px 0 2px;
}
.signature-area h4 {
    margin: 0 0 0.4rem !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em !important;
    color: var(--nd-ink-2) !important;
}
.signature-info {
    color: var(--nd-ink-body) !important;
    font-style: normal !important;
    font-size: 14px;
    line-height: 1.7 !important;
}
.signature-placeholder {
    border-bottom: 1px solid var(--nd-line-2) !important;
    height: 46px !important;
}
.signature-area .signature-placeholder + p {
    color: var(--nd-ink-3) !important;
    font-size: 13px;
    font-style: italic;
    margin-top: 0.6rem;
}
.signature-form p { font-size: 13.5px; color: var(--nd-ink-2) !important; line-height: 1.65 !important; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
    border-radius: 12px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
    background: var(--nd-accent) !important;
    border: 1px solid var(--nd-accent) !important;
    color: #fff !important;
}
.btn-primary:hover { background: var(--nd-accent-2) !important; border-color: var(--nd-accent-2) !important; }
.btn-secondary {
    background: var(--nd-surface) !important;
    border: 1px solid var(--nd-line-2) !important;
    color: var(--nd-ink) !important;
}
.btn-secondary:hover { border-color: var(--nd-ink-3) !important; }

/* --- Fully-executed notice (inline-styled green box in the page) -------- */
.contract-container div[style*="e8f5e9"], .nda-container div[style*="e8f5e9"] {
    background: #f0f7f1 !important;
    border: 1px solid #cfe5d4 !important;
    border-radius: 14px !important;
    padding: 1.6rem 1.5rem !important;
}
.contract-container div[style*="e8f5e9"] p:first-child::before,
.nda-container div[style*="e8f5e9"] p:first-child::before {
    content: "\2713  ";
    color: var(--nd-ok);
}
.contract-container div[style*="e8f5e9"] p, .nda-container div[style*="e8f5e9"] p {
    color: #1f6b33 !important;
}

/* --- Small screens ------------------------------------------------------ */
@media (max-width: 700px) {
    .parties-section { grid-template-columns: 1fr; }
    /* The two signature columns stack (the grid is inline-styled 1fr 1fr). */
    .signature-block > div { display: block !important; }
    .signature-area + .signature-area { margin-top: 1.2rem; }
    .nddoc-brand { font-size: 15px; }
    .nddoc-chip { font-size: 10px; padding: 5px 9px; letter-spacing: 0.06em !important; }
}

/* --- Print: the document alone, on white -------------------------------- */
@media print {
    .nddoc-top, .nddoc-foot { display: none !important; }
    html, body { background: #fff !important; }
}
