:root {
  color-scheme: light;
  --ink: #202923;
  --muted: #58665d;
  --line: #d9dfd9;
  --soft: #f4f6f3;
  --green: #205240;
  --lime: #b3ef90;
  --red: #a13d35;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html { min-width: 280px; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #fbfcfa; }
h1, h2, h3, p, dd, dl { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: 34px; line-height: 1.25; font-weight: 720; }
h2 { font-size: 20px; line-height: 1.45; font-weight: 680; }
h3 { font-size: 17px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, select, input[type=file] { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #458369; outline-offset: 3px; }
main:focus { outline: none; }
.icon { width: 18px; height: 18px; display: inline-block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; z-index: 20; left: 12px; top: -80px; padding: 9px 14px; background: white; }
.skip:focus { top: 8px; }
.mast { background: #18271f; color: white; }
.mast-inner, .workspace, .footer { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.mast-inner { min-height: 66px; display: flex; align-items: center; gap: 50px; }
.identity, .account, .secure, .mast nav, .mast nav a, .button, .text-link, .back, .tools, .search, .filter, .section-index, .section-heading, .view-head, .status, .footer { display: flex; align-items: center; }
.identity { gap: 10px; white-space: nowrap; }
.identity strong { font-size: 19px; font-weight: 680; }
.brand-mark { display: inline-block; flex: 0 0 auto; width: 30px; height: 30px; background: url("/favicon.svg") center / contain no-repeat; }
.wordmark { font-family: var(--mono); font-size: 10px; font-weight: 600; margin-left: 4px; color: #c7d5c8; border-left: 1px solid #526254; padding: 2px 0 2px 12px; }
.mast nav { align-self: stretch; gap: 26px; }
.mast nav a { position: relative; align-self: stretch; gap: 8px; padding: 0 2px; color: #bdcbbf; font-size: 14px; white-space: nowrap; }
.mast nav a:hover, .mast nav a[aria-current] { color: white; }
.mast nav a[aria-current]::after { content: ""; height: 3px; background: var(--lime); position: absolute; bottom: 0; left: 0; right: 0; }
.mast nav .icon { width: 16px; height: 16px; }
.account { gap: 9px; margin-left: auto; min-width: 0; }
.avatar { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #334537; color: #cfe5cc; }
.avatar .icon { width: 15px; }
.username { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.secure { color: #c6d3c6; gap: 8px; font-size: 13px; white-space: nowrap; }
.secure .icon { color: var(--lime); width: 16px; }
.account .icon-btn { color: #ced9d0; width: 32px; height: 32px; border-color: #455448; background: transparent; }
.account .icon-btn:hover { background: #304437; }
.workspace { flex: 1; padding-top: 36px; padding-bottom: 64px; }
.view-head { gap: 18px; justify-content: space-between; margin: 0 0 25px; }
.section-index { gap: 8px; font: 600 10px/1.3 var(--mono); color: #5b6b60; margin-bottom: 8px; }
.section-index span { width: 15px; height: 3px; background: #5d9b69; }
.footer { border-top: 1px solid var(--line); gap: 8px; min-height: 58px; font-size: 12px; color: #617064; }
.foot-mark { background: #81af73; width: 13px; height: 8px; transform: skew(-25deg); }
.foot-sep { color: #aab6ab; font-family: var(--mono); }
.button, .icon-btn, .text-link, .back { justify-content: center; gap: 7px; font-weight: 600; font-size: 14px; }
.button { min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 5px; width: fit-content; }
.primary { background: var(--green); color: white; }
.primary:not(:disabled):hover { background: #163d30; }
.secondary { background: white; border-color: #cfd7cf; }
.secondary:hover { background: var(--soft); }
.icon-btn { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 5px; border: 1px solid var(--line); color: #536357; background: white; }
.icon-btn:hover { background: #f0f4ee; color: var(--ink); }
.icon-btn .icon { width: 16px; height: 16px; }
.text-link, .back { display: inline-flex; color: var(--green); font-size: 13px; padding: 2px 0; width: fit-content; }
.text-link:hover, .back:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon, .back .icon { width: 15px; height: 15px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #f0f4ee; border-block: 1px solid #dbe2d8; }
.metric { position: relative; display: flex; align-items: center; gap: 14px; padding: 20px 24px; }
.metric + .metric::before { content: ""; position: absolute; top: 23%; bottom: 23%; left: 0; border-left: 1px solid #d3dcd2; }
.metric-icon, .empty-icon, .danger-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; }
.metric-icon.all { background: #dce5ec; color: #465e72; }
.metric-icon.online { background: #d7eace; color: #3d6b42; }
.metric-icon.pending { background: #ede5ce; color: #7d622c; }
.metric-icon.failed, .danger-icon { background: #f0ded9; color: var(--red); }
.metric dt { font-size: 12px; color: #58665c; }
.metric dd { color: #223326; font: 650 29px/1.1 var(--mono); margin-top: 4px; }
.section { margin-top: 34px; }
.section-heading { justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.tools { min-width: 0; gap: 8px; }
.search, .filter { background: white; min-height: 36px; border: 1px solid var(--line); border-radius: 5px; color: #627066; }
.search { gap: 7px; width: 197px; padding: 0 9px; }
.search .icon, .filter .icon { width: 15px; height: 15px; }
.search input, .filter select { color: var(--ink); min-width: 0; background: transparent; border: none; font-size: 13px; height: 34px; }
.search input { width: 100%; outline: none; }
.search:focus-within, .filter:focus-within { outline: 2px solid #658d72; outline-offset: 1px; }
.filter { padding: 0 5px 0 10px; gap: 3px; }
.filter select { outline: none; }
.sites-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: 13px; }
.sites-table th { background: #edf1ed; border-block: 1px solid var(--line); color: #526057; font-size: 12px; font-weight: 600; }
.sites-table th, .sites-table td { padding: 11px 14px; }
.sites-table th:nth-child(1) { width: 31%; }
.sites-table th:nth-child(2) { width: 18%; }
.sites-table th:nth-child(3) { width: 17%; }
.sites-table th:nth-child(4) { width: 21%; }
.sites-table td { border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sites-table tbody tr:hover { background: #f3f6f1; }
.site-name { font-weight: 650; font-size: 14px; }
.domain, .date-cell { font: 12px/1.55 var(--mono); color: var(--muted); }
.domain { margin-top: 3px; }
.status { display: inline-flex; width: fit-content; gap: 6px; border-radius: 3px; padding: 3px 7px; font-size: 12px; white-space: nowrap; background: #e8ece7; color: var(--muted); }
.status i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.status.online { color: #31643e; background: #e1efdc; }
.status.pending { color: #765923; background: #f7edcf; }
.status.failed { color: #983e35; background: #f5e7e2; }
.deployment-note { color: var(--muted); margin-top: 5px; font-size: 12px; }
.right { text-align: right; }
.ops > div { display: flex; justify-content: flex-end; gap: 3px; }
.ops .icon-btn { border-color: transparent; background: transparent; height: 32px; width: 32px; }
.ops .icon-btn:hover { border-color: var(--line); background: white; }
.ops [data-remove]:hover { color: var(--red); }
.mobile-k { display: none; }
.empty, .loading { min-height: 155px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 24px 15px; gap: 7px; text-align: center; }
.empty { border-block: 1px solid var(--line); background: #f5f7f3; }
.empty-icon { background: #e7ece5; color: #59735c; width: 33px; height: 33px; }
.empty h3 { font-size: 15px; font-weight: 600; }
.empty p { color: var(--muted); }
.shelf { margin-top: 35px; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (min-width: 681px) {
  .template-grid:has(> .template-card:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.template-grid > .empty { grid-column: 1 / -1; }
.template-card { display: block; min-width: 0; border: 1px solid var(--line); background: white; border-radius: 7px; overflow: hidden; padding-bottom: 17px; }
.template-card:hover { border-color: #88a08a; box-shadow: 0 3px 9px #253d2810; }
.cover { aspect-ratio: 16 / 9; background: #e4e9e1; border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.cover img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; }
.cover > .icon { width: 48px; height: 48px; color: #94a793; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin: 13px 17px 2px; }
.category-tag { display: inline-block; background: #eaf0e7; border-radius: 3px; color: #4a664d; font-size: 11px; line-height: 1.5; padding: 2px 7px; font-weight: 600; }
.card-arrow { color: #456f4d; display: inline-flex; }
.card-arrow .icon { width: 17px; }
.template-card h3, .template-card p { margin-inline: 17px; overflow-wrap: anywhere; }
.template-card h3 { font-size: 17px; margin-top: 4px; }
.template-card p, .selected-template p { font-size: 13px; color: var(--muted); line-height: 1.65; margin-top: 4px; }
.library-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin: 0 0 22px; padding-block: 12px; border-block: 1px solid var(--line); }
.categories { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.categories button { padding: 6px 10px; color: var(--muted); border-radius: 4px; font-size: 13px; }
.categories button:hover { background: #edf2ea; }
.categories [aria-pressed=true] { background: #e1ecd9; color: #335a38; font-weight: 650; }
.back { margin-bottom: 16px; }
.create-layout { display: grid; grid-template-columns: minmax(220px, 31%) minmax(0, 1fr); gap: 5%; align-items: start; border-top: 1px solid var(--line); padding-top: 25px; }
.selected-template { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.selected-info { padding: 18px; }
.selected-info h2 { font-size: 19px; margin-top: 6px; }
.selected-info .text-link { margin-top: 17px; }
.create-form { min-width: 0; max-width: 730px; }
fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
fieldset + fieldset { margin-top: 26px; }
legend { display: block; width: 100%; padding: 0 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font-size: 18px; font-weight: 650; }
legend span { margin-right: 10px; font: 600 12px var(--mono); color: #65766a; }
.field, .form-stack label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.field + .field { margin-top: 15px; }
label, .field label { font-size: 13px; font-weight: 600; }
input::placeholder, textarea::placeholder { color: #768278; font-weight: 400; }
.field input, .field textarea, .field select, .form-stack input { width: 100%; min-height: 42px; padding: 8px 11px; background: white; border: 1px solid #cbd4cb; border-radius: 4px; font-size: 14px; font-weight: 400; }
.field textarea { resize: vertical; }
.field input[type=file] { padding: 6px; background: #fafbf9; font-size: 13px; }
.field input[type=file]::file-selector-button { font: inherit; color: var(--green); background: #e9f0e5; border: 0; padding: 5px 10px; border-radius: 2px; margin-right: 9px; }
.asterisk { color: #8c4a40; margin-left: 4px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.form-error { padding: 9px 12px; background: #f8ebe6; border-left: 3px solid var(--red); margin: 15px 0 0; color: #833b32; font-size: 13px; overflow-wrap: anywhere; }
.login-main { flex: 1; display: grid; place-items: center; padding: 50px 20px; background-color: #f5f7f3; }
.login-block { width: min(100%, 366px); }
.login-emblem { width: 50px; height: 50px; margin-bottom: 20px; }
.login-emblem .brand-mark { width: 100%; height: 100%; }
.login-block h1 { font-size: 29px; margin-bottom: 28px; }
.form-stack { display: grid; grid-template-columns: 100%; gap: 7px; }
.form-stack > label:first-child { margin-bottom: 10px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 45px; }
.password-wrap button { position: absolute; right: 3px; top: 3px; border: none; }
.login-submit { width: 100%; justify-content: space-between; margin-top: 16px; }
dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 22px; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 16px 58px #15251d38; }
dialog::backdrop { background: #16221bc2; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.dialog-head .icon-btn { border-color: transparent; width: 30px; height: 30px; }
dialog h2 { font-size: 22px; }
dialog p { margin: 9px 0 18px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
dialog code { font: 600 12px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.danger { color: white; background: var(--red); }
.danger:not(:disabled):hover { background: #84332d; }
.notice { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); color: white; background: #254631; padding: 10px 16px; border-radius: 5px; box-shadow: 0 3px 15px #18361c36; font-size: 14px; overflow-wrap: anywhere; }
.notice.negative { background: #7c352e; }
@media (max-width: 920px) {
  .mast-inner, .workspace, .footer { width: calc(100% - 48px); }
  .mast-inner { gap: 30px; }
  .metric { padding: 17px 14px; gap: 10px; }
  .template-grid { gap: 14px; }
  .sites-table th, .sites-table td { padding-inline: 9px; }
}
@media (max-width: 680px) {
  h1 { font-size: 28px; }
  h2 { font-size: 18px; }
  .mast-inner, .workspace, .footer { width: calc(100% - 32px); }
  .mast-inner { flex-wrap: wrap; min-height: 55px; gap: 0; }
  .identity, .account { min-height: 55px; }
  .mast nav { order: 3; flex-basis: 100%; height: 40px; gap: 23px; }
  .mast nav a { font-size: 13px; }
  .account { max-width: 48%; gap: 6px; }
  .account .avatar { display: none; }
  .wordmark { font-size: 9px; padding-left: 7px; margin-left: 0; }
  .workspace { padding-block: 23px 36px; }
  .view-head { margin-bottom: 18px; gap: 10px; }
  .view-head .button { font-size: 13px; min-height: 36px; padding: 6px 10px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 13px 15px; }
  .metric:nth-child(3)::before { display: none; }
  .metric:nth-child(n+3) { border-top: 1px solid #d7dfd4; }
  .metric dd { font-size: 24px; }
  .metric-icon { width: 32px; height: 32px; }
  .section, .shelf { margin-top: 25px; }
  .section-heading { flex-wrap: wrap; gap: 9px; margin-bottom: 10px; }
  .tools { flex-basis: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; }
  .tools .search { min-width: 0; width: 100%; }
  .tools .filter { flex: 0 0 auto; }
  .sites-table, .sites-table tbody { display: block; width: 100%; }
  .sites-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sites-table tbody { border-top: 1px solid var(--line); }
  .sites-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); grid-template-areas: "name ops" "template date" "status status"; align-items: start; gap: 7px 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .sites-table td { display: block; border: none; padding: 0; }
  .site-identity { grid-area: name; }
  .template-cell { grid-area: template; font-size: 12px; }
  .date-cell { grid-area: date; text-align: right; }
  .status-cell { grid-area: status; }
  .ops { grid-area: ops; }
  .mobile-k { display: inline; margin-right: 4px; color: #627066; font: 11px/1.5 sans-serif; }
  .deployment-note { display: inline; margin-left: 6px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-meta { margin: 11px 12px 3px; }
  .template-card h3, .template-card p { margin-inline: 12px; }
  .template-card h3 { font-size: 15px; }
  .template-card p { font-size: 12px; }
  .library-tools { gap: 10px; }
  .create-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 16px; }
  .selected-template { display: grid; grid-template-columns: minmax(0, 35%) minmax(0, 1fr); align-items: center; }
  .selected-template .cover { align-self: stretch; aspect-ratio: auto; border: 0; }
  .selected-template .cover img { object-fit: contain; }
  .selected-info { padding: 12px; }
  .selected-info h2 { font-size: 16px; }
  .selected-info .text-link { margin-top: 7px; }
  .footer { min-height: 48px; }
}
@media (max-width: 440px) {
  .template-grid { grid-template-columns: minmax(0, 1fr); }
  .card-meta { margin: 11px 15px 3px; }
  .template-card h3, .template-card p { margin-inline: 15px; }
  .library-tools > .search { width: 100%; }
  .identity { gap: 7px; }
  .identity strong { font-size: 17px; }
  .brand-mark { width: 25px; height: 25px; }
}
@media (max-width: 340px) {
  .wordmark { display: none; }
  .metric { padding-inline: 9px; }
  .tools { gap: 4px; }
  .filter { padding-left: 4px; }
}
