/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background: #f9f6f2;
    color: #2c2c2c;
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.container-text {
    max-width: 640px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-family: 'Libre Baskerville', serif;
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.tagline {
    color: #666;
    font-size: 1.1rem;
    max-width: 480px;
    margin: 0 auto;
}

/* Calculator */
.calculator {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.calculator-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    margin: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.input-hint {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

input[type="number"] {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #7c956c;
}

/* Result */
.result {
    text-align: center;
    padding: 1.5rem;
    background: #f9f6f2;
    border-radius: 12px;
}

.result-number {
    font-family: 'Libre Baskerville', serif;
    font-size: 5rem;
    font-weight: 700;
    color: #7c956c;
    line-height: 1;
}

.result-label {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.result-details {
    font-size: 0.95rem;
    color: #666;
    text-align: left;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.result-details p {
    margin-bottom: 0.4rem;
}

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

/* Share section */
.share-section {
    margin-top: 1rem;
}

.share-text {
    background: white;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-align: left;
}

.copy-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: #7c956c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #6a8359;
}

/* Intro section */
.intro {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.intro h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.intro p {
    margin-bottom: 1rem;
    color: #444;
}

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

/* FAQ section */
.faq {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.faq h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c2c2c;
}

.faq-item p {
    color: #555;
    font-size: 0.95rem;
}

/* About page specific */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #7c956c;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.content h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: #1a1a1a;
}

.content h2:first-child {
    margin-top: 0;
}

.content p {
    margin-bottom: 1rem;
    color: #444;
}

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

.content a {
    color: #7c956c;
    text-decoration: none;
}

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

/* Reading stats */
.reading-stats {
    background: #f9f6f2;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.reading-stats h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.reading-stats ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.reading-stats li {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-align: center;
}

.reading-stats .year {
    font-size: 0.85rem;
    color: #888;
}

.reading-stats .count {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c956c;
}

.reading-stats .label {
    font-size: 0.8rem;
    color: #666;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    color: #999;
    font-size: 0.85rem;
}

footer a {
    color: #7c956c;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Mobile layout */
@media (max-width: 700px) {
    .container {
        max-width: 100%;
    }

    .calculator {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .result {
        order: 2;
    }

    .result-number {
        font-size: 4rem;
    }

    h1 {
        font-size: 1.8rem;
    }
}