Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Portal.css: Difference between revisions

MediaWiki interface page
Joe Beaudoin Jr. (talk | contribs)
No edit summary
Joe Beaudoin Jr. (talk | contribs)
No edit summary
 
Line 672: Line 672:
     overflow: hidden;
     overflow: hidden;
     background: var( --color-surface-3, #111 );
     background: var( --color-surface-3, #111 );
    /* sits outside the widget card — spans full main column width */
     border-radius: var( --border-radius-large, 8px );
     border-radius: var( --border-radius-large, 8px );
     margin-bottom: 16px;
     margin-bottom: 16px;
Line 684: Line 683:
     background-size: cover;
     background-size: cover;
     background-position: center;
     background-position: center;
     transition: background-image 0.4s ease;
     transition: background-image 0.5s ease;
}
}


/* Gradient overlay so text is legible over any image */
/* Gradient overlay — stronger at bottom-left for text legibility */
.portal-hero-overlay {
.portal-hero-overlay {
     position: absolute;
     position: absolute;
     inset: 0;
     inset: 0;
     background: linear-gradient(
     background: linear-gradient(
         to top,
         to top right,
         rgba( 0, 0, 0, 0.72 ) 0%,
         rgba( 0, 0, 0, 0.85 ) 0%,
         rgba( 0, 0, 0, 0.35 ) 45%,
         rgba( 0, 0, 0, 0.5 ) 35%,
         transparent 100%
         transparent 65%
     );
     );
}
}


/* Clickable overlay covering the image area */
/* Clickable overlay — full hero area, below content and nav */
.portal-hero-link {
.portal-hero-link {
     position: absolute;
     position: absolute;
     inset: 0;
     inset: 0;
    bottom: 36px; /* stop above the nav bar */
     z-index: 1;
     z-index: 1;
     display: block;
     display: block;
Line 714: Line 712:
}
}


/* Content area — sits above overlay */
/* Content area — bottom-left, matches Main Page bsw-slide-content */
.portal-hero-content {
.portal-hero-content {
     position: absolute;
     position: absolute;
     bottom: 44px; /* leave room for nav bar */
     bottom: 0;
     left: 0;
     left: 0;
     right: 0;
     width: 55%;
     padding: 0 16px 12px;
     padding: 0 20px 20px;
     z-index: 2;
     z-index: 2;
    pointer-events: none; /* let link overlay handle clicks */
}
/* Series badge pill above title — matches bsw-slide-badge */
.portal-hero-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba( 255, 255, 255, 0.9 );
    background: rgba( 0, 0, 0, 0.45 );
    border: 1px solid rgba( 255, 255, 255, 0.3 );
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 6px;
}
}


.portal-hero-caption {
/* Article title — matches bsw-slide-title */
.portal-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
     color: #fff;
     color: #fff;
     font-size: var( --font-size-small, 0.875em );
     line-height: 1.25;
     line-height: 1.4;
    margin-bottom: 6px;
     text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.6 );
    text-shadow: 0 1px 4px rgba( 0, 0, 0, 0.9 );
    max-width: 80%;
}
    /* clamp to 2 lines */
 
/* Short extract — matches bsw-slide-extract */
.portal-hero-extract {
    font-size: 0.8rem;
    color: rgba( 255, 255, 255, 0.82 );
     line-height: 1.5;
     text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.8 );
     display: -webkit-box;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-line-clamp: 3;
     -webkit-box-orient: vertical;
     -webkit-box-orient: vertical;
     overflow: hidden;
     overflow: hidden;
}
}


/* Bottom nav bar */
/* Legacy caption wrapper — kept for compat, unstyled */
.portal-hero-caption {}
 
/* Nav — bottom-right, matches Main Page arrow placement */
.portal-hero-nav {
.portal-hero-nav {
     position: absolute;
     position: absolute;
     bottom: 0;
     bottom: 12px;
    left: 0;
     right: 14px;
     right: 0;
    height: 36px;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
    justify-content: center;
     gap: 6px;
     gap: 6px;
     z-index: 3;
     z-index: 3;
    background: rgba( 0, 0, 0, 0.35 );
    -webkit-backdrop-filter: blur( 4px );
    backdrop-filter: blur( 4px );
}
}


Line 757: Line 777:
.portal-hero-next {
.portal-hero-next {
     color: #fff;
     color: #fff;
     font-size: 1.2em;
     font-size: 1.3em;
     line-height: 1;
     line-height: 1;
     cursor: pointer;
     cursor: pointer;
     padding: 4px 8px;
     width: 28px;
     border-radius: var( --border-radius-base, 4px );
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
     border-radius: 50%;
    background: rgba( 0, 0, 0, 0.45 );
    border: 1px solid rgba( 255, 255, 255, 0.25 );
     user-select: none;
     user-select: none;
    opacity: 0.8;
     transition: background 0.15s;
     transition: opacity 0.15s;
}
}


