/* Encamp dev diary styles.
   Night-forest palette shared with the game UI: parchment ink on a dark ground,
   ember as the single accent. Cinzel for headings, Georgia for prose. */

:root {
  --ground: #0e130f;
  --panel: #121a13;
  --panel-soft: #111811;
  --edge: #28362b;
  --edge-soft: #1e2a20;
  --ink: #ece5d2;
  --ink-soft: #a7b5a0;
  --ink-mute: #7f8f79;
  --ember: #ff9f43;
  --ember-light: #ffb35c;
  --ember-dim: #d97e2a;
  --display: "Cinzel", "Palatino Linotype", "Book Antiqua", serif;
  --prose: Georgia, "Times New Roman", Times, serif;
  --measure: 42rem;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink-soft);
  font-family: var(--prose);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ember);
}
a:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* Site header */
.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.site-nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.95rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.site-nav-link {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav-link:hover {
  color: var(--ink);
}
.site-nav-link[aria-current="page"] {
  color: var(--ink);
}
.btn-play {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  background: var(--ember);
  color: #221204;
  padding: 0.4rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-play:hover {
  background: var(--ember-light);
  color: #221204;
}

/* Page shell */
.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.6rem 1.35rem 5rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.92rem;
  color: var(--ink-mute);
  margin-bottom: 2rem;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--ink);
}
.breadcrumb [aria-current="page"] {
  color: var(--ink-soft);
}

/* Article and page headers */
.article-header {
  margin-bottom: 2.2rem;
}
.kicker {
  font-size: 0.95rem;
  color: var(--ember);
  margin: 0 0 0.6rem;
}
h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.15rem, 6.6vw, 3.05rem);
  line-height: 1.06;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
.byline {
  margin: 0.9rem 0 0;
  color: var(--ink-mute);
  font-size: 0.98rem;
}

.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(to right, var(--ember-dim), var(--edge) 38%, transparent);
  margin: 2.2rem 0 0;
}

/* Figures */
figure {
  margin: 2rem 0;
}
figure a {
  display: block;
}
figure img {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
}
figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--ink-mute);
}

.feed-link {
  margin: 2.5rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-mute);
}

/* Article body */
.prose-body {
  color: var(--ink);
}
.prose-body p {
  margin: 0 0 1.15rem;
}
.prose-body > h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.58rem;
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
  margin: 2.4rem 0 0.95rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--edge-soft);
  scroll-margin-top: 1.5rem;
}
.prose-body > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.prose-body strong {
  color: var(--ink);
  font-weight: 600;
}
.prose-body a {
  color: var(--ember);
  font-weight: 600;
  text-decoration: underline;
}
.prose-body a:hover {
  color: var(--ember-light);
}

/* Bullets */
.notes {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
}
.notes > li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.62rem;
}
.notes > li:last-child {
  margin-bottom: 0;
}
.notes > li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.72em;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--ember-dim);
  transform: rotate(45deg);
}
.notes .notes {
  margin: 0.55rem 0 0;
  padding-left: 0.1rem;
}
.notes .notes > li {
  color: var(--ink-mute);
  font-size: 0.96rem;
  margin-bottom: 0.42rem;
}
.notes .notes > li::before {
  background: transparent;
  border: 1px solid var(--ink-mute);
  top: 0.64em;
  width: 0.38rem;
  height: 0.38rem;
}

/* Contents panel */
.contents {
  padding: 1.3rem 1.4rem;
  background: var(--panel-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 3px;
  margin: 0 0 1.15rem;
}
.contents p {
  margin: 0 0 0.7rem;
  color: var(--ink-mute);
  font-size: 0.95rem;
}
.contents ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.3rem 1.6rem;
  font-size: 0.98rem;
}
.contents a {
  color: var(--ink);
  font-weight: normal;
  text-decoration: none;
}
.contents a:hover {
  color: var(--ember);
}

/* Tables */
.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 26rem;
}
caption {
  caption-side: top;
  text-align: left;
  color: var(--ink-mute);
  font-size: 0.92rem;
  padding-bottom: 0.7rem;
}
th,
td {
  text-align: left;
  padding: 0.55rem 1rem 0.55rem 0;
  border-bottom: 1px solid var(--edge-soft);
}
thead th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  border-bottom-color: var(--ember-dim);
  padding-bottom: 0.45rem;
}
tbody th {
  font-weight: normal;
  color: var(--ink-mute);
}
td {
  color: var(--ink);
}
.cap {
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 0;
}

/* Index cards */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.card {
  border: 1px solid var(--edge-soft);
  background: var(--panel-soft);
  border-radius: 0.7rem;
  overflow: hidden;
}
.card > a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card img {
  display: block;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.card-body {
  padding: 1.4rem;
}
.card-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
}
.card h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.42rem;
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
.card > a:hover h2 {
  color: var(--ember);
}
.card-date {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-mute);
}
.card-summary {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
}
.card-more {
  margin: 0.85rem 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ember);
}
.card > a:hover .card-more {
  color: var(--ember-light);
}

@media (max-width: 34rem) {
  body {
    font-size: 16.5px;
  }
  .site-nav-links {
    gap: 1rem;
  }
  .card-body {
    padding: 1.15rem;
  }
}
