:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #19211c;
  --text: #59615c;
  --muted: #69736b;
  --focus: #34734d;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(56px, 8vw, 80px);
  flex: 1;
  padding: clamp(48px, 9vh, 104px) 24px 64px;
}

.introduction {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.brand-mark {
  display: block;
  width: clamp(160px, 20vw, 202px);
  height: auto;
  margin: 0 auto 25px;
}

h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(46px, 8vw, 64px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.research-line {
  margin: 24px 0 0;
  font-size: clamp(17px, 2.8vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.description {
  max-width: 430px;
  margin: 17px auto 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  text-wrap: pretty;
}

.github-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 32px;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--paper);
  background: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.github-icon {
  flex: 0 0 auto;
}

.github-link:hover {
  color: var(--ink);
  background: var(--paper);
}

.github-link {
  vertical-align: middle;
}

.hf-link {
  margin-left: 12px;
  color: var(--ink);
  background: var(--paper);
}

.hf-link:hover {
  color: var(--paper);
  background: var(--ink);
}

@media (max-width: 560px) {
  .hf-link {
    margin-left: 0;
    margin-top: 12px;
  }
}

.github-link:focus-visible,
.explainer a:focus-visible,
.explainer-video:focus-visible,
footer a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

.explainer {
  width: 100%;
  max-width: 860px;
  padding-top: 40px;
  border-top: 1px solid #e4eae5;
  text-align: center;
}

.explainer h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(27px, 4vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.explainer-description {
  max-width: 540px;
  margin: 16px auto 28px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.explainer-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid #e4eae5;
  border-radius: 4px;
  background: var(--paper);
}

.explainer-details {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  text-wrap: balance;
}

.explainer a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.explainer a:hover {
  color: var(--ink);
}

footer {
  padding: 0 24px 29px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

footer p {
  margin: 0;
  text-wrap: balance;
}

footer a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

footer a:hover {
  color: var(--ink);
}

::selection {
  color: var(--ink);
  background: #deebe2;
}

@media (max-width: 480px) {
  main {
    padding: 48px 25px 48px;
  }

  .brand-mark {
    margin-bottom: 24px;
  }

  .description {
    max-width: 350px;
    font-size: 15px;
    line-height: 1.8;
  }

  .research-line {
    margin-top: 21px;
  }

  footer {
    padding-bottom: 24px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .github-link {
    transition: none;
  }
}

/* Research-preview label, method section and footer lines */

.preview-label {
  display: inline-block;
  margin: 18px 0 0;
  padding: 3px 10px;
  border: 1px solid #cfd8d1;
  border-radius: 999px;
  color: var(--focus);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: uppercase;
}

.preview-label + .research-line {
  margin-top: 16px;
}

.method,
.usage {
  width: 100%;
  max-width: 640px;
  padding-top: 40px;
  border-top: 1px solid #e4eae5;
}

.method h2,
.usage h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(27px, 4vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-align: center;
  text-wrap: balance;
}

.method-description,
.method-status,
.method-links,
.usage-description {
  max-width: 540px;
  margin: 16px auto 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
  text-wrap: pretty;
}

.method-steps {
  margin: 28px 0 0;
  padding-left: 1.4em;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.method-steps li + li {
  margin-top: 12px;
}

.method-steps strong {
  color: var(--ink);
  font-weight: 500;
}

.method-status {
  margin-top: 24px;
}

.method-links {
  font-size: 13px;
}

.method a,
.usage a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.method a:hover,
.usage a:hover {
  color: var(--ink);
}

.method a:focus-visible,
.usage a:focus-visible,
.usage-command:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

/* "Use your own fine-tune": the one command; it scrolls inside its box on narrow screens */

.usage-command {
  max-width: 540px;
  margin: 24px auto 0;
  padding: 14px 18px;
  overflow-x: auto;
  border: 1px solid #e4eae5;
  border-radius: 4px;
  color: var(--ink);
  background: #f6f8f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
}

.usage-command code {
  font: inherit;
}

@media (max-width: 480px) {
  .usage-command {
    padding: 12px;
    font-size: 12px;
  }
}

footer p + p {
  margin-top: 4px;
}
