/* ==========================================================================
   GridWatch — information-dense light utility skin.
   Light grey page, white bordered cards, blue accent, amber ratings.
   One stylesheet, system fonts only, no external imports.
   ========================================================================== */

:root {
    --gw-primary: #2563eb;
    --gw-primary-soft: #2563eb14;
    --gw-primary-line: #2563eb59;
    --gw-primary-dark: #1d4ed8;
    --gw-star: #f59e0b;
    --gw-bg: #f3f4f6;
    --gw-surface: #ffffff;
    --gw-surface-2: #f9fafb;
    --gw-border: #e5e7eb;
    --gw-border-2: #d1d5db;
    --gw-text: #111827;
    --gw-text-2: #374151;
    --gw-muted: #5b6472;
    --gw-radius: 6px;
    --gw-tap: 44px;
    --gw-shell: 1280px;
    --gw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --gw-shadow: 0 1px 2px rgba(17, 24, 39, .06);
    --gw-shadow-lg: 0 8px 24px rgba(17, 24, 39, .12);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--gw-bg);
    color: var(--gw-text);
    font-family: var(--gw-font);
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; border: 0; }
a { color: var(--gw-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; color: var(--gw-text); }
p { margin: 0 0 10px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: 2px solid var(--gw-primary); outline-offset: 2px; border-radius: 3px; }

/* ---- layout helpers ------------------------------------------------------ */
.gw-shell { width: 100%; max-width: var(--gw-shell); margin: 0 auto; padding: 0 16px; }
.gw-shell-narrow { max-width: 880px; }
.gw-main { display: block; padding: 18px 0 40px; }

.gw-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.gw-skip {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--gw-primary); color: #fff; padding: 10px 16px;
    border-radius: var(--gw-radius); font-weight: 600;
}
.gw-skip:focus { top: 12px; text-decoration: none; }

.gw-panel {
    background: var(--gw-surface);
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius);
    box-shadow: var(--gw-shadow);
    overflow: visible;
}

.gw-dot { color: var(--gw-border-2); }
.gw-star { color: var(--gw-star); margin-right: 3px; }

/* ---- header -------------------------------------------------------------- */
.gw-header { position: sticky; top: 0; z-index: 50; background: var(--gw-surface); }
.gw-header.is-stuck { box-shadow: 0 1px 6px rgba(17, 24, 39, .1); }
.gw-header-bar { background: var(--gw-surface); border-bottom: 1px solid var(--gw-border); }

.gw-header-inner {
    display: flex; align-items: center; gap: 16px;
    min-height: 58px; padding-top: 8px; padding-bottom: 8px;
}

.gw-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--gw-text); flex: none; }
.gw-brand:hover { text-decoration: none; }
.gw-brand-mark { width: 32px; height: 32px; border-radius: 5px; object-fit: contain; }
.gw-brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.2px; }

.gw-nav { display: flex; align-items: center; gap: 2px; flex: none; order: 3; }
.gw-nav-link {
    display: inline-flex; align-items: center; min-height: var(--gw-tap);
    padding: 0 10px; border-radius: var(--gw-radius);
    color: var(--gw-text-2); font-size: 14px; font-weight: 600;
}
.gw-nav-link:hover { background: var(--gw-surface-2); color: var(--gw-text); text-decoration: none; }
.gw-nav-link.is-active { color: var(--gw-primary); background: var(--gw-primary-soft); }

.gw-nav-toggle {
    display: none; align-items: center; justify-content: center; order: 4;
    width: var(--gw-tap); height: var(--gw-tap); flex: none;
    background: var(--gw-surface); border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius); cursor: pointer;
}
.gw-nav-toggle-bar, .gw-nav-toggle-bar::before, .gw-nav-toggle-bar::after {
    display: block; width: 18px; height: 2px; background: var(--gw-text); border-radius: 2px;
}
.gw-nav-toggle-bar { position: relative; }
.gw-nav-toggle-bar::before, .gw-nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.gw-nav-toggle-bar::before { top: -6px; }
.gw-nav-toggle-bar::after { top: 6px; }

