:root {
  --study-frame-min-height: clamp(520px, 68vh, 860px);
  --bg: #0b0c10;
  --surface: #111217;
  --surface-elevated: #161924;
  --surface-soft: #1b2030;
  --text: #e5e7eb;
  --text-strong: #f9fafb;
  --muted: #9ca3af;
  --accent: #4f46e5;
  --accent-strong: #6366f1;
  --line: rgba(148, 163, 184, 0.18);
  --line-soft: rgba(148, 163, 184, 0.1);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --radius: 10px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --container: 1180px;
  --reading-width: 780px;
  --ease: 180ms ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background:
    radial-gradient(circle at top, rgba(79, 70, 229, 0.16), transparent 26%),
    linear-gradient(180deg, #0b0c10 0%, #0f1117 100%);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
img { display: block; max-width: 100%; }
button, iframe { font: inherit; }
button {
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
button:hover {
  transform: translateY(-1px);
}

.site-shell { min-height: 100vh; }
.topbar, .page-shell, .site-footer {
  width: min(calc(100% - 40px), var(--container));
  margin-left: auto;
  margin-right: auto;
}

.video-frame-wrap iframe {
  background: #fff;
}

.study-viewer-card {
  background: var(--surface);
}

.study-frame-wrap {
  background: var(--bg);
}

.study-frame-wrap iframe {
  background: #f6f8fa;
}

.study-solutions-frame-wrap iframe {
  width: 100%;
  min-height: clamp(720px, 84vh, 1280px);
  border: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: transparent;
}

.menu-list::-webkit-scrollbar {
  width: 10px;
}

.menu-list::-webkit-scrollbar-thumb {
  background: #c4ccd5;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-top: var(--space-2);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(17, 18, 23, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: clamp(1.4rem, 1.22rem + 0.7vw, 1.8rem); }
.brand-text span { color: var(--muted); font-size: 0.84rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.2;
  transition: background var(--ease), color var(--ease);
}
.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(79, 70, 229, 0.14);
  color: var(--text-strong);
}
.menu-toggle { display: none; padding: 0; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
  border-radius: 999px;
}

.page-shell { padding: var(--space-4) 0 72px; }
.section-tight { padding-top: var(--space-2); }
.section-block { padding-top: var(--space-3); }
section { margin-bottom: var(--space-4); }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 25, 36, 0.96), rgba(17, 18, 23, 0.96));
  box-shadow: var(--shadow);
}
.panel-pad-lg { padding: 28px; }
.panel-pad-md { padding: 18px; }
.stack-gap { display: grid; gap: 18px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 700;
}
.no-margin { margin: 0; }

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 24px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  line-height: 1.25;
  letter-spacing: -0.03em;
}
h3 {
  margin-bottom: 0;
  font-size: 1.06rem;
  line-height: 1.45;
}
p {
  font-size: 16px;
  line-height: 1.8;
  color: #d1d5db;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 360px);
  gap: 20px;
  align-items: stretch;
}
.hero-lead {
  margin: 18px 0 0;
  font-size: 1.05rem;
  max-width: 58ch;
}
.hero-actions,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.8);
}
.button-primary:hover { background: linear-gradient(135deg, #5b54ef 0%, #7c7fff 100%); box-shadow: 0 12px 24px rgba(79, 70, 229, 0.28); }
.button-secondary {
  background: var(--surface-soft);
  color: var(--text);
}
.button-secondary:hover,
.inline-links a:hover,
.text-link:hover {
  background: rgba(79, 70, 229, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
}
.compact-button { min-height: 36px; }

.profile-card dl,
.profile-card dd { margin: 0; }
.profile-header-image {
  width: 100%;
  max-width: 220px;
  display: block;
  margin: 0 auto 14px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  object-fit: cover;
}
.profile-card h2 { margin-bottom: 16px; }
.profile-card dt { color: var(--muted); font-size: 0.9rem; }
.profile-card dd { font-weight: 600; }
.profile-card dl div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.profile-card dl div:first-child { border-top: 0; padding-top: 0; }
.inline-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.social-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: auto;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.inline-links .social-logo-link,
.link-stack .social-logo-link {
  padding: 0;
  min-height: auto;
  border: 0;
  background: transparent;
}

.inline-links .social-logo-link:hover,
.link-stack .social-logo-link:hover {
  border: 0;
  background: transparent;
}

.social-logo-link-block {
  width: fit-content;
}

.social-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.social-logo-inline {
  height: 63px;
  width: 63px;
  object-fit: contain;
}

.hero-links {
  align-items: center;
  gap: 18px;
}

.hero-links .social-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-logo-kakao {
  border-radius: 12px;
}

.social-logo-stack {
  width: 136px;
}


.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 340px);
  gap: 20px;
}
.timeline {
  display: grid;
  gap: 18px;
}
.timeline-item {
  position: relative;
  padding-left: 18px;
  border-left: 2px solid var(--line-soft);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.timeline-head p,
.simple-list p,
.book-meta { margin-bottom: 0; }
.simple-list div + div { margin-top: 14px; }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-list span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.92rem;
}
.link-stack {
  display: grid;
  gap: 10px;
}
.link-stack a,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.bottom-links-card {
  margin-top: auto;
}

.bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.section-header {
  margin-bottom: 18px;
}
.subsection-header {
  margin-top: 28px;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.book-card {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.book-cover {
  display: inline-block;
  align-self: start;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.book-cover img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.book-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.page-header h1 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 2.8rem); }
.study-topbar {
  margin-bottom: 14px;
  align-items: flex-start;
  padding-bottom: 24px;
}

.study-topbar .site-nav {
  flex: 1;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.site-nav-dropdown,
.site-nav-study {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  color: var(--muted);
}

.site-nav-dropdown-toggle,
.site-nav-study-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.site-nav-dropdown-toggle:hover,
.site-nav-dropdown.is-open .site-nav-dropdown-toggle,
.site-nav-dropdown:focus-within .site-nav-dropdown-toggle,
.site-nav-study-toggle:hover,
.site-nav-study.is-open .site-nav-study-toggle,
.site-nav-study:focus-within .site-nav-study-toggle {
  background: rgba(79, 70, 229, 0.12);
  color: var(--text);
}

.site-nav-dropdown:hover,
.site-nav-dropdown:focus-within,
.site-nav-dropdown.is-open,
.site-nav-study:hover,
.site-nav-study:focus-within,
.site-nav-study.is-open {
  color: var(--text);
}

.site-nav-dropdown-toggle::after,
.site-nav-study-toggle::after {
  content: "▾";
  margin-left: 8px;
  font-size: 0.8rem;
}

.site-top-submenu,
.study-top-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: auto;
  min-width: 184px;
  width: max-content;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
  z-index: 30;
}

.site-nav-dropdown:hover .site-top-submenu,
.site-nav-dropdown:focus-within .site-top-submenu,
.site-nav-dropdown.is-open .site-top-submenu,
.site-nav-study:hover .study-top-submenu,
.site-nav-study:focus-within .study-top-submenu,
.site-nav-study.is-open .study-top-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  color: var(--text);
}

.site-submenu-roots,
.study-submenu-roots {
  display: grid;
  grid-auto-flow: row;
  gap: 8px;
  justify-items: stretch;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(22, 28, 41, 0.98), rgba(15, 19, 29, 0.98));
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(18px);
}

.site-submenu-root,
.study-submenu-root {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(17, 24, 39, 0.92));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.16);
  white-space: nowrap;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.site-submenu-root:hover,
