@charset "UTF-8";
:root {
  color-scheme: light;
  --bg: #f5f8fa;
  --card: #ffffff;
  --line: #d5e0e7;
  --muted: #536578;
  --text: #203345;
  --accent: #087a66;
  --blue: #315c91;
  --warning: #805016;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 85% 12%, #dcefe980, transparent 43%), var(--bg); color: var(--text); line-height: 1.75; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button, input, select { border-radius: 8px; }
h1, h2, p { margin: 0; }
h2 { font-size: 23px; letter-spacing: -.4px; }
code { font-family: "Cascadia Code", Consolas, monospace; }
small { font-size: 12px; }
em { font-style: normal; color: var(--accent); }
[hidden] { display: none !important; }
.site-header { min-height: 104px; max-width: 1200px; margin: auto; padding: 18px 32px; display: flex; gap: 24px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; font-size: 19px; font-weight: 650; }
.brand-mark { border: 1px solid #8dbdb0; color: var(--accent); background: #fff; height: 42px; width: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; font-family: monospace; font-size: 22px; }
.brand-sub { display: block; font-size: 12px; letter-spacing: 1.3px; color: var(--muted); }
nav { display: flex; gap: 26px; font-size: 15px; color: var(--muted); }
nav a:hover, .text-link:hover { color: var(--accent); text-decoration: underline; }
main { max-width: 1136px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 62px 0 46px; display: flex; align-items: center; justify-content: space-between; }
.eyebrow { color: var(--accent); font-family: Consolas, monospace; font-size: 12px; letter-spacing: 1.8px; font-weight: 600; }
.eyebrow > span { display: inline-block; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; margin-right: 8px; vertical-align: middle; }
h1 { font-size: 50px; line-height: 1.3; letter-spacing: -1.8px; margin: 17px 0 22px; font-weight: 700; }
.hero p { font-size: 17px; color: var(--muted); line-height: 1.95; }
.hero-chip { width: 240px; height: 240px; position: relative; display: grid; place-items: center; margin: 0 65px; }
.chip-core { width: 144px; height: 144px; display: flex; align-items: center; justify-content: center; flex-direction: column; border: 1px solid #8dbfaf; border-radius: 14px; background: linear-gradient(140deg, #fff, #e0f2eb); box-shadow: 0 10px 35px #21745a16; z-index: 1; transform: rotate(-8deg); }
.chip-core span { font-family: monospace; font-size: 22px; letter-spacing: 4px; color: var(--accent); height: 28px; }
.chip-core strong { font-family: monospace; font-size: 46px; font-weight: 500; line-height: 1.35; }
.chip-core small { font-size: 12px; letter-spacing: .3px; color: var(--muted); }
.chip-pins { position: absolute; width: 176px; height: 118px; border-left: 10px dashed #82ac9e; border-right: 10px dashed #82ac9e; transform: rotate(-8deg); }
.chip-pins:after { content: ""; display: block; position: absolute; inset: -28px 22px; border-top: 10px dashed #82ac9e; border-bottom: 10px dashed #82ac9e; }
.chip-orbit { position: absolute; inset: -5px; border: 1px dashed #b6d8cc; border-radius: 50%; }
.notice { padding: 14px 18px; border-radius: 9px; border: 1px solid #b5dbca; background: #edf8f2; color: #28634e; font-size: 14px; margin: 0 0 24px; }
.notice.warning { background: #fff6e9; border-color: #e2c796; color: var(--warning); }
.workspace { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 5px 22px #253e5106; min-width: 0; }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.section-heading p { font-size: 14px; color: var(--muted); margin-top: 3px; }
.step { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid #b0d5c9; background: #f1faf5; border-radius: 9px; color: var(--accent); font-family: monospace; font-size: 15px; display: grid; place-items: center; }
.status-dot { width: 10px; height: 10px; background: #9baab7; border-radius: 50%; margin-left: auto; flex: 0 0 auto; }
.status-dot.connected { background: var(--accent); box-shadow: 0 0 0 4px #087a6615; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.segmented { display: flex; background: #eef3f6; padding: 4px; border-radius: 9px; margin-bottom: 23px; }
.segmented label { flex: 1; min-width: 0; }
.segmented input { position: absolute; opacity: 0; width: 1px; }
.segmented span { display: block; text-align: center; padding: 10px 6px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 16px; }
.segmented input:checked + span { background: #fff; color: #126f5c; box-shadow: 0 1px 5px #28483813; font-weight: 600; }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.mode-option { display: flex; cursor: pointer; min-width: 0; }
.mode-option > input { position: absolute; opacity: 0; width: 1px; }
.mode-option > span { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 14px; display: flex; flex-wrap: wrap; align-content: flex-start; width: 100%; min-width: 0; gap: 6px 7px; }
.mode-option strong { font-size: 16px; font-weight: 600; }
.mode-option code { font-size: 13px; color: var(--muted); margin-left: auto; margin-top: 3px; }
.mode-option small { width: 100%; font-size: 12px; color: var(--muted); line-height: 1.8; }
.mode-option input:checked + span { border-color: #55a78f; background: #f0faf5; }
.mode-option input:checked + span strong { color: var(--accent); }
.mode-option input:focus-visible + span { outline: 3px solid var(--accent); }
.field-label { display: block; color: #354d61; font-size: 14px; font-weight: 550; margin: 14px 0 8px; }
select, input[type=text] { width: 100%; min-width: 0; max-width: 100%; padding: 12px; background: #fff; border: 1px solid #bdcdd8; color: var(--text); min-height: 48px; font-size: 16px; }
select { color-scheme: light; text-overflow: ellipsis; }
.firmware-description { margin-top: 18px; min-height: 76px; }
.firmware-description p { color: var(--muted); font-size: 12px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.tag { font-family: inherit; font-size: 12px; color: var(--blue); background: #edf3fb; border: 1px solid #dbe6f5; padding: 2px 8px; border-radius: 5px; overflow-wrap: anywhere; }
.text-link { font-size: 14px; color: var(--accent); display: inline-block; margin-top: 13px; }
.helper { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 11px; overflow-wrap: anywhere; }
.settings { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 15px; }
summary { cursor: pointer; font-size: 14px; color: #405a6e; padding: 9px 0; }
details[open] > summary { color: var(--accent); }
.check-row { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; margin: 19px 0 5px; }
.check-row input { margin: 6px 0 0; accent-color: var(--accent); }
.check-row span small { display: block; color: var(--muted); font-size: 12px; line-height: 1.85; margin-top: 5px; }
.device-display { border: 1px dashed #bdcfd9; border-radius: 10px; min-height: 184px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f7fafb; padding: 18px; text-align: center; }
.device-display svg { width: 53px; height: 53px; fill: none; stroke: #608997; stroke-width: 1.5; margin-bottom: 11px; }
.device-display strong { font-size: 18px; font-weight: 600; }
.device-display > span { font-family: inherit; font-size: 13px; color: var(--muted); margin-top: 6px; }
.quick-steps { margin: 20px 0; padding-left: 22px; color: var(--muted); font-size: 14px; line-height: 2; }
.device-actions { display: flex; gap: 11px; margin-top: 22px; }
.primary, .secondary, .flash-button { min-height: 48px; border: 1px solid transparent; padding: 11px 17px; font-weight: 600; font-size: 15px; }
.primary { background: var(--accent); color: #fff; }
.primary:not(:disabled):hover { background: #066553; }
.primary span { margin-left: 20px; }
.secondary { color: #3b566c; background: #f0f4f7; border-color: #cbd8e2; }
.secondary:not(:disabled):hover { background: #e5edf3; }
.device-actions .primary { flex: 1; }
.flash-button { width: 100%; margin-top: 12px; background: #e8f2f9; color: #275b82; border: 1px solid #b9d0e1; }
.flash-button:not(:disabled):hover { background: #d6e9f6; }
.progress-heading { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-top: 27px; }
.progress-heading span { color: var(--muted); }
.progress-heading strong { font-family: monospace; color: var(--accent); flex: 0 0 auto; }
progress { appearance: none; width: 100%; height: 6px; border: 0; display: block; margin-top: 11px; background: #e3ebf1; border-radius: 4px; overflow: hidden; }
progress::-webkit-progress-bar { background: #e3ebf1; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.log-card { margin-top: 24px; padding: 0; overflow: hidden; }
.log-heading { padding: 18px 24px; display: flex; gap: 12px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.log-heading h2 { font-size: 16px; letter-spacing: 0; }
.terminal-mark { color: var(--accent); margin-right: 9px; }
.text-button { background: none; border: 0; padding: 6px 8px; color: var(--muted); font-size: 13px; }
.text-button:hover { color: var(--accent); }
pre { margin: 0; padding: 23px 24px; min-height: 140px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 13px/1.9 "Cascadia Code", Consolas, "Microsoft YaHei", monospace; color: #3d596d; background: #f6f9fb; }
.help-section { display: grid; grid-template-columns: .8fr 1.4fr; gap: 60px; padding: 60px 0; }
.help-section h2 { font-size: 26px; margin-top: 11px; }
.help-section > div > p { font-size: 14px; color: var(--muted); margin-top: 13px; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq-list summary { font-size: 15px; padding: 14px 0; }
.faq-list p { font-size: 14px; line-height: 1.9; color: var(--muted); margin: 4px 0 19px; }
footer { max-width: 1200px; border-top: 1px solid var(--line); margin: auto; padding: 27px 32px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.upload-area { border: 1px dashed #a1c2c6; border-radius: 10px; background: #f6fbfa; display: flex; align-items: center; flex-direction: column; padding: 24px 12px; cursor: pointer; position: relative; text-align: center; }
.upload-area:hover { border-color: var(--accent); background: #f0f9f5; }
.upload-icon { font-size: 28px; color: var(--accent); line-height: 1.3; }
.upload-area strong { font-size: 15px; margin-top: 8px; }
.upload-area small { color: var(--muted); font-size: 12px; margin-top: 6px; }
.upload-area input, .file-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-area:focus-within, .file-add:focus-within { outline: 3px solid var(--accent); }
.local-file-row { border: 1px solid var(--line); background: #fff; border-radius: 8px; margin: 13px 0; padding: 13px; font-size: 14px; display: grid; grid-template-columns: minmax(0,1fr) 110px 22px; gap: 10px; align-items: end; }
.file-name { overflow-wrap: anywhere; min-width: 0; }
.file-name small { display: block; color: var(--muted); font-size: 12px; }
.local-file-row input { font: 14px Consolas, monospace; padding: 8px; min-height: 40px; }
.local-file-row label { color: var(--muted); font-size: 12px; }
.local-file-row button { background: none; border: 0; color: var(--muted); font-size: 23px; padding: 0 0 4px; }
.file-add { display: inline-block; cursor: pointer; margin: 11px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
dialog { color: var(--text); background: #fff; border: 1px solid #b8cdd8; border-radius: 15px; width: min(580px,calc(100% - 32px)); padding: 28px; box-shadow: 0 20px 80px #1c394538; }
dialog::backdrop { background: #1a354b55; backdrop-filter: blur(3px); }
dialog h2 { font-size: 26px; margin: 13px 0; }
dialog p { font-size: 14px; color: var(--muted); }
#confirm-files { margin: 19px 0; padding: 15px; background: #f2f7f8; border: 1px solid #e0eaed; border-radius: 7px; font-size: 14px; overflow-wrap: anywhere; }
#confirm-files > div { padding: 4px 0; }
#confirm-files code { color: var(--accent); }
#confirm-warning { margin-top: 17px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 11px; margin-top: 27px; }
@media(max-width:800px) {
  .site-header { min-height: 88px; padding: 16px 20px; }
  .hero { padding: 42px 0 32px; }
  .hero-chip { width: 160px; height: 160px; margin: 0 15px; }
  .chip-core { transform: rotate(-8deg); width: 128px; height: 128px; }
  .chip-pins { transform: rotate(-8deg) scale(.8); }
  h1 { font-size: 39px; }
  .workspace { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .log-card { padding: 0; }
  .help-section { gap: 28px; padding: 44px 0; }
  .help-section h2 { font-size: 24px; }
  footer { flex-wrap: wrap; }
}
@media(max-width:520px) {
  main { padding: 0 16px; }
  .site-header { gap: 16px; padding: 16px 20px; }
  .site-header nav { gap: 15px; font-size: 13px; white-space: nowrap; }
  .brand { font-size: 17px; gap: 10px; }
  .brand-sub { font-size: 12px; letter-spacing: .6px; }
  .brand-mark { width: 34px; height: 34px; font-size: 20px; }
  .hero-chip { display: none; }
  h1 { font-size: 38px; letter-spacing: -1.2px; }
  .hero p { font-size: 16px; }
  .eyebrow { font-size: 12px; letter-spacing: 1px; }
  .notice { padding: 12px 14px; font-size: 13px; }
  .card { padding: 21px; }
  .log-card { padding: 0; }
  h2 { font-size: 22px; }
  .mode-grid { gap: 10px; }
  .mode-option > span { padding: 12px 10px; }
  .mode-option strong { font-size: 15px; }
  .mode-option code { font-size: 12px; }
  .mode-option small { font-size: 12px; }
  .help-section { grid-template-columns: 1fr; gap: 20px; }
  .local-file-row { grid-template-columns: minmax(0,1fr) 98px 18px; padding: 11px; gap: 8px; }
  .log-heading { padding: 16px 18px; flex-wrap: wrap; }
  .log-heading h2 { font-size: 16px; }
  pre { padding: 20px 18px; }
  footer { padding: 24px 20px; }
  .site-header nav a:last-child { display: none; }
  dialog { padding: 23px; }
}
@media(max-width:360px) {
  main { padding: 0 12px; }
  .site-header { padding: 15px 16px; gap: 12px; }
  .card { padding: 18px; }
  .log-card { padding: 0; }
  h1 { font-size: 35px; }
  .mode-option code { margin-left: 0; }
  .dialog-actions { flex-wrap: wrap; }
}
