:root {
  --bg: #f5f7fb;
  --ink: #172033;
  --muted: #667085;
  --line: #d6deea;
  --panel: #ffffff;
  --soft: #eef3f8;
  --blue: #1f5f99;
  --green: #28745a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
  min-width: 320px;
  overflow-x: hidden;
}

a { color: inherit; }

.site-shell {
  margin: 0 auto;
  max-width: 1160px;
  padding: 24px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.brand {
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  min-height: 40px;
  padding: 0 12px;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.hero {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 28px;
}

.eyebrow {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
}

h2 {
  color: var(--blue);
  font-size: 26px;
  line-height: 1.15;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 820px;
}

.chips,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 10px;
}

.layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-width: 0;
}

.panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 24px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-box,
.card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.card {
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover,
.card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(31, 95, 153, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.card-title {
  color: var(--blue);
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.card-cta {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.section-list {
  display: grid;
  gap: 18px;
}

.section-list article {
  display: grid;
  gap: 8px;
}

.vocab-list,
.exercise-list {
  margin: 0;
  padding-left: 20px;
}

.dialog {
  display: grid;
  gap: 8px;
}

.line {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.line strong {
  color: var(--blue);
}

iframe {
  background: #f8fafc;
  border: 0;
  border-radius: 8px;
  display: block;
  height: 560px;
  width: 100%;
}

.site-footer {
  color: var(--muted);
  font-size: 14px;
  padding: 28px 0 8px;
  text-align: center;
}

.site-footer a {
  color: var(--blue);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-shell { padding: 16px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .layout { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  iframe { height: 480px; }
}

@media (max-width: 560px) {
  .site-shell { padding: 12px; }
  .hero,
  .panel { padding: 18px; }
  .nav { width: 100%; }
  .nav a,
  .button {
    justify-content: center;
    width: 100%;
  }
  h1 { font-size: 30px; }
  h2 { font-size: 23px; }
  .lead { font-size: 16px; }
  .chip { border-radius: 8px; }
  .actions { width: 100%; }
  iframe { height: min(58vh, 420px); }
}