.gw-mobile-nav { display: none; border-bottom: 1px solid var(--gw-border); background: var(--gw-surface); }
.gw-mobile-nav.is-open { display: block; }
.gw-mobile-nav-inner { display: flex; flex-direction: column; padding-top: 4px; padding-bottom: 8px; }
.gw-mobile-link {
    display: flex; align-items: center; min-height: var(--gw-tap);
    padding: 0 4px; color: var(--gw-text); font-weight: 600;
    border-bottom: 1px solid var(--gw-border);
}
.gw-mobile-link.is-active { color: var(--gw-primary); }

.gw-utility { background: var(--gw-surface-2); border-bottom: 1px solid var(--gw-border); }
.gw-utility-inner {
    display: flex; align-items: center; gap: 14px;
    overflow-x: auto; white-space: nowrap;
    scrollbar-width: none; -ms-overflow-style: none;
}
.gw-utility-inner::-webkit-scrollbar { height: 0; width: 0; }
.gw-utility-link {
    display: inline-flex; align-items: center; min-height: 38px;
    color: var(--gw-muted); font-size: 13px; font-weight: 600;
}
.gw-utility-link:hover { color: var(--gw-primary); }

/* ---- search -------------------------------------------------------------- */
.gw-search { display: flex; align-items: stretch; gap: 0; }
.gw-search-input {
    flex: 1 1 auto; min-width: 0; min-height: var(--gw-tap);
    padding: 0 12px; font: inherit; font-size: 14px; color: var(--gw-text);
    background: var(--gw-surface);
    border: 1px solid var(--gw-border-2);
    border-right: 0;
    border-radius: var(--gw-radius) 0 0 var(--gw-radius);
    -webkit-appearance: none; appearance: none;
}
.gw-search-input::placeholder { color: var(--gw-muted); }
.gw-search-input:focus { outline: 2px solid var(--gw-primary); outline-offset: -1px; }
.gw-search-submit {
    flex: none; min-height: var(--gw-tap); padding: 0 18px;
    background: var(--gw-primary); color: #fff; font-weight: 700; font-size: 14px;
    border: 1px solid var(--gw-primary); border-radius: 0 var(--gw-radius) var(--gw-radius) 0;
    cursor: pointer;
}
.gw-search-submit:hover { background: var(--gw-primary-dark); border-color: var(--gw-primary-dark); }

.gw-search-top { order: 2; flex: 1 1 auto; max-width: 620px; margin: 0 auto; }
.gw-search-inline { width: 100%; max-width: 520px; margin-top: 12px; }
/* landing search always fills its container */
.gw-lp-search { width: 100%; max-width: none; margin: 16px 0 0; }