.portal-hero-prev:hover,
.portal-hero-prev:hover,
.portal-hero-next:hover {
.portal-hero-next:hover {
     opacity: 1;
     background: rgba( 0, 0, 0, 0.7 );
}
}


Line 782: Line 807:
     height: 6px;
     height: 6px;
     border-radius: 50%;
     border-radius: 50%;
     background: rgba( 255, 255, 255, 0.45 );
     background: rgba( 255, 255, 255, 0.4 );
     cursor: pointer;
     cursor: pointer;
     transition: background 0.2s, transform 0.2s;
     transition: background 0.2s, transform 0.2s;
Line 789: Line 814:
.portal-hero-dot.is-active {
.portal-hero-dot.is-active {
     background: #fff;
     background: #fff;
     transform: scale( 1.3 );
     transform: scale( 1.35 );
}
}


/* Footer bar: edit list + browse gallery links */
/* Browse gallery — top-right pill, same as before */
.portal-hero-footer {
.portal-hero-footer {
     position: absolute;
     position: absolute;
     top: 8px;
     top: 10px;
     right: 10px;
     right: 12px;
     z-index: 3;
     z-index: 3;
     display: flex;
     display: flex;
     gap: 10px;
     gap: 8px;
     align-items: center;
     align-items: center;
     font-size: var( --font-size-x-small, 0.72em );
     font-size: var( --font-size-x-small, 0.72em );
Line 806: Line 831:
.portal-hero-edit,
.portal-hero-edit,
.portal-hero-footer a {
.portal-hero-footer a {
     color: rgba( 255, 255, 255, 0.75 ) !important;
     color: rgba( 255, 255, 255, 0.8 ) !important;
     text-decoration: none !important;
     text-decoration: none !important;
     background: rgba( 0, 0, 0, 0.4 );
     background: rgba( 0, 0, 0, 0.45 );
     padding: 2px 7px;
     padding: 3px 9px;
     border-radius: 999px;
     border-radius: 999px;
    border: 1px solid rgba( 255, 255, 255, 0.2 );
     transition: color 0.15s, background 0.15s;
     transition: color 0.15s, background 0.15s;
}
}
Line 817: Line 843:
.portal-hero-footer a:hover {
.portal-hero-footer a:hover {
     color: #fff !important;
     color: #fff !important;
     background: rgba( 0, 0, 0, 0.6 );
     background: rgba( 0, 0, 0, 0.65 );
}
}


/* Collapse to taller ratio on narrow screens so image still shows */
@media screen and ( max-width: 600px ) {
@media screen and ( max-width: 600px ) {
     .portal-hero {
     .portal-hero {
         aspect-ratio: 4 / 3;
         aspect-ratio: 4 / 3;
     }
     }
     .portal-hero-caption {
     .portal-hero-content {
         max-width: 100%;
         width: 90%;
    }
    .portal-hero-extract {
        -webkit-line-clamp: 2;
     }
     }
}
}

Latest revision as of 02:39, 14 April 2026

/*
 * Portal layout — BattlestarWiki
 * MediaWiki:Portal.css
 *
 * Loaded via MediaWiki:Citizen.js — do not add to MediaWiki:Common.css.
 * Uses Citizen skin CSS custom properties throughout so light/dark mode
 * and any theme overrides apply automatically.
 *
 * Citizen property reference:
 *   --color-surface-0        page background
 *   --color-surface-1        card / widget background
 *   --color-surface-2        subtle raised surface (headers, pills)
 *   --color-surface-3        more raised (hover states)
 *   --color-base             primary text
 *   --color-base--subtle     muted / secondary text
 *   --color-link             link blue
 *   --color-primary          accent (Citizen teal/blue)
 *   --border-color-base      standard border
 *   --border-color-interactive  hovered border
 *   --border-radius-medium   ~4–6px
 *   --border-radius-large    ~8px
 *   --font-size-small        ~0.8125rem
 *   --font-size-x-small      ~0.75rem
 */

/* ─────────────────────────────────────────────────────────────
   PAGE SHELL
   ───────────────────────────────────────────────────────────── */

.portal-page {
    max-width: 1100px;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────
   HEADER  (title · badge · breadcrumb · stats bar)
   ───────────────────────────────────────────────────────────── */

.portal-header {
    background: var( --color-surface-2 );
    border: 1px solid var( --border-color-base );
    border-radius: var( --border-radius-large, 8px );
    padding: 14px 18px;
    margin-bottom: 12px;
}

.portal-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.portal-title {
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.3;
    color: var( --color-base );
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-badge {
    font-size: var( --font-size-x-small, 0.75em );
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid var( --border-color-base );
    color: var( --color-base--subtle );
    background: var( --color-surface-1 );
    vertical-align: middle;
}

.portal-breadcrumb {
    font-size: var( --font-size-small, 0.8125em );
    color: var( --color-base--subtle );
    margin-top: 3px;
}

.portal-header-links {
    font-size: var( --font-size-small, 0.8125em );
    color: var( --color-base--subtle );
    white-space: nowrap;
    padding-top: 4px;
}

/* Stats bar */

.portal-stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    border-top: 1px solid var( --border-color-base );
    padding-top: 10px;
}

.portal-stat {
    text-align: center;
    min-width: 50px;
}

.portal-stat-num {
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.2;
    color: var( --color-base );
}

.portal-stat-label {
    font-size: var( --font-size-x-small, 0.72em );
    color: var( --color-base--subtle );
    margin-top: 1px;
}

/* ─────────────────────────────────────────────────────────────
   SERIES NAVIGATION PILLS
   ───────────────────────────────────────────────────────────── */

.portal-series-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
    align-items: center;
}

/* MW wraps link text in <a>; strip default link styling */
.portal-series-nav a {
    color: inherit;
    text-decoration: none;
}

.portal-series-pill {
    display: inline-block;
    font-size: var( --font-size-small, 0.8em );
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var( --border-color-base );
    color: var( --color-base--subtle );
    background: var( --color-surface-1 );
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.portal-series-pill:hover {
    border-color: var( --border-color-interactive );
    background: var( --color-surface-3, var( --color-surface-2 ) );
    color: var( --color-base );
}

.portal-series-pill--active {
    border-color: var( --border-color-interactive );
    background: var( --color-surface-2 );
    color: var( --color-base );
    font-weight: 600;
    cursor: default;
}

.portal-series-pill--jump {
    border-style: dashed;
}

/* Visual spacer between series pills and topic pills */
.portal-series-pill-sep {
    flex: 0 0 8px;
}

/* ─────────────────────────────────────────────────────────────
   MAIN TWO-COLUMN GRID
   ───────────────────────────────────────────────────────────── */

.portal-main-grid {
    display: grid;
    grid-template-columns: 1fr 270px;
    gap: 12px;
    align-items: start;
}

@media screen and ( max-width: 800px ) {
    .portal-main-grid {
        grid-template-columns: 1fr;
    }
}

.portal-main-col,
.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─────────────────────────────────────────────────────────────
   WIDGET CARD
   ───────────────────────────────────────────────────────────── */

.portal-widget {
    background: var( --color-surface-2 );
    border: 1px solid var( --border-color-base );
    border-radius: var( --border-radius-large, 8px );
    overflow: hidden;
}

.portal-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var( --border-color-base );
    background: var( --color-surface-2 );
    gap: 8px;
    flex-wrap: wrap;
}

.portal-widget-title {
    font-size: var( --font-size-small, 0.875em );
    font-weight: 600;
    color: var( --color-base );
}

.portal-widget-meta {
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-base--subtle );
    flex: 1;
    text-align: right;
}

.portal-widget-edit {
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-link );
    white-space: nowrap;
}

