:root {
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --ink: #142238;
  --text: #526075;
  --muted: #6d7b8e;
  --line: #d6e0eb;
  --navy: #12356b;
  --blue: #2b70ef;
  --blue-dark: #1c48b2;
  --max: 1080px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif; line-height: 1.55; }
:focus-visible { outline: 3px solid #efb849; outline-offset: 3px; }

.site-header { height: 68px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); padding: 0 clamp(18px,4vw,48px); }
.brand { display: inline-flex; align-items: center; gap: 11px; line-height: 1.08; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .78rem; letter-spacing: .06em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .64rem; }

main { width: min(90vw,var(--max)); min-height: calc(100vh - 126px); min-height: calc(100dvh - 126px); margin: 0 auto; padding: clamp(48px,9vh,96px) 0 48px; }
.portal-heading > p:first-child { margin: 0 0 .5rem; color: var(--blue-dark); font-size: clamp(.68rem,1vw,.8rem); font-weight: 800; letter-spacing: .08em; }
.portal-heading h1 { margin: 0; font-size: clamp(2.6rem,6vw,5.5rem); line-height: 1; letter-spacing: -.055em; }
.portal-heading > p:last-child { margin: 1rem 0 0; color: var(--text); font-size: clamp(.88rem,1.5vw,1.08rem); }

.material-list { margin-top: clamp(30px,6vh,62px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.material-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 28px; border-left: 5px solid var(--blue); background: var(--surface); padding: clamp(22px,4vw,38px); }
.lesson-label { margin: 0 0 .35rem; color: var(--blue-dark); font-size: .76rem; font-weight: 800; }
.material-card h2 { margin: 0; font-size: clamp(1.55rem,3vw,2.65rem); line-height: 1.1; letter-spacing: -.035em; }
.material-copy > p:last-child { max-width: 40rem; margin: .65rem 0 0; color: var(--text); font-size: clamp(.82rem,1.25vw,1rem); }
.material-card a { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); padding: 0 22px; color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; }
.material-card a:hover { border-color: var(--blue-dark); background: var(--blue-dark); }

footer { min-height: 58px; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .07em; }

@media (max-width: 640px) {
  main { width: min(88vw,var(--max)); padding-top: 42px; }
  .material-card { grid-template-columns: 1fr; gap: 20px; }
  .material-card a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
