:root {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #182824;
  background: #f3f6f3;
  --ink: #182824;
  --subtle: #52645c;
  --stroke: #d9e2dc;
  --accent: #006b51;
  --accent-deep: #00523d;
  --tint: #e7f6ee;
  --panel: #fff;
  --danger: #a43736;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
textarea { resize: vertical; min-height: 58px; }
a { color: var(--accent-deep); text-underline-offset: .2em; }
button { cursor: pointer; }
button:disabled { opacity: .46; cursor: default; }
:focus-visible { outline: 2px solid #087958; outline-offset: 3px; }
h1, h2, h3, p, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend, .field > label, .field > span, .field { font-weight: 650; }
code, .mono { font-family: var(--mono); }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.masthead { background: #132823; color: #f3fcf6; }
.mast-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-size: 17px; font-weight: 750; text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-mark { background: #bdf2cf; color: #103426; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; font: 720 19px var(--mono); }
nav { display: flex; align-items: center; gap: 28px; }
nav a { color: #c8dacf; text-decoration: none; font-size: 13px; white-space: nowrap; }
nav a:hover { color: #fff; text-decoration: underline; }
main { padding: 32px 0 64px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
h1 { font-size: clamp(24px, 4.6vw, 37px); line-height: 1.18; font-weight: 745; }
h2 { font-size: 19px; line-height: 1.35; font-weight: 740; }
h3 { font-size: 15px; line-height: 1.45; }
.intro { color: var(--subtle); margin-top: 7px; }
.status-pill, .target, .version-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 630; background: var(--tint); border: 1px solid #c8e8d9; color: var(--accent-deep); padding: 5px 9px; border-radius: 6px; gap: 6px; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #19876a; flex: 0 0 auto; }
.status-pill[data-tone="error"] { background: #fdf0e9; color: #8d472e; border-color: #f0d7c8; }
.status-pill[data-tone="error"]::before { background: #a55331; }
.panel { background: var(--panel); border: 1px solid var(--stroke); border-radius: 8px; margin-bottom: 18px; padding: 21px 24px 24px; scroll-margin-top: 16px; }
.section-heading, .group-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading { margin-bottom: 17px; }
.group-heading { margin-bottom: 12px; }
.source-controls, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.source-controls select { min-width: 174px; max-width: 240px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.field input, .field select, .field textarea { width: 100%; font-weight: 450; }
input:not([type="radio"]):not([type="checkbox"]), textarea, select { border: 1px solid #cdd9d1; background: #fbfcfb; border-radius: 6px; padding: 8px 10px; min-height: 37px; }
input[type="radio"], input[type="checkbox"] { flex: 0 0 auto; margin: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.span-two { grid-column: 1 / -1; }
.button { min-height: 35px; padding: 7px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #cdd9d1; border-radius: 6px; color: var(--ink); font-weight: 650; background: #fff; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.button:hover:not(:disabled) { background: #eef4f0; border-color: #9ab5a7; }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover:not(:disabled) { color: #fff; background: var(--accent-deep); border-color: var(--accent-deep); }
.button.current { border-color: #a7d6bf; background: var(--tint); color: var(--accent-deep); }
.field-help, .muted { color: var(--subtle); font-size: 12px; font-weight: 450; line-height: 1.5; }
.field-help { margin-top: 5px; }
.message { color: var(--accent-deep); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.message:empty { display: none; }
.message[data-tone="error"] { color: var(--danger); }
.editor-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.build-fields { display: flex; flex-direction: column; gap: 12px; }
.build-fields > .field-help { margin-top: -8px; }
.choice-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.choice, .line-check { display: inline-flex; align-items: center; gap: 7px; }
.choice { border: 1px solid var(--stroke); border-radius: 6px; padding: 7px 9px; }
.choice:has(input:checked) { border-color: #a7d6bf; background: var(--tint); }
.input-action { display: flex; gap: 7px; }
.input-action input { min-width: 0; }
.editor { min-width: 0; height: 377px; display: flex; flex-direction: column; background: #13221e; color: #d9ede1; border: 1px solid #1c3a30; border-radius: 8px; overflow: hidden; }
.editor-top, .editor-footer { padding: 8px 11px; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #192e26; }
.editor-top { border-bottom: 1px solid #2e473c; }
.editor-footer { border-top: 1px solid #2e473c; }
.editor-tabs { display: flex; min-width: 0; }
.editor-tab { min-height: 29px; border: 0; border-radius: 4px; color: #bfd6c7; background: transparent; padding: 5px 8px; font: 12px var(--mono); }
.editor-tab.current { color: #e6faeb; background: #29433a; }
.editor-version, .editor-size { color: #bed7c8; font: 11px var(--mono); }
.editor pre { margin: 0; padding: 14px; flex: 1; overflow: auto; tab-size: 2; font-size: 12px; line-height: 1.62; }
.editor .editor-button { min-height: 29px; border-color: #48665a; color: #eef9f1; background: #22392f; font-size: 12px; }
.editor .editor-button:hover:not(:disabled) { background: #345347; border-color: #678a7a; }
.target span { color: #468472; }
.architecture-options { display: flex; gap: 10px; margin-top: 7px; }
.architecture-option { flex: 1; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--stroke); border-radius: 6px; padding: 10px 12px; cursor: pointer; }
.architecture-option:has(input:checked) { border-color: #8dc9ad; background: var(--tint); }
.architecture-option span { font-weight: 680; }
.architecture-option small { display: block; color: var(--subtle); font-weight: 450; font-size: 12px; line-height: 1.45; margin-top: 2px; }
.architecture-option input { margin-top: 2px; }
.project-fields { margin-top: 14px; }
.group { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--stroke); }
.account-form { background: #f4f8f5; padding: 12px; border: 1px solid var(--stroke); border-radius: 6px; display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 8px 10px; margin-bottom: 10px; }
.account-form .actions, .account-help { grid-column: 1 / -1; }
.account-help { margin: 1px 0 0; }
.empty { padding: 13px 14px; border: 1px dashed #cbd9d0; border-radius: 6px; background: #f8faf8; color: var(--subtle); font-size: 13px; line-height: 1.5; }
#public-deploy { margin-top: 15px; }
.account-table-wrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: 6px; }
.account-table { width: 100%; border-collapse: collapse; }
.account-table td, .account-table th { padding: 8px 12px; text-align: left; }
.account-table th { font-size: 12px; font-weight: 650; background: #f5f8f5; }
.account-table td { border-top: 1px solid var(--stroke); }
.account-table .center { text-align: center; min-width: 51px; }
.account-table .right { text-align: right; }
.account-cell { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.account-name { font-weight: 650; overflow-wrap: anywhere; }
.account-ready { color: var(--accent-deep); font-size: 11px; white-space: nowrap; }
.text-button { background: transparent; border: 0; padding: 4px 5px; color: var(--accent-deep); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.text-button.remove { color: var(--subtle); }
#account-message:not(:empty) { margin-bottom: 9px; }
.sub-fields { display: grid; grid-template-columns: 1fr 1.24fr; gap: 14px; }
.sub-fields textarea { flex: 1; }
.deployment-actions { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.job-steps { list-style: none; margin: 0; padding: 0; }
.job-step { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 9px 2px; border-top: 1px solid #e5ece7; }
.job-step a { overflow-wrap: anywhere; }
.job-error { color: var(--danger); flex: 0 0 100%; }
.sub-links { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin-top: 13px; }
.sub-links .field:first-child { grid-column: 1 / -1; }
.sub-links input { min-width: 0; text-overflow: ellipsis; }
.source-link { font-size: 12px; font-weight: 650; }
.history-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--stroke); padding: 10px 0; }
.history-row h3 { font-size: 13px; }
.history-row .actions { flex: 0 0 auto; }
.version-tag { font-family: var(--mono); white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 780px) {
  .shell { width: calc(100% - 36px); }
  main { padding-top: 23px; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor { height: 280px; }
  .page-heading { align-items: flex-start; }
  .sub-fields { grid-template-columns: 1fr; }
  .panel { padding: 17px; }
}
@media (max-width: 480px) {
  .shell { width: calc(100% - 24px); }
  .mast-inner { height: 55px; gap: 8px; }
  .brand { font-size: 14px; gap: 6px; }
  .brand-mark { width: 24px; height: 24px; font-size: 16px; }
  nav { gap: 10px; }
  nav a { font-size: 11px; }
  .page-heading, .section-heading { flex-wrap: wrap; }
  .page-heading { gap: 8px; margin-bottom: 15px; }
  .intro { font-size: 12px; }
  .panel { padding: 13px; }
  .source-controls { flex: 1 1 100%; }
  .source-controls select { flex: 1; max-width: none; }
  .architecture-option { padding: 8px; gap: 6px; }
  .architecture-option small { font-size: 11px; }
  .account-form, .sub-links { grid-template-columns: 1fr; }
  .account-table td, .account-table th { padding: 7px 5px; }
  .account-table .center { min-width: 37px; }
  .account-cell { display: grid; }
  .history-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