.portal-widget-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    border-top: 1px solid var( --border-color-base );
    background: var( --color-surface-1 );
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-base--subtle );
    gap: 8px;
    flex-wrap: wrap;
}

.portal-widget-body {
    padding: 12px 14px;
    background: var( --color-surface-1 );
}

/* ─────────────────────────────────────────────────────────────
   IMAGE CAROUSEL
   ───────────────────────────────────────────────────────────── */

.portal-slider-wrapper {
    padding: 10px;
}

.portal-slider-image {
    display: block;
    width: 100%;
    border-radius: var( --border-radius-medium, 6px );
    max-height: 260px;
    object-fit: cover;
}

.portal-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 160px;
    background: var( --color-surface-2 );
    border: 1px dashed var( --border-color-base );
    border-radius: var( --border-radius-medium, 6px );
    font-size: var( --font-size-small, 0.8em );
    color: var( --color-base--subtle );
    padding: 14px;
}

.portal-slider-caption {
    font-size: var( --font-size-x-small, 0.78em );
    color: var( --color-base--subtle );
    margin-top: 4px;
    min-height: 1.2em;
}

.portal-slider-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.portal-slider-prev,
.portal-slider-next {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var( --border-color-base );
    background: var( --color-surface-1 );
    color: var( --color-base );
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
    transition: background 0.15s;
}

