/* The free statement checker. Builds on home.css (tokens, cards, buttons, the small hatched pictures). */

.top nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--sunken);
}

/* ---- Top: the pitch beside the drop box ---- */

.tool-top {
  display: grid;
  grid-template-columns: 6fr 5fr;
  align-items: center;
  gap: 48px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.tool-top h1 {
  font-size: clamp(28px, 3vw, 40px);
}

.tool-top .lede {
  max-width: 560px;
  margin-bottom: 20px;
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
}

.ticks li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticks svg,
.files li > svg {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--gold-tint);
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 32px;
  border: 2px dashed var(--border-strong);
  text-align: center;
  transition:
    border-color 120ms,
    background-color 120ms;
}

.drop.over {
  border-color: var(--ink);
  background: var(--gold-tint);
}

.drop > svg {
  width: 84px;
}

.drop h2 {
  font-size: 22px;
}

.drop p {
  max-width: 420px;
  font-size: 14px;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.drop .tip {
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--gold-tint);
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

html:not(.ready) .needs-script {
  display: none;
}

.btn.quiet {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn.quiet:hover {
  background: var(--sunken);
}

.btn:has(+ input:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus-halo);
}

#status:empty,
#report[hidden] {
  display: none;
}

#status,
#report {
  padding-top: 0;
  padding-bottom: 16px;
  scroll-margin-top: 16px;
}

/* ---- The files dropped ---- */

.files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px 20px;
}

.files ul {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.files li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}

.files li b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.files li p {
  color: var(--ink-muted);
}

.files li.problem > svg {
  background: var(--warning-tint);
  color: var(--warning);
}

.files li.problem p {
  color: var(--ink);
}

.files .actions {
  margin-top: 0;
}

.busy {
  padding: 18px 20px;
  font-weight: 600;
}

.progress {
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sunken);
}

.progress i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: var(--gold);
  animation: slide 1.1s ease-in-out infinite alternate;
}

