/* Verify page. Surfaces, type, colours and the dial are in /assets/ntk.css.
   The form sits on the page itself, like the keys of the mock; a result is a flat
   plate: the verdict in large thin type with a small flat indicator (green for
   MATCH, orange for NO MATCH and INVALID), the typing match score on the dial,
   the facts as tiles, every check with a thin line icon. */

/* The start page only: the name as text on the left, the keyboard on the right. */
.hero { display: none; }
body[data-state="idle"] .hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(.75rem, 4vw, 2.5rem);
  margin: 2rem 0 2.25rem;
}
.hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 12vw, 4.6rem);
  font-weight: 100;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: lowercase;
  color: var(--ink);
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

main.wrap { padding-top: 1.75rem; }
body[data-state="idle"] main.wrap { padding-top: 0; }

.results {
  display: grid;
  gap: 1rem;
  margin: 0 0 2.5rem;
}
.results:empty { display: none; }
.results > * { min-width: 0; }

/* ---- the form, on the page ----------------------------------------------- */

.panel.pbox { background: none; box-shadow: none; border-radius: 0; }
.panel h1 { margin-bottom: .45em; }
.panel .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
}
.lede { color: var(--ink-2); }
.lede code { white-space: nowrap; }
/* "Try an example": a secondary action, a flat key. */
.panel .link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .7rem 1.3rem;
  border-radius: var(--r-key);
  background: var(--key);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.panel .link:active { transform: translateY(1px); box-shadow: var(--shadow-down); background: var(--key-down); }

/* ---- a result: a flat plate ---------------------------------------------- */

.result { padding: 1.25rem 1.25rem 1rem; }

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.4rem;
}
.stamp-line {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.stamp-line code {
  margin-left: .45em;
  padding: 0;
  background: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: none;
}

/* The verdict: large thin type with a small flat indicator before it. */
.verdict-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
}
.indicator {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--indicator, var(--minor));
}
.verdict {
  margin: 0;
  min-width: 0;
  font-size: clamp(3rem, 15.5vw, 5rem);
  font-weight: 100;
  line-height: 1;
  letter-spacing: -.03em;
  overflow-wrap: break-word;
  color: var(--ink);
}
.tone-match { --indicator: var(--green); }
.tone-match .verdict { color: var(--green); font-weight: 150; }
.tone-nomatch { --indicator: var(--orange); }
.tone-invalid { --indicator: var(--orange); }
.tone-invalid .verdict { color: var(--orange); font-weight: 150; }
.tone-neutral .verdict,
.tone-error .verdict,
.tone-unknown .verdict { font-size: clamp(2.2rem, 11vw, 3.6rem); }

.summary {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.5;
}

/* The typing match score on the dial. */
.meter { margin: 1.5rem 0 .5rem; }
.meter-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .55rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.meter-head strong { margin-left: .35em; font-weight: 700; }

.result-link { margin: 1.5rem 0 0; font-size: .88rem; }
.result-link a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
}
.result-link a span { text-decoration: underline 1px var(--orange); text-underline-offset: .3em; }

.result-body { margin-top: 1.5rem; }

.covered { margin: 0 0 1.5rem; }
.covered figcaption,
.checks-title,
.fact dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.covered blockquote {
  margin: .6rem 0 0;
  padding: .9rem 1rem;
  border-radius: var(--r-key);
  background: var(--key);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.covered blockquote p { margin: 0; white-space: pre-wrap; }

/* The facts: flat tiles, like the keys of the mock. An odd last one spans the row. */
.facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 1.5rem;
}
.fact { padding: .75rem .85rem .8rem; }
.fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
.fact dt { font-size: 9.5px; letter-spacing: .11em; }
.fact dd {
  margin: .3rem 0 0;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.meaning {
  margin: 0 0 1.5rem;
  color: var(--ink-2);
  font-size: .92rem;
}

.checks-title { margin: 0 0 .4rem; }
.checks {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.check {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: .75rem;
  align-items: start;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
}
.check:first-child { border-top: 0; }
.check-text { display: grid; gap: .15rem; min-width: 0; }
.check-detail { color: var(--ink-2); font-size: .84rem; overflow-wrap: anywhere; }
.check-detail a { color: var(--ink); }
.is-skip .check-label { color: var(--ink-2); }

/* PASS, FAIL, SKIP, LINK: a thin line icon and the word in small capitals. */
.mark {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  justify-self: start;
  margin-top: .2rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  color: var(--ink);
}
.mark svg.icon { stroke-width: 2; }
.mark-pass svg.icon { color: var(--green); }
.mark-fail svg.icon { color: var(--orange); }
.mark-skip { color: var(--ink-2); }
.mark-skip svg.icon { color: var(--minor); }

.cmd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .6rem;
  margin-top: .45rem;
}
/* The command: a flat patch. */
.cmd {
  display: inline-block;
  padding: .6rem .75rem;
  border-radius: 10px;
  background: var(--key);
  color: var(--ink);
  line-height: 1.5;
  font-size: .76rem;
  user-select: all;
  -webkit-user-select: all;
}

/* Looking up: a plate with the dial, its needle sweeping. */
.loading { padding: 1.25rem 1.25rem 1.4rem; }
.loading-text { margin: 0 0 1.1rem; font-weight: 300; }

/* ---- about --------------------------------------------------------------- */

.about { margin-top: 3rem; }
.about p { color: var(--ink-2); }
.about .about-meaning { color: var(--ink); font-size: 1.2rem; font-weight: 300; line-height: 1.5; }
body[data-state="result"] .about-meaning { display: none; }

@media (min-width: 40rem) {
  .result, .loading { padding: 1.75rem 1.75rem 1.4rem; }
}
