.company-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;

}

.company-main {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.company-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  background: rgba(255,255,255,.11);
  font-size: 23px;
  font-weight: 800;
}

.company-heading {
  min-width: 0;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.status-badge,
.location-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge {
  color: #d8ffe8;
  background: rgba(32, 201, 113, .15);
  border: 1px solid rgba(129, 234, 176, .23);
}

.status-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #51dd8f;
}

.location-label {
  color: #d8f7f4;
  background: rgba(255,255,255,.08);
}

.company-hero h1 {
  margin: 0;

}

.company-en {
  margin:0;
  font-size: 13px;
}

.tax-code-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
  color: #cde5e3;
}

.tax-code-line strong {
  color: #fff;
  font-size: 18px;
}

.copy-tax {
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.hero-actions {
  display: grid;
  gap: 10px;
  flex: 0 0 176px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
}

.button-primary {
  background: #fff;
  color: var(--primary-dark);
}

.button-secondary {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  margin: 24px 0 48px;
}

.main-content,
.sidebar {
  display: grid;
  gap: 22px;
}

.content-card,
.side-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(31, 49, 57, .045);
}

.content-card {
  padding: 24px;
}

.side-card {
  padding: 20px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.section-header h2,
.side-card h2 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.section-header h2 {
  font-size: 21px;
}

.side-card h2 {
  font-size: 16px;
}

.updated-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.information-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.info-row {
  min-height: 88px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.info-row:nth-child(odd):not(.full) {
  border-right: 1px solid var(--line);
}

.info-row.full {
  grid-column: 1 / -1;
}

.info-row:last-child,
.info-row:nth-last-child(2):not(.full) {
  border-bottom: 0;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.info-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.55;
}

.status-text {
  color: var(--success);
}

.numerology-card {
  background:
    linear-gradient(180deg, rgba(232, 247, 245, .7), transparent 300px),
    #fff;
}

.score-overview {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
}

.score-circle {
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 78%, #dce7e8 78% 100%);
}

.score-inner {
  width: 105px;
  height: 105px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  padding-top: 34px;
}

.score-inner strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.score-inner span {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rating-pill {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-summary .score-title {
  margin: 0 0 7px;
  font-size: 21px;
  letter-spacing: -.02em;
}

.score-summary p {
  margin: 0;
  color: var(--muted);
}

.digit-sequence {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.digit-sequence span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #c9e7e3;
  border-radius: 11px;
  background: #f2fbfa;
  color: var(--primary-dark);
  font-size: 19px;
  font-weight: 800;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.analysis-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.analysis-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.analysis-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.analysis-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.tag-list span {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 12px;
  font-weight: 700;
}

.disclaimer {
  margin-top: 16px;
  padding: 14px 15px;
  border: 1px solid #f1d6aa;
  border-radius: 12px;
  background: #fff9ef;
  color: #7a5420;
  font-size: 12px;
}

.intro-text p {
  margin: 0;
  color: #34444f;
}

.intro-text p + p {
  margin-top: 12px;
}

.quick-card nav,
.related-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.quick-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: #33434e;
  font-size: 13px;
  font-weight: 650;
}

.quick-card a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.quick-card b {
  color: #99a6af;
  font-size: 11px;
}

.side-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 12px;
  font-weight: 800;
}

.side-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.side-icon.notice {
  background: var(--warning-soft);
  color: var(--warning);
}

.company-status-card p,
.notice-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.related-list a {
  display: block;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.related-list a:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.related-list strong {
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.related-list span {
  color: var(--muted);
  font-size: 12px;
}


@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: repeat(2, 1fr);
  }

  .company-hero {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
 

  .company-hero {
    display: block;
    padding: 22px;
  }

  .company-main {
    align-items: flex-start;
  }

  .company-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 18px;
  }

  .hero-actions {
    grid-template-columns: 1fr 1fr;
    margin-top: 22px;
  }

  .information-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .info-row,
  .info-row:nth-child(odd):not(.full) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .info-row:last-child {
    border-bottom: 0;
  }

  .score-overview {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .score-circle {
    margin-inline: auto;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .digit-sequence {
    grid-template-columns: repeat(5, 1fr);
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  
}

@media (max-width: 480px) {

  .company-main {
    display: block;
  }

  .company-icon {
    margin-bottom: 16px;
  }

  .company-hero h1 {
    font-size: 24px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .content-card,
  .side-card {
    padding: 17px;
    border-radius: 18px;
  }

 
  .updated-time {
    display: inline-block;
    margin-top: 7px;
  }

  .stat-grid {
    gap: 9px;
  }

  .industry-item {
    grid-template-columns: 50px 1fr;
    padding: 14px;
  }
}

.score-circle {
  background: conic-gradient(var(--primary) 0 var(--score, 70%), #dce7e8 var(--score, 70%) 100%);
}

.related-list-main {
  margin-top: 0;
}

.related-list-main a {
  padding: 13px 0;
}

.related-list-main a:first-child {
  padding-top: 0;
}

.status-badge.inactive,
.status-badge.stopped,
.status-badge.closed {
  color: #ffe2e2;
  background: rgba(220, 53, 69, .15);
  border-color: rgba(255, 160, 170, .24);
}

.status-badge.inactive i,
.status-badge.stopped i,
.status-badge.closed i {
  background: #ff7b88;
}

@media (max-width: 720px) {
  .section-header {
    display: block;
  }

  .updated-time {
    display: block;
    margin-top: 6px;
  }
}


/* SEO/GEO content blocks */
.company-hero {
  position: relative;
  overflow: hidden;
}

.company-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -120px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}

.company-heading,
.company-main {
  position: relative;
  z-index: 1;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #d8f7f4;
  font-size: 12px;
  font-weight: 700;
}

.hero-meta-item.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #51dd8f;
}

.hero-meta-item.status.inactive::before,
.hero-meta-item.status.stopped::before,
.hero-meta-item.status.closed::before {
  background: #ff7b88;
}

.hero-summary {
  max-width: 850px;
  margin: 14px 0 0;
  color: #e4f2f1;
  font-size: 14px;
  line-height: 1.65;
}

.entity-summary {
  padding: 20px 22px;
  border: 1px solid #cfe5e2;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f4fbfa, #fff);
  box-shadow: 0 8px 24px rgba(31,49,57,.035);
}

.entity-summary h2 {
  margin: 0 0 9px;
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -.015em;
}

.entity-summary p {
  margin: 0;
  color: #34444f;
  font-size: 14px;
  line-height: 1.75;
}

.entity-summary strong {
  color: #20323b;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--muted);
}

.breadcrumb [aria-current="page"] {
  color: #43545e;
  font-weight: 700;
}

.content-card[id] {
  scroll-margin-top: 88px;
}

.stock-company + .stock-company {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.stock-company h3 {
  margin: 0 0 12px;
  color: #263a43;
  font-size: 16px;
  line-height: 1.45;
}

.industry-name {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.5;
}

.source-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.info-row a,
.industry-name a,
.related-list a {
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

.info-row a:hover,
.industry-name a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(20,125,116,.3);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .hero-summary {
    font-size: 13px;
  }

  .entity-summary {
    padding: 17px;
  }
}
/* SEO/GEO refinement: compact entity summary and listed-company signal */
.stock-chip {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .14);
}

.stock-chip:hover {
  background: rgba(255, 255, 255, .2);
}

.summary-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-facts li {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.summary-facts span,
.summary-facts strong {
  display: block;
}

.summary-facts span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.summary-facts strong {
  overflow-wrap: anywhere;
  color: #20323b;
  font-size: 13px;
  line-height: 1.45;
}

.summary-address {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 960px) {
  .summary-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .summary-facts {
    grid-template-columns: 1fr;
  }
}



/*nnt*/
/* Compact industries section */
.industries-card {
  padding: 22px;
}

.industries-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.industries-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.industries-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Main registered industry */
.main-industry {
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid #bfe3df;
  border-radius: 12px;
  background: var(--primary-soft);
}

.main-industry-label {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.main-industry-content {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.main-industry .industry-code {
  width: auto;
  min-width: 52px;
  height: auto;
  padding: 5px 8px;
  border: 1px solid rgba(20, 125, 116, .14);
  border-radius: 7px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.main-industry h3 {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.main-industry h3 a {
  color: #20323b;
  text-decoration: none;
}

.main-industry h3 a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Other registered industries */
.compact-industry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.compact-industry-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #2c3d46;
  text-decoration: none;
  transition:
    border-color .15s ease,
    background-color .15s ease,
    color .15s ease;
}

.compact-industry-item:hover {
  border-color: #b9dcd8;
  background: #f5fbfa;
  color: var(--primary);
}

.compact-industry-code {
  flex: 0 0 auto;
  min-width: 43px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.compact-industry-name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Expand remaining industries */
.more-industries {
  display: grid;
  margin-top: 10px;
}

/* Nút xem thêm mặc định nằm trên danh sách ẩn */
.more-industries > summary {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 8px 2px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

/* Danh sách ngành nghề mở rộng */
.more-industries > .compact-industry-list {
  grid-row: 2;
}

/* Ẩn marker mặc định */
.more-industries > summary::-webkit-details-marker {
  display: none;
}

.more-industries > summary::marker {
  content: "";
}

/* Mũi tên */
.more-industries > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}

/* Nội dung nút mặc định */
.more-industries > summary .open-text {
  display: inline;
}

.more-industries > summary .close-text {
  display: none;
}

/*
 * Khi mở:
 * - danh sách mở rộng nằm ở hàng đầu
 * - summary chuyển xuống hàng cuối
 */
.more-industries[open] > .compact-industry-list {
  grid-row: 1;
}

.more-industries[open] > summary {
  grid-row: 2;
  margin: 11px 0 0;
  padding: 11px 8px 0;
  border-top: 1px solid var(--line);
}

/* Đổi nội dung nút */
.more-industries[open] > summary .open-text {
  display: none;
}

.more-industries[open] > summary .close-text {
  display: inline;
}

/* Đổi hướng mũi tên */
.more-industries[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.more-industries > summary:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.more-industries > summary:focus-visible {
  outline: 3px solid rgba(20, 125, 116, .25);
  outline-offset: 3px;
  border-radius: 7px;
}

@media (max-width: 720px) {
  .industries-card {
    padding: 17px;
  }

  .industries-header {
    align-items: flex-start;
    margin-bottom: 13px;
  }

  .compact-industry-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .compact-industry-item {
    padding: 9px;
  }
}

@media (max-width: 480px) {
  .industries-header h2 {
    font-size: 18px;
  }

  .main-industry {
    padding: 12px;
  }

  .main-industry-content {
    align-items: flex-start;
  }

  .compact-industry-name {
    -webkit-line-clamp: 3;
  }
}


.phongthuy-card,
.phongthuy-card * {
    box-sizing: border-box;
}

.phongthuy-card {
    overflow: hidden;
}

.phongthuy-header {
    padding-bottom: 4px;
}

.phongthuy-header h2 {
    margin: 5px 0 0;
}

.phongthuy-intro {
    max-width: 780px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.phongthuy-module {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.phongthuy-module-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.phongthuy-module-header h3 {
    margin: 3px 0 0;
    font-size: 19px;
    line-height: 1.4;
}

.phongthuy-module-kicker,
.phongthuy-year-content-kicker {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}


/* Ngũ Hành: phần tổng quan đặt trước Kinh Dịch */
.nguhanh-layout {
    display: grid;
    grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
    gap: clamp(24px, 4vw, 44px);
    align-items: start;
    margin-top: 18px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.nguhanh-overview {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    min-width: 0;
}

.nguhanh-main-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border: 1px solid currentColor;
    color: #6b6254;
    background: transparent;
}

.nguhanh-main-symbol span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 43px;
    line-height: 1;
}

.nguhanh-main-symbol--kim {
    color: #8b7d62;
}

.nguhanh-main-symbol--moc {
    color: #557a4a;
}

.nguhanh-main-symbol--thuy {
    color: #4d7180;
}

.nguhanh-main-symbol--hoa {
    color: #a54e35;
}

.nguhanh-main-symbol--tho {
    color: #92713f;
}

.nguhanh-main-content {
    min-width: 0;
}

.nguhanh-label,
.nguhanh-distribution-header span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.nguhanh-main-content h4 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0 8px;
    color: var(--text);
    font-size: 27px;
    line-height: 1.2;
}

.nguhanh-main-content h4 small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.nguhanh-main-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.nguhanh-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.nguhanh-keywords li {
    position: relative;
    padding-left: 10px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.nguhanh-keywords li::before {
    position: absolute;
    top: .62em;
    left: 0;
    width: 3px;
    height: 3px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
}

.nguhanh-distribution {
    min-width: 0;
}

.nguhanh-distribution-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
}

.nguhanh-distribution-header strong {
    color: var(--text);
    font-size: 13px;
}

.nguhanh-bars {
    margin-top: 12px;
}

.nguhanh-bar-row + .nguhanh-bar-row {
    margin-top: 11px;
}

.nguhanh-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
}

.nguhanh-bar-label span,
.nguhanh-bar-label strong {
    font-size: 12px;
}

.nguhanh-bar-label strong {
    color: var(--text);
}

.nguhanh-bar-track {
    position: relative;
    height: 7px;
    overflow: hidden;
    background: color-mix(in srgb, var(--line) 60%, transparent);
}

.nguhanh-bar-fill {
    display: block;
    height: 100%;
    min-width: 0;
}

.nguhanh-bar-fill--kim {
    background: #8b7d62;
}

.nguhanh-bar-fill--moc {
    background: #557a4a;
}

.nguhanh-bar-fill--thuy {
    background: #4d7180;
}

.nguhanh-bar-fill--hoa {
    background: #a54e35;
}

.nguhanh-bar-fill--tho {
    background: #92713f;
}

.nguhanh-bar-row small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.nguhanh-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 16px 0 0;
    border-bottom: 1px solid var(--line);
}

.nguhanh-summary > div {
    min-width: 0;
    padding: 0 16px 13px;
}

.nguhanh-summary > div:first-child {
    padding-left: 0;
}

.nguhanh-summary > div + div {
    border-left: 1px solid var(--line);
}

.nguhanh-summary dt,
.nguhanh-relations dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.nguhanh-summary dd,
.nguhanh-relations dd {
    margin: 0;
    overflow-wrap: anywhere;  
    font-size: 14px;
    font-weight: 700;
}

.nguhanh-analysis {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
    gap: clamp(22px, 4vw, 42px);
    margin-top: 18px;
}

.nguhanh-analysis-text {
    min-width: 0;
}

.nguhanh-analysis-text p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.nguhanh-analysis-text .nguhanh-summary-text {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
}

.nguhanh-relations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.nguhanh-relations > div {
    min-width: 0;
    padding: 11px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.nguhanh-relation-value {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.nguhanh-relation-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    border: 1px solid currentColor;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    line-height: 1;
}

.nguhanh-relation-value--kim {
    color: #8b7d62;
}

.nguhanh-relation-value--moc {
    color: #557a4a;
}

.nguhanh-relation-value--thuy {
    color: #4d7180;
}

.nguhanh-relation-value--hoa {
    color: #a54e35;
}

.nguhanh-relation-value--tho {
    color: #92713f;
}


/* Kinh Dịch: bố cục phẳng, phân cách bằng đường kẻ */
.kinhdich-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 0;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.kinhdich-panel {
    min-width: 0;
    padding: 18px 20px;
    background: transparent;
}

.kinhdich-panel + .kinhdich-panel {
    border-left: 1px solid var(--line);
}

.kinhdich-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.kinhdich-panel-header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.kinhdich-panel-header strong {
    text-align: right;
    font-size: 16px;
    line-height: 1.4;
}

.bagua-wrap,
.hexagram-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 290px;
    overflow: hidden;
    background: transparent;
}

.bagua-svg,
.hexagram-svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.bagua-svg {
    width: min(100%, 370px);
}

.hexagram-svg {
    width: 145px;
    color: var(--text);
}

.hexagram-line {
    fill: currentColor;
}

.hexagram-line--changing,
.hexagram-change-mark {
    fill: #a84620;
}

.bagua-ring {
    fill: none;
    stroke: #d5c39a;
    stroke-width: 2;
    stroke-dasharray: 5 7;
}

.bagua-center {
    stroke: #d5c39a;
    stroke-width: 1.5;
}

.yinyang-outline {
    fill: #fff;
    stroke: #202020;
    stroke-width: 2;
}

.yinyang-dark {
    fill: #202020;
}

.yinyang-light {
    fill: #fff;
}

.bagua-item-bg {
    fill: transparent;
    stroke: var(--line);
    stroke-width: 1;
}

.bagua-symbol {
    fill: var(--text);
    font-size: 28px;
    font-weight: 700;
}

.bagua-name {
    fill: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.bagua-role {
    fill: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.bagua-item--upper .bagua-item-bg {
    fill: #fff9ed;
    stroke: #bd8129;
    stroke-width: 2;
}

.bagua-item--lower .bagua-item-bg {
    fill: #f1f8f6;
    stroke: #2d7d73;
    stroke-width: 2;
}

.bagua-item--both .bagua-item-bg {
    fill: #f7f2fb;
    stroke: #79548e;
    stroke-width: 2;
}

.bagua-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
}

.bagua-legend > span {
    padding-bottom: 3px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.bagua-legend strong {
    color: var(--text);
}

.bagua-legend-upper {
    border-color: #bd8129 !important;
}

.bagua-legend-lower {
    border-color: #2d7d73 !important;
}

.kinhdich-result {
    margin-top: 14px;
}

.kinhdich-result .rating-pill {
    border-radius: 2px;
}

.kinhdich-result p,
.kinhdich-change-desc {
    color: var(--muted);
    line-height: 1.7;
}

.kinhdich-change {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 18px 0 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.kinhdich-change > div {
    min-width: 0;
    padding: 13px 16px;
}

.kinhdich-change > div + div {
    border-left: 1px solid var(--line);
}

.kinhdich-change dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.kinhdich-change dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

/* Xu hướng năm: dạng bản in / lá quẻ, không dùng card bo tròn */
.phongthuy-year-layout {
    display: grid;
    grid-template-columns: minmax(285px, 370px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 42px);
    align-items: start;
    margin-top: 18px;
}

.phongthuy-year-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 26px 22px 22px;
    border: 1px solid #b79243;
    border-radius: 0;
    background:
        linear-gradient(rgba(255,255,255,.58), rgba(255,255,255,.58)),
        repeating-linear-gradient(
            0deg,
            rgba(116, 86, 25, .035) 0,
            rgba(116, 86, 25, .035) 1px,
            transparent 1px,
            transparent 5px
        ),
        #f5ecd8;
    box-shadow: none;
    text-align: center;
}

.phongthuy-year-card::before,
.phongthuy-year-card::after {
    position: absolute;
    left: 18px;
    right: 18px;
    height: 1px;
    background: rgba(138, 100, 29, .36);
    content: "";
}

.phongthuy-year-card::before {
    top: 16px;
}

.phongthuy-year-card::after {
    bottom: 16px;
}

.phongthuy-year-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #89651d;
    font-size: 12px;
}

.phongthuy-year-ornament span:nth-child(2) {
    font-size: 23px;
}

.phongthuy-year-eyebrow {
    margin: 9px 0 0;
    color: #765719;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.phongthuy-year-number {
    margin: 7px 0 8px;
    color: #30240f;
    font-size: clamp(31px, 4vw, 42px);
    font-weight: 800;
    line-height: 1;
}

.phongthuy-year-rating {
    display: inline-block;
    padding: 5px 11px;
    border-top: 1px solid #9d7427;
    border-bottom: 1px solid #9d7427;
    border-radius: 0;
    background: transparent;
    color: #855704;
    font-size: 12px;
    font-weight: 800;
}

.phongthuy-year-cycle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 7px;
    margin: 11px 0 0;
    color: #6c5934;
    font-size: 12px;
}

.phongthuy-year-cycle strong {
    color: #30240f;
}

.phongthuy-year-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px auto 5px;
}

.phongthuy-year-symbol svg {
    display: block;
    width: min(100%, 220px);
    height: auto;
    filter: none;
}

.year-orbit {
    fill: none;
    stroke: rgba(120, 86, 22, .38);
    stroke-width: 1.2;
    stroke-dasharray: 3 6;
}

.year-orbit--outer {
    stroke-width: 1;
    stroke-dasharray: 2 8;
    transform-origin: center;
    animation: phongthuyOrbit 70s linear infinite;
}

.year-core {
    fill: rgba(255, 255, 255, .46);
    stroke: #a97b24;
    stroke-width: 1.5;
}

.year-symbol-main {
    fill: #3e3018;
    font-size: 38px;
    text-anchor: middle;
}

.year-symbol-number {
    fill: #946610;
    font-size: 20px;
    font-weight: 800;
    text-anchor: middle;
}

.year-bagua {
    fill: #654b18;
    font-size: 18px;
    font-weight: 700;
    text-anchor: middle;
}

.phongthuy-year-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 10px 0 0;
    border-top: 1px solid rgba(133, 95, 25, .35);
    border-bottom: 1px solid rgba(133, 95, 25, .35);
}

.phongthuy-year-meta > div {
    min-width: 0;
    padding: 10px 8px;
}

.phongthuy-year-meta > div + div {
    border-left: 1px solid rgba(133, 95, 25, .35);
}

.phongthuy-year-meta dt {
    margin-bottom: 4px;
    color: #756541;
    font-size: 10px;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.phongthuy-year-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #30240f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.phongthuy-year-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 14px;
    margin: 13px 0 0;
    padding: 0;
    list-style: none;
}

.phongthuy-year-keywords li {
    position: relative;
    padding-left: 10px;
    color: #654b18;
    font-size: 11px;
    font-weight: 700;
}

.phongthuy-year-keywords li::before {
    position: absolute;
    top: .6em;
    left: 0;
    width: 3px;
    height: 3px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
}

.phongthuy-year-content {
    min-width: 0;
    padding-top: 3px;
}

.phongthuy-year-summary {
    max-width: 760px;
    margin: 8px 0 11px;
    color: var(--text);
    font-size: 19px;
    font-weight: 750;
    line-height: 1.5;
}

.phongthuy-year-description {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.phongthuy-year-note,
.phongthuy-year-advice {
    margin-top: 18px;
    padding: 0 0 0 16px;
    border: 0;
    border-left: 3px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.phongthuy-year-note {
    border-left-color: #6f887f;
}

.phongthuy-year-advice {
    border-left-color: #b18a3b;
}

.phongthuy-year-note > span,
.phongthuy-year-advice > span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.phongthuy-year-note h4 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 15px;
}

.phongthuy-year-note p,
.phongthuy-year-advice p {
    margin: 0;
    color: var(--muted);
    line-height: 1.68;
}

.phongthuy-disclaimer {
    margin-top: 26px;
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.phongthuy-disclaimer strong {
    color: var(--text);
}

@keyframes phongthuyOrbit {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 820px) {
    .nguhanh-layout,
    .nguhanh-analysis,
    .kinhdich-dashboard,
    .phongthuy-year-layout {
        grid-template-columns: 1fr;
    }

    .kinhdich-panel + .kinhdich-panel {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .phongthuy-year-card {
        width: min(100%, 410px);
        margin-inline: auto;
    }
}

@media (max-width: 580px) {
    .phongthuy-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .phongthuy-header h2 {
        font-size: 21px;
        line-height: 1.35;
    }

    .phongthuy-intro {
        font-size: 14px;
        line-height: 1.6;
    }

    .phongthuy-module {
        margin-top: 21px;
        padding-top: 18px;
    }

    .phongthuy-module-header h3 {
        font-size: 17px;
    }

    .nguhanh-layout {
        gap: 18px;
        margin-top: 14px;
        padding: 16px 0;
    }

    .nguhanh-overview {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 14px;
    }

    .nguhanh-main-symbol {
        width: 74px;
        height: 74px;
    }

    .nguhanh-main-symbol span {
        font-size: 34px;
    }

    .nguhanh-main-content h4 {
        margin-top: 2px;
        font-size: 23px;
    }

    .nguhanh-main-content p,
    .nguhanh-analysis-text p {
        font-size: 14px;
        line-height: 1.62;
    }

    .nguhanh-summary {
        grid-template-columns: 1fr;
        margin-top: 14px;
    }

    .nguhanh-summary > div {
        display: grid;
        grid-template-columns: 115px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }

    .nguhanh-summary > div + div {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .nguhanh-summary dt {
        margin: 0;
    }

    .nguhanh-summary dd {
        text-align: right;
    }

    .nguhanh-analysis {
        gap: 16px;
        margin-top: 16px;
    }

    .nguhanh-relations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nguhanh-relation-symbol {
        width: 21px;
        height: 21px;
        flex-basis: 21px;
        font-size: 13px;
    }

    .kinhdich-dashboard {
        margin-top: 14px;
    }

    .kinhdich-panel {
        padding: 15px 0;
    }

    .kinhdich-panel-header strong {
        max-width: 65%;
        font-size: 14px;
    }

    .bagua-wrap,
    .hexagram-wrap {
        min-height: 225px;
    }

    .bagua-svg {
        width: min(100%, 280px);
    }

    .hexagram-svg {
        width: 122px;
    }

    .kinhdich-change {
        grid-template-columns: 1fr;
        margin-top: 14px;
    }

    .kinhdich-change > div {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 11px 0;
    }

    .kinhdich-change > div + div {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .kinhdich-change dt {
        margin: 0;
    }

    .kinhdich-change dd {
        text-align: right;
        font-size: 14px;
    }

    .phongthuy-year-layout {
        gap: 19px;
        margin-top: 14px;
    }

    .phongthuy-year-card {
        width: 100%;
        padding: 23px 14px 20px;
    }

    .phongthuy-year-card::before,
    .phongthuy-year-card::after {
        left: 12px;
        right: 12px;
    }

    .phongthuy-year-number {
        font-size: 31px;
    }

    .phongthuy-year-symbol svg {
        width: min(100%, 186px);
    }

    .phongthuy-year-summary {
        margin-top: 6px;
        font-size: 16px;
        line-height: 1.5;
    }

    .phongthuy-year-description,
    .phongthuy-year-note p,
    .phongthuy-year-advice p {
        font-size: 14px;
        line-height: 1.62;
    }

    .phongthuy-year-note,
    .phongthuy-year-advice {
        margin-top: 15px;
        padding-left: 12px;
    }

    .phongthuy-disclaimer {
        margin-top: 22px;
    }
}

@media (max-width: 360px) {
    .phongthuy-card {
        padding-left: 11px;
        padding-right: 11px;
    }

    .phongthuy-year-meta {
        grid-template-columns: 1fr;
    }

    .nguhanh-overview {
        grid-template-columns: 1fr;
    }

    .nguhanh-main-symbol {
        width: 68px;
        height: 68px;
    }

    .nguhanh-relations {
        grid-template-columns: 1fr;
    }

    .phongthuy-year-meta > div + div {
        border-top: 1px solid rgba(133, 95, 25, .35);
        border-left: 0;
    }

    .phongthuy-year-symbol svg {
        width: 174px;
    }

    .bagua-legend {
        flex-direction: column;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .year-orbit--outer {
        animation: none;
    }
}
