/* Cell Atlas tree pages (phase 1). Site palette, hairlines, sentence case. */
:root{--bg:#081719;--panel:#0d2022;--line:#254043;--ink:#edf4ed;--muted:#91aaa6;--accent:#c3e784;
  --kegg:#8ed3c9;--todo:#e7cd84;--side:270px}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.65 'DM Sans',system-ui,sans-serif}
a{color:var(--accent);text-decoration-thickness:1px;text-underline-offset:3px}
a:focus-visible,summary:focus-visible{outline:1px solid var(--accent);outline-offset:3px}
h1,h2,h3{font-family:Manrope,system-ui,sans-serif;font-weight:400;line-height:1.2;text-wrap:balance;margin:0}
h1{font-size:clamp(28px,4vw,44px);font-weight:300;letter-spacing:-.5px}
h1 i{font-style:italic}
h2{font-size:24px;font-weight:300;padding-top:20px;border-top:1px solid var(--line)}
h3{font-size:17px;margin-top:8px}
small{color:var(--muted);font-size:13px}
.num{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted)}

.tt-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  padding:14px max(16px,4vw);border-bottom:1px solid var(--line)}
.tt-brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-size:14px;letter-spacing:.5px}
.tt-brand small{font-size:12px;margin-left:4px}
.tt-mark{color:var(--accent);font-size:22px}
.tt-headlinks{display:flex;gap:18px;font-size:14px}
.tt-layout{display:grid;grid-template-columns:var(--side) minmax(0,1fr);max-width:1320px;margin:0 auto;gap:40px;
  padding:28px max(16px,4vw) 60px}
.tt-side{position:sticky;top:16px;align-self:start;max-height:calc(100vh - 32px);overflow:auto;font-size:14px}
.tt-where{display:none}
.tt-main{min-width:0;display:flex;flex-direction:column;gap:22px;max-width:900px}
.tt-foot{border-top:1px solid var(--line);color:var(--muted);font-size:12px;padding:20px max(16px,4vw)}

.tt-tree ol{list-style:none;margin:0;padding:0}
.tt-tree li{border-top:1px solid var(--line)}
.tt-tree li a{display:flex;gap:8px;padding:6px 0;color:var(--ink);text-decoration:none;line-height:1.35}
.tt-tree li a:hover{color:var(--accent)}
.tt-tree li.on>a{color:var(--accent)}
.tt-tree li ol{padding:0 0 6px 26px}
.tt-tree li ol li{border:0}
.tt-tree li ol a{color:var(--muted);padding:3px 0;font-size:13px}
.tt-tree li ol li.on a{color:var(--accent)}
.tt-root{display:block;padding:0 0 8px;font-size:13px;color:var(--muted)}
.tt-n{font:12px/1.6 ui-monospace,Consolas,monospace;color:var(--muted);min-width:18px}
.tt-more{display:flex;flex-direction:column;gap:4px;margin:14px 0 0;padding-top:10px;border-top:1px solid var(--line);font-size:13px}

.tt-crumbs{font-size:13px;color:var(--muted);display:flex;flex-wrap:wrap;gap:4px 6px}
.tt-crumbs a{color:var(--muted)}
.tt-crumbs .sep{opacity:.6}
.tt-eyebrow{margin:0;font-size:13px;color:var(--accent);letter-spacing:.3px}
.tt-lede{margin:0;font-size:18px;color:var(--muted);max-width:68ch}
.tt-muted{color:var(--muted)}
.tt-small{font-size:14px}
section{display:flex;flex-direction:column;gap:12px;min-width:0;scroll-margin-top:16px}
section p{margin:0;max-width:70ch}

.tt-tabs{display:flex;flex-wrap:wrap;gap:4px 20px;border-bottom:1px solid var(--line);font-size:14px}
.tt-tabs a{padding:6px 0;text-decoration:none;color:var(--muted)}
.tt-tabs a:hover{color:var(--accent)}
.tt-3d{margin:0}

.tt-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));border-top:1px solid var(--line);border-left:1px solid var(--line)}
.tt-facts div{padding:10px 12px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.tt-facts b{display:block;font:300 26px/1.1 Manrope,sans-serif;font-variant-numeric:tabular-nums}
.tt-facts span{font-size:13px;color:var(--muted)}

.tt-chips{display:flex;flex-wrap:wrap;gap:6px}
.tt-chip{border:1px solid var(--line);border-radius:999px;padding:1px 10px;font-size:13px;color:var(--muted);white-space:nowrap}
.tt-spec-step_named{border-color:var(--accent);color:var(--accent)}
.tt-spec-system_only{border-color:var(--kegg);color:var(--kegg)}
.tt-spec-unspecified{border-color:var(--todo);color:var(--todo)}

.tt-gcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:0;border-top:1px solid var(--line);border-left:1px solid var(--line)}
.tt-gcard{padding:14px 16px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);gap:8px}
.tt-gcard h2{border:0;padding:0;font-size:19px;font-weight:400}
.tt-gcard h2 a{color:var(--ink);text-decoration:none;display:flex;gap:8px}
.tt-gcard h2 a:hover{color:var(--accent)}
.tt-gcard p{font-size:14px}
.tt-gcard summary{cursor:pointer;font-size:14px;color:var(--accent)}

