/* The free check (/check): one card like the tool's, the draft pane on top,
   the console under it, the reading under that. Tokens from styles.css;
   the page around it from site.css (doc-head, steps, footer). */

.visually-hidden {
  position: absolute !important; 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;
}

.check-card {
  margin-top: var(--s-8);
  background: var(--g2);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) * 2);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 24px 60px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.check-card:focus-within { border-color: var(--line-2); }

.check-pane-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  min-height: 52px; padding: var(--s-3) var(--s-6);
  border-bottom: 1px solid var(--line);
  background: var(--blue-wash);
}
.check-pane-title { font-size: var(--t-3); font-weight: 500; color: var(--fg); line-height: 1.2; }
.check-counts { font-size: var(--t-1); color: var(--fg-3); }

.check-text {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 260px; padding: var(--s-6) var(--s-8) var(--s-8);
  background: transparent; border: 0; outline: none; resize: vertical;
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.7; color: var(--fg);
  caret-color: var(--accent);
}
.check-text::placeholder { color: var(--fg-3); }

.check-console {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap;
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--line);
  background: var(--g1);
}
.check-status { margin: 0; font-size: var(--t-2); color: var(--fg-2); line-height: 1.4; }
.check-status[data-kind="error"] { color: var(--ai); }
.check-status[data-kind="loading"] { color: var(--fg-2); }
.check-actions { display: flex; align-items: center; gap: var(--s-4); margin-left: auto; }

/* the reading */
.check-result { padding: var(--s-6) var(--s-6) var(--s-8); border-top: 1px solid var(--line); display: grid; gap: var(--s-6); }
.check-verdict { display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; }
.check-verdict-n { margin: 0; font-family: var(--mono); font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; color: var(--fg); }
.check-verdict-unit { font-size: 0.5em; color: var(--fg-2); margin-left: 2px; }
.check-verdict[data-band="human"] .check-verdict-n { color: var(--human); }
.check-verdict[data-band="mixed"] .check-verdict-n { color: var(--mixed); }
.check-verdict[data-band="ai"] .check-verdict-n { color: var(--ai); }
.check-verdict-words { display: grid; gap: var(--s-1); }
.check-verdict-h { margin: 0; font-family: var(--serif); font-size: var(--t-5); line-height: 1.25; color: var(--fg); }
.check-verdict-p { margin: 0; font-size: var(--t-2); color: var(--fg-2); line-height: 1.5; max-width: 60ch; }

.check-sentences { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); max-width: 70ch; }
.check-sentences li {
  padding: var(--s-2) var(--s-3); border-radius: var(--r);
  font-family: var(--serif); font-size: 1rem; line-height: 1.6; color: var(--fg);
  background: var(--risk-0);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); align-items: baseline;
}
.check-sentences li[data-risk="1"] { background: var(--risk-1); }
.check-sentences li[data-risk="2"] { background: var(--risk-2); }
.check-sentences li[data-risk="3"] { background: var(--risk-3); }
.check-sentences li[data-risk="4"] { background: var(--risk-4); }
.check-sentences li[data-risk="5"] { background: var(--risk-5); }
.check-sentences .num { font-size: var(--t-1); color: var(--fg-3); }

.check-cta { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; padding-top: var(--s-2); }
.check-cta .doc-cta-fine { max-width: 48ch; line-height: 1.5; }

@media (max-width: 720px) {
  .check-text { padding: var(--s-5) var(--s-5) var(--s-6); min-height: 220px; }
  .check-console { padding: var(--s-4) var(--s-5); }
  .check-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .check-result { padding: var(--s-5) var(--s-5) var(--s-6); }
  .check-sentences li { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
}
