/* CONEXA platform — one layer for every company, catalogue and workspace page.
   Direction: export paperwork on white. Ink-blue accent, hairlines, mono trade codes.
   Tokens follow unslop by Damir Sokolovsky (@heydamir), CC BY 4.0. */

.platform,
.gateway {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --raised: #eef2f7;
  --line: rgb(17 24 39 / 0.09);
  --line-strong: rgb(17 24 39 / 0.16);
  --text: #111827;
  --text-2: #4b5565;
  --text-3: #6b7487;
  --accent: #1f5bc6;
  --accent-ink: #17489f;
  --accent-soft: #eaf1fd;
  --pos: #15803d;
  --pos-soft: #ecfdf3;
  --neg: #c62828;
  --neg-soft: #fdf1f1;
  --warn: #a15c07;
  --warn-soft: #fdf6e9;
  --r-control: 8px;
  --r-card: 12px;
  --r-panel: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "CONEXA Sans", "Malgun Gothic", monospace;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 32px);
  font-family: "CONEXA Sans", "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
.platform h1,
.platform h2,
.platform h3,
.platform p,
.platform dl,
.platform ol,
.platform ul,
.platform figure {
  margin: 0;
}
.platform h1 {
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.platform h2 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
}
.platform h3 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
}
.platform img {
  max-width: 100%;
}
.platform a:focus-visible,
.platform button:focus-visible,
.platform select:focus-visible,
.platform input:focus-visible,
.platform textarea:focus-visible,
.platform summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.platform .mono,
.p-code {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.platform [hidden] {
  display: none !important;
}

/* Layout */
.p-wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.p-main {
  padding: 40px 0 96px;
  min-height: 60vh;
}
.p-main > section + section {
  margin-top: 64px;
}

/* Header */
.p-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 64px;
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.p-logo img {
  display: block;
  width: 120px;
  height: auto;
}
#platform-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.p-nav-links,
.p-nav-account {
  display: flex;
  align-items: center;
  gap: 4px;
}
.p-nav-links a,
.p-signin,
.p-lang {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-control);
  font-size: 14px;
  color: var(--text-2);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.p-nav-links a:hover,
.p-signin:hover,
.p-lang:hover {
  color: var(--text);
  background: var(--bg-soft);
}
.p-nav-links a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}
.p-lang {
  font-family: var(--mono);
  font-size: 12px;
}
.p-account {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  margin-left: 4px;
  border-radius: var(--r-control);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 150ms var(--ease);
}
.p-account:hover {
  background: var(--accent-ink);
}
.p-menu {
  position: relative;
  display: none;
  flex: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-control);
  background: transparent;
}
.p-menu span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 1.5px;
  margin: 0;
  background: var(--text);
  transition: transform 180ms var(--ease), top 0ms;
}
.p-menu span:first-child {
  top: 15px;
}
.p-menu span:last-child {
  top: 23px;
}
.p-menu[aria-expanded="true"] span {
  top: 19px;
}
.p-menu[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}
.p-menu[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

/* Category bar under the header on buyer pages */
.p-category-nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.p-category-nav > div {
  display: flex;
  gap: 24px;
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.p-category-nav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 44px;
  font-size: 14px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.p-category-nav a:hover {
  color: var(--text);
}
.p-category-nav a[aria-current="page"] {
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Buttons and links */
.p-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease),
    color 150ms var(--ease), transform 120ms var(--ease);
}
.p-button:hover {
  background: var(--accent-ink);
}
.p-button:active {
  transform: scale(0.98);
}
.p-button.secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--line-strong);
}
.p-button.secondary:hover {
  background: var(--bg-soft);
}
.p-button.quiet {
  background: transparent;
  color: var(--text-2);
}
.p-button.quiet:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.p-button.danger {
  background: var(--bg);
  color: var(--neg);
  border-color: rgb(198 40 40 / 0.3);
}
.p-button.danger:hover {
  background: var(--neg-soft);
}
.p-button.small {
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
}
.p-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.p-link {
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  text-underline-offset: 3px;
}
.p-link:hover {
  text-decoration: underline;
}
.p-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Page heading */
.p-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
}
.p-heading > div {
  display: grid;
  gap: 8px;
}
.p-lead {
  max-width: 36rem;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
}
.p-eyebrow {
  font-size: 13px;
  color: var(--text-3);
}
.p-copy {
  max-width: 44rem;
  color: var(--text-2);
  white-space: pre-line;
}
.p-help {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}
.p-breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-3);
}
.p-breadcrumb a:hover {
  color: var(--text);
}
.p-rule {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.p-loading {
  padding: 32px 0;
  color: var(--text-3);
}

/* Forms */
.p-form {
  display: grid;
  gap: 20px;
}
.p-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.p-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.p-form-grid .wide {
  grid-column: 1 / -1;
}
.platform input:not([type="checkbox"], [type="radio"], [type="hidden"]),
.platform select,
.platform textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.platform textarea {
  min-height: 120px;
  resize: vertical;
}
.platform input[type="file"] {
  padding: 8px;
  font-size: 14px;
}
.platform input:focus,
.platform select:focus,
.platform textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.platform input::placeholder,
.platform textarea::placeholder {
  color: #9aa1ae;
}
.platform [aria-invalid="true"] {
  border-color: var(--neg) !important;
  box-shadow: 0 0 0 3px var(--neg-soft) !important;
}
.p-form fieldset {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.p-form legend {
  padding: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.p-form details {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.p-form summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}
.p-form details[open] summary {
  margin-bottom: 20px;
}
.p-checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 12px !important;
  font-weight: 400 !important;
  color: var(--text-2) !important;
  line-height: 1.5;
}
.p-checkbox input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.p-checkbox a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.p-password {
  position: relative;
}
.p-password input {
  padding-right: 64px !important;
}
.p-password button {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
}
.p-password button:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.p-alert {
  padding: 12px 16px;
  border: 1px solid rgb(198 40 40 / 0.2);
  border-radius: var(--r-control);
  background: var(--neg-soft);
  color: #8f1d1d;
  font-size: 14px;
}
.p-alert:empty {
  display: none;
}
.p-alert.ok {
  border-color: rgb(21 128 61 / 0.2);
  background: var(--pos-soft);
  color: #14532d;
}
.p-alert.info {
  border-color: rgb(31 91 198 / 0.18);
  background: var(--accent-soft);
  color: #163b80;
}
.p-save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  background: rgb(255 255 255 / 0.96);
  border-top: 1px solid var(--line);
}

/* Search */
.p-search {
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin-bottom: 32px;
}
.p-search input {
  flex: 1;
}

/* Badges */
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--raised);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: middle;
}
.p-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.p-badge.Approved,
.p-badge.Active,
.p-badge.Reviewed,
.p-badge.Replied {
  background: var(--pos-soft);
  color: var(--pos);
}
.p-badge.Pending,
.p-badge.New,
.p-badge.Reset {
  background: var(--warn-soft);
  color: var(--warn);
}
.p-badge.Rejected,
.p-badge.Suspended {
  background: var(--neg-soft);
  color: var(--neg);
}
.p-badge.Open,
.p-badge.In.progress,
.p-badge.supplier {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Empty state */
.p-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-card);
  background: var(--bg-soft);
}
.p-empty h2 {
  font-size: 17px;
}
.p-empty p {
  color: var(--text-2);
  margin-bottom: 8px;
}

