/* ===== AI Tax Law — Premium Design ===== */

/* ---------- Header ---------- */
.ai-tax-page-header {
  position: relative;
  overflow: hidden;
  padding: 92px 24px 96px;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(255,200,80,.12), transparent),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(200,151,58,.1), transparent),
    linear-gradient(135deg, #3a0e00 0%, #6b1a00 30%, #8b2500 55%, #cf8a2a 100%);
  color: #fff;
}
.ai-tax-page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.3), transparent 75%);
  pointer-events: none;
}
.ai-tax-page-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, #fff 0%, transparent 100%);
  pointer-events: none;
}
.section-alt + .ai-tax-detail-section .ai-tax-page-header::after,
.ai-tax-detail-header::after { display: none; }
.ai-tax-header-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.ai-tax-header-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.88);
  font-size: 11px;
  letter-spacing: 2.5px;
  margin-bottom: 24px;
  text-transform: uppercase;
}
.ai-tax-page-header h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: 14px;
  text-shadow: 0 4px 28px rgba(0,0,0,.35);
}
.ai-tax-page-header p {
  max-width: 920px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.9;
  color: rgba(255,255,255,.88);
  font-weight: 300;
}
.ai-tax-header-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.ai-tax-header-actions .btn-primary {
  background: linear-gradient(135deg, #fff 0%, #f5f0e8 100%);
  color: #8b2500;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  font-weight: 600;
}
.ai-tax-header-actions .btn-primary:hover {
  background: #fff;
  color: #6b1a00;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
.ai-tax-header-outline {
  color: #fff;
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(4px);
}
.ai-tax-header-outline:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.7);
}

