/*
 * The blog (/blog, templates/blog.php): plain pages in the look of the quiet planner. The colours of Q (app.js), light
 * and dark after the device; Archivo for titles and numbers, Atkinson Hyperlegible for the text; the cards of the
 * planner (a 6px band in the colour of a land, a 56px tile on its soft tint), its chips and its 44px buttons.
 */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format('woff2');
}

@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-400-latin.woff2") format('woff2');
}

@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-700-latin.woff2") format('woff2');
}

:root {
  --page: #F5F7FA;
  --surface: #FFFFFF;
  --ink: #10203D;
  --muted: #475569;
  --faint: #7F8EA3;
  --line: #E3E8EF;
  --chip: #D5DCE6;
  --primary: #0B63FF;
  --primary-ink: #FFFFFF;
  --tint: #F1F6FF;
  --display: Archivo, 'Arial Narrow', Arial, system-ui, sans-serif;
  --text: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0B1426;
    --surface: #142645;
    --ink: #F5F7FA;
    --muted: #A9B6CC;
    --faint: #7D8BA6;
    --line: #2A3A5C;
    --chip: #2A3A5C;
    --primary: #6EA8FF;
    --primary-ink: #0B1426;
    --tint: #1C3158;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
}

a { color: var(--primary); text-underline-offset: 3px; }

a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* The bar: the mark and the name, the other language as a chip, Open the planner as a button. */
.blog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
}

.blog-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font: 800 16px/1.2 var(--display);
}

.blog-brand img { flex: none; }

.blog-brand-sub { color: var(--muted); font-weight: 700; }

.blog-nav { display: flex; align-items: center; gap: 8px; flex: none; }

.blog-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--chip);
  color: var(--ink);
  font: 700 13px var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.blog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--primary);
  color: var(--primary-ink);
  font: 700 15px var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.blog-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }

.blog-title {
  margin: 8px 0 12px;
  font: 800 34px/1.15 var(--display);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.blog-lead { margin: 0 0 24px; color: var(--muted); font-size: 18px; }

.blog-eyebrow {
  display: block;
  margin: 0;
  color: var(--muted);
  font: 700 13px var(--text);
  font-variant-numeric: tabular-nums;
}

/* The list: one card per article. The whole card is the link (the ::after of its title). */
.blog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.blog-card {
  position: relative;
  padding: 18px 18px 16px 24px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--primary);
}

.blog-card-title { margin: 4px 0 6px; font: 800 21px/1.25 var(--display); }

.blog-card-title a { color: var(--ink); text-decoration: none; }

.blog-card-title a::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }

.blog-card-title a:focus-visible { outline: none; }

.blog-card-title a:focus-visible::after { box-shadow: 0 0 0 2px var(--primary); }

.blog-card-line { margin: 0 0 8px; color: var(--muted); font-size: 15.5px; }

.blog-more { color: var(--primary); font: 700 14px var(--text); }

/* An article. */
.blog-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary);
  font: 700 15px var(--text);
  text-decoration: none;
}

.blog-body h2 { margin: 36px 0 10px; font: 800 25px/1.2 var(--display); }

.blog-body h3 { margin: 24px 0 6px; font: 800 19px/1.25 var(--display); }

.blog-body p, .blog-body ul, .blog-body ol { margin: 0 0 14px; }

.blog-body ul, .blog-body ol { padding-left: 22px; }

.blog-body li { margin-bottom: 6px; }

.blog-body .blog-intro { font-size: 19px; }

/* The numbers as the cards of the planner: a band in the colour of a land, a tile on its soft tint. */
.blog-body .blog-stats { list-style: none; padding: 0; display: grid; gap: 10px; margin: 0 0 18px; }

.blog-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 12px 12px 12px 18px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}

.blog-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--band);
}

.blog-tile {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--land-tint);
  color: #10203D;
  font: 900 22px/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.blog-stat-text { display: flex; flex-direction: column; min-width: 0; }

.blog-stat-kind { color: var(--muted); font: 700 12.5px/1.35 var(--text); }

.blog-stat-name { font: 800 18px/1.2 var(--display); margin-top: 2px; }

.is-main-street { --band: #FF3B4E; --land-tint: #FFE0E3; }
.is-frontierland { --band: #FF7A1A; --land-tint: #FFE6CC; }
.is-adventureland { --band: #0094D9; --land-tint: #D3EEFA; }
.is-fantasyland { --band: #FF4FC4; --land-tint: #FFE0F5; }
.is-discoveryland { --band: #8A4DFF; --land-tint: #EADFFF; }

.blog-big { margin: 22px 0 6px; font: 800 22px/1.1 var(--display); }

.blog-big-number {
  color: var(--primary);
  font: 900 56px/1 var(--display);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

.blog-close { margin-top: 24px; font: 800 21px/1.3 var(--display); }

.blog-small { color: var(--faint); font-size: 13.5px; }

.blog-other { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 700; }

/* The brand kit (/brand): the logos and fonts as cards with their files as chips; the colours as the cards above. */
.blog-body .brand-logos, .blog-body .brand-fonts {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.brand-logo, .brand-font {
  margin: 0;
  padding: 12px 12px 14px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line);
}

.brand-logo-show {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  padding: 16px;
  border-radius: 12px;
}

.brand-logo-show img { max-width: 100%; max-height: 100%; }

/* The logo on the background it is made for, whatever the theme of the page. */
.brand-logo-show.is-light { background: #FFFFFF; box-shadow: inset 0 0 0 1px #E3E8EF; }

.brand-logo-show.is-dark { background: #0B1426; }

.brand-logo-name { margin: 12px 0 0; font: 800 18px/1.2 var(--display); }

.blog-body .brand-logo-use { margin: 2px 0 10px; color: var(--muted); font-size: 15px; }

.blog-body .brand-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

.brand-colours .blog-tile { box-shadow: inset 0 0 0 1px var(--line); }

.brand-colours code { font: 700 14px var(--text); font-variant-numeric: tabular-nums; color: var(--ink); }

.brand-font-sample { margin: 4px 0 0; font: 800 24px/1.2 var(--display); font-variant-numeric: tabular-nums; }

.brand-font.is-text .brand-font-sample { font: 700 22px/1.3 var(--text); }

/* The foot: try it, in a card on the tint. */
.blog-foot { max-width: 760px; margin: 0 auto; padding: 0 16px max(28px, env(safe-area-inset-bottom)); }

.blog-foot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: var(--tint);
  border-radius: 14px;
}

.blog-foot-line { margin: 0; font-weight: 700; }

@media (max-width: 560px) {
  body { font-size: 16.5px; }

  .blog-brand > span { display: none; }

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

  .blog-nav .blog-button { padding: 0 14px; font-size: 14px; }

  .blog-title { font-size: 28px; }

  .blog-foot-card { flex-direction: column; align-items: stretch; }
}
