/* ============================================================
   UI/UX Pro Max Skill — Portal Design v2.0
   Style: Premium Aurora Light × Glass Morphism × Bento Grid
   ============================================================ */

/* -------------------- Design Tokens -------------------- */
:root {
  /* Background */
  --bg-root: #f8f9ff;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.76);
  --bg-card-hover: rgba(255, 255, 255, 0.92);
  --bg-elevated: #ffffff;
  --bg-input: rgba(15, 23, 42, 0.03);

  /* Brand — Aurora Purple/Cyan */
  --brand-500: #7C5CFC;
  --brand-400: #9B7EFD;
  --brand-300: #BBA0FE;
  --brand-cyan: #00D4FF;
  --brand-rose: #FF6B8A;
  --brand-gold: #FFD166;
  --brand-teal: #14B8A6;

  /* Semantic */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Border */
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-default: rgba(148, 163, 184, 0.24);
  --border-emphasis: rgba(124, 92, 252, 0.30);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.10);
  --shadow-glow-purple: 0 0 32px rgba(124, 92, 252, 0.18);
  --shadow-glow-cyan: 0 0 28px rgba(0, 212, 255, 0.12);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Typography */
  --font-xs: 11px;
  --font-sm: 13px;
  --font-base: 15px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 28px;
  --font-3xl: 36px;
  --font-4xl: 48px;
  --font-5xl: 60px;

  /* Transition */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* -------------------- Reset & Base -------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(124, 92, 252, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(124, 92, 252, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, #fafbff 0%, var(--bg-root) 40%, #f0f2ff 100%);
  background-attachment: fixed;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1280px, calc(100% - 48px)); margin: 0 auto; }

/* -------------------- Utility Classes -------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Glass card */
.glass-card {
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.80);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -------------------- Animations -------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-16px) scale(1.02); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------- Header / Navigation -------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.home-polish .site-header {
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(135deg, rgba(30, 41, 82, 0.94), rgba(59, 78, 145, 0.90) 50%, rgba(17, 126, 148, 0.80));
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 44px rgba(30, 41, 82, 0.18);
}
.home-polish .site-header.scrolled {
  box-shadow: 0 18px 48px rgba(30, 41, 82, 0.24);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-with-logo {
  gap: 16px;
}
.brand-logo {
  width: 210px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  padding: 6px 10px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  flex-shrink: 0;
}
.brand-divider {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.42), transparent);
  flex-shrink: 0;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-cyan));
  box-shadow: var(--shadow-glow-purple);
  flex-shrink: 0;
}
.brand-info { display: flex; flex-direction: column; }
.brand-name {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.brand-sub {
  font-size: 11px; color: var(--text-tertiary);
  font-weight: 400; letter-spacing: 0.5px;
}
.home-polish .brand-name {
  color: rgba(255, 255, 255, 0.96);
}
.home-polish .brand-sub {
  color: rgba(226, 232, 240, 0.78);
}
.home-polish .brand-divider {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.48), transparent);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-polish .nav-links {
  gap: 4px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--brand-500); background: rgba(124, 92, 252, 0.06); }
.home-polish .nav-links a {
  color: rgba(255, 255, 255, 0.82);
}
.home-polish .nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.home-polish .nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}
.nav-student {
  color: #0F766E !important;
  background: rgba(20, 184, 166, 0.10) !important;
  border: 1px solid rgba(20, 184, 166, 0.24);
  font-weight: 700 !important;
}
.home-polish .nav-student {
  color: #ecfeff !important;
  background: rgba(20, 184, 166, 0.22) !important;
  border-color: rgba(153, 246, 228, 0.44);
}
.home-polish .nav-student:hover {
  background: rgba(20, 184, 166, 0.34) !important;
  box-shadow: 0 0 28px rgba(20, 184, 166, 0.20);
}
.nav-student:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-cyan)) !important;
  border-color: transparent;
  box-shadow: var(--shadow-glow-cyan);
}
/* -------------------- Hero Section -------------------- */
.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}
.home-polish .hero {
  padding: 56px 0 40px;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.22;
}
.hero-blob-1 { width: 500px; height: 500px; background: var(--brand-500); top: -15%; right: -8%; animation: float 10s ease-in-out infinite; }
.hero-blob-2 { width: 350px; height: 350px; background: var(--brand-cyan); bottom: 10%; left: -5%; animation: float 12s ease-in-out infinite 2s; }
.hero-blob-3 { width: 240px; height: 240px; background: var(--brand-rose); top: 40%; left: 50%; animation: float 8s ease-in-out infinite 4s; }
.hero-blob-4 { width: 180px; height: 180px; background: var(--brand-gold); top: 10%; left: 30%; animation: float 11s ease-in-out infinite 5s; }

