:root {
  --ink: #14202b;
  --muted: #5f6d73;
  --paper: #f5f7f5;
  --panel: #ffffff;
  --line: #c7d0cc;
  --soft: #edf2ef;
  --green: #004235;
  --green-2: #00614b;
  --gold: #b98b32;
  --blue: #2e5c78;
  --red: #923c3c;
  --shadow: 0 14px 34px rgba(20, 32, 43, 0.09);
  --topbar-height: 72px;
  font-family: "Times New Roman", SimSun, "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 14px);
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Times New Roman", SimSun, "Songti SC", serif;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
  max-width: 100%;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: var(--green-2);
}

.app-shell {
  min-height: 100vh;
  max-width: 100%;
  overflow: visible;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(520px, 1fr) minmax(290px, 380px) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(20, 32, 43, 0.06);
  min-width: 0;
}

.hidden {
  display: none !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #d6e0dc;
  border-radius: 8px;
  background: #edf4f0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(20, 32, 43, 0.06);
}

.nav-tab {
  position: relative;
  flex: 0 0 auto;
  min-width: 116px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  line-height: 1;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.nav-tab:hover {
  border-color: #c8d5d0;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 10px rgba(20, 32, 43, 0.06);
  transform: translateY(-1px);
}

.nav-tab.active {
  border-color: var(--green);
  background: linear-gradient(180deg, var(--green-2), var(--green));
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 66, 53, 0.2);
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 6px;
  left: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
}

.nav-tab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.utility-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.header-account {
  display: flex;
  gap: 10px;
  justify-content: end;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.header-account .secondary-action {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 10px;
  white-space: nowrap;
}

.account-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 210px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.utility-controls label,
.filter-row label,
.field,
.form-grid label {
  display: grid;
  gap: 5px;
}

.utility-controls label {
  display: flex;
  align-items: center;
  gap: 0;
}

.utility-controls select {
  min-height: 38px;
}

.utility-controls span,
.filter-row span,
.field span,
.form-grid span {
  color: var(--muted);
  font-size: 12px;
}

select,
input,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 6px;
}

input[type="file"] {
  cursor: pointer;
  line-height: 1.35;
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: #eef6f2;
  color: var(--green);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

input[type="file"]:hover::file-selector-button {
  background: var(--green);
  color: #fff;
}

input[type="file"]:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

input[type="file"]:disabled::file-selector-button {
  border-color: #b8c5c0;
  background: #e5e9e7;
  color: #7f8c87;
  cursor: not-allowed;
}

.password-field {
  position: relative;
  display: grid;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--green);
  transform: translateY(-50%);
  cursor: pointer;
}

.password-toggle svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-toggle .eye-slash {
  display: none;
}

.password-toggle.is-visible .eye-slash {
  display: block;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

main {
  padding: calc(var(--topbar-height) + 8px) 14px 14px;
  max-width: 100%;
  overflow-x: hidden;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.workspace-grid,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 10px;
  align-items: start;
}

.primary-panel,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.primary-panel {
  padding: 12px;
}

.side-panel {
  padding: 12px;
}

#marketplace .side-panel {
  position: static;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d8e0dc;
  background: var(--soft);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.intro-band img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #f8fbf9;
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 28px;
  line-height: 1.18;
}

h2 {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.lead {
  max-width: 860px;
  color: var(--muted);
}

.metric-strip,
.funding-grid {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.metric-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

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

.metric-strip article,
.funding-grid article,
.investor-channels article,
.workflow-steps article,
.creator-card,
.message-box,
.pipeline-strip article,
.data-room article,
.lead-card,
.redline-panel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.metric-strip article,
.funding-grid article {
  padding: 9px 10px;
  min-height: 0;
}

.metric-strip article > span,
.funding-grid article > span,
.quote-box > span,
.price-result > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-strip strong,
.funding-grid strong,
.quote-box strong,
.price-result strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

.metric-strip small,
.funding-grid small,
.quote-box small,
.price-result small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.18;
}

.metric-strip small span,
.funding-grid small span {
  display: inline;
}

.metric-strip article:first-child small,
.funding-grid article:nth-child(2) small {
  white-space: nowrap;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: end;
  margin: 12px 0 8px;
}

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

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, 160px);
  gap: 10px;
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.creator-card {
  overflow: hidden;
}

