/* ── The primer (r60, build step 4): phaseb.css "Grammar primers" 1524-1933, the rules the
   live renderer (web/static/js/primer_render.js) uses. Trimmed: only the in-modal look (the
   primer sits on the card's .dk-modal paper, so the self-framed /settings rule is not copied),
   no highlight swipe animation, no dot or button transitions, no dormant number-primer rules,
   no Previous button. Changed for the player's bars: the example's Japanese line, the pair
   separators and the list markers use --ink-muted instead of --ink-faint (3:1 or better on
   the paper), and the buttons are at least 44px high. ── */

/* Equal specificity to .dk-primer__btn and later in the cascade than player.css's .hidden, so
   the paging needs its own hide rule. */
#primer .hidden { display: none; }

.pl-primer { text-align: center; }
.dk-primer { text-align: center; }

/* Dot stepper: the position before any reading starts. */
.dk-primer__steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
}
.dk-primer__step {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(74, 72, 120, 0.16);
}
.dk-primer__step.is-done { background: rgba(74, 72, 120, 0.34); }
.dk-primer__step.is-current {
  width: 20px;
  border-radius: var(--radius-pill);
  background: var(--primary);
}
/* Announced, never painted: the dots carry the position visually, this carries it for a
   screen reader. */
.dk-primer__steps-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Header: the Japanese glyph leads, romaji is its caption, a hairline under them. */
.dk-primer__head {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(74, 72, 120, 0.10);
}
.dk-primer__glyph {
  font-family: var(--font-jp);
  font-size: 46px;
  font-weight: var(--fw-bold);
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--primary);
}
.dk-primer__romaji-big {
  font-size: var(--fs-lead);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-top: 4px;
}
.dk-primer__dot {
  color: var(--ink-muted);
  font-weight: var(--fw-regular);
  padding: 0 0.28em;
}
.dk-primer__pair {
  max-width: 30em;
  margin: 12px auto 0;
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--ink-muted);
}
.dk-primer__pair b { color: var(--primary-soft); font-weight: var(--fw-bold); }

/* The card's one sentence of teaching, above the examples. */
.dk-primer__role {
  max-width: 24em;
  margin: 0 auto 14px;
  font-size: var(--fs-lead);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
  font-weight: var(--fw-semibold);
}

/* Examples on one light slip, so a minimal pair differs by one character on screen. */
.dk-primer__ex {
  background: #FAFAFC;
  border: 1px solid rgba(74, 72, 120, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px -10px rgba(74, 72, 120, 0.30);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.dk-primer__ex-row + .dk-primer__ex-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(74, 72, 120, 0.10);
}
.dk-primer__ex-romaji {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 5px;
}
/* Gold marker over the taught characters, no side padding (a suffix stays in its word). */
.dk-primer__ex-romaji .dk-primer__hl {
  background: rgba(240, 201, 105, 0.55);
  border-radius: 4px;
  padding: 0.06em 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.dk-primer__ex-en {
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.dk-primer__ex-en b { color: var(--ink-soft); font-weight: var(--fw-bold); }
.dk-primer__ex-jp {
  font-family: var(--font-jp);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.dk-primer__ex-jp .dk-primer__hl { color: #8F6A1C; font-weight: var(--fw-bold); }

/* Per-card note: one is a centred sentence; two or more a left-aligned list, centred. */
.dk-primer__footer {
  max-width: 32em;
  margin: 0 auto;
  font-size: var(--fs-caption);
  color: var(--ink-muted);
  line-height: 1.65;
}
.dk-primer__footer--list {
  width: fit-content;
  padding: 0 0 0 1.1em;
  text-align: left;
  list-style: disc;
}
.dk-primer__footer--list li + li { margin-top: 8px; }
.dk-primer__footer--list li::marker { color: var(--ink-muted); }
.dk-primer__footer b { color: var(--primary); font-style: normal; font-weight: var(--fw-bold); }

/* Opening page. */
.dk-primer__title {
  margin: 0 0 6px;
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.dk-primer__subtitle {
  font-family: var(--font-jp);
  font-size: var(--fs-body);
  color: var(--primary-soft);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.dk-primer__intro {
  max-width: 32em;
  margin: 18px auto 0;
  font-size: var(--fs-body);
  color: var(--ink-soft);
  line-height: 1.62;
}
.dk-primer__intro p { margin: 0 0 16px; }
/* The last (reassurance) paragraph steps down in size and colour. */
.dk-primer__intro p:last-child {
  margin-bottom: 0;
  margin-top: 20px;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-muted);
}

/* Next / Got it, and the saving "Start learning words" with its soft halo. */
.dk-primer__btn {
  align-self: center;
  min-height: 48px;
  margin: 26px auto 0;
  padding: 14px 32px;
  background: linear-gradient(135deg, #5A588A, #4A4878);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.dk-primer__btn:disabled { opacity: 0.6; cursor: default; }
.dk-primer__btn--start {
  background: linear-gradient(135deg, #6260A0, #4A4878);
  box-shadow: 0 0 0 6px rgba(74, 72, 120, 0.09);
}
.dk-primer__btn--start:hover { box-shadow: 0 0 0 10px rgba(74, 72, 120, 0.12); }
