/* Shared layout for the reading pages. Same ink, cream, brick and sky as the game. */
:root {
  --ink: #1c1917;
  --cream: #f7f1e8;
  --cream-deep: #ece3d4;
  --muted: #6b635a;
  --brick: #c45c3e;
  --brick-deep: #9a3f28;
  --sky: #7eb8d4;
  --border: #2a241f;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: Nunito, "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: var(--brick-deep); }

a:hover { color: var(--brick); }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--cream);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  z-index: 5;
}

.skip:focus { top: 0.75rem; }

.topbar {
  background: var(--ink);
  color: var(--cream);
  padding: 0.35rem 1rem 0.6rem;
}

.topbar a { color: var(--cream); }

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: Fredoka, "Segoe UI", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover { color: var(--cream); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  padding-bottom: 0.15rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.98rem;
}

.nav a[aria-current="page"] {
  color: #f3c7b8;
  text-decoration-thickness: 2px;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

article {
  background: var(--cream);
  border: 3px solid var(--border);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.35rem 1.15rem 1.6rem;
}

h1, h2, h3 {
  font-family: Fredoka, "Segoe UI", system-ui, sans-serif;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: 2rem; margin: 0 0 0.85rem; }

h2 { font-size: 1.35rem; margin: 1.6rem 0 0.45rem; color: var(--brick-deep); }

h3 { font-size: 1.12rem; margin: 1.15rem 0 0.3rem; }

p { margin: 0.7rem 0; }

ul, ol { margin: 0.5rem 0 0.7rem; padding-left: 1.2rem; }

li { margin: 0.35rem 0; }

.lede { font-size: 1.12rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1rem;
  font-size: 0.98rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(42, 36, 31, 0.2);
}

th { font-family: Fredoka, "Segoe UI", system-ui, sans-serif; font-weight: 650; }

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.coats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0.8rem 0 0.3rem;
}

.coat {
  margin: 0;
  background: var(--cream-deep);
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  padding: 0.35rem 0.3rem 0.5rem;
}

.coat img { width: 100%; height: auto; display: block; }

.coat span {
  display: block;
  margin-top: 0.2rem;
  font-family: Fredoka, "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
}

.portrait {
  float: right;
  width: 42%;
  max-width: 220px;
  margin: 0.15rem 0 0.6rem 0.9rem;
  border: 3px solid var(--border);
  border-radius: 16px;
  background: var(--cream-deep);
}

.updates article section + section {
  margin-top: 0.4rem;
  padding-top: 0.2rem;
}

time { color: var(--brick-deep); font-family: Fredoka, "Segoe UI", system-ui, sans-serif; }

.foot {
  background: var(--ink);
  color: var(--cream);
  padding: 1.25rem 1rem 2rem;
  font-size: 0.95rem;
}

.foot a { color: var(--cream); }

.foot .inner { max-width: 42rem; margin: 0 auto; }

.foot p { margin: 0.45rem 0; }

.foot .office { color: #ece3d4; }

@media (max-width: 520px) {
  h1 { font-size: 1.7rem; }
  article { padding: 1.1rem 0.95rem 1.3rem; border-radius: 16px; }
  .portrait { float: none; display: block; width: min(220px, 70%); margin: 0 auto 0.8rem; }
}

@media (min-width: 700px) {
  .coats { grid-template-columns: repeat(6, 1fr); }
  article { padding: 1.6rem 1.5rem 1.8rem; }
}
