/* NDED One-Step Word Problems — practice page and worksheet page.
   Follows the visual language of the newer tutor pages (compare-fractions.css). */
*, *::before, *::after { box-sizing: border-box; }
header .main-title { margin-bottom: 0; }
.main-content { min-width: 0; }

.wp-page { gap: 1.5rem; min-width: 0; }

.wp-hero { max-width: 900px; margin: 0 auto .4rem; text-align: center; }
.wp-kicker { display: inline-block; margin-bottom: .55rem; color: #5e78ad; font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.wp-hero h1 { margin: 0 0 .5rem; color: var(--primary-color, #2f66d8); font: 700 clamp(2rem, 4vw, 3.05rem)/1.15 'Raleway', sans-serif; overflow-wrap: anywhere; }
.wp-hero p { max-width: 760px; margin: 0 auto; color: #4a5568; font-size: 1.04rem; line-height: 1.6; }
.wp-motto { margin-top: .35rem !important; color: #3d7b5d !important; font-weight: 800; }
.wp-teacher-link { margin: .55rem 0 0; font-size: .9rem; }
.wp-teacher-link a { color: #2f66b4; font-weight: 800; text-decoration: none; border-bottom: 1px dashed rgba(47, 102, 180, .45); }
.wp-teacher-link a:hover { border-bottom-style: solid; }

/* ---------- practice tool ---------- */
.wp-tool {
  --blue: #3f73c9; --blue-dark: #2d5fae; --blue-soft: #edf5ff;
  --gold-soft: #fff7e9; --mint: #3d7b5d; --mint-soft: #eef9f3;
  --ink: #172033; --muted: #64748b;
  width: 100%; max-width: 940px; margin: 0 auto;
}
.wp-settings {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .5rem 1rem; margin: 0 0 1rem; color: #4e5d70; font-size: .9rem;
}
.wp-settings .label { font-weight: 800; color: #3b4f69; }
.wp-op-chips { display: inline-flex; gap: .35rem; }
.wp-chip {
  min-width: 44px; height: 38px; padding: 0 .7rem; border: 1px solid #b7c9e2; border-radius: 999px;
  background: #fff; color: #3d638f; font-family: inherit; font-size: 1.15rem; font-weight: 800; line-height: 1; cursor: pointer;
}
.wp-chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.wp-settings select { height: 38px; border: 1px solid #b7c9e2; border-radius: 10px; padding: 0 .5rem; font: inherit; color: #3d638f; background: #fff; }

.wp-stage {
  position: relative; padding: 22px 24px 24px; background: #fff;
  border: 1px solid #e1e8f1; border-radius: 18px; box-shadow: 0 16px 38px rgba(34, 50, 78, .09);
}
.wp-progress { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 14px; }
.wp-progress-text { color: #6d86ad; font-size: .74rem; font-weight: 900; letter-spacing: .11em; }
.wp-dots { display: flex; gap: 6px; }
.wp-dot { width: 13px; height: 13px; border-radius: 50%; background: #e3e9f2; }
.wp-dot.current { background: #9db8e6; box-shadow: 0 0 0 3px rgba(63, 115, 201, .18); }
.wp-dot.done { background: #f2b544; }

.wp-story {
  width: 100%; max-width: none; margin: 0 0 18px; padding: 18px 20px; background: #f7faff; text-align: left !important; border: 1px solid #dbe6f4; border-radius: 14px;
  color: #22324a; font-size: 1.22rem; line-height: 1.6; font-weight: 600;
}
/* Keep the story on screen while students work through the steps below it.
   (The site sets overflow-x: hidden on body, which would stop sticky from
   working; clip hides sideways overflow the same way without breaking it.) */
body { overflow: visible !important; overflow-x: clip !important; }
.wp-story {
  position: sticky;
  top: 8px;
  z-index: 5;
  box-shadow: 0 6px 16px rgba(34, 50, 78, .10);
}
.wp-story .num { padding: 0 .15em; border-radius: 5px; background: #fff2c9; color: #7a4f00; font-weight: 800; }

.wp-step-kicker { margin: 0 0 6px; color: #6d86ad; font-size: .72rem; font-weight: 900; letter-spacing: .11em; text-align: center; }
.wp-question { margin: 0 0 14px; color: #2d4d79; font-size: 1.12rem; font-weight: 800; text-align: center; }

.wp-ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 640px; margin: 0 auto; }
.wp-op {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px;
  border: 2px solid #cfdcef; border-radius: 14px; background: #fff; color: #2d4d79; cursor: pointer;
  font: inherit; transition: transform .15s, border-color .15s, background .15s;
}
.wp-op .sym { font-size: 1.9rem; font-weight: 900; line-height: 1; }
.wp-op .word { font-size: .86rem; font-weight: 800; color: #5b6b80; }
.wp-op:hover:not(:disabled) { border-color: #8fb0e0; transform: translateY(-1px); }
.wp-op.tried { opacity: .5; }
.wp-op.chosen { background: var(--mint-soft); border-color: #7cc29f; color: var(--mint); }

.wp-diagrams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wp-diagram {
  position: relative; padding: 10px 10px 6px; border: 2px solid #dbe4f0; border-radius: 14px; background: #fff;
  cursor: pointer; font: inherit; text-align: left; transition: border-color .15s, transform .15s, background .15s;
}
.wp-diagram:hover:not(:disabled) { border-color: #8fb0e0; transform: translateY(-1px); }
.wp-diagram .letter {
  position: absolute; top: 8px; left: 10px; width: 24px; height: 24px; border-radius: 50%;
  background: #eef3fa; color: #46617f; font-size: .8rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.wp-diagram svg { display: block; width: 100%; height: auto; }
.wp-diagram.tried { opacity: .45; }
.wp-diagram.chosen { border-color: #7cc29f; background: var(--mint-soft); }

.wp-equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; font-size: 1.8rem; font-weight: 900; color: #22324a; }
.wp-equation input {
  width: 92px; height: 56px; border: 2px solid #b8c8dc; border-radius: 12px; text-align: center;
  font-family: inherit; font-size: 1.6rem; font-weight: 800; color: #22324a; background: #fff;
}
.wp-equation input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63, 115, 201, .18); }
.wp-equation input.ok { border-color: #7cc29f; background: var(--mint-soft); }
.wp-equation .unit { font-size: 1.1rem; font-weight: 800; color: #4e5d70; }
.wp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.wp-btn {
  min-height: 46px; padding: 0 18px; border-radius: 11px; font-family: inherit; font-size: .95rem; font-weight: 800; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.wp-btn.primary { border: 0; background: var(--blue); color: #fff; box-shadow: 0 6px 14px rgba(63, 115, 201, .18); }
.wp-btn.primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.wp-btn.help { border: 1px solid #b8c8dc; background: #fff; color: #46617f; }
.wp-btn.help:hover { background: #f7faff; border-color: #96aec9; }
.wp-help-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 7px;
  border: 1px solid #98abc1; border-radius: 50%; font-size: .76rem;
}

.wp-feedback { min-height: 1.4em; margin: 12px auto 0; color: #a35661; font-size: .95rem; font-weight: 750; text-align: center; }
.wp-feedback.good { color: var(--mint); }
.wp-hint {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; max-width: 680px; margin: 12px auto 0;
  padding: 12px 16px; background: var(--gold-soft); border: 1px solid #efd8ad; border-radius: 13px;
  color: #654b24; font-size: .95rem; font-weight: 700; line-height: 1.5;
}
.wp-hint[hidden] { display: none; }
.wp-hint .bulb { font-size: 1.1rem; }

.wp-solved {
  margin-top: 14px; padding: 16px; border-radius: 14px; text-align: center;
  background: linear-gradient(135deg, rgba(123, 198, 126, .14), rgba(247, 178, 103, .12)); border: 1px solid rgba(123, 198, 126, .35);
}
.wp-solved .eq { font-size: 1.5rem; font-weight: 900; color: #22324a; }
.wp-solved .praise { margin: .2rem 0 .7rem; color: var(--mint); font-weight: 800; }
.wp-stars { font-size: 1.8rem; letter-spacing: .15em; }
@keyframes wp-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.wp-pop { animation: wp-pop .45s ease-out; display: inline-block; }

/* ---------- learning content ---------- */
.wp-content { display: grid; gap: 18px; max-width: 940px; margin: 0 auto 30px; }
.content-card { padding: 24px 26px; background: #fff; border: 1px solid #e4eaf2; border-radius: 16px; box-shadow: 0 8px 22px rgba(38, 57, 86, .06); }
.content-card h2 { margin: 0 0 12px; color: #2d4d79; font-size: 1.34rem; }
.content-card h3 { margin: 14px 0 4px; color: #3b4f69; font-size: 1rem; }
.content-card p, .content-card li { color: #4e5d70; font-size: .96rem; line-height: 1.7; }
.content-card p:last-child { margin-bottom: 0; }
.content-card ul, .content-card ol { margin: 0; padding-left: 22px; }
.content-card table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: .94rem; }
.content-card th, .content-card td { padding: 8px 10px; border-bottom: 1px solid #e4eaf2; text-align: left; color: #4e5d70; vertical-align: top; }
.content-card th { color: #2d4d79; }
.related-card { background: #f8fbff; }
.related-link { display: inline-block; margin: 4px 14px 0 0; color: #2f66b4; font-weight: 800; text-decoration: none; }
.related-link:hover { text-decoration: underline; }
.wp-example-svg { display: block; max-width: 380px; width: 100%; margin: 10px auto; }

@media (max-width: 700px) {
  .wp-stage { padding: 16px 14px 18px; }
  .wp-story { font-size: 1rem; line-height: 1.5; padding: 11px 13px; top: 6px; }
  .wp-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wp-diagrams { grid-template-columns: 1fr; }
  .wp-equation { font-size: 1.45rem; gap: 7px; }
  .wp-equation input { width: 70px; height: 50px; font-size: 1.35rem; }
  .content-card { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { .wp-pop { animation: none; } }