.site-submenu-root.is-active,
.study-submenu-root:hover,
.study-submenu-root.is-active {
  color: var(--text-strong);
  border-color: rgba(129, 140, 248, 0.4);
  background: linear-gradient(180deg, rgba(49, 46, 129, 0.96), rgba(30, 41, 59, 0.96));
  box-shadow: 0 12px 24px rgba(49, 46, 129, 0.2);
  transform: translateY(-1px);
}

.site-submenu-root::after,
.study-submenu-root::after {
  display: none;
}

.site-submenu-root-label,
.study-submenu-root-label {
  display: block;
  width: 100%;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: inherit;
}

.study-submenu-selector {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d7e2ef;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5fd 100%);
}

.study-submenu-selector[hidden] {
  display: none;
}

.study-submenu-selector h3 {
  margin: 6px 0 8px;
}

.study-submenu-selector p:last-child {
  margin: 0;
  color: #44505c;
}

.study-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 420px);
  gap: 22px;
  align-items: stretch;
  background:
    radial-gradient(circle at top right, rgba(9, 105, 218, 0.10), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.study-page-header-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.study-page-header-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
}

.study-page-header-highlights {
  display: grid;
  gap: 12px;
}

.study-page-highlight {
  padding: 16px 18px;
  border: 1px solid #d7e2ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.study-page-highlight strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.study-page-highlight p {
  margin: 0;
  color: #44505c;
}

.study-page-lead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.9;
  color: #384350;
  max-width: 62ch;
}

.study-focus-layout {
  display: grid;
  gap: 18px;
  overflow-anchor: none;
}

.study-focus-layout[hidden] {
  display: none;
}

.study-plan-browser {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.study-plan-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
  align-self: start;
}

.study-plan-menu {
  display: grid;
  gap: 0;
}

.study-plan-group {
  display: grid;
  gap: 0;
}

.study-plan-group-block {
  display: grid;
  gap: 0;
}

.study-plan-list {
  display: grid;
  gap: 0;
}

.study-plan-list-nested {
  gap: 8px;
}

.study-plan-submenu {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  padding-left: 10px;
}

.study-plan-submenu[hidden] {
  display: none;
}

.study-plan-link,
.study-plan-sub-link {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #d8e1eb;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.study-plan-link {
  --study-plan-week-accent: #0969da;
  --study-plan-week-border: #c8d9f0;
  --study-plan-week-bg-top: #f8fbff;
  --study-plan-week-bg-bottom: #eef5fd;
  --study-plan-week-shadow: rgba(9, 105, 218, 0.16);
  border-color: var(--study-plan-week-border);
  background: linear-gradient(180deg, var(--study-plan-week-bg-top) 0%, var(--study-plan-week-bg-bottom) 100%);
}

.study-plan-link-week-1 {
  --study-plan-week-accent: #0969da;
  --study-plan-week-border: #bfd5f3;
  --study-plan-week-bg-top: #f3f8ff;
  --study-plan-week-bg-bottom: #e2efff;
  --study-plan-week-shadow: rgba(9, 105, 218, 0.2);
}

.study-plan-link-week-2 {
  --study-plan-week-accent: #0f766e;
  --study-plan-week-border: #b8e0db;
  --study-plan-week-bg-top: #f1fcfa;
  --study-plan-week-bg-bottom: #daf5ef;
  --study-plan-week-shadow: rgba(15, 118, 110, 0.18);
}

.study-plan-link-week-3 {
  --study-plan-week-accent: #9333ea;
  --study-plan-week-border: #dcc4f7;
  --study-plan-week-bg-top: #faf5ff;
  --study-plan-week-bg-bottom: #f1e7ff;
  --study-plan-week-shadow: rgba(147, 51, 234, 0.18);
}

.study-plan-link-week-4 {
  --study-plan-week-accent: #ea580c;
  --study-plan-week-border: #f6ceb1;
  --study-plan-week-bg-top: #fff7ed;
  --study-plan-week-bg-bottom: #ffead5;
  --study-plan-week-shadow: rgba(234, 88, 12, 0.18);
}

.study-plan-sub-link {
  padding: 11px 12px 12px;
  border-radius: 16px;
  box-shadow: none;
}

.study-plan-link:hover,
.study-plan-sub-link:hover {
  transform: translateY(-1px);
  border-color: #b9c8d8;
  background: #f8fbff;
}

.study-plan-link:hover {
  border-color: var(--study-plan-week-accent);
  background: linear-gradient(180deg, var(--study-plan-week-bg-top) 0%, var(--study-plan-week-bg-bottom) 100%);
  box-shadow: 0 12px 28px var(--study-plan-week-shadow);
}

.study-plan-link.is-active,
.study-plan-sub-link.is-active {
  border-color: #b7cae2;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.study-plan-link.is-active {
  border-color: var(--study-plan-week-accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--study-plan-week-bg-top) 60%, #ffffff 40%) 0%, var(--study-plan-week-bg-bottom) 100%);
  box-shadow: 0 16px 30px var(--study-plan-week-shadow);
}

.study-plan-link-title {
  font-weight: 700;
  line-height: 1.5;
}

.study-plan-link-title-inline {
  line-height: 1.3;
  white-space: nowrap;
}

.study-plan-link-description {
  color: #52606d;
  font-size: 0.92rem;
  line-height: 1.6;
}

.study-plan-viewer {
  overflow: hidden;
  min-height: 0;
}

.study-plan-frame-wrap {
  padding: 0;
  min-height: 0;
}

.study-plan-frame-wrap iframe {
  width: 100%;
  display: block;
  min-height: 0;
  border: 0;
  background: #f6f8fa;
}

.study-selector-card {
  display: grid;
  gap: 16px;
  padding-left: 0;
  padding-right: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.study-selector-card-copy {
  display: grid;
  gap: 6px;
}

.study-selector-card-copy strong {
  font-size: 1rem;
}

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

.study-overview-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.study-viewer-status {
  max-width: 42ch;
  margin: 0;
  color: #44505c;
  font-size: 0.95rem;
  line-height: 1.7;
}

.study-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 14px;
}

.study-highlight-card,
.study-stat-card {
  padding: 18px;
  border: 1px solid #d9e1ea;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.study-highlight-card {
  background: linear-gradient(135deg, #ffffff 0%, #edf5ff 100%);
}

.study-highlight-card span,
.study-stat-card span {
  display: block;
  margin-bottom: 8px;
  color: #5a6775;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.study-highlight-card strong,
.study-stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.18rem;
}

.study-highlight-card p,
.study-stat-card p,
.study-visual-head p {
  margin: 0;
}

.study-chip-label {
  margin: 0 0 10px;
  color: #5a6775;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.study-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.study-quick-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #d8dee4;
  border-radius: 999px;
  background: #ffffff;
  color: #3d4955;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.study-quick-chip:hover {
  transform: translateY(-1px);
  border-color: #b8c4d0;
  background: #f6f9fc;
  color: var(--text);
}

.study-quick-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(36, 41, 47, 0.2);
}

.study-viewer-controls {
  display: grid;
  gap: 8px;
}

.study-select-label {
  color: #4e5a66;
  font-size: 0.84rem;
  font-weight: 700;
}

.study-scenario-select {
  min-width: min(100%, 260px);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #cfd8e3;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.study-visual-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.study-viewer-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.study-viewer-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 22px 18px;
  border-bottom: 1px solid #e5ebf2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.96) 100%);
}

.study-viewer-toolbar-copy {
  display: grid;
  gap: 0;
}

