.tree-auto-note{padding:9px 10px;border-left:2px solid #d0aa61;background:#d0aa6112;color:#e0d2ac;font-size:10px;line-height:1.5}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#research-tree{--branch:#78c4d6;position:fixed;inset:105px 24px 65px;margin:0;width:calc(100vw - 48px);height:calc(100dvh - 170px);max-width:none;max-height:none;padding:0;overflow:hidden;border:1px solid #c5a568;border-radius:5px;background:#0d292f;box-shadow:0 15px 100px #000c}
#research-tree[open]{display:flex;flex-direction:column}#research-tree[data-kind=civic]{--branch:#c49cd8}#research-tree::backdrop{background:#03121ac7;backdrop-filter:blur(2px)}
.tree-header{height:65px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 20px;background:linear-gradient(110deg,#123d43,#0b242c 60%);border-bottom:1px solid #b39a6566}.tree-brand{display:flex;align-items:center;gap:12px;color:#e5c58b;font:13px Georgia,serif;letter-spacing:.1em}.tree-brand>svg{width:34px;height:34px}.tree-brand small{display:block;font:8px 'Segoe UI',sans-serif;letter-spacing:.2em;color:#a9bab5;margin-top:5px}.tree-tabs{display:flex;align-self:stretch;gap:10px;margin-right:auto;margin-left:35px}.tree-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;background:none;color:#a5b6b4;display:flex;align-items:center;gap:10px;padding:0 18px;font-size:11px;letter-spacing:.13em}.tree-tabs button[aria-selected=true]{color:#f4e5c2;border-bottom-color:var(--branch);background:linear-gradient(0deg,#86c0c219,transparent)}.tree-tabs svg{width:24px;height:24px;color:var(--branch)}.tree-subheader{display:flex;justify-content:space-between;align-items:center;padding:13px 22px;border-bottom:1px solid #b0986155;flex-shrink:0;gap:15px}.tree-subheader h2{font:23px Georgia,serif;color:#f1dfb7;margin:0 0 5px}.tree-subheader #tree-summary{font-size:11px;color:#adbfba}.tree-tools{display:flex;align-items:center;gap:5px}.tree-tools button{height:31px;min-width:31px;padding:5px 9px;display:flex;align-items:center;gap:6px;color:#dbccaa;font-size:11px}.tree-tools svg{width:18px;height:18px}#tree-zoom-label{font-size:10px;color:#aebfbb;width:36px;text-align:center}#tree-focus{margin-right:8px}
.tree-body{display:grid;grid-template-columns:248px minmax(0,1fr);flex:1;min-height:0}.tree-sidebar{overflow-y:auto;overscroll-behavior:contain;padding:18px;background:linear-gradient(120deg,#14353a,#0a252b);border-right:1px solid #b19559;scrollbar-width:thin;scrollbar-color:#718582 #0b262b}.tree-search-label{font-size:9px;color:#c8b080;letter-spacing:.12em}.tree-sidebar input{width:100%;border:1px solid #586d65;background:#081e24;color:#ede5d2;border-radius:3px;padding:10px;margin-top:7px;font-size:11px}.tree-sidebar input:focus-visible{outline:2px solid var(--branch);outline-offset:2px}.tree-sidebar input::placeholder{color:#8ca6a6}.tree-sidebar select{font-size:11px;padding:7px;margin:7px 0 8px}.tree-legend{display:grid;grid-template-columns:1fr 1fr;gap:9px;font-size:10px;color:#c2ceca;padding:10px 0 17px;border-bottom:1px solid #b99f5438}.tree-legend span{display:flex;align-items:center;gap:6px}.tree-legend i{width:8px;height:8px;border:1px solid #7c877f;background:#c2bba2}.tree-legend i.available{background:#325955;border-color:#a7c6ac}.tree-legend i.researching{background:#66bbcf;border-color:#b2e5ed}.tree-legend i.completed{background:#b99750;border-color:#e7c377}.tree-legend i.locked{background:#6c7975;border-color:#89948f}#tree-match-count{font-size:10px;color:#a9c4c1;margin:0}#tree-match-count:empty{display:none}
.tree-detail-title{display:flex;align-items:center;gap:10px;margin:20px 0 13px;color:var(--branch)}.tree-detail-title>svg{width:30px;height:30px;flex-shrink:0}.tree-detail-title h3{font:20px Georgia,serif;color:#f0e1bd;letter-spacing:0;margin:0}.tree-detail-cost{display:flex;justify-content:space-between;color:#a0b8b5;font-size:11px;gap:8px}.tree-detail-cost b{color:#dbd8c2;font-weight:500}#tree-detail h4{font-size:9px;letter-spacing:.13em;color:#cdb17c;margin:18px 0 9px}.tree-prerequisites{display:flex;flex-wrap:wrap;gap:5px}.tree-prerequisites button{font-size:10px;padding:5px 7px;color:#bdc8be;border-color:#627465}.tree-prerequisites button.done{color:#ead29b;border-color:#bda163}.tree-prerequisites small{color:#a9beb8}.tree-unlock-list{padding:0;margin:0;list-style:none;display:grid;gap:8px}.tree-unlock-list li{display:flex;gap:8px;align-items:center;color:#ddd9c4;font-size:12px}.tree-unlock-list small{display:block;color:#8fa9a6;font-size:9px;margin-top:2px}.tree-boost{margin-top:15px;padding:10px;border:1px solid #626c5555;background:#92a36c09}.tree-boost strong{font-size:11px;color:#b0c6bd}.tree-boost p{font-size:10px;color:#a6bab4;margin:5px 0 0}.tree-boost.earned{border-color:#83aa7366;background:#6382541c}.tree-boost.earned strong{color:#bee1a6}.tree-reason{font-size:11px;line-height:1.6;color:#b4c6bf;margin:18px 0 10px}#tree-start{width:100%;padding:11px 5px;font-size:10px;line-height:1.4}.tree-plan-preview{font-size:10px;line-height:1.6;color:#cdb883;margin:8px 0}.tree-queue{margin-top:22px;border-top:1px solid #af976046;padding-top:16px}.tree-queue h3{font-size:9px;margin-bottom:12px}.tree-queue ol{list-style:none;margin:0;padding:0;display:grid;gap:6px}.tree-queue li{display:flex;align-items:center;gap:8px;font-size:11px;padding:8px;background:#93a8a511}.tree-queue li>span{border:1px solid #af996364;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;color:#d2bb86;font-size:9px;flex-shrink:0}.tree-queue li>b{flex:1;font-weight:400}.tree-queue li small{display:block;font-size:9px;color:#8ba9a5;margin-top:4px}.tree-queue li button{font-size:15px;padding:0 6px;border:0;background:none;color:#bba97a}.tree-queue .empty-queue{font-size:10px;color:#93aea8}
.tree-viewport{position:relative;overflow:auto;overscroll-behavior:contain;scrollbar-color:#8b805c #b4b29b;scrollbar-width:thin;background:radial-gradient(ellipse at 30% 20%,#e1dac2aa,transparent 60%),repeating-linear-gradient(35deg,#fff1 0px,#fff1 1px,transparent 1px,transparent 7px),#c2c2ab;cursor:grab}.tree-viewport:focus-visible{outline:2px solid var(--branch);outline-offset:-2px}.tree-viewport.panning{cursor:grabbing;user-select:none}#tree-stage{position:relative}#tree-graph{position:absolute;top:0;left:0;transform-origin:top left}.tree-era-band{position:absolute;top:0;border-right:1px solid #55635e35;background:linear-gradient(90deg,#48695409,transparent 50%,#5655410a);pointer-events:none}.tree-era-band>span{position:absolute;top:0;left:0;right:0;height:69px;border-bottom:1px solid #4a625b30;display:flex;align-items:baseline;gap:13px;padding:19px 35px;color:#465c52}.tree-era-band small{font-size:8px;letter-spacing:.14em;white-space:nowrap}.tree-era-band b{font:21px Georgia,serif;white-space:nowrap}.tree-era-band em{font-size:10px;font-style:normal;white-space:nowrap;color:#657064}.tree-era-band.current-era{background:linear-gradient(90deg,#7186590f,transparent 70%)}.tree-era-band.current-era>span{box-shadow:inset 0 3px #b39862}.tree-edges{position:absolute;inset:0;overflow:visible;pointer-events:none}.tree-edge{fill:none;stroke:#66716477;stroke-width:3;stroke-dasharray:8 5}.tree-edge.known{stroke:#83784c;stroke-dasharray:none}.tree-edge.on-path{stroke:#245d69;stroke-width:4;stroke-dasharray:none}#research-tree[data-kind=civic] .tree-edge.on-path{stroke:#765d85}
.tree-node{position:absolute;width:244px;height:90px;padding:10px 12px 10px 10px;display:flex;gap:11px;align-items:center;text-align:left;letter-spacing:0;overflow:visible;border:1px solid #788072;border-radius:3px;color:#304a41;background:linear-gradient(130deg,#dad9c6,#c3c6b2);box-shadow:0 3px 0 #47554730,inset 0 0 0 3px #f3e9bd30;isolation:isolate}.tree-node:before{content:"";position:absolute;inset:4px;border:1px solid #fbf3d72e;border-radius:1px;pointer-events:none}.tree-node.available{background:linear-gradient(120deg,#48645a,#284a46);border-color:#84966c;color:#ebe4c6;box-shadow:0 3px 0 #43584b45,inset 0 0 0 3px #c1b67730}.tree-node.completed{background:linear-gradient(120deg,#8a7850,#6a6244);color:#fff0c7;border-color:#ac8c48;box-shadow:0 3px 0 #5c50293f,inset 0 0 0 3px #cfb97135}.tree-node.researching{background:linear-gradient(120deg,#235c6c,#173c4b);color:#eef4df;border-color:#58adbd;box-shadow:0 0 0 2px #d4e5dc,0 4px 0 #486f7655}.tree-node:hover:not(:disabled){background:linear-gradient(120deg,#617d6e,#3d6257);border-color:#e9ce8e;color:#fff0c7;box-shadow:0 4px 8px #2c342735}.tree-node.selected{outline:2px solid #235c69;outline-offset:4px;z-index:2}.tree-node:focus-visible{outline:3px solid #235c69;outline-offset:4px}.tree-node.locked .tree-node-medallion{color:#566757;border-color:#92967b;background:#bbbeaa}.tree-node-medallion{width:46px;height:46px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;border:1px solid #d0b878;background:radial-gradient(circle at 35% 25%,#627158,#1e3935);color:#edd69a;box-shadow:0 0 0 3px #d5c99c38,0 2px 5px #102e2538}.tree-node-medallion svg{width:29px;height:29px;stroke-width:1.5}.tree-node-content{flex:1;min-width:0}.tree-node-name{font:15px/1.15 Georgia,serif;display:block}.tree-node-meta{display:block;font-size:9px;opacity:.78;margin-top:5px}.tree-unlocks{display:flex;gap:4px;align-items:center;margin-top:7px}.unlock-token{width:23px;height:23px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:#877841;border:1px solid #d6bf7e;color:#f0e9c7;border-radius:3px}.unlock-token svg{width:16px;height:16px;stroke-width:1.6}.unlock-token.unit{border-radius:50%;background:#366636;border-color:#a4c786}.unlock-token.policy{background:#684b77;border-color:#bfabd0}.unlock-token.improvement{background:#325d6b;border-color:#8cb2b9}.unlock-token.wonder{background:#9f7930;border-color:#e5cb75;clip-path:polygon(50% 0,65% 15%,90% 10%,85% 40%,100% 60%,80% 75%,80% 100%,50% 87%,20% 100%,20% 75%,0 60%,15% 40%,10% 10%,35% 15%)}.unlock-more,.unlock-note{font-size:9px;opacity:.8}.tree-node-progress{position:absolute;bottom:0;height:4px;left:0;right:0;background:#09282d}.tree-node-progress i{height:100%;background:var(--branch);display:block}.tree-queue-number{position:absolute;right:-8px;top:-9px;border-radius:50%;width:23px;height:23px;background:#203b40;color:#efcf86;border:1px solid #bf9d4f;display:grid;place-items:center;font-size:10px}.tree-boost-mark{position:absolute;bottom:5px;right:8px;color:#e7d078;font-size:19px}.tree-node.filtered-out{opacity:.2}.tree-node.filtered-out:hover{opacity:1}
.tree-footer{display:flex;align-items:stretch;flex-shrink:0;min-height:73px;border-top:1px solid #c1a065;background:linear-gradient(0deg,#081f25,#17353a)}.tree-timeline-heading{width:248px;flex-shrink:0;display:flex;align-items:center;gap:10px;padding:12px 18px;color:#cdb282;font-size:9px;letter-spacing:.12em;border-right:1px solid #aa935d55}.tree-timeline-heading small{display:block;letter-spacing:0;color:#90aaa8;font-size:10px;margin-top:5px}.tree-timeline-heading svg{width:22px;height:22px}.tree-footer nav{display:flex;flex:1;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#8c7c51 #112c30}.timeline-era{border:0;border-right:1px solid #b69b5633;border-radius:0;min-width:237px;flex-shrink:0;display:flex;align-items:center;gap:12px;text-align:left;background:none;letter-spacing:0;padding:12px 18px}.timeline-era>span{font:23px Georgia,serif;color:#c4b07c}.timeline-era>b{font:13px Georgia,serif;color:#d5d7c2}.timeline-era small{display:block;font:9px 'Segoe UI',sans-serif;color:#98afaa;margin-top:5px}.timeline-era em{font-size:8px;letter-spacing:.1em;font-style:normal;color:#ead39c;margin-left:auto}.timeline-era.current{box-shadow:inset 0 3px var(--branch);background:#7699981a}.timeline-era:disabled{opacity:.4;min-width:225px}
@media(max-width:1400px){#research-tree{inset:82px 14px 25px;width:calc(100vw - 28px);height:calc(100dvh - 107px)}.tree-header{height:55px;padding:0 15px;gap:12px}.tree-brand{font-size:11px}.tree-brand>svg{width:27px;height:27px}.tree-brand small{font-size:7px}.tree-tabs{margin-left:10px}.tree-tabs button{padding:0 12px;font-size:10px}.tree-subheader{padding:10px 17px}.tree-subheader h2{font-size:21px}.tree-subheader #tree-summary{font-size:10px}.tree-body{grid-template-columns:220px minmax(0,1fr)}.tree-sidebar{padding:14px}.tree-timeline-heading{width:220px;padding:10px 14px}.tree-footer{min-height:66px}.tree-detail-title h3{font-size:18px}.timeline-era{min-width:220px}}
@media(max-width:900px){#research-tree{inset:70px 8px 12px;width:calc(100vw - 16px);height:calc(100dvh - 82px)}.tree-brand{display:none}.tree-tabs{margin:0;gap:4px}.tree-tabs button{font-size:9px;padding:0 8px}.tree-header{gap:5px;padding:0 10px}.tree-subheader{padding:9px 12px}.tree-subheader h2{font-size:18px}.tree-subheader #tree-summary{display:block;max-width:350px;line-height:1.5;font-size:9px}.tree-tools #tree-focus span{display:none}.tree-tools{gap:3px}.tree-body{grid-template-columns:195px minmax(0,1fr)}.tree-sidebar{padding:12px}.tree-timeline-heading{width:195px;padding:10px;font-size:8px}.tree-tools button{min-width:25px;padding:4px}.tree-footer{min-height:60px}.tree-detail-title h3{font-size:17px}}
