:root {
  --ink: #10212c;
  --muted: #596877;
  --line: #b7cbc8;
  --paper: #dfeae8;
  --panel: #fbfffd;
  --panel-soft: #eef7f4;
  --sea: #0b8a7f;
  --sea-dark: #073f45;
  --aqua: #13c6b8;
  --blue: #1d4ed8;
  --sky: #0284c7;
  --green: #147846;
  --amber: #a76518;
  --gold: #c98518;
  --coral: #d94f56;
  --copper: #9f4f12;
  --plum: #5b21b6;
  --red: #b91c1c;
  --violet: #6d28d9;
  --navy: #0a2433;
  --carbon: #0d1722;
  --steel: #284756;
  --shadow: 0 22px 54px rgba(11, 36, 50, 0.16);
  --shadow-strong: 0 20px 34px rgba(7, 63, 69, 0.22);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(10, 36, 51, 0.12) 0 18%, transparent 18% 100%),
    linear-gradient(156deg, rgba(11, 138, 127, 0.18) 0 28%, rgba(29, 78, 216, 0.08) 28% 52%, transparent 52%),
    linear-gradient(24deg, transparent 0 58%, rgba(201, 133, 24, 0.14) 58% 74%, transparent 74%),
    linear-gradient(180deg, #f2f7f5 0%, #dfeae8 48%, #d5e4e2 100%),
    var(--paper);
  color: var(--ink);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--sea-dark);
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef3f0;
}

.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(9, 29, 42, 0.99), rgba(7, 63, 69, 0.98) 48%, rgba(13, 23, 34, 0.995)),
    var(--navy);
  color: #fff;
  backdrop-filter: blur(16px);
  box-shadow: 12px 0 34px rgba(13, 23, 34, 0.18);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 850;
}

.brand-logo {
  display: block;
  width: 116px;
  height: auto;
  max-height: 42px;
  object-fit: contain;
}

.sidebar .brand-row {
  align-items: flex-start;
}

.sidebar .brand-logo {
  width: 128px;
  margin-top: 2px;
}

.brand-row strong,
.brand-row span {
  display: block;
}

.sidebar .brand-row span,
.sidebar .panel-kicker,
.sidebar .search span,
.sidebar .muted,
.sidebar .pulse-row {
  color: rgba(255, 255, 255, 0.72);
}

.sidebar .pulse-row strong,
.sidebar .brand-row strong {
  color: #fff;
}

.sidebar .side-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .ghost-link {
  color: #fff;
}

.brand-row span,
.eyebrow,
.panel-kicker,
.search span,
.inline-select span,
.stack-form label,
.diagnostic-form label,
.request-composer label,
.auth-form label,
.setup-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.small {
  font-size: 13px;
}

.search {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(76, 117, 123, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 251, 0.98));
  color: var(--ink);
  outline: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(11, 138, 127, 0.15), 0 8px 18px rgba(10, 36, 51, 0.08);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-button,
.filter,
.ghost-button,
.primary-button,
.mini-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-button {
  width: 100%;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
  font-weight: 780;
}

.nav-button:hover,
.nav-button.active {
  background: #e8f4f0;
  border-color: #c9e5dc;
  color: var(--sea-dark);
}

.sidebar .nav-button {
  color: rgba(255, 255, 255, 0.86);
}

.sidebar .nav-button:hover,
.sidebar .nav-button.active {
  background:
    linear-gradient(135deg, rgba(19, 198, 184, 0.18), rgba(29, 78, 216, 0.18));
  border-color: rgba(125, 211, 252, 0.32);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 20px rgba(0, 0, 0, 0.16);
  transform: translateX(2px);
}

.side-panel,
.detail-panel,
.advisor-output,
.map-stage,
.ddt-console,
.auth-card {
  border: 1px solid rgba(76, 117, 123, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 251, 249, 0.94)),
    var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82) inset, var(--shadow);
}

.detail-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  scrollbar-width: thin;
}

.side-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.side-panel.compact {
  margin-top: auto;
}

