/* ==========================================================================
   Typography
   ADVANCE v2 Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   Body
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-body);
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-heading);
  line-height: 1.4;
  margin-bottom: 0.5em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

h5 {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

h6 {
  font-size: clamp(0.9rem, 1.2vw, 1rem);
}

/* --------------------------------------------------------------------------
   Paragraph
   -------------------------------------------------------------------------- */
p {
  margin-bottom: 1em;
}

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

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

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

/* --------------------------------------------------------------------------
   Inline Elements
   -------------------------------------------------------------------------- */
small {
  font-size: 0.85em;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

mark {
  background-color: rgba(245, 158, 11, 0.2);
  padding: 0.1em 0.2em;
}

/* --------------------------------------------------------------------------
   Blockquote
   -------------------------------------------------------------------------- */
blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background-color: rgba(0, 0, 0, 0.02);
  font-style: italic;
  color: var(--color-text-light);
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote cite {
  display: block;
  margin-top: 0.5em;
  font-size: 0.85em;
  font-style: normal;
  color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   Lists (styled context only - reset.css removes base styles)
   -------------------------------------------------------------------------- */
.content ul,
.content ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.content ul {
  list-style-type: disc;
}

.content ol {
  list-style-type: decimal;
}

.content li {
  margin-bottom: 0.3em;
  line-height: 1.7;
}

.content li:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Table (within content context)
   -------------------------------------------------------------------------- */
.content table {
  width: 100%;
  margin: 1.5em 0;
  border: 1px solid var(--color-border);
}

.content th,
.content td {
  padding: 0.75em 1em;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.content th {
  background-color: rgba(0, 0, 0, 0.03);
  font-weight: 600;
}

.content tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.01);
}

/* --------------------------------------------------------------------------
   Horizontal Rule
   -------------------------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
}

/* --------------------------------------------------------------------------
   Code
   -------------------------------------------------------------------------- */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
  background-color: rgba(0, 0, 0, 0.04);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  margin: 1.5em 0;
  padding: 1.2em;
  background-color: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}
