:root {
  color-scheme: light;
  font-family: "Instrument Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #29243a;
  background: #f8f7fc;
  --ink: #29243a;
  --muted: #635c73;
  --line: #e5e0ee;
  --purple: #6242ae;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, select { font: inherit; }
:focus-visible { outline: 3px solid #a085ef; outline-offset: 4px; }
.top {
  height: 68px; display: flex; gap: 22px; align-items: center;
  border-bottom: 1px solid var(--line); padding: 0 max(24px, calc((100% - 1440px) / 2));
  background: #fff; position: sticky; top: 0; z-index: 2;
}
.brand { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 800; font-size: 21px; }
.brand-tail { color: var(--purple); }
.mark { background: #5c3c9d; color: white; border-radius: 9px; padding: 4px 10px; margin-right: 3px; }
.top-label { border-left: 1px solid var(--line); padding-left: 20px; color: var(--muted); font-size: .875rem; }
.button { line-height: 1.4; padding: 9px 14px; border: 1px solid #ddd4f0; border-radius: 8px; font-size: .875rem; color: #51338d; background: #f8f5ff; cursor: pointer; }
.button:hover { background: #eee6ff; }
.import { margin-left: auto; position: relative; }
.import input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.import:focus-within { outline: 3px solid #a085ef; outline-offset: 3px; }
.layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); max-width: 1488px; margin: auto; }
.sidebar { align-self: start; position: sticky; top: 68px; padding: 30px 18px; }
.side-label { color: var(--muted); font-size: .875rem; margin: 0 0 14px 8px; }
.case { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid #dfd3f4; border-radius: 10px; padding: 9px; text-align: left; background: #efe8fb; color: #4b307e; cursor: pointer; }
.case:hover { background: #e8dcfa; }
.case-icon { flex: none; background: #fff; border-radius: 7px; width: 34px; display: grid; height: 34px; place-items: center; font-size: 22px; }
.case small { display: block; margin-top: 2px; font-size: .75rem; color: #685681; }
nav { display: grid; gap: 6px; margin: 20px 0; }
nav a { font-size: .9rem; color: var(--muted); text-decoration: none; padding: 9px; border-radius: 7px; }
nav a:hover { color: var(--purple); background: #efe8fb; }
.report { min-width: 0; padding: 28px clamp(22px, 3vw, 48px) 52px; border-left: 1px solid var(--line); min-height: calc(100vh - 68px); }
section { scroll-margin-top: 88px; margin-bottom: 32px; }
.hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #23183d, #392261 64%, #503184); color: #fff; border-radius: 20px; margin: 0 0 16px; }
.hero-content { position: relative; z-index: 1; padding: clamp(24px, 4vw, 49px); max-width: 820px; }
.eyebrow { color: #decafc; font-family: var(--mono); margin: 0 0 14px; font-size: .88rem; }
h1 { font-size: clamp(1.75rem, 3.9vw, 3.25rem); line-height: 1.16; letter-spacing: -.045em; margin: 0; overflow-wrap: anywhere; }
.instance { font: .875rem var(--mono); color: #e2d2f8; overflow-wrap: anywhere; }
.description { color: #f2eafb; line-height: 1.65; max-width: 37em; }
.hero-links { display: flex; gap: 8px; margin-top: 21px; }
.hero-links a { padding: 6px 11px; color: #fff; text-decoration: none; border: 1px solid #a38bc6; border-radius: 6px; font-size: .875rem; }
.hero-links a:hover { background: #ffffff24; }
.motif { position: absolute; width: 320px; height: 320px; right: -14px; top: 50%; translate: 0 -50%; display: grid; place-items: center; opacity: .42; }
.motif i { position: absolute; inset: 8px; border: 1px solid #bb95f3; border-radius: 50%; }
.motif i:nth-child(2) { inset: 31px; } .motif i:nth-child(3) { inset: 53px; } .motif i:nth-child(4) { inset: 76px; }
.motif b { color: #d5b9fa; font: 100px Georgia, serif; }
.summary { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 31px; }
.summary > div { background: white; padding: 15px clamp(10px, 2vw, 25px); }
.summary span, .step span { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 7px; }
.summary strong { font-size: clamp(1rem, 2vw, 1.4rem); }
.summary > div:first-child strong { color: #523391; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
h2 { font-size: 1.45rem; margin: 0; letter-spacing: -.03em; }
.section-head p { color: var(--muted); margin: 5px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
#attempt-picker { color: var(--muted); font-size: .875rem; }
select { margin-left: 5px; padding: 6px 30px 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); appearance: none; background-image: linear-gradient(45deg, transparent 50%, #685681 50%), linear-gradient(135deg, #685681 50%, transparent 50%); background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 240px; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.version { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; padding: 14px; }
.version-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 13px; flex-wrap: wrap; }
.version h3 { margin: 0 0 4px; font-size: 1.05rem; }
.revision { font: .81rem var(--mono); color: var(--purple); }
.status { font-size: .875rem; padding: 5px 9px; background: #f0edf4; border-radius: 6px; }
.status.pass { background: #dff7e9; color: #1b6041; }
.status.fail { background: #fce7ec; color: #93344d; }
.terminal { min-height: 104px; background: #20192e; border-radius: 7px; color: #f3eaff; padding: 10px 12px; }
.terminal-label { margin: 0 0 9px; color: #d7c2f0; font-size: .8rem; }
pre { margin: 0; font: .85rem/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 24rem; overflow: auto; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 10px; }
.step, details, .artifact { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 13px; }
.step strong { font-size: .875rem; }
summary { cursor: pointer; font-size: .9rem; }
details pre { margin-top: 14px; color: var(--muted); }
.artifact-list { display: grid; gap: 8px; }
.artifact { display: flex; justify-content: space-between; align-items: center; text-decoration: none; }
.artifact:hover { border-color: #9174c4; }
.artifact > span:last-child { color: var(--purple); font-size: .875rem; }
.artifact small { display: block; color: var(--muted); margin-top: 4px; }
.footnote { color: var(--muted); font-size: .875rem; }
.message { overflow-wrap: anywhere; background: #fce7ec; color: #85263f; padding: 12px; border-radius: 8px; }
@media (max-width: 850px) {
  .layout { grid-template-columns: 155px minmax(0, 1fr); }
  .motif { right: -100px; opacity: .2; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top { padding: 0 14px; gap: 10px; height: 60px; }
  .top-label { display: none; }
  .layout { display: block; }
  .sidebar { position: static; padding: 12px 14px 4px; }
  .side-label { display: none; }
  .case { width: auto; padding-right: 15px; }
  nav { grid-template-columns: repeat(4, 1fr); margin: 6px 0 0; gap: 0; }
  nav a { padding: 9px 3px; text-align: center; }
  .report { border: 0; padding: 6px 14px 25px; }
  .hero-content { padding: 25px 19px; }
  .comparison { grid-template-columns: 1fr; }
  .motif { right: -150px; }
}

.primary { color: #fff; background: #6242ae; border-color: #6242ae; }
.primary:hover { color: #fff; background: #503190; }
.primary:disabled { opacity: .65; cursor: wait; }
.repo-heading { margin-top: 25px; }
.side-button { display: block; width: 100%; padding: 10px 9px; margin-bottom: 3px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.side-button:hover, .side-button.selected { color: #51338d; background: #efe8fb; }
.side-button.selected { font-weight: 700; }
.local-note { color: var(--muted); font-size: .8rem; line-height: 1.6; padding: 0 8px; margin-top: 24px; }
.dashboard-head { background: linear-gradient(115deg, #291c48, #453074); color: #fff; padding: clamp(22px, 4vw, 45px); margin-bottom: 16px; border-radius: 16px; }
.dashboard-head p:last-child { color: #eee3fc; margin-bottom: 0; overflow-wrap: anywhere; }
.dashboard-head > p:not(.eyebrow) { color: #eee3fc; overflow-wrap: anywhere; }
.demo { margin-top: 8px; }
.history-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.history-controls select { margin: 0; }
input, textarea { font: inherit; }
.history-controls input, #task-form input, #task-form textarea { border: 1px solid #d9d0e7; border-radius: 7px; padding: 8px 10px; background: #fff; color: var(--ink); }
.history-controls input { min-width: 0; max-width: 100%; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th { text-align: left; color: var(--muted); background: #f2eef7; font-size: .875rem; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
.task-link { padding: 0; border: 0; color: #51338d; text-align: left; background: none; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.task-link:hover { text-decoration: underline; }
.task-repo { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.table-sha { font: .83rem var(--mono); white-space: nowrap; }
.table-date { color: var(--muted); white-space: nowrap; font-size: .875rem; }
td .status { display: inline-block; white-space: nowrap; }
#history-empty { padding: 0 15px; color: var(--muted); }
.back { display: inline-block; margin: 0 0 14px; padding: 6px 0; color: var(--purple); background: transparent; border: 0; cursor: pointer; font-weight: 700; }
.back:hover { text-decoration: underline; }
.flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { border-top: 3px solid #ddd7e7; overflow-wrap: anywhere; }
.step-recorded { border-top-color: #67ac85; }
.step-blocked { border-top-color: #c76a80; }
details + details { margin-top: 10px; }
dialog { width: min(550px, calc(100% - 24px)); max-height: calc(100% - 24px); border-radius: 14px; border: 1px solid var(--line); padding: 24px; color: var(--ink); box-shadow: 0 16px 80px #20143740; }
dialog::backdrop { background: #20143790; }
#task-form { display: grid; gap: 12px; }
#task-form p { margin: 0; color: var(--muted); }
#task-form label { display: grid; gap: 5px; }
#task-form label small { color: var(--muted); }
#task-form textarea { resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) {
  .sidebar { display: flex; gap: 3px 10px; align-items: baseline; }
  .sidebar > .side-button { width: auto; padding-inline: 8px; flex: none; }
  #repo-list { display: flex; gap: 4px; overflow-x: auto; }
  #repo-list .side-button { width: auto; white-space: nowrap; }
  .local-note { display: none; }
  .brand { font-size: .95rem; gap: 4px; }
  .mark { padding-inline: 6px; }
  .top { gap: 6px; }
  .top .button { padding: 7px 8px; font-size: .8rem; white-space: nowrap; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table { min-width: 0; }
  thead { position: absolute; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 12px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { padding: 4px; border-bottom: 0; }
  td:first-child { grid-column: 1 / -1; }
  .table-date { grid-column: 1 / -1; }
}