/* Lists, panels */
.p-list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
a.p-list-row {
  transition: background-color 150ms var(--ease);
}
a.p-list-row:hover {
  background: var(--bg-soft);
}
.p-list-row .row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}
.p-list-row .row-main p {
  font-size: 14px;
  color: var(--text-2);
}
.p-list-row .thumb {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: var(--r-control);
  object-fit: cover;
  background: var(--raised);
}
.p-panel {
  display: grid;
  gap: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
}
.p-panel > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  cursor: pointer;
  font-weight: 500;
}
details.p-panel[open] > summary {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.p-panel .p-heading {
  margin-bottom: 0;
}
.p-message {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  border-radius: var(--r-control);
  background: var(--bg-soft);
}
.p-message small {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}

/* Catalogue */
.p-catalogue {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.p-filters {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.p-filters label {
  font-size: 13px;
}
.p-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-2);
}
.p-toolbar select {
  width: auto !important;
  min-height: 36px !important;
  padding: 4px 32px 4px 12px !important;
  font-size: 14px !important;
}
.p-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px 24px;
}
.p-products > .p-empty {
  grid-column: 1 / -1;
}
.p-product {
  display: grid;
  gap: 4px;
  align-content: start;
}
.p-product .product-image {
  aspect-ratio: 1;
  margin-bottom: 12px;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.p-product .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease);
}
.p-product:hover .product-image img {
  transform: scale(1.02);
}
.p-product small {
  font-size: 13px;
  color: var(--text-3);
}
.p-product h3 {
  font-size: 15px;
  font-weight: 500;
}
.p-product p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}
.p-product .price {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.p-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
}