/* ---------- Hero / summary cards ---------- */
.ai-tax-hero-card,
.ai-tax-boundary-card,
.ai-tax-case-value-card,
.ai-tax-function-card,
.ai-tax-detail-summary-card {
  background: linear-gradient(160deg, #fffdf8 0%, #fff7ea 100%);
}
.ai-tax-hero-lite {
  max-width: 980px;
  margin: 0 auto;
}
.ai-tax-detail-summary-card {
  border: 1px solid rgba(232,220,200,.5);
  box-shadow: 0 12px 40px rgba(66,43,20,.06);
}

/* ---------- Case entry grid ---------- */
.ai-tax-product-grid,
.ai-tax-case-entry-grid,
.ai-tax-function-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ai-tax-case-entry-grid,
.ai-tax-function-grid {
  display: grid;
  gap: 22px;
}
.ai-tax-entry-card,
.ai-tax-product-card {
  text-align: left;
}
.ai-tax-entry-card {
  position: relative;
  padding: 26px 24px;
  border-radius: 22px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.ai-tax-entry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(200,151,58,.14), transparent 45%);
  pointer-events: none;
}
.ai-tax-entry-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.ai-tax-entry-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(66,43,20,.14), 0 4px 12px rgba(200,151,58,.1);
  border-color: rgba(200,151,58,.55);
}
.ai-tax-entry-link::after { content: ""; }
.ai-tax-entry-head,
.ai-tax-entry-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-tax-entry-head { margin-bottom: 20px; }
.ai-tax-entry-eyebrow,
.ai-tax-entry-state {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 1.2px;
  font-weight: 500;
}
.ai-tax-entry-eyebrow {
  background: rgba(255,255,255,.82);
  color: #8b2500;
  border: 1px solid rgba(200,151,58,.18);
}
.ai-tax-entry-state {
  background: linear-gradient(135deg, rgba(139,37,0,.95), rgba(200,151,58,.88));
  color: #fff;
  box-shadow: 0 6px 16px rgba(139,37,0,.18);
}
.ai-tax-entry-card .coming-icon {
  margin: 0 0 20px;
  width: 64px;
  height: 64px;
  font-size: 28px;
  background: linear-gradient(145deg, #fff8ee, #fff2dd);
  border: 1px solid rgba(200,151,58,.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 10px 24px rgba(200,151,58,.1);
}
.ai-tax-entry-card h3 {
  font-size: 23px;
  line-height: 1.35;
  margin-bottom: 12px;
  font-weight: 700;
}
.ai-tax-entry-card p {
  color: #7b6653;
  line-height: 1.85;
  font-size: 14px;
}
.ai-tax-entry-card-featured {
  background: linear-gradient(160deg, #fffefb 0%, #fffaf2 30%, #fff6e8 70%, #fff1dc 100%);
  border: 1px solid rgba(200,151,58,.26);
  box-shadow: 0 8px 28px rgba(139,37,0,.05), 0 2px 8px rgba(200,151,58,.08);
}
.ai-tax-entry-card-muted {
  background: linear-gradient(160deg, #fdfcfa 0%, #faf8f4 50%, #f7f4ef 100%);
  border: 1px solid rgba(200,151,58,.16);
  box-shadow: 0 4px 16px rgba(139,37,0,.03);
}
.ai-tax-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.ai-tax-entry-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: #8b2500;
  background: rgba(200,151,58,.12);
  letter-spacing: .5px;
}
.ai-tax-entry-action {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(200,151,58,.14);
}
.ai-tax-entry-action span {
  color: #8b2500;
  font-size: 14px;
  font-weight: 600;
}
.ai-tax-entry-action strong {
  font-size: 20px;
  color: rgba(107,58,31,.4);
  letter-spacing: 1px;
}

/* ---------- Function cards ---------- */
.ai-tax-function-card {
  padding: 26px 24px;
  border: 1px solid rgba(232,220,200,.4);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(66,43,20,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ai-tax-function-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(66,43,20,.08);
}
.ai-tax-function-card h3 {
  font-size: 21px;
  color: #6b3a1f;
  margin-bottom: 12px;
  font-weight: 700;
}
.ai-tax-function-card p {
  color: #7d6b57;
  line-height: 1.85;
}
.ai-tax-card-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  color: #7a6a58;
  line-height: 1.8;
  font-size: 14px;
}
.ai-tax-card-list li {
  position: relative;
  padding-left: 18px;
}
.ai-tax-card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8973a, #8b2500);
}

/* ---------- Compare / shot / chart grids ---------- */
.ai-tax-compare-grid,
.case-grid,
.ai-tax-shot-grid,
.ai-tax-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.ai-tax-compare-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(232,220,200,.45);
  box-shadow: 0 8px 36px rgba(0,0,0,.04);
  transition: transform .2s ease;
}
.ai-tax-compare-card:hover {
  transform: translateY(-2px);
}
.ai-tax-compare-card h3,
.ai-tax-boundary-card h3,
.ai-tax-chart-card h3 {
  font-size: 23px;
  color: #6b3a1f;
  margin-bottom: 18px;
  letter-spacing: .5px;
  font-weight: 700;
}
.ai-tax-compare-card-gold {
  background: linear-gradient(160deg, #fffdf8 0%, #fff6e5 100%);
  border-color: rgba(200,151,58,.3);
}
.case-card h2 { font-size: 24px; }
.case-card-wide { grid-column: 1 / -1; }
.ai-tax-boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 26px;
}

/* ---------- Section heads ---------- */
.ai-tax-case-head {
  max-width: 980px;
  margin: 0 auto 36px;
  text-align: center;
}
.ai-tax-case-entry .section-heading { margin-bottom: 8px; }
.ai-tax-case-entry {
  border-top: 1px solid rgba(232,220,200,.6);
  border-bottom: 1px solid rgba(232,220,200,.6);
}
.ai-tax-case-entry .product-badge { margin: 0 auto 14px; }
.ai-tax-case-intro {
  color: #7d6b57;
  line-height: 1.9;
  font-size: 15px;
}

/* ---------- KPI cards ---------- */
.ai-tax-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.ai-tax-kpi-card {
  background: linear-gradient(160deg, #fff 0%, #fffcf6 100%);
  border: 1px solid rgba(232,220,200,.7);
  border-radius: 20px;
  padding: 26px 22px;
  box-shadow: 0 8px 28px rgba(66,43,20,.05);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ai-tax-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(66,43,20,.08);
}
.ai-tax-kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, rgba(200,151,58,.1), transparent 70%);
  pointer-events: none;
}
.ai-tax-kpi-card span {
  display: block;
  font-size: 12px;
  color: #9a7a4d;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.ai-tax-kpi-card strong {
  display: block;
  font-size: 36px;
  line-height: 1.1;
  color: #6b3a1f;
  margin-bottom: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #6b3a1f 0%, #8b2500 50%, #c8973a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-tax-kpi-card p {
  color: #7d6b57;
  line-height: 1.8;
  font-size: 13px;
}

/* ---------- Shot / old chart cards ---------- */
.ai-tax-shot-card,
.ai-tax-chart-card { overflow: hidden; }
.ai-tax-shot-card p,
.ai-tax-chart-card p {
  color: #7d6b57;
  line-height: 1.85;
}
.ai-tax-shot-img,
.ai-tax-chart-img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid #eadbc4;
  margin-top: 16px;
  background: #fff;
}
.ai-tax-shot-caption {
  margin-top: 14px;
  color: #8a775f;
  line-height: 1.85;
}

