.materials-page {
  min-height: 100vh;
}

.materials-page.dialog-open {
  overflow: hidden;
}

.materials-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.materials-hero,
.materials-toolbar,
.materials-section {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.materials-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 26px;
  padding: 32px;
  border-radius: var(--radius-xl);
}

.materials-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 14%, transparent), transparent 68%);
  pointer-events: none;
}

.materials-hero__topline {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.materials-hero__topline .materials-back {
  grid-column: 1;
  justify-self: start;
}

.materials-hero__topline .materials-brand-logo {
  grid-column: 2;
  justify-self: center;
}

.materials-page .catalog-display-controls {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  grid-column: 3;
  flex-direction: row;
  justify-self: end;
}

.materials-brand-logo {
  display: grid;
  place-items: center;
  min-width: 0;
}

.materials-brand-logo img {
  display: block;
  max-width: min(224px, 28vw);
  max-height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(19, 63, 111, 0.08));
}

.materials-back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 40px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--button-ghost);
  color: var(--brand);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.materials-back:hover {
  transform: translateX(-2px);
  border-color: var(--line-strong);
  background: var(--button-ghost-hover);
}

.materials-back svg,
.materials-card-curve svg,
.materials-card-pdf svg,
.materials-catalog-download svg,
.materials-comparison-download svg,
.materials-comparison-empty svg,
.materials-dialog button svg,
.materials-source-button svg,
.materials-curve-card__open svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.materials-hero__main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}

.materials-hero__copy h1 {
  margin: 0;
  color: color-mix(in srgb, var(--ink) 90%, var(--brand) 10%);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.materials-catalog-download {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 18%, transparent);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.materials-catalog-download:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 70%, #fff);
  background: color-mix(in srgb, var(--brand) 90%, #000);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--brand) 23%, transparent);
}

.materials-catalog-download.is-loading {
  cursor: wait;
  opacity: 0.76;
}

.materials-catalog-download.is-loading svg {
  animation: materials-pdf-loading 900ms linear infinite;
}

.materials-hero__copy p,
.materials-source-note {
  color: var(--muted);
}

.materials-hero__copy p {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.65;
}

.materials-summary {
  display: grid;
  grid-template-columns: minmax(132px, 160px);
  margin: 0;
}

.materials-summary div {
  min-width: 112px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.materials-summary dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.materials-summary dd {
  margin: 6px 0 0;
  color: var(--brand);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.materials-source-note {
  position: relative;
  z-index: 1;
  max-width: 68rem;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.72;
}

.materials-toolbar {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--paper);
}

.materials-toolbar__topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.materials-toolbar__intro {
  display: flex;
  gap: 12px;
  align-items: baseline;
  min-width: 0;
}

.materials-toolbar__intro span {
  color: var(--brand);
  font-size: 18px;
  font-weight: 850;
}

.materials-toolbar__intro strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.materials-selection-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.materials-selection-status > span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
}

.materials-clear-selection {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--button-ghost);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.materials-clear-selection:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.materials-category-row {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--brand-soft) 42%, var(--paper));
}

.materials-family-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.materials-category-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.materials-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding-bottom: 2px;
}

.materials-category-filter {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 15px;
  border: 2px solid color-mix(in srgb, var(--category-color) 86%, var(--line));
  border-radius: 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.materials-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.materials-category-filter {
  border-color: color-mix(in srgb, var(--category-color) 86%, var(--line));
  background: var(--paper);
  color: var(--ink-soft);
  box-shadow: none;
}

.materials-category-filter:hover {
  transform: none;
  border-color: var(--category-color);
  background: color-mix(in srgb, var(--category-color) 8%, var(--paper));
  color: var(--ink);
  box-shadow: none;
}

.materials-category-filter.is-active {
  transform: none;
  border-color: var(--category-color);
  background: var(--category-color);
  color: #fff;
  box-shadow: none;
}

.materials-filter {
  min-width: 54px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--button-ghost);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.materials-filter:hover,
.materials-filter.is-active {
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  background: var(--brand-soft);
  color: var(--brand);
}

.materials-filter:hover {
  transform: translateY(-1px);
}

.materials-browser__selection {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.materials-selection-heading {
  margin-bottom: 16px;
}

.materials-section {
  margin-top: 18px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.materials-section__heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.materials-section__heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.materials-section__heading p {
  max-width: 58rem;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.materials-section__heading .materials-comparison-help {
  margin-top: 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
}

.materials-result-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.materials-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 240px));
  align-items: stretch;
  justify-content: start;
  gap: 10px;
}

.materials-index-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border: 2px solid color-mix(in srgb, var(--category-color, var(--brand)) 84%, var(--line));
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--ink);
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.materials-index-card:hover,
.materials-index-card.is-selected {
  transform: none;
  border-color: var(--category-color, var(--brand));
  box-shadow: none;
}

