:root
{
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --header-bg: #1e293b;
    --gap: 1.25rem;
}

* { box-sizing: border-box; }

body
{
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* ---------- Header ---------- */
.site-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--header-bg);
    color: #fff;
    border-radius: 8px;
}

.site-header h1
{
    margin: 0; font-size: 1.4rem;
}

.site-header h2
{
    margin: 0; font-size: 1.2rem;
}

h3
{
    margin: 0; font-size: 1.0rem;
}

/* ---------- Grid layout (named areas) ---------- */
.layout
{
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    grid-template-areas:
        "header header"
        "left   right"
        "footer footer";
    gap: var(--gap);
    max-width: 2000px;
    margin: var(--gap) auto;
    padding: 0 var(--gap);
    align-items: start;
}

.site-header { grid-area: header; }
.col-left    { grid-area: left; }
.col-right   { grid-area: right; }
.site-footer { grid-area: footer; }

/* Each column stacks its own cards, so heights never affect the other column */
.col-left,
.col-right
{
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-width: 0; /* lets wide tables/charts shrink inside the grid track */
}

.small
{
    font-size: 0.8em;
}

.bold
{
    font-weight: bold;
}

.gray
{
    color: gray;
}

.meteors
{
    font-size: 0.8em;
}

/* ---------- Cards ---------- */
.card
{
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card h2
{
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

/* ---------- Chart ---------- */
.chart-wrap
{
    position: relative;
    height: 340px;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table
{
    width: 100%;
    border-collapse: collapse;
}

th, td
{
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

thead th
{
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.9rem;
}

tbody tr:hover
{
    background: yellow;

}

.center
{
    text-align: center;
}

/* ---------- Parameter form ---------- */
form label
{
    display: block;
    margin: 0.75rem 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

form select,
form input[type="date"],
form input[type="text"],
form input[type="number"]
{
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    background: #fff;
}
form select:focus,
form input:focus
{
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.date-controls
{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    margin: 0;
    margin-top: 12px;
    font-size: 0.8em;
}
.date-controls dt { text-align: left; }
.date-controls dd { text-align: right; }

.meteor-details
{
    display: grid;
    grid-template-columns: 0.8fr auto;
    gap: 0.1rem 0.1rem;
    margin: 12px;
    margin-top: 6px;
    font-size: 0.8em;
}

.meteor-details dt { text-align: left; }
.meteor-details dd { text-align: left; }

.warning
{
    padding: 12px;
    font-size: 120%;
    color: black;
    border: 1px solid gray;
    border-radius:.5em;
    background-color: #f3f4f6;
}

.note
{
    padding: 12px;
    font-size: 0.8em;
    border: 1px solid gray;
    border-radius:.5em;
    background-color: #f3f4f6;
}

/* ---------- Footer ---------- */
.site-footer
{
    text-align: center;
    padding: 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------- Responsive: stack columns on narrow screens ---------- */
@media (max-width: 800px)
{
    .layout
    {
        grid-template-columns: 1fr;
        /* Parameters + data first on small screens */
        grid-template-areas:
            "header"
            "right"
            "left"
            "footer";
    }
    .site-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .site-header nav a { margin: 0 1rem 0 0; }
}

