/* ============================================================
   Shared data-table styling for blog posts and guides.
   ============================================================

   WHY THIS FILE EXISTS
   --------------------
   The standalone blog templates each carry their own inline <style>
   block, so a table added to a second post meant a second copy of
   these rules, and a third post a third. The same trap that
   partials/faq_section.html + static/faq-section.css get out of.

   Load it the same way that partial does, from the page that needs
   it, so posts without a table never fetch it:

       <link rel="stylesheet"
             href="{{ url_for('static', filename='blog-data-table.css') }}">

   Markup:

       <div class="data-table-wrap">
         <table class="data-table">
           <caption class="data-table-caption">Sample and as-of date</caption>
           <thead><tr><th scope="col">...</th></tr></thead>
           <tbody><tr><td>...</td></tr></tbody>
         </table>
       </div>

   The wrapper is what makes a wide table scroll instead of blowing out
   the page on a phone. Colors come from the per-post --card-bg /
   --card-border / --accent-gold / --text-light / --text-muted vars that
   every blog template defines, so a table inherits whichever palette
   its post uses.
   ============================================================ */

.data-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    font-size: 0.95rem;
}

/* Caption states the sample and the as-of date on the table itself, so a
   table lifted out of the page keeps its provenance with it. */
.data-table-caption {
    caption-side: top;
    text-align: left;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0 0 0.5rem;
}

.data-table th {
    font-family: 'Gabarito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700;
    text-align: left;
    padding: 0.85rem 1.1rem;
    border-bottom: 2px solid var(--accent-gold);
    color: var(--text-light);
}

.data-table tbody th {
    border-bottom: 1px solid var(--card-border);
    font-weight: 700;
}

.data-table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-light);
    vertical-align: top;
}

.data-table tr:last-child td,
.data-table tbody tr:last-child th {
    border-bottom: none;
}