/* Product detail */
.p-details {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.p-details h1 {
  margin: 8px 0 8px;
}
.p-details h2 {
  margin-bottom: 12px;
}
.p-details h2 + .p-copy {
  margin-bottom: 32px;
}
.p-gallery-main {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-panel);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.p-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.p-thumbs button {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  overflow: hidden;
  background: none;
}
.p-thumbs img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}
.p-price {
  margin: 20px 0;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.p-specs {
  display: grid;
  grid-template-columns: 140px 1fr;
  margin: 24px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.p-specs dt,
.p-specs dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.p-specs dt {
  color: var(--text-3);
}
.p-specs dd {
  font-variant-numeric: tabular-nums;
}
.p-profile-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fff;
}

/* Editor */
.p-editor {
  max-width: 880px;
}
.p-upload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.p-upload-list:empty {
  display: none;
}
.p-upload-item {
  display: grid;
  gap: 4px;
  width: 112px;
  font-size: 12px;
  color: var(--text-3);
}
.p-upload-item img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: var(--r-control);
  border: 1px solid var(--line);
}
.p-upload-item button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--neg);
  font-size: 12px;
}

/* Workspace */
.p-workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.p-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 4px;
}
.p-sidebar .p-eyebrow {
  margin-bottom: 4px;
}
.p-sidebar h2 {
  font-size: 16px;
}
.p-sidebar > p:not(.p-eyebrow) {
  font-size: 13px;
  color: var(--text-3);
}
.p-sidebar nav {
  display: grid;
  gap: 2px;
  margin: 20px 0 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.p-sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-control);
  font-size: 14px;
  color: var(--text-2);
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.p-sidebar nav a:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.p-sidebar nav a.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 500;
}
.p-sidebar nav a small {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--warn);
}
.p-sidebar .p-button {
  justify-self: start;
}
#workspace-content {
  min-width: 0;
}
#workspace-content > h2 {
  margin: 40px 0 12px;
}
.p-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.p-stat-grid > div {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.p-stat-grid span {
  font-size: 13px;
  color: var(--text-2);
}
.p-stat-grid strong {
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.p-stat-grid small {
  font-size: 12px;
  color: var(--text-3);
}
.p-stat-grid > .attention strong {
  color: var(--warn);
}
.p-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.p-split h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

/* Tables (operator screens) */
.p-table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.p-table-tools input {
  flex: 1 1 260px;
  width: auto !important;
}
.p-table-tools select {
  width: auto !important;
}
.p-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.p-table th {
  position: sticky;
  top: 0;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.p-table td {
  white-space: nowrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.p-table tr:last-child td {
  border-bottom: 0;
}
.p-table tbody tr {
  cursor: pointer;
  transition: background-color 120ms var(--ease);
}
.p-table tbody tr:hover {
  background: var(--bg-soft);
}
.p-table tbody tr:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.p-table .num {
  text-align: right;
}
.p-table .who {
  white-space: normal;
  min-width: 160px;
  line-height: 1.4;
}
.p-table .who small {
  display: block;
  margin-top: 2px;
}
.p-table .who small,
.p-table .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}
.p-table-foot {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-3);
}

/* Definition list for member details */
.p-facts {
  display: grid;
  grid-template-columns: 120px 1fr;
  font-size: 14px;
}
.p-facts dt,
.p-facts dd {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.p-facts dt {
  color: var(--text-3);
}
.p-facts dd {
  word-break: break-all;
}
.p-copybox {
  display: flex;
  gap: 8px;
}
.p-copybox input {
  font-family: var(--mono) !important;
  font-size: 12px !important;
}

/* Dialog and toast */
.p-dialog {
  width: min(100% - 32px, 600px);
  max-height: calc(100vh - 48px);
  padding: 28px;
  border: 0;
  border-radius: var(--r-panel);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 24px 64px rgb(17 24 39 / 0.18);
}
.p-dialog.wide {
  width: min(100% - 32px, 760px);
}
.p-dialog::backdrop {
  background: rgb(17 24 39 / 0.4);
}
.p-dialog[open] {
  animation: p-rise 220ms var(--ease);
}
.p-dialog .p-heading {
  align-items: center;
  margin-bottom: 16px;
}
.p-dialog h2 {
  font-size: 18px;
}
.p-dialog h3 {
  margin: 24px 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.p-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: min(92vw, 480px);
  padding: 12px 20px;
  border-radius: var(--r-control);
  background: #111827;
  color: #fff;
  font-size: 14px;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgb(17 24 39 / 0.2);
}
.p-toast:empty {
  display: none;
}

/* Sign in / sign up */
.p-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 80px;
  align-items: start;
  padding: 24px 0 40px;
}
.p-auth.register {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 600px);
}
.p-auth-aside {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}
.p-auth-aside ul {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 24px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}
.p-auth-aside li {
  display: grid;
  grid-template-columns: 32px 1fr;
}
.p-auth-aside li span {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 22px;
  color: var(--accent);
}
.p-auth-panel {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--bg);
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.04);
}
.p-auth-panel > h2 {
  margin-bottom: 8px;
}
.p-auth-panel > .p-help {
  margin-bottom: 24px;
}
.p-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.p-tabs a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 44px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 500;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.p-tabs a:hover {
  color: var(--text);
}
.p-tabs a[aria-current="page"] {
  color: var(--text);
  border-color: var(--text);
}
.p-auth-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-3);
}
.p-auth-links a {
  color: var(--text-2);
}
.p-auth-links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.p-auth-links span {
  color: var(--line-strong);
}
.p-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.p-roles label {
  position: relative;
  display: grid !important;
  gap: 2px !important;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  cursor: pointer;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.p-roles input {
  position: absolute;
  opacity: 0;
}
.p-roles small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}
.p-roles label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.p-roles label:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.p-consent {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-control);
  background: var(--bg-soft);
}
.p-consent .p-checkbox:first-child {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text) !important;
  font-weight: 500 !important;
}
.p-result {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
}
.p-result strong {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
}

