﻿:root {
  --primary: #6B8AF2;
  --primary-2: #8EB5F7;
  --red: #E88982;
  --warning: #F1CD77;
  --warning-border: #E0BA62;
  --warning-text: #70561A;
  --white: #FFFFFF;
  --ink: #172033;
  --muted: #657188;
  --line: #D8DEE9;
  --bg: #F3F6FA;
  --panel: #FFFFFF;
  --field-bg: #FFFFFF;
  --field-muted-bg: #EEF8FA;
  --surface-soft: #FBFEFF;
  --surface-soft-2: #EAF8FB;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --nav-text: #334056;
  --hero-eyebrow: #C8ECF2;
  --shadow-soft: 0 8px 22px rgba(19, 35, 65, 0.05);
  --shadow-medium: 0 10px 26px rgba(19, 35, 65, 0.06);
  --shadow-strong: 0 18px 42px rgba(19, 35, 65, 0.08);
  --placeholder-bg: #EAF8FB;
  --footer-bg: #172033;
  --admin-bg: #C8ECF2;
  --topic-detail-bg-start: #EAF8FB;
  --topic-detail-bg-end: #F8FAFC;
  --glass-border: rgba(16, 179, 200, 0.24);
  --glass-accent: rgba(16, 179, 200, 0.18);
  --chip-bg: #DDF5F8;
  --success: #10B3C8;
  --font-sans: "Noto Sans Thai", "Noto Sans", Arial, Helvetica, sans-serif;
}

[data-theme="dark"] {
  --primary: #93C5FD;
  --primary-2: #38BDF8;
  --ink: #E6EEF8;
  --muted: #A3B3C7;
  --line: #2D3A4B;
  --bg: #0F1720;
  --panel: #16202B;
  --field-bg: #111A23;
  --field-muted-bg: #1A2633;
  --surface-soft: #13202A;
  --surface-soft-2: #132B35;
  --topbar-bg: rgba(15, 23, 32, 0.92);
  --nav-text: #D4DEEB;
  --hero-eyebrow: #86D5DF;
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
  --shadow-medium: 0 14px 30px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 22px 48px rgba(0, 0, 0, 0.34);
  --placeholder-bg: #132B35;
  --footer-bg: #0B1118;
  --admin-bg: #0F1720;
  --topic-detail-bg-start: #101B28;
  --topic-detail-bg-end: #0F1720;
  --glass-border: rgba(16, 179, 200, 0.34);
  --glass-accent: rgba(16, 179, 200, 0.24);
  --chip-bg: rgba(16, 179, 200, 0.2);
  --warning: #B89C56;
  --warning-border: #D3B46A;
  --warning-text: #FFF7E3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: var(--field-bg);
  color: var(--ink);
}
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-color: var(--field-bg);
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23657188' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    background-color 0.22s ease;
}
select:hover {
  border-color: rgba(107, 138, 242, 0.58);
  box-shadow: 0 8px 20px rgba(19, 35, 65, 0.06);
  transform: translateY(-1px);
}
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px rgba(107, 138, 242, 0.16),
    0 12px 26px rgba(19, 35, 65, 0.08);
  transform: translateY(-1px);
}
select:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(19, 35, 65, 0.05);
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23A3B3C7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.smooth-select {
  position: relative;
  width: 100%;
  min-width: 0;
}
.smooth-select.is-compact {
  width: auto;
  flex: 0 0 auto;
}
.smooth-select > select {
  position: absolute !important;
  inset: 0;
  z-index: -1;
  width: 100% !important;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.smooth-select-button {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 42px 11px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--field-bg);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 0 rgba(19, 35, 65, 0);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    background-color 0.22s ease;
}
.smooth-select-button::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  opacity: 0.72;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.24s ease, opacity 0.2s ease;
}
.smooth-select-button:hover,
.smooth-select.open .smooth-select-button {
  border-color: rgba(107, 138, 242, 0.58);
  box-shadow: 0 10px 24px rgba(19, 35, 65, 0.08);
  transform: translateY(-1px);
}
.smooth-select.open .smooth-select-button::after {
  transform: rotate(180deg);
  opacity: 0.95;
}
.smooth-select-button:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px rgba(107, 138, 242, 0.16),
    0 12px 26px rgba(19, 35, 65, 0.08);
}
.smooth-select-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400;
  width: var(--smooth-select-width, 240px);
  max-height: 0;
  overflow: hidden;
  padding: 0 6px;
  border: 1px solid rgba(107, 138, 242, 0.22);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(19, 35, 65, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scaleY(0.96);
  transform-origin: top;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease,
    opacity 0.2s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.smooth-select.open .smooth-select-menu {
  max-height: var(--smooth-select-max-height, min(320px, 45vh));
  overflow-y: auto;
  padding: 6px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scaleY(1);
}
.smooth-select-option {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 8px;
  padding: 10px 11px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}
.smooth-select-option:hover,
.smooth-select-option:focus-visible {
  outline: none;
  background: var(--field-muted-bg);
  color: var(--primary);
  transform: translateX(2px);
}
.smooth-select-option.is-selected {
  background: rgba(107, 138, 242, 0.12);
  color: var(--primary);
}
.smooth-select-option.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.65;
}
.smooth-select.is-fiscal .smooth-select-button {
  min-height: 48px;
  border: 2px solid var(--primary);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    var(--primary);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(9, 8, 107, 0.16);
}
[data-theme="dark"] .smooth-select-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    var(--field-bg);
}
[data-theme="dark"] .smooth-select-menu {
  border-color: rgba(147, 197, 253, 0.2);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}
