/* Base container class */
.typographic {
  line-height: 1.8;
  color: #333;
  /* margin: 0 auto;
  max-width: 750px; */
  padding: 1rem;

  --border-bottom-h1: 2px solid #ccc;
  --border-bottom-h2: 1px solid #ccc;
}

.typographic strong {
  font-weight: bold;
}

.typographic.no-borders {
  --border-bottom-h1: none;
  --border-bottom-h2: none;
}

.typographic.no-borders h1 {
  margin-bottom: 0rem;
  padding-bottom: 0;
}

.typographic.no-borders h2 {
  margin-bottom: 0;
  padding-bottom: 0;
}

.typographic.no-borders h1 + p,
.typographic.no-borders h2 + p {
  margin-top: 0;
}

/* Headings */
.typographic h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: #222;
  margin: 1rem 0 0.5rem;
  border-bottom: var(--border-bottom-h1);
  padding-bottom: 0.5rem;
}

.typographic h1:first-child {
  margin-top: 0;
}

.typographic h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin: 1.5rem 0 0.75rem;
  border-bottom: var(--border-bottom-h2);
  padding-bottom: 0.5rem;
}

.typographic h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #444;
  margin: 1.5rem 0 0.5rem;
}

.typographic h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #555;
  margin: 1rem 0 0.5rem;
}

.typographic h5 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #666;
  margin: 0.5rem 0 0rem;
}

.typographic h5 + ul {
  /* Too much spacing, loss of proximity */
  margin-top: 0;
}

/* Paragraphs */
.typographic p {
  font-size: 1.125rem;
  margin: 1rem 0;
  text-align: justify;
}

/* Blockquotes */
.typographic blockquote {
  font-size: 1.25rem;
  font-style: italic;
  color: #666;
  border-left: 4px solid #ccc;
  padding-left: 1rem;
  margin: 1rem 0;
}

/* Lists */
.typographic ul {
  list-style-type: disc;
  margin: 1rem 0;
  padding-left: 2rem;
}

.typographic ol {
  list-style-type: decimal;
  margin: 1rem 0;
  padding-left: 2rem;
}

.typographic li {
  margin-bottom: 0.5rem;
}

/* Figures */
.typographic figure {
  margin: 1.5rem 0;
  text-align: center;
  counter-increment: figures;
}

.typographic figcaption {
  font-size: 0.975rem;
  color: #777;
  margin-top: 0.5rem;
}

.typographic figcaption::before {
  content: 'Figure ' counter(figures) ': ';
  font-weight: bold;
}

.typographic img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Code */
.typographic code {
  font-family: 'Courier New', monospace;
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.95rem;
}

.typographic pre {
  font-family: 'Courier New', monospace;
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.95rem;
}

/* Links */
.typographic a {
  /* color: #007acc; */
  color: var(--color-compass-bordeaux);
  text-decoration: none;
}

.typographic a:hover {
  text-decoration: underline;
}

/* Horizontal Rules */
.typographic hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2rem 0;
}

/* Tables */
.typographic table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.typographic th,
.typographic td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

.typographic table.compact th,
.typographic table.compact td {
  padding: 0.5rem 0.75rem;
}

.typographic th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.typographic td {
  background-color: #fff;
}
