*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a3252;
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1.25rem 3rem;
}

h1 { font-size: 1.6rem; line-height: 1.2; }

h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
  background: #1e40af;
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

p { margin-bottom: 0.75rem; }
a { color: #1e40af; }

nav {
  background: #1e40af;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin: 0.75rem 0 1.75rem;
  font-size: 0.9rem;
}
nav a { color: white; margin-right: 1.2rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.subtitle {
  color: #3b5a82;
  font-size: 0.95rem;
  margin: 0.2rem 0 1.25rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.25rem;
}
th, td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #c7d7ed;
  vertical-align: top;
}
thead th {
  background: #1e40af;
  color: white;
  border-bottom: none;
  font-weight: 600;
}
tbody tr:last-child td { border-bottom: none; }

ul, ol { margin: 0 0 0.75rem 1.5rem; }
li { margin-bottom: 0.3rem; }

/* gap-fill */
.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  margin: 0.5rem 0 1.25rem;
  padding: 0.75rem 1rem;
  background: #dbeafe;
  border-radius: 8px;
  font-size: 0.9rem;
}
.word-bank strong { display: block; width: 100%; margin-bottom: 0.25rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: #1e3a8a; }
.word-bank span { padding: 0.15rem 0.5rem; background: #fff; border: 1px solid #93c5fd; border-radius: 3px; white-space: nowrap; color: #1a3252; }

ol.exercise { list-style-position: outside; margin-left: 1.5rem; }
ol.exercise li { margin-bottom: 0.9rem; line-height: 1.9; }

input.blank {
  width: 12rem;
  border: none;
  border-bottom: 2px solid #3b82f6;
  background: transparent;
  font: inherit;
  color: #1a3252;
  padding: 0 0.15rem;
  vertical-align: baseline;
  transition: border-color 0.1s;
}
input.blank:focus { outline: none; border-bottom-color: #1e40af; }
input.blank.correct  { background: #eaf6eb; border-bottom-color: #2a7d32; }
input.blank.incorrect { background: #fdecea; border-bottom-color: #c62828; }

.actions { margin: 1.75rem 0 0.5rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
button {
  padding: 0.4rem 1.1rem;
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  background: #1e40af;
  color: white;
}
button:hover { background: #1d3a9e; }
#score { font-weight: 600; color: #1a3252; }

.note { color: #3b5a82; font-size: 0.9rem; font-style: italic; }
.break-row { color: #3b5a82; font-style: italic; }