.materials-index-card:hover:not(.is-selected) {
  background: color-mix(in srgb, var(--category-color, var(--brand)) 6%, var(--surface-soft));
}

.materials-index-card.is-selected {
  border-color: var(--category-color, var(--brand));
  background: var(--category-color, var(--brand));
  color: #fff;
  box-shadow: none;
}

.materials-index-select {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 9px 8px 9px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.materials-index-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.materials-index-copy strong {
  color: var(--brand);
  font-size: 17px;
  line-height: 1;
}

.materials-index-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.materials-index-card.is-selected .materials-index-copy strong,
.materials-index-card.is-selected .materials-index-copy small {
  color: #fff;
}

.materials-card-actions {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-self: stretch;
  gap: 0;
  width: 34px;
  margin: 6px 6px 6px 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--category-color, var(--brand)) 56%, var(--line));
  border-radius: 10px;
  background: var(--paper);
}

.materials-card-curve,
.materials-card-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 34px;
  min-width: 34px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
}

.materials-card-actions .materials-card-pdf {
  border-top: 1px solid color-mix(in srgb, var(--category-color, var(--brand)) 35%, var(--line));
}

.materials-card-curve:hover,
.materials-card-pdf:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--brand-soft);
}

.materials-card-curve.is-unavailable {
  border-color: var(--line);
  background: var(--button-ghost);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.62;
}

