/* The free AI check (server/free-check.js): the form, the progress page and the result. */
.check-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.check-hero { padding-bottom: 28px; }
.check-hero h1 { overflow-wrap: anywhere; }

.check-engines { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.check-engines li { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; }
.check-engines img, .check-table img, .check-answer summary img { width: 18px; height: 18px; flex: none; }
.check-letter { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; background: #4079ca; color: #fff; font: 700 11px/1 var(--body); }

.check-form { display: grid; gap: 16px; padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 18px 50px -34px rgba(48, 34, 92, .45); }
.check-field { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
.check-field input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #c9c4d3; border-radius: 10px; background: #fff; color: var(--ink); font: 400 16px/1.4 var(--body); }
.check-field input:focus { outline: 2px solid var(--accent-dark); outline-offset: 1px; border-color: var(--accent-dark); }
.check-field input[aria-invalid="true"] { border-color: var(--red); }
.check-field small { color: var(--muted); font-size: 13px; font-weight: 400; }
.check-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check-submit { justify-content: center; min-height: 50px; font-size: 15px; }
.check-submit:disabled { opacity: .7; cursor: progress; }
.check-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.check-error { padding: 12px 14px; border-left: 3px solid var(--red); border-radius: 0 9px 9px 0; background: #fbefee; color: #6e2a25; font-size: 14px; line-height: 1.6; }
.check-error a { color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

.check-steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: clamp(30px, 5vw, 56px) 0 0; padding: 0; list-style: none; }
.check-steps li { padding: 22px; border-top: 1px solid var(--line); }
.check-steps li > span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lavender-soft); color: var(--accent-dark); font-weight: 700; font-size: 13px; }
.check-steps h2 { margin-top: 14px; font: 560 21px/1.3 var(--heading); letter-spacing: -.02em; }
.check-steps p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.65; }

.check-progress { max-width: 560px; height: 8px; margin-top: 26px; overflow: hidden; border-radius: 99px; background: var(--lavender-soft); }
.check-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s var(--ease-out); }
.check-asked { max-width: 760px; }
.check-asked h2, .check-answers > h2 { font: 560 clamp(22px, 2.6vw, 28px)/1.3 var(--heading); letter-spacing: -.02em; }
.check-asked ol { margin: 14px 0 0; padding-left: 22px; color: var(--muted); line-height: 1.8; }
.check-actions { margin-top: 26px; }

.check-score { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: clamp(22px, 4vw, 48px); padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.check-score-figure { font-size: 18px; line-height: 1.4; }
.check-score-figure strong { display: block; font: 600 clamp(44px, 6vw, 68px)/1 var(--heading); letter-spacing: -.04em; }
.check-range { margin-top: 26px; }
/* A number line reads left to right in every language, so the band and its scale agree. */
.check-range-track, .check-range-scale { direction: ltr; }
.check-range-track { position: relative; height: 14px; border-radius: 99px; background: linear-gradient(90deg, var(--line) 0 0) center / 100% 2px no-repeat; }
.check-range-band { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--lavender); opacity: .75; }
.check-range-point { position: absolute; top: 50%; width: 18px; height: 18px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent-dark); box-shadow: 0 0 0 1px var(--accent-dark); transform: translate(-50%, -50%); }
.check-range-scale { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.check-range figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.check-cited { margin-top: 16px; font-size: 14px; }
.check-table { width: 100%; border-collapse: collapse; font-size: 14px; align-self: start; }
.check-table th, .check-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
.check-table thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.check-table tbody th { font-weight: 650; }
.check-table tbody th > span { display: inline-flex; align-items: center; gap: 9px; }
.check-missing { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }

.check-answers { margin-top: clamp(36px, 5vw, 56px); }
.check-answers > .check-muted { margin-top: 8px; }
.check-muted { color: var(--muted); font-size: 14px; line-height: 1.65; }
.check-question { margin-top: 28px; }
.check-question h3 { font: 560 19px/1.4 var(--heading); letter-spacing: -.015em; }
.check-question h3 span { display: block; margin-bottom: 4px; color: var(--accent); font: 650 12px/1.4 var(--body); letter-spacing: .04em; text-transform: uppercase; }
.check-answer { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.check-answer summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 52px; padding: 12px 16px; cursor: pointer; list-style: none; }
.check-answer summary::-webkit-details-marker { display: none; }
.check-answer summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s var(--ease-out); }
.check-answer[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.check-answer-name { font-weight: 650; }
.check-badge { padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; }
.check-badge--yes { background: #e3f0e7; color: var(--green); }
.check-badge--no { background: #f6e7e5; color: var(--red); }
.check-badge--none { background: #efedf2; color: var(--muted); }
.check-badge--cited { background: var(--lavender-soft); color: var(--accent-dark); }
.check-answer-body { padding: 0 16px 18px; border-top: 1px solid var(--line); }
.check-answer-text { max-width: 760px; padding-top: 14px; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.check-answer-text p + p { margin-top: 10px; }
.check-answer-text mark { padding: 0 2px; border-radius: 3px; background: var(--yellow-soft); color: inherit; font-weight: 650; }
.check-sources { margin-top: 16px; }
.check-sources h4 { font-size: 13px; font-weight: 700; }
.check-sources ol { margin: 8px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.check-sources a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.check-sources small { color: var(--muted); }
.check-own { margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: var(--lavender-soft); color: var(--accent-dark); font-size: 12px; font-style: normal; font-weight: 650; }

.check-track { margin-top: clamp(40px, 6vw, 64px); }
.check-track > p:first-of-type { max-width: 680px; font-size: 15px; line-height: 1.7; color: var(--ink); }
.check-track .button { margin-top: 20px; min-height: 48px; font-size: 14px; }
.check-track .check-note { margin-top: 10px; }
.check-again { margin-top: 16px; font-size: 14px; }
.check-again a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .check-hero-grid, .check-score { grid-template-columns: 1fr; }
  .check-steps ol { grid-template-columns: 1fr; gap: 0; }
  .check-steps li { padding: 18px 0; }
}
@media (prefers-reduced-motion: reduce) { .check-progress span, .check-answer summary::after { transition: none; } }
