/* Pages around the tool. Every colour and typeface is a token from app.css, and every component (banner, band,
   headline, button, card, step list, tabs...) is defined once in app.css: docs/DESIGN_SYSTEM.md. This file holds only
   the layout of the home page (the dark opening, the questions, the demo scan, the plans). */
/* ---------- building blocks ---------- */
.sec-h {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}
/* ---------- shared by all site pages ---------- */
/* The header stays at the top while the page scrolls, so signing in or starting a check is always one click away
   (Sima, 30.11). An anchor the page jumps to stops below it. */
/* A message stays in sight under the header, wherever the page was scrolled to (Sima, 30.11: the error of a form
   near the bottom of the account page was written at the top, out of sight, and the button seemed to do nothing). */
/* ---------- home: the ink band ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 44px;
  align-items: start; /* the sheet grows as it is answered; the headline beside it stays where it is */
  margin-top: -22px;
  padding: 46px 0 64px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--deep-rule) 39px 40px);
  box-shadow: 0 0 0 100vmax var(--deep);
  clip-path: inset(0 -100vmax);
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero mark {
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 100% 62%/100% 78%;
  color: var(--marker-ink);
  padding: 0 0.12em;
  margin: 0 -0.06em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero .lead {
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--on-deep-2);
  max-width: 46ch;
}
.hero .cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hero .promise {
  font-size: 0.9rem;
  max-width: 44ch;
}
/* ---------- home: the sheet of questions, beside the headline ---------- */
.try {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 6px;
  box-shadow:
    0 30px 60px -28px var(--shadow),
    10px 10px 0 var(--marker);
}
.try > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 12px;
  border-bottom: 2px solid var(--paper-ink);
}
.try > header p {
  color: var(--paper-ink-2);
  font-size: 0.86rem;
  margin-top: 4px;
}
.stamp {
  inline-size: 86px;
  block-size: 86px;
  flex: none;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  line-height: 1;
  transform: rotate(9deg);
  color: var(--paper-ink-2);
  border: 3px double currentColor;
  outline: 1.5px solid currentColor;
  outline-offset: 3px;
  transition: color 0.2s;
}
.stamp b {
  font-family: var(--poster);
  font-size: 2.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stamp span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.stamp.has-gaps {
  color: var(--paper-bad);
}
.stamp.clean {
  color: var(--paper-ok);
}
.builder {
  border: 0;
  margin: 0;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  border-bottom: 2px solid var(--paper-ink);
  background: var(--marker);
}
.builder legend {
  float: inline-start;
  padding: 0;
  font-weight: 700;
}
.builder .pick span {
  background: var(--paper);
}
.builder .pick input:checked + span {
  background: var(--paper-ink);
  border-color: var(--paper-ink);
  color: var(--paper);
}
/* a sentence written three ways, for the three kinds of visitor: only the one that fits is shown */
main[data-persona="dev"] [data-who]:not([data-who="dev"]),
main[data-persona="ai"] [data-who]:not([data-who="ai"]),
main[data-persona="other"] [data-who]:not([data-who="other"]) {
  display: none;
}
.qs {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: q;
}
.qs li {
  border-bottom: 1px solid var(--paper-line);
  counter-increment: q;
}
.qs li:last-child {
  border-bottom: 0;
}
.qs fieldset {
  border: 0;
  margin: 0;
  padding: 9px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.qs legend {
  float: inline-start;
  padding: 0;
  font-size: 0.94rem;
  line-height: 1.4;
  max-width: 44ch;
}
.qs legend::before {
  content: counter(q);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper-ink-2);
  margin-inline-end: 0.7em;
}
.pick {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: none;
  justify-self: start;
  /* never wider than its place: on a very narrow screen the choices go to a second row and do not run off the side */
  max-inline-size: 100%;
}
.pick label {
  cursor: pointer;
}
.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
/* the answers look like buttons to press, not like labels */
.pick span {
  display: block;
  padding: 6px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--paper-ink-2);
  border: 1.5px solid var(--paper-ink-2);
  border-radius: 999px;
  color: var(--paper-ink);
  transition:
    background 0.12s,
    border-color 0.12s;
}
.pick label:hover span {
  border-color: var(--paper-ink);
  background: var(--marker);
}
.qs .said:not(:empty) {
  padding: 0 20px 12px;
}
.qs .said .gap {
  margin: 0;
}
.qs .ok-line {
  margin: 0;
  color: var(--paper-ok);
  font-weight: 700;
}
.pick input:focus-visible + span {
  outline: 2px solid var(--paper-focus);
  outline-offset: 2px;
}
.pick input[value="yes"]:checked + span {
  background: var(--paper-ok);
  border-color: var(--paper-ok);
  color: var(--paper);
}
.pick input[value="no"]:checked + span {
  background: var(--paper-bad);
  border-color: var(--paper-bad);
  color: var(--paper);
}
.pick input[value="unknown"]:checked + span {
  background: var(--marker);
  border-color: var(--paper-ink);
}
/* ---------- home: what the answers add up to ---------- */
.qs .said .why {
  color: var(--ink-2);
}
.try .found {
  border-top: 2px solid var(--paper-ink);
  padding: 16px 20px 20px;
}
.try .found h3 {
  margin: 0 0 12px;
  color: var(--paper-ink);
}
.found-next a:not(.btn) {
  color: var(--marker);
}
.found-next {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-radius: var(--r);
  padding: 18px 22px;
}
.found-next p {
  max-width: 62ch;
}
/* ---------- home: the demo scan ---------- */
.scan-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}
.term {
  background: var(--term);
  color: var(--term-ink);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--term-line);
}
.term-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
}
.term pre {
  background: none;
  color: inherit;
  margin: 0;
  padding: 14px 16px;
  min-block-size: 320px;
  max-block-size: 360px;
  overflow: auto;
  font-size: 0.84rem;
  line-height: 1.75;
  white-space: pre-wrap;
  direction: ltr;
  text-align: start;
}
.term pre span {
  display: block;
}
.term pre span[dir="rtl"] {
  text-align: right;
}
.term .prompt {
  color: var(--marker);
}
.ledger {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.ledger header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--ink);
  font-size: 0.85rem;
  color: var(--ink-2);
}
.ledger header strong {
  color: var(--ink);
  font-size: 1rem;
}
.ledger-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.ledger-empty {
  padding: 28px 18px;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.ledger .row-f {
  border-bottom: 1px solid var(--line);
}
.ledger .row-f:last-of-type {
  border-bottom: 0;
}
.ledger .row-f summary {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 16px 11px 0;
  cursor: pointer;
  list-style: none;
}
.ledger .row-f summary::-webkit-details-marker {
  display: none;
}
.ledger .row-f summary:hover b {
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-decoration-thickness: 0.5em;
  text-underline-offset: -0.25em;
  text-decoration-skip-ink: none;
}
.ledger .row-f[open] summary {
  background: var(--surface-2);
}
.ledger .row-f > p {
  padding: 10px 16px 14px;
  font-size: 0.92rem;
  background: var(--surface-2);
}
.ledger .row-f i {
  align-self: stretch;
  background: var(--na);
}
.ledger .row-f.red i {
  background: var(--bad);
}
.ledger .row-f.orange i {
  background: var(--mid);
}
.ledger .row-f.yellow i {
  background: var(--warn);
}
.ledger .row-f.ok i {
  background: var(--ok);
}
.ledger .row-f b {
  display: block;
  font-size: 0.95rem;
}
.ledger .row-f small {
  color: var(--ink-2);
  font-size: 0.82rem;
}
.ledger .row-f code {
  font-size: 0.72rem;
}
.ledger footer {
  padding: 10px 16px;
  margin: 0;
  max-width: none;
  background: var(--surface-2);
  font-size: 0.8rem;
  color: var(--ink-2);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
/* ---------- home: who wrote the checks ---------- */
.who {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 34px;
  padding: 34px 0;
  border-block: 3px solid var(--ink);
}
.who-text p {
  max-width: 54ch;
  font-size: 1.05rem;
}
.who-text p + p {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.facts {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.facts > div:first-child {
  padding-top: 0;
}
.facts > div:last-child {
  border-bottom: 0;
}
.facts dt {
  font-family: var(--poster);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 0.9;
  color: var(--accent);
  white-space: nowrap;
}
.facts dd {
  margin: 0;
  max-width: 42ch;
}
/* ---------- home: steps, checks, plans ---------- */
/* The nine steps, as a grid of short tiles: the name and its one question. A step that is not open yet is quieter. */
/* each step is a card; the bar on its top fills a ninth more on every step, so the nine read as a climb */
/* The account page: where each step of a project stands. One tile for each step. */
/* a command holds a long identifier with no place to break: it wraps inside its tile and never runs over the next */
/* on a phone the header is one short line: the name and the buttons, without the extra "try now" */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.plan {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan:not(.deep) {
  background: var(--surface);
}
.plan.deep {
  border-color: var(--deep);
  box-shadow: 8px 8px 0 var(--marker);
}
.plan.deep .chip {
  background: var(--marker);
  color: var(--marker-ink);
}
.plan h3 {
  font-size: 1.15rem;
}
.plan .chip {
  align-self: flex-start;
}
.plan ul {
  margin: 6px 0 0;
  padding-inline-start: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95rem;
}
@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr); /* a column never grows past the screen because of what is inside it */
    padding: 30px 0 44px;
    gap: 34px;
  }
  .try {
    transform: none;
    box-shadow:
      0 20px 40px -24px var(--shadow),
      6px 6px 0 var(--marker);
  }
  .scan-grid {
    grid-template-columns: 1fr;
  }
  .who {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .qs fieldset {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .term pre {
    min-block-size: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  /* the one moment on load: the highlighter runs across the last words of the headline */
  .hero mark {
    animation: mark 0.7s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes mark {
    from {
      background-size: 0% 78%;
      color: inherit;
    }
    to {
      background-size: 100% 78%;
      color: var(--marker-ink);
    }
  }
  /* everything else moves only in answer to the visitor */
  .landed {
    animation: land 0.32s both;
  }
  @keyframes land {
    from {
      transform: translateY(8px);
      opacity: 0.01;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }
  .stamp.thump {
    animation: thump 0.28s cubic-bezier(0.3, 1.6, 0.5, 1);
  }
  @keyframes thump {
    from {
      transform: rotate(9deg) scale(1.35);
      opacity: 0.4;
    }
    to {
      transform: rotate(9deg) scale(1);
      opacity: 1;
    }
  }
}
/* A report shown inside a page: the scan that runs in the browser tab. As wide as the report is written for (it sets
   860px for itself), out of the page's narrow column and centred on it, and as tall as the report (scan.js sizes it),
   so the page scrolls as one and there is no box with a scrollbar of its own (Sima, 30.11). */
.report-frame {
  --report-w: min(920px, 100vw - 32px);
  width: var(--report-w);
  margin-inline: calc((100% - var(--report-w)) / 2);
  height: 80vh;
  border: 0;
  display: block;
}
progress.wide {
  width: 100%;
}
/* The home page after signing in: one project as three steps. The step to take next ("now") is the marked one. */
/* The menu of the signed-in pages: the page you are on is marked (common.js sets aria-current). */
/* Running the scanner from the computer: the steps in order, each a card with its number. */
/* a choice of two (Windows or Mac): the chosen one looks pressed */
