/* === Fonts === */
@font-face {
    font-family: 'Philosopher';
    src: url('fonts/Philosopher-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Sora';
    src: url('fonts/Sora.woff2') format('woff2');
    font-weight: 400 600;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/JetBrainsMono.woff2') format('woff2');
    font-weight: 400 500;
    font-display: swap;
}

/* === Colour Tokens === */
:root {
    --bg-page:        #f5f4f7;
    --bg-card:        #ffffff;
    --border:         #8a8494;
    --border-subtle:  #eae8ee;
    --text-heading:   #1a1720;
    --text-primary:   #3a3644;
    --text-secondary: #625c6e;
    --text-body:      #4a4655;
    --text-muted:     #736d7d;
    --accent-teal:    #087866;
    --accent-amber:   #8a5a00;
    --text-on-accent: #ffffff;
    /* Derived tints — auto-adapt to theme since they reference the accent vars above */
    --accent-teal-subtle:  color-mix(in srgb, var(--accent-teal)  10%, transparent);
    --accent-teal-border:  var(--accent-teal);
    --accent-amber-border: var(--accent-amber);
    --accent-red:          #b42318;
    --accent-red-subtle:   color-mix(in srgb, var(--accent-red)   10%, transparent);
    --accent-red-border:   color-mix(in srgb, var(--accent-red)   20%, transparent);
    --t: 80ms cubic-bezier(0.05, 0.85, 0.1, 1);
    --theme-speed: 500ms;
}

[data-theme="dark"] {
    --bg-page:        #0d0c0f;
    --bg-card:        #18161c;
    --border:         #777182;
    --border-subtle:  #211f27;
    --text-heading:   #e2dfe8;
    --text-primary:   #c4c0ce;
    --text-secondary: #aca6b8;
    --text-body:      #b9b3c4;
    --text-muted:     #9c96a8;
    --accent-teal:    #5ee6d0;
    --accent-amber:   #f0b860;
    --accent-red:     #ff6b6b;
    --text-on-accent: #0d0c0f;
}

/* === Theme transition (Native View Transitions API) === */
  ::view-transition-old(root),
  ::view-transition-new(root) {
      animation-duration: 0.8s;
      animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:is(.filter-btn, .button-link, .page-nav__brand, .page-nav__link, .theme-toggle, .amazon-link, .sort-button, .category-card):focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
    border-radius: 2px;
}

.speed-info-btn:focus-visible,
.speed-pill:focus-visible,
.skip-link:focus-visible,
.speed-tooltip a:focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    z-index: 10000;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    color: var(--text-heading);
    border: 2px solid var(--accent-teal);
    border-radius: 2px;
    text-decoration: none;
    transform: translateY(calc(-100% - 16px));
    transition: transform var(--t);
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
}

/* === Top gradient bar === */
.top-bar {
    height: 2px;
    background: linear-gradient(to right, var(--accent-teal), var(--accent-amber));
    opacity: 0.6;
}

/* === Container === */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 2px);
}

/* === Primary nav (brand + category links + theme toggle) === */
.page-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 12px 16px;
    margin-bottom: 28px;
}

.page-nav__brand {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--text-heading);
    font-family: 'Philosopher', serif;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.page-nav__links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.page-nav__link {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 32px;
    padding: 0 12px;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.74rem;
    font-weight: 400;
    font-family: 'Sora', sans-serif;
    transition: border-color var(--t);
}

.page-nav__link:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.page-nav__link[aria-current="page"] {
    color: var(--accent-teal);
    border-color: var(--accent-teal-border);
    background: var(--accent-teal-subtle);
}

.page-nav__theme {
    justify-self: end;
}

.page-nav--home {
    margin-bottom: 20px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 34px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color var(--t);
}

.theme-toggle:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.theme-toggle__icon {
    display: none;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.theme-toggle__icon--moon {
    display: block;
}

[data-theme="dark"] .theme-toggle__icon--moon {
    display: none;
}

[data-theme="dark"] .theme-toggle__icon--sun {
    display: block;
}

/* === Header === */
header {
    margin-bottom: 24px;
}

h1 {
    font-family: 'Philosopher', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-body);
    max-width: 480px;
    line-height: 1.65;
}

.meta-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.meta-info__left {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-affiliate {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-align: right;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.meta-item strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* === Stats bar (4-column single card) === */
.stats-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 16px;
}

.stat-item {
    padding: 20px;
    border-right: 1px solid var(--border);
}

.stat-item:last-child {
    border-right: none;
}

.stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
}

.stat-value {
    font-family: 'Philosopher', serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--accent-teal);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.stat-value--amber {
    color: var(--accent-amber);
}

