/* =========================================================================
   MyTutor — Medicine English course page
   Scoped under .med on the medicine page.
   ========================================================================= */


@media (min-width: 769px) {
  .medicine-page #wrap { min-width: 0; }
  .medicine-page #container { width: 100%; max-width: none; padding: 0; }
}
.medicine-page .med { margin-bottom: 0; }
.med a:not([class*="med-btn"]) { color: inherit; }
.med-btn--primary,
.med-btn--primary:link,
.med-btn--primary:visited {
  background: var(--mt-navy-800, #1e2d6e);
  border: 1px solid var(--mt-navy-800, #1e2d6e);
  color: #fff;
}
.med-btn--primary:hover {
  background: #2d3f94;
  border-color: #2d3f94;
  color: #fff;
  text-decoration: none;
}
.med-hero__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
}
.med-shot-link { display: block; cursor: zoom-in; text-decoration: none; }
.med-shot-link:hover .med-shot { opacity: 0.92; }
.med p.med-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
  background: var(--purple-100);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  line-height: 1.65;
}
.med p.med-note--span { grid-column: 1 / -1; margin-top: 0; }
.med p.med-note strong { color: var(--navy-950); }
.med p.med-sample__cap {
  padding: 18px 20px 20px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}
.med p.med-sample__cap strong { color: var(--ink); font-weight: 700; }
.med-tutor__photo { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); }
.med-tutor__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

/* =========================================================================
   MyTutor — Medicine English course page
   Scoped under .med on the medicine page.
   ========================================================================= */

.med {
  /* --- official core tokens --- */
  --ink: #172033;
  --muted: #657084;
  --line: #DFE5EE;
  --paper: #FFFFFF;
  --canvas: #F4F6FA;
  --navy-950: #031B68;
  --navy-800: #1E2D6E;
  --navy-700: #263A8A;
  --purple-700: #6C4DA4;
  --purple-100: #F1EDFB;
  --teal-600: #158A9A;
  --gold-500: #C99A2E;
  --radius-sm: 6px;
  --radius-md: 8px;
  --shadow-soft: 0 14px 40px rgba(20, 32, 62, 0.12);
  --shadow-tight: 0 8px 24px rgba(20, 32, 62, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;

  color-scheme: light;            /* keep the intended light palette in dark-mode OS */
  box-sizing: border-box;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.med *, .med *::before, .med *::after { box-sizing: inherit; }
.med p, .med h1, .med h2, .med h3, .med ul, .med ol, .med figure { margin: 0; padding: 0; }
.med ul, .med ol { list-style: none; }
.med img { max-width: 100%; display: block; }

/* ---------- shared utilities (mirror of css/main.css) ---------- */
.med .mt-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(3, 27, 104, 0.12);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-tight);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
.med .mt-card:hover {
  border-color: rgba(3, 27, 104, 0.22);
  box-shadow: 0 12px 28px rgba(20, 32, 62, 0.14);
}
.med .tag {
  display: inline-flex; align-items: center;
  padding: 4px 9px; border: 0; border-radius: 999px;
  background: var(--purple-100); color: var(--navy-800);
  font-size: 10.5px; font-weight: 700; line-height: 1.25; white-space: nowrap;
}
.med .tag--specialty { background: #E8F5F7; color: var(--teal-600); }

/* ---------- layout primitives ---------- */
.med-wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.med-section { padding: 56px 0; }
.med-section--canvas { background: var(--canvas); }
.med-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple-700); display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px;
}
.med-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--purple-700); display: inline-block; }
.med-h2 { font-size: 25px; line-height: 1.3; font-weight: 700; color: var(--navy-950); margin-bottom: 14px; }
.med-lead { color: var(--muted); font-size: 16px; max-width: 62ch; }

