/* Kohera site: the page is a proof sheet. Text column plus a margin with notes in the app's anatomy. */

@font-face {
  font-family: "Alegreya";
  src: url("/fonts/alegreya-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Alegreya";
  src: url("/fonts/alegreya-latin-wght-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #FDFDFB;
  --card: #F7F7F3;
  --ink: #1F3A93;
  --pencil: #6B6F76;
  --red: #C0282D;
  --marker: rgba(255, 228, 92, .45);
  --text: rgba(0, 0, 0, .85);
  --serif: "Alegreya", "Iowan Old Style", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1A1C20;
    --card: #22252B;
    --ink: #9DB2FF;
    --pencil: #A3A7AE;
    --red: #FF7A72;
    --marker: rgba(122, 106, 0, .85);
    --text: rgba(255, 255, 255, .85);
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

h1,
h2,
h3,
p,
ul,
figure,
address {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 500;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
}

h2 {
  font-size: 2rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.4;
  font-weight: 700;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

code {
  font-family: inherit;
}

address {
  font-style: normal;
}

mark {
  background: var(--marker);
  color: var(--text);
}

/* Interface lines: navigation, kind and evidence lines of a note, captions, footer. */
.ui-line,
.site-head nav,
.site-foot,
.note-kind,
.note-source,
.shot figcaption {
  font-family: var(--ui);
  font-size: .8125rem;
  line-height: 1.4;
}

.ui-line {
  color: var(--pencil);
}

/* Skip link: hidden until focused. */
.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: .5rem .75rem;
  background: var(--paper);
  font-family: var(--ui);
  font-size: .8125rem;
}

.skip:focus {
  top: 1rem;
}

/* Container: text column 34rem, gap 3rem, margin 17rem. */
.wrap {
  max-width: 54rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Header */
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1;
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-head nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: 0;
  list-style: none;
}

.site-head nav a {
  text-decoration: none;
}

.site-head nav a:hover {
  text-decoration: underline;
}

/* Sheet: one row of text with its margin note. */
.sheet {
  display: grid;
  grid-template-columns: 34rem 17rem;
  column-gap: 3rem;
}

.sheet > * {
  grid-column: 1;
}

.sheet > .note {
  grid-column: 2;
  align-self: start;
}

.part {
  margin-top: 6rem;
}

.part .sheet > h2 + p {
  margin-top: 1rem;
}

.part .sheet > .note {
  grid-row: 2 / span 2;
  margin-top: 1.25rem;
}

.sheet > .more {
  margin-top: 1rem;
}

/* Hero */
.hero {
  padding-top: 3rem;
}

.lede {
  margin-top: 1.5rem;
}

.sample {
  margin-top: 3rem;
  font-size: 1.5rem;
  line-height: 1.5;
}

.hero > .sample + .ui-line {
  margin-top: .5rem;
}

.hero > .status {
  margin-top: 2rem;
}

.hero > .note {
  grid-row: 3 / span 3;
  margin-top: 3.25rem;
}

.finding {
  text-decoration: underline dotted var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
  text-decoration-skip-ink: none;
  animation: finding-in .5s ease-out .6s both;
}

.hero > .note {
  animation: note-in .5s ease-out 1.1s both;
}

@keyframes finding-in {
  from { text-decoration-color: transparent; }
  to { text-decoration-color: var(--red); }
}

@keyframes note-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .finding,
  .hero > .note {
    animation: none;
  }
}

/* Margin note: line in the colour of its kind, kind line, statement in italic, evidence line. */
.note {
  border-left: 3px solid var(--note);
  padding-left: .875rem;
}

.note-red { --note: var(--red); }
.note-pencil { --note: var(--pencil); }
.note-ink { --note: var(--ink); }

.note-kind {
  color: var(--note);
}

.note-say {
  margin-top: .25rem;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.45;
}

.note-source {
  margin-top: .375rem;
  color: var(--pencil);
}

.note-source mark {
  padding-inline: .125rem;
}

/* Screenshots break out of the column onto a card band. */
.shot {
  margin-top: 3rem;
  padding: 3rem 1.5rem;
  background: var(--card);
}

.shot picture,
.shot figcaption {
  display: block;
  max-width: 72rem;
  margin-inline: auto;
}

.shot img {
  width: 100%;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .18));
}

.shot figcaption {
  margin-top: 1.5rem;
  color: var(--pencil);
}

/* Single-column pages: support, privacy, 404. */
.page {
  padding-top: 3rem;
}

.page > * {
  max-width: 34rem;
}

.page > h2 {
  margin-top: 3.5rem;
}

.page > h3 {
  margin-top: 2rem;
}

.page > h1 + .ui-line {
  margin-top: .75rem;
}

.page > p,
.page > ul,
.page > address {
  margin-top: 1rem;
}

.page > h1 + p:not(.ui-line) {
  margin-top: 1.5rem;
}

.page > h2 + p,
.page > h2 + address,
.page > h3 + p {
  margin-top: .75rem;
}

.page ul {
  padding-left: 1.25rem;
}

.page li + li {
  margin-top: .375rem;
}

/* Footer */
.site-foot {
  margin-top: 6rem;
  color: var(--pencil);
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: 2rem 3rem;
}

.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: 0;
  list-style: none;
}

/* Below 60rem: one column, the note follows its paragraph. */
@media (max-width: 60rem) {
  .sheet {
    grid-template-columns: minmax(0, 1fr);
  }

  .sheet > .note,
  .part .sheet > .note,
  .hero > .note {
    grid-column: 1;
    grid-row: auto;
    margin-top: 1.5rem;
    margin-left: 1rem;
  }

  .part {
    margin-top: 4.5rem;
  }

  .shot {
    padding-block: 2rem;
  }
}
