:root {
  --ink: #10274b;
  --blue: #2347a6;
  --blue-hover: #173582;
  --light: #edf4ff;
  --line: #d9e3f1;
  --muted: #475a75;
  --yellow: #ffd260;
  --paper: #fbf7ee;
  --white: #fff;
  --radius: 1.125rem;
  --type-body: 1.0625rem;
  --type-note: .875rem;
  --type-section: clamp(1.8rem, 3.6vw, 2.65rem);
  --type-subsection: clamp(1.375rem, 2.2vw, 1.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-block: 6.5rem 5rem; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font: var(--type-body)/1.8 "Hiragino Sans", "Yu Gothic", YuGothic, "Meiryo", system-ui, sans-serif;
  overflow-wrap: anywhere;
}
main:focus { outline: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.42; font-weight: 800; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--blue); }
address { font-style: normal; }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: .1875rem solid #b64120;
  outline-offset: .25rem;
}
.container { width: min(72rem, calc(100% - clamp(2.5rem, 8vw, 7rem))); margin-inline: auto; }
.skip {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 50;
  padding: .75rem 1rem;
  background: var(--white);
  transform: translateY(-175%);
}
.skip:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: 10.25rem; }
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2vw, 1.85rem);
  font-size: .875rem;
  font-weight: 700;
}
.main-nav a:not(.button) { padding-block: .6rem; text-decoration: none; }
.main-nav a:not(.button):hover { text-decoration: underline; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .75rem 1.35rem;
  border: 1px solid var(--blue);
  border-radius: .625rem;
  background: var(--blue);
  color: var(--white);
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: var(--blue-hover); color: var(--white); }
.button.outline { background: var(--white); color: var(--blue); }
.button.outline:hover { background: var(--light); }
.button.small { min-height: 2.75rem; padding: .625rem .95rem; font-size: .875rem; }
.menu-toggle {
  display: none;
  min-height: 2.75rem;
  padding: .35rem .8rem;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: .5rem;
  cursor: pointer;
}
.text-link { color: var(--blue); font-weight: 700; }

.hero { background: var(--paper); padding-block: clamp(2.5rem, 5.15vw, 5.25rem) 1.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5.25rem);
}
.section-label {
  color: var(--blue);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .075em;
}
.hero-kicker {
  color: var(--blue);
  font-size: clamp(1.25rem, 2.1vw, 1.625rem);
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .025em;
  text-wrap: balance;
}
#about .split-heading .section-label {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.35;
}
.hero h1 {
  margin: 1rem 0 1.2rem;
  font-size: clamp(2.5rem, 5.15vw, 4.875rem);
  line-height: 1.26;
  letter-spacing: .01em;
}
.hero h1 span {
  background: linear-gradient(transparent 74%, var(--yellow) 74%, var(--yellow) 94%, transparent 94%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero-lead { max-width: 29em; font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); }
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  margin-top: 1.65rem;
}
.hero-actions > .text-link { padding-block: .55rem; }
.hero-photo {
  width: 100%;
  aspect-ratio: 1.23;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center 46%;
}
.hero-meta {
  display: grid;
  grid-template-columns: 1fr .75fr 1.25fr 1fr;
  margin: clamp(2rem, 4.8vw, 4rem) 0 0;
  border: 1px solid #e5dece;
  border-radius: .75rem;
  background: var(--white);
}
.hero-meta > div {
  display: flex;
  align-items: baseline;
  gap: .5rem 1rem;
  flex-wrap: wrap;
  padding: .95rem clamp(.8rem, 2vw, 1.6rem);
}
.hero-meta > div + div { border-left: 1px solid #e5dece; }
.hero-meta dt { color: var(--muted); font-size: .875rem; font-weight: 700; }
.hero-meta dd { margin: 0; font-weight: 800; }
.hero-meta dd span { margin-left: .25em; font-weight: 500; font-size: .875rem; }

.section { padding-block: clamp(3rem, 6.7vw, 6rem); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem 2rem;
  margin-bottom: clamp(1.3rem, 3.4vw, 2.35rem);
}
.section-heading h2, .cta-section h2, .teacher h2 { font-size: var(--type-section); }
.section-heading > p { color: var(--muted); }
.split-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 1rem clamp(1.5rem, 5vw, 5.25rem);
}
.section-label + h2 { margin-top: .4rem; }

