:root {
  --brand-dark: #0e3a66;
  --brand: #15589c;
  --brand-light: #e8f2fc;
  --accent: #d97706;
  --accent-bg: #fef6e7;
  --green: #0d8a61;
  --green-bg: #e7f7f0;
  --red: #c93b3b;
  --red-bg: #fdeeee;
  --text: #1a2433;
  --text-sub: #516072;
  --text-muted: #788698;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --border: #dfe7f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(14, 58, 102, 0.06);
  --shadow-hover: 0 10px 28px rgba(14, 58, 102, 0.12);
  --max-w: 1180px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

a:hover {
  color: var(--brand-dark);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(14, 58, 102, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  height: 44px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--brand-light);
  color: var(--brand);
}

.site-nav a.is-active {
  background: var(--brand);
  color: #ffffff;
}

.nav-cta {
  background: var(--accent-bg) !important;
  color: #a45704 !important;
  border: 1px solid #f5d08a;
  font-weight: 600 !important;
}

.nav-cta.is-active,
.nav-cta:hover {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 1px solid #c9dff5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Announcement Banner (Required directly below nav on homepage) */
.announce-bar {
  background: linear-gradient(90deg, #0e3a66 0%, #15589c 65%, #1e6cb8 100%);
  color: #ffffff;
  border-bottom: 2px solid #f59e0b;
}

.announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
}

.announce-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.announce-badge {
  background: #f59e0b;
  color: #1a2433;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.announce-text {
  font-weight: 500;
  letter-spacing: 0.4px;
  word-break: break-word;
}

.announce-meta {
  font-size: 12px;
  color: #cde3fa;
  white-space: nowrap;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0b2d50 0%, #134b85 52%, #1d6bb3 100%);
  color: #ffffff;
  padding: 40px 0 44px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fde68a;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.hero-desc {
  margin: 0 0 22px;
  font-size: 15.5px;
  color: #d9ebfc;
  max-width: 600px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: #f59e0b;
  color: #162130;
}

.btn-primary:hover {
  background: #fbbf24;
  color: #162130;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.btn-brand {
  background: var(--brand);
  color: #ffffff;
}

.btn-brand:hover {
  background: var(--brand-dark);
  color: #ffffff;
}

.btn-outline {
  background: var(--surface);
  color: var(--brand);
  border-color: #b7d2ef;
}

.btn-outline:hover {
  background: var(--brand-light);
}

/* KPI Panel in Hero */
.hero-kpi-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(6px);
}

.kpi-title {
  font-size: 14px;
  font-weight: 700;
  color: #fde68a;
  margin: 0 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.kpi-item {
  background: rgba(9, 32, 58, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 12px 14px;
  min-width: 0;
}

.kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.kpi-val small {
  font-size: 13px;
  font-weight: 500;
  color: #93c5fd;
}

.kpi-label {
  font-size: 12.5px;
  color: #cfe4f9;
  margin-top: 4px;
}

/* Sections */
.section {
  padding: 40px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-dark);
}

.section-sub {
  margin: 5px 0 0;
  font-size: 14px;
  color: var(--text-sub);
}

.more-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

/* Quick Tool Strip */
.tools-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tool-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-width: 0;
}

.tool-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #9ac3eb;
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.tool-tile h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.tool-tile p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-sub);
}

/* District Price Matrix */
.district-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.district-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.district-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.district-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-dark);
}

.trend-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.trend-up {
  background: var(--green-bg);
  color: var(--green);
}

.trend-down {
  background: var(--accent-bg);
  color: #a45704;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  margin: 6px 0;
}

.price-row strong {
  color: var(--text);
}

.bar-track {
  height: 6px;
  background: #e7eef6;
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 10px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #15589c, #2f89d8);
  border-radius: 999px;
}

.bar-fill-second {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.district-plates {
  font-size: 12.5px;
  color: var(--text-sub);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

/* Cards Grid */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0e3a66;
  overflow: hidden;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--brand-light);
  color: var(--brand);
}

.tag-amber {
  background: var(--accent-bg);
  color: #a45704;
}

.tag-green {
  background: var(--green-bg);
  color: var(--green);
}

.card-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
}