.modern-file-picker {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--field-bg);
  color: var(--ink);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    background-color 0.22s ease;
}
.modern-file-picker:hover,
.modern-file-picker:focus-within {
  border-color: rgba(107, 138, 242, 0.58);
  box-shadow: 0 10px 24px rgba(19, 35, 65, 0.08);
  transform: translateY(-1px);
}
.modern-file-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.modern-file-button {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(107, 138, 242, 0.36);
  border-radius: 8px;
  padding: 7px 12px;
  background: rgba(107, 138, 242, 0.12);
  color: var(--primary);
  cursor: pointer;
  font-weight: 900;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.modern-file-button::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 16V4m0 0 4 4m-4-4-4 4M5 16v2a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-2' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 16V4m0 0 4 4m-4-4-4 4M5 16v2a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-2' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.modern-file-button:hover,
.modern-file-button:focus-visible {
  outline: none;
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(107, 138, 242, 0.18);
  transform: translateY(-1px);
}
.modern-file-name {
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modern-file-picker.has-file .modern-file-name {
  color: var(--ink);
}
.modern-file-picker.is-disabled {
  opacity: 0.62;
  transform: none;
}
.topic-year-image-picker .modern-file-picker {
  min-height: 36px;
  padding: 4px;
}
.topic-year-image-picker .modern-file-button {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 0.82rem;
}
[data-theme="dark"] .modern-file-picker {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    var(--field-bg);
}
[data-theme="dark"] .modern-file-button {
  border-color: rgba(147, 197, 253, 0.32);
  background: rgba(147, 197, 253, 0.1);
  color: var(--primary);
}
[data-theme="dark"] .modern-file-picker.has-file .modern-file-name {
  color: var(--ink);
}
select option:disabled,
select option.topic-code-used {
  color: var(--muted);
  background: var(--field-muted-bg);
}
textarea { resize: vertical; }

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.9rem; }
.form-error {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary);
}
.brand-copy {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}
.brand-campus {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 46px;
  flex: 0 0 auto;
}
.login-brand {
  width: 132px;
  height: 70px;
  justify-self: center;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.public-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--nav-text);
  font-weight: 600;
}
.public-home {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.42) 28%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(150deg, rgba(107, 138, 242, 0.14) 0%, rgba(16, 179, 200, 0.16) 42%, rgba(248, 252, 255, 0.9) 100%),
    var(--admin-bg);
  background-attachment: fixed;
}
.public-home::before,
.public-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.public-home::before {
  background-image:
    linear-gradient(rgba(107, 138, 242, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 179, 200, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.62), transparent 72%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.62), transparent 72%);
}
.public-home::after {
  background:
    linear-gradient(132deg, transparent 0 18%, rgba(255, 255, 255, 0.28) 18% 19%, transparent 19% 100%),
    linear-gradient(152deg, transparent 0 63%, rgba(107, 138, 242, 0.08) 63% 72%, transparent 72% 100%);
  opacity: 0.9;
}
[data-theme="dark"] .public-home {
  background:
    linear-gradient(118deg, rgba(20, 32, 44, 0.94) 0%, rgba(20, 32, 44, 0.58) 38%, rgba(20, 32, 44, 0) 64%),
    linear-gradient(150deg, rgba(56, 189, 248, 0.1) 0%, rgba(147, 197, 253, 0.08) 44%, rgba(11, 17, 24, 0.98) 100%),
    var(--admin-bg);
}
[data-theme="dark"] .public-home::before {
  background-image:
    linear-gradient(rgba(147, 197, 253, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.72), transparent 72%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.72), transparent 72%);
}
[data-theme="dark"] .public-home::after {
  background:
    linear-gradient(132deg, transparent 0 18%, rgba(147, 197, 253, 0.08) 18% 19%, transparent 19% 100%),
    linear-gradient(152deg, transparent 0 63%, rgba(56, 189, 248, 0.08) 63% 72%, transparent 72% 100%);
  opacity: 0.76;
}
.public-home .topbar {
  position: sticky;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  box-shadow: 0 8px 20px rgba(19, 35, 65, 0.08);
}
.public-home .hero,
.public-home .section {
  position: relative;
  z-index: 1;
}
.public-home .brand,
.public-home .public-nav {
  color: var(--nav-text);
}
.public-home .brand-campus {
  color: var(--muted);
}
.public-home .public-nav a {
  opacity: 1;
}
.public-home .theme-toggle,
.public-home .language-switch {
  border-color: var(--line);
  background: var(--panel);
}
.public-home .language-switch button {
  background: var(--surface-soft);
  color: var(--muted);
}
.public-home .language-switch button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}
.public-home .btn-primary {
  background: var(--primary);
  color: var(--white);
}
.public-home .btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--panel);
}
.language-switch {
  width: max-content;
  display: inline-grid;
  grid-template-columns: repeat(2, 48px);
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.language-switch button {
  width: 48px;
  height: 36px;
  min-width: 48px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}
.language-switch button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}
.login-language {
  justify-self: end;
}
.sidebar-language {
  margin-bottom: 12px;
}
.theme-toggle {
  min-width: 118px;
  white-space: nowrap;
}
[data-theme="dark"] .theme-toggle {
  border-color: rgba(16, 179, 200, 0.42);
}
[data-theme="dark"] .brand-mark,
[data-theme="dark"] .language-switch button.active,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .nav-button.active,
[data-theme="dark"] .fiscal-year-select {
  color: #07131C;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-red { background: var(--red); color: var(--white); }
.btn-yellow { background: var(--warning); color: var(--warning-text); border-color: var(--warning-border); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: var(--panel); }
.btn-warning { border-color: var(--warning-border); background: var(--warning); color: var(--warning-text); }
.btn-link { background: transparent; color: var(--primary); padding-inline: 0; }
.btn-small { min-height: 34px; padding: 7px 10px; font-size: 0.85rem; }
.btn-danger { background: var(--red); color: var(--white); }
.btn:hover,
.year-filter-chip:hover,
.topic-more-btn:hover,
.back-link:hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(9, 8, 107, 0.92), rgba(8, 127, 178, 0.68)),
    url('/images/ITAbanner.png') center/cover no-repeat;
  color: var(--white);
}
.public-home .hero {
  min-height: auto;
  padding: 38px 0 28px;
  background: transparent;
  color: var(--ink);
}
.hero-inner {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 80px 0 110px;
}
.public-home .hero-inner {
  width: min(1320px, calc(100% - 40px));
  padding: 0;
}
.public-home .hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(8, 127, 178, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(240, 250, 255, 0.76));
  box-shadow: 0 28px 56px rgba(19, 35, 65, 0.12);
}
[data-theme="dark"] .public-home .hero-card {
  border-color: rgba(56, 189, 248, 0.22);
  background: linear-gradient(135deg, rgba(15, 23, 32, 0.72), rgba(11, 17, 24, 0.46));
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.28);
}
.public-home .hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 1;
}
.public-home .hero-copy {
  position: relative;
  z-index: 2;
  width: min(58%, 760px);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 40px 36px 110px;
}
.public-home .hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: none;
  backdrop-filter: none;
}
.public-home .hero-badge {
  width: max-content;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid rgba(8, 127, 178, 0.24);
  border-radius: 999px;
  background: rgba(246, 250, 255, 0.78);
  color: #29548e;
  box-shadow: 0 8px 20px rgba(19, 35, 65, 0.08);
}
.public-home .hero h1,
.public-home .hero p {
  max-width: 760px;
}
.public-home .hero h1 {
  max-width: 600px;
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1.02;
  text-shadow: 0 10px 28px rgba(7, 19, 28, 0.34);
}
.hero-title-fixed span {
  display: block;
}
.public-home .hero p {
  color: #43536f;
  text-shadow: 0 4px 16px rgba(255, 255, 255, 0.45);
}
.public-home .hero-summary {
  margin-top: 30px;
}
.public-home .hero-stat-card {
  border-color: rgba(8, 127, 178, 0.12);
  background: rgba(255, 255, 255, 0.82);
}
.public-home .hero-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}
.public-home .hero-banner-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  opacity: 1;
  filter: saturate(1.05) contrast(1.03);
}
.public-home .hero-control-bar {
  position: absolute;
  z-index: 2;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 22px 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}
.public-year-carousel {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr) 0;
  align-items: center;
  gap: 10px;
}
.public-year-carousel.is-scrollable {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}
.year-filter-scroll {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 8px 0 10px;
  margin: -8px 0 -10px;
}
.year-scroll-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(142, 181, 247, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary);
  cursor: pointer;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 22px rgba(19, 35, 65, 0.1);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}
