/* AiNex Edu design — layout: header, full menu, search, footer, pre-footer. Ported from the React/Vite design (CSS modules → prefixed classes). */

/* ===== layout/SiteHeader.module.css (prefix .sh-) ===== */
.sh-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(from var(--bg) r g b / 0.86);
  backdrop-filter: blur(16px);
}

.sh-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 32px;
  color: var(--bg);
  background: var(--ink);
}

.sh-noticeText {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.sh-noticeLink {
  flex-shrink: 0;
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.sh-noticeLink:hover,
.sh-noticeLink:focus-visible {
  text-decoration: underline;
}

.sh-noticeClose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  color: var(--bg);
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.sh-header {
  border-bottom: 1px solid rgb(from var(--text) r g b / 0.06);
  background: rgb(from var(--bg) r g b / 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
}

.sh-bar {
  display: flex;
  align-items: center;
  height: 72px;
  padding: 0 32px;
  gap: 28px;
  transition: height 0.2s;
}

.sh-compact .sh-bar {
  height: 60px;
}

/* --- wordmark --- */
.sh-wordmark {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.28em;
  color: var(--text);
  font-size: 24px;
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: font-size 0.2s;
}

.sh-mark {
  position: relative;
  display: block;
  flex: none;
  width: 30px;
  height: 30px;
  margin-right: 0.1em;
  overflow: hidden;
  border-radius: 9px;
  box-shadow: 0 6px 14px -4px rgb(33 73 240 / 0.55), 0 1px 2px rgb(16 24 60 / 0.18);
  transition: width 0.2s, height 0.2s, transform 0.25s ease, box-shadow 0.25s ease;
}

.sh-markSvg { display: block; width: 100%; height: 100%; }
.sh-markSpark { transform-box: fill-box; transform-origin: center; transition: transform 0.45s cubic-bezier(.2,.8,.2,1.3); }

/* hover: sheen sweep + spark twinkle */
.sh-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / 0.55) 48%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
}

.sh-wordmark:hover .sh-mark,
.sh-wordmark:focus-visible .sh-mark { transform: translateY(-1px) rotate(-4deg); box-shadow: 0 10px 20px -6px rgb(33 73 240 / 0.65), 0 1px 2px rgb(16 24 60 / 0.18); }
.sh-wordmark:hover .sh-mark::after,
.sh-wordmark:focus-visible .sh-mark::after { transform: translateX(120%); transition: transform 0.7s ease; }
.sh-wordmark:hover .sh-markSpark,
.sh-wordmark:focus-visible .sh-markSpark { transform: rotate(90deg) scale(1.35); }

@media (prefers-reduced-motion: reduce) {
  .sh-mark, .sh-markSpark, .sh-mark::after { transition: none !important; }
  .sh-wordmark:hover .sh-mark { transform: none; }
  .sh-wordmark:hover .sh-markSpark { transform: none; }
  .sh-mark::after { display: none; }
}

.sh-compact .sh-wordmark {
  font-size: 20px;
}

.sh-compact .sh-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.sh-edu {
  color: var(--accent);
}

/* --- GNB: 3 groups split by thin dividers --- */
.sh-gnb {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}

.sh-gnbSep {
  flex: none;
  width: 1px;
  height: 16px;
  margin: 0 10px;
  background: #e4e7ec;
}

.sh-gnbItem {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  color: #475467;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.sh-gnbItem:hover,
.sh-gnbItem:focus-visible {
  color: var(--text);
  background: #f2f4f7;
}

.sh-gnbItem:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.sh-gnbItemActive,
.sh-gnbItemActive:hover {
  color: var(--text);
  background: #eef3f9;
}

.sh-gnbItemActive::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.sh-gnbBrand {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.sh-gnbItem[aria-disabled] {
  color: #98a2b3;
  cursor: default;
}

.sh-gnbItem[aria-disabled]:hover {
  background: transparent;
}

.sh-soon {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f2f4f7;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.sh-axisChip {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgb(from var(--axis) r g b / 0.08);
  color: var(--axis);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.sh-liveDot {
  position: relative;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
}

.sh-liveDot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #ef4444;
  opacity: 0;
  animation: sh-live 1.8s ease-out infinite;
}

@keyframes sh-live {
  0% { transform: scale(0.4); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-liveDot::after { animation: none; }
}

/* --- tools --- */
.sh-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
  min-width: 0;
}

.sh-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 200px;
  height: 40px;
  padding: 0 8px 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f2f4f7;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sh-search svg {
  flex: none;
  color: var(--text);
}

.sh-search:hover,
.sh-search:focus-visible {
  background: var(--bg);
  border-color: #d0d5dd;
}

.sh-search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.sh-searchText {
  white-space: nowrap;
}

.sh-kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  background: var(--bg);
  color: #98a2b3;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.sh-langToggle {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.sh-langToggle:hover,
.sh-langToggle:focus-visible {
  color: var(--text);
  background: #f2f4f7;
}

.sh-toolSep {
  flex: none;
  width: 1px;
  height: 20px;
  background: #e4e7ec;
}

.sh-iconButton,
.sh-menuButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  border: 1px solid #e4e7ec;
  border-radius: var(--radius-header-pill);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sh-iconButton svg,
.sh-menuButton svg {
  width: 18px;
  height: 18px;
}

.sh-iconButton:hover,
.sh-iconButton:focus-visible,
.sh-menuButton:hover,
.sh-menuButton:focus-visible {
  background: #f2f4f7;
  border-color: #d0d5dd;
}

/* KR/EN segmented switch — still used by mypage and admin (lms_lang_switch) */
.sh-lang {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 36px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #e4e7ec;
  border-radius: 4px;
  background: #f3f5f8;
}

.sh-lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.sh-lang a:hover,
.sh-lang a:focus-visible {
  color: var(--ink);
  background: #fff;
}

.sh-lang a[aria-current="true"] {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(18, 20, 26, 0.16);
}

.sh-lang a[aria-current="true"]:hover,
.sh-lang a[aria-current="true"]:focus-visible {
  color: #fff;
  background: var(--ink);
}

.sh-lang a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* --- member + classroom --- */
.sh-member {
  display: flex;
  align-items: center;
  gap: 2px;
}

.sh-memberName,
.sh-memberLink {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.sh-memberLink {
  padding: 0 12px;
  border-radius: 6px;
  color: #344054;
  font-weight: 650;
  transition: background 0.15s ease, color 0.15s ease;
}

.sh-memberName {
  display: inline-block;
  max-width: 132px;
  overflow: hidden;
  font-weight: var(--heading-weight);
  line-height: 40px;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* signed in: the name is the first thing to give way when the bar gets tight */
@media (width <= 1600px) {
  .sh-memberName {
    display: none;
  }
}

.sh-memberLink:hover,
.sh-memberLink:focus-visible {
  color: var(--text);
  background: #f2f4f7;
}

.sh-logoutButton {
  font: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.sh-classroom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 14px;
  color: var(--bg);
  background: var(--ink);
  border-radius: var(--radius-header-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 14px rgb(from var(--ink) r g b / 0.18);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.sh-classroom svg {
  flex: none;
}

.sh-classroom:hover,
.sh-classroom:focus-visible {
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 18px rgb(from var(--accent) r g b / 0.3);
}

/* --- responsive --- */
/* below 1680: search collapses to an icon button */
@media (width <= 1679px) {
  .sh-search {
    justify-content: center;
    width: 40px;
    padding: 0;
    background: var(--bg);
    border-color: #e4e7ec;
  }

  .sh-searchText,
  .sh-kbd {
    display: none;
  }
}

@media (width <= 1440px) {
  .sh-bar {
    gap: 16px;
    padding: 0 20px;
  }

  .sh-gnbItem {
    padding: 0 9px;
    font-size: 14px;
  }

  .sh-gnbBrand {
    font-size: 13px;
  }

  .sh-gnbSep {
    margin: 0 6px;
  }

  .sh-tools {
    gap: 6px;
  }
}

@media (width <= 1280px) {
  .sh-soon,
  .sh-classroom svg,
  .sh-toolSep {
    display: none;
  }

  .sh-wordmark {
    font-size: 22px;
  }

  .sh-gnbItem {
    padding: 0 7px;
  }

  .sh-langToggle span {
    display: none;
  }

  .sh-langToggle {
    padding: 0 10px;
  }

  .sh-classroom {
    padding: 0 14px;
  }
}

@media (width <= 1140px) and (width >= 1024px) {
  .sh-bar {
    gap: 8px;
    padding: 0 16px;
  }

  .sh-mark {
    display: none;
  }

  .sh-gnbItem {
    padding: 0 6px;
    font-size: 13px;
  }

  .sh-gnbBrand {
    font-size: 12px;
  }

  .sh-gnbSep {
    margin: 0 3px;
  }

  .sh-memberLink {
    padding: 0 8px;
  }
}

/* English labels run longer: drop the badge earlier, and 로그인 (still in the full menu) below 1400 */
@media (width <= 1600px) {
  html[lang="en"] .sh-soon {
    display: none;
  }
}

@media (width <= 1400px) and (width >= 1024px) {
  html[lang="en"] .sh-member,
  html[lang="en"] .sh-toolSep {
    display: none;
  }
}

@media (width <= 1023px) {
  .sh-notice {
    padding: 8px 16px;
  }

  .sh-bar {
    box-sizing: border-box;
    max-width: 100%;
    height: 64px;
    padding: 0 12px;
    gap: 6px;
  }

  .sh-compact .sh-bar {
    height: 60px;
  }

  .sh-wordmark {
    font-size: 21px;
  }

  .sh-mark {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .sh-tools {
    gap: 4px;
    margin-left: auto;
  }

  .sh-gnb,
  .sh-member,
  .sh-classroom {
    display: none;
  }

  /* signed-out: keep 로그인 visible on mobile */
  .sh-member:has(> a.sh-memberLink:not(.sh-logoutButton)) {
    display: flex !important;
  }

  .sh-memberLink {
    height: 40px;
    padding: 0 10px;
  }

  html.is-landing .sh-header {
    height: auto;
  }
}

@media (width <= 380px) {
  .sh-mark {
    display: none;
  }
}

/* ===== Full menu (prefix .fm-) — 2026-10 mega menu =====
   Desktop: a sheet that drops from the header over a blurred scrim. Left: navy spotlight
   (search, shortcuts, member). Right: three labelled groups on one 5-column subgrid.
   Mobile (<1024): right-hand sheet, spotlight on top, groups as accordions.
   JS contract (site.js): #fullMenu[hidden], .fm-column[data-open], .fm-accordion, .fm-accordionIcon, data-lms hooks. */
.fm-overlay {
  position: fixed;
  inset: var(--site-chrome-height, 72px) 0 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
}

.fm-scrim {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgb(14 22 51 / 0.34);
  backdrop-filter: blur(6px);
  cursor: pointer;
  animation: fm-fade 0.24s ease both;
}

.fm-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
  background: #fff;
  border-top: 1px solid rgb(18 20 26 / 0.06);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 32px 64px -24px rgb(14 22 51 / 0.38);
  animation: fm-drop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.fm-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.fm-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 32px;
}

/* --- column tones --- */
.fm-tone-ink    { --tone: #12141a; --tint: #f2f4f7; }
.fm-tone-blue   { --tone: #0d3f76; --tint: #eef3f9; }
.fm-tone-amber  { --tone: #dc6803; --tint: #fffaeb; }
.fm-tone-teal   { --tone: #0e9384; --tint: #f0fdf9; }
.fm-tone-green  { --tone: #079455; --tint: #ecfdf3; }
.fm-tone-violet { --tone: #6941c6; --tint: #f4f3ff; }
.fm-tone-rose   { --tone: #e11d48; --tint: #fff1f3; }
.fm-tone-red    { --tone: #d92d20; --tint: #fef3f2; }
.fm-tone-slate  { --tone: #475467; --tint: #f2f4f7; }

/* --- spotlight --- */
.fm-spot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 24px 24px;
  overflow: hidden;
  border-radius: 6px;
  color: #fff;
  background:
    radial-gradient(360px 260px at 100% 0%, rgb(255 255 255 / 0.22), transparent 62%),
    radial-gradient(300px 240px at 0% 100%, rgb(23 56 214 / 0.45), transparent 60%),
    var(--p);
  animation: fm-rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.04s both;
}

.fm-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.5) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.16;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
  pointer-events: none;
}

.fm-spot > * {
  position: relative;
}

.fm-spotKicker {
  margin: 0;
  color: rgb(255 255 255 / 0.6);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fm-spotTitle {
  margin: 8px 0 18px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.3;
  word-break: keep-all;
}

.fm-spotSearch {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 10px 0 14px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.08);
  color: rgb(255 255 255 / 0.78);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.fm-spotSearch svg {
  flex: none;
  color: #fff;
}

.fm-spotSearch span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-spotSearch kbd {
  flex: none;
  padding: 2px 6px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.8);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.fm-spotSearch:hover,
.fm-spotSearch:focus-visible {
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.32);
}

.fm-quick {
  margin-top: 22px;
}

.fm-quickLabel {
  margin: 0 0 10px;
  color: rgb(255 255 255 / 0.55);
  font-size: 12px;
  font-weight: 700;
}

.fm-quick ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fm-quick a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 4px;
  background: rgb(255 255 255 / 0.06);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fm-quick a:hover,
.fm-quick a:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #12141a;
}

.fm-member {
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.08);
  backdrop-filter: blur(8px);
}

.fm-memberHello {
  margin: 0;
  color: rgb(255 255 255 / 0.88);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.5;
  word-break: keep-all;
}

.fm-memberHello b {
  color: #fff;
  font-weight: 800;
}

.fm-memberBtns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.fm-memberSolid,
.fm-memberGhost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.fm-memberSolid {
  background: #fff;
  color: #12141a;
}

.fm-memberSolid:hover,
.fm-memberSolid:focus-visible {
  background: #eef3f9;
}

.fm-memberGhost {
  border: 1px solid rgb(255 255 255 / 0.3);
  color: #fff;
}

.fm-memberGhost:hover,
.fm-memberGhost:focus-visible {
  border-color: rgb(255 255 255 / 0.55);
  background: rgb(255 255 255 / 0.1);
}

.fm-spotClassroom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  margin-top: 8px;
  border-radius: 6px;
  background: #12141a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 10px 24px -8px rgb(10 20 80 / 0.55);
  transition: background 0.15s ease;
}

.fm-memberBtns .fm-spotClassroom {
  height: 42px;
  margin-top: 0;
  font-size: 14px;
}

.fm-spotClassroom svg {
  transition: transform 0.18s ease;
}

.fm-spotClassroom:hover,
.fm-spotClassroom:focus-visible {
  background: #232838;
}

.fm-spotClassroom:hover svg {
  transform: translateX(3px);
}

.fm-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  color: rgb(255 255 255 / 0.6);
  font-size: 13px;
  font-weight: 600;
}

.fm-contact a {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.fm-spot a:focus-visible,
.fm-spot button:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.7);
  outline-offset: 2px;
}

/* --- groups: one 5-column subgrid so every row lines up --- */
.fm-groups {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 16px;
  align-content: start;
}

.fm-group {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 4px;
  min-width: 0;
}

.fm-group-course  { grid-column: 1 / -1; }
.fm-group-service { grid-column: span 3; }
.fm-group-help    { grid-column: span 2; }

.fm-columns {
  display: contents;
}

.fm-groupTitle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 2px;
  padding: 0 12px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fm-groupTitle::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eef0f3;
}

.fm-column {
  position: relative;
  min-width: 0;
  padding: 12px 12px 10px;
  border-radius: 6px;
  transition: background 0.18s ease;
  animation: fm-rise 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 28ms + 70ms);
}

.fm-column:hover,
.fm-column:focus-within {
  background: color-mix(in srgb, var(--tint) 70%, #fff);
}

.fm-columnTitle {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 0 10px;
  border: 0;
  color: #12141a;
  text-decoration: none;
}

.fm-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--tint);
  color: var(--tone);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 10%, transparent);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.18s ease, color 0.18s ease;
}

.fm-column:hover .fm-ico {
  background: var(--tone);
  color: #fff;
  transform: rotate(-6deg) scale(1.04);
}

.fm-colText {
  min-width: 0;
}

.fm-colText b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  word-break: keep-all;
}

.fm-colText em {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  word-break: keep-all;
}

.fm-colArrow {
  color: var(--tone);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

a.fm-columnTitle:hover .fm-colArrow,
a.fm-columnTitle:focus-visible .fm-colArrow {
  opacity: 1;
  transform: none;
}

a.fm-columnTitle:hover b,
a.fm-columnTitle:focus-visible b {
  color: var(--tone);
}

a.fm-columnTitle:focus-visible {
  outline: 2px solid var(--tone);
  outline-offset: 4px;
  border-radius: 6px;
}

.fm-links {
  display: grid;
  margin: 0;
  padding: 0 0 0 52px;
  list-style: none;
}

.fm-links a,
.fm-searchLink {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: #475467;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.fm-links a:hover,
.fm-links a:focus-visible,
.fm-searchLink:hover,
.fm-searchLink:focus-visible {
  color: var(--tone);
  transform: translateX(3px);
}

.fm-links a:focus-visible,
.fm-searchLink:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fm-links a[aria-disabled] {
  color: #c0c6d0;
  cursor: default;
  transform: none;
}

.fm-accordion {
  display: none;
}

/* --- motion --- */
@keyframes fm-fade {
  from { opacity: 0; }
}

@keyframes fm-drop {
  from { opacity: 0; transform: translateY(-14px); }
}

@keyframes fm-rise {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes fm-slide {
  from { opacity: 0; transform: translateX(28px); }
}

@media (prefers-reduced-motion: reduce) {
  .fm-scrim,
  .fm-panel,
  .fm-spot,
  .fm-column {
    animation: none;
  }

  .fm-ico,
  .fm-links a,
  .fm-searchLink,
  .fm-colArrow {
    transition: none;
  }
}

/* --- wide desktop (5 columns): icon above the title so each column keeps its full width --- */
@media (width >= 1281px) {
  .fm-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
  }

  .fm-column {
    padding: 14px 14px 10px;
  }

  .fm-columnTitle {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "ico arrow" "text text";
    align-items: start;
    row-gap: 12px;
    padding-bottom: 12px;
  }

  .fm-ico {
    grid-area: ico;
  }

  .fm-colArrow {
    grid-area: arrow;
    margin-top: 4px;
  }

  .fm-colText {
    grid-area: text;
  }

  .fm-links {
    padding-left: 0;
  }
}

/* --- narrower desktop: 3-column grid, slimmer spotlight --- */
@media (width >= 1024px) and (width <= 1280px) {
  .fm-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    padding: 24px 24px 28px;
  }

  .fm-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fm-group-course,
  .fm-group-service {
    grid-column: 1 / -1;
  }

  .fm-group-help {
    grid-column: span 2;
  }

  .fm-spotTitle {
    font-size: 20px;
  }
}

/* --- mobile / tablet: right-hand sheet with accordions --- */
@media (width <= 1023px) {
  .fm-overlay {
    flex-direction: row;
    justify-content: flex-end;
  }

  .fm-panel {
    width: min(100%, 420px);
    height: 100%;
    max-height: none;
    border-top: 0;
    border-radius: 0;
    box-shadow: -24px 0 48px -16px rgb(14 22 51 / 0.3);
    animation-name: fm-slide;
  }

  .fm-layout {
    display: block;
    padding: 0 0 calc(24px + env(safe-area-inset-bottom));
  }

  .fm-spot {
    gap: 18px;
    padding: 22px 20px 20px;
    border-radius: 0;
    animation: none;
  }

  .fm-spotTitle {
    margin: 6px 0 14px;
    font-size: 19px;
  }

  .fm-quick {
    margin-top: 16px;
  }

  .fm-spotSearch kbd {
    display: none;
  }

  .fm-quick ul {
    flex-wrap: nowrap;
    margin: 0 -20px;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fm-quick ul::-webkit-scrollbar {
    display: none;
  }

  .fm-groups {
    display: block;
    padding-top: 6px;
  }

  .fm-group {
    display: block;
  }

  .fm-groupTitle {
    padding: 18px 20px 6px;
  }

  .fm-groupTitle::after {
    display: none;
  }

  .fm-column {
    padding: 0;
    border-radius: 0;
    border-bottom: 1px solid #f2f4f7;
    animation: none;
  }

  .fm-column:hover,
  .fm-column:focus-within {
    background: none;
  }

  .fm-column[data-open="true"] {
    background: color-mix(in srgb, var(--tint) 55%, #fff);
  }

  .fm-columnTitle {
    display: none;
  }

  .fm-accordion {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 0 16px 0 20px;
    border: 0;
    background: none;
    color: #12141a;
    font: inherit;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: left;
    cursor: pointer;
  }

  .fm-accordion .fm-ico {
    width: 34px;
    height: 34px;
    border-radius: 6px;
  }

  .fm-accordion .fm-ico svg {
    width: 18px;
    height: 18px;
  }

  .fm-column:hover .fm-ico {
    background: var(--tint);
    color: var(--tone);
    transform: none;
  }

  .fm-column[data-open="true"] .fm-ico {
    background: var(--tone);
    color: #fff;
  }

  .fm-accLabel {
    flex: 1;
    min-width: 0;
  }

  /* site.js writes +/− here; the text is hidden and a chevron drawn instead */
  .fm-accordionIcon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #98a2b3;
    font-size: 0;
  }

  .fm-accordionIcon::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin 0.2s ease;
  }

  .fm-column[data-open="true"] .fm-accordionIcon {
    color: var(--tone);
  }

  .fm-column[data-open="true"] .fm-accordionIcon::before {
    margin-top: 4px;
    transform: rotate(-135deg);
  }

  .fm-links {
    display: none;
  }

  .fm-column[data-open="true"] .fm-links {
    display: grid;
    padding: 0 20px 14px 66px;
  }

  .fm-links a,
  .fm-searchLink {
    min-height: 40px;
    font-size: 14.5px;
  }
}

@media (width <= 480px) {
  .fm-panel {
    width: 100%;
  }
}

/* ===== layout/SearchOverlay.module.css (prefix .so-) ===== */
.so-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--site-chrome-height, 72px) + 24px) 20px 20px;
}

.so-scrim {
  position: absolute;
  inset: 0;
  padding: 0;
  background: rgba(17, 20, 24, 0.36);
  border: 0;
  cursor: pointer;
}

.so-dialog {
  position: relative;
  width: min(720px, 100%);
  padding: 28px 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(17, 20, 24, 0.16);
}

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

.so-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.so-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.so-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 6px 6px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.so-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--muted);
}