/* ---- buttons, chips, badges --------------------------------------------- */
.gw-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: var(--gw-tap); padding: 0 16px;
    background: var(--gw-surface); color: var(--gw-text);
    border: 1px solid var(--gw-border-2); border-radius: var(--gw-radius);
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.gw-btn:hover { border-color: var(--gw-primary); color: var(--gw-primary); text-decoration: none; }
.gw-btn-primary { background: var(--gw-primary); border-color: var(--gw-primary); color: #fff; }
.gw-btn-primary:hover { background: var(--gw-primary-dark); border-color: var(--gw-primary-dark); color: #fff; }
.gw-btn-block { display: flex; width: 100%; margin-top: 12px; }
.gw-btn-sm { min-height: 38px; padding: 0 12px; font-size: 13px; }

.gw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gw-chips-wide { gap: 8px 8px; }
.gw-chip {
    display: inline-flex; flex-direction: column; justify-content: center;
    min-height: 34px; padding: 4px 12px;
    background: var(--gw-surface-2); color: var(--gw-text-2);
    border: 1px solid var(--gw-border); border-radius: 999px;
    font-size: 13px; font-weight: 600;
}
.gw-chip:hover { border-color: var(--gw-primary); color: var(--gw-primary); background: var(--gw-primary-soft); text-decoration: none; }
.gw-chip-person { align-items: flex-start; border-radius: var(--gw-radius); }
.gw-chip-name { font-weight: 700; color: var(--gw-text); }
.gw-chip-sub { font-size: 12px; font-weight: 500; color: var(--gw-muted); }
.gw-chip-person:hover .gw-chip-name { color: var(--gw-primary); }

.gw-badge {
    display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px;
    background: var(--gw-text); color: #fff;
    border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: .3px;
}
.gw-badge-plain { background: var(--gw-surface-2); color: var(--gw-text-2); border: 1px solid var(--gw-border); }
.gw-rating-badge {
    display: inline-flex; align-items: center; gap: 2px; min-height: 26px; padding: 0 9px;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 4px;
    font-size: 13px; color: var(--gw-text);
}
.gw-rating-scale { color: var(--gw-muted); font-size: 12px; }

.gw-inline-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.gw-inline-link { font-size: 13px; font-weight: 600; }

/* ---- page head ----------------------------------------------------------- */
.gw-pagehead { padding: 4px 0 16px; }
.gw-pagehead-tight { padding-bottom: 12px; }
.gw-pagehead-title { font-size: 26px; letter-spacing: -.4px; }
.gw-pagehead-sub { margin: 6px 0 0; color: var(--gw-muted); font-size: 14px; max-width: 70ch; }
.gw-404-code { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 2px; color: var(--gw-primary); }

.gw-crumbs { padding: 10px 0 6px; }
.gw-crumbs-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.gw-crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--gw-muted); }
.gw-crumb + .gw-crumb::before { content: "/"; color: var(--gw-border-2); }
.gw-crumb-link { color: var(--gw-muted); font-weight: 600; }
.gw-crumb-link:hover { color: var(--gw-primary); }
.gw-crumb-current { color: var(--gw-text); font-weight: 600; }

/* ---- sections and grids -------------------------------------------------- */
.gw-section { margin-bottom: 26px; }
.gw-section-lazy { content-visibility: auto; contain-intrinsic-size: auto 520px; }
.gw-section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--gw-border);
}
.gw-section-title { font-size: 17px; letter-spacing: -.2px; }
.gw-section-more { font-size: 13px; font-weight: 700; white-space: nowrap; }
.gw-section-count { font-size: 13px; color: var(--gw-muted); white-space: nowrap; }

.gw-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
}

.gw-card {
    background: var(--gw-surface);
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius);
    overflow: hidden;
}
.gw-card:hover { border-color: var(--gw-primary-line); box-shadow: var(--gw-shadow); }
.gw-card-link { display: block; color: inherit; }
.gw-card-link:hover { text-decoration: none; }
.gw-card-art {
    position: relative; display: block;
    aspect-ratio: 2 / 3; background: var(--gw-border);
}
.gw-card-poster { width: 100%; height: 100%; object-fit: cover; }
.gw-card-rank, .gw-card-quality {
    position: absolute; top: 6px; padding: 2px 6px;
    font-size: 11px; font-weight: 700; border-radius: 4px;
}
.gw-card-rank { left: 6px; background: rgba(17, 24, 39, .85); color: #fff; }
.gw-card-quality { right: 6px; background: rgba(255, 255, 255, .94); color: var(--gw-text); }
.gw-card-title {
    margin: 8px 10px 2px; font-size: 14px; font-weight: 600; color: var(--gw-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.9em;
}
.gw-card-link:hover .gw-card-title { color: var(--gw-primary); }
.gw-card-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin: 0 10px 10px; font-size: 13px; color: var(--gw-muted);
}
.gw-card-kind { text-transform: uppercase; font-size: 11px; letter-spacing: .4px; }
.gw-card-rating { margin-left: auto; color: var(--gw-text); font-weight: 700; white-space: nowrap; }

/* ---- two column body ----------------------------------------------------- */
.gw-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.gw-cols-rev { grid-template-columns: 250px minmax(0, 1fr); }
.gw-cols-main { min-width: 0; }
.gw-cols-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gw-cols-side-left { order: -1; }

.gw-rail { padding: 14px; }
.gw-rail-title, .gw-quick-title, .gw-filters-title {
    font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--gw-muted);
}
.gw-rail-list { margin-top: 6px; }
.gw-rail-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--gw-border); }
.gw-rail-row:last-child { border-bottom: 0; }
.gw-rail-rank { flex: none; width: 18px; text-align: right; font-size: 13px; font-weight: 700; color: var(--gw-muted); }
.gw-rail-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; flex: 1 1 auto; }
.gw-rail-link:hover { text-decoration: none; }
.gw-rail-art { flex: none; display: block; width: 40px; aspect-ratio: 2 / 3; background: var(--gw-border); border-radius: 3px; overflow: hidden; }
.gw-rail-poster { width: 100%; height: 100%; object-fit: cover; }
.gw-rail-body { min-width: 0; display: block; }
.gw-rail-name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 13px; font-weight: 600; color: var(--gw-text);
}
.gw-rail-link:hover .gw-rail-name { color: var(--gw-primary); }
.gw-rail-meta { display: flex; gap: 8px; font-size: 12px; color: var(--gw-muted); }
.gw-rail-more { display: inline-flex; align-items: center; min-height: 38px; margin-top: 4px; font-size: 13px; font-weight: 700; }