.materials-index-card.is-selected .materials-card-curve,
.materials-index-card.is-selected .materials-card-pdf {
  border-color: color-mix(in srgb, #fff 38%, transparent);
  background: transparent;
  color: #fff;
}

.materials-index-card.is-selected .materials-card-actions {
  border-color: color-mix(in srgb, #fff 48%, transparent);
  background: color-mix(in srgb, #fff 10%, transparent);
}

.materials-index-card.is-selected .materials-card-actions .materials-card-pdf {
  border-top-color: color-mix(in srgb, #fff 34%, transparent);
}

.materials-index-card.is-selected .materials-card-curve:hover,
.materials-index-card.is-selected .materials-card-pdf:hover {
  border-color: #fff;
  background: #fff;
  color: var(--category-color, var(--brand));
}

.materials-index-card.is-selected .materials-card-curve.is-unavailable {
  border-color: color-mix(in srgb, #fff 28%, transparent);
  background: color-mix(in srgb, #fff 8%, transparent);
  color: #fff;
  opacity: 0.58;
}

.materials-card-pdf.is-loading {
  cursor: wait;
  opacity: 0.7;
}

.materials-card-pdf.is-loading svg {
  animation: materials-pdf-loading 900ms linear infinite;
}

@keyframes materials-pdf-loading {
  to {
    transform: rotate(360deg);
  }
}

.materials-tables {
  display: grid;
  gap: 18px;
}

.materials-comparison-empty {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 128px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
}

.materials-comparison-empty svg {
  width: 34px;
  height: 34px;
  color: var(--brand);
}

.materials-comparison-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.materials-comparison-empty p {
  margin: 6px 0 0;
  font-size: 13px;
}

.materials-comparison-sources {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.materials-comparison-table thead th strong,
.materials-comparison-table thead th span {
  display: block;
}

.materials-comparison-table thead th span {
  max-width: 140px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  white-space: normal;
}

.materials-comparison-material {
  min-width: 128px;
}

.materials-comparison-material__title {
  min-width: 0;
}

.materials-comparison-baseline-button {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  max-width: 100%;
  margin: -3px -4px 0;
  padding: 3px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.materials-comparison-baseline-button:hover {
  background: color-mix(in srgb, var(--brand) 9%, transparent);
}

.materials-comparison-baseline-button:focus-visible,
.materials-value-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.materials-baseline-tag {
  display: inline-flex !important;
  align-items: center;
  width: max-content;
  max-width: none !important;
  margin: 0 !important;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--paper));
  color: var(--accent) !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.materials-comparison-actions {
  display: inline-flex;
  width: max-content;
  gap: 0;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
}

.materials-comparison-actions .materials-card-curve,
.materials-comparison-actions .materials-card-pdf {
  width: 25px;
  min-width: 25px;
  height: 24px;
  min-height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.materials-comparison-actions .materials-card-pdf {
  border-left: 1px solid var(--line);
}

.materials-comparison-actions .materials-card-curve:hover,
.materials-comparison-actions .materials-card-pdf:hover {
  background: var(--button-ghost-hover);
}

.materials-comparison-actions .materials-card-curve svg,
.materials-comparison-actions .materials-card-pdf svg {
  width: 15px;
  height: 15px;
}

.materials-comparison-download {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.materials-comparison-export-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.materials-comparison-download--csv {
  background: var(--paper);
}

.materials-comparison-download:hover {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line));
  background: color-mix(in srgb, var(--brand) 13%, var(--paper));
}

.materials-comparison-download svg {
  display: block;
  width: 16px;
  height: 16px;
}

.materials-comparison-download.is-loading {
  cursor: wait;
  opacity: 0.72;
}

.materials-comparison-download.is-loading svg {
  animation: materials-pdf-loading 900ms linear infinite;
}

.materials-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-card);
}

.materials-table-card__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.materials-table-card__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.25;
}

.materials-table-card__header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.materials-source-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  max-width: 100%;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--button-ghost);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.materials-source-button:hover {
  border-color: var(--line-strong);
  background: var(--button-ghost-hover);
}

.materials-table-wrap {
  overflow: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.materials-data-note {
  margin: 0;
  padding: 11px 18px 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--brand-soft) 38%, var(--surface-card));
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.materials-data-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.materials-data-table th,
.materials-data-table td {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.materials-data-table th:last-child,
.materials-data-table td:last-child {
  border-right: 0;
}

.materials-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.materials-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--table-head);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.materials-data-table th:first-child,
.materials-data-table .materials-property-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 190px;
  max-width: 220px;
  background: var(--table-first);
}

.materials-data-table thead th:first-child {
  z-index: 4;
  background: var(--table-head);
}

.materials-data-table tbody tr:hover td {
  background: color-mix(in srgb, var(--brand) 5%, var(--surface-card));
}

.materials-data-table tbody tr:hover .materials-property-cell {
  background: color-mix(in srgb, var(--brand) 7%, var(--table-first));
}

.materials-comparison-table thead th.is-comparison-baseline,
.materials-data-table td.is-comparison-baseline {
  background: color-mix(in srgb, var(--brand) 11%, var(--surface-card));
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--brand) 16%, transparent), inset -1px 0 0 color-mix(in srgb, var(--brand) 16%, transparent);
}

.materials-comparison-table thead th.is-comparison-baseline {
  background: color-mix(in srgb, var(--brand) 13%, var(--table-head));
}

.materials-data-table tbody tr:hover td.is-comparison-baseline {
  background: color-mix(in srgb, var(--brand) 14%, var(--surface-card));
}

.materials-comparison-table tbody tr.is-comparison-selected > td {
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--accent) 52%, transparent), inset 0 -2px 0 color-mix(in srgb, var(--accent) 52%, transparent);
}

.materials-comparison-table tbody tr.is-comparison-selected > td.is-comparison-baseline {
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--brand) 16%, transparent), inset -1px 0 0 color-mix(in srgb, var(--brand) 16%, transparent), inset 0 2px 0 color-mix(in srgb, var(--accent) 52%, transparent), inset 0 -2px 0 color-mix(in srgb, var(--accent) 52%, transparent);
}

.materials-data-table .materials-group-cell {
  vertical-align: middle;
}

.materials-property {
  display: grid;
}

.materials-property__label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.materials-lang-en {
  display: none !important;
}

