/**
 * Pre-high1 winter-school curriculum sheet.
 *
 * The page reuses the brochure blocks of curriculum-middle.css (hero, intro,
 * process strip, pillars, tracks, features, feedback cards, reports, FAQ) and
 * curriculum-high.css (step strip, check cards, hours table). Those blocks read
 * their colors from --cm-* / --hs-* variables, so this file only retints them
 * to the bright personal blue and adds the few blocks that are unique to the
 * winter school (summary numbers, terms, class cards, unit map, 21-session map,
 * weekly roadmap tables, parent checklist, next-step links).
 *
 * Colors: design.json components.curriculumPreHigh1Sheet
 */

/*
 * Match the page-intro banner (and active local-nav label) to the pre-high1 blue.
 * Loaded after curriculum-high.css so this blue replaces the high green banner.
 */
body[data-page="curriculum"] {
  --color-bg-banner: #589ef5; /* design.json curriculumPreHigh1Sheet.accent */
}

.curriculum-sheet--pre-high1 {
  /* Main accent: bright blue replaces middle coral / high green. */
  --cm-coral: #589ef5;
  --cm-coral-soft: #a8cffb;
  /* Pillar discs: deep blue → accent blue → shared charcoal. */
  --cm-teal: #3b7fd6;
  /* Outline colors of the three feature boxes (soft → accent → deep). */
  --cm-feature-yellow: #a8cffb;
  --cm-feature-green: #589ef5;
  --cm-feature-red: #3b7fd6;
  --cm-track: #589ef5;
  --cm-track-on: #ffffff;
  --cm-process: #589ef5;
  --cm-process-soft: #a8cffb;
  --cm-process-border: #d6e9fc;
  --cm-feedback-orange: #589ef5;
  --cm-feedback-header: #ebf4fe;
  --cm-plan-header: #589ef5;
  --cm-week-check: #ebf4fe;
  /* Page-only tokens for the winter-school blocks below. */
  --ph-accent: #589ef5;
  --ph-accent-soft: #a8cffb;
  --ph-accent-deep: #3b7fd6;
  --ph-border: #d6e9fc;
  --ph-header: #ebf4fe;
  --ph-ink: #2a2a2a;
  --ph-muted: #6b6b6b;
  --ph-line: #e8e8e8;
  /* Shared horizontal inset used by the middle/high sheet blocks. */
  --ph-inset: clamp(0.75rem, 2vw, 1.75rem);
}

/* High step strip: blue ring/pin, soft-blue fill on the closing step. */
.curriculum-sheet--pre-high1 .high-steps {
  --hs-ink: #589ef5;
  --hs-accent: #ebf4fe;
  --hs-rail: #d6e9fc;
  --hs-body: #4a82c4;
}

/* ——— Opening journey infographic ——— */
.pre-high1-journey {
  margin: 0 var(--ph-inset) var(--spacing-2xl);
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 20%, rgba(168, 207, 251, 0.34), transparent 24rem),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
  border: 1px solid var(--ph-border);
  border-radius: clamp(1.25rem, 3vw, 2rem);
}

.pre-high1-journey__heading {
  position: relative;
  z-index: 2;
  max-width: 43rem;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 3rem) 0;
}

.pre-high1-journey__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-primary);
  font-size: clamp(0.78rem, 1.2vw, 0.92rem);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  color: var(--ph-accent);
}

.pre-high1-journey__title {
  margin: 0;
  font-family: var(--font-jalnan);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--ph-accent-deep);
  word-break: keep-all;
}

.pre-high1-journey__lead {
  max-width: 38rem;
  margin: 0.75rem 0 0;
  font-family: var(--font-primary);
  font-size: clamp(0.95rem, 1.35vw, 1.08rem);
  font-weight: var(--font-weight-medium);
  line-height: 1.6;
  color: var(--ph-muted);
  word-break: keep-all;
}

/*
 * Mobile uses a vertical route instead of shrinking the winding road. The
 * ordered list stays readable at 360px and its line visually connects all
 * stages from START to GOAL.
 */