.learning-grid, .class-overview, .members-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}
.learning-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.learning-card img {
  width: 100%;
  aspect-ratio: 2.15;
  object-fit: cover;
  object-position: 50% 45%;
}
.learning-copy { padding: clamp(1.15rem, 3vw, 1.85rem); }
.learning-copy .section-label { font-size: clamp(1.375rem, 2.15vw, 1.625rem); line-height: 1.35; }
.learning-copy h3 { margin: .3rem 0 .65rem; font-size: var(--type-subsection); }

.teacher-section { padding-bottom: clamp(3rem, 6.7vw, 6rem); }
.teacher {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  align-items: center;
  gap: 1rem clamp(1.5rem, 5vw, 4.5rem);
  padding: clamp(1.45rem, 4.25vw, 3.4rem);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
}
.teacher .section-label { color: var(--yellow); }

.soft { background: var(--light); }
.facts, .price-breakdown { margin: 0; }
.facts > div {
  display: grid;
  grid-template-columns: minmax(3.5rem, .35fr) minmax(0, 1fr);
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  gap: .75rem;
}
.facts dt { color: var(--muted); font-size: .875rem; font-weight: 700; }
.facts dd, .price-breakdown dd { margin: 0; font-weight: 750; }
.facts dd small { display: block; font-size: .875rem; font-weight: 500; }
.facts .text-link { display: inline-block; margin-top: .35rem; font-size: .875rem; }
.price-panel, .access-card, .member-card {
  padding: clamp(1.35rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.monthly-fee {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .9rem;
  margin-bottom: .7rem;
  font-size: 1.25rem;
}
.monthly-fee .price { white-space: nowrap; color: var(--blue); font-size: clamp(2.3rem, 4.2vw, 3.45rem); font-weight: 850; line-height: 1.25; }
.monthly-fee .price small { margin-inline-start: .2em; font-size: 1rem; font-weight: 700; }
.price-breakdown {
  padding-block: .45rem;
  border-block: 1px solid var(--line);
}
.price-breakdown div { display: flex; justify-content: space-between; gap: .7rem; padding: .3rem 0; }
.price-breakdown dt small { display: block; margin-top: .1rem; color: var(--muted); font-size: .875rem; }
.price-breakdown dd { flex: none; white-space: nowrap; }
.fineprint { margin-top: .8rem; color: var(--muted); font-size: var(--type-note); }
.price-panel .text-link { display: inline-flex; margin-top: .7rem; font-size: .875rem; }

.next-lesson {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: .65rem 1.5rem;
  padding: clamp(1rem, 3vw, 1.7rem);
  background: var(--paper);
  border: 1px solid #e5dece;
  border-radius: .8rem;
}
.next-lesson time { color: var(--ink); font-size: clamp(1.75rem, 4.5vw, 2.65rem); font-weight: 850; line-height: 1.35; }
.lesson-time { display: inline-block; margin-left: .7rem; font-weight: 700; }
.later-lessons { color: var(--muted); font-size: .875rem; }
.later-lessons span { display: block; color: var(--ink); font-weight: 700; }
.schedule-ended { margin-bottom: 1rem; }
.schedule-ended a { color: var(--blue); }
.schedule-details { margin-top: 1rem; border-block: 1px solid var(--line); }
.schedule-details summary { padding: .9rem .35rem; color: var(--blue); font-weight: 750; cursor: pointer; }
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  padding-bottom: 1rem;
}
.month { padding: .7rem .85rem; border: 1px solid var(--line); border-radius: .5rem; }
.month h3 { font-size: .875rem; color: var(--muted); }
.month p { font-weight: 750; }
.month.current { background: var(--paper); border-color: #a77b16; }

.access-card h3, .member-card h2 { font-size: var(--type-subsection); margin-bottom: .6rem; }
.access-card address { font-weight: 650; }
.access-card p { margin-top: .8rem; }
.access-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.15rem; }
.school-resources { padding-block: clamp(1.75rem, 4vw, 3rem); }
.school-resources .section-heading { margin-bottom: .7rem; }
.links-list { list-style: none; margin: 0; padding: 0; }
.links-list a {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding-block: .75rem;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
  text-decoration: none;
}
.resource-copy { min-width: 0; overflow-wrap: anywhere; }
.resource-copy small { display: block; margin-top: .125rem; }
.resource-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  border-radius: .7rem;
  color: white;
}
.resource-icon svg { width: 1.5rem; height: 1.5rem; }
.resource-instagram { background: #9c2868; }
.resource-facebook { background: #1261ca; }
.resource-threads { background: #101114; }
.resource-mathnavi { background: #fff; border: 1px solid var(--line); }
.resource-mathnavi > span { width: 1.875rem; height: 1.875rem; overflow: hidden; }
.resource-mathnavi img { height: 100%; width: auto; max-width: none; }
.links-list a:hover { text-decoration: underline; }
.links-list small { color: var(--muted); font-size: .875rem; font-weight: 500; }
.cta-section { padding-block: clamp(2.3rem, 5.3vw, 4.25rem); background: var(--yellow); }
.cta-section .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.15rem 1.8rem; }
.cta-section p { margin-top: .55rem; }

.site-footer { padding: 2.85rem 0 1.25rem; background: var(--ink); color: var(--white); }
.site-footer a:hover { color: var(--yellow); }
.footer-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.5rem; }
.footer-grid address { margin-top: .9rem; color: #e0e9f6; font-size: .875rem; }
.footer-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: .85rem 1.25rem;
  align-items: start;
  max-width: 28rem;
  color: #e0e9f6;
  font-size: .9375rem;
}
.footer-link-heading { margin: 0 0 .4rem; color: var(--white); font-size: 1rem; font-weight: 750; }
.footer-link-group ul { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding-block: .32rem; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { text-decoration: underline; }
.footer-mathnavi {
  display: flex;
  align-items: center;
  gap: .8rem;
  max-width: 28rem;
  margin-top: 1.15rem;
  padding: .65rem .8rem;
  border: 1px solid #8194b4;
  border-inline-start: .25rem solid var(--yellow);
  border-radius: .65rem;
  background: #213550;
  color: var(--white);
  text-decoration: none;
}
.site-footer .footer-mathnavi:hover { color: var(--white); background: #2b4567; }
.footer-mathnavi:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.footer-mathnavi:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.footer-mathnavi-copy { display: grid; gap: .1rem; line-height: 1.4; }
.footer-mathnavi-copy span { font-size: .875rem; color: #e0e9f6; }
.footer-mathnavi-copy strong { font-size: 1.05rem; }
.copyright { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #425574; font-size: .8125rem; color: #e0e9f6; }
.mobile-cta { display: none; }

.page-heading { background: var(--paper); padding: clamp(1.7rem, 4vw, 3.5rem) 0; }
.page-heading h1 { margin: .6rem 0; font-size: clamp(1.9rem, 4.5vw, 3.3rem); }
.page-heading p { color: var(--muted); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .25rem .4rem; color: var(--muted); font-size: .875rem; }
.member-card { background: var(--light); }
.member-card .button { margin-top: 1rem; }
.member-link { margin-top: 1.5rem; }
.prose { max-width: 53rem; }
.terms-copy { white-space: pre-wrap; line-height: 2.05; }

@media (max-width: 850px) {
  html { scroll-padding-top: 5.25rem; }
  .header-inner { min-height: 4.25rem; flex-wrap: wrap; gap: .5rem; padding-block: .5rem; }
  .brand img { width: 9rem; }
  .main-nav { flex-wrap: wrap; }
  .menu-ready .menu-toggle { display: block; }
  .menu-ready .main-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    max-height: calc(100dvh - 4.25rem);
    overflow: auto;
    padding: .75rem 1.25rem 1.25rem;
    background: var(--white);
    box-shadow: 0 .85rem 1.25rem #10274b18;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
  }
  .menu-ready .main-nav.open { display: flex; }
  .main-nav a:not(.button) { min-height: 2.75rem; }
  .wide-only { display: none; }
}

@media (max-width: 700px) {
  .hero { padding-block: 1.8rem 1.2rem; }
  .hero-grid, .split-heading, .teacher, .class-overview, .members-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 3.8rem); margin: .6rem 0 .8rem; }
  .hero-actions { margin-top: 1rem; }
  .hero-photo { aspect-ratio: 1.52; }
  .hero-meta { grid-template-columns: minmax(0, 1fr); margin-top: 1.4rem; }
  .hero-meta > div { padding: .5rem .8rem; }
  .hero-meta > div + div { border-left: 0; border-top: 1px solid #e5dece; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .class-overview { gap: 1.5rem; }
  .schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .has-mobile-cta .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .mobile-cta {
    display: block;
    position: fixed;
    inset: auto 0 0;
    z-index: 15;
    padding: .45rem 1.25rem calc(.45rem + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--line);
  }
  .mobile-cta .button { width: 100%; min-height: 2.75rem; padding: .45rem .75rem; }
}

@media (max-width: 500px) {
  .learning-grid { grid-template-columns: minmax(0, 1fr); }
  .learning-card img { aspect-ratio: 1.9; }
  .footer-links { gap: .7rem; }
}

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

.is-trial .trial-section {
  padding-block: clamp(36px, 5vw, 66px);
}

.is-trial .trial-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--light);
}

.is-trial .trial-section h2 {
  margin: 0 0 12px;
  font-size: var(--type-subsection);
  line-height: 1.5;
}

.is-trial .trial-intro > p:not(.fineprint) {
  margin: 0 0 22px;
}

.is-trial .trial-button {
  max-width: 100%;
  text-align: center;
}

.is-trial .trial-form-note {
  margin-top: 8px;
}

.is-trial .trial-facts {
  margin: 0;
}

.is-trial .trial-facts > div {
  display: grid;
  grid-template-columns: 5.2em minmax(0, 1fr);
  gap: 10px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}

.is-trial .trial-facts > div:first-child {
  padding-top: 0;
}

.is-trial .trial-facts dt,
.is-trial .trial-facts dd {
  margin: 0;
}

.is-trial .trial-facts dt,
.is-trial .trial-facts dd span {
  font-size: 0.875rem;
}

.is-trial .trial-facts dd {
  font-weight: 700;
}

.is-trial .trial-facts dd span {
  display: block;
  font-weight: 400;
}

.is-trial .trial-links,
.is-trial .trial-contact-links {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.is-trial .trial-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 18px;
}

.is-trial .trial-links a,
.is-trial .trial-contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.is-trial .trial-flow {
  padding-top: 0;
}

.is-trial .trial-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin: 22px 0 0;
  padding: 0;
  list-style-position: inside;
}

.is-trial .trial-steps li {
  padding: 18px 16px 8px 0;
  border-top: 2px solid var(--line);
}

.is-trial .trial-steps li::marker {
  color: var(--blue);
  font-weight: 700;
}

.is-trial .trial-steps h3 {
  display: inline;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.is-trial .trial-steps p {
  margin: 8px 0 0;
}

.is-trial .trial-schedule .container { max-width: 52rem; }
.is-trial .trial-schedule .section-heading { margin-bottom: .6rem; }
.trial-schedule-guide { margin: 0 0 1.1rem; }
.is-trial .trial-application { background: var(--light); }
.trial-application-inner { max-width: 52rem; min-width: 0; }
.trial-application-heading { margin: 0 auto 1.2rem; max-width: 44rem; }
.trial-application-heading p { margin: .25rem 0 .45rem; }
.trial-form-external { display: inline-block; padding: .3rem 0; color: var(--blue); font-weight: 700; text-underline-offset: .2em; }
.trial-form-frame { display: block; width: 100%; max-width: 44rem; height: 2296px; margin: 0 auto; border: 0; border-radius: .75rem; background: var(--white); }
@media (max-width: 550px) {
  .trial-form-frame { height: 2400px; }
}

.is-trial .trial-secondary {
  background: var(--light);
}

.is-trial .trial-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.5vw, 28px);
  align-items: stretch;
}

