/* callings/lds.css — LDS Callings theme */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* ── Tokens ── */
:root {
    --lds-bg:             #0f2848;
    --lds-surface:        #163256;
    --lds-surface-2:      #1e3d6a;
    --lds-border:         rgba(255,255,255,0.09);
    --lds-border-mid:     rgba(255,255,255,0.15);
    --lds-text:           #ddeaf8;
    --lds-text-dim:       rgba(185,220,250,0.48);
    --lds-accent:         #c8a24a;      /* warm amber — not yellow */
    --lds-accent-dim:     rgba(200,162,74,0.4);
    --lds-blue-light:     #70c4f0;
    --lds-private:        #132a50;
    --lds-private-border: rgba(112,196,240,0.28);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Space Mono', 'Lucida Console', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--lds-bg);
    background-image: radial-gradient(ellipse at 60% 0%, rgba(35,80,155,0.55) 0%, transparent 65%);
    color: var(--lds-text);
    line-height: 1.75;
    min-height: 100vh;
}

a { color: var(--lds-blue-light); }
a:hover { color: var(--lds-accent); }

/* ── Nav ── */
.lds-nav {
    display: flex;
    align-items: center;
    padding: 0.9rem 2rem;
    border-top: 2px solid rgba(200, 162, 74, 0.22);
    border-bottom: 1px solid var(--lds-border);
    gap: 1.5rem;
    font-family: var(--font-mono);
}
.lds-nav-emblem {
    margin-left: auto;
    color: rgba(200, 162, 74, 0.32);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.lds-nav-home {
    font-size: 0.7rem;
    color: var(--lds-text-dim);
    text-decoration: none;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.15s;
}
.lds-nav-home:hover { color: var(--lds-accent); }
.lds-nav-title {
    font-size: 0.68rem;
    color: var(--lds-text-dim);
    flex: 1;
    letter-spacing: 0.04em;
}

/* ── Container ── */
.lds-container {
    max-width: 44rem;
    margin: 0 auto;
    padding: 3.5rem 2rem 4rem;
}

/* ── Page header ── */
.lds-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--lds-accent);
    opacity: 0.7;
    margin-bottom: 0.55rem;
}
.lds-title {
    font-family: var(--font-body);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--lds-text);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 0.6rem;
}
.lds-tagline {
    font-size: 0.95rem;
    color: var(--lds-text-dim);
    font-style: italic;
    line-height: 1.65;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--lds-border);
}

/* ── Section ── */
.lds-section {
    margin-bottom: 3.5rem;
}
.lds-section-label {
    font-family: var(--font-mono);
    font-size: 0.57rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--lds-accent);
    opacity: 0.75;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.lds-section-label::before {
    content: '';
    display: block;
    width: 1.25rem;
    height: 1px;
    background: var(--lds-accent);
    opacity: 0.5;
    flex-shrink: 0;
}
.lds-section h2 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lds-text);
    letter-spacing: -0.015em;
    margin-bottom: 0.85rem;
    line-height: 1.3;
}
.lds-section h3 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lds-blue-light);
    margin: 1.5rem 0 0.6rem;
    letter-spacing: 0;
}
.lds-section p {
    font-size: 0.9rem;
    color: var(--lds-text);
    line-height: 1.8;
    margin-bottom: 0.85rem;
}
.lds-section p:last-child { margin-bottom: 0; }
.lds-section ul, .lds-section ol {
    font-size: 0.9rem;
    color: var(--lds-text);
    line-height: 1.75;
    padding-left: 1.35rem;
    margin-bottom: 0.85rem;
}
.lds-section li { margin-bottom: 0.4rem; }
.lds-section li:last-child { margin-bottom: 0; }
.lds-section strong { color: var(--lds-accent); font-weight: 600; }
.lds-section em { color: var(--lds-text-dim); font-style: italic; }

/* ── Note / callout ── */
.lds-note {
    background: rgba(22, 45, 80, 0.6);
    border-left: 2px solid var(--lds-accent);
    border-radius: 0 6px 6px 0;
    padding: 1rem 1.35rem;
    margin: 1.25rem 0;
    font-size: 0.875rem;
    color: var(--lds-text);
    line-height: 1.75;
}
.lds-note strong { color: var(--lds-accent); font-weight: 600; }

