/* 기본 레이아웃: 상단 바, 컨테이너, 타이포그래피.
   원래 style.css 한 파일이었다. base.html 의 읽는 순서를 바꾸면
   나중 규칙이 앞 규칙을 덮어쓰는 순서가 깨진다. */

/* =========================
   상단 바
   ========================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  flex-wrap: wrap;
}

.brand {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.topbar nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* =========================
   컨테이너
   ========================= */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 18px 60px;
}

.student-body .container {
  max-width: 560px;
  padding-bottom: 130px; /* 하단 네비/제출 바 공간 */
}

/* =========================
   공통 타이포
   ========================= */

h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
}

p {
  margin: 0 0 10px;
}

.muted {
  color: var(--muted);
  font-size: 13.5px;
}

.muted a {
  color: var(--accent);
}


/* 상단 메뉴 접기 (v0.9)
   선생님 메뉴가 7개라 좁은 화면에서 두 줄을 차지했다.
   자주 쓰는 현황판만 남기고 나머지는 접어둔다. */
.nav-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-menu-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.nav-menu-label {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-menu-label::after { content: "\25BE"; font-size: 11px; }

.nav-menu-toggle:focus-visible + .nav-menu-label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-menu-items {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 148px;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(32, 36, 58, 0.10);
  padding: 6px;
}

.nav-menu-toggle:checked ~ .nav-menu-items { display: flex; }

.nav-menu-items a {
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu-items a:hover { background: var(--surface-2); color: var(--text); }

/* 넓은 화면에서는 접지 않고 그냥 펼쳐 보여준다 */
@media (min-width: 768px) {
  .nav-menu-label { display: none; }

  .nav-menu-items,
  .nav-menu-toggle:checked ~ .nav-menu-items {
    display: flex;
    position: static;
    flex-direction: row;
    border: none;          /* 넓은 화면에선 드롭다운이 아니라 그냥 메뉴 줄 */
    box-shadow: none;
    background: none;
    padding: 0;
    min-width: 0;
  }
}

/* 임베드 모드 (다른 사이트 iframe 안)
   상단바를 숨겼으므로 위 여백을 줄이고, iframe 이중 스크롤이 생기지 않게
   높이를 100% 로 맞춘다. */
body.embedded {
  min-height: 100%;
}

body.embedded .container {
  padding-top: 16px;
}

/* 본문 링크는 티얼. 버튼·탭·카드 링크는 각자 색이 있으니 건드리지 않는다. */
.container a:not(.btn):not(.badge):not(.pill):not([class*="tab"]):not([class*="card"]):not(.icon-btn):not(.back-link):not(.bottom-nav-item):not(.calendar-nav) {
  color: var(--accent);
}
