/* COEX1ST 1.0 — additions on top of the carried-over base.css / archive.css / ambience.css.
   Everything here is new: star drift, reading room, reader window, labels, Accord, forms. */
:root{--coex-rr-scale:1;--coex-rr-lh:1.85;--coex-rr-dim:0;--coex-surface:rgba(9,18,25,.9);--coex-surface-text:#dbe5e8;--coex-surface-head:#e9f0f1;--coex-surface-link:#96deeb;--coex-surface-line:rgba(144,188,204,.2)}

/* ---------- Background: drifting stars (canvas, assets/js/stars.js) ---------- */
.coex1st-space{opacity:1!important;background:none!important;animation:none!important;z-index:0}
.coex1st-space canvas.coex-stars{position:absolute;inset:0;width:100%;height:100%;display:block}
html[data-bg="plain"] .coex1st-space,html[data-bg="plain"] .coex1st-grid,html[data-plain="on"] .coex1st-space,html[data-plain="on"] .coex1st-grid,html.ua-underlay-on .coex1st-space,html.ua-underlay-on .coex1st-grid{display:none}
main#main,.coex1st-footer{position:relative;z-index:2}
.coex1st-dim{position:fixed;inset:0;pointer-events:none;background:rgba(1,4,7,var(--coex-rr-dim));z-index:1}
.coex1st-topbar{z-index:20}

/* ---------- Ambience only in reading-room views ---------- */
html.coex-room-off .coex-room-btn,html.coex-room-off .ua-quick,html.coex-room-off .ua-resume,html.coex-room-off .ua-tabs [data-tab=sound],html.coex-room-off .ua-master,html.coex-room-off .ua-np,html.coex-room-off .ua-onair{display:none!important}
html.coex-room-off .ua-root .ua-tabs{grid-template-columns:repeat(2,1fr)}
body.coex-view-reader:not(.coex-mode-focused) .coex-rr-launch{display:none}
.coex-audio-loading-bar{position:fixed;top:0;left:0;right:0;height:2px;background:#8ad5dd;z-index:98}.coex-audio-nav-status{position:fixed;left:18px;bottom:calc(24px + env(safe-area-inset-bottom));z-index:89;max-width:230px;background:#0c202b;color:#bee1e5;padding:10px 14px;border:1px solid #33515e;border-radius:9px;font:11px/1.5 var(--coex1st-mono)}

/* ---------- Labels: stage, type, reuse, evidence ---------- */
.coex-card-labels{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px;align-items:center}
.coex-reuse-badge,.coex-type-badge,.coex-stage,.coex-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:4px;font:500 10px/1.4 var(--coex1st-mono);letter-spacing:.08em;text-transform:uppercase;border:1px solid}
.coex-reuse-badge{color:#a7ddc6;border-color:#488e6e80;background:#10281f66}
.coex-reuse-badge.coex-reuse-read{color:#cfe3ea;border-color:#56727d80;background:#0f1f2766}
.coex-type-badge{color:#c9bfa2;border-color:#6c634680;background:transparent}
.coex-stage{color:#dff6fb;border-color:#4f8f9c;background:#0e2a3166;margin:0}
.coex-stage-label{color:#8fb7c0}
.coex-stage-use-now{color:#b8f0d3;border-color:#4b9a74}
.coex-stage-in-development{color:#bfe9f2;border-color:#4f8f9c}
.coex-stage-long-horizon{color:#e3d6b0;border-color:#8a7a50}
.coex-stage-paused,.coex-stage-archived{color:#b8c2c6;border-color:#56656b}
.coex-stage-note{color:#a9bcc4;font-size:14px;line-height:1.65;margin:0 0 12px}
.coex-evidence,.coex-evidence-inline{color:#e6d3ad;font:italic 14px/1.6 Georgia,serif;margin:0 0 14px;padding-left:12px;border-left:2px solid #8a7a50}
.coex-evidence{font-size:16px}
.coex-card-excerpt{color:#a4b6be;font-size:14px;line-height:1.65;margin:0 0 14px}
.coex-card-reuse{margin:0 0 6px}
.coex-fine{color:#8fa4ad;font-size:12px;line-height:1.7}
.coex-fine a,.coex-notice-bar a,.coex-invitation a,.coex-reuse-panel a,.coex-panel p a{color:var(--coex1st-accent)!important;text-decoration:underline;text-underline-offset:3px}
.coex-notice-bar{margin:0 0 30px;padding:18px 20px;border:1px solid var(--coex1st-line);border-radius:10px;background:#08131bcc;color:#b9cbd2;font-size:15px;line-height:1.7}
.coex-notice-bar p{margin:0 0 6px}.coex-notice-bar p:last-child{margin:0}

/* ---------- Home invitation ---------- */
.coex-invitation{max-width:900px;margin:64px auto 0;text-align:center}
.coex-invitation blockquote{margin:0 0 18px;font:400 clamp(19px,2vw,24px)/1.65 Georgia,serif;color:#dfe9ec}
.coex-reuse-short{color:#a9bcc4;font-size:14px;line-height:1.8}

/* ---------- Support panel ---------- */
.coex-support{max-width:900px;margin:40px auto 0;padding:30px;border:1px solid var(--coex1st-line-strong);border-radius:16px;background:linear-gradient(150deg,rgba(14,28,37,.9),rgba(6,13,19,.92))}
.coex-support h2{font:400 30px/1.2 Georgia,serif;margin:0 0 10px}
.coex-support-intro p:not(.coex-kicker){color:#a7bac2;line-height:1.7;margin:0 0 18px}
.coex-support fieldset{border:0;margin:0;padding:0}
.coex-check{display:flex;gap:12px;align-items:flex-start;min-height:44px;padding:6px 0;cursor:pointer;font-size:16px;color:#dbe7eb}
.coex-check input{width:20px;height:20px;margin-top:2px;flex:0 0 auto;accent-color:#85d2dc}
.coex-support-note{color:#9fb3bb;font-size:13px;line-height:1.7;margin:6px 0 0 32px}
.coex-linklike{border:0;background:none;padding:0;color:var(--coex1st-accent);text-decoration:underline;text-underline-offset:3px;font:inherit;cursor:pointer}
.coex-statement{margin:14px 0 0 32px;padding:14px 16px;border-left:2px solid var(--coex1st-accent);background:#0b1b2466}
.coex-statement blockquote{margin:6px 0 10px;font:italic 17px/1.6 Georgia,serif;color:#e3eef1}
.coex-statement p{margin:0 0 6px;color:#a9bcc4;font-size:13px;line-height:1.6}
.coex-support-email{margin:18px 0 0;display:grid;gap:10px;max-width:520px}
.coex-support-email>label{font:11px var(--coex1st-mono);letter-spacing:.1em;text-transform:uppercase;color:#9ab2bd}
.coex-support-email input[type=email],.coex-form input:not([type=checkbox]):not([type=radio]),.coex-form select,.coex-form textarea{width:100%;min-height:46px;background:#0f202b;border:1px solid #2e4955;color:#dce9ef;border-radius:6px;padding:10px 12px;font:16px/1.5 var(--coex1st-sans)}
.coex-form textarea{resize:vertical}
.coex-why summary{cursor:pointer;color:#aedce4;font:12px/40px var(--coex1st-mono);min-height:40px}
.coex-why p{color:#a7bac2;font-size:13px;line-height:1.7;margin:0 0 8px}
.coex-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}
.coex-support-status,.coex-form-status{min-height:1.2em;margin:10px 0 0;color:#e3cfa6;font-size:14px;line-height:1.6}
.coex-form-status.is-ok{color:#a7ddc6}
.coex-support-done{margin-top:16px;padding:18px;border:1px solid #488e6e80;border-radius:10px;background:#0f251d66}
.coex-support-done:focus{outline:none}
.coex-handshake{display:inline-block;font-size:34px;line-height:1}
@media (prefers-reduced-motion:no-preference){.coex-support-done:not([hidden]) .coex-handshake{animation:coex-shake .9s ease-out 1}}
@keyframes coex-shake{0%{transform:scale(.6) rotate(-8deg);opacity:0}50%{transform:scale(1.08) rotate(4deg);opacity:1}100%{transform:scale(1) rotate(0)}}
.coex-thanks{font:22px/1.4 Georgia,serif;margin:8px 0 12px;color:#e5f3ee}
.coex-receipt p{color:#b5c8c0;font-size:13px;line-height:1.6;margin:0 0 8px}
.coex-receipt-code{display:inline-block;padding:8px 10px;background:#06121a;border:1px solid #2e4955;border-radius:6px;font:13px var(--coex1st-mono);color:#dff6fb;word-break:break-all;user-select:all}
.coex-support-totals{margin:18px 0 8px;color:#a9bcc4;font:12px/1.7 var(--coex1st-mono)}
.coex-support-totals span[data-total]{color:#dff6fb}
.coex-support-links{display:flex;flex-wrap:wrap;gap:6px 22px}
.coex-support-links a,.coex-accord-nav a{color:var(--coex1st-accent)!important;font:12px/1.5 var(--coex1st-mono);min-height:44px;display:inline-flex;align-items:center}
.coex-support-paused,.coex-intake-closed{color:#e3cfa6;font-size:14px}

/* ---------- Reader page (direct link) ---------- */
.coex-surface{background:var(--coex-surface);border:1px solid var(--coex-surface-line);border-radius:16px;padding:clamp(22px,4vw,52px);box-shadow:0 24px 70px rgba(0,0,0,.35)}
.coex-reader-main .coex-surface{margin-top:14px}
.coex-reader-main .coex-prose,.coex-reader-scroll .coex-prose{font-size:calc(20px * var(--coex-rr-scale));line-height:var(--coex-rr-lh);color:var(--coex-surface-text);max-width:68ch;margin-left:auto;margin-right:auto}
.coex-reader-main .coex-prose h2,.coex-reader-scroll .coex-prose h2{color:var(--coex-surface-head)}
.coex-reader-main .coex-prose a:not(.coex-button),.coex-reader-scroll .coex-prose a:not(.coex-button){color:var(--coex-surface-link)!important}
.coex-reader-main .coex-prose figure,.coex-reader-scroll .coex-prose figure{max-width:none}
.coex-prose img{cursor:zoom-in}
.coex-title-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.coex-title-row h1{margin-right:auto}
.coex-reader-header h1{color:var(--coex-surface-head)}
.coex-reader-art{margin:0 0 30px}.coex-reader-art img{display:block;max-width:100%;max-height:70vh;margin:auto;border-radius:8px;cursor:zoom-in}
.coex-rights-note{color:#91a6b0;font-size:13px;line-height:1.7;margin:28px 0 0;padding-top:16px;border-top:1px solid var(--coex-surface-line)}
.coex-book-edition-note{font:14px/1.7 var(--coex1st-sans)!important;color:#c9bfa2!important;padding:12px 14px;border:1px dashed #6c6346;border-radius:8px}
.coex-reader-end{border-top-color:var(--coex-surface-line)}
/* reader surfaces */
html[data-rr-theme="dim"]{--coex-surface:rgba(18,25,29,.96);--coex-surface-text:#c3ccd0;--coex-surface-head:#d4dcdf;--coex-surface-link:#8fc9d3}
html[data-rr-theme="paper"]{--coex-surface:#efe9dc;--coex-surface-text:#26231d;--coex-surface-head:#15130f;--coex-surface-link:#0b5d6b;--coex-surface-line:rgba(60,50,30,.2)}
html[data-rr-theme="contrast"]{--coex-surface:#000;--coex-surface-text:#fff;--coex-surface-head:#fff;--coex-surface-link:#8ff3ff;--coex-surface-line:#fff}
html[data-rr-theme="paper"] .coex-surface .coex-reader-meta,html[data-rr-theme="paper"] .coex-surface .coex-kicker,html[data-rr-theme="paper"] .coex-surface .coex-fine,html[data-rr-theme="paper"] .coex-surface figcaption,html[data-rr-theme="paper"] .coex-surface .coex-reader-subtitle,html[data-rr-theme="paper"] .coex-surface .coex-rights-note{color:#4a4538!important}
html[data-rr-theme="paper"] .coex-surface .coex-prose .coex-divider{color:#2f5f68}
html[data-rr-theme="paper"] .coex-surface .coex-text-link,html[data-rr-theme="paper"] .coex-surface .coex-reader-meta a{color:#0b5d6b!important}
html[data-rr-theme="paper"] .coex-surface .coex-reuse-badge,html[data-rr-theme="paper"] .coex-surface .coex-type-badge,html[data-rr-theme="paper"] .coex-surface .coex-stage{color:#2b3b33;background:transparent;border-color:#6b7d72}
html[data-rr-theme="paper"] .coex-surface .coex-evidence{color:#5a4b24;border-color:#8a7a50}
html[data-rr-theme="contrast"] .coex-surface .coex-reader-meta,html[data-rr-theme="contrast"] .coex-surface .coex-fine,html[data-rr-theme="contrast"] .coex-surface figcaption{color:#fff!important}
html[data-plain="on"] .coex-surface{backdrop-filter:none;box-shadow:none}
html[data-plain="on"] body.coex1st-stage{background:#05090d}

/* ---------- Reading settings ---------- */
.coex-rr-launch{position:fixed;left:22px;bottom:calc(18px + env(safe-area-inset-bottom));z-index:91;display:none;align-items:center;gap:10px;min-height:46px;padding:0 17px;border:1px solid #37636f;border-radius:30px;background:#0b1d26ed;color:#c8edf0;font:11px var(--coex1st-mono);box-shadow:0 8px 28px #0007;backdrop-filter:blur(16px)}
.coex-rr-launch span{font:600 15px Georgia,serif}
body.coex-view-reader .coex-rr-launch{display:inline-flex}
body.coex-mode-focused [data-rr-sound]{display:none}
html.coex-reader-open .coex-rr-launch{display:none!important}
.coex-rr-panel{position:fixed;top:90px;right:22px;z-index:97;width:390px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 116px);overflow:auto;overscroll-behavior:contain;border:1px solid #3a5f6c;border-radius:18px;background:#08131bf7;color:#d8e6ea;box-shadow:0 28px 80px #0009;font:14px/1.5 var(--coex1st-sans)}
.coex-rr-panel.is-collapsed .coex-rr-body{display:none}
.coex-rr-head{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;background:#0a1a24;border-bottom:1px solid #29434f;z-index:1}
.coex-rr-head h2{margin:0;font:22px Georgia,serif;color:#ecf2f1}
.coex-rr-head-actions{display:flex;gap:8px}
.coex-rr-body{padding:6px 18px 18px}
.coex-rr-group{border:0;border-bottom:1px solid #20394550;margin:0;padding:14px 0}
.coex-rr-group legend{font:10px var(--coex1st-mono);letter-spacing:.16em;text-transform:uppercase;color:#83cfdb;padding:0;margin-bottom:8px}
.coex-rr-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-height:44px;margin:4px 0;font-size:13px}
.coex-rr-row input[type=range]{flex:1;min-width:120px;accent-color:#85d2dc}
.coex-rr-row output{font:11px var(--coex1st-mono);color:#b6dce3;min-width:38px;text-align:right}
.coex-rr-stepper,.coex-rr-seg{display:inline-flex;flex-wrap:wrap;gap:4px}
.coex-rr-stepper output{align-self:center;min-width:48px;text-align:center}
.coex-rr-btn,.coex-rr-seg button,.coex-rr-stepper button,.coex-rr-collapse,.coex-rr-done{min-height:40px;padding:0 12px;border:1px solid #385764;border-radius:8px;background:#0c202b;color:#c4e4e9;font:11px var(--coex1st-mono);cursor:pointer}
.coex-rr-seg button[aria-checked="true"]{background:#8bd3dc;color:#07222a;border-color:#8bd3dc;font-weight:600}
.coex-rr-done{background:#8bd3dc;color:#07222a;border-color:#8bd3dc;font-weight:600}
.coex-rr-btn[aria-pressed="true"]{border-color:#cca887;color:#ebcbaa}
.coex-rr-switch{display:flex;gap:12px;align-items:flex-start;min-height:44px;padding:6px 0;font-size:13px;cursor:pointer}
.coex-rr-switch input{width:20px;height:20px;margin-top:1px;accent-color:#85d2dc;flex:0 0 auto}
.coex-rr-switch small{display:block;color:#90aeba;font-size:11px}
.coex-rr-hint{color:#90aeba;font-size:12px;line-height:1.6;margin:4px 0}
.coex-rr-foot{padding-top:14px}
html[data-plain="on"] [data-rr-sound] .coex-rr-row{opacity:.5;pointer-events:none}

/* ---------- Reader window (opened from a card) ---------- */
html.coex-reader-open,html.coex-reader-open body{overflow:hidden}
.coex-reader-layer{position:fixed;inset:0;z-index:95;display:flex;align-items:center;justify-content:center}
.coex-reader-backdrop{position:absolute;inset:0;background:rgba(2,6,9,.74);backdrop-filter:blur(3px)}
html[data-plain="on"] .coex-reader-backdrop{background:#05090d;backdrop-filter:none}
.coex-reader-window{position:relative;display:flex;flex-direction:column;width:min(980px,calc(100vw - 48px));height:calc(100dvh - 48px);border:1px solid #3a5f6c;border-radius:18px;background:rgba(7,15,21,.78);backdrop-filter:blur(18px);box-shadow:0 30px 90px #000a;overflow:hidden}
.coex-reader-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px 10px 20px;border-bottom:1px solid #29434f;background:#0a1a24e6}
.coex-reader-bar-title{margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:12px var(--coex1st-mono);color:#a9c4cc;letter-spacing:.06em}
.coex-reader-bar-actions{display:flex;gap:8px;flex:0 0 auto}
.coex-reader-close{min-height:40px;padding:0 14px;border:1px solid #4a7581;border-radius:8px;background:#102530;color:#e2f4f7;font:11px var(--coex1st-mono);cursor:pointer}
.coex-reader-close span{font-size:16px;margin-left:4px}
.coex-reader-scroll{flex:1;overflow:auto;overscroll-behavior:contain;padding:clamp(12px,3vw,34px);-webkit-overflow-scrolling:touch}
.coex-reader-scroll:focus{outline:none}
.coex-reader-scroll .coex-surface{max-width:860px;margin:0 auto}
.coex-reader-scroll .coex-breadcrumb{display:none}
.coex-reader-loading{padding:60px 20px;text-align:center;color:#a9c4cc;font:12px var(--coex1st-mono)}
/* contents panel */
.coex-contents{position:fixed;top:90px;left:22px;z-index:97;width:320px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 116px);overflow:auto;border:1px solid #3a5f6c;border-radius:14px;background:#08131bf7;padding:14px 18px;box-shadow:0 28px 80px #0009}
.coex-contents-head{display:flex;justify-content:space-between;align-items:center}
.coex-contents h2{margin:0;font:20px Georgia,serif}
.coex-contents ol{padding-left:20px;color:#c4dbe1}.coex-contents li{margin:8px 0}
.coex-contents a{color:#a8e8f1!important;text-decoration:underline;text-underline-offset:3px}
/* lightbox */
.coex-lightbox{max-width:96vw;max-height:96dvh;padding:14px;border:1px solid #3a5f6c;border-radius:14px;background:#050b10;color:#d8e6ea}
.coex-lightbox::backdrop{background:#000c}
.coex-lightbox img{display:block;max-width:calc(96vw - 30px);max-height:calc(96dvh - 110px);margin:10px auto 0;object-fit:contain}
.coex-lightbox-cap{font-size:12px;color:#91a6b0;margin:10px 0 0}
.coex-resume{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(76px + env(safe-area-inset-bottom));z-index:92;min-height:44px;padding:0 18px;border:1px solid #4a7581;border-radius:30px;background:#0b1d26f2;color:#dff6fb;font:11px var(--coex1st-mono);box-shadow:0 8px 28px #0007}

/* ---------- Focused project view ---------- */
.coex-devnotes{margin:0 0 22px;padding:18px 20px;border:1px solid var(--coex-surface-line);border-radius:10px;background:#0b1a2266}
.coex-devnotes h2{margin:0 0 12px}
.coex-devnotes-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px 20px;margin:0 0 12px}
.coex-devnotes-grid dt{font:10px var(--coex1st-mono);letter-spacing:.12em;text-transform:uppercase;color:#8fb7c0}
.coex-devnotes-grid dd{margin:4px 0 0;color:#e3edf0;font-size:15px}
.coex-reuse-panel{margin:0 0 26px;padding:16px 20px;border:1px solid #488e6e66;border-radius:10px;background:#0f251d40}
.coex-reuse-panel p{margin:0 0 6px;color:#c3d8cf;line-height:1.7}
.coex-project-section{max-width:68ch;margin:0 auto 26px}
.coex-project-section h2{font:400 26px/1.3 Georgia,serif;color:var(--coex-surface-head);margin:0 0 10px}
.coex-project-section p{color:var(--coex-surface-text);font-size:17px;line-height:1.8;margin:0 0 10px}

/* ---------- Accord ---------- */
.coex-accord-main .coex-collection-hero{margin-bottom:26px}
.coex-accord-nav{display:flex;flex-wrap:wrap;gap:4px 22px;margin:0 0 28px;padding:6px 0;border-bottom:1px solid var(--coex1st-line)}
.coex-panel{margin:0 0 30px;padding:clamp(20px,3vw,34px);border:1px solid var(--coex1st-line);border-radius:14px;background:linear-gradient(155deg,rgba(15,28,37,.88),rgba(6,13,19,.92))}
.coex-panel>h2{font:400 clamp(26px,3vw,36px)/1.2 Georgia,serif;margin:0 0 12px}
.coex-panel>p{color:#aabcc4;line-height:1.75}
.coex-accord-tools{display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin:18px 0 10px}
.coex-accord-tools label{display:flex;flex-direction:column;gap:8px;min-width:180px}
.coex-accord-tools label>span{font:10px var(--coex1st-mono);letter-spacing:.1em;text-transform:uppercase;color:#9ab2bd}
.coex-accord-tools .coex-filter-query{flex:1 1 280px}
.coex-accord-tools input,.coex-accord-tools select,.coex-compare-tools select{height:46px;width:100%;background:#0f202b;border:1px solid #2e4955;color:#dce9ef;border-radius:5px;padding:0 12px;font-size:16px}
.coex-accord-buttons{display:flex;flex-wrap:wrap;gap:8px}
.coex-provisions{display:grid;gap:16px;margin:12px 0 18px}
.coex-provision{padding:22px 24px;border:1px solid var(--coex1st-line);border-radius:12px;background:#0a1720}
.coex-provision-code{margin:0 0 6px;font:600 12px var(--coex1st-mono);letter-spacing:.14em;color:var(--coex1st-accent)}
.coex-provision h3{font:400 clamp(22px,2.4vw,28px)/1.25 Georgia,serif;margin:0 0 8px;color:#e8f0f2}
.coex-provision-summary{color:#b3c5cc;font-size:16px;line-height:1.65;margin:0 0 12px}
.coex-provision-meta{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin:0 0 12px;color:#8fa9b3;font:11px/1.6 var(--coex1st-mono)}
.coex-pill-proposed{color:#e8d7ae;border-color:#8a7a50}.coex-pill-existing{color:#bfe9f2;border-color:#4f8f9c}
.coex-acc{border-top:1px solid var(--coex1st-line)}
.coex-acc summary{min-height:48px;display:flex;align-items:center;cursor:pointer;color:#cfe7ec;font:12px var(--coex1st-mono);letter-spacing:.06em;list-style:none}
.coex-acc summary::-webkit-details-marker{display:none}
.coex-acc summary::before{content:'+';width:22px;color:var(--coex1st-accent);font-size:16px}
.coex-acc[open] summary::before{content:'−'}
.coex-acc-body{padding:0 0 16px 22px;color:#c5d3d8;line-height:1.75;font-size:16px}
.coex-formal p{margin:0 0 1em}
.coex-formal strong{color:#e9f3f5}
.coex-contexts{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.coex-ctx{padding:10px 14px;border-left:3px solid;border-radius:0 6px 6px 0;background:#ffffff08}
.coex-ctx strong{display:block;font:11px var(--coex1st-mono);letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}
.coex-ctx-permit{border-color:#4b9a74}.coex-ctx-permit strong{color:#a7ddc6}
.coex-ctx-refuse{border-color:#a4645a}.coex-ctx-refuse strong{color:#efb6ab}
.coex-ctx-review{border-color:#b39a5c}.coex-ctx-review strong{color:#e8d7ae}
.coex-provision-actions{display:flex;flex-wrap:wrap;gap:6px 22px;padding-top:12px;border-top:1px solid var(--coex1st-line)}
.coex-provision-actions a{color:var(--coex1st-accent)!important;font:12px/1.5 var(--coex1st-mono);min-height:44px;display:inline-flex;align-items:center}
.coex-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;padding:0;margin:18px 0;list-style:none;counter-reset:s}
.coex-steps li{counter-increment:s;padding:16px;border:1px solid var(--coex1st-line);border-radius:10px;color:#a9bcc4;line-height:1.65;font-size:14px}
.coex-steps li strong{display:block;color:#e3edf0;font:400 19px Georgia,serif;margin-bottom:6px}
.coex-steps li strong::before{content:counter(s,decimal-leading-zero) '  ';font:11px var(--coex1st-mono);color:var(--coex1st-accent)}
.coex-timeline{list-style:none;padding:0;margin:0 0 30px;display:grid;gap:16px}
.coex-timeline-item{padding:22px 24px;border:1px solid var(--coex1st-line);border-left:3px solid var(--coex1st-accent);border-radius:0 12px 12px 0;background:#0a1720}
.coex-timeline-item h2{font:400 26px/1.25 Georgia,serif;margin:0 0 10px}
.coex-timeline-item p{color:#b3c5cc;line-height:1.7}
.coex-record-grid{margin-bottom:16px}
.coex-compare-tools{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:10px 0}
.coex-compare-tools label{display:flex;flex-direction:column;gap:6px;font:10px var(--coex1st-mono);letter-spacing:.1em;text-transform:uppercase;color:#9ab2bd;min-width:200px}
.coex-diff{line-height:1.8;color:#c5d3d8;font-size:15px}
.coex-diff ins{background:#1d4a36;color:#d8fbe8;text-decoration:none;border-radius:3px;padding:0 2px}
.coex-diff del{background:#4a2420;color:#ffd9d2;border-radius:3px;padding:0 2px}
.coex-diff:not(:empty){margin:10px 0;padding:16px;border:1px solid var(--coex1st-line);border-radius:10px;background:#07121a}
/* forms */
.coex-form{display:grid;gap:16px;margin-top:18px;max-width:820px}
.coex-form>label,.coex-form-grid>label{display:flex;flex-direction:column;gap:8px;font-size:14px;color:#cfe0e5}
.coex-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.coex-req{font:10px var(--coex1st-mono);color:#e8d7ae;letter-spacing:.08em;text-transform:uppercase}
.coex-opt{font:10px var(--coex1st-mono);color:#8fa9b3;letter-spacing:.06em}
.coex-seg-field{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:4px 26px}
.coex-seg-field legend{font-size:14px;color:#cfe0e5;margin-bottom:6px}
.coex-form .coex-button{justify-self:start;cursor:pointer}
.coex-form .coex-button[disabled]{opacity:.55;cursor:progress}
.coex-highlight{outline:2px solid var(--coex1st-accent);outline-offset:6px;border-radius:12px}

@media(max-width:720px){
  .coex-support{padding:22px 18px}
  .coex-support-note,.coex-statement{margin-left:0}
  .coex-rr-launch{left:14px;bottom:calc(12px + env(safe-area-inset-bottom))}
  .coex-rr-panel{top:auto;bottom:0;left:0;right:0;width:100%;max-width:100%;max-height:75dvh;border-radius:20px 20px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom)}
  .coex-reader-window{width:100vw;height:100dvh;border-radius:0;border:0;padding-top:env(safe-area-inset-top)}
  .coex-reader-bar{padding:8px 10px 8px 14px}
  .coex-reader-bar-title{display:none}
  .coex-reader-bar-actions{width:100%;justify-content:space-between}
  .coex-reader-scroll{padding:10px 10px calc(90px + env(safe-area-inset-bottom))}
  .coex-reader-main .coex-prose,.coex-reader-scroll .coex-prose{font-size:calc(19px * var(--coex-rr-scale))}
  .coex-surface{border-radius:12px}
  .coex-contents{top:auto;bottom:0;left:0;right:0;width:100%;max-width:100%;border-radius:18px 18px 0 0}
  .coex-provision{padding:18px 16px}
  .coex-acc-body{padding-left:0}
  .coex-invitation{margin-top:44px}
}
@media print{
  .coex-rr-launch,.coex-rr-panel,.coex-reader-layer,.coex-contents,.coex-resume,.coex-support,.coex-accord-tools,.coex-accord-nav,.coex-provision-actions,.coex-propose,.coex1st-dim{display:none!important}
  .coex-surface{background:#fff!important;border:0;box-shadow:none;padding:0}
  .coex-provision{break-inside:avoid;background:#fff;border:1px solid #999;color:#111}
  .coex-provision h3,.coex-acc-body,.coex-provision-summary,.coex-formal strong{color:#111}
  .coex-acc summary::before{content:''}
  body.coex-printing-accord .coex-collection-main>*:not(#coex-provisions){display:none!important}
  body.coex-printing-accord #coex-provisions>*:not(.coex-provisions):not(h2){display:none!important}
}

/* ---------- 1.1: The Return covers, book text editions, full Accord text ---------- */
.coex-book-face-art{position:relative;overflow:hidden;background:#05080c;isolation:isolate}
.coex-book-face-art::before{content:'';position:absolute;inset:0;z-index:-2;background:var(--coex-cover) center 40%/cover no-repeat}
.coex-book-face-art::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(4,7,12,.82) 0%,rgba(4,7,12,.25) 38%,rgba(4,7,12,.2) 62%,rgba(4,7,12,.86) 100%)}
.coex-book-face-art .coex-book-series,.coex-book-face-art strong,.coex-book-face-art .coex-book-imprint,.coex-book-face-art .coex-book-bottom{text-shadow:0 2px 12px #000c}
.coex-book-face-art strong{margin-top:auto;margin-bottom:6px}
.coex-book-coming .coex-book-face-art::before{filter:grayscale(.6) brightness(.7)}
.coex-book-intro{grid-template-columns:minmax(200px,320px) 1fr;align-items:start;gap:40px;margin:10px 0 40px}
.coex-book-cover{margin:0}
.coex-book-cover img{display:block;width:100%;height:auto;border-radius:4px 8px 8px 4px;box-shadow:inset 6px 0 6px #0008,14px 18px 40px #0008;cursor:zoom-in}
.coex-book-cover figcaption{font:10px var(--coex1st-mono);letter-spacing:.16em;color:#b9a980;margin-top:12px;text-align:center}
.coex-book-about{padding-top:10px}
.coex-book-about .coex-fine{max-width:46ch}
.coex-book-text{margin-top:10px}
.coex-text-edition{padding-top:20px;border-top:1px solid var(--coex-surface-line)}
.coex-prose h2{scroll-margin-top:20px}
.coex-prose h3{font:400 calc(26px * var(--coex-rr-scale))/1.35 Georgia,serif;color:var(--coex-surface-head);margin:2.2em 0 .8em;scroll-margin-top:20px}
.coex-text-edition h2{font:500 calc(15px * var(--coex-rr-scale))/1.6 var(--coex1st-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--coex1st-accent);margin:3.2em 0 1em;padding-top:1.4em;border-top:1px solid var(--coex-surface-line)}
html[data-rr-theme="paper"] .coex-text-edition h2{color:#0b5d6b}
.coex-prose .coex-sep{text-align:center;color:#6f8d96;letter-spacing:.4em;margin:1.6em 0}
.coex-frontmatter{margin:0 0 2em;padding:1em 1.2em;border:1px solid var(--coex-surface-line);border-radius:10px;font-size:.85em}
.coex-frontmatter p{margin:0 0 .8em}
.coex-toc-line{font:500 12px/1.6 var(--coex1st-mono)!important;letter-spacing:.12em;text-transform:uppercase;color:var(--coex1st-accent)!important;margin:1.2em 0 .4em!important}
.coex-contents li.coex-contents-sub{margin-left:14px;font-size:14px}
.coex-provision-kind{margin-left:8px;font:500 10px var(--coex1st-mono);letter-spacing:.1em;text-transform:uppercase;color:#9ab2bd}
.coex-pill-state{color:#cfe3ea;border-color:#56727d}
/* full Accord text */
.coex-formal-doc h2{font:400 calc(30px * var(--coex-rr-scale))/1.3 Georgia,serif;margin:2.4em 0 .8em;padding-top:1em;border-top:1px solid var(--coex-surface-line)}
.coex-formal-doc h3{font-size:calc(23px * var(--coex-rr-scale))}
.coex-formal-doc h4{font:600 calc(15px * var(--coex-rr-scale))/1.5 var(--coex1st-sans);color:var(--coex-surface-head);margin:1.8em 0 .6em}
.coex-formal-doc{font-size:calc(18px * var(--coex-rr-scale))!important}
.coex-formal-doc p{white-space:normal}
.coex-formal-doc ul,.coex-formal-doc ol{padding-left:1.4em;margin:0 0 1em}
.coex-formal-doc li{margin:.3em 0}
.coex-formal-doc blockquote{margin:1em 0;padding:.4em 1em;border-left:3px solid var(--coex1st-accent);font-style:italic}
.coex-formal-doc table{display:block;overflow-x:auto;border-collapse:collapse;margin:1em 0 1.6em;font:calc(14px * var(--coex-rr-scale))/1.55 var(--coex1st-sans);max-width:100%}
.coex-formal-doc th,.coex-formal-doc td{border:1px solid var(--coex-surface-line);padding:8px 10px;vertical-align:top;text-align:left}
.coex-formal-doc th{color:var(--coex-surface-head)}
.coex-formal-doc code{font:.85em var(--coex1st-mono)}
.coex-formal-doc pre{overflow-x:auto;white-space:pre-wrap;font:13px/1.5 var(--coex1st-mono);padding:12px;border:1px solid var(--coex-surface-line);border-radius:8px}
.coex-formal-doc :target{outline:2px solid var(--coex1st-accent);outline-offset:6px}
@media(max-width:720px){.coex-book-intro{grid-template-columns:1fr;gap:18px}.coex-book-cover{max-width:260px;margin:0 auto}.coex-book-about{text-align:center}.coex-book-about .coex-fine{margin-left:auto;margin-right:auto}}

/* ---------- 1.2: the reading room (TL3 US3R AMBI3NC3 room, restyled for COEX1ST) ---------- */
.ua-root{--ua-accent:#73d7e8;font-family:var(--coex1st-sans)}
.ua-root .ua-title{font-family:Georgia,"Times New Roman",serif;font-weight:400;letter-spacing:-.01em}
.ua-root .ua-eyebrow,.ua-root .ua-onair,.ua-root .ua-strip-label,.ua-root output{font-family:var(--coex1st-mono)}
.ua-root .ua-tabs{grid-template-columns:repeat(3,1fr)}
.ua-root .ua-mixer.ua-mixer-3{grid-template-columns:repeat(3,1fr)}
.ua-root .ua-strip.is-muted{opacity:.45}
.ua-root .ua-strip-mute.is-blank{visibility:hidden}
.ua-root .ua-stepper{display:inline-flex;align-items:center;gap:8px}
.ua-root .ua-stepper .ua-btn{min-width:44px}
.ua-root .ua-size-out{min-width:48px;text-align:center}
.ua-root .ua-row{flex-wrap:wrap}
.ua-root .coex-under-tiles{grid-template-columns:repeat(2,1fr)}
.ua-root .coex-under-tiles .ua-tile{min-height:92px;background-size:cover;background-position:center 35%}
.ua-root .coex-under-stars{background:radial-gradient(1px 1px at 20% 30%,#fff,transparent),radial-gradient(1px 1px at 70% 60%,#fff,transparent),radial-gradient(1.5px 1.5px at 40% 80%,#cfefff,transparent),radial-gradient(1px 1px at 85% 20%,#fff,transparent),#050b12}
.ua-root .coex-under-plain{background:#05090d}
.coex-room-btn.ua-host-btn{margin-left:auto;margin-right:14px;display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 13px;border:1px solid #37636f;border-radius:20px;background:#0b1d26cc;color:#c8edf0;font:11px var(--coex1st-mono);letter-spacing:.06em;cursor:pointer}
.coex-room-btn.ua-host-btn:hover{border-color:#73d7e8}
.coex-room-btn .ua-host-icon svg{width:16px;height:16px}
.coex-room-btn .ua-host-dot{width:7px;height:7px;border-radius:50%;background:#35505d}
.coex-room-btn.is-live .ua-host-dot{background:#73d7e8;box-shadow:0 0 8px #73d7e8}
.coex-underlay.ua-underlay{z-index:0}
@media(max-width:720px){.coex-room-btn .ua-host-label{display:none}.coex-room-btn.ua-host-btn{margin-right:8px;padding:0 10px}}
@media print{.ua-root,.coex-room-btn,.coex-underlay,.coex1st-space{display:none!important}}

/* ---------- 1.2: lean Accord page — compact tiles that open in place ---------- */
.coex-accord-main .coex-provisions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
.coex-prov-tile{padding:0!important;margin:0!important;border:1px solid var(--coex1st-line);border-radius:10px;background:rgba(9,18,25,.72)}
.coex-prov-tile>.coex-tile-d>summary{display:grid;grid-template-columns:1fr auto;grid-template-areas:"code pill" "title title";gap:4px 10px;padding:14px 16px;cursor:pointer;list-style:none}
.coex-prov-tile>.coex-tile-d>summary::-webkit-details-marker{display:none}
.coex-prov-tile>.coex-tile-d>summary:hover{background:rgba(115,215,232,.05)}
.coex-tile-code{grid-area:code;font:500 10px/1.5 var(--coex1st-mono);letter-spacing:.1em;color:#83cfdb;text-transform:uppercase}
.coex-tile-title{grid-area:title;font:400 17px/1.35 Georgia,serif;color:#e6eef0}
.coex-prov-tile .coex-pill{grid-area:pill;align-self:start}
.coex-prov-tile>.coex-tile-d[open]{grid-column:1/-1}
.coex-prov-tile:has(>.coex-tile-d[open]){grid-column:1/-1;border-color:#3f7280}
.coex-tile-body{padding:0 16px 14px;border-top:1px solid var(--coex1st-line)}
.coex-tile-body .coex-provision-summary{margin:12px 0}
.coex-fold>summary{cursor:pointer;color:#96deeb;font:11px/2.4 var(--coex1st-mono);letter-spacing:.06em}
.coex-fold-quiet{margin-top:4px}
.coex-accord-status>p:first-child{margin:0}
.coex-accord-tools{display:grid;grid-template-columns:2fr 1fr;gap:12px;align-items:end}
.coex-more-filters{grid-column:1/-1}
.coex-more-filters[open]{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.coex-more-filters[open]>summary,.coex-more-filters .coex-accord-buttons{grid-column:1/-1}
.coex-steps-row{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.coex-steps-row li{padding:7px 12px;border-radius:20px;font:11px var(--coex1st-mono);color:#c7e3e8;line-height:1.4}
.coex-steps-row li::after{content:' →';color:#4f7b88}
.coex-steps-row li:last-child::after{content:''}
@media(max-width:720px){.coex-accord-main .coex-provisions,.coex-accord-tools,.coex-more-filters[open]{grid-template-columns:1fr}}
@media print{.coex-accord-main .coex-provisions{display:block}}
.coex-propose-fold>summary.coex-button{display:inline-flex;list-style:none;margin:6px 0 4px}
.coex-propose-fold>summary::-webkit-details-marker{display:none}
.coex-propose-fold[open]>summary{display:none}