.study-viewer-toolbar-copy strong {
  font-size: 1.05rem;
}

.study-viewer-toolbar-copy p:last-child {
  margin: 0;
  color: #4a5662;
}


.study-frame-wrap {
  background:
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  overflow-anchor: none;
}

.study-frame-wrap-expanded {
  min-height: var(--study-frame-min-height);
}

.study-plan-frame-wrap.study-frame-wrap-expanded {
  min-height: 0;
}

.browser-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.browser-sidebar {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 132px);
  overflow: hidden;
}

.browser-main {
  min-width: 0;
}

.mobile-sidebar-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.mobile-sidebar-toggle-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mobile-sidebar-toggle-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-sidebar-toggle-copy strong {
  min-width: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mobile-sidebar-toggle-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.mobile-sidebar-toggle-icon::before,
.mobile-sidebar-toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform var(--ease);
}

.mobile-sidebar-toggle-icon::before {
  left: 0;
  transform: translateY(-50%) rotate(45deg);
}

.mobile-sidebar-toggle-icon::after {
  right: 0;
  transform: translateY(-50%) rotate(-45deg);
}

.browser-sidebar.is-mobile-open .mobile-sidebar-toggle-icon::before {
  transform: translateY(-50%) rotate(-45deg);
}

.browser-sidebar.is-mobile-open .mobile-sidebar-toggle-icon::after {
  transform: translateY(-50%) rotate(45deg);
}

.mobile-sidebar-body {
  display: grid;
}

.lecture-layout {
  align-items: start;
  grid-template-columns: minmax(332px, 404px) minmax(0, 1fr);
}
.track-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.track-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}
.track-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sidebar-meta {
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.sidebar-meta h2 { font-size: 1rem; margin-bottom: 4px; }
.sidebar-meta p { margin: 0; }
.menu-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 640px;
  overflow: auto;
  padding-right: 8px;
}

.lecture-sidebar .menu-list {
  gap: 12px;
}
.menu-item {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px 15px;
  min-height: 58px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.menu-item:hover {
  background: var(--surface-soft);
  border-color: #c4ccd5;
}
.menu-item.is-active {
  border-color: #b6c3d1;
  background: rgba(79, 70, 229, 0.12);
}
.menu-item-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 30px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.menu-item-copy {
  display: grid;
  min-width: 0;
  width: 100%;
  align-content: start;
  justify-items: start;
  padding-block: 1px 2px;
}
.menu-item-copy strong {
  display: block;
  min-width: 0;
  width: 100%;
  white-space: normal;
  font-size: 0.94rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.lecture-sidebar .menu-item {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  min-height: 76px;
}

.lecture-sidebar .menu-item-index {
  width: 48px;
  min-height: 36px;
}

.lecture-sidebar .menu-item-copy strong {
  font-size: 0.92rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: normal;
}

.summary-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.meta-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.meta-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.meta-card strong {
  line-height: 1.55;
}
.lecture-summary-card strong {
  display: block;
  font-size: 1rem;
}
.meta-card.wide { grid-column: 1 / -1; }
.video-card,
.study-viewer-card { overflow: hidden; }
.video-frame-wrap,
.study-frame-wrap {
  aspect-ratio: 16 / 9;
  background: #ffffff;
}
.video-frame-wrap iframe,
.study-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.video-player-embed {
  width: 100%;
  height: 100%;
}
.video-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.video-control-button {
  min-width: 92px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), opacity var(--ease);
}
.video-control-button:hover:not(:disabled) {
  background: #eef2f7;
  border-color: #c4ccd5;
}
.video-control-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.video-progress {
  display: block;
}
.video-progress input {
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border: 1px solid #111111;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #111111 0%,
    #111111 var(--progress-percent, 0%),
    #d0d7de var(--progress-percent, 0%),
    #d0d7de 100%
  );
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}
.video-progress input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}
.video-progress input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #111111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}
.video-progress input::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #d0d7de;
}
.video-progress input::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: #111111;
}
.video-progress input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #111111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}
.video-progress input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.video-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.study-frame-wrap { min-height: var(--study-frame-min-height); aspect-ratio: auto; }
.site-footer {
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

  .hero-grid,
  .content-grid,
  .book-grid,
  .study-page-header,
  .study-submenu-selector,
  .study-selector-grid,
  .study-overview-grid,
  .study-plan-browser {
    grid-template-columns: 1fr;
  }

  .study-page-header-highlights,
  .study-viewer-toolbar {
    grid-template-columns: 1fr;
  }

  .browser-sidebar,
  .study-plan-sidebar {
    position: static;
    max-height: none;
  }

  .video-controls {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .video-time {
    justify-content: space-between;
  }

  .study-viewer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .study-frame-wrap,
  .study-frame-wrap-embedded,
  .study-frame-wrap-embedded iframe,
  .study-frame-wrap-expanded {
    min-height: clamp(440px, 60vh, 760px);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle { display: block; margin-left: auto; }
  .site-nav {
    display: none;
    width: 100%;
    padding-top: 10px;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a,
  .site-nav-dropdown-toggle,
  .site-nav-study-toggle { width: 100%; justify-content: space-between; }
  .site-nav-dropdown,
  .site-nav-study {
    width: 100%;
    align-items: stretch;
    padding: 0;
  }

  .panel-pad-lg { padding: 20px; }
  .book-card { grid-template-columns: 96px 1fr; }
  .hero-links {
    gap: 14px;
  }
  .social-logo-inline {
    height: 54px;
    width: 54px;
  }
  .summary-topline,
  .timeline-head,
  .study-overview-head,
  .study-visual-head { flex-direction: column; align-items: flex-start; }
  .meta-grid { grid-template-columns: 1fr; }
  .site-top-submenu,
.study-top-submenu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    padding-top: 6px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .site-submenu-roots,
.study-submenu-roots {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }
  .site-nav-dropdown.is-open .site-top-submenu,
  .site-nav-study.is-open .study-top-submenu {
    display: block;
  }
  .study-submenu-root,
  .study-quick-chip {
    width: 100%;
  }
  .site-submenu-root,
.study-submenu-root {
    justify-content: flex-start;
    text-align: left;
    min-height: 40px;
    padding: 10px 12px;
  }
  .study-viewer-toolbar {
    padding: 18px 18px 16px;
  }
  .study-frame-wrap,
  .study-frame-wrap-embedded,
  .study-frame-wrap-embedded iframe,
  .study-frame-wrap-expanded { min-height: clamp(380px, 54vh, 640px); }

  .study-solutions-frame-wrap iframe {
    min-height: clamp(520px, 72vh, 920px);
  }
}

@media (max-width: 480px) {
  .study-solutions-frame-wrap iframe {
    min-height: clamp(480px, 78vh, 860px);
  }
}

.study-plan-viewer,
.study-plan-frame-wrap,
.study-plan-frame-wrap iframe,
.study-plan-frame-wrap.study-frame-wrap-expanded {
  min-height: 0;
}


.article-page-shell {
  gap: 0;
}

.article-layout {
  align-items: start;
}


.article-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 124px);
  overflow: auto;
}

.article-sidebar-meta {
  margin-bottom: 14px;
}

.article-sidebar-meta h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.article-sidebar .menu-list {
  gap: 10px;
  max-height: none;
  min-height: 0;
}

.article-sidebar .mobile-sidebar-body {
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.article-category-group {
  display: grid;
  gap: 8px;
}

.article-category-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.12));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  text-transform: none;
}

.article-category-items {
  display: grid;
  gap: 8px;
}

