:root {
  color-scheme: light;
  --paper: #fbfbfa;
  --surface: #ffffff;
  --surface-soft: #f4f6f3;
  --ink: #151a18;
  --muted: #68736e;
  --faint: #8b948f;
  --line: #dce1dd;
  --line-strong: #bdc8c1;
  --brand: #174d3b;
  --brand-press: #0f382b;
  --accent: #9a5f2d;
  --danger: #9d2f23;
  --ok-bg: #edf7f1;
  --ok-line: #b8d9c5;
  --error-bg: #fff3f0;
  --error-line: #e8b5ad;
  --shadow: 0 18px 44px rgba(28, 40, 34, 0.08);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  background:
    linear-gradient(180deg, rgba(23, 77, 59, 0.055), rgba(23, 77, 59, 0) 240px),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--brand);
  pointer-events: none;
}

main {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 16px;
}

main.wide {
  width: min(1240px, 100%);
}

a {
  color: var(--brand);
}

.panel {
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
}

.page-title {
  display: grid;
  gap: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 780;
}

h2 {
  margin: 22px 0 10px;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0;
  font-weight: 800;
}

p {
  margin: 8px 0;
}

.meta {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.meta-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.meta-row:last-child {
  border-bottom: 0;
}

.meta-row strong {
  color: var(--ink);
  font-weight: 760;
}

label {
  display: block;
  margin: 14px 0 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select:disabled {
  color: var(--faint);
  background-color: #f6f8f6;
  cursor: not-allowed;
}

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

input::placeholder,
textarea::placeholder {
  color: #a0aaa5;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 77, 59, 0.14);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button,
.button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.secondary {
  background: #eef1ef;
  color: var(--ink);
  border: 1px solid var(--line);
}

.secondary:hover {
  background: #e2e8e4;
}

.status {
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

.status.ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: #28583c;
}

.status.error {
  border-color: var(--error-line);
  background: var(--error-bg);
  color: var(--danger);
}

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

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

.item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 14px 14px 18px;
}

.item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}

.item-title {
  font-weight: 820;
  margin-bottom: 6px;
}

.compact {
  font-size: 14px;
}

.desktop-grid {
  display: grid;
  grid-template-columns: minmax(330px, 410px) 1fr;
  gap: 18px;
  align-items: start;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin: 0 0 18px;
}

.workspace-header .topbar {
  margin-bottom: 0;
}

.workspace-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 440px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 820;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.link-cell {
  word-break: break-all;
  color: var(--brand);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.toolbar .field {
  flex: 1 1 180px;
}

.form-section {
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.form-section:first-of-type {
  border-top: 0;
}

.update-body {
  background:
    radial-gradient(circle at 18% 0%, rgba(151, 181, 163, 0.28), transparent 360px),
    linear-gradient(180deg, #f8f7f3 0%, #f2f4f1 100%);
}

.update-body::before {
  display: none;
}

.update-shell {
  min-height: 100vh;
  width: min(1040px, 100%);
  display: grid;
  align-items: start;
  padding-top: 42px;
  padding-bottom: 42px;
}

.update-page {
  width: 100%;
  animation: surface-in 360ms ease both;
}

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

.product-name {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 760;
}

.update-heading h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.update-note {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.project-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 1px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 14px 36px rgba(39, 50, 44, 0.07);
}

.project-strip.has-key {
  grid-template-columns: 150px minmax(0, 1fr) 150px;
}

.project-chip {
  min-width: 0;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px 16px;
}

.project-chip span {
  display: block;
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 760;
}

.project-chip strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.update-card {
  position: relative;
  padding: 24px;
  border-radius: 12px;
  border-color: rgba(189, 200, 193, 0.78);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(33, 43, 38, 0.1);
  backdrop-filter: blur(12px);
}

.update-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.field-block {
  min-width: 0;
}

.field-block label {
  margin-top: 0;
  margin-bottom: 8px;
  color: #2b332f;
}

.field-wide,
.submit-row {
  grid-column: 1 / -1;
}

.update-form textarea,
.update-form input,
.update-form select {
  border-radius: 10px;
  border-color: #cfd8d2;
  background: #fbfcfb;
}

.update-form textarea {
  min-height: 118px;
}

.submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.submit-row button {
  min-width: 176px;
  border-radius: 999px;
  box-shadow: 0 14px 26px rgba(23, 77, 59, 0.2);
}

@keyframes surface-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 760px) {
  main {
    padding: 16px 10px;
  }

  main.wide {
    width: min(760px, 100%);
  }

  .panel {
    padding: 18px;
    box-shadow: none;
  }

  h1 {
    font-size: 21px;
  }

  .workspace-header {
    display: grid;
    align-items: start;
  }

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

  .meta-row {
    grid-template-columns: 72px 1fr;
  }

  button,
  .button {
    width: 100%;
  }

  .update-shell {
    padding: 18px 12px 0;
  }

  .update-heading {
    display: block;
    margin-bottom: 14px;
  }

  .product-name {
    margin-bottom: 6px;
  }

  .update-heading h1 {
    font-size: 30px;
  }

  .update-note {
    margin-top: 8px;
    white-space: normal;
  }

  .project-strip {
    grid-template-columns: 1fr;
    border-radius: 12px;
    margin-bottom: 12px;
  }

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

  .update-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .update-card {
    padding: 16px;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 34px rgba(33, 43, 38, 0.08);
  }

  .submit-row {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 2px -16px -16px;
    padding: 12px 16px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), #fff 38%);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }

  .submit-row button {
    width: 100%;
  }
}

@media (min-width: 1100px) {
  .update-card {
    padding: 28px;
  }

  .update-form {
    column-gap: 16px;
  }
}