.card-title a {
  color: var(--text);
}

.card-title a:hover {
  color: var(--brand);
}

.card-summary {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  flex: 1;
}

.project-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
}

.project-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
}

.spec-chip {
  background: #f1f5f9;
  color: var(--text-sub);
  padding: 3px 8px;
  border-radius: 5px;
}

/* Topics / Owner Stories */
.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.topic-card h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  color: var(--text);
}

.topic-card p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-sub);
}

.topic-tip {
  background: var(--accent-bg);
  border: 1px solid #f7d89c;
  color: #7c4106;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
}

/* Page Header & Breadcrumb */
.page-banner {
  background: linear-gradient(135deg, #0e3a66 0%, #195e9f 100%);
  color: #ffffff;
  padding: 30px 0;
}

.breadcrumb {
  font-size: 13px;
  color: #bcd9f5;
  margin-bottom: 10px;
}

.breadcrumb a {
  color: #e2f0fe;
}

.page-banner h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
}

.page-banner p {
  margin: 0;
  color: #d6e9fb;
  font-size: 15px;
  max-width: 760px;
}

/* Filter Pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sub);
}

.filter-pill:hover,
.filter-pill.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* Article Detail */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.article-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.article-box h1 {
  margin: 10px 0 14px;
  font-size: 26px;
  line-height: 1.35;
  color: var(--text);
}

.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: #243142;
}

.article-content h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  color: var(--brand-dark);
}

.article-content p {
  margin: 0 0 14px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-lead {
  background: var(--brand-light);
  border: 1px solid #c5dff8;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 15px;
  color: #133c66;
}

.article-note {
  font-size: 13px;
  color: var(--text-muted);
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.side-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--brand-dark);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-list a {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  display: block;
}

.side-list a:hover {
  color: var(--brand);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0 18px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  min-width: 520px;
}

.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #edf4fc;
  color: var(--brand-dark);
  font-weight: 700;
}

/* Calculators & Interactive Tools */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.calc-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--brand-dark);
}

.calc-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.field input,
.field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--text);
  background: #ffffff;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 88, 156, 0.12);
}

.calc-result {
  margin-top: 16px;
  background: #f0f7ff;
  border: 1px solid #c3dcf7;
  border-radius: 10px;
  padding: 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.result-item strong {
  display: block;
  font-size: 20px;
  color: var(--brand-dark);
}

.result-item span {
  font-size: 12.5px;
  color: var(--text-sub);
}

.result-highlight {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #b4d1f2;
  font-size: 14px;
  color: var(--green);
  font-weight: 700;
}

/* Inspection Checklist */
.checklist-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.checklist-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--brand-light);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.checklist-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.check-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fbfdff;
}

.check-group h3 {
  margin: 0 0 10px;
  font-size: 15.5px;
  color: var(--brand-dark);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px dashed #e6edf5;
  font-size: 13.8px;
  cursor: pointer;
}

.check-item:last-child {
  border-bottom: none;
}

.check-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.check-item.is-done span {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Footer */
.site-footer {
  background: #0f253c;
  color: #b7cae0;
  padding: 40px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-title {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.footer-links a {
  color: #c5d8ec;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #93acc7;
}

.footer-bottom a {
  color: #dbeafe;
}

.footer-bottom a:hover {
  color: #fbbf24;
}

.readonly-notice {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-sub);
  margin-top: 20px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid,
  .detail-layout,
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .tools-strip,
  .district-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 14px;
  }
  .header-inner {
    min-height: 60px;
  }
  .brand-logo {
    height: 36px;
    max-width: 138px;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(14, 58, 102, 0.12);
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    padding: 10px 12px;
  }
  .announce-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .announce-meta {
    display: none;
  }
  .hero {
    padding: 26px 0 30px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .kpi-grid,
  .tools-strip,
  .district-grid,
  .cards-3,
  .cards-2,
  .form-grid,
  .form-grid-3,
  .result-grid,
  .result-grid-3,
  .checklist-groups,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .article-box {
    padding: 18px 16px;
  }
  .article-box h1 {
    font-size: 21px;
  }
  .section {
    padding: 28px 0;
  }
  .section-head h2 {
    font-size: 20px;
  }
}
