/* Chosen whole-draft: tokens 27–37, bar 149–176/583–592, rail 345–355, phone 497–505/753–757. */
:root {--remi-bar-h:69px}
@media(max-width:1119px) {
  :root:has(.remi-bar .remi-sitenav) {--remi-bar-h:133px}
}
@media(max-width:760px) {
  :root, :root:has(.remi-bar .remi-sitenav) {--remi-bar-h:57px}
}
.remi-bar,.remi-drawer,.remi-rail {
  --remi-ink:#0d1421;--remi-ink-2:#4a5466;--remi-paper:#fff;--remi-line:#e1e5ec;--remi-line-2:#c8cfda;
  --remi-go:#1f4fd8;--remi-go-2:#1638a8;--remi-void:#070e1c;--remi-void-3:#17243f;--remi-on-void-2:#a9b6c9;--remi-rail-g:#8fa0b8;--remi-cyan:#4cc9f0;
  --remi-gut:32px;
  font-family:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  font-size:16px;line-height:1.6;letter-spacing:normal;font-weight:400;color:var(--remi-ink);text-align:left;
}
.remi-bar *,.remi-drawer *,.remi-rail *,.remi-bar,.remi-drawer,.remi-rail {box-sizing:border-box}
.remi-bar {background:var(--remi-paper);border-bottom:1px solid var(--remi-line);position:sticky;top:0;z-index:30;min-height:69px}
.remi-bar-in {max-width:1280px;margin:0 auto;padding:0 var(--remi-gut);display:flex;align-items:center;flex-wrap:wrap;gap:20px;min-height:68px}
.remi-logo {display:block;flex:none}
.remi-logo img {display:block;height:60px;width:auto;max-width:none;margin:0 -10px 0 -12px}
.remi-bar a,.remi-drawer a,.remi-rail a {text-decoration:none}
.remi-sitenav {display:flex;gap:30px;align-self:stretch;align-items:stretch;overflow-x:auto;scrollbar-width:none;min-width:0}
.remi-sitenav a {position:relative;display:flex;align-items:center;gap:8px;color:var(--remi-ink);font-size:16px;font-weight:550;white-space:nowrap}
.remi-sitenav a:hover {color:var(--remi-go)}
.remi-sitenav a[aria-current] {font-weight:700}
.remi-sitenav .ind {position:absolute;left:0;right:0;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--remi-go);display:none}
.remi-sitenav a[aria-current] .ind {display:block}
.remi-bar[data-remi-site="open"] .remi-sitenav a {font-size:17px}
.remi-ic {width:18px;height:18px;flex:none}
.remi-sitenav .remi-ic {color:var(--remi-go)}
.remi-switch {margin-left:auto;flex:none;display:inline-flex;gap:0;align-items:center}
.remi-switch a,.remi-bar .remi-menu-btn,.remi-bar .book-toc-btn,.remi-bar .slide-toggle {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;height:43px;padding:0 16px;border:1px solid var(--remi-line-2);border-radius:9999px;
  background:transparent;color:var(--remi-ink);font:600 16px/1.6 "Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  letter-spacing:normal;white-space:nowrap;cursor:pointer;flex:none;margin:0;box-shadow:none;
}
.remi-switch a:first-child {border-radius:9999px 0 0 9999px}
.remi-switch a:last-child {border-radius:0 9999px 9999px 0}
.remi-switch a[aria-current] {background:var(--remi-ink);border-color:transparent;color:#fff}
.remi-bar .remi-menu-btn {display:none;gap:12px}
.remi-menu-btn span,.book-toc-btn span {line-height:normal}
.remi-book {font-weight:650;font-size:17px;line-height:1.6;color:var(--remi-ink);padding-left:20px;border-left:1px solid var(--remi-line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.remi-bar .slide-toggle {margin-left:auto}
.remi-bar[data-remi-site="book"] .slide-toggle ~ .remi-switch {margin-left:0}
.remi-bar .book-toc-btn {display:none;width:92px;gap:12px}
/* Lab notebooks have no contents column at any width (look owner D:ceb8c9). */
html[data-course-kind="lab"] .remi-bar .book-toc-btn {display:inline-flex}
.remi-bar[data-remi-site="book"] .remi-bar-in {flex-wrap:nowrap}
.remi-drawer[hidden] {display:none}
.remi-drawer {position:fixed;inset:0;z-index:100;background:rgb(0 0 0 / .5)}
.remi-drawer-panel {width:min(360px,88vw);height:100%;overflow-y:auto;background:var(--remi-paper);padding:24px;box-shadow:0 0 30px rgb(0 0 0 / .2)}
.remi-drawer-heading {display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.remi-drawer-heading h2 {font-size:20px;font-weight:600;line-height:1.6;margin:0}
.remi-drawer-close {border:0;background:transparent;color:var(--remi-ink);font:inherit;font-size:28px;cursor:pointer;padding:0 8px}
.remi-drawer-menu a,.remi-drawer-switch a {display:flex;align-items:center;gap:8px;padding:12px 4px;border-bottom:1px solid var(--remi-line);color:var(--remi-ink);font-size:17px}
.remi-drawer-menu a[aria-current],.remi-drawer-switch a[aria-current] {font-weight:700;color:var(--remi-go-2);box-shadow:inset 3px 0 0 var(--remi-go);padding-left:14px}
.remi-drawer-menu .ind {display:none}
.remi-drawer-label,.remi-drawer-menu .remi-rail-label {margin:18px 0 2px;font-weight:700;color:var(--remi-ink-2);font-size:15px}
.remi-drawer-switch {margin-top:8px}
.remi-drawer-open {overflow:hidden}
.remi-bar :focus-visible,.remi-drawer :focus-visible {outline:2px solid var(--remi-go);outline-offset:3px}
/* A menu link is as tall as its row, which scrolls sideways and clips anything outside it: its ring goes inside. */
.remi-sitenav a:focus-visible {outline-offset:-4px}
.remi-rail {width:256px;flex:none;background:var(--remi-void);min-height:calc(100vh - 69px)}
.remi-rail > .remi-rail-in {padding:20px 0 40px}
.remi-rail > .remi-rail-in {position:sticky;top:69px;max-height:calc(100vh - 69px);overflow:auto}
.remi-rail a {position:relative;display:flex;align-items:center;gap:8px;padding:7px 20px 7px 26px;color:var(--remi-on-void-2);transition:color .15s,background-color .15s}
.remi-rail a:hover {color:#fff;background:var(--remi-void-3)}
.remi-rail a[aria-current] {color:#fff;font-weight:650;background:var(--remi-void-3)}
.remi-rail .ind {position:absolute;left:0;top:5px;bottom:5px;width:3px;border-radius:0 3px 3px 0;background:var(--remi-cyan);display:none}
.remi-rail a[aria-current] .ind {display:block}
.remi-rail .remi-rail-top {font-weight:650;font-size:17px}
.remi-rail .remi-rail-label {margin-top:22px;padding:0 20px 6px 26px;font-size:15px;font-weight:700;color:var(--remi-rail-g)}
.remi-rail summary,.remi-drawer-menu summary {cursor:pointer}
.remi-rail-end {margin-top:22px}
.remi-rail :focus-visible {outline:2px solid #ffb547;outline-offset:-2px}
@media(min-width:1120px) {
  .remi-sitenav {margin-left:28px;height:68px}
  .remi-bar[data-remi-site="open"] .remi-sitenav {gap:36px}
}
@media(max-width:1119px) {
  .remi-bar[data-remi-site="book"] .remi-bar-in:has([data-remi-book-menu]) {flex-wrap:wrap}
  .remi-sitenav {order:9;flex:0 0 calc(100% + 2 * var(--remi-gut));margin:0 calc(-1 * var(--remi-gut));padding:0 var(--remi-gut);border-top:1px solid var(--remi-line);height:52px}
}
@media(max-width:1080px) {
  .remi-bar .book-toc-btn {display:inline-flex}
}
/* Grader work pages opt into the narrow Labs rail form at every width (D:045655). */
html[data-remi-rail-mode="drawer"] .remi-rail {display:none}
html[data-remi-rail-mode="drawer"] .remi-bar[data-remi-site="labs"] .remi-menu-btn {display:inline-flex}
@media(max-width:1024px) {
  .remi-bar[data-remi-site="labs"] .remi-menu-btn {display:inline-flex}
  .remi-rail {display:none}
}
@media(max-width:839px) {
  .remi-bar[data-remi-site="book"]:has([data-remi-book-menu]) .slide-toggle {display:none}
  .remi-bar[data-remi-site="book"]:has([data-remi-book-menu]) .remi-switch {margin-left:auto}
}
@media(max-width:760px) {
  .remi-bar,.remi-drawer {--remi-gut:16px}
  .remi-bar {min-height:57px}
  .remi-bar-in {min-height:56px;gap:12px;column-gap:20px}
  .remi-logo img {height:48px;margin:0 -8px 0 -10px}
  .remi-switch {display:none}
  .remi-bar .remi-menu-btn {display:inline-flex;margin-left:auto}
  .remi-book {padding-left:12px;font-size:16px;flex:1;min-width:0}
  .remi-bar .slide-toggle {display:none}
  /* Phones: one header row; the site menu is in the 메뉴 drawer (lab-web-design §3: two rows above the title). */
  .remi-bar[data-remi-site="home"] .remi-sitenav,.remi-bar[data-remi-site="book"] .remi-sitenav,.remi-bar[data-remi-site="open"] .remi-sitenav {display:none}
  .remi-sitenav {height:48px;gap:22px}
  .remi-bar[data-remi-site="open"] .remi-sitenav a {font-size:16px}
  .remi-sitenav .remi-ic {display:none}
}
@media(prefers-reduced-motion:reduce) {.remi-rail a {transition:none}}