.gw-quick { padding: 14px; }
.gw-quick-list { margin-top: 4px; }
.gw-quick-link {
    display: flex; align-items: center; min-height: 40px;
    color: var(--gw-text-2); font-size: 13px; font-weight: 600;
    border-bottom: 1px solid var(--gw-border);
}
.gw-quick-list li:last-child .gw-quick-link { border-bottom: 0; }
.gw-quick-link:hover { color: var(--gw-primary); text-decoration: none; }

/* ---- list page filters --------------------------------------------------- */
.gw-filters { padding: 14px; position: sticky; top: 118px; }
.gw-filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gw-filters-toggle {
    display: none; align-items: center; min-height: 38px; padding: 0 12px;
    background: var(--gw-surface-2); border: 1px solid var(--gw-border-2);
    border-radius: var(--gw-radius); font-size: 13px; font-weight: 700; cursor: pointer;
}
.gw-filters-panel { display: block; }
.gw-filters-empty { color: var(--gw-muted); font-size: 13px; margin-top: 8px; }
.gw-filter-group { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--gw-border); }
.gw-filter-group:first-child { border-top: 0; margin-top: 4px; padding-top: 4px; }
.gw-filter-group-title { font-size: 13px; color: var(--gw-text); }
.gw-filter-list { margin-top: 4px; }
.gw-filter-link {
    display: flex; align-items: center; min-height: 36px;
    color: var(--gw-text-2); font-size: 13px;
}
.gw-filter-link:hover { color: var(--gw-primary); text-decoration: none; }
.gw-filter-link.is-active { color: var(--gw-primary); font-weight: 700; }

/* ---- empty state --------------------------------------------------------- */
.gw-empty { padding: 26px 20px; text-align: center; }
.gw-empty-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.gw-empty-text { color: var(--gw-muted); }
.gw-empty-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }

