@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Noto+Sans+TC:wght@400;500;600;700;800&display=swap');
:root{color-scheme:light;--bg:#f6f7f5;--paper:#fff;--paper-2:#fbfcfa;--muted-bg:#eef2ef;--ink:#202d2b;--ink-soft:#3d4e4a;--muted:#788780;--line:#e4e9e5;--line-strong:#d6ded8;--brand:#246657;--brand-dark:#164f42;--accent:#c9e9db;--accent-text:#0c5947;--shadow:0 16px 50px rgba(21,44,32,.045);--shadow-float:0 18px 48px rgba(21,44,32,.14);--side-width:260px;--r:16px}
:root[data-theme="dark"]{color-scheme:dark;--bg:#101816;--paper:#19231f;--paper-2:#1c2924;--muted-bg:#27362f;--ink:#e9f1ea;--ink-soft:#c4d2c8;--muted:#91a59a;--line:#304138;--line-strong:#42594b;--brand:#8ed3b5;--brand-dark:#9cddbf;--accent:#1b4031;--accent-text:#ade2c6;--shadow:0 16px 50px rgba(0,0,0,.12);--shadow-float:0 18px 55px rgba(0,0,0,.48)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans','Noto Sans TC',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;line-height:1.65}button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #59a685;outline-offset:3px}button[disabled]{opacity:.4;cursor:not-allowed}svg{display:block}.app-shell{display:flex;min-height:100vh;align-items:stretch}.sidebar{width:var(--side-width);position:fixed;z-index:50;left:0;top:0;bottom:0;background:var(--paper);border-right:1px solid var(--line);padding:31px 17px 21px;display:flex;flex-direction:column;overflow-y:auto}.brand{display:flex;align-items:center;gap:13px;padding:1px 10px 34px}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#205d4d;color:#fff;position:relative;font-size:26px;font-weight:800;letter-spacing:-2px}.mark-cross{position:absolute;right:5px;top:1px;color:#d1eadd;font-size:12px;font-weight:400}.brand-copy{display:flex;flex-direction:column;line-height:1.32;letter-spacing:.04em}.brand-copy strong{font-size:19px;font-weight:800}.brand-copy small{font-size:9px;letter-spacing:1.7px;color:var(--muted);margin-top:6px}.nav-label,.eyebrow{font-size:11px;font-weight:800;letter-spacing:.17em;color:var(--muted)}.nav-label{padding:2px 18px 12px}.side-nav{display:grid;gap:5px}.side-nav .nav-item{width:100%;border:0;background:transparent;color:var(--ink-soft);text-align:left;display:flex;align-items:center;gap:12px;padding:11px 15px;border-radius:11px;font-size:13px;font-weight:600;transition:background .15s,color .15s}.nav-item svg{flex:none;width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.side-nav .nav-item:hover,.side-nav .nav-item.active{background:var(--muted-bg);color:var(--accent-text)}.nav-count{margin-left:auto;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.sidebar-bottom{margin-top:auto;padding:30px 16px 3px}.sidebar-line{display:block;height:1px;background:var(--line);margin-bottom:20px}.sidebar-bottom p{font-size:12px;color:var(--muted);line-height:1.85}.source-link{display:inline-flex;margin-top:10px;font-weight:700;font-size:12px;color:var(--brand)}.workspace{width:calc(100% - var(--side-width));margin-left:var(--side-width);min-width:0;display:flex;flex-direction:column;min-height:100vh}.topbar{height:77px;flex:none;position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(20px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(24px,4.2vw,70px)}.topbar-left,.topbar-right{display:flex;align-items:center;gap:14px;min-width:0}.top-section{color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap}.top-divider{height:17px;width:1px;background:var(--line-strong)}.top-page{font-size:12px;color:var(--ink-soft);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-btn,.theme-btn{border:1px solid transparent;background:transparent;color:var(--ink-soft);display:flex;justify-content:center;align-items:center;height:38px;border-radius:10px;gap:9px}.icon-btn{width:38px}.icon-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.icon-btn:hover,.theme-btn:hover{background:var(--muted-bg)}.theme-btn{border-color:var(--line);padding:0 13px;font-size:12px;font-weight:700;white-space:nowrap;background:var(--paper)}#theme-symbol{font-size:17px}.menu-btn{display:none}.main{width:100%;flex:1;padding:0 clamp(24px,4.2vw,70px) 65px;max-width:1920px;margin:0 auto}.site-footer{text-align:center;padding:28px 12px;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}.site-footer span{margin:0 10px}.loading-view{padding:90px;text-align:center;color:var(--muted)}.home-hero{padding:77px 0 52px;position:relative}.hero-small{font-size:12px;text-transform:uppercase;letter-spacing:.22em;color:var(--brand);font-weight:800}.home-hero h1{font-size:clamp(42px,5vw,75px);line-height:1.12;letter-spacing:-.045em;margin:18px 0 19px;font-weight:800}.home-hero h1 span{color:var(--brand)}.hero-desc{color:var(--muted);font-size:15px;line-height:2;margin:0 0 31px;max-width:580px}.global-search{display:flex;align-items:center;width:min(600px,100%);position:relative;background:var(--paper);border:1px solid var(--line-strong);border-radius:15px;box-shadow:var(--shadow);padding:0 16px}.global-search svg{width:19px;height:19px;stroke:var(--muted);fill:none;stroke-width:2;flex:none}.global-search input{background:transparent;border:0;min-width:0;width:100%;color:var(--ink);padding:17px 14px;outline:0;font-size:14px}.global-search input:focus{outline:0}.key-hint{color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:2px 7px;font-size:11px}.section-line{display:flex;align-items:end;justify-content:space-between;margin-bottom:22px;gap:20px}.section-title{font-size:22px;letter-spacing:-.03em;font-weight:800;margin:0}.section-description{color:var(--muted);font-size:12px;margin:7px 0 0}.section-count{font-size:12px;color:var(--muted);white-space:nowrap}.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.category-card{background:var(--paper);border:1px solid var(--line);border-radius:16px;display:flex;flex-direction:column;align-items:start;padding:25px 22px;min-height:168px;text-align:left;transition:transform .15s,box-shadow .2s,border-color .2s}.category-card:hover,.sheet-card:hover{transform:translateY(-3px);border-color:var(--line-strong);box-shadow:var(--shadow)}.category-icon{width:37px;height:37px;border-radius:11px;background:var(--muted-bg);display:grid;place-items:center;color:var(--accent-text);margin-bottom:19px}.category-icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.category-card strong{font-size:16px;font-weight:800;letter-spacing:-.02em}.category-card .card-footer{width:100%;display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:7px;color:var(--muted);font-size:12px}.card-arrow{font-size:20px;color:var(--brand)}.home-sheets{padding:59px 0 20px}.sheet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.sheet-card{display:flex;gap:18px;align-items:center;text-align:left;padding:19px 20px;background:var(--paper);border:1px solid var(--line);border-radius:14px;min-width:0;transition:transform .15s,border-color .2s,box-shadow .2s}.sheet-card .sheet-number{display:grid;place-items:center;flex:none;width:40px;height:45px;color:var(--muted);border-radius:11px;background:var(--muted-bg);font-size:14px;font-weight:700}.sheet-card-copy{min-width:0;flex:1}.sheet-card-copy strong{display:block;font-weight:750;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sheet-card-copy small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.sheet-card .card-arrow{font-size:19px}.page-head{padding:56px 0 32px}.back-link{border:0;background:transparent;padding:0;font-size:12px;font-weight:700;color:var(--brand);display:inline-flex;gap:8px;align-items:center}.page-head h1{font-size:clamp(27px,3vw,44px);font-weight:800;line-height:1.35;letter-spacing:-.04em;margin:17px 0 13px;overflow-wrap:anywhere}.page-subtitle{color:var(--muted);font-size:13px;margin:0}.head-meta{display:flex;flex-wrap:wrap;gap:9px;margin-top:23px}.head-chip{display:inline-flex;align-items:center;gap:7px;color:var(--ink-soft);font-size:11px;font-weight:650;border:1px solid var(--line);background:var(--paper);padding:7px 11px;border-radius:99px}.head-chip strong{font-weight:800;color:var(--brand)}.viewer-card{border:1px solid var(--line);background:var(--paper);border-radius:19px;overflow:hidden;box-shadow:var(--shadow)}.viewer-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line);background:var(--paper-2)}.viewer-toolbar .toolbar-left,.viewer-toolbar .toolbar-right{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.toolbar-hint{font-size:11px;color:var(--muted)}.tool-btn{font-size:12px;font-weight:700;border:1px solid var(--line-strong);background:var(--paper);color:var(--ink-soft);padding:8px 12px;border-radius:9px;line-height:1.25;white-space:nowrap}.tool-btn:hover,.tool-btn.selected{border-color:var(--brand);color:var(--accent-text);background:var(--muted-bg)}.tool-btn.slim{padding:7px 10px}.tool-btn.primary{background:var(--brand);color:var(--bg);border-color:var(--brand)}.small-search{border:1px solid var(--line-strong);background:var(--paper);padding:0 12px;border-radius:9px;min-width:min(270px,100%);display:flex;align-items:center}.small-search input{outline:0;border:0;background:none;color:var(--ink);font-size:12px;min-width:0;width:100%;padding:9px 0}.small-search svg{height:15px;width:15px;margin-right:8px;stroke:var(--muted);stroke-width:2;fill:none}.viewer-caption{padding:13px 19px;color:var(--muted);font-size:11px;border-top:1px solid var(--line);background:var(--paper-2)}.viewer-help{color:var(--muted);font-size:12px;line-height:1.8;margin:14px 2px 0}.table-scroll{max-height:67vh;overflow:auto;overscroll-behavior:contain}.data-table{border-collapse:separate;border-spacing:0;table-layout:auto;width:max-content;min-width:100%;font-size:12px;line-height:1.7}.data-table thead{position:sticky;top:0;z-index:5}.data-table th{padding:13px 14px;text-align:left;min-width:95px;max-width:350px;white-space:pre-wrap;background:var(--muted-bg);border-right:1px solid var(--line);border-bottom:1px solid var(--line-strong);font-weight:800;color:var(--ink-soft);vertical-align:middle}.data-table th .header-secondary{display:block;font-weight:500;font-size:10px;color:var(--muted)}.data-table td{padding:12px 14px;max-width:410px;min-width:75px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);vertical-align:top;white-space:pre-line;overflow-wrap:anywhere}.data-table tr:nth-child(even) td{background:var(--paper-2)}.data-table td:first-child,.data-table th:first-child{position:sticky;left:0;z-index:2;background:var(--paper);box-shadow:2px 0 0 var(--line)}.data-table th:first-child{z-index:6;background:var(--muted-bg)}.data-table tr:nth-child(even) td:first-child{background:var(--paper-2)}.data-table tr:hover td,.data-table tr:hover td:first-child{background:var(--muted-bg)}.data-table td.has-note{cursor:pointer}.data-table td.has-note:after{content:'●';color:var(--brand);font-size:8px;vertical-align:top;margin-left:5px}.data-table td.is-target{outline:3px solid #c09b5c;outline-offset:-3px;background:#fff4cf!important;color:#3c3424}.data-table a{color:var(--brand);text-decoration:underline;text-underline-offset:3px}.table-cards{padding:14px;display:grid;gap:12px}.record-card{border:1px solid var(--line);background:var(--paper);border-radius:14px;padding:17px 17px 14px}.record-top{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:11px;margin-bottom:12px;gap:8px}.record-top strong{font-size:14px}.record-no{font-size:11px;color:var(--muted)}.record-row{display:grid;grid-template-columns:108px 1fr;gap:12px;margin:9px 0;align-items:start}.record-key{font-size:11px;color:var(--muted);font-weight:700}.record-value{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.record-value.link{color:var(--brand);font-weight:700;text-decoration:underline;text-underline-offset:3px}.record-card.is-target{box-shadow:inset 0 0 0 2px #bf9456}.load-more{width:calc(100% - 28px);display:block;margin:10px 14px 16px;border:1px solid var(--line);border-radius:11px;background:var(--paper-2);color:var(--ink-soft);padding:13px;font-weight:800;font-size:12px}.load-more:hover{background:var(--muted-bg)}.empty-state{padding:64px 25px;text-align:center;color:var(--muted);font-size:14px}.board-viewport{height:clamp(480px,69vh,840px);overflow:auto;position:relative;overscroll-behavior:contain;background:radial-gradient(circle at 1px 1px,var(--line) .8px,transparent 1px);background-size:20px 20px}.board-stage{position:relative;transform-origin:top left;will-change:transform}.board-background{position:absolute;inset:0;background-repeat:no-repeat;background-position:top left;background-size:100% 100%;opacity:.48;pointer-events:none}.board-node{position:absolute;display:flex;align-items:center;justify-content:center;min-width:0;padding:1px 3px;border:1px solid transparent;border-radius:4px;background:var(--paper);color:var(--ink-soft);font-weight:650;font-size:12px;line-height:1.22;white-space:pre-wrap;overflow:hidden;text-align:center;overflow-wrap:anywhere;user-select:text}.board-node.label-node{font-weight:800;background:var(--muted-bg);color:var(--ink-soft);font-size:11px}.board-node.english-node{font-weight:450;font-size:11px;color:var(--muted);background:transparent}.board-node.link-node{color:var(--accent-text);background:var(--accent);font-weight:800;border-color:color-mix(in srgb,var(--brand) 30%,transparent);cursor:pointer;box-shadow:0 2px 5px rgba(0,0,0,.04)}.board-node.note-node{border-bottom:2px dotted var(--brand);cursor:pointer}.board-node:hover{z-index:6;border-color:var(--brand);box-shadow:0 3px 14px rgba(0,0,0,.12);overflow:visible;min-height:24px;height:auto!important}.board-node.is-target{z-index:10;outline:4px solid #e1af65;outline-offset:3px;background:#ffedc9;color:#443621}.board-explainer{font-size:12px;color:var(--muted);line-height:1.8;padding:17px 20px;background:var(--paper-2);border-top:1px solid var(--line)}:root[data-theme="dark"] .board-background{filter:grayscale(.5) brightness(1.6);opacity:.42}.list-nodes{display:grid;gap:12px;padding:15px}.node-item{background:var(--paper-2);border:1px solid var(--line);border-radius:13px;padding:15px;display:flex;flex-direction:column;gap:7px}.node-item .node-meta{font-size:10px;color:var(--muted);letter-spacing:.02em}.node-item .node-text{font-size:15px;font-weight:750;overflow-wrap:anywhere;white-space:pre-wrap}.node-item .node-sub{font-size:12px;color:var(--ink-soft);white-space:pre-wrap;overflow-wrap:anywhere}.node-item .node-action{align-self:flex-start;border:0;background:var(--muted-bg);color:var(--accent-text);font-weight:800;font-size:11px;border-radius:7px;padding:7px 11px;margin-top:3px}.node-item.is-target{outline:2px solid #d3a666}.image-gallery{padding:22px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}.image-tile{margin:0;background:#fff;border:1px solid #ebeee8;border-radius:14px;overflow:hidden;min-width:0;color:#263b33}.image-tile figure{margin:0}.image-tile img{display:block;width:100%;height:auto;max-height:740px;object-fit:contain;cursor:zoom-in}.image-caption{padding:15px 17px;font-size:12px;font-weight:700;border-top:1px solid #e6e9e5;white-space:pre-wrap}.image-caption small{display:block;color:#708177;font-size:11px;font-weight:500;margin-top:5px}.viewer-caption a{color:var(--brand);text-decoration:underline}.image-text-list{display:grid;gap:8px;padding:20px;background:var(--paper-2);border-top:1px solid var(--line)}.image-text-list p{font-size:12px;margin:0;white-space:pre-wrap}.sheet-bottom-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:26px}.sheet-bottom-nav button{border:1px solid var(--line);padding:12px 15px;background:var(--paper);font-size:12px;font-weight:700;color:var(--ink-soft);border-radius:10px;max-width:47%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-intro{padding:43px 0 25px}.results-intro h1{font-size:clamp(25px,3vw,40px);letter-spacing:-.03em;margin:12px 0 8px}.results-intro p{font-size:12px;color:var(--muted)}.search-result-list{display:grid;gap:11px}.result-card{width:100%;text-align:left;display:block;border:1px solid var(--line);border-radius:14px;background:var(--paper);padding:17px 20px}.result-card:hover{border-color:var(--brand)}.result-card .result-meta{font-size:11px;color:var(--brand);font-weight:800;display:flex;align-items:center;gap:10px}.result-card .result-meta span{color:var(--muted);font-weight:500}.result-card .result-content{font-size:13px;line-height:1.8;color:var(--ink-soft);margin-top:6px;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.result-card mark{color:var(--accent-text);background:var(--accent);border-radius:3px}.search-form-row{display:flex;gap:8px}.search-form-row .global-search{flex:1}.search-submit{border:0;background:var(--brand);color:var(--bg);border-radius:12px;padding:0 24px;font-weight:800}.modal-backdrop{position:fixed;inset:0;z-index:130;background:rgba(7,21,15,.62);display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(4px)}.modal{width:min(650px,100%);max-height:88vh;overflow:auto;background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-float)}.modal-head{padding:19px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.modal-head strong{font-size:18px}.modal-body{padding:23px 24px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.modal .meta{font-size:11px;color:var(--muted);margin-bottom:13px}.modal .comment-label{font-size:11px;font-weight:800;color:var(--brand);margin:20px 0 7px}.modal .comment-box{padding:15px;background:var(--muted-bg);border-radius:9px;white-space:pre-wrap}.modal-close{border:0;background:var(--muted-bg);border-radius:9px;width:35px;height:35px;font-size:21px;color:var(--ink)}.image-modal{width:min(1200px,100%)}.image-modal img{display:block;width:100%;height:auto;max-height:76vh;object-fit:contain;background:white}.toast{position:fixed;right:20px;bottom:20px;z-index:180;pointer-events:none;background:var(--ink);color:var(--paper);padding:10px 17px;border-radius:10px;box-shadow:var(--shadow-float);font-size:12px;opacity:0;transform:translateY(8px);transition:opacity .2s,transform .2s}.toast.visible{opacity:1;transform:translateY(0)}.mobile-scrim{display:none}.muted{color:var(--muted)}.hidden{display:none!important}
@media(min-width:1500px){.main{padding-left:80px;padding-right:80px}.home-hero{padding-top:100px}.category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1200px){:root{--side-width:225px}.sidebar{padding-left:10px;padding-right:10px}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-hero{padding-top:60px}.main{padding-left:32px;padding-right:32px}.topbar{padding-left:32px;padding-right:32px}.board-viewport{height:70vh}}
@media(max-width:900px){:root{--side-width:0px}.sidebar{transform:translateX(-102%);transition:transform .25s ease;width:275px;box-shadow:var(--shadow-float)}.sidebar.open{transform:translateX(0)}.mobile-scrim.show{display:block;position:fixed;inset:0;background:rgba(5,17,11,.38);z-index:40}.workspace{width:100%;margin-left:0}.menu-btn{display:flex}.topbar{height:66px}.main{padding:0 24px 55px}.topbar{padding:0 24px}.page-head{padding-top:41px}.image-gallery{gap:12px;padding:13px}.record-row{grid-template-columns:100px 1fr}}
@media(max-width:650px){.main{padding:0 16px 42px}.topbar{padding:0 14px;gap:7px}.topbar-left{gap:8px}.topbar-right{gap:5px}.top-section{display:none}.top-divider{display:none}.theme-btn{padding:0 10px}.theme-btn #theme-label{display:none}.top-page{font-size:12px}.home-hero{padding:48px 0 37px}.home-hero h1{font-size:43px}.hero-desc{font-size:13px;line-height:1.9}.global-search input{padding:14px 10px}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.category-card{padding:18px 14px;min-height:145px;border-radius:13px}.category-icon{width:32px;height:32px;margin-bottom:11px}.category-card strong{font-size:14px}.card-footer{font-size:11px!important}.home-sheets{padding-top:41px}.section-title{font-size:18px}.sheet-grid{grid-template-columns:1fr;gap:9px}.sheet-card{padding:13px 15px;gap:13px}.page-head{padding:35px 0 23px}.page-head h1{font-size:28px}.viewer-toolbar{padding:12px;gap:10px}.viewer-toolbar .toolbar-left,.viewer-toolbar .toolbar-right{gap:6px}.toolbar-hint{display:none}.small-search{width:100%;min-width:0}.viewer-toolbar .small-search{order:3;flex-basis:100%}.head-meta{gap:7px}.head-chip{font-size:10px}.viewer-help{font-size:11px}.board-viewport{height:66vh}.board-explainer{padding:12px 14px;font-size:11px}.image-gallery{grid-template-columns:1fr;padding:12px}.image-tile img{max-height:80vh}.record-card{padding:14px}.record-row{grid-template-columns:91px 1fr;gap:10px}.record-value{font-size:12px}.site-footer{font-size:10px;padding:21px 15px}.site-footer span{margin:0 4px}.section-line{align-items:center}.section-count{font-size:10px}.search-submit{padding:0 16px}.modal-backdrop{padding:10px}.modal-head{padding:15px}.modal-body{padding:18px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Text from row 1 of each original workbook table, shown separately from the new page heading. */
.table-intro{display:flex;flex-wrap:wrap;gap:8px;padding:13px 16px;background:var(--paper);border-bottom:1px solid var(--line)}
.table-intro-item{display:flex;align-items:center;gap:10px;flex:1 1 165px;min-width:0;background:var(--paper-2);border:1px solid var(--line);border-radius:10px;padding:9px 11px;font-size:11px;color:var(--ink-soft);white-space:pre-wrap;overflow-wrap:anywhere}
.table-intro-item .source-key{font-size:10px;color:var(--muted);font-weight:800;flex:none}
.table-intro-item>div{min-width:0;flex:1}
@media(max-width:650px){.table-intro{padding:11px;gap:7px}.table-intro-item{flex-basis:100%}}

/* --- v2 sidebar + genealogy refinements --- */
.sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 10px 12px 18px}
.sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid var(--line);border-radius:10px;background:var(--paper-2);color:var(--ink-soft);flex:none}
.sidebar-toggle:hover{background:var(--muted-bg);color:var(--accent-text)}
.sidebar-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s ease}
.sidebar-toggle.collapsed svg{transform:rotate(180deg)}
.nav-group{display:grid;gap:5px}
.nav-group+.nav-group{margin-top:14px}
.nav-group-title{padding:4px 16px 6px;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.18em;text-transform:uppercase}
.nav-pill{margin-left:auto;font-size:10px;font-weight:800;padding:4px 7px;border-radius:999px;background:color-mix(in srgb,var(--accent) 72%, transparent);color:var(--accent-text)}
.quick-item{background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 55%, transparent),transparent)}
.quick-item.active .nav-pill,.quick-item:hover .nav-pill{background:var(--brand);color:var(--bg)}
.app-shell.sidebar-collapsed .sidebar{width:88px;padding-left:10px;padding-right:10px;overflow-x:hidden}
.app-shell.sidebar-collapsed .workspace{margin-left:88px;width:calc(100% - 88px)}
.app-shell.sidebar-collapsed .brand{justify-content:center;padding-left:0;padding-right:0}
.app-shell.sidebar-collapsed .brand-copy,.app-shell.sidebar-collapsed .nav-label,.app-shell.sidebar-collapsed .nav-group-title,.app-shell.sidebar-collapsed .nav-item span,.app-shell.sidebar-collapsed .nav-count,.app-shell.sidebar-collapsed .nav-pill,.app-shell.sidebar-collapsed .sidebar-bottom{display:none!important}
.app-shell.sidebar-collapsed .sidebar-head{justify-content:center;padding-left:0;padding-right:0}
.app-shell.sidebar-collapsed .side-nav{justify-items:center}
.app-shell.sidebar-collapsed .side-nav .nav-item{width:48px;height:48px;padding:0;justify-content:center;border-radius:14px}
.app-shell.sidebar-collapsed .side-nav .nav-item svg{width:20px;height:20px}
.app-shell.sidebar-collapsed .sidebar-toggle{margin-top:2px}
.genealogy-showcase{overflow:visible}
.genealogy-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:24px 22px 20px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 68%,transparent),transparent 60%);border-bottom:1px solid var(--line)}
.genealogy-kicker{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--brand);margin-bottom:8px}
.genealogy-hero h2{margin:0 0 8px;font-size:30px;line-height:1.1;letter-spacing:-.04em}
.genealogy-hero p{margin:0;color:var(--muted);font-size:13px;line-height:1.8;max-width:720px}
.genealogy-hero-meta{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.genealogy-hero-meta span{display:inline-flex;align-items:center;padding:8px 11px;border-radius:999px;background:var(--paper);border:1px solid var(--line);font-size:11px;font-weight:700;color:var(--ink-soft)}
.genealogy-showcase .viewer-toolbar{border-top-left-radius:18px;border-top-right-radius:18px}
.genealogy-viewport{height:auto!important;min-height:640px;overflow-x:auto!important;overflow-y:visible!important;padding-bottom:18px;background:linear-gradient(180deg,color-mix(in srgb,var(--paper-2) 80%, transparent),transparent 160px),radial-gradient(circle at 1px 1px,var(--line) .75px,transparent 1px)!important;background-size:auto,22px 22px}
.genealogy-showcase .board-background{opacity:.18}
.genealogy-showcase .board-node{border:1px solid color-mix(in srgb,var(--line-strong) 72%, transparent);border-radius:12px;padding:6px 8px;background:color-mix(in srgb,var(--paper) 90%, transparent);backdrop-filter:blur(4px);box-shadow:0 10px 25px rgba(13,31,24,.06);font-size:12px;line-height:1.25}
.genealogy-showcase .board-node.label-node{border-radius:999px;padding:4px 10px;background:var(--muted-bg);font-size:10px;letter-spacing:.04em;text-transform:none}
.genealogy-showcase .board-node.link-node{background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 88%, transparent),color-mix(in srgb,var(--paper) 20%, transparent));border-color:color-mix(in srgb,var(--brand) 40%, transparent);color:#0b5846}
.genealogy-showcase .board-node.note-node{border-bottom:1px solid color-mix(in srgb,var(--brand) 42%, transparent)}
.genealogy-showcase .board-node:hover{transform:translateY(-1px)}
.genealogy-showcase .board-node.is-target{background:#fff3dd;border-color:#d9a55c;outline:3px solid rgba(217,165,92,.26);outline-offset:2px}
.genealogy-showcase .list-nodes{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px}
.genealogy-showcase .node-item{padding:18px;border-radius:16px;background:linear-gradient(180deg,var(--paper),var(--paper-2));box-shadow:var(--shadow)}
.genealogy-showcase .node-item .node-text{font-size:17px;line-height:1.45}
.genealogy-showcase .node-item .node-action{border-radius:999px;padding:8px 12px}
@media(max-width:1200px){.genealogy-showcase .list-nodes{grid-template-columns:1fr}}
@media(max-width:900px){.sidebar-toggle{display:none}.genealogy-hero{padding:18px 18px 16px;flex-direction:column}.genealogy-viewport{min-height:520px}}
@media(max-width:650px){.genealogy-hero h2{font-size:26px}.genealogy-hero p{font-size:12px}.genealogy-showcase .list-nodes{padding:12px;gap:10px}.genealogy-showcase .node-item .node-text{font-size:15px}.genealogy-viewport{min-height:460px}}

/* ═══════════════════════════════════════════════════════════════════════
   V3: full-page genealogy atlas.  The graph itself uses the original Excel
   cell geometry + exported connector lines; the new styling is presentation.
   ═══════════════════════════════════════════════════════════════════════ */
.topbar-ghost{display:none}
.sidebar{z-index:90}
.sidebar-bottom{padding:16px 2px 0;margin-top:auto}
.sidebar-bottom .side-section-title{padding-left:12px}
.side-section-title{color:var(--muted);font-weight:800;font-size:10px;letter-spacing:.14em;margin:6px 4px 9px}
.side-tool-divider{height:1px;background:var(--line);margin:12px 6px}
.genealogy-tools{display:grid;gap:4px;padding:18px 0 0;margin-top:16px;border-top:1px solid var(--line)}
.side-zoom-tools{display:grid;gap:3px}
.side-tool{display:flex;align-items:center;gap:12px;border:0;border-radius:12px;background:transparent;color:var(--ink-soft);width:100%;padding:10px 13px;text-align:left;font-size:12px;min-height:40px;font-weight:700;white-space:nowrap;transition:background .14s,color .14s}
.side-tool svg{flex:none;width:18px;height:18px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.side-tool:hover,.side-tool.active{background:var(--muted-bg);color:var(--accent-text)}
.side-tool.active{font-weight:800}
.side-tool span:not(.theme-side-symbol){overflow:hidden;text-overflow:ellipsis}
.theme-side-symbol{width:18px;height:18px;display:grid;place-items:center;font-size:19px;flex:none}
.mobile-menu-fab{display:none}
/* Every persistent control lives in the left navigation rail. */
.app-shell.sidebar-collapsed .genealogy-tools{margin-top:8px;padding-top:10px}
.app-shell.sidebar-collapsed .side-section-title,.app-shell.sidebar-collapsed .side-tool span:not(.theme-side-symbol),.app-shell.sidebar-collapsed .side-tool-divider{display:none!important}
.app-shell.sidebar-collapsed .side-tool{width:48px;height:44px;min-height:44px;justify-content:center;padding:0;gap:0;margin:0 auto}
.app-shell.sidebar-collapsed .sidebar-bottom{padding:10px 0 0;margin-top:auto;display:grid!important;gap:3px;border-top:1px solid var(--line)}
.app-shell.sidebar-collapsed .sidebar-bottom .side-section-title{display:none}
.app-shell.sidebar-collapsed .sidebar-bottom .side-tool{display:flex}
/* Page canvas, rather than a nested scrolling card: normal browser scrollbars. */
.app-shell.genealogy-page{width:max-content;min-width:100%;align-items:stretch}
.app-shell.genealogy-page .workspace{width:max-content;min-width:calc(100vw - var(--side-width));max-width:none;flex:0 0 auto;margin-left:var(--side-width);overflow:visible}
.app-shell.genealogy-page .main{max-width:none;margin:0;width:max-content;min-width:calc(100vw - var(--side-width));padding:0 0 16px;overflow:visible;flex:1 1 auto}
.app-shell.genealogy-page .site-footer{display:none}
.app-shell.genealogy-page .family-document-head{display:flex;align-items:center;gap:18px;padding:23px 32px 18px;min-height:94px;min-width:calc(100vw - var(--side-width));width:max-content;max-width:100vw}
.family-document-kicker{font-size:10px;font-weight:800;letter-spacing:.16em;color:var(--brand);white-space:nowrap}
.family-document-head h1{margin:0;font-size:clamp(19px,2.1vw,29px);color:var(--ink);line-height:1.3;white-space:nowrap}
.family-document-head p{color:var(--muted);font-size:11px;margin:0;white-space:nowrap}
.app-shell.genealogy-page .genealogy-canvas{width:max-content;min-width:calc(100vw - var(--side-width));border:0;border-radius:0;box-shadow:none;background:transparent;overflow:visible}
.app-shell.genealogy-page #board-content{width:max-content;min-width:calc(100vw - var(--side-width));overflow:visible}
.app-shell.genealogy-page .board-viewport{width:max-content!important;height:auto!important;min-height:0!important;overflow:visible!important;overscroll-behavior:auto!important;padding:0!important;border:0!important;background:none!important}
.app-shell.genealogy-page .board-sizer{overflow:visible!important}
.app-shell.genealogy-page .board-background{opacity:.70;filter:none;background-position:top left;background-size:100% 100%;}
:root[data-theme="dark"] .app-shell.genealogy-page .board-background{opacity:.47;filter:saturate(.65) brightness(1.15)}
.app-shell.genealogy-page .genealogy-endnote{width:min(100vw,900px);padding:22px 32px 45px;color:var(--muted);font-size:11px}
/* Reframe original worksheet cell-color associations as soft genealogy colors. */
.app-shell.genealogy-page .board-node.family-node{--tone-bg:transparent;--tone-border:transparent;--tone-ink:var(--ink-soft);background:var(--tone-bg);border:1px solid var(--tone-border);border-radius:5px;box-shadow:none;color:var(--tone-ink);padding:1px 3px;font-size:11px;font-weight:650;letter-spacing:-.01em;overflow:hidden;white-space:pre-wrap;line-height:1.15;text-overflow:clip;transition:box-shadow .12s ease,background .12s ease;border-color .12s ease;}
.app-shell.genealogy-page .board-node.tone-gold{--tone-bg:#f5e6ab;--tone-border:#dfc970;--tone-ink:#66521f}
.app-shell.genealogy-page .board-node.tone-rose{--tone-bg:#f4cbcb;--tone-border:#dc9d9b;--tone-ink:#803e44}
.app-shell.genealogy-page .board-node.tone-blue{--tone-bg:#cde4f0;--tone-border:#96c0d5;--tone-ink:#28556b}
.app-shell.genealogy-page .board-node.tone-violet{--tone-bg:#e4d8ed;--tone-border:#c2a8d5;--tone-ink:#5a3e70}
.app-shell.genealogy-page .board-node.tone-mint{--tone-bg:#d5eadc;--tone-border:#abcab6;--tone-ink:#36594a}
.app-shell.genealogy-page .board-node.label-node.family-node{font-weight:800;background:color-mix(in srgb,var(--tone-bg) 80%,var(--paper));font-size:10px;letter-spacing:0;border-radius:4px;}
.app-shell.genealogy-page .board-node.english-node.family-node{font-size:10px;font-weight:500;color:var(--tone-ink)}
.app-shell.genealogy-page .board-node.link-node.family-node{border:1.3px solid #468e76;cursor:pointer;box-shadow:inset 0 -2px 0 rgba(38,119,89,.28);font-weight:800}
.app-shell.genealogy-page .board-node.note-node.family-node{border-bottom:1.5px dashed #669b88;cursor:pointer}
.app-shell.genealogy-page .board-node.family-node:hover{z-index:30;background:var(--paper)!important;border:1px solid var(--brand);border-radius:7px;box-shadow:0 7px 25px rgba(10,30,25,.17);overflow:visible;height:auto!important;min-height:22px;max-width:320px;width:max-content!important;min-width:70px;white-space:pre-wrap;padding:6px 8px;font-size:12px;color:var(--ink)}
.app-shell.genealogy-page .board-node.is-target{outline:3px solid #e5b55e;outline-offset:2px;background:#fff0c8!important;color:#66421f}
:root[data-theme="dark"] .app-shell.genealogy-page .board-node.tone-gold{--tone-bg:#594e2f;--tone-border:#8b7947;--tone-ink:#f5e7b8}
:root[data-theme="dark"] .app-shell.genealogy-page .board-node.tone-rose{--tone-bg:#613d40;--tone-border:#916368;--tone-ink:#f5d3d4}
:root[data-theme="dark"] .app-shell.genealogy-page .board-node.tone-blue{--tone-bg:#274451;--tone-border:#457183;--tone-ink:#d6e9f2}
:root[data-theme="dark"] .app-shell.genealogy-page .board-node.tone-violet{--tone-bg:#4b3c5b;--tone-border:#705b8d;--tone-ink:#e8d9ee}
:root[data-theme="dark"] .app-shell.genealogy-page .board-node.tone-mint{--tone-bg:#294a3b;--tone-border:#497660;--tone-ink:#d5eedc}
:root[data-theme="dark"] .app-shell.genealogy-page .board-node.tone-plain{--tone-bg:transparent;--tone-border:transparent;--tone-ink:var(--ink-soft)}
/* The list mode is also document-flow, with no nested scroller. */
.app-shell.genealogy-page:has(.list-nodes) .main{width:auto;min-width:calc(100vw - var(--side-width))}
.app-shell.genealogy-page:has(.list-nodes) #board-content{width:auto;min-width:calc(100vw - var(--side-width))}
.app-shell.genealogy-page .list-nodes{width:calc(100vw - var(--side-width));max-width:1220px;min-width:350px;padding:26px 34px;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:13px}
.app-shell.genealogy-page .node-item{background:var(--paper);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);padding:17px}
.app-shell.genealogy-page .node-item .node-text{font-size:15px}
/* Free screen width when rail is collapsed */
.app-shell.sidebar-collapsed.genealogy-page .workspace{margin-left:88px;min-width:calc(100vw - 88px)}
.app-shell.sidebar-collapsed.genealogy-page .main,.app-shell.sidebar-collapsed.genealogy-page .genealogy-canvas,.app-shell.sidebar-collapsed.genealogy-page #board-content{min-width:calc(100vw - 88px)}
.app-shell.sidebar-collapsed.genealogy-page .family-document-head{min-width:calc(100vw - 88px)}
.app-shell.sidebar-collapsed.genealogy-page .list-nodes{width:calc(100vw - 88px)}
@media(max-width:900px){
 .mobile-menu-fab{display:grid;place-items:center;position:fixed;z-index:75;top:12px;left:12px;width:42px;height:42px;border-radius:13px;background:var(--paper);border:1px solid var(--line-strong);box-shadow:var(--shadow-float);color:var(--ink)}
 .mobile-menu-fab svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
 .app-shell.genealogy-page .workspace{margin-left:0;min-width:100vw}
 .app-shell.genealogy-page .main,.app-shell.genealogy-page .genealogy-canvas,.app-shell.genealogy-page #board-content{min-width:100vw}
 .app-shell.genealogy-page .family-document-head{min-width:100vw;padding:18px 18px 16px 70px;gap:8px;flex-wrap:wrap}
 .app-shell.genealogy-page .family-document-head h1{font-size:21px}
 .app-shell.genealogy-page .family-document-head p{width:100%;font-size:10px;white-space:normal}
 .app-shell.genealogy-page .genealogy-endnote{padding:15px 18px 38px}
 .app-shell.genealogy-page .list-nodes{width:100vw;max-width:100vw;min-width:0;grid-template-columns:1fr;padding:14px}
 .sidebar.open{width:min(300px,90vw)}
 .app-shell .sidebar-bottom{margin-top:auto}
}

/* Keep the frequently used genealogy commands visible; let categories scroll in the rail. */
.app-shell.genealogy-page .sidebar{overflow-y:hidden}
.app-shell.genealogy-page #side-quick{flex:0 0 auto}
.app-shell.genealogy-page .genealogy-tools{flex:0 0 auto;margin-top:8px;padding:10px 0 10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.app-shell.genealogy-page #side-nav{flex:1 1 auto;min-height:95px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;padding-top:10px}
.app-shell.genealogy-page .sidebar-bottom{flex:0 0 auto;margin-top:6px}
.app-shell.genealogy-page .board-background{filter:saturate(.62)}
:root[data-theme="dark"] .app-shell.genealogy-page .board-background{filter:saturate(.48) brightness(1.2)}
@media(max-width:900px){
 .app-shell.genealogy-page .sidebar{overflow-y:auto}
 .app-shell.genealogy-page #side-nav{min-height:80px;overflow-y:auto}
}

.app-shell.genealogy-page .genealogy-viewport{cursor:grab}
.app-shell.genealogy-page .genealogy-viewport.is-dragging{cursor:grabbing;user-select:none}
