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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f8fafc;
  color: #111827;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='190' viewBox='0 0 280 190'%3E%3Cg transform='rotate(-24 140 95)' font-family='Arial, sans-serif' font-weight='600' text-anchor='middle' fill='%230f172a' fill-opacity='0.055'%3E%3Ctext x='140' y='66' font-size='22'%3Esolarbe%3C/text%3E%3Ctext x='140' y='100' font-size='22'%3E%E7%A2%B3%E7%B4%A2%E6%96%B0%E8%83%BD%3C/text%3E%3Ctext x='140' y='134' font-size='22'%3E%E7%A2%B3%E7%B4%A2%E5%82%A8%E8%83%BD%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 280px 190px;
}

a {
  color: inherit;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar {
  background: #1f2937;
  color: white;
  font-size: 13px;
}

.topbar-inner,
.topbar-links,
.mainnav,
.brand,
.nav-links,
.hero-meta,
.button-row,
.page-head,
.filter-row,
.pagination,
.stat-line,
.report-meta {
  display: flex;
  align-items: center;
}

.topbar-inner {
  justify-content: space-between;
  padding-top: 6px;
  padding-bottom: 6px;
}

.topbar-links {
  gap: 14px;
}

.topbar a {
  color: white;
  text-decoration: none;
}

.muted {
  color: #9ca3af;
}

.site-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

.mainnav {
  justify-content: space-between;
  gap: 18px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  gap: 12px;
  text-decoration: none;
  color: #111827;
  min-width: 260px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: #2563eb;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-logo img {
  height: 100%;
  width: auto;
}

.brand small {
  display: block;
  color: #6b7280;
  font-size: 12px;
  margin-top: 2px;
}

.nav-links {
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 12px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.nav-links a.active,
.nav-links a:hover {
  color: #2563eb;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  background: #2563eb;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: white;
}

.btn-primary {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: white;
  color: #374151;
  border-color: #d1d5db;
}

.btn-secondary:hover {
  background: #f9fafb;
}

.hero {
  background: linear-gradient(90deg, #f8fafc, #eff6ff);
  border-bottom: 1px solid #dbeafe;
}

.hero .container {
  padding-top: 32px;
  padding-bottom: 32px;
}

.hero-meta {
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 12px;
}

.hero-meta strong {
  color: #2563eb;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.15;
  color: #1f2937;
  margin-bottom: 14px;
}

.hero p {
  color: #4b5563;
  max-width: 760px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.page-pad {
  padding-top: 28px;
  padding-bottom: 28px;
}

.layout {
  display: flex;
  gap: 24px;
}

.layout-main {
  flex: 1;
  min-width: 0;
}

.layout-side {
  width: 320px;
  flex: 0 0 320px;
}

.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 20px;
}

.card h2,
.card h3 {
  color: #111827;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: #1f2937;
  margin: 8px 0 4px;
}

.text-muted {
  color: #6b7280;
}

.text-small {
  font-size: 13px;
}

.text-center {
  text-align: center;
}

.tabs {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 24px;
}

.tabs a {
  height: 36px;
  min-width: 112px;
  padding: 0 16px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  font-size: 14px;
}

.tabs a.active {
  background: #2563eb;
  color: white;
}

.space-y > * + * {
  margin-top: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  vertical-align: top;
}

.table th {
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
}

.table tr:hover td {
  background: #f9fafb;
}

.status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: #fef3c7;
  color: #a16207;
}

.status-approved {
  background: #dcfce7;
  color: #15803d;
}

.status-epc {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-info {
  background: #cffafe;
  color: #0e7490;
}

.filter-row {
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f3f4f6;
}

.input-field,
.filter-select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 14px;
  padding: 9px 12px;
  min-height: 38px;
}

.filter-select {
  padding-right: 32px;
}

.pagination {
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #f3f4f6;
}

.page-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.page-links a,
.page-links span {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 7px 11px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
}

.page-links .active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.sidebar {
  display: grid;
  gap: 16px;
}

.check-list {
  display: grid;
  gap: 9px;
  list-style: none;
}

.check-list li {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.45;
  display: flex;
  gap: 8px;
}

.check-list li::before {
  content: "✓";
  color: #22c55e;
  flex: 0 0 auto;
}

.quote-box {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.6;
  color: #4b5563;
}

.report-links {
  display: grid;
  gap: 12px;
  list-style: none;
}

.report-links strong {
  display: block;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.report-links span {
  font-size: 12px;
  color: #9ca3af;
}

.progress-item {
  margin-top: 12px;
}

.progress-item div {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}

.progress-item::after {
  content: "";
  display: block;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
}

.progress-item i {
  display: block;
  height: 6px;
  background: #2563eb;
  border-radius: 999px;
  margin-top: -6px;
}

.chart-box {
  height: 280px;
  position: relative;
}

.chart-box canvas {
  width: 100%;
  height: 100%;
}

.trend-card {
  overflow: hidden;
}

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

.trend-summary div {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 12px;
}

.trend-summary span,
.trend-summary em {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.trend-summary strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
  margin: 6px 0 3px;
}

.chart-shell {
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 14px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%), #ffffff;
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.chart-foot span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-foot i {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: #2563eb;
}

.report-cover {
  width: 100%;
  aspect-ratio: 1003 / 611;
  background: #f8fafc;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
}

.report-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.report-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}

.index-card .table-wrap {
  margin-top: 12px;
}

.index-table th,
.index-table td {
  vertical-align: middle;
}

.period-cell strong,
.period-cell span {
  display: block;
  white-space: nowrap;
}

.period-cell strong {
  color: #0f172a;
  font-size: 13px;
}

.period-cell span {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 2px;
}

.index-number {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 7px 10px;
}

.index-number.primary {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.sample-pill,
.change-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.sample-pill {
  background: #f1f5f9;
  color: #475569;
}

.change-pill.up {
  background: #fee2e2;
  color: #b91c1c;
}

.change-pill.down {
  background: #dcfce7;
  color: #15803d;
}

.change-pill.flat {
  background: #f1f5f9;
  color: #64748b;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-panel {
  position: relative;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  max-width: 380px;
  width: 100%;
  padding: 24px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-head p {
  font-size: 14px;
  color: #6b7280;
  margin-top: 6px;
}

.modal-head button {
  border: 0;
  background: white;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
}

.qr-grid {
  width: 192px;
  height: 192px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.qr-grid span {
  background: #f1f5f9;
  border-radius: 2px;
}

.qr-grid span.on {
  background: #0f172a;
}

.contact-lines {
  margin-top: 20px;
  color: #374151;
  font-size: 14px;
  display: grid;
  gap: 8px;
}

.footer {
  background: white;
  border-top: 1px solid #e5e7eb;
  margin-top: 48px;
  color: #6b7280;
  font-size: 14px;
}

.footer .container {
  padding-top: 20px;
  padding-bottom: 20px;
}

.empty {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.auth-card {
  max-width: 448px;
  margin: 64px auto;
  text-align: center;
}

.auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #2563eb;
  color: white;
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.info-box {
  margin-top: 24px;
  padding: 16px;
  background: #eff6ff;
  border-radius: 8px;
  text-align: left;
}

.citation-block {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.mobile-cards {
  display: none;
}

.desktop-only {
  display: block;
}

.admin-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin: -20px -20px 20px;
}

.tab-buttons a {
  padding: 14px 24px;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.tab-buttons a.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.form-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-inline .input-field {
  min-width: 220px;
}

.article-section {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.article-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: white;
  color: #475569;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.topic-chip:hover,
.topic-chip.active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.article-list {
  display: grid;
  gap: 14px;
}

.article-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  background: white;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.article-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.article-date {
  height: 76px;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.article-date strong {
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.article-date span {
  font-size: 12px;
  margin-top: 7px;
  color: #64748b;
}

.article-body {
  min-width: 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 8px;
}

.article-body h2,
.article-body h3 {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 8px;
  color: #0f172a;
}

.article-body a {
  color: inherit;
  text-decoration: none;
}

.article-body a:hover {
  color: #2563eb;
}

.article-body p {
  color: #64748b;
  line-height: 1.7;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.policy-card {
  grid-template-columns: 82px minmax(0, 1fr);
}

.policy-card .article-date {
  background: linear-gradient(180deg, #ecfdf5, #f8fafc);
  border-color: #bbf7d0;
  color: #047857;
}

.policy-card:hover {
  border-color: #bbf7d0;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.08);
}

@media (max-width: 1100px) {
  .layout {
    flex-direction: column;
  }

  .layout-side {
    width: 100%;
    flex: auto;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-inner {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }

  .mainnav {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    width: 100%;
  }

  .desktop-only {
    display: none;
  }

  .mobile-cards {
    display: grid;
    gap: 12px;
  }

  .report-card {
    grid-template-columns: 1fr;
  }

  .report-cover {
    max-width: 260px;
  }

  .trend-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .hero h1 {
    font-size: 30px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .tabs {
    width: 100%;
  }

  .tabs a {
    flex: 1;
  }

  .card {
    padding: 16px;
  }

  .table-wrap {
    margin: 0 -16px;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-links {
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-links a {
    padding: 8px;
  }

  .stat-value {
    font-size: 26px;
  }

  .article-card,
  .policy-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .article-date {
    width: 96px;
    height: 58px;
    flex-direction: row;
    gap: 8px;
  }

  .article-date strong {
    font-size: 22px;
  }

  .article-date span {
    margin-top: 0;
  }

  .article-body h2,
  .article-body h3 {
    font-size: 17px;
  }

  .trend-summary {
    grid-template-columns: 1fr;
  }

  .chart-shell {
    padding: 8px;
  }

  .index-number {
    min-width: 62px;
    padding: 6px 8px;
  }
}