/* ---- pagination ---------------------------------------------------------- */
.gw-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.gw-pager-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: var(--gw-tap); min-height: var(--gw-tap); padding: 0 10px;
    background: var(--gw-surface); color: var(--gw-text-2);
    border: 1px solid var(--gw-border-2); border-radius: var(--gw-radius);
    font-size: 13px; font-weight: 600;
}
.gw-pager-btn:hover { border-color: var(--gw-primary); color: var(--gw-primary); text-decoration: none; }
.gw-pager-btn.is-current { background: var(--gw-primary); border-color: var(--gw-primary); color: #fff; }
.gw-pager-btn.is-disabled { color: var(--gw-border-2); background: var(--gw-surface-2); }
.gw-pager-edge { padding: 0 14px; }
.gw-pager-gap { padding: 0 2px; color: var(--gw-muted); }
.gw-pager-info { margin-left: auto; font-size: 13px; color: var(--gw-muted); }

/* ---- detail -------------------------------------------------------------- */
.gw-detail { padding: 0; margin-bottom: 24px; }
.gw-backdrop {
    aspect-ratio: 16 / 9; max-height: 280px; overflow: hidden;
    background: var(--gw-border); border-bottom: 1px solid var(--gw-border);
    border-radius: var(--gw-radius) var(--gw-radius) 0 0;
}
.gw-backdrop-img { width: 100%; height: 100%; object-fit: cover; }
.gw-detail-grid { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; padding: 20px; }
.gw-detail-posterbox { min-width: 0; }
.gw-detail-poster {
    width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
    background: var(--gw-border); border: 1px solid var(--gw-border); border-radius: var(--gw-radius);
}
.gw-detail-sources { margin-top: 14px; }
.gw-detail-sources-label, .gw-servers-label, .gw-picker-label {
    display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--gw-muted); margin-bottom: 6px;
}
.gw-detail-main { min-width: 0; }
.gw-detail-title { font-size: 25px; letter-spacing: -.5px; }
.gw-detail-year { color: var(--gw-muted); font-weight: 500; }
.gw-detail-tagline { margin: 6px 0 0; color: var(--gw-muted); font-style: italic; }
.gw-detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.gw-detail-block { margin-top: 20px; }
.gw-detail-h2 {
    font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--gw-muted);
    padding-bottom: 6px; border-bottom: 1px solid var(--gw-border); margin-bottom: 10px;
}
.gw-detail-overview { max-width: 75ch; color: var(--gw-text-2); }

.gw-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 24px; }
.gw-fact { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--gw-border); font-size: 13px; }
.gw-fact-key { flex: none; width: 108px; color: var(--gw-muted); font-weight: 600; }
.gw-fact-val { min-width: 0; color: var(--gw-text); }

/* ---- pickers (season / episode dropdowns) -------------------------------- */
.gw-pickers { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.gw-picker { position: relative; z-index: 30; }
.gw-picker-end { margin-left: auto; }
.gw-picker-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: var(--gw-tap); padding: 0 14px;
    background: var(--gw-surface); border: 1px solid var(--gw-border-2);
    border-radius: var(--gw-radius); font-size: 14px; font-weight: 600; cursor: pointer;
}
.gw-picker-btn::after { content: "\25BE"; color: var(--gw-muted); }
.gw-picker-btn:hover { border-color: var(--gw-primary); color: var(--gw-primary); }
.gw-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
    min-width: 220px; max-height: 320px; overflow-y: auto;
    background: var(--gw-surface); border: 1px solid var(--gw-border-2);
    border-radius: var(--gw-radius); box-shadow: var(--gw-shadow-lg); padding: 6px;
}
.gw-menu-end { left: auto; right: 0; }
.gw-menu.is-open { display: block; }
.gw-menu-item {
    display: flex; align-items: center; min-height: 38px; padding: 0 10px;
    border-radius: 4px; color: var(--gw-text-2); font-size: 13px;
}
.gw-menu-item:hover { background: var(--gw-surface-2); color: var(--gw-primary); text-decoration: none; }
.gw-menu-item.is-selected { background: var(--gw-primary-soft); color: var(--gw-primary); font-weight: 700; }
.gw-menu-empty { display: block; padding: 10px; color: var(--gw-muted); font-size: 13px; }