html[lang^="en"] .materials-lang-zh {
  display: none !important;
}

html[lang^="en"] .materials-lang-en {
  display: block !important;
}

.materials-comparison-table thead th .materials-lang-zh,
.materials-comparison-table thead th .materials-lang-en {
  max-width: none;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.materials-data-table .materials-symbol,
.materials-data-table .materials-unit {
  min-width: 76px;
  color: var(--ink);
  font-weight: 750;
  white-space: nowrap;
}

.materials-data-table .materials-condition {
  min-width: 210px;
  color: var(--muted);
  line-height: 1.45;
}

.materials-data-table .materials-value {
  min-width: 128px;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-line;
}

.materials-value-button {
  display: block;
  width: 100%;
  margin: -3px 0;
  padding: 3px 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  white-space: inherit;
  cursor: pointer;
}

.materials-value-button:hover .materials-value-text {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.materials-value-text {
  white-space: pre-line;
}

.materials-value-parenthetical {
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 500;
}

.materials-value-layout {
  min-width: 0;
}

.materials-value-delta {
  margin-top: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
}

@media (min-width: 761px) {
  .materials-comparison-table .materials-value-layout {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
  }

  .materials-comparison-table .materials-value-button {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .materials-comparison-table .materials-value-delta {
    flex: 0 0 auto;
    margin-top: 0;
    text-align: right;
  }
}

.materials-data-table .materials-value.is-empty {
  color: var(--muted);
  font-weight: 500;
}

.materials-curves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.materials-curve-card {
  overflow: hidden;
  display: grid;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.materials-curve-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--brand) 14%, transparent);
}

.materials-curve-card__media {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 1 / 1.08;
  background: #fff;
}

.materials-curve-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 240ms ease;
}

.materials-curve-card:hover img {
  transform: scale(1.018);
}

.materials-curve-card__body {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 15px 16px 16px;
}

.materials-curve-card__body > span:first-child {
  min-width: 0;
}

.materials-curve-card__body strong {
  display: block;
  color: var(--brand);
  font-size: 20px;
}

.materials-curve-card__body span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.materials-curve-card__open {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--button-ghost);
  color: var(--brand);
}

.materials-curve-card__open:hover {
  background: var(--button-ghost-hover);
}

.materials-empty {
  margin-top: 18px;
  padding: 52px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--paper);
  color: var(--muted);
  text-align: center;
}

.materials-empty h2 {
  margin: 0;
  color: var(--ink);
}

.materials-empty p {
  margin: 8px 0 0;
}

.materials-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px 8px 8px;
  color: var(--muted);
  font-size: 13px;
}

.materials-footer p {
  margin: 0;
}

.materials-footer a {
  color: var(--brand);
  font-weight: 800;
}

.materials-dialog {
  width: min(1180px, calc(100vw - 34px));
  height: min(94vh, 980px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: 0 34px 90px rgba(4, 10, 18, 0.38);
}

.materials-dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(8px);
}

.materials-dialog__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.materials-dialog__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.materials-dialog__header h2 {
  margin: 0;
  font-size: 20px;
}

.materials-dialog__header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.materials-dialog__actions {
  display: flex;
  gap: 8px;
}

.materials-dialog__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--button-ghost);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.materials-dialog__actions button:hover,
.materials-dialog__actions button[aria-pressed="true"] {
  background: var(--button-ghost-hover);
}

.materials-dialog__actions .materials-dialog__close {
  width: 42px;
  padding: 0;
}

.materials-dialog__viewport {
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 18px;
  background: color-mix(in srgb, var(--bg) 62%, var(--paper));
  overscroll-behavior: contain;
  touch-action: pinch-zoom;
}

.materials-dialog__viewport img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(4, 10, 18, 0.18);
  cursor: zoom-in;
}

.materials-dialog.is-actual-size .materials-dialog__viewport {
  place-items: start;
}

.materials-dialog.is-actual-size .materials-dialog__viewport img {
  max-width: none;
  cursor: zoom-out;
}

.materials-noscript {
  margin: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--ink);
}

body.theme-dark .materials-hero,
body.theme-dark .materials-toolbar,
body.theme-dark .materials-section,
body.theme-dark .materials-empty,
body.theme-dark .materials-table-card,
body.theme-dark .materials-index-card,
body.theme-dark .materials-curve-card {
  background: var(--paper);
}

