/* ================== Global reset ================== */
*,
*::before,
*::after { box-sizing: border-box; }

/* ================== Base ================== */
:root {
  --muted: #94a3b8;
  --text: #0f172a;
  --border: #d8dee9;
  --blue-75:  #e6f4ff;  /* Field box bg */
  --blue-300: #b3daff;  /* Field box border */
}

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background: #ffffff;
  color: var(--text);
}

h1 { margin-bottom: 12px; }

/* ================== Header ================== */
header {
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}
header .title {
  font-size: 35px;
  font-weight: 700;
  margin-bottom: 0;
}

/* ================== Cards ================== */
.card {
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

.row { margin: 12px 0; }
.hint { font-size: 12px; color: #666; margin-top: 4px; }
.current { font-size: 12px; color: #333; margin-top: 6px; }

/* ================== Field blocks (blue rows for sliders) ================== */
.field-block {
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
}
.field-block > label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #0b3d91;
}
.field-block.compact { padding: 6px 8px; margin: 6px 0; }
.field-block.compact > label { margin-bottom: 2px; font-size: 13px; }

/* Inline layout for sliders */
.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.field-block input[type="range"] {
  max-width: 180px; /* compact slider */
  flex: 1 0 auto;
}

/* Badge */
.value-badge {
  display: inline-block;
  min-width: 44px;
  text-align: center;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  font-size: 19px;
}

/* ================== Primary button ================== */
.btn {
  background: #0077cc;
  color: white;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease, transform .05s ease, box-shadow .2s ease;
  box-shadow: 0 8px 24px rgba(0,119,204,0.25);
}
.btn:hover  { background: #0066b0; transform: translateY(-1px); }
.btn:active { background: #005797; }

/* ================== Diagram + hover lift ================== */
.diagram {
  max-width: 100%;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: zoom-in;
}
.diagram:hover {
  transform: translateY(-2px);
  border-color: #2b395e;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* ================== Fullscreen modal ================== */
body.no-scroll { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.modal.open { display: flex; }

.modal__img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  cursor: zoom-out;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

/* ================== Alerts ================== */
.info { color: #0a7d25; font-size: 13px; white-space: pre-wrap; }
.error { color: #c30000; font-size: 13px; white-space: pre-wrap; }

/* ================== Downloads grid ================== */
.download-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 12px;
}
@media (min-width: 720px) {
  .download-grid { grid-template-columns: repeat(3, 1fr); }
}

.dl-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
  min-height: 140px;
  padding: 14px;
  border: 1px solid #d5dfea;
  border-radius: 14px;
  background: #c1ddbe;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}
.dl-box:hover {
  transform: translateY(-1px);
  border-color: #2b395e;
  box-shadow: 0 14px 38px rgba(0,0,0,.35);
}
.dl-label {
  color: #000;
  font-size: 22px;
  font-weight: 700;
}

.suppplydrop{ font-size: 22px; font-weight: 700; }
.supplydrop01{ color: #e11d48; }

/* ================== Footer ================== */
footer {
  margin: 24px 0 8px;
  color: #666;
  font-size: 12px;
  text-align: center;
}

/* ====== Top-5 tables (small, neutral styles) ====== */
.top5-section h2 { margin-top: 0; }
.top5-wrap { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .top5-wrap { grid-template-columns: 1fr 1fr; }
}
.table-wrap { overflow-x: auto; }
.nice-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nice-table th, .nice-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}
.nice-table thead th { background: #f8fafc; font-weight: 700; }
.nice-table tbody tr:hover { background: #f1f5f9; }