.article-category-empty {
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.browser-main {
  min-width: 0;
}


.article-status {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
}

.article-status.is-error {
  border-color: #f1b7b7;
  background: #fff5f5;
  color: #9a2f2f;
}

.article-viewer-card {
  min-height: clamp(520px, 68vh, 860px);
}

.article-viewer {
  color: var(--text);
}

.article-viewer > :first-child {
  margin-top: 0;
}

.article-viewer h1,
.article-viewer h2,
.article-viewer h3,
.article-viewer h4,
.article-viewer h5,
.article-viewer h6 {
  margin-top: 1.6em;
  margin-bottom: 0.7em;
  line-height: 1.35;
}

.article-viewer p,
.article-viewer li,
.article-viewer blockquote {
  color: var(--text);
}

.article-viewer ul,
.article-viewer ol {
  padding-left: 1.4rem;
  line-height: 1.8;
}

.article-viewer blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid #c4ccd5;
  background: #f8fafc;
  border-radius: 0 12px 12px 0;
}

.article-viewer code {
  padding: 0.14em 0.38em;
  border-radius: 6px;
  background: #f3f4f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.article-viewer pre {
  overflow: auto;
  padding: 16px 18px;
  border-radius: 14px;
  background: #111827;
  color: #f9fafb;
}

.article-viewer pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-viewer hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.article-viewer table {
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
  margin: 20px 0;
}

.article-viewer th,
.article-viewer td {
  border: 1px solid #ddd;
  padding: 8px;
}

.article-viewer pre {
  background: #111;
  color: #eee;
  padding: 12px;
  overflow-x: auto;
}


@media (max-width: 860px) {
  .browser-layout,
  .lecture-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .browser-layout {
    gap: 14px;
  }

  .browser-main {
    order: 1;
  }

  .browser-sidebar {
    top: auto;
    order: 0;
    padding: 14px;
    border-radius: 14px;
  }

  .mobile-sidebar-toggle {
    display: flex;
    min-height: 56px;
    padding: 14px 16px;
  }

  .mobile-sidebar-body {
    display: none;
    gap: 12px;
    margin-top: 14px;
  }

  .browser-sidebar.is-mobile-open .mobile-sidebar-body {
    display: grid;
  }

  .track-switch {
    gap: 8px;
    margin-bottom: 12px;
  }

  .sidebar-meta {
    padding-bottom: 12px;
  }

  .menu-list {
    gap: 8px;
    margin-top: 12px;
    padding-right: 0;
  }

  .menu-item {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    min-height: 54px;
    padding: 12px 14px;
  }

  .menu-item-index {
    width: 38px;
    min-height: 28px;
  }

  .lecture-sidebar .menu-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    min-height: 62px;
    padding: 14px;
  }

  .lecture-sidebar .menu-item-index {
    width: 40px;
    min-height: 32px;
  }

  .summary-topline {
    gap: 10px;
  }

  .video-card,
  .article-viewer-card,
  .lecture-summary,
  .article-viewer,
  .article-status {
    border-radius: 14px;
  }

  .video-controls {
    gap: 12px;
    padding: 14px;
  }

  .browser-sidebar .menu-list {
    max-height: min(48vh, 360px);
  }

  .article-sidebar {
    position: static;
  }

  .article-container {
    padding: 24px 20px;
  }

  .article-viewer h1 {
    font-size: clamp(1.9rem, 5vw, 2.2rem);
  }

  .article-viewer h2 {
    font-size: clamp(1.35rem, 4.4vw, 1.7rem);
  }

  .article-viewer h3 {
    font-size: clamp(1.08rem, 3.8vw, 1.28rem);
  }

  .article-viewer p,
  .article-viewer li,
  .article-viewer blockquote {
    font-size: 0.98rem;
    line-height: 1.78;
  }

  .article-viewer ul,
  .article-viewer ol {
    padding-left: 1.2rem;
  }
}


.brand-text span,
.profile-card dt,
.sidebar-meta p,
.site-footer,
.video-time,
.mobile-sidebar-toggle-label,
.meta-card span,
.article-category-empty,
.article-status {
  color: var(--muted);
}

a:hover,
.text-link:hover,
.menu-item-copy strong:hover {
  color: var(--accent-strong);
}

.button,
.track-button,
.video-control-button,
.site-nav-study-toggle,
.mobile-sidebar-toggle,
.link-stack a,
.text-link,
.inline-links a,
.menu-item,
input,
select {
  min-height: 40px;
}

.browser-layout {
  grid-template-columns: minmax(252px, 292px) minmax(0, 1fr);
  gap: 24px;
}

.browser-sidebar,
.study-plan-sidebar,
.article-sidebar {
  background: rgba(17, 18, 23, 0.72);
  border-color: rgba(148, 163, 184, 0.14);
  opacity: 0.72;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.browser-sidebar:hover,
.study-plan-sidebar:hover,
.article-sidebar:hover {
  opacity: 1;
  border-color: rgba(99, 102, 241, 0.32);
}

.menu-item {
  background: rgba(15, 17, 24, 0.9);
  border-color: rgba(148, 163, 184, 0.12);
  border-radius: 14px;
}

.menu-item:hover {
  background: rgba(31, 41, 55, 0.84);
  border-color: rgba(99, 102, 241, 0.34);
  transform: translateX(4px);
}

.menu-item.is-active {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(15, 23, 42, 0.92));
}

.menu-item-index,
.track-button,
.meta-card,
.mobile-sidebar-toggle,
.article-status,
.article-search-input,
.search-results,
.search-item,
.article-viewer table th,
.article-viewer table td {
  border-color: rgba(148, 163, 184, 0.14);
}

.track-button,
.mobile-sidebar-toggle,
.meta-card,
.article-status,
.study-submenu-root,
.inline-links a,
.link-stack a,
.text-link {
  background: rgba(27, 32, 48, 0.92);
}

.search-container {
  position: relative;
  margin-bottom: var(--space-3);
}

.article-search-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(11, 12, 16, 0.9);
  color: var(--text);
  outline: none;
}

.article-search-input::placeholder {
  color: var(--muted);
}

.article-search-input:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: rgba(17, 18, 23, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
  overflow: hidden;
}

.search-results[hidden] {
  display: none;
}

.search-item {
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #222;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item:hover,
.search-item.is-active {
  background: #1f2937;
  transform: translateX(4px);
}

.search-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.96rem;
}

.search-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.article-viewer-card {
  min-height: clamp(520px, 68vh, 860px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.article-viewer {
  background: linear-gradient(180deg, rgba(17, 18, 23, 0.98), rgba(14, 16, 23, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-4);
}

#article-content {
  font-size: 16px;
  line-height: 1.8;
}

#article-content p {
  margin-bottom: var(--space-3);
}

#article-content pre {
  background: #0f172a;
  padding: 16px;
  border-radius: var(--radius);
}

#article-content code {
  background: #1f2937;
  padding: 2px 6px;
  border-radius: 4px;
}

.article-viewer h1 {
  font-size: 34px;
  margin-bottom: var(--space-3);
}

.article-viewer h2 {
  font-size: 24px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.article-viewer p,
.article-viewer li,
.article-viewer blockquote {
  color: #d1d5db;
}

.article-viewer blockquote {
  margin: 18px 0 24px;
  padding: 16px 18px;
  border-left: 3px solid rgba(99, 102, 241, 0.8);
  background: rgba(31, 41, 55, 0.55);
}

.article-viewer table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-3) 0;
  display: table;
}