body.theme-dark .materials-toolbar {
  background: color-mix(in srgb, var(--paper) 90%, transparent);
}

body.theme-dark .materials-index-card.is-selected {
  border-color: var(--category-color, var(--brand));
  background: var(--category-color, var(--brand));
}

body.theme-dark .materials-curve-card__media,
body.theme-dark .materials-dialog__viewport img {
  background: #fff;
}

body.theme-dark .materials-dialog {
  background: var(--paper-strong);
}

@media (prefers-reduced-motion: reduce) {
  .materials-page *,
  .materials-page *::before,
  .materials-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .materials-hero__main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .materials-summary {
    width: min(100%, 520px);
  }

  .materials-filters {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .materials-filters::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) {
  .materials-shell {
    padding: 12px;
  }

  .materials-hero {
    gap: 0;
    padding: 16px;
    border-radius: 22px;
  }

  .materials-page .catalog-display-controls {
    position: static;
    width: max-content;
    gap: 2px;
    padding: 3px;
    border-radius: 14px;
    z-index: 4;
  }

  .materials-page .catalog-display-controls .theme-toggle,
  .materials-page .catalog-display-controls .language-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 10px;
  }

  .materials-page.dialog-open .catalog-display-controls {
    opacity: 0;
    pointer-events: none;
  }

  .materials-back {
    justify-content: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-size: 0;
  }

  .materials-back:hover {
    border-color: transparent;
    background: var(--button-ghost);
  }

  .materials-back span {
    display: none;
  }

  .materials-back svg {
    width: 19px;
    height: 19px;
  }

  .materials-hero__topline {
    grid-template-columns: 76px minmax(0, 1fr) 76px;
    gap: 0;
    padding-right: 0;
  }

  .materials-back {
    grid-column: 1;
  }

  .materials-brand-logo {
    grid-column: 2;
    justify-self: center;
  }

  .materials-brand-logo img {
    max-width: min(138px, 39vw);
    max-height: 38px;
    filter: none;
  }

  .materials-hero__main {
    gap: 14px;
    margin-top: 22px;
  }

  .materials-catalog-download {
    width: 100%;
    min-height: 44px;
    padding-inline: 14px;
    border-radius: 12px;
    box-shadow: none;
  }

  .materials-hero__copy h1 {
    max-width: none;
    font-size: clamp(30px, 8.2vw, 34px);
    line-height: 1.04;
    letter-spacing: -0.035em;
    white-space: nowrap;
  }

  .materials-hero__copy p {
    margin-top: 10px;
    font-size: 13px;
  }

  .materials-summary {
    grid-template-columns: minmax(118px, 142px);
  }

  .materials-summary div {
    min-width: 0;
    padding: 11px 9px;
    border-radius: 13px;
  }

  .materials-summary dt {
    font-size: 10px;
  }

  .materials-summary dd {
    font-size: 22px;
  }

  .materials-source-note {
    margin-top: 18px;
    padding-top: 12px;
    font-size: 12px;
    line-height: 1.55;
  }

  .materials-hero::after {
    display: none;
  }

  .materials-toolbar {
    position: static;
    margin-top: 10px;
    padding: 10px;
    border-radius: 18px;
  }

  .materials-toolbar__topline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .materials-toolbar__intro {
    padding: 2px 2px 0;
  }

  .materials-selection-status {
    justify-content: space-between;
    width: 100%;
  }

  .materials-filters {
    margin-inline: -2px;
  }

  .materials-filter {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 12px;
  }

  .materials-category-row {
    padding-top: 10px;
  }

  .materials-category-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .materials-category-filter {
    min-height: 46px;
    padding: 5px 6px;
    font-size: 10px;
    line-height: 1.3;
    white-space: normal;
  }

  html[lang="en"] .materials-category-filter {
    min-height: 62px;
    font-size: 9px;
    line-height: 1.2;
  }

  html[lang="en"] .materials-toolbar__intro span {
    font-size: 16px;
  }

  .materials-family-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .materials-browser__selection {
    margin-top: 4px;
    padding-top: 16px;
  }

  .materials-section {
    margin-top: 10px;
    padding: 20px 14px;
    border-radius: 22px;
  }

  .materials-section__heading {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
  }

  .materials-section__heading h2 {
    font-size: 25px;
  }

  .materials-section__heading p {
    font-size: 12px;
  }

  .materials-result-count {
    display: none;
  }

  .materials-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .materials-index-card {
    border-radius: 13px;
  }

  .materials-index-select {
    min-height: 60px;
    padding: 6px 3px 7px 8px;
  }

  .materials-index-copy strong {
    font-size: 14px;
  }

  .materials-index-copy small {
    display: none;
  }

  .materials-card-actions {
    gap: 0;
    width: 26px;
    margin: 4px 4px 4px 0;
    border-radius: 8px;
  }

  .materials-card-curve,
  .materials-card-pdf {
    width: 26px;
    min-width: 26px;
    min-height: 0;
    border-radius: 0;
  }

  .materials-card-curve svg,
  .materials-card-pdf svg {
    width: 14px;
    height: 14px;
  }

  .materials-table-card {
    border-radius: 16px;
  }

  .materials-table-card__header {
    display: grid;
    gap: 12px;
    padding: 15px 14px;
  }

  .materials-data-note {
    padding: 10px 12px 11px;
    font-size: 10px;
  }

  .materials-table-card__header h3 {
    font-size: 16px;
  }

  .materials-comparison-download {
    justify-self: start;
    min-height: 36px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 11px;
  }

  .materials-comparison-export-actions {
    justify-self: start;
    flex-wrap: wrap;
    gap: 7px;
  }

  .materials-source-button {
    justify-self: start;
    min-height: 38px;
  }

  .materials-comparison-sources {
    justify-content: flex-start;
  }

  .materials-data-table {
    width: max-content;
    min-width: 100%;
    font-size: 11px;
  }

  .materials-data-table th,
  .materials-data-table td {
    padding: 6px 5px;
  }

  .materials-data-table th:first-child,
  .materials-data-table .materials-property-cell {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    overflow-wrap: anywhere;
  }

  .materials-data-table .materials-symbol {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .materials-data-table .materials-unit {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .materials-data-table .materials-condition {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .materials-data-table .materials-value,
  .materials-comparison-material {
    width: 68px;
    min-width: 68px;
    max-width: 68px;
    overflow-wrap: anywhere;
  }

  .materials-comparison-baseline-button {
    gap: 3px;
    margin-inline: -2px;
    padding-inline: 2px;
  }

  .materials-baseline-tag {
    padding: 1px 4px;
    font-size: 8px !important;
  }

  .materials-value-delta {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.15;
    white-space: normal;
  }

  .materials-comparison-category {
    display: none !important;
  }

  .materials-comparison-actions {
    gap: 0;
    margin-top: 5px;
    border-radius: 6px;
  }

  .materials-comparison-actions .materials-card-curve,
  .materials-comparison-actions .materials-card-pdf {
    width: 21px;
    min-width: 21px;
    height: 21px;
    min-height: 21px;
    border-radius: 0;
  }

  .materials-comparison-actions .materials-card-curve svg,
  .materials-comparison-actions .materials-card-pdf svg {
    width: 13px;
    height: 13px;
  }

  .materials-curves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .materials-curve-card {
    border-radius: 15px;
  }

  .materials-curve-card__body {
    padding: 12px;
  }

  .materials-curve-card__body strong {
    font-size: 17px;
  }

  .materials-curve-card__open {
    width: 38px;
    height: 38px;
  }

  .materials-footer {
    display: grid;
    gap: 8px;
    padding: 20px 4px 8px;
    line-height: 1.5;
  }

  .materials-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .materials-dialog__header {
    padding: 12px;
  }

  .materials-dialog__header h2 {
    font-size: 16px;
  }

  .materials-dialog__actions button {
    min-height: 38px;
    padding: 0 9px;
  }

  .materials-dialog__actions button span {
    display: none;
  }

  .materials-dialog__actions .materials-dialog__close {
    width: 38px;
  }

  .materials-dialog__viewport {
    padding: 10px;
  }
}

@media (max-width: 390px) {
  .materials-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
