:root { --canvas: var(--paper); }
html { scroll-padding-top: calc(var(--header-height, 72px) + var(--s-5)); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, a, input { -webkit-tap-highlight-color: transparent; }
::placeholder { color: var(--muted); opacity: 1; }

h1 { font-weight: 500; line-height: 1.02; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 500; line-height: 1.1; letter-spacing: -.015em; }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.wrap { width: min(1200px, calc(100% - 2 * var(--s-6))); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 12;
  top: var(--s-4);
  left: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--paper);
  color: var(--indigo-600);
}
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle; }
[data-icon] svg { width: 1.15em; height: 1.15em; }

.header { position: sticky; top: 0; z-index: 9; background: var(--canvas); border-bottom: 1px solid var(--line); }
.topbar {
  display: grid;
  grid-template-columns: auto minmax(10rem, 27rem) auto;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: var(--s-5); width: fit-content; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand:hover .brand-label { text-decoration: underline; }
.brand-logo { display: block; flex: none; width: auto; height: 30px; }
.brand-label { color: var(--ink-900); font-size: .9rem; font-weight: 600; }
.topbar nav, .footer-inner nav { display: flex; align-items: center; gap: var(--s-5); font-size: .9375rem; font-weight: 500; }
.header-search {
  display: flex;
  align-items: center;
  min-height: 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.header-search input, .search input {
  min-width: 0;
  width: 100%;
  padding: var(--s-2) var(--s-3);
  color: var(--ink-900);
  border: 0;
  background: transparent;
}
.header-search:focus-within, .search:focus-within { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.header-search input:focus-visible, .search input:focus-visible { outline: none; }
.header-search button {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 42px;
  border: 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: transparent;
  color: var(--indigo-600);
  cursor: pointer;
}
.header-search button:hover { background: var(--teal-100); }

.login, .primary, .search button, .chat-launcher, .chat-form button, .chat-example button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--indigo-500);
  color: var(--on-primary);
  padding: var(--s-2) var(--s-4);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.login:hover, .primary:hover, .search button:hover, .chat-launcher:hover, .chat-form button:hover, .chat-example button:hover {
  background: var(--hover-primary);
  text-decoration: none;
}

.hero { overflow: clip; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: var(--s-6);
  align-items: center;
  padding-block: var(--s-8);
}
.hero h1 { font-size: clamp(3rem, 5.2vw, 4.75rem); max-width: 12ch; }
.hero-desc { font-size: 1.18rem; line-height: 1.55; max-width: 43ch; margin-top: var(--s-4); }
.hero-visual { position: relative; width: calc(100% + var(--s-6)); }
.hero-art { display: block; width: 100%; height: auto; }
.hero-partners {
  position: absolute;
  top: 55%;
  left: 41%;
  width: 66%;
  height: auto;
  transform: translate(-50%, -50%);
}
.hero-neutral { fill: var(--logo-silver); }
.hero-image-ground {
  fill: var(--teal-100);
  fill: color-mix(in srgb, var(--logo-aqua) 42%, var(--paper));
}
.hero-network-depth, .hero-network-nodes { fill: var(--teal-700); }
.hero-network-depth { opacity: .21; }
.hero-network-depth path, .hero-network-lines { fill: none; stroke: var(--teal-700); }
.hero-network-depth path { stroke-width: 7; }
.hero-network-lines { opacity: .38; stroke-width: 1.7; }
.hero-network-nodes { opacity: .58; }
.hero-overlap { fill: var(--canvas); }
.search {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  max-width: 36rem;
  margin-top: var(--s-5);
  padding: var(--s-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-1);
}
.search > [data-icon] { padding-left: var(--s-3); color: var(--indigo-600); font-size: 1.2rem; }
.search input { flex: 1; }
.quicklinks {
  display: flex;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  flex-wrap: wrap;
  margin-top: var(--s-4);
}
.quicklinks p {
  color: var(--ink-700);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.quicklinks ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.quicklinks a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-900);
  font-size: .875rem;
}
.quicklinks a:hover { background: var(--teal-100); }
.guide-return a, .chat-suggestions button {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--teal-100);
  color: var(--ink-900);
  padding: var(--s-1) var(--s-3);
  font-weight: 500;
}
.guide-return a:hover, .chat-suggestions button:hover {
  background: var(--logo-aqua);
  color: var(--ink-on-logo-aqua);
}