/* ---- player -------------------------------------------------------------- */
body.page-player .gw-header { position: static; }
.gw-toolbar {
    position: sticky; top: 0; z-index: 45;
    background: var(--gw-surface); border-bottom: 1px solid var(--gw-border);
    box-shadow: var(--gw-shadow);
}
.gw-toolbar-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.gw-toolbar-main { min-width: 0; flex: 1 1 auto; }
.gw-toolbar-back { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.gw-toolbar-back::before { content: "\2190\00a0"; }
.gw-toolbar-title {
    font-size: 17px; letter-spacing: -.2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gw-toolbar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 2px 0 0; font-size: 13px; color: var(--gw-muted); }
.gw-toolbar-nav { display: flex; gap: 8px; flex: none; }

.gw-stage { margin: 16px 0 18px; }
.gw-stage-frame {
    position: relative; aspect-ratio: 16 / 9; width: 100%;
    background: #0b1220; border: 1px solid var(--gw-border); border-radius: var(--gw-radius); overflow: hidden;
}
.gw-stage-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gw-stage-loading {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #0b1220; color: #e5e7eb; font-size: 13px;
}
.gw-stage-loading[hidden] { display: none; }
.gw-spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(229, 231, 235, .3); border-top-color: #e5e7eb;
    animation: gw-spin .8s linear infinite;
}
@keyframes gw-spin { to { transform: rotate(360deg); } }

.gw-playbar { padding: 14px 16px; margin-bottom: 18px; }
.gw-playbar-title, .gw-eplist-title {
    font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--gw-muted);
}
.gw-playbar-note { margin: 12px 0 0; font-size: 13px; color: var(--gw-muted); }
.gw-servers { margin-top: 10px; }
.gw-segmented {
    display: inline-flex; flex-wrap: wrap; gap: 0;
    border: 1px solid var(--gw-border-2); border-radius: var(--gw-radius); overflow: hidden;
    background: var(--gw-surface-2);
}
.gw-server {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: var(--gw-tap); padding: 0 16px;
    border-right: 1px solid var(--gw-border-2);
    color: var(--gw-text-2); font-size: 13px; font-weight: 700;
}
.gw-server:last-child { border-right: 0; }
.gw-server:hover { background: var(--gw-surface); color: var(--gw-primary); text-decoration: none; }
.gw-server.is-active { background: var(--gw-primary); color: #fff; }
.gw-segmented-sm .gw-server { min-height: 38px; padding: 0 12px; font-size: 12px; }

.gw-eplist { padding: 14px 16px; margin-bottom: 18px; }
.gw-eplist-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gw-eptable { font-size: 13px; }
.gw-eptable th, .gw-eptable td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--gw-border); }
.gw-eptable thead th {
    font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--gw-muted);
    background: var(--gw-surface-2); border-bottom: 1px solid var(--gw-border-2);
}
.gw-eptable-num { width: 56px; color: var(--gw-muted); font-weight: 700; }
.gw-eptable-act { width: 92px; text-align: right; }
.gw-eptable-act { white-space: nowrap; }
.gw-eprow:hover td, .gw-eprow:hover th { background: var(--gw-surface-2); }
.gw-eprow.is-current td, .gw-eprow.is-current th { background: var(--gw-primary-soft); }
.gw-eptable-name { color: var(--gw-text); }
.gw-eptable-link { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 32px; font-weight: 700; }
.gw-eptable-now { font-weight: 700; color: var(--gw-primary); }

/* ---- prose / static / seo ------------------------------------------------ */
.gw-prose { color: var(--gw-text-2); }
.gw-prose h2 {
    font-size: 19px; margin: 26px 0 10px; padding-bottom: 8px;
    border-bottom: 1px solid var(--gw-border); color: var(--gw-text); scroll-margin-top: 130px;
}
.gw-prose h3 { font-size: 15px; margin: 16px 0 6px; color: var(--gw-text); }
.gw-prose p { margin: 0 0 12px; max-width: 78ch; }
.gw-prose ul, .gw-prose ol { margin: 0 0 12px 20px; list-style: disc; }
.gw-prose ol { list-style: decimal; }
.gw-prose li { margin-bottom: 6px; }
.gw-prose a { font-weight: 600; }
.gw-static { padding: 20px; }
.gw-seo .gw-panel { padding: 20px; }