.is-trial .trial-card {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.is-trial .trial-card h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.is-trial .trial-card p {
  margin: 0 0 16px;
}

.is-trial .trial-contact-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .is-trial .trial-panel,
  .is-trial .trial-steps,
  .is-trial .trial-secondary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .is-trial .trial-intro .trial-button {
    width: 100%;
    padding-inline: 14px;
  }

  .is-trial .trial-facts > div {
    grid-template-columns: 4.4em minmax(0, 1fr);
  }

  .is-trial .trial-steps {
    gap: 12px;
  }
}

.is-trial .trial-card .trial-secondary-note { margin: .6rem 0 0; }

@media (max-width: 400px) {
  .is-trial .page-heading h1 { font-size: clamp(1.625rem, 7vw, 1.9rem); }
}

/* Optional analytics, without obstructing navigation or the trial form. */
.analytics-notice { background: #edf4ff; color: #10274b; }
.analytics-notice[hidden], .analytics-settings[hidden] { display: none; }
.analytics-notice-inner { padding-block: 0.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1.3rem; }
.analytics-notice p { margin: 0; flex: 1 1 24rem; font-size: 0.95rem; }
.analytics-notice p a { color: inherit; text-decoration: underline; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.analytics-actions button { font: inherit; font-size: 0.95rem; min-height: 44px; border: 1px solid #10274b; border-radius: 0.5rem; padding-inline: 0.75rem; color: #10274b; background: #fff; cursor: pointer; }
.analytics-actions #analytics-allow { background: #10274b; color: #fff; }
.analytics-settings { font: inherit; font-size: 0.95rem; border: 0; color: inherit; background: none; padding: 0.35rem 0.5rem; text-decoration: underline; cursor: pointer; }