.pulse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.pulse-row strong {
  color: var(--ink);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(7, 63, 69, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(218, 244, 239, 0.86) 52%, rgba(235, 244, 255, 0.82)),
    var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset, 0 18px 38px rgba(10, 36, 51, 0.1);
}

.eyebrow {
  margin: 0 0 5px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.brand-row strong {
  font-family: Sora, Manrope, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.topbar h1 {
  font-family: Sora, Manrope, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.1;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 760;
}

.top-actions,
.console-actions,
.filter-row,
.feed-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-color: rgba(6, 78, 88, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(135deg, #0b8a7f, #1d4ed8 58%, #183a74);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.32) inset, 0 -2px 0 rgba(7, 63, 69, 0.36) inset, var(--shadow-strong);
}

.primary-button:hover,
.link-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(135deg, #087a72, #1e40af 58%, #122b5c);
  transform: translateY(-2px);
}

.primary-button,
.ghost-button,
.mini-button,
.link-button,
.action-ribbon {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.primary-button::before,
.ghost-button::before,
.mini-button::before,
.link-button::before,
.action-ribbon::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.72) 34%, transparent 48%),
    linear-gradient(135deg, rgba(18, 183, 176, 0.62), rgba(37, 99, 235, 0.35), rgba(217, 119, 6, 0.52));
  opacity: 0;
  transform: translateX(-42%);
  transition: opacity 180ms ease, transform 260ms ease;
}

.primary-button:hover::before,
.ghost-button:hover::before,
.mini-button:hover::before,
.link-button:hover::before,
.action-ribbon:hover::before {
  opacity: 0.38;
  transform: translateX(0);
}

.ghost-button,
.filter,
.mini-button {
  padding: 0 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(224, 242, 254, 0.22)),
    linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(234, 242, 255, 0.92));
  border-color: rgba(7, 63, 69, 0.2);
  color: #073f45;
  font-weight: 780;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset, 0 -1px 0 rgba(7, 63, 69, 0.12) inset, 0 8px 18px rgba(10, 36, 51, 0.08);
}

.ghost-button:hover,
.filter:hover,
.filter.active,
.mini-button:hover {
  border-color: rgba(29, 78, 216, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.18)),
    linear-gradient(135deg, rgba(204, 251, 241, 0.98), rgba(255, 247, 237, 0.96));
  color: var(--sea-dark);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset, 0 -2px 0 rgba(7, 63, 69, 0.14) inset, 0 13px 24px rgba(10, 36, 51, 0.14);
  transform: translateY(-1px);
}

.filter.active {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(14, 165, 233, 0.14));
}

.ghost-link {
  text-decoration: none;
  font-weight: 760;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.view-grid > * {
  min-width: 0;
}

.atlas-grid,
.market-grid,
.network-grid,
.knowledge-grid,
.data-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
}

.ddt-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
}

.market-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.map-stage,
.ddt-console {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.inline-select {
  display: grid;
  min-width: 220px;
  gap: 7px;
}

.map-wrap {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(209, 243, 234, 0.72), rgba(227, 238, 255, 0.88)),
    #e9f5f4;
}

.earth-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #1f2937;
}

.satellite-map-wrap {
  background: #1f2937;
}

.marker-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.map-fallback {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(23, 33, 43, 0.78);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
}

.map-fallback[hidden] {
  display: none;
}

.project-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.24);
  transform: translate(-50%, -50%);
}

