/* The People's Stylesheet. Every pixel belongs to everyone. */
:root {
  --red: #b3261e;
  --red-deep: #7a1410;
  --gold: #e3b53a;
  --cream: #f4ead6;
  --ink: #1d1410;
  --sea: #1f4e6a;
  --paper: #efe3c8;
  --rule: #c9b58c;
  --shadow: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 1.55;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(179,38,30,.08), transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(227,181,58,.14), transparent 40%);
}
a { color: var(--red-deep); }
code { font-family: "Courier New", monospace; background: rgba(0,0,0,.06); padding: 0 .25em; }

/* --- masthead ------------------------------------------------------------ */
.masthead {
  background: var(--red);
  color: var(--cream);
  border-bottom: 8px double var(--gold);
  padding: .75rem 1rem;
}
.masthead-inner { max-width: 60rem; margin: 0 auto; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; justify-content: space-between; }
.masthead .brand {
  color: var(--cream); text-decoration: none; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  font-size: 1.05rem;
}
.masthead nav a { color: var(--gold); text-decoration: none; margin-left: 1rem; text-transform: uppercase; font-size: .8rem; letter-spacing: .12em; }
.masthead nav a:hover { text-decoration: underline wavy; }

.ticker {
  background: var(--ink); color: var(--gold); font-family: "Courier New", monospace; font-size: .8rem;
  white-space: nowrap; overflow: hidden; padding: .3rem 0;
}
.ticker span { display: inline-block; padding-left: 100%; animation: ticker 48s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker span { animation: none; padding-left: 1rem; } .wobble, .float { animation: none !important; } }

/* --- layout -------------------------------------------------------------- */
main { max-width: 60rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; margin-bottom: 3rem; }
@media (max-width: 44rem) { .hero { grid-template-columns: 1fr; } }
h1 {
  font-size: clamp(2.2rem, 6vw, 4rem); line-height: .95; margin: 0 0 1rem; text-transform: uppercase;
  color: var(--red-deep); letter-spacing: -.02em;
}
h1 small { display: block; font-size: .35em; letter-spacing: .3em; color: var(--ink); margin-top: .6rem; }
h2 {
  font-size: 1.4rem; text-transform: uppercase; letter-spacing: .12em; margin: 2.5rem 0 .75rem;
  border-left: .6rem solid var(--red); padding-left: .75rem;
}
h3 { margin: 1.25rem 0 .25rem; font-size: 1.05rem; }
.lede { font-size: 1.2rem; }
.muted { opacity: .7; }
p, li { max-width: 46rem; }

.poster {
  background: var(--paper); border: 3px solid var(--ink); box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.poster.tilt-l { transform: rotate(-1.2deg); }
.poster.tilt-r { transform: rotate(1deg); }
.poster h3 { margin-top: 0; }
.stamp {
  display: inline-block; border: 3px solid var(--red); color: var(--red); padding: .15rem .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .15em; transform: rotate(-6deg); font-size: .8rem; margin: .5rem 0;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.dept { background: var(--paper); border: 2px solid var(--ink); padding: 1rem; position: relative; }
.dept::before { content: "№ " attr(data-no); position: absolute; top: -.8rem; left: .75rem; background: var(--gold); padding: 0 .5rem; font-weight: 700; font-size: .8rem; border: 2px solid var(--ink); }
.dept h3 { margin-top: .25rem; }
.dept .seal { display: block; width: 100%; height: auto; margin: .5rem 0; }

figure { margin: 2rem 0; text-align: center; }
figure svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
figcaption { font-size: .9rem; margin-top: .5rem; font-style: italic; }
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px) rotate(.6deg); } }
.wobble { animation: wobble 5s ease-in-out infinite; transform-origin: center bottom; }
@keyframes wobble { 25% { transform: rotate(1.4deg); } 75% { transform: rotate(-1.4deg); } }

table.quota { border-collapse: collapse; width: 100%; max-width: 46rem; background: var(--paper); border: 2px solid var(--ink); }
table.quota th, table.quota td { border-bottom: 1px solid var(--rule); padding: .45rem .7rem; text-align: left; }
table.quota th { background: var(--red); color: var(--cream); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
table.quota tr:last-child td { border-bottom: 0; }

details { border: 2px dashed var(--ink); padding: .6rem 1rem; margin: 1rem 0; background: rgba(255,255,255,.35); max-width: 46rem; }
summary { cursor: pointer; font-weight: 700; }

.articles { counter-reset: art; list-style: none; padding: 0; }
.articles li { counter-increment: art; margin: .8rem 0; padding-left: 4.2rem; position: relative; }
.articles li::before { content: "Art. " counter(art); position: absolute; left: 0; top: 0; font-weight: 700; color: var(--red); font-size: .85rem; letter-spacing: .05em; }

footer.site { border-top: 3px solid var(--ink); margin-top: 3rem; padding-top: 1rem; font-size: .9rem; }
footer.site a { color: var(--ink); }
.fine { font-size: .62rem; opacity: .55; margin-top: 1rem; line-height: 1.4; }