.stat-value--sentiment {
    font-family: 'Sora', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--accent-teal);
}

.stat-description {
    font-size: 0.6875rem;
    color: var(--text-body);
}

/* === Filters panel (multi-group layout) === */
.filters-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 20px 0;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
}

.filter-group {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
}

.filter-group + .filter-group {
    border-left: 1px solid var(--border);
}

.filter-group--metric {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 16px;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.filter-group--metric .filter-label {
    margin-bottom: 8px;
    text-align: right;
    letter-spacing: 0.08em;
}

.filter-group--metric .metric-toggle-buttons {
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: color-mix(in srgb, var(--border-subtle) 38%, transparent);
    gap: 4px;
    flex-wrap: nowrap;
}

.filter-group--metric .metric-toggle-buttons .filter-btn {
    min-width: 68px;
    text-align: center;
    padding: 5px 10px;
}

.filter-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    line-height: 1.75;
}

.filter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 5px 13px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.74rem;
    font-weight: 400;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    line-height: 1.5;
    transition: border-color var(--t);
}

.filter-status {
    display: block;
    margin: -4px 0 10px;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.filter-btn:hover {
    border-color: var(--accent-teal);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: var(--text-on-accent);
}

/* === Best Value badge (inline pill via ::after) === */
/* SSD/HDD: badge on col 2 (Product Name). GPU: badge on col 3 (Vendor shifts columns). */
.best-value-row :is(td, th[scope="row"]):nth-child(2),
.hardware-table--gpu .best-value-row :is(td, th[scope="row"]):nth-child(3) {
    position: relative;
    padding-right: 100px !important;
}

.best-value-row :is(td, th[scope="row"]):nth-child(2)::after,
.hardware-table--gpu .best-value-row :is(td, th[scope="row"]):nth-child(3)::after {
    content: attr(data-best-badge);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    padding: 3px 7px;
    background: var(--accent-teal-subtle);
    color: var(--accent-teal);
    border: 1px solid var(--accent-teal-border);
    font-size: 0.55rem;
    font-weight: 600;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    font-family: 'Sora', sans-serif;
}

/* GPU: suppress badge on col 2 (Brand) and reset its padding */
.hardware-table--gpu .best-value-row td:nth-child(2) {
    padding-right: 16px !important;
}

.hardware-table--gpu .best-value-row td:nth-child(2)::after {
    content: none;
}

/* === Sustained Speed pills === */
.speed-pill {
    display: inline-block;
    padding: 3px 7px;
    font-size: 0.55rem;
    font-weight: 600;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    font-family: 'Sora', sans-serif;
    cursor: help;
    border: 1px solid;
}

.purpose-detail-btn {
    appearance: none;
    padding: 0;
    background: transparent;
    color: inherit;
    border: 0;
    border-bottom: 1px dotted currentColor;
    font: inherit;
    cursor: help;
}

.purpose-detail-btn:focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 3px;
}
.speed-pill--high {
    background: var(--accent-teal-subtle);
    color: var(--accent-teal);
    border-color: var(--accent-teal-border);
}
.speed-pill--medium {
    background: color-mix(in srgb, var(--accent-amber) 10%, transparent);
    color: var(--accent-amber);
    border-color: color-mix(in srgb, var(--accent-amber) 20%, transparent);
}
.speed-pill--low {
    background: var(--accent-red-subtle);
    color: var(--accent-red);
    border-color: var(--accent-red-border);
}

/* Info button on Sustained Speed column header */
.speed-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin-left: 5px;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 0.5rem;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    cursor: help;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Floating tooltip (pill hover + header info) */
.speed-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 220px;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--t), transform var(--t);
}

.speed-tooltip:popover-open {
    opacity: 1;
    transform: translateY(0);
}

.speed-tooltip::backdrop {
    background: transparent;
}
.speed-tooltip a {
    color: var(--accent-teal);
    text-decoration: none;
}
.speed-tooltip a:hover {
    text-decoration: underline;
}

/* === Table wrapper === */
.table-wrapper {
    flex-grow: 1;
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
}

/* === Table === */
.hardware-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.hardware-table thead {
    border-bottom: 2px solid var(--border);
}

.hardware-table th {
    text-align: left;
    padding: 12px 10px;
    font-weight: 600;
    color: var(--text-body);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    white-space: nowrap;
}

.hardware-table th.sortable {
    cursor: pointer;
    user-select: none;
    padding: 0; /* Remove padding here so button can expand */
}

/* New native sort button inside th for A11Y */
.hardware-table th .sort-button {
    all: unset;
    cursor: pointer;
    font: inherit;
    color: inherit;
    display: inline-flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
}

