:root {
  color-scheme: light;
  --ink: #182326;
  --muted: #5b686b;
  --soft: #7a8588;
  --line: #d7dfdf;
  --line-strong: #b9c8c6;
  --paper: #f6f8f7;
  --panel: #ffffff;
  --panel-alt: #eef4f3;
  --brand: #0b6b63;
  --brand-dark: #074c47;
  --brand-soft: #e4f1ef;
  --blue: #1d4f91;
  --blue-soft: #e9f0fb;
  --accent: #b55d16;
  --accent-soft: #fff2df;
  --danger: #a13a31;
  --shadow: 0 18px 44px rgba(24, 35, 38, 0.10);
  --shadow-soft: 0 10px 28px rgba(24, 35, 38, 0.07);
  --radius: 8px;
  --container: 1200px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--brand-dark);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: white;
  font-size: 14px;
  background: var(--brand);
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.12);
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
}

.nav-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  padding: 6px 9px;
  text-decoration: none;
  color: var(--muted);
}

.nav-links a:hover {
  background: var(--panel-alt);
  color: var(--brand-dark);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.hero-tool {
  padding: 30px 0 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f8f7 100%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
}

.hero-copy {
  display: grid;
  align-content: start;
}

.hero-copy h1 {
  max-width: 820px;
  font-size: 54px;
  line-height: 1.02;
  margin: 4px 0 12px;
  letter-spacing: 0;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 19px;
  max-width: 760px;
}

.definition-block {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  padding: 13px 15px;
  background: var(--panel);
  border-radius: var(--radius);
  max-width: 860px;
  box-shadow: var(--shadow-soft);
}

.definition-block p {
  margin: 0;
}

.trust-list {
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
}

.trust-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.chem-asset {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  align-content: stretch;
}

.asset-label {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 12px;
  height: 100%;
}

.asset-label span {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  font-size: 12px;
}

.asset-label strong {
  display: block;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: 0;
}

.asset-label code {
  display: block;
  align-self: end;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  background: #fbf8f2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.asset-meta {
  display: grid;
  gap: 6px;
  margin: 0;
}

.asset-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 13px;
}

.asset-meta dt,
.asset-meta dd {
  margin: 0;
}

.asset-meta dt {
  font-weight: 800;
  color: var(--ink);
}

.tool-wrap {
  padding: 20px 0 34px;
}

.tool-panel {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-top {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f0f5f4;
}

.source-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.tab-button,
.mode-button,
.primary-button,
.secondary-button,
.link-button {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.tab-button,
.mode-button {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.2;
}

.tab-button:hover,
.mode-button:hover,
.secondary-button:hover,
.link-button:hover {
  border-color: var(--line-strong);
  background: #f9fbfa;
  box-shadow: 0 4px 12px rgba(24, 35, 38, 0.06);
}

.tab-button.active,
.mode-button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.tool-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.9fr);
  min-height: 560px;
}

.input-pane {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.output-pane {
  padding: 18px;
  background: #f9f4ea;
}

.quick-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 10px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c5d0cf;
  border-radius: var(--radius);
  padding: 10px 11px;
  min-height: 42px;
  color: var(--ink);
  background: white;
  font: inherit;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(11, 107, 99, 0.16);
  border-color: var(--brand);
}

.primary-button {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  padding: 0 15px;
}

.primary-button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.secondary-button,
.link-button {
  padding: 0 13px;
}

.link-button {
  background: transparent;
  color: var(--brand-dark);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.field-grid .wide {
  grid-column: span 2;
}

.batch-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfc;
}

.batch-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--brand-dark);
}

.batch-panel textarea {
  margin-top: 10px;
}

.batch-panel .secondary-button {
  margin-top: 10px;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 14px;
}

.output-card {
  border: 1px solid #e5d1ad;
  border-radius: var(--radius);
  background: white;
  margin-bottom: 12px;
  overflow: hidden;
}

.output-card h2 {
  font-size: 15px;
  margin: 0;
  padding: 11px 13px;
  border-bottom: 1px solid #e5d1ad;
  background: #fff9ef;
}

