/* ==========================================================================
   JUHONG ACRYLIC · AI INTELLIGENCE WORKBENCH (2026-12-01 Visual Redesign)
   Cohesive Minimal Luxury / Material Editorial aesthetic with web.jhxcl.com.cn
   ========================================================================== */

:root {
  --obsidian: #141412;
  --obsidian-2: #1d1d1a;
  --ivory: #fbfaf7;
  --parchment: #f2efe9;
  --parchment-deep: #e8e3da;
  --bronze: #8b6d40;
  --bronze-light: #d7bd8f;
  --bronze-soft: rgba(139, 109, 64, 0.1);
  --ink: #1a1916;
  --muted: #6c665d;
  --line: #dbd5ca;
  --line-strong: #c6beb1;
}

body {
  background: var(--parchment);
  color: var(--ink);
  font-feature-settings: "tnum" 1;
}

/* 1. Architectural Sticky Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 60px;
  padding-inline: max(28px, calc((100vw - 1400px) / 2));
  border-bottom: 1px solid rgba(255, 253, 248, 0.1);
  background: rgba(20, 20, 18, 0.94);
  backdrop-filter: blur(14px);
  color: #f7f4ee;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-header .wordmark {
  color: #fbfaf7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-divider {
  width: 1px;
  height: 14px;
  background: rgba(215, 189, 143, 0.35);
}

.brand-sub {
  color: var(--bronze-light);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

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

.header-nav button,
.header-nav a {
  appearance: none;
  border: 0;
  border-radius: 3px;
  padding: 7px 12px;
  background: transparent;
  color: rgba(247, 244, 238, 0.72);
  font: 500 12.5px/1.2 var(--font-sans, inherit);
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.header-nav button:hover,
.header-nav a:hover,
.header-nav button.is-active {
  color: #fffdf8;
  background: rgba(255, 253, 248, 0.08);
}

.header-nav button.is-active {
  color: var(--bronze-light);
}

.site-header .header-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.site-header .header-meta > .eyebrow {
  display: none;
}

.site-header .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 253, 248, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.05);
  color: #e6e1d8;
  font-size: 11.5px;
  white-space: nowrap;
}

.site-header .status-pill.online i {
  background: #67b98f;
  box-shadow: 0 0 0 3px rgba(103, 185, 143, 0.2);
}

/* 2. Compact Above-the-Fold Executive Command Banner
   -------------------------------------------------------------------------- */
main {
  width: min(1400px, calc(100% - 56px));
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.62fr);
  align-items: stretch;
  gap: 0;
  padding: 20px 0 0;
  margin-bottom: 18px;
}

.intro-statement {
  grid-area: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  padding: 20px 32px;
  border: 1px solid #2a2925;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background:
    radial-gradient(circle at 88% 18%, rgba(215, 189, 143, 0.11), transparent 52%),
    linear-gradient(135deg, #161614 0%, #1f1e1b 100%);
  color: #fbfaf7;
}

.intro-statement > .eyebrow {
  margin: 0 0 8px;
  color: var(--bronze-light);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.intro h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  max-width: none;
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
  font-size: clamp(24px, 2.2vw, 31px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fffdf8;
}

.intro h1 em {
  margin-top: 0;
  color: #cfc6b5;
  font-style: normal;
}

.intro-copy {
  max-width: 660px;
  margin: 8px 0 0;
  color: rgba(235, 230, 221, 0.76);
  font-size: 12.5px;
  line-height: 1.65;
}

.intro-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 10px 28px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 253, 248, 0.1);
}

