:root {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #2f3437;
  background: #f2f5f4;
  font-synthesis: none;
  --teal: #0f5d5a;
  --line: #d8e2df;
  --muted: #536863;
  --soft: #e9edec;
  --gold: #9a5c13;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.7;
}
a {
  color: var(--teal);
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button,
input,
select {
  max-width: 100%;
}
button {
  border: 1px solid var(--teal);
  border-radius: 7px;
  padding: 10px 17px;
  min-height: 44px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  white-space: normal;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  color: var(--teal);
  background: #fff;
}
input,
select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #b4c7c0;
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: inherit;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #d29d39;
  outline-offset: 3px;
}
label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(30px, 4.5vw, 58px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}
h2 {
  font-size: 25px;
  line-height: 1.4;
  margin-bottom: 0;
}
h3 {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 12px;
}
h4 {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 10px;
}
p {
  margin-bottom: 14px;
}
small,
.muted {
  color: var(--muted);
  font-size: 13px;
}
main {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 0 30px 35px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(30px, calc((100vw - 1200px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: block;
  flex-shrink: 0;
  width: 260px;
  max-width: 65%;
}
.brand img {
  display: block;
  width: 100%;
  height: auto;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  font-size: 13px;
}
.site-header nav a {
  text-decoration: none;
}
.hero {
  padding: 58px 0 32px;
}
.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.lead {
  font-size: 21px;
  max-width: 760px;
}
.boundary {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff5dc;
  border: 1px solid #dabb6f;
  border-left: 4px solid var(--gold);
  padding: 17px 20px;
  margin-top: 25px;
  border-radius: 7px;
}
.boundary strong {
  color: #75480d;
  white-space: nowrap;
}
.boundary span {
  font-size: 13px;
  color: #765b28;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 24px;
  padding: 28px;
  min-width: 0;
  box-shadow: 0 3px 16px #143e3010;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.section-heading .eyebrow {
  margin-bottom: 6px;
}
.search-form,
.login-form,
.workspace-tools {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.search-form label {
  flex: 0 1 220px;
}
.search-form .grow,
.login-form .grow {
  flex: 1 1 280px;
}
.status {
  font-size: 13px;
  color: var(--teal);
  margin: 12px 0;
  overflow-wrap: anywhere;
  min-height: 22px;
}
.status.error {
  color: #9c2e26;
}
.domain-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0;
}
.domain-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #f7faf8;
  color: var(--teal);
  border-color: var(--line);
  font-size: 14px;
  padding: 14px 8px;
}
.domain-button small {
  font-weight: 400;
  color: #5e756b;
  font-size: 11px;
}
.domain-button[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
}
.domain-button[aria-pressed="true"] small {
  color: #d0e3db;
}
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.evidence-card,
.product-card,
.task-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.evidence-card {
  background: #f9fbfa;
}
.evidence-card h3 {
  font-size: 17px;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--teal);
  background: #e5f1eb;
  border: 1px solid #bed8cb;
  padding: 4px 9px;
  border-radius: 20px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.badge.warning {
  color: #81530b;
  background: #fff3d8;
  border-color: #e4cc90;
}
.badge.danger {
  color: #973c30;
  background: #fff0ed;
  border-color: #e8c3bc;
}
.badge.good {
  color: #1d5b40;
  background: #e6f4e8;
  border-color: #abcdb0;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.product-card .price {
  font-size: 25px;
  font-weight: 700;
  color: var(--teal);
  margin: 12px 0;
}
.product-code {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}
.facts dl,
.product-card dl {
  margin: 0;
}
.facts dt,
.product-card dt {
  font-size: 12px;
  color: var(--muted);
}
.facts dd,
.product-card dd {
  font-size: 13px;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.product-card .facts {
  grid-template-columns: 1fr;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}
.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7faf8;
}
.metric strong {
  display: block;
  font-size: 26px;
  color: var(--teal);
}
.metric.negative strong {
  color: #9b4b2b;
}
.metric span {
  font-size: 13px;
  color: var(--muted);
}
.login-form {
  padding: 20px;
  background: #f5f8f6;
  border-radius: 8px;
}
.workspace-tools {
  margin: 20px 0;
}
.workspace-tools label {
  flex: 1 1 300px;
}
.identity-card {
  background: #edf4f0;
  border-left: 3px solid var(--teal);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.business-form {
  padding: 23px 0;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 17px;
}
.wide {
  grid-column: 1/-1;
}
.subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 21px 0 12px;
  flex-wrap: wrap;
}
.subheading h4 {
  margin: 0;
}
.material-list {
  display: grid;
  gap: 12px;
  margin: 15px 0;
}
.material-row {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8faf9;
}
.material-row legend {
  font-size: 13px;
  color: var(--teal);
  padding: 0 6px;
}
.material-row .form-grid {
  gap: 10px;
  margin: 0;
}
.material-row .remove {
  font-size: 12px;
  padding: 6px 11px;
  min-height: 34px;
  margin-top: 10px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  font-weight: 400;
  margin: 17px 0;
}
.check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}
.task-list-section {
  margin-top: 28px;
}
.task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.task-card h4 {
  margin-bottom: 6px;
}
.task-card .task-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0;
}
.task-card button {
  padding: 7px 12px;
  min-height: 38px;
  font-size: 13px;
}
.task-detail {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 2px solid var(--teal);
}
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  table-layout: fixed;
  font-size: 13px;
}
.summary-table caption {
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 9px;
}
.summary-table th,
.summary-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.summary-table th {
  background: #f1f6f3;
  color: #425a50;
  font-weight: 600;
}
.summary-table td {
  background: #fff;
}
.empty {
  padding: 20px;
  background: #f5f8f6;
  color: var(--muted);
  border-radius: 8px;
  font-size: 14px;
}
.value-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.receipt-note {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.source-list {
  padding-left: 18px;
  margin: 10px 0;
  font-size: 13px;
}
.source-list a {
  overflow-wrap: anywhere;
}
footer {
  padding: 18px 0;
  color: var(--muted);
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
.delivery-collection,
.cashflow-scenario {
  min-width: 0;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.delivery-row {
  min-width: 0;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}
.delivery-row legend,
.cashflow-scenario legend {
  padding: 0 7px;
  font-size: 14px;
  font-weight: 600;
}
.delivery-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}
textarea {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 11px;
  font: inherit;
  line-height: 1.6;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
}
.professional-prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}
.business-link {
  display: inline-block;
  margin: 10px 0;
  font-weight: 600;
}
.nullable-control {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
details {
  margin: 14px 0;
  min-width: 0;
}
summary {
  padding: 12px;
  border-radius: 8px;
  background: #f1f6f3;
  cursor: pointer;
  font-weight: 600;
}
@media (max-width: 600px) {
  .delivery-collection,
  .cashflow-scenario,
  .delivery-row {
    padding: 12px;
    margin: 14px 0;
  }
  .summary-table,
  .summary-table tbody,
  .summary-table tr,
  .summary-table td {
    display: block;
    width: 100%;
  }
  .summary-table thead {
    display: none;
  }
  .summary-table caption {
    display: block;
    width: 100%;
  }
  .summary-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }
  .summary-table td {
    display: grid;
    grid-template-columns: minmax(0, 105px) minmax(0, 1fr);
    gap: 12px;
    border-width: 0 0 1px;
    padding: 9px;
  }
  .summary-table td:last-child {
    border: 0;
  }
  .summary-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
  }
}
@media (max-width: 1000px) {
  .domain-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-header {
    padding: 16px 24px;
  }
  .site-header nav {
    gap: 8px 12px;
  }
}
@media (max-width: 600px) {
  main {
    padding: 0 16px 25px;
  }
  .site-header {
    padding: 15px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .brand {
    width: 220px;
    max-width: 100%;
  }
  .site-header nav {
    font-size: 12px;
  }
  .hero {
    padding: 32px 0 25px;
  }
  .lead {
    font-size: 18px;
  }
  .hero > p {
    font-size: 14px;
  }
  .boundary {
    display: block;
    padding: 14px;
  }
  .boundary strong {
    display: block;
    white-space: normal;
    margin-bottom: 7px;
  }
  .boundary span {
    display: block;
  }
  .panel {
    padding: 19px 16px;
    border-radius: 9px;
    margin-bottom: 18px;
  }
  h2 {
    font-size: 21px;
  }
  h3 {
    font-size: 18px;
  }
  .section-heading {
    margin-bottom: 17px;
    gap: 10px;
  }
  .search-form,
  .login-form,
  .workspace-tools {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .search-form label,
  .search-form .grow,
  .login-form .grow,
  .workspace-tools label {
    flex: auto;
  }
  .domain-grid {
    gap: 7px;
  }
  .domain-button {
    font-size: 12px;
    padding: 11px 5px;
    min-height: 64px;
  }
  .domain-button small {
    font-size: 10px;
  }
  .evidence-grid,
  .product-grid,
  .metrics,
  .facts,
  .form-grid,
  .task-list {
    grid-template-columns: 1fr;
  }
  .product-card .price {
    font-size: 24px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 14px;
  }
  .metric strong {
    font-size: 25px;
  }
  .facts {
    gap: 0;
  }
  .form-grid {
    gap: 12px;
  }
  .login-form {
    padding: 14px;
  }
  .material-row {
    padding: 12px;
  }
  .business-form {
    padding-top: 20px;
  }
  .summary-table th,
  .summary-table td {
    font-size: 12px;
    padding: 8px;
  }
  .product-card,
  .evidence-card,
  .task-card {
    padding: 17px;
  }
  .subheading button {
    width: 100%;
  }
  .badge {
    font-size: 11px;
  }
  .wide {
    grid-column: auto;
  }
}

/* CPC immutable delivery-version history: long SHA strings must never overflow mobile. */
.cpc-version-history {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--border, #d4d9d7);
  border-radius: 12px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cpc-version-row {
  padding: 10px 0;
  border-top: 1px solid var(--border, #d4d9d7);
  min-width: 0;
  overflow-wrap: anywhere;
}
.cpc-version-row p {
  margin: 6px 0;
}
.cpc-version-row .cpc-hash {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cpc-version-row button {
  margin: 5px 8px 5px 0;
  max-width: 100%;
}
.workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 20px 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}
.workspace-nav a {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.workspace-nav [aria-current="page"] {
  font-weight: 700;
}
.worklog-box {
  min-width: 0;
  border: 1px solid var(--line);
  margin: 18px 0;
  padding: 16px;
}
.worklog-box legend {
  font-weight: 700;
  padding: 0 5px;
}
#cpc-live-analytics {
  min-width: 0;
  overflow-wrap: anywhere;
}
.model-inputs {
  display: grid;
  gap: 16px;
  margin: 16px 0;
  min-width: 0;
}
.model-input-row {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 16px;
}
.model-input-row legend {
  font-weight: 700;
}
#cpc-v10-form details {
  margin-bottom: 16px;
}
#cpc-v10-result {
  overflow-wrap: anywhere;
  min-width: 0;
}
