/* ----------------------------------------------------------
   FONT: INTER (SELF-HOSTED)
---------------------------------------------------------- */
/* inter-100 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100;
  src: url('../fonts/inter-v20-latin-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-100italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100;
  src: url('../fonts/inter-v20-latin-100italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-200 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200;
  src: url('../fonts/inter-v20-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-200italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 200;
  src: url('../fonts/inter-v20-latin-200italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-300 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/inter-v20-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-300italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 300;
  src: url('../fonts/inter-v20-latin-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  src: url('../fonts/inter-v20-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-500italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 500;
  src: url('../fonts/inter-v20-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-600italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 600;
  src: url('../fonts/inter-v20-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/inter-v20-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-700italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 700;
  src: url('../fonts/inter-v20-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-800 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/inter-v20-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-800italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 800;
  src: url('../fonts/inter-v20-latin-800italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-900 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  src: url('../fonts/inter-v20-latin-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-900italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 900;
  src: url('../fonts/inter-v20-latin-900italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* --------------------------------------------------
   BASE
-------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #111;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px 40px;
}

/* --------------------------------------------------
   TOP BAR
-------------------------------------------------- */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #e5e7eb;
}

.brand-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    color: #4b0082; /* purple accent */
}

.brand-node {
    display: block;
    opacity: 0.7;
    font-size: 0.85rem;
    color: #444;
}

/* --------------------------------------------------
   CONTROLS
-------------------------------------------------- */

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
}

.controls input,
.controls select {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #111;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.controls input:focus,
.controls select:focus {
    border-color: #4b0082; /* purple focus */
    background: #faf5ff;
    outline: none;
}

/* --------------------------------------------------
   FEED
-------------------------------------------------- */

.feed-container {
    margin-top: 10px;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --------------------------------------------------
   ROWS (Cards)
-------------------------------------------------- */

.row.header {
    display: none; /* mobile-first */
}

.row.body {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #4b0082; /* purple accent */
    border-radius: 10px;
    padding: 16px;
    color: #111;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.row.body:hover {
    background: #fafafa;
    border-color: #c084fc;
    transform: translateY(-2px);
}

/* Mobile stacked cells */

.row > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
    min-width: 0;
}

.row > div:last-child {
    border-bottom: none;
}

.row > div::before {
    content: attr(data-label);
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    color: #555;
}

.spacer {
  height: clamp(0.5rem, 2vw, 2rem);
  width: 100%;
}

/* --------------------------------------------------
   DETAIL PANEL (drawer)
-------------------------------------------------- */

.detail-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    border-left: 2px solid #4b0082;
    padding: 24px;
    overflow-y: auto;
    transition: right 0.25s ease;
    z-index: 1001;
    color: #111;
}

.detail-panel.visible {
    right: 0;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.8rem;
    cursor: pointer;
}

.detail-close:hover {
    color: #4b0082;
}



/* --------------------------------------------------
   BACKDROP
-------------------------------------------------- */

.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --------------------------------------------------
   FOOTER PAGINATION (Next / Previous)
-------------------------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0 20px;
}

.pagination button,
.pagination a {
    display: inline-flex;          /* allows vertical centering */
    align-items: center;           /* vertically centers text */
    justify-content: center;       /* horizontally centers text */
    padding: 10px 18px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #4b0082;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;                /* prevents text from drifting upward */
}

.pagination button:hover,
.pagination a:hover {
    background: #faf5ff; /* soft purple tint */
    border-color: #c084fc;
    color: #4b0082;
    transform: translateY(-1px);
}

.pagination button:disabled,
.pagination a.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

#page-info {
    display: inline-flex;
    align-items: center;      /* vertically centres the text */
    justify-content: center;  /* keeps it tidy */
    line-height: 1;           /* removes the tall default line box */
    padding-top: 2px;         /* micro‑adjustment for optical balance */
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b0082;           /* matches your pagination buttons */
}

/* --------------------------------------------------
   DESKTOP TABLE MODE
-------------------------------------------------- */

@media (min-width: 900px) {

    .row.header {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        padding: 14px 18px;
        background: #fafafa;
        border-bottom: 2px solid #e5e7eb;
        color: #111;
        font-weight: 600;
        font-size: 0.85rem;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .row.body {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        padding: 14px 18px;
        border-left-width: 4px;
    }

    .row > div {
        border-bottom: none;
        color: #111;
    }

    .row > div::before {
        content: none;
    }
}

/* Expandable detail section */
.expand {
    grid-column: 1 / -1;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.expand .mono {
    word-break: break-all;
}

/* --------------------------------------------------
   MOBILE TYPOGRAPHY FIX
-------------------------------------------------- */
/* Mobile row alignment fix */
@media (max-width: 899px) {
    .row > div {
        display: flex;
        align-items: center;      /* this is the missing piece */
        justify-content: space-between;
        padding: 6px 0;
    }
}

/* Mobile header alignment fix */
@media (max-width: 768px) {
    .row.header div {
        display: flex;
        align-items: center;     /* vertically centres the text */
        line-height: 0.5;        /* prevents upward drift */
        padding-top: 1px;        /* optical correction */
    }
}


@media (max-width: 600px) {

    .detail-panel {
        font-size: 0.9rem;
        line-height: 1.35;
        padding: 18px;
    }

    .detail-panel h2 {
        font-size: 1.1rem;
    }

    .detail-body div {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .last-updated {
        font-size: 0.85rem;
        opacity: 0.8;
    }

    html {
        -webkit-text-size-adjust: 100%;
    }
}
