/* Near-black type on an off-white page, so it reads softer than pure black on white. The grey
   is for quiet things like the footer links; it keeps 5:1 contrast on the background, which
   passes WCAG AA for small text (the near-black is 15.8:1).

   Type is Helvetica Neue where it's installed: every Mac, iPhone and iPad has it, and the site
   only names it, so there's nothing to license. Everywhere else (Windows, Android, Linux) the
   browser downloads TeX Gyre Heros from /fonts, a free Helvetica clone under the GUST Font
   License (LPPL 1.3c; see /fonts/GUST-FONT-LICENSE.txt). Macs never download it, since Helvetica
   Neue comes first. Plain "Helvetica" is left out of the list on purpose: on Windows, browsers
   swap "Helvetica" for Arial, which would win before the clone. Arial is only the last resort if
   the font files fail to load. */

@font-face {
  font-family: "TeX Gyre Heros";
  src:
    local("TeX Gyre Heros"),
    local("TeXGyreHeros-Regular"),
    url("/fonts/texgyreheros-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TeX Gyre Heros";
  src:
    local("TeX Gyre Heros Bold"),
    local("TeXGyreHeros-Bold"),
    url("/fonts/texgyreheros-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TeX Gyre Heros";
  src:
    local("TeX Gyre Heros Italic"),
    local("TeXGyreHeros-Italic"),
    url("/fonts/texgyreheros-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f7f6f2;
  --text: #1c1c1a;
  --muted: #6b6a65;
}

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

html {
  background: var(--bg);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh; /* keeps the footer on screen behind mobile browser toolbars */
  padding: clamp(1.25rem, 1rem + 2vw, 3.5rem);
  font-family: "Helvetica Neue", "TeX Gyre Heros", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
}

/* Type sizes are Notion's, measured from a live published Notion page (November 2026):
   page title 40px bold on a 48px line, body 16px on a 24px line, headings 30/24/20px semibold on
   1.3 lines, and on phones a 28px title with body on a 22px line. Legal pages use Notion's 708px
   text column. The home page keeps the full width of the window. */
.content {
  flex: 1 1 0%;
  max-width: 44.25rem; /* 708px */
}

/* Home: three anchors and a lot of air. The wordmark holds the top-left corner, the paragraph
   floats a little above the middle of the window (the 10vh at the bottom lifts it off dead
   centre, toward where the eye lands first), and the footer holds the bottom-left corner, all
   on the same margins. On a short screen the paragraph keeps at least 3rem under the wordmark
   and the page scrolls. */
.content.home {
  max-width: none;
  display: flex;
  flex-direction: column;
  padding-bottom: 10vh;
}

/* The name is the wordmark (/kesto-wordmark.svg, inlined): the logo K redrawn at Helvetica Bold's
   weight, followed by "esto" in Helvetica Bold (the TeX Gyre Heros clone), drawn as one SVG so it
   looks the same on every device. It takes the text colour. At 0.73em of Notion's 40px title size
   (28px on phones) the K is as tall as a capital letter in a 40px title. */
.home h1 {
  margin: 0 0 3rem;
  font-size: 2.5rem;
  line-height: 1;
}

.wordmark {
  display: block;
  height: 0.73em;
  width: auto;
}

.home p {
  margin: auto 0;
}

h1 {
  margin: 0.67em 0;
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  margin: 1.5em 0 0.5em;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
}

h3 {
  margin: 1.25em 0 0.5em;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
}

p,
ul {
  margin: 1em 0;
}

p,
li {
  line-height: 1.5;
}

@media (max-width: 640px) {
  h1,
  .home h1 {
    font-size: 1.75rem;
  }

  p,
  li {
    line-height: 1.375;
  }
}

ul {
  padding-left: 2rem;
}

a {
  color: inherit;
  text-underline-offset: 0.15em;
}

.revised {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-style: italic;
}

.notice {
  padding: 1rem;
  border: 1px solid var(--text);
}

/* Footer links are grey and 14px, Notion's size for its own footer links, so they sit back from
   the 16px text; they underline on hover. */
.footer {
  padding-top: 2.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* On narrow screens the footer may wrap, but only between links, never inside one. */
.footer a {
  white-space: nowrap;
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}
