/* Patch Notes: the #blog section of the static page, the archive (blog/index.html) and post pages.
   Uses the tokens from site.css. Everything is scoped under .page so none of it reaches the room's panels. */

/* ---------- Masthead and issue badge ---------- */

.page .blog-masthead {
  display: inline-block;
  margin: 0 0.3em 12px 0;           /* the right margin leaves room for the slant */
  font: 400 clamp(40px, 10vw, 60px)/0.95 var(--f-display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--crt);
  transform: skewX(-8deg);
  transform-origin: 0 100%;
}

.page .issue-badge {
  display: inline-block;
  margin: 0;
  padding: 5px 10px 4px;
  background: var(--crt);
  color: var(--crt-ink);
  font: 400 24px/1 var(--f-crt);
  letter-spacing: 0.04em;
}

.page .draft-flag,
.page .post[data-draft] .post-title::after {
  display: inline-block;
  padding: 3px 6px 2px;
  border-radius: 2px;
  background: var(--lamp);
  color: var(--night);
  font: 700 11px/1.2 var(--f-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 0.35em;
}
.page .post[data-draft] .post-title::after { content: "Draft"; margin-left: 10px; }

/* ---------- Issue list (static page and archive) ---------- */

.page .posts {
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.page .post {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "issue title date" ". dek dek";
  align-items: baseline;
  column-gap: 16px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--line);
}
.page .post::before {
  content: "#" attr(data-issue);
  grid-area: issue;
  padding: 3px 7px 2px;
  background: var(--crt);
  color: var(--crt-ink);
  font: 400 22px/1 var(--f-crt);
  letter-spacing: 0.04em;
}
.page .post-title {
  grid-area: title;
  font: 400 21px/1.2 var(--f-display);
  text-decoration: none;
  overflow-wrap: break-word;
}
.page .post-title:hover { color: var(--lamp); }
.page .post time {
  grid-area: date;
  font: 400 13px/1.4 var(--f-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-faint);
}
.page .post .post-dek {
  grid-area: dek;
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--ink-dim);
}

.page .posts-empty {
  margin: 24px 0 32px;
  padding: 16px 20px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--ink-dim);
  font-size: 16px;
}
.page .posts-empty a { color: var(--lamp); }

/* ---------- Archive: a 90s game-magazine cover ---------- */

.page .mag-head { padding: clamp(36px, 9vw, 80px) 0 12px; }
.page .mag-head .kicker { margin: 0 0 14px; }
.page .mag-head .blog-masthead {
  display: block;
  margin: 0 0.3em 18px 0;
  font-size: clamp(54px, 15vw, 104px);
  line-height: 0.88;
  text-shadow: 4px 4px 0 var(--crt), 8px 8px 0 var(--lamp-deep);
}
.page .mag-strap { margin: 0 0 18px; font-size: 20px; line-height: 1.5; color: var(--ink); }
.page .mag-head + .posts,
.page .mag-head + .posts-empty { margin-top: 32px; }
.page .mag-follow {
  margin: 28px 0 0;
  font: 700 13px/1.6 var(--f-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.page .mag-follow a { color: var(--lamp); }

/* ---------- Post page ---------- */

.patch-notes .nav a[aria-current="true"] { background: var(--ink); color: var(--night); }

.page .post-head { padding: clamp(36px, 8vw, 72px) 0 0; }
.page .post-kicker {
  margin: 0 0 18px;
  font: 700 12px/2 var(--f-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.page .post-kicker a { color: var(--lamp); text-decoration: none; }
.page .post-kicker a:hover { text-decoration: underline; }
.page .post-kicker time { white-space: nowrap; }
.page .post-kicker .issue-badge { padding: 3px 7px 2px; font-size: 20px; letter-spacing: 0.04em; vertical-align: -1px; }
.page .post-heading {
  margin: 0 0 18px;
  font: 400 clamp(38px, 8vw, 60px)/1.02 var(--f-display);
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
}
.page .post-head .post-dek { max-width: 40em; margin: 0; font-size: 20px; line-height: 1.5; color: var(--ink-dim); }

.page .post-cover { margin: 32px 0 0; }
.page .post-cover img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }

/* The article body. The room also shows this element in-world, so keep post content inside it. */
.page .post-body {
  max-width: 68ch;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.page .post-body > :first-child { margin-top: 0; }
.page .post-body p { margin: 0 0 1.15em; }
.page .post-body h2 {
  margin: 2em 0 0.6em;
  font: 400 26px/1.2 var(--f-display);
  letter-spacing: 0.005em;
}
.page .post-body h3 { margin: 1.8em 0 0.5em; font: 600 20px/1.35 var(--f-body); }
.page .post-body h2 + h3 { margin-top: 0.8em; }
.page .post-body strong { font-weight: 600; color: var(--ink); }
.page .post-body a {
  color: var(--lamp);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.page .post-body a:hover { color: #ffc68a; }

.page .post-body ul,
.page .post-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.page .post-body li { margin: 0.4em 0; padding-left: 0.2em; }
.page .post-body li::marker { color: var(--lamp); }
.page .post-body ol li::marker { font-family: var(--f-ui); font-size: 0.85em; }

.page .post-body blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--lamp);
  font-size: 21px;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}
.page .post-body blockquote p:last-child { margin-bottom: 0; }

.page .post-body code {
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: var(--night-3);
  font-family: var(--f-ui);
  font-size: 0.84em;
}
.page .post-body pre {
  margin: 1.5em 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--phosphor-bg);
  border: 1px solid rgba(125, 255, 142, 0.18);
  border-radius: 6px;
  color: #b9f5c1;
  font: 400 14px/1.6 var(--f-ui);
  overflow-wrap: normal;
}
.page .post-body pre code { padding: 0; background: none; font-size: inherit; }

.page .post-body img { height: auto; border-radius: 6px; }
.page .post-body figure { margin: 1.8em 0; }
.page .post-body figcaption { margin-top: 10px; font: 400 13px/1.5 var(--f-ui); color: var(--ink-faint); }

.page .post-body hr {
  height: auto;
  margin: 2.2em 0;
  border: 0;
  text-align: center;
  overflow: visible;
}
.page .post-body hr::before {
  content: "· · ·";
  font: 400 28px/1 var(--f-crt);
  letter-spacing: 0.5em;
  color: var(--lamp);
}

.page .post-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font: 700 13px/1.4 var(--f-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page .post-foot a { color: var(--lamp); text-decoration: none; }
.page .post-foot a:hover { text-decoration: underline; }
.page .post-foot + .footer { margin-top: 40px; border-top: 0; padding-top: 0; }

/* ---------- Phones ---------- */

@media (max-width: 560px) {
  .page .post {
    grid-template-columns: auto 1fr;
    grid-template-areas: "issue date" "title title" "dek dek";
    row-gap: 8px;
    align-items: center;
  }
  .page .post .post-dek { margin-top: 0; }
  .page .mag-head .blog-masthead { text-shadow: 3px 3px 0 var(--crt), 6px 6px 0 var(--lamp-deep); }
  .page .mag-strap { font-size: 18px; }
  .page .post-head .post-dek { font-size: 18px; }
  .page .post-body { font-size: 17px; }
  .page .post-body h2 { font-size: 23px; }
  .page .post-body blockquote { font-size: 19px; padding-left: 16px; }
}
