/* ──────────────────────────────────────────────────────────────────────────
   SinoSource — Pro tool pages design system (2026-08-05)
   Shared visual language for the public utility pages (Safety Gate monitor,
   Regulation Tracker, Tariff Verification Hub, calculators…).

   Goals: readable type (nothing below 13px, body #C6C6D4 not #9A9AAE),
   headings visible without JS, dense professional data lists instead of
   sparse oversized cards, one consistent dark surface system.
   ────────────────────────────────────────────────────────────────────────── */

:root, .tp {
  --tp-bg: #0A0A0F;
  --tp-surface: #0E0E14;
  --tp-card: #14141C;
  --tp-card-hi: #1B1B26;
  --tp-border: rgba(255,255,255,.08);
  --tp-border-hi: rgba(255,255,255,.16);
  --tp-text: #F2F2F7;
  --tp-body: #C6C6D4;
  --tp-dim: #8B8BA0;
  --tp-gold: #F0A51E;
  --tp-gold-soft: #F5BC45;
  --tp-red: #E5484D;
  --tp-amber: #F5A524;
  --tp-green: #3FB950;
  --tp-radius: 14px;
  --tp-radius-lg: 18px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.tp-hero {
  position: relative;
  padding: calc(var(--nav-h, 61px) + 64px) 0 56px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 700px 380px at 50% -80px, rgba(212,43,30,.14), transparent 65%),
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px),
    var(--tp-bg);
  background-size: auto, 56px 56px, 56px 56px, auto;
  border-bottom: 1px solid var(--tp-border);
  text-align: center;
}
.tp-hero--left { text-align: left; }
.tp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tp-gold-soft); background: rgba(240,165,30,.09);
  border: 1px solid rgba(240,165,30,.28); border-radius: 100px;
  padding: 6px 16px; margin-bottom: 22px;
}
.tp-eyebrow .tp-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tp-eyebrow .tp-dot--pulse { animation: tp-pulse 2s ease-in-out infinite; }
@keyframes tp-pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.tp-hero h1 {
  font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; line-height: 1.08;
  letter-spacing: -.03em; color: var(--tp-text);
  max-width: 780px; margin: 0 auto 18px;
}
.tp-hero--left h1 { margin-left: 0; }
.tp-lead {
  font-size: 17px; color: var(--tp-body); line-height: 1.7;
  max-width: 640px; margin: 0 auto;
}
.tp-hero--left .tp-lead { margin-left: 0; }
.tp-meta-row {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
  gap: 10px; margin-top: 26px;
}
.tp-hero--left .tp-meta-row { justify-content: flex-start; }
.tp-meta-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--tp-dim);
  background: var(--tp-card); border: 1px solid var(--tp-border);
  border-radius: 100px; padding: 7px 14px;
}
.tp-meta-pill strong { color: var(--tp-body); font-weight: 700; }

