:root {
  --primary: #4f46f6;
  --primary-dark: #363086;
  --teal: #08c9d3;
  --body-color: #384b4f;
  --pastel-blue: #edf5fa;
  --powder-blue: #b9d9eb;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-500: #adb5bd;
  --gradient: linear-gradient(45deg,#08c9d3 0%,#05a3db 15.62%,#038bdf 29.6%,#0281e1 39.75%,#027ee2 42.27%,#017ae3 46.88%,#0278e3 50.2%,#0475e4 53.52%,#086ee6 58.28%,#257ce6 61.75%,#438be7 64.39%,#98b5e8 74.05%,#b0c2e8 78.81%,#d1d2e8 84.52%,#ffe9e9 94.67%);
  --price-negative-bg: #d4edda; --price-negative-text: #155724; --price-negative-badge: #198754;
  --price-low-bg: #d1f0e0;      --price-low-text: #0d5e2a;      --price-low-badge: #20a854;
  --price-amber-bg: #ffd9b3;    --price-amber-text: #664d03;    --price-amber-badge: #fd7e14;
  --price-red-bg: #f8d7da;      --price-red-text: #7d2700;      --price-red-badge: #dc3545;
  --price-darkred-bg: #f5c2c7;  --price-darkred-text: #58151c;  --price-darkred-badge: #8b0000;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Assistant", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--body-color);
  background-color: var(--gray-100);
  -webkit-text-size-adjust: 100%;
}

body.pending-layout { min-height: 100vh; display: flex; flex-direction: column; }

.site-header { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 0 1.5rem; }
.header-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo svg { display: block; height: 44px; width: auto; }
.gradient-strip { height: 4px; background: var(--gradient); }

/* ── PRICES LAYOUT ── */
.main--prices { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page-title-block { margin-bottom: 1.75rem; }
.page-title-block h1 { margin: 0 0 0.25rem; font-size: 1.75rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.page-title-block .subtitle { font-size: 0.95rem; color: var(--gray-500); }
.updated-tag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--gray-500); background: #fff; border: 1px solid var(--gray-200); border-radius: 20px; padding: 0.25rem 0.75rem; margin-bottom: 1.5rem; }
.updated-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 1.5rem; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 0.85rem 1rem; }
.legend-title { width: 100%; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); margin-bottom: 0.25rem; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--body-color); }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.action-bar { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.btn-download { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--primary); color: #fff; font-family: inherit; font-size: 0.875rem; font-weight: 600; border: none; border-radius: 8px; padding: 0.55rem 1.1rem; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn-download:hover { background: var(--primary-dark); }
.table-card { background: #fff; border-radius: 12px; border: 1px solid var(--gray-200); overflow-x: auto; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.price-table { width: auto; min-width: 100%; border-collapse: collapse; table-layout: fixed; }
.price-table col.col-num  { width: 4rem; }
.price-table col.col-time { width: 13rem; }
.price-table col.col-price { width: auto; }
.price-table thead tr { background: var(--pastel-blue); }
.price-table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary-dark); border-bottom: 2px solid var(--powder-blue); }
.price-table th:nth-child(2) { text-align: center; }
.price-table th:last-child { text-align: right; }
.price-table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--gray-200); font-size: 0.9rem; }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover { background: var(--gray-100); }
.td-period { font-weight: 600; color: var(--primary-dark); white-space: nowrap; }
.td-time { color: var(--body-color); font-size: 0.85rem; white-space: nowrap; text-align: center; }
.td-price { text-align: right; }
.price-badge { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.35rem; font-weight: 700; font-size: 0.92rem; white-space: nowrap; }
.price-badge .pip { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.band-negative td { background-color: var(--price-negative-bg); } .band-negative .price-badge { color: var(--price-negative-text); } .band-negative .pip { background: var(--price-negative-badge); }
.band-low td      { background-color: var(--price-low-bg); }      .band-low .price-badge      { color: var(--price-low-text); }      .band-low .pip      { background: var(--price-low-badge); }
.band-amber td    { background-color: var(--price-amber-bg); }    .band-amber .price-badge    { color: var(--price-amber-text); }    .band-amber .pip    { background: var(--price-amber-badge); }
.band-red td      { background-color: var(--price-red-bg); }      .band-red .price-badge      { color: var(--price-red-text); }      .band-red .pip      { background: var(--price-red-badge); }
.band-darkred td  { background-color: var(--price-darkred-bg); }  .band-darkred .price-badge  { color: var(--price-darkred-text); }  .band-darkred .pip  { background: var(--price-darkred-badge); }
.band-negative:hover td, .band-low:hover td, .band-amber:hover td, .band-red:hover td, .band-darkred:hover td { filter: brightness(0.97); }

/* ── PENDING LAYOUT ── */
.main--pending { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.holding-card { background: #fff; border-radius: 16px; border: 1px solid var(--gray-200); box-shadow: 0 2px 12px rgba(0,0,0,0.07); max-width: 520px; width: 100%; padding: 2.5rem 2rem; text-align: center; }
.clock-icon { width: 64px; height: 64px; margin: 0 auto 1.5rem; background: var(--pastel-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.holding-card h1 { margin: 0 0 0.75rem; font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); line-height: 1.25; }
.holding-card p { margin: 0 0 1rem; font-size: 0.95rem; color: var(--body-color); }
.publish-time { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--pastel-blue); border: 1px solid var(--powder-blue); border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.9rem; font-weight: 600; color: var(--primary-dark); margin: 0.5rem 0 1.5rem; }
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }
.info-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.info-list li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.875rem; color: var(--body-color); padding: 0.35rem 0; }
.info-list li .check { flex-shrink: 0; margin-top: 1px; color: var(--teal); }

/* ── LEGEND SWATCHES ── */
.swatch-negative { background: #198754; }
.swatch-low      { background: #20a854; }
.swatch-amber    { background: #fd7e14; }
.swatch-red      { background: #dc3545; }
.swatch-darkred  { background: #8b0000; }

/* ── UTILITY REPLACEMENTS FOR REMOVED INLINE STYLES ── */
.pending-note { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 0; }
.footer-note  { margin-top: 0.3rem; }

/* ── FOOTER ── */
.site-footer { text-align: center; padding: 2rem 1rem; font-size: 0.78rem; color: var(--gray-500); }
.site-footer a { color: var(--primary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .header-inner { height: 60px; }
  .logo svg { height: 34px; }
  .main--prices { padding: 1.25rem 1rem 3rem; }
  .page-title-block h1 { font-size: 1.3rem; }
  .price-table th, .price-table td { padding: 0.55rem 0.65rem; }
  .price-table th { font-size: 0.72rem; }
  .legend { padding: 0.75rem; }
  .holding-card { padding: 2rem 1.25rem; }
  .holding-card h1 { font-size: 1.25rem; }
}

@media (max-width: 400px) {
  .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .price-table { min-width: 340px; }
  .price-table th, .price-table td { padding: 0.5rem 0.5rem; }
  .td-time { font-size: 0.78rem; }
}