.creator-card.selected {
  border-color: var(--green);
  background: #f2faf6;
  box-shadow: 0 0 0 2px rgba(0, 66, 53, 0.16);
}

.creator-card.selected .secondary-action {
  background: var(--green);
  color: #fff;
}

.creator-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.creator-image-button > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--soft);
}

.creator-preview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 10px 0;
}

.creator-preview-strip button {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  cursor: pointer;
}

.creator-preview-strip img {
  width: 100%;
  height: 46px;
  object-fit: cover;
  display: block;
}

.creator-content {
  padding: 9px 10px;
}

.creator-top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: start;
}

.creator-name {
  margin: 0;
  font-size: 17px;
  line-height: 1.12;
}

.status-pill {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #cbb477;
  background: #fff8e6;
  color: #704f00;
  font-size: 12px;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}

.tag-list span {
  padding: 2px 5px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 12px;
}

.card-price {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: end;
  margin-top: 6px;
}

.card-price strong {
  font-size: 20px;
}

.secondary-action,
.primary-action,
.copy-btn {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid var(--green);
}

.secondary-action {
  background: #fff;
  color: var(--green);
  padding: 6px 9px;
}

.primary-action {
  width: 100%;
  background: var(--green);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
}

.copy-btn {
  background: var(--soft);
  color: var(--green);
  padding: 8px 12px;
}

.panel-header {
  border-bottom: 1px solid var(--line);
  margin: -2px 0 14px;
  padding-bottom: 12px;
}

.selected-creator {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.selected-creator img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.field {
  margin-bottom: 12px;
}

input[type="range"] {
  padding: 0;
}

output {
  color: var(--muted);
  font-size: 13px;
}

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

.check-grid label,
.mode-switch label {
  display: flex;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 8px;
  background: #fff;
  border-radius: 6px;
  font-size: 14px;
}

.check-grid input,
.mode-switch input {
  width: auto;
  min-height: auto;
}

.mode-switch {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
}

.mode-switch legend {
  padding: 0 6px;
  color: var(--muted);
}

.quote-box,
.price-result {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #d8c58c;
  background: #fff8e8;
  border-radius: 8px;
}

.draft-order {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  color: var(--ink);
  min-height: 78px;
}

.draft-order:empty {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 10px;
  margin: 10px 0;
}

.account-panel,
.upload-panel,
.contract-draft {
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.upload-panel {
  margin-top: 0;
  background: #fbfcfb;
}

.upload-panel > p {
  margin-bottom: 8px;
  line-height: 1.25;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 10px;
}

.inline-actions .secondary-action {
  min-width: 120px;
}

.preview-picker {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.preview-picker.hidden {
  display: none;
}

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

.preview-picker-head strong,
.preview-picker-head small,
.preview-picker-head span {
  display: block;
}

.preview-picker-head small,
.preview-picker-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.preview-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.preview-choice {
  min-width: 0;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.preview-choice.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(0, 66, 53, 0.16);
}

.preview-choice img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
}

.preview-choice figcaption {
  display: grid;
  gap: 1px;
  margin: 4px 0;
  min-width: 0;
}

.preview-choice strong,
.preview-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-choice strong {
  font-size: 12px;
}

.preview-choice small {
  color: var(--muted);
  font-size: 11px;
}

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

.preview-slot-actions button {
  min-height: 28px;
  padding: 3px 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  font-size: 12px;
}

.preview-slot-actions button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.price-config {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  margin: 10px 0;
}

.price-config > div {
  min-width: 0;
}

.price-config span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.stepper {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: center;
}

.stepper .secondary-action {
  min-height: 38px;
  padding: 6px 8px;
}

.price-result.compact {
  margin: 0;
  height: 100%;
}

.license-scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
  padding: 8px;
  border: 1px solid var(--line);
}

.license-scope legend {
  padding: 0 6px;
  color: var(--muted);
}

.license-scope label,
.contract-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.license-scope input,
.contract-consent input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.contract-draft {
  background: #f9fbfa;
  padding: 7px 8px;
  line-height: 1.16;
}

.contract-draft h3 {
  margin-bottom: 4px;
  font-size: 15px;
}

.contract-draft p {
  margin: 0 0 4px;
  line-height: 1.16;
}

.contract-draft p:last-child {
  margin-bottom: 0;
}

.contract-consent {
  margin-top: 8px;
}

.account-modal-panel {
  width: min(1080px, 100%);
}

.my-listing-grid,
.order-list {
  display: grid;
  gap: 12px;
}

.my-listing-card,
.order-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.my-card-head,
.order-card > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.my-card-head h3 {
  margin-bottom: 4px;
}

.my-media-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.my-media-item {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.my-media-grid img,
.my-media-grid video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.my-media-item figcaption,
.my-media-item small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid rgba(146, 60, 60, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--red);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.media-remove:hover,
.media-remove:focus-visible {
  background: var(--red);
  color: #fff;
  outline: none;
}

.media-append-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.media-append-panel strong,
.media-append-panel small,
.media-file-control span {
  display: block;
}

.media-append-panel small {
  color: var(--muted);
}

.media-file-control input {
  min-height: 42px;
  padding: 8px;
  background: #fff;
}

.media-append-panel .legal-note {
  grid-column: 1 / -1;
  margin: 0;
}

.my-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 220px;
  gap: 10px;
  align-items: stretch;
}

.my-scope-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
}

