/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-border: #e5e7eb;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --radius: 6px;
    --container-width: 900px;
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-margin-top: 40px; /* adjust to your header height */
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.logo:hover {
    color: var(--color-primary);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}

.main-nav a:hover {
    color: var(--color-primary);
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Footer */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.site-footer p {
    color: var(--color-text-light);
    font-size: 0.875rem;
    text-align: center;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

h1 { font-size:160%; }
h2 { font-size:145%; }
h3 { font-size:130%; }
h4 { font-size:115%; }

ol, ul {border-top-width:10px;
  border-bottom-width:10px;
  margin-top:10px;
  margin-bottom:10px; }
li { margin-top:5px; margin-bottom:5px; }

p { margin-top:0.8rem; margin-bottom:0.4rem; }

a { text-decoration: none; color: var(--color-primary); }
a:visited { text-decoration: none; color: var(--color-primary); }
a:hover { text-decoration: underline; color: var(--color-primary); }
a:active { text-decoration: underline; color: var(--color-primary); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
}

.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
}

/* Forms */
input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Cards */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

/* Lists */
.book-list {
    list-style: none;
}

.book-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.book-list li:last-child {
    border-bottom: none;
}

.book-title {
    font-weight: 600;
    color: var(--color-text);
}

.book-meta {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

/* Search */
.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
}

.search-box input {
    flex: 1;
}

.search-box .btn {
    flex-shrink: 0;
}

/* Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Reading content - serif for books */
.reading-content {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.8;
    max-width: 700px;
}

.reading-content p {
    margin-bottom: 1.25rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-light); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 640px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .search-box {
        flex-direction: column;
    }
}

/* legacy

<style type="text/css">
html, body, div, p, table, caption, tbody,
tfoot, thead, tr, th, td { font-size:12pt;
  scroll-margin-top: 50px;
  font-family: Arial, Helvetica, sans-serif; }
h1, h2, h3, h4 {
  font-family: Georgia,Serif;
  font-weight: bold;
  margin-top:50%;
  margin-bottom:50%;
h1 { font-size:140%; }
h2 { font-size:130%; }
h3 { font-size:120%; }
h4 { font-size:110%; }

ol, ul {border-top-width:10px;
  border-bottom-width:10px;
  margin-top:10px;
  margin-bottom:10px; }
li { margin-top:5px; margin-bottom:5px; }

p {margin-top:100%; margin-bottom:50%; }

a { text-decoration: none; color: #0000FF; }
a:visited { text-decoration: none; color: #0000FF; }
a:hover { text-decoration: underline; color: #0000FF; }
a:active { text-decoration: underline; color: #0000FF; }
</style>

*/

