:root {
  --ink: #102018;
  --muted: #66756d;
  --paper: #f5f6ef;
  --panel: #fcfdf8;
  --line: #dce1d8;
  --acid: #bbf247;
  --acid-dark: #203614;
  --orange: #ff6b35;
  --blue: #3f72ff;
  /* Geist / Geist Mono 由 Google Fonts CDN 提供,后接系统字体栈做离线回退 */
  --font-geist-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-geist-mono: "Geist Mono", "SFMono-Regular", ui-monospace, Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(rgba(16, 32, 24, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 24, .025) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font-geist-sans);
}
button, input, textarea { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
main { min-height: 100vh; }

.topbar {
  height: 76px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -.04em; }
.brand em { color: #718078; font: 600 10px/1 var(--font-geist-mono); letter-spacing: .14em; align-self: flex-start; margin-top: 9px; }
.brandMark { width: 27px; height: 27px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; transform: skewY(-9deg); }
.brandMark i { background: var(--ink); border-radius: 2px; }
.brandMark i:nth-child(2) { background: var(--acid); }
.serviceState { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 600 12px var(--font-geist-mono); text-transform: uppercase; letter-spacing: .06em; }
.statusDot { width: 8px; height: 8px; border-radius: 50%; background: #aab1ac; box-shadow: 0 0 0 4px rgba(120,130,124,.12); }
.statusDot.online { background: #64b713; box-shadow: 0 0 0 4px rgba(100,183,19,.15); }

.hero { max-width: 1280px; margin: 0 auto; padding: 72px 48px 52px; display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; }
.eyebrow { margin: 0 0 18px; color: #76847d; font: 650 11px/1 var(--font-geist-mono); letter-spacing: .16em; }
.hero h1 { margin: 0; max-width: 780px; font-size: clamp(48px, 6vw, 88px); line-height: .95; letter-spacing: -.075em; font-weight: 820; }
.hero h1 span { color: #7a867f; }
.heroCopy { max-width: 680px; margin: 28px 0 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: rgba(255,255,255,.45); min-width: 360px; }
.metrics div { padding: 18px 20px; border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics strong { display: block; font: 650 28px var(--font-geist-mono); }
.metrics span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

.workspace { max-width: 1280px; margin: 0 auto; padding: 0 48px 84px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); gap: 18px; align-items: start; }
.panel { background: rgba(252,253,248,.92); border: 1px solid var(--line); box-shadow: 0 16px 50px rgba(37,54,44,.06); }
.composer { padding: 30px; }
.queue { min-height: 716px; }
.sectionHeading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.sectionHeading > div { display: flex; align-items: center; gap: 12px; }
.sectionHeading h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.sectionHeading p { margin: 0; color: var(--muted); font-size: 11px; }
.step { color: #6d7a73; font: 650 10px var(--font-geist-mono); border: 1px solid var(--line); padding: 5px 6px; }
.queueActions { display: flex; align-items: center; gap: 7px; }
.cleanupButton { height: 34px; padding: 0 11px; border: 1px solid var(--line); background: transparent; color: #66756d; cursor: pointer; font: 650 9px var(--font-geist-mono); transition: .15s ease; }
.cleanupButton:hover:not(:disabled) { border-color: var(--orange); background: #fff4ef; color: #9d3b1d; }
.cleanupButton:disabled { opacity: .42; cursor: not-allowed; }
.refresh { width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.refresh:hover { border-color: var(--ink); color: var(--ink); }

.platformTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.platform { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 13px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: .18s ease; }
.platform:hover { border-color: #a8b1aa; }
.platform.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.platformGlyph, .miniPlatform { display: grid; place-items: center; flex: 0 0 auto; font: 750 16px var(--font-geist-mono); color: white; background: #55a636; }
.platformGlyph { width: 38px; height: 38px; border-radius: 9px; }
.platformGlyph.ios, .miniPlatform.ios { background: var(--ink); }
.platform > span:last-child { display: grid; gap: 3px; }
.platform b { font-size: 13px; }
.platform small { color: var(--muted); font-size: 10px; }

.startModeField { margin: 0 0 14px; padding: 13px; border: 1px solid var(--line); background: #f8faf4; }
.fieldTitle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fieldTitle span { color: #4f5d55; font-size: 11px; font-weight: 650; }
.fieldTitle em { color: #929d96; font: 500 9px var(--font-geist-mono); font-style: normal; }
.modeTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mode { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; gap: 3px; text-align: left; cursor: pointer; }
.mode b { overflow: hidden; text-overflow: ellipsis; font: 650 11px var(--font-geist-mono); }
.mode small { color: var(--muted); font-size: 9px; }
.mode.active { border-color: var(--ink); background: var(--ink); color: white; }
.mode.active small { color: #b9c4bc; }

.dropzone { min-height: 148px; border: 1px dashed #aeb8b0; background: #f8faf4; display: flex; flex-direction: column; place-content: center; align-items: center; gap: 10px; text-align: center; cursor: pointer; transition: .18s ease; }
.dropzone:hover, .dropzone.dragging { border-color: #55752b; background: #f0f9de; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.uploadIcon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--acid-dark); background: var(--acid); font: 600 23px var(--font-geist-mono); }
.dropzone > span:last-child, .filePicked { display: grid; gap: 5px; }
.dropzone b { font-size: 13px; }
.dropzone small { color: var(--muted); font-size: 11px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 18px; }
.fields label { display: grid; gap: 7px; }
.fields label.wide { grid-column: 1 / -1; }
.fields label > span { color: #4f5d55; font-size: 11px; font-weight: 650; }
.fields em { color: #929d96; font-style: normal; font-weight: 450; }
.fields input, .fields textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); outline: none; padding: 12px 13px; font: 12px/1.5 var(--font-geist-mono); resize: vertical; transition: border .15s; }
.fields input:focus, .fields textarea:focus { border-color: #6f7c74; box-shadow: 0 0 0 3px rgba(58,78,65,.07); }
.fields input::placeholder, .fields textarea::placeholder { color: #acb5af; }
.checks { display: grid; gap: 11px; margin: 18px 0; color: #536158; font-size: 11px; }
.checks label { display: flex; align-items: center; gap: 8px; }
.checks input { width: 15px; height: 15px; accent-color: #6da02c; }
.errorBox { margin: 0 0 14px; padding: 11px 13px; border-left: 3px solid var(--orange); background: #fff0e9; color: #8e3318; font-size: 11px; line-height: 1.5; }
.primaryButton { width: 100%; min-height: 54px; border: 0; background: var(--ink); color: white; padding: 0 17px 0 21px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 700; transition: .18s ease; }
.primaryButton b { width: 30px; height: 30px; display: grid; place-items: center; color: var(--acid-dark); background: var(--acid); }
.primaryButton:hover:not(:disabled) { background: #1d3428; transform: translateY(-1px); }
.primaryButton:disabled { opacity: .55; cursor: wait; }

.queue .sectionHeading { padding: 30px 30px 0; }
.queueError { margin: -10px 14px 14px; padding: 10px 12px; border-left: 3px solid var(--orange); background: #fff0e9; color: #8e3318; font-size: 10px; line-height: 1.5; }
.jobList { padding: 0 14px 14px; display: grid; gap: 8px; max-height: 660px; overflow-y: auto; }
.job { position: relative; min-width: 0; border: 1px solid var(--line); background: #fff; padding: 15px; }
.jobTop { min-width: 0; display: flex; align-items: center; gap: 10px; }
.miniPlatform { width: 31px; height: 31px; border-radius: 7px; font-size: 12px; }
.jobName { min-width: 0; flex: 1; display: grid; gap: 3px; }
.jobName b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.jobName small { color: var(--muted); font-size: 9px; font-family: var(--font-geist-mono); }
.pill { flex: 0 0 auto; padding: 5px 7px; border: 0; background: #f0f2ed; color: #738078; font: 650 9px var(--font-geist-mono); }
.pill.processing { background: #e8efff; color: #315dcc; }
.pill.succeeded { background: #eff9db; color: #4e7919; }
.pill.failed { background: #fff0e9; color: #ad4220; }
.errorStatus { position: relative; flex: 0 0 auto; }
.errorPill { cursor: help; }
.errorPill:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.errorTooltip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 80px));
  max-height: 220px;
  padding: 12px 13px;
  overflow: auto;
  border: 1px solid #e6b39f;
  background: #241b18;
  color: #f8eee9;
  box-shadow: 0 16px 36px rgba(44, 28, 21, .22);
  text-align: left;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.errorTooltip b { display: block; margin-bottom: 7px; color: #ffb494; font: 650 9px var(--font-geist-mono); letter-spacing: .08em; }
.errorTooltip code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.55 var(--font-geist-mono); }
.errorStatus:hover .errorTooltip,
.errorStatus:focus-within .errorTooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.progressTrack { height: 3px; margin: 13px 0 8px 41px; background: #e8ece7; overflow: hidden; }
.progressTrack i { display: block; height: 100%; background: var(--blue); transition: width .45s ease; }
.job:has(.pill.succeeded) .progressTrack i { background: #7db62e; }
.job:has(.pill.failed) .progressTrack i { background: var(--orange); }
.jobBottom { min-width: 0; margin-left: 41px; display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font: 10px/1.35 var(--font-geist-mono); }
.jobBottom span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobBottom b { color: #59675e; }
.jobNote { margin: 8px 0 0 41px; padding: 8px 10px; border-left: 3px solid var(--blue); background: #eef3fb; color: #2b4a74; font: 10px/1.5 var(--font-geist-mono); word-break: break-word; }
.download { width: calc(100% - 41px); margin: 12px 0 0 41px; padding: 9px 11px; border: 1px solid #cad1cb; background: #f7f9f5; color: var(--ink); display: flex; justify-content: space-between; cursor: pointer; font-size: 10px; font-weight: 650; }
.download:hover { border-color: var(--ink); background: var(--acid); }
.emptyState { min-height: 500px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.emptyState > span { font-size: 34px; color: #aab4ad; }
.emptyState b { margin-top: 10px; color: #56645c; font-size: 13px; }
.emptyState p { max-width: 260px; margin: 7px 0; font-size: 11px; line-height: 1.6; }

.pipeline { max-width: 1184px; margin: 0 auto 82px; padding: 38px; color: white; background: var(--ink); }
.pipeline .eyebrow { color: #9aa9a0; }
.pipelineGrid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; }
.pipelineGrid > div { min-width: 0; }
.pipelineGrid > div span { color: var(--acid); font: 650 10px var(--font-geist-mono); }
.pipelineGrid > div b { display: block; margin-top: 12px; font-size: 14px; }
.pipelineGrid > div p { margin: 5px 0 0; color: #9ba9a0; font-size: 10px; line-height: 1.5; }
.pipelineGrid > i { color: #596a60; font: 400 18px var(--font-geist-mono); }
footer { max-width: 1280px; margin: 0 auto; padding: 22px 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #7d8982; font: 550 9px var(--font-geist-mono); letter-spacing: .08em; }

@media (max-width: 980px) {
  .hero { padding-top: 52px; display: grid; }
  .metrics { min-width: 0; width: 100%; }
  .workspace { grid-template-columns: 1fr; }
  .queue { min-height: 500px; }
  .emptyState { min-height: 330px; }
}

@media (max-width: 640px) {
  .topbar { height: 64px; padding: 0 20px; }
  .hero { padding: 45px 20px 35px; }
  .hero h1 { font-size: 48px; }
  .heroCopy { font-size: 14px; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .metrics div { padding: 14px 10px; }
  .metrics strong { font-size: 21px; }
  .workspace { padding: 0 12px 58px; }
  .composer { padding: 20px; }
  .sectionHeading { align-items: flex-start; }
  .sectionHeading p { display: none; }
  .platformTabs { grid-template-columns: 1fr; }
  .modeTabs { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .fields label.wide { grid-column: auto; }
  .pipeline { margin: 0 12px 52px; padding: 28px 24px; }
  .pipelineGrid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .pipelineGrid > i { display: none; }
  footer { padding: 18px 20px; display: grid; gap: 8px; }
}
