/* Paper schema from the persuasion-4-clean decks.
   Source of the values: presentations/short-presentation/design-tokens.css */

@font-face {
  font-family: "Source Sans Pro";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/source-sans-pro-regular.woff") format("woff");
}

@font-face {
  font-family: "Source Sans Pro";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("fonts/source-sans-pro-regular-italic.woff") format("woff");
}

@font-face {
  font-family: "Source Sans Pro";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/source-sans-pro-semibold.woff") format("woff");
}

@font-face {
  font-family: "Source Sans Pro";
  font-weight: 600;
  font-style: italic;
  font-display: swap;
  src: url("fonts/source-sans-pro-semibold-italic.woff") format("woff");
}

:root {
  --color-brand-primary: #002fa7;
  --color-paper: #ffffff;
  --color-ink: #111111;
  --color-ink-muted: #555555;
  --color-ink-light: #999999;
  --color-rule: #cccccc;
  --color-rule-light: #e0ddd5;
  --color-highlight: #002fa7;
  --color-icon: #888888;
  --plot-ai: #002fa7;
  --plot-ai-dark: #00185c;
  --plot-human: #4a4a4a;
  --plot-reference-line: #7f7f7f;
  --plot-rule: #404040;
  --measure: 42rem;
  --header-offset: 10.5rem;
}

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

html {
  height: 100%;
  color-scheme: only light;
  accent-color: var(--color-brand-primary);
  -webkit-tap-highlight-color: rgba(0, 47, 167, 0.22);
}

body {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: "Source Sans Pro", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body:has(.gate) {
  display: block;
  height: auto;
  min-height: 100%;
  overflow: auto;
}

::selection {
  background: var(--color-highlight);
  color: var(--color-paper);
}

:focus-visible {
  outline: 1px solid var(--color-brand-primary);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 2;
  padding: 0.35rem 0.55rem;
  background: var(--color-paper);
  color: var(--color-ink);
}

.skip:focus {
  top: 0.5rem;
}

.mast {
  position: relative;
  flex: none;
  z-index: 1;
  padding: 1.75rem 1.25rem 0.9rem;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-rule-light);
  text-align: center;
}

.name {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

.identity {
  position: absolute;
  top: 1.15rem;
  right: 1.35rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.95rem;
  margin: 0;
}

.identity a {
  display: flex;
  color: var(--color-icon);
  line-height: 0;
  text-decoration: none;
  transition: color 300ms ease;
}

.identity a:hover,
.identity a:active {
  color: var(--color-brand-primary);
}

.identity svg {
  width: 1.15rem;
  height: 1.15rem;
}

.sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 2rem;
  margin-top: 0.75rem;
}

.sections a {
  flex: 0 0 auto;
  color: var(--color-ink);
  font-size: 1rem;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 300ms ease;
}

.sections a:hover,
.sections a:active,
.sections a.is-active,
.sections a.is-active:hover {
  color: var(--color-brand-primary);
  border-bottom-color: var(--color-brand-primary);
}

main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

main::-webkit-scrollbar {
  display: none;
}

main section {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 2.75rem max(1.25rem, calc((100% - var(--measure)) / 2)) 2rem;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
}

.role {
  margin-top: -0.15rem;
  color: var(--color-ink-muted);
}

main a {
  color: var(--color-brand-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

main a:hover,
main a:active {
  color: var(--color-brand-primary);
}

.steps {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--color-rule-light);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  color: var(--color-ink-muted);
  font-variant-numeric: tabular-nums;
}

.finding {
  margin-bottom: 1.25rem;
}

figure {
  margin: 0;
}

.figure-svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure-svg text {
  font-family: "Source Sans Pro", sans-serif;
  font-variant-numeric: tabular-nums;
}

figcaption {
  margin-top: 0.85rem;
  color: var(--color-ink-muted);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.5;
}

.works {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.works li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--color-rule-light);
}

.works p {
  margin: 0;
}

.work-links {
  margin-top: 0.15rem;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.contact {
  margin-top: 2rem;
  margin-bottom: 0;
  color: var(--color-ink-muted);
}

.edited {
  flex: none;
  margin: 0;
  padding: 0.55rem 1.25rem 0.85rem;
  color: var(--color-ink-muted);
  font-size: 0.95rem;
  font-style: italic;
  text-align: center;
}

.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18vh 1.25rem 3rem;
  text-align: center;
}

.gate .name {
  margin-bottom: 1.5rem;
}

.gate-note {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 1rem;
}

.gate-label {
  margin-top: 2rem;
  color: var(--color-ink-muted);
  font-size: 0.95rem;
}

.gate input {
  width: min(16rem, 100%);
  margin-top: 0.35rem;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid var(--color-ink-muted);
  border-radius: 0;
  background: transparent;
  color: inherit;
  caret-color: var(--color-brand-primary);
  font: inherit;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}

.gate input:focus {
  border-bottom-color: var(--color-brand-primary);
}

.gate button {
  margin-top: 1.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.gate button:hover,
.gate button:active {
  color: var(--color-brand-primary);
}

.gate button:disabled {
  color: var(--color-ink-muted);
  cursor: default;
}

.gate-error {
  margin: 1rem 0 0;
  color: var(--color-ink-muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  :root {
    --header-offset: 11.5rem;
  }

  body {
    font-size: 1.0625rem;
  }

  .mast {
    padding: 2.75rem 0.75rem 0.75rem;
  }

  .identity {
    top: 0.7rem;
    right: 0.75rem;
    gap: 0.75rem;
  }

  .name {
    font-size: 1.65rem;
  }

  .sections {
    gap: 0.55rem 1.15rem;
    max-width: 100%;
  }

  .sections a {
    font-size: 0.95rem;
  }

  main section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    scroll-behavior: auto;
  }

  .sections a,
  .identity a {
    transition: none;
  }
}