.project-marker::after {
  content: attr(data-short);
  position: absolute;
  left: 20px;
  top: -9px;
  min-width: max-content;
  max-width: 180px;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.project-marker:hover::after,
.project-marker.active::after {
  opacity: 1;
  transform: translateY(0);
}

.project-marker[data-stage="Operating"] {
  background: var(--green);
}

.project-marker[data-stage="Commissioning"] {
  background: var(--amber);
}

.project-marker[data-stage="Planning"] {
  background: var(--violet);
}

.fusion-map-pin {
  display: grid;
  width: 28px !important;
  height: 28px !important;
  margin-left: -14px !important;
  margin-top: -14px !important;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.fusion-map-pin.stage-operating {
  background: var(--green);
}

.fusion-map-pin.stage-commissioning {
  background: var(--amber);
}

.fusion-map-pin.stage-planning {
  background: var(--violet);
}

.fusion-map-pin.active {
  transform: scale(1.22);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.38), 0 12px 26px rgba(0, 0, 0, 0.38);
}

.leaflet-container {
  font: inherit;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: var(--ink);
}

.project-strip,
.category-grid,
.metric-board,
.feed,
.mini-feed,
.detail-stack,
.source-grid,
.data-stats {
  display: grid;
  gap: 10px;
}

.project-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.project-card,
.category-card,
.metric-card,
.feed-card,
.finding,
.supplier-match,
.recent-card {
  border: 1px solid rgba(76, 117, 123, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 248, 0.94)),
    var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.84) inset, 0 12px 26px rgba(10, 36, 51, 0.08);
}

.project-card,
.category-card,
.metric-card,
.feed-card,
.recent-card {
  padding: 14px;
}

.data-card,
.source-card {
  padding: 14px;
  border: 1px solid rgba(76, 117, 123, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 248, 0.94)),
    var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.84) inset, 0 12px 26px rgba(10, 36, 51, 0.08);
}

.data-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(239, 246, 255, 0.84)),
    var(--panel);
}

.data-intro p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.data-intro-steps {
  display: grid;
  gap: 8px;
}

.data-intro-steps span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.data-intro-steps b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--sea);
  color: #fff;
  font-size: 12px;
}

.data-card {
  margin-top: 14px;
}

.source-grid,
.country-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-card,
.country-card {
  display: grid;
  gap: 9px;
}

.country-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.source-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.48;
}

.country-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.data-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.source-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.source-line a {
  font-weight: 760;
}

.compact-head {
  margin-bottom: 10px;
}

.compact-list li {
  font-size: 13px;
}

.template-links {
  margin-top: 10px;
}

.light-link {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(239, 246, 255, 0.92));
  color: var(--sea-dark);
}

.project-card,
.category-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 138px;
  text-align: left;
}

.project-card.active,
.category-card.active {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.project-card p,
.category-card p,
.feed-card p,
.detail-panel p,
.advisor-output p {
  color: var(--muted);
  line-height: 1.48;
}

.badge-row,
.stat-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(7, 63, 69, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(230, 248, 244, 0.92));
  color: #073f45;
  font-size: 12px;
  font-weight: 780;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.badge.green {
  border-color: rgba(21, 128, 61, 0.22);
  background: rgba(21, 128, 61, 0.08);
  color: var(--green);
}

.badge.amber {
  border-color: rgba(183, 121, 31, 0.24);
  background: rgba(183, 121, 31, 0.08);
  color: var(--amber);
}

.badge.red {
  border-color: rgba(190, 18, 60, 0.2);
  background: rgba(190, 18, 60, 0.07);
  color: var(--red);
}

.detail-panel,
.advisor-output {
  position: sticky;
  top: 24px;
  padding: 18px;
}

.detail-hero {
  display: grid;
  gap: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  padding: 10px 12px;
  border-left: 3px solid var(--sea);
  border-radius: 0 var(--radius) var(--radius) 0;
  background:
    linear-gradient(90deg, rgba(204, 251, 241, 0.22), rgba(255, 255, 255, 0.9)),
    #f8faf8;
  color: #34404d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.drawer {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.drawer summary {
  cursor: pointer;
  font-weight: 800;
}

.stack-form,
.diagnostic-form {
  display: grid;
  gap: 10px;
}

.stack-form label,
.diagnostic-form label,
.auth-form label,
.setup-form label {
  display: grid;
  gap: 7px;
}

.check-row {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.check-row input {
  width: auto;
  min-height: 0;
}

.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.market-directory {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.supplier-results-panel {
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.72)),
    var(--panel);
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.08);
}

