:root {
  color-scheme: dark;
  --bg: #07111b;
  --bg-soft: #0b1824;
  --panel: rgba(13, 28, 41, .76);
  --line: rgba(151, 190, 210, .13);
  --line-strong: rgba(151, 190, 210, .25);
  --text: #edf8fb;
  --muted: #8da5b3;
  --cyan: #6ce5d7;
  --cyan-2: #26b8b0;
  --violet: #a98df3;
  --green: #72e09a;
  --amber: #ffc66b;
  --red: #ff7b86;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 2%, rgba(36, 143, 153, .13), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(117, 75, 190, .11), transparent 28rem),
    linear-gradient(160deg, #07111b 0%, #081520 50%, #061018 100%);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .15;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.ambient { position: fixed; width: 24rem; height: 24rem; border-radius: 50%; filter: blur(100px); opacity: .11; pointer-events: none; }
.ambient-one { background: var(--cyan); top: -12rem; left: 10%; }
.ambient-two { background: var(--violet); top: 18rem; right: -10rem; }
.shell { position: relative; z-index: 1; width: min(1440px, calc(100% - 48px)); margin: 0 auto; }

.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 5px); align-items: end; gap: 3px; width: 28px; height: 30px; padding: 5px; border: 1px solid rgba(108,229,215,.4); border-radius: 8px; box-shadow: inset 0 0 16px rgba(108,229,215,.08); }
.brand-mark span { display: block; background: var(--cyan); border-radius: 3px; }
.brand-mark span:nth-child(1) { height: 8px; opacity: .5; }
.brand-mark span:nth-child(2) { height: 16px; opacity: .75; }
.brand-mark span:nth-child(3) { height: 21px; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.03em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 8px; letter-spacing: .28em; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.readonly-pill { display: inline-flex; align-items: center; gap: 8px; color: #b9d3dc; font-size: 12px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 12px; background: rgba(7,17,27,.52); }
.readonly-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.sync-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.hero { min-height: 470px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(40px, 8vw, 130px); padding: 74px 2vw 64px; }
.eyebrow { margin: 0 0 12px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.hero h1 { margin: 0; font-size: clamp(44px, 5.2vw, 72px); line-height: .98; letter-spacing: -.065em; font-weight: 720; }
.hero h1 span { display: inline-block; white-space: nowrap; color: transparent; background: linear-gradient(90deg, #f2fbfc 8%, #83dcd4 62%, #9d8bdd); -webkit-background-clip: text; background-clip: text; }
.hero-description { max-width: 610px; margin: 28px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.glass { background: linear-gradient(145deg, rgba(17,35,49,.86), rgba(9,23,35,.74)); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(22px); }
.current-card { padding: 26px; border-radius: 22px; overflow: hidden; position: relative; }
.current-card::after { content: ""; position: absolute; width: 190px; height: 190px; right: -80px; top: -90px; border-radius: 50%; background: var(--cyan); filter: blur(90px); opacity: .1; }
.current-head { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; z-index: 1; }
.status-orb { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px rgba(141,165,179,.08); }
.status-orb.running { background: var(--cyan); box-shadow: 0 0 0 5px rgba(108,229,215,.09), 0 0 18px rgba(108,229,215,.75); animation: pulse 1.8s infinite; }
.status-orb.success { background: var(--green); box-shadow: 0 0 0 5px rgba(114,224,154,.09); }
.status-orb.failed { background: var(--red); box-shadow: 0 0 0 5px rgba(255,123,134,.09); }
@keyframes pulse { 50% { opacity: .48; transform: scale(.85); } }
.micro { display: block; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.current-head strong { display: block; margin-top: 3px; font-size: 17px; }
.job-chip { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a9c4cf; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; padding: 7px 9px; border-radius: 7px; background: rgba(0,0,0,.18); border: 1px solid var(--line); }
.progress-row { display: flex; align-items: center; gap: 20px; margin: 30px 0 22px; }
.progress-dial { --progress: 0deg; flex: 0 0 auto; display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: conic-gradient(var(--cyan) var(--progress), rgba(255,255,255,.07) 0); position: relative; }
.progress-dial::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #0d202d; }
.progress-dial span { position: relative; z-index: 1; font-size: 15px; font-weight: 700; }
.progress-copy { min-width: 0; }
.progress-copy strong { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-copy span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); }
.bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); box-shadow: 0 0 18px rgba(108,229,215,.7); transition: width .5s ease; }
.current-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 20px; }
.current-stats div { min-width: 0; }
.current-stats span { display: block; color: var(--muted); font-size: 10px; }
.current-stats strong { display: block; margin-top: 5px; font-size: 13px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric { display: flex; align-items: center; gap: 15px; min-height: 112px; padding: 20px; border-radius: 16px; box-shadow: 0 16px 42px rgba(0,0,0,.18); }
.metric-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; font-size: 15px; }
.metric-icon.cyan { color: var(--cyan); background: rgba(108,229,215,.09); }
.metric-icon.violet { color: var(--violet); background: rgba(169,141,243,.09); }
.metric-icon.green { color: var(--green); background: rgba(114,224,154,.09); }
.metric-icon.amber { color: var(--amber); background: rgba(255,198,107,.09); }
.metric span:not(.metric-icon) { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin-top: 4px; font-size: 19px; letter-spacing: -.02em; }
.metric small { display: block; margin-top: 4px; max-width: 160px; color: #6f8997; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section-block { padding-top: 88px; }
.section-title, .panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-title h2, .panel-head h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.section-note, #historyCount { color: var(--muted); font-size: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-card { position: relative; min-height: 230px; padding: 23px; overflow: hidden; border-radius: 17px; background: rgba(12,28,41,.62); border: 1px solid var(--line); }
.plan-card::after { content: ""; position: absolute; inset: auto -35px -45px auto; width: 120px; height: 120px; border: 1px solid rgba(108,229,215,.12); border-radius: 50%; }
.plan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-card h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.mode-pill { color: var(--cyan); font-size: 9px; padding: 5px 7px; border-radius: 999px; background: rgba(108,229,215,.07); border: 1px solid rgba(108,229,215,.14); white-space: nowrap; }
.plan-paths { margin: 18px 0; color: #9db3bd; font: 11px/1.65 ui-monospace, Consolas, monospace; }
.plan-paths span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.plan-meta span { color: var(--muted); font-size: 9px; }
.plan-meta strong { display: block; margin-top: 3px; font-size: 12px; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .55fr); gap: 14px; }
.tree-panel, .insight-panel { padding: 25px; border-radius: 18px; box-shadow: 0 16px 50px rgba(0,0,0,.17); }
select { appearance: none; color: #b9d0d8; background: #0a1823 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%238da5b3' d='m0 0 5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 11px center; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 32px 9px 11px; font: 11px inherit; outline: none; max-width: 250px; }
select:focus { border-color: rgba(108,229,215,.55); }
.tree-summary { display: flex; gap: 22px; margin: -6px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.tree-summary strong { margin-left: 5px; color: #d9e9ed; font-size: 11px; }
.tree { max-height: 580px; overflow: auto; padding-right: 7px; scrollbar-color: rgba(108,229,215,.22) transparent; }
.tree-node { position: relative; }
.tree-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 9px; min-height: 39px; padding: 4px 7px; border-radius: 8px; }
.tree-line:hover { background: rgba(255,255,255,.025); }
.tree-toggle { width: 19px; height: 19px; display: grid; place-items: center; color: var(--muted); background: none; border: 0; cursor: pointer; transition: transform .2s; }
.tree-toggle.open { transform: rotate(90deg); }
.tree-name { min-width: 0; color: #bed0d7; font: 11px ui-monospace, Consolas, monospace; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tree-size, .tree-files { color: #6f8997; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tree-children { margin-left: 15px; padding-left: 19px; border-left: 1px solid var(--line); }
.tree-children[hidden] { display: none; }
.node-state { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.node-state.complete { background: var(--green); }
.node-state.active { background: var(--cyan); box-shadow: 0 0 9px var(--cyan); animation: pulse 1.8s infinite; }
.node-state.pending { background: #526b77; }
.node-state.previous { background: var(--violet); }
.health-ring { --score: 0deg; width: 156px; height: 156px; margin: 38px auto; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at center, #0b1b28 58%, transparent 59%), conic-gradient(var(--green) var(--score), rgba(255,255,255,.06) 0); box-shadow: inset 0 0 32px rgba(0,0,0,.22); }
.health-ring span { font-size: 31px; font-weight: 700; }
.health-ring small { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.health-list { display: grid; gap: 12px; }
.health-item { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 11px; }
.health-item span { color: var(--muted); }
.health-item strong.ok { color: var(--green); }
.health-item strong.warn { color: var(--amber); }

.history-tools { display: flex; align-items: center; gap: 14px; }
.history-table { border-radius: 17px; overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,.17); }
.history-row { display: grid; grid-template-columns: 1.5fr 1.25fr 1fr .7fr .8fr 1.15fr; align-items: center; gap: 16px; min-height: 70px; padding: 13px 21px; border-top: 1px solid var(--line); }
.history-row:first-child { border-top: 0; }
.history-row:not(.history-header):hover { background: rgba(255,255,255,.02); }
.history-header { min-height: 45px; color: #68828e; font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.history-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.history-main i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.history-main i.success { background: var(--green); }
.history-main i.running { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.history-main i.failed { background: var(--red); }
.history-main i.skipped { background: var(--amber); }
.history-main strong, .history-cell strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-main small, .history-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-job { font: 10px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; color: #a9bec7; }
.snapshot-code { font: 10px ui-monospace, Consolas, monospace; color: var(--violet); }
.empty { padding: 55px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.skeleton { height: 54px; margin: 12px; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(255,255,255,.065), rgba(255,255,255,.025)); background-size: 220% 100%; animation: loading 1.4s infinite; }
.skeleton.tall { height: 250px; }
@keyframes loading { to { background-position: -220% 0; } }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 70px 0 32px; color: #536d79; font-size: 10px; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 35px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .split-layout { grid-template-columns: 1fr; }
  .insight-panel { display: grid; grid-template-columns: 1fr 190px 1fr; align-items: center; gap: 20px; }
  .insight-panel .panel-head { margin: 0; }
  .health-ring { margin: 10px auto; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 680px); }
  .topbar { height: 72px; }
  .sync-time { display: none; }
  .hero { display: block; min-height: 0; padding: 54px 0 42px; }
  .hero h1 { font-size: clamp(42px, 11.5vw, 58px); }
  .hero-description { margin-top: 22px; font-size: 13px; line-height: 1.75; }
  .current-card { margin-top: 38px; padding: 21px; }
  .job-chip { max-width: 118px; }
  .progress-row { margin-top: 24px; }
  .current-stats { gap: 8px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { min-height: 102px; padding: 16px 13px; gap: 11px; }
  .metric-icon { width: 32px; height: 32px; }
  .metric strong { font-size: 15px; }
  .section-block { padding-top: 66px; }
  .plan-grid { grid-template-columns: 1fr; }
  .tree-panel, .insight-panel { padding: 19px; }
  .insight-panel { display: block; }
  .panel-head { align-items: flex-start; }
  .panel-head select { max-width: 150px; }
  .history-header { display: none; }
  .history-row { grid-template-columns: 1fr 1fr; gap: 14px; padding: 17px; }
  .history-row > *:nth-child(n+3) { text-align: left; }
  .history-cell::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #607a86; font-size: 8px; letter-spacing: .08em; }
  footer { display: grid; text-align: center; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 42px; line-height: 1.02; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { min-height: 86px; }
}

@media (max-width: 430px) {
  .readonly-pill { padding: 7px 9px; font-size: 10px; }
  .brand strong { font-size: 16px; }
  .hero h1 { font-size: 43px; }
  .section-title { align-items: flex-start; }
  .history-tools { align-items: flex-end; flex-direction: column; gap: 7px; }
  .tree-line { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tree-files { display: none; }
}

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