* { box-sizing: border-box; }

:root {
  color-scheme: light;
  --paper: #f7f5ed;
  --card: #fffef9;
  --ink: #19362b;
  --muted: #57665b;
  --line: #dddccf;
  --green: #174536;
  --wash: #e9eee5;
  --shadow: 0 2px 7px rgb(32 48 35 / 5%);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 system-ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

#library { max-width: 1240px; margin: 0 auto; padding: 8px 24px 36px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button, input, select { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, b { letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid #966724; outline-offset: 4px; }

.edu643-sr, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: absolute; top: 8px; z-index: 5; padding: 8px 14px; background: white; }

.home-brand-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  min-height: 64px;
  padding-inline: 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #cdd8ce;
  border-radius: 9px;
  background: var(--wash);
  color: var(--green);
}
.home-logo { display: inline-flex; align-items: center; gap: 9px; width: fit-content; }
.home-logo svg { width: 31px; height: 31px; color: var(--green); }
.home-logo strong { display: block; font-size: 19px; line-height: 1.18; letter-spacing: -.055em; }
.home-logo .english { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 650; }
.tagline { display: none; }

.home-nav { display: flex; justify-content: flex-end; align-items: center; gap: clamp(10px, 1.4vw, 19px); font-size: 15px; font-weight: 650; }
.home-nav > a, .home-nav > details > summary { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }
.home-nav [aria-current="page"] { color: var(--green); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.home-nav > details > summary { list-style: none; gap: 5px; }
.home-nav > details > summary::-webkit-details-marker { display: none; }
.home-nav > details > summary::after { content: "⌄"; color: var(--muted); }
.home-nav > details[open] > summary::after { content: "⌃"; }
.fly {
  position: absolute;
  inset-block-start: calc(100% - 5px);
  inset-inline-end: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(540px, 100%);
  max-height: 65vh;
  overflow: auto;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 11px;
  box-shadow: 0 12px 25px rgb(25 54 43 / 13%);
}
.fly > div { padding: 3px 0; border-top: 1px solid var(--line); }
.fly a { display: flex; align-items: center; min-height: 44px; padding: 5px 7px; }
.fly a:hover, .home-nav > a:hover { text-decoration: underline; text-underline-offset: 3px; }

.home-search { display: flex; align-items: stretch; width: clamp(170px, 19vw, 240px); min-height: 44px; margin: 0; }
.home-search input {
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px 0 0 7px;
  background: var(--card);
  font-size: 14px;
}
.home-search button { min-width: 44px; padding: 0 10px; border: 0; border-radius: 0 7px 7px 0; background: var(--green); color: white; white-space: nowrap; font-size: 14px; font-weight: 700; }

.hero57 { position: relative; }
.home-hero-link {
  display: flex;
  min-height: 110px;
  align-items: center;
  padding: 16px clamp(18px, 3vw, 34px);
  border-radius: 11px;
  color: #fffdf3;
  background:
    repeating-radial-gradient(circle at 90% 138%, transparent 0 29px, rgb(251 239 190 / 13%) 30px, transparent 32px 43px),
    linear-gradient(105deg, #153c2f 0%, #1b4b3b 66%, #25624b 100%);
}
.home-hero-link:hover { filter: brightness(1.045); }
.hero57 h1 { font-size: clamp(30px, 2.5vw, 32px); font-weight: 700; line-height: 1.3; }
.hero57 p { margin-top: 7px; color: #e6ede0; font-size: 15px; word-break: keep-all; }

.edu642-ad {
  display: grid;
  place-items: center;
  min-height: 41px;
  margin: 7px 0 12px;
  border-block: 1px solid #e7e3d7;
  background: #f2f0e6;
  color: #686b5e;
  font-size: 10px;
}
.edu-home-services, .edu-home-recent-grid, .edu-home-tv-grid, .edu65-work-grid, .edu643-shelves {
  display: grid;
  gap: 10px;
}
.edu-home-services, .edu-home-recent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.edu-home-tv-grid, .edu65-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edu643-shelves { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.edu-home-services > a, .edu643-card, .edu-home-recent-grid article, .edu65-work-grid article {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}
.edu-home-services > a:hover, .edu643-card:hover, .edu-home-recent-grid article:hover {
  border-color: #a5b6a5;
  box-shadow: 0 3px 10px rgb(32 48 35 / 10%);
}
.edu-home-services img { display: block; width: 100%; height: clamp(84px, 10vw, 112px); object-fit: cover; border-radius: 8px 8px 0 0; }
.edu-home-services > a:first-child img { object-position: center 54%; }
.edu-home-services > a:nth-child(3) img { object-position: center 47%; }
.edu-home-services > a > span { display: block; padding: 8px 12px; }
.edu-home-services b, .edu643-copy b { display: block; font-weight: 700; line-height: 1.3; }
.edu-home-services b { font-size: 19px; }
.edu-home-services small, .edu643-copy small { display: block; color: var(--muted); font-size: 14px; line-height: 1.46; word-break: keep-all; overflow-wrap: anywhere; margin-top: 4px; }
.edu-home-services .course-note { margin-top: 1px; color: #6c593e; }

.edu-home-shelf-title, .shelf57 h2 { font-size: 22px; line-height: 1.3; }
.edu-home-shelf-title, .shelf57 { margin-top: 20px; }
.edu-home-shelf-title, .shelf57 > h2, .edu-home-section-head { margin-bottom: 8px; }
.edu643-card { display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 64px; }
.edu643-copy { flex: 1; min-width: 0; }
.edu643-copy b { font-size: 17px; }
.edu643-card svg { flex: 0 0 25px; width: 25px; height: 25px; padding: 1px; border-radius: 5px; background: var(--wash); color: var(--green); }
.edu643-arrow { color: #5d745f; font-size: 15px; }
.edu-home-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.edu-home-section-head a { display: inline-flex; align-items: center; min-height: 32px; color: var(--green); font-weight: 650; font-size: 15px; }
.edu-home-section-head a:hover, .edu65-work a:hover { text-decoration: underline; text-underline-offset: 3px; }
.edu-home-recent-grid article a { display: flex; align-items: center; gap: 9px; height: 100%; min-height: 59px; padding: 7px 10px; }
.edu-home-recent-grid img, .edu-home-image-fallback { width: 45px; height: 43px; flex: 0 0 45px; border-radius: 5px; object-fit: cover; }
.edu-home-image-fallback { background: var(--wash); display: grid; place-items: center; }
.edu-home-image-fallback::before { content: "▤"; color: #56725e; font-size: 19px; }
.edu-home-recent-grid h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 16px; font-weight: 700; line-height: 1.4; }
.edu65-work > p { margin: -2px 0 9px; color: var(--muted); font-size: 15px; word-break: keep-all; }
.edu65-work-grid article { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px 4px; }
.edu65-work h3 { font-size: 17px; line-height: 1.3; }
.edu65-work article p { font-size: 14px; color: var(--muted); margin-top: 4px; word-break: keep-all; }
.edu65-work .button { display: inline-flex; align-items: center; min-height: 36px; color: var(--green); font-size: 15px; font-weight: 700; }

@media (max-width: 1000px) {
  .edu643-shelves { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }
}
@media (max-width: 760px) {
  #library { padding-inline: 15px; }
  .home-brand-header { grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; min-height: auto; padding: 7px 9px 1px; margin-bottom: 8px; }
  .home-search { grid-row: 1; grid-column: 2; width: clamp(134px, 45vw, 220px); }
  .home-search input { padding-inline: 8px; }
  .home-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; flex-wrap: wrap; gap: 0 5px; font-size: 14px; }
  .edu-home-services { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 7px; }
  .edu-home-services > a { display: grid; grid-template-columns: clamp(85px, 24vw, 140px) minmax(0, 1fr); align-items: stretch; min-height: 74px; }
  .edu-home-services img { height: 0; min-height: 100%; border-radius: 8px 0 0 8px; }
  .edu-home-services > a > span { align-self: center; padding: 6px 9px; }
  .edu-home-services b { font-size: 17px; }
  .edu643-copy b, .edu65-work h3 { font-size: 16px; }
  .edu-home-recent-grid { grid-template-columns: 1fr; gap: 6px; }
  .edu-home-recent-grid h3 { font-size: 15px; }
  .edu-home-recent-grid article a { min-height: 50px; }
  .edu-home-recent-grid img, .edu-home-image-fallback { height: 36px; }
  .edu-home-shelf-title, .shelf57 { margin-top: 16px; }
  .edu-home-shelf-title, .shelf57 h2 { font-size: 20px; }
  .edu-home-section-head a, .edu65-work .button { min-height: 44px; font-size: 14px; }
  .edu65-work > p { font-size: 14px; }
}
@media (max-width: 545px) {
  .home-logo strong { font-size: 17px; }
  .home-logo svg { width: 26px; height: 26px; }
  .fly { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero-link { min-height: 88px; padding: 11px 15px; }
  .hero57 h1 { font-size: clamp(22px, 5.9vw, 25px); }
  .hero57 p { font-size: 14px; }
  .edu642-ad { min-height: 29px; margin: 6px 0 8px; }
  .edu643-shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .edu643-card { padding: 8px 9px; gap: 6px; }
  .edu-home-tv-grid, .edu65-work-grid { gap: 7px; }
}