.pre-high1-journey__canvas {
  position: relative;
  padding: var(--spacing-xl) clamp(1rem, 4vw, 2rem) var(--spacing-2xl);
}

.pre-high1-journey__road {
  display: none;
}

.pre-high1-journey__stages {
  position: relative;
  display: grid;
  gap: var(--spacing-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pre-high1-journey__stages::before {
  content: "";
  position: absolute;
  top: 1.9rem;
  bottom: 1.9rem;
  left: 1.9rem;
  border-left: 3px dashed var(--ph-accent-soft);
}

/*
 * Per-stage color tokens (design.json → curriculumPreHigh1Sheet.journeyStages).
 * --ph-stage      : icon and road-dot color
 * --ph-stage-soft : pale ring and connector stem
 * --ph-stage-ink  : darker text tone so the title keeps readable contrast
 * --ph-stage-icon : icon file used as a mask so the icon takes --ph-stage
 */
.pre-high1-journey__stage {
  --ph-stage: var(--ph-accent);
  --ph-stage-soft: var(--ph-accent-soft);
  --ph-stage-ink: var(--ph-accent-deep);
  --ph-stage-icon: none;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 3.8rem minmax(0, 1fr);
  gap: var(--spacing-md);
  align-items: center;
  min-width: 0;
  margin: 0;
}

.pre-high1-journey__pin {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 3.8rem;
  height: 3.8rem;
  padding: 0.65rem;
  background: #ffffff;
  border: 4px solid var(--ph-stage-soft);
  border-radius: 50%;
  box-shadow: 0 5px 14px rgba(59, 127, 214, 0.18);
}

/*
 * The blue PNG pixels are pushed out of the image box (clipped), and the same
 * transparent PNG is reused as a mask over a solid stage-colored background.
 * This recolors one shared icon set per stage without extra image files.
 */
.pre-high1-journey__pin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: -9999px 0;
  background: var(--ph-stage);
  -webkit-mask: var(--ph-stage-icon) center / contain no-repeat;
  mask: var(--ph-stage-icon) center / contain no-repeat;
}

.pre-high1-journey__stage--1 {
  --ph-stage: #589ef5;
  --ph-stage-soft: #b5d6fb;
  --ph-stage-ink: #3b7fd6;
  --ph-stage-icon: url("../../assets/images/curriculum/pre-high1-step-concept.png");
}

.pre-high1-journey__stage--2 {
  --ph-stage: #3fb2a6;
  --ph-stage-soft: #ade0da;
  --ph-stage-ink: #2a8c82;
  --ph-stage-icon: url("../../assets/images/curriculum/pre-high1-step-connect.png");
}

/*
 * Stages 3–5 form one "3 classes + 1 complement" bundle, so they share a
 * single bundle color; only the icon differs between them.
 */
.pre-high1-journey__stage--3,
.pre-high1-journey__stage--4,
.pre-high1-journey__stage--5 {
  --ph-stage: #e5a54b;
  --ph-stage-soft: #f5d9ad;
  --ph-stage-ink: #b67a20;
}

.pre-high1-journey__stage--3 {
  --ph-stage-icon: url("../../assets/images/curriculum/pre-high1-step-types.png");
}

.pre-high1-journey__stage--4 {
  --ph-stage-icon: url("../../assets/images/curriculum/pre-high1-step-exam.png");
}

.pre-high1-journey__stage--5 {
  --ph-stage-icon: url("../../assets/images/curriculum/pre-high1-step-connect.png");
}

.pre-high1-journey__stage--6 {
  --ph-stage: #8478d6;
  --ph-stage-soft: #cdc7f1;
  --ph-stage-ink: #6153c0;
  --ph-stage-icon: url("../../assets/images/curriculum/pre-high1-step-exam.png");
}

.pre-high1-journey__card {
  min-width: 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--ph-border);
  border-radius: 1rem;
  box-shadow: 0 7px 20px rgba(59, 127, 214, 0.1);
}

.pre-high1-journey__step {
  display: block;
  margin: 0 0 0.2rem;
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  color: var(--ph-stage-ink);
}