.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.home-polish .hero-grid {
  gap: 48px;
}
.hero-copy { max-width: 640px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 252, 0.08);
  color: var(--brand-500);
  font-size: var(--font-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-6);
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
  animation: pulse-glow 2s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-5);
  color: var(--text-primary);
}
.home-polish .hero h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.12;
  margin-bottom: var(--space-4);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: var(--font-lg);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-8);
  max-width: 560px;
}
.home-polish .hero-desc {
  font-size: 16px;
  margin-bottom: var(--space-6);
}

/* Hero actions */
.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}
.home-polish .hero-actions {
  margin-bottom: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--font-base);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), #6B4EE6);
  color: #fff;
  box-shadow: 0 6px 24px rgba(124, 92, 252, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124, 92, 252, 0.36);
}
.btn-ghost {
  color: var(--brand-500);
  background: rgba(124, 92, 252, 0.04);
  border: 1.5px solid rgba(124, 92, 252, 0.20);
}
.btn-ghost:hover {
  background: rgba(124, 92, 252, 0.08);
  border-color: rgba(124, 92, 252, 0.35);
}

/* Hero metrics */
.hero-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.metric-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  min-width: 110px;
}
.metric-value {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--brand-500);
  line-height: 1;
}
.metric-label {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}

/* Hero card — status panel */
.hero-panel { perspective: 1200px; }
.hero-status-card {
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.80);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}
.home-polish .hero-status-card {
  padding: var(--space-6);
}
.home-polish .status-card h3 {
  font-size: var(--font-xl);
}
.home-polish .status-card p {
  margin-bottom: var(--space-4);
}
.hero-status-card::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.12), rgba(0, 212, 255, 0.08));
  filter: blur(40px);
}
.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-5);
  position: relative; z-index: 1;
}
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15);
  animation: pulse-glow 2.5s ease-in-out infinite;
}
.status-label { font-size: var(--font-sm); font-weight: 600; color: var(--color-success); letter-spacing: 0.5px; }
.status-card h3 {
  font-size: var(--font-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
  position: relative; z-index: 1;
}
.status-card p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
  position: relative; z-index: 1;
}
.status-progress {
  height: 6px; border-radius: 3px;
  background: rgba(15, 23, 42, 0.06);
  overflow: hidden;
  margin-bottom: var(--space-4);
  position: relative; z-index: 1;
}
.status-progress-fill {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-cyan));
  transition: width 800ms var(--ease-out);
}
.status-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; z-index: 1;
}
.status-list li {
  font-size: var(--font-sm); color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.status-list li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-400);
  flex-shrink: 0;
}

/* -------------------- Section Title -------------------- */
.section {
  padding: var(--space-16) 0;
  position: relative;
}
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 252, 0.06);
  color: var(--brand-500);
  font-size: var(--font-sm);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.section-label::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brand-400);
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}
.section-header p {
  font-size: var(--font-lg);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* -------------------- Quick Links (Bento Grid) -------------------- */
.quick-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.quick-card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.quick-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
  transform: translate(40%, -40%);
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-emphasis);
}
.quick-card:hover::after { opacity: 0.6; }
.quick-card.accent-purple::after { background: radial-gradient(circle, rgba(124,92,252,0.18), transparent); }
.quick-card.accent-cyan::after { background: radial-gradient(circle, rgba(0,212,255,0.14), transparent); }
.quick-card.accent-teal::after { background: radial-gradient(circle, rgba(20,184,166,0.14), transparent); }
.quick-card.accent-rose::after { background: radial-gradient(circle, rgba(255,107,138,0.12), transparent); }
.quick-card.accent-gold::after { background: radial-gradient(circle, rgba(255,209,102,0.12), transparent); }
.quick-card.accent-blue::after { background: radial-gradient(circle, rgba(59,130,246,0.14), transparent); }
.quick-card.accent-green::after { background: radial-gradient(circle, rgba(16,185,129,0.12), transparent); }
.quick-card.accent-orange::after { background: radial-gradient(circle, rgba(245,158,11,0.12), transparent); }

