:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --ink: #192e28;
  --muted: #4b5c54;
  --line: #d4d9cf;
  --green: #203e32;
  --white: #fffefa;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #97532b;
  outline-offset: 4px;
}
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.topbar, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar { min-height: 74px; }
.topbar a { text-decoration: none; font-weight: 650; }
.topbar a:hover { text-decoration: underline; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.12rem; }
.logo { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--green); color: #e3edbc; }
.skip { position: absolute; inset: .5rem auto auto .5rem; padding: .6rem; background: white; transform: translateY(-150%); z-index: 2; }
.skip:focus { transform: none; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  padding: clamp(2rem, 6vw, 4.8rem);
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--green);
  color: #fffdf3;
}
.eyebrow { margin: 0 0 .8rem; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: #dce9ae; }
h1, h2, h3 { margin: 0; }
.hero h1, .subject-hero h1, h2 { font-family: Georgia, serif; letter-spacing: -.045em; }
.hero h1 { font-size: clamp(3.2rem, 7vw, 6.25rem); line-height: .98; }
.hero em { color: #e4eeb2; font-weight: inherit; }
.hero-copy > p:not(.eyebrow) { max-width: 35ch; color: #e0e9e2; line-height: 1.65; }
.button { display: inline-flex; align-items: center; gap: .85rem; padding: .8rem 1.1rem; border-radius: .55rem; background: #e4eeb2; color: #213b30; font-weight: 750; text-decoration: none; }
.button:hover { background: #f2f7da; text-decoration: underline; }
.hero-art { position: relative; min-height: 275px; display: grid; place-items: center; }
.sheet { position: absolute; width: min(205px, 75%); height: 250px; border-radius: .65rem; }
.sheet-back { background: #9bb39b; transform: rotate(13deg) translate(14px, -5px); }
.sheet-front { display: flex; flex-direction: column; padding: 1.35rem; gap: .7rem; color: var(--ink); background: #f6efd8; transform: rotate(-9deg) translateX(-18px); box-shadow: 0 10px 35px #132c2745; }
.sheet-front span { font-size: .68rem; letter-spacing: .12em; font-weight: 850; }
.sheet-front b { font-size: 4.4rem; line-height: 1; color: #486e57; }
.sheet-front i { height: 1px; background: #a4b3a3; width: 85%; }
.sheet-front i:last-child { width: 55%; }
.sticker { position: absolute; right: 2%; bottom: 4%; display: grid; place-content: center; width: 92px; height: 92px; text-align: center; border-radius: 50%; transform: rotate(12deg); background: #f6bb83; color: var(--ink); font: bold 2.25rem/.78 Georgia, serif; }
.sticker small { font: 800 .57rem/1.4 system-ui, sans-serif; letter-spacing: .09em; }
.directory { margin-block: 3.5rem 4rem; scroll-margin: 1.5rem; }
.section-top { display: flex; align-items: end; justify-content: space-between; gap: .75rem; margin-bottom: 1.35rem; }
h2 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.06; }
.count, .code { border: 1px solid var(--line); border-radius: 2rem; padding: .3rem .6rem; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: .75rem; margin-bottom: 1.1rem; }
.filters label { display: grid; gap: .35rem; font-size: .8rem; font-weight: 700; }
input, select { width: 100%; min-width: 0; font: inherit; font-weight: 450; color: inherit; background: var(--white); border: 1px solid var(--line); border-radius: .55rem; padding: .75rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; padding: 0; list-style: none; }
.card { display: flex; background: var(--white); border: 1px solid var(--line); border-radius: .9rem; }
.card a { display: flex; flex: 1; flex-direction: column; align-items: start; padding: 1.2rem; border-radius: inherit; text-decoration: none; }
.card a:hover { box-shadow: 0 5px 20px #203e321a; }
.card a:hover .card-link { text-decoration: underline; }
.card-top { display: flex; align-items: start; justify-content: space-between; width: 100%; margin-bottom: 1rem; }
.technology { --tint: #e6e4f8; }
.science { --tint: #deecd7; }
.humanities { --tint: #f6e4cf; }
.business { --tint: #f5e4e8; }
.symbol { display: grid; place-items: center; min-width: 2.8rem; height: 2.8rem; padding: .3rem; border-radius: .65rem; background: var(--tint); color: var(--ink); font: bold 1.35rem Georgia, serif; }
.card h3 { font-size: 1.16rem; line-height: 1.25; }
.card p { margin: .55rem 0 1rem; color: var(--muted); line-height: 1.5; }
.card-link { margin-top: auto; font-size: .85rem; font-weight: 750; }
.footer { border-top: 1px solid var(--line); padding-block: 1.3rem; color: var(--muted); font-size: .85rem; }
.back { display: inline-block; margin-block: 1.5rem 1rem; font-weight: 700; }
.subject-hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: clamp(1.4rem, 5vw, 3.4rem); background: var(--tint); border-radius: 1.25rem; }
.subject-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: .99; overflow-wrap: anywhere; }
.subject-hero p:last-child { margin-bottom: 0; line-height: 1.55; }
.subject-hero .symbol { background: #fffefa9c; width: 4.3rem; height: 4.3rem; flex: 0 0 4.3rem; font-size: 1.8rem; }
.study-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: clamp(1rem, 5vw, 3.5rem); margin-block: 2.4rem 3rem; }
.contents { position: sticky; top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; }
.contents ol { padding-left: 1.2rem; line-height: 1.6; }
.contents > a { font-size: .85rem; }
.study > p, .topic p { color: var(--muted); line-height: 1.65; }
.topic { margin-top: 1rem; padding: clamp(1rem, 4vw, 1.7rem); border: 1px solid var(--line); border-radius: .9rem; background: var(--white); scroll-margin: 1rem; }
.topic h3 { font-size: 1.4rem; }
.practice { padding: 1rem; background: #edf2e7; border-radius: .55rem; }
.practice p { margin: .35rem 0 .6rem; }
details p { margin: .55rem 0 0 !important; }
summary { cursor: pointer; font-weight: 700; width: fit-content; }
.next { margin-top: 1.4rem; }
@media (max-width: 850px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 2.5rem; }
  .sticker { right: -3%; }
}
@media (max-width: 630px) {
  .wrap { width: calc(100% - 28px); }
  .hero { display: block; padding: 1.8rem 1.25rem; margin-top: 1rem; }
  .hero-art, .subject-hero .symbol { display: none; }
  .study-layout { grid-template-columns: 1fr; }
  .contents { position: static; }
  .footer { align-items: start; flex-direction: column; }
}
@media (max-width: 430px) {
  .grid, .filters { grid-template-columns: 1fr; }
  .topbar > a:last-child { font-size: .82rem; }
}