/* ── Private section (used in callingsWIP) ── */
.lds-private {
    background: var(--lds-private);
    border: 1px solid var(--lds-private-border);
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.25rem 0;
}
.lds-private-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--lds-blue-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}
.lds-private-locked { display: block; }
.lds-private-content { display: none; }
body.unlocked .lds-private-locked { display: none; }
body.unlocked .lds-private-content { display: block; }
.lds-private-placeholder {
    font-size: 0.85rem;
    color: rgba(90,174,224,0.35);
    font-style: italic;
}
.lds-private-input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--lds-private-border);
    border-radius: 4px;
    color: var(--lds-text);
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.7;
    padding: 0.65rem 0.9rem;
    resize: vertical;
    min-height: 80px;
    margin-top: 0.35rem;
    margin-bottom: 0.65rem;
}
.lds-private-input:focus { outline: none; border-color: var(--lds-blue-light); }
.lds-field-label {
    font-size: 0.75rem;
    color: var(--lds-text-dim);
    margin-bottom: 0.15rem;
    margin-top: 0.75rem;
}
.lds-field-label:first-child { margin-top: 0; }

/* ── Toolbar ── */
.lds-toolbar {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lds-border);
    flex-wrap: wrap;
}
.lds-toolbar-btn {
    background: none;
    border: 1px solid var(--lds-border-mid);
    color: var(--lds-text-dim);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
    letter-spacing: 0;
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
    display: inline-block;
}
.lds-toolbar-btn:hover { border-color: var(--lds-accent-dim); color: var(--lds-accent); }

/* ── Footer ── */
.lds-footer {
    padding: 2rem;
    border-top: 1px solid var(--lds-border-mid);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(185,220,250,0.45);
    letter-spacing: 0.08em;
}
.lds-footer a { color: rgba(185,220,250,0.68); text-decoration: none; }
.lds-footer a:hover { color: var(--lds-accent); }
.lds-footer-blurb { font-style: italic; color: rgba(185,220,250,0.5); margin-bottom: 0.7rem; line-height: 1.65; letter-spacing: 0.04em; }
.lds-footer-suite { margin-bottom: 0.45rem; }
.lds-footer-cat { color: rgba(185,220,250,0.32); margin-right: 0.25rem; }

/* ── Password modal ── */
.lds-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(8,18,32,0.88);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
.lds-modal-overlay.active { display: flex; }
.lds-modal {
    background: var(--lds-surface-2);
    border: 1px solid var(--lds-border-mid);
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lds-modal h3 { font-size: 0.95rem; font-weight: 600; color: var(--lds-accent); margin-bottom: 0.4rem; }
.lds-modal p { font-size: 0.82rem; color: var(--lds-text-dim); margin-bottom: 1rem; }
.lds-modal-input {
    width: 100%;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--lds-border-mid);
    border-radius: 4px;
    color: var(--lds-text);
    font-family: var(--font-body);
    font-size: 0.875rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.75rem;
}
.lds-modal-input:focus { outline: none; border-color: var(--lds-blue-light); }
.lds-modal-btns { display: flex; gap: 0.5rem; justify-content: flex-end; }
.lds-btn { padding: 0.5rem 1.1rem; font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; cursor: pointer; border-radius: 5px; }
.lds-btn-primary { background: var(--lds-surface-2); border: 1px solid var(--lds-private-border); color: var(--lds-blue-light); }
.lds-btn-secondary { background: none; border: 1px solid var(--lds-border); color: var(--lds-text-dim); }
.lds-modal-error { font-size: 0.75rem; color: #e07878; margin-bottom: 0.5rem; display: none; }

/* ── Callings inline editor (callings.js) ── */
.ci-panel {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--lds-border);
}
.ci-toggle {
    background: none;
    border: 1px solid var(--lds-border-mid);
    border-radius: 100px;
    color: var(--lds-text-dim);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.28rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.ci-toggle:hover { border-color: var(--lds-accent-dim); color: var(--lds-accent); }
.ci-body { margin-top: 0.85rem; }
.ci-body.ci-collapsed { display: none; }

.ci-crow {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--lds-border);
}
.ci-crow:last-child { border-bottom: none; }
.ci-role {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lds-accent);
    opacity: 0.8;
    min-width: 7.5rem;
    flex-shrink: 0;
    padding-top: 0.45rem;
    line-height: 1.4;
}
.ci-fields {
    display: flex;
    gap: 0.5rem 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}