.quick-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-size: 22px;
  position: relative; z-index: 1;
}
.quick-icon-wrap.purple { background: rgba(124, 92, 252, 0.12); color: var(--brand-500); }
.quick-icon-wrap.cyan { background: rgba(0, 212, 255, 0.12); color: #0891B2; }
.quick-icon-wrap.teal { background: rgba(20, 184, 166, 0.12); color: #0D9488; }
.quick-icon-wrap.rose { background: rgba(255, 107, 138, 0.10); color: #E11D48; }
.quick-icon-wrap.gold { background: rgba(255, 209, 102, 0.14); color: #D97706; }
.quick-icon-wrap.blue { background: rgba(59, 130, 246, 0.12); color: #2563EB; }
.quick-icon-wrap.green { background: rgba(16, 185, 129, 0.12); color: #059669; }
.quick-icon-wrap.orange { background: rgba(245, 158, 11, 0.12); color: #D97706; }
.quick-card strong {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  display: block;
  position: relative; z-index: 1;
}
.quick-card p {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  line-height: 1.5;
  margin: 0;
  position: relative; z-index: 1;
}
.quick-bento-student .quick-card {
  min-height: 168px;
}
.quick-bento-student .quick-icon-wrap {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* -------------------- News / Notices — Asymmetric Grid -------------------- */
.content-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: start;
}
.home-polish .content-hub {
  margin-top: -6px;
}
.home-polish .content-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
}
.portal-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.portal-board-card {
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.portal-board-card .panel-head {
  flex-shrink: 0;
}
.portal-list {
  flex: 1;
}
.portal-list li {
  min-height: 54px;
}
.portal-list .portal-list-main,
.page-list-main {
  flex: 1;
  min-width: 0;
}
.portal-list .top-news {
  align-items: flex-start;
  padding-top: 4px;
  padding-bottom: 18px;
}
.portal-list .top-news a {
  font-size: 18px;
  line-height: 1.45;
  white-space: normal;
}
.portal-list .top-news p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  gap: 12px;
}
.panel-head-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-head-title span {
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--brand-500);
  background: rgba(124, 92, 252, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.panel-head h2 {
  font-size: var(--font-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.panel-head > a {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--brand-500);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.panel-head > a:hover { background: rgba(124, 92, 252, 0.06); border-color: var(--border-emphasis); }

/* Feature news card */
.feature-news {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.05), rgba(0, 212, 255, 0.04));
  margin-bottom: var(--space-5);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-fast);
}
.home-polish .feature-news {
  padding: var(--space-6);
  background:
    radial-gradient(circle at 92% 12%, rgba(0, 212, 255, 0.10), transparent 32%),
    linear-gradient(135deg, rgba(124, 92, 252, 0.07), rgba(255, 255, 255, 0.72));
}
.home-polish .feature-news h3 {
  font-size: clamp(22px, 3vw, 34px);
}
.home-polish .feature-news p {
  font-size: var(--font-base);
}
.feature-news:hover { border-color: var(--border-emphasis); }
.feature-news .fn-tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--brand-500);
  background: rgba(124, 92, 252, 0.10);
  margin-bottom: var(--space-3);
}
.feature-news h3 {
  font-size: var(--font-xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.feature-news p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}
.feature-news time {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  display: block;
}

/* Article list */
.article-list { list-style: none; display: flex; flex-direction: column; }
.article-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--duration-fast);
}
.article-list li:last-child { border-bottom: none; }
.article-list li:hover a { color: var(--brand-500); }
.article-list a {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--duration-fast);
}
.article-list time {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* Notice list */
.notice-list { list-style: none; display: flex; flex-direction: column; }
.notice-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--duration-fast);
}
.notice-list li:last-child { border-bottom: none; }
.notice-list li:hover a { color: var(--brand-500); }
.notice-list time {
  flex-shrink: 0;
  width: 56px;
  padding: 6px 0;
  text-align: center;
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--brand-500);
  background: rgba(124, 92, 252, 0.06);
  border-radius: var(--radius-md);
  line-height: 1.3;
}
.notice-list a {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--duration-fast);
}

/* -------------------- Showcase — Bento Cards -------------------- */
.showcase-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.showcase-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
}
.showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-emphasis);
}
.showcase-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.06), rgba(0, 212, 255, 0.04));
}
.showcase-card-body {
  padding: var(--space-5);
}
.showcase-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--brand-500);
  background: rgba(124, 92, 252, 0.08);
  margin-bottom: var(--space-2);
}
.showcase-card h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}
.showcase-card p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* -------------------- Policy / Guide — Mini Grid -------------------- */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.mini-grid .panel { padding: var(--space-6); }
.mini-grid .article-list li { padding: 12px 0; }
.home-polish .mini-grid {
  align-items: stretch;
}
.home-polish #policy,
.home-polish #guide {
  min-height: 380px;
}
.home-polish .student-service-section {
  padding-bottom: var(--space-8);
}
.home-polish .reveal {
  transition-duration: 360ms;
}