.intro-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.intro-metric small {
  color: rgba(215, 189, 143, 0.78);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.intro-metric strong {
  color: #fffdf8;
  font-size: 13px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.intro-entry {
  display: none;
}

.intro-artwork {
  grid-area: auto;
  position: relative;
  min-height: 156px;
  max-height: 208px;
  border: 1px solid #2a2925;
  border-left: 1px solid rgba(215, 189, 143, 0.18);
  border-radius: 0 4px 4px 0;
  background: #181816;
  box-shadow: none;
}

.intro-artwork img {
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 48%;
}

.intro-artwork::after {
  background:
    linear-gradient(90deg, rgba(22, 22, 20, 0.56) 0%, rgba(22, 22, 20, 0.12) 38%, transparent 100%),
    linear-gradient(180deg, rgba(16, 17, 16, 0.08) 0%, rgba(16, 17, 16, 0.68) 100%);
}

.intro-artwork figcaption {
  right: 18px;
  bottom: 14px;
  gap: 2px;
}

.intro-artwork figcaption span {
  font-size: 16px;
}

.intro-artwork figcaption strong {
  font-size: 7.5px;
  letter-spacing: 0.16em;
  opacity: 0.85;
}

.intro-artwork > i {
  top: 12px;
  right: 14px;
  color: rgba(255, 253, 248, 0.65);
  font-size: 10px;
}

/* 3. Studio Workbench Shell (Immediately Above the Fold!)
   -------------------------------------------------------------------------- */
.workspace {
  padding: 0 0 36px;
  border-top: 0;
}

.chat-panel {
  min-height: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 20px 26px 24px;
  background: var(--ivory);
  box-shadow: 0 18px 46px rgba(34, 29, 22, 0.07);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  padding-bottom: 14px;
}

.chat-panel .eyebrow {
  margin: 0 0 4px;
  color: var(--bronze);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.panel-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.panel-head-actions .data-note {
  margin: 0;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--parchment);
  font-size: 12px;
  color: #5b554c;
}

.dify-popout-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #fff;
  color: #554835;
  font-size: 12px;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.dify-popout-link:hover {
  border-color: var(--bronze);
  background: #f7f1e6;
  color: var(--ink);
}

/* 4-Tab Studio Bar */
.view-switch {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: auto;
  margin-top: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 12px;
  color: #625c53;
  font-size: 14.5px;
  font-weight: 560;
  letter-spacing: 0.03em;
  transition: color 160ms ease, background-color 160ms ease;
}

.view-switch button em {
  color: #9e8c70;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.view-switch button:hover {
  color: var(--ink);
  background: rgba(139, 109, 64, 0.05);
}

.view-switch button[aria-selected="true"] {
  color: var(--ink);
  font-weight: 650;
}

.view-switch button[aria-selected="true"] em {
  color: var(--bronze);
}

.view-switch button[aria-selected="true"]::after {
  height: 2px;
  background: var(--bronze);
}

/* Seamless Dify Iframe Frame */
.dify-fallback {
  min-height: min(740px, calc(100vh - 200px));
  margin-top: 16px;
  border: 1px solid #e1dad0;
  border-radius: 4px;
  background: var(--ivory);
  box-shadow: none;
}

.dify-fallback iframe {
  min-height: min(740px, calc(100vh - 200px));
  background: var(--ivory);
}

/* 4. Stock Table & Weight Calculator Refinement
   -------------------------------------------------------------------------- */
.stock-results-table {
  font-variant-numeric: tabular-nums;
}

.stock-results-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ece7de;
  color: #3d3831;
  font-weight: 600;
}

.stock-results-table tbody tr {
  transition: background-color 120ms ease;
}

.weight-result {
  border: 1px solid #2b2a26;
  background: linear-gradient(135deg, #1b1b18, #252420);
  color: #f7f4ee;
}

.weight-result-grid small {
  color: rgba(215, 189, 143, 0.8);
}

.weight-result-grid strong {
  color: #fffdf8;
  font-variant-numeric: tabular-nums;
}

.weight-result-grid .weight-total strong {
  color: var(--bronze-light);
}

.weight-disclaimer {
  color: #c7c1b6;
}

.weight-disclaimer strong {
  color: #f2a99c;
}

/* 5. Progressive 2-Tier Filter Bar for Product Image Archive
   -------------------------------------------------------------------------- */
.color-card-filter-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f5f2eb;
}

.color-card-primary-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) minmax(150px, 1.05fr) repeat(2, minmax(125px, 0.9fr)) auto;
  gap: 12px;
  align-items: end;
}

.color-card-primary-row > *,
.color-card-advanced-grid > * {
  grid-column: auto !important;
}

.color-card-primary-row label,
.color-card-advanced-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.color-card-advanced {
  border-top: 1px solid #dfd9ce;
  padding-top: 12px;
}

.color-card-advanced > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  color: #5b5142;
  font-size: 12.5px;
  font-weight: 600;
  user-select: none;
}

.color-card-advanced > summary::-webkit-details-marker {
  display: none;
}

.color-card-advanced > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #fff;
  color: var(--bronze);
  font-size: 13px;
  line-height: 1;
}

.color-card-advanced[open] > summary::before {
  content: "−";
  border-color: var(--bronze);
  background: var(--bronze);
  color: #fff;
}

.color-card-advanced > summary small {
  color: #877f73;
  font-size: 11.5px;
  font-weight: 400;
}

.color-card-advanced-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.color-card-result {
  border-color: #dcd5c9;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.color-card-result:hover {
  transform: translateY(-2px);
  border-color: var(--bronze);
  box-shadow: 0 12px 26px rgba(34, 29, 22, 0.1);
}

/* 6. CSP-Safe Material Slides (Fixes all 5 style-src console errors!)
   -------------------------------------------------------------------------- */
.material-slide-0 {
  --material-image: url('/assets/materials/decor-tortoiseshell.jpg');
  --material-blend: multiply;
}
.material-slide-1 {
  --material-image: url('/assets/materials/decor-brushed.jpg');
  --material-blend: multiply;
}
.material-slide-2 {
  --material-image: url('/assets/materials/decor-stone.jpg');
  --material-blend: multiply;
}
.material-slide-3 {
  --material-image: url('/assets/materials/decor-color-rods.jpg');
  --material-blend: normal;
}
.material-slide-4 {
  --material-image: url('/assets/materials/decor-nezha.jpg');
  --material-blend: multiply;
}

/* Tighter, Balanced Side Rail Utility Band */
.side-rail {
  gap: 20px;
  margin-top: 22px;
}