/* Stacked sort indicators (always visible) */
.hardware-table th .sort-indicators {
    display: inline-flex;
    flex-direction: column;
    margin-left: 4px;
    vertical-align: middle;
    gap: 1px;
}

.hardware-table th .sort-indicators .arrow-up,
.hardware-table th .sort-indicators .arrow-down {
    display: block;
    font-size: 0.42rem;
    line-height: 1;
    color: var(--text-muted);
}

/* Active sort column — teal header + active arrow */
.hardware-table th.sort-asc,
.hardware-table th.sort-desc {
    color: var(--accent-teal);
}

.hardware-table th.sort-asc .sort-indicators .arrow-up,
.hardware-table th.sort-desc .sort-indicators .arrow-down {
    color: var(--accent-teal);
}

.hardware-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
}

.hardware-table tbody tr:hover {
    background: var(--bg-page);
}

.hardware-table tbody tr.out-of-stock {
    background: color-mix(in srgb, var(--border-subtle) 55%, transparent);
}

.hardware-table tbody tr.out-of-stock:hover {
    background: color-mix(in srgb, var(--border-subtle) 75%, transparent);
}

.hardware-table tbody tr.out-of-stock :is(td, th[scope="row"]) {
    color: var(--text-secondary);
}

.hardware-table tbody tr.out-of-stock .amazon-link {
    color: var(--text-secondary);
    border-color: var(--border);
}

.hardware-table tbody tr:last-child {
    border-bottom: none;
}

.hardware-table td,
.hardware-table th[scope="row"] {
    padding: 15px 10px;
    color: var(--text-primary);
    font-weight: 400;
    text-align: left;
}

/* Product name column — heading colour */
.hardware-table--ssd :is(td, th[scope="row"]):nth-child(2),
.hardware-table--hdd :is(td, th[scope="row"]):nth-child(2),
.hardware-table--ram :is(td, th[scope="row"]):nth-child(2),
.hardware-table--gpu :is(td, th[scope="row"]):nth-child(3) {
    color: var(--text-heading);
    font-weight: 600;
}

/* Secondary info columns (type, purpose, form factor) */
.hardware-table--ssd td:nth-child(4),
.hardware-table--ssd td:nth-child(5),
.hardware-table--hdd td:nth-child(4),
.hardware-table--hdd td:nth-child(5),
.hardware-table--ram td:nth-child(4),
.hardware-table--gpu td:nth-child(2),
.hardware-table--gpu td:nth-child(5),
.hardware-table--gpu td:nth-child(6) {
    color: var(--text-secondary);
}

/* Prevent SSD Type column (USB-C etc.) from wrapping */
.hardware-table--ssd td:nth-child(4) {
    white-space: nowrap;
}

/* Numeric columns — JetBrains Mono */
.hardware-table--ssd td:nth-child(3),
.hardware-table--ssd td:nth-child(6),
.hardware-table--hdd td:nth-child(3),
.hardware-table--hdd td:nth-child(6),
.hardware-table--ram td:nth-child(3),
.hardware-table--ram td:nth-child(5),
.hardware-table--ram td:nth-child(6),
.hardware-table--ram td:nth-child(7),
.hardware-table--gpu td:nth-child(4),
.hardware-table--gpu td:nth-child(6),
.hardware-table--gpu td:nth-child(7) {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

/* Value metric columns (£/TB, £/score, £/GB) — teal + mono */
.hardware-table .price-per-tb,
.hardware-table .price-per-score,
.hardware-table .price-per-gb {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: var(--accent-teal);
    font-variant-numeric: tabular-nums;
}

/* Price column */
.hardware-table .price-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

/* === View on Amazon link (amber outline) === */
.amazon-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 13px;
    background: transparent;
    color: var(--accent-amber);
    text-decoration: none;
    border-radius: 2px;
    font-family: 'Sora', sans-serif;
    border: 1px solid var(--accent-amber-border);
    white-space: nowrap;
    transition: border-color var(--t);
}

.amazon-link:hover {
    border-color: var(--accent-amber);
}

.amazon-link__main {
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.3;
}

.amazon-link__sub {
    font-size: 0.58rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.2;
}

/* === Contextual button links === */
.button-link {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 32px;
    padding: 0 15px;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.76rem;
    font-weight: 400;
    font-family: 'Sora', sans-serif;
    transition: border-color var(--t);
    opacity: 1;
}

.button-link:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* === Quick Answers (TLDR current-price cards between stats bar and filters) === */
.quick-answers {
    margin-bottom: 16px;
}