.article-viewer th {
  text-align: left;
  background: #111827;
}

.article-viewer td,
.article-viewer th {
  padding: 10px;
  border: 1px solid #222;
}

.article-category-group + .article-category-group {
  margin-top: 18px;
}

.article-category-title {
  background: transparent;
  border: 0;
  padding: 2px 4px 8px;
  color: var(--text-strong);
  box-shadow: none;
}

@media (max-width: 860px) {
  .browser-sidebar,
  .study-plan-sidebar,
  .article-sidebar {
    opacity: 1;
  }

  .article-layout {
    gap: 12px;
  }

  .article-sidebar {
    max-height: none;
    overflow: visible;
    padding: 12px;
  }

  .article-sidebar .mobile-sidebar-body {
    gap: 10px;
  }

  .article-sidebar .menu-list {
    max-height: min(52vh, 420px);
    overflow: auto;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .article-viewer-card {
    min-height: auto;
  }

  .article-container {
    padding: 20px 16px;
  }

  #article-content {
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .article-viewer h1 {
    font-size: clamp(1.55rem, 6.6vw, 1.92rem);
  }

  .article-viewer h2 {
    font-size: clamp(1.25rem, 5.2vw, 1.6rem);
  }

  .article-viewer h3 {
    font-size: clamp(1.08rem, 4.3vw, 1.3rem);
  }

  .article-viewer pre {
    padding: 12px;
    font-size: 0.86rem;
  }

  .article-viewer table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .search-results {
    width: 100%;
    left: 0;
  }
}

@media (max-width: 760px) {
  .topbar, .page-shell, .site-footer {
    width: min(calc(100% - 24px), var(--container));
  }

  h1,
  .article-viewer h1 {
    font-size: 30px;
  }

  h2,
  .article-viewer h2 {
    font-size: 22px;
  }

  body,
  p,
  #article-content,
  .article-viewer p,
  .article-viewer li {
    font-size: 16px;
  }
}


@media (max-width: 640px) {
  .topbar,
  .page-shell,
  .site-footer {
    width: min(calc(100% - 20px), var(--container));
  }

  .page-shell {
    padding: 20px 0 48px;
  }

  .panel-pad-lg {
    padding: 18px;
  }

  .panel-pad-md {
    padding: 14px;
  }

  .browser-layout {
    gap: 12px;
  }

  .browser-sidebar {
    padding: 12px;
  }

  .mobile-sidebar-body {
    margin-top: 12px;
  }

  .mobile-sidebar-toggle-copy strong {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .summary-topline {
    align-items: stretch;
  }

  .summary-topline .button,
  .summary-topline .button-secondary,
  .summary-topline .compact-button {
    width: 100%;
    justify-content: center;
  }

  .video-frame-wrap {
    aspect-ratio: auto;
    min-height: 220px;
  }

  .video-frame-wrap iframe,
  #lecture-player {
    min-height: 220px;
  }

  .video-control-button {
    width: 100%;
    min-width: 0;
  }

  .video-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "button time"
      "progress progress";
    gap: 10px 12px;
    align-items: center;
  }

  .video-control-button {
    grid-area: button;
    justify-self: start;
  }

  .video-progress {
    grid-area: progress;
  }

  .video-time {
    grid-area: time;
    justify-self: end;
  }

  .article-search-input {
    padding: 12px 14px;
  }

  .search-results {
    position: static;
    margin-top: 8px;
    max-height: 260px;
    overflow: auto;
  }

  .article-category-title {
    width: 100%;
    padding: 4px 0 6px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .mobile-sidebar-toggle-copy strong,
  .lecture-sidebar .menu-item-copy strong,
  .menu-item-copy strong {
    font-size: 0.88rem;
    line-height: 1.38;
  }

  .article-container {
    padding: 20px 16px;
  }

  .article-viewer pre,
  .article-viewer blockquote {
    margin-inline: -2px;
  }

  .article-sidebar .menu-list {
    max-height: 50vh;
  }
}


/* Theme refresh: calm documentation-style dark UI */
:root {
  --bg-elevated: #0f131d;
  --surface-strong: #0f1724;
  --surface-overlay: rgba(15, 19, 29, 0.82);
  --surface-card: rgba(17, 23, 34, 0.94);
  --surface-card-strong: rgba(22, 28, 41, 0.98);
  --surface-interactive: #1a2132;
  --surface-interactive-hover: #202a3f;
  --surface-interactive-active: #252f48;
  --text-soft: #cbd5e1;
  --text-inverse: #ffffff;
  --muted-strong: #b5c0d1;
  --accent-soft: rgba(79, 70, 229, 0.16);
  --accent-soft-strong: rgba(99, 102, 241, 0.26);
  --line-strong: rgba(148, 163, 184, 0.28);
  --line-focus: rgba(129, 140, 248, 0.72);
  --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.24);
  --shadow-soft: 0 18px 42px rgba(3, 7, 18, 0.34);
  --shadow-strong: 0 24px 56px rgba(2, 6, 23, 0.42);
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top center, rgba(79, 70, 229, 0.12), transparent 24%),
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, #090b11 0%, #0c1018 52%, #0b0c10 100%);
  color: var(--text);
}

::selection {
  background: rgba(99, 102, 241, 0.32);
  color: var(--text-inverse);
}

h1, h2, h3, h4, h5, h6,
strong, b,
.brand-text strong,
.profile-card dd,
.meta-card strong,
.menu-item-copy strong,
.study-plan-link-title,
.study-selector-card-copy strong,
.study-viewer-toolbar-copy strong,
.article-viewer strong,
.article-viewer th,
.article-viewer h1,
.article-viewer h2,
.article-viewer h3,
.article-viewer h4,
.article-viewer h5,
.article-viewer h6 {
  color: var(--text-strong);
}

p,
li,
dd,
dt,
label,
.book-meta,
.timeline-head p,
.timeline-item > p,
.article-viewer p,
.article-viewer li,
.article-viewer blockquote,
.study-viewer-status,
.study-plan-link-description,
.study-select-label,
.article-category-empty {
  color: var(--text-soft);
}

a {
  color: inherit;
}

a:hover {
  color: var(--text-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="tab"]:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--line-focus) !important;
}

button,
input,
select,
textarea {
  color: var(--text);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.66;
  color: var(--muted-strong);
  cursor: not-allowed;
}