/* -------------------- Footer -------------------- */
.site-footer {
  margin-top: var(--space-16);
  padding: var(--space-10) 0;
  background: linear-gradient(180deg, #0F172A 0%, #0A0F1E 100%);
  color: rgba(255, 255, 255, 0.65);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 92, 252, 0.25), transparent);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand strong { font-size: var(--font-base); color: #fff; font-weight: 700; }
.footer-brand p { font-size: var(--font-sm); color: rgba(255, 255, 255, 0.45); margin: 0; }
.footer-info { font-size: var(--font-sm); color: rgba(255, 255, 255, 0.40); }

/* -------------------- Sub Pages -------------------- */
.sub-page { background: var(--bg-root); }
.sub-container { padding: var(--space-8) 0 var(--space-16); min-height: 60vh; }
.content-page .sub-container {
  padding-top: var(--space-10);
}
.content-container {
  width: min(1080px, calc(100% - 48px));
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--brand-500); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-tertiary); }

/* Sub page panels */
.list-panel h1 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}
.content-list-panel {
  min-height: 720px;
}
.content-list-panel .panel-head {
  margin-bottom: var(--space-4);
}
.content-list-panel .panel-head h1 {
  margin-bottom: 0;
}
.list-total {
  color: var(--text-tertiary);
  font-size: var(--font-sm);
  font-weight: 600;
  white-space: nowrap;
}
.page-list li { align-items: flex-start; padding: 18px 0; }
.page-list-main a {
  white-space: normal;
  font-size: 16px;
}
.page-list p {
  margin-top: 6px;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty-row a {
  color: var(--text-tertiary);
  pointer-events: none;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: var(--space-6);
  margin-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.pagination a {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.58);
  font-size: var(--font-sm);
  font-weight: 700;
  transition: all var(--duration-fast);
}
.pagination a:hover {
  color: var(--brand-500);
  border-color: var(--border-emphasis);
  background: rgba(124, 92, 252, 0.06);
}
.pagination a.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-500), #6B4EE6);
  box-shadow: 0 6px 18px rgba(124, 92, 252, 0.18);
}
.pagination a.disabled {
  opacity: 0.42;
  pointer-events: none;
}

/* Article detail */
.article-container { max-width: 820px; }
.article-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-sm);
}
.content-detail-panel {
  min-height: 720px;
  width: 100%;
}
.article-column {
  display: inline-flex;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--brand-500);
  background: rgba(124, 92, 252, 0.08);
  margin-bottom: var(--space-4);
}
.article-detail h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}
.article-meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lead {
  padding: var(--space-5);
  border-left: 4px solid var(--brand-500);
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(124, 92, 252, 0.05), rgba(124, 92, 252, 0.01));
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: var(--font-base);
  margin-bottom: var(--space-8);
}
.article-body {
  font-size: var(--font-base);
  color: var(--text-secondary);
  line-height: 2;
}
.article-body h2 { font-size: var(--font-xl); font-weight: 700; color: var(--text-primary); margin: var(--space-8) 0 var(--space-3); }
.article-body h3 { font-size: var(--font-lg); font-weight: 700; color: var(--text-primary); margin: var(--space-6) 0 var(--space-2); }
.article-body p { margin-bottom: var(--space-4); }
.article-body img { border-radius: var(--radius-lg); margin: var(--space-4) 0; }
.article-body ul, .article-body ol { padding-left: var(--space-6); margin-bottom: var(--space-4); }
.article-body li { margin-bottom: var(--space-2); }