.quick-answers__title {
    font-family: 'Philosopher', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.quick-answers__note {
    font-size: 0.66rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
    max-width: 90ch;
}

.quick-answers__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.quick-answer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-answer__question {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    line-height: 1.4;
}

.quick-answer__product {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.3;
}

.quick-answer__detail {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.quick-answer__price-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}

.quick-answer__price {
    font-family: 'Philosopher', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-teal);
    font-variant-numeric: tabular-nums;
}

.quick-answer__metric {
    font-size: 0.66rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.quick-answer .amazon-link {
    align-self: flex-start;
    margin-top: 2px;
}

/* Narrow screens: horizontal swipe strip so the cards don't push the table below the fold */
@media (max-width: 768px) {
    .quick-answers__grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        padding-bottom: 6px;
    }

    .quick-answer {
        min-width: 230px;
        scroll-snap-align: start;
    }
}

.tracker-main {
    display: flex;
    flex: 1;
    flex-direction: column;
}

/* Very wide screens: sticky right rail beside stats, filters, and table.
   Scoped via :has() so guide/home/about pages keep the plain flex container. */
@media (min-width: 1700px) {
    .container:has(.tracker-main > .quick-answers) {
        max-width: 1648px;
    }

    .tracker-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        grid-template-rows: auto auto auto auto 1fr;
        column-gap: 20px;
    }

    .tracker-main > header {
        grid-column: 1 / -1;
    }

    .tracker-main > .stats-bar,
    .tracker-main > .filters-panel,
    .tracker-main > .filter-status,
    .tracker-main > .table-wrapper {
        grid-column: 1;
    }

    .tracker-main > .quick-answers {
        grid-column: 2;
        grid-row: 2 / 6;
        align-self: start;
        position: sticky;
        top: 24px;
        margin-bottom: 0;
    }

    .tracker-main > .quick-answers .quick-answers__grid {
        grid-template-columns: 1fr;
    }
}

/* === Footer === */
footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

footer p {
    font-family: 'Sora', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

footer a {
    font-family: 'Sora', sans-serif;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--text-secondary);
}

/* === About disclaimer box === */
.about-disclaimer {
    margin: 40px 0;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
}

/* === About contact section === */
.about-contact {
    margin-top: auto;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

/* === About page content styles === */
.about-content h2,
.about-disclaimer h2,
.about-contact h2 {
    font-family: 'Philosopher', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 28px 0 8px;
}

.about-content h2:first-child,
.about-disclaimer h2,
.about-contact h2 {
    margin-top: 0;
}

.about-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 6px;
}

.about-content p,
.about-disclaimer p,
.about-contact p {
    color: var(--text-body);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.guide-body a,
.about-content a:not(.amazon-link),
.about-contact a:not(.amazon-link) {
    color: var(--accent-teal);
    text-decoration: none;
}

.guide-body a:hover,
.about-content a:not(.amazon-link):hover,
.about-contact a:not(.amazon-link):hover {
    text-decoration: underline;
}

.about-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    color: var(--text-primary);
    background: var(--border-subtle);
    padding: 1px 5px;
    border-radius: 2px;
}

.about-content dl {
    margin: 28px 0 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
}

.about-content dt {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
}

.about-content dd {
    margin: 8px 0 16px 0;
    padding-left: 12px;
    border-left: 2px solid var(--border);
    color: var(--text-body);
    font-size: 0.875rem;
    line-height: 1.7;
}

.about-content dd:last-child {
    margin-bottom: 0;
}

