/* Base */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #d9eaf4;
    color: #000;
    padding: 20px;
}

form {
    margin-bottom: 20px;
}

input[type="date"],
button {
    padding: 6px 10px;
    font-size: 14px;
}

button {
    background: #ff5400;
    color: #fff;
    border: none;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

h1 {
  font-size: 1.6rem;
  margin: 1rem 0 1.5rem;
  text-align: center;
  color: #ff5400;
}

h1 span {
  display: block;
  font-size: 0.9rem;
  font-weight: normal;
  color: #333;
}

h1::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  margin: 0.5rem auto 0;
  background-color: #afd2f5;
}

/* Deck headings */
h2 {
    font-size: 1.4em;
    margin-top: 2em;
    margin-bottom: 0.5em;
    color: #555;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.2em;
}

/* Table */
table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

th,
td {
    padding: 8px 10px;
    border: 1px solid #afd2f5;
}

th {
    background: #afd2f5;
    color: #000;
    text-align: left;
}

/* Section headers */
th[colspan] {
    background: #000;
    color: #fff;
    font-size: 16px;
    text-align: center;
}

/* Zebra striping */
tr:nth-child(even) td {
    background: #f7fbff;
}

/* Category column subtle emphasis */
td:last-child {
    font-size: 13px;
    color: #333;
}

/* Hover */
tr:hover td {
    background: #d9eaf4;
}

/* Card Cell */
.card-cell a {
    color: inherit;          /* same color as text */
    text-decoration: none;   /* no underline */
    cursor: pointer;
}

.card-cell a:visited {
    color: inherit;          /* no visited color change */
}

.card-cell a:hover {
    text-decoration: underline; /* subtle affordance */
}

.card-cell a:focus {
    outline: none;
    text-decoration: underline;
}

/* deck-category-table */
.deck-category-table {
    width: auto;           /* shrink to fit content */
    max-width: 100%;       /* don’t exceed container */
    border-collapse: collapse;
    margin-bottom: 2em;
    table-layout: auto;    /* allow columns to size naturally */
}

/* Table headers and cells */
.deck-category-table th,
.deck-category-table td {
    border: 1px solid #ccc;
    padding: 0.3em 0.6em;
    text-align: center;
    font-size: 0.9em;
}

/* First column (category label) left-aligned and narrower */
.deck-category-table td:first-child {
    text-align: left;
    white-space: nowrap;  /* prevent line breaks */
    width: 120px;         /* adjust to your liking */
}

/* Optional: alternate row shading */
.deck-category-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Table headers background */
.deck-category-table th {
    background-color: #eee;
    font-weight: bold;
}

/* Responsive wrapper for horizontal scroll on tiny screens */
.table-wrapper {
    overflow-x: auto;
    padding-bottom: 0.5em;
}

/* Responsive tweaks for mobile */
@media (max-width: 480px) {
    .deck-category-table td,
    .deck-category-table th {
        font-size: 0.85em;
        padding: 0.2em 0.4em;
    }
}

.site-header {
    background: #ff5400;
    padding: 0.5em 1em;
    text-align: center;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 1em;
    font-weight: bold;
    padding: 0.3em 0.5em;
    border-radius: 4px;
    transition: background 0.2s;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.site-nav a.active {
    background: #fff;
    color: #ff5400;
}

/* Core Table */
.core-table {
    width: auto;            /* only as wide as content */
    max-width: 100%;        /* prevent overflow outside container */
    border-collapse: collapse;
    margin: 1em 0;
    table-layout: auto;     /* natural column width */
}

.core-table th,
.core-table td {
    padding: 0.4em 0.8em;
    border: 1px solid #afd2f5;
    text-align: left;
    white-space: nowrap;    /* prevent long text wrapping */
}

.core-table th {
    background-color: #afd2f5;
}

.core-table tr:nth-child(even) td {
    background-color: #f7fbff;
}

/* Optional: make numbers right-aligned */
.core-table td:first-child {
    text-align: right;
    font-weight: bold;
}

/* ---- Cards Table ---- */
.cards-table {
    width: auto;            /* only as wide as content */
    max-width: 100%;        /* no overflow outside container */
    border-collapse: collapse;
    margin: 1em 0;
    table-layout: auto;     /* natural column sizing */
}

/* Borders + cell padding */
.cards-table th,
.cards-table td {
    padding: 0.5em 0.8em;
    border: 1px solid #afd2f5;
    white-space: nowrap;    /* keep the columns narrow but prevent awkward wrap */
}

/* Header styling */
.cards-table th {
    background-color: #afd2f5;
    color: #000;
    text-align: left;
    font-weight: bold;
}

/* Align numeric columns to the right */
.cards-table td:nth-child(2),
.cards-table th:nth-child(2) {
    text-align: right;
}

/* Date columns centered */
.cards-table td:nth-child(3),
.cards-table td:nth-child(4),
.cards-table th:nth-child(3),
.cards-table th:nth-child(4) {
    text-align: center;
}

/* Alternate row shading */
.cards-table tbody tr:nth-child(odd) td {
    background-color: #f7fbff;
}

/* Card cell links */
.cards-table .card-cell a {
    text-decoration: none;
    color: inherit;
}

.cards-table .card-cell a:hover {
    text-decoration: underline;
}

/* Responsive tweaks for mobile */
@media (max-width: 768px) {
    .cards-table th,
    .cards-table td {
        padding: 0.4em 0.6em;
        font-size: 0.92em;
    }
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 1rem;
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 0.9rem;
    border-top: 4px solid #ff5400;
}

.site-footer p {
    margin: 0;
    line-height: 1.6;
}

.site-footer a {
    color: #afd2f5;
    text-decoration: none;
    font-weight: 500;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #ff5400;
    text-decoration: underline;
}

/* Subtle separation on small screens */
@media (max-width: 480px) {
    .site-footer {
        font-size: 0.85rem;
        padding: 1.2rem 0.8rem;
    }
}