.ci-label {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lds-text-dim);
}
.ci-input {
    background: rgba(0,0,0,0.22);
    border: 1px solid var(--lds-border-mid);
    border-radius: 4px;
    color: var(--lds-text);
    font-family: var(--font-body);
    font-size: 0.82rem;
    padding: 0.32rem 0.65rem;
    min-width: 6.5rem;
    transition: border-color 0.15s;
}
.ci-input:focus { outline: none; border-color: var(--lds-blue-light); }
.ci-phone-wrap { display: flex; align-items: center; gap: 0.4rem; }
.ci-sms {
    font-size: 0.7rem;
    color: var(--lds-blue-light);
    text-decoration: none;
    white-space: nowrap;
}
.ci-sms:hover { color: var(--lds-accent); }

/* List zone */
.ci-list { list-style: none; margin-bottom: 0.65rem; }
.ci-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.875rem;
    color: var(--lds-text);
    border-bottom: 1px solid var(--lds-border);
}
.ci-list-item:last-child { border-bottom: none; }
.ci-rm {
    background: none;
    border: none;
    color: var(--lds-text-dim);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}
.ci-rm:hover { color: #e07878; }
.ci-add-row { display: flex; gap: 0.5rem; align-items: center; }
.ci-add-row .ci-input { min-width: 0; flex: 1; }
.ci-add-btn {
    background: none;
    border: 1px solid var(--lds-border-mid);
    border-radius: 4px;
    color: var(--lds-text-dim);
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 0.32rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.ci-add-btn:hover { border-color: var(--lds-accent-dim); color: var(--lds-accent); }

/* Note zone */
.ci-textarea {
    width: 100%;
    background: rgba(0,0,0,0.22);
    border: 1px solid var(--lds-border-mid);
    border-radius: 4px;
    color: var(--lds-text);
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.65;
    padding: 0.55rem 0.85rem;
    resize: vertical;
    min-height: 72px;
    transition: border-color 0.15s;
}
.ci-textarea:focus { outline: none; border-color: var(--lds-blue-light); }

/* Summary panel */
.ci-summary {
    margin-bottom: 1.75rem;
    padding: 1.25rem 1.5rem;
    background: var(--lds-surface);
    border: 1px solid var(--lds-border);
    border-radius: 6px;
}
.ci-summary--empty {
    background: none;
    border: none;
    padding: 0 0 1rem;
}
.ci-sum-hdr { margin-bottom: 0.9rem; }
.ci-sum-label {
    font-family: var(--font-mono);
    font-size: 0.57rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--lds-accent);
    opacity: 0.75;
}
.ci-sum-body { margin-bottom: 0.25rem; }
.ci-sum-block { margin-bottom: 1rem; }
.ci-sum-block:last-child { margin-bottom: 0; }
.ci-sum-heading {
    font-family: var(--font-mono);
    font-size: 0.57rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lds-blue-light);
    opacity: 0.7;
    margin-bottom: 0.3rem;
}
.ci-sum-row {
    font-size: 0.875rem;
    color: var(--lds-text);
    line-height: 1.65;
    margin-bottom: 0.18rem;
}
.ci-sum-note { color: var(--lds-text-dim); font-size: 0.82rem; }
.ci-sum-empty {
    font-size: 0.8rem;
    color: var(--lds-text-dim);
    font-style: italic;
}
.ci-sum-btns {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--lds-border);
    flex-wrap: wrap;
}
.ci-sum-btn {
    background: none;
    border: 1px solid var(--lds-border-mid);
    border-radius: 5px;
    color: var(--lds-text-dim);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.38rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.ci-sum-btn:hover { border-color: var(--lds-accent-dim); color: var(--lds-accent); }

@media (max-width: 600px) {
    .ci-crow { flex-direction: column; gap: 0.4rem; }
    .ci-role { min-width: unset; padding-top: 0; }
    .ci-fields { flex-direction: column; }
}

/* ── Inline fields (data-ci-field) ── */
.ci-inline { display: inline; }
.ci-inline-trigger {
    background: none;
    border: 1px dashed rgba(200, 162, 74, 0.35);
    border-radius: 4px;
    color: rgba(200, 162, 74, 0.5);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.07em;
    padding: 0.1rem 0.5rem;
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ci-inline-trigger:hover {
    border-color: var(--lds-accent-dim);
    color: var(--lds-accent);
    background: rgba(200, 162, 74, 0.06);
}
.ci-inline-input {
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--lds-blue-light);
    border-radius: 4px;
    color: var(--lds-text);
    font-family: var(--font-body);
    font-size: 0.85em;
    padding: 0.15rem 0.55rem;
    vertical-align: middle;
    min-width: 8rem;
    max-width: 16rem;
    outline: none;
    transition: border-color 0.15s;
}
.ci-inline-filled {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    vertical-align: middle;
}
.ci-inline-val {
    background: rgba(200, 162, 74, 0.1);
    border: 1px solid rgba(200, 162, 74, 0.28);
    border-radius: 4px;
    color: var(--lds-accent);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.5rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.ci-inline-val:hover {
    background: rgba(200, 162, 74, 0.16);
    border-color: var(--lds-accent-dim);
}
.ci-sms-inline { font-size: 0.68rem; }

/* ── SMS action links (data-ci-sms-to) ── */
.ci-sms-ready {
    color: var(--lds-blue-light);
    text-decoration: none;
    font-size: 0.875em;
    font-weight: 500;
}
.ci-sms-ready:hover { color: var(--lds-accent); }
.ci-sms-pending {
    color: rgba(200, 162, 74, 0.4);
    font-size: 0.875em;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed rgba(200, 162, 74, 0.28);
    transition: color 0.15s;
}
.ci-sms-pending:hover { color: rgba(200, 162, 74, 0.65); }

/* External link helper */
.ci-ext-link {
    font-size: 0.82em;
    color: var(--lds-blue-light);
}
.ci-ext-link:hover { color: var(--lds-accent); }

/* ── Handbook reference chip (in jump-nav) ── */
.handbook-ref {
    margin-left: auto;
    border-color: var(--lds-blue-light) !important;
    color: var(--lds-blue-light) !important;
    opacity: 0.7;
}
.handbook-ref:hover { opacity: 1; border-color: var(--lds-blue-light) !important; color: var(--lds-blue-light) !important; }

/* ── Print ── */
@media print {
    body { background: white !important; color: #111 !important; font-family: 'Georgia', serif !important; }
    .lds-nav, .lds-toolbar, .lds-modal-overlay { display: none !important; }
    .lds-container { padding: 1rem 0 !important; }
    .lds-title { color: #1a3560 !important; letter-spacing: -0.02em !important; }
    .lds-tagline { color: #555 !important; border-bottom-color: #ddd !important; }
    .lds-section-label { color: #1a3560 !important; opacity: 1 !important; }
    .lds-section-label::before { background: #1a3560 !important; }
    .lds-section h2 { color: #111 !important; }
    .lds-section h3 { color: #1a3560 !important; }
    .lds-section strong { color: #1a3560 !important; }
    .lds-note { background: #f6f8fb !important; border-left-color: #1a3560 !important; color: #333 !important; }
    .lds-note strong { color: #1a3560 !important; }
    .lds-section { page-break-inside: avoid; }
    .lds-footer { display: none !important; }
    /* CI editor — show all panels in print, hide interactive bits */
    .ci-toggle { display: none !important; }
    .ci-body.ci-collapsed { display: block !important; }
    .ci-rm, .ci-add-row, .ci-sum-btns { display: none !important; }
    .ci-panel { border-top: 1px solid #ddd !important; }
    .ci-role { color: #1a3560 !important; opacity: 1 !important; }
    .ci-input { border: none !important; background: transparent !important; color: #111 !important; padding: 0 !important; }
    .ci-textarea { border: none !important; background: transparent !important; color: #111 !important; }
    .ci-sms { display: none !important; }
    .ci-summary { background: #f6f8fb !important; border-color: #ddd !important; }
    .ci-summary--empty { display: none !important; }
    .ci-sum-label { color: #1a3560 !important; opacity: 1 !important; }
    .ci-sum-heading { color: #1a3560 !important; opacity: 1 !important; }
    .ci-sum-row { color: #111 !important; }
    /* Inline fields in print */
    .ci-inline-trigger { display: none !important; }
    .ci-inline-filled { display: inline !important; }
    .ci-inline-val { background: none !important; border: none !important; color: #1a3560 !important; padding: 0 !important; font-size: inherit !important; }
    .ci-inline-input { border: none !important; background: transparent !important; color: #111 !important; }
    .ci-sms-inline, .ci-sms-pending { display: none !important; }
    .ci-sms-ready { color: #1a3560 !important; }
}
