:root {
  --sf-paper: #f1efe9;
  --sf-paper-2: #e2ded5;
  --sf-ink: #151416;
  --sf-muted: #625e5a;
  --sf-night: #171619;
  --sf-night-2: #211f23;
  --sf-line: #c9c4ba;
  --sf-line-dark: #3b383e;
  --sf-accent: #bd164f;
  --sf-shell: 1240px;
  --sf-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--sf-paper); }
body { margin: 0; overflow-x: clip; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

.skip {
  position: fixed;
  z-index: 500;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-80px);
  border: 1px solid #59545b;
  background: var(--sf-night);
  color: #fff;
  font: 700 12px Arial, sans-serif;
  text-decoration: none;
  transition: transform .15s ease;
}
.skip:focus { transform: translateY(0); }

/* One shared piece of chrome for the homepage and every Ghost template. */
.site-header,
.editorial-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 66px;
  padding: 0 max(24px, calc((100vw - var(--sf-shell)) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid #29262b;
  background: rgba(16, 15, 17, .97);
  color: #f3f0eb;
  backdrop-filter: blur(12px);
}
.brand,
.editorial-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f3f0eb;
  font: 760 17px Arial, Helvetica, sans-serif;
  letter-spacing: -.035em;
  text-decoration: none;
}
.brand img,
.editorial-brand img { width: 31px; height: 29px; object-fit: cover; border-radius: 8px; }
.desktop-nav,
.editorial-nav { display: flex; align-items: center; gap: 24px; color: #d0c9c7; font: 650 13px Arial, sans-serif; }
.desktop-nav a,
.editorial-nav a,
.official-link,
.editorial-trial { text-decoration: none; transition: color .18s ease; }
.desktop-nav a:hover,
.editorial-nav a:hover,
.official-link:hover,
.editorial-trial:hover { color: #fff; }
.official-link,
.editorial-trial { justify-self: end; display: inline-flex; align-items: center; gap: 9px; color: #f6dbe5; font: 700 13px Arial, sans-serif; }
.official-link span,
.editorial-trial span { color: #ef6b9b; }

/* Draw external-link navigation in CSS so iOS cannot substitute an emoji glyph. */
.nav-arrow.nav-arrow-external {
  position: relative;
  display: inline-block;
  width: .82em;
  height: .82em;
  flex: 0 0 .82em;
  margin-left: .18em;
  vertical-align: -.04em;
  color: currentColor;
}
.nav-arrow.nav-arrow-external::before {
  content: "";
  position: absolute;
  top: .03em;
  right: .03em;
  width: .5em;
  height: .5em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}
.nav-arrow.nav-arrow-external::after {
  content: "";
  position: absolute;
  left: .06em;
  bottom: .13em;
  width: .76em;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: left center;
}

.site-footer,
.editorial-footer {
  margin: 0;
  padding: 55px max(24px, calc((100vw - var(--sf-shell)) / 2)) 22px;
  background: var(--sf-night);
  color: #eeeae4;
}
.footer-main,
.editorial-footer-main { padding-bottom: 42px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
.footer-identity strong,
.editorial-footer-main strong { font: 760 20px Arial, sans-serif; letter-spacing: -.035em; }
.footer-identity p,
.editorial-footer-main p { max-width: 420px; margin: 9px 0 0; color: #918d8d; font: 12px/1.55 Arial, sans-serif; }
.footer-main nav,
.editorial-footer-main nav { display: grid; grid-template-columns: repeat(3, auto); gap: 12px 24px; color: #aaa5a5; font: 12px Arial, sans-serif; }
.footer-main nav a,
.editorial-footer-main nav a { text-decoration: none; }
.footer-main nav a:hover,
.editorial-footer-main nav a:hover { color: #fff; }
.footer-small,
.editorial-footer-small {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--sf-line-dark);
  color: #9c969b;
  font: 500 9px/1.6 var(--sf-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.footer-small p,
.editorial-footer-small p { margin: 0; }

/* Ghost cards retained after removing the legacy theme stylesheet. */
.kg-gallery-card { margin: 32px 0; }
.kg-gallery-container { display: flex; flex-direction: column; max-width: 100%; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-row:not(:first-of-type) { margin-top: .6em; }
.kg-gallery-image { position: relative; margin: 0; }
.kg-gallery-image:not(:first-of-type) { margin-left: .6em; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card { width: 100%; margin: 32px 0; }
.kg-bookmark-container { min-height: 112px; display: flex; overflow: hidden; border: 1px solid #c1bbb2; background: #e9e5dd; color: var(--sf-ink); text-decoration: none !important; }
.kg-bookmark-container:hover { border-color: var(--sf-accent); }
.kg-bookmark-content { min-width: 0; padding: 17px 19px; display: flex; flex: 1; flex-direction: column; order: 1; }
.kg-bookmark-title { color: var(--sf-ink); font: 730 15px/1.4 Arial, sans-serif; }
.kg-bookmark-description { max-height: 44px; margin-top: 6px; overflow: hidden; color: var(--sf-muted); font: 13px/1.5 Arial, sans-serif; }
.kg-bookmark-metadata { margin-top: auto; padding-top: 11px; display: flex; flex-wrap: wrap; align-items: center; color: #6e6863; font: 10px var(--sf-mono); }
.kg-bookmark-icon { width: 16px; height: 16px; margin-right: 8px; }
.kg-bookmark-author { display: inline; }
.kg-bookmark-publisher { margin-left: 6px; }
.kg-bookmark-publisher::before { content: "·"; margin-right: 6px; }
.kg-bookmark-thumbnail { position: relative; min-width: 170px; max-width: 210px; order: 2; }
.kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.imgbox { position: fixed; inset: 0; z-index: 400; padding: 24px; display: grid; place-items: center; background: rgba(5,3,8,.94); cursor: zoom-out; }
.imgbox img { width: auto; max-width: min(1600px,94vw); height: auto; max-height: 92vh; border: 1px solid #4a464d; border-radius: 8px; box-shadow: 0 30px 90px rgba(0,0,0,.8); }
.abody figure img,
.pagebody figure img { cursor: zoom-in; }

@media (max-width: 1040px) {
  .site-header,
  .editorial-header { grid-template-columns: 1fr auto auto; gap: 18px; }
  .desktop-nav,
  .editorial-nav { display: none; }
}

@media (max-width: 900px) {
  .site-header,
  .editorial-header { height: 62px; padding: 0 15px; grid-template-columns: 1fr auto; gap: 12px; }
  .official-link,
  .editorial-trial { display: none; }
  .site-footer,
  .editorial-footer { padding: 42px 15px 20px; }
  .footer-main,
  .editorial-footer-main { grid-template-columns: 1fr; }
  .footer-main nav,
  .editorial-footer-main nav { grid-template-columns: 1fr 1fr; }
  .footer-small,
  .editorial-footer-small { align-items: flex-start; flex-direction: column; gap: 12px; }
  .kg-bookmark-thumbnail { min-width: 118px; max-width: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
