/* /ngu-phap/ and /ngu-phap/<cấp>/<mẫu> (server/grammar_pages.py). Shares the
   kanji pages' frame (css/kanji.css); these are the grammar-only parts. */
.gp-eyebrow { margin: 0 0 var(--space-2); font-size: var(--text-xs); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); }
.gp-title { font-family: var(--font-jp); font-weight: 700; font-size: clamp(30px, 6vw, 44px); line-height: 1.25;
  margin: 0; overflow-wrap: anywhere; }
.gp-meaning { font-weight: 600; color: var(--ink); }
.gp-facts dt { width: 90px; }
.gp-facts dd { font-weight: 500; overflow-wrap: anywhere; }
.gp-explain { margin: 0; max-width: 46em; line-height: 1.75; color: var(--ink-soft); white-space: pre-line; }
.gp-example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); }
.gp-ex-jp { font-family: var(--font-jp); font-size: var(--text-xl); margin: 0; line-height: 1.7; }
.gp-ex-vi { margin: var(--space-2) 0 0; color: var(--ink-soft); }
.gp-say { font: inherit; font-size: 18px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  min-width: 44px; min-height: 44px; cursor: pointer; vertical-align: middle; }
.gp-say:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gp-list { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gp-row { display: grid; gap: 2px; padding: 10px 14px; min-height: 44px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--ink); }
.gp-row:hover, .gp-row:focus-visible { border-color: var(--accent); outline: none; }
.gp-row[hidden] { display: none; }
.gp-row-p { font-family: var(--font-jp); font-weight: 700; overflow-wrap: anywhere; }
.gp-row-m { font-size: var(--text-sm); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-lessons { display: grid; gap: var(--space-2); }
.gp-lesson { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.gp-lesson:hover { border-color: var(--accent); }
.gp-lesson-lv { flex: none; font-size: var(--text-xs); font-weight: 700; color: var(--accent); }
.gp-levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-4); }
.gp-levels a { min-width: 44px; min-height: 36px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.gp-levels a:hover { border-color: var(--accent); }
.gp-pager { font-family: inherit; gap: var(--space-3); }
.gp-pager a { font-family: var(--font-jp); font-size: var(--text-base); }
.gp-points { margin: 0; padding-left: 1.2em; max-width: 46em; line-height: 1.75; color: var(--ink-soft); display: grid; gap: 6px; }
.gp-points li::marker { color: var(--accent); }

/* Touch targets (GUI plan 2.2). On a touch screen, or a narrow one,
   everything tapped is at least 44 px in each direction (WCAG 2.5.5, Apple
   HIG), with at least 8 px between neighbours. With a mouse the sizes above
   stay as they are. tests/test_touch_targets.py keeps these blocks. */
@media (pointer: coarse), (max-width: 720px) {
  .gp-levels a { min-height: 44px; }
}