/* ---- landing ------------------------------------------------------------- */
.gw-lp { padding: 24px; margin-bottom: 20px; }
.gw-lp-head { padding-bottom: 18px; border-bottom: 1px solid var(--gw-border); }
.gw-lp-title { font-size: 30px; letter-spacing: -.6px; max-width: 24ch; }
.gw-lp-intro { margin: 10px 0 0; font-size: 15px; color: var(--gw-text-2); max-width: 70ch; }
.gw-lp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.gw-toc { margin: 18px 0 4px; padding: 14px 16px; background: var(--gw-surface-2); border: 1px solid var(--gw-border); border-radius: var(--gw-radius); }
.gw-toc-title { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--gw-muted); }
.gw-toc-list { counter-reset: gw-toc; margin-top: 6px; columns: 2; column-gap: 24px; }
.gw-toc-list li { break-inside: avoid; }
.gw-toc-link { display: flex; align-items: center; min-height: 34px; font-size: 13px; font-weight: 600; }
.gw-toc-link::before { counter-increment: gw-toc; content: counter(gw-toc) "."; color: var(--gw-muted); margin-right: 8px; }
.gw-toc-link.is-current { color: var(--gw-primary-dark); }

.gw-lp-section { scroll-margin-top: 130px; }
.gw-lp-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 12px 0 16px; }
.gw-lp-point { padding: 14px; background: var(--gw-surface-2); border: 1px solid var(--gw-border); border-radius: var(--gw-radius); }
.gw-lp-point h3 { margin: 0 0 4px; }
.gw-lp-point p { margin: 0; font-size: 13px; }

.gw-faq { margin-top: 10px; }
.gw-faq-item { border: 1px solid var(--gw-border); border-radius: var(--gw-radius); margin-bottom: 8px; background: var(--gw-surface); }
.gw-faq-q {
    display: flex; align-items: center; min-height: var(--gw-tap); padding: 8px 14px;
    font-size: 14px; font-weight: 700; color: var(--gw-text); cursor: pointer; list-style: none;
}
.gw-faq-q::-webkit-details-marker { display: none; }
.gw-faq-q::before { content: "\002B"; margin-right: 10px; color: var(--gw-primary); font-weight: 700; }
.gw-faq-item[open] .gw-faq-q::before { content: "\2212"; }
.gw-faq-a { margin: 0; padding: 0 14px 14px 36px; color: var(--gw-text-2); }

.gw-lp-network { padding: 20px; }
.gw-lp-network-title { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--gw-muted); margin-bottom: 12px; }
.gw-network-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.gw-network-card { display: block; padding: 14px; background: var(--gw-surface-2); border: 1px solid var(--gw-border); border-radius: var(--gw-radius); }
.gw-network-card:hover { border-color: var(--gw-primary); text-decoration: none; }
.gw-network-name { font-size: 14px; color: var(--gw-text); }
.gw-network-domain { font-size: 12px; color: var(--gw-muted); }

/* ---- footer -------------------------------------------------------------- */
.gw-footer { background: var(--gw-surface); border-top: 1px solid var(--gw-border); padding: 28px 0 22px; margin-top: 10px; }
.gw-footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 28px; }
.gw-footer-desc { margin: 10px 0 0; color: var(--gw-muted); font-size: 13px; max-width: 46ch; }
.gw-footer-note { margin: 8px 0 0; color: var(--gw-muted); font-size: 12px; max-width: 46ch; }
.gw-footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gw-footer-social-link {
    display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
    border: 1px solid var(--gw-border); border-radius: 999px;
    font-size: 12px; font-weight: 600; color: var(--gw-text-2);
}
.gw-footer-social-link:hover { border-color: var(--gw-primary); color: var(--gw-primary); text-decoration: none; }
.gw-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.gw-footer-col-title { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--gw-muted); margin-bottom: 4px; }
.gw-footer-link { display: inline-flex; align-items: center; min-height: 32px; color: var(--gw-text-2); font-size: 13px; }
.gw-footer-link:hover { color: var(--gw-primary); }
.gw-footer-network { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--gw-border); }
.gw-footer-network-title { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--gw-muted); }
.gw-footer-network-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-footer-network-link {
    display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px;
    background: var(--gw-surface-2); border: 1px solid var(--gw-border); border-radius: 4px;
    font-size: 12px; font-weight: 600; color: var(--gw-text-2);
}
.gw-footer-network-link:hover { border-color: var(--gw-primary); color: var(--gw-primary); text-decoration: none; }
.gw-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--gw-border); }
.gw-footer-copy { margin: 0; font-size: 13px; color: var(--gw-muted); }
.gw-footer-legal { display: flex; flex-wrap: wrap; gap: 14px; }