.my-scope-list legend {
  padding: 0 6px;
  color: var(--muted);
}

.my-scope-list label {
  display: flex;
  gap: 7px;
  align-items: center;
}

.my-scope-list input {
  width: auto;
  min-height: auto;
}

.order-card {
  background: var(--soft);
}

.order-card p {
  margin-bottom: 4px;
}

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

.emotion-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.emotion-item {
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  min-height: 92px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.emotion-item:hover {
  border-color: var(--green-2);
}

.emotion-item.selected {
  border-color: var(--green);
  background: #f4fbf7;
  box-shadow: inset 0 0 0 2px var(--green);
}

.emotion-item small {
  display: block;
  margin-top: 6px;
  color: var(--green);
}

.emotion-item strong {
  display: block;
  margin-bottom: 5px;
}

.rule-list {
  padding-left: 20px;
}

.rule-list li {
  margin-bottom: 10px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.workflow-steps article {
  padding: 14px;
  min-height: 178px;
}

.workflow-steps span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  background: var(--green);
  color: #fff;
}

.contract-panel {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  padding: 16px;
}

.contract-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  border: 1px solid var(--line);
  background: #fff;
}

.contract-grid span,
.contract-grid strong {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.contract-grid span:nth-last-child(2),
.contract-grid strong:last-child {
  border-bottom: 0;
}

.contract-grid span {
  background: #f6f8f7;
  color: var(--muted);
}

.funding-grid {
  grid-template-columns: repeat(4, 1fr);
}

.allocation-bars {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
}

.allocation-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 90px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 14px;
  background: #e5ebe8;
  border: 1px solid var(--line);
}

.bar-fill {
  height: 100%;
  background: var(--green-2);
}

.scenario-table {
  display: grid;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.scenario-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr;
}

