:root {
  --shell: #042448;
  --shell-2: #0b335f;
  --shell-glass: rgba(4, 36, 72, 0.86);
  --accent: #1f5fa8;
  --accent-soft: #eaf2fb;
  --gold: #caa23a;
  --red: #b92d2d;
  --green: #23835d;
  --surface: #ffffff;
  --surface-muted: #f4f7fb;
  --footer: #eceff3;
  --text: #111827;
  --muted: #667085;
  --border: #d7e0eb;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-soft: 0 16px 38px rgba(10, 31, 68, 0.12);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(4, 36, 72, 0.08) 0, rgba(4, 36, 72, 0) 320px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 251, 0.94)),
    #f4f7fb;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 0 24px;
  color: #fff;
  background: rgba(4, 36, 72, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 28px rgba(4, 36, 72, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 206px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  white-space: nowrap;
}

.main-nav a {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #fff;
}

.header-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.site-search input {
  width: 210px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.site-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.official-menu-button {
  min-width: 86px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.official-menu {
  position: absolute;
  right: 0;
  top: 48px;
  display: none;
  width: 360px;
  max-width: calc(100vw - 40px);
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.official-menu.is-open {
  display: grid;
  gap: 8px;
}

.menu-toggle {
  display: none;
}

main {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 22px;
  padding-top: 26px;
}

.hero-media,
.notice-panel,
.info-card,
.downloads-section,
.official-strip,
.subject-section,
.portal-link-card,
.side-nav,
.detail-content {
  border: 1px solid rgba(215, 224, 235, 0.96);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.hero-media {
  position: relative;
  min-height: 432px;
  overflow: hidden;
  color: #fff;
  background: var(--shell);
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(4, 36, 72, 0.95) 0, rgba(4, 36, 72, 0.78) 42%, rgba(4, 36, 72, 0.38) 100%),
    var(--slide-image);
  background-position: center;
  background-size: cover;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px);
  opacity: 0.2;
}

.slide > * {
  position: relative;
  z-index: 1;
}

.slide.is-active {
  opacity: 1;
  transform: translateY(0);
}

.slide h1,
.slide h2 {
  max-width: 650px;
  margin: 14px 0;
  font-size: 48px;
  line-height: 1.14;
}

.slide p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-left: 5px solid var(--gold);
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-action {
  color: var(--shell);
  background: #fff;
}

.ghost-action {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.primary-action:hover,
.ghost-action:hover {
  transform: translateY(-2px);
}

.slide-controls {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.slide-controls button {
  width: 12px;
  height: 12px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.slide-controls button.is-active {
  background: var(--gold);
}

.notice-panel,
.info-card,
.downloads-section {
  padding: 18px;
}

.section-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin-bottom: 14px;
  padding: 0 12px;
  color: #fff;
  background: var(--shell-glass);
  border-radius: var(--radius-sm);
}

.section-title h2 {
  margin: 0;
  font-size: 20px;
}

.section-title a {
  font-size: 14px;
  text-decoration: none;
}

.notice-list,
.course-list,
.download-list {
  display: grid;
  gap: 10px;
}

.notice-item,
.download-item,
.course-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.notice-item strong,
.download-item strong,
.course-item strong {
  grid-column: 1;
  line-height: 1.5;
}

.notice-item time,
.download-item > span:last-child,
.course-item time {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}

.item-meta {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.notice-item:hover,
.download-item:hover,
.course-item:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #f8fbff;
  transform: translateY(-1px);
}

.official-strip {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 22px;
  padding: 22px;
}

.official-strip h2,
.section-head h2 {
  margin: 8px 0 0;
  font-size: 28px;
}

.official-strip p,
.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.official-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.official-gateway-card {
  display: flex;
  min-height: 96px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.official-gateway-card strong {
  color: var(--shell);
  font-size: 20px;
}

.official-gateway-card span {
  color: var(--muted);
  line-height: 1.6;
}

.official-gateway-card:hover {
  border-color: var(--accent);
  background: #f8fbff;
  transform: translateY(-2px);
}

.official-link {
  display: flex;
  min-height: 66px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.official-link strong {
  color: var(--shell);
  font-size: 14px;
}

.official-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.official-link:hover {
  border-color: var(--accent);
  background: #f8fbff;
  transform: translateY(-2px);
}

.quick-area {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.quick-area a {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.quick-area span {
  color: var(--shell);
  font-weight: 800;
}

.quick-area strong {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.quick-area a:hover {
  border-color: var(--accent);
  background: #f8fbff;
  transform: translateY(-2px);
}

.subject-section {
  margin-top: 22px;
  padding: 24px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.subject-card {
  display: flex;
  min-height: 318px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.subject-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(9, 30, 66, 0.13);
}

.subject-card header {
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--shell), var(--shell-2));
}

.subject-card header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 28px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.subject-card h3 {
  margin: 0;
  font-size: 22px;
}

.subject-card small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
}

.subject-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 16px 18px;
  list-style: none;
  line-height: 1.58;
}

.subject-card li {
  position: relative;
  padding-left: 14px;
}

.subject-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.subject-card footer {
  margin-top: auto;
  padding: 0 18px 18px;
  color: var(--accent);
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-item {
  min-height: 122px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.stat-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--shell);
  font-size: 21px;
  line-height: 1.35;
}

.stat-item span {
  display: block;
  color: var(--text);
  font-weight: 700;
}

.stat-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.downloads-section,
.portal-sections {
  margin-top: 22px;
}

.portal-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-link-card {
  min-height: 150px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.portal-link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.portal-sections h2 {
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 5px solid var(--accent);
  font-size: 20px;
}

.portal-sections p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.floating-toggle {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 31;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--shell);
  box-shadow: 0 12px 30px rgba(4, 36, 72, 0.28);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.floating-panel {
  position: fixed;
  right: 22px;
  bottom: 90px;
  z-index: 31;
  display: none;
  width: min(320px, calc(100vw - 44px));
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.floating-panel.is-open {
  display: grid;
  gap: 8px;
}

.floating-panel a {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  background: var(--surface-muted);
}

.floating-panel span {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
  padding: 34px 44px;
  background: var(--footer);
  border-top: 1px solid #dde3ea;
}

.site-footer h2,
.site-footer p {
  margin: 0;
}

.site-footer p {
  color: #565f6b;
  line-height: 1.8;
}

.compliance {
  text-align: right;
}

.detail-main {
  padding-top: 22px;
}

.detail-main-simple {
  width: min(980px, calc(100% - 32px));
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.detail-hero {
  min-height: 210px;
  padding: 34px;
  border-radius: var(--radius-md);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(4, 36, 72, 0.97), rgba(11, 51, 95, 0.86)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: var(--shadow-soft);
}

.detail-hero h1 {
  margin: 12px 0;
  font-size: 38px;
  line-height: 1.15;
}

.detail-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.detail-content-simple {
  margin-top: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  margin-top: 22px;
}

.side-nav,
.detail-content {
  padding: 18px;
}

.side-nav {
  height: fit-content;
  position: sticky;
  top: 98px;
}

.side-nav #sideNavLinks {
  display: grid;
  gap: 8px;
}

.side-nav a,
.child-links a {
  display: block;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  background: var(--surface-muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.side-nav a:hover,
.child-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #fff;
}

.lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.highlight-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(202, 162, 58, 0.42);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius-sm);
  background: #fff9e8;
}

.highlight-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #684d05;
}

.highlight-panel p {
  margin: 0;
  color: #6f5b24;
  line-height: 1.7;
}

.highlight-panel p + p {
  margin-top: 6px;
}

.detail-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.detail-mini-card,
.detail-block,
.data-module {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.detail-mini-card {
  min-height: 116px;
  padding: 16px;
}

.detail-mini-card h3,
.detail-block h3,
.child-links h3,
.data-module h3 {
  margin: 0 0 10px;
  color: var(--shell);
}

.detail-mini-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-sections {
  display: grid;
  gap: 12px;
}

.detail-block {
  padding: 16px;
}

.detail-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.75;
}

.dynamic-area {
  margin-top: 14px;
}

.data-module {
  padding: 16px;
}

.compact-module {
  box-shadow: none;
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.module-head h3 {
  margin: 0;
}

.module-head span {
  color: var(--muted);
  font-size: 13px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.filter-row span {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.resource-table,
.compare-table {
  display: grid;
  gap: 8px;
}

.resource-table a,
.compare-table > div {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 90px 90px 110px 120px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}

.resource-table span,
.resource-table em,
.compare-table span {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.resource-table a:hover {
  border-color: var(--accent);
  background: #f8fbff;
}

.compare-table > div {
  grid-template-columns: 90px 110px 1fr 1.6fr;
}

.compare-table .table-head {
  min-height: 38px;
  color: #fff;
  background: var(--shell);
  font-weight: 800;
}

.compare-table .table-head span {
  color: #fff;
}

.course-grid-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resource-list,
.simple-list {
  display: grid;
  gap: 8px;
}

.resource-list a,
.simple-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.resource-list a:hover {
  border-color: var(--accent);
  background: #f8fbff;
}

.resource-list span,
.simple-list span {
  color: var(--muted);
  line-height: 1.55;
}

.course-card-detail {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}

.course-card-detail span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.course-card-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.course-card-detail time {
  color: var(--green);
  font-weight: 800;
}

.detail-official-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.official-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.official-category-list {
  display: grid;
  gap: 14px;
}

.official-category {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.official-category h3 {
  margin: 0 0 12px;
  color: var(--shell);
  font-size: 22px;
}

.official-source-card {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.official-source-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.official-source-card strong {
  color: var(--shell);
  font-size: 20px;
}

.official-source-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.official-source-card em {
  width: fit-content;
  margin-top: auto;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--shell);
  font-style: normal;
  font-weight: 800;
}

.official-source-card:hover {
  border-color: var(--accent);
  background: #f8fbff;
  transform: translateY(-2px);
}

.child-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

@media (max-width: 1260px) {
  .site-header {
    padding: 0 20px;
  }

  .main-nav {
    gap: 10px;
    font-size: 13px;
  }

  .site-search input {
    width: 180px;
  }
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
  }

  .main-nav,
  .header-tools {
    display: none;
  }

  .main-nav.is-open {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 0 4px;
  }

  .main-nav.is-open a {
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 900px) {
  main {
    width: min(100% - 24px, var(--container));
  }

  .hero,
  .official-strip,
  .content-grid,
  .site-footer,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-media {
    min-height: 390px;
  }

  .slide {
    padding: 34px;
  }

  .slide h1,
  .slide h2 {
    font-size: 36px;
  }

  .slide p,
  .detail-hero p {
    font-size: 16px;
  }

  .official-links,
  .subject-grid,
  .portal-sections,
  .detail-card-grid,
  .course-grid-detail,
  .detail-official-links,
  .official-source-grid {
    grid-template-columns: 1fr;
  }

  .quick-area {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-nav {
    position: static;
  }

  .detail-hero {
    padding: 34px;
  }

  .detail-hero h1 {
    font-size: 36px;
  }

  .resource-table a,
  .compare-table > div {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .compliance {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 68px;
    padding: 0 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    display: none;
  }

  .hero-media {
    min-height: 370px;
  }

  .slide {
    padding: 24px;
  }

  .slide h1,
  .slide h2 {
    font-size: 30px;
  }

  .slide p {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .notice-item,
  .download-item,
  .course-item {
    grid-template-columns: 1fr;
  }

  .notice-item time,
  .download-item > span:last-child,
  .course-item time {
    grid-column: 1;
  }

  .stats-grid,
  .quick-area,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .subject-section,
  .official-strip,
  .detail-content,
  .side-nav {
    padding: 14px;
  }

  .detail-hero {
    min-height: 230px;
    padding: 26px;
  }

  .detail-hero h1 {
    font-size: 30px;
  }

  .site-footer {
    padding: 28px 18px;
  }
}

/* 2026 homepage refresh: compact, mobile-first, official-source focused. */
.site-header {
  position: sticky;
  top: 0;
  display: block;
  padding: 0;
}

.header-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: min(var(--container), calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.desktop-officials {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.official-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.official-pill span {
  display: none;
}

.official-pill:hover {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.18);
}

.main-nav {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 10px;
  justify-content: flex-start;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.main-nav a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-officials {
  display: none;
}

.mobile-search-wrap {
  display: none;
}

.hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.hero-media,
.notice-panel,
.info-card,
.downloads-section,
.subject-section,
.detail-content,
.side-nav {
  border-radius: var(--radius-md);
}

.hero-media {
  min-height: 420px;
}

.notice-panel {
  display: flex;
  min-height: 420px;
  flex-direction: column;
}

.notice-list {
  max-height: 332px;
  overflow-y: auto;
  padding-right: 4px;
}

.notice-item,
.download-item,
.course-item {
  border-color: var(--border);
  background: #fff;
}

.subject-section,
.home-module-layer {
  margin-top: 22px;
}

.home-module-layer {
  padding-bottom: 2px;
}

.section-head p {
  max-width: 760px;
}

.quick-area {
  margin-top: 12px;
}

.content-grid {
  align-items: start;
}

.downloads-section .download-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subject-card {
  min-height: 330px;
}

.subject-card header {
  min-height: 122px;
}

.subject-card ul {
  gap: 8px;
}

.floating-link {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface-muted);
  text-decoration: none;
}

.floating-link strong {
  color: var(--shell);
}

.floating-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.floating-toggle,
.floating-panel.is-open {
  display: none;
}

.detail-main {
  padding-top: 22px;
}

@media (max-width: 1180px) {
  .header-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .desktop-officials {
    max-width: 470px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .site-search input {
    width: 176px;
  }
}

@media (max-width: 980px) {
  .site-header {
    min-height: auto;
  }

  .header-main {
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .header-tools {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
  }

  .main-nav {
    display: none;
    width: min(100% - 28px, var(--container));
    padding: 0 0 10px;
  }

  .main-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .main-nav.is-open a {
    min-height: 42px;
    padding: 11px 10px;
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-officials.is-open {
    display: grid;
    width: min(100% - 28px, var(--container));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 auto;
    padding: 0 0 12px;
  }

  .mobile-search-wrap.is-open {
    display: block;
    width: min(100% - 28px, var(--container));
    margin: 0 auto;
    padding: 0 0 10px;
  }

  .mobile-search-wrap .site-search input {
    width: 100%;
    color: #fff;
  }

  .mobile-officials .official-link {
    min-height: 40px;
    padding: 9px;
    text-align: center;
  }

  .mobile-officials .official-link span {
    display: none;
  }

  .floating-toggle {
    display: block;
  }

  .floating-panel.is-open {
    display: grid;
  }

  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .notice-panel {
    min-height: auto;
  }

  .notice-list {
    max-height: none;
    overflow: visible;
  }

  .downloads-section .download-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  main,
  .header-main,
  .main-nav,
  .mobile-officials.is-open {
    width: min(100% - 24px, var(--container));
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    gap: 14px;
  }

  .hero-media {
    min-height: 350px;
  }

  .slide {
    padding: 22px;
  }

  .slide h1,
  .slide h2 {
    max-width: 100%;
    font-size: 28px;
  }

  .slide p {
    font-size: 15px;
    line-height: 1.7;
  }

  .section-head h2,
  .official-strip h2 {
    font-size: 24px;
  }

  .main-nav.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-area {
    grid-template-columns: 1fr;
  }

  .subject-card {
    min-height: auto;
  }

  .subject-card h3 {
    font-size: 20px;
  }

  .floating-toggle {
    right: 16px;
    bottom: 18px;
  }

  .floating-panel {
    right: 16px;
    bottom: 82px;
    width: min(330px, calc(100vw - 32px));
  }
}

/* 2026 focused revision: homepage keeps search, subjects, and official gateways only. */
.header-main.simple-header {
  grid-template-columns: auto;
  justify-content: flex-start;
  min-height: 72px;
}

.home-main {
  padding-top: 28px;
}

.intro-hero {
  min-height: 330px;
  border: 1px solid rgba(215, 224, 235, 0.96);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(4, 36, 72, 0.95) 0, rgba(4, 36, 72, 0.78) 54%, rgba(4, 36, 72, 0.34) 100%),
    url("/assets/hero-campus.png") center / cover;
  box-shadow: var(--shadow-soft);
}

.intro-hero-content {
  max-width: 720px;
  padding: 58px 54px;
}

.intro-hero h1 {
  margin: 16px 0 14px;
  font-size: 48px;
  line-height: 1.12;
}

.intro-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.home-search-section {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  width: min(760px, 100%);
  min-height: 52px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 24px rgba(31, 95, 168, 0.12);
}

.home-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0 18px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.home-search input::placeholder {
  color: #8a96a8;
}

.home-search button {
  border: 0;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.home-search button:hover {
  background: #184f8e;
}

.official-section {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(215, 224, 235, 0.96);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.official-home-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.subject-side-nav h2 {
  margin: 0 0 14px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent);
  font-size: 22px;
  text-align: center;
}

.subject-tab {
  display: block;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background: #fff;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.subject-tab:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.subject-tab.is-active {
  color: #fff;
  background: var(--shell);
}

.subject-panel {
  display: grid;
  gap: 14px;
}

.subject-panel .detail-card-grid {
  margin-bottom: 0;
}

.subject-highlight {
  margin-bottom: 0;
}

.subject-detail-main {
  width: min(var(--container), calc(100% - 32px));
}

.subject-detail-hero {
  min-height: 190px;
}

@media (max-width: 900px) {
  .intro-hero {
    min-height: 300px;
  }

  .intro-hero-content {
    padding: 38px 34px;
  }

  .intro-hero h1 {
    font-size: 38px;
  }

  .official-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-main {
    padding-top: 18px;
  }

  .intro-hero-content {
    padding: 28px 22px;
  }

  .intro-hero h1 {
    font-size: 30px;
  }

  .intro-hero p {
    font-size: 15px;
  }

  .home-search {
    grid-template-columns: 1fr;
  }

  .home-search input {
    min-height: 50px;
  }

  .home-search button {
    min-height: 46px;
  }

  .official-section {
    padding: 14px;
  }

  .official-home-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin console and restored carousel layout. */
.header-main.simple-header {
  grid-template-columns: auto auto;
  justify-content: space-between;
}

.admin-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.admin-entry:hover {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.2);
}

.admin-main {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding-top: 28px;
}

.admin-hero,
.admin-panel,
.admin-token-panel {
  border: 1px solid rgba(215, 224, 235, 0.96);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.admin-hero {
  padding: 28px;
}

.admin-hero h1 {
  margin: 12px 0 8px;
  color: var(--shell);
  font-size: 34px;
}

.admin-hero p,
.admin-token-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.admin-token-panel {
  margin-top: 18px;
  padding: 18px;
}

.admin-token-panel label {
  display: grid;
  gap: 8px;
  color: var(--shell);
  font-weight: 800;
}

.admin-token-panel input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  outline: none;
}

.admin-token-panel input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.12);
}

.admin-token-panel p {
  margin-top: 8px;
  font-size: 13px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 22px;
  margin-top: 22px;
}

.admin-panel {
  padding: 18px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--shell);
  font-weight: 800;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.admin-form textarea {
  resize: vertical;
  line-height: 1.65;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-form button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.admin-form button:hover {
  background: #184f8e;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.form-message.is-error {
  color: var(--red);
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.admin-list h3 {
  margin: 0;
  color: var(--shell);
}

.admin-list-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.admin-list-item span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-main.simple-header {
    grid-template-columns: 1fr auto;
  }

  .admin-entry {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .admin-main {
    width: min(100% - 24px, var(--container));
    padding-top: 18px;
  }

  .admin-hero,
  .admin-panel,
  .admin-token-panel {
    padding: 14px;
  }

  .admin-form-row {
    grid-template-columns: 1fr;
  }
}
/* Login flow and CRUD admin console. */
.login-main {
  display: grid;
  place-items: center;
  width: min(var(--container), calc(100% - 32px));
  min-height: calc(100vh - 100px);
  margin: 0 auto;
  padding: 32px 0;
}

.login-panel {
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid rgba(215, 224, 235, 0.96);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
}

.login-panel h1 {
  margin: 12px 0 8px;
  color: var(--shell);
  font-size: 34px;
}

.login-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.login-form {
  margin-top: 18px;
}

.login-tip {
  margin: 12px 0 0;
  font-size: 13px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-logout {
  cursor: pointer;
  font: inherit;
}

.admin-grid-wide {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-toolbar input {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 11px;
  outline: none;
}

.admin-toolbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.12);
}

.admin-toolbar button,
.admin-row-actions button,
.secondary-button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--shell);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.admin-toolbar button {
  padding: 0 14px;
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-row-actions button {
  padding: 0 10px;
}

.admin-row-actions button:hover,
.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.danger-button {
  color: var(--red) !important;
  border-color: rgba(185, 45, 45, 0.28) !important;
}

.danger-button:hover {
  border-color: var(--red) !important;
  background: #fff5f5 !important;
}

.admin-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.admin-form-actions .secondary-button {
  padding: 0 14px;
}

.admin-list-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-list-item small {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .admin-grid-wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .admin-header-actions,
  .admin-toolbar,
  .admin-form-actions,
  .admin-list-item {
    grid-template-columns: 1fr;
  }

  .admin-header-actions {
    display: grid;
    gap: 8px;
  }

  .admin-row-actions {
    justify-content: stretch;
  }

  .admin-row-actions button {
    flex: 1;
  }
}
/* 811 application guide module. */
.subject-card-actions {
  color: inherit;
  text-decoration: none;
}

.subject-card-actions header {
  display: flex;
  min-height: 146px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.subject-card-actions h3 {
  font-size: 26px;
  line-height: 1.35;
}

.subject-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 20px 18px 22px;
}

.subject-action-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.subject-action-button:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-2px);
}

.guide-nav-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.guide-nav-group h3 {
  margin: 0;
  padding: 8px 10px;
  border-left: 4px solid var(--gold);
  color: var(--shell);
  background: var(--surface-muted);
  font-size: 16px;
}

.guide-nav-heading {
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.guide-nav-link {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #fff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.guide-nav-link:hover,
.guide-nav-link.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: #f8fbff;
}

.guide-nav-link em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.guide-source {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 13px;
}

.guide-rich-content {
  display: grid;
  gap: 12px;
  color: var(--text);
  line-height: 1.8;
}

.guide-rich-content p {
  margin: 0;
}

.guide-rich-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border: 1px solid var(--border);
  background: #fff;
}

.guide-rich-content th,
.guide-rich-content td {
  min-width: 96px;
  border: 1px solid var(--border);
  padding: 9px 10px;
  vertical-align: middle;
}

.guide-rich-content th {
  color: var(--shell);
  background: var(--accent-soft);
}

.guide-rich-content mark {
  padding: 0 4px;
  color: #684d05;
  background: #fff0b8;
}

.guide-rich-content img {
  max-width: 100%;
  height: auto !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.guide-empty-panel,
.guide-download-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.guide-empty-panel h3,
.guide-download-panel h3 {
  margin: 0 0 10px;
  color: var(--shell);
}

.guide-empty-panel p,
.guide-download-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-download-action {
  width: fit-content;
  margin-top: 16px;
  color: #fff;
  background: var(--accent);
}

.guide-download-action:hover {
  background: #184f8e;
}

@media (max-width: 680px) {
  .subject-action-row {
    grid-template-columns: 1fr;
  }

  .subject-card-actions header {
    min-height: 104px;
  }

  .subject-card-actions h3 {
    font-size: 22px;
  }
}

/* 811 guide readability and compact subject cards refresh. */
.subject-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.subject-card-actions {
  min-height: 0;
  overflow: visible;
}

.subject-card-actions header {
  min-height: 104px;
  padding: 18px 14px;
}

.subject-card-actions h3 {
  font-size: 22px;
  line-height: 1.32;
}

.subject-action-row {
  gap: 8px;
  padding: 14px;
}

.subject-action-button {
  min-height: 42px;
  padding: 0 8px;
  font-size: 15px;
}

.subject-detail-content {
  padding: 22px 26px 28px;
}

.subject-detail-content .section-title {
  min-height: 54px;
  margin-bottom: 20px;
}

.subject-detail-content .section-title h2 {
  font-size: 24px;
  line-height: 1.3;
}

.guide-nav-group {
  display: block;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.guide-nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  color: #fff;
  background: var(--accent);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.guide-nav-group summary::-webkit-details-marker {
  display: none;
}

.guide-nav-group summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.guide-nav-group[open] summary::after {
  content: "−";
}

.guide-nav-group summary em {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.guide-nav-items {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.guide-nav-heading {
  padding: 8px 4px 2px;
  color: var(--shell);
  font-size: 14px;
  font-weight: 900;
}

.guide-nav-link {
  min-height: 38px;
  padding: 9px 10px;
  font-size: 14px;
}

.guide-nav-link.is-active {
  color: #fff;
  border-color: var(--shell);
  background: var(--shell);
}

.guide-nav-link.is-active em {
  color: rgba(255, 255, 255, 0.78);
}

.guide-source {
  margin-bottom: 18px;
  padding: 12px 16px;
  font-size: 15px;
}

.guide-rich-content {
  display: block;
  font-size: 18px;
  line-height: 1.9;
}

.guide-rich-content p {
  margin: 0 0 18px;
}

.guide-rich-content > p:has(strong) {
  margin-top: 22px;
  color: #071b33;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.55;
}

.guide-rich-content > p:first-child {
  margin-top: 0;
}

.guide-rich-content strong {
  color: #071b33;
  font-weight: 900;
}

.guide-rich-content mark {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: #5f4200;
  background: #ffe9a6;
  font-weight: 900;
}

.guide-rich-content table {
  margin: 16px 0 24px;
  font-size: 16px;
  line-height: 1.65;
}

.guide-rich-content th,
.guide-rich-content td {
  padding: 11px 12px;
}

.guide-rich-content img {
  display: block;
  margin: 18px 0 24px;
  padding: 8px;
  box-shadow: 0 10px 22px rgba(9, 30, 66, 0.08);
}

.guide-empty-panel,
.guide-download-panel {
  padding: 24px;
  font-size: 18px;
}

@media (max-width: 1080px) {
  .subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .subject-grid {
    grid-template-columns: 1fr;
  }

  .subject-detail-content {
    padding: 16px;
  }

  .guide-rich-content {
    font-size: 16px;
  }

  .guide-rich-content > p:has(strong) {
    font-size: 18px;
  }
}

/* Homepage image-only carousel, 2x2 subject cards, and admin slide manager. */
.hero-image-slide {
  padding: 0;
  justify-content: flex-end;
}

.hero-image-slide::before {
  background-color: #061f3c;
  background-image: var(--slide-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.hero-image-slide::after {
  display: none;
}

.subject-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.subject-card-actions header {
  min-height: 170px;
  padding: 28px 22px;
}

.subject-card-actions h3 {
  font-size: 32px;
  line-height: 1.25;
}

.subject-action-row {
  gap: 14px;
  padding: 22px;
}

.subject-action-button {
  min-height: 56px;
  font-size: 19px;
}

.admin-slide-item {
  grid-template-columns: minmax(0, 1fr) 118px auto;
}

.admin-slide-item img {
  width: 118px;
  height: 70px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--surface-muted);
}

.admin-check-label {
  display: flex !important;
  min-height: 42px;
  align-items: center;
  gap: 10px !important;
  padding-top: 28px;
}

.admin-check-label input {
  width: auto;
  min-height: 0;
}

@media (max-width: 900px) {
  .subject-grid {
    grid-template-columns: 1fr;
  }

  .admin-slide-item {
    grid-template-columns: 1fr;
  }

  .admin-slide-item img {
    width: 100%;
    height: 160px;
  }
}

/* 811 guide table and media polish. */
.guide-nav-group[open] summary::after {
  content: "-";
}

.subject-detail-main {
  width: min(1480px, calc(100% - 32px));
}

.subject-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.subject-detail-content {
  overflow: hidden;
}

.guide-rich-content {
  font-size: 19px;
  line-height: 1.92;
}

.guide-rich-content u,
.guide-rich-content a u {
  color: #071b33;
  font-weight: 900;
  text-decoration: none;
}

.guide-rich-content a {
  font-weight: 900;
  text-decoration: none;
}

.guide-rich-content .guide-table-scroll {
  width: 100%;
  margin: 22px 0 32px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.guide-rich-content table.guide-data-table {
  display: table;
  width: 100% !important;
  min-width: 780px;
  max-width: none;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: auto;
  background: #fff;
  font-size: 18px;
  line-height: 1.65;
}

.guide-rich-content table.guide-data-table th,
.guide-rich-content table.guide-data-table td {
  min-width: 0;
  border: 1px solid var(--border);
  padding: 15px 18px;
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: anywhere;
}

.guide-rich-content table.guide-data-table th {
  color: #031f3e;
  background: #eaf2fb;
  font-size: 20px;
  font-weight: 900;
}

.guide-rich-content table.guide-data-table td {
  color: #06172c;
  font-weight: 500;
}

.guide-rich-content table.guide-data-table td strong,
.guide-rich-content table.guide-data-table th strong {
  font-weight: 900;
}

.guide-rich-content table.guide-data-table p {
  margin: 4px 0;
  line-height: 1.55;
}

.guide-rich-content table.guide-data-table tr:empty {
  display: none;
}

.guide-rich-content img {
  height: auto !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 14px 30px rgba(9, 30, 66, 0.1);
}

.guide-rich-content .guide-image-block {
  margin: 22px 0 34px;
}

.guide-rich-content .guide-image-block img {
  display: block;
  width: min(100%, 1080px) !important;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
}

.guide-rich-content .guide-image-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px;
  margin: 22px 0 36px;
}

.guide-rich-content .guide-image-row img {
  flex: 0 1 clamp(210px, 21vw, 300px);
  width: clamp(210px, 21vw, 300px) !important;
  max-width: 100%;
  margin: 0;
  padding: 10px;
  object-fit: contain;
}

.guide-rich-content .guide-book-row img {
  flex-basis: clamp(230px, 22vw, 320px);
  width: clamp(230px, 22vw, 320px) !important;
}

@media (max-width: 1100px) {
  .subject-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .guide-rich-content table.guide-data-table {
    min-width: 720px;
    font-size: 16px;
  }

  .guide-rich-content table.guide-data-table th {
    font-size: 18px;
  }
}

@media (max-width: 900px) {
  .subject-layout {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
  }
}

@media (max-width: 680px) {
  .guide-rich-content {
    font-size: 17px;
  }

  .guide-rich-content table.guide-data-table {
    min-width: 660px;
  }

  .guide-rich-content table.guide-data-table th,
  .guide-rich-content table.guide-data-table td {
    padding: 12px 14px;
  }

  .guide-rich-content .guide-image-row {
    justify-content: center;
  }

  .guide-rich-content .guide-image-row img,
  .guide-rich-content .guide-book-row img {
    flex-basis: min(78vw, 300px);
    width: min(78vw, 300px) !important;
  }
}


/* Drag-and-drop carousel uploads. */
.slide-upload-box {
  display: grid;
  gap: 6px;
  min-height: 118px;
  place-items: center;
  padding: 18px;
  border: 2px dashed rgba(31, 95, 168, 0.42);
  border-radius: var(--radius-sm);
  color: var(--shell);
  background: #f8fbff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.slide-upload-box strong {
  font-size: 17px;
}

.slide-upload-box span {
  color: var(--muted);
  font-size: 13px;
}

.slide-upload-box:hover,
.slide-upload-box:focus,
.slide-upload-box.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
  transform: translateY(-1px);
}

.slide-preview {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.slide-preview[hidden] {
  display: none;
}

.slide-preview img {
  width: 100%;
  aspect-ratio: 16 / 7;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--surface-muted);
}

.slide-preview span,
.admin-slide-item span {
  overflow-wrap: anywhere;
}
/* Cleaner home headings and stronger 811 guide hierarchy. */
.home-main .compact-head {
  margin-bottom: 16px;
}

.home-main .compact-head h2 {
  margin-top: 0;
}

.guide-rich-content p.guide-section-heading {
  margin: 30px 0 16px;
  padding: 12px 16px;
  border-left: 6px solid var(--accent);
  border-bottom: 1px solid rgba(31, 95, 168, 0.22);
  color: #031f3e;
  background: #f3f8ff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.45;
}

.guide-rich-content p.guide-section-heading:first-child {
  margin-top: 0;
}

.guide-rich-content p.guide-section-heading strong {
  color: inherit;
}

.guide-rich-content p:not(.guide-section-heading) {
  color: #172033;
  font-weight: 500;
}

@media (max-width: 680px) {
  .guide-rich-content p.guide-section-heading {
    padding: 10px 12px;
    font-size: 20px;
  }
}
.guide-rich-content > p:has(strong):not(.guide-section-heading) {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: #172033;
  background: transparent;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

.guide-rich-content > p:has(strong):not(.guide-section-heading) strong {
  color: #071b33;
  font-weight: 900;
}
/* Fixed subject admin editor. */
.subject-editor-panel {
  margin-top: 22px;
}

.subject-admin-tabs,
.guide-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.subject-admin-tab,
.guide-mode-tab,
.guide-chip,
.guide-builder-head button,
.guide-inline-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--shell);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.subject-admin-tab {
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: left;
}

.subject-admin-tab strong {
  font-size: 20px;
}

.subject-admin-tab span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.subject-admin-tab.is-active,
.guide-mode-tab.is-active,
.guide-chip.is-active {
  color: #fff;
  border-color: var(--shell);
  background: var(--shell);
}

.subject-admin-tab.is-active span {
  color: rgba(255, 255, 255, 0.78);
}

.subject-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  gap: 22px;
  align-items: start;
}

.subject-fixed-form,
.guide-admin-editor {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.subject-fixed-form h3,
.guide-admin-editor h3 {
  margin: 0 0 14px;
  color: var(--shell);
  font-size: 22px;
}

.fixed-action-note {
  padding: 10px 12px;
  border-left: 4px solid var(--gold);
  color: #684d05;
  background: #fff8df;
  font-weight: 800;
  line-height: 1.6;
}

.guide-admin-editor {
  display: grid;
  gap: 14px;
}

.guide-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-full-row {
  grid-column: 1 / -1;
}

.guide-builder-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.48fr) minmax(160px, 0.52fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: start;
}

.guide-builder-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.guide-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-builder-head strong {
  color: var(--shell);
}

.guide-builder-head button,
.guide-inline-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.guide-chip-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}

.guide-chip {
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
  overflow-wrap: anywhere;
}

.guide-item-form textarea {
  font-family: Consolas, "Microsoft YaHei", monospace;
}

.guide-save-row {
  margin-top: 2px;
}

@media (max-width: 1100px) {
  .subject-admin-layout,
  .guide-builder-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .subject-admin-tabs,
  .guide-mode-tabs,
  .guide-settings-grid {
    grid-template-columns: 1fr;
  }
}