/* Public status: compact cards, semantic badges and ordinary site controls. */
.portal-state{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line,#ccd9eb);border-radius:999px;padding:5px 8px;font-size:10px!important;font-weight:400!important;line-height:1.35;text-decoration:none!important;white-space:normal;--status-tone:var(--muted,#61738d)}
.portal-state[data-portal-state=healthy]{--status-tone:#258052}.portal-state[data-portal-state=degraded],.portal-state[data-portal-state=limited]{--status-tone:#a46c15}.portal-state[data-portal-state=unavailable]{--status-tone:#be4353}
#preview-shell#preview-shell .portal-state{color:var(--status-tone)!important;background:color-mix(in srgb,var(--status-tone) 7%,var(--surface))!important;border-color:color-mix(in srgb,var(--status-tone) 32%,var(--line))!important;min-height:0!important;font-weight:400!important;box-shadow:none!important}
#preview-shell#preview-shell .portal-state::before{content:"";display:inline-block;width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:var(--status-tone)}
#preview-shell#preview-shell .portal-state:is(:hover,:focus-visible){text-decoration:none!important;border-color:var(--status-tone)!important;background:color-mix(in srgb,var(--status-tone) 12%,var(--surface))!important}
#preview-shell#preview-shell .portal-state::after{display:none!important;content:none!important}
.portal-status .status-line{gap:12px}.portal-status .portal-state{text-align:left;max-width:65%}.portal-status .status-line>span:last-child{font-size:10px;text-align:right}
#preview-shell#preview-shell .portal-status .status-line:has(>.portal-state){border:0!important;border-bottom:1px solid var(--line)!important;padding-block:5px!important;align-items:center}
#preview-shell#preview-shell .portal-status .status-line:has(>.portal-state)>:first-child{flex:1;align-self:stretch;display:flex;align-items:center;border:0;padding-bottom:0}
.portal-update-times{display:flex;flex-direction:column;gap:0;line-height:1.25}.portal-status .status-times{align-items:center}
.portal-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.portal-overview-grid>article,.portal-source-card{background:var(--surface,#fcfdff);border:1px solid var(--line,#ccd9eb);border-radius:10px;min-width:0}
#preview-shell#preview-shell .portal-overview-grid>article{padding:12px}#preview-shell#preview-shell .portal-overview-grid h2{font-size:13px;margin:0 0 8px;padding:0;line-height:1.35}
#preview-shell#preview-shell .portal-overview-grid p{font-size:11px;line-height:1.5;margin:8px 0 0;padding:0}
.portal-snapshot-line,.portal-notice,.portal-explanation{font-size:11px;line-height:1.5}

.portal-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
#preview-shell#preview-shell .portal-source-card{padding:11px;margin:0;align-self:start}
.portal-source-head{display:flex;justify-content:space-between;align-items:flex-start;gap:9px}.portal-source-head small{display:block;font-size:9px;line-height:1.3;color:var(--muted,#61738d);margin-bottom:4px}
#preview-shell#preview-shell .portal-source-card h3{font-size:12px;margin:0;padding:0;line-height:1.4}
#preview-shell#preview-shell .portal-source-card p{font-size:10px;line-height:1.45;margin:6px 0;padding:0}
#preview-shell#preview-shell .portal-source-card .portal-source-scope{color:var(--muted)}
.portal-badge{font-size:9px;font-weight:400;line-height:1.3;border:1px solid var(--line,#ccd9eb);border-radius:999px;padding:3px 6px;max-width:45%;flex-shrink:0}
.state-healthy{color:#227349;background:rgba(58,161,112,.08)}.state-degraded,.state-limited{color:#986008;background:rgba(210,155,40,.09)}.state-unavailable{color:#b13b49;background:rgba(193,67,83,.08)}.state-unknown{color:var(--muted,#61738d)}
#preview-shell#preview-shell .portal-source-card dl{font-size:10px;line-height:1.35;margin:7px 0}
#preview-shell#preview-shell .portal-source-card dl>div{display:flex;justify-content:space-between;gap:10px;padding:2px 0;margin:0;min-height:0}
#preview-shell#preview-shell .portal-source-card dt,#preview-shell#preview-shell .portal-source-card dd{margin:0;padding:0;line-height:1.35}.portal-source-card dt{color:var(--muted)}.portal-source-card dd{text-align:right}
#preview-shell#preview-shell .portal-source-card [hidden]{display:none!important}
.portal-source-card details{border-top:1px solid var(--line);padding-top:7px;margin-top:7px;font-size:10px}.portal-source-card summary,.portal-explanation summary{cursor:pointer;font-weight:400}

.portal-pages{display:grid!important;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;margin-top:14px;width:100%;font-size:10px}.portal-pages>:first-child{justify-self:start}.portal-pages>:last-child{justify-self:end}.portal-pages [aria-disabled=true]{opacity:.5}
.portal-notice{border-left:3px solid #ba8c35;padding:8px 10px;background:rgba(200,160,60,.08)}.portal-maintenance-note{border-left:2px solid #ba8c35;padding-left:7px!important}
html.dark .portal-state[data-portal-state=healthy]{--status-tone:#86d5ad}html.dark .portal-state[data-portal-state=degraded],html.dark .portal-state[data-portal-state=limited]{--status-tone:#edc981}html.dark .portal-state[data-portal-state=unavailable]{--status-tone:#f2a2ac}
html.dark .state-healthy{color:#86d5ad}html.dark .state-degraded,html.dark .state-limited{color:#edc981}html.dark .state-unavailable{color:#f2a2ac}
@media(max-width:620px){.portal-source-grid{grid-template-columns:1fr}.portal-pages{gap:7px}.portal-overview-grid>article{padding:10px}.portal-overview-grid h2{font-size:12px}.portal-status .portal-state{max-width:65%}}
@media(max-width:359px){.portal-overview-grid{grid-template-columns:1fr}}
[data-portal-refresh]{font-weight:400!important}



/* Home keeps the original quiet online-indicator scale, with state-dependent colour. */
#preview-shell#preview-shell .portal-status .portal-indicator{font-size:7.7px!important;line-height:1.4!important;font-weight:500!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;gap:5px;max-width:70%;text-align:right}
#preview-shell#preview-shell .portal-status .portal-indicator::before{width:5px;height:5px;flex-basis:5px;box-shadow:0 0 0 2px color-mix(in srgb,var(--status-tone) 10%,transparent)}
#preview-shell#preview-shell .portal-status .portal-indicator:is(:hover,:focus-visible){background:transparent!important;color:var(--status-tone)!important;filter:brightness(1.1)}
.portal-categories{display:flex;flex-direction:column;gap:8px}.portal-category{border:1px solid var(--line);border-radius:10px;background:var(--surface);overflow:hidden}
#preview-shell#preview-shell .portal-category>summary{display:flex;align-items:center;gap:9px;padding:12px;cursor:pointer;list-style:none;font-weight:400;line-height:1.4;text-decoration:none!important}
.portal-category>summary::-webkit-details-marker{display:none}.portal-category>summary::before{content:"›";font-size:18px;line-height:1;color:var(--muted);transition:transform .15s}.portal-category[open]>summary::before{transform:rotate(90deg)}
.portal-category>summary .portal-category-name{flex:1;font-size:12px;font-weight:600}.portal-category>summary .portal-badge{max-width:60%;text-align:right;font-size:9px}.portal-category>summary:focus-visible{outline:2px solid var(--line-strong);outline-offset:-3px}.portal-category>summary:hover{background:var(--surface-2)}
#preview-shell#preview-shell .portal-category[open]>summary{border-bottom:1px solid var(--line)}
.portal-category-body{padding:10px}.portal-category-note,.portal-category-intro{font-size:10px;line-height:1.5;margin:0 0 10px}
@media(prefers-reduced-motion:reduce){.portal-category>summary::before{transition:none}}
@media(max-width:420px){#preview-shell#preview-shell .portal-category>summary{padding:10px;gap:7px}.portal-category>summary .portal-badge{font-size:8px}}



/* Categories stand on their own, without a second frame behind their cards. */
#preview-shell#preview-shell #sources.information-panel{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;margin:16px!important}
#preview-shell#preview-shell #sources .portal-category-intro{font-size:10px;line-height:1.55;color:var(--muted);margin:0 0 12px;padding:0 2px;max-width:78ch}
#sources .portal-category-intro strong{display:block;font-size:11px;font-weight:500;color:var(--text);margin-bottom:3px}
#sources .portal-category-note:empty{display:none}

#preview-shell#preview-shell .portal-status .portal-update-times>span{margin:0;padding:0;line-height:1.25}

#preview-shell#preview-shell .portal-status .portal-update-times,#preview-shell#preview-shell .portal-status .portal-update-times :is(span,time){font-size:7.7px!important;font-weight:400!important;line-height:1.3!important}

/* Long source summaries must remain inside narrow overview cards. */
#preview-shell#preview-shell .portal-overview-grid .portal-state{max-width:100%;box-sizing:border-box;white-space:normal!important;overflow-wrap:anywhere;min-width:0}
