/**
 * TIC Design System - Typography
 * Headings, paragraphs, lists, and text elements
 */

/* ==========================================================================
   Headings
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-sans);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: var(--space-4);
    font-variation-settings: 'opsz' 32;
}

h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-3xl);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
}

h3 {
    font-size: var(--text-2xl);
    margin-top: var(--space-6);
}

h4 {
    font-size: var(--text-xl);
    margin-top: var(--space-6);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

/* ==========================================================================
   Paragraphs
   ========================================================================== */

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph */
.lead {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
    .lead {
        font-size: var(--text-xl);
    }
}

/* Small text */
small,
.small {
    font-size: var(--text-sm);
}

/* Strong / Bold */
strong,
b {
    font-weight: var(--font-semibold);
}

/* Emphasis / Italic */
em,
i {
    font-style: italic;
}

/* Mark / Highlight */
mark {
    background-color: var(--color-warning-bg);
    color: var(--text-primary);
    padding: 0.125em 0.25em;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Lists
   ========================================================================== */

ul,
ol {
    margin-top: 0;
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
    line-height: var(--leading-relaxed);
}

ul ul,
ul ol,
ol ul,
ol ol {
    margin-bottom: 0;
}

li {
    margin-bottom: var(--space-2);
}

li:last-child {
    margin-bottom: 0;
}

/* Unstyled list utility */
.list-unstyled {
    padding-left: 0;
    list-style: none;
}

/* Inline list */
.list-inline {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.list-inline li {
    margin-bottom: 0;
}

/* ==========================================================================
   Code and Pre
   ========================================================================== */

code, kbd, samp, pre {
    font-family: var(--font-family-mono);
    font-size: 0.875em;
}

code {
    padding: 0.125em 0.25em;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

pre {
    padding: var(--space-4);
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

pre code {
    padding: 0;
    background-color: transparent;
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
    width: 100%;
    margin-bottom: var(--space-4);
    border-collapse: collapse;
    font-size: var(--text-sm);
}

th,
td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-primary);
}

th {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    white-space: nowrap;
}

tbody tr:hover {
    background-color: var(--bg-hover);
}

/* Responsive table wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--space-4);
}

.table-responsive table {
    margin-bottom: 0;
    min-width: 600px;
}
