:root {
  color-scheme: light;
  font-family: "Geist", "Microsoft YaHei", "PingFang SC", sans-serif;
  --nav: #132437;
  --ink: #17283c;
  --muted: #52667b;
  --line: #dce5ee;
  --blue: #245ed9;
  --surface: #f3f6fa;
  color: var(--ink);
  background: var(--surface);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 310px; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #3d7cff; outline-offset: 2px; }
.shell { max-width: 1340px; width: calc(100% - 104px); margin-inline: auto; }
.masthead { background: var(--nav); color: #fff; border-bottom: 1px solid #7b96b033; }
.mast-inner, nav, .brand { display: flex; align-items: center; }
.mast-inner { min-height: 62px; justify-content: space-between; gap: 16px; }
.brand { gap: 12px; text-decoration: none; font-weight: 750; font-size: 15px; white-space: nowrap; }
.brand small { color: #b6c5d8; font: inherit; font-size: 13px; font-weight: 500; }
.brand-divider { margin-inline: 9px; color: #7892af; }
.brand-symbol { width: 33px; height: 33px; display: inline-grid; position: relative; border-radius: 9px; background: #2b67e4; box-shadow: 0 1px 10px #0002; }
.brand-symbol::before { content: ""; display: block; position: absolute; width: 17px; height: 16px; border: 1px solid #c4dcff; left: 8px; top: 8px; transform: skewY(-16deg); border-radius: 2px; }
.brand-symbol i { position: absolute; height: 4px; width: 4px; border-radius: 50%; background: white; left: 7px; top: 10px; }
.brand-symbol i:nth-child(2) { left: 15px; top: 17px; }
.brand-symbol i:nth-child(3) { left: 23px; top: 8px; }
nav { gap: 24px; font-size: 13px; white-space: nowrap; color: #c4d3e4; }
nav a { text-decoration: none; }
nav a:hover, .nav-button:hover { color: #fff; }
.nav-button { border: 1px solid #6b86a16b; border-radius: 6px; color: #e3edfe; padding: 8px 11px; background: transparent; }
.nav-button span { padding-left: 3px; }
.title-band { color: #fff; background: radial-gradient(ellipse at 81% 0%, #25466c, transparent 60%), linear-gradient(100deg, #1a3049, #203952); overflow: hidden; position: relative; }
.title-band::after { position: absolute; content: ""; pointer-events: none; inset: 0; opacity: .28; background: repeating-linear-gradient(0deg,#85a8d838 0 1px,transparent 1px 27px), repeating-linear-gradient(90deg,#85a8d838 0 1px,transparent 1px 27px); mask-image: linear-gradient(90deg,transparent 24%,black); }
.title-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-block: 36px 34px; }
.eyebrow { color: #9fc7ff; font-size: 12px; font-weight: 750; letter-spacing: .12em; margin-bottom: 10px; }
.eyebrow span { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #7bb0ff; box-shadow: 0 0 0 4px #7bb0ff20; }
h1 { font-size: clamp(30px,3.6vw,46px); letter-spacing: -.06em; line-height: 1.15; }
.title-description { color: #c3d5e8; font-size: 14px; margin-top: 12px; line-height: 1.6; }
.title-steps { display: flex; align-items: center; position: relative; padding: 10px 0; }
.title-steps div { width: 76px; display: grid; text-align: center; place-items: center; gap: 8px; }
.title-steps b { border: 1px solid #7ba4d785; background: #31547f; color: #d6e8fe; border-radius: 50%; width: 34px; height: 34px; line-height: 32px; font: 650 12px/32px "IBM Plex Mono", monospace; }
.title-steps div:first-child b { background: #2d6beb; border-color: #5089fc; color: white; }
.title-steps div span { font-size: 12px; color: #c6d9ee; }
.step-line { height: 1px; width: 26px; background: #7693b39c; align-self: start; margin-top: 16px; }
main { padding-block: 26px 36px; }
.work-heading, .work-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.work-heading { justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
h2 { font-size: 23px; letter-spacing: -.035em; }
.demo-chip { border-radius: 20px; color: #435d7b; background: #e5edf6; font-size: 11px; padding: 4px 9px; white-space: nowrap; font-weight: 700; }
.demo-chip.review { background: #f9ecd6; color: #7f531c; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 8px 13px; min-height: 36px; border: 1px solid transparent; border-radius: 7px; white-space: nowrap; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button.secondary { border-color: #d4dfe9; background: #fff; color: #29415e; }
.button.secondary:hover { background: #f1f6fe; border-color: #a9c3e7; }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 2px 4px #113b9c25; }
.button.primary:hover { background: #174bbd; border-color: #174bbd; }
.button.compact { min-height: 30px; font-size: 12px; padding: 5px 9px; }
.workspace-grid { display: grid; grid-template-columns: minmax(310px,.78fr) minmax(0,1.52fr); align-items: start; gap: 18px; }
.card { background: white; border: 1px solid var(--line); border-radius: 12px; min-width: 0; box-shadow: 0 2px 6px #1a416708; overflow: hidden; }
.card-header { padding: 16px 17px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #e5edf4; }
.card-header h3 { font-size: 16px; font-weight: 760; }
.card-header p { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.step-number { background: #e9f1ff; color: #2b5ebf; width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 7px; font: 700 13px "IBM Plex Mono", monospace; }
.form-body { padding: 13px 17px 16px; }
fieldset { margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.profile-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.profile-choices legend, .field { font-size: 12px; color: #31465d; font-weight: 700; }
.profile-choices legend { margin-bottom: 6px; }
.profile { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 5px; font-size: clamp(11px, 1.4vw, 13px); cursor: pointer; min-width: 0; }
.profile:has(input:checked) { background: #eef4ff; border-color: #8db2fc; color: #1b4eb1; font-weight: 700; }
input[type=radio], input[type=checkbox] { accent-color: var(--blue); }
.profile input { margin: 0; }
.field { display: grid; gap: 6px; min-width: 0; margin: 0 0 11px; }
.fields { display: grid; gap: 0 11px; }
.fields.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
input:not([type=radio],[type=checkbox],[type=file]), textarea, select { background: #fff; border: 1px solid #d4dfe9; border-radius: 6px; padding: 7px 9px; min-height: 36px; min-width: 0; color: #21364c; font-size: 13px; font-weight: 500; }
input::placeholder, textarea::placeholder { color: #6b7c8c; opacity: 1; }
textarea { width: 100%; resize: vertical; }
.rule-card { background: #f3f7fd; border: 1px solid #dfebf9; border-radius: 7px; padding: 10px; margin: 0 0 10px; }
.rule-title { display: flex; gap: 9px; align-items: center; margin-bottom: 7px; }
.rule-title strong { font: 700 13px "IBM Plex Mono", monospace; color: #284e8c; }
.rule-title small { display: block; margin-top: 3px; font-size: 11px; color: #4c6282; }
.rule-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; background: #e3edff; color: #315ec2; }
.check-line { display: flex; align-items: start; gap: 6px; font-size: 11px; color: #465f7c; line-height: 1.5; }
.check-line input { margin: 2px 0 0; }
.check-line + .check-line { margin-top: 4px; }
.rule-card p, .field-help { font-size: 11px; line-height: 1.65; color: var(--muted); margin: 5px 0 9px; }
.form-disclosure { border-bottom: 1px solid #e5edf4; }
.form-disclosure summary { padding: 9px 0; font-size: 12px; color: #324d68; font-weight: 700; }
.detail-body { padding: 2px 0 8px; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding-block: 2px 9px; }
.option-grid label { display: flex; align-items: start; gap: 4px; font-size: 11px; line-height: 1.5; }
.option-grid input { margin: 2px 0 0; }
.summary-count { background: #eaf0f7; color: #3d5f86; border-radius: 12px; padding: 2px 6px; margin-left: 3px; font-size: 10px; }
.value-card { margin-block: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.value-card h4 { margin: 0 0 8px; font-size: 12px; }
.value-card .field:last-child { margin-bottom: 0; }
.notes-field { margin-top: 10px; margin-bottom: 0; }
.drawing-header .upload-button { margin-left: auto; position: relative; }
.upload-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload-button:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.drawing-file-line, .drawing-tools, .drawing-mode, .drawing-footer { padding-inline: 16px; }
.drawing-file-line, .drawing-file-line > div:first-child, .drawing-footer { display: flex; align-items: center; gap: 9px; }
.drawing-file-line { justify-content: space-between; padding-block: 12px 8px; }
.drawing-file-line > div:first-child { min-width: 0; }
.drawing-file-line strong { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; font-size: 12px; }
.file-icon { color: #315fa8; background: #edf4ff; border-radius: 5px; padding: 3px 6px; }
.drawing-source { color: #52667c; font-size: 11px; flex-shrink: 0; }
.drawing-file-line select { padding: 3px; min-height: 24px; }
.drawing-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tool { background: #f7f9fc; border: 1px solid #d9e4ef; border-radius: 6px; padding: 6px 8px; color: #3b5573; font-size: 12px; line-height: 1.5; white-space: nowrap; }
.tool span { color: #3464ad; }
.tool:hover, .tool[aria-pressed=true] { background: #e9f1ff; border-color: #86aef8; color: #1b4cad; }
.undo-tool { margin-left: auto; }
.drawing-mode { min-height: 36px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-block: 5px; font-size: 11px; color: var(--muted); }
.drawing-mode label { display: flex; align-items: center; gap: 5px; }
.drawing-mode select { min-height: 29px; padding: 3px; font-size: 12px; }
.drawing-board { position: relative; margin-inline: 16px; min-height: 280px; display: grid; place-items: center; overflow: hidden; border: 1px solid #cddceb; border-radius: 7px; background: #eaf0f7; }
.drawing-board.is-zoomed { height: min(65vh, 485px); display: block; overflow: auto; }
.drawing-board.is-zoomed .drawing-key { display: none; }
#drawing { width: 100%; display: block; }
#drawing.active { cursor: crosshair; }
.drawing-key { position: absolute; right: 7px; bottom: 7px; display: flex; align-items: center; gap: 5px; color: #4c6580; background: #f9fbffef; border: 1px solid #dbe5ef; padding: 5px 6px; border-radius: 5px; font-size: 10px; pointer-events: none; }
.drawing-key i { width: 10px; height: 2px; background: #2669df; display: inline-block; }
.drawing-key i:nth-of-type(2) { margin-left: 6px; background: #0a8a8f; }
.board-empty { text-align: center; padding: 20px; color: #49647f; }
.board-empty span { display: block; font-size: 31px; color: #3d6fbd; margin-bottom: 5px; }
.board-empty strong { font-size: 15px; }
.board-empty p { font-size: 12px; margin-top: 6px; }
.drawing-footer { padding-block: 11px 14px; justify-content: space-between; flex-wrap: wrap; }
.inline-field { display: flex; align-items: center; margin: 0; }
.inline-field input { width: 85px; min-height: 30px !important; }
.drawing-footer > div { display: flex; gap: 7px; flex-wrap: wrap; }
.drawing-footer > div span { align-self: center; background: #eef4fb; color: #405d7c; padding: 4px 7px; border-radius: 4px; font-size: 11px; }
.zoom-label { margin-left: 4px; font-size: 11px; color: #405d7c; gap: 4px; }
.zoom-label select { min-height: 25px; padding: 3px; font-size: 11px; }
.generate-bar { background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 12px #1a416718; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; margin-top: 14px; position: sticky; bottom: 12px; z-index: 2; }
.generate-bar strong { font-size: 14px; }
.generate-bar p { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 5px; }
.generate-bar .primary { padding: 9px 15px; min-height: 40px; }
.error-box { margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: #fcebed; color: #9a2836; font-size: 13px; }
.results { margin-top: 32px; }
.result-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.results-empty { padding: 22px; color: #546c86; font-size: 13px; }
.report { padding: clamp(15px, 3vw, 30px); }
.report h2 { margin-bottom: 8px; }
.report h3 { border-bottom: 1px solid #dbe6f0; margin: 23px 0 9px; padding-bottom: 6px; font-size: 16px; }
.report p, .report li { font-size: 13px; line-height: 1.75; color: #384d60; }
.report p + p { margin-top: 7px; }
.report pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0 0; font: inherit; font-size: 13px; }
.report ul { padding: 0 0 0 22px; margin: 7px 0; }
.report .report-warning { margin: 11px 0; padding: 10px 12px; color: #724919; background: #fbf2e1; border-radius: 6px; }
.report figure { margin: 8px 0 14px; padding: 7px; border: 1px solid #dbe4ee; border-radius: 5px; }
.report figure img { width: 100%; max-height: 440px; object-fit: contain; display: block; }
.report figcaption { padding: 6px 3px 0; font-size: 11px; color: #4b627a; }
.report details { border: 1px solid #dce5ee; border-radius: 6px; margin: 12px 0; padding: 8px; }
.report summary { font-size: 13px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.55; }
th, td { border: 1px solid #dce5ee; text-align: left; padding: 6px 8px; vertical-align: top; }
th { background: #edf3fa; font-weight: 700; }
td:first-child { min-width: 90px; }
tbody tr:nth-child(even) { background: #f7f9fc; }
.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 15px 22px; color: #526881; font-size: 12px; }
dialog { width: min(620px, calc(100% - 24px)); border: 1px solid var(--line); border-radius: 11px; padding: 0; color: var(--ink); }
dialog::backdrop { background: #102439a0; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 12px 16px; }
.dialog-body { padding: 10px 16px 17px; }
.dialog-body h3 { font-size: 14px; margin: 12px 0 5px; }
.dialog-body p { color: #465b73; font-size: 13px; line-height: 1.7; margin-bottom: 7px; }
@media (max-width: 1040px) {
  .shell { width: calc(100% - 50px); }
  .workspace-grid { grid-template-columns: minmax(290px,.95fr) minmax(0,1.35fr); gap: 12px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 28px); }
  .workspace-grid { grid-template-columns: minmax(0,1fr); }
  .title-steps { display: none; }
  .title-inner { padding-block: 28px; }
  .drawing-board { min-height: 240px; }
  .generate-bar { position: static; }
  nav { gap: 10px; }
}
@media (max-width: 460px) {
  nav a { display: none; }
  .mast-inner { min-height: 55px; }
  .card-header, .form-body, .drawing-file-line, .drawing-tools, .drawing-mode, .drawing-footer { padding-inline: 11px; }
  .drawing-board { margin-inline: 11px; min-height: 175px; }
  .drawing-header .button { padding-inline: 7px; }
  .generate-bar { align-items: flex-start; flex-direction: column; }
  .generate-bar button { width: 100%; }
}