.content { padding-top: var(--s-7); border-top: 1px solid var(--line); }
.content section + section { margin-top: var(--s-7); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-bottom: var(--s-5);
}
.section-head p { margin-top: var(--s-2); }
.search-correction a, .text-link { color: var(--indigo-600); font-weight: 600; text-decoration: underline; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.category, .popular-list a, .result-list a, .updates-link, .release-item, .article-page, .empty {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
}
.category {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "icon title chevron" "icon summary chevron";
  align-content: start;
  align-items: start;
  gap: var(--s-1) var(--s-3);
  padding: var(--s-5);
}
.category:hover, .popular-list a:hover, .result-list a:hover, .updates-link:hover {
  border-color: var(--teal-500);
  background-color: var(--teal-100);
  text-decoration: none;
}
.category:hover h3, .popular-list a:hover strong, .result-list a:hover strong, .updates-link:hover strong {
  color: var(--indigo-600);
  text-decoration: underline;
}
.category .topic-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--teal-100);
  color: var(--ink-900);
}
.category .topic-icon svg { width: 22px; height: 22px; }
.category h3 { grid-area: title; font-size: 1.16rem; }
.category p { grid-area: summary; max-width: 34ch; font-size: .9375rem; }
.category .chevron { grid-area: chevron; color: var(--indigo-600); }

.popular-list, .result-list, .release-list { display: grid; gap: var(--s-3); }
.popular-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.popular-list a, .result-list a, .updates-link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
}
.popular-list a > .list-text, .result-list a > .list-text, .updates-link > span:nth-child(2) { flex: 1; }
.list-text strong, .updates-link strong { display: block; color: var(--ink-900); font-weight: 600; }
.updates-link small, .list-text small, .release-item time { display: block; margin-top: var(--s-1); color: var(--ink-700); font-size: .875rem; }
.popular-list a > [data-icon], .result-list a > [data-icon], .updates-link > [data-icon] { color: var(--indigo-600); }
.release-list:not(:empty) { margin-bottom: var(--s-3); }
.release-item { padding: var(--s-5); }
.release-item p { margin-top: var(--s-2); }

.support-wrap { padding-block: var(--s-7); }
.support {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-6);
  border-radius: var(--r-lg);
  background: var(--teal-100);
  color: var(--ink-900);
}
.support-copy { display: flex; align-items: center; gap: var(--s-4); }
.support-icon {
  display: grid;
  place-items: center;
  width: var(--s-7);
  height: var(--s-7);
  border-radius: var(--r-md);
  background: var(--logo-aqua);
  color: var(--ink-on-logo-aqua);
  font-size: 1.4rem;
}
.support h2 { color: inherit; font-size: 1.6rem; }
.support p { margin-top: var(--s-1); }

.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  min-height: var(--s-9);
  padding-block: var(--s-4);
}
body:has(.help-chat:not([hidden])) .site-footer { padding-bottom: var(--s-7); }

.detail { max-width: 920px; padding-top: var(--s-6); }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
  font-size: .9rem;
}
.breadcrumbs a { color: var(--indigo-600); text-decoration: underline; }
.detail h1 { font-size: clamp(2.5rem, 5vw, 4rem); overflow-wrap: anywhere; }
.detail-intro { font-size: 1.18rem; line-height: 1.55; max-width: 62ch; margin-block: var(--s-4) var(--s-5); }
.guide-group + .guide-group { margin-top: var(--s-6); }
.guide-group h2 { margin-bottom: var(--s-3); font-size: 1.4rem; }
.guide-group h2 a { color: inherit; }
.article-page, .empty { padding: clamp(var(--s-4), 5vw, var(--s-6)); }
.article-page h2 { font-size: clamp(1.45rem, 4vw, 1.8rem); margin-bottom: var(--s-3); }
.article-page h2:not(:first-child) { margin-top: var(--s-6); }
.article-page p, .article-page li { max-width: 68ch; overflow-wrap: anywhere; }
.article-page p + p { margin-top: var(--s-3); }
.article-page ol { padding-left: var(--s-5); margin-block: 0 var(--s-3); }
.article-page li + li { margin-top: var(--s-2); }
.article-page a, .empty a { color: var(--indigo-600); font-weight: 600; text-decoration: underline; }
.guide-return { border-top: 1px solid var(--line); margin-top: var(--s-6); padding-top: var(--s-5); }
.guide-return a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.guide-screenshot { margin: var(--s-4) 0 0; }
.guide-screenshot img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
}
/* Omit the legacy toolbar control while keeping the recorded selection and import action. */
.guide-screenshot img[src$="/supplier-import-fanela-paced.gif"] {
  clip-path: polygon(evenodd,
    0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    29.3% 5%, 29.3% 26%, 68.4% 26%, 68.4% 5%, 29.3% 5%, 0 0);
}
.guide-screenshot figcaption { max-width: 68ch; margin-top: var(--s-2); color: var(--muted); font-size: .875rem; }

