* { box-sizing: border-box; }
:root {
  --key: #193a36;
  --paper: #f6f7f4;
  --accent: #ddbb79;
  --line: #dce1d9;
  --ink: #192b26;
  --muted: #52635c;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
button, a, select, input, textarea { touch-action: manipulation; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h2 { margin: 0 0 12px; font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.2; }
h3 { margin: 0; line-height: 1.25; }
button, .button {
  display: inline-block;
  border: 1px solid var(--key);
  border-radius: 3px;
  padding: 8px 14px;
  background: var(--key);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover, .button:hover { filter: brightness(1.15); text-decoration: none; }
button:focus-visible, .button:focus-visible { outline-color: var(--key); }
button:disabled { opacity: .52; cursor: default; }
.panel, .notice { border: 1px solid var(--line); background: #fff; padding: 16px; }
.notice { border-inline-start: 3px solid var(--key); }
form label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #aab7af;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 82px; resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: auto; }
.table-wrap { overflow: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
th { background: #eff2ef; font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.stack { display: grid; gap: 12px; max-width: 900px; }
.stack button { justify-self: start; }
.stack + .stack { margin-top: 10px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.section-head h2 { margin: 0; }

.portal .preview {
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: .78rem;
}
.portal header, .portal main, .portal footer { width: min(100% - 64px, 1240px); margin-inline: auto; }
.portal main { min-height: 64vh; padding-block: 26px 52px; }
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 67px;
  border-bottom: 2px solid var(--key);
}
.portal .brand {
  color: var(--key);
  font-family: Georgia, "Songti SC", SimSun, serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.15;
}
.languages, .main-nav, .buttons, .markets { display: flex; flex-wrap: wrap; align-items: center; }
.languages { gap: 5px 13px; font-size: .8rem; }
.languages a { padding-block: 4px; }
.languages .active { color: var(--key); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.main-nav { gap: 6px 22px; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.main-nav .active { color: var(--key); text-decoration: underline; text-underline-offset: 5px; font-weight: 700; }
.portal h1, .portal h2 {
  color: var(--key);
  font-family: Georgia, "Songti SC", SimSun, serif;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.hero-text { grid-template-columns: minmax(0, 1fr); padding-block: 28px 38px; }
.hero h1, .page-head h1 { margin: 0; line-height: 1.06; }
.hero h1 { font-size: clamp(2.7rem, 6.5vw, 6rem); }
.hero p { max-width: 40ch; margin-block: 16px 22px; color: var(--muted); font-size: 1.1rem; }
.hero figure { border-top: 3px solid var(--accent); }
.hero figure img { aspect-ratio: 16 / 9; }
.buttons, .markets { gap: 9px; }
.button.secondary { color: var(--key); background: transparent; }
.portal .section-head { margin-block: 24px 12px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); }
.card-body { padding: 12px; }
.card h3 { font-size: 1rem; }
.card p { margin: 7px 0 10px; font-size: .83rem; color: var(--muted); }
.small-link { color: var(--key); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
figure { margin: 0; }
img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
figcaption, .placeholder { color: var(--muted); background: #edf0ec; font-size: .78rem; }
figcaption { padding: 4px 8px; }
.photo-credit { display: block; overflow-wrap: anywhere; font-size: .73rem; }
.photo-credit a { text-decoration: underline; text-underline-offset: 2px; }
.placeholder {
  width: 100%;
  min-height: 50px;
  aspect-ratio: 4 / 1;
  display: grid;
  place-items: center;
  padding: 5px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.company-credentials { margin-block-start: 28px; }
.credential-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.credential-card { border: 1px solid var(--line); background: #fff; }
.credential-card a { display: block; padding: 10px; }
.credential-card img { aspect-ratio: 4 / 3; object-fit: contain; }
.credential-card figcaption { font-weight: 650; }
.purchase-checklist { max-width: 760px; }
.purchase-checklist ul { margin-block: 0; padding-inline-start: 1.35em; }
.purchase-checklist li + li { margin-block-start: .4em; }
.reply-window { max-width: 760px; font-weight: 650; }
.chip { display: inline-block; padding: 6px 10px; border: 1px solid var(--line); background: #fff; }
.callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.callout h2 { margin: 0; }
.portal footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 17px; border-top: 2px solid var(--key); }
.portal footer a { margin-inline-start: 10px; }
.portal .page-head { margin-bottom: 18px; }
.portal .page-head h1 { font-size: clamp(2rem, 5vw, 4rem); }
.detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.filter { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 16px; }
.filter select { max-width: min(240px, 80vw); }
.rfq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 760px; }
.rfq button { justify-self: start; }
.portal details { margin-block: 8px; padding: 11px 13px; border: 1px solid var(--line); background: #fff; }
summary { cursor: pointer; }

.admin {
  --key: #29465b;
  --ink: #252e37;
  --paper: #f4f5f6;
  --line: #d7dce0;
  --muted: #52606b;
  font-size: 14px;
}
.admin-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar {
  position: sticky;
  inset-block-start: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: #222b34;
  color: #e2e7eb;
}
.admin-brand {
  display: block;
  padding: 16px 22px;
  border-bottom: 1px solid #43505c;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}
.admin-nav { padding: 9px 0 15px; }
.nav-group + .nav-group { padding-top: 9px; }
.nav-group > span { display: block; padding: 5px 22px 3px; color: #afbdc9; font-size: .75rem; }
.nav-group a { display: block; padding: 5px 22px; border-inline-start: 3px solid transparent; font-weight: 550; }
.nav-group a:hover { background: #303c47; text-decoration: none; }
.nav-group a[aria-current="page"] { background: #364958; border-inline-start-color: #a6c1d2; color: #fff; }
.admin-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  padding: 8px 28px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.admin-tools { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; }
.admin-tools span { color: var(--muted); }
.admin-tools a, .admin-section a { color: var(--key); text-decoration: underline; text-underline-offset: 3px; }
.site-menu { position: relative; min-width: 0; }
.site-menu summary, .mobile-nav summary {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.site-menu nav {
  position: absolute;
  z-index: 2;
  inset-inline-start: 0;
  min-width: 172px;
  max-width: min(320px, 80vw);
  margin-top: 3px;
  border: 1px solid var(--line);
  background: #fff;
}
.site-menu a { display: block; padding: 7px 10px; overflow-wrap: anywhere; }
.site-menu a[aria-current] { background: #e6edf2; font-weight: 700; }
.mobile-nav { display: none; }
.admin main { max-width: 1440px; padding: 24px 28px 44px; }
.admin .page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.admin h1 { font-size: 1.65rem; }
.admin h2 { font: 650 1rem/1.4 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif; }
.admin .table-wrap table { min-width: 490px; }
.admin .catalog-table th:nth-child(1) { min-width: 115px; }
.admin .catalog-table th:nth-child(2) { min-width: 130px; }
.admin .catalog-table th:nth-child(3) { min-width: 62px; }
.admin .catalog-table td:last-child { white-space: pre-line; }
.admin .table-wrap + form { margin-top: 16px; }
.admin th { background: #e9edf0; }
.admin tbody tr:nth-child(even) { background: #f7f8fa; }
.admin textarea, .admin pre { font: .85rem/1.5 Consolas, monospace; }
.admin .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 24px;
  border: 1px solid var(--line);
  background: #fff;
}
.admin .stats > div { padding: 12px 16px; border-inline-end: 1px solid var(--line); }
.admin .stats > div:last-child { border-inline-end: 0; }
.admin .stats dt { color: var(--muted); }
.admin .stats dd { margin: 0; color: var(--key); font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.admin-section .section-head { margin-bottom: 7px; }

@media (max-width: 800px) {
  .portal header, .portal main, .portal footer { width: calc(100% - 32px); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-layout { display: block; }
  .admin-sidebar { display: none; }
  .mobile-nav { display: block; }
  .mobile-nav .admin-nav {
    position: absolute;
    z-index: 3;
    inset-inline: 0;
    top: 100%;
    max-height: min(65vh, 450px);
    overflow: auto;
    background: #222b34;
    color: #e2e7eb;
  }
  .admin-toolbar { padding-inline: 14px; gap: 8px; flex-wrap: wrap; }
  .admin main { padding: 16px 14px 38px; }
}
@media (max-width: 520px) {
  .portal main { padding-block-start: 18px; }
  .masthead { align-items: flex-start; flex-direction: column; gap: 2px; padding-block: 10px; }
  .languages { gap: 4px 10px; }
  .main-nav { gap: 5px 12px; font-size: .82rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-bottom: 16px; }
  .hero-text { padding-block-start: 10px; }
  .hero p { margin-block: 9px 14px; font-size: 1rem; }
  .detail, .rfq { grid-template-columns: minmax(0, 1fr); }
  .callout { align-items: flex-start; flex-direction: column; }
  .admin-tools span { display: none; }
  .admin .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin .stats > div:nth-child(2n) { border-inline-end: 0; }
  .admin .stats > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

.search-content { display: grid; gap: 14px; max-width: 78ch; margin-block: 18px; }
.search-content h2 { margin-bottom: 5px; }
.search-content p { margin-block: 0; }
.search-related { margin-block: 20px; }
.search-related ul, .search-sources { padding-inline-start: 1.35em; }
.search-related a, .search-sources a { text-decoration: underline; text-underline-offset: 3px; }