.pre-high1-journey__card h4 {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.35;
  color: var(--ph-stage-ink);
  word-break: keep-all;
}

.pre-high1-journey__card p {
  margin: 0.35rem 0 0;
  font-family: var(--font-primary);
  font-size: clamp(0.88rem, 1.2vw, 0.98rem);
  line-height: 1.5;
  color: var(--ph-muted);
  word-break: keep-all;
}

@media (min-width: 900px) {
  .pre-high1-journey__canvas {
    /*
     * Side gutter matches the heading inset. The road and the stage layer
     * share it, so percentage stage positions stay on the same road curve.
     */
    --ph-journey-gutter: clamp(1.25rem, 4vw, 3rem);
    /* Extra vertical room keeps six readable cards clear of the curved road. */
    height: 40rem;
    padding: 0;
  }

  .pre-high1-journey__road {
    position: absolute;
    inset: 0 var(--ph-journey-gutter);
    display: block;
    width: calc(100% - var(--ph-journey-gutter) * 2);
    height: 100%;
    /*
     * The path starts at x=36 and ends at x=1170 with an 84px round-capped
     * stroke, so both caps extend past the viewBox; let them paint into the gutter.
     */
    overflow: visible;
  }

  .pre-high1-journey__road-edge,
  .pre-high1-journey__road-fill,
  .pre-high1-journey__road-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
  }

  .pre-high1-journey__road-edge {
    stroke: #dce9fc;
    stroke-width: 84;
  }

  .pre-high1-journey__road-fill {
    stroke: #779ff4;
    stroke-width: 68;
  }

  .pre-high1-journey__road-line {
    stroke: rgba(255, 255, 255, 0.68);
    stroke-width: 2;
    stroke-dasharray: 12 12;
  }

  .pre-high1-journey__stages {
    position: absolute;
    inset: 0 var(--ph-journey-gutter);
    display: block;
  }

  .pre-high1-journey__stages::before {
    display: none;
  }

  /*
   * Each stage owns three connected points, matching the reference:
   * road dot → vertical stem → circular icon → short horizontal line → card.
   * --ph-journey-stem and --ph-journey-direction let each node use the open
   * space above or below its road anchor without moving that anchor off-road.
   */
  .pre-high1-journey__stage {
    /* Shared node size: the icon disc diameter and the card height match. */
    --ph-journey-node: 5.25rem;
    --ph-journey-stem: 7rem;
    --ph-journey-direction: -1;
    position: absolute;
    display: block;
    width: 0;
    height: 0;
  }

  /* Small destination dot remains on the center line of the road. */
  .pre-high1-journey__stage::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    box-sizing: border-box;
    width: 1rem;
    height: 1rem;
    background: var(--ph-stage);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--ph-stage-soft);
    transform: translate(-50%, -50%);
  }

  /*
   * Default stem rises from the road; selected stages reverse it below.
   * Uses the soft tint so the stem reads as part of the pale icon ring.
   */
  .pre-high1-journey__stage::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: -2px;
    bottom: 0;
    width: 4px;
    height: var(--ph-journey-stem);
    background: var(--ph-stage-soft);
    border-radius: 999px;
  }

  /*
   * Icon disc: thick pale ring around a white center, drawn above the card so
   * it overlaps the card's leading edge like the reference label.
   */
  .pre-high1-journey__pin {
    position: absolute;
    z-index: 3;
    top: calc(var(--ph-journey-stem) * var(--ph-journey-direction));
    left: 0;
    width: var(--ph-journey-node);
    height: var(--ph-journey-node);
    padding: 1rem;
    background: #ffffff;
    border: 6px solid var(--ph-stage-soft);
    box-shadow: 0 4px 12px rgba(59, 127, 214, 0.16);
    transform: translate(-50%, -50%);
  }

  /*
   * Card starts at the icon center and slides under the disc. The extra
   * leading padding keeps the text clear of the overlapping circle, so the
   * disc and card read as one attached label without a separate leader line.
   */
  .pre-high1-journey__card {
    position: absolute;
    z-index: 2;
    top: calc(var(--ph-journey-stem) * var(--ph-journey-direction));
    left: 0;
    /*
     * Fixed height equal to the disc so top and bottom edges line up exactly;
     * the text block is centered vertically inside that height.
     */
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: baseline;
    width: 16rem;
    height: var(--ph-journey-node);
    padding: 0 0.8rem 0 3.4rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94);
    border: none;
    border-radius: 0.6rem;
    box-shadow: 0 4px 14px rgba(59, 127, 214, 0.08);
    transform: translateY(-50%);
  }

  /* Number and title share one stage-colored heading line ("01. 제목"). */
  .pre-high1-journey__step {
    display: inline;
    margin: 0;
    font-size: 0.92rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0;
    color: var(--ph-stage-ink);
  }

  .pre-high1-journey__card h4 {
    display: inline;
    margin-left: 0.25rem;
    font-size: 0.92rem;
    line-height: 1.3;
    color: var(--ph-stage-ink);
  }

  /* Full-width basis pushes the description onto its own row under the title. */
  .pre-high1-journey__card p {
    flex: 0 0 100%;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ph-muted);
  }

  /* Downward stages reverse only the vertical part of the marker. */
  .pre-high1-journey__stage--2,
  .pre-high1-journey__stage--5,
  .pre-high1-journey__stage--6 {
    --ph-journey-direction: 1;
  }

  .pre-high1-journey__stage--2::after,
  .pre-high1-journey__stage--5::after,
  .pre-high1-journey__stage--6::after {
    top: 0;
    bottom: auto;
  }

  /*
   * The final card faces inward from the right edge, so it is mirrored:
   * it ends at the icon center and reserves the overlap space on the right.
   */
  .pre-high1-journey__stage--4 .pre-high1-journey__card,
  .pre-high1-journey__stage--6 .pre-high1-journey__card {
    right: 0;
    left: auto;
    padding: 0 3.4rem 0 0.8rem;
  }

  /* Wider so the longer goal description stays on two lines like the others. */
  .pre-high1-journey__stage--6 .pre-high1-journey__card {
    width: 18.5rem;
  }

  /* Stage anchors are snapped to the road center line (viewBox x/1200, y/560). */
  .pre-high1-journey__stage--1 {
    top: 83.9%;
    left: 6.3%;
  }

  /* Hangs below the road so it no longer covers its own road dot. */
  .pre-high1-journey__stage--2 {
    --ph-journey-stem: 6rem;
    top: 71.8%;
    left: 31.2%;
  }

  .pre-high1-journey__stage--3 {
    --ph-journey-stem: 5rem;
    top: 31.7%;
    left: 19.5%;
  }

  /*
   * Rises above the road and opens to the left (mirrored like stage 6) so the
   * card stays clear of the stage 5 road dot and the goal card on the right.
   */
  .pre-high1-journey__stage--4 {
    --ph-journey-stem: 7rem;
    top: 55.6%;
    left: 51.2%;
  }

  .pre-high1-journey__stage--5 {
    --ph-journey-stem: 10rem;
    top: 38.4%;
    left: 70.9%;
  }

  /* Shorter stem lifts the goal label closer to the top end of the road. */
  .pre-high1-journey__stage--6 {
    --ph-journey-stem: 4.5rem;
    top: 14%;
    left: 92%;
  }
}