/* === Homepage === */
body.home {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.container--home {
    max-width: 1040px;
    text-align: left;
    width: 100%;
    padding-top: 26px;
}

body.home h1 {
    font-family: 'Philosopher', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

body.home .subtitle {
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 20px;
    font-size: 0.82rem;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.category-card {
    background: var(--bg-card);
    padding: 18px 16px 14px;
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    text-align: left;
    transition: border-color var(--t), transform var(--t);
    min-height: 176px;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    border-color: var(--accent-teal);
    transform: translateY(-2px);
}

.category-card h2 {
    font-family: 'Philosopher', serif;
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-heading);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.5;
}

.tracker-card__metric-row {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tracker-card__stat-label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-body);
    font-weight: 600;
}

.tracker-card__stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86rem;
    color: var(--accent-teal);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.category-card--guides {
    margin-top: 0;
    border-style: solid;
}

.guides-btn {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    margin-bottom: 22px;
    padding: 15px 18px;
}

.guides-btn:hover {
    border-color: var(--accent-amber-border);
    background: color-mix(in srgb, var(--accent-amber) 6%, var(--bg-card));
}

.guides-btn__accent {
    width: 3px;
    height: 28px;
    border-radius: 999px;
    background: var(--accent-amber);
    opacity: 0.45;
    flex-shrink: 0;
    transition: opacity var(--t);
}

.guides-btn:hover .guides-btn__accent {
    opacity: 1;
}

.guides-btn__body {
    display: block;
    flex: 1;
    min-width: 0;
}

.guides-btn__arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.guides-btn:hover .guides-btn__arrow {
    color: var(--accent-amber);
}

.guides-btn h2 {
    margin-bottom: 2px;
    font-size: 1.05rem;
}

.guides-btn p {
    font-size: 0.76rem;
}

.coming-soon {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.coming-soon:hover {
    transform: none;
    border-color: var(--border);
}

.badge {
    display: inline-block;
    background: var(--accent-teal-subtle);
    color: var(--accent-teal);
    border: 1px solid var(--accent-teal-border);
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.58rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Sora', sans-serif;
}

body.home footer {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    justify-content: space-between;
}

body.home footer p {
    font-size: 0.68rem;
}

body.home .page-nav--home {
    margin-bottom: 16px;
}

/* === Responsive === */
@media (max-width: 900px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(2) {
        border-right: none;
    }

    .stat-item:nth-child(3) {
        border-top: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }

    .stat-item:nth-child(4) {
        border-top: 1px solid var(--border);
        border-right: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    .container {
        padding: 20px 16px 40px;
    }

    .page-nav {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 12px;
    }

    .page-nav__links {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .page-nav__theme {
        justify-self: end;
    }

    .page-nav--home {
        margin-bottom: 18px;
    }

    .filters-panel {
        flex-direction: column;
        padding: 16px 0;
    }

    .filter-group {
        padding: 12px 16px;
    }

    .filter-group + .filter-group {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .filter-group--metric {
        margin-left: 0;
        align-items: flex-start;
        padding-right: 16px;
    }

    .filter-group--metric .filter-label {
        text-align: left;
    }

    .filter-group--metric .metric-toggle-buttons {
        flex-wrap: wrap;
    }

    .hardware-table th,
    .hardware-table td,
    .hardware-table th[scope="row"] {
        padding: 10px 8px;
        font-size: 0.75rem;
    }

    .hardware-table th {
        font-size: 0.58rem;
    }

    .amazon-link {
        padding: 4px 10px;
    }

    .amazon-link__main {
        font-size: 0.68rem;
    }

    .amazon-link__sub {
        font-size: 0.55rem;
    }

    .best-value-row :is(td, th[scope="row"]):nth-child(2) {
        padding-right: 12px !important;
    }

    .best-value-row :is(td, th[scope="row"]):nth-child(2)::after {
        position: static;
        transform: none;
        display: inline-block;
        margin-left: 6px;
        vertical-align: middle;
    }

    .hardware-table--gpu .best-value-row :is(td, th[scope="row"]):nth-child(3) {
        padding-right: 12px !important;
    }

    .hardware-table--gpu .best-value-row :is(td, th[scope="row"]):nth-child(3)::after {
        position: static;
        transform: none;
        display: inline-block;
        margin-left: 6px;
        vertical-align: middle;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }

    .category-card:hover {
        transform: none;
    }
}

@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .container--home {
        padding-top: 20px;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    body.home footer {
        justify-content: flex-start;
        gap: 10px 16px;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: none !important;
        border-bottom: 1px solid var(--border);
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .stat-item:nth-child(3) {
        border-top: none;
    }
}

/* === Guide Pages === */
.guide-page { max-width: 1140px; margin: 0 auto; padding: 0 48px; }

/* -- Legacy guide gradient bar alias -------------------------------- */
.gradient-bar {
    height: 2px;
    background: linear-gradient(to right, var(--accent-teal), var(--accent-amber));
    opacity: 0.6;
}

/* -- Page nav ------------------------------------------------------- */
.guide-page-nav {
    margin-top: 20px;
}

.guide-back-link {
    margin-bottom: -8px;
}

/* -- Two-column layout: TOC left, article card right ---------------- */
.guide-layout {
    display: grid;
    grid-template-columns: 180px 1px 1fr;
    gap: 0 32px;
    padding-top: 32px;
    align-items: start;
}

/* -- Vertical divider ----------------------------------------------- */
.guide-divider { background: var(--border); min-height: 100%; }

/* -- Table of Contents (sticky sidebar) ----------------------------- */
.guide-toc {
    position: sticky; top: 32px;
}
.guide-toc-label {
    font-family: 'Sora', sans-serif; font-weight: 600;
    font-size: 0.6rem; line-height: 1.5;
    letter-spacing: 0.08rem; text-transform: uppercase;
    color: var(--text-body); margin-bottom: 12px;
}
.guide-toc ul { list-style: none; padding: 0; margin: 0; }
.guide-toc li {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 6px 0;
}
.guide-toc li::before {
    content: '';
    flex-shrink: 0;
    width: 2px; height: 14px;
    border-radius: 999px;
    background: var(--border);
    margin-top: 3px;
}
.guide-toc a {
    font-family: 'Sora', sans-serif; font-size: 0.76rem;
    line-height: 1.5; color: var(--text-secondary);
    text-decoration: none;
}
.guide-toc a:hover { color: var(--text-primary); }
.guide-toc li.active::before { background: var(--accent-teal); }
.guide-toc li.active a { color: var(--accent-teal); }

/* -- Article card --------------------------------------------------- */
.guide-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 32px;
}

/* -- Article header ------------------------------------------------- */
.guide-article-header {
    margin-bottom: 24px;
}
.guide-article-header__copy {
    min-width: 0;
}
.guide-article-label {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
}
.guide-article-label .label-tag {
    font-family: 'Sora', sans-serif; font-weight: 600;
    font-size: 0.6rem; line-height: 1.5;
    letter-spacing: 0.08rem; text-transform: uppercase;
    color: var(--accent-teal);
}
.guide-article-label .label-sep { color: var(--text-muted); font-size: 0.6rem; }
.guide-article-label .label-cat {
    font-family: 'Sora', sans-serif; font-size: 0.6rem;
    line-height: 1.5; letter-spacing: 0.06rem;
    text-transform: uppercase; color: var(--text-muted);
}

.guide-article h1 {
    font-family: 'Philosopher', serif; font-weight: 700;
    font-size: 2.2rem; line-height: 1.15;
    letter-spacing: -0.01em; color: var(--text-heading);
    margin: 0 0 8px;
}
.guide-article-desc {
    font-family: 'Sora', sans-serif; font-size: 0.88rem;
    line-height: 1.55; color: var(--text-body);
    max-width: 509px; margin-bottom: 16px;
}
.guide-article-meta {
    display: flex; align-items: center; gap: 16px;
    font-family: 'Sora', sans-serif; font-size: 0.7rem;
    line-height: 1.5; color: var(--text-body);
    margin-bottom: 0;
}
.guide-article-meta .meta-sep {
    width: 1px; height: 12px; background: var(--border);
}
.guide-article-meta .meta-date-label { color: var(--text-muted); }
.guide-article-meta .meta-date-value { color: var(--text-body); }

/* -- Optional guide audio ------------------------------------------- */
.guide-audio {
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: color-mix(in srgb, var(--border-subtle) 26%, transparent);
}
.guide-audio--inline {
    display: none;
}
.guide-audio--toc {
    margin: 18px 0 0;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}
.guide-audio--toc .guide-audio__header {
    margin-bottom: 10px;
}
.guide-audio--toc .guide-audio__controls {
    grid-template-columns: 40px 58px minmax(0, 1fr);
    gap: 8px;
}
.guide-audio--toc .guide-audio__play {
    width: 40px;
    height: 40px;
}
.guide-audio--toc .guide-audio__progress {
    grid-column: 1 / -1;
}
.guide-audio--toc .guide-audio__time,
.guide-audio--toc .guide-audio__volume {
    display: none;
}
.guide-audio__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}
.guide-audio__header > div {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
}
.guide-audio__label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.62rem;
    line-height: 1.5;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 0;
}
.guide-audio__header p {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--text-body);
}
.guide-audio__duration {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.guide-audio__native {
    display: none;
}
.guide-audio__controls {
    display: grid;
    grid-template-columns: 42px 58px minmax(160px, 1fr) auto minmax(104px, 140px);
    gap: 10px;
    align-items: center;
}
.guide-audio__play {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-teal);
    border-radius: 3px;
    background: var(--accent-teal);
    color: var(--text-on-accent);
    cursor: pointer;
    padding: 0;
}
.guide-audio__play:focus-visible,
.guide-audio__progress:focus-visible,
.guide-audio__speed:focus-visible,
.guide-audio__volume input:focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}
.guide-audio__icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.guide-audio__icon--pause {
    display: none;
}
.guide-audio.is-playing .guide-audio__icon--play {
    display: none;
}
.guide-audio.is-playing .guide-audio__icon--pause {
    display: block;
}
.guide-audio__progress,
.guide-audio__volume input {
    --range-fill: 0%;
    width: 100%;
    height: 16px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
}
.guide-audio__volume input {
    --range-fill: 100%;
}
.guide-audio__progress::-webkit-slider-runnable-track,
.guide-audio__volume input::-webkit-slider-runnable-track {
    height: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--accent-teal) 0 var(--range-fill),
        color-mix(in srgb, var(--border-subtle) 55%, transparent) var(--range-fill) 100%
    );
}
.guide-audio__progress::-moz-range-track,
.guide-audio__volume input::-moz-range-track {
    height: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--border-subtle) 55%, transparent);
}
.guide-audio__progress::-moz-range-progress,
.guide-audio__volume input::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--accent-teal);
}
.guide-audio__progress::-webkit-slider-thumb,
.guide-audio__volume input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -6px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--accent-teal);
    box-shadow: none;
}
.guide-audio__progress::-moz-range-thumb,
.guide-audio__volume input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--accent-teal);
    box-shadow: none;
}
.guide-audio__time,
.guide-audio__speed,
.guide-audio__volume {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
}
.guide-audio__volume {
    display: flex;
    align-items: center;
    gap: 8px;
}
.guide-audio__speed {
    min-height: 36px;
    min-width: 58px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: color-mix(in srgb, var(--accent-teal) 8%, var(--bg-card));
    color: var(--text-primary);
    cursor: pointer;
    padding: 0 10px;
}