.public-year-carousel.is-scrollable .year-scroll-btn {
  opacity: 1;
  pointer-events: auto;
}
.year-scroll-btn:hover,
.year-scroll-btn:focus-visible {
  outline: none;
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(16, 179, 200, 0.16);
}
.year-scroll-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
[data-theme="dark"] .public-home .hero-control-bar {
  border-top: 1px solid rgba(56, 189, 248, 0.14);
  background: rgba(11, 17, 24, 0.84);
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .year-scroll-btn {
  border-color: rgba(147, 197, 253, 0.24);
  background: rgba(22, 32, 43, 0.92);
  color: var(--primary);
}
.public-home .hero-control-copy span {
  display: block;
  color: var(--primary-2);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}
.public-home .hero-control-copy p {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 900;
}
[data-theme="dark"] .public-home .hero-control-copy p {
  color: var(--ink);
}
.public-home .public-year-filter {
  margin: 0;
  width: 100%;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 4px 10px;
  margin: -8px -4px -10px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.public-home .public-year-filter::-webkit-scrollbar {
  display: none;
}
.public-year-carousel.is-scrollable .public-year-filter {
  justify-content: flex-start;
}
.public-home .hero-control-bar .year-filter-chip {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 10px 22px;
  font-size: 1rem;
}
.public-home .surface {
  background: transparent;
  border: 0;
  padding-top: 18px;
}
[data-theme="dark"] .public-home .surface {
  background: transparent;
}
.public-home .section-heading {
  margin-bottom: 18px;
}
.public-home .section-heading h2 {
  margin-bottom: 8px;
}
.public-home .section-heading p {
  color: var(--primary-2);
}
.hero .eyebrow { color: var(--hero-eyebrow); }
.hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.hero p {
  max-width: 680px;
  font-size: 1.14rem;
  line-height: 1.6;
}
.hero-actions,
.hero-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-actions {
  margin-top: 28px;
}
.hero-secondary-action {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.hero-summary {
  margin-top: 26px;
}
.hero-stat-card {
  min-width: 156px;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 26px rgba(7, 19, 28, 0.12);
}
.hero-stat-card strong {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1;
}
.hero-stat-card span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 700;
}
.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(760px, 100%);
  margin-top: 28px;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0;
}
.surface {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1180px) / 2));
  background: var(--panel);
  border-block: 1px solid var(--line);
}
.section-heading h2, .panel h2, .admin-header h1 {
  margin: 0 0 18px;
  color: var(--primary);
}
.row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.info-grid, .stat-grid, .chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.info-grid article, .stat-grid article, .panel, .chart-panel, .login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.info-grid h3 { margin: 0 0 10px; color: var(--primary); }
.info-grid p { color: var(--muted); line-height: 1.55; }
.download-strip, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.evidence-upload-group {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(107, 138, 242, 0.18);
  border-radius: 12px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 252, 255, 0.72)),
    var(--surface-soft);
  box-shadow: 0 10px 22px rgba(19, 35, 65, 0.04);
}
.evidence-upload-group-primary {
  border-color: rgba(107, 138, 242, 0.28);
  background:
    linear-gradient(180deg, rgba(240, 247, 255, 0.96), rgba(255, 255, 255, 0.8)),
    var(--panel);
}
.evidence-upload-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.evidence-upload-step {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(107, 138, 242, 0.18);
}
.evidence-upload-head strong {
  display: block;
  color: var(--primary);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
}
.evidence-upload-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}
.evidence-type-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.evidence-type-toggle label {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.evidence-type-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.evidence-type-toggle label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(9, 8, 107, 0.12);
}
[data-theme="dark"] .evidence-type-toggle label:has(input:checked) {
  color: #07131C;
}
[data-theme="dark"] .evidence-upload-group {
  border-color: rgba(147, 197, 253, 0.2);
  background:
    linear-gradient(180deg, rgba(147, 197, 253, 0.06), rgba(15, 23, 32, 0.7)),
    var(--panel);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}
