/* sg.css: spelling, vocabulary and grammar (lane SG). Uses tokens from site.css. */
.sg-art {
  height: 84px;
  border-radius: var(--r);
  margin: 22px 0 6px;
  background:
    radial-gradient(circle at 12% 60%, var(--yellow) 0 22px, transparent 23px),
    radial-gradient(circle at 24% 30%, var(--blue) 0 14px, transparent 15px),
    radial-gradient(circle at 86% 55%, var(--green) 0 26px, transparent 27px),
    radial-gradient(circle at 74% 25%, var(--red) 0 12px, transparent 13px),
    var(--yellow-soft);
  border: 2px solid var(--ink);
}
.sg-list {
  list-style: none;
  padding: 0 !important;
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.sg-w {
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  min-width: 0;
}
.sg-wh {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sg-word {
  font: 800 1.3rem var(--sans);
  letter-spacing: 0.01em;
}
.sg-entry {
  color: var(--muted);
  font-weight: 600;
}
.sg-tick {
  margin-left: auto;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: #fff;
  font: 700 0.85rem var(--sans);
  cursor: pointer;
}
.sg-tick[aria-pressed="true"] {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}
.sg-tick:focus-visible,
.sg-spk:focus-visible,
.sg-tok:focus-visible,
.sg-in:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.sg-spk {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: var(--blue-soft);
  color: var(--blue-ink);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  flex: none;
  vertical-align: middle;
}
.sg-spk:hover {
  background: var(--blue);
  color: #fff;
}
.prose .sg-sentence {
  margin: 8px 0 4px;
  font-size: 1rem;
  line-height: 1.5;
}
.prose .sg-hook {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.sg-stat {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.sg-tool {
  margin: 18px 0;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 18px;
  background: #fff;
}
.sg-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sg-steps span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  font: 700 0.8rem var(--sans);
  color: var(--muted);
}
.sg-steps span.now {
  background: var(--yellow);
  color: var(--ink);
}
.sg-steps span.on {
  background: var(--green-soft);
  color: var(--green);
}
.sg-big {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin: 10px 0;
  border-radius: var(--r);
  background: var(--bg-alt);
  font: 800 clamp(2rem, 9vw, 3.4rem) var(--sans);
  letter-spacing: 0.03em;
  text-align: center;
  overflow-wrap: anywhere;
  padding: 8px;
}
.sg-covered {
  color: var(--muted);
  letter-spacing: 0.2em;
}
.sg-big.sg-ok {
  background: var(--green-soft);
  color: var(--green);
}
.sg-big.sg-no {
  background: var(--red-soft);
}
.sg-big .g {
  color: var(--green);
}
.sg-big .r {
  color: var(--red-ink);
  text-decoration: underline;
}
.sg-lh,
.sg-dh {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 700;
  margin-bottom: 8px;
  align-items: center;
}
.sg-chk {
  font-weight: 600;
  font-size: 0.9rem;
}
.sg-tip {
  color: var(--ink-soft);
}
.sg-in {
  font: 600 1.1rem var(--sans);
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
.sg-in.wide {
  width: 100%;
}
.sg-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0;
}
.sg-row .sg-in {
  flex: 1 1 180px;
}
.sg-lab {
  display: block;
  font-weight: 700;
  margin-top: 12px;
}
.sg-sent {
  min-height: 1.4em;
  font-size: 1.05rem;
  margin: 8px 0;
}
.sg-res {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-alt);
}
.sg-res.ok {
  background: var(--green-soft);
  border-left: 6px solid var(--green);
}
.sg-res.no {
  background: var(--red-soft);
  border-left: 6px solid var(--red);
}
.sg-sum h3 {
  margin: 0 0 8px;
}
.sg-miss li {
  margin: 4px 0;
}
.sg-fs {
  border: 0;
  padding: 0;
  margin: 0 0 10px;
}
.sg-fs legend {
  font-weight: 800;
  margin-bottom: 6px;
}
.sg-rad {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-right: 16px;
  font-weight: 600;
}
.sg-boxes {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.sg-bx {
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  background: #fff;
}
.sg-bx b {
  display: block;
  font: 800 1.4rem var(--display);
}
.sg-bx span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.sg-bx.due {
  border-color: var(--red);
  background: var(--red-soft);
}
@media (max-width: 520px) {
  .sg-boxes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* rules */
.sg-grp {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 12px 0;
}
.sg-grp dt {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.sg-grp dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sg-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-weight: 700;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.prose .sg-watch {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--yellow-soft);
  border-left: 6px solid var(--yellow);
}
@media (max-width: 560px) {
  .sg-grp {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .sg-grp dd {
    margin-bottom: 10px;
  }
}
/* quiz engine */
.sg-quiz {
  margin: 16px 0;
}
.sg-qs {
  list-style: none;
  padding: 0 !important;
  margin: 0;
  counter-reset: q;
}
.sg-q {
  counter-increment: q;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
  background: #fff;
  position: relative;
}
.sg-q::before {
  content: "Q" counter(q);
  position: absolute;
  top: -11px;
  left: 12px;
  background: var(--ink);
  color: #fff;
  font: 800 0.72rem var(--sans);
  padding: 2px 9px;
  border-radius: 999px;
}
.sg-q.right {
  border-color: var(--green);
  background: var(--green-soft);
}
.sg-q.wrong {
  border-color: var(--red);
  background: var(--red-soft);
}
.sg-q.part {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}
.sg-qt {
  font-weight: 600;
  margin: 6px 0 8px;
  line-height: 1.5;
}
.sg-m {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
}
.sg-opts {
  display: grid;
  gap: 8px;
}
.sg-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  min-height: 48px;
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.45;
}
.sg-opt input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: none;
}
.sg-opt:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.sg-opt:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.sg-toks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sg-tok {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 2px solid var(--line-strong);
  background: #fff;
  font: 600 1rem var(--sans);
  cursor: pointer;
}
.sg-tok[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.sg-t {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.sg-t th,
.sg-t td {
  border: 1px solid var(--line-strong);
  padding: 8px;
  text-align: center;
}
.sg-t td:first-child {
  text-align: left;
}
.sg-t input {
  width: 22px;
  height: 22px;
}
.sg-fb {
  margin-top: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.sg-fb:empty {
  display: none;
}
.sg-bar {
  margin: 18px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.sg-score {
  flex: 1 1 100%;
  font-size: 1.05rem;
}
.sg-best {
  font-weight: 700;
  color: var(--green);
}
.sg-spell {
  margin-top: 28px;
}
.sg-sps {
  list-style: none;
  padding: 0 !important;
  counter-reset: s;
}
.sg-sp {
  counter-increment: s;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  margin: 8px 0;
  background: #fff;
}
.sg-sp::before {
  content: counter(s) ".";
  font-weight: 800;
  min-width: 1.6em;
}
.sg-sp.right {
  border-color: var(--green);
  background: var(--green-soft);
}
.sg-sp.wrong {
  border-color: var(--red);
  background: var(--red-soft);
}
.sg-gl {
  flex: 1 1 240px;
  line-height: 1.9;
}
.sg-gl .sg-in {
  min-height: 40px;
  width: 9.5em;
}
.sg-sp .sg-fb {
  flex: 1 1 100%;
  margin: 0;
}
/* glossary and vocabulary */
.sg-terms {
  margin: 0;
}
.sg-term {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.sg-term dt {
  font-weight: 800;
}
.sg-term dd {
  margin: 2px 0 0;
}
.sg-yrs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sg-yrs .btn {
  min-height: 44px;
}
.sg-yrs .btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.sg-count {
  color: var(--muted);
  font-weight: 700;
}
.sg-vgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sg-vw {
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  min-width: 0;
}
.sg-vw[hidden] {
  display: none;
}
.sg-wotd {
  border-color: var(--ink);
  background: var(--yellow-soft);
  margin: 10px 0;
}
.prose .sg-vw h3 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.prose .sg-vw h3 small {
  font: 700 0.75rem var(--sans);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.prose .sg-vw ul {
  margin: 6px 0;
  padding-left: 18px;
}
.prose .sg-vw p {
  margin: 0 0 6px;
  font-size: 1rem;
}
.prose .sg-fam {
  font-size: 0.9rem !important;
  color: var(--ink-soft);
}
.sg-ygroup[hidden],
.sg-term[hidden] {
  display: none;
}
/* print */
.sg-printable {
  display: none;
}
@media print {
  body[data-sg-print] header.top,
  body[data-sg-print] footer,
  body[data-sg-print] .toc,
  body[data-sg-print] .toast,
  body[data-sg-print] .skip {
    display: none !important;
  }
  body[data-sg-print] .prose > *:not(.sg-printable):not(.sg-print-host) {
    display: none !important;
  }
  body[data-sg-print] .sg-print-host > .sg-printable {
    display: none;
  }
  body[data-sg-print="list"] .sg-printable[data-kind="list"],
  body[data-sg-print="paper"] .sg-printable[data-kind="paper"],
  body[data-sg-print="ms"] .sg-printable[data-kind="ms"],
  body[data-sg-print="terms"] .sg-printable[data-kind="terms"] {
    display: block !important;
  }
  .sg-printable {
    font: 11pt/1.4 var(--sans);
    color: #000;
  }
  .sg-printable h1 {
    font-size: 18pt;
    margin: 0 0 6pt;
  }
  .sg-printable h2 {
    font-size: 13pt;
    margin: 14pt 0 6pt;
    border-bottom: 1px solid #000;
  }
  .sg-printable .pb {
    break-before: page;
  }
  .sg-printable .pm {
    font-size: 10pt;
    margin: 0 0 6pt;
  }
  .sg-printable li {
    break-inside: avoid;
    margin-bottom: 8pt;
  }
  .sg-printable .pmk {
    font-size: 9pt;
    color: #444;
  }
  .sg-printable .pq {
    list-style: none;
    padding-left: 0;
    margin: 4pt 0;
  }
  .sg-printable .pq li {
    margin: 2pt 0;
    break-inside: auto;
  }
  .sg-printable .line {
    display: inline-block;
    border-bottom: 1px solid #000;
    min-width: 130pt;
    height: 14pt;
  }
  .sg-printable .line.wide {
    display: block;
    min-width: 0;
    width: 100%;
    height: 20pt;
  }
  .sg-printable .line.short {
    min-width: 95pt;
  }
  .sg-printable table {
    border-collapse: collapse;
    width: 100%;
    font-size: 10pt;
  }
  .sg-printable th,
  .sg-printable td {
    border: 1px solid #000;
    padding: 3pt 5pt;
    text-align: left;
    vertical-align: top;
  }
  .sg-printable.ms,
  .sg-printable[data-kind="ms"] td {
    font-size: 9.5pt;
  }
  .article {
    display: block !important;
    padding: 0 !important;
    max-width: none !important;
  }
  @page {
    margin: 14mm;
  }
}

.sg-spk::before{content:"";width:20px;height:20px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9z'/%3E%3Cpath d='M16.5 8.5a5 5 0 0 1 0 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9z'/%3E%3Cpath d='M16.5 8.5a5 5 0 0 1 0 7'/%3E%3C/svg%3E") center/contain no-repeat}

/* QA3 a11y: selects were 19px tall */
.sg-size,.sg-jump,.sg-setup select{min-height:36px;padding:4px 8px;font-size:1rem}