.market-section-title,
.market-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.market-section-title h3 {
  margin-bottom: 0;
}

.market-section-title > span {
  max-width: 360px;
  text-align: right;
}

.taxonomy-shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.taxonomy-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.82)),
    #fff;
  color: var(--ink);
  text-align: left;
}

.taxonomy-card:hover,
.category-card:hover {
  border-color: rgba(15, 118, 110, 0.34);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
}

.taxonomy-card .feed-meta,
.taxonomy-card .tag-row {
  min-width: 0;
}

.taxonomy-card strong,
.taxonomy-card .badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-action {
  align-self: end;
  color: var(--sea-dark);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.supplier-table-wrap {
  max-height: 520px;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.supplier-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.35;
}

.supplier-table th,
.supplier-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.supplier-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef8f5;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.supplier-table tbody tr:hover,
.supplier-table tbody tr.active {
  background: #f4fbf8;
}

.compare-check {
  width: 18px;
  min-height: 18px;
}

.compare-toggle.selected {
  border-color: rgba(21, 128, 61, 0.24);
  background: rgba(21, 128, 61, 0.1);
  color: var(--green);
}

.supplier-name {
  font-weight: 780;
}

.supplier-table .mini-button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.supplier-table .product-cell {
  max-width: 260px;
}

.supplier-table .product-cell .muted.small,
.supplier-table .source-line {
  display: -webkit-box;
  max-width: 230px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.supplier-table .source-line {
  font-size: 12px;
}

.score {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--green);
  font-weight: 800;
}

.supplier-rank {
  min-width: 42px;
  padding: 4px 9px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(37, 99, 235, 0.13));
  color: var(--sea-dark);
}

.market-results-summary,
.compare-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.market-results-summary {
  border-color: rgba(15, 118, 110, 0.2);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.82)),
    #fff;
}

.market-counts,
.market-summary-actions,
.market-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-chip-zone {
  display: grid;
  gap: 10px;
}

.market-chip-group {
  display: grid;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
}

.market-chip-group strong {
  color: var(--sea-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.stat-pill,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--sea-dark);
  font-size: 12px;
  font-weight: 780;
}

.stat-pill b {
  color: var(--ink);
  font-size: 15px;
}

.filter-chip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
}

.filter-chip:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(224, 242, 254, 0.88);
}

.market-results-summary p,
.compare-panel p {
  margin: 0;
  color: var(--muted);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compare-insight {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(18, 183, 176, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(255, 251, 235, 0.82)),
    var(--panel);
}

.compare-insight h3 {
  margin: 6px 0;
  font-size: 18px;
}

.compare-score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compare-score-strip span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--sea-dark);
  font-weight: 850;
}

.compare-score-strip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.compare-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.compare-card p {
  color: var(--ink);
}

.compare-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compare-metrics span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.compare-metrics b {
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
}

.source-cell {
  display: grid;
  gap: 5px;
  min-width: 130px;
}

.source-cell a {
  font-weight: 760;
  overflow-wrap: anywhere;
}

.top-supplier-card {
  display: grid;
  width: 100%;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(239, 246, 255, 0.9)),
    var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.08);
}

.top-supplier-card:hover {
  border-color: var(--sea);
  transform: translateY(-1px);
}

.top-supplier-card strong {
  font-family: "Space Grotesk", Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 21px;
  line-height: 1.05;
}

.top-supplier-card small {
  color: var(--muted);
  line-height: 1.4;
}

.mini-stat-row,
.supplier-contact-grid {
  display: grid;
  gap: 8px;
}

.mini-stat-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-stat-row span,
.supplier-contact-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mini-stat-row b,
.supplier-contact-grid b {
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
}

.supplier-showcase {
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.78)),
    var(--panel);
}

.supplier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supplier-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-contact-grid a {
  overflow-wrap: anywhere;
  font-weight: 760;
}

.product-showcase {
  display: grid;
  gap: 8px;
}