/* ==========================================================================
   Responsive — mobile first fallbacks applied from the widest breakpoint down
   ========================================================================== */
@media (max-width: 1024px) {
    .gw-cols, .gw-cols-rev { grid-template-columns: minmax(0, 1fr); }
    .gw-cols-side { order: 0; flex-direction: column; }
    .gw-cols-side-left { order: -1; }
    .gw-filters { position: static; }
    .gw-detail-grid { grid-template-columns: 190px minmax(0, 1fr); gap: 18px; }
    .gw-search-top { max-width: none; }
    .gw-rail-list { columns: 2; column-gap: 20px; }
    .gw-rail-row { break-inside: avoid; }
}

@media (max-width: 768px) {
    .gw-nav { display: none; }
    .gw-nav-toggle { display: inline-flex; order: 2; margin-left: auto; }
    .gw-header-inner { gap: 10px; flex-wrap: wrap; }
    .gw-search-top { order: 3; flex: 1 0 100%; max-width: none; margin: 0 0 8px; }
    .gw-utility-inner { gap: 12px; }
    /* the header search is already full width on phones — drop the duplicate in the page head */
    .gw-search-inline { display: none; }
    body.page-404 .gw-search-inline { display: flex; }
    .gw-pagehead-title { font-size: 22px; }
    .gw-lp { padding: 18px; }
    .gw-lp-title { font-size: 25px; max-width: none; }
    .gw-toc-list { columns: 1; }
    .gw-filters-toggle { display: inline-flex; }
    .gw-filters-panel { display: none; }
    .gw-filters-panel.is-open { display: block; }
    .gw-detail-grid { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .gw-detail-posterbox { max-width: 220px; }
    .gw-detail-title { font-size: 21px; }
    .gw-backdrop { max-height: 200px; }
    .gw-toolbar-inner { flex-wrap: wrap; }
    .gw-toolbar-nav { flex: 1 0 100%; }
    .gw-rail-list { columns: 1; }
    .gw-footer-top { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .gw-chip { min-height: var(--gw-tap); }
    .gw-segmented { display: flex; width: 100%; }
    .gw-server, .gw-segmented-sm .gw-server { flex: 1 1 auto; min-height: var(--gw-tap); }
    .gw-btn-sm, .gw-filters-toggle, .gw-rail-more, .gw-eptable-link { min-height: var(--gw-tap); }
}

@media (max-width: 480px) {
    .gw-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
    .gw-card-title { font-size: 13px; margin-left: 8px; margin-right: 8px; }
    .gw-card-meta { margin-left: 8px; margin-right: 8px; font-size: 12px; }
    .gw-pagehead-title { font-size: 20px; }
    .gw-lp { padding: 14px; }
    .gw-lp-title { font-size: 22px; }
    .gw-lp-cta .gw-btn { flex: 1 1 100%; }
    .gw-facts { grid-template-columns: minmax(0, 1fr); }
    .gw-fact-key { width: 96px; }
    .gw-eptable-num { width: 40px; }
    .gw-eptable th, .gw-eptable td { padding: 8px 6px; }
    .gw-pager-info { flex: 1 0 100%; margin-left: 0; }
    .gw-static, .gw-seo .gw-panel { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media print {
    .gw-header, .gw-footer, .gw-toolbar, .gw-stage, .gw-pager { display: none; }
    body { background: #fff; }
    .gw-panel { border: 0; box-shadow: none; }
}