.help-chat {
  position: fixed;
  z-index: 10;
  right: max(var(--s-4), env(safe-area-inset-right));
  bottom: max(var(--s-4), env(safe-area-inset-bottom));
  color: var(--ink-900);
}
.chat-launcher { min-height: 48px; box-shadow: var(--shadow-2); }
.chat-launcher [data-icon] { font-size: 1.15rem; }
.chat-panel {
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 2 * var(--s-4)));
  height: min(544px, calc(100dvh - 2 * var(--s-4)));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--logo-aqua);
  color: var(--ink-on-logo-aqua);
}
.chat-header h2 { color: inherit; font-size: 1.12rem; font-weight: 600; }
.chat-header p { font-size: .875rem; margin-top: var(--s-1); }
.chat-header-icon { display: grid; place-items: center; font-size: 1.4rem; }
.chat-close {
  margin-left: auto;
  flex: none;
  width: 44px;
  height: 44px;
  color: inherit;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.chat-close:hover { background: var(--ink-on-logo-aqua); color: var(--logo-aqua); }
.chat-close:focus-visible { outline-color: var(--ink-on-logo-aqua); }
.chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-4);
  background: var(--canvas);
}
.chat-log:focus-visible { outline-offset: -2px; }
.chat-message { max-width: 95%; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); font-size: .9375rem; overflow-wrap: anywhere; }
.chat-assistant { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); }
.chat-visitor { align-self: flex-end; background: var(--teal-100); color: var(--ink-900); }
.chat-message ol { padding-left: var(--s-4); margin-block: var(--s-2); }
.chat-message li + li { margin-top: var(--s-1); }
.chat-message a, .chat-footer a { color: var(--indigo-600); font-weight: 600; text-decoration: underline; }
.chat-message a { display: block; margin-top: var(--s-1); }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: var(--s-1); padding: var(--s-2) var(--s-3) 0; }
.chat-suggestions button {
  min-height: 32px;
  padding: var(--s-1) var(--s-2);
  font-size: .875rem;
  cursor: pointer;
}
.chat-form { display: flex; gap: var(--s-2); padding: var(--s-2) var(--s-3); }
.chat-form input, .chat-example textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-2) var(--s-3);
  color: var(--ink-900);
  background: var(--paper);
}
.chat-form input { flex: 1; }
.chat-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  padding: 0 var(--s-3) var(--s-3);
  color: var(--muted);
  font-size: .875rem;
}
.chat-example { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3); font-size: .875rem; }
.chat-example summary { color: var(--indigo-600); font-weight: 600; cursor: pointer; }
.chat-example form { display: grid; gap: var(--s-2); margin-top: var(--s-2); }
.chat-example textarea { display: block; width: 100%; min-height: var(--s-8); margin-top: var(--s-1); }
.chat-example button { justify-self: start; }
.chat-example button:disabled { opacity: .65; cursor: default; }
.chat-example p:empty { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .login, .primary, .search button, .category, .chat-launcher, .chat-form button {
    transition: background-color 120ms cubic-bezier(.2, 0, .2, 1), border-color 120ms cubic-bezier(.2, 0, .2, 1);
  }
}

@media (max-width: 950px) {
  html { scroll-padding-top: calc(var(--header-height, 116px) + var(--s-4)); }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(58px, auto) auto; gap: 0 var(--s-3); padding-bottom: var(--s-3); }
  .header-search { grid-row: 2; grid-column: 1 / -1; }
  .topbar nav { grid-row: 1; grid-column: 2; }
  .hero-inner { padding-block: var(--s-8); }
  .hero-visual { width: 100%; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 2 * var(--s-5)); }
  .hero-inner { grid-template-columns: 1fr; gap: var(--s-5); padding-block: var(--s-6); }
  .hero-visual { width: min(100%, 22rem); justify-self: center; }
  .hero h1 { max-width: none; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar nav, .footer-inner nav { gap: var(--s-4); }
  .support { align-items: flex-start; }
  .support-copy { align-items: flex-start; }
}

@media (max-width: 540px) {
  .topbar nav > a:not(.login) { display: none; }
  .brand { gap: var(--s-3); }
  .search button { padding-inline: var(--s-3); }
  .search input { padding-inline: var(--s-2); }
  .category-grid, .popular-list { grid-template-columns: 1fr; gap: var(--s-3); }
  .support, .footer-inner { flex-direction: column; align-items: flex-start; }
  .support { padding: var(--s-5); }
}

@media (max-width: 359px) {
  .wrap { width: calc(100% - 2 * var(--s-4)); }
  .chat-header-icon, .search > [data-icon] { display: none; }
  .hero h1 { font-size: 2.6rem; }
}
