/* TeaHubery house reader palette, adapted to a compact dictionary.
   Sources: website wrap-tp-theme-modumatics.css and modumatics collection chrome.
   System font stacks preserve lexical forms; data/graph semantics are unchanged. */
:root{color-scheme:light;--paper:#fbf6ec;--white:#fff;--ink:#322d27;--muted:#574f45;--line:#e2dcd2;--green:#800000;--tint:#f4efe6;font-family:"Segoe UI",Arial,sans-serif;font-size:14px;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}a{color:var(--green);text-underline-offset:2px}p{line-height:1.55;margin:0 0 10px}h1,h2,h3,h4{margin:0;line-height:1.3}button{touch-action:manipulation}.skip-link{position:absolute;top:-60px;left:10px;padding:10px;background:white;z-index:10}.skip-link:focus{top:5px}
.masthead{height:51px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:var(--white);border-bottom:1px solid var(--line)}.brand h1{font-size:19px;font-weight:600;letter-spacing:0}.load-tools{display:flex;align-items:center;gap:14px;font-size:12px;color:var(--muted)}.quiet-button{border:1px solid var(--line);border-radius:4px;padding:5px 10px;background:var(--white)}.quiet-button:hover{background:var(--tint)}
.workspace{display:grid;grid-template-columns:220px minmax(0,1fr);max-width:1440px;margin:auto;min-height:calc(100vh - 51px)}.sidebar{padding:16px 14px;border-right:1px solid var(--line);align-self:start;position:sticky;top:0;max-height:100vh;overflow:auto;display:grid;gap:11px}.search-label{font-size:12px;font-weight:600}.sidebar input{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:4px;background:var(--white)}.filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}.filters label{font-size:11px;color:var(--muted);display:grid;gap:4px}.filters select{width:100%;max-width:100%;font-size:11px;padding:6px 2px;border:1px solid var(--line);border-radius:3px;background:var(--white)}.result-count{font-size:11px;color:var(--muted);margin:0}#entries{display:grid;gap:3px}.entry-link{border:0;border-radius:4px;background:transparent;text-align:left;padding:7px 8px;width:100%}.entry-link:hover{background:var(--tint)}.entry-link[aria-current="page"]{background:var(--green);color:white}.entry-link .word{display:block;font-size:14px;font-weight:600;overflow-wrap:anywhere}.entry-link .hint{display:block;color:var(--muted);font-size:11px;line-height:1.4;margin-top:3px}.entry-link[aria-current="page"] .hint{color:#fbf6ec}.kind-link{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:7px 9px}.kind-link .word{font-size:12px;font-weight:500}.kind-count{font-size:11px;opacity:.7}.sidebar-footer{border-top:1px solid var(--line);margin-top:12px;padding-top:12px;font-size:11px}.no-results,.muted{color:var(--muted);font-size:12px}
main{min-width:0;padding:20px 3% 32px;outline:none}.entry-head{margin-bottom:16px}.headword{font-family:"Segoe UI",Arial,sans-serif;font-size:32px;font-weight:650;line-height:1.3;letter-spacing:normal;word-break:normal;overflow-wrap:anywhere;font-kerning:normal;font-variant-ligatures:none}.long-headword{font-size:28px;line-height:1.45}.language-row{margin:4px 0 9px;display:flex;gap:10px}.language-label{border:0;background:none;padding:0;color:var(--muted);font-size:13px;font-style:italic}.language-label:hover{text-decoration:underline}.gloss{font-size:16px;line-height:1.6;margin:7px 0 0}.sense-number{font-size:13px;font-weight:600;margin-right:7px;color:var(--muted)}.tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-bottom:14px}.tab{border:0;border-bottom:2px solid transparent;background:none;padding:8px 0;font-size:12px;color:var(--muted)}.tab[aria-selected="true"]{color:var(--green);border-bottom-color:var(--green);font-weight:600}.section{margin-bottom:16px}.section h3{font-size:13px;font-weight:650;margin-bottom:8px}.word-link{border:0;background:none;padding:0;color:var(--green);font:inherit;text-align:left;line-height:inherit;overflow-wrap:anywhere;text-decoration:underline;text-decoration-color:rgba(128,0,0,.28);text-underline-offset:3px}.word-link:hover{text-decoration-color:var(--green)}.citation{border:0;background:none;padding:0 0 0 5px;font-size:10px;color:var(--green);vertical-align:super;white-space:nowrap}.etymology-step{padding:6px 0;max-width:800px}.etymology-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:10px;font-size:15px}.etymology-line small{font-size:11px;color:var(--muted);margin-left:6px}.origin-arrow{color:var(--green);font-size:16px}.entry-notes{font-size:12px;line-height:1.65;color:var(--muted);margin-top:3px}.note{display:inline}.note+.note:before{content:" · ";white-space:pre}.inline-words{display:flex;flex-wrap:wrap;gap:15px}.related-line{font-size:13px;line-height:1.7;margin-bottom:7px}.relation-phrase{color:var(--muted)}.context-details{font-size:12px;margin-top:5px}.context-details summary{cursor:pointer;color:var(--green)}.context-details p{margin-top:5px;margin-bottom:5px}.relationship-table{width:100%;border-collapse:collapse;font-size:13px}.relationship-table th{font-size:11px;font-weight:500;text-align:left;color:var(--muted);padding:0 10px 7px}.relationship-table td{padding:9px 10px;border-top:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}.relationship-table td:first-child{width:40%}.relationship-table .table-arrow{width:24px;color:var(--green)}.relationship-table .citation{vertical-align:baseline}.relationship-table td:last-child{width:28px}.relationship-table .entry-notes{font-size:11px}
.source-card{padding:0 0 18px;margin-bottom:18px;border-bottom:1px solid var(--line)}.source-card h3{font-size:13px;margin-bottom:10px}.source-card h3 button,.source-reference-list button{border:0;background:none;padding:0;color:var(--green);font:inherit;text-align:left;cursor:pointer}.source-original{font-size:14px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px;max-width:950px}.source-passage{background:#ece0c8;color:inherit;padding:1px 0}.source-passage.is-focused{background:#f3e3e3}.source-card details{font-size:12px;margin-top:9px}.source-card summary{color:var(--green);cursor:pointer}.source-full{font-size:13px;line-height:1.75;margin-top:10px;white-space:pre-wrap;overflow-wrap:anywhere}.source-reference-list{padding-left:18px;line-height:1.6}.source-reference-list li{margin:7px 0}.source-reference.is-focused{border-left:2px solid var(--green);padding-left:7px}.source-positions{display:block;color:var(--muted);font-size:10px}.source-identity{color:var(--muted);font-size:10px;overflow-wrap:anywhere}.source-unavailable{color:#7a4514}.data-toolbar{display:flex;justify-content:flex-end;margin-bottom:8px}.json-block{font:11px/1.6 Consolas,monospace;background:var(--tint);border:1px solid var(--line);padding:14px;border-radius:4px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto}.record-details{font-size:11px;color:var(--muted);margin-top:14px}.record-details summary{cursor:pointer}.record-details dl{display:grid;grid-template-columns:65px minmax(0,1fr);gap:7px}.record-details dd{margin:0;overflow-wrap:anywhere}.empty-state{padding:25px 0;color:var(--muted)}.notice{background:#f6f1e3;padding:8px 25px;color:#6f5418;font-size:12px}.notice[hidden]{display:none}
.dictionary-graph-controls{gap:9px!important;margin-bottom:12px;font-size:11px}.dictionary-graph-controls label{display:flex;gap:5px;align-items:center}.dictionary-graph-controls select,.dictionary-graph-controls button{border:1px solid var(--line);border-radius:4px;background:var(--white);padding:5px 7px;font-size:11px;max-width:160px}.dictionary-graph-canvas{border-radius:6px;overflow:hidden}.dictionary-graph-legend,.dictionary-graph-status{font-size:10px;color:var(--muted);margin-top:7px;margin-bottom:0}.dictionary-graph canvas{display:block}
@media(min-width:1500px){main{padding-left:5%;padding-right:5%}}
@media(max-width:850px){.workspace{grid-template-columns:220px minmax(0,1fr)}main{padding:24px}.sidebar{padding:20px 14px}.headword{font-size:34px}.long-headword{font-size:28px}}
@media(max-width:620px){.masthead{height:50px;padding:0 16px}.brand h1{font-size:17px}.load-tools{gap:9px;font-size:10px}.workspace{display:block}.sidebar{position:static;max-height:none;border-right:0;border-bottom:1px solid var(--line);padding:14px 16px;gap:8px}.sidebar input{padding:7px 9px}.sidebar-footer{display:none}#entries{max-height:125px;overflow:auto;grid-template-columns:repeat(2,minmax(0,1fr))}.entry-link{padding:7px 8px}.entry-link .word{font-size:13px}.entry-link .hint{font-size:10px}.kind-link .word{font-size:11px}.kind-link{padding:7px}.result-count{font-size:10px}main{padding:20px 16px 32px}.headword{font-size:32px}.long-headword{font-size:27px}.gloss{font-size:16px}.entry-head{margin-bottom:12px}.tabs{margin-bottom:16px;gap:22px}.etymology-line{font-size:14px;gap:7px}.etymology-line small{font-size:10px;margin-left:4px}.entry-notes{font-size:11px}.section{margin-bottom:18px}.relationship-table{font-size:12px}.relationship-table th,.relationship-table td{padding-left:4px;padding-right:4px}.relationship-table .entry-notes{font-size:10px}.dictionary-graph-controls{gap:7px!important}.dictionary-graph-controls select{max-width:130px}.dictionary-graph-canvas{max-width:100%}.source-original{font-size:13px;line-height:1.8}}
@media print{.sidebar,.load-tools,.tabs,.skip-link,.citation{display:none}.workspace{display:block}.masthead{height:40px;padding:0}main{padding:16px 0}.headword{font-size:30px}.dictionary-graph{break-inside:avoid}}

.relationship-table tr[aria-current="true"]{background:var(--tint)}

/* Lexical hierarchy: each step owns its type and inline source references. */
.section{margin-bottom:16px}.section-heading{display:flex;align-items:baseline;gap:12px;margin-bottom:6px}.section-heading h3{font-size:13px;margin:0}.section-source{border:0;padding:0;background:none;color:var(--muted);font-size:11px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.section-source:hover{color:var(--green)}.citation-group{display:inline}.all-sources{margin-bottom:14px}.etymology-step{max-width:640px;padding:4px 0}.etymology-line{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,1fr) minmax(0,1fr);gap:12px;align-items:center}.etymology-term{display:block;font-size:14px}.etymology-term .word-link{font-weight:500}.etymology-term small{display:block;margin:2px 0 0;font-size:11px}.etymology-connector{display:grid;justify-items:center;gap:1px}.etymology-connector .etymology-type{display:block;font-size:11px;font-weight:500;line-height:1.4;text-align:center;margin:0;color:var(--muted)}.etymology-connector .origin-arrow{display:block;font-size:20px;line-height:1.2}.usage-prose{font-size:14px;line-height:1.65;color:var(--ink);max-width:75ch;margin:0 0 8px}.usage-qualifiers{font-size:12px;line-height:1.6;color:var(--muted);max-width:85ch}.alternative-forms{font-size:15px;margin:0;padding-left:19px;list-style:disc}.alternative-forms li{margin:0 0 6px;padding-left:2px}.alternative-forms .word-link{font-weight:500}.dictionary-graph-controls input[type="range"]{width:100px;max-width:25vw;accent-color:var(--green)}.dictionary-graph-controls output{font-size:11px;min-width:15px}
@media(max-width:620px){.section{margin-bottom:16px}.section-heading{margin-bottom:9px;gap:12px}.etymology-line{grid-template-columns:minmax(0,1fr) minmax(95px,1.1fr) minmax(0,1fr);gap:8px}.etymology-term,.alternative-forms{font-size:14px}.etymology-connector .etymology-type{font-size:10px}.usage-prose{font-size:13px;line-height:1.75}.dictionary-graph-controls input[type="range"]{width:90px}}

.meaning-caption{font-size:12px;color:var(--muted);margin-top:4px}.meaning-words{display:grid;gap:10px}.meaning-words small{font-size:11px;color:var(--muted);margin-left:12px}

/* Derived lexical sections retain exact quotations and their report context. */
.lexical-attributes{display:grid;gap:9px}.attribute-context{font-size:12px;color:var(--muted);margin-left:12px}.attestation-group{max-width:82ch;margin:0 0 16px}.attestation-heading{font-size:12px;color:var(--muted);margin-bottom:8px}.attestation{margin:0 0 12px}.quotation-original{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 7px;padding:0 0 0 14px;border-left:2px solid var(--line);line-height:1.8;font-family:"Segoe UI","Microsoft JhengHei",sans-serif;font-size:15px}.quotation-translation{font-size:13px;line-height:1.65;color:var(--muted);margin:0 0 5px 16px}.reading-note{font-size:12px;color:#6f5418;border-left:2px solid #b0892f;padding-left:12px;margin:8px 0 8px 16px}.attestation .section-source{margin-left:16px}.lexical-attributes .entry-notes{margin-top:4px}

/* Surface composition is a shared derived reading, not a stored analysis. */
.tabs{flex-wrap:wrap;gap:8px 20px}.surface-tree{font-size:18px;line-height:2;overflow-wrap:anywhere}.surface-group{display:inline}.surface-plus{color:var(--muted);font-size:14px;padding:0 3px}.surface-unmatched{color:var(--ink)}.surface-known{font-weight:500}.surface-boundary,.discursive-boundary{font-size:11px;color:var(--muted);line-height:1.6;max-width:85ch;margin-top:7px}.component-history{margin-top:10px;max-width:740px}.component-history>summary{font-size:12px;color:var(--green);cursor:pointer}.containing-expressions{padding-left:19px;margin:0;font-size:14px;line-height:1.8}.connection-group{margin-bottom:13px}.connection-group h4{font-size:12px;font-weight:500;color:var(--muted);margin-bottom:5px}.connection-line{font-size:14px;line-height:1.7;margin-bottom:8px}.connection-direction{font-size:12px;color:var(--muted);margin-right:5px}.connection-line>.entry-notes{margin-top:1px}.qualified-connection{margin-bottom:12px}.qualified-connection>.attribute-context{margin-left:0}.gloss-meaning{color:var(--ink);text-decoration-color:rgba(128,0,0,.28)}.bibliography-card{padding:0 0 12px;margin-bottom:14px;border-bottom:1px solid var(--line);max-width:90ch}.bibliography-card h3{font-size:15px;line-height:1.6;margin-bottom:6px}.bibliography-attributes{font-size:12px;color:var(--muted);margin-bottom:5px}.bibliography-access{font-size:12px;color:var(--muted);margin:7px 0 9px}.bibliography-details{font-size:12px;margin-top:9px}.bibliography-details>summary{cursor:pointer;color:var(--green)}.bibliography-reference{font-size:12px;margin:7px 0}.bibliography-quotation{margin:10px 0 12px}.bibliography-card .section-source{margin-top:4px}.bibliography-card .source-original{margin-top:12px}.discursive-boundary{margin:0 0 17px}
@media(max-width:620px){.tabs{gap:6px 16px}.tab{font-size:11px}.surface-tree{font-size:16px}.connection-line{font-size:13px}.bibliography-card h3{font-size:14px}.component-history .etymology-line{gap:6px}}

.bibliography-locators{font-size:11px;overflow-wrap:anywhere;line-height:1.5;margin:5px 0 9px}.surface-ambiguity{display:inline-block;font-size:inherit;vertical-align:baseline}.surface-ambiguity>summary{cursor:pointer}.surface-candidates{font-size:12px;display:grid;gap:5px;padding:7px;background:var(--tint)}

/* Compact house chrome and an optional mobile index. */
.masthead{position:sticky;top:0;z-index:30;border-top:3px solid var(--green);background:var(--paper)}
.brand{display:flex;align-items:center;gap:9px;min-width:0}.brand-mark{display:grid;place-items:center;width:31px;height:31px;flex:none;background:var(--green);color:#fff;border-radius:3px;font:700 14px/1 "Trebuchet MS","Segoe UI",sans-serif;letter-spacing:-.04em}.brand-copy{display:grid;gap:2px;line-height:1.15}.brand-name{font:700 15px/1.1 "Palatino Linotype","Book Antiqua",Palatino,Georgia,serif}.brand h1{font:500 10px/1.15 "Segoe UI",Arial,sans-serif;letter-spacing:.035em;color:var(--muted)}
.sidebar{top:51px;max-height:calc(100vh - 51px)}.search-row{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.index-toggle{display:none}.index-panel{display:grid;gap:10px;min-width:0}.sidebar-footer{margin-top:5px;padding-top:9px}.load-tools{gap:10px}.tabs{align-items:stretch}.tab{min-height:38px}.bibliography-year{font-weight:400;color:var(--muted)}
@media(max-width:850px){main{padding:18px 22px}.headword{font-size:30px}.long-headword{font-size:27px}}
@media(max-width:720px){.masthead{height:51px;padding:0 14px}.brand{gap:7px}.brand-name{font-size:14px}.brand h1{font-size:9px}.brand-mark{width:29px;height:29px;font-size:13px}.load-tools{gap:7px;font-size:10px}.quiet-button{padding:5px 9px}.workspace{display:block;min-height:calc(100vh - 51px)}.sidebar{position:static;max-height:none;padding:10px 14px;gap:6px;border-right:0;border-bottom:1px solid var(--line)}.search-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.search-row{grid-template-columns:minmax(0,1fr) auto}.sidebar input,.index-toggle{min-height:44px}.index-toggle{display:block;min-width:58px}.index-panel{display:none;padding-top:4px}.index-open .index-panel{display:grid}.filters select{min-height:44px;font-size:12px;padding:7px}.filters label{font-size:12px}#entries{max-height:35dvh;overflow:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.entry-link{padding:9px 8px;min-height:44px}.entry-link .word{font-size:13px}.entry-link .hint{font-size:11px}.sidebar-footer{display:none}.result-count{font-size:11px}main{padding:16px 14px 28px}.headword{font-size:28px}.long-headword{font-size:25px}.gloss{font-size:15px}.language-row{margin-bottom:6px}.entry-head{margin-bottom:10px}.tabs{gap:4px 18px;margin-bottom:14px}.tab{min-height:44px;font-size:12px;padding:8px 0}.section{margin-bottom:16px}.section-heading{margin-bottom:6px}.etymology-line{gap:8px;grid-template-columns:minmax(0,1fr) minmax(90px,1fr) minmax(0,1fr)}.etymology-term{font-size:14px}.etymology-term small{font-size:11px}.usage-prose{font-size:14px;line-height:1.65}.source-original{font-size:14px;line-height:1.8}.surface-tree{font-size:16px}.dictionary-graph-controls button,.dictionary-graph-controls select{min-height:38px;font-size:12px}.dictionary-graph-controls label{min-height:38px}.bibliography-details>summary,.source-card summary,.component-history>summary,.context-details>summary{min-height:34px;display:flex;align-items:center}.record-details>summary{min-height:34px;display:flex;align-items:center}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}
@media print{.masthead{position:static}.index-toggle{display:none}.brand-mark{print-color-adjust:exact}}