.portal-slider-prev:hover,
.portal-slider-next:hover {
    background: var( --color-surface-2 );
}

.portal-slider-prev:focus-visible,
.portal-slider-next:focus-visible {
    outline: 2px solid var( --color-progressive, #36c );
    outline-offset: 1px;
}

.portal-slider-dots {
    display: flex;
    gap: 4px;
    flex: 1;
}

.portal-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var( --border-color-base );
    cursor: pointer;
    transition: background 0.2s;
}

.portal-slider-dot.is-active {
    background: var( --color-base );
}

.portal-slider-counter {
    flex-shrink: 0;
    font-size: var( --font-size-x-small, 0.78em );
    color: var( --color-base--subtle );
}

.portal-slider-source {
    white-space: nowrap;
    font-size: var( --font-size-x-small, 0.78em );
    color: var( --color-link );
    text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   NEWEST ARTICLE
   ───────────────────────────────────────────────────────────── */

.portal-newest-inner {
    font-size: var( --font-size-small, 0.875em );
    min-height: 52px; /* prevents layout jump before JS populates */
}

.portal-newest-title {
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 2px;
}

.portal-newest-meta {
    font-size: var( --font-size-x-small, 0.8em );
    color: var( --color-base--subtle );
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────
   COLONIAL CALENDAR
   ───────────────────────────────────────────────────────────── */

.portal-calendar-date {
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.2;
    color: var( --color-base );
}

.portal-calendar-sub {
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-base--subtle );
    margin-bottom: 10px;
}

.portal-calendar-events {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-calendar-event {
    font-size: var( --font-size-small, 0.82em );
    color: var( --color-base );
    padding: 6px 0;
    border-bottom: 1px solid var( --border-color-base );
    line-height: 1.5;
}

.portal-calendar-event:last-child {
    border-bottom: none;
}

.portal-calendar-year {
    font-weight: 600;
    color: var( --color-base--subtle );
    margin-right: 2px;
}

.portal-calendar-none {
    font-size: var( --font-size-small, 0.82em );
    color: var( --color-base--subtle );
}

/* ─────────────────────────────────────────────────────────────
   RELATED PORTALS GRID
   ───────────────────────────────────────────────────────────── */

.portal-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.portal-related-tile {
    background: var( --color-surface-2 );
    border: 1px solid var( --border-color-base );
    border-radius: var( --border-radius-medium, 6px );
    padding: 7px 10px;
    font-size: var( --font-size-small, 0.8em );
    transition: border-color 0.15s;
}

.portal-related-tile:hover {
    border-color: var( --border-color-interactive );
}

.portal-related-title {
    font-weight: 600;
}

.portal-related-title a {
    color: var( --color-base );
    text-decoration: none;
}

.portal-related-sub {
    font-size: var( --font-size-x-small, 0.85em );
    color: var( --color-base--subtle );
    margin-top: 1px;
}

/* ─────────────────────────────────────────────────────────────
   DID YOU KNOW
   ───────────────────────────────────────────────────────────── */

.portal-dyk-body li,
.portal-dyk-body p {
    font-size: var( --font-size-small, 0.875em );
    line-height: 1.6;
    padding: 6px 0;
    border-bottom: 1px solid var( --border-color-base );
    margin: 0;
}

.portal-dyk-body li:last-child,
.portal-dyk-body p:last-child {
    border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────
   ORPHANED ARTICLES CHIPS
   ───────────────────────────────────────────────────────────── */

.portal-orphan-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.portal-orphan-chip {
    font-size: var( --font-size-x-small, 0.75em );
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #c8a000; /* amber — no Citizen variable for warning */
    color: #7a5c00;
    background: #fdf7e3;
    white-space: nowrap;
}

/* Dark mode override for orphan chips (Citizen sets data-theme on <html>) */
html[ data-skin-citizen-theme="dark" ] .portal-orphan-chip,
@media ( prefers-color-scheme: dark ) {
    .portal-orphan-chip {
        background: #2a2200;
        border-color: #6a4e00;
        color: #d4a800;
    }
}

/* ─────────────────────────────────────────────────────────────
   CATEGORIES CLOUD
   ───────────────────────────────────────────────────────────── */

.portal-cat-section {
    margin-bottom: 8px;
}

.portal-cat-section:last-of-type {
    margin-bottom: 0;
}

.portal-cat-label {
    font-size: var( --font-size-x-small, 0.72em );
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var( --color-base--subtle );
    margin-bottom: 4px;
}

.portal-cat-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.portal-cat-tag {
    font-size: var( --font-size-x-small, 0.75em );
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var( --border-color-base );
    color: var( --color-base--subtle );
    background: var( --color-surface-2 );
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.15s;
}

.portal-cat-tag:hover {
    border-color: var( --border-color-interactive );
    color: var( --color-base );
}

/* ─────────────────────────────────────────────────────────────
   SUBPORTALS TWO-COLUMN LINK LIST
   ───────────────────────────────────────────────────────────── */

.portal-subportals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media screen and ( max-width: 500px ) {
    .portal-subportals {
        grid-template-columns: 1fr;
    }
}

.portal-subportals-heading {
    font-size: var( --font-size-small, 0.875em );
    font-weight: 600;
    color: var( --color-base );
    margin-bottom: 6px;
}

.portal-subportals-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-subportals-list li {
    font-size: var( --font-size-small, 0.875em );
    line-height: 1.4;
    padding-left: 10px;
    position: relative;
}

.portal-subportals-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var( --color-base--subtle );
}

/* ─────────────────────────────────────────────────────────────
   CHARACTER GRID
   ───────────────────────────────────────────────────────────── */

.portal-char-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 90px, 1fr ) );
    gap: 8px;
}