[data-theme="dark"] .evidence-upload-group-primary {
  border-color: rgba(147, 197, 253, 0.28);
}
[data-theme="dark"] .evidence-upload-step {
  color: #07131C;
}
.stack-layout {
  display: grid;
  gap: 18px;
}
.year-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.public-year-filter {
  margin: 0 0 20px;
}
.year-filter-chip {
  position: relative;
  overflow: hidden;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition: transform 0.34s ease, box-shadow 0.34s ease, border-color 0.34s ease, background-color 0.34s ease, color 0.34s ease;
}
.year-filter-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(16, 179, 200, 0.22) 48%, transparent 76%);
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
}
.year-filter-chip:hover,
.year-filter-chip:focus-visible {
  border-color: var(--primary-2);
  background: linear-gradient(135deg, rgba(16, 179, 200, 0.12), rgba(255, 255, 255, 0.9));
  color: var(--primary);
  box-shadow: 0 12px 24px rgba(9, 8, 107, 0.12), 0 0 0 3px rgba(16, 179, 200, 0.12);
  animation: topicCardLift 0.42s ease forwards;
}
.year-filter-chip:hover::after,
.year-filter-chip:focus-visible::after {
  opacity: 1;
  transform: translateX(120%);
  transition: transform 1.05s ease, opacity 0.36s ease;
}
.year-filter-chip.active {
  border-color: var(--primary);
  background: rgba(16, 179, 200, 0.14);
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(16, 179, 200, 0.14);
}
.topic-browser {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}
@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal-up {
  animation: revealUp 0.72s ease both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes topicCardLift {
  0% {
    transform: translateY(0) scale(1);
  }
  60% {
    transform: translateY(-7px) scale(1.02);
  }
  100% {
    transform: translateY(-5px) scale(1.015);
  }
}
@keyframes topicHeadingNudge {
  0% {
    transform: translateX(0);
  }
  60% {
    transform: translateX(7px);
  }
  100% {
    transform: translateX(5px);
  }
}
@keyframes topicBadgePop {
  0% {
    transform: translateX(0) scale(1);
  }
  60% {
    transform: translateX(6px) scale(1.08);
  }
  100% {
    transform: translateX(4px) scale(1.05);
  }
}
.topic-section {
  --section-accent: #1f5ed8;
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(164, 186, 223, 0.55);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(236, 245, 255, 0.96)),
    var(--panel);
  box-shadow: 0 18px 38px rgba(23, 54, 105, 0.08);
  transition: transform 0.34s ease, box-shadow 0.34s ease, border-color 0.34s ease, background-color 0.34s ease;
}
.topic-section-9-1 {
  --section-accent: #1f5ed8;
}
.topic-section-9-2 {
  --section-accent: #2f6fdc;
}
.topic-section-9-3 {
  --section-accent: #4683df;
}
.topic-section-9-4 {
  --section-accent: #4d7fe0;
}
.topic-section-9-5 {
  --section-accent: #4d7fe0;
}
.topic-section-10-1 {
  --section-accent: #3c78d3;
}
.topic-section-10-2 {
  --section-accent: #5f92e5;
}
.topic-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 24px 0 0 24px;
  background: linear-gradient(180deg, var(--section-accent), rgba(98, 181, 255, 0.95));
}
.topic-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(140, 193, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 55%);
  opacity: 0.92;
  pointer-events: none;
  transition: opacity 0.34s ease;
}
.topic-section > * {
  position: relative;
  z-index: 1;
}
.topic-section h3 {
  margin: 0;
  color: #123c8b;
  font-size: clamp(1.18rem, 1.4vw, 1.45rem);
  line-height: 1.3;
  transition: transform 0.34s ease, color 0.34s ease;
}
.topic-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.topic-section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.topic-section-code,
.topic-section-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}
.topic-section-code {
  background: linear-gradient(135deg, var(--section-accent), #6db6ff);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 94, 216, 0.2);
}
.topic-section-meta {
  border: 1px solid rgba(160, 188, 228, 0.7);
  background: rgba(255, 255, 255, 0.82);
  color: #52709f;
}
.topic-section:hover,
.topic-section:focus-within {
  border-color: rgba(89, 142, 232, 0.56);
  box-shadow: 0 24px 52px rgba(23, 54, 105, 0.13);
  transform: translateY(-4px);
}
.topic-section:hover::after,
.topic-section:focus-within::after {
  opacity: 1;
}
.topic-section:hover h3,
.topic-section:focus-within h3 {
  color: #0b4ec9;
  animation: topicHeadingNudge 0.42s ease forwards;
}
.topic-section.active {
  border-color: rgba(65, 127, 230, 0.62);
  box-shadow: 0 0 0 3px rgba(117, 177, 255, 0.18), 0 20px 40px rgba(23, 54, 105, 0.1);
}
.topic-link-grid {
  display: grid;
  grid-template-columns: repeat(var(--topic-grid-columns, 5), minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.topic-link {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  align-content: start;
  border: 1px solid rgba(184, 204, 234, 0.75);
  border-radius: 20px;
  padding: 14px 14px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.95)),
    var(--panel);
  color: #183153;
  text-align: left;
  cursor: pointer;
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(23, 54, 105, 0.06);
  transition: transform 0.34s ease, box-shadow 0.34s ease, border-color 0.34s ease, background-color 0.34s ease;
}
.topic-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(116, 180, 255, 0.14), transparent 58%, rgba(225, 77, 90, 0.06));
  opacity: 0;
  transition: opacity 0.34s ease;
}
.topic-link::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--section-accent), #8dd2ff, rgba(226, 93, 106, 0.78));
  transform: scaleX(0.16);
  transform-origin: left center;
  opacity: 0.72;
  transition: transform 0.34s ease, opacity 0.34s ease;
}
.topic-link:hover,
.topic-link:focus-visible {
  border-color: rgba(90, 141, 228, 0.84);
  box-shadow: 0 18px 34px rgba(23, 54, 105, 0.12);
  transform: translateY(-6px);
  animation: topicCardLift 0.42s ease forwards;
}
.topic-link:hover::before,
.topic-link:focus-visible::before {
  opacity: 1;
}
.topic-link:hover::after,
.topic-link:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}
.topic-link:focus-visible {
  outline: 3px solid rgba(126, 185, 255, 0.34);
  outline-offset: 3px;
}
.topic-link span, .topic-badge {
  width: max-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eaf4ff;
  color: #1e5bd4;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.topic-link span {
  transition: transform 0.34s ease, background-color 0.34s ease, color 0.34s ease, box-shadow 0.34s ease;
}
.topic-link:hover span,
.topic-link:focus-visible span {
  background: linear-gradient(135deg, #2d66d8, #6db6ff);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 94, 216, 0.18);
  animation: topicBadgePop 0.42s ease forwards;
}
.topic-link-body {
  display: grid;
  gap: 6px;
  align-content: start;
}
.topic-link strong {
  font-size: 0.95rem;
  line-height: 1.38;
  color: #17335f;
  transition: color 0.34s ease, transform 0.34s ease;
}
.topic-link.long-title strong {
  font-size: 0.86rem;
  line-height: 1.34;
}
.topic-link.extra-long-title strong {
  font-size: 0.78rem;
  line-height: 1.3;
}
.topic-link:hover strong,
.topic-link:focus-visible strong {
  color: #0f4fca;
  transform: translateX(4px);
}
.topic-link small {
  color: #6581a8;
  font-size: 0.84rem;
  transition: color 0.34s ease, transform 0.34s ease;
}
.topic-link:hover small,
.topic-link:focus-visible small {
  color: #d25f6f;
  transform: translateX(4px);
}
.topic-link-arrow {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 50%;
  background: #f0f7ff;
  color: #1e5bd4;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(144, 180, 229, 0.5);
  transition: transform 0.34s ease, background-color 0.34s ease, color 0.34s ease;
}
.topic-link:hover .topic-link-arrow,
.topic-link:focus-visible .topic-link-arrow {
  background: #1e5bd4;
  color: #ffffff;
  transform: translateX(3px) rotate(90deg);
}
.topic-link.active {
  border-color: #2d66d8;
  box-shadow: inset 0 0 0 1px rgba(45, 102, 216, 0.72), 0 14px 28px rgba(23, 54, 105, 0.1);
}
.topic-hover-preview {
  position: fixed;
  z-index: 1100;
  overflow: hidden;
  border: 1px solid rgba(142, 181, 247, 0.72);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 38px rgba(20, 46, 86, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.94);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;
  filter: blur(2px);
}
.topic-hover-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.82) 42%, rgba(255, 255, 255, 0.26) 72%, rgba(255, 255, 255, 0.08) 100%);
}
.topic-hover-preview::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 4px;
  background: linear-gradient(90deg, #6B8AF2, #8EB5F7, #10B3C8);
}
.topic-hover-preview.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: topicPreviewPop 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.topic-hover-preview-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.topic-hover-preview-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center right;
}
.topic-hover-preview-content {
  position: relative;
  z-index: 2;
  width: min(64%, 270px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 18px 20px;
}
.topic-hover-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.topic-hover-preview-badges span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(128, 178, 235, 0.72);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(232, 244, 255, 0.9);
  color: #1c5fae;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}
.topic-hover-preview-content strong {
  display: block;
  color: #0b2d5b;
  font-size: clamp(1.05rem, 1.8vw, 1.55rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}
.topic-hover-preview-content strong.long-title {
  font-size: clamp(0.92rem, 1.4vw, 1.2rem);
  line-height: 1.12;
}
.topic-hover-preview-content strong.extra-long-title {
  font-size: clamp(0.78rem, 1.12vw, 0.98rem);
  line-height: 1.08;
}
@keyframes topicPreviewPop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.015);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
[data-theme="dark"] .topic-section {
  border-color: rgba(74, 111, 170, 0.52);
  background:
    linear-gradient(180deg, rgba(22, 34, 54, 0.96), rgba(16, 27, 45, 0.98)),
    var(--panel);
  box-shadow: 0 18px 38px rgba(2, 10, 24, 0.34);
}
[data-theme="dark"] .topic-section::after {
  background:
    radial-gradient(circle at top right, rgba(82, 149, 255, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 55%);
}
[data-theme="dark"] .topic-section h3 {
  color: #e8f1ff;
}
[data-theme="dark"] .topic-section-meta {
  border-color: rgba(88, 115, 161, 0.55);
  background: rgba(18, 28, 45, 0.86);
  color: #b8cae8;
}
[data-theme="dark"] .topic-section:hover,
[data-theme="dark"] .topic-section:focus-within {
  border-color: rgba(120, 174, 255, 0.54);
  box-shadow: 0 24px 52px rgba(2, 10, 24, 0.46);
}
[data-theme="dark"] .topic-section:hover h3,
[data-theme="dark"] .topic-section:focus-within h3 {
  color: #ffffff;
}
[data-theme="dark"] .topic-link {
  border-color: rgba(73, 100, 145, 0.68);
  background:
    linear-gradient(180deg, rgba(18, 29, 46, 0.96), rgba(14, 23, 39, 0.98)),
    var(--panel);
  color: #dce8fa;
  box-shadow: 0 10px 24px rgba(2, 10, 24, 0.28);
}
[data-theme="dark"] .topic-link strong {
  color: #edf4ff;
}
[data-theme="dark"] .topic-link small {
  color: #aabddd;
}
[data-theme="dark"] .topic-link span,
[data-theme="dark"] .topic-badge {
  background: rgba(35, 75, 142, 0.48);
  color: #9fcbff;
}
[data-theme="dark"] .topic-link-arrow {
  background: rgba(20, 35, 58, 0.92);
  color: #9fcbff;
  box-shadow: inset 0 0 0 1px rgba(81, 117, 176, 0.48);
}
[data-theme="dark"] .topic-link:hover,
[data-theme="dark"] .topic-link:focus-visible {
  border-color: rgba(123, 175, 255, 0.88);
  box-shadow: 0 18px 34px rgba(2, 10, 24, 0.38);
}
[data-theme="dark"] .topic-link:hover strong,
[data-theme="dark"] .topic-link:focus-visible strong {
  color: #ffffff;
}
[data-theme="dark"] .topic-link:hover small,
[data-theme="dark"] .topic-link:focus-visible small {
  color: #ffb3bf;
}
[data-theme="dark"] .topic-link:hover .topic-link-arrow,
[data-theme="dark"] .topic-link:focus-visible .topic-link-arrow {
  background: #6eaefc;
  color: #08111d;
}
[data-theme="dark"] .topic-hover-preview {
  border-color: rgba(147, 197, 253, 0.38);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.42);
}
[data-theme="dark"] .topic-hover-preview::before {
  background: linear-gradient(90deg, rgba(15, 27, 45, 0.94) 0%, rgba(15, 27, 45, 0.84) 44%, rgba(15, 27, 45, 0.28) 74%, rgba(15, 27, 45, 0.12) 100%);
}
[data-theme="dark"] .topic-hover-preview-badges span {
  border-color: rgba(127, 187, 255, 0.36);
  background: rgba(34, 79, 135, 0.68);
  color: #d8ecff;
}
[data-theme="dark"] .topic-hover-preview-content strong {
  color: #edf6ff;
}

@media (max-width: 1180px) {
  .topic-link-grid {
    grid-template-columns: repeat(var(--topic-grid-columns-tablet, 3), minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topic-link-grid {
    grid-template-columns: repeat(var(--topic-grid-columns-mobile, 2), minmax(0, 1fr));
  }
}
.topic-document-stage {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
}
.empty-state h3 {
  margin: 0 0 8px;
  color: var(--primary);
}
.selected-topic {
  max-width: 820px;
  margin-bottom: 18px;
}
.selected-topic h3 {
  margin: 0 0 8px;
  color: var(--primary);
}
.selected-topic p:last-child {
  color: var(--muted);
  line-height: 1.55;
}
.pdf-cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.pdf-cover-grid-simple {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.pdf-cover {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(155deg, rgba(9, 8, 107, 0.94), rgba(8, 127, 178, 0.86)),
    var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-medium);
}
.pdf-cover-simple {
  aspect-ratio: auto;
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  height: 500px;
  cursor: pointer;
  text-decoration: none;
}
.pdf-cover-simple:hover {
  box-shadow: var(--shadow-medium);
  border-color: var(--primary);
}
.pdf-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 1.2rem;
  color: var(--muted);
  text-align: center;
  padding: 20px;
  background: var(--bg);
}
.pdf-cover iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0.34;
  pointer-events: none;
  background: var(--panel);
}
.pdf-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0.34;
  pointer-events: none;
  background: var(--panel);
}
.pdf-iframe-simple {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  opacity: 1;
}
.pdf-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  pointer-events: none;
  background: var(--panel);
}
.pdf-cover-image-simple {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pdf-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 179, 200, 0.25), rgba(9, 8, 107, 0.9));
  z-index: 1;
}
.pdf-cover::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -32px;
  width: 120px;
  height: 120px;
  border: 18px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  z-index: 1;
}
.pdf-cover-code, .pdf-cover-type {
  position: relative;
  z-index: 2;
  width: max-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.pdf-cover strong {
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  line-height: 1.32;
}
.pdf-cover small, .pdf-cover em {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}
.pdf-cover em {
  font-weight: 900;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}
.check-row input {
  width: auto;
}
.file-label {
  color: var(--primary);
  font-weight: 800;
}
.admin-topic-list {
  display: grid;
  gap: 12px;
}
.admin-topic-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft-2);
}
.admin-topic-item strong {
  display: block;
  margin-top: 8px;
  color: var(--primary);
}
.admin-document-list {
  display: grid;
  gap: 8px;
}
.admin-document-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 6px;
  background: var(--panel);
}
.admin-document-row a {
  color: var(--primary);
  font-weight: 800;
}
.admin-document-cover {
  width: 96px;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.admin-document-cover img,
.admin-document-cover iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  pointer-events: none;
}
.admin-document-cover span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-document-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.admin-document-year {
  font-size: 0.85rem;
  font-weight: 800;
}
.topic-year-form,
.section-form,
.section-config-list,
.admin-topic-config-list {
  display: grid;
  gap: 12px;
}
.management-zone {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(16, 179, 200, 0.08), transparent 260px),
    var(--surface-soft);
}
.section-management {
  margin: 0 0 16px;
}
.topic-year-management {
  margin-top: 16px;
}
.zone-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.compact-heading h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 900;
}
.section-form {
  grid-template-columns: minmax(120px, 160px) 1fr minmax(90px, 120px) auto;
  align-items: start;
}
.section-form .button-row,
.section-form .muted {
  grid-column: 1 / -1;
}
.section-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.section-config-meta {
  display: grid;
  gap: 4px;
}
.topic-year-form {
  padding: 12px;
  border: 1px solid rgba(16, 179, 200, 0.22);
  border-radius: 8px;
  background: var(--panel);
}
.topic-year-form.editing-highlight {
  padding: 14px;
  border: 1px solid #e7d88a;
  border-radius: 10px;
  background: rgba(255, 251, 235, 0.6);
}
.topic-year-form .editing-field-highlight {
  background: rgba(255, 252, 238, 0.96);
}
.topic-year-form .editing-field-highlight.editing-highlight-pulse {
  animation: topic-edit-field-blink 1.45s ease-in-out infinite;
}
.topic-year-form .editing-field-highlight.editing-highlight-paused {
  animation: none;
}
@keyframes topic-edit-field-blink {
  0% {
    background: rgba(255, 243, 205, 0.3);
    box-shadow: 0 0 0 0 rgba(255, 243, 205, 0.08);
  }
  50% {
    background: rgba(255, 243, 205, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 243, 205, 0.24);
  }
  100% {
    background: rgba(255, 243, 205, 0.3);
    box-shadow: 0 0 0 0 rgba(255, 243, 205, 0.08);
  }
}
.topic-config-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
}
.topic-year-select-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
}
.topic-year-image-picker {
  min-width: 240px;
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px dashed rgba(90, 141, 228, 0.5);
  border-radius: 10px;
  background: rgba(240, 247, 255, 0.8);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
}
[data-theme="dark"] .topic-year-image-picker {
  border-color: rgba(147, 197, 253, 0.28);
  background:
    linear-gradient(180deg, rgba(147, 197, 253, 0.1), rgba(147, 197, 253, 0.03)),
    var(--field-bg);
  color: var(--primary);
}
[data-theme="dark"] .topic-year-image-picker .modern-file-picker {
  border-color: rgba(147, 197, 253, 0.24);
  background: rgba(15, 23, 32, 0.74);
}
[data-theme="dark"] .topic-year-image-picker .modern-file-name {
  color: var(--muted);
}
.topic-year-image-picker input[type="file"] {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.compact-content-select {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}
.fiscal-year-select {
  width: auto;
  min-height: 48px;
  border: 2px solid var(--primary);
  background-color: var(--primary);
  background-image:
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23FFFFFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  background-repeat: no-repeat, no-repeat;
  background-position: right 16px center, center;
  background-size: 18px 18px, 100% 100%;
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(9, 8, 107, 0.2);
  cursor: pointer;
}
.fiscal-year-select:hover {
  box-shadow: 0 16px 30px rgba(9, 8, 107, 0.18);
}
.fiscal-year-select:focus {
  outline: 3px solid rgba(16, 179, 200, 0.22);
  outline-offset: 2px;
}
.fiscal-year-select option {
  background: var(--panel);
  color: var(--ink);
}
#topicYearForm input[name="section_code"],
#topicYearForm input[name="section_title"] {
  display: none;
}
.topic-management-year {
  margin: 0 0 14px;
  color: var(--primary);
  font-weight: 800;
}
.admin-topic-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.admin-topic-config-meta {
  display: grid;
  gap: 4px;
}
.topic-page-grid {
  display: grid;
  gap: 18px;
}
.topic-page-section-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.topic-page-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.topic-page-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.topic-page-card {
  display: grid;
  gap: 12px;
  min-height: 144px;
  padding: 14px;
  border: 1px solid rgba(184, 204, 234, 0.75);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.95));
}
.topic-page-card-meta {
  display: grid;
  gap: 8px;
}
.contact-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.contact-form {
  display: grid;
  gap: 12px;
}
.footer {
  padding: 24px;
  text-align: center;
  background: var(--footer-bg);
  color: var(--white);
}

