:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #eef2f5;
  --ink: #151922;
  --muted: #66707d;
  --line: #d7dde5;
  --line-strong: #b8c0cb;
  --graphite: #20242b;
  --graphite-2: #2d333d;
  --orange: #f36b21;
  --orange-dark: #bf4519;
  --red: #b5362d;
  --teal: #168b88;
  --green: #2e8540;
  --amber: #c58a17;
  --blue: #2f6fbb;
  --shadow: 0 16px 40px rgba(20, 25, 34, 0.12);
  --radius: 8px;
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(32, 36, 43, 0.08), transparent 280px),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: var(--graphite);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand span,
.meta,
.muted {
  color: var(--muted);
}

.sidebar .brand span {
  color: rgba(255, 255, 255, 0.68);
}

.nav-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.nav-item-with-badge .nav-count {
  margin-left: auto;
}

.nav-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.nav-item,
.bottom-item {
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  text-align: left;
}

.nav-item svg,
.bottom-item svg,
.icon-button svg,
.primary-button svg,
.secondary-button svg,
.panel-title svg,
.search-field svg,
.meta svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.is-active {
  box-shadow: inset 3px 0 0 var(--orange);
}

.mobile-top,
.bottom-nav {
  display: none;
}

.is-hidden {
  display: none !important;
}

.account-box {
  display: grid;
  gap: 8px;
}

.account-summary {
  min-height: 60px;
  width: 100%;
  padding: 8px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.account-summary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.account-summary strong,
.account-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.64);
}

.mini-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.main-content {
  min-width: 0;
  padding: 28px;
  padding-bottom: 72px;
}

.workspace-hero {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  background: var(--graphite);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  grid-template-areas: "copy actions";
  gap: 18px;
  align-items: end;
  padding: 26px;
  background:
    linear-gradient(90deg, rgba(20, 24, 30, 0.5), rgba(20, 24, 30, 0.88)),
    linear-gradient(0deg, rgba(20, 24, 30, 0.72), rgba(20, 24, 30, 0));
}

.hero-copy {
  grid-area: copy;
  max-width: 650px;
}