.topbar {
  border-color: var(--line);
  background: rgba(11, 14, 21, 0.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.brand-text span,
.site-footer,
.sidebar-meta p,
.video-time,
.mobile-sidebar-toggle-label,
.article-status,
.meta-card span,
.study-chip-label,
.eyebrow,
.profile-card dt {
  color: var(--muted);
}

.site-nav a,
.site-nav-dropdown-toggle,
.site-nav-study-toggle {
  color: var(--muted-strong);
  border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav-dropdown-toggle:hover,
.site-nav-dropdown.is-open .site-nav-dropdown-toggle,
.site-nav-dropdown:focus-within .site-nav-dropdown-toggle,
.site-nav-study-toggle:hover,
.site-nav-study.is-open .site-nav-study-toggle,
.site-nav-study:focus-within .site-nav-study-toggle {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--text-strong);
}

.card,
.browser-sidebar,
.study-plan-sidebar,
.article-sidebar,
.study-viewer-card,
.meta-card,
.article-viewer,
.article-status,
.search-results,
.study-selector-card,
.book-card,
.menu-item,
.mobile-sidebar-toggle,
.track-button,
.study-submenu-root,
.inline-links a,
.link-stack a,
.text-link,
.button-secondary,
.study-plan-link,
.study-plan-sub-link,
.study-quick-chip {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(22, 28, 41, 0.96), rgba(15, 19, 29, 0.96));
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.card,
.book-card,
.meta-card,
.article-viewer,
.article-status,
.study-viewer-card,
.study-plan-sidebar,
.browser-sidebar,
.article-sidebar {
  border-radius: 16px;
}

.browser-sidebar,
.study-plan-sidebar,
.article-sidebar {
  opacity: 1;
  background: linear-gradient(180deg, rgba(19, 24, 35, 0.96), rgba(13, 17, 25, 0.96));
}

.browser-sidebar:hover,
.study-plan-sidebar:hover,
.article-sidebar:hover {
  border-color: var(--line-strong);
}

.button,
.button-secondary,
.button-primary,
.track-button,
.video-control-button,
.mobile-sidebar-toggle,
.site-submenu-root,
.study-submenu-root,
.study-quick-chip,
.study-plan-link,
.study-plan-sub-link,
.menu-item,
.search-item,
.link-stack a,
.text-link,
.inline-links a,
.site-nav a,
.site-nav-dropdown-toggle,
.site-nav-study-toggle {
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.button,
.button-secondary,
.track-button,
.video-control-button,
.mobile-sidebar-toggle,
.site-submenu-root,
.study-submenu-root,
.study-quick-chip,
.link-stack a,
.text-link,
.inline-links a {
  border: 1px solid var(--line);
  background: var(--surface-interactive);
  color: var(--text);
}

.button:hover,
.button-secondary:hover,
.track-button:hover,
.video-control-button:hover:not(:disabled),
.mobile-sidebar-toggle:hover,
.site-submenu-root:hover,
.study-submenu-root:hover,
.study-quick-chip:hover,
.link-stack a:hover,
.text-link:hover,
.inline-links a:hover {
  background: var(--surface-interactive-hover);
  border-color: rgba(99, 102, 241, 0.32);
  color: var(--text-strong);
}

.button:active,
.button-secondary:active,
.track-button:active,
.video-control-button:active:not(:disabled),
.mobile-sidebar-toggle:active,
.site-submenu-root:active,
.study-submenu-root:active,
.study-quick-chip:active,
.link-stack a:active,
.text-link:active,
.inline-links a:active {
  background: var(--surface-interactive-active);
  border-color: rgba(99, 102, 241, 0.42);
}

.button-primary,
.track-button.is-active,
.study-quick-chip.is-active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: rgba(129, 140, 248, 0.9);
  color: var(--text-inverse);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.28);
}

.button-primary:hover,
.track-button.is-active:hover,
.study-quick-chip.is-active:hover {
  background: linear-gradient(135deg, #5750f0 0%, #7376ff 100%);
  color: var(--text-inverse);
}

.menu-item {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  padding: 14px 14px 15px;
  border-radius: 14px;
  background: rgba(18, 23, 34, 0.98);
}

.menu-item:hover,
.search-item:hover,
.search-item.is-active {
  background: rgba(28, 35, 51, 0.98);
  border-color: rgba(99, 102, 241, 0.28);
  color: var(--text-strong);
  transform: translateX(2px);
}

.menu-item.is-active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(26, 33, 50, 0.98));
  border-color: rgba(99, 102, 241, 0.4);
}

.menu-item-index {
  background: rgba(11, 14, 21, 0.9);
  border-color: var(--line);
  color: var(--muted-strong);
}

.menu-item.is-active .menu-item-index {
  background: rgba(79, 70, 229, 0.18);
  border-color: rgba(129, 140, 248, 0.42);
  color: var(--text-strong);
}

.study-submenu-root,
.study-plan-link,
.study-plan-sub-link {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.site-submenu-root,
.study-submenu-root {
  background: rgba(20, 25, 36, 0.98);
  color: var(--text);
}

.study-plan-link,
.study-plan-sub-link {
  border-radius: 14px;
  box-shadow: none;
}

.study-plan-link,
.study-plan-link:hover,
.study-plan-link.is-active,
.study-plan-sub-link,
.study-plan-sub-link:hover,
.study-plan-sub-link.is-active {
  background-image: none;
}

.study-plan-link:hover,
.study-plan-sub-link:hover {
  background: rgba(28, 35, 51, 0.98);
  border-color: rgba(99, 102, 241, 0.28);
}

.study-plan-link.is-active,
.study-plan-sub-link.is-active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(26, 33, 50, 0.98));
  border-color: rgba(99, 102, 241, 0.42);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.12);
}

.study-plan-link-description,
.study-viewer-status,
.study-select-label,
.study-chip-label,
.search-item span,
.article-status,
.article-category-empty,
.video-time,
.meta-card span {
  color: var(--muted-strong);
}

.study-selector-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20, 25, 36, 0.98), rgba(14, 18, 27, 0.96));
}

.study-scenario-select,
.article-search-input,
input[type="search"],
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 14, 21, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.study-scenario-select:hover,
.article-search-input:hover,
select:hover,
textarea:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.study-scenario-select:focus,
.article-search-input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-focus);
  box-shadow: var(--focus-ring);
  outline: none;
}

select option,
select optgroup {
  background: #111621;
  color: #f8fafc;
}

.study-viewer-card,
.video-card {
  background: linear-gradient(180deg, rgba(18, 23, 34, 0.98), rgba(13, 17, 25, 0.98));
}

.video-frame-wrap,
.study-frame-wrap,
.study-plan-frame-wrap {
  background: linear-gradient(180deg, rgba(14, 18, 27, 0.98), rgba(9, 12, 18, 0.98));
}

.study-frame-wrap,
.study-plan-frame-wrap {
  padding: 16px;
}

.video-frame-wrap iframe,
.study-frame-wrap iframe,
.study-plan-frame-wrap iframe,
#lecture-player {
  border-radius: 12px;
  background: #f8fafc;
}

.video-controls {
  border-top-color: var(--line);
  background: rgba(13, 17, 25, 0.98);
}

.video-control-button {
  background: var(--surface-interactive);
  color: var(--text-strong);
}

.video-control-button:hover:not(:disabled) {
  background: var(--surface-interactive-hover);
  border-color: rgba(99, 102, 241, 0.28);
}

.video-progress input {
  border-color: rgba(99, 102, 241, 0.2);
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent) var(--progress-percent, 0%),
    rgba(51, 65, 85, 0.92) var(--progress-percent, 0%),
    rgba(51, 65, 85, 0.92) 100%
  );
}

.video-progress input::-webkit-slider-thumb,
.video-progress input::-moz-range-thumb {
  background: #e5e7eb;
  border-color: var(--accent);
}

.article-status {
  background: rgba(18, 23, 34, 0.98);
}

.article-status.is-error {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(69, 10, 10, 0.44);
  color: #fecaca;
}

.search-results {
  background: rgba(14, 18, 27, 0.98);
  border-color: var(--line);
}

.search-item {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: transparent;
  color: var(--text);
}

.search-item[aria-disabled="true"] {
  cursor: default;
}

.article-viewer {
  background: linear-gradient(180deg, rgba(18, 23, 34, 0.98), rgba(13, 17, 25, 0.98));
}

.article-container {
  max-width: 820px;
}

.article-viewer a {
  color: #c7d2fe;
  text-decoration: underline;
  text-decoration-color: rgba(129, 140, 248, 0.45);
  text-underline-offset: 0.18em;
}