.portal-char-card {
    /* MW wraps [[Link|...]] in <a>, so we style the card container */
}

.portal-char-card a {
    display: block;
    text-decoration: none !important;
    border-radius: var( --border-radius-medium, 6px );
    overflow: hidden;
    border: 1px solid var( --border-color-base );
    transition: border-color 0.15s, transform 0.15s;
    background: var( --color-surface-2 );
}

.portal-char-card a:hover {
    border-color: var( --border-color-interactive );
    transform: translateY( -2px );
}

/* frameless File: renders as <a class="mw-file-description"><img class="mw-file-element"></a> */
.portal-char-card .mw-file-description {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var( --color-surface-2 );
    line-height: 0;
}

.portal-char-card .mw-file-element {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block;
    float: none !important;
    margin: 0 !important;
}

.portal-char-name {
    font-size: var( --font-size-x-small, 0.72em );
    color: var( --color-base );
    text-align: center;
    padding: 4px 4px 5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}/* ─────────────────────────────────────────────────────────────
   PORTAL HERO SLIDER  (matches bsw-hero pattern from Main Page)
   ───────────────────────────────────────────────────────────── */

.portal-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: var( --color-surface-3, #111 );
    border-radius: var( --border-radius-large, 8px );
    margin-bottom: 16px;
    cursor: default;
}

/* Background image layer */
.portal-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease;
}

/* Gradient overlay — stronger at bottom-left for text legibility */
.portal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top right,
        rgba( 0, 0, 0, 0.85 ) 0%,
        rgba( 0, 0, 0, 0.5 ) 35%,
        transparent 65%
    );
}

/* Clickable overlay — full hero area, below content and nav */
.portal-hero-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    cursor: pointer;
}

.portal-hero-link:focus-visible {
    outline: 3px solid var( --color-progressive, #36c );
    outline-offset: -3px;
}

/* Content area — bottom-left, matches Main Page bsw-slide-content */
.portal-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 55%;
    padding: 0 20px 20px;
    z-index: 2;
    pointer-events: none; /* let link overlay handle clicks */
}

/* Series badge pill above title — matches bsw-slide-badge */
.portal-hero-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba( 255, 255, 255, 0.9 );
    background: rgba( 0, 0, 0, 0.45 );
    border: 1px solid rgba( 255, 255, 255, 0.3 );
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 6px;
}

/* Article title — matches bsw-slide-title */
.portal-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 6px;
    text-shadow: 0 1px 4px rgba( 0, 0, 0, 0.9 );
}

/* Short extract — matches bsw-slide-extract */
.portal-hero-extract {
    font-size: 0.8rem;
    color: rgba( 255, 255, 255, 0.82 );
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.8 );
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Legacy caption wrapper — kept for compat, unstyled */
.portal-hero-caption {}

/* Nav — bottom-right, matches Main Page arrow placement */
.portal-hero-nav {
    position: absolute;
    bottom: 12px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
}

.portal-hero-prev,
.portal-hero-next {
    color: #fff;
    font-size: 1.3em;
    line-height: 1;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba( 0, 0, 0, 0.45 );
    border: 1px solid rgba( 255, 255, 255, 0.25 );
    user-select: none;
    transition: background 0.15s;
}