.metric-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.ddt-tool-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ddt-mode-button {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(7, 63, 69, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.18)),
    linear-gradient(135deg, rgba(225, 247, 243, 0.98), rgba(231, 240, 255, 0.92)),
    var(--panel);
  color: var(--sea-dark);
  text-align: left;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.84) inset, 0 10px 20px rgba(10, 36, 51, 0.08);
}

.ddt-mode-button strong,
.ddt-mode-button span {
  display: block;
}

.ddt-mode-button strong {
  font-family: "Space Grotesk", Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
}

.ddt-mode-button span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.ddt-mode-button:hover,
.ddt-mode-button.active {
  border-color: rgba(29, 78, 216, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.16)),
    linear-gradient(135deg, rgba(183, 255, 239, 0.92), rgba(215, 228, 255, 0.96)),
    var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset, 0 -2px 0 rgba(7, 63, 69, 0.12) inset, 0 14px 28px rgba(10, 36, 51, 0.16);
  transform: translateY(-2px);
}

.ddt-mode-button.active {
  box-shadow: 0 0 0 3px rgba(11, 138, 127, 0.14), 0 1px 0 rgba(255, 255, 255, 0.86) inset, 0 16px 30px rgba(10, 36, 51, 0.16);
}

.ddt-mode-panel {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.76)),
    var(--panel);
}

.ddt-mode-panel h3,
.ddt-mode-panel p {
  margin-bottom: 0;
}

.diagnostic-form .ddt-question-label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.35;
  text-transform: none;
}

.diagnostic-form .ddt-question-label span {
  color: var(--sea-dark);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.diagnostic-form .ddt-question-label strong {
  font-family: "Space Grotesk", Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.15;
}

.metric-input {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
}

.advisor-output {
  min-height: 540px;
}

.finding {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.finding.has-signal {
  border-color: rgba(15, 118, 110, 0.24);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(239, 246, 255, 0.82)),
    var(--panel);
}

.finding.empty-signal {
  border-color: rgba(203, 218, 215, 0.82);
  background: rgba(248, 250, 248, 0.72);
}

.ddt-action-list li,
.ddt-reference-card {
  display: grid;
  gap: 8px;
}

.ddt-result-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.ddt-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.32);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(37, 99, 235, 0.88));
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.ddt-inline-action:hover,
.clickable-badge:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
}

.ddt-inline-action.secondary {
  background:
    linear-gradient(135deg, rgba(28, 78, 216, 0.92), rgba(14, 116, 144, 0.86));
}

.ddt-reference-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.ddt-reference-card p {
  margin: 6px 0 0;
}

.ddt-reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.clickable-badge {
  cursor: pointer;
  color: var(--sea-dark);
}

.empty-note {
  margin-bottom: 0;
}

.confidence {
  display: grid;
  gap: 7px;
}

.confidence-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebe8;
}

.confidence-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sea), var(--blue));
}

.request-composer {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 251, 248, 0.98)),
    var(--panel);
}

.market-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(239, 253, 249, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 18px 38px rgba(8, 47, 73, 0.08);
}

.market-search input {
  min-height: 52px;
  border-color: rgba(15, 118, 110, 0.34);
  font-size: 16px;
}

.market-search .primary-button {
  min-height: 52px;
}

.ddt-guidance {
  margin-bottom: 4px;
}

.ddt-action-row {
  align-items: stretch;
  margin-top: 2px;
}

.ddt-action-row .primary-button,
.ddt-action-row .ghost-button {
  min-height: 42px;
}

.ddt-question-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.ddt-question-wrap textarea {
  min-height: 128px;
  border-color: rgba(15, 118, 110, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.72)),
    #fff;
  font-size: 15px;
  line-height: 1.5;
}

.ddt-loading {
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.84)),
    var(--panel);
}

.ddt-loading h2::after {
  content: "";
  display: inline-block;
  width: 1.1em;
  margin-left: 2px;
  animation: thinkingDots 1.1s steps(4, end) infinite;
}

.ddt-companion {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 247, 248, 0.82)),
    #fff;
}