.scenario-row > span,
.scenario-row > strong {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scenario-row > :last-child {
  border-right: 0;
}

.scenario-row.header {
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.investor-channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.investor-channels article {
  padding: 14px;
}

.message-box {
  padding: 12px;
  margin-bottom: 12px;
}

.message-box p {
  color: var(--ink);
}

.term-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.term-stack article {
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
}

.term-stack span,
.term-stack strong {
  display: block;
}

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

.term-stack strong {
  margin-top: 4px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.15;
}

.source-links {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.source-links a {
  display: block;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
  text-decoration: none;
}

.redline-panel {
  margin-top: 14px;
  padding: 12px;
  border-left: 4px solid var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 32, 43, 0.55);
}

.modal-backdrop.hidden {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(20, 32, 43, 0.28);
}

.gallery-modal-panel {
  width: min(1100px, 100%);
}

.gallery-member-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0 12px;
  padding: 8px 10px;
  border: 1px solid #d8c28a;
  border-radius: 8px;
  background: #fff8e6;
}

.gallery-member-toggle input {
  width: auto;
  min-height: auto;
}

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

.gallery-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item {
  min-width: 0;
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: #fff;
}

.gallery-item figcaption {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.contract-text {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.contract-text article {
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
}

.contract-text h3 {
  color: var(--green);
}

.lead-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
}

.investor-contact-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.contact-options {
  display: grid;
  grid-template-columns: 1.1fr 180px 1.1fr;
  gap: 12px;
  margin: 12px 0 16px;
}

.contact-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.contact-card span,
.static-field span {
  color: var(--muted);
}

.contact-card strong,
.static-field strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1.2;
}

.qr-card {
  justify-items: center;
  text-align: center;
}

.qr-image {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.static-field {
  display: grid;
  align-content: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.static-field strong {
  font-size: 18px;
}

.lead-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.lead-grid.two {
  grid-template-columns: 260px minmax(0, 1fr);
}

.consent-line {
  display: flex;
  gap: 8px;
  align-items: start;
  margin: 8px 0 14px;
  color: var(--ink);
}

.consent-line input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.action-row .primary-action,
.action-row .secondary-action {
  width: auto;
}

.pipeline-strip,
.data-room {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pipeline-strip article,
.data-room article {
  padding: 14px;
  min-height: 128px;
}

.pipeline-strip strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  background: var(--green);
  color: #fff;
}

.lead-queue {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.investor-followup {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.lead-card {
  padding: 12px;
}

.lead-card strong,
.lead-card small,
.lead-card span {
  display: block;
}

.lead-card small {
  color: var(--muted);
}

.lead-card p {
  margin: 8px 0 0;
}

.milestone-list {
  margin: 10px 0 0;
  padding-left: 22px;
}

.milestone-list li {
  margin-bottom: 10px;
}

.legal-note {
  padding: 6px 8px;
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  color: #5c4b21;
  line-height: 1.25;
}

.share-field.hidden {
  display: none;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .nav-tabs,
  .utility-controls,
  .header-account {
    justify-content: start;
    flex-wrap: wrap;
  }

  .nav-tabs {
    justify-self: start;
  }

  .workspace-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

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

  .preview-picker-grid,
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  main {
    padding: calc(var(--topbar-height) + 12px) 12px 12px;
  }

  .workspace-grid,
  .two-column {
    gap: 12px;
  }

  .primary-panel,
  .side-panel {
    padding: 14px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .brand {
    min-height: 38px;
    align-items: center;
    overflow: visible;
  }

  .brand-mark {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    line-height: 1;
  }

  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 5px;
    padding: 4px;
    overflow-x: hidden;
  }

  .nav-tab {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 8px;
  }

  .nav-tab.active::after {
    right: 14px;
    bottom: 5px;
    left: 14px;
  }

  .utility-controls,
  .header-account,
  .filter-row,
  .form-grid,
  .lead-grid,
  .lead-grid.two,
  .contact-options,
  .price-config,
  .license-scope,
  .metric-strip,
  .funding-grid,
  .workflow-steps,
  .investor-channels,
  .pipeline-strip,
  .data-room,
  .emotion-matrix,
  .creator-grid,
  .intro-band {
    grid-template-columns: 1fr;
  }

  .utility-controls,
  .header-account {
    display: grid;
    min-width: 0;
  }

  .preview-picker-head {
    display: grid;
  }

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

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

  .my-edit-grid,
  .my-scope-list,
  .media-append-panel {
    grid-template-columns: 1fr;
  }

  .intro-band {
    padding: 12px;
  }

  .intro-band img {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

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

  .scenario-row {
    grid-template-columns: 1fr;
  }

  .scenario-row > span,
  .scenario-row > strong {
    border-right: 0;
  }

  .contract-grid,
  .allocation-row {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 10px;
    place-items: start center;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }
}