.portal-hero-prev:hover,
.portal-hero-next:hover {
    background: rgba( 0, 0, 0, 0.7 );
}

.portal-hero-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.portal-hero-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba( 255, 255, 255, 0.4 );
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.portal-hero-dot.is-active {
    background: #fff;
    transform: scale( 1.35 );
}

/* Browse gallery — top-right pill, same as before */
.portal-hero-footer {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 3;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: var( --font-size-x-small, 0.72em );
}

.portal-hero-edit,
.portal-hero-footer a {
    color: rgba( 255, 255, 255, 0.8 ) !important;
    text-decoration: none !important;
    background: rgba( 0, 0, 0, 0.45 );
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba( 255, 255, 255, 0.2 );
    transition: color 0.15s, background 0.15s;
}

.portal-hero-edit:hover,
.portal-hero-footer a:hover {
    color: #fff !important;
    background: rgba( 0, 0, 0, 0.65 );
}

@media screen and ( max-width: 600px ) {
    .portal-hero {
        aspect-ratio: 4 / 3;
    }
    .portal-hero-content {
        width: 90%;
    }
    .portal-hero-extract {
        -webkit-line-clamp: 2;
    }
}

/* ─────────────────────────────────────────────────────────────
   PAGE SHELL
   ───────────────────────────────────────────────────────────── */

.portal-page {
    max-width: 1100px;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────
   HEADER  (title · badge · breadcrumb · stats bar)
   ───────────────────────────────────────────────────────────── */

.portal-header {
    background: var( --color-surface-2 );
    border: 1px solid var( --border-color-base );
    border-radius: var( --border-radius-large, 8px );
    padding: 14px 18px;
    margin-bottom: 12px;
}

.portal-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.portal-title {
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.3;
    color: var( --color-base );
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-badge {
    font-size: var( --font-size-x-small, 0.75em );
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid var( --border-color-base );
    color: var( --color-base--subtle );
    background: var( --color-surface-1 );
    vertical-align: middle;
}

.portal-breadcrumb {
    font-size: var( --font-size-small, 0.8125em );
    color: var( --color-base--subtle );
    margin-top: 3px;
}

.portal-header-links {
    font-size: var( --font-size-small, 0.8125em );
    color: var( --color-base--subtle );
    white-space: nowrap;
    padding-top: 4px;
}

/* Stats bar */

.portal-stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    border-top: 1px solid var( --border-color-base );
    padding-top: 10px;
}

.portal-stat {
    text-align: center;
    min-width: 50px;
}

.portal-stat-num {
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.2;
    color: var( --color-base );
}

.portal-stat-label {
    font-size: var( --font-size-x-small, 0.72em );
    color: var( --color-base--subtle );
    margin-top: 1px;
}

/* ─────────────────────────────────────────────────────────────
   SERIES NAVIGATION PILLS
   ───────────────────────────────────────────────────────────── */

.portal-series-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
    align-items: center;
}

/* MW wraps link text in <a>; strip default link styling */
.portal-series-nav a {
    color: inherit;
    text-decoration: none;
}

.portal-series-pill {
    display: inline-block;
    font-size: var( --font-size-small, 0.8em );
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var( --border-color-base );
    color: var( --color-base--subtle );
    background: var( --color-surface-1 );
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.portal-series-pill:hover {
    border-color: var( --border-color-interactive );
    background: var( --color-surface-3, var( --color-surface-2 ) );
    color: var( --color-base );
}

.portal-series-pill--active {
    border-color: var( --border-color-interactive );
    background: var( --color-surface-2 );
    color: var( --color-base );
    font-weight: 600;
    cursor: default;
}

.portal-series-pill--jump {
    border-style: dashed;
}

/* Visual spacer between series pills and topic pills */
.portal-series-pill-sep {
    flex: 0 0 8px;
}

/* ─────────────────────────────────────────────────────────────
   MAIN TWO-COLUMN GRID
   ───────────────────────────────────────────────────────────── */

.portal-main-grid {
    display: grid;
    grid-template-columns: 1fr 270px;
    gap: 12px;
    align-items: start;
}

@media screen and ( max-width: 800px ) {
    .portal-main-grid {
        grid-template-columns: 1fr;
    }
}

.portal-main-col,
.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─────────────────────────────────────────────────────────────
   WIDGET CARD
   ───────────────────────────────────────────────────────────── */

.portal-widget {
    background: var( --color-surface-2 );
    border: 1px solid var( --border-color-base );
    border-radius: var( --border-radius-large, 8px );
    overflow: hidden;
}

.portal-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var( --border-color-base );
    background: var( --color-surface-2 );
    gap: 8px;
    flex-wrap: wrap;
}

