body.oil-provider-ptt {
  --oil-brand-color: #005baa;
  --oil-brand-accent: #00a3e0;
}
body.oil-provider-bcp {
  --oil-brand-color: #009639;
  --oil-brand-accent: #84bd00;
}
body.oil-provider-shell {
  --oil-brand-color: #dd1d21;
  --oil-brand-accent: #ffcf00;
}
body.oil-provider-caltex {
  --oil-brand-color: #00838f;
  --oil-brand-accent: #d32f2f;
}
body.oil-provider-irpc {
  --oil-brand-color: #005baa;
  --oil-brand-accent: #f39200;
}
body.oil-provider-pt {
  --oil-brand-color: #008853;
  --oil-brand-accent: #ed1c24;
}
body.oil-provider-susco {
  --oil-brand-color: #ffcc00;
  --oil-brand-accent: #003399;
}
body.oil-provider-pure {
  --oil-brand-color: #00a651;
  --oil-brand-accent: #2e3192;
}
body.oil-provider-sinopec {
  --oil-brand-color: #c8102e;
  --oil-brand-accent: #ffffff;
}


    /* Top Nav Single-Row Clamp with +/- Expand Button */
    @media (min-width: 761px) {
      .site-header .main-nav {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        min-width: 0;
        flex: 1 1 auto;
      }
      .main-nav-links-wrap {
        flex: 1;
        min-width: 0;
        height: 38px;
        overflow: hidden;
        transition: height 0.3s ease;
      }
      .main-nav-links-wrap.is-expanded {
        height: auto;
        overflow: visible;
      }
      .main-nav-links-list {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        column-gap: clamp(6px, 1vw, 14px);
        row-gap: 6px;
      }
      .top-nav-toggle-btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        font-family: inherit;
        font-size: 1.15rem;
        font-weight: 800;
        line-height: 1;
        color: #9cffee;
        background: rgba(156, 255, 238, 0.08);
        border: 1px solid rgba(156, 255, 238, 0.28);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
      }
      .top-nav-toggle-btn:hover,
      .top-nav-toggle-btn.is-active {
        color: #02201d;
        background: linear-gradient(135deg, #9cffee 0%, #48dcc8 100%);
        border-color: #9cffee;
        box-shadow: 0 2px 10px rgba(72, 220, 200, 0.35);
      }
    }

    @media (max-width: 760px) {
      .site-header .main-nav {
        display: none;
      }
      .site-header .main-nav[data-open="true"] {
        display: flex;
      }
      .top-nav-toggle-btn {
        display: none !important;
      }
      .main-nav-links-wrap {
        height: auto !important;
        overflow: visible !important;
      }
      .main-nav-links-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
      }
      .main-nav-links-list a {
        display: block;
        padding: 11px 14px;
        color: #dbe7eb;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 0.9rem;
      }
      .main-nav-links-list a:last-child {
        border-bottom: none;
      }
      .main-nav-links-list a:hover,
      .main-nav-links-list a.is-active {
        color: #9cffee;
        background: rgba(156, 255, 238, 0.08);
      }
    }

    /* Scoped styling for individual annual history page */
    .brand-hero-section {
      padding: 24px 0 36px;
    }
    .brand-hero-card {
      background: radial-gradient(circle at 85% 15%, rgba(22, 184, 166, 0.14), transparent 45%), linear-gradient(145deg, rgba(20, 28, 40, 0.92), rgba(10, 15, 22, 0.98));
      border: 1px solid rgba(156, 255, 238, 0.22);
      border-radius: 24px;
      padding: 28px 32px;
      box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    }
    .brand-year-og-figure {
      margin: 22px 0 20px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 18px;
      background: #05080e;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
    }
    .brand-year-og-figure img {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 1200 / 630;
      object-fit: cover;
    }
    .brand-year-og-figure figcaption {
      padding: 10px 14px;
      color: #94a3b8;
      background: rgba(7, 10, 15, 0.92);
      font-size: 0.8rem;
      line-height: 1.5;
    }
    .brand-header-flex {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      padding-bottom: 20px;
      margin-bottom: 22px;
    }
    .brand-title-wrap {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    .brand-badge-circle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 52px;
      height: 52px;
      background: linear-gradient(135deg, var(--oil-brand-color) 0%, var(--oil-brand-accent) 100%);
      border-radius: 14px;
      font-size: 1.25rem;
      font-weight: 800;
      color: #ffffff;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
    .brand-hero-card h1 {
      margin: 0 0 4px;
      font-size: clamp(1.35rem, 2.7vw, 2.05rem);
      color: #ffffff;
      line-height: 1.25;
    }
    .brand-hero-subtitle {
      margin: 0;
      color: #94a3b8;
      font-size: 0.92rem;
    }

    /* 4 Highlight Stat Cards */
    .history-highlight-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 14px;
      margin: 20px 0 26px;
    }
    .history-highlight-card {
      padding: 16px 18px;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
    }
    .highlight-card-title {
      font-size: 0.78rem;
      color: #94a3b8;
      text-transform: uppercase;
      margin-bottom: 6px;
      font-weight: 700;
    }
    .highlight-card-value {
      font-size: 1.55rem;
      font-weight: 800;
      color: #9cffee;
      line-height: 1.1;
      font-family: system-ui, -apple-system, sans-serif;
    }
    .highlight-card-sub {
      font-size: 0.78rem;
      color: #cbd5e1;
      margin-top: 5px;
    }

    /* Year Selector Bar */
    .year-selector-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin: 16px 0 24px;
      padding: 12px 18px;
      background: rgba(20, 28, 40, 0.65);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
    }
    .year-pill {
      display: inline-flex;
      align-items: center;
      padding: 6px 14px;
      font-size: 0.84rem;
      font-weight: 700;
      color: #cbd5e1;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 8px;
      text-decoration: none;
      transition: all 0.2s ease;
    }
    .year-pill:hover {
      color: #9cffee;
      border-color: rgba(156, 255, 238, 0.4);
      background: rgba(156, 255, 238, 0.08);
    }
    .year-pill.is-current {
      background: #16b8a6;
      color: #02201d;
      border-color: #16b8a6;
      font-weight: 800;
    }

    /* Brand Selector Pills */
    .brand-other-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }
    .brand-other-pill {
      display: inline-flex;
      align-items: center;
      padding: 6px 14px;
      font-size: 0.82rem;
      font-weight: 700;
      color: #cbd5e1;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      text-decoration: none;
      transition: all 0.2s ease;
    }
    .brand-other-pill:hover {
      color: #9cffee;
      border-color: rgba(156, 255, 238, 0.4);
      background: rgba(156, 255, 238, 0.1);
      transform: translateY(-1px);
    }
    .brand-other-pill.is-current {
      background: linear-gradient(135deg, #9cffee 0%, #48dcc8 100%);
      color: #02201d;
      border-color: #9cffee;
      font-weight: 800;
    }

    /* Annual Chart Section */
    .brand-chart-container {
      margin-top: 26px;
      padding: 22px;
      background: rgba(10, 15, 25, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
    }
    .brand-chart-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 18px;
    }
    .brand-chart-tabs {
      display: flex;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      max-width: 100%;
      padding: 2px 2px 6px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      scrollbar-color: rgba(156, 255, 238, 0.3) transparent;
    }
    .brand-chart-tabs::-webkit-scrollbar {
      height: 4px;
    }
    .brand-chart-tabs::-webkit-scrollbar-thumb {
      background: rgba(156, 255, 238, 0.25);
      border-radius: 4px;
    }
    .brand-chart-tab {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 7px 14px;
      font-size: 0.82rem;
      font-weight: 700;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.05);
      color: #cbd5e1;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .brand-chart-tab:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #ffffff;
      border-color: rgba(156, 255, 238, 0.3);
    }
    .brand-chart-tab.is-active {
      background: #16b8a6;
      color: #042421;
      border-color: #16b8a6;
      font-weight: 800;
    }
    .brand-chart-pane {
      position: relative;
      width: 100%;
      height: 270px;
    }
    .brand-chart-plot-wrap {
      position: relative;
      width: 100%;
      height: 100%;
    }
    .brand-chart-tooltip {
      position: absolute;
      z-index: 30;
      transform: translate(-50%, -100%) translateY(-12px);
      padding: 8px 16px;
      font-size: 0.88rem;
      font-weight: 800;
      color: #ffffff;
      background: rgba(8, 14, 22, 0.95);
      border: 1px solid rgba(72, 220, 200, 0.45);
      border-radius: 9px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
      white-space: nowrap;
      pointer-events: none;
      font-family: system-ui, -apple-system, sans-serif;
      letter-spacing: -0.01em;
      transition: opacity 0.15s ease, transform 0.15s ease;
    }
    .brand-chart-tooltip[data-align="start"] {
      transform: translate(0, -100%) translateY(-12px);
    }
    .brand-chart-tooltip[data-align="end"] {
      transform: translate(-100%, -100%) translateY(-12px);
    }
    .brand-chart-point-group {
      outline: none;
      cursor: pointer;
    }
    .brand-chart-hitarea {
      fill: transparent;
      stroke: transparent;
      cursor: pointer;
    }
    .brand-chart-dot {
      transition: r 0.18s ease, stroke-width 0.18s ease, fill 0.18s ease;
    }
    .brand-chart-point-group:hover .brand-chart-dot,
    .brand-chart-point-group:focus .brand-chart-dot,
    .brand-chart-point-group.is-active .brand-chart-dot {
      r: 6;
      fill: #9cffee !important;
      stroke: #02201d;
      stroke-width: 2.5;
      filter: drop-shadow(0 0 8px rgba(156, 255, 238, 0.9));
    }

    /* History & Stats Tables */
    .brand-table-container {
      margin-top: 24px;
      padding: 22px;
      background: rgba(10, 15, 25, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
    }
    .brand-table-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 14px;
      margin-bottom: 18px;
    }
    .brand-fuel-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .brand-fuel-tab-btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 6px 14px;
      font-size: 0.82rem;
      font-weight: 700;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.05);
      color: #cbd5e1;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
    }
    .fuel-tab-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }
    .brand-fuel-tab-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #ffffff;
      border-color: rgba(156, 255, 238, 0.3);
    }
    .brand-fuel-tab-btn.is-active {
      background: #16b8a6;
      color: #042421;
      border-color: #16b8a6;
      font-weight: 800;
    }
    .brand-fuel-tab-btn.is-active .fuel-tab-dot {
      background-color: #042421 !important;
    }
    .brand-history-table-responsive {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(8, 12, 20, 0.6);
    }
    .brand-history-table {
      width: 100%;
      min-width: 640px;
      border-collapse: collapse;
      font-size: 0.86rem;
    }
    .brand-history-table thead th {
      padding: 12px 16px;
      background: rgba(20, 28, 40, 0.9);
      color: #94a3b8;
      font-size: 0.78rem;
      font-weight: 750;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .brand-history-table tbody td {
      padding: 12px 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      color: #e2e8f0;
      vertical-align: middle;
    }
    .brand-history-table tbody tr:hover {
      background: rgba(156, 255, 238, 0.04);
    }
    .brand-history-table tbody tr.row-latest {
      background: rgba(22, 184, 166, 0.08);
    }
    .badge-latest-pill {
      display: inline-block;
      margin-left: 6px;
      padding: 2px 7px;
      background: rgba(22, 184, 166, 0.2);
      border: 1px solid rgba(156, 255, 238, 0.4);
      border-radius: 6px;
      color: #9cffee;
      font-size: 0.7rem;
      font-weight: 750;
    }
    .price-val {
      font-size: 1.02rem;
      font-weight: 800;
      color: #9cffee;
    }
    .price-unit {
      font-size: 0.74rem;
      color: #64748b;
      margin-left: 3px;
    }
    .table-change-text {
      font-weight: 750;
      font-size: 0.84rem;
    }
    .table-change-text.is-up {
      color: #f87171;
    }
    .table-change-text.is-down {
      color: #34d399;
    }
    .table-change-text.is-flat {
      color: #94a3b8;
    }
    .table-status-badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 6px;
      font-size: 0.75rem;
      font-weight: 750;
      white-space: nowrap;
    }
    .table-status-badge.is-up {
      background: rgba(239, 68, 68, 0.15);
      color: #fca5a5;
      border: 1px solid rgba(239, 68, 68, 0.3);
    }
    .table-status-badge.is-down {
      background: rgba(34, 197, 94, 0.15);
      color: #86efac;
      border: 1px solid rgba(34, 197, 94, 0.3);
    }
    .table-status-badge.is-flat {
      background: rgba(148, 163, 184, 0.12);
      color: #cbd5e1;
      border: 1px solid rgba(148, 163, 184, 0.25);
    }

    /* Content Cards */
    .brand-info-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 20px;
      margin-top: 24px;
    }
    .brand-info-card {
      padding: 24px;
      background: linear-gradient(160deg, rgba(20, 28, 40, 0.85) 0%, rgba(12, 17, 25, 0.9) 100%);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
    }
    .brand-info-card h3 {
      margin: 0 0 12px;
      font-size: 1.12rem;
      color: #9cffee;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .brand-info-card p {
      margin: 0 0 12px;
      color: #cbd5e1;
      font-size: 0.9rem;
      line-height: 1.65;
    }
    .brand-info-card ul {
      margin: 0;
      padding-left: 20px;
      color: #cbd5e1;
      font-size: 0.88rem;
      line-height: 1.6;
    }
    .brand-info-card li {
      margin-bottom: 6px;
    }

    @media (max-width: 760px) {
      .brand-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      .brand-chart-tabs {
        width: 100%;
      }
      .brand-chart-tab {
        font-size: 0.8rem;
        padding: 7px 12px;
      }
    }
