/* ==========================================================================
   Bohr Materials design system
   Paper-white ground, near-black ink, one accent per element.
   No framework. All codes, CAS, prices, spec values in mono
   with tabular figures.
   ========================================================================== */

:root {
  --paper: #faf9f7;
  --paper-2: #f3f1ec;
  --ink: #191817;
  --ink-soft: #3c3a36;
  --muted: #6f6b63;
  --rule: #e4e1db;
  --rule-strong: #c9c5bc;

  /* Element accents */
  --se: #b45309;  --se-tint: #f7edde;
  --te: #0f766e;  --te-tint: #e2f0ee;
  --bi: #9f1239;  --bi-tint: #f9e7ec;
  --in: #1e40af;  --in-tint: #e6ebf8;

  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --wordmark: 'Cinzel', Georgia, serif;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 12px;
}

h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.01em; }
h2 {
  font-size: 21px;
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 17px; font-weight: 700; }

p { margin: 0 0 14px; max-width: 72ch; }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}

/* ---------- Layout shell ---------- */

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

main { padding-top: 8px; }

.sec { margin-top: 44px; }

/* Two-column split: content + side panel (e.g. price table + buy box) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- Header / nav ---------- */

.site-head {
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper);
}

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-family: var(--wordmark);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand-mark { display: block; flex: none; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-left: auto;
}

.site-nav a {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 2px 0;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
}
.site-nav a.btn { border-bottom: 1.5px solid var(--ink); }
.site-nav a.btn-solid { color: var(--paper); border-bottom: 0; }

@media (max-width: 720px) {
  .site-nav { margin-left: 0; width: 100%; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--paper-2); }

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover { background: var(--ink-soft); color: var(--paper); }

.btn-lg { padding: 12px 26px; font-size: 15px; }

.btn-block { display: block; text-align: center; }

/* ---------- Element tiles ---------- */

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  text-align: center;
}

.tile .t-num {
  position: absolute;
  top: 6px;
  left: 8px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 400;
}
.tile .t-sym { font-weight: 700; line-height: 1; }
.tile .t-name { font-size: 13px; margin-top: 6px; letter-spacing: 0.02em; }
.tile .t-mass {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  margin-top: 3px;
  color: var(--ink-soft);
}

/* Large: element page header */
.tile-lg {
  width: 172px;
  min-height: 180px;
  padding: 22px 12px;
  flex-shrink: 0;
}
.tile-lg .t-sym { font-size: 62px; }

/* Small: home grid / cross-links */
.tile-sm {
  width: 100%;
  min-height: 132px;
  padding: 18px 8px;
}
.tile-sm .t-sym { font-size: 40px; }

/* Accent variants: border + tint ground + accent symbol */
.tile-se { border-color: var(--se); background: var(--se-tint); }
.tile-se .t-sym { color: var(--se); }
.tile-te { border-color: var(--te); background: var(--te-tint); }
.tile-te .t-sym { color: var(--te); }
.tile-bi { border-color: var(--bi); background: var(--bi-tint); }
.tile-bi .t-sym { color: var(--bi); }
.tile-in { border-color: var(--in); background: var(--in-tint); }
.tile-in .t-sym { color: var(--in); }

/* Tile grid + clickable tile card with caption */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.tile-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
}
.tile-card:hover .tile { box-shadow: 0 2px 0 rgba(25, 24, 23, 0.35); }
.tile-cap {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Mini periodic table (brand mark) ---------- */
/* 18 columns x 7 periods, f-block omitted. Only Se, Te, Bi, In are lit.
   Markup: span.c = faint empty cell, span.g = invisible gap,
   a.el.se|te|bi|in = lit cell with .n atomic number + symbol text. */

.ptable {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 3px;
  max-width: 560px;
}

.ptable span.c {
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper-2);
}

.ptable span.g {
  aspect-ratio: 1;
  visibility: hidden;
}

.ptable a.el {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1.5px solid;
  border-radius: 2px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(9px, 1.8vw, 14px);
  line-height: 1;
}
.ptable a.el:hover { filter: brightness(0.94); }

.ptable a.se { border-color: var(--se); background: var(--se-tint); color: var(--se); }
.ptable a.te { border-color: var(--te); background: var(--te-tint); color: var(--te); }
.ptable a.bi { border-color: var(--bi); background: var(--bi-tint); color: var(--bi); }
.ptable a.in { border-color: var(--in); background: var(--in-tint); color: var(--in); }

.ptable .n {
  position: absolute;
  top: 1px;
  left: 2px;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 400;
  display: none;
}
@media (min-width: 560px) { .ptable .n { display: block; } }

/* ---------- Hero (home) ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 44px 0 4px;
}
.hero-main,
.hero-pt { min-width: 0; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
}

.hero h1 { font-size: 30px; }

.lede {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- Fact chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- Data tables ---------- */
/* Always wrap tables in .table-scroll so they scroll inside their
   container on narrow screens; the page never scrolls horizontally. */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: #fff;
}

table.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: left;
  padding: 10px 12px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fdfcfa; }

.data-table td.mono, .data-table th.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  white-space: nowrap;
}

.data-table .num { text-align: right; }

.row-link {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* Spec / properties table: property name column + value column */
table.spec-table { min-width: 480px; }
.spec-table td.prop {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  width: 220px;
}

/* ---------- Element page header ---------- */

.el-head {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 34px;
}

.el-head-main { max-width: 640px; }

.el-sub {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

/* Identifier strip: CAS | formula | MW, always mono */
.id-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
}
.id-strip .sep { color: var(--rule-strong); }

/* ---------- Buy box ---------- */

.buy-box {
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  padding: 20px 22px;
}

.buy-lines {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.buy-lines li { padding-left: 14px; position: relative; }
.buy-lines li + li { margin-top: 7px; }
.buy-lines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--rule-strong);
  border-radius: 1px;
}

