/* ==========================================================
   PHRENOLOGY DATABASE
   ========================================================== */

:root {
    --background: #fcfcfc;
    --text: #222222;
    --heading: #2f4a63;
    --link: #1d5ea8;
    --link-hover: #0d3f73;
    --border: #dddddd;
    --light: #f8f8f8;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
    max-width: 1100px;
    margin: auto;
    padding: 2rem 2.5rem;
}

h1 { color: var(--heading); font-size: 1.8rem; font-weight: normal; margin-bottom: .15rem; }
h2 { color: var(--heading); font-size: 1.25rem; font-weight: normal; margin-top: 0; margin-bottom: .5rem; }
h3 { color: var(--heading); font-size: 1.05rem; margin-top: 2rem; margin-bottom: .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--border); font-weight: normal; }

nav { display: flex; align-items: center; gap: 1.5rem; margin: .75rem 0 1rem 0; font-size: .95rem; }
nav a { text-decoration: none; }
nav a.active { font-weight: 600; }

.nav-dropdown { position: relative; }
.nav-dropdown-button { border: 0; padding: 0; background: transparent; color: var(--link); font: inherit; cursor: pointer; }
.nav-dropdown-button:hover { color: var(--link-hover); text-decoration: underline; }
.nav-dropdown.active .nav-dropdown-button { font-weight: 600; }
.nav-dropdown-menu { display: none; position: absolute; z-index: 10; top: 100%; left: -0.75rem; min-width: 250px; padding: .45rem 0; background: var(--background); border: 1px solid var(--border); box-shadow: 0 3px 8px rgba(0, 0, 0, .08); }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: .45rem .75rem; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: var(--light); }

 a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

p { margin: .7rem 0; max-width: 80ch; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem 0; font-size: .95rem; }
th, td { border: 1px solid var(--border); padding: .6rem .8rem; vertical-align: top; text-align: left; }
th { width: 170px; background: var(--light); font-weight: 600; }

.entries-table { table-layout: fixed; }
.entries-table th:nth-child(1),
.entries-table td:nth-child(1) { width: 12%; }
.entries-table th:nth-child(2),
.entries-table td:nth-child(2) { width: 17%; }
.entries-table th:nth-child(3),
.entries-table td:nth-child(3) { width: 71%; }
.entries-table .entry-identifier,
.entries-table .entry-type-cell { font-size: .82rem; }
.entries-table tr:not(.child-row) .entry-identifier a,
.entries-table .entry-type-cell { font-weight: normal; }
.entries-table .entry-title-cell { font-size: 1rem; }
.entries-table .entry-title-cell a { font-weight: 600; }

.child-row td:first-child,
.child-row td:nth-child(2) { padding-left: 2rem; }
.entry-type { color: #777; font-style: italic; margin-left: .4rem; font-size: .85em; }
.child-row a { font-weight: normal; }
tr:not(.child-row) a { font-weight: 600; }
tbody tr:hover { background: #fafafa; }

.metadata { margin-bottom: 1.5rem; }
.metadata p { margin: .3rem 0; line-height: 1.45; }
.metadata strong { color: #444; font-weight: 600; display: inline-block; min-width: 9rem; }

hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0 2rem 0; }
details { margin-top: 1rem; }
summary { cursor: pointer; color: var(--heading); font-weight: 600; }
pre { white-space: pre-wrap; word-break: break-word; background: #fafafa; border: 1px solid var(--border); border-radius: 4px; padding: 1rem; overflow-x: auto; font-size: .9rem; line-height: 1.45; }
ul { padding-left: 1.3rem; }
li { margin-bottom: .4rem; }

.content-page { max-width: 900px; margin: 0 auto; }
.content-page p { text-align: justify; line-height: 1.7; }
.content-page table { width: 100%; margin: 2rem 0; }
.content-page th { width: auto; text-align: center; }
.content-page td:nth-child(2) { text-align: center; }
.content-page td:nth-child(3) { text-align: left; }
.content-page .note { width: 82%; margin: 1rem auto 2rem auto; font-size: .9rem; color: #666; line-height: 1.6; }
.documentation-image { display: block; max-width: 100%; height: auto; margin: 1rem auto; }
.about-table { table-layout: fixed; }
.about-table th:nth-child(1), .about-table td:nth-child(1) { width: 28%; }
.about-table th:nth-child(2), .about-table td:nth-child(2) { width: 18%; }
.about-table th:nth-child(3), .about-table td:nth-child(3) { width: 54%; }

.validation-section { margin: 2rem 0; }
.validation-item { margin: 0 0 1rem 0; padding: 0 0 .75rem 0; border-bottom: 1px solid #e5e5e5; }
.validation-item:last-child { border-bottom: none; }
.validation-item h3 { margin: 0 0 .25rem 0; font-size: 1.1rem; }
.validation-item p { margin: 0; line-height: 1.45; }

.content-page .qa-table { width: auto; max-width: 100%; margin: 1rem 0 1.25rem 0; font-size: .85rem; }
.content-page .qa-table th, .content-page .qa-table td { padding: .35rem .6rem; }
.content-page .qa-table th { white-space: nowrap; }
.content-page .qa-table td { white-space: nowrap; }
.content-page .qa-table td:first-child { text-align: left; }
.content-page .qa-table td:not(:first-child), .content-page .qa-table th:not(:first-child) { text-align: center; }
.content-page .qa-table.compact { font-size: .82rem; }
.content-page .qa-table.compact th, .content-page .qa-table.compact td { padding: .3rem .5rem; }

@media (max-width: 800px) {
    body { padding: 1rem; font-size: 15px; }
    nav { gap: 1rem; flex-wrap: wrap; }
    th { width: 140px; }
    .content-page .qa-table { font-size: .8rem; display: block; overflow-x: auto; white-space: nowrap; }
    .content-page .qa-table.compact { font-size: .78rem; }
}