/* ---------- buttons & links ---------- */
.med-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700; padding: 13px 24px; border-radius: var(--radius-md);
  text-decoration: none; cursor: pointer; transition: background .16s ease, border-color .16s ease;
}
.med-btn--primary { background: var(--navy-800); color: #fff; border: 1px solid var(--navy-800); }
.med-btn--ghost,
.med-btn--ghost:link,
.med-btn--ghost:visited {
  background: transparent;
  color: var(--mt-navy-800, #1e2d6e);
  border: 1.5px solid var(--mt-line, #dfe5ee);
}
.med-btn--ghost:hover {
  border-color: var(--mt-navy-800, #1e2d6e);
  color: var(--mt-navy-800, #1e2d6e);
  text-decoration: none;
}
.med-textlink {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; transition: color .16s ease;
}
.med-textlink:hover { color: var(--navy-800); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- placeholder media ---------- */
.med-ph {
  background: var(--canvas);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px; padding: 18px; color: var(--muted);
}
.med-ph__tag { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--purple-700); }
.med-ph__label { font-size: 13px; line-height: 1.5; }
.med-ph--43 { aspect-ratio: 4 / 3; }
.med-ph--media { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.med-ph--photo { width: 84px; height: 84px; border-radius: 50%; flex: none; padding: 8px; }

/* ============================ 1. HERO ============================ */
.med-hero { background: var(--canvas); padding: 38px 0 46px; }
.med-brand { font-size: 13px; font-weight: 700; color: var(--navy-800); margin-bottom: 20px; }
.med-hero__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--purple-700); }
.med-hero__title { font-size: 30px; line-height: 1.22; font-weight: 700; color: var(--navy-950); margin: 10px 0 6px; }
.med-hero__title-en { display: block; font-size: 16px; font-weight: 700; color: var(--purple-700); margin-top: 6px; }
.med-hero__lead { color: var(--muted); font-size: 16px; margin-bottom: 20px; max-width: 56ch; }
.med-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.med-chip { font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.med-hero__media { margin-top: 26px; }

/* ============================ shared section content ============================ */
.med-grid { display: grid; gap: 14px; margin-top: 22px; }
.med-shot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: opacity 0.15s ease;
}

.med-feat { padding: 22px; }
.med-feat__num {
  width: 30px; height: 30px; border-radius: var(--radius-md); background: var(--purple-100); color: var(--navy-800);
  font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.med-feat__h { font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--navy-950); margin-bottom: 7px; }
.med-feat__b { font-size: 14.5px; color: var(--muted); }

/* scene rows (who it's for) */
.med-scenes { display: grid; gap: 12px; margin: 20px 0; }
.med-scene {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--navy-700);
  border-radius: var(--radius-md); padding: 15px 18px; font-weight: 600; font-size: 15px;
}
.med-scene__i { color: var(--teal-600); font-weight: 800; flex: none; }
.med-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* pillars */
.med-pillar__body { padding: 20px 22px; }
.med-pillar__k { font-size: 13px; font-weight: 800; color: var(--purple-700); margin-bottom: 8px; }
.med-pillar__h { font-size: 17px; font-weight: 700; color: var(--navy-950); margin-bottom: 7px; line-height: 1.4; }
.med-pillar__b { font-size: 14.5px; color: var(--muted); }

/* curriculum */
.med-step { margin-top: 22px; }
.med-step__label {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #fff;
  background: var(--navy-800); padding: 4px 11px; border-radius: var(--radius-sm); margin-bottom: 6px;
}
.med-step__title { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.med-modlist { display: grid; gap: 9px; }
.med-mod {
  display: flex; gap: 12px; align-items: baseline;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 13px 16px;
}
.med-mod__n { font-weight: 800; color: var(--navy-700); font-size: 14px; flex: none; min-width: 78px; }
.med-mod__t { font-size: 14.5px; font-weight: 600; }
.med-mod__t span { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.med-mod--tbd { border-style: dashed; }
.med-mod--tbd .med-mod__t { color: var(--muted); font-weight: 500; }

.med-deepdive { margin-top: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; }
.med-deepdive__h { font-size: 14.5px; font-weight: 700; color: var(--navy-950); margin-bottom: 14px; line-height: 1.5; }
.med-deepdive__h span { color: var(--purple-700); }
.med-lessons { display: grid; gap: 8px; }
.med-lesson { display: flex; gap: 12px; align-items: baseline; font-size: 14.5px; }
.med-lesson__n {
  flex: none; width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--purple-100);
  color: var(--navy-800); font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
}
.med-lesson__t span { color: var(--muted); }

/* instructors */
.med-tutor { padding: 22px; }
.med-tutor__head { display: flex; gap: 15px; align-items: center; margin-bottom: 12px; }
.med-tutor__name { font-size: 18px; font-weight: 800; color: var(--navy-950); }
.med-tutor__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.med-tutor__b { font-size: 14.5px; color: var(--muted); }
.med-tutor--tbd { border-style: dashed; }

/* free trial CTA */
.med-trial { background: var(--purple-100); text-align: center; }
.med-trial__h { font-size: 25px; line-height: 1.3; font-weight: 700; color: var(--navy-950); margin-bottom: 8px; }
.med-trial__sub { font-size: 15px; color: var(--purple-700); font-weight: 600; margin-bottom: 18px; }
.med-trial__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 24px; }
.med-trial__list li { font-size: 14px; color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.med-trial__list li::before { content: "✓"; color: var(--teal-600); font-weight: 800; }
.med-trial__after { margin-top: 16px; }

/* footer */
.med-foot { padding: 26px 0; text-align: center; font-size: 13px; color: var(--muted); background: var(--canvas); }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .med-section { padding: 72px 0; }
  .med-hero { padding: 48px 0 56px; }
  .med-hero__title { font-size: 44px; }
  .med-hero__title-en { font-size: 18px; }
  .med-h2 { font-size: 30px; }
  .med-trial__h { font-size: 30px; }
  .med-grid--2 { grid-template-columns: 1fr 1fr; }
  .med-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
  .med-scenes { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .med * { transition: none !important; } }
.med :where(a, button):focus-visible { outline: 3px solid var(--navy-700); outline-offset: 2px; border-radius: 6px; }
#med-noop { scroll-margin-top: 24px; }

/* ---- site header (kept from original page, restyled to match) ---- */
.med-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.med-header__in { display:flex; align-items:center; justify-content:space-between; height:64px; gap:16px; }
.med-logo { font-weight:800; color:var(--navy-950); font-size:19px; white-space:nowrap; text-decoration:none; }
.med-logo span { font-weight:500; font-size:12px; color:var(--muted); margin-left:7px; }
.med-nav { display:none; gap:24px; }
.med-nav a { color:var(--muted); text-decoration:none; font-size:14px; font-weight:600; }
.med-nav a:hover { color:var(--navy-800); }
.med-hactions { display:flex; align-items:center; gap:16px; }
.med-login { color:var(--muted); font-size:13px; font-weight:600; text-decoration:none; }
.med-login:hover { color:var(--navy-800); }
.med-btn--sm { padding:9px 16px; font-size:13px; }

/* ---- hero actions row ---- */
.med-hero__actions { display:flex; flex-wrap:wrap; gap:12px; }

/* ---- supplementary curriculum line ---- */
.med-suppl { margin-top:14px; font-size:13.5px; color:var(--muted); }

/* ---- structured footer (kept from original page) ---- */
.med-sitefoot { background:var(--canvas); border-top:1px solid var(--line); }
.med-fcols { display:grid; grid-template-columns:1fr; gap:28px; padding:44px 0 26px; }
.med-flogo { font-weight:800; color:var(--navy-950); font-size:19px; }
.med-flogo span { font-weight:500; font-size:12px; color:var(--muted); margin-left:7px; }
.med-fcol > p { margin:10px 0 0; font-size:13px; color:var(--muted); max-width:280px; }
.med-fcol h4 { font-size:13px; color:var(--navy-950); margin:0 0 12px; font-weight:800; }
.med-fcol a { display:block; color:var(--muted); text-decoration:none; font-size:13.5px; margin-bottom:9px; }
.med-fcol a:hover { color:var(--navy-800); }
.med-copy { border-top:1px solid var(--line); padding:18px 0; font-size:12px; color:var(--muted); }

/* ---- anchor offset for sticky-ish header ---- */
.med [id] { scroll-margin-top: 80px; }

@media (min-width:600px) { .med-fcols { grid-template-columns:1.5fr 1fr 1fr 1fr; } }
@media (min-width:860px) { .med-nav { display:flex; } }