.article-viewer a:hover {
  color: #e0e7ff;
  text-decoration-color: rgba(165, 180, 252, 0.82);
}

.article-viewer blockquote {
  border-left-color: rgba(99, 102, 241, 0.78);
  background: rgba(30, 41, 59, 0.58);
  color: var(--text-soft);
}

.article-viewer code,
#article-content code {
  background: rgba(30, 41, 59, 0.88);
  color: #e2e8f0;
}

.article-viewer pre,
#article-content pre {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #0b1120;
  color: #f8fafc;
}

.article-viewer table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  border-style: hidden;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.article-viewer th {
  background: rgba(26, 33, 50, 0.96);
  color: var(--text-strong);
}

.article-viewer td {
  background: rgba(15, 19, 29, 0.96);
  color: var(--text-soft);
}

.article-viewer td,
.article-viewer th {
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.article-viewer tr:nth-child(even) td {
  background: rgba(18, 23, 34, 0.98);
}

.article-category-title {
  padding: 2px 2px 10px;
  color: var(--text-strong);
}

.meta-card,
.book-card {
  background: linear-gradient(180deg, rgba(21, 27, 39, 0.98), rgba(15, 19, 29, 0.98));
}

.tag-list span {
  border-color: var(--line);
  background: rgba(27, 32, 48, 0.92);
  color: var(--text-soft);
}

.study-visual-head,
.study-viewer-toolbar {
  border-bottom-color: var(--line);
  background: linear-gradient(180deg, rgba(18, 23, 34, 0.96), rgba(15, 19, 29, 0.96));
}

@media (max-width: 980px) {
  .study-frame-wrap,
  .study-plan-frame-wrap {
    padding: 14px;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 12px 14px;
  }

  .study-selector-card,
  .article-container {
    padding: 18px;
  }

  .study-frame-wrap,
  .study-plan-frame-wrap {
    padding: 12px;
  }

  .menu-item:hover,
  .search-item:hover,
  .search-item.is-active {
    transform: none;
  }
}

.search-page-shell {
  display: grid;
  gap: 18px;
}

.search-hero-card {
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(22, 25, 36, 0.98), rgba(17, 18, 23, 0.98));
}

.search-hero-copy {
  display: block;
}

.search-hero-card h1 {
  margin-bottom: 0;
}

.search-hero-lead {
  margin: 0;
  max-width: 62ch;
}

.search-summary-card {
  margin-top: 18px;
  width: fit-content;
  min-width: min(100%, 220px);
  padding: 18px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  background: rgba(14, 18, 28, 0.72);
}

.search-summary-card strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}


.search-filter-card {
  display: grid;
  gap: 22px;
  background: linear-gradient(180deg, rgba(22, 25, 36, 0.96), rgba(17, 18, 23, 0.96));
}

.search-filter-header {
  display: grid;
  gap: 8px;
}

.search-filter-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-filter-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.search-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-filter-action-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(129, 140, 248, 0.38);
  background: rgba(79, 70, 229, 0.15);
  color: #dbeafe;
  font-size: 0.8rem;
  font-weight: 700;
}

.search-filter-action-btn.is-secondary {
  border-color: var(--line);
  background: rgba(17, 24, 39, 0.72);
  color: var(--muted-strong);
}

.search-filter-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.search-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(180px, 1fr));
  gap: 18px 16px;
  align-items: start;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.search-field-wide {
  grid-column: auto;
}

.search-field-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted-strong);
}

.search-input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 12, 16, 0.86);
  color: var(--text);
  outline: 0;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.search-input:focus {
  border-color: rgba(129, 140, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
  background: rgba(11, 12, 16, 0.96);
}

.search-input::placeholder {
  color: #7b8494;
}

.search-results-card {
  overflow: hidden;
}

.search-results-list {
  display: flex;
  flex-direction: column;
}

.search-results-header,
.search-result-row {
  display: grid;
  grid-template-columns: minmax(0, 2.9fr) minmax(112px, 136px) minmax(150px, 1fr) minmax(170px, 1.1fr) 96px;
  gap: 20px;
  align-items: center;
}

.search-results-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.02);
}

.search-result-row {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--ease), border-color var(--ease);
}

.search-result-row:hover {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(129, 140, 248, 0.24);
}

.search-result-row:last-child {
  border-bottom: 0;
}

.search-cell {
  min-width: 0;
}

.search-results-header > div:nth-child(2),
.search-result-row > div:nth-child(2) {
  justify-self: start;
}

.search-problem-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  max-width: 100%;
  font-weight: 800;
  line-height: 1.45;
}

.search-problem-id {
  flex: 0 0 auto;
  color: #a5b4fc;
  font-variant-numeric: tabular-nums;
}

.search-problem-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-problem-link:hover .search-problem-title {
  color: var(--text-strong);
}

.search-problem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.search-problem-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #667085;
}

.search-tier-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}

.search-tier-pill[data-group="Sprout"] {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.24);
}

.search-tier-pill[data-group="Bronze"] {
  color: #fdba74;
  background: rgba(180, 83, 9, 0.16);
  border-color: rgba(194, 120, 48, 0.28);
}

.search-tier-pill[data-group="Silver"] {
  color: #d1d5db;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.24);
}

.search-tier-pill[data-group="Gold"] {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.24);
}

.search-tier-pill[data-group="Platinum"] {
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(45, 212, 191, 0.24);
}

.search-tier-pill[data-group="Diamond"] {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(96, 165, 250, 0.26);
}

.search-tier-pill[data-group="Ruby"] {
  color: #fda4af;
  background: rgba(225, 29, 72, 0.16);
  border-color: rgba(251, 113, 133, 0.24);
}

.search-tier-pill[data-group="Unrated"],
.search-tier-pill[data-group="Not ratable"] {
  color: #cbd5e1;
  background: rgba(71, 85, 105, 0.2);
  border-color: rgba(148, 163, 184, 0.24);
}

.search-metric-cell {
  display: grid;
  gap: 8px;
}

.search-metric-top strong {
  font-size: 0.96rem;
}

.search-metric-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.14);
}

.search-metric-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.search-metric-fill.is-accept {
  background: linear-gradient(90deg, #60a5fa 0%, #818cf8 100%);
}

.search-metric-fill.is-solved {
  background: linear-gradient(90deg, #34d399 0%, #22c55e 100%);
}

.search-link-cell {
  display: flex;
  justify-content: flex-end;
}

.search-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-strong);
  font-weight: 700;
}

.search-open-link:hover {
  background: rgba(79, 70, 229, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
}

.search-empty-state {
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}

.search-load-more-wrap {
  padding: 0 24px 24px;
}

.hidden {
  display: none !important;
}

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

  .search-field-wide {
    grid-column: 1 / -1;
  }

  .search-results-header,
  .search-result-row {
    grid-template-columns: minmax(0, 2.1fr) minmax(108px, 124px) minmax(132px, 0.95fr) minmax(148px, 1fr) 80px;
    gap: 16px;
  }
}

