/* truedone.pages.dev (WEB-05): one stylesheet for every page, under the site's content security policy: no inline
   style, no external font or image. The system font stack, a measure of about 70 characters, one accent colour, and
   a dark scheme. The verdict badge takes the class verdict-<label suffix>; Not applicable, which sets no label, is
   verdict-none. */

:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #59636e;
  --line: #d1d9e0;
  /* the field's border: its only boundary, 3:1 or more on --bg (WCAG 1.4.11, WEB-09) */
  --field-bd: #818b98;
  --card: #f6f8fa;
  --accent: #0b63ce;
  --accent-fg: #ffffff;
  --warn: #9a6700;
  --focus: #0b63ce;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* verdict badges: background, text, border */
  --tampered-bg: #ffebe9; --tampered-fg: #a40e26; --tampered-bd: #ffb8b0;
  --review-bg: #fff4d6; --review-fg: #7d4e00; --review-bd: #f2cc60;
  --yes-bg: #dafbe1; --yes-fg: #116329; --yes-bd: #8ddb9e;
  --weak-bg: #eef3d9; --weak-fg: #4f5b10; --weak-bd: #c4d18a;
  --grey-bg: #eff2f5; --grey-fg: #424a53; --grey-bd: #c8d0d8;
  --bluegrey-bg: #e7eef6; --bluegrey-fg: #2c4a66; --bluegrey-bd: #b6c8db;
  --none-bg: transparent; --none-fg: #59636e; --none-bd: #d1d9e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #9198a1;
    --line: #30363d;
    --field-bd: #6e7681;
    --card: #151b23;
    --accent: #4493f8;
    --accent-fg: #0d1117;
    --warn: #d29922;
    --focus: #4493f8;
    --tampered-bg: #3d1418; --tampered-fg: #ffa198; --tampered-bd: #8e1519;
    --review-bg: #3a2a07; --review-fg: #f2cc60; --review-bd: #7d5e10;
    --yes-bg: #10301a; --yes-fg: #7ee2a0; --yes-bd: #1f6f3a;
    --weak-bg: #2a2f12; --weak-fg: #c9d68a; --weak-bd: #5c6420;
    --grey-bg: #21262d; --grey-fg: #c9d1d9; --grey-bd: #3d444d;
    --bluegrey-bg: #1b2734; --bluegrey-fg: #a8c3dd; --bluegrey-bd: #34506b;
    --none-bg: transparent; --none-fg: #9198a1; --none-bd: #3d444d;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
}

