/* Postal's privacy, terms, support and changelog pages (10/29/26): the home page's post office
   look in plain prose. Navy, red and gold on cream paper; Alfa Slab One headings, Instrument Sans
   text (both SIL OFL). */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F7ECD2;
  --bg-alt: #F3E6C8;
  --card: #FFF8E6;
  --fill: #F3E6C8;
  --text: #0B1D33;
  --secondary: #4E5A6B;
  --tertiary: #7A8392;
  --hairline: rgba(1, 41, 82, 0.18);
  --accent: #012952;
  --accent-hover: #011F4A;
  --on-accent: #FDF3D6;
  --red: #E7192D;
  --gold: #FABF10;
  --shadow-card: 0 1px 0 rgba(1, 41, 82, 0.12);
  --shadow-deep: 6px 6px 0 rgba(1, 41, 82, 0.14);
  --radius: 4px;
  --gutter: 20px;
  color-scheme: light;
}

@font-face {
  font-family: "Alfa Slab One";
  src: url("/fonts/AlfaSlabOne.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header {
  border-bottom: 4px solid var(--red);
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  padding-bottom: 18px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 48px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.header-links a:not(.button) {
  color: var(--secondary);
  text-decoration: none;
}

.header-links a:not(.button):hover {
  color: var(--text);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-hover);
}

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button.small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 8px;
}

.button.large {
  min-height: 48px;
  padding: 0 24px;
  font-size: 16px;
}

/* Hero */

.hero {
  padding-block: 56px 40px;
  text-align: center;
}

.hero h1 {
  margin: 0 auto;
  max-width: 14ch;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.hero .lede {
  margin: 20px auto 0;
  max-width: 34em;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--secondary);
}

.hero .actions {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.fineprint {
  font-size: 14px;
  color: var(--tertiary);
}

/* Screenshots */

.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-deep);
  background: var(--card);
}

.hero-shot {
  margin-top: 8px;
  padding-bottom: 24px;
}

/* Sections */

.section {
  padding-block: 64px;
}

.section + .section {
  border-top: 1px solid var(--hairline);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.section .intro {
  margin: 14px 0 0;
  max-width: 36em;
  font-size: 18px;
  color: var(--secondary);
}

.split-shot {
  margin-top: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 26px 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--secondary);
}

.card p + p {
  margin-top: 10px;
}

.card .keys {
  margin-bottom: 18px;
}

.keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 14px;
  color: var(--secondary);
}

.keys li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  border-bottom-width: 2px;
  background: var(--fill);
  color: var(--text);
  font: 600 13px/1 "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #def2fc;
  color: #004964;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 500;
}

/* Call to action */

.cta {
  text-align: center;
}

.cta h2 {
  margin-inline: auto;
}

.cta .intro {
  margin-inline: auto;
}

.cta .actions {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Footer */

.site-footer {
  border-top: 4px solid var(--red);
  padding-top: 28px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  color: var(--secondary);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--secondary);
  text-decoration: none;
}

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

/* Legal pages: the same plain prose column as Krinkov's /privacy-policy and /terms. */

.legal {
  max-width: 44rem;
  margin-inline: auto;
  padding-block: 32px 64px;
}

.legal h1 {
  margin: 0;
  font-family: "Alfa Slab One", Georgia, serif;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 400;
  color: var(--accent);
}

.legal .updated {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--secondary);
}

.legal .summary {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--fill);
  border: 1px solid var(--hairline);
}

.legal .summary p {
  margin: 0 0 8px;
  font-weight: 600;
}

.legal .summary ul {
  margin: 0;
}

.legal .body {
  margin-top: 28px;
  /* Long folder paths wrap instead of widening the page on a phone. */
  overflow-wrap: anywhere;
  font-size: 15.5px;
  line-height: 1.65;
}

.legal h2 {
  margin: 36px 0 10px;
  font-family: "Alfa Slab One", Georgia, serif;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--accent);
}

.legal h3 {
  margin: 22px 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.legal p {
  margin: 0 0 14px;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal li + li {
  margin-top: 6px;
}

.legal code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--fill);
}

.legal .table-wrap {
  overflow-x: auto;
  margin: 6px 0 18px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
}

.legal th {
  background: var(--fill);
  font-weight: 600;
}

.legal .callout {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 8px 8px 0;
}

/* 404 */

.not-found {
  text-align: center;
  padding-block: 120px;
}

.not-found h1 {
  margin: 0;
  font-family: "Alfa Slab One", Georgia, serif;
  font-weight: 400;
  font-size: 40px;
  color: var(--accent);
}

.not-found p {
  color: var(--secondary);
}

@media (max-width: 640px) {
  :root {
    --gutter: 18px;
  }

  .header-links .hide-narrow {
    display: none;
  }

  .hero {
    padding-block: 36px 28px;
  }

  .section {
    padding-block: 48px;
  }

  .legal h1 {
    font-size: 28px;
  }
}

/* What's new (/changelog): one section per release, each change a headline, a line and its picture. */

.changelog .release + .release {
  margin-top: 44px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}

.changelog .release h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.changelog .release-date {
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary);
}

.changelog .change + .change {
  margin-top: 30px;
}

.changelog .change h3 {
  margin: 0 0 4px;
}

.changelog .change p {
  margin: 0;
  color: var(--secondary);
}

.changelog .change img {
  display: block;
  margin-top: 12px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}

.changelog .changelog-empty {
  color: var(--secondary);
}

/* Blog (/blog and /blog/<slug>, built from blog/*.md by scripts/build-blog.mjs): the legal pages'
   prose column, with a picture per post. */

.blog .blog-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.blog .blog-list li + li {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

.blog .blog-list a {
  display: block;
  text-decoration: none;
}

.blog .blog-list img,
.post figure img {
  border-radius: 10px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}

.blog .blog-list img {
  margin-bottom: 16px;
}

.blog .blog-list h2 {
  margin: 0;
  font-size: 21px;
}

.blog .blog-list a:hover h2 {
  color: var(--accent);
}

.blog .blog-list p {
  margin: 4px 0 0;
}

.blog .blog-list p:last-child {
  margin-top: 8px;
  color: var(--secondary);
}

.blog .feed-link {
  margin-top: 44px;
  font-size: 14px;
  color: var(--secondary);
}

.post .post-back {
  margin: 0 0 14px;
  font-size: 14px;
}

.post .post-back a {
  color: var(--secondary);
  text-decoration: none;
}

.post .post-back a:hover {
  color: var(--text);
}

.post figure {
  margin: 22px 0 26px;
}

.post figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--secondary);
}

.post ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.post li + li {
  margin-top: 8px;
}

.post kbd {
  font-family: inherit;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--hairline);
  background: var(--fill);
  white-space: nowrap;
}

.post .post-end {
  margin-top: 40px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--fill);
  border: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 16px;
}

.post .post-end p {
  margin: 0;
  font-weight: 600;
}

/* Phones: a smaller logo leaves room for the links beside it. */
@media (max-width: 520px) {
  .brand img {
    height: 34px;
  }
  .header-links {
    gap: 12px;
  }
}
