/* Scoped homepage integration; existing dictionary/tool layouts remain unchanged. */
.home-portal{--hp-ink:var(--book-ink);--hp-muted:var(--book-muted);--hp-card:var(--book-card);--hp-line:var(--book-line);--hp-accent:#206273;max-width:1320px;margin:8px auto 0}.portal-hero{position:relative;background:linear-gradient(120deg,#143d48,#1d5260);color:#f4f5ee;border:1px solid #234d57;border-radius:14px;padding:32px 34px;display:grid;grid-template-columns:minmax(0,1fr) 220px;column-gap:40px;overflow:hidden}.portal-hero:after{content:"";position:absolute;width:310px;height:310px;border:1px solid #a7cebd1c;border-radius:50%;right:-150px;top:-150px;pointer-events:none}.portal-kicker{font-size:11px;font-weight:700;letter-spacing:.13em;color:var(--hp-muted)}.portal-hero>.portal-kicker{grid-column:1;color:#c2d6ca}.home-portal h1{grid-column:1;font-size:37px;line-height:1.38;letter-spacing:.03em;margin:12px 0 14px;color:inherit}.portal-intro{grid-column:1;font-size:13px;line-height:1.9;color:#c9dada;max-width:660px;margin:0 0 22px}#portal-search{grid-column:1;max-width:760px}.portal-search-options{display:grid;grid-template-columns:1.35fr 1fr;gap:12px;margin-bottom:12px}.portal-search-options label{font-size:11px;color:#d5e1dc;display:block}.portal-search-options select{display:block;width:100%;min-height:44px;margin-top:6px;background:#f8faf6;color:#203d42;border:1px solid #c4d4c9;border-radius:6px;padding:9px;font-size:12px;min-width:0}.portal-search-line{display:flex;border-radius:7px;border:1px solid #b3c9c0;overflow:hidden;background:#fffef8;padding:5px;gap:5px}.portal-search-line input{flex:1;width:100%;min-width:0;border:0;background:transparent;color:#223f43;padding:9px 12px;min-height:46px;font-size:14px}.portal-search-line button{background:#c9a862;color:#21383a;border:0;padding:11px 20px;border-radius:4px;white-space:nowrap;min-height:46px;font-size:13px;font-weight:700}.portal-search-line button span{margin-left:18px}.portal-search-note{font-size:11px;line-height:1.7;margin:9px 0 0;color:#d0dfd6;min-height:20px}.portal-hot{grid-column:1;display:flex;flex-wrap:wrap;gap:14px;align-items:center;font-size:11px;color:#c8ddd0;margin-top:12px}.portal-hot a{display:inline-flex;align-items:center;min-height:44px;border-bottom:1px solid #bed8c642}.portal-side-note{grid-column:2;grid-row:2/6;align-self:center;padding:20px 0 20px 24px;border-left:1px solid #b1d2c532;font-size:12px;line-height:1.9;color:#c4d8cf}.portal-side-note strong{font-size:13px;color:#f5edda}.portal-side-note p{margin:9px 0 10px}.portal-side-note a{display:inline-flex;align-items:center;min-height:44px;color:#e7d7b0}.portal-section{margin-top:28px}.portal-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}.home-portal .portal-heading h2{font-size:20px;margin:4px 0 0;font-weight:750;color:var(--hp-ink);line-height:1.5}.portal-heading>a{font-size:12px;color:var(--book-accent);display:inline-flex;min-height:44px;align-items:center}.portal-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.portal-tool{position:relative;display:flex;align-items:flex-start;gap:12px;border:1px solid var(--hp-line);background:var(--hp-card);border-radius:9px;padding:20px 16px;min-width:0}.portal-tool:hover,.portal-guide-grid>a:hover{border-color:#91aeb0}.portal-tool-mark{display:grid;place-items:center;background:var(--book-bg);color:var(--book-accent);border:1px solid var(--hp-line);width:36px;min-width:36px;height:36px;border-radius:7px;font-size:11px;font-weight:750}.portal-tool-copy{min-width:0}.portal-tool small{font-size:10px;color:var(--hp-muted)}.home-portal .portal-tool h3{font-size:15px;margin:5px 0 8px;line-height:1.5}.portal-tool p{font-size:11px;color:var(--hp-muted);line-height:1.85;margin:0}.portal-arrow{position:absolute;right:12px;top:13px;color:var(--book-accent);font-size:12px}.portal-body{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:24px;align-items:start}.portal-content,.portal-sidebar{min-width:0}.portal-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.portal-guide-grid>a{position:relative;padding:20px 22px;border:1px solid var(--hp-line);border-radius:8px;background:var(--hp-card);min-width:0}.portal-guide-grid span{font-size:10px;color:var(--book-accent);display:block}.home-portal .portal-guide-grid h3{font-size:16px;line-height:1.6;margin:8px 0 7px}.portal-guide-grid p{font-size:12px;line-height:1.85;margin:0 18px 0 0;color:var(--hp-muted)}.portal-guide-grid b{position:absolute;right:16px;bottom:20px;color:var(--book-accent);font-size:15px;font-weight:400}.portal-more-guides{display:inline-flex;align-items:center;font-size:12px;color:var(--book-accent);min-height:44px;margin-top:8px}.portal-project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));background:var(--hp-card);border:1px solid var(--hp-line);border-radius:8px;overflow:hidden}.portal-project-grid a{position:relative;display:flex;flex-direction:column;min-width:0;border-bottom:1px solid var(--hp-line);padding:17px 35px 17px 18px;min-height:82px}.portal-project-grid a:nth-child(odd){border-right:1px solid var(--hp-line)}.portal-project-grid a:nth-last-child(-n+2){border-bottom:0}.portal-project-grid strong{font-size:13px;font-weight:650;line-height:1.7}.portal-project-grid span{font-size:11px;line-height:1.8;color:var(--hp-muted);overflow-wrap:anywhere}.portal-project-grid b{position:absolute;right:17px;top:25px;color:var(--hp-muted);font-weight:400;font-size:13px}.portal-caption{font-size:11px;line-height:1.85;color:var(--hp-muted)}.portal-sidebar{padding-top:28px}.portal-history,.portal-sources{background:var(--hp-card);border:1px solid var(--hp-line);border-radius:8px;padding:20px}.home-portal .portal-history h2,.home-portal .portal-sources h2{font-size:16px;margin:4px 0 0}.portal-history-kinds{display:grid;grid-template-columns:1fr 1fr;gap:4px 14px;margin:12px 0}.portal-history-kinds a{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid var(--hp-line);min-height:44px;font-size:12px}.portal-history-kinds strong{font-weight:500}.portal-history-kinds span{font-size:11px;color:var(--hp-muted)}.portal-library-link{font-size:11px;color:var(--book-accent);display:inline-flex;align-items:center;min-height:44px}.portal-sources{margin-top:14px}.portal-sources>a{display:flex;flex-direction:column;gap:3px;padding:14px 0;border-bottom:1px solid var(--hp-line);min-height:64px}.portal-sources>a:last-child{border-bottom:0;padding-bottom:0}.portal-sources strong{font-size:12px;font-weight:650}.portal-sources span{font-size:11px;color:var(--hp-muted)}.home-portal a:focus-visible,.home-portal input:focus-visible,.home-portal button:focus-visible,.home-portal select:focus-visible{outline:3px solid #cba455;outline-offset:3px}.portal-hero a:hover{color:#fff0bd}.booklet-quicknav a{min-height:44px;display:inline-flex;align-items:center}.booklet-top #global-query::placeholder{color:var(--book-muted)}html[data-theme=dark] .home-portal{--hp-accent:#9ac3c4}html[data-theme=dark] .portal-hero{border-color:var(--book-line);background:linear-gradient(120deg,#17333c,#1b404b)}
@media(max-width:1100px){.portal-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-hero{column-gap:22px;grid-template-columns:minmax(0,1fr) 190px}.portal-side-note{padding-left:18px}.portal-body{gap:18px;grid-template-columns:minmax(0,1fr) 240px}}
@media(max-width:760px){.portal-hero{grid-template-columns:minmax(0,1fr);padding:24px 20px}.home-portal h1{font-size:29px}.portal-side-note{grid-column:1;grid-row:auto;padding:14px 0 0;border-left:0;border-top:1px solid #b1d2c532;margin-top:12px}.portal-side-note p{margin-bottom:0}.portal-side-note a{min-height:44px}.portal-body{grid-template-columns:1fr;gap:0}.portal-sidebar{padding-top:24px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.portal-sources{margin:0}.portal-tools{gap:9px}.portal-tool{padding:16px 12px;gap:9px}.portal-tool-mark{width:30px;min-width:30px;height:32px}.home-portal .portal-tool h3{font-size:14px}.portal-guide-grid{gap:9px}.portal-guide-grid>a{padding:17px}.portal-heading{gap:10px;align-items:flex-start}.home-portal .portal-heading h2{font-size:18px}.portal-heading>a{font-size:11px}.portal-hot{gap:13px}.portal-section{margin-top:24px}.portal-search-line button{padding:10px 14px}.portal-search-line button span{margin-left:8px}}
@media(max-width:440px){.portal-search-options{grid-template-columns:1fr;gap:10px}.portal-hero{padding:22px 17px}.home-portal h1{font-size:27px}.portal-tools,.portal-guide-grid,.portal-project-grid,.portal-sidebar{grid-template-columns:1fr}.portal-tool{padding:18px 16px}.portal-tool-copy{padding-right:12px}.portal-project-grid a:nth-child(odd){border-right:0}.portal-project-grid a:nth-last-child(2){border-bottom:1px solid var(--hp-line)}.portal-guide-grid>a{min-height:128px}.portal-sources{margin-top:0}.portal-search-line input{padding-left:8px;font-size:13px}.portal-search-line button{font-size:12px}.portal-intro{font-size:12px}.portal-heading{flex-wrap:wrap}.portal-heading>a{min-height:44px}.booklet-main{padding:12px}}

.portal-appearance{min-width:0}.portal-appearance iframe{display:block;width:100%;height:760px;border:0;margin-top:16px;border-radius:8px;background:var(--book-card,#fff)}