.so-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  letter-spacing: -0.02em;
  outline: none;
}

.so-submit {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 22px;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.so-hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .so-dialog {
    padding: 20px 16px 16px;
  }

  .so-bar {
    padding: 4px 4px 4px 14px;
  }
}

/* ===== layout/SiteFooter.module.css (prefix .sf-) ===== */
.sf-footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 80% at 100% 0%, rgb(from var(--accent) r g b / 0.32), transparent 58%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgb(from var(--accent) r g b / 0.14), transparent 55%),
    #0e1118;
  color: #e7e9ee;
  padding: 72px 32px 28px;
  border-top: 0;
}

.sf-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 22%, #9eb6ff 50%, var(--accent) 78%, transparent);
}

.sf-footer::after {
  content: "AiNex";
  position: absolute;
  right: 56px;
  top: 50%;
  color: transparent;
  font-size: clamp(108px, 12.4vw, 164px);
  font-weight: var(--heading-weight);
  letter-spacing: -0.07em;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-54%);
  -webkit-text-stroke: 1.5px rgb(255 255 255 / 0.2);
}

.sf-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.sf-flat {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 28px 56px;
  padding-bottom: 36px;
}

.sf-wordmark {
  margin: 0;
  color: var(--bg);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: var(--heading-weight);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.sf-wordmark::after {
  content: "Learning for a better tomorrow";
  display: block;
  max-width: 16em;
  margin-top: 16px;
  color: #9aa3b5;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.45;
}

.sf-edu {
  color: #8eabff;
}

.sf-flatLinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 10px 12px;
  max-width: 560px;
}