.drop-core {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 46px;
  height: 62px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 58% 58% 62% 62% / 70% 70% 42% 42%;
  background:
    radial-gradient(circle at 38% 22%, rgba(255, 255, 255, 0.95) 0 14%, transparent 15%),
    linear-gradient(145deg, rgba(53, 155, 237, 0.95), rgba(15, 118, 110, 0.88));
  box-shadow: inset 0 -10px 18px rgba(11, 81, 76, 0.22), 0 14px 24px rgba(37, 99, 235, 0.16);
  transform: translate(-50%, -50%) rotate(45deg);
}

.drop-n {
  position: absolute;
  left: 50%;
  top: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  transform: translate(-50%, -50%);
}

.drop-particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.34);
  opacity: 0;
}

.drop-particle.p1 {
  left: 18px;
  top: 34px;
}

.drop-particle.p2 {
  right: 16px;
  top: 72px;
}

.drop-particle.p3 {
  left: 30px;
  bottom: 36px;
}

.ddt-companion.thinking .drop-core {
  animation: dropPulse 1.15s ease-in-out infinite;
}

.ddt-companion.thinking .drop-particle {
  animation: particleRise 1.2s ease-in-out infinite;
  opacity: 0.8;
}

.ddt-companion.success {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.96), rgba(219, 234, 254, 0.82));
}

.ddt-companion.success .drop-core {
  background:
    radial-gradient(circle at 38% 22%, rgba(255, 255, 255, 0.96) 0 14%, transparent 15%),
    linear-gradient(145deg, rgba(20, 184, 166, 0.95), rgba(37, 99, 235, 0.86));
}

.ddt-companion.success .drop-particle {
  animation: nuclearLift 1.8s ease-out 1;
}

.ddt-companion.uncertain .drop-core,
.ddt-companion.error .drop-core {
  background:
    radial-gradient(circle at 38% 22%, rgba(255, 255, 255, 0.95) 0 14%, transparent 15%),
    linear-gradient(145deg, rgba(183, 121, 31, 0.9), rgba(53, 155, 237, 0.78));
}

.ddt-companion.error .drop-particle {
  background: rgba(190, 18, 60, 0.4);
  animation: fizzOut 0.9s ease-out 1;
}

@keyframes dropPulse {
  0%, 100% { transform: translate(-50%, -50%) rotate(45deg) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(45deg) scale(1.06); }
}

@keyframes particleRise {
  0% { opacity: 0.1; transform: translateY(8px); }
  50% { opacity: 0.85; }
  100% { opacity: 0.1; transform: translateY(-12px); }
}

@keyframes nuclearLift {
  0% { opacity: 0.85; transform: translateY(8px) scale(0.8); }
  100% { opacity: 0; transform: translateY(-42px) scale(1.4); }
}

@keyframes fizzOut {
  0% { opacity: 0.9; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(1.7); }
}

@keyframes thinkingDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

.community-rooms,
.community-welcome,
.knowledge-grid-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.community-welcome {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-rooms {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-welcome article,
.community-rooms article,
.knowledge-card,
.knowledge-hero {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.community-welcome article:first-child {
  border-color: rgba(15, 118, 110, 0.26);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(224, 242, 254, 0.82)),
    var(--panel);
}

.community-welcome article:last-child {
  border-color: rgba(217, 119, 6, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.9), rgba(255, 241, 242, 0.76)),
    var(--panel);
}

.community-rooms article {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.76)),
    var(--panel);
}

.community-welcome p,
.community-rooms p,
.knowledge-card p,
.knowledge-hero p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.48;
}

.feed-card {
  border-left: 4px solid rgba(15, 118, 110, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 252, 0.95)),
    var(--panel);
}

.feed-card.community-empty {
  border-left-color: var(--gold);
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reaction-button {
  gap: 7px;
  border-color: rgba(15, 118, 110, 0.2);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(239, 246, 255, 0.9));
  color: var(--sea-dark);
  box-shadow: 0 7px 16px rgba(15, 118, 110, 0.07);
}