/* High hours table: row headers use the pale blue instead of pale green. */
.curriculum-sheet--pre-high1 .high-hours__table tbody th {
  background: var(--ph-header);
}

/* Check cards sit directly under body copy, so pull them in slightly. */
.curriculum-sheet--pre-high1 .high-body__check {
  min-height: 0;
}

/*
 * The shared sheet only insets copy inside .curriculum-sheet__intro; plan-lead
 * sits directly in the sheet here, so give it the same side inset.
 * Feedback cards now live inside #feedback intro, so middle's intro child
 * inset rule already applies.
 */
.curriculum-sheet--pre-high1 > .curriculum-sheet__plan-lead {
  padding-inline: var(--ph-inset);
}

/*
 * Middle's chevron plate is tall enough to cover the pale header band on each
 * card. Keep the blue stroke, but shrink the plate so it stays in the white
 * body gap between the facing borders.
 */
@media (min-width: 1024px) {
  .curriculum-sheet--pre-high1 .curriculum-sheet__feedback-arrow {
    /* Short enough that the white plate clears the ~3.6rem header band. */
    height: 2.55rem;
    /* Nudge slightly into the white body so the plate does not kiss the header. */
    transform: translateY(0.35rem);
  }

  .curriculum-sheet--pre-high1 .curriculum-sheet__feedback-arrow::after {
    width: 1.55rem;
    height: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 88'%3E%3Cpolyline points='22,10 38,44 22,78' fill='none' stroke='%23589EF5' stroke-width='15' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}

/*
 * Match the high page: leave room under the report closing line before the
 * next section title (parents / next-step blocks that follow).
 */
.curriculum-sheet--pre-high1 > .curriculum-sheet__report-close {
  margin-bottom: var(--spacing-2xl);
}

/* Footnote inside an intro block already inherits the intro side inset. */
.curriculum-sheet__intro > .pre-high1-note {
  margin: var(--spacing-md) var(--ph-inset) 0;
}

/* Small grey footnote under tables and card groups. */
.pre-high1-note {
  margin: 0 var(--ph-inset) var(--spacing-2xl);
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--ph-muted);
  word-break: keep-all;
}

/*
 * Mid-page consultation CTAs — same destination as footer/site "상담신청",
 * placed after purpose, class bands, and report samples.
 */
.pre-high1-mid-cta {
  display: grid;
  gap: var(--spacing-md);
  justify-items: center;
  margin: 0 var(--ph-inset) var(--spacing-2xl);
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(235, 244, 254, 0.95), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--ph-border);
  border-radius: 1.25rem;
}