.portal-widget-title {
    font-size: var( --font-size-small, 0.875em );
    font-weight: 600;
    color: var( --color-base );
}

.portal-widget-meta {
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-base--subtle );
    flex: 1;
    text-align: right;
}

.portal-widget-edit {
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-link );
    white-space: nowrap;
}

.portal-widget-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    border-top: 1px solid var( --border-color-base );
    background: var( --color-surface-1 );
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-base--subtle );
    gap: 8px;
    flex-wrap: wrap;
}

.portal-widget-body {
    padding: 12px 14px;
    background: var( --color-surface-1 );
}

/* ─────────────────────────────────────────────────────────────
   IMAGE CAROUSEL
   ───────────────────────────────────────────────────────────── */

.portal-slider-wrapper {
    padding: 10px;
}

.portal-slider-image {
    display: block;
    width: 100%;
    border-radius: var( --border-radius-medium, 6px );
    max-height: 260px;
    object-fit: cover;
}

.portal-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 160px;
    background: var( --color-surface-2 );
    border: 1px dashed var( --border-color-base );
    border-radius: var( --border-radius-medium, 6px );
    font-size: var( --font-size-small, 0.8em );
    color: var( --color-base--subtle );
    padding: 14px;
}

.portal-slider-caption {
    font-size: var( --font-size-x-small, 0.78em );
    color: var( --color-base--subtle );
    margin-top: 4px;
    min-height: 1.2em;
}

.portal-slider-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.portal-slider-prev,
.portal-slider-next {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var( --border-color-base );
    background: var( --color-surface-1 );
    color: var( --color-base );
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
    transition: background 0.15s;
}

.portal-slider-prev:hover,
.portal-slider-next:hover {
    background: var( --color-surface-2 );
}

.portal-slider-prev:focus-visible,
.portal-slider-next:focus-visible {
    outline: 2px solid var( --color-progressive, #36c );
    outline-offset: 1px;
}

.portal-slider-dots {
    display: flex;
    gap: 4px;
    flex: 1;
}

.portal-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var( --border-color-base );
    cursor: pointer;
    transition: background 0.2s;
}

.portal-slider-dot.is-active {
    background: var( --color-base );
}

.portal-slider-counter {
    flex-shrink: 0;
    font-size: var( --font-size-x-small, 0.78em );
    color: var( --color-base--subtle );
}