.tt-plist{list-style:none;margin:6px 0 0;padding:0;font-size:14px}
.tt-plist li{display:flex;gap:10px;align-items:baseline;padding:5px 0;border-top:1px solid var(--line)}
.tt-plist li a{flex:1;min-width:0}
.tt-plist-big{font-size:15px}
.tt-kind{font-size:12px;border:1px solid var(--line);border-radius:999px;padding:0 8px;white-space:nowrap}
.tt-kind-curated{color:var(--accent)}
.tt-kind-kegg{color:var(--kegg)}
.tt-kind-unplaced{color:var(--todo)}

.tt-scroll{overflow-x:auto;border-top:1px solid var(--line)}
.tt-table{border-collapse:collapse;width:100%;font-size:14px;min-width:720px}
.tt-table th{font-weight:500;font-size:12px;color:var(--muted);text-align:left;padding:8px 10px 8px 0;border-bottom:1px solid var(--line)}
.tt-table td{vertical-align:top;padding:8px 10px 8px 0;border-bottom:1px solid var(--line)}
.tt-table td small{display:block}
.tt-table td b{font-weight:500;font-style:italic}
.tt-rx{max-width:300px;font-size:13px;color:var(--muted)}
.tt-home a{color:var(--muted)}

.tt-steps{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:6px;max-width:70ch}
.tt-kv{display:grid;grid-template-columns:minmax(130px,190px) minmax(0,1fr);margin:0;border-top:1px solid var(--line)}
.tt-kv>*{padding:9px 0;border-bottom:1px solid var(--line);min-width:0}
.tt-kv dt{color:var(--muted);font-size:14px;padding-right:14px}
.tt-kv dd{margin:0;overflow-wrap:anywhere}
.tt-kv ul{margin:0;padding-left:18px}
.tt-links{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px}

.tt-deps{list-style:none;margin:0;padding:0}
.tt-deps li{display:flex;flex-direction:column;gap:2px;padding:8px 0;border-bottom:1px solid var(--line)}
.tt-deps li span{color:var(--muted);font-size:14px}
.tt-deps b{font-weight:500}

