:root {
  color-scheme: light;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-soft: #fff6f6;
  --ink: #181b22;
  --muted: #606775;
  --soft: #8a909c;
  --line: #ececef;
  --line-strong: #dedfe4;
  --brand: #d94349;
  --brand-dark: #bd3037;
  --brand-soft: #fff0f1;
  --shadow: 0 18px 48px rgba(24, 27, 34, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 1px 1px, rgba(217, 67, 73, 0.08) 1px, transparent 0) 0 0 / 28px 28px,
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2 + 24px));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-link {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: var(--brand);
  border-radius: 8px;
  font-weight: 950;
  transform: skew(-12deg);
}

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

.brand span:not(.brand-mark) {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.primary-button {
  justify-self: end;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.page {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.hero {
  display: grid;
  max-width: 820px;
  gap: 10px;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.subtitle {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.sync-status {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.sync-status strong {
  color: var(--brand);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px);
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(217, 67, 73, 0.12);
}

.status-tabs,
.view-tabs,
.density-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.status-tabs {
  margin-bottom: 18px;
}

.view-tabs {
  margin-bottom: 12px;
}

.density-tabs {
  margin-bottom: 30px;
}

.density-tabs span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
}

.chip,
.tab,
.density {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.chip:hover,
.tab:hover,
.density:hover {
  transform: translateY(-1px);
}

.chip.active,
.tab.active,
.density.active {
  border-color: rgba(217, 67, 73, 0.24);
  background: var(--brand-soft);
  color: var(--brand);
}

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

.section-heading h2 {
  margin-bottom: 4px;
  font-size: 24px;
  letter-spacing: 0;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--soft);
  font-size: 14px;
  font-weight: 800;
}

.product-grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.product-grid.density-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 390px;
}

.product-grid.density-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 340px;
  gap: 18px;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  min-height: 0;
  height: 100%;
  padding: 36px 34px 32px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.clickable-card {
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  border-color: rgba(217, 67, 73, 0.48);
  box-shadow: 0 22px 56px rgba(217, 67, 73, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.density-4 .product-card {
  padding: 26px 22px 24px;
}

.density-4 .product-card::after {
  width: 82px;
  height: 82px;
}

.density-4 .status-ribbon {
  top: 18px;
  right: 18px;
  max-width: 104px;
}

.density-4 .type-badge {
  margin-bottom: 18px;
  padding: 7px 10px;
}

.density-4 .product-card h3 {
  max-width: calc(100% - 48px);
  min-height: 54px;
  margin-bottom: 10px;
  font-size: 21px;
}

.density-4 .product-card p {
  min-height: 72px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.7;
}

.density-4 .meta-row {
  gap: 8px;
}

.density-4 .meta-pill {
  padding: 6px 10px;
  font-size: 12px;
}

.product-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 118px;
  height: 118px;
  background: linear-gradient(45deg, transparent 50%, var(--brand-soft) 50%);
  content: "";
}

.status-ribbon {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1;
  max-width: 130px;
  padding: 5px 9px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-ribbon.status-research,
.status-ribbon.status-build,
.status-ribbon.status-done {
  background: var(--status-color);
}

.type-badge {
  width: fit-content;
  margin-bottom: 24px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-card h3 {
  max-width: calc(100% - 72px);
  min-height: 66px;
  margin-bottom: 14px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card p {
  min-height: 84px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.75;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.meta-pill {
  max-width: 100%;
  padding: 7px 13px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill.status-research,
.status-pill.status-build,
.status-pill.status-done {
  border-color: color-mix(in srgb, var(--status-color) 32%, #ffffff);
  background: var(--status-soft);
  color: var(--status-color);
}

.card-link-hint {
  align-self: end;
  width: fit-content;
  margin-top: 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 950;
}

.list-view {
  display: grid;
  gap: 12px;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.4fr) 160px 150px;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.list-item strong {
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.list-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.list-meta {
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
}

.board-view {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.status-column {
  min-height: 240px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.status-column.status-research,
.status-column.status-build,
.status-column.status-done {
  border-color: color-mix(in srgb, var(--status-color) 28%, var(--line-strong));
  background: linear-gradient(180deg, var(--status-soft), rgba(255, 255, 255, 0.92) 120px);
}

.status-column h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 16px;
  letter-spacing: 0;
}

.status-column.status-research h3,
.status-column.status-build h3,
.status-column.status-done h3 {
  color: var(--status-color);
}

.status-column h3 span {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--status-color);
  font-size: 13px;
}

.mini-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mini-card + .mini-card {
  margin-top: 10px;
}

.mini-card strong {
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.empty-mini {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--soft);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.empty-state {
  padding: 46px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--soft);
  text-align: center;
}

.hidden {
  display: none;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
}

.detail-action.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.detail-action.disabled {
  color: var(--soft);
  background: #f7f7f8;
}

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

.detail-metric {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.detail-metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 950;
}

.detail-metric strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.detail-sections {
  display: grid;
  gap: 14px;
}

.detail-sections section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.detail-sections h3 {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 15px;
}

.detail-sections p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.project-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.project-detail-shell {
  display: grid;
  gap: 18px;
}

.project-hero {
  display: grid;
  gap: 16px;
  padding: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.compact-hero {
  gap: 12px;
  padding: 30px;
}

.project-hero h1 {
  max-width: 960px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
}

.project-hero p {
  max-width: 900px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.8;
}

.back-link {
  width: fit-content;
  color: var(--brand);
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
}

.project-overview {
  margin-bottom: 0;
}

.project-status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--status-color) 24%, var(--line-strong));
  border-radius: 8px;
  background: linear-gradient(90deg, var(--status-soft), rgba(255, 255, 255, 0.94) 62%);
  box-shadow: 0 14px 36px rgba(24, 27, 34, 0.045);
}

.project-status-strip .type-badge {
  margin-bottom: 10px;
  background: #ffffff;
  color: var(--status-color);
}

.project-status-strip h2 {
  margin-bottom: 6px;
  color: var(--status-color);
  font-size: 26px;
}

.project-status-strip p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.65;
}

.status-side {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.status-side span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 950;
}

.status-side strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}

.status-side em {
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.55;
}

.status-research {
  --status-color: #b45309;
  --status-soft: #fff7ed;
}

.status-build {
  --status-color: #2563eb;
  --status-soft: #eff6ff;
}

.status-done {
  --status-color: #15803d;
  --status-soft: #f0fdf4;
}

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

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

.project-tabs {
  border-top: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
}

.project-tab-list {
  display: flex;
  align-items: center;
  gap: clamp(28px, 8vw, 96px);
  border-bottom: 1px solid var(--line-strong);
}

.project-tab {
  position: relative;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  font-weight: 950;
}

.project-tab.active {
  color: var(--ink);
}

.project-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 4px;
  background: var(--ink);
  content: "";
}

.project-tab-panels {
  padding: 34px 0 0;
}

.project-tab-panel {
  display: none;
}

.project-tab-panel.active {
  display: block;
}

.doc-date {
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid rgba(217, 67, 73, 0.2);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand);
  font-size: 13px;
  font-weight: 950;
}

.project-content-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.project-content-block h2 {
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 17px;
}

.project-content-block p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.document-content {
  display: grid;
  gap: 16px;
}

.compact-doc {
  margin-top: 4px;
}

.important-block {
  border-color: rgba(217, 67, 73, 0.18);
}

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

.doc-blocks {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.doc-heading {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}

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

.doc-table div,
.doc-kv {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.doc-table span,
.doc-kv span {
  display: block;
  margin-bottom: 6px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 950;
}

.doc-table strong,
.doc-kv strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.doc-section,
.doc-paragraph {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.doc-section h3 {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 17px;
}

.doc-section p,
.doc-paragraph p,
.doc-paragraph {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.doc-section p + p {
  margin-top: 8px;
}

.doc-line {
  padding-left: 12px;
  border-left: 3px solid var(--brand-soft);
}

@media (max-width: 1080px) {
  .product-grid,
  .board-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid.density-3,
  .product-grid.density-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 72px;
    padding: 0 16px;
  }

  .primary-button {
    padding: 0 14px;
  }

  .page {
    padding: 36px 16px 56px;
  }

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

  .product-card {
    min-height: 260px;
    padding: 26px 22px 24px;
  }

  .product-card h3 {
    max-width: 100%;
    font-size: 22px;
  }

  .status-ribbon {
    position: static;
    width: fit-content;
    margin-bottom: 16px;
  }

  .product-card::after {
    width: 78px;
    height: 78px;
  }

  .product-grid,
  .board-view {
    grid-template-columns: 1fr;
  }

  .product-grid.density-3,
  .product-grid.density-4 {
    grid-template-columns: 1fr;
  }

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

  .project-status-strip {
    grid-template-columns: 1fr;
  }

  .status-side {
    justify-items: start;
    text-align: left;
  }

  .project-content {
    grid-template-columns: 1fr;
  }

  .project-tab-list {
    gap: 22px;
    overflow-x: auto;
  }

  .project-tab {
    flex: 0 0 auto;
    font-size: 18px;
  }

  .project-hero {
    padding: 24px;
  }
}
