        body { font-family: sans-serif; margin: 2em auto; padding: 0 1em; }
        form { margin-bottom: 1em; }
        label { margin-right: 0.5em; }
        input[type="text"] { padding: 0.5em; min-width: 200px; }
        button { padding: 0.5em 1em; }
        h2 { margin-top: 1.5em; }
        ul { list-style: none; padding: 0; }
        li { margin-bottom: 0.5em; }
        a { text-decoration: none; color: #007bff; }
        a:hover { text-decoration: underline; }
        .timetable-container { margin-top: 1em; border: 1px solid #ccc; padding: 1em; overflow-x: auto; }

body {
    font-family: sans-serif;
    margin: 0;
    padding: 10px;
}

.timetable-container {
    max-width: 100%;
    overflow-x: auto;
    margin: 1em 0;
    border: 1px solid #ccc;
    max-height: 80vh;
    /* Limit height */
    overflow-y: auto;
}

table {
    border-collapse: collapse;
    text-align: center;
    width: 100%;
    /* Ensure table tries to fill container */
    table-layout: fixed;
    border-spacing: 0;
}

th,
td {
    border: 1px solid #ccc;
    padding: 8px;
    white-space: nowrap;
    /* Prevent text wrapping */
    box-sizing: border-box;
}

/* Sticky header row */
thead th {
    background-color: #e2e2e2;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Sticky first column (stop names) */
tbody th {
    background-color: #f9f9f9;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 1;
    width: 200px;
}

/* Top-left corner cell needs higher z-index and background */
thead th:first-child {
    left: 0;
    z-index: 2;
    width: 200px;
    background-color: #d2d2d2;
}

caption {
    font-weight: bold;
    margin-bottom: 0.5em;
    font-size: 1.1em;
    caption-side: top;
    text-align: left;
    padding: 5px;
}

small {
    font-size: 0.8em;
    color: #555;
    display: block;
    /* Make small tag take its own line */
}

h1 {
    text-align: center;
}