/* one column, about 70 characters wide */
.site-header, main, .site-footer {
  max-width: 70ch;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-header {
  padding-top: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.site-header .name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-header .name a { color: var(--fg); text-decoration: none; }
.site-header .tagline { margin: .25rem 0 0; color: var(--muted); }

main { padding-top: 2rem; padding-bottom: 3rem; }

h1 { font-size: 1.75rem; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; line-height: 1.3; margin: 2rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .25rem; }
p { margin: 0 0 1rem; }

a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

pre, code {
  font-family: var(--mono);
  font-size: .9rem;
}
pre {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* home: the paste box is the one thing to do */
#go {
  display: flex;
  gap: .5rem;
  margin: 1.5rem 0 2rem;
}
#go input {
  flex: 1 1 auto;
  min-width: 0;
  padding: .7rem .9rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--field-bd);
  border-radius: 6px;
}
/* the example link format, at the muted token: 4.5:1 or more on --bg in both themes (WCAG 1.4.3, WEB-09) */
#go input::placeholder { color: var(--muted); opacity: 1; }
#go input:focus { border-color: var(--accent); outline: 2px solid var(--focus); outline-offset: 0; }
button, .signin {
  display: inline-block;
  padding: .7rem 1.2rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent-fg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .signin:hover { filter: brightness(1.08); }

/* the PR page */
.target, .label, .precomputed, .partial { color: var(--muted); }
.title { margin-bottom: .75rem; }

/* the verdict badge, on the PR page, the precomputed list and /why */
.verdict {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .2rem .7rem;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid var(--none-bd);
  border-radius: 999px;
  color: var(--none-fg);
  background: var(--none-bg);
}
.verdict-tampered { color: var(--tampered-fg); background: var(--tampered-bg); border-color: var(--tampered-bd); }
.verdict-review { color: var(--review-fg); background: var(--review-bg); border-color: var(--review-bd); }
.verdict-yes { color: var(--yes-fg); background: var(--yes-bg); border-color: var(--yes-bd); }
.verdict-weak { color: var(--weak-fg); background: var(--weak-bg); border-color: var(--weak-bd); }
.verdict-no-evidence, .verdict-could-not-run { color: var(--grey-fg); background: var(--grey-bg); border-color: var(--grey-bd); }
.verdict-pending, .verdict-unrun { color: var(--bluegrey-fg); background: var(--bluegrey-bg); border-color: var(--bluegrey-bd); }
.verdict-none { color: var(--none-fg); background: var(--none-bg); border-color: var(--none-bd); }
/* the verdict is a link to its section of /why (WEB-07) */
.verdict-line { margin: 0 0 1rem; }
.verdict-line .verdict { margin: 0; }
a.verdict { text-decoration: none; }
a.verdict:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* text for screen readers and tools that read the page, out of sight */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* lesser findings under the verdict's own reasons */
.also { margin: 0 0 .25rem; color: var(--muted); font-size: .95rem; }
.also-list { color: var(--muted); }

/* home: one example page per verdict */
.examples { list-style: none; margin: 0 0 2rem; padding: 0; }
.examples li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; padding: .35rem 0; }
.examples .verdict { margin: 0; font-size: .85rem; }
/* WEB-11: the verdict ladder under a PR's badge, Tampered up to a green Proven, this PR's rung in its badge */
.ladder { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; list-style: none; margin: 0 0 .5rem; padding: 0; }
.ladder li { display: inline-flex; align-items: center; }
.ladder .verdict, .ladder .rung { margin: 0; padding: .1rem .55rem; font-size: .8rem; font-weight: 600; line-height: 1.5; border-radius: 999px; }
.ladder .rung { color: var(--muted); border: 1px solid var(--line); }
.ladder [aria-current] .verdict { box-shadow: 0 0 0 2px var(--fg); }
.this-pr { margin-left: .35rem; font-size: .8rem; color: var(--muted); }
.green-line { margin: 0 0 1rem; color: var(--muted); }
/* WEB-12: what is not released yet, and home's list of what works today */
.not-released { margin: -.25rem 0 1rem; font-size: .9rem; color: var(--muted); }
.works-today { margin: 0 0 2rem; padding-left: 1.2rem; }
.works-today li { margin: .25rem 0; }
.example-target { color: var(--muted); font-size: .9rem; }

/* the reason lines, a plain list */
.reasons {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}
.reasons li { margin: .25rem 0; }

.change { margin-bottom: 1.5rem; }
/* WEB-08: an expired sign-in's notice above a PR, the rate limit's reset time, the start-again line, /why's example */
.notice { padding: .6rem .8rem; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.reset, .example { color: var(--muted); }
.signin-error a { font-weight: 600; }

/* the precomputed list of a repository's PRs */
.prs { list-style: none; margin: 0 0 2rem; padding: 0; }
.prs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}
.prs .verdict { margin: 0; font-size: .85rem; }

/* the next rung, a card */
.next {
  margin: 2.5rem 0 0;
  padding: 1.25rem 1.25rem .25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.next h2 { margin-top: 0; font-size: 1rem; }
.warning { color: var(--warn); }

/* /why: one section per label */
.why section { padding: .25rem 0 .5rem; border-bottom: 1px solid var(--line); }
.why section:last-of-type { border-bottom: 0; }
.why h2 { font-family: var(--mono); font-size: 1rem; }

.site-footer {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
/* the smaller size goes on the list, not the box: 70ch would shrink with it and the column would not line up */
.site-footer ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

@media (max-width: 34rem) {
  #go { flex-direction: column; }
  h1 { font-size: 1.5rem; }
}
