/* ===========================================================================
   LEGAL & TRANSPARENCY REGISTER — aristosai.com/legal
   Hub cards, document shell, TOC, callouts, tables, register navigation.
   Tokens resolve from site.css :root. Light editorial canvas, ink typography.
   =========================================================================== */

/* ---------- the mono label (section kicker, on light grounds) ---------- */
.label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin-bottom: 0.9rem;
}
.label::after {
    content: '';
    width: 44px;
    height: 1px;
    background: linear-gradient(90deg, rgba(122, 95, 48, 0.45), transparent);
    flex: 0 0 auto;
}
/* labels sit above headings inside cards; keep the rule off inside stamps */
.doc-body .label, .callout .label { margin-bottom: 0; }

/* ---------- register stamps (version / status / effective chips) ---------- */
.stamp {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
}
.stamp b { color: var(--ink); font-weight: 500; }
.reg-stamps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.55rem;
    margin-top: 1.4rem;
}
.reg-stamps .stamp { background: var(--surface); }

/* ---------- page head, the document head reuses it (doc-head) ---------- */
.doc-head .reg-stamps { margin-top: 1.15rem; }
.doc-head { padding-bottom: clamp(2rem, 5vh, 3rem); }

/* ---------- entity card, the firm on the record ---------- */
.legal-entity { margin-bottom: 2.25rem; }
.entity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
}
.entity-grid h2 {
    font-family: var(--font-disp);
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 0.6rem;
}
.entity-trade { display: block; font-size: 0.85em; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 0.15rem; }
.entity-line {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.7;
}
.entity-note {
    border-left: 2px solid var(--accent);
    padding-left: 1.15rem;
    align-self: center;
}
.entity-note p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* ---------- register grid: six documents ---------- */
#register .reg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}
.reg-card { display: flex; flex-direction: column; gap: 0.5rem; text-decoration: none; color: inherit; }
.reg-card .label { color: #4A3F9E; }
.reg-card .label::after { background: linear-gradient(90deg, rgba(74, 63, 158, 0.45), transparent); }
.reg-card h3 {
    font-family: var(--font-disp);
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--ink);
    margin: 0;
}
.reg-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}
.reg-card .reg-stamps { margin-top: 0.65rem; }
.reg-card .stamp { background: var(--bg-alt); }
.reg-open {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin-top: 0.9rem;
}
.reg-card:hover .reg-open { color: var(--accent-ink); }
.reg-card:hover { border-color: var(--accent-deep); }

/* ---------- truths band, the parts others bury ---------- */
.truths {
    margin-top: clamp(2.5rem, 6vh, 4rem);
    background:
        radial-gradient(1000px 480px at 12% -12%, rgba(45, 39, 105, 0.10), transparent 70%),
        var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: clamp(2.75rem, 6vh, 4.25rem) 0;
}
.truths-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
    margin-top: 1.9rem;
}
.truth { padding: 1.6rem 1.5rem; }
.truth h3 {
    font-family: var(--font-disp);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0.4rem 0 0.55rem;
}
.truth p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; margin: 0; }
.truth-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    border: 1px solid var(--line-2);
    background: var(--surface);
}
.truth-mark::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.mark-warn { color: var(--amber); border-color: rgba(180, 83, 9, 0.32); background: rgba(180, 83, 9, 0.06); }
.mark-gold { color: var(--gold-ink); border-color: rgba(122, 95, 48, 0.32); background: rgba(197, 165, 114, 0.10); }
.mark-neutral { color: #4A4270; border-color: var(--line-2); background: var(--bg-alt); }

/* ---------- how to use this register (hub closing card) ---------- */
.reg-cta { margin-top: clamp(2.5rem, 6vh, 4rem); }
.reg-how { padding: clamp(1.6rem, 3vw, 2.25rem); }
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
    margin-top: 0.5rem;
}
.how-grid h3 {
    font-family: var(--font-disp);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 0.5rem;
}
.how-grid p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; margin: 0; }
.how-grid a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.how-grid a:hover { color: var(--gold-ink); }

/* ===========================================================================
   THE DOCUMENT SHELL — legal/<doc>/
   =========================================================================== */

/* ---------- two-column reading grid: TOC rail + article ---------- */
.doc { padding: clamp(2.5rem, 6vh, 4rem) 0 0; }
.doc-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 3.25rem);
    align-items: start;
}
.doc-grid.no-toc { grid-template-columns: minmax(0, 1fr); }

/* ---------- on-this-page rail ---------- */
.doc-toc {
    position: sticky;
    top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.25rem;
}
.doc-toc ul { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.doc-toc li { margin: 0; }
.doc-toc a {
    display: block;
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--muted);
    text-decoration: none;
    padding: 0.3rem 0.5rem;
    border-left: 2px solid var(--line);
    transition: color 0.2s, border-color 0.2s;
}
.doc-toc a:hover { color: var(--accent-ink); border-left-color: var(--accent); }
.toc-register {
    margin-top: 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.toc-register:hover { color: var(--accent-ink); }

/* ---------- the document body, editorial reading type ---------- */
.doc-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 72ch;
}
.doc-body h2 {
    font-family: var(--font-disp);
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.018em;
    line-height: 1.2;
    color: var(--ink);
    margin: 2.6rem 0 0.9rem;
    padding-top: 0.25rem;
}
.doc-body h3 {
    font-family: var(--font-disp);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    line-height: 1.35;
    color: var(--ink);
    margin: 1.9rem 0 0.7rem;
}
.doc-body h4 {
    font-family: var(--font-disp);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin: 1.4rem 0 0.5rem;
}
.doc-body p { margin: 0.85rem 0; }
.doc-body ul, .doc-body ol { margin: 0.95rem 0; padding-left: 1.35rem; }
.doc-body li { margin: 0.4rem 0; }
.doc-body ul { list-style: none; padding-left: 0; }
.doc-body ul > li { position: relative; padding-left: 1.35rem; }
.doc-body ul > li::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.72em;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent);
}
.doc-body ol { padding-left: 1.5rem; }
.doc-body ol > li::marker { color: var(--gold-ink); font-family: var(--font-mono); font-size: 0.8em; }
.doc-body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-body a:hover { color: var(--gold-ink); }
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 2.4rem 0;
}
.doc-body .kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin: 2.2rem 0 0.5rem;
}
.doc-body > :first-child { margin-top: 0; }