.portal-slider-source {
    white-space: nowrap;
    font-size: var( --font-size-x-small, 0.78em );
    color: var( --color-link );
    text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   NEWEST ARTICLE
   ───────────────────────────────────────────────────────────── */

.portal-newest-inner {
    font-size: var( --font-size-small, 0.875em );
    min-height: 52px; /* prevents layout jump before JS populates */
}

.portal-newest-title {
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 2px;
}

.portal-newest-meta {
    font-size: var( --font-size-x-small, 0.8em );
    color: var( --color-base--subtle );
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────
   COLONIAL CALENDAR
   ───────────────────────────────────────────────────────────── */

.portal-calendar-date {
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.2;
    color: var( --color-base );
}

.portal-calendar-sub {
    font-size: var( --font-size-x-small, 0.75em );
    color: var( --color-base--subtle );
    margin-bottom: 10px;
}

.portal-calendar-events {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-calendar-event {
    font-size: var( --font-size-small, 0.82em );
    color: var( --color-base );
    padding: 6px 0;
    border-bottom: 1px solid var( --border-color-base );
    line-height: 1.5;
}

.portal-calendar-event:last-child {
    border-bottom: none;
}

.portal-calendar-year {
    font-weight: 600;
    color: var( --color-base--subtle );
    margin-right: 2px;
}

.portal-calendar-none {
    font-size: var( --font-size-small, 0.82em );
    color: var( --color-base--subtle );
}

/* ─────────────────────────────────────────────────────────────
   RELATED PORTALS GRID
   ───────────────────────────────────────────────────────────── */

.portal-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.portal-related-tile {
    background: var( --color-surface-2 );
    border: 1px solid var( --border-color-base );
    border-radius: var( --border-radius-medium, 6px );
    padding: 7px 10px;
    font-size: var( --font-size-small, 0.8em );
    transition: border-color 0.15s;
}

.portal-related-tile:hover {
    border-color: var( --border-color-interactive );
}

.portal-related-title {
    font-weight: 600;
}

.portal-related-title a {
    color: var( --color-base );
    text-decoration: none;
}

.portal-related-sub {
    font-size: var( --font-size-x-small, 0.85em );
    color: var( --color-base--subtle );
    margin-top: 1px;
}

/* ─────────────────────────────────────────────────────────────
   DID YOU KNOW
   ───────────────────────────────────────────────────────────── */

.portal-dyk-body li,
.portal-dyk-body p {
    font-size: var( --font-size-small, 0.875em );
    line-height: 1.6;
    padding: 6px 0;
    border-bottom: 1px solid var( --border-color-base );
    margin: 0;
}

.portal-dyk-body li:last-child,
.portal-dyk-body p:last-child {
    border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────
   ORPHANED ARTICLES CHIPS
   ───────────────────────────────────────────────────────────── */

.portal-orphan-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.portal-orphan-chip {
    font-size: var( --font-size-x-small, 0.75em );
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #c8a000; /* amber — no Citizen variable for warning */
    color: #7a5c00;
    background: #fdf7e3;
    white-space: nowrap;
}

/* Dark mode override for orphan chips (Citizen sets data-theme on <html>) */
html[ data-skin-citizen-theme="dark" ] .portal-orphan-chip,
@media ( prefers-color-scheme: dark ) {
    .portal-orphan-chip {
        background: #2a2200;
        border-color: #6a4e00;
        color: #d4a800;
    }
}

/* ─────────────────────────────────────────────────────────────
   CATEGORIES CLOUD
   ───────────────────────────────────────────────────────────── */

.portal-cat-section {
    margin-bottom: 8px;
}

.portal-cat-section:last-of-type {
    margin-bottom: 0;
}

.portal-cat-label {
    font-size: var( --font-size-x-small, 0.72em );
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var( --color-base--subtle );
    margin-bottom: 4px;
}

.portal-cat-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.portal-cat-tag {
    font-size: var( --font-size-x-small, 0.75em );
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var( --border-color-base );
    color: var( --color-base--subtle );
    background: var( --color-surface-2 );
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.15s;
}

.portal-cat-tag:hover {
    border-color: var( --border-color-interactive );
    color: var( --color-base );
}

/* ─────────────────────────────────────────────────────────────
   SUBPORTALS TWO-COLUMN LINK LIST
   ───────────────────────────────────────────────────────────── */

.portal-subportals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media screen and ( max-width: 500px ) {
    .portal-subportals {
        grid-template-columns: 1fr;
    }
}

.portal-subportals-heading {
    font-size: var( --font-size-small, 0.875em );
    font-weight: 600;
    color: var( --color-base );
    margin-bottom: 6px;
}

.portal-subportals-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-subportals-list li {
    font-size: var( --font-size-small, 0.875em );
    line-height: 1.4;
    padding-left: 10px;
    position: relative;
}

.portal-subportals-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var( --color-base--subtle );
}

/* ─────────────────────────────────────────────────────────────
   CHARACTER GRID
   ───────────────────────────────────────────────────────────── */

.portal-char-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 90px, 1fr ) );
    gap: 8px;
}

.portal-char-card {
    /* MW wraps [[Link|...]] in <a>, so we style the card container */
}

.portal-char-card a {
    display: block;
    text-decoration: none !important;
    border-radius: var( --border-radius-medium, 6px );
    overflow: hidden;
    border: 1px solid var( --border-color-base );
    transition: border-color 0.15s, transform 0.15s;
    background: var( --color-surface-2 );
}

.portal-char-card a:hover {
    border-color: var( --border-color-interactive );
    transform: translateY( -2px );
}

/* frameless File: renders as <a class="mw-file-description"><img class="mw-file-element"></a> */
.portal-char-card .mw-file-description {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var( --color-surface-2 );
    line-height: 0;
}

.portal-char-card .mw-file-element {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block;
    float: none !important;
    margin: 0 !important;
}

.portal-char-name {
    font-size: var( --font-size-x-small, 0.72em );
    color: var( --color-base );
    text-align: center;
    padding: 4px 4px 5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────────────────────
   FEATURED EPISODE SLIDER NAV (in widget head)
   ───────────────────────────────────────────────────────────── */

.portal-featured-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.portal-featured-prev,
.portal-featured-next {
    cursor: pointer;
    font-size: 1em;
    color: var( --color-base );
    padding: 0 3px;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.portal-featured-prev:hover,
.portal-featured-next:hover {
    opacity: 1;
}

.portal-featured-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.portal-featured-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var( --border-color-base );
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.portal-featured-dot.is-active {
    background: var( --color-progressive, #3366cc );
    transform: scale( 1.3 );
}