/* ---------- Detail header ---------- */
.ai-tax-detail-header {
  padding: 84px 24px 88px;
}
.ai-tax-detail-inner {
  text-align: left;
  max-width: 980px;
}
.ai-tax-detail-inner p {
  margin: 0;
  max-width: 860px;
}
.ai-tax-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
  font-size: 13px;
  transition: background .18s;
}
.ai-tax-back-link:hover {
  color: #fff;
  background: rgba(255,255,255,.16);
}
.ai-tax-detail-section {
  border-top: 1px solid rgba(232,220,200,.5);
}

/* ---------- Chart.js containers ---------- */
.ai-tax-chart-wrap {
  position: relative;
  width: 100%;
  padding: 22px 18px 14px;
  background: linear-gradient(180deg, #fff 0%, #fffcf7 100%);
  border-radius: 16px;
  border: 1px solid rgba(232,220,200,.5);
  margin: 16px 0 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.ai-tax-chart-wrap canvas {
  width: 100% !important;
  max-height: 380px;
}
.ai-tax-chart-card .ai-tax-chart-title {
  font-size: 19px;
  color: #6b3a1f;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: .3px;
}
.ai-tax-chart-card .ai-tax-chart-desc {
  color: #7d6b57;
  line-height: 1.85;
  font-size: 13px;
  margin-top: 12px;
}
.ai-tax-chart-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.ai-tax-chart-row .ai-tax-chart-card {
  background: linear-gradient(160deg, #fffefb 0%, #fff8ee 100%);
  border: 1px solid rgba(232,220,200,.45);
  border-radius: 22px;
  padding: 26px 24px;
  box-shadow: 0 10px 32px rgba(66,43,20,.05);
  transition: transform .22s ease, box-shadow .22s ease;
}
.ai-tax-chart-row .ai-tax-chart-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(66,43,20,.08);
}
.ai-tax-chart-row .ai-tax-chart-card.case-card-wide {
  grid-column: 1 / -1;
}
/* Dual chart side by side inside one card */
.ai-tax-dual-chart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ai-tax-dual-chart .ai-tax-chart-wrap {
  margin: 8px 0;
}

/* ---------- Highlight list in compare cards ---------- */
.ai-tax-compare-card .highlight-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(232,220,200,.3);
}
.ai-tax-compare-card .highlight-item:last-child {
  border-bottom: none;
}

/* ========== Responsive ========== */
@media(max-width:768px){
  .ai-tax-page-header {
    padding: 68px 20px 74px;
  }
  .ai-tax-page-header::after { height: 50px; }
  .ai-tax-page-header h1 {
    font-size: 40px;
    letter-spacing: 8px;
  }
  .ai-tax-page-header p {
    font-size: 17px;
  }
  .ai-tax-entry-card {
    padding: 22px 20px;
  }
  .ai-tax-entry-card h3 {
    font-size: 21px;
  }
  .ai-tax-product-grid,
  .ai-tax-case-entry-grid,
  .ai-tax-function-grid,
  .ai-tax-compare-grid,
  .case-grid,
  .ai-tax-boundary-grid,
  .ai-tax-shot-grid,
  .ai-tax-chart-grid,
  .ai-tax-kpi-grid,
  .ai-tax-chart-row {
    grid-template-columns: 1fr;
  }
  .ai-tax-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .case-card-wide {
    grid-column: auto;
  }
  .ai-tax-compare-card {
    padding: 24px 20px;
  }
  .ai-tax-detail-header {
    padding-top: 64px;
    padding-bottom: 68px;
  }
  .ai-tax-chart-wrap canvas {
    max-height: 280px;
  }
  .ai-tax-dual-chart {
    grid-template-columns: 1fr;
  }
  .ai-tax-chart-row .ai-tax-chart-card {
    padding: 20px 18px;
  }
  .ai-tax-kpi-card strong {
    font-size: 26px;
  }
  .ai-tax-kpi-card {
    padding: 20px 18px;
  }
  .ai-tax-kpi-card p {
    font-size: 12px;
  }
  .ai-tax-chart-card .ai-tax-chart-title {
    font-size: 17px;
  }
  .ai-tax-chart-card .ai-tax-chart-desc {
    font-size: 12px;
  }
}
@media(max-width:480px){
  .ai-tax-page-header {
    padding: 56px 16px 60px;
  }
  .ai-tax-page-header h1 {
    font-size: 30px;
    letter-spacing: 5px;
  }
  .ai-tax-page-header p {
    font-size: 14px;
    line-height: 1.8;
  }
  .ai-tax-header-kicker {
    font-size: 10px;
    padding: 6px 12px;
  }
  .ai-tax-kpi-card strong {
    font-size: 22px;
  }
  .ai-tax-kpi-card span {
    font-size: 11px;
  }
  .ai-tax-entry-card h3 {
    font-size: 19px;
  }
  .ai-tax-compare-card h3,
  .ai-tax-chart-card h3 {
    font-size: 18px;
  }
}
