/* Semantic scale calibrated from the reference Console Home at localhost:4323.
 * Font families, page-title scale and palette/design identities remain inherited. */
#main-content {
  --content-body-size: .9375rem;
  --content-body-leading: 1.6;
  --content-letter-leading: 1.75;
  --content-compact-size: .75rem;
  --content-meta-size: .6875rem;
  --content-card-title-size: 1rem;
  --content-section-title-size: 1rem;
  --content-heading-leading: 1.6;
  --content-intro-size: .875rem;
  --content-service-name-size: .8125rem;
}

/* Semantic reading categories apply to every active workspace, not individual pages. */
#main-content:is(.console-workspace, .article-shell, .page-shell) { font-size: var(--content-body-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(p, small, dd, li, a, input, output) { font-size: var(--content-body-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(h2, h3) { font-size: var(--content-card-title-size); line-height: var(--content-heading-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.widget-meta, .tag-list li, .badge, .post-date, .story-category, .about-role, .about-project-list article > div > span, .experience-list > article > span, .service-shell-summary-actions > p) { font-size: var(--content-meta-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .console-widget :is(.about-role, .widget-meta, .tag-list li, .badge, .post-date, .story-category) { font-size: var(--content-meta-size); line-height: var(--content-body-leading); }
/* Toolkit list values are operational metadata, not primary reading lists. */
#main-content:is(.console-workspace, .article-shell, .page-shell) .skills-widget .capability-groups li { font-size: var(--content-meta-size); line-height: var(--content-body-leading); font-family: var(--font-mono); font-weight: 400; }
#main-content:is(.console-workspace, .article-shell, .page-shell) .skills-widget .capability-groups h3 { font-family: var(--font-mono); }
/* The recovered, byte-pinned .about-role alone forces font-size:11px!important.
 * Match that priority only for this metadata label; do not reset other content. */
#main-content.console-workspace .about-role { font-size: var(--content-meta-size) !important; }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.service-shell-summary dd code, .service-column-route, .service-status, .story-breadcrumb, .story-breadcrumb a, .service-shell-view-tabs a) { font-size: var(--content-meta-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .service-shell-summary-actions a { font-size: var(--content-body-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.article-content p, .article-content li, .recommendation-text p) { font-size: var(--content-body-size); line-height: var(--content-letter-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .article-content h2 { font-size: var(--content-section-title-size); line-height: var(--content-heading-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.recommendation-quote, .recommendation-quote-author, .recommendation-link, .recommendation-name) { font-size: var(--content-body-size); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .recommendation-quote { line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.recommendation-role, .recommendation-entry, .recommendation-back, .recommendation-originals, .recommendation-originals a) { font-size: var(--content-body-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .recommendation-meta { font-size: var(--content-meta-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .article-content :is(pre, code) { font-size: var(--content-meta-size); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.experience-list article, .about-project-list article) { padding: 24px; }
#main-content:is(.console-workspace, .article-shell, .page-shell) .service-shell-summary dl > div { padding-block: 16px; }

