/* Elbows Out — accountability-ledger design system */

:root {
  --paper: #faf9f6;
  --paper-dim: #f1efe9;
  --ink: #141210;
  --ink-soft: #524c44;
  --red: #c8102e;
  --red-dark: #9b0c23;
  --kept: #1e7b44;
  --broken: #c8102e;
  --in-progress: #a06a10;
  --rolled-back: #6d28d9;
  --abandoned: #5b5650;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --display-black: "Archivo Black", "Archivo", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --rule: 3px solid var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--red); color: #fff; padding: .5rem 1rem; z-index: 99;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .08em;
}
.skip-link:focus { left: 0; }

a { color: var(--red); }
a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- masthead ---------- */

.masthead {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 6px solid var(--red);
}
.masthead-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: .8rem; padding-bottom: .8rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--paper); text-decoration: none;
}
.brand-mark {
  width: 1.15rem; height: 1.15rem; background: var(--red);
  transform: skewX(-12deg);
  box-shadow: .35rem 0 0 var(--paper);
  margin-right: .35rem;
}
.brand-word {
  font-family: var(--display-black);
  text-transform: uppercase;
  font-size: 1.25rem; letter-spacing: .04em;
}
.nav { display: flex; flex-wrap: wrap; gap: .15rem 1.1rem; }
.nav a {
  color: var(--paper); text-decoration: none;
  font-family: var(--display); font-weight: 700;
  font-stretch: 87%;
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  padding: .35rem 0; border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--red); }
.nav a[aria-current="page"] { border-bottom-color: var(--red); color: #fff; }

/* ---------- type utilities ---------- */

.kicker {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .22em; font-size: .8rem; color: var(--red); margin: 0 0 .9rem;
}
.section-title, .page-title {
  font-family: var(--display); font-weight: 900; font-stretch: 75%;
  text-transform: uppercase; line-height: .95; letter-spacing: .005em;
  margin: 0 0 1rem;
}
.page-title { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.page-dek {
  font-family: var(--serif); font-size: 1.2rem; font-style: italic;
  color: var(--ink-soft); max-width: 62ch; margin: 0 0 2.2rem;
}
.page-wrap { padding: 3.2rem 1.25rem 4.5rem; }
.page-head { border-bottom: var(--rule); padding-bottom: 1.6rem; margin-bottom: 2.4rem; }

/* ---------- hero ---------- */

.hero { padding: 4rem 0 3.2rem; border-bottom: var(--rule); }
.hero-title {
  font-family: var(--display); font-weight: 900; font-stretch: 70%;
  text-transform: uppercase; line-height: .9;
  font-size: clamp(3rem, 9vw, 6.8rem);
  margin: 0 0 1.4rem;
}
.hero-title em {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  color: var(--red); text-transform: none;
}
.hero-dek { font-size: 1.22rem; max-width: 60ch; margin: 0 0 2rem; }

.scorecard { display: flex; flex-wrap: wrap; gap: .9rem; margin: 0 0 2.2rem; }
.score {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 6.4rem; padding: .7rem 1rem .55rem;
  border: 3px solid currentColor; border-radius: 2px;
  text-decoration: none; background: var(--paper);
  transition: transform .15s ease;
}
.score:nth-child(odd) { transform: rotate(-1.4deg); }
.score:nth-child(even) { transform: rotate(1.1deg); }
.score:hover { transform: rotate(0) translateY(-3px); }
.score-num { font-family: var(--display-black); font-size: 2.1rem; line-height: 1; }
.score-label {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; margin-top: .25rem;
}
.score-kept { color: var(--kept); background: #e8f4ec; }
.score-broken { color: var(--broken); background: #fbe9ec; }
.score-in-progress { color: var(--in-progress); background: #fdf3e0; }
.score-rolled-back { color: var(--rolled-back); background: #efe9fb; }
.score-abandoned { color: var(--abandoned); background: #eeece8; }

.hero-ctas { display: flex; gap: .9rem; flex-wrap: wrap; }
.btn {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; font-size: .85rem; text-decoration: none;
  padding: .8rem 1.4rem; border: 3px solid var(--ink);
  display: inline-block; transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- sections ---------- */

.section { padding: 3.4rem 0; }
.section-dark { background: var(--ink); color: var(--paper); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; border-bottom: var(--rule); padding-bottom: .7rem; margin-bottom: 1.8rem;
}
.section-dark .section-head { border-bottom-color: var(--paper); }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 0; }
.section-link {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; font-size: .8rem; text-decoration: none; color: var(--red);
  white-space: nowrap;
}
.section-dark .section-link { color: #ff5c72; }

.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.file-card {
  border-top: var(--rule); padding-top: 1rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.file-meta {
  display: flex; justify-content: space-between; gap: 1rem; margin: 0;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem;
}
.file-num { color: var(--red); }
.section-dark .file-num { color: #ff5c72; }
.file-theme { color: var(--ink-soft); text-align: right; }
.section-dark .file-theme { color: #b7b1a8; }
.file-title {
  font-family: var(--display); font-weight: 800; font-stretch: 80%;
  text-transform: uppercase; line-height: 1.05; font-size: 1.35rem; margin: 0;
}
.file-title a { color: inherit; text-decoration: none; }
.file-title a:hover { color: var(--red); }
.section-dark .file-title a:hover { color: #ff5c72; }
.file-excerpt { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.section-dark .file-excerpt { color: #b7b1a8; }
.file-more {
  margin: auto 0 0; font-family: var(--display); font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--red);
}
.section-dark .file-more { color: #ff5c72; }

.theme-list { list-style: none; margin: 0; padding: 0; }
.theme-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1rem;
  padding: 1rem .2rem; border-bottom: 2px solid #3a362f;
  text-decoration: none; color: var(--paper);
}
.theme-row:hover .theme-name { color: #ff5c72; }
.theme-name {
  font-family: var(--display); font-weight: 900; font-stretch: 75%;
  text-transform: uppercase; font-size: clamp(1.2rem, 3vw, 1.9rem); line-height: 1;
}
.theme-count {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: .75rem; color: #ff5c72; white-space: nowrap;
}

.pull-band { border-top: var(--rule); border-bottom: var(--rule); padding: 2.6rem 1.25rem; }
.pull { margin: 0; }
.pull p {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1.35; margin: 0 0 1rem;
}
.pull p::before { content: "“"; color: var(--red); }
.pull p::after { content: "”"; color: var(--red); }
.pull cite {
  font-family: var(--display); font-style: normal; font-weight: 800;
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--ink-soft);
}

/* ---------- articles index ---------- */

.theme-block { margin-bottom: 2.8rem; }
.theme-heading {
  font-family: var(--display); font-weight: 900; font-stretch: 75%;
  text-transform: uppercase; font-size: 1.5rem; margin: 0 0 .4rem;
  color: var(--red);
}
.file-list { list-style: none; margin: 0; padding: 0; }
.file-row {
  display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.1rem;
  padding: 1.05rem 0; border-bottom: 2px solid #ddd8cf;
}
.file-row .file-num {
  font-family: var(--display-black); font-size: 1.7rem; line-height: 1;
  color: var(--ink); border-right: 3px solid var(--red); padding-right: .8rem;
  text-align: right;
}
.file-row-title {
  font-family: var(--display); font-weight: 800; font-stretch: 82%;
  text-transform: uppercase; font-size: 1.15rem; line-height: 1.15; margin: 0 0 .3rem;
}
.file-row-title a { color: var(--ink); text-decoration: none; }
.file-row-title a:hover { color: var(--red); }

/* ---------- post ---------- */

.post { padding: 3.2rem 1.25rem 4.5rem; max-width: 860px; }
.post-head { border-bottom: var(--rule); padding-bottom: 1.5rem; margin-bottom: 2rem; }
.post-title {
  font-family: var(--display); font-weight: 900; font-stretch: 72%;
  text-transform: uppercase; line-height: .98;
  font-size: clamp(1.9rem, 5vw, 3.4rem); margin: .4rem 0 0;
}
.post-date {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; color: var(--ink-soft); margin: .9rem 0 0;
}
.post-body { font-size: 1.14rem; line-height: 1.8; }
.post-body p { margin: 0 0 1.35em; }

.point {
  margin: 2.2rem 0 0; padding: 1.5rem 1.6rem 1.4rem;
  background: var(--ink); color: var(--paper);
  border-left: 8px solid var(--red);
  position: relative;
}
.point-label {
  position: absolute; top: -0.95rem; left: 1.2rem;
  background: var(--red); color: #fff;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .18em; font-size: .72rem;
  padding: .28rem .7rem; transform: rotate(-2deg);
}
.point p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.12rem; line-height: 1.7; }

.post-nav {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 3rem; padding-top: 1.2rem; border-top: var(--rule);
}
.post-nav-link {
  font-family: var(--display); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .08em; text-decoration: none;
  color: var(--ink); max-width: 46%;
}
.post-nav-link:hover { color: var(--red); }
.post-nav-link.next { text-align: right; margin-left: auto; }
.post-back { margin-top: 1.4rem; }
.post-back a {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; font-size: .75rem;
}

/* ---------- promises ---------- */

.legend { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2.6rem; }
.stamp {
  display: inline-block; padding: .3rem .8rem;
  border: 3px solid currentColor; border-radius: 2px;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .16em; font-size: .78rem;
  transform: rotate(-2deg);
}
.legend .stamp:nth-child(even) { transform: rotate(1.5deg); }
.stamp-kept { color: #14532d; background: #dcefe2; border-color: #14532d; }
.stamp-broken { color: #9b0c23; background: #f8dde2; border-color: #9b0c23; }
.stamp-in-progress { color: #7a5205; background: #f8ecd2; border-color: #7a5205; }
.stamp-rolled-back { color: #4c1d95; background: #e6def8; border-color: #4c1d95; }
.stamp-abandoned { color: #3f3b36; background: #e7e4de; border-color: #3f3b36; }

.status-block { margin-bottom: 3rem; }
.status-heading { margin: 0 0 1.2rem; }
.status-heading .stamp { font-size: 1rem; padding: .45rem 1.1rem; }
.promise-list { list-style: none; margin: 0; padding: 0; }
.promise-row { border-top: 2px solid #ddd8cf; padding: 1.4rem 0; }
.promise-text {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 1.35rem; line-height: 1.4; margin: 0 0 .5rem;
}
.promise-detail { margin: 0 0 .7rem; color: var(--ink-soft); }
.promise-links { margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.promise-file {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; font-size: .72rem; text-decoration: none;
  color: var(--ink); border: 2px solid var(--ink); padding: .25rem .6rem;
}
.promise-file:hover { background: var(--red); border-color: var(--red); color: #fff; }
.prose-note { margin-top: 2.5rem; font-style: italic; color: var(--ink-soft); }

/* ---------- prose pages ---------- */

.prose { max-width: 72ch; }
.prose h2 {
  font-family: var(--display); font-weight: 900; font-stretch: 78%;
  text-transform: uppercase; font-size: 1.5rem; line-height: 1.1;
  margin: 2.4rem 0 .9rem; padding-top: 1.2rem; border-top: 2px solid #ddd8cf;
}
.prose h3 {
  font-family: var(--display); font-weight: 800; font-stretch: 85%;
  font-size: 1.15rem; margin: 1.8rem 0 .6rem;
}
.prose p { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.3em; }
.prose li { margin-bottom: .55em; }
.prose strong { font-weight: 700; }
.prose blockquote {
  margin: 1.6rem 0; padding: .9rem 1.3rem;
  border-left: 6px solid var(--red); background: var(--paper-dim);
  font-style: italic;
}
.prose hr { border: 0; margin: 0; }

/* ---------- footer ---------- */

.footer { background: var(--ink); color: var(--paper); margin-top: 4rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem;
  padding-top: 3rem; padding-bottom: 2.4rem;
}
.footer-brand {
  font-family: var(--display-black); text-transform: uppercase;
  font-size: 1.5rem; margin: 0 0 .6rem;
}
.footer-note { color: #b7b1a8; max-width: 46ch; margin: 0; }
.footer-nav { display: grid; justify-items: start; gap: .45rem; align-content: start; }
.footer-nav a {
  color: var(--paper); text-decoration: none;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: .78rem;
}
.footer-nav a:hover { color: #ff5c72; }
.footer-small { grid-column: 1 / -1; color: #8d877e; font-size: .85rem; border-top: 2px solid #3a362f; padding-top: 1.2rem; margin: 0; }
.footer-small a { color: #b7b1a8; }

/* ---------- responsive & motion ---------- */

@media (max-width: 760px) {
  .file-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .masthead-row { justify-content: center; text-align: center; }
  .nav { justify-content: center; }
  .post-nav-link { max-width: 100%; }
}

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