/* -- Article body typography ---------------------------------------- */
.guide-body { counter-reset: section; }
.guide-body p {
    font-family: 'Sora', sans-serif; font-size: 0.84rem;
    line-height: 1.66; color: var(--text-primary);
    max-width: 65ch; margin: 0 0 20px;
}
.guide-body ul, .guide-body ol {
    font-family: 'Sora', sans-serif; font-size: 0.84rem;
    line-height: 1.66; color: var(--text-primary);
    max-width: 65ch; margin: 0 0 20px; padding-left: 20px;
}
.guide-body li { margin-bottom: 6px; }
.guide-body strong { color: var(--text-heading); }

/* -- Section headings with auto-numbering --------------------------- */
.guide-body h2 {
    counter-increment: section;
    display: flex; align-items: center; gap: 12px;
    font-family: 'Philosopher', serif; font-weight: 700;
    font-size: 1.3rem; line-height: 1.25;
    letter-spacing: -0.01em; color: var(--text-heading);
    margin: 40px 0 16px;
}
.guide-body h2::before {
    content: counter(section, decimal-leading-zero);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400; font-size: 0.7rem;
    line-height: 1.5; color: var(--accent-teal);
    flex-shrink: 0; order: -2;
}
.guide-body h2::after {
    content: '';
    width: 16px; height: 1px; background: var(--border);
    flex-shrink: 0; order: -1;
}