.topic-detail-body {
  background:
    linear-gradient(180deg, var(--topic-detail-bg-start) 0, var(--topic-detail-bg-end) 280px),
    var(--topic-detail-bg-end);
}
.topic-detail-body .topbar {
  position: static;
  box-shadow: var(--shadow-medium);
}
.topic-detail-page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 64px;
}
.topic-back-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--panel);
  color: var(--primary);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.back-link:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.topic-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-accent);
  border-radius: 18px;
  min-height: 320px;
  display: flex;
  align-items: center;
  padding: 34px clamp(26px, 5vw, 58px);
  background: #ffffff;
  text-align: left;
  box-shadow: 0 24px 54px rgba(20, 46, 86, 0.14);
}
[data-theme="dark"] .topic-hero {
  background: #0f1b2d;
}
.topic-hero.has-custom-hero {
  background: #ffffff;
}
[data-theme="dark"] .topic-hero.has-custom-hero {
  background: #0f1b2d;
}
.topic-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.topic-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.86) 34%, rgba(255, 255, 255, 0.36) 64%, rgba(255, 255, 255, 0.08) 100%);
}
[data-theme="dark"] .topic-hero-media::after {
  background: linear-gradient(90deg, rgba(15, 27, 45, 0.92) 0%, rgba(15, 27, 45, 0.86) 36%, rgba(15, 27, 45, 0.44) 68%, rgba(15, 27, 45, 0.14) 100%);
}
.topic-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}
.topic-hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.topic-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), #10B3C8);
}
.topic-title {
  margin: 16px 0 0;
  max-width: 560px;
  color: #0b2d5b;
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}
[data-theme="dark"] .topic-title {
  color: #eaf3ff;
}
.topic-description {
  max-width: 540px;
  margin: 14px 0 0;
  color: #536982;
  font-size: 1.02rem;
  line-height: 1.7;
}
[data-theme="dark"] .topic-description {
  color: #c7d5e8;
}
.topic-meta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 0;
}
.topic-hero .topic-badge,
.topic-meta-pill,
.topic-meta-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}
.topic-hero .topic-badge,
.topic-hero .topic-meta-pill,
.topic-hero .topic-meta-note {
  border: 1px solid rgba(144, 190, 238, 0.68);
  background: rgba(232, 244, 255, 0.88);
  color: #1c5fae;
}
.topic-meta-pill {
  background: rgba(16, 179, 200, 0.14);
  color: var(--primary);
}
.topic-meta-note {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}
[data-theme="dark"] .topic-hero .topic-badge,
[data-theme="dark"] .topic-hero .topic-meta-pill,
[data-theme="dark"] .topic-hero .topic-meta-note {
  border-color: rgba(127, 187, 255, 0.34);
  background: rgba(34, 79, 135, 0.6);
  color: #cfe7ff;
}
.topic-documents-section {
  margin-top: 34px;
}
.topic-manage-card {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--glass-accent);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-medium);
}
.topic-manage-note {
  color: var(--muted);
  text-align: center;
}
.topic-manage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.topic-manage-head h3 {
  margin: 0 0 6px;
  color: var(--primary);
}
.topic-manage-form {
  display: grid;
  gap: 14px;
}
.topic-manage-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-weight: 700;
}
.topic-manage-file-fields,
.topic-manage-url-fields {
  display: grid;
}
.topic-manage-publish {
  align-self: end;
}
.topic-manage-list {
  display: grid;
  gap: 12px;
}
.topic-manage-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.topic-manage-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.topic-manage-item-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.topic-manage-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.topic-manage-item-title-row strong {
  color: var(--ink);
}
.topic-manage-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}
.topic-manage-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topic-year-stack {
  display: grid;
  gap: 28px;
}
.topic-year-block {
  display: grid;
  gap: 16px;
}
.topic-year-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.topic-year-heading,
.topic-year-title,
.topic-year-count,
.admin-document-year {
  color: var(--primary);
}
.topic-year-heading {
  margin-bottom: 16px;
  font-size: 1.04rem;
  font-weight: 900;
}
.topic-year-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
}
.topic-year-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(16, 179, 200, 0.14);
  font-size: 0.9rem;
  font-weight: 800;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--primary);
  font-size: 1.22rem;
}
.section-title::before,
.section-title::after {
  content: "";
  width: min(120px, 20vw);
  height: 1px;
  background: var(--line);
}
.pdf-cover-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: center;
  gap: 24px;
}
.pdf-cover-modern {
  min-height: 390px;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 1px solid var(--glass-accent);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  box-shadow: var(--shadow-medium);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pdf-cover-modern.is-hidden-more {
  display: none;
}
.pdf-cover-modern:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-strong);
  transform: translateY(-4px);
}
.pdf-cover-img-wrapper,
.pdf-placeholder-modern {
  min-height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--placeholder-bg);
}
.pdf-cover-image-modern {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.pdf-cover-modern:hover .pdf-cover-image-modern {
  transform: scale(1.035);
}
.pdf-placeholder-modern {
  padding: 24px;
  color: var(--primary);
  text-align: center;
}
.pdf-placeholder-modern svg,
.empty-state-icon {
  margin-bottom: 14px;
  opacity: 0.58;
}
.doc-extension {
  color: var(--muted);
  font-weight: 900;
}
.pdf-cover-info {
  display: grid;
  align-items: center;
  min-height: 78px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.pdf-title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  overflow: hidden;
}
.topic-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.topic-more-btn {
  border: 1px solid rgba(16, 179, 200, 0.28);
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--panel);
  color: var(--primary);
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.topic-more-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.compact-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--primary);
  font-size: 0.82rem;
  text-transform: uppercase;
}
.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  background: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.status-Approved, .status-Published { background: var(--success); }
.status-Submitted, .status-Under { background: var(--primary-2); }
.status-Draft { background: #7C8798; }

.admin-body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.42) 28%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(150deg, rgba(107, 138, 242, 0.14) 0%, rgba(16, 179, 200, 0.16) 42%, rgba(248, 252, 255, 0.9) 100%),
    var(--admin-bg);
  background-attachment: fixed;
}
.admin-body::before,
.admin-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.admin-body::before {
  background-image:
    linear-gradient(rgba(107, 138, 242, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 179, 200, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.62), transparent 72%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.62), transparent 72%);
}
.admin-body::after {
  background:
    linear-gradient(132deg, transparent 0 18%, rgba(255, 255, 255, 0.28) 18% 19%, transparent 19% 100%),
    linear-gradient(152deg, transparent 0 63%, rgba(107, 138, 242, 0.08) 63% 72%, transparent 72% 100%);
  opacity: 0.9;
}
[data-theme="dark"] .admin-body {
  background:
    linear-gradient(118deg, rgba(20, 32, 44, 0.94) 0%, rgba(20, 32, 44, 0.58) 38%, rgba(20, 32, 44, 0) 64%),
    linear-gradient(150deg, rgba(56, 189, 248, 0.1) 0%, rgba(147, 197, 253, 0.08) 44%, rgba(11, 17, 24, 0.98) 100%),
    var(--admin-bg);
}
[data-theme="dark"] .admin-body::before {
  background-image:
    linear-gradient(rgba(147, 197, 253, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.72), transparent 72%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.72), transparent 72%);
}
[data-theme="dark"] .admin-body::after {
  background:
    linear-gradient(132deg, transparent 0 18%, rgba(147, 197, 253, 0.08) 18% 19%, transparent 19% 100%),
    linear-gradient(152deg, transparent 0 63%, rgba(56, 189, 248, 0.08) 63% 72%, transparent 72% 100%);
  opacity: 0.76;
}
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(107, 138, 242, 0.08) 0 18%, transparent 18% 100%),
    linear-gradient(150deg, transparent 0 56%, rgba(16, 179, 200, 0.12) 56% 100%),
    linear-gradient(180deg, #e9fbff 0%, #c8ecf2 48%, #edf8ff 100%);
}
[data-theme="dark"] .login-shell {
  background:
    linear-gradient(120deg, rgba(147, 197, 253, 0.08) 0 18%, transparent 18% 100%),
    linear-gradient(150deg, transparent 0 56%, rgba(56, 189, 248, 0.1) 56% 100%),
    linear-gradient(180deg, #0d1723 0%, #0f2630 48%, #111a27 100%);
}
.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
}
.login-shell::before {
  background-image:
    linear-gradient(rgba(107, 138, 242, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 138, 242, 0.1) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: linear-gradient(135deg, transparent 12%, #000 46%, transparent 82%);
  mask-image: linear-gradient(135deg, transparent 12%, #000 46%, transparent 82%);
  animation: loginGridDrift 18s linear infinite;
}
.login-shell::after {
  background:
    linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.34) 42%, transparent 62%),
    linear-gradient(90deg, transparent, rgba(16, 179, 200, 0.14), transparent);
  transform: translateX(-22%) rotate(-2deg);
  animation: loginLightSweep 9s ease-in-out infinite;
}
[data-theme="dark"] .login-shell::before {
  background-image:
    linear-gradient(rgba(147, 197, 253, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
}
[data-theme="dark"] .login-shell::after {
  background:
    linear-gradient(115deg, transparent 22%, rgba(147, 197, 253, 0.12) 42%, transparent 62%),
    linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.1), transparent);
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: grid;
  gap: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 30px 22px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    var(--panel);
  box-shadow:
    0 30px 70px rgba(20, 46, 86, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: loginCardIn 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
[data-theme="dark"] .login-card {
  border-color: rgba(147, 197, 253, 0.22);
  background:
    linear-gradient(180deg, rgba(22, 32, 43, 0.94), rgba(17, 26, 35, 0.9)),
    var(--panel);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #6B8AF2, #8EB5F7, #10B3C8, #6B8AF2);
  background-size: 220% 100%;
  animation: loginAccentFlow 4.8s ease-in-out infinite;
}
.login-card::after {
  content: "";
  position: absolute;
  inset: 5px 0 auto;
  height: 96px;
  background: linear-gradient(180deg, rgba(107, 138, 242, 0.08), transparent);
  pointer-events: none;
}
.login-card > * {
  position: relative;
  z-index: 1;
}
.login-card h1 {
  margin: 2px 0 2px;
  color: var(--primary);
  font-size: clamp(2rem, 7vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: 0;
  text-align: center;
  animation: loginItemUp 0.7s ease both;
  animation-delay: 0.16s;
}
.login-card .button-row {
  justify-content: center;
  gap: 10px;
  animation: loginItemUp 0.7s ease both;
  animation-delay: 0.1s;
}
.login-brand {
  filter: drop-shadow(0 10px 18px rgba(20, 46, 86, 0.12));
  animation: loginLogoIn 0.78s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.login-card input {
  min-height: 48px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
  animation: loginItemUp 0.7s ease both;
}
.login-card input:nth-of-type(1) { animation-delay: 0.22s; }
.login-card input:nth-of-type(2) { animation-delay: 0.29s; }
.login-card input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(107, 138, 242, 0.14), 0 10px 22px rgba(20, 46, 86, 0.08);
  outline: none;
  transform: translateY(-1px);
}
[data-theme="dark"] .login-card input {
  background: rgba(17, 26, 35, 0.92);
}
.login-card .btn-primary {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  border-radius: 8px;
  box-shadow: 0 16px 30px rgba(107, 138, 242, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: loginItemUp 0.7s ease both;
  animation-delay: 0.36s;
}
.login-card .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.36) 46%, transparent 72%);
  transform: translateX(-110%);
}
.login-card .btn-primary:hover,
.login-card .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(107, 138, 242, 0.34);
  filter: saturate(1.04);
}
.login-card .btn-primary:hover::after,
.login-card .btn-primary:focus-visible::after {
  transform: translateX(110%);
  transition: transform 0.85s ease;
}
.login-card .btn-link {
  justify-self: center;
  animation: loginItemUp 0.7s ease both;
  animation-delay: 0.43s;
}
.login-card .form-error {
  text-align: center;
}
.login-card .theme-toggle,
.login-card .language-switch {
  box-shadow: 0 8px 18px rgba(20, 46, 86, 0.07);
}
@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes loginItemUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes loginLogoIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes loginAccentFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes loginGridDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(58px, 58px, 0); }
}
@keyframes loginLightSweep {
  0%, 100% {
    opacity: 0.35;
    transform: translateX(-26%) rotate(-2deg);
  }
  50% {
    opacity: 0.8;
    transform: translateX(18%) rotate(-2deg);
  }
}
.admin-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.sidebar .brand { margin-bottom: 20px; }
.nav-button {
  border: 0;
  border-radius: 6px;
  padding: 12px;
  background: transparent;
  color: var(--nav-text);
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}
.nav-button.active { background: var(--primary); color: var(--white); }
.nav-button.danger { color: var(--red); margin-top: auto; }
.admin-main {
  position: relative;
  z-index: 1;
  padding: 28px;
  min-width: 0;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.user-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--panel);
  color: var(--primary);
  font-weight: 700;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
}
.modal-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}
.modal-card-wide {
  width: min(640px, 100%);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.modal-head h3 {
  margin: 0;
  color: var(--primary);
}
.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
}
.modal-close:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.modal-form {
  display: grid;
  gap: 12px;
  padding: 16px 20px 20px;
}
.modal-form label {
  color: var(--primary);
  font-weight: 700;
}
.modal-message {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-line;
}
.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
}
.modal-actions {
  justify-content: flex-end;
}
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid article span { display: block; color: var(--muted); }
.stat-grid article strong { display: block; margin-top: 8px; color: var(--primary); font-size: 2.2rem; }
.chart-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}
.chart-panel {
  min-height: 320px;
  position: relative;
}
.chart-panel.wide { grid-column: 1 / -1; }
.split-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.panel form, form.panel { display: grid; gap: 12px; }
.compact table { min-width: 760px; }
.report-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }

@media (max-width: 960px) {
  .topbar, .admin-header, .row-heading { align-items: flex-start; flex-direction: column; }
  .topbar {
    gap: 14px;
    padding: 14px 18px;
  }
  .public-nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .public-nav .btn-primary {
    margin-left: auto;
  }
  .public-home .hero-card {
    grid-template-columns: 1fr;
  }
  .public-home .hero-copy {
    width: min(82%, 680px);
    min-height: 420px;
    padding: 30px 24px 120px;
  }
  .public-home .hero-visual {
    position: absolute;
    inset: 0;
    width: auto;
    min-height: 0;
    padding: 0;
  }
  .public-home .hero-banner-image {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    object-position: 64% center;
  }
  .public-home .hero-control-bar {
    gap: 12px;
    padding: 18px;
  }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar .brand { width: 100%; }
  .nav-button.danger { margin-top: 0; }
  .info-grid, .stat-grid, .chart-grid, .split-layout, .contact-band { grid-template-columns: 1fr; }
  .topic-manage-head,
  .topic-manage-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .topic-manage-item-actions {
    justify-content: flex-start;
  }
  .chart-panel.wide { grid-column: auto; }
  .report-controls { grid-template-columns: 1fr 1fr; }
  .section-form { grid-template-columns: 1fr 1fr; }
  .admin-document-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .search-panel, .form-grid, .report-controls, .section-form, .topic-config-controls { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-inner { padding: 56px 0 78px; }
  .topbar {
    padding: 12px 14px;
  }
  .brand {
    width: 100%;
    align-items: flex-start;
    gap: 10px;
  }
  .brand-mark {
    width: 74px;
    height: 40px;
  }
  .brand-copy {
    gap: 1px;
  }
  .brand-copy > :first-child {
    font-size: 0.92rem;
    line-height: 1.2;
  }
  .brand-campus {
    font-size: 0.8rem;
    line-height: 1.2;
  }
  .public-nav {
    gap: 10px;
    justify-content: flex-start;
  }
  .public-nav a {
    font-size: 0.98rem;
  }
  .theme-toggle {
    min-width: 124px;
    min-height: 40px;
  }
  .language-switch {
    grid-template-columns: repeat(2, 44px);
  }
  .language-switch button {
    width: 44px;
    min-width: 44px;
    height: 34px;
    min-height: 34px;
  }
  .public-nav .btn-primary {
    margin-left: 0;
    min-height: 40px;
    padding: 9px 14px;
  }
  .public-home .hero {
    padding: 18px 0 18px;
  }
  .login-shell {
    padding: 18px;
  }
  .login-card {
    width: min(100%, 420px);
    padding: 26px 20px 24px;
    border-radius: 12px;
  }
  .login-card h1 {
    font-size: clamp(1.85rem, 9vw, 2.35rem);
  }
  .login-brand {
    width: 118px;
    height: 62px;
  }
  .login-card .button-row {
    align-items: stretch;
  }
  .login-card .theme-toggle {
    flex: 1 1 140px;
  }
  .public-home .hero-inner {
    width: min(100%, calc(100% - 20px));
    padding: 0;
  }
  .public-home .hero-card {
    border-radius: 22px;
  }
  .public-home .hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }
  .public-home .hero-copy {
    width: 100%;
    min-height: 340px;
    padding: 28px 20px 128px;
  }
  .public-home .hero-visual {
    inset: 0;
    width: auto;
    padding: 0;
  }
  .public-home .hero-banner-image {
    height: 100%;
    border-radius: 0;
    object-position: 68% center;
  }
  .public-home .hero-control-bar {
    padding: 16px;
  }
  .public-year-carousel {
    gap: 7px;
  }
  .public-year-carousel.is-scrollable {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }
  .year-scroll-btn {
    width: 36px;
    height: 36px;
    font-size: 1.35rem;
  }
  .public-home .public-year-filter {
    gap: 8px;
  }
  .public-home .hero-control-bar .year-filter-chip {
    min-height: 44px;
    padding: 9px 18px;
    font-size: 0.96rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn,
  .hero-stat-card {
    width: 100%;
  }
  .topic-section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .topic-browser {
    gap: 18px;
  }
  .topic-section {
    padding: 18px 16px;
    border-radius: 20px;
  }
  .topic-section::before {
    width: 5px;
    border-radius: 20px 0 0 20px;
  }
  .topic-link-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .topic-year-select-row {
    flex-wrap: wrap;
  }
  .topic-year-image-picker {
    min-width: 100%;
  }
  .topic-page-card-grid {
    grid-template-columns: 1fr;
  }
  .topic-hover-preview-content {
    width: min(76%, 260px);
    gap: 7px;
    padding: 14px;
  }
  .topic-hover-preview-badges {
    gap: 5px;
  }
  .topic-hover-preview-badges span {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 0.62rem;
  }
  .topic-hover-preview-content strong {
    font-size: clamp(0.95rem, 5vw, 1.28rem);
  }
  .topic-detail-page {
    width: min(100%, calc(100% - 24px));
    padding: 20px 0 48px;
  }
  .topic-back-wrap {
    margin-bottom: 16px;
  }
  .topic-hero {
    min-height: 258px;
    border-radius: 14px;
    padding: 22px;
    align-items: center;
  }
  .topic-hero-media::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.88) 52%, rgba(255, 255, 255, 0.46) 100%);
  }
  [data-theme="dark"] .topic-hero-media::after {
    background: linear-gradient(90deg, rgba(15, 27, 45, 0.94) 0%, rgba(15, 27, 45, 0.88) 56%, rgba(15, 27, 45, 0.52) 100%);
  }
  .topic-hero-content {
    width: min(100%, 520px);
  }
  .topic-title {
    margin-top: 12px;
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.18;
  }
  .topic-description {
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .topic-hero .topic-badge,
  .topic-hero .topic-meta-pill,
  .topic-hero .topic-meta-note {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 0.75rem;
  }
  .topic-link {
    min-height: 118px;
    padding: 15px;
    border-radius: 18px;
  }
  .topic-link strong {
    font-size: 0.98rem;
    line-height: 1.5;
  }
  .topic-link.long-title strong {
    font-size: 0.86rem;
    line-height: 1.38;
  }
  .topic-link.extra-long-title strong {
    font-size: 0.78rem;
    line-height: 1.34;
  }
  .topic-hover-preview-content strong.long-title {
    font-size: clamp(0.82rem, 4vw, 1.02rem);
  }
  .topic-hover-preview-content strong.extra-long-title {
    font-size: clamp(0.72rem, 3.4vw, 0.88rem);
  }
  .topic-link small {
    font-size: 0.88rem;
  }
  .admin-main { padding: 18px; }
  .stat-grid article strong { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .topic-link,
  .topic-link::before,
  .topic-link span,
  .topic-link strong,
  .topic-link small {
    transition: none;
    animation: none !important;
  }
  .topic-link:hover,
  .topic-link:focus-visible,
  .topic-link:hover span,
  .topic-link:focus-visible span,
  .topic-link:hover strong,
  .topic-link:focus-visible strong,
  .topic-link:hover small,
  .topic-link:focus-visible small {
    transform: none;
    opacity: 1;
  }
  .login-shell::before,
  .login-shell::after,
  .login-card,
  .login-card::before,
  .login-brand,
  .login-card h1,
  .login-card .button-row,
  .login-card input,
  .login-card .btn-primary,
  .login-card .btn-link {
    animation: none !important;
  }
  .login-card .btn-primary:hover,
  .login-card .btn-primary:focus-visible,
  .login-card input:focus {
    transform: none;
  }
  .topic-hover-preview {
    transition: none;
    animation: none !important;
    filter: none;
  }
}