.sf-group {
  flex-basis: 100%;
  margin: 0 0 2px;
  color: #8eabff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sf-sep {
  flex-basis: 100%;
  height: 1px;
  margin: 8px 0;
  background: linear-gradient(90deg, rgb(from var(--accent) r g b / 0.7), transparent 80%);
  color: transparent;
  font-size: 0;
}

.sf-flatLinks a,
.sf-flatLinks span[aria-disabled] {
  border: 1px solid rgb(from var(--bg) r g b / 0.1);
  border-radius: 4px;
  background: rgb(from var(--bg) r g b / 0.04);
  color: #e7e9ee;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.sf-flatLinks a:hover,
.sf-flatLinks a:focus-visible {
  border-color: var(--accent);
  background: rgb(from var(--accent) r g b / 0.2);
  color: var(--bg);
  transform: translateY(-2px);
}

.sf-flatLinks span[aria-disabled] {
  opacity: 0.45;
  cursor: default;
}

.sf-biz,
.sf-biz p,
.sf-bottom,
.sf-bottom p,
.sf-bottom a {
  color: #b7beca;
}

.sf-biz {
  border-top: 1px solid rgb(from var(--bg) r g b / 0.08);
  border-bottom: 0;
  padding: 22px 0 8px;
  font-size: 13px;
  line-height: 1.75;
}

.sf-biz p,
.sf-bottom p {
  margin: 0;
}

.sf-biz p + p {
  margin-top: 4px;
}

.sf-biz a {
  color: #8eabff;
}

.sf-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  font-size: 13px;
}