/* -- Inline code ---------------------------------------------------- */
.guide-body code {
    font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
    color: var(--accent-teal); line-height: 1.6;
    background: color-mix(in srgb, var(--accent-teal) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-teal) 20%, transparent);
    border-radius: 2px; padding: 2px 6px;
}

/* -- Tables ---------------------------------------------------------- */
.guide-body table {
    width: 100%; border-collapse: collapse;
    border: 1px solid var(--border); border-radius: 3px;
    overflow: hidden; margin: 16px 0 24px;
}
.guide-body thead { border-bottom: 2px solid var(--border); }
.guide-body th {
    font-family: 'Sora', sans-serif; font-weight: 600;
    font-size: 0.6rem; line-height: 1.5;
    letter-spacing: 0.08rem; text-transform: uppercase;
    color: var(--text-body); text-align: left;
    padding: 16px; 
}
.guide-body td {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem; line-height: 1.5;
    color: var(--text-primary); padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.guide-body tr:last-child td { border-bottom: none; }
.guide-body tbody tr:hover { background: color-mix(in srgb, var(--border-subtle) 20%, transparent); }

/* -- CTAs at bottom -------------------------------------------------- */
.guide-ctas {
    display: flex; gap: 16px; align-items: center;
    margin-top: auto; padding-top: 32px; border-top: 1px solid var(--border-subtle);
}
.guide-cta-primary {
    display: inline-block; padding: 11px 16px;
    background: var(--accent-teal); color: var(--text-on-accent);
    font-family: 'Sora', sans-serif; font-size: 0.76rem;
    line-height: 1.5; border-radius: 2px;
    text-decoration: none; transition: opacity var(--t);
}
.guide-cta-primary:hover { opacity: 0.9; }
.guide-cta-secondary {
    display: inline-block; padding: 11px 16px;
    border: 1px solid color-mix(in srgb, var(--accent-amber) 30%, transparent);
    color: var(--accent-amber);
    font-family: 'Sora', sans-serif; font-size: 0.76rem;
    line-height: 1.5; border-radius: 2px;
    text-decoration: none; transition: border-color var(--t);
}
.guide-cta-secondary:hover { 
    border-color: color-mix(in srgb, var(--accent-amber) 50%, transparent); 
    background-color: color-mix(in srgb, var(--accent-amber) 5%, transparent);
}

/* -- Footer ---------------------------------------------------------- */
.guide-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; margin-top: 48px;
    border-top: 1px solid var(--border);
    font-family: 'Sora', sans-serif; font-size: 0.7rem;
    line-height: 1.5; color: var(--text-muted);
}
.guide-footer-links {
    display: flex; gap: 16px;
    font-family: 'Sora', sans-serif; font-size: 0.68rem;
}
.guide-footer-links a { color: var(--text-muted); text-decoration: none; }
.guide-footer-links a:hover { color: var(--text-secondary); }

