/* Home page: hero, usage block, and the FAQ list. Flat selectors, no nesting. */

.docs {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.docs__hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 62ch;
}

.docs__hero h1 {
  margin: 0;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.08;
  letter-spacing: 1.18px;
}

.docs__hero p {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.docs__usage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 74ch;
}

.docs__note {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

.docs__faq {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  max-width: 78ch;
}

.docs__faq-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.docs__faq-item h2 {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: normal;
}

.docs__faq-item p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}

/* Wider screens opt into the two-column FAQ and the larger heading. */

@media screen and (min-width: 40em) {
  .docs {
    gap: 44px;
  }

  .docs__hero h1 {
    font-size: 2.1rem;
  }

  .docs__faq-item {
    grid-template-columns: 240px 1fr;
    gap: 28px;
  }
}
/*
 * Self-hosted webfonts, so no third-party request is made on first load.
 * .css.erb rather than .scss so the asset paths do not depend on the sass
 * engine, which is on its way out.
 */

@font-face {
  font-family: "Oxygen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/oxygen-400-0eace4348d125ab9f1341fe51acdb24594b9cc0ace7e397c30a679ff5039acf4.woff2) format("woff2");
}

@font-face {
  font-family: "Oxygen";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/oxygen-700-a4c2a3082d5184413d299f9590708212b025ccf29c53a0e8dfd50e9a6b2a3a70.woff2) format("woff2");
}

/* Variable font: one file serves every weight between 200 and 900. */
@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/source-code-pro-0972ebf9f129ef1ed47c36b6610b05b9086d705cb35210621af4c17395c7fdd7.woff2) format("woff2");
}
/* Report page: the results table, the deviation notice, and the share block. */

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

.report__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report__meta li {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 7px 12px;
  background: var(--cream);
  color: var(--muted);
}

/* The numeric columns do not wrap, so the table gets its own horizontal scroll
   rather than pushing the page wide. */

.results-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.results-wrap:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.results {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.results th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 12px 8px;
  border-bottom: 2px solid var(--line);
}

.results td {
  padding: 12px 8px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.results th:first-child,
.results td:first-child {
  padding-left: 14px;
}

.results th:last-child,
.results td:last-child {
  padding-right: 14px;
}

.results th.results__rail,
.results td.results__rail {
  width: 4px;
  padding-left: 12px;
  padding-right: 0;
}

.results__slower,
.results__ips {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.results__slower {
  font-size: 14px;
}

.results__name {
  min-width: 0;
}

.results__label {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 300;
}

.results__tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--green-pale);
  padding: 3px 6px;
  margin-left: 8px;
  white-space: nowrap;
}

.results__value {
  font-size: 16px;
  font-weight: 300;
}

.results__dev {
  font-size: 12.5px;
  color: var(--faint);
}

.results__dev.is-noisy {
  color: var(--warn-ink);
}

.results tr.is-fastest {
  background: #f8fdf9;
}

.results tr.is-fastest td.results__rail {
  background: var(--green);
  background-clip: content-box;
}

.results tr.is-fastest .results__label,
.results tr.is-fastest .results__value {
  font-weight: 900;
}

.results tr.is-fastest .results__slower {
  color: var(--faint);
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
}

.notice p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 66ch;
}

.share {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.share__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.share__url {
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  user-select: all;
  word-break: break-all;
}

.share__hint {
  font-size: 13.5px;
  color: var(--muted);
}

.share__snippet {
  background: var(--surface);
  border: 1px solid var(--line);
}

.share__snippet-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}

.share__snippet pre {
  margin: 0;
  padding: 18px 16px;
  background: var(--ink);
  color: var(--page);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.8;
  overflow-x: auto;
  user-select: all;
}

/* Wider screens opt into roomier cells. */

@media screen and (min-width: 40em) {
  .report {
    gap: 30px;
  }

  .results th {
    padding: 15px 10px;
  }

  .results td {
    padding: 16px 10px;
  }

  .results th:first-child,
  .results td:first-child {
    padding-left: 22px;
  }

  .results th:last-child,
  .results td:last-child {
    padding-right: 22px;
  }

  .results th.results__rail,
  .results td.results__rail {
    padding-left: 18px;
  }
}
/*
 * Base styles and page furniture. Per-page styles live in their own files and
 * are pulled in by require_tree below.
 *
 * Colors and type follow fastruby.io: Oxygen for text, Source Code Pro for
 * anything numeric, and square corners throughout.
 *


 */

:root {
  --ink: #262320;
  --muted: #57514a;
  --page: #f8f8f8;
  --surface: #fff;
  --cream: #f1ebe1;
  --line: #dadada;
  --faint: #6b6b6b;
  --green: #00d242;
  --green-pale: #b5e0c3;
  --yellow: #fdca31;
  --warn-ink: #8a6d3b;
  --mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: Oxygen, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: 0.36px;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

code {
  font-family: var(--mono);
  font-size: 0.925em;
}

/* Masthead */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.masthead__wordmark {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1.18px;
  border-bottom: 0;
}

.masthead__wordmark span {
  color: var(--green);
}

.masthead__wordmark:hover {
  color: var(--ink);
}

.masthead__link {
  font-size: 14px;
  color: var(--muted);
}

/* Page shell */

.shell {
  flex: 1;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

/* Colophon */

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 20px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* Shared bits */

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Lines are separate elements rather than one <pre>, so the markup can be
   indented normally without leading whitespace reaching the page. */

.terminal {
  display: flex;
  flex-direction: column;
  background: var(--ink);
  padding: 22px 24px;
  overflow-x: auto;
}

.terminal__line {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.85;
  color: var(--page);
  white-space: nowrap;
}

.terminal__result {
  margin-top: 1.85em;
  color: var(--green-pale);
}

.terminal .prompt {
  color: var(--green);
}

/* Wider screens opt into more generous spacing. Everything above is the
   small-screen baseline. */

@media screen and (min-width: 40em) {
  .masthead,
  .colophon {
    padding-left: 32px;
    padding-right: 32px;
  }

  .shell {
    padding: 44px 32px 56px;
  }
}