/* Category grid */
.p-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
}
.p-category-grid a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.p-category-grid a:hover {
  border-color: var(--line-strong);
  background: var(--bg-soft);
}
.p-category-grid h3 {
  font-size: 14px;
  font-weight: 500;
}
.p-category-grid small {
  font-size: 12px;
  color: var(--text-3);
}
.p-category-icon {
  flex: none;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Marketing pages (korean-companies, global-sourcing) */
.p-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
  padding: 24px 0 16px;
}
.p-hero > div {
  display: grid;
  gap: 20px;
  justify-items: start;
}
.p-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.p-hero .p-search {
  width: 100%;
  margin: 8px 0 0;
}
.p-hero figure img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-panel);
}
.p-howto {
  padding: 32px 0;
  border-block: 1px solid var(--line);
}
.p-howto h2 {
  margin-bottom: 24px;
}
.p-howto ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.p-howto li {
  display: grid;
  gap: 8px;
  counter-increment: step;
}
.p-howto li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.p-howto p {
  font-size: 14px;
  color: var(--text-2);
}
.p-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.p-directory a {
  display: grid;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.p-directory a:hover {
  border-color: var(--line-strong);
  background: var(--bg-soft);
}
.p-directory p {
  font-size: 14px;
  color: var(--text-2);
}
.p-sourcing-note {
  padding: 32px;
  border-radius: var(--r-panel);
  background: var(--bg-soft);
}
.p-sourcing-note .p-heading {
  align-items: center;
  margin: 0;
}

/* Footer */
.p-footer {
  display: block;
  height: auto;
  color: var(--text);
  margin-top: 0;
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 14px;
}
.p-footer-top,
.p-footer-base {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.p-footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.p-footer-brand {
  display: grid;
  gap: 16px;
  align-content: start;
}
.p-footer-brand img {
  width: 112px;
  height: auto;
}
.p-footer-brand p {
  color: var(--text-2);
  font-size: 13px;
}
.p-footer nav {
  display: grid;
  gap: 8px;
  align-content: start;
}
.p-footer nav h2 {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
}
.p-footer a {
  margin-left: 0;
}
.p-footer nav a {
  color: var(--text-2);
}
.p-footer nav a:hover {
  color: var(--text);
}
.p-footer-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}

/* ───────── Home ───────── */

.h-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  width: min(100% - 2 * var(--gutter), var(--wrap));
  min-height: min(calc(100svh - 64px), 760px);
  margin-inline: auto;
}
.h-hero-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
  padding: 48px 0;
}
.h-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-3);
}
.h-kicker b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}
.h-hero h1 {
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.h-lead {
  max-width: 30rem;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
}
.h-search {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
  height: 52px;
  padding: 4px 4px 4px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.h-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.h-search svg {
  flex: none;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.5;
}
.h-search input[name="q"] {
  flex: 1;
  min-height: 0 !important;
  height: 100%;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.h-search .p-button {
  height: 42px;
}
.h-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--text-3);
}
.h-paths a {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 150ms var(--ease);
}
.h-paths a:hover {
  text-decoration-color: var(--accent);
}
.h-globe {
  position: relative;
  align-self: stretch;
  min-height: 520px;
  cursor: grab;
}
.h-globe:active {
  cursor: grabbing;
}
.h-globe canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.h-globe.ready canvas {
  opacity: 1;
}
.globe-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.globe-label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 6px;
  margin: -24px 0 0 6px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.85);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
}
.globe-label.home {
  background: var(--text);
  color: #fff;
}
.h-ticket {
  position: absolute;
  left: 0;
  bottom: 56px;
  width: 300px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: 0 8px 24px rgb(17 24 39 / 0.08);
  font-size: 13px;
  pointer-events: none;
}
.h-ticket .t-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.h-ticket .t-head span:last-child {
  font-family: var(--mono);
}
.h-ticket strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
}
.h-ticket dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.h-ticket dt {
  color: var(--text-3);
}
.h-ticket dd {
  margin: 0;
  text-align: right;
}
.h-ticket .t-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--text-3);
}
.globe-hint {
  position: absolute;
  right: 0;
  bottom: 24px;
  font-size: 12px;
  color: var(--text-3);
}
.h-section {
  padding: 96px 0;
}
.h-section + .h-section {
  padding-top: 0;
}
.h-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-bottom: 32px;
}
.h-head h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: -0.02em;
}
.h-head p {
  margin-top: 8px;
  color: var(--text-2);
}
.h-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.h-door {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--text);
  color: #fff;
}
.h-door img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}
.h-door:hover img {
  transform: scale(1.02);
}
.h-door > div {
  grid-area: 1 / 1;
  align-self: end;
  display: grid;
  gap: 8px;
  padding: 32px;
  background: linear-gradient(180deg, rgb(10 18 32 / 0) 0%, rgb(10 18 32 / 0.72) 100%);
}
.h-door span {
  font-family: var(--mono);
  font-size: 12px;
  color: rgb(255 255 255 / 0.75);
}
.h-door h3 {
  font-size: 28px;
  font-weight: 600;
}
.h-door p {
  max-width: 26rem;
  color: rgb(255 255 255 / 0.85);
}
.h-door em {
  margin-top: 8px;
  font-style: normal;
  font-size: 14px;
  font-weight: 500;
}
.h-band {
  padding: 96px 0;
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}
.h-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 10px;
  background: var(--raised);
}
.h-switch button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.h-switch [aria-selected="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.08);
}
.h-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: flow;
  border-top: 1px solid var(--line-strong);
}
.h-flow li {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px 24px 0 0;
  counter-increment: flow;
}
.h-flow li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.h-flow li::before {
  content: counter(flow, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.h-flow b {
  font-size: 16px;
  font-weight: 600;
}
.h-flow p {
  font-size: 14px;
  color: var(--text-2);
}
.h-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 96px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.h-cta h2 {
  font-size: 24px;
}
.h-cta p {
  margin-top: 8px;
  color: var(--text-2);
}

@keyframes p-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Responsive */
@media (max-width: 1000px) {
  .p-catalogue,
  .p-workspace,
  .p-details,
  .p-auth,
  .p-auth.register,
  .p-hero,
  .p-split {
    grid-template-columns: 1fr;
  }
  .p-auth {
    gap: 32px;
  }
  .p-filters,
  .p-sidebar {
    position: static;
  }
  .p-sidebar nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    margin: 16px 0;
  }
  .p-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .p-directory {
    grid-template-columns: 1fr 1fr;
  }
  .h-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .h-hero-copy {
    padding: 48px 0 0;
  }
  .h-globe {
    min-height: 420px;
  }
  .h-flow {
    grid-template-columns: 1fr 1fr;
    row-gap: 32px;
  }
  .h-flow li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .p-footer-top {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .p-header {
    gap: 16px;
  }
  .p-menu {
    display: block;
  }
  #platform-nav {
    position: fixed;
    inset: 64px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgb(17 24 39 / 0.08);
  }
  .p-menu-open #platform-nav {
    display: flex;
  }
  .p-nav-links {
    flex-direction: column;
    align-items: stretch;
  }
  .p-nav-links a {
    height: 44px;
  }
  .p-nav-account {
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .p-form-grid,
  .p-roles,
  .p-directory,
  .p-howto ol,
  .h-doors {
    grid-template-columns: 1fr;
  }
  .p-auth-panel {
    padding: 24px 20px;
  }
  .p-search {
    flex-direction: column;
  }
  .p-specs {
    grid-template-columns: 112px 1fr;
  }
  .h-hero h1 {
    font-size: 36px;
  }
  .h-lead {
    font-size: 16px;
  }
  .h-globe {
    min-height: 340px;
  }
  .h-ticket {
    position: relative;
    bottom: auto;
    width: 100%;
    margin-top: 300px;
  }
  .globe-hint {
    display: none;
  }
  .h-section,
  .h-band {
    padding: 64px 0;
  }
  .h-flow {
    grid-template-columns: 1fr;
  }
  .h-flow li,
  .h-flow li + li {
    padding: 20px 0 0;
    border-left: 0;
  }
  .h-cta {
    padding: 24px;
  }
  .p-footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .p-table th:nth-child(n + 4),
  .p-table td:nth-child(n + 4) {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .platform *,
  .platform *::before {
    transition-duration: 0ms !important;
    animation: none !important;
  }
}

.p-hero .p-actions {
  gap: 8px 24px;
}

/* style.css fades page changes through near-black; keep transitions on white. */
::view-transition {
  background: #fff;
}
