/* Almanac Hollow - legal pages. Pixel look in CSS only: no pack art is used here (the packs may not be redistributed).
   Fonts are the game's own (SIL OFL, licence texts sit beside them in /assets). Colours follow the game's panels. */
@font-face { font-family: "Pixelify"; src: url("/assets/pixelify_sans_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jersey"; src: url("/assets/jersey_10.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --ink: #6a3f30;
  --ink-soft: #8a5a48;
  --paper: #ecd9ae;
  --paper-light: #f4e6c3;
  --paper-edge: #c9a56a;
  --frame: #7a4a2e;
  --frame-dark: #4a2c1c;
  --ribbon: #a8452f;
  --ribbon-dark: #7d2f20;
  --night: #232a31;
  --leaf: #3f8f5f;
}
@media (prefers-color-scheme: dark) {
  :root { --night: #14181c; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px 48px;
  background: var(--night);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 214, 120, .10) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 30%, rgba(255, 214, 120, .08) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 80%, rgba(255, 214, 120, .08) 0 2px, transparent 3px);
  background-size: 160px 160px, 220px 220px, 180px 180px;
  color: var(--ink);
  font-family: "Jersey", ui-monospace, monospace;
  font-size: 22px;
  line-height: 1.35;
}

.page { max-width: 760px; margin: 0 auto; }

/* The card: a tan panel with a stepped (pixel) frame */
.card {
  background: var(--paper);
  border: 4px solid var(--frame);
  box-shadow:
    0 0 0 4px var(--frame-dark),
    inset 0 0 0 4px var(--paper-light),
    inset 0 0 0 8px var(--paper-edge),
    8px 8px 0 4px rgba(0, 0, 0, .35);
  padding: 40px 36px 32px;
  position: relative;
  margin-top: 28px;
}
@media (max-width: 520px) { .card { padding: 36px 20px 24px; } body { font-size: 20px; } }

/* The ribbon title */
.ribbon {
  position: absolute;
  top: -22px; left: 50%;
  transform: translateX(-50%);
  background: var(--ribbon);
  color: #fff4dc;
  font-family: "Pixelify", ui-monospace, monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .5px;
  padding: 8px 28px;
  white-space: nowrap;
  border: 4px solid var(--ribbon-dark);
  box-shadow: 0 4px 0 var(--frame-dark);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 8px;
  width: 18px; height: 100%;
  background: var(--ribbon-dark);
  z-index: -1;
}
.ribbon::before { left: -26px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 28% 50%); }
.ribbon::after { right: -26px; clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%); }

.head { display: flex; align-items: center; gap: 18px; margin: 4px 0 8px; }
.head img { width: 72px; height: 72px; image-rendering: pixelated; border: 4px solid var(--frame); box-shadow: 4px 4px 0 rgba(0,0,0,.25); background: #fff4dc; }
.head .name { font-family: "Pixelify", ui-monospace, monospace; font-weight: 700; font-size: 26px; line-height: 1.1; }
.head .tag { color: var(--ink-soft); font-size: 20px; }

h1, h2 { font-family: "Pixelify", ui-monospace, monospace; font-weight: 700; color: var(--ink); margin: 0; }
h1 { font-size: 28px; margin: 18px 0 6px; }
h2 { font-size: 20px; margin: 28px 0 6px; padding-bottom: 6px; border-bottom: 4px dotted var(--paper-edge); }
p { margin: 8px 0; }
ul { margin: 8px 0; padding-left: 0; list-style: none; }
li { position: relative; padding-left: 26px; margin: 6px 0; }
li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 10px; height: 10px; background: var(--leaf); box-shadow: 2px 2px 0 var(--frame-dark); }
a { color: var(--ribbon-dark); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover, a:focus-visible { background: var(--ribbon); color: #fff4dc; text-decoration: none; outline: none; }
strong { color: var(--frame-dark); }

.note {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--paper-light);
  border: 4px solid var(--paper-edge);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .15);
}
.small { font-size: 18px; color: var(--ink-soft); }

/* Plate buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0 4px; }
.plate {
  display: inline-block;
  font-family: "Pixelify", ui-monospace, monospace; font-weight: 700; font-size: 17px;
  padding: 12px 22px;
  min-height: 48px;
  color: #fff4dc; background: var(--leaf);
  border: 4px solid #2c6a45;
  box-shadow: 0 4px 0 var(--frame-dark);
  text-decoration: none;
}
.plate:hover, .plate:focus-visible { background: #4aa06f; color: #fff4dc; transform: translateY(2px); box-shadow: 0 2px 0 var(--frame-dark); }

.foot { text-align: center; margin-top: 28px; color: #c9b88f; font-size: 18px; }
.foot a { color: #f1d28a; }
.foot a:hover { background: #f1d28a; color: var(--night); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