.pre-high1-mid-cta__text {
  max-width: 36rem;
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  font-weight: var(--font-weight-medium);
  line-height: 1.55;
  color: var(--ph-ink);
  word-break: keep-all;
}

.pre-high1-mid-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
}

.pre-high1-mid-cta__actions .btn {
  min-height: 44px;
}

/* ——— Summary numbers (6 cards) ——— */
.pre-high1-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-sm);
  margin: 0 var(--ph-inset) var(--spacing-md);
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .pre-high1-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-md);
  }
}

.pre-high1-summary__card {
  display: grid;
  align-content: center;
  gap: var(--spacing-xs);
  min-height: 6.5rem;
  margin: 0;
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: center;
  background: #ffffff;
  border: 2px solid var(--ph-accent);
  border-radius: 1.25rem;
  box-sizing: border-box;
}

.pre-high1-summary__value {
  /* Jalnan 2 — the same display face as the sheet hero numbers. */
  font-family: var(--font-jalnan);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ph-accent);
  word-break: keep-all;
}

.pre-high1-summary__label {
  font-family: var(--font-primary);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--ph-muted);
  word-break: keep-all;
}

/* ——— Two terms (1학기 → 2학기) ——— */
.pre-high1-terms {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin: 0 var(--ph-inset) var(--spacing-lg);
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .pre-high1-terms {
    /* Card · arrow · card so the two terms read left to right. */
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
  }
}

.pre-high1-term {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 3px solid var(--ph-accent);
  border-radius: 1.5rem;
}

.pre-high1-term__head {
  display: grid;
  gap: 0.2rem;
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: center;
  background: var(--ph-accent);
  color: #ffffff;
}

