:root {
  --ink: #202521;
  --black: #202521;
  --dim: #59635d;
  --line: #d8ded7;
  --canvas: #f6f7f3;
  --paper: #fff;
  --mint: #d7edbd;
  --dark-green: #2d5a3e;
  --danger: #963e32;
  font: 15px/1.5 "DM Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

button,a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

a {
  color: inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 3px solid #759b65;
  outline-offset: 2px;
}

button {
  color: inherit;
}

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

h1 {
  font-size: clamp(31px,4vw,48px);
  font-weight: 680;
  letter-spacing: -.07em;
  line-height: 1.18;
}

h2 {
  font-size: 21px;
  font-weight: 660;
  letter-spacing: -.038em;
}

h3 {
  font-size: 15px;
}

.mono,.big-number,.release-number,.number {
  font-family: "Geist Mono","SFMono-Regular",Consolas,monospace;
  font-variant-numeric: tabular-nums;
}

.muted,.hint {
  color: var(--dim);
}

.muted {
  font-size: 14px;
}

.hint {
  font-size: 12px;
  line-height: 1.65;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: .05em;
  color: var(--dim);
}

[hidden] {
  display: none!important;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  letter-spacing: -.035em;
  font-size: 21px;
}

.mark {
  position: relative;
  display: inline-block;
  width: 33px;
  height: 35px;
}

.mark i {
  position: absolute;
  left: 2px;
  top: 9px;
  display: block;
  width: 24px;
  height: 16px;
  transform: skewY(-16deg);
  border: 2px solid currentColor;
  border-radius: 2px;
}

.mark i+i {
  top: 15px;
  left: 8px;
  background: inherit;
}

.gate,.public {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(ellipse at 22% 12%,#e4eadc,transparent 50%),var(--canvas);
}

.gate-card,.feedback-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  border-radius: 6px;
  padding: clamp(25px,5vw,48px);
  width: min(100%,445px);
}

.feedback-card {
  width: min(100%,650px);
}

.gate-title {
  margin: 36px 0 25px;
}

.gate-title h1 {
  font-size: 34px;
}

.gate-title .eyebrow {
  margin-bottom: 8px;
}

.gate-title .muted {
  margin-top: 12px;
}

.gate-link {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  padding-top: 22px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}

form {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

input,textarea,select {
  width: 100%;
  min-width: 0;
  border: 1px solid #bdc7bd;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 5px;
  line-height: 1.45;
}

textarea {
  resize: vertical;
}

input[type=file] {
  background: var(--canvas);
  font-size: 13px;
}

input[type=file]::file-selector-button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 5px 9px;
  margin-right: 10px;
}

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

.actions,.button-row,.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.primary,.secondary,.soft,.text-button,.chip-link {
  border-radius: 5px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary,.secondary,.soft {
  padding: 9px 14px;
  font-size: 14px;
}

.primary {
  background: var(--black);
  color: white;
}

.primary:hover {
  background: #344436;
}

.secondary {
  background: white;
  border-color: var(--line);
}

.secondary:hover,.soft:hover {
  background: #eff3ec;
}

.soft {
  background: #edf2e8;
}

.wide {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.text-button,.chip-link {
  background: transparent;
  color: var(--dark-green);
  font-size: 13px;
  padding: 3px 4px;
}

.text-button:hover,.chip-link:hover {
  text-decoration: underline;
}

.warn {
  color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  white-space: pre-wrap;
}

.form-error:empty {
  display: none;
}

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

.sidebar {
  background: var(--black);
  color: #f9fbf7;
  padding: 36px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100svh;
}

.sidebar .wordmark {
  padding-left: 8px;
}

.sidebar .mark {
  color: var(--mint);
}

.product-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c2cbbf;
  border-top: 1px solid #475047;
  border-bottom: 1px solid #475047;
  padding: 13px 10px;
  font-size: 13px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b4da8e;
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #d9ded8;
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 560;
  white-space: nowrap;
}

.sidebar nav button span {
  font-size: 19px;
  width: 23px;
  text-align: center;
  line-height: 1;
}

.sidebar nav button:hover {
  background: #343d34;
}

.sidebar nav button[aria-current=page] {
  color: #182016;
  background: var(--mint);
}

.nav-foot {
  margin-top: auto;
  display: grid;
  border-top: 1px solid #475047;
  padding: 17px 8px 0;
  gap: 12px;
}

.nav-foot a,.nav-foot button {
  font-size: 13px;
  text-decoration: none;
  background: none;
  border: 0;
  color: #cbd3c9;
  padding: 0;
  text-align: left;
}

.workspace {
  padding: 30px clamp(24px,4.3vw,76px) 54px;
  width: 100%;
  max-width: 1590px;
}

.app-line {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.app-line .mono {
  font-size: 11px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 30px 0 24px;
}

.release-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}

.release-card {
  padding: 22px 24px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
}

.release-card.featured {
  background: #29382c;
  color: #f8faf4;
  border-color: #29382c;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.release-card .chip {
  font-size: 10px;
  border: 1px solid #cad3c9;
  border-radius: 100px;
  padding: 2px 7px;
  letter-spacing: .07em;
}

.featured .chip {
  color: var(--mint);
  border-color: #677962;
}

.release-number {
  font-size: clamp(27px,3.6vw,44px);
  line-height: 1.3;
  margin: 18px 0 7px;
  word-break: break-all;
  letter-spacing: -.06em;
}

.release-number.empty-val {
  font-family: inherit;
  font-size: 26px;
  letter-spacing: -.05em;
}

.release-card small {
  font-size: 12px;
  color: var(--dim);
}

.featured small {
  color: #c2cbbc;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 15px 0 28px;
}

.metric {
  padding: 18px 19px;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border: 0;
}

.metric span {
  display: block;
  color: var(--dim);
  font-size: 13px;
}

.big-number {
  display: block;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.065em;
}

.version-metrics .big-number {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-period {
  color: var(--dim);
  font-size: 12px;
}

.version-period select {
  margin-top: 3px;
}

.version-share {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.version-share meter {
  width: 76px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 18px;
}

.panel-head {
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 17px;
}

.scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}

th,td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #e7ebe4;
  vertical-align: middle;
}

th {
  font-size: 12px;
  font-weight: 550;
  color: var(--dim);
  background: #f3f5f0;
}

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

.title-cell {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 12px;
  background: #edf0ed;
  color: #4e5a52;
  white-space: nowrap;
}

.pill:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill.open,.pill.review,.pill.draft,.pill.paused {
  background: #f3ecdb;
  color: #775723;
}

.pill.published,.pill.fixed,.pill.on,.pill.running,.pill.promoted {
  background: #e4efdc;
  color: #355b37;
}

.pill.working {
  background: #e5edf3;
  color: #365972;
}

.empty {
  padding: 32px 20px;
  color: var(--dim);
  font-size: 14px;
  text-align: center;
}

.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
  font-size: 16px;
}

.filters {
  display: flex;
  gap: 9px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.filters label {
  font-size: 12px;
  color: var(--dim);
}

.filters select,.filters input {
  padding: 7px 9px;
  min-width: 104px;
  width: auto;
  max-width: 190px;
}

.panel-note,.page-note {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.7;
}

.panel-note {
  padding: 16px 19px;
}

.page-note {
  margin-bottom: 16px;
}

.more {
  margin: 0 0 20px;
}

.endpoint {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  word-break: break-all;
}

.endpoint code,code {
  font-family: "SFMono-Regular",Consolas,monospace;
  font-size: .92em;
}

.link-group {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
  padding: 16px 20px;
}

.link-group a {
  font-size: 14px;
  color: var(--dark-green);
}

.notice-body,.detail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.detail-grid div {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  word-break: break-word;
}

.detail-grid small,.detail-label {
  display: block;
  color: var(--dim);
  font-size: 12px;
}

.detail-label {
  margin: 17px 0 6px;
}

.loglist,.history {
  margin: 5px 0;
  padding-left: 20px;
  font-size: 13px;
}

.loglist li,.history li {
  margin: 5px 0;
}

.inline-note {
  border-left: 3px solid #93ad7a;
  padding: 9px 12px;
  background: #f0f4eb;
  font-size: 13px;
  color: #43523e;
}

.key-output {
  font: 14px/1.6 monospace;
  user-select: all;
  background: var(--canvas);
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  word-break: break-all;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0;
  width: min(560px,calc(100% - 30px));
  max-height: 88svh;
  color: var(--ink);
  box-shadow: 0 22px 80px #10181033;
}

dialog::backdrop {
  background: #15201477;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 17px 22px;
}

.modal-head h2 {
  font-size: 20px;
}

.close {
  border: 0;
  background: #f1f4ef;
  color: var(--dim);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}

#modal-body {
  padding: 19px 22px 23px;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(430px,90vw);
  z-index: 9;
  background: #27362b;
  color: #fff;
  border-radius: 6px;
  padding: 11px 17px;
  font-size: 14px;
  box-shadow: 0 10px 30px #14201624;
}

.success-check {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--mint);
  border-radius: 50%;
  margin-bottom: 12px;
}