/* ---------- callouts: the honest asides ---------- */
.callout {
    position: relative;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem 1.3rem;
    margin: 1.5rem 0;
}
.callout-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin-bottom: 0.45rem;
}
.callout p { margin: 0.4rem 0 0; font-size: 0.9rem; line-height: 1.65; }
.callout p:first-of-type { margin-top: 0.25rem; }
.callout strong { color: var(--ink); }
.callout.danger { border-color: rgba(220, 38, 38, 0.28); background: rgba(220, 38, 38, 0.045); }
.callout.danger .callout-label { color: var(--red); }
.callout.warn { border-color: rgba(180, 83, 9, 0.26); background: rgba(245, 158, 11, 0.06); }
.callout.warn .callout-label { color: var(--amber); }
.callout.gold { border-color: rgba(197, 165, 114, 0.45); background: rgba(197, 165, 114, 0.10); }
.callout.gold .callout-label { color: var(--gold-ink); }

/* ---------- tables: the registers inside the documents ---------- */
.table-scroll {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
}
.doc-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    line-height: 1.55;
    min-width: 560px;
}
.doc-body thead th {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: left;
    color: var(--muted);
    background: var(--bg-alt);
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid var(--line-2);
    white-space: nowrap;
}
.doc-body tbody td {
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.doc-body tbody tr:last-child td { border-bottom: 0; }
.doc-body tbody tr:nth-child(even) { background: rgba(242, 240, 248, 0.55); }

/* ---------- state pills inside tables ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.18rem 0.6rem;
    border-radius: 99px;
    white-space: nowrap;
}
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.pill.now { color: var(--accent-ink); background: var(--accent-tint); border: 1px solid rgba(45, 39, 105, 0.22); }
.pill.target { color: var(--gold-ink); background: rgba(197, 165, 114, 0.12); border: 1px solid rgba(168, 133, 80, 0.30); }

/* ---------- to-confirm markers, honest unfinished business ---------- */
.tbc {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--amber);
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed rgba(180, 83, 9, 0.35);
    border-radius: 4px;
    padding: 0.05rem 0.4rem;
}

/* ---------- register navigation, previous / register / next ---------- */
.doc-nav-band { margin-top: clamp(2.5rem, 6vh, 4rem); padding-bottom: clamp(3rem, 7vh, 4.5rem); }
.doc-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}
.doc-nav-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.15rem 1.2rem;
    text-decoration: none;
}
.doc-nav-card .label { margin-bottom: 0; color: var(--muted); }
.doc-nav-card .label::after { display: none; }
.doc-nav-title {
    font-family: var(--font-disp);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    line-height: 1.3;
    color: var(--ink);
}
a.doc-nav-card { transition: border-color 0.2s, box-shadow 0.2s; }
a.doc-nav-card:hover { border-color: var(--accent-deep); }
a.doc-nav-card:hover .doc-nav-title { color: var(--accent-ink); }
.doc-nav-card.is-empty { border-style: dashed; border-color: var(--line); background: transparent; box-shadow: none; }
.doc-nav-card.is-home { text-align: center; align-items: center; justify-content: center; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    #register .reg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .how-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .doc-grid { grid-template-columns: minmax(0, 1fr); }
    .doc-toc { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; }
    .doc-toc .label { margin: 0; }
    .doc-toc ul { display: none; }
    .doc-toc .toc-register { margin: 0 0 0 auto; }
}
@media (max-width: 640px) {
    #register .reg-grid { grid-template-columns: minmax(0, 1fr); }
    .truths-grid { grid-template-columns: minmax(0, 1fr); }
    .entity-grid { grid-template-columns: minmax(0, 1fr); }
    .entity-note { border-left-width: 2px; }
    .doc-nav { grid-template-columns: minmax(0, 1fr); }
    .doc-nav-card.is-empty { display: none; }
    .reg-stamps { gap: 0.4rem; }
    .stamp { font-size: 0.62rem; padding: 0.25rem 0.6rem; }
    .doc-body { font-size: 0.92rem; }
    .doc-body table { min-width: 480px; }
}

/* ---------- print: the register is meant to be handed over ---------- */
@media print {
    .doc-toc, .doc-nav-band, .truths, .reg-cta, .ghost, .rail { display: none; }
    .page-head, .doc { padding: 0; }
    .doc-body { font-size: 10.5pt; line-height: 1.6; max-width: 100%; }
    .doc-body h2 { font-size: 14pt; margin: 1.6rem 0 0.6rem; }
    .doc-body h3 { font-size: 11.5pt; margin: 1.2rem 0 0.5rem; }
    .doc-body .table-scroll { border: 1px solid #ccc; }
    .doc-body table { min-width: 0; font-size: 9pt; }
    .callout { break-inside: avoid; }
    .doc-body tr { break-inside: avoid; }
    a { text-decoration: none; color: inherit; }
}