.pre-high1-term__label {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.pre-high1-term__title {
  margin: 0;
  font-family: var(--font-jalnan);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.pre-high1-term__meta {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  font-weight: var(--font-weight-bold);
}

.pre-high1-term__body {
  display: grid;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
}

.pre-high1-term__body > p {
  margin: 0;
  font-family: var(--font-gyeonggi-batang);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  color: var(--ph-ink);
  word-break: keep-all;
}

/* Arrow between the two term cards (desktop only). */
.pre-high1-terms__arrow {
  display: none;
  align-self: center;
  color: var(--ph-accent);
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  user-select: none;
}

@media (min-width: 768px) {
  .pre-high1-terms__arrow {
    display: block;
  }
}

/* Total line under the two terms. */
.pre-high1-total {
  margin: 0 var(--ph-inset) var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: center;
  background: var(--ph-header);
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-primary);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.55;
  color: var(--ph-ink);
  word-break: keep-all;
}

.pre-high1-total strong {
  color: var(--ph-accent-deep);
}

/* ——— Check list with blue tick (terms, parent guide) ——— */
.pre-high1-checklist {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pre-high1-checklist li {
  position: relative;
  margin: 0;
  padding-left: 1.75rem;
  font-family: var(--font-primary);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  font-weight: var(--font-weight-medium);
  line-height: 1.55;
  color: var(--ph-ink);
  word-break: keep-all;
}

/* Tick drawn with borders so no icon asset is needed. */
.pre-high1-checklist li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.3em;
  width: 0.45rem;
  height: 0.8rem;
  border-right: 3px solid var(--ph-accent);
  border-bottom: 3px solid var(--ph-accent);
  transform: rotate(40deg);
}

.pre-high1-checklist strong {
  color: var(--ph-accent-deep);
}

/* ——— Class cards (기초 / 중위 / 상위) ——— */
.pre-high1-classes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin: 0 var(--ph-inset) var(--spacing-lg);
  padding: 0;
  list-style: none;
}

@media (min-width: 1024px) {
  .pre-high1-classes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-md);
  }
}

.pre-high1-class {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 3px solid var(--ph-accent);
  border-radius: 1.5rem;
}

/* Header tint deepens from 기초 to 상위 so the three cards read as a ladder. */
.pre-high1-class__head {
  display: grid;
  gap: 0.25rem;
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: center;
  background: var(--ph-header);
}

.pre-high1-class--mid .pre-high1-class__head {
  background: var(--ph-accent-soft);
}

.pre-high1-class--top .pre-high1-class__head {
  background: var(--ph-accent);
}

.pre-high1-class__name {
  margin: 0;
  font-family: var(--font-jalnan);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ph-accent-deep);
}

.pre-high1-class__hours {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  font-weight: var(--font-weight-bold);
  color: var(--ph-ink);
}

.pre-high1-class--top .pre-high1-class__name,
.pre-high1-class--top .pre-high1-class__hours {
  color: #ffffff;
}

.pre-high1-class__goal {
  margin: 0;
  padding: var(--spacing-md) var(--spacing-lg) 0;
  font-family: var(--font-gyeonggi-batang);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--ph-ink);
  word-break: keep-all;
}

/* Label / value rows inside each class card. */
.pre-high1-class__rows {
  display: grid;
  gap: var(--spacing-md);
  flex: 1;
  margin: 0;
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
}

.pre-high1-class__row {
  display: grid;
  gap: 0.3rem;
  padding-top: var(--spacing-md);
  border-top: 1px dashed var(--ph-border);
}

.pre-high1-class__row dt {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
  color: var(--ph-accent);
}

.pre-high1-class__row dd {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(0.98rem, 1.35vw, 1.08rem);
  font-weight: var(--font-weight-medium);
  line-height: 1.6;
  color: var(--ph-ink);
  word-break: keep-all;
}

.pre-high1-class__row dd strong {
  color: var(--ph-accent-deep);
}

/* ——— Unit map (공통수학1 / 공통수학2 / 확장) ——— */
.pre-high1-units {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin: 0 var(--ph-inset) var(--spacing-lg);
}