/* ---------- Utility rows (documents, quiet GHS/data rows) ---------- */
/* Deliberately quiet: a labeled row of mono links, never a warning banner. */

.util-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 11px 2px;
  margin-top: 28px;
  font-size: 13.5px;
}

.util-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.util-row a {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.util-sep { color: var(--rule-strong); }

/* ---------- Quote CTA block (every page, above the footer) ---------- */

.quote-cta { margin-top: 52px; }

.quote-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--paper-2);
  padding: 20px 24px;
}

.quote-cta-row p {
  margin: 0;
  font-family: var(--serif);
  font-size: 16.5px;
}

/* ---------- Forms (quote page) ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  max-width: 720px;
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field { display: block; }
.field.full { grid-column: 1 / -1; }

.field .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.field .hint {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
}

input.mono-input, textarea.mono-input {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}

textarea { min-height: 110px; resize: vertical; }

/* Honeypot field ("website"): keep off-screen, must stay empty */
.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- Prose / notice blocks ---------- */

.note {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  border-radius: 0 3px 3px 0;
  background: #fff;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 72ch;
}

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule-strong);
  margin-top: 56px;
  padding: 28px 0 44px;
  font-size: 13px;
  color: var(--muted);
}

.foot-entity { color: var(--ink-soft); margin-bottom: 4px; }
.foot-ruo { margin-bottom: 0; }

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 14px;
}
.foot-nav a {
  color: var(--muted);
  text-decoration: none;
}
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }

/* Ensure the hidden attribute always wins (quote form is hidden after submit) */
[hidden] { display: none !important; }


/* ---------- Home hero (single column) ---------- */
.hero-lite { padding: 40px 0 6px; }
.hero-lite h1 { font-size: 37px; max-width: 22ch; }
.hero-lite .lede { margin-top: 6px; }
@media (max-width: 720px) { .hero-lite h1 { font-size: 27px; } }

/* ---------- Full periodic table ---------- */
.pt-section { margin: 26px 0 6px; }
.pt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.ptable-full {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  min-width: 660px;
}
.pt-c {
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper-2);
  display: flex; align-items: center; justify-content: center;
  position: relative; min-width: 0;
  color: var(--ink-soft); text-decoration: none;
}
.pt-n {
  position: absolute; top: 2px; left: 3px;
  font-family: var(--mono); font-size: 8px; font-weight: 400;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.pt-s { font-family: var(--serif); font-weight: 700; font-size: clamp(9px, 1.05vw, 15px); line-height: 1; }
.pt-el { border-width: 2px; }
.pt-el.se { border-color: var(--se); background: var(--se-tint); color: var(--se); }
.pt-el.te { border-color: var(--te); background: var(--te-tint); color: var(--te); }
.pt-el.bi { border-color: var(--bi); background: var(--bi-tint); color: var(--bi); }
.pt-el.in { border-color: var(--in); background: var(--in-tint); color: var(--in); }
.pt-el:hover { filter: brightness(0.95); }
.pt-el .pt-n { color: inherit; opacity: 0.7; }
.pt-mark { background: transparent; }
.pt-mark .pt-s { font-family: var(--mono); font-weight: 400; font-size: clamp(7px, 0.7vw, 10px); color: var(--muted); }
.pt-gap { height: 9px; }
.pt-legend { font-size: 12.5px; color: var(--muted); margin-top: 10px; }


/* ---------- Split hero: right-half periodic table ---------- */
.hero-main h1 { font-size: 32px; }
.ptable-half { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
@media (max-width: 820px) { .ptable-half { max-width: 420px; } }


/* header-dropdowns v1 */

/* spread the nav out, normal header feel */
.site-nav { gap: 8px 24px; }
.site-nav a { font-size: 14px; }

/* polished, roomier Request a Quote button (was crammed by .site-nav a padding) */
.site-nav a.btn { font-size: 14px; padding: 10px 22px; border-radius: 5px; }
.site-nav a.btn-solid { color: var(--paper); border-bottom: 0; margin-left: 8px; }
.site-nav a.btn:hover { text-decoration: none; }

/* hover dropdowns */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.menu {
  position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 210px; margin: 0; padding: 6px;
  background: var(--paper); border: 1px solid var(--rule-strong);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(25, 24, 23, 0.12);
  display: none;
}
.has-menu:hover > .menu, .has-menu:focus-within > .menu { display: block; }
.menu a {
  display: block; padding: 7px 12px; font-size: 13.5px;
  color: var(--ink-soft); white-space: nowrap; border-radius: 6px; border-bottom: 0;
}
.menu a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.menu a[aria-current="page"] { border-bottom: 0; }
.menu-group {
  padding: 9px 12px 3px; font-family: var(--sans); font-size: 10.5px;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}
.menu-group:first-child { padding-top: 4px; }
.menu-tall { max-height: 74vh; overflow-y: auto; }

@media (max-width: 720px) {
  .menu { display: none !important; }
  .nav-item { display: inline-block; }
}

/* co-brand block (home hero) */
.cobrand {
  margin-top: 22px;
  max-width: 620px;
  padding: 16px 18px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--paper-2);
}
.cobrand-mark {
  font-family: var(--wordmark);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.cobrand-x { color: var(--in); font-size: 19px; line-height: 1; }
.cobrand-line { margin: 9px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