.citation-output {
  min-height: 76px;
  padding: 13px;
  overflow-wrap: anywhere;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.export-help {
  margin: 0 0 14px;
  color: #7a6b55;
  font-size: 12px;
  line-height: 1.45;
}

.citation-list {
  border-top: 1px solid #e5d1ad;
  padding-top: 14px;
}

.citation-list h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.citation-items {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.citation-items li {
  border: 1px solid #e5d1ad;
  border-radius: var(--radius);
  background: white;
  padding: 10px;
  overflow-wrap: anywhere;
}

.empty-state {
  color: var(--muted);
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 28px;
  padding: 26px 20px 62px;
}

.home-directory {
  padding-top: 26px;
}

.home-directory:last-of-type {
  padding-bottom: 62px;
}

.home-section-heading {
  max-width: 860px;
  margin-bottom: 16px;
}

.home-section-heading h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.home-section-heading p {
  margin: 0;
  color: var(--muted);
}

.home-card-grid,
.future-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-tool-card,
.future-tool-card {
  min-height: 164px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.home-tool-card {
  color: var(--ink);
  text-decoration: none;
}

.home-tool-card span,
.future-tool-card strong {
  display: block;
  color: var(--brand-dark);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 850;
}

.home-tool-card p,
.future-tool-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.home-tool-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.future-tool-card {
  background: #fbfcfc;
}

.home-source-list {
  margin-bottom: 0;
}

.service-cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-left: 4px solid var(--accent);
  background: #fffdf9;
}

.service-cta-section h2 {
  margin-bottom: 8px;
}

.cta-button {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 44px;
}

.inline-cta {
  margin-top: 16px;
  width: max-content;
  max-width: 100%;
}

.pricing-grid,
.service-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-process-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.pricing-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.pricing-card span {
  display: block;
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.pricing-card strong {
  display: block;
  margin-top: 12px;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
}

.pricing-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.pricing-card .pricing-scope {
  color: var(--ink);
  font-weight: 800;
}

.disclosure-layout {
  padding-top: 28px;
}

.content-section h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: 0;
}

.article-content {
  display: grid;
  gap: 18px;
}

.content-section,
.tool-directory {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.content-section h2,
.tool-directory h2 {
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: 0;
}

.content-section h3 {
  font-size: 18px;
  margin: 18px 0 8px;
}

.content-section p {
  margin: 0;
  color: var(--muted);
}

.tool-directory-grid,
.intent-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.tool-directory-grid a,
.intent-link-grid a {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: #fbfcfc;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
}

.tool-directory-grid a:hover,
.intent-link-grid a:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.format-box {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: #fbfcfc;
  padding: 14px;
  margin: 12px 0 0;
}

.format-box code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.example-reference {
  padding: 14px;
  border: 1px solid #e5d1ad;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

.mistake-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.mistake-list li + li {
  margin-top: 6px;
}

.source-link-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.source-link-list li {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfc;
}

.source-link-list a {
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.source-link-list span {
  color: var(--muted);
}

.editorial-note-section {
  border-left: 4px solid var(--blue);
}

.faq-list {
  margin: 0;
  padding-left: 0;
}

.faq-list dt {
  font-weight: 800;
  margin-top: 14px;
}

.faq-list dt:first-child {
  margin-top: 0;
}

.faq-list dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.search-intent-section,
.related-tools-section {
  background: #f9fbfa;
}

.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.sidebar h2 {
  font-size: 15px;
  margin: 0 0 8px;
}

.sidebar a {
  display: block;
  border-radius: 6px;
  text-decoration: none;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 14px;
}

.sidebar a:hover {
  color: var(--brand-dark);
  background: var(--panel-alt);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
  background: #ffffff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .hero-grid,
  .tool-body,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .chem-asset {
    min-height: 190px;
  }

  .input-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .source-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-grid .wide {
    grid-column: 1 / -1;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    min-width: max-content;
  }

  .hero-tool {
    padding: 18px 0 14px;
  }

  .hero-grid {
    gap: 12px;
  }

  .hero-copy h1 {
    font-size: 38px;
    margin-top: 0;
  }

  .subtitle {
    font-size: 17px;
    margin-bottom: 12px;
  }

  .definition-block {
    padding: 11px 12px;
  }

  .trust-list {
    margin-top: 10px;
    gap: 6px;
  }

  .trust-list li {
    padding: 5px 8px;
    font-size: 12px;
  }

  .chem-asset {
    min-height: 0;
    padding: 12px;
  }

  .asset-label {
    gap: 8px;
  }

  .asset-label strong {
    font-size: 20px;
  }

  .asset-meta {
    display: none;
  }

  .asset-label code {
    padding: 10px;
    font-size: 13px;
  }

  .tool-wrap {
    padding-top: 12px;
  }

  .source-tabs,
  .field-grid,
  .mode-row,
  .quick-input,
  .action-row,
  .tool-directory-grid,
  .intent-link-grid,
  .home-card-grid,
  .future-tool-grid,
  .pricing-grid,
  .service-process-grid {
    grid-template-columns: 1fr;
  }

  .service-cta-section {
    align-items: stretch;
    flex-direction: column;
  }

  .input-pane,
  .output-pane,
  .content-section,
  .tool-directory,
  .home-tool-card,
  .future-tool-card,
  .pricing-card {
    padding: 16px;
  }

  .content-grid {
    padding-top: 18px;
    padding-bottom: 42px;
  }

  .content-section h2,
  .tool-directory h2 {
    font-size: 23px;
  }

  .content-section h1 {
    font-size: 34px;
  }
}
