/* ============================================
   Condie.org — Family Heritage Site
   Theme drawn from the Condie Coat of Arms:
   Azure lion, vert & argent shield, gules cinquefoils, or coronet
   ============================================ */

:root {
    --azure: #1a4480;
    --azure-deep: #0f2d5a;
    --azure-light: #2b5ea7;
    --vert: #2d6a3f;
    --vert-light: #3d8a55;
    --gules: #a83232;
    --gules-light: #c94444;
    --or-gold: #c5961e;
    --or-light: #dbb342;
    --or-pale: #f0dfa0;
    --argent: #f5f3ee;
    --warm-white: #fefdfb;
    --silver: #d0cdc4;
    --mantling: #3a3630;
    --text-dark: #1e1b16;
    --text-body: #3d3729;
    --text-light: #6b6355;
    --border: #d8d2c4;
    --shadow: rgba(26, 68, 128, 0.1);
    --shadow-hover: rgba(26, 68, 128, 0.2);
}

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--text-body);
    background: var(--argent);
    min-height: 100vh;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
    font-family: 'Georgia', serif;
    color: var(--text-dark);
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--azure);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--or-gold);
}

/* ---- Site Header (learntosucceed format) ---- */
.site-header {
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(26, 68, 128, 0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.logo .crest-banner {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.logo-text {
    font-family: 'Georgia', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-highlight {
    color: var(--azure);
}

.site-header .tagline {
    flex: 1;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    white-space: nowrap;
}

/* ---- Header Nav Dropdown ---- */
.header-nav {
    flex-shrink: 0;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--azure);
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-btn:hover {
    background: var(--argent);
    color: var(--azure-deep);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(26, 68, 128, 0.1);
    min-width: 180px;
    list-style: none;
    padding: 6px 0;
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
    display: block;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 8px 18px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    color: var(--text-body);
    transition: background 0.15s ease;
}

.nav-dropdown-menu li a:hover {
    background: var(--argent);
    color: var(--azure);
}

.nav-dropdown-menu .nav-divider {
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* ---- Header Search ---- */
.header-search {
    flex-shrink: 0;
}

.header-search-input {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8rem;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--argent);
    color: var(--text-body);
    width: 140px;
    outline: none;
    transition: all 0.2s ease;
}

.header-search-input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.header-search-input:focus {
    border-color: var(--azure);
    width: 200px;
    box-shadow: 0 0 0 2px rgba(26, 68, 128, 0.1);
}

/* ---- Hero / Page Header ---- */
.hero {
    background: linear-gradient(135deg, var(--azure-deep) 0%, var(--azure) 40%, var(--vert) 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero h2 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero .crest-hero {
    width: 140px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.page-header {
    background: linear-gradient(135deg, var(--azure-deep) 0%, var(--azure) 60%, var(--vert) 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-bottom: 4px solid var(--or-gold);
}

.page-header h2 {
    color: white;
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.page-header p {
    color: rgba(255,255,255,0.85);
    font-style: italic;
}

/* ---- Content Containers ---- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-section {
    margin-bottom: 3rem;
}

/* ---- Cards ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.card h3 {
    color: var(--azure);
    margin-bottom: 0.75rem;
}

.card .meta {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.75rem;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

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

.btn-gold {
    background: var(--or-gold);
    color: white;
    box-shadow: 0 4px 12px rgba(197, 150, 30, 0.3);
}

.btn-gold:hover {
    background: var(--or-light);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--azure);
    color: var(--azure);
}

.btn-outline:hover {
    background: var(--azure);
    color: white;
}

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

.btn-vert:hover {
    background: var(--vert-light);
    color: white;
}

/* ---- Quick-Links Grid (homepage) ---- */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quick-link {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border-top: 3px solid transparent;
}

.quick-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    border-top-color: var(--or-gold);
}

.quick-link .icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.quick-link h3 {
    color: var(--azure);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.quick-link p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* ---- Photo Grid ---- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo-card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.photo-card .photo-caption {
    padding: 1rem 1.25rem;
}

.photo-card .photo-caption h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.photo-card .photo-caption p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0;
}

/* ---- Recipe Card ---- */
.recipe-card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.recipe-card h3 {
    color: var(--azure);
    border-bottom: 2px solid var(--or-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.recipe-card .attribution {
    color: var(--or-gold);
    font-style: italic;
    margin-bottom: 1rem;
}

.recipe-card ul, .recipe-card ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.recipe-card li {
    margin-bottom: 0.35rem;
}

/* ---- Form Styles ---- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    background: var(--warm-white);
    color: var(--text-body);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--azure);
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ---- Modal / Popup (Family Tree) ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--warm-white);
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, var(--azure-deep) 0%, var(--azure) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 3px solid var(--or-gold);
}

.modal-header h3 {
    color: white;
    font-size: 1.4rem;
}

.modal-header .lifespan {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-style: italic;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.modal-body {
    padding: 2rem;
}

.modal-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--or-gold);
    margin: 0 auto 1.5rem;
    display: block;
}

.modal-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--border);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--silver);
    border: 4px solid var(--or-gold);
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h4 {
    color: var(--azure);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.35rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-section p {
    font-size: 0.95rem;
    color: var(--text-body);
}

.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-links a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--argent);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Segoe UI', sans-serif;
    color: var(--azure);
    transition: all 0.3s ease;
}

.modal-links a:hover {
    background: var(--azure);
    color: white;
    border-color: var(--azure);
}

/* ---- Family Tree ---- */
.tree-container {
    overflow-x: auto;
    padding: 2rem 0;
}

.family-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    min-width: fit-content;
    padding: 1rem;
}

.tree-generation {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.tree-generation::before {
    content: attr(data-label);
    position: absolute;
    left: -140px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.8rem;
    font-family: 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.tree-couple {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tree-couple .connector {
    width: 20px;
    height: 2px;
    background: var(--or-gold);
}

.tree-person {
    background: var(--warm-white);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.tree-person:hover {
    border-color: var(--or-gold);
    box-shadow: 0 4px 15px var(--shadow-hover);
    transform: translateY(-2px);
}

.tree-person.male {
    border-left: 4px solid var(--azure);
}

.tree-person.female {
    border-left: 4px solid var(--gules);
}

.tree-person .name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    display: block;
}

.tree-person .years {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-top: 0.15rem;
}

.tree-branch-line {
    width: 2px;
    height: 30px;
    background: var(--silver);
    margin: 0 auto;
}

.tree-branch-horizontal {
    height: 2px;
    background: var(--silver);
    margin: 0 auto;
}

/* ---- Photo Collage ---- */
.collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 180px);
    gap: 6px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.collage a {
    display: block;
    overflow: hidden;
    position: relative;
}

.collage a::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.collage a:hover::after {
    opacity: 1;
}

.collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.collage a:hover img {
    transform: scale(1.05);
}

.collage .collage-wide {
    grid-column: span 2;
}

.collage .collage-tall {
    grid-row: span 2;
}

.collage-caption {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.95rem;
}

.collage-caption a {
    color: var(--azure);
    font-style: normal;
    font-weight: 600;
}

@media (max-width: 600px) {
    .collage {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 140px);
    }

    .collage .collage-wide {
        grid-column: span 1;
    }
}

/* ---- Coat of Arms Feature ---- */
.crest-feature {
    text-align: center;
    padding: 2rem;
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.crest-feature img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    margin-bottom: 1rem;
}

.crest-feature .blazon {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0.5rem auto 0;
}

/* ---- Divider with crest motif ---- */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--or-gold), transparent);
}

.divider span {
    color: var(--or-gold);
    font-size: 1.2rem;
}

/* ---- Footer ---- */
.site-footer {
    background: var(--azure-deep);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    border-top: 4px solid var(--or-gold);
}

.site-footer a {
    color: var(--or-light);
}

.site-footer a:hover {
    color: var(--or-gold);
}

.site-footer .footer-links {
    margin-bottom: 1rem;
}

.site-footer .footer-links a {
    margin: 0 0.75rem;
}

/* ---- Spiritual Thought Tiles ---- */
.thought-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.thought-tile {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thought-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.thought-tile-header {
    background: linear-gradient(135deg, var(--azure-deep) 0%, var(--azure) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-bottom: 3px solid var(--or-gold);
}

.thought-tile-header h3 {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.thought-tile-header .thought-source {
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    font-style: italic;
}

.thought-tile-body {
    padding: 1.5rem;
}

.thought-tile-body .excerpt {
    font-size: 0.95rem;
    color: var(--text-body);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.thought-tile-body .scripture {
    font-size: 0.85rem;
    color: var(--vert);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.thought-tile-body audio {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.thought-tile-body .audio-note {
    font-size: 0.78rem;
    color: var(--text-light);
    text-align: center;
    margin: 0;
}

.thought-tile-body .script-link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--azure);
    cursor: pointer;
}

.thought-tile-body .script-link:hover {
    color: var(--azure-light);
    text-decoration: underline;
}

/* ---- Script Modal ---- */
.script-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

.script-modal-overlay.active {
    display: flex;
}

.script-modal {
    background: white;
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.script-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--argent);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.script-print-btn {
    background: var(--azure);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.script-print-btn:hover {
    background: var(--azure-light);
}

.script-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}

.script-close-btn:hover {
    color: var(--gules);
}

.script-modal-content {
    padding: 2rem 2.5rem;
}

.script-modal-content h2 {
    text-align: center;
    color: var(--azure-deep);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.script-modal-content p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-body);
}

@media (max-width: 600px) {
    .script-modal-overlay {
        padding: 1rem;
    }
    .script-modal-content {
        padding: 1.25rem 1.5rem;
    }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .site-header .tagline {
        display: none;
    }

    .logo .crest-banner {
        height: 36px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero .crest-hero {
        width: 100px;
    }

    .tree-generation::before {
        display: none;
    }

    .tree-generation {
        flex-direction: column;
        align-items: center;
    }

    .modal {
        margin: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}