.rail-section {
  min-height: 248px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: var(--ivory);
}

.inventory-card {
  min-height: 248px;
  border: 1px solid #2b2a26;
  background: linear-gradient(135deg, #161614, #22211e);
}

.inventory-body {
  padding: 24px 26px;
}

.material-feature {
  height: 340px;
}

.material-copy {
  padding: 28px 34px;
}

.material-copy h2 {
  font-size: clamp(24px, 2.2vw, 32px);
}

/* 7. Interactive 4x2 Editorial Quick Guide Grid
   -------------------------------------------------------------------------- */
.usage-guide {
  margin: 0 0 64px;
  padding: 36px 0 0;
  border-top: 1px solid var(--line-strong);
}

.usage-guide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
}

.usage-guide-head h2 {
  margin: 6px 0 0;
  font-size: 28px;
}

.usage-guide-head > p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.usage-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  border-top: 0;
}

.usage-guide-grid article {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 18px 16px;
  background: var(--ivory);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.usage-guide-grid article:hover {
  border-color: #bfa984;
  box-shadow: 0 8px 22px rgba(34, 29, 22, 0.06);
}

.usage-guide-grid article > span {
  grid-column: auto;
  grid-row: auto;
  color: var(--bronze);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.usage-guide-grid h3 {
  grid-column: auto;
  grid-row: auto;
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}

.usage-guide-grid p {
  grid-column: auto;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.guide-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dcd3c4;
  border-radius: 3px;
  padding: 5px 9px;
  background: #f6f2ea;
  color: #6c532e;
  font: 500 11.5px/1.35 var(--font-sans, inherit);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.guide-chip:hover {
  border-color: var(--bronze);
  background: #efe6d6;
  color: #1a1916;
}

.guide-chip-nav {
  border-color: #2b2a26;
  background: #20201d;
  color: #f7f4ee;
}

.guide-chip-nav:hover {
  border-color: var(--bronze);
  background: var(--bronze);
  color: #fff;
}

/* 8. Obsidian Footer with High-Contrast Logo Plate
   -------------------------------------------------------------------------- */
.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 26px;
  padding: 34px max(28px, calc((100vw - 1400px) / 2));
  border-top: 1px solid #2b2a26;
  background: var(--obsidian);
  color: #a9a296;
}

.footer-logo-plate {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 3px;
  background: var(--ivory);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.site-footer .footer-brand img {
  display: block;
  height: 26px;
  width: auto;
  opacity: 1;
  filter: none;
}

.footer-identity p {
  margin: 0 0 3px;
  color: #fbfaf7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.16em;
}

.footer-identity span {
  font-size: 12px;
  color: #9f988d;
}

/* Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .header-nav {
    display: none;
  }
  .color-card-primary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .color-card-advanced-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .usage-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  main {
    width: min(100% - 28px, 760px);
  }
  .intro {
    grid-template-columns: 1fr;
    padding-top: 14px;
    margin-bottom: 14px;
  }
  .intro-statement {
    border-right: 1px solid #2a2925;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    padding: 20px;
    color: #fbfaf7;
  }
  .intro-statement > .eyebrow {
    color: var(--bronze-light);
  }
  .intro h1 {
    color: #fffdf8;
  }
  .intro h1 em {
    color: #cfc6b5;
  }
  .intro-copy {
    color: rgba(235, 230, 221, 0.78);
  }
  .intro-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
  }
  .intro-artwork {
    min-height: 150px;
    border-left: 1px solid #2a2925;
    border-top: 1px solid rgba(215, 189, 143, 0.18);
    border-radius: 0 0 4px 4px;
  }
  .intro-artwork img {
    aspect-ratio: 16 / 7;
  }
  .chat-panel {
    padding: 16px 14px 18px;
  }
  .panel-head-actions {
    width: 100%;
    justify-content: space-between;
  }
  .color-card-advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 12px;
    min-height: 54px;
  }
  .brand-divider,
  .brand-sub {
    display: none;
  }
  main {
    width: calc(100% - 20px);
  }
  .intro-statement {
    padding: 16px;
  }
  .intro h1 {
    font-size: 22px;
  }
  .intro-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .intro-metric:nth-child(3) {
    grid-column: 1 / -1;
  }
  .view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-bottom: 0;
    padding-bottom: 8px;
  }
  .view-switch button {
    justify-content: center;
    height: 40px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #f6f3ec;
    font-size: 13px;
  }
  .view-switch button[aria-selected="true"] {
    border-color: var(--bronze);
    background: #1a1916;
    color: #fffdf8;
  }
  .view-switch button[aria-selected="true"] em {
    color: var(--bronze-light);
  }
  .view-switch button[aria-selected="true"]::after {
    display: none;
  }
  .color-card-primary-row,
  .color-card-advanced-grid,
  .usage-guide-grid {
    grid-template-columns: 1fr;
  }
  .material-feature {
    height: auto;
  }
  .dify-fallback {
    min-height: min(640px, calc(100svh - 140px));
  }
  .dify-fallback iframe {
    min-height: min(640px, calc(100svh - 140px));
  }
}
