/* epochism.org — the printed charter's palette on screen: a cream page, paper
   cards, Georgia for the voice, a letterspaced sans for labels. */

:root {
  color-scheme: light dark;
  --page: #f4f1ea;
  --paper: #fdfdfc;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --rule: #0f172a;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b0c0f;
    --paper: #14161b;
    --ink: #e8e9ee;
    --muted: #a0a6b3;
    --line: #262a33;
    --rule: #6b7280;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 3rem;
}

.masthead {
  text-align: center;
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 2px solid var(--rule);
}

.mark {
  width: clamp(64px, 14vw, 88px);
  height: auto;
  border-radius: 22%;
}

.brand {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead h1 {
  margin: 0.3rem 0 0.6rem;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 9vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0 auto;
  max-width: 34rem;
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  color: var(--muted);
  text-wrap: balance;
}

.lead {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.75rem);
  background: var(--paper);
  border-left: 3px solid var(--rule);
  font-size: clamp(1.05rem, 2.4vw, 1.18rem);
}

.lead p {
  margin: 0;
}

h2 {
  margin: clamp(2.25rem, 6vw, 3.5rem) 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.realizations,
.documents {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.realization {
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--rule);
  border-radius: 0 0 4px 4px;
}

/* Five Realizations in two columns leaves the last one alone on its row. */
.realization:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.realization h3 {
  margin: 0.3rem 0 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.4vw, 1.6rem);
  line-height: 1.2;
}

.realization blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
}

.realization p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.realization p:last-child {
  margin-bottom: 0;
}

.realization .ordinal {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.documents li {
  padding: 1rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.documents .title {
  font-family: var(--serif);
  font-size: 1.1rem;
}

.documents p {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.chip {
  margin-left: 0.5rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  vertical-align: 0.1em;
}

footer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

footer p {
  margin: 0.25rem 0;
}

.formats {
  display: flex;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 2px solid var(--rule);
}

.topbar .formats {
  margin: 0;
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  text-decoration: none;
}

.home img {
  border-radius: 22%;
}

.doc {
  max-width: 44rem;
  margin-inline: auto;
}

.doc h1 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.1;
}

.doc h1 + p {
  margin-bottom: 1.75rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.doc h3 {
  margin: 1.75rem 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 1rem;
}

.doc ul,
.doc ol {
  padding-left: 1.4rem;
}

.doc li {
  margin-bottom: 0.4rem;
}

.doc blockquote {
  margin: 0 0 1rem;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
}

.doc table {
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.doc th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc pre {
  margin: 0 0 1.25rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.doc :not(pre) > code {
  padding: 0.1rem 0.3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.92em;
}

.doc hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.find {
  margin: 0;
  padding: clamp(1rem, 3vw, 1.4rem) clamp(1rem, 3vw, 1.6rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.circles {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.circle {
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--rule);
  border-radius: 0 0 4px 4px;
}

.circle h2 {
  margin: 0 0 0.4rem;
  padding: 0;
  border: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.circle p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.circle dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 0.95rem;
}

.circle dt {
  padding-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.circle dd {
  margin: 0;
  overflow-wrap: anywhere;
}
