body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    max-width: 8.5in;
    margin: 0 auto;
    padding: 0.75in;
    color: #2c3e50;
    background: #ffffff;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 0;
    color: #1a1a1a;
    border-bottom: 3px solid #2980b9;
    padding-bottom: 12px;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
    color: #2c3e50;
    border-bottom: 2px solid #bdc3c7;
    padding-bottom: 6px;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #34495e;
}

p {
    margin: 10px 0;
    color: #2c3e50;
}

strong {
    font-weight: 600;
    color: #2c3e50;
}

ul {
    margin: 12px 0;
    padding-left: 24px;
}

li {
    margin: 6px 0;
    line-height: 1.7;
}

a {
    color: #2980b9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header styling */
h1 + p {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

/* Table of Contents styling (screen only) */
#TOC {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 20px;
    margin: 24px 0;
}

#TOC::before {
    content: "📑 Table of Contents";
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

#TOC ul {
    list-style-type: none;
    padding-left: 0;
}

#TOC ul ul {
    padding-left: 20px;
    margin-top: 8px;
}

#TOC li {
    margin: 8px 0;
}

#TOC a {
    color: #2980b9;
    text-decoration: none;
    font-weight: 500;
}

#TOC a:hover {
    text-decoration: underline;
    color: #1a5490;
}

/* Share buttons styling (screen only) */
.share-section {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 24px 0;
    text-align: center;
}

.share-section h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #2c3e50;
}

.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    min-width: 120px;
    height: 40px;
    margin: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    vertical-align: middle;
    flex-shrink: 0;
}

.share-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-btn.linkedin:hover {
    background: #006399;
    border-color: #006399;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.share-btn.twitter:hover {
    background: #1a8cd8;
    border-color: #1a8cd8;
}

.share-btn.email {
    background: #ea4335;
    color: white;
    border-color: #ea4335;
}

.share-btn.email:hover {
    background: #d33426;
    border-color: #d33426;
}

.share-btn.print-btn {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.share-btn.print-btn:hover {
    background: #059669;
    border-color: #059669;
}

.share-feedback {
    display: none;
    margin-top: 12px;
    padding: 8px 12px;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 4px;
    color: #065f46;
    font-size: 14px;
}

.share-feedback.show {
    display: block;
}

/* Print styles */
@media print {
    /* Hide table of contents, share buttons, and verbose sections when printing */
    #TOC,
    .share-section,
    .print-hide {
        display: none;
    }
    
    body {
        padding: 0.4in;
        font-size: 10pt;
        color: #000;
        line-height: 1.4;
    }
    
    h1 {
        font-size: 24pt;
        border-bottom: 2px solid #000;
        margin-bottom: 6px;
    }
    
    h2 {
        font-size: 16pt;
        page-break-after: avoid;
        border-bottom: 1px solid #666;
        margin-top: 16px;
        margin-bottom: 10px;
    }
    
    h3 {
        font-size: 13pt;
        page-break-after: avoid;
        margin-top: 12px;
        margin-bottom: 6px;
    }
    
    p {
        margin: 6px 0;
    }
    
    ul {
        margin: 8px 0;
    }
    
    li {
        margin: 4px 0;
        page-break-inside: avoid;
    }
    
    ul, li {
        page-break-inside: avoid;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    /* Show URLs for links when printing */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }
}

/* Screen-only enhancements */
@media screen {
    body {
        box-shadow: 0 0 40px rgba(0,0,0,0.1);
        margin-top: 20px;
        margin-bottom: 40px;
    }
    
    /* Hide phone number on web to prevent spam, but show in print */
    .phone-number {
        display: none !important;
    }
    
    /* Hide print-only content on screen */
    .print-only {
        display: none;
    }
}

/* Mobile optimizations */
@media screen and (max-width: 768px) {
    body {
        padding: 0.25in;
        margin-top: 10px;
        margin-bottom: 20px;
        box-shadow: none;
    }
    
    h1 {
        font-size: 24px;
        padding-bottom: 8px;
    }
    
    h2 {
        font-size: 18px;
        margin-top: 20px;
        margin-bottom: 12px;
    }
    
    h3 {
        font-size: 16px;
        margin-top: 14px;
        margin-bottom: 8px;
    }
    
    .share-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .share-btn {
        width: 100%;
        min-width: auto;
    }
}