#receipt button {
  margin-top: 18px;
}

.dialog-foot {
  margin-top: 17px;
}

@media(max-width:940px) {
  .shell {
    grid-template-columns: 175px minmax(0,1fr);
  }
  .sidebar {
    padding: 26px 13px;
  }
  .workspace {
    padding: 24px 22px;
  }
  .release-card {
    padding: 17px;
  }
  .title-cell {
    max-width: 220px;
  }
}

@media(max-width:700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    gap: 11px;
    padding: 14px 16px 9px;
  }
  .sidebar .wordmark {
    font-size: 18px;
    padding: 0;
  }
  .sidebar .mark {
    transform: scale(.8);
    width: 28px;
    height: 28px;
  }
  .sidebar .product-chip {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
  }
  .sidebar nav button {
    font-size: 13px;
    padding: 6px 9px;
  }
  .sidebar nav button span {
    display: none;
  }
  .nav-foot {
    position: absolute;
    right: 14px;
    top: 18px;
    display: flex;
    border: 0;
    margin: 0;
    padding: 0;
    gap: 12px;
  }
  .nav-foot a,.nav-foot button {
    font-size: 11px;
  }
  .workspace {
    padding: 15px 14px 40px;
  }
  .page-header {
    margin: 20px 0 17px;
    align-items: flex-end;
  }
  .page-header h1 {
    font-size: 29px;
  }
  .release-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .release-card {
    padding: 13px;
  }
  .release-number {
    margin: 13px 0 2px;
  }
  .release-number.empty-val {
    font-size: 21px;
  }
  .release-card .chip {
    display: none;
  }
  .metric {
    padding: 12px;
  }
  .big-number {
    font-size: 25px;
  }
  .metrics {
    margin: 10px 0 18px;
  }
  .panel-head {
    padding: 12px 14px;
  }
  .page-header .secondary,.page-header .primary {
    font-size: 12px;
    padding: 7px 9px;
  }
  td,th {
    padding: 10px;
  }
  .public {
    padding: 12px;
  }
  .fields {
    gap: 8px;
  }
  .gate-title h1 {
    font-size: 28px;
  }
  .app-line {
    font-size: 11px;
  }
  .form-error {
    max-width: 100%;
  }
}

.consent-row { display: flex; align-items: flex-start; gap: 8px; }
.consent-row input { width: auto; margin-top: 4px; }
.log-preview { margin: 10px 0 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--canvas); font: 12px/1.55 "SFMono-Regular",Consolas,monospace; max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.quick-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.preset-btn { font-size: 13px; padding: 6px 11px; border: 1px solid var(--line); }
.preset-btn.active { background: var(--black); color: #fff; border-color: var(--black); }
.drop-zone { display: grid; gap: 8px; padding: 12px; border: 1px dashed #9fb0a1; border-radius: 6px; background: var(--canvas); transition: border-color .15s, background .15s; }
.drop-zone.dragover { border-color: var(--dark-green); background: #ebf2e6; }
.receipt-actions { margin-top: 18px; }
#receipt .receipt-actions button { margin-top: 0; }
