/* =========================================================================
   MyTutor — TOEIC Writing Course landing page
   Built to the REVISED "Clear Professional" guideline. Scoped under .tw.
   Same shared template as the TOEIC Speaking page.
   - Plain .course-eyebrow (no leading line).
   - Shared mt-course-layout-page / mt-course-layout-wrap width utilities.
   - Free-trial CTA via get_footer() → includes/free-trial-cta.php (services.css).
   - .mt-card hover only on clickable a.mt-card; div.mt-card never lifts.
   Shared classes mirrored here so the page renders standalone; remove if
   css/main.css defines them globally.
   ========================================================================= */

@media (min-width: 769px) {
  .mt-course-layout-page #wrap { min-width: 0; }
  .mt-course-layout-page #container { width: 100%; max-width: none; padding: 0; }
}
.mt-course-layout-page .tw { margin-bottom: 0; }
.toeic-writing-page .free-trial-cta { margin-top: 0; }
.tw-section:last-child { padding-bottom: 40px; }

.tw {
  --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;
  --teal-050: #E8F5F7;
  --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;
  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;
}
.tw *, .tw *::before, .tw *::after { box-sizing: inherit; }
.tw p, .tw h1, .tw h2, .tw h3, .tw h4, .tw ul, .tw ol { margin: 0; padding: 0; }
.tw ul, .tw ol { list-style: none; }
.tw img { max-width: 100%; display: block; }
.tw a { color: inherit; }

/* ---------- shared utilities (mirror css/main.css) ---------- */
.tw .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;
}
.tw div.mt-card:hover { border-color: rgba(3, 27, 104, 0.12); box-shadow: var(--shadow-tight); }
.tw a.mt-card:hover { border-color: rgba(3, 27, 104, 0.22); box-shadow: 0 12px 28px rgba(20, 32, 62, 0.14); text-decoration: none; }
.tw .tag {
  display: inline-flex; align-items: center;
  padding: 4px 7px; 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;
}
.tw .course-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple-700); display: block; line-height: 1.4; margin-bottom: 12px;
}
.tw .mt-course-layout-wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---------- primitives ---------- */
.tw-section { padding: 56px 0; }
.tw-section--canvas { background: var(--canvas); }
.tw-h2 { font-size: 25px; line-height: 1.3; font-weight: 700; color: var(--navy-950); margin-bottom: 14px; }
.tw-lead { color: var(--muted); font-size: 16px; max-width: 64ch; }
.tw-body { color: var(--ink); font-size: 15.5px; }
.tw-body + .tw-body { margin-top: 14px; }

/* ---------- buttons ---------- */
.tw-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;
}
.tw-btn--primary,
.tw-btn--primary:link,
.tw-btn--primary:visited { background: var(--navy-800); color: #fff; border: 1px solid var(--navy-800); }
.tw-btn--primary:hover { background: var(--navy-950); border-color: var(--navy-950); color: #fff; text-decoration: none; }
.tw-btn--ghost,
.tw-btn--ghost:link,
.tw-btn--ghost:visited { background: transparent; color: var(--navy-800); border: 1.5px solid var(--line); }
.tw-btn--ghost:hover { border-color: var(--navy-800); color: var(--navy-800); text-decoration: none; }
.tw-btn--sm { font-size: 13.5px; padding: 10px 16px; }
.tw-btn--block { width: 100%; }

/* ---------- hero ---------- */
.tw-hero { background: var(--canvas); padding: 38px 0 46px; }
.tw-hero__title { font-size: 26px; line-height: 1.3; font-weight: 700; color: var(--navy-950); margin: 10px 0 14px; }
.tw-hero__lead { color: var(--ink); font-size: 15.5px; margin-bottom: 10px; max-width: 62ch; }
.tw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.tw-chip { font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.tw-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- grid + check rows ---------- */
.tw-grid { display: grid; gap: 14px; margin-top: 22px; }
.tw-checks { display: grid; gap: 11px; margin-top: 22px; }
@media (min-width: 640px) { .tw-checks--2 { grid-template-columns: 1fr 1fr; } }
.tw-check {
  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: 13px 16px; font-weight: 600; font-size: 14.5px;
}
.tw-check__i { color: var(--teal-600); font-weight: 800; flex: none; }

/* ---------- course lineup cards ---------- */
.tw-course { padding: 24px 22px; display: flex; flex-direction: column; }
.tw-course__k { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--purple-700); margin-bottom: 9px; }
.tw-course__h { font-size: 18px; font-weight: 800; color: var(--navy-950); margin-bottom: 10px; line-height: 1.4; }
.tw-course__b { font-size: 14.5px; color: var(--muted); margin-bottom: 20px; }
.tw-course__cta { margin-top: auto; }

/* ---------- question-type cards (clickable) ---------- */
.tw-qgrid { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 560px) { .tw-qgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .tw-qgrid { grid-template-columns: 1fr 1fr 1fr; } }
.tw-qcard { padding: 20px; display: flex; flex-direction: column; height: 100%; }
.tw-qcard__n {
  width: 28px; height: 28px; border-radius: 999px; background: var(--purple-100); color: var(--navy-800);
  font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.tw-qcard__h { font-size: 15.5px; font-weight: 800; color: var(--navy-950); margin-bottom: 4px; line-height: 1.4; }
.tw-qcard__jp { display: block; font-size: 12.5px; font-weight: 700; color: var(--purple-700); margin-top: 3px; }
.tw-qcard__b { font-size: 13.5px; color: var(--muted); margin: 8px 0 16px; }
.tw-qcard__more { margin-top: auto; font-size: 12.5px; font-weight: 700; color: var(--muted); line-height: 1.5; transition: color .16s ease; }
.tw-qcard__more::after { content: " →"; }
.tw-qcard:hover .tw-qcard__more { color: var(--navy-800); }

/* ---------- lesson process steps ---------- */
.tw-steps { display: grid; gap: 12px; margin-top: 22px; }
.tw-step {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px;
}
.tw-step__n {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--navy-800); color: #fff;
  font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
}
.tw-step__h { font-size: 16px; font-weight: 700; color: var(--navy-950); margin-bottom: 5px; }
.tw-step__b { font-size: 14px; color: var(--muted); }

/* ---------- related ---------- */
.tw-rel { padding: 20px; display: flex; flex-direction: column; }
.tw-rel__h { font-size: 15px; font-weight: 700; color: var(--navy-950); margin-bottom: 8px; line-height: 1.4; }
.tw-rel__b { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.tw-rel__cta { margin-top: auto; }

/* ---------- note ---------- */
.tw-note {
  margin-top: 18px; font-size: 14px; color: var(--muted);
  background: var(--purple-100); border-radius: var(--radius-md); padding: 16px 18px; line-height: 1.7;
}
.tw-note strong { color: var(--navy-950); }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .tw-section { padding: 72px 0; }
  .tw-section:last-child { padding-bottom: 48px; }
  .tw-hero { padding: 48px 0 56px; }
  .tw-hero__title { font-size: 34px; }
  .tw-h2 { font-size: 30px; }
  .tw-grid--2 { grid-template-columns: 1fr 1fr; }
  .tw-grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .tw-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .tw * { transition: none !important; } }
.tw :where(a, button):focus-visible { outline: 3px solid var(--navy-700); outline-offset: 2px; border-radius: 6px; }
.tw [id] { scroll-margin-top: 24px; }