/* ── Stat strip ─────────────────────────────────────────────────────────── */
.tp-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin: 0;
}
.tp-stat {
  background: var(--tp-card); border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius); padding: 18px 20px;
}
.tp-stat__num {
  font-size: 30px; font-weight: 800; letter-spacing: -.03em;
  color: var(--tp-text); line-height: 1.1;
}
.tp-stat__num em { font-style: normal; color: var(--tp-gold-soft); }
.tp-stat__label { font-size: 12.5px; color: var(--tp-dim); margin-top: 5px; line-height: 1.45; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.tp-section { padding: 56px 0; background: var(--tp-bg); }
.tp-section--alt { background: var(--tp-surface); border-top: 1px solid var(--tp-border); border-bottom: 1px solid var(--tp-border); }
.tp-section__head { margin-bottom: 32px; }
.tp-section__head--center { text-align: center; }
.tp-section__head h2 {
  font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.025em;
  color: var(--tp-text); margin: 0 0 10px;
}
.tp-section__head p { font-size: 15px; color: var(--tp-body); line-height: 1.7; max-width: 620px; margin: 0; }
.tp-section__head--center p { margin: 0 auto; }

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.tp-filterbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.tp-search {
  width: 100%; max-width: 420px;
  background: var(--tp-card); border: 1px solid var(--tp-border);
  border-radius: 10px; color: var(--tp-text);
  font-family: inherit; font-size: 14px; padding: 11px 16px;
  transition: border-color .18s;
}
.tp-search::placeholder { color: var(--tp-dim); }
.tp-search:focus { outline: none; border-color: rgba(240,165,30,.45); }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chip {
  background: var(--tp-card); border: 1px solid var(--tp-border);
  color: var(--tp-body); font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 15px; border-radius: 100px; cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.tp-chip:hover { border-color: var(--tp-border-hi); color: var(--tp-text); }
.tp-chip.active {
  background: rgba(240,165,30,.1); border-color: rgba(240,165,30,.4);
  color: var(--tp-gold-soft);
}
.tp-chip .tp-chip__count { opacity: .55; font-weight: 500; margin-left: 3px; }

/* ── Data list (dense expandable rows) ──────────────────────────────────── */
.tp-list {
  background: var(--tp-card); border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-lg); overflow: hidden;
}
.tp-row { border-top: 1px solid var(--tp-border); }
.tp-row:first-child { border-top: 0; }
.tp-row__btn {
  display: grid; grid-template-columns: 92px minmax(0,1fr) auto 22px;
  align-items: center; gap: 16px; width: 100%;
  padding: 15px 20px; background: none; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
  transition: background .15s;
}
.tp-row__btn:hover { background: rgba(255,255,255,.025); }
.tp-row.open .tp-row__btn { background: rgba(255,255,255,.03); }
.tp-row__date { font-size: 12.5px; font-weight: 600; color: var(--tp-dim); white-space: nowrap; }
.tp-row__main { min-width: 0; display: block; }
.tp-row__title {
  display: block;
  font-size: 15px; font-weight: 650; color: var(--tp-text); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tp-row__sub {
  display: block;
  font-size: 13px; color: var(--tp-dim); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tp-row__flags { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tp-row__chev {
  width: 18px; height: 18px; color: var(--tp-dim); flex-shrink: 0;
  transition: transform .2s;
}
.tp-row.open .tp-row__chev { transform: rotate(180deg); color: var(--tp-gold-soft); }

.tp-row__panel { display: none; padding: 4px 20px 20px 128px; }
.tp-row.open .tp-row__panel { display: block; }
.tp-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 28px; margin: 8px 0 16px;
}
.tp-detail dt {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--tp-dim); margin-bottom: 4px;
}
.tp-detail dd { margin: 0; font-size: 14px; color: var(--tp-body); line-height: 1.55; }

/* Severity / status markers */
.tp-sev { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tp-sev::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.tp-sev--high { color: var(--tp-red); }
.tp-sev--medium { color: var(--tp-amber); }
.tp-sev--low { color: var(--tp-dim); }
.tp-badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--tp-dim);
  background: rgba(255,255,255,.05); border: 1px solid var(--tp-border);
  border-radius: 6px; padding: 3px 9px; white-space: nowrap;
}

/* ── Cards (regulation / hub content) ───────────────────────────────────── */
.tp-card {
  background: var(--tp-card); border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-lg); padding: 24px;
  transition: border-color .18s, background .18s;
}
.tp-card:hover { border-color: var(--tp-border-hi); background: var(--tp-card-hi); }

/* ── Note / disclaimer bar ──────────────────────────────────────────────── */
.tp-note {
  background: rgba(240,165,30,.06); border: 1px solid rgba(240,165,30,.2);
  border-radius: 12px; color: var(--tp-body);
  font-size: 13.5px; line-height: 1.65; padding: 14px 18px;
}
.tp-note strong { color: var(--tp-text); }
.tp-note a { color: var(--tp-gold-soft); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .18s, border-color .18s, transform .18s;
}
.tp-btn--gold { background: var(--tp-gold); color: #1A1206; }
.tp-btn--gold:hover { background: var(--tp-gold-soft); transform: translateY(-1px); }
.tp-btn--ghost { background: transparent; border-color: var(--tp-border-hi); color: var(--tp-body); }
.tp-btn--ghost:hover { color: var(--tp-text); border-color: rgba(255,255,255,.3); }
.tp-btn--sm { min-height: 38px; padding: 0 16px; font-size: 13px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .tp-hero { padding: calc(var(--nav-h, 61px) + 40px) 0 40px; }
  .tp-hero h1 { font-size: clamp(27px, 7.4vw, 34px); }
  .tp-lead { font-size: 15.5px; }
  .tp-section { padding: 40px 0; }
  .tp-row__btn { grid-template-columns: minmax(0,1fr) 22px; gap: 12px; padding: 14px 16px; }
  .tp-row__date { display: none; }
  .tp-row__flags { display: none; }
  .tp-row__panel { padding: 2px 16px 18px; }
  .tp-row__title { white-space: normal; }
  .tp-row__sub { white-space: normal; }
}
