/* Charter font - will need font files uploaded */
@font-face {
    font-family: 'Charter';
    src: url('/fonts/charter-regular.woff2') format('woff2'),
         url('/fonts/charter-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Charter';
    src: url('/fonts/charter-bold.woff2') format('woff2'),
         url('/fonts/charter-bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Charter';
    src: url('/fonts/charter-italic.woff2') format('woff2'),
         url('/fonts/charter-italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Fallback to system serif if Charter not loaded */
:root {
    --font-main: 'Charter', 'Bitstream Charter', 'Georgia', 'Times New Roman', serif;
    --color-text: #000;
    --color-bg: #fff;
    --color-link: #000;
    --color-link-hover: #555;
    --color-border: #ccc;
    --color-row-alt: #f9f9f9;
    --max-width: 720px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    line-height: 1.6;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg);
    margin: 0;
    padding: 2rem 1rem;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: normal;
    margin: 0 0 0.25rem 0;
    text-align: center;
}

h2 {
    font-size: 1.4rem;
    font-weight: normal;
    margin: 2rem 0 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.25rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 1.5rem 0 0.5rem 0;
}

p {
    margin: 0 0 1rem 0;
}

.subtitle {
    font-style: italic;
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.disclaimer {
    text-align: center;
    font-size: 0.95rem;
    color: #333;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

a.email-link,
a.email-link:visited {
    color: #76B900 !important;
    text-decoration: underline;
}

a.email-link:hover {
    color: #5a8c00 !important;
}

/* Navigation */
.peptide-nav {
    text-align: center;
    margin: 2rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.peptide-nav a {
    color: var(--color-text);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.peptide-nav a:hover {
    text-decoration: underline;
}

.peptide-nav a.active {
    font-weight: bold;
}

.peptide-nav .separator {
    color: #999;
    margin: 0 0.25rem;
}

/* Price Table */
.price-table-section {
    margin: 2rem 0;
}

.peptide-description {
    font-style: normal;
    color: #000;
    font-size: 0.95rem;
    margin: 0.5rem 0 1rem 0;
    line-height: 1.5;
}

.last-updated {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

/* Sortable table headers */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background: #f5f5f5;
}

.sortable .sort-arrow {
    opacity: 0.3;
    font-size: 0.85rem;
}

.sortable.active .sort-arrow {
    opacity: 1;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.price-table th,
.price-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--color-border);
}

.price-table th {
    background: var(--color-bg);
    font-weight: bold;
}

.price-table tbody tr:nth-child(even) {
    background: var(--color-row-alt);
}

.price-table tbody tr:hover {
    background: #f0f0f0;
}

/* Quality ratings */
.rating {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.85rem;
}

.rating-a {
    background: #d4edda;
    color: #155724;
}

.rating-b {
    background: #d1ecf1;
    color: #0c5460;
}

.rating-c {
    background: #fff3cd;
    color: #856404;
}

.rating-d {
    background: #ffe5d0;
    color: #854600;
}

.rating-e {
    background: #f8d7da;
    color: #721c24;
}

.rating-f {
    background: #d6d6d6;
    color: #333;
}

/* Links */
a {
    color: var(--color-link);
}

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

.price-table a {
    text-decoration: none;
}

.price-table a:hover {
    text-decoration: underline;
}

/* Methodology */
.methodology {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: #444;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: #666;
}

footer small {
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .price-table th,
    .price-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .peptide-nav {
        font-size: 0.85rem;
    }
}