.hero-copy h1 {
  margin: 4px 0 8px;
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.section-head h2,
.modal-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tabbar,
.segmented {
  min-height: 44px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.compose-type-tabs {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.compose-type-tabs .segment {
  flex: 0 0 auto;
}

.tab,
.segment {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab.is-active,
.segment.is-active {
  background: var(--graphite);
  color: #fff;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.check-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field.compact {
  min-width: 150px;
}

.field input,
.field select,
.field textarea,
.search-field {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.field textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-field:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(243, 107, 33, 0.14);
}

.search-field {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-field input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  min-height: 40px;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  padding: 0 16px;
  color: #fff;
  background: var(--orange);
}

.primary-button:hover {
  background: var(--orange-dark);
}

.secondary-button {
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.icon-button {
  width: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.icon-button.accent {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.wide {
  width: 100%;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.activity-list,
.content-stack,
.job-list,
.order-board,
.moderation-list,
.publication-list {
  display: grid;
  gap: 12px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.news-grid > .empty-state {
  grid-column: 1 / -1;
}

.news-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(22, 27, 35, 0.06);
}

.news-card-media {
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #eef1f4;
  color: #59636f;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-media.is-placeholder svg {
  width: 38px;
  height: 38px;
}

.news-card-body {
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.news-card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.news-card-body > p {
  margin: 0 0 16px;
  overflow: hidden;
  display: -webkit-box;
  color: #3b424c;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.news-card .card-foot {
  margin-top: auto;
  flex-wrap: wrap;
}

.item-card,
.panel,
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.item-card {
  padding: 16px;
  box-shadow: 0 8px 22px rgba(22, 27, 35, 0.06);
}

.item-card h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.item-card p {
  margin: 0;
  color: #3b424c;
  line-height: 1.55;
}

.card-head,
.card-foot,
.panel-title,
.avatar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.label-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-title {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.content-type,
.pill {
  min-height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.editorial-badge,
.official-profile-label,
.demo-profile-label {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(47, 111, 187, 0.28);
  border-radius: 999px;
  color: #224f84;
  background: #f3f8fd;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.editorial-badge svg {
  width: 15px;
  height: 15px;
}

.demo-profile-label {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid rgba(171, 99, 16, 0.28);
  border-radius: 999px;
  color: #7a450b;
  background: #fff8eb;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.demo-profile-label svg {
  width: 14px;
  height: 14px;
}

.official-profile-label {
  min-height: 22px;
  padding: 0 7px;
  color: #0c5d5a;
  border-color: rgba(22, 139, 136, 0.25);
  background: #f1faf9;
  font-size: 11px;
}

.content-type.question,
.pill.teal {
  color: #0c5d5a;
  background: rgba(22, 139, 136, 0.13);
}

.content-type.news {
  color: #8f211b;
  background: rgba(181, 54, 45, 0.14);
}

.content-type.listing,
.pill.amber {
  color: #744d08;
  background: rgba(197, 138, 23, 0.18);
}

.content-type.job {
  color: #224f84;
  background: rgba(47, 111, 187, 0.14);
}

.content-type.order {
  color: #813f12;
  background: rgba(243, 107, 33, 0.15);
}

.content-type.resume {
  color: #1f6031;
  background: rgba(46, 133, 64, 0.14);
}

.pill.red {
  color: #8f211b;
  background: rgba(181, 54, 45, 0.14);
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.contact-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 700;
}

.contact-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.insight-column,
.admin-grid,
.profile-layout,
.split-layout {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 16px;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.market-panel .panel-title {
  align-items: center;
}

.market-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.currency-list,
.commodity-list {
  display: grid;
}

.currency-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.currency-row:first-child {
  border-top: 0;
}

.currency-name {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}

.currency-name strong {
  color: var(--graphite);
  font-size: 13px;
}

.currency-name span,
.commodity-head span,
.chart-axis,
.market-source {
  color: var(--muted);
  font-size: 11px;
}

.currency-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.currency-value {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.commodity-chart {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.commodity-chart:first-child {
  padding-top: 0;
  border-top: 0;
}

.commodity-chart:last-child {
  padding-bottom: 2px;
}

.commodity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.commodity-head > div,
.commodity-quote {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.commodity-quote {
  justify-items: end;
  flex: 0 0 auto;
}

.commodity-quote > strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.market-change {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.market-change.is-up {
  color: var(--green);
}

.market-change.is-down {
  color: var(--red);
}

.market-change.is-flat {
  color: var(--muted);
}

.market-chart {
  display: block;
  width: 100%;
  aspect-ratio: 70 / 23;
  overflow: visible;
}

.market-grid-line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.market-area.oil {
  fill: rgba(243, 107, 33, 0.12);
}

.market-area.gas {
  fill: rgba(22, 139, 136, 0.12);
}

.market-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.market-line.oil,
.market-point.oil {
  stroke: var(--orange-dark);
}

.market-line.gas,
.market-point.gas {
  stroke: var(--teal);
}

.market-point {
  fill: var(--surface);
  stroke-width: 2.4;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}

.market-source {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  text-align: right;
}

.market-error,
.market-chart-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.split-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.composer {
  position: sticky;
  top: 24px;
}

.upload-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.form-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message.is-error {
  color: var(--red);
}

.form-message.is-success {
  color: var(--green);
}

.answer-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.question-card {
  padding: 18px;
}

.answer-list {
  display: grid;
  margin-top: 10px;
}

.answer {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.discussion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.discussion-heading span {
  color: var(--muted);
  font-size: 13px;
}

.publication-discussion {
  margin-top: 22px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.answer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.answer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.listing-card {
  padding: 0;
  overflow: hidden;
}

.listing-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--graphite);
}

.listing-card .listing-body {
  padding: 14px;
}

.price {
  font-size: 22px;
  color: var(--orange-dark);
  font-weight: 900;
}

.job-row,
.order-row,
.publication-row,
.moderation-row,
.setting-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.job-row,
.order-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.job-row h3,
.order-row h3,
.publication-row h3,
.moderation-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0;
}

.job-row p,
.order-row p,
.publication-row p,
.moderation-row p {
  margin: 0;
  color: var(--muted);
}

.admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: start;
  margin-bottom: 14px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
}

.metrics-grid div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.metrics-grid span {
  display: block;
  font-size: 24px;
  font-weight: 900;
}

.metrics-grid small {
  color: var(--muted);
}

.setting-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.switch {
  width: 54px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 3px;
  background: #cad1da;
}

.switch::before {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.switch.is-on {
  background: var(--green);
}

.switch.is-on::before {
  transform: translateX(22px);
}

.moderation-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.moderation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.profile-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.profile-form,
.profile-security {
  display: grid;
  gap: 14px;
}

.auth-required-panel {
  max-width: 680px;
}

.auth-required-panel p {
  color: var(--muted);
}

.avatar-row {
  justify-content: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.avatar-row span {
  display: block;
  color: var(--muted);
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.check-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}

.mobile-actions,
.card-actions,
.detail-actions,
.row-actions,
.user-controls,
.contact-links,
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-button {
  position: relative;
}

.notification-badge,
.counter {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
}

.feed-sentinel {
  min-height: 48px;
  display: grid;
  place-items: center;
  text-align: center;
}

.danger-button,
.text-button {
  min-height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.danger-button {
  padding: 0 14px;
  border: 1px solid rgba(181, 54, 45, 0.35);
  color: var(--red);
  background: #fff7f6;
}

.text-button {
  min-height: 36px;
  padding: 0 6px;
  border: 0;
  color: var(--blue);
  background: transparent;
}

.icon-button.small {
  width: 36px;
  min-height: 36px;
}

.icon-button.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.wide {
  width: 100%;
}

.verification-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(197, 138, 23, 0.38);
  border-left: 4px solid var(--amber);
  background: #fffaf0;
}

.verification-banner span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar img,
.mini-avatar img,
img.mini-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-upload {
  margin-left: auto;
}

.avatar-upload input,
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.compose-extra,
.profile-security,
.account-data-panel,
.panel-inline {
  display: grid;
  gap: 14px;
}

.admin-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-users-panel,
.admin-only {
  margin-top: 14px;
}

.admin-user-list,
.category-admin-list,
.audit-list,
.notification-list,
.saved-search-list {
  display: grid;
  gap: 8px;
}

.admin-user-row,
.category-admin-row,
.audit-row,
.saved-search-row,
.notification-row {
  min-width: 0;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-user-row span,
.admin-user-row small,
.category-admin-row small,
.audit-row small,
.notification-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.user-controls select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.category-admin-row.is-disabled {
  opacity: 0.58;
}

.notification-row {
  width: 100%;
  text-align: left;
  color: var(--ink);
}

.notification-row.is-unread {
  border-left: 4px solid var(--orange);
  background: #fff9f5;
}

.inline-form input {
  flex: 1;
  min-width: 160px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.publication-modal-card {
  width: min(820px, 100%);
}

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

.detail-media img,
.detail-media video {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--graphite);
}

.detail-description {
  white-space: pre-wrap;
  line-height: 1.65;
}

.publication-modal-card .editorial-badge {
  margin-bottom: 12px;
}

.editorial-sources {
  margin: 18px 0 4px;
  padding: 14px 0 14px 16px;
  border-left: 3px solid var(--blue);
}

.editorial-sources p {
  margin: 5px 0 8px;
  color: var(--muted);
}

.editorial-sources div {
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
}

.editorial-sources a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

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

.attribute-grid div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attribute-grid span,
.attribute-grid strong {
  display: block;
}

.attribute-grid span {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta,
.contact-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.contact-links a,
.attachment-link {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  text-decoration: none;
}

.detail-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.panel-inline {
  margin-top: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.answer-media {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.answer-media img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.site-footer {
  margin-left: 280px;
  padding: 18px clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--blue);
  text-decoration: none;
}

.legal-page {
  background: var(--bg);
}

.legal-shell {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding: clamp(20px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.legal-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.legal-nav a,
.legal-shell a {
  color: var(--blue);
}

.legal-shell h1 {
  margin: 0 0 8px;
  font-size: 40px;
  letter-spacing: 0;
}

.legal-shell h2 {
  margin-top: 30px;
  font-size: 21px;
  letter-spacing: 0;
}

.legal-shell p,
.legal-shell li {
  line-height: 1.65;
}

.legal-updated {
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 27, 0.62);
}

.modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.auth-card {
  width: min(500px, 100%);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.file-button {
  position: relative;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.loading-line::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  margin: 10px 0;
  display: none;
}

.progress span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  animation: progressSlide 850ms infinite alternate ease-in-out;
}

.progress.is-active {
  display: block;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-height: 44px;
  max-width: 360px;
  padding: 12px 14px;
  display: none;
  align-items: center;
  color: #fff;
  background: var(--graphite);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 60;
}

.toast.is-visible {
  display: flex;
}

.empty-state {
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.55);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.member-search .search-field {
  flex: 1 1 360px;
}

.member-result-meta {
  min-height: 28px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.member-grid > .empty-state {
  grid-column: 1 / -1;
}

.member-card {
  min-width: 0;
  min-height: 290px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.member-identity,
.chat-person {
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.member-identity > span,
.chat-person > span {
  min-width: 0;
}

.member-identity strong,
.chat-person strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name-row {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.member-name-row strong {
  width: 100%;
  min-width: 0;
}

.member-name-row .demo-profile-label,
.member-name-row .official-profile-label {
  flex: 0 0 auto;
}

.member-identity small,
.chat-person small {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.member-identity small svg {
  width: 14px;
  height: 14px;
}

.member-avatar,
.public-avatar,
.conversation-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
  object-fit: cover;
}

.member-avatar {
  width: 58px;
  height: 58px;
  border-radius: 8px;
}

.public-avatar {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  font-size: 26px;
}

.conversation-avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.member-bio {
  min-height: 46px;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #3b424c;
  line-height: 1.45;
}

.member-tags {
  min-height: 28px;
}

.member-stats,
.public-profile-stats {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.member-stats strong {
  color: var(--graphite);
}

.member-actions,
.public-profile-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.load-more-button {
  margin: 18px auto 0;
}

.member-page-head {
  justify-content: flex-start;
}

.public-profile-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.public-profile-main {
  display: grid;
  gap: 18px;
}

.public-profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.public-profile-identity h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.public-profile-identity p {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.public-profile-identity p svg {
  width: 15px;
  height: 15px;
}

.public-profile-bio {
  margin: 0;
  color: #3b424c;
  line-height: 1.6;
  white-space: pre-wrap;
}

.public-profile-stats {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.public-profile-stats div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.public-profile-stats strong {
  color: var(--graphite);
  font-size: 18px;
}

.profile-contact-list {
  display: grid;
  gap: 8px;
}

.profile-contact-list a {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
  color: var(--teal-dark);
}

.profile-contact-list svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.messages-layout {
  height: calc(100dvh - 146px);
  min-height: 620px;
  max-height: 900px;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.conversation-pane,
.chat-pane {
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.conversation-pane {
  padding: 16px 0 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.conversation-pane .panel-title {
  padding: 0 16px;
}

.conversation-list {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.conversation-row {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
}

.conversation-row:hover,
.conversation-row.is-active {
  background: #f1faf9;
}

.conversation-row.is-active {
  box-shadow: inset 3px 0 0 var(--teal);
}

.conversation-copy,
.conversation-copy > span {
  min-width: 0;
}

.conversation-copy > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.conversation-copy strong,
.conversation-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy small,
.conversation-copy time {
  color: var(--muted);
  font-size: 12px;
}

.conversation-copy small {
  margin-top: 5px;
}

.conversation-unread {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.compact-empty {
  margin: 14px;
  min-height: 120px;
}

.chat-pane {
  padding: 0;
}

.chat-empty {
  height: 100%;
  min-height: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.chat-empty svg {
  width: 42px;
  height: 42px;
  color: var(--teal);
}

.chat-empty strong {
  color: var(--graphite);
}

.chat-active {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.chat-head {
  min-height: 72px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.chat-person {
  flex: 1 1 auto;
}

.chat-back {
  display: none;
}

.chat-load-more {
  margin: 10px auto 0;
}

.message-thread {
  min-height: 0;
  max-height: none;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background: #f7f9fb;
}

.message-row {
  display: flex;
  justify-content: flex-start;
}

.message-row.is-own {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(72%, 640px);
  padding: 10px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message-row.is-own .message-bubble {
  border-color: rgba(22, 139, 136, 0.25);
  background: #eaf7f5;
}

.message-bubble p {
  margin: 0;
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-bubble time {
  margin-top: 5px;
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.chat-start {
  margin: auto;
  display: grid;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

.chat-start strong {
  color: var(--graphite);
}

.message-composer {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 52px;
  align-items: end;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.message-composer textarea {
  width: 100%;
  min-height: 76px;
  max-height: 180px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  line-height: 1.45;
  resize: none;
  overflow-y: auto;
}

.message-composer textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(243, 107, 33, 0.14);
}

.message-composer .message-attachment {
  width: 44px;
  min-width: 44px;
  align-self: end;
}

.message-composer .icon-submit {
  width: 52px;
  min-width: 52px;
  height: 52px;
}

.icon-submit {
  width: 48px;
  min-width: 48px;
  padding: 0;
}

.author-link {
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.author-link:hover {
  text-decoration: underline;
}

@keyframes progressSlide {
  from {
    transform: translateX(-12%);
  }
  to {
    transform: translateX(135%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.seo-header {
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - 920px) / 2));
  background: #20242b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.seo-header .brand {
  color: #fff;
}

.seo-publication {
  width: min(920px, calc(100% - 32px));
  min-height: calc(100vh - 160px);
  margin: 0 auto;
  padding: 56px 0 72px;
}

.seo-publication h1 {
  max-width: 820px;
  margin: 8px 0 18px;
  font-size: 54px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.seo-meta {
  display: flex;
  gap: 16px;
  color: var(--muted);
  margin-bottom: 28px;
}

.seo-cover {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 30px;
}

.seo-body {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 18px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.seo-price {
  margin: 0 0 28px;
  font-size: 24px;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .mobile-top {
    position: sticky;
    top: 0;
    min-height: 60px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 30;
  }

  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    width: min(320px, 86vw);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main-content {
    padding: 16px;
    padding-bottom: 84px;
  }

  .messages-layout {
    height: max(520px, calc(100dvh - 220px));
    min-height: 0;
    max-height: none;
  }

  .feed-layout,
  .split-layout,
  .admin-grid,
  .profile-layout,
  .admin-section-grid,
  .public-profile-layout {
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-left: 0;
    padding-bottom: 84px;
  }

  .composer {
    position: static;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 64px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fff;
    border-top: 1px solid var(--line);
    z-index: 35;
  }

  .bottom-item {
    min-width: 0;
    min-height: 64px;
    border-radius: 0;
    display: grid;
    place-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
    padding: 6px 2px;
  }

  .bottom-item.is-active {
    color: var(--orange-dark);
  }
}

@media (max-width: 720px) {
  .legal-shell h1 {
    font-size: 30px;
  }

  .seo-header {
    min-height: 64px;
  }

  .seo-header .primary-button {
    padding: 0 12px;
  }

  .seo-publication {
    padding: 32px 0 52px;
  }

  .seo-publication h1 {
    font-size: 34px;
  }

  .workspace-hero,
  .hero-overlay {
    min-height: 360px;
  }

  .hero-overlay {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "actions";
    align-items: end;
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-actions {
    justify-content: start;
  }

  .metrics-grid,
  .form-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

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

  .toolbar {
    align-items: stretch;
  }

  .tabbar,
  .segmented {
    overflow: auto;
    justify-content: flex-start;
  }

  .modal-card .segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .modal-card .segment {
    min-width: 0;
    padding: 0 8px;
  }

  .job-row,
  .order-row,
  .moderation-row,
  .setting-row,
  .detail-media,
  .attribute-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-row,
  .notification-row,
  .verification-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .user-controls select {
    flex: 1;
    min-width: 0;
  }

  .moderation-actions {
    justify-content: start;
  }

  .member-page-head {
    align-items: center;
    flex-direction: row;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .public-profile-identity {
    align-items: flex-start;
  }

  .public-profile-stats {
    gap: 12px;
    justify-content: space-between;
  }

  .messages-layout {
    height: max(440px, calc(100dvh - 194px));
    min-height: 0;
    max-height: none;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .messages-layout:not(.has-active-conversation) .chat-pane,
  .messages-layout.has-active-conversation .conversation-pane {
    display: none;
  }

  .conversation-pane,
  .chat-pane,
  .chat-active,
  .chat-empty {
    height: 100%;
    min-height: 0;
  }

  .conversation-list {
    max-height: none;
  }

  .message-thread {
    max-height: none;
    padding: 12px;
  }

  .chat-back {
    display: grid;
  }

  .message-bubble {
    max-width: 88%;
  }

  #view-messages .section-head {
    margin-bottom: 10px;
    align-items: center;
    flex-direction: row;
  }

  #view-messages .section-head .eyebrow {
    display: none;
  }

  #view-messages .section-head h2 {
    font-size: 24px;
  }

  #view-messages .section-head .secondary-button {
    min-height: 40px;
  }

  .chat-head {
    min-height: 60px;
    padding: 8px 10px;
  }

  .message-composer {
    grid-template-columns: 40px minmax(0, 1fr) 46px;
    gap: 8px;
    padding: 10px;
  }

  .message-composer textarea {
    min-height: 64px;
    max-height: 136px;
    padding: 10px 12px;
  }

  .message-composer .message-attachment {
    width: 40px;
    min-width: 40px;
  }

  .message-composer .icon-submit {
    width: 46px;
    min-width: 46px;
    height: 46px;
  }

  .member-actions .primary-button,
  .member-actions .secondary-button,
  .public-profile-actions .primary-button,
  .public-profile-actions .secondary-button {
    flex: 1 1 auto;
  }
}

/* WeldRC 2.0: professional network, companies, trust and tools */
.feed-scope { flex: 0 0 auto; }
.company-create-form { margin-bottom: 20px; padding: 20px; display: grid; gap: 16px; }
.company-create-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.company-create-fields { display: grid; gap: 14px; }
.company-logo-picker { min-width: 0; cursor: pointer; }
.company-logo-picker input, .company-logo-change input { display: none; }
.company-logo-preview { position: relative; width: 100%; aspect-ratio: 1; padding: 16px; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.company-logo-preview:hover { border-color: var(--orange); background: #fff7f2; }
.company-logo-preview > svg { width: 30px; height: 30px; color: var(--orange-dark); }
.company-logo-preview strong { color: var(--ink); }
.company-logo-preview small { line-height: 1.35; }
.company-logo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.company-logo-preview-change { position: absolute; left: 8px; right: 8px; bottom: 8px; min-height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; color: #fff; background: rgba(21, 25, 34, 0.82); font-size: 12px; font-weight: 800; }
.company-logo-preview-change svg { width: 14px; height: 14px; }
.company-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.company-grid > .empty-state { grid-column: 1 / -1; }
.company-card { min-width: 0; min-height: 250px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.company-card-head { width: 100%; min-width: 0; border: 0; background: none; padding: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) 20px; gap: 12px; align-items: center; text-align: left; color: inherit; cursor: pointer; }
.company-card-head img, .company-card-head .company-logo-fallback { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.company-logo-fallback { display: grid; place-items: center; background: #e7f2ee; color: #146b55; font-weight: 800; }
.company-card-copy { min-width: 0; }
.company-card-copy strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
.company-card-copy small { margin-top: 6px; display: flex; align-items: center; gap: 5px; color: var(--muted); }
.company-card-copy small svg { width: 14px; height: 14px; flex: 0 0 auto; }
.company-card > p { min-height: 66px; margin: 0; overflow: hidden; display: -webkit-box; color: var(--muted); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.company-stats { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.company-stats span { display: inline-flex; align-items: center; gap: 5px; }
.company-stats svg { width: 15px; height: 15px; color: var(--teal); }
.company-open-icon, .verified-icon { width: 18px; height: 18px; color: var(--muted); }
.verified-icon { color: #0f7b5a; }
.verified-badge { display: inline-flex; align-items: center; gap: 5px; color: #0f6f55; font-size: 12px; font-weight: 700; }
.verified-badge svg { width: 16px; height: 16px; }
.company-detail { margin-bottom: 18px; padding: 20px; display: grid; gap: 20px; }
.company-detail-head { display: grid; grid-template-columns: 44px 104px minmax(0, 1fr); gap: 16px; align-items: center; }
.company-detail-logo { position: relative; width: 104px; height: 104px; }
.company-detail-logo > img, .company-detail-logo > .company-logo-fallback { width: 104px; height: 104px; border-radius: 8px; object-fit: cover; }
.company-logo-change { position: absolute; left: 6px; right: 6px; bottom: 6px; min-height: 32px; padding: 0 8px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: 6px; color: #fff; background: rgba(21, 25, 34, 0.82); font-size: 12px; font-weight: 800; cursor: pointer; }
.company-logo-change:hover { background: var(--orange-dark); }
.company-logo-change svg { width: 14px; height: 14px; }
.company-detail-identity { min-width: 0; }
.company-detail-identity h3 { margin: 0; font-size: 28px; line-height: 1.2; overflow-wrap: anywhere; }
.company-detail-identity > p { margin: 7px 0; color: var(--muted); }
.company-detail-stats { padding: 14px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.company-detail-stats span { min-width: 0; }
.company-detail-stats strong { color: var(--ink); font-size: 20px; }
.company-rating-value { display: inline-flex; align-items: center; gap: 4px; }
.company-rating-value svg { width: 18px; height: 18px; color: var(--amber); fill: currentColor; }
.company-detail-content { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 28px; }
.company-detail h4 { margin: 0 0 10px; font-size: 16px; }
.company-detail-content p { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.company-contact-list { min-width: 0; display: grid; align-content: start; gap: 9px; }
.company-contact-list a, .company-contact-list > span { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--teal-dark); overflow-wrap: anywhere; }
.company-contact-list svg { width: 16px; height: 16px; flex: 0 0 auto; }
.company-reviews { padding-top: 4px; display: grid; gap: 16px; border-top: 1px solid var(--line); }
.company-reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.company-reviews-head h4 { margin: 0 0 4px; }
.company-reviews-head > div > span { color: var(--muted); font-size: 13px; }
.company-review-stars { display: inline-flex; align-items: center; gap: 2px; color: var(--line-strong); }
.company-review-stars svg { width: 17px; height: 17px; }
.company-review-stars svg.is-active { color: var(--amber); fill: currentColor; }
.company-review-summary-stars svg { width: 20px; height: 20px; }
.company-review-form { padding: 16px 0; display: grid; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.company-review-form-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.company-review-star-picker { display: flex; align-items: center; gap: 2px; }
.company-review-star { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; color: var(--line-strong); background: transparent; }
.company-review-star:hover, .company-review-star.is-active { color: var(--amber); }
.company-review-star.is-active svg { fill: currentColor; }
.company-review-star svg { width: 23px; height: 23px; }
.company-review-form textarea { width: 100%; min-height: 112px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; line-height: 1.5; resize: vertical; }
.company-review-form textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(243, 107, 33, 0.14); }
.company-review-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.company-review-note { min-height: 54px; padding: 10px 0; display: flex; align-items: center; gap: 9px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.company-review-note svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--teal); }
.company-review-note .secondary-button { margin-left: auto; }
.company-review-list { display: grid; }
.company-review-item { min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.company-review-item:last-child { border-bottom: 0; }
.company-review-item header { display: flex; align-items: center; gap: 10px; }
.company-review-avatar { width: 42px; height: 42px; border-radius: 8px; }
.company-review-item header > div { min-width: 0; }
.company-review-item header button { padding: 0; border: 0; color: var(--ink); background: transparent; font-weight: 800; }
.company-review-item .demo-profile-label { margin-left: 7px; vertical-align: 1px; }
.company-review-item-meta { margin-top: 4px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.company-review-item p { margin: 10px 0 0 52px; color: #3b424c; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.company-card-rating { color: var(--ink); }
.company-card-rating svg { color: var(--amber); fill: currentColor; }
.company-publications-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.company-publications-head h4 { margin: 0; }
.company-publications-head span { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 14px; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 800; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.calculator-form { display: grid; gap: 14px; align-content: start; }
.calculator-result { display: block; padding: 14px; border: 1px solid #b7d8ce; border-radius: 6px; background: #eef8f4; color: #0b5e48; font-size: 22px; font-weight: 800; }
.calculation-note { max-width: 900px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.profile-trust-panel { display: grid; gap: 14px; }
.portfolio-form { margin: 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.portfolio-item { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.portfolio-item img, .portfolio-placeholder { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.portfolio-placeholder { display: grid; place-items: center; background: #eef1f3; color: var(--muted); }
.portfolio-placeholder svg { width: 30px; height: 30px; }
.portfolio-item > div:not(.portfolio-placeholder) { padding: 10px; }
.portfolio-item p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.portfolio-item > .icon-button { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,.94); }
.document-form { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.document-list { display: grid; gap: 8px; }
.document-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.document-row span, .document-row small { display: block; }
.document-row small { margin-top: 3px; color: var(--muted); }
.plan-list { display: grid; gap: 8px; }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-row > div { display: grid; gap: 5px; }
.plan-row > div:last-child { justify-items: end; text-align: right; }
.plan-row span, .plan-row small { color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; width: fit-content; padding: 3px 7px; border-radius: 999px; background: #edf3f0; color: #245f50; font-size: 12px; }
.subsection-title, .discussion-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; }
.publication-comments { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.comment-list { display: grid; gap: 12px; }
.comment-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; }
.comment-row button { border: 0; background: none; padding: 0; color: inherit; font-weight: 700; cursor: pointer; }
.comment-row p { margin: 4px 0; white-space: pre-wrap; line-height: 1.45; }
.comment-row time { color: var(--muted); font-size: 12px; }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; margin-top: 14px; align-items: end; }
.comment-form textarea { resize: vertical; min-height: 44px; }
.message-attachment { flex: 0 0 40px; align-self: center; }
.message-attachment input { display: none; }
.message-image img { display: block; max-width: min(320px, 100%); max-height: 260px; border-radius: 5px; object-fit: cover; }
.message-file { display: inline-flex; align-items: center; gap: 7px; color: inherit; }
.message-file svg { width: 17px; height: 17px; }
.member-portfolio { grid-column: 1; }
.verified-documents { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.verified-documents span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; background: #edf7f3; color: #0d6a50; border-radius: 5px; font-size: 12px; }
.verified-documents svg { width: 15px; height: 15px; }
.billing-list, .news-source-list { display: grid; gap: 8px; }
.billing-row, .news-source-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.billing-row span, .billing-row small, .news-source-row span, .news-source-row small { display: block; min-width: 0; }
.billing-row small, .news-source-row small { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.billing-row > div { display: flex; gap: 6px; }

@media (max-width: 1050px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .company-grid, .tool-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .company-create-form { padding: 16px; }
  .company-create-layout { grid-template-columns: 1fr; }
  .company-logo-picker { width: min(160px, 100%); }
  .company-detail { padding: 14px; gap: 16px; }
  .company-detail-head { grid-template-columns: 40px 76px minmax(0, 1fr); gap: 10px; align-items: start; }
  .company-detail-logo, .company-detail-logo > img, .company-detail-logo > .company-logo-fallback { width: 76px; height: 76px; }
  .company-logo-change { left: 4px; right: 4px; bottom: 4px; min-height: 28px; }
  .company-logo-change span { display: none; }
  .company-detail-identity h3 { font-size: 21px; }
  .company-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; font-size: 12px; }
  .company-detail-stats strong { display: block; font-size: 18px; }
  .company-detail-content { grid-template-columns: 1fr; gap: 18px; }
  .company-reviews-head, .company-review-form-head { align-items: flex-start; flex-direction: column; }
  .company-review-summary-stars { align-self: flex-start; }
  .company-review-item p { margin-left: 0; }
  .plan-row { align-items: flex-start; flex-direction: column; }
  .plan-row > div:last-child { justify-items: start; text-align: left; }
  .toolbar .feed-scope { width: 100%; }
}