@media (min-width: 768px) {
  .pre-high1-units {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pre-high1-unit {
  margin: 0;
  padding: var(--spacing-lg);
  background: #ffffff;
  border: 2px solid var(--ph-border);
  border-radius: 1.25rem;
}

.pre-high1-unit__title {
  display: inline-block;
  margin: 0 0 var(--spacing-md);
  padding: 0.4rem 1rem;
  background: var(--ph-accent);
  border-radius: 10px;
  font-family: var(--font-jalnan);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.pre-high1-unit__list {
  display: grid;
  gap: var(--spacing-sm);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ph-unit;
}

.pre-high1-unit__item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: var(--spacing-sm);
  align-items: baseline;
  margin: 0;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--ph-line);
  counter-increment: ph-unit;
}

.pre-high1-unit__item:last-child {
  border-bottom: none;
}

/* Big chapter number in front of each unit. */
.pre-high1-unit__item::before {
  content: counter(ph-unit);
  grid-row: span 2;
  font-family: var(--font-jalnan);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ph-accent-soft);
}

.pre-high1-unit__name {
  font-family: var(--font-primary);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: var(--font-weight-bold);
  color: var(--ph-ink);
}

.pre-high1-unit__sub {
  font-family: var(--font-primary);
  font-size: clamp(0.92rem, 1.3vw, 1rem);
  line-height: 1.55;
  color: var(--ph-muted);
  word-break: keep-all;
}

/* Expansion row: 대수 · 미적분Ⅰ shown as dashed (optional) chips. */
.pre-high1-expand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm) var(--spacing-md);
  margin: 0 var(--ph-inset) var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--ph-header);
  border-radius: 1.25rem;
}

.pre-high1-expand__label {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  font-weight: var(--font-weight-bold);
  color: var(--ph-ink);
}

.pre-high1-expand__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background: #ffffff;
  border: 2px dashed var(--ph-accent);
  border-radius: 10px;
  font-family: var(--font-jalnan);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 400;
  color: var(--ph-accent);
}

/* ——— 21-session map (7 weeks × 3 sessions) ——— */
.pre-high1-sessions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-sm);
  margin: 0 var(--ph-inset) var(--spacing-md);
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .pre-high1-sessions {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

.pre-high1-sessions__week {
  display: grid;
  /* Mobile: week label left, three sessions right. */
  grid-template-columns: 3.5rem repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
  margin: 0;
}

@media (min-width: 768px) {
  .pre-high1-sessions__week {
    grid-template-columns: 1fr;
  }
}

.pre-high1-sessions__label {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--ph-muted);
}

.pre-high1-sessions__list {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One session cell; default is a learning session (white, blue outline). */
.pre-high1-sessions__cell {
  display: grid;
  place-items: center;
  gap: 0.1rem;
  min-height: 3.25rem;
  margin: 0;
  padding: 0.35rem 0.25rem;
  background: #ffffff;
  border: 2px solid var(--ph-border);
  border-radius: 10px;
  text-align: center;
  box-sizing: border-box;
}

.pre-high1-sessions__num {
  font-family: var(--font-jalnan);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1;
  color: var(--ph-accent);
}

.pre-high1-sessions__kind {
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  color: var(--ph-muted);
}

/* Complement sessions (4·8·12·16·20) are filled with the accent. */
.pre-high1-sessions__cell--fix {
  background: var(--ph-accent);
  border-color: var(--ph-accent);
}

.pre-high1-sessions__cell--fix .pre-high1-sessions__num,
.pre-high1-sessions__cell--fix .pre-high1-sessions__kind {
  color: #ffffff;
}

/* Final review session (21) uses the deep blue to close the term. */
.pre-high1-sessions__cell--final {
  background: var(--ph-accent-deep);
  border-color: var(--ph-accent-deep);
}

.pre-high1-sessions__cell--final .pre-high1-sessions__num,
.pre-high1-sessions__cell--final .pre-high1-sessions__kind {
  color: #ffffff;
}

/* Legend under the session map. */
.pre-high1-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm) var(--spacing-lg);
  margin: 0 var(--ph-inset) var(--spacing-md);
  padding: 0;
  list-style: none;
}

.pre-high1-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(0.95rem, 1.35vw, 1.05rem);
  font-weight: var(--font-weight-semibold);
  color: var(--ph-ink);
}