/* -- Guide Hub Specifics --------------------------------------------- */
.guide-hub-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    margin-bottom: 20px;
}

.guide-hub-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-amber);
    margin-bottom: 8px;
}

.guide-hub-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
}

.guide-hub-stats div {
    min-width: 108px;
    padding: 14px 16px;
    border-right: 1px solid var(--border);
}

.guide-hub-stats div:last-child {
    border-right: none;
}

.guide-hub-stats dt {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-body);
    margin-bottom: 4px;
}

.guide-hub-stats dd {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent-teal);
    white-space: nowrap;
}

.guide-hub-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.guide-hub-sidebar {
    position: sticky;
    top: 16px;
}

.guides-hub-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.guides-filter-panel {
    margin-bottom: 0;
    display: block;
}

.guides-filter-panel .filter-group {
    padding: 0 18px;
}

.guides-filter-panel .filter-buttons {
    row-gap: 8px;
}

.guide-entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: border-color var(--t), transform var(--t);
}

.guide-entry[hidden] {
    display: none;
}

.guide-entry--latest {
    grid-column: 1 / -1;
}

.guide-entry:hover {
    border-color: var(--accent-teal);
    transform: translateY(-2px);
}
.guide-entry a.guide-entry-link {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px 22px;
    text-decoration: none;
    color: inherit;
}
.guide-entry-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}
.guide-entry-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.guide-entry-cat {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.6rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--accent-teal);
}
.guide-entry h2 {
    font-family: 'Philosopher', serif;
    font-size: 1.28rem;
    line-height: 1.2;
    color: var(--text-heading);
    margin-bottom: 6px;
    font-weight: 700;
}
.guide-entry--latest h2 {
    font-size: 1.46rem;
}
.guide-entry p {
    font-family: 'Sora', sans-serif;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--text-body);
    margin: 0 0 18px;
}

.guide-entry-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    color: var(--text-muted);
}

.guide-entry-footer span:last-child {
    color: var(--accent-amber);
}

.guides-empty {
    grid-column: 2;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 18px 22px;
    color: var(--text-body);
    font-size: 0.84rem;
    margin: 0;
}


/* -- Mobile responsive ----------------------------------------------- */
@media (max-width: 1024px) {
    .guide-page { padding: 0 20px; }
}

@media (max-width: 860px) {
    .guide-hub-header,
    .guide-hub-layout {
        grid-template-columns: 1fr;
    }

    .guide-hub-stats {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }

    .guide-hub-stats div {
        min-width: 0;
    }

    .guide-hub-sidebar {
        position: static;
    }

    .guides-hub-list {
        grid-template-columns: 1fr;
    }

    .guides-empty {
        grid-column: auto;
    }

    .guide-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .guide-audio--toc {
        display: none;
    }
    .guide-audio--inline {
        display: block;
    }
    .guide-audio__controls {
        grid-template-columns: 42px 58px minmax(0, 1fr) auto;
    }
    .guide-audio__volume {
        display: none;
    }
    .guide-toc {
        position: static;
        border-bottom: 1px solid var(--border);
        padding-bottom: 20px; margin-bottom: 24px;
    }
    .guide-divider { display: none; }
    .guide-article { padding: 24px 20px; }
    .guide-article h1 { font-size: 1.8rem; }
    .guide-footer { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 560px) {
    .guide-hub-stats {
        grid-template-columns: 1fr;
    }

    .guide-hub-stats div {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .guide-hub-stats div:last-child {
        border-bottom: none;
    }

    .guide-entry-topline,
    .guide-entry-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-audio__header {
        flex-direction: column;
    }

    .guide-audio__controls {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .guide-audio__time {
        grid-column: 3;
        justify-self: end;
    }
}