@media (max-width: 860px) {
  .search-hero-copy {
    grid-template-columns: 1fr;
  }

  .search-filter-card {
    gap: 18px;
  }

  .search-results-header {
    display: none;
  }

  .search-filter-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-filter-card.is-collapsed .search-filter-grid {
    display: none;
  }

  .search-result-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .search-cell {
    display: grid;
    gap: 8px;
  }

  .search-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .search-problem-cell::before {
    display: none;
  }

  .search-problem-title {
    white-space: normal;
    word-break: keep-all;
    overflow: visible;
    text-overflow: clip;
  }

  .search-problem-meta span + span::before {
    display: none;
  }

  .search-link-cell {
    justify-content: flex-start;
  }

  .search-open-link {
    min-height: 42px;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .search-page-shell {
    gap: 14px;
  }

  .search-hero-card,
  .search-filter-card {
    padding: 20px;
  }

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

  .search-input {
    min-height: 46px;
    padding: 10px 12px;
  }

  .search-field-wide {
    grid-column: auto;
  }

  .search-result-row,
  .search-empty-state,
  .search-load-more-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
}


@media (max-width: 980px) {
  .browser-layout,
  .lecture-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .browser-sidebar,
  .lecture-sidebar,
  .article-sidebar {
    position: static;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 860px) {
  .browser-layout,
  .lecture-layout,
  .article-layout {
    gap: 14px;
  }

  .browser-sidebar,
  .lecture-sidebar,
  .article-sidebar {
    order: -1;
    width: 100%;
    padding: 14px;
  }

  .track-switch {
    grid-template-columns: 1fr;
  }

  .summary-topline {
    align-items: stretch;
  }

  .video-controls {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .video-control-button,
  .video-time {
    width: 100%;
  }

  .video-time {
    justify-content: space-between;
  }
}


@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  button:hover,
  .menu-item:hover,
  .search-item:hover,
  .search-item.is-active,
  .site-submenu-root:hover,
  .study-submenu-root:hover,
  .syntax-card:hover {
    transform: none !important;
  }
}

.study-board-card {
  display: grid;
  gap: 18px;
  border-color: rgba(99, 102, 241, 0.2);
}

.study-board-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px 18px;
  align-items: start;
}

.study-board-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.study-board-form label > span {
  color: #9ab0d2;
  font-weight: 600;
}

.study-board-field-title,
.study-board-field-apply {
  grid-column: 1 / -1;
}

.study-board-field-schedule {
  width: 100%;
}

.study-board-field-capacity {
  width: 100%;
}

.study-board-field-topic,
.study-board-field-mode {
  width: 100%;
}

.study-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-choice-button {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(17, 18, 23, 0.72);
  color: #cdd6e3;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.study-choice-button:hover {
  border-color: rgba(129, 140, 248, 0.8);
  transform: translateY(-1px);
}

.study-choice-button.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

.study-field-algorithm {
  border-color: rgba(99, 102, 241, 0.44);
  background: rgba(79, 70, 229, 0.2);
}

.study-field-backend {
  border-color: rgba(14, 165, 233, 0.44);
  background: rgba(14, 165, 233, 0.18);
}

.study-field-frontend {
  border-color: rgba(168, 85, 247, 0.44);
  background: rgba(168, 85, 247, 0.16);
}

.study-field-ai {
  border-color: rgba(20, 184, 166, 0.44);
  background: rgba(20, 184, 166, 0.14);
}

.study-field-cs {
  border-color: rgba(100, 116, 139, 0.48);
  background: rgba(100, 116, 139, 0.2);
}

.study-field-data-structure {
  border-color: rgba(236, 72, 153, 0.42);
  background: rgba(236, 72, 153, 0.16);
}

.study-field-coding-test {
  border-color: rgba(245, 158, 11, 0.44);
  background: rgba(245, 158, 11, 0.14);
}

.study-field-algorithm.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.study-field-backend.is-active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.study-field-frontend.is-active {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.study-field-ai.is-active {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.study-field-cs.is-active {
  background: linear-gradient(135deg, #334155, #64748b);
}

.study-field-data-structure.is-active {
  background: linear-gradient(135deg, #be185d, #ec4899);
}

.study-field-coding-test.is-active {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.study-mode-online.is-active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.study-mode-offline.is-active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.study-mode-hybrid.is-active {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.study-board-form input,
.study-board-form select,
.study-board-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 18, 23, 0.92);
  color: var(--text);
  padding: 11px 12px;
  min-height: 46px;
}

.study-board-form textarea {
  resize: none;
  min-height: 92px;
}

.study-board-form input:focus,
.study-board-form select:focus,
.study-board-form textarea:focus {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 1px;
}

.study-board-full {
  grid-column: 1 / -1;
}

.study-board-submit {
  width: fit-content;
  padding: 0 18px;
}

.study-board-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.study-board-list-wrap {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

.study-board-hint {
  margin-bottom: 10px;
  color: var(--muted);
}

.study-board-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.study-board-count {
  margin: 0;
  color: #9ab0d2;
  font-size: 0.88rem;
}

.study-board-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.study-board-filters select,
.study-board-filters input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 18, 23, 0.92);
  color: var(--text);
  padding: 10px 11px;
}

.study-board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.study-board-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}

.study-page-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 18, 23, 0.92);
  color: #dbe4f4;
  min-width: 38px;
  min-height: 34px;
  padding: 0 10px;
  cursor: pointer;
}

.study-page-button:hover:not(:disabled) {
  border-color: rgba(129, 140, 248, 0.75);
}

.study-page-button.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: rgba(165, 180, 252, 0.9);
  color: #fff;
  font-weight: 700;
}

.study-page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.study-board-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(20, 24, 38, 0.62);
  padding: 14px 12px;
}

.study-board-item p {
  margin: 0;
}

.study-board-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.study-board-item-head strong {
  line-height: 1.45;
}

.study-board-item-date {
  color: #bac8df;
  font-size: 0.84rem;
  white-space: nowrap;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.study-board-item-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin-bottom: 8px;
}

.study-board-item-meta p {
  color: #cdd6e3;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.study-board-item-meta b {
  display: inline-flex;
  color: var(--text-strong);
  min-width: 68px;
}

.study-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.28);
}

.study-tag-field-알고리즘 {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.study-tag-field-백엔드 {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.study-tag-field-프론트엔드 {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.study-tag-field-ai {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.study-tag-field-cs {
  background: linear-gradient(135deg, #334155, #64748b);
}

.study-tag-field-자료구조 {
  background: linear-gradient(135deg, #be185d, #ec4899);
}

.study-tag-field-코딩테스트 {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.study-tag-mode-온라인 {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.study-tag-mode-오프라인 {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.study-tag-mode-혼합 {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.study-board-item-detail {
  color: #dbe4f4;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 9px;
  white-space: pre-wrap;
}

.study-board-item-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.study-board-item-auth {
  margin-bottom: 9px;
}

.study-delete-password-wrap {
  display: inline-grid;
  gap: 6px;
  color: #93a6c5;
  font-size: 0.82rem;
}

.study-delete-password {
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 18, 23, 0.92);
  color: var(--text);
  padding: 9px 11px;
}

.study-board-item.is-focused {
  border-color: rgba(129, 140, 248, 0.85);
  box-shadow: inset 3px 0 0 rgba(129, 140, 248, 0.85);
}

.study-board-empty {
  margin: 0;
  color: var(--muted);
  min-height: 32px;
}

@media (max-width: 860px) {
  .study-board-list-wrap {
    min-height: 0;
  }

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

  .study-board-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .study-choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .study-choice-group-mode {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .study-choice-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .study-board-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-board-list-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .study-board-form-actions {
    width: 100%;
  }

  .study-board-submit {
    width: 100%;
  }

  .study-board-item {
    padding: 12px 11px;
  }

  .study-board-item-head {
    flex-direction: column;
    gap: 6px;
  }

  .study-board-item-date {
    white-space: normal;
    font-size: 0.8rem;
  }

  .study-board-item-meta {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .study-board-item-meta b {
    min-width: 60px;
  }
}