@keyframes slide {
  from {
    transform: translateX(-20%);
  }
  to {
    transform: translateX(170%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress i {
    width: 100%;
    animation: none;
  }
}

/* ---- The report ---- */

.report {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report section {
  padding: 0;
}

.report .label,
.files .label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.report .label svg {
  width: 14px;
  height: 14px;
}

.report .label.over {
  margin-bottom: 10px;
}

.report .label.sub {
  margin-top: 18px;
  margin-bottom: 10px;
}

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 40px;
  padding: 26px 30px;
}

.lead:not(:has(.lead-picture)) {
  grid-template-columns: minmax(0, 1fr);
}

.lead h2 {
  max-width: 860px;
  margin-top: 8px;
  font-size: clamp(22px, 2.3vw, 30px);
  text-wrap: balance;
  outline: none;
}

.figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 400;
}

.figure b {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.figure.big {
  margin-top: 10px;
  font-size: 16px;
}

.figure.big b {
  font-size: 46px;
  line-height: 1.1;
}

.report .detail {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-muted);
}

.lead .detail {
  margin-top: 6px;
}

.lead-picture {
  padding-top: 34px;
}

.lead .summary {
  margin-top: 12px;
  font-size: 16px;
  text-wrap: pretty;
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 16px 20px;
  border-color: var(--gold);
  background: var(--gold-tint);
}

.callout > div {
  flex: 1 1 420px;
}

.callout h2 {
  font-size: 16px;
  letter-spacing: 0;
}

.callout p {
  margin-top: 2px;
  font-size: 14px;
}

.report .finds {
  grid-template-columns: repeat(2, 1fr);
}

.report .find h3 {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  text-wrap: pretty;
}

.report .find figure {
  margin-top: 4px;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.pair > :only-child {
  grid-column: 1 / -1;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  padding: 20px !important;
}

.sentence {
  margin-top: 6px;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 600;
  text-wrap: pretty;
}

.barlist,
.leaks,
.trends,
.parts ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.barlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.barlist .keys,
.hours .keys {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.barlist .keys span {
  font-weight: 500;
}

.barlist b,
.rows td,
.worth b,
.why td:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.barlist .track,
.hours .track {
  height: 14px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--sunken);
}

.barlist .track i,
.hours .track i {
  display: block;
  height: 100%;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

.barlist .fine {
  margin-top: 3px;
}

.leaks li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.leaks .leak {
  font-size: 12px;
  font-weight: 600;
}

.leaks li p {
  margin-top: 4px;
}

.worth {
  flex: none;
  color: var(--ink-muted);
  white-space: nowrap;
}

.worth b {
  font-size: 16px;
  color: var(--ink);
}

.rows {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rows th,
.rows td {
  padding: 7px 0;
  border-top: 1px solid var(--border);
  text-align: left;
  font-weight: 500;
}

.rows thead th {
  border-top: 0;
  padding-top: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}

.rows th span {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-subtle);
}

.rows td,
.rows thead th:not(:first-child) {
  padding-left: 16px;
  text-align: right;
  white-space: nowrap;
}

.rows td:nth-child(2) {
  font-weight: 400;
  color: var(--ink-muted);
}

.trends {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  font-size: 14px;
}

.trends b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.move {
  padding: 18px 20px !important;
  border-color: var(--gold);
  background: var(--gold-tint);
}

.move p:last-child {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  text-wrap: balance;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 22px 26px !important;
}

.cta > div {
  flex: 1 1 420px;
}

.cta h2 {
  font-size: 20px;
}

.cta p {
  margin-top: 4px;
  color: var(--ink-muted);
}

.disclaimer {
  margin-top: 0;
}

/* ---- Show me why ---- */

.why {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.lead .why {
  max-width: 640px;
  margin-top: 16px;
}

.why summary {
  width: fit-content;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.why .formula {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.why ol {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.why ol li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  color: var(--ink-muted);
}

.why ol b {
  color: var(--ink);
  text-align: right;
}

.why table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

.why td {
  padding: 4px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 400;
}

.why td:first-child {
  width: 1%;
  padding-right: 14px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.why td:last-child {
  padding-left: 14px;
  text-align: right;
  white-space: nowrap;
}

.why .fine {
  margin-top: 4px;
}

/* ---- Pictures home.css doesn't have ---- */

.hatch-card {
  background-color: var(--card);
  background-image: repeating-linear-gradient(-45deg, transparent 0 3px, var(--hatch) 3px 4px);
}

.report figure b,
.report figure span {
  font-weight: 600;
}

.report figure span {
  font-weight: 400;
}

.parts ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
}

.parts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.parts li i {
  flex: none;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
}

.parts li span {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
}

.pills .wrap-row {
  flex-wrap: wrap;
  height: auto;
}

.pills .wrap-row i {
  flex: none;
  width: 11px;
  height: 26px;
}

.pills .hollow {
  border-style: dashed;
  border-color: var(--border-strong);
}

.hours b {
  font-size: 13px;
}

.hours .keys {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ---- Where to find the file ---- */

.how {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  padding: 24px 28px;
}

.how h2 {
  font-size: 20px;
}

.how ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink-muted);
}

.how ol b {
  font-weight: 600;
  color: var(--ink);
}

.how table {
  align-self: center;
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.how th,
.how td {
  padding: 6px 0;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.how tr:first-child th,
.how tr:first-child td {
  border-top: 0;
}

.how th {
  padding-right: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.how td {
  color: var(--ink-muted);
}

/* ---- Narrower screens ---- */

@media (max-width: 1020px) {
  .tool-top,
  .how {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .lead {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .lead-picture {
    max-width: 360px;
    padding-top: 0;
  }

  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .drop {
    padding: 22px 18px;
  }

  .lead {
    padding: 20px;
  }

  .figure.big b {
    font-size: 38px;
  }

  .report .finds {
    grid-template-columns: 1fr;
  }

  .why ol li {
    grid-template-columns: 1fr auto;
  }

  .why ol li span:first-child {
    grid-column: 1 / -1;
    color: var(--ink);
  }

  .how {
    padding: 20px;
  }

  .how th {
    white-space: normal;
  }
}