.tt-matrix{border-collapse:collapse;font-size:12px;min-width:760px}
.tt-matrix th{font-weight:400;color:var(--muted);padding:4px}
.tt-matrix thead th{height:120px;vertical-align:bottom;white-space:nowrap}
.tt-matrix thead th span{display:inline-block;writing-mode:vertical-rl;transform:rotate(180deg)}
.tt-matrix tbody th{text-align:right;white-space:nowrap;padding-right:8px}
.tt-matrix td{width:26px;height:24px;text-align:center;border:1px solid var(--line);color:var(--accent)}
.tt-matrix td.on{cursor:help}
.tt-matrix td.mutual{background:#c3e78422}
.tt-matrix td.self{color:var(--line)}
.tt-matrix td.num{border:0;padding-left:8px}

@media (max-width:900px){
  .tt-layout{grid-template-columns:1fr;gap:16px;padding-top:16px}
  .tt-side{display:none}
  .tt-where{display:block;border:1px solid var(--line);padding:8px 12px;font-size:14px}
  .tt-where summary{cursor:pointer;color:var(--accent)}
  .tt-where .tt-tree{margin-top:10px}
}
@media (max-width:560px){
  .tt-kv{grid-template-columns:1fr}
  .tt-kv dt{border-bottom:0;padding-bottom:0}
  .tt-headlinks{gap:12px;font-size:13px}
}

/* phase 2: origins hub, final analysis, method */
.tt-split{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tt-panel{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid var(--line);min-width:0;font-size:15px}
.tt-panel p{margin:0}
.tt-panel ul{margin:0;padding-left:18px}
.tt-nat{border-color:#8fb4de55;background:#8fb4de0d}
.tt-des{border-color:#d9a86555;background:#d9a8650d}
.tt-tag{font-size:12px;letter-spacing:.4px}
.tt-nat .tt-tag{color:#8fb4de}
.tt-des .tt-tag{color:#d9a865}
.tt-question{font-family:Manrope,sans-serif;font-weight:300;font-size:19px;line-height:1.4;color:var(--ink)}
.tt-origin h3{margin-top:4px}
.tt-origin h4{margin:4px 0 0;font-weight:500;font-size:15px}
.tt-hurdles{list-style:none;margin:0;padding:0}
.tt-hurdles li{display:grid;grid-template-columns:9.5em 1fr;gap:2px 12px;padding:7px 0;border-bottom:1px solid var(--line);scroll-margin-top:16px}
.tt-hurdles li span:last-child{grid-column:2;color:var(--muted);font-size:14px}
.tt-hurdles b{font-weight:500}
.tt-hid{font:12px/1.7 ui-monospace,Consolas,monospace;color:var(--muted)}
.tt-toc summary{cursor:pointer;color:var(--accent);font-size:14px}
.tt-toc ol{columns:2;font-size:14px;margin:8px 0 0}
.tt-bars{display:flex;flex-direction:column;gap:4px;max-width:560px}
.tt-bar{display:grid;grid-template-columns:4.5em 1fr 3em;gap:10px;align-items:center;font-size:13px}
.tt-bar-l{color:var(--muted)}
.tt-bar-t{height:8px;border:1px solid var(--line)}
.tt-bar-t i{display:block;height:100%;background:var(--accent);opacity:.75}
.tt-deps small{display:block}
@media (max-width:620px){.tt-split{grid-template-columns:1fr}.tt-hurdles li{grid-template-columns:1fr}.tt-hurdles li span:last-child{grid-column:1}.tt-toc ol{columns:1}}
.tt-origins{border-top:1px solid var(--line)}
details.tt-origin{border-bottom:1px solid var(--line);padding:0 0 4px}
details.tt-origin>summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:baseline;padding:12px 0;font:400 19px/1.3 Manrope,sans-serif;color:var(--ink)}
details.tt-origin>summary:hover,details.tt-origin[open]>summary{color:var(--accent)}
details.tt-origin>summary small{white-space:nowrap}
details.tt-origin[open]{display:flex;flex-direction:column;gap:12px;padding-bottom:18px}
.tt-table.tt-narrow{min-width:0}
/* phase 3 drafts (preview copies only) */
.tt-draft{display:flex;flex-direction:column;gap:10px;border:1px dashed #e7cd84;padding:12px 14px;background:#e7cd840a}
.tt-draft-tag{font-size:12px;color:#e7cd84;letter-spacing:.3px}
.tt-draft-chips{grid-column:2;display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.tt-draft-note{grid-column:2;font-size:13px;color:var(--muted);font-style:italic}
.tt-kind-chip{color:#e7cd84;border-color:#e7cd8466}
.tt-timeline{list-style:none;margin:0;padding:0}
.tt-timeline li{display:grid;grid-template-columns:4em 1fr;gap:10px;padding:6px 0;border-bottom:1px solid var(--line);font-size:14px}
.tt-timeline small{display:block;margin-top:2px}
.tt-year{font-variant-numeric:tabular-nums;color:var(--accent)}
@media (max-width:620px){.tt-draft-chips,.tt-draft-note{grid-column:1}}
.tt-batch{display:flex;flex-direction:column;gap:10px}
.tt-legend summary{cursor:pointer;color:var(--accent);font-size:14px}
.tt-legend p{font-size:14px;color:var(--muted);margin-top:6px}
/* stage labels wrap on narrow screens */
.tt-draft-chips{min-width:0}
.tt-draft-chips .tt-chip{white-space:normal;max-width:100%}
.tt-hurdles li{grid-template-columns:9.5em minmax(0,1fr)}
.tt-hurdles li>*{min-width:0}
@media (max-width:620px){.tt-hurdles li{grid-template-columns:minmax(0,1fr)}}

/* audit 26 Oct: supporting-evidence note */
.tt-note{border-left:2px solid #d7bd7d;padding:.6em .9em;margin:1em 0;background:rgba(215,189,125,.08);font-size:.95em;line-height:1.55}

/* headline figures are links */
.tt-facts a.tt-fact{display:block;color:inherit;text-decoration:none}
.tt-facts a.tt-fact b{text-decoration:underline dotted 1px;text-underline-offset:5px}
.tt-facts a.tt-fact:hover b,.tt-facts a.tt-fact:focus-visible b{text-decoration:underline solid 1px}
.tt-facts a.tt-fact:hover span{color:inherit}

/* hurdle tags keep their size and sit under the description (rows are single-column) */
/* everything after the title goes in the last column: column 2 on wide screens, the only column on phones */
.tt-hurdles li>b~span{grid-column:-2/-1}
.tt-draft-chips{align-items:flex-start;align-self:start}
.tt-draft-chips .tt-chip{align-self:flex-start;line-height:1.5;border-radius:10px}

/* hurdle problem format */
.tt-hprob,.tt-hhard{font-size:15px;line-height:1.55}
.tt-hprob b,.tt-hhard b{font-weight:500}
.tt-hhard{color:var(--muted)}
.tt-draft-note b{font-style:normal;font-weight:500}
.tt-hbooks{font-size:13px;color:var(--muted)}
.tt-fam-A{color:#8fb6d6;border-color:#8fb6d666}
.tt-fam-B{color:#d9b47a;border-color:#d9b47a66}
.tt-fam-C{color:#b3c789;border-color:#b3c78966}
.tt-fam-D{color:#d7a3bf;border-color:#d7a3bf66}