/* -------------------- Exam Pages (Sub-page extended) -------------------- */
.exam-nav-bar {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.exam-nav-bar a {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 600;
  transition: all var(--duration-fast);
}
.exam-nav-bar a.active {
  background: linear-gradient(135deg, #1f5f98, #2f79b7);
  color: #fff;
  box-shadow: 0 4px 16px rgba(31, 95, 152, 0.20);
}
.exam-nav-bar a:not(.active) {
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.exam-nav-bar a:not(.active):hover {
  border-color: var(--border-emphasis);
  color: var(--brand-500);
}

.exam-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.exam-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--duration-fast);
  position: relative;
  overflow: hidden;
}
.exam-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-emphasis);
}
.exam-card::after {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}
.exam-card h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  position: relative; z-index: 1;
}
.exam-type-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 700;
  margin-bottom: var(--space-3);
  position: relative; z-index: 1;
}
.exam-type-tag.formal { background: rgba(31, 95, 152, 0.10); color: var(--brand-500); }
.exam-type-tag.mock { background: rgba(245, 158, 11, 0.10); color: #D97706; }
.exam-type-tag.makeup { background: rgba(255, 107, 138, 0.08); color: #BE185D; }
.exam-meta {
  display: flex; gap: var(--space-4);
  font-size: var(--font-sm); color: var(--text-tertiary);
  margin-bottom: var(--space-3); flex-wrap: wrap;
  position: relative; z-index: 1;
}
.exam-meta b { color: var(--text-primary); }
.exam-status {
  font-size: var(--font-sm); margin-bottom: var(--space-4);
  position: relative; z-index: 1;
}
.exam-status .pass { color: var(--color-success); font-weight: 600; }
.exam-status .fail { color: var(--color-danger); font-weight: 600; }
.exam-status .ongoing { color: var(--brand-500); font-weight: 600; }
.exam-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.btn-exam {
  display: inline-flex; align-items: center;
  padding: 10px 22px; border-radius: var(--radius-full);
  font-size: var(--font-sm); font-weight: 700;
  background: linear-gradient(135deg, #1f5f98, #2f79b7);
  color: #fff;
  box-shadow: 0 4px 16px rgba(31, 95, 152, 0.22);
  transition: all var(--duration-fast);
}
.btn-exam:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(31, 95, 152, 0.30); }
.btn-exam:active { transform: scale(0.97); }
.btn-exam.disabled {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-tertiary);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-score-ghost {
  display: inline-flex; align-items: center;
  padding: 10px 22px; border-radius: var(--radius-full);
  font-size: var(--font-sm); font-weight: 600;
  color: var(--brand-500);
  border: 1.5px solid rgba(31, 95, 152, 0.25);
  transition: all var(--duration-fast);
}
.btn-score-ghost:hover { background: rgba(31, 95, 152, 0.06); border-color: var(--brand-400); }
.exam-empty {
  text-align: center; padding: var(--space-20) var(--space-4);
}
.exam-empty-icon { font-size: 48px; margin-bottom: var(--space-4); display: block; }
.exam-empty h2 { font-size: var(--font-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.exam-empty p { font-size: var(--font-sm); color: var(--text-tertiary); }

/* -------------------- Student Portal -------------------- */
.student-page {
  --brand-500: #1f5f98;
  --brand-400: #2f79b7;
  --border-emphasis: rgba(31, 95, 152, 0.30);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 8% 0, rgba(47, 121, 183, 0.12), transparent 30%),
    radial-gradient(circle at 92% 26%, rgba(125, 166, 207, 0.12), transparent 28%),
    linear-gradient(180deg, #f6fbff 0%, #eef6ff 52%, #f7fbff 100%);
}
.student-page > main { flex: 1 0 auto; }
.student-page .sub-container {
  min-height: clamp(600px, calc(100dvh - 260px), 820px);
  padding-top: var(--space-8);
  padding-bottom: var(--space-12);
}
.student-site-header {
  flex: 0 0 auto;
}
.student-site-header .nav { min-height: 76px; height: auto; }
.student-site-header .brand-logo { width: 205px; }
.student-nav .active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.student-auth-login,
.student-account-trigger {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.home-polish .student-auth-login {
  color: #f8fbff !important;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(216, 232, 248, 0.42);
}
.student-account { position: relative; flex: 0 0 auto; }
.student-account[hidden],
.student-account-menu[hidden],
.student-confirm[hidden] { display: none; }
.student-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}
.student-account-trigger:hover,
.student-account-trigger[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.36); }
.student-account-trigger:focus-visible,
.student-menu-logout:focus-visible,
.student-confirm button:focus-visible { outline: 3px solid rgba(191, 219, 254, 0.58); outline-offset: 2px; }
.student-account-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.student-account-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--duration-fast); }
.student-account-trigger[aria-expanded="true"] .student-account-chevron { transform: rotate(180deg); }
.student-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 220;
  width: 176px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(31, 95, 152, 0.16);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(15, 43, 76, 0.20);
  animation: student-menu-in 180ms var(--ease-out);
}
.student-account-menu::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-top: 1px solid rgba(31, 95, 152, 0.16);
  border-left: 1px solid rgba(31, 95, 152, 0.16);
  transform: rotate(45deg);
}
.student-menu-logout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #9f1239;
  background: transparent;
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.student-menu-logout:hover { background: #fff1f2; }
.student-menu-logout svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.student-confirm {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 24, 31, 0.58);
  backdrop-filter: blur(8px);
}
.student-confirm-card {
  width: min(420px, 100%);
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(31, 95, 152, 0.14);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 43, 76, 0.26);
  animation: student-dialog-in 220ms var(--ease-out);
}
.student-confirm-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  color: #be123c;
  background: #fff1f2;
  border-radius: 18px;
}
.student-confirm-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.student-confirm-card h2 { margin: 0 0 10px; color: #17395f; font-size: 24px; }
.student-confirm-card p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.75; }
.student-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.student-confirm-actions button { min-height: 46px; border-radius: 13px; font: inherit; font-weight: 800; cursor: pointer; }
.student-confirm-cancel { color: #334155; background: #fff; border: 1px solid #dbe4e7; }
.student-confirm-cancel:hover { background: #f8fafc; border-color: #b8c7cc; }
.student-confirm-submit { color: #fff; background: linear-gradient(135deg, #be123c, #e11d48); border: 0; box-shadow: 0 8px 20px rgba(190, 18, 60, 0.22); }
.student-confirm-submit:hover { background: linear-gradient(135deg, #9f1239, #be123c); }
.student-confirm-submit:disabled { opacity: 0.62; cursor: wait; }
.student-dialog-open { overflow: hidden; }
@keyframes student-menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes student-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.student-site-footer { flex: 0 0 auto; margin-top: 0; }
.student-page .exam-nav-bar a.active,
.student-page .btn-exam,
.student-page .btn-cert-sm {
  background: linear-gradient(135deg, #1f5f98, #2f79b7);
  box-shadow: 0 4px 16px rgba(31, 95, 152, 0.20);
}
.student-page .auth-box { border: 1px solid rgba(31, 95, 152, 0.18); box-shadow: 0 24px 70px rgba(15, 43, 76, 0.18); }
.student-page .auth-box a { background: linear-gradient(135deg, #1f5f98, #2f79b7); }

@media (max-width: 1024px) {
  .student-site-header .brand-logo { width: 168px; }
  .student-site-header .brand-divider { display: none; }
  .student-nav { gap: 2px; }
  .student-nav a, .student-account-trigger { padding-inline: 10px; }
}

@media (max-width: 768px) {
  .student-page .sub-container { min-height: calc(100dvh - 220px); }
  .student-site-header .nav { align-items: center; }
  .student-site-header .brand-logo { width: 140px; height: 42px; }
  .student-site-header .brand-info { display: none; }
  .student-nav a:not(.active):not(.student-auth-login) { display: none; }
  .student-nav .active { display: inline-flex; align-items: center; }
  .student-auth-login, .student-account-trigger { min-height: 40px; padding: 7px 10px; font-size: 13px; }
}

/* -------------------- Responsive -------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel { display: none; }
  .quick-bento { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .home-polish .content-grid { grid-template-columns: 1fr; }
  .portal-board-grid { grid-template-columns: 1fr; }
  .portal-board-card { min-height: 340px; }
  .home-polish #policy,
  .home-polish #guide { min-height: 340px; }
  .showcase-bento { grid-template-columns: repeat(2, 1fr); }
  .home-polish .brand-logo { width: 180px; height: 46px; }
  .home-polish .brand-divider { display: none; }
  .home-polish .brand-name { font-size: 15px; }
}
@media (max-width: 768px) {
  .container { width: min(100% - 24px, 1280px); }
  .nav { height: auto; padding: 12px 0; }
  .brand-sub { display: none; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .nav-links a:not(.nav-login):not(.nav-student) { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero-actions, .hero-metrics { flex-direction: column; }
  .quick-bento, .showcase-bento { grid-template-columns: 1fr 1fr; }
  .mini-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; text-align: center; }
  .exam-cards { grid-template-columns: 1fr; }
  .article-detail { padding: var(--space-5); }
  .content-container { width: min(100% - 24px, 1080px); }
  .content-list-panel, .content-detail-panel { min-height: 620px; }
  .home-polish .nav { align-items: flex-start; gap: 12px; }
  .home-polish .brand-logo { width: 148px; height: 42px; }
  .home-polish .brand-info { display: none; }
}
@media (max-width: 480px) {
  .quick-bento, .showcase-bento { grid-template-columns: 1fr; }
  .exam-nav-bar { flex-direction: column; }
  .exam-nav-bar a { text-align: center; }
  .exam-card .exam-actions { flex-direction: column; }
  .exam-card .btn-exam, .exam-card .btn-score-ghost { text-align: center; justify-content: center; }
  .home-polish .brand-logo { width: 128px; height: 40px; padding: 5px 8px; }
  .home-polish .nav-links { margin-left: auto; }
  .portal-board-card { min-height: 300px; }
  .home-polish #policy,
  .home-polish #guide { min-height: 300px; }
}

@media (max-width: 768px) {
  .student-page .student-site-header .nav { align-items: center; }
  .student-page .student-nav a.active,
  .student-page .student-nav .student-auth-login { display: inline-flex; align-items: center; }
  .student-page .student-nav .student-account:not([hidden]) { display: block; }
  .student-account-menu { position: fixed; top: 68px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .student-account-menu,
  .student-confirm-card { animation: none; }
  .student-account-chevron { transition: none; }
}

/* -------------------- Serious Blue News Portal -------------------- */
.portal-news-theme {
  --brand-500: #075a9c;
  --brand-400: #0b72bd;
  --brand-300: #d8eafb;
  --text-primary: #10243f;
  --text-secondary: #4c5f78;
  --text-tertiary: #7b8ca3;
  --border-subtle: #d9e6f3;
  --border-default: #c9d9ea;
  color: var(--text-primary);
  background: linear-gradient(180deg, #eef6ff 0%, #f7fbff 260px, #f4f7fb 100%);
}
.portal-news-theme .container { width: min(1180px, calc(100% - 40px)); }
.portal-news-theme .brand-logo {
  width: 238px;
  height: 62px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.portal-news-theme .brand-divider {
  height: 48px;
  background: rgba(226, 238, 250, .24);
}
.portal-news-theme .brand-name {
  color: #f8fbff;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 20, 46, .22);
}
.portal-news-theme .brand-sub {
  margin-top: 2px;
  color: rgba(226, 238, 250, .74);
  font-size: 12px;
  letter-spacing: .04em;
}
.portal-news-main { padding: 26px 0 44px; }
.portal-headline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
  gap: 24px;
  align-items: stretch;
}
.portal-headline,
.portal-notice-panel,
.portal-news-column,
.portal-showcase-section {
  background: #fff;
  border: 1px solid #d8e5f2;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(22, 70, 116, .06);
}
.portal-headline {
  min-height: 260px;
  padding: 32px 36px;
  border-top: 4px solid #0b63a8;
}
.portal-section-kicker {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  color: #075a9c;
  background: #eaf4ff;
  border-left: 3px solid #0b63a8;
  font-size: 13px;
  font-weight: 800;
}
.portal-headline h1 {
  margin: 18px 0 14px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.28;
  letter-spacing: 0;
}
.portal-headline h1 a:hover { color: #075a9c; }
.portal-headline p {
  max-width: 760px;
  margin: 0;
  color: #4c5f78;
  font-size: 16px;
  line-height: 1.9;
}
.portal-headline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  color: #7b8ca3;
  font-size: 14px;
}
.portal-notice-panel { padding: 18px 20px; }
.portal-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  border-bottom: 2px solid #e4edf6;
}
.portal-column-head h2 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  color: #083b68;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}
.portal-column-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 18px;
  background: #0b63a8;
  transform: translateY(-50%);
}
.portal-column-head a { color: #5f7894; font-size: 13px; }
.portal-column-head a:hover { color: #075a9c; }
.portal-notice-list,
.portal-article-list {
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
}
.portal-notice-list li,
.portal-article-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 43px;
  border-bottom: 1px dashed #d8e5f2;
  color: #263b55;
}
.portal-notice-list li:last-child,
.portal-article-list li:last-child { border-bottom: 0; }
.portal-notice-list time {
  flex: 0 0 48px;
  color: #075a9c;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.portal-notice-list a,
.portal-article-list a {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-notice-list a:hover,
.portal-article-list a:hover { color: #075a9c; }
.portal-article-list time {
  flex: 0 0 auto;
  color: #8291a5;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.portal-news-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.portal-news-column { padding: 18px 20px; min-height: 280px; }
.portal-showcase-section { margin-top: 24px; padding: 18px 20px 22px; }
.portal-showcase-head { margin-bottom: 18px; }
.portal-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.portal-showcase-item {
  min-width: 0;
  border: 1px solid #d8e5f2;
  background: #fbfdff;
  border-radius: 4px;
  overflow: hidden;
}
.portal-showcase-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eaf4ff;
}
.portal-showcase-item div { padding: 14px 14px 16px; }
.portal-showcase-item span {
  color: #075a9c;
  font-size: 12px;
  font-weight: 800;
}
.portal-showcase-item h3 {
  margin: 6px 0 8px;
  color: #10243f;
  font-size: 17px;
  line-height: 1.4;
}
.portal-showcase-item p {
  margin: 0;
  color: #5b6f88;
  font-size: 14px;
  line-height: 1.7;
}
.portal-empty-line { color: #8291a5; font-size: 14px; }
.portal-news-footer {
  margin-top: 0;
  background: #083b68;
  color: #dbeafe;
}
.portal-news-footer .footer-info,
.portal-news-footer .footer-brand p { color: #bfd5ec; }
.portal-news-theme.content-page {
  background: linear-gradient(180deg, #eef6ff 0%, #f8fbff 220px, #f4f7fb 100%);
}
.portal-news-theme.content-page .site-header {
  background: #1f5f98;
  border-bottom: 1px solid rgba(226, 238, 250, .16);
  box-shadow: 0 8px 24px rgba(24, 80, 130, .16);
}
.portal-news-theme.content-page .nav {
  min-height: 88px;
  height: auto;
  padding: 16px 0;
  gap: 16px;
}
/* 900px 档：品牌不参与收缩（否则 Logo/站名伸入导航首项），收缩由 .nav-links 横向滚动承担。 */
.portal-news-theme.content-page .brand { flex-shrink: 0; }
/* 门户内容页单栏导航收紧（2026-11-23）：1280px 下导航与品牌共 1180px 容器放不下、
   链接被 flex 挤压换行、激活态 inset 阴影顺着 pill 圆角走出弧线。收紧后单行放得下，
   激活态直角 + inset 底线 = 直线下划线；窄屏时导航横向滚动不断行。 */
.portal-news-theme.content-page .brand-with-logo { gap: 12px; }
.portal-news-theme.content-page .brand-logo { width: 200px; height: 52px; }
.portal-news-theme.content-page .brand-name { font-size: 17px; }
.portal-news-theme.content-page .nav-links {
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.portal-news-theme.content-page .nav-links::-webkit-scrollbar { display: none; }
/* 不换行 + 不收缩只写在本规则内（门户主导航），不写全局 .nav-links a——全局写法会命中考试子站学生导航。 */
.portal-news-theme.content-page .nav-links a:not(.nav-login):not(.nav-student) {
  color: rgba(241, 247, 253, .88);
  background: transparent;
  padding: 8px 8px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.portal-news-theme.content-page .nav-links a:hover,
.portal-news-theme.content-page .nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border-radius: 0;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .72);
}

/* -------------------- Portal SSO Pages -------------------- */
.portal-sso-page,
.sso-only-login {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef6ff 0%, #f8fbff 55%, #f4f7fb 100%);
}
.portal-sso-main,
.student-login-main.sso-only-login {
  min-height: clamp(560px, calc(100dvh - 220px), 760px);
  display: grid;
  place-items: center;
  padding: 48px 20px;
}
.portal-sso-card,
.sso-login-card {
  width: min(460px, 100%);
  padding: 34px 32px;
  text-align: center;
  background: #fff;
  border: 1px solid #d8e5f2;
  border-top: 4px solid #0b63a8;
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(22, 70, 116, .12);
}
.portal-sso-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 18px;
  border: 3px solid #d8eafb;
  border-top-color: #0b63a8;
  border-radius: 50%;
  animation: portal-sso-spin 900ms linear infinite;
}
.portal-sso-card h1,
.sso-login-card h1 {
  margin: 0 0 10px;
  color: #083b68;
  font-size: 24px;
  letter-spacing: 0;
}
.portal-sso-card p,
.sso-login-card p {
  margin: 0;
  color: #5b6f88;
  line-height: 1.8;
}
.portal-sso-action,
.sso-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 24px;
  padding: 0 24px;
  color: #fff;
  background: #0b63a8;
  border-radius: 4px;
  font-weight: 800;
}
.portal-sso-action:hover,
.sso-login-button:hover { background: #084f8a; }
.sso-login-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px 10px;
  color: #075a9c;
  background: #eaf4ff;
  border-left: 3px solid #0b63a8;
  font-size: 13px;
  font-weight: 800;
}
.sso-login-back {
  display: block;
  margin-top: 16px;
  color: #60748d;
  font-size: 14px;
}
@keyframes portal-sso-spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) {
  .portal-headline-grid,
  .portal-news-layout { grid-template-columns: 1fr; }
  .portal-showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .portal-news-theme .container { width: min(100% - 24px, 1180px); }
  .portal-news-theme .brand-logo { width: 168px; height: 48px; padding: 0; }
  .portal-news-theme.content-page .brand-logo { width: 168px; height: 48px; }
  .portal-news-theme .brand-divider,
  .portal-news-theme .brand-info { display: none; }
  .portal-headline { min-height: auto; padding: 24px 20px; }
  .portal-headline h1 { font-size: 24px; }
  .portal-notice-list a,
  .portal-article-list a { white-space: normal; }
  .portal-article-list li { align-items: flex-start; padding: 10px 0; }
  .portal-showcase-grid { grid-template-columns: 1fr; }
  .portal-news-theme.content-page .site-header { overflow: hidden; }
  .portal-news-theme.content-page .nav {
    min-height: auto;
    padding: 12px 0 0;
    display: block;
  }
  .portal-news-theme.content-page .brand {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
  }
  .portal-news-theme.content-page .nav-links {
    display: flex;
    width: 100%;
    min-height: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid rgba(226, 238, 250, .16);
  }
  .portal-news-theme.content-page .nav-links::-webkit-scrollbar { display: none; }
  .portal-news-theme.content-page .nav-links a:not(.nav-login):not(.nav-student) {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 13px;
    white-space: nowrap;
  }
}