.sf-bottom a {
  text-decoration: none;
}

.sf-footer a:hover,
.sf-footer a:focus-visible {
  color: var(--bg);
}

@media (width <= 1023px) {
  .sf-footer {
    padding: 48px 20px 24px;
  }

  .sf-flat {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 24px;
  }

  .sf-flatLinks {
    max-width: none;
  }

  .sf-footer::after {
    top: auto;
    right: 16px;
    bottom: 8px;
    font-size: clamp(56px, 16vw, 84px);
    transform: none;
  }

  .sf-inner {
    padding-bottom: 76px;
  }
}

@media (width <= 700px) {
  .sf-bottom {
    display: block;
  }

  .sf-bottom p + p {
    margin-top: 8px;
  }
}

/* ===== layout/PublicLayout.module.css (prefix .pl-) ===== */
.pl-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}

.pl-main {
  flex: 1 0 auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

html.is-auth .pl-page,
html.is-mypage .pl-page {
  display: block;
}

.pl-authFocus {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 520px at 50% -12%, rgb(72 115 184 / 0.18), transparent 58%),
    #e8eef8;
}

.pl-authMain {
  display: flex;
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ===== landing/LandingPrefooter.module.css (prefix .pf-) ===== */
.pf-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 88px 32px 84px;
  background: linear-gradient(180deg, #f3f6fb 0%, var(--bg) 72%);
  border-top: 0;
}

.pf-row {
  display: grid;
  gap: 14px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.pf-r1 {
  grid-template-columns: 1.5fr 1fr;
}

.pf-r2 {
  grid-template-columns: 1fr 1fr;
}

.pf-r3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.pf-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 28px;
  color: inherit;
  background: var(--bg);
  border: 1px solid #e6ebf3;
  border-radius: 6px;
  box-shadow: 0 14px 36px rgba(18, 36, 74, 0.05);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pf-box:hover {
  border-color: #d5def0;
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(18, 36, 74, 0.1);
}

.pf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pf-head b,
.pf-act b {
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: var(--heading-weight);
  letter-spacing: -0.04em;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.pf-more {
  flex: none;
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--accent);
  background: #f3f6fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.pf-more:hover,
.pf-more:focus-visible {
  color: var(--hover-blue);
}

.pf-box p,
.pf-empty {
  margin: 0;
  color: #5c6570;
  font-size: 14px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.pf-empty {
  margin-top: 6px;
  padding: 18px 16px;
  border: 1px dashed #d5deee;
  border-radius: 6px;
  background: #f7f9fc;
}

.pf-guide {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-top: 8px;
  padding: 14px 14px;
  border-radius: 6px;
  color: var(--text);
  background: #f7f9fc;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.pf-guide:hover,
.pf-guide:focus-visible {
  color: var(--accent);
  background: #eef3ff;
}

.pf-r3 {
  gap: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 16px 36px rgba(18, 36, 74, 0.08);
}

.pf-r3 .pf-box {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pf-r3 .pf-box:hover {
  transform: none;
  box-shadow: none;
}

.pf-act {
  min-height: 156px;
  justify-content: center;
  gap: 8px;
}

.pf-mint {
  background: var(--accent);
  border-color: var(--accent);
}

.pf-mint b,
.pf-mint p {
  color: var(--bg);
}

.pf-mint p {
  color: rgb(from var(--bg) r g b / 0.84);
}

.pf-mint:hover {
  background: var(--hover-blue);
  border-color: var(--hover-blue);
}

.pf-dark {
  background: var(--ink);
  border-color: var(--ink);
}

.pf-dark b {
  color: var(--bg);
}

.pf-dark p {
  color: #c5ccd6;
}

.pf-dark:hover {
  background: #1c2230;
  border-color: #1c2230;
}

.pf-tel {
  color: var(--accent);
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: var(--heading-weight);
  letter-spacing: -0.045em;
  line-height: 1.2;
  text-decoration: none;
  word-break: keep-all;
}

@media (width <= 1023px) {
  .pf-section {
    padding: 56px 20px 48px;
  }

  .pf-r1,
  .pf-r2,
  .pf-r3 {
    grid-template-columns: 1fr;
  }

  .pf-tel {
    font-size: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-box,
  .pf-mint,
  .pf-dark {
    transition: none;
  }

  .pf-box:hover {
    transform: none;
  }
}

html.pf-home-modern .pf-section {
  background: #f4f6fb;
}

html.pf-home-modern .pf-section {
  background: transparent;
}

/* ===== additions for the PHP port ===== */
.pf-notices{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.pf-notices a{display:flex;justify-content:space-between;gap:16px;padding:10px 12px;border-radius:6px;background:var(--bg-alt);color:var(--text);text-decoration:none;font-size:15px}
.pf-notices a:hover{background:#e9eefb}
.pf-notices time{color:var(--muted);font-size:13px;white-space:nowrap}
.sh-menuButton svg[hidden]{display:none}