/* Compact controls and operational data are not reading prose or headings. */
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.widget-header p, .workspace-kicker, dt, .widget-intro, .service-purpose, .command-help-strip p, .shell-help-widget p) { font-size: var(--content-compact-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.service-catalog-toolbar label, .status-table dd, .capability-groups h3) { font-size: var(--content-meta-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .service-shell-summary dd { font-size: var(--content-compact-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) :is(.service-name strong, .quick-start-grid strong) { font-size: var(--content-service-name-size); line-height: var(--content-body-leading); }
#main-content:is(.console-workspace, .article-shell, .page-shell) .workspace-heading > div > p:not(.workspace-kicker) { font-size: var(--content-intro-size); line-height: 1.55; }
#main-content:is(.console-workspace, .article-shell, .page-shell) .widget-footnote { font-size: var(--content-meta-size); line-height: 1.5; }
#main-content:is(.console-workspace, .article-shell, .page-shell) .shell-help-widget h2 { font-size: 1.3125rem; line-height: var(--content-heading-leading); }

/* Center the complete post at the existing body measure, without narrowing
 * screenshots, diagrams, code or tables. Reading text remains left-aligned. */
#main-content.article-shell > article { width: 100%; max-width: 820px; margin-inline: auto; text-align: left; }
#main-content.article-shell .article-content { text-align: left; }
#main-content.article-shell .article-content img[src="/media/py-pwsh-session/logo.png"] { display: block; width: 180px; max-width: 100%; height: auto; margin-inline: auto; background: transparent; }
#main-content.article-shell .article-content figure:has(img[src="/media/py-pwsh-session/logo.png"]) { background: transparent; }
#main-content.article-shell .article-content figure:has(img[src="/media/prowler/69ba8a7d5f46791bec55cfec_image.png"]) { text-align: center; }
#main-content.article-shell .article-content figure:has(img[src="/media/prowler/69ba8a7d5f46791bec55cfec_image.png"]) figcaption { text-align: center; }
#main-content.article-shell .article-content img[src="/media/prowler/69ba8a7d5f46791bec55cfec_image.png"] { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
@media (max-width: 760px) {
  #main-content.article-shell .article-content img[src="/media/py-pwsh-session/logo.png"] { width: 160px; }
}

/* Enlarge only the About identity portrait; keep its text column and crop. */
#main-content .about-service-identity {
  --about-portrait-size: 144px;
  grid-template-columns: var(--about-portrait-size) minmax(0, 1fr);
}
#main-content .about-service-identity .profile-avatar.about-avatar {
  width: var(--about-portrait-size);
  height: var(--about-portrait-size);
}
@media (max-width: 760px) {
  #main-content .about-service-identity { --about-portrait-size: 104px; }
}

/* Default dark alone mirrors the light shell's structure with black surfaces.
 * Provider palettes and every light palette keep their original color tokens. */
html[data-theme="dark"][data-design-mode]:not([data-cloud-theme]) {
  --background: #000; --surface: #000; --surface-raised: #000; --surface-subtle: #000;
  --header: #000; --header-raised: #000; --border: #282828; --interactive-soft: #000;
  --global-bar: #000; --global-bar-raised: #000; --global-bar-surface: #000; --global-bar-hover: #000;
  --global-bar-border: #282828; --global-bar-border-strong: #505050;
  --terminal: #000; --terminal-surface: #000; --terminal-surface-raised: #000;
  --terminal-surface-subtle: #000; --terminal-surface-hover: #000; --terminal-input: #000;
  --terminal-control: #000; --terminal-control-hover: #000; --terminal-keycap-background: #000;
  --terminal-keycap-foreground: var(--text);
  --doodle-thought-surface: #000; --doodle-thought-tail: #000;
  --global-bar-shadow: none; --terminal-shadow: none;
}
html[data-theme="dark"]:not([data-cloud-theme]) body,
html[data-theme="dark"]:not([data-cloud-theme]) #main-content:is(.console-workspace, .article-shell, .page-shell) { background: #000; }
html[data-theme="dark"]:not([data-cloud-theme]) :is(.console-widget, .widget-header, .experience-group, .capability-groups, .capability-groups section, .quick-start-grid, .quick-start-grid a, .service-catalog, .service-catalog-toolbar, .service-catalog-columns, .service-catalog-row, .status-table, .status-table > div, .console-header, .console-app-bar, .console-sub-bar, .utility-popover, .doodle-side-panel, .terminal-panel, .terminal-resize-handle, .post-row, .article-content blockquote, .contact-notification, .notification-badge) { background: #000; background-image: none; box-shadow: none; }
html[data-theme="dark"]:not([data-cloud-theme]) :is(.skip-link, .doodle-composer button, .terminal-actions button, .terminal-input-row button) { background: #000; color: var(--text); }
html[data-theme="dark"]:not([data-cloud-theme]) .doodle-composer button:disabled { color: var(--global-bar-muted); }
html[data-theme="dark"]:not([data-cloud-theme]) :is(.icon-button, .utility-text-button, .doodle-side-header button, .doodle-composer button, .terminal-actions button, .terminal-input-row button):is(:hover, [aria-expanded="true"]) { outline: 1px solid var(--global-bar-border-strong); outline-offset: -1px; }
html[data-theme="dark"]:not([data-cloud-theme]) :is(button, input, select, a):focus-visible { outline: 2px solid var(--interactive); outline-offset: 2px; }

/* A rotated maximalist article heading needs real paint room inside its shell. */
html[data-design-mode="maximalist"] #main-content.article-shell .article-header { padding-inline: 12px; }

/* At tablet widths the original max-content utility bar exceeds the viewport.
 * Wrap the real items instead of clipping/scrolling them or shrinking their text. */
@media (min-width: 761px) and (max-width: 1080px) {
  html[data-theme] { --header-height: 154px; }
  .console-header .console-app-bar { height: auto; min-height: 122px; flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .console-header .command-search { flex: 1 1 260px; min-width: 0; }
  .console-header .utility-nav { flex: 1 1 100%; min-width: 0; width: 100%; flex-wrap: wrap; height: auto; margin-left: 0; }
  .console-header .account-cluster { flex: 1 1 190px; min-width: 0; width: auto; }
}