.reaction-button[aria-pressed="true"] {
  border-color: rgba(15, 118, 110, 0.35);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(20, 184, 166, 0.13));
  color: var(--sea-dark);
}

.reaction-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--sea-dark);
  font-size: 14px;
  line-height: 1;
}

.connect-button .reaction-icon {
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
}

.you-button {
  border-color: rgba(217, 119, 6, 0.24);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(224, 242, 254, 0.9));
  color: var(--copper);
}

.knowledge-grid-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-hero {
  margin-bottom: 14px;
  border-color: rgba(37, 99, 235, 0.2);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(236, 253, 245, 0.88)),
    var(--panel);
}

.knowledge-match {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  border-left: 3px solid rgba(15, 118, 110, 0.42);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(240, 253, 250, 0.74);
}

.knowledge-match strong {
  color: var(--sea-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.knowledge-match p {
  margin: 0;
}

.market-search label {
  display: grid;
  gap: 7px;
}

.market-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.request-composer .wide {
  grid-column: 1 / -1;
}

.feed-card {
  display: grid;
  gap: 8px;
}

.network-panel {
  max-height: none;
}

.profile-card,
.directory-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.profile-hero,
.profile-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-inline p,
.profile-card p,
.directory-card p {
  margin-bottom: 0;
}

.small-inline {
  margin-bottom: 6px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: #e8f4f0;
  color: var(--sea-dark);
  font-weight: 850;
}

.profile-hero .avatar {
  width: 64px;
  height: 64px;
}

.comment .avatar,
.small-inline .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.directory-list {
  display: grid;
  gap: 10px;
}

.feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.comment-thread {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.comment {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #f8faf8;
}

.comment strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.comment-form input {
  min-height: 36px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  max-width: 380px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 720;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 24px;
  box-shadow: var(--shadow);
}

.setup-card {
  width: min(100%, 980px);
}

.auth-card h1 {
  margin: 20px 0 10px;
}

.auth-form,
.setup-form,
.setup-form section {
  display: grid;
  gap: 12px;
}

.setup-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.setup-form section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.setup-form button {
  grid-column: 1 / -1;
}

.alert {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(190, 18, 60, 0.2);
  border-radius: var(--radius);
  background: rgba(190, 18, 60, 0.06);
  color: var(--red);
  font-weight: 720;
}

.auth-link {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .atlas-grid,
  .market-grid,
  .network-grid,
  .knowledge-grid,
  .data-grid,
  .ddt-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel,
  .advisor-output {
    position: static;
  }

  .project-strip,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-panel {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .section-head,
  .market-section-title,
  .market-summary-top {
    align-items: stretch;
    flex-direction: column;
  }

  .market-section-title > span {
    max-width: none;
    text-align: left;
  }

  .top-actions button,
  .filter-row button,
  .inline-select {
    flex: 1;
    min-width: 0;
  }

  .map-wrap {
    min-height: 330px;
  }

  .project-strip,
  .category-grid,
  .taxonomy-shelf,
  .metric-board,
  .market-filter-grid,
  .community-welcome,
  .community-rooms,
  .knowledge-grid-list,
  .source-grid,
  .country-grid,
  .data-stats,
  .ddt-tool-switch,
  .market-search,
  .compare-grid,
  .compare-score-strip,
  .data-intro,
  .mini-stat-row,
  .supplier-contact-grid,
  .request-composer,
  .stat-grid,
  .setup-form {
    grid-template-columns: 1fr;
  }

  .ddt-question-wrap {
    grid-template-columns: 1fr;
  }

  .ddt-companion {
    min-height: 82px;
  }
}

@media (max-width: 470px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .workspace,
  .sidebar,
  .auth-body {
    padding: 14px;
  }

  h1 {
    font-size: 30px;
  }

  .map-stage,
  .ddt-console,
  .detail-panel,
  .advisor-output,
  .auth-card {
    padding: 14px;
  }
}
