/* scotnames overrides for the shared johnfaben.com base stylesheet.
   Chrome stays greyscale like the rest of the site; teal/amber is reserved
   for chart data (boy/girl). */

nav ul { flex-wrap: wrap; }

#content h1 {
    font-size: 2em;
    font-weight: normal;
    color: var(--heading);
    padding: 0.2em 0;
}

.lead {
    font-size: 1.1em;
    color: var(--heading);
}

canvas { max-width: 100%; }

.chart-block { margin: 1em 0 2em; }

/* Fixed-height container for the 20-row horizontal bar chart
   (maintainAspectRatio is off, so the parent sets the height) */
.chart-tall {
    position: relative;
    height: 560px;
}

/* Forms */

input[type=text], select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

input[type=text]:focus, select:focus {
    border-color: var(--heading);
    outline: none;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 1em 0;
}

.form-row label {
    font-size: 14px;
    color: var(--muted);
}

/* Buttons */

button, .btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

button:hover, .btn:hover { background: var(--panel-hover); text-decoration: none; }

button.primary, .btn.primary {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

button.primary:hover, .btn.primary:hover {
    background: var(--success-hover);
    border-color: var(--success-hover);
}

/* Panels */

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 10px 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Stat boxes (living estimate) */

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 1em 0;
}

.stat {
    flex: 1 1 150px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat .stat-value {
    font-size: 1.6em;
    color: var(--heading);
}

.stat .stat-label {
    font-size: 13px;
    color: var(--muted);
}

/* Tables */

.table-wrap { overflow-x: auto; margin: 1em 0; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
}

th { color: var(--heading); font-weight: bold; }

/* Facts list (name page) */

.facts {
    list-style: none;
    padding: 0;
}

.facts li { padding: 0.25em 0; }

/* Compare tags */

.tag {
    display: inline-block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    margin: 0 6px 6px 0;
    font-size: 14px;
}

.tag a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 6px;
}

.tag a:hover { color: var(--text); }

/* Collapsible data table */

details summary {
    cursor: pointer;
    color: var(--heading);
    font-size: 14px;
    padding: 0.5em 0;
}

.muted, .note {
    color: var(--muted);
    font-size: 0.9em;
}

/* Text awaiting review: only highlighted on the dev server (see check_drafts.py) */

.dev .draft {
    background: #fff3a0;
    outline: 2px dashed #e0b000;
}

/* Empty draft paragraphs are slots for text still to be written */

.dev .draft:empty {
    min-height: 2.5em;
}

.dev .draft:empty::before {
    content: 'your text';
    color: #a08000;
    font-style: italic;
}

/* Live site: draft text isn't shown until it's been rewritten */

body:not(.dev) .draft {
    display: none;
}
