/* World of Kung Fu Classic — standalone modern portal */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6efdf;
  --bg-soft: #fffaf0;
  --panel: #fffaf1;
  --panel-2: #f2e7d2;
  --line: rgba(91,43,35,.15);
  --text: #45221d;
  --muted: #765e55;
  --gold: #d8b56d;
  --gold-light: #f0d49a;
  --wine: #6e2931;
  --pink: #c45a78;
  --max: 1450px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body.wokf-portal {
  margin: 0; width: 100%; min-width: 320px; max-width: none; overflow-x: clip;
  background: var(--bg); color: var(--text);
  font-family: "DM Sans", Arial, sans-serif; font-size: 15px; line-height: 1.6;
  font-weight: 400;
}
.wokf-portal a { color: inherit; text-decoration: none; }
.wokf-portal button { font: inherit; }
.portal-header {
  position: relative; z-index: 20; width: 100%;
  background: rgba(15,16,21,.96); border-bottom: 1px solid var(--line);
}
.portal-header-inner {
  width: min(var(--max), calc(100% - 64px)); min-height: 82px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; width: 118px; max-height: 64px; object-fit: contain; }
.primary-nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.nav-item {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px;
  color: #d8d6d1; background: transparent; border: 0; border-radius: 7px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s ease;
}
.nav-item:hover, .nav-item.is-active { color: var(--gold-light); background: rgba(216,181,109,.12); }
.nav-group { position: relative; }
.chevron { width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 205px;
  padding: 7px; background: #20222a; border: 1px solid var(--line); border-radius: 9px;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}
.nav-group.is-open .nav-menu { display: grid; }
.nav-menu a { padding: 10px 12px; border-radius: 6px; color: #d5d3cf; font-size: 13px; }
.nav-menu a:hover { background: rgba(216,181,109,.12); color: var(--gold-light); }
.menu-toggle { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.portal-hero {
  position: relative; min-height: clamp(500px, 48vw, 680px); display: flex; align-items: center;
  isolation: isolate; overflow: hidden; background: #211719;
}
.hero-video { position: absolute; z-index: -3; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
/* Hero image/video intentionally has no dark fade or gradient overlay. */
.hero-inner { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 92px 0 112px; }
.hero-copy { max-width: 690px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 10px; letter-spacing: .2em; font-weight: 800; text-transform: uppercase; }
.eyebrow-line { width: 26px; height: 1px; background: var(--gold); display: inline-block; }
.hero-copy h1 { margin: 22px 0 18px; max-width: 720px; font-family: Manrope, Arial, sans-serif; font-size: clamp(48px, 5.4vw, 82px); line-height: .99; letter-spacing: -.055em; font-weight: 800; color: #fff; }
.hero-copy h1 em { color: var(--gold-light); font-style: normal; }
.hero-copy > p { max-width: 540px; margin: 0; color: #d0cbd0; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.8; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 0 20px; border-radius: 6px; font-size: 13px; font-weight: 800; transition: .2s ease; }
.btn-gold { color: #17171a !important; background: var(--gold); border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-outline { color: #fff !important; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.04); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light) !important; }
.hero-side-note { align-self: flex-end; margin: 0 3% 10px 0; display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.7); font-size: 9px; letter-spacing: .18em; line-height: 1.8; font-weight: 800; }
.side-note-mark { color: rgba(240,212,154,.62); font-family: serif; font-size: clamp(58px, 8vw, 112px); line-height: 1; border-right: 1px solid rgba(240,212,154,.35); padding-right: 18px; }
.portal-content { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; padding: 76px 0 92px; }
.content-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.content-heading h2, .section-heading-row h2 { margin: 12px 0 8px; font-family: Manrope, Arial, sans-serif; font-size: clamp(30px, 3vw, 43px); line-height: 1.12; letter-spacing: -.04em; }
.content-heading h2 em { color: var(--gold-light); font-style: normal; }
.content-heading p { margin: 0; max-width: 690px; color: var(--muted); font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; color: var(--gold-light) !important; font-size: 10px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.text-link:hover { color: #fff !important; }
.portal-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 20px; align-items: stretch; }
.server-card, .side-card, .feature-card {
  background: linear-gradient(145deg, rgba(32,35,44,.98), rgba(24,26,33,.98));
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 45px rgba(0,0,0,.13);
}
.server-card { min-width: 0; padding: 25px; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.card-topline h3, .side-card h3 { margin: 7px 0 0; font-size: 21px; letter-spacing: -.025em; color: #f4f1eb; }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 99px; color: #b8d7bd; background: rgba(93,165,111,.1); font-size: 9px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #70c486; box-shadow: 0 0 10px rgba(112,196,134,.6); }
.server-tabs { display: flex; gap: 5px; overflow-x: auto; margin-top: 23px; padding: 5px; border-radius: 8px; background: #12141a; border: 1px solid var(--line); }
.server-tab { flex: 0 0 auto; padding: 10px 15px; color: #a9a9b0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.server-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.server-tab.is-active { color: #19191b; background: var(--gold); }
.server-panel-content { min-height: 240px; padding: 22px 5px 5px; color: #d7d5d0; }
.tab-panel[hidden] { display: none !important; }
.tab-panel { animation: tabFade .18s ease; }
@keyframes tabFade { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }
/* Generic styling for the existing PHP include output */
.tab-panel h1, .tab-panel h2, .tab-panel h3, .tab-panel h4 { color: #f0d49a; margin: 8px 0 12px; }
.tab-panel p { color: #c9c6c1; font-size: 14px; line-height: 1.65; text-shadow: none; }
.tab-panel table { width: 100%; max-width: 100%; border-collapse: collapse; color: #d9d6d0; font-size: 13px; }
.tab-panel th { color: var(--gold-light); text-align: left; font-weight: 800; }
.tab-panel th, .tab-panel td { padding: 9px 11px; border-bottom: 1px solid var(--line); }
.tab-panel tr:nth-child(even) { background: rgba(255,255,255,.025); }
.tab-panel a { color: var(--gold-light); }
.empty-state { min-height: 190px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-state span { color: var(--gold); font-family: serif; font-size: 34px; }
.empty-state h4 { margin: 7px 0 0; }
.empty-state p { margin: 5px 0; }
.side-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(280px, auto); gap: 20px; align-content: stretch; }
.side-card { position: relative; padding: 25px; overflow: hidden; }
.side-card:after { content: ""; position: absolute; width: 170px; height: 170px; right: -85px; bottom: -100px; border: 1px solid rgba(216,181,109,.18); border-radius: 50%; box-shadow: 0 0 0 18px rgba(216,181,109,.025), 0 0 0 38px rgba(216,181,109,.02); }
.side-card-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 18px; color: #17171a; background: var(--gold); border-radius: 8px; font-size: 19px; }
.side-card h3 { font-size: 19px; }
.side-card p { margin: 9px 0 18px; max-width: 360px; color: var(--muted); font-size: 13px; }
.side-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.side-actions a { padding: 8px 12px; color: var(--gold-light); border: 1px solid rgba(216,181,109,.35); border-radius: 5px; font-size: 11px; font-weight: 700; }
.side-actions a:hover { background: rgba(216,181,109,.1); }

.features-section { margin-top: 76px; }
.section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.section-heading-row h2 { margin-bottom: 0; }
.section-caption { color: #777982; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card { position: relative; min-height: 245px; padding: 25px; overflow: hidden; }
.feature-card:before { content: ""; position: absolute; inset: 0; opacity: .18; background-position: center; background-size: cover; pointer-events: none; }



.feature-card > * { position: relative; }
.feature-number { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.feature-card h3 { margin: 35px 0 8px; font-family: Manrope, Arial, sans-serif; font-size: 22px; letter-spacing: -.03em; }
.feature-card p { max-width: 340px; margin: 0 0 20px; color: #b6b5bc; font-size: 13px; }
.feature-link { color: var(--gold-light) !important; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.feature-link span { margin-left: 7px; }
.feature-static { display: inline-block; padding: 6px 9px; border: 1px solid rgba(216,181,109,.3); border-radius: 4px; }

.portal-footer { border-top: 1px solid var(--line); background: #0c0d11; }
.footer-inner { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; padding: 36px 0 28px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px 40px; }
.footer-brand img { width: 105px; max-height: 58px; object-fit: contain; }
.footer-follow { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 10px; letter-spacing: .12em; font-weight: 800; }
.footer-follow a { color: var(--gold-light); letter-spacing: 0; }
.footer-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-links a { color: #a8a8ae; font-size: 11px; font-weight: 700; }
.footer-links a:hover { color: var(--gold-light); }
.copyright { grid-column: 1 / -1; margin: -8px 0 0; color: #696b73; font-size: 10px; }

@media (min-width: 1800px) {
  .portal-hero { min-height: min(760px, 58vh); }
}
@media (max-width: 1050px) {
  .portal-grid { grid-template-columns: minmax(0, 1fr); }
  .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .hero-side-note { display: none; }
}
@media (max-width: 760px) {
  .portal-header-inner, .hero-inner, .portal-content, .footer-inner { width: min(100% - 36px, var(--max)); }
  .portal-header-inner { min-height: 70px; }
  .brand img { width: 100px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 9px; background: transparent; border: 1px solid var(--line); border-radius: 6px; }
  .menu-toggle span:not(.visually-hidden) { display: block; height: 2px; width: 100%; background: #eee; }
  .primary-nav { display: none; position: absolute; top: 69px; left: 0; right: 0; padding: 12px 18px 18px; align-items: stretch; flex-direction: column; background: #111218; border-bottom: 1px solid var(--line); }
  .primary-nav.is-open { display: flex; }
  .nav-item { width: 100%; justify-content: space-between; }
  .nav-menu { position: static; margin: 3px 0 8px; box-shadow: none; }
  .nav-group.is-open .nav-menu { display: grid; }
  .portal-hero { min-height: 560px; }
  .hero-inner { padding: 80px 0 105px; }
  .hero-copy h1 { font-size: clamp(43px, 11vw, 64px); }
  .content-heading, .section-heading-row { align-items: flex-start; flex-direction: column; }
  .content-heading { margin-bottom: 24px; }
  .portal-content { padding: 54px 0 65px; }
  .server-card { padding: 17px; }
  .card-topline { align-items: flex-start; flex-direction: column; }
  .side-column, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-card { min-height: 220px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-follow { align-items: flex-start; flex-direction: column; gap: 5px; }
  .footer-links { grid-column: auto; gap: 15px; }
  .copyright { grid-column: auto; }
}
@media (max-width: 600px) {
  .side-column { grid-template-columns: minmax(0, 1fr); }
}

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


/* v5 warm cream portal theme — brighter content area, same modern structure */
body.wokf-portal { background: #f7f0e1; color: #45221d; }
.portal-content { color: #45221d; }
.content-heading h2, .section-heading-row h2 { color: #54251f; }
.content-heading h2 em { color: #a96d32; }
.content-heading p { color: #765e55; }
.text-link { color: #9b6330 !important; }
.text-link:hover { color: #6f3029 !important; }

.server-card, .side-card, .feature-card {
  background: linear-gradient(145deg, #fffdf7, #f5ead7);
  border: 1px solid rgba(112,70,43,.18);
  box-shadow: 0 14px 36px rgba(83,48,28,.08);
}
.card-topline h3, .side-card h3, .feature-card h3 { color: #54251f; }
.eyebrow { color: #a66b31; }
.live-indicator { color: #39734b; background: rgba(74,142,88,.11); }
.server-tabs {
  background: #eee2cb;
  border-color: rgba(112,70,43,.14);
}
.server-tab { color: #74594b; }
.server-tab:hover { color: #54251f; background: rgba(112,70,43,.08); }
.server-tab.is-active { color: #fffaf1; background: #74352f; }
.server-panel-content { color: #563b32; }
.tab-panel h1, .tab-panel h2, .tab-panel h3, .tab-panel h4 { color: #74352f; }
.tab-panel p { color: #684f45; }
.tab-panel table { color: #563b32; }
.tab-panel th { color: #8c592c; }
.tab-panel th, .tab-panel td { border-bottom-color: rgba(112,70,43,.14); }
.tab-panel tr:nth-child(even) { background: rgba(112,70,43,.035); }
.tab-panel a { color: #9b4c59; }
.empty-state { color: #765e55; }
.empty-state h4 { color: #74352f; }
.side-card p, .feature-card p { color: #765e55; }
.side-card-icon { color: #fffaf1; background: #74352f; }
.side-card:after { border-color: rgba(166,107,49,.18); box-shadow: 0 0 0 18px rgba(166,107,49,.035), 0 0 0 38px rgba(166,107,49,.025); }
.side-actions a { color: #74352f; border-color: rgba(116,53,47,.28); }
.side-actions a:hover { background: rgba(116,53,47,.07); }
.feature-number, .feature-link { color: #98602e !important; }
.feature-card:before { opacity: .12; }
.feature-static { border-color: rgba(116,53,47,.25); }
.portal-footer { background: #e9dcc5; border-top-color: rgba(91,43,35,.16); }
.footer-follow { color: #765e55; }
.footer-follow a, .footer-links a:hover { color: #74352f; }
.footer-links { border-top-color: rgba(91,43,35,.15); }
.footer-links a { color: #765e55; }
.copyright { color: #8a7569; }

/* Warm cream framing for the main portal; the cinematic hero remains dark */
.portal-content { background: transparent; }
.portal-content:before {
  content: "";
  position: absolute;
  z-index: -1;
}

/* Homepage refinement: burgundy navigation and readable hero typography */
.portal-header {
  background: #4b2028;
  border-bottom: 3px solid #d8b56d;
  box-shadow: 0 3px 12px rgba(45, 18, 22, .22);
}
.nav-item {
  color: #fff4e8;
}
.nav-item:hover,
.nav-item.is-active {
  color: #f3d99f;
  background: rgba(255, 231, 190, .13);
}
.nav-menu {
  background: #5b2630;
  border-color: rgba(240, 212, 154, .28);
  box-shadow: 0 18px 45px rgba(45, 18, 22, .28);
}
.nav-menu a {
  color: #fff4e8;
}
.nav-menu a:hover {
  color: #f3d99f;
  background: rgba(255, 231, 190, .13);
}

/* The hero artwork stays bright and unfiltered; use dark lettering on its light area. */
.hero-copy {
  max-width: 690px;
  padding: 22px 26px 24px 0;
}
.hero-copy .eyebrow {
  color: #8c4c28;
  text-shadow: none;
}
.hero-copy .eyebrow-line {
  background: #b77a3e;
}
.hero-copy h1 {
  color: #642a2c;
  text-shadow: 0 1px 0 rgba(255, 250, 238, .5);
}
.hero-copy h1 em {
  color: #a66b31;
}
.hero-copy > p {
  color: #624b43;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 250, 238, .75);
}
.btn-outline {
  color: #fffaf1 !important;
  background: #74352f;
  border: 1px solid #74352f;
}
.btn-outline:hover {
  color: #fffaf1 !important;
  background: #5b2630;
  border-color: #5b2630;
}
@media (max-width: 760px) {
  .primary-nav {
    background: #4b2028;
    border-bottom-color: rgba(240, 212, 154, .25);
  }
}


/* Improve contrast for the decorative message on the right side of the hero.
   Keep the original video artwork and its yellow/pink bands untouched. */
.hero-side-note {
  color: rgba(69, 34, 29, .88) !important;
}

.side-note-mark {
  color: #a66b31 !important;
  border-right-color: rgba(116, 53, 47, .32) !important;
  text-shadow: 0 1px 0 rgba(255, 250, 241, .45);
}


/* Nostalgia-focused hero message */
.hero-side-note {
  color: #74352f !important;
}
.hero-note-copy {
  display: block;
  color: #74352f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  line-height: 1.9;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 250, 241, .7);
}
.hero-note-copy small {
  display: block;
  margin-top: 3px;
  color: #9a642f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}


/* Restored homepage content proportions: server 1/3, news and events 2/3. */
.portal-grid {
  grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr) !important;
}
.portal-grid > .server-card {
  min-width: 0;
}
.portal-grid > .side-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}
.portal-grid > .side-column .side-card {
  min-width: 0;
}
.btn-community {
  color: #fffaf1 !important;
  background: #74352f;
  border: 1px solid #74352f;
}
.btn-community:hover {
  color: #fffaf1 !important;
  background: #5b2630;
  border-color: #5b2630;
  transform: translateY(-2px);
}
.content-heading h2 em {
  color: #a66b31;
}
@media (max-width: 1050px) {
  .portal-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .portal-grid > .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .portal-grid > .side-column {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Old-site inspired homepage composition: server hub left, three stacked promo panels right. */
.portal-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
  gap: 6px;
  align-items: stretch;
}
.server-card {
  border-radius: 0;
  min-width: 0;
  height: 100%;
}
.side-column.promo-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(210px, 1fr));
  gap: 6px;
  min-width: 0;
}
.promo-column .feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
  border-radius: 0;
  border: 3px solid #d98a69;
  background-color: #54252a;
  box-shadow: none;
}
.promo-column .feature-card:before {
  opacity: 1;
  background-size: cover;
  background-position: center;
}
.promo-column 
.promo-column 
.promo-column 
.promo-column .feature-number {
  color: #f0d18a;
  font-size: 9px;
  letter-spacing: .16em;
}
.promo-column .feature-card h3 {
  margin: 12px 0 8px;
  max-width: 720px;
  color: #fff4e8;
  font-size: clamp(21px, 2vw, 30px);
  text-shadow: 0 2px 5px rgba(0,0,0,.65);
}
.promo-column .feature-card p {
  max-width: 720px;
  margin: 0 0 14px;
  color: #fffaf3;
  font-size: 14px;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0,0,0,.85);
}
.promo-column .feature-link {
  align-self: flex-start;
  color: #f6d78e !important;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.promo-column .feature-static {
  border-color: rgba(246,215,142,.55);
}
@media (max-width: 1050px) {
  .portal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .side-column.promo-column {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(190px, auto));
  }
  .server-card { height: auto; }
}
@media (max-width: 760px) {
  .promo-column .feature-card { padding: 20px; }
}




/* v12: prevent legacy background variables from hiding the PHP-supplied artwork. */
body.wokf-portal .server-card,
body.wokf-portal .promo-column .feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
body.wokf-portal .server-card::before,
body.wokf-portal .promo-column .feature-card::before {
  display: block;
  pointer-events: none;
}
body.wokf-portal .server-card > *,
body.wokf-portal .promo-column .feature-card > * {
  position: relative;
  z-index: 1;
}


/* v13: stable pseudo-element stacking for the randomized backgrounds. */
body.wokf-portal .server-card,
body.wokf-portal .promo-column .feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
body.wokf-portal .server-card::before,
body.wokf-portal .promo-column .feature-card::before {
  display: block;
  opacity: 1 !important;
  pointer-events: none;
}
body.wokf-portal .server-card > *,
body.wokf-portal .promo-column .feature-card > * {
  position: relative;
  z-index: 1;
}


/* v14: Live Server Hub stays cream with an account-style gold/pink gradient frame. */
body.wokf-portal .server-card {
  background: linear-gradient(#fffbea, #fffbea) padding-box,
              linear-gradient(135deg, #e7c76e 0%, #d9a65b 48%, #ff7eb4 100%) border-box !important;
  border: 2px solid transparent !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(74, 33, 27, .07);
}
body.wokf-portal .server-card::before {
  content: none !important;
  display: none !important;
}


/* v15: compact Live Server Hub; class counts now live in their own tab. */
body.wokf-portal .server-card {
  padding: 18px !important;
}
body.wokf-portal .server-card .card-topline h3 {
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  margin-bottom: 0;
}
body.wokf-portal .server-card .server-tabs {
  margin-top: 15px;
  gap: 4px;
  padding: 4px;
}
body.wokf-portal .server-card .server-tab {
  padding: 9px 11px;
  white-space: nowrap;
  font-size: .9rem;
}
body.wokf-portal .server-card .server-panel-content {
  min-height: 180px;
  padding: 15px 2px 2px;
}
body.wokf-portal .server-card .tab-panel h2,
body.wokf-portal .server-card .tab-panel h3 {
  margin-top: 8px;
}
@media (max-width: 700px) {
  body.wokf-portal .server-card { padding: 14px !important; }
  body.wokf-portal .server-card .server-tab { padding: 8px 9px; font-size: .82rem; }
}


/* v16: refine Live Server Hub typography to match the compact dashboard scale. */
body.wokf-portal .server-card {
  font-size: 14px;
}
body.wokf-portal .server-card .card-topline h3 {
  font-size: 18px !important;
  line-height: 1.3;
}
body.wokf-portal .server-card .eyebrow {
  font-size: 10px;
  letter-spacing: .18em;
}
body.wokf-portal .server-card .live-indicator {
  font-size: 9px;
}
body.wokf-portal .server-card .server-tab {
  font-size: 13px !important;
  line-height: 1.25;
  padding: 8px 10px;
}
body.wokf-portal .server-card .server-panel-content {
  font-size: 14px !important;
  line-height: 1.55;
}
body.wokf-portal .server-card .server-panel-content h1,
body.wokf-portal .server-card .server-panel-content h2,
body.wokf-portal .server-card .server-panel-content h3,
body.wokf-portal .server-card .server-panel-content h4 {
  font-size: 21px !important;
  line-height: 1.3;
  margin: 8px 0 12px;
}
body.wokf-portal .server-card .server-panel-content p,
body.wokf-portal .server-card .server-panel-content li,
body.wokf-portal .server-card .server-panel-content div,
body.wokf-portal .server-card .server-panel-content span,
body.wokf-portal .server-card .server-panel-content strong,
body.wokf-portal .server-card .server-panel-content b {
  font-size: 15px !important;
  line-height: 1.5;
}
body.wokf-portal .server-card .server-panel-content p {
  margin: 0 0 8px;
}


/* v19: restore the original class sprite icons and remove list bullets. */
body.wokf-portal #demoTabs2 {
  width: 100%;
  min-width: 0;
}
body.wokf-portal #demoTabs2 .class-icon-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  margin: 10px 0 14px;
  padding: 8px 9px;
  list-style: none !important;
  border: 1px solid rgba(112,70,43,.18);
  border-radius: 7px;
  background: #74352f;
  box-sizing: border-box;
}
body.wokf-portal #demoTabs2 .class-icon-tab {
  display: inline-flex;
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 2px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #fffaf1;
  cursor: pointer;
}
body.wokf-portal #demoTabs2 .class-icon-tab:hover,
body.wokf-portal #demoTabs2 .class-icon-tab[aria-selected="true"] {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.18);
}
body.wokf-portal #demoTabs2 .class-tab-label {
  display: none;
}
body.wokf-portal #demoTabs2 .sprite {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background-image: url("../../images/spritesheet.jpg");
  background-repeat: no-repeat;
  vertical-align: middle;
}
body.wokf-portal #demoTabs2 .sprite-1 { background-position: 0 -0px; }
body.wokf-portal #demoTabs2 .sprite-2 { background-position: 0 -20px; }
body.wokf-portal #demoTabs2 .sprite-3 { background-position: 0 -40px; }
body.wokf-portal #demoTabs2 .sprite-4 { background-position: 0 -60px; }
body.wokf-portal #demoTabs2 .sprite-5 { background-position: 0 -80px; }
body.wokf-portal #demoTabs2 .sprite-6 { background-position: 0 -100px; }
body.wokf-portal #demoTabs2 .sprite-7 { background-position: 0 -120px; }
body.wokf-portal #demoTabs2 .sprite-8 { background-position: 0 -140px; }
body.wokf-portal #demoTabs2 .sprite-9 { background-position: 0 -160px; }

body.wokf-portal #demoTabs2 .class-player-panel[hidden] {
  display: none !important;
}
body.wokf-portal #demoTabs2 .class-player-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
body.wokf-portal #demoTabs2 .class-player-table tr {
  background: transparent;
}
body.wokf-portal #demoTabs2 .class-player-table tr:nth-child(even) {
  background: rgba(112,70,43,.035);
}
body.wokf-portal #demoTabs2 .class-player-table td {
  padding: 7px 5px;
  border-bottom: 1px solid rgba(112,70,43,.14);
  vertical-align: middle;
  text-align: center;
}
body.wokf-portal #demoTabs2 .class-player-table td:first-child {
  width: 25%;
}
body.wokf-portal #demoTabs2 .class-player-table td:nth-child(2) {
  width: 50%;
}
body.wokf-portal #demoTabs2 .class-player-table td:last-child {
  width: 25%;
}
body.wokf-portal #demoTabs2 .class-player-table td .sprite {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("../../images/spritesheet.jpg");
  background-repeat: no-repeat;
}
@media (max-width: 480px) {
  body.wokf-portal #demoTabs2 .class-icon-tabs { gap: 2px; padding: 6px 4px; }
  body.wokf-portal #demoTabs2 .class-icon-tab { min-height: 30px; padding: 4px 0; }
}


/* v20: use the supplied original 18x180 sprite sheet (nine 18x18 icons on 20px rows). */
body.wokf-portal #demoTabs2 .sprite {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  background-image: url("../../images/spritesheet.jpg") !important;
  background-repeat: no-repeat !important;
  background-size: 18px 180px !important;
  border: 0 !important;
  outline: 0 !important;
  vertical-align: middle;
}
body.wokf-portal #demoTabs2 .class-player-table .sprite {
  margin: 0 auto;
}


/* v21: use real cropped PNGs rather than CSS background-position sprites.
   Root-absolute image paths avoid stylesheet-relative URL resolution errors. */
body.wokf-portal #demoTabs2 .class-icon-image {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  max-width: 18px;
  object-fit: contain;
  padding: 0 !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  vertical-align: middle;
}
body.wokf-portal #demoTabs2 .class-icon-tab .class-icon-image {
  width: 18px !important;
  height: 18px !important;
}
body.wokf-portal #demoTabs2 .class-player-table td:first-child {
  text-align: center;
}


/* v23: align the six Live Server Hub tabs evenly and consistently. */
body.wokf-portal .server-card .server-tabs {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
  padding: 4px;
}
body.wokf-portal .server-card .server-tab {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  min-height: 34px;
  padding: 8px 3px;
  margin: 0;
  line-height: 1.2;
  font-size: 12px !important;
  font-weight: 500;
}
@media (max-width: 390px) {
  body.wokf-portal .server-card .server-tabs { gap: 2px; padding: 3px; }
  body.wokf-portal .server-card .server-tab {
    min-height: 32px;
    padding: 7px 1px;
    font-size: 11px !important;
  }
}


/* v24: four matching promotional panels; preserve the established cream and burgundy palette. */
@media (min-width: 1051px) {
  body.wokf-portal .side-column.promo-column {
    grid-template-rows: repeat(4, minmax(150px, 1fr));
  }
  body.wokf-portal .promo-column .feature-card {
    min-height: 150px;
  }
}
@media (max-width: 1050px) {
  body.wokf-portal .side-column.promo-column {
    grid-template-rows: repeat(4, minmax(190px, auto));
  }
}

/* v24: target the real jQuery UI markup emitted by assets/scripts/players.php. */
body.wokf-portal #demoTabs2 { width: 100%; min-width: 0; }
body.wokf-portal #demoTabs2 > ul.primary-nav2 {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0 14px !important;
  padding: 8px 9px !important;
  list-style: none !important;
  border: 1px solid rgba(112,70,43,.22) !important;
  border-radius: 8px !important;
  background: #74352f !important;
}
body.wokf-portal #demoTabs2 > ul.primary-nav2 > li.tabs__item {
  display: block !important;
  flex: 1 1 0;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.wokf-portal #demoTabs2 > ul.primary-nav2 > li > a.tabs__link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0 !important;
  padding: 5px 2px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.wokf-portal #demoTabs2 > ul.primary-nav2 > li.ui-tabs-active > a.tabs__link,
body.wokf-portal #demoTabs2 > ul.primary-nav2 > li > a.tabs__link:hover {
  border-color: rgba(255,255,255,.22) !important;
  background: rgba(255,255,255,.16) !important;
}
body.wokf-portal #demoTabs2 .class-tab-icon {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  max-width: 18px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  object-fit: contain;
}
body.wokf-portal #demoTabs2 .line8 { display: none !important; }
body.wokf-portal #demoTabs2 > .player { min-width: 0; }
body.wokf-portal #demoTabs2 > .player > table {
  width: 100% !important;
  border-collapse: collapse;
  table-layout: fixed;
}
body.wokf-portal #demoTabs2 > .player > table td {
  padding: 7px 5px;
  border-bottom: 1px solid rgba(112,70,43,.14);
  vertical-align: middle;
  text-align: center;
}
body.wokf-portal #demoTabs2 > .player > table tr:nth-child(even) {
  background: rgba(112,70,43,.035);
}
body.wokf-portal #demoTabs2 > .player > table td:first-child { width: 25%; }
body.wokf-portal #demoTabs2 > .player > table td:nth-child(2) { width: 50%; }
body.wokf-portal #demoTabs2 > .player > table td:last-child { width: 25%; }
body.wokf-portal #demoTabs2 .class-icon-image {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  max-width: 18px;
  object-fit: contain;
  padding: 0 !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  vertical-align: middle;
}
@media (max-width: 480px) {
  body.wokf-portal #demoTabs2 > ul.primary-nav2 { gap: 2px; padding: 6px 4px !important; }
  body.wokf-portal #demoTabs2 > ul.primary-nav2 > li > a.tabs__link { min-height: 30px; }
}

/* School rankings: refreshed card layout, scoped only to the Schools tab. */
body.wokf-portal #panel-schools .school-rankings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
body.wokf-portal #panel-schools .school-rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffdf6 0%, #f8efdc 100%);
  border: 1px solid rgba(166, 107, 49, .22);
  border-left: 4px solid #b98243;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(83, 48, 28, .055);
}
body.wokf-portal #panel-schools .school-rank-card:first-child {
  border-left-color: #74352f;
  background: linear-gradient(135deg, #fffaf0 0%, #f5e7d0 100%);
}
body.wokf-portal #panel-schools .school-rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 8px;
  color: #fffaf1;
  background: #74352f;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .09em;
  white-space: nowrap;
}
body.wokf-portal #panel-schools .school-rank-details h1,
body.wokf-portal #panel-schools .school-rank-details h2 {
  margin: 0;
  color: #74352f;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}
body.wokf-portal #panel-schools .school-rank-details h1 {
  margin-bottom: 9px;
  font-size: 17px;
  font-weight: 750;
}
body.wokf-portal #panel-schools .school-rank-details h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  padding: 6px 0;
  border-top: 1px solid rgba(112, 70, 43, .11);
}
body.wokf-portal #panel-schools .school-rank-details h2:first-of-type {
  border-top: 0;
}
body.wokf-portal #panel-schools .school-rank-details font {
  color: #d45d91 !important;
  font-weight: 700;
}
body.wokf-portal #panel-schools .school-rankings-updated {
  margin: 14px 2px 0;
  color: #8c715f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: right;
}
@media (max-width: 560px) {
  body.wokf-portal #panel-schools .school-rank-card {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 13px;
  }
  body.wokf-portal #panel-schools .school-rank-number {
    justify-self: start;
  }
}


/* Player class rankings: enforce one visible class panel at a time. */
body.wokf-portal #panel-players #demoTabs2 > div.player {
  display: none;
}
body.wokf-portal #panel-players #demoTabs2 > div.player.is-active {
  display: block;
}

/* Schools: retain the refreshed cards but reduce oversized inherited headings. */
body.wokf-portal #panel-schools .school-rank-details h1 {
  font-size: 15px !important;
  line-height: 1.35 !important;
  margin: 0 0 7px !important;
}
body.wokf-portal #panel-schools .school-rank-details h2 {
  font-size: 12px !important;
  line-height: 1.4 !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  font-weight: 600 !important;
}
body.wokf-portal #panel-schools .school-rank-number {
  font-size: 9px !important;
}
body.wokf-portal #panel-schools .school-rankings-updated {
  font-size: 10px !important;
}


/* Four promotional cards: restore the original 2-by-2 square layout.
   Scoped only to the promotional column; Server Hub and tab styling are untouched. */
@media (min-width: 761px) {
  body.wokf-portal .side-column.promo-column {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    align-content: stretch;
  }
  body.wokf-portal .promo-column .feature-card {
    aspect-ratio: 1 / 1;
    min-height: 0 !important;
    height: auto;
    padding: 20px;
  }
}
@media (max-width: 760px) {
  body.wokf-portal .side-column.promo-column {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: none !important;
  }
  body.wokf-portal .promo-column .feature-card {
    aspect-ratio: 1 / 1;
    min-height: 0 !important;
  }
}


/* Promo cards: rounded corners only; preserve the existing square layout and artwork. */
body.wokf-portal .promo-column .feature-card {
  border-radius: 14px !important;
}
body.wokf-portal .promo-column .feature-card::before {
  border-radius: inherit;
}


/* Main navigation: keep every top-level item visible like the Home button. */
body.wokf-portal .portal-header .primary-nav > .nav-item,
body.wokf-portal .portal-header .primary-nav > .nav-group > .nav-item {
  color: #f3d99f !important;
  background: rgba(255, 231, 190, .13) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.wokf-portal .portal-header .primary-nav > .nav-item:hover,
body.wokf-portal .portal-header .primary-nav > .nav-group > .nav-item:hover,
body.wokf-portal .portal-header .primary-nav > .nav-item.is-active,
body.wokf-portal .portal-header .primary-nav > .nav-group > .nav-item[aria-expanded="true"] {
  color: #f3d99f !important;
  background: rgba(255, 231, 190, .20) !important;
}


/* Navigation buttons: equal dimensions; highlight appears only on hover/focus. */
body.wokf-portal .portal-header .primary-nav > .nav-item,
body.wokf-portal .portal-header .primary-nav > .nav-group > .nav-item {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 104px !important;
  min-width: 104px !important;
  height: 42px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f3d99f !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: background-color .18s ease, box-shadow .18s ease, color .18s ease;
}
body.wokf-portal .portal-header .primary-nav > .nav-item:hover,
body.wokf-portal .portal-header .primary-nav > .nav-group > .nav-item:hover,
body.wokf-portal .portal-header .primary-nav > .nav-item:focus-visible,
body.wokf-portal .portal-header .primary-nav > .nav-group > .nav-item:focus-visible {
  background: rgba(255, 231, 190, .20) !important;
  box-shadow: 0 0 12px rgba(255, 215, 145, .22) !important;
}
body.wokf-portal .portal-header .primary-nav > .nav-item.is-active,
body.wokf-portal .portal-header .primary-nav > .nav-group > .nav-item[aria-expanded="true"] {
  background: transparent !important;
  box-shadow: none !important;
}

