/* The result remains the same editable grid. Only its reading hierarchy changes. */
html body .grid-workbench .grid-card[hidden]{display:none!important;}
html body .brand-result-board .grid-card[data-result-kind=document]{background:#e9ece9;}
html body .brand-result-board .brand-book-cover .grid-file-preview{object-fit:cover;object-position:center;}
html body .brand-result-board .grid-card .brand-kit-cover img{object-fit:cover;padding:0;background:transparent;}
html body .brand-result-board .grid-card .grid-controls{pointer-events:none!important;}
html body .brand-result-board:not([data-editing=true]) .grid-card[data-result-kind]:not([data-result-kind=""]) .grid-controls button{pointer-events:none!important;}
@media(hover:hover){html body .brand-result-board:not([data-editing=true]) .grid-card[data-result-kind]:hover .grid-controls button{pointer-events:auto!important;}}
html body .brand-result-board .grid-card .brand-result-badge{position:static;display:inline-flex;align-items:center;gap:6px;min-height:28px!important;height:auto!important;max-height:none!important;max-width:100%;padding:5px 11px!important;box-sizing:border-box;border-radius:999px;font:600 11px/16px Manrope,sans-serif!important;white-space:nowrap;overflow:hidden;}
html body .brand-result-badge>span{min-width:0;overflow:hidden;text-overflow:ellipsis;}
html body .brand-result-badge .brand-delivery-icon{flex-shrink:0;}
html body .brand-result-board .grid-card :is(.grid-file-open,.grid-asset-open),html body .brand-result-dialog :is(button,a){touch-action:manipulation;}
.brand-book-caption{position:absolute;inset:auto 0 0;padding:26px 14px 60px;background:linear-gradient(transparent,#101415e8);display:flex;flex-direction:column;gap:8px;pointer-events:none;color:white;}
html body .brand-book-caption strong{font:600 clamp(14px,1.4vw,18px)/1.2 Manrope,sans-serif;color:#fff!important;-webkit-text-fill-color:#fff;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;}
html body .grid-file-open>.brand-book-caption{white-space:normal;}
html body .brand-book-caption strong{white-space:normal;}
html body .brand-book-caption>span{font:500 12px/1.4 Manrope,sans-serif;color:#fff!important;-webkit-text-fill-color:#fff;}
.brand-book-actions{position:absolute;bottom:12px;left:12px;right:12px;display:flex;gap:8px;z-index:3;}
html body .brand-book-actions a{display:flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:6px 10px;border-radius:40px;text-decoration:none;color:#171717!important;background:#fff;font:600 12px/1 Manrope,sans-serif;-webkit-text-fill-color:currentColor;}
.brand-book-actions .brand-delivery-icon{width:16px;height:16px;flex-basis:16px;}

html body .brand-result-board:not([data-editing=true]) .grid-card[data-result-kind]:not([data-result-kind=""]) .grid-controls{opacity:0;pointer-events:none;}
@media(hover:hover){html body .brand-result-board:not([data-editing=true]) .grid-card[data-result-kind]:hover .grid-controls{opacity:1;}}
html body .grid-card .brand-kit-cover.brand-kit-logos{background-color:#f4f5f2!important;background-image:repeating-conic-gradient(#e8ebe5 0% 25%,transparent 0% 50%);background-size:22px 22px;}
html body .brand-result-board .grid-card .brand-kit-cover.brand-kit-logos img{object-fit:contain;padding:0;}
html body .grid-card .brand-kit-cover:is(.brand-kit-fonts,.brand-kit-palette){background:#f3f4f1!important;}
html body .brand-result-board .grid-card .brand-kit-cover:is(.brand-kit-fonts,.brand-kit-palette) img{object-fit:cover;padding:0;}
html body .grid-card .brand-kit-color-bars{height:100%;display:flex;gap:0;padding:40px 14px 28px;box-sizing:border-box;}
.brand-kit-color-bars>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:8px;}
.brand-kit-color-bars i{display:block;flex:1;min-height:0;}
.brand-kit-color-bars>div:first-child i{border-radius:10px 0 0 10px;}
.brand-kit-color-bars>div:last-child i{border-radius:0 10px 10px 0;}
html body .brand-kit-color-bars span{color:#737b78;font:500 clamp(7px,4cqw,11px)/1.2 Manrope,sans-serif;letter-spacing:-.03em;}
html body .grid-card .brand-kit-font-preview{height:100%;padding:38px 16px 32px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:6px;box-sizing:border-box;overflow:hidden;}
html body .brand-kit-font-preview>strong{font-size:clamp(24px,25cqw,72px);font-weight:700;line-height:1.05;white-space:nowrap;color:#171717;}
html body .brand-kit-font-name{color:#737b78;font:500 clamp(8px,5cqw,12px)/1.3 Manrope,sans-serif;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
html body .brand-kit-body-sample{font-size:clamp(12px,8cqw,20px);line-height:1.2;color:#171717;text-align:left;white-space:normal;margin-top:5px;}
.brand-result-context{position:absolute;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:56px;padding:8px 2px;z-index:4;}
html body .brand-result-summary{margin:0;color:#737b78;font:500 13px/1.35 Manrope,sans-serif;}
html body .brand-context-toggle{display:flex;align-items:center;justify-content:center;gap:10px;flex-shrink:0;min-height:44px;padding:10px 16px;border:0;border-radius:30px;background:#eceeed;color:#171717;font:600 13px/1.3 Manrope,sans-serif;}
.brand-context-toggle[aria-expanded=true] .material-symbols-outlined{transform:rotate(180deg);}
.generation-covered .brand-result-context{visibility:hidden;}
html body dialog.grid-popup.brand-result-dialog{width:min(var(--brand-dialog-width,500px),calc(100vw - 24px));max-width:800px;max-height:calc(100dvh - 24px);padding:22px;border-radius:28px;overflow:hidden;}
html body .brand-result-dialog .grid-popup-body{max-height:calc(100dvh - 112px);overflow:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;}
.brand-result-dialog .brand-delivery-dialog{gap:14px;min-width:0;}
html body .brand-result-dialog .brand-preview-frame{position:relative;height:auto;aspect-ratio:var(--brand-preview-ratio,1.5);max-height:52dvh;border-radius:18px;overflow:hidden;background:#eceeed;}
html body .brand-preview-frame{touch-action:pan-y pinch-zoom;}
html body .brand-result-dialog .brand-preview-frame>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:0;box-sizing:border-box;}
.brand-preview-frame[data-tone=transparent]{background-color:#f4f5f2;background-image:repeating-conic-gradient(#e4e8e1 0% 25%,transparent 0% 50%);background-size:24px 24px;}
html body .brand-preview-frame[data-tone=dark]{background:#202523;}
.brand-preview-frame[data-loading=true]:after{content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 25%,#ffffff66 45%,transparent 65%);background-size:250% 100%;animation:brand-preview-load 1.4s linear infinite;pointer-events:none;}
@keyframes brand-preview-load{to{background-position:-250% 0;}}
html body .brand-preview-error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:18px;font:500 14px/1.4 Manrope,sans-serif;color:#171717;}
html body .brand-preview-error[hidden],html body .brand-preview-frame>img[hidden]{display:none;}
html body .brand-preview-error button{border:0;border-radius:30px;min-height:44px;padding:10px 18px;background:#fff;color:#171717;}
html body .brand-result-dialog .brand-asset-navigation{position:static;display:flex;align-items:center;justify-content:space-between;gap:12px;}
html body .brand-result-dialog .brand-asset-navigation button,html body .brand-reader-controls>button{border:0;border-radius:50%;background:#eceeed;color:#171717;min-width:44px;height:44px;display:grid;place-items:center;}
.brand-asset-caption{display:flex;flex-direction:column;gap:6px;}
html body .brand-variant-kind{color:#737b78;font:500 12px/1.4 Manrope,sans-serif;}
html body .brand-result-dialog .brand-asset-name{min-height:0;font-size:18px!important;}
.brand-related-pages{display:flex;flex-direction:column;gap:8px;}
.brand-related-pages>span{font:500 12px/1.4 Manrope,sans-serif;color:#737b78;}
html body .brand-related-pages [data-related-page]{display:flex;align-items:center;gap:10px;min-height:44px;border:0;border-radius:14px;padding:10px 14px;text-align:left;background:#f0f2ef;color:#171717;font:500 13px/1.4 Manrope,sans-serif;}
.brand-related-pages [data-related-page]>span{flex:1;overflow-wrap:anywhere;}
.brand-related-pages .brand-delivery-icon{width:18px;height:18px;flex-basis:18px;}
.brand-reader-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.brand-reader-position{min-width:0;flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;}
html body .brand-reader-counter{font:500 12px/1.4 Manrope,sans-serif;color:#737b78;font-variant-numeric:tabular-nums;}
html body .brand-reader-topic{font:600 16px/1.3 Manrope,sans-serif;color:#171717;min-height:42px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;}
.brand-page-strip{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding:4px 2px 8px;touch-action:pan-x;}
html body .brand-page-strip button{position:relative;flex:0 0 72px;height:54px;border:2px solid transparent;border-radius:9px;overflow:hidden;background:#eceeed;color:#171717;padding:0;}
.brand-page-strip img{width:100%;height:100%;object-fit:cover;}
.brand-page-strip button>span{position:absolute;bottom:3px;right:3px;font:600 10px/1.3 Manrope,sans-serif;border-radius:5px;padding:2px 4px;background:#fff;color:#171717;}
html body .brand-page-strip button[aria-current=page]{border-color:#171717;}
html body .brand-reader-back{display:flex;align-items:center;gap:8px;align-self:flex-start;min-height:44px;border:0;border-radius:25px;padding:8px 14px;background:#eceeed;color:#171717;font:500 13px/1.4 Manrope,sans-serif;}
html body .brand-reader-controls>button:disabled{opacity:.3;}
.brand-reader-loading{height:38dvh;display:grid;place-items:center;font:500 15px/1.4 Manrope,sans-serif;color:#737b78;}
html body .brand-result-dialog :is(button,a):focus-visible,html body .brand-context-toggle:focus-visible,html body .brand-book-actions a:focus-visible{outline:2px solid #171717;outline-offset:3px;}
@media(max-width:600px){
 html body dialog.grid-popup.brand-result-dialog{padding:16px;border-radius:24px;}
 html body .brand-result-dialog .grid-popup-body{max-height:calc(100dvh - 102px);}
 html body .brand-result-dialog .brand-preview-frame{height:auto;max-height:44dvh;}
 html body .brand-result-dialog .brand-preview-frame>img{padding:0;}
 .brand-result-context{gap:6px;align-items:flex-start;padding:6px 0;min-height:60px;}
 html body .brand-result-summary{max-width:45%;font-size:11px;padding-top:5px;}
 html body .brand-context-toggle{min-height:44px;padding:8px 12px;font-size:12px;gap:5px;}
 .brand-book-caption{padding:24px 12px 54px;gap:6px;}
 html body .brand-book-caption strong{font-size:16px;}
 .brand-book-actions{left:12px;bottom:12px;right:12px;}
 html body .brand-reader-topic{font-size:14px;min-height:37px;}
 .brand-page-strip button{flex-basis:60px;height:46px;}
 .brand-result-dialog .brand-delivery-dialog{gap:12px;}
}
@media(prefers-reduced-motion:reduce){.brand-preview-frame[data-loading=true]:after{animation:none;}}

/* Compact downloads use the same radial ink/fill controller as the rest of the site. */
html body .brand-result-dialog .brand-delivery-actions{display:flex;flex-wrap:wrap;gap:8px;}
html body .brand-result-dialog :is(.brand-delivery-actions a,.brand-asset-formats a,.brand-group-download){display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 1 auto;width:auto;min-height:38px;padding:8px 12px;border:0;border-radius:24px;font:600 12px/1.3 Manrope,sans-serif;text-decoration:none;max-width:100%;}
html body .brand-asset-formats a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
html body .brand-result-dialog .brand-delivery-icon{width:17px;height:17px;flex:0 0 17px;}
html body .brand-result-dialog .brand-kit-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px;}
html body .brand-related-pages{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;}
html body .brand-related-pages [data-related-page]{min-height:36px;padding:7px 10px;width:auto;flex:0 1 auto;border-radius:20px;font-size:11px;gap:6px;}
html body .brand-result-dialog .brand-asset-caption[hidden]{display:none;}
html body .brand-result-dialog .brand-asset-name{margin:0;font-size:14px!important;}
html body .brand-result-dialog .brand-preview-frame[data-tone=paper]{background:#fff;}
html body .brand-result-dialog[data-preview-shape=landscape] .brand-preview-frame{height:auto;aspect-ratio:var(--brand-preview-ratio,1.5);max-height:52dvh;}
html body .brand-page-strip{scrollbar-color:#929a97 #eceeed;scrollbar-width:thin;}
.brand-page-strip::-webkit-scrollbar{height:6px;}
.brand-page-strip::-webkit-scrollbar-track{background:#eceeed;border-radius:12px;}
.brand-page-strip::-webkit-scrollbar-thumb{background:#929a97;border:1px solid #eceeed;border-radius:12px;}
html body .brand-page-strip button[aria-current=page]{border-color:#065dfd!important;box-shadow:0 0 0 2px #fff,inset 0 0 0 2px #fff!important;}
html body .brand-page-strip button>span{background:#fff!important;color:#171717!important;-webkit-text-fill-color:#171717!important;}
html body .brand-page-strip button[aria-current=page]>span{background:#065dfd!important;color:#fff!important;-webkit-text-fill-color:#fff!important;}
html body .brand-result-board .brand-result-badge{background:#fff;color:#151516;border:1px solid #00000012;}
html body .brand-result-board button.brand-result-badge{background:rgba(255,255,255,.86);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);}
html body .brand-result-board span.brand-result-badge{backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;}
html body .brand-result-dialog .grid-close,html body .brand-result-board .grid-quick-remove{background-color:white;color:#d32f3f;}

html body .brand-native-fonts>img{visibility:hidden;}
.brand-font-specimen{position:absolute;inset:0;background:#fff;padding:clamp(12px,3vw,28px);display:flex;flex-direction:column;justify-content:center;gap:8px;container-type:inline-size;box-sizing:border-box;}
html body .brand-font-specimen strong{font-weight:700;font-size:clamp(24px,11cqw,72px);line-height:1;color:#171717;white-space:nowrap;}
html body .brand-font-specimen p{font-size:clamp(14px,6cqw,36px);line-height:1.2;margin:8px 0 0;color:#171717;white-space:nowrap;}
html body .brand-font-specimen span{font:500 clamp(8px,3cqw,14px)/1.3 Manrope,sans-serif;color:#737b78;}

/* One bounded viewing area per dialog, shared by all its files. */
html body .brand-result-dialog .brand-preview-frame{aspect-ratio:auto;height:min(42dvh,360px);max-height:none;}
html body .brand-result-dialog[data-preview-kind=book] .brand-preview-frame{height:min(50dvh,480px);}
html body .brand-result-dialog:has(.brand-native-fonts) .brand-preview-frame{height:min(30dvh,230px);}
html body .brand-related-pages{display:flex;flex-direction:column;align-items:flex-start;gap:6px;border-top:1px solid #15151612;padding-top:12px;width:100%;}
html body .brand-related-pages .brand-related-label{font:500 11px/1.3 Manrope,sans-serif;color:#737b78;}
html body .brand-related-pages [data-related-page]{background:transparent;padding:5px 0;min-height:32px;gap:8px;font:600 12px/1.3 Manrope,sans-serif;border-radius:6px;text-decoration:underline;text-decoration-color:#15151635;text-underline-offset:4px;}
html body .brand-result-badge .material-symbols-outlined{font-size:16px;line-height:1;flex:0 0 16px;}
html body .brand-related-pages .material-symbols-outlined{font-size:18px;}

html body .brand-result-dialog .brand-asset-caption:not([hidden]){height:46px;min-height:46px;overflow:hidden;}
html body .brand-result-dialog .brand-asset-formats{min-height:38px;}

html body .brand-result-dialog .brand-preview-frame{height:min(34dvh,300px);}
html body .brand-related-pages [data-related-page]{width:100%;justify-content:flex-start;}
html body .brand-related-pages [data-related-page]>span.material-symbols-outlined{flex:0 0 18px!important;overflow:visible;}
html body .brand-related-pages [data-related-page]>span:not(.material-symbols-outlined){flex:1;min-width:0;text-align:left;white-space:normal;}

/* The source remains fully visible above its softened, enlarged backdrop. */
html body .brand-result-dialog .brand-preview-frame{isolation:isolate;background:#e7e9e6;background-image:none;}
html body .brand-result-dialog .brand-preview-frame:before{content:'';position:absolute;inset:-32px;background-image:linear-gradient(#ffffff85,#ffffff85),var(--brand-preview-image);background-position:center;background-size:cover;background-repeat:no-repeat;filter:blur(24px);transform:scale(1.12);pointer-events:none;z-index:-1;}
html body .brand-result-dialog .brand-preview-frame[data-tone=dark]:before{background-image:linear-gradient(#ffffff30,#ffffff30),var(--brand-preview-image);}
html body .brand-result-dialog .brand-preview-frame[data-tone=dark]{background:#202523;}
html body .brand-result-dialog .brand-preview-frame>img{z-index:0;}
html body .brand-preview-error,.brand-font-specimen{z-index:1;}
/* Hide only the disclosure strip, never cells under draggable cards. */
html body .brand-result-board .grid-empty[data-section-gap=true]{visibility:hidden;}
/* The disclosure uses a compact physical row while keeping the grid coordinates. */
html body .brand-result-context{height:56px;min-height:0;padding:0;box-sizing:border-box;align-items:center;gap:12px;}
html body .brand-result-summary{display:flex;align-items:center;gap:7px;padding:7px 10px;border-radius:13px;background:#f0f5f1;color:#45634e;font-size:12px;max-width:65%;box-sizing:border-box;}
html body .brand-result-summary:before{content:'✓';flex-shrink:0;font-size:16px;}
html body .brand-related-pages [data-related-page]{width:auto;border:0!important;background:transparent!important;box-shadow:none!important;text-decoration:none;gap:6px;border-radius:0;}
html body .brand-related-pages [data-related-page]>.brand-related-text{flex:0 1 auto;text-decoration:underline;text-decoration-color:#15151635;text-underline-offset:4px;}
html body .brand-related-pages [data-related-page]:focus-visible,html body .brand-related-pages [data-related-page]:active{color:#065dfd;-webkit-text-fill-color:currentColor;}
@media(hover:hover){html body .brand-related-pages [data-related-page]:hover{color:#065dfd;-webkit-text-fill-color:currentColor;}html body .brand-related-pages [data-related-page]:hover>.brand-related-text{text-decoration-color:currentColor;}}
html body .brand-page-strip{scrollbar-width:none;}
.brand-page-strip::-webkit-scrollbar{display:none;}
.brand-preview-rail{min-width:0;}
.brand-scroll-track{height:8px;background:#065dfd12;border-radius:20px;position:relative;cursor:pointer;touch-action:none;margin:3px 2px 2px;}
.brand-scroll-track i{display:block;position:absolute;height:100%;left:0;background:#065dfd;border-radius:20px;transition:transform 90ms linear,width 150ms ease;pointer-events:auto;}
.brand-scroll-track[data-dragging=true] i{transition:none;}
.brand-scroll-track[aria-disabled=true]{opacity:.25;cursor:default;}
.brand-scroll-track:focus-visible{outline:2px solid #065dfd;outline-offset:3px;}
html body .brand-result-dialog .brand-preview-frame[data-alpha=true]{background-color:#f3f4f3;background-image:repeating-conic-gradient(#dce0dc 0% 25%,transparent 0% 50%);background-size:20px 20px;}
html body .brand-result-dialog .brand-preview-frame[data-alpha=true]:before{display:none;}
html body .brand-result-dialog .brand-preview-frame[data-alpha=true]>img{padding:18px;}
html body .brand-result-dialog .brand-preview-frame[data-alpha=true][data-tone=dark]{background-color:#464b48;background-image:repeating-conic-gradient(#626862 0% 25%,transparent 0% 50%);}
.brand-preview-outgoing{position:absolute;inset:0;pointer-events:none;background:#e7e9e6;overflow:hidden;z-index:1;}
.brand-preview-outgoing:before{content:'';position:absolute;inset:-32px;background-image:linear-gradient(#ffffff85,#ffffff85),var(--brand-preview-image);background-size:cover;background-position:center;filter:blur(24px);transform:scale(1.12);}
.brand-preview-outgoing img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;}
.brand-preview-outgoing[data-alpha=true]{background:transparent;}
.brand-preview-outgoing[data-alpha=true]:before{display:none;}
.brand-preview-outgoing[data-alpha=true] img{padding:18px;box-sizing:border-box;}
html body .grid-card .brand-kit-cover.brand-kit-logos{background:#eceeed!important;}
@media(max-width:600px){html body .brand-result-context{height:64px;gap:8px;}html body .brand-result-summary{max-width:48%;font-size:10px;padding:5px 7px;gap:4px;}html body .brand-result-summary:before{font-size:13px;}}
@media(prefers-reduced-motion:reduce){.brand-scroll-track i{transition:none;}}

html body .brand-related-pages a[data-related-page]{color:#171717;-webkit-text-fill-color:currentColor;}@media(hover:hover){html body .brand-related-pages a[data-related-page]:hover{color:#065dfd;}}html body .brand-related-pages a[data-related-page]:active{color:#065dfd;}

/* A shared, centred navigation title for the book and every material kit. */
html body .brand-reader-position{min-height:44px;justify-content:center;}
html body .brand-reader-topic{min-height:0!important;margin:0;text-align:center;}
html body .brand-scroll-track[hidden]{display:none!important;}
/* Preserve the old checkerboard as part of the whole fading surface. */
.brand-preview-outgoing[data-alpha=true]{background-color:#f3f4f3;background-image:repeating-conic-gradient(#dce0dc 0% 25%,transparent 0% 50%);background-size:20px 20px;}
.brand-preview-outgoing[data-alpha=true][data-tone=dark]{background-color:#464b48;background-image:repeating-conic-gradient(#626862 0% 25%,transparent 0% 50%);}
.brand-preview-outgoing[data-tone=dark]:before{background-image:linear-gradient(#ffffff30,#ffffff30),var(--brand-preview-image);}
html body .brand-result-summary{background:#065dfd0a;color:#065dfd;}
html body .brand-result-summary:before{content:'i';display:grid;place-items:center;width:15px;height:15px;border:1px solid currentColor;border-radius:50%;box-sizing:border-box;font:700 11px/1 Manrope,sans-serif;}