.pre-high1-legend__swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  border: 2px solid var(--ph-border);
  background: #ffffff;
}

.pre-high1-legend__swatch--fix {
  background: var(--ph-accent);
  border-color: var(--ph-accent);
}

.pre-high1-legend__swatch--final {
  background: var(--ph-accent-deep);
  border-color: var(--ph-accent-deep);
}

/* ——— Weekly roadmap tables ——— */
.pre-high1-roadmap-scroll {
  box-sizing: border-box;
  margin: 0 var(--ph-inset) var(--spacing-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.pre-high1-roadmap-scroll:focus-visible {
  outline: 2px solid var(--ph-accent);
  outline-offset: 3px;
}

.pre-high1-roadmap {
  width: 100%;
  min-width: 46rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: var(--font-primary);
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  line-height: 1.5;
  color: var(--ph-ink);
  background: #ffffff;
}

.pre-high1-roadmap caption {
  /* Visible caption duplicates the h4 above; keep it for screen readers only. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pre-high1-roadmap th,
.pre-high1-roadmap td {
  box-sizing: border-box;
  padding: 0.75rem 0.7rem;
  border-right: 1px solid #d9d9d9;
  border-bottom: 1px solid #d9d9d9;
  vertical-align: middle;
  word-break: keep-all;
}

.pre-high1-roadmap tr > :first-child {
  border-left: 1px solid #d9d9d9;
}

.pre-high1-roadmap thead th {
  border-top: 1px solid #d9d9d9;
  background: var(--ph-accent);
  color: #ffffff;
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.pre-high1-roadmap thead th:first-child {
  width: 7rem;
}

.pre-high1-roadmap tbody th {
  background: var(--ph-header);
  font-weight: var(--font-weight-bold);
  text-align: center;
  color: var(--ph-accent-deep);
}

/* Session numbers under the week label (e.g. "1·2·3회"). */
.pre-high1-roadmap__sessions {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--ph-muted);
}

/* Last week carries the term-closing review: tint the whole row. */
.pre-high1-roadmap tbody tr:last-child td {
  background: #f6faff;
  font-weight: var(--font-weight-semibold);
}

/* ——— Next-step links ——— */
.pre-high1-next {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin: 0 var(--ph-inset) var(--spacing-2xl);
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .pre-high1-next {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pre-high1-next li {
  margin: 0;
}

.pre-high1-next__link {
  display: grid;
  gap: var(--spacing-xs);
  height: 100%;
  min-height: 44px;
  padding: var(--spacing-lg);
  box-sizing: border-box;
  background: #ffffff;
  border: 2px solid var(--ph-border);
  border-radius: 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--transition-fast, 150ms) ease,
    box-shadow var(--transition-fast, 150ms) ease;
}

.pre-high1-next__link:hover,
.pre-high1-next__link:focus-visible {
  border-color: var(--ph-accent);
  box-shadow: 0 4px 14px rgba(88, 158, 245, 0.18);
  outline: none;
}

.pre-high1-next__label {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
  color: var(--ph-accent);
}

.pre-high1-next__title {
  font-family: var(--font-primary);
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  font-weight: var(--font-weight-bold);
  color: var(--ph-ink);
}

.pre-high1-next__desc {
  font-family: var(--font-primary);
  font-size: clamp(0.95rem, 1.3vw, 1.02rem);
  line-height: 1.55;
  color: var(--ph-muted);
  word-break: keep-all;
}

/* ——— Lead CTA under the overview copy ——— */
/* CTA band paragraph (outside the sheet, so it uses site text tokens). */
.pre-high1-cta-lead {
  max-width: 40rem;
  margin: 0 0 var(--spacing-md);
  font-size: var(--font-size-base);
  line-height: 1.65;
  color: var(--color-text-secondary, #6b7280);
  word-break: keep-all;
}

/* Track rows: long labels like "중위·상위반" need a bit more room on phones. */
@media (max-width: 767px) {
  .curriculum-sheet--pre-high1 .curriculum-sheet__track-label {
    padding-inline: 0.6rem;
  }
}
