:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-blue: #f5f8ff;
  --text: #111827;
  --muted: #64748b;
  --soft: #94a3b8;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --warning: #9a6700;
  --warning-bg: #fffbeb;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --radius: 10px;
  --radius-sm: 7px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.nav {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
}
.local-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
}

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { border-color: #9ca3af; }
.btn:focus-visible,
.preset-card:focus-visible,
.icon-button:focus-visible,
.copy-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 2px;
}
.btn.primary {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.btn.primary:hover {
  background: #273244;
  border-color: #273244;
}
.btn.secondary { background: #fff; }
.btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn.quiet:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.section { padding: 44px 0; }
.first-section { padding-top: 30px; }
.section + .section { border-top: 1px solid #f1f5f9; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.step {
  width: 24px;
  padding-top: 3px;
  color: var(--soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: .04em;
}
.section-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.028em;
}
.section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}
.section-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.preset-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.preset-card:hover {
  border-color: #b8c0cc;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
}
.preset-card.on {
  border-color: #93b4f5;
  background: var(--surface-blue);
}
.preset-card.partial {
  border-color: #e5c56d;
  background: #fffdf5;
}
.preset-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.preset-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.preset-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
}
.preset-card.on .preset-check {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.preset-card.partial .preset-check {
  border-color: #c48a0a;
  background: #c48a0a;
  color: #fff;
}
.preset-desc {
  flex: 1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.preset-meta {
  margin-top: 9px;
  color: var(--soft);
  font-size: 10px;
}
.preset-card.experimental .preset-title::after {
  content: ' BETA';
  color: var(--warning);
  font-size: 9px;
  letter-spacing: .05em;
  vertical-align: 1px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 12px;
  align-items: start;
}
.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.toolbar {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}
.search { flex: 1; }
.search input,
.toolbar select,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input,
.toolbar select,
.field input,
.field select {
  height: 36px;
  padding: 0 10px;
}
.search input:focus,
.toolbar select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.toolbar select { width: 138px; }

.policy-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 145px;
  gap: 8px;
  padding: 11px 12px 11px 10px;
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}
.policy-row:last-child { border-bottom: 0; }
.policy-row.selected { background: #fafcff; }
.policy-main { min-width: 0; }
.policy-titleline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.policy-titleline strong { font-size: 12.5px; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.policy-titleline code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}
.policy-main p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.policy-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--soft);
  font-size: 10px;
  text-align: right;
}
.policy-meta a {
  color: var(--accent);
  text-decoration: none;
}
.policy-meta a:hover { text-decoration: underline; }
.value-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
}
.impact.high { color: var(--danger); }
.impact.medium { color: var(--warning); }
.inline-warning,
.inline-note {
  width: fit-content;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 10px;
}
.inline-warning { background: var(--danger-bg); color: var(--danger); }
.inline-note { background: var(--warning-bg); color: var(--warning); }
.empty-state {
  padding: 44px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.switch-wrap {
  display: inline-flex;
  margin-top: 2px;
  cursor: pointer;
}
.switch-wrap input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch {
  width: 30px;
  height: 18px;
  position: relative;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .15s ease;
}
.switch::after {
  content: '';
  width: 14px;
  height: 14px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
  transition: transform .15s ease;
}
.switch-wrap input:checked + .switch { background: var(--accent); }
.switch-wrap input:checked + .switch::after { transform: translateX(12px); }
.switch-wrap input:focus-visible + .switch {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 2px;
}

.summary {
  position: sticky;
  top: 66px;
}
.summary-inner { padding: 13px; }
.summary h3 {
  margin: 0 0 10px;
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat {
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n+2) { border-bottom: 0; }
.stat strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.03em;
}
.stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.warning-box {
  margin-top: 9px;
  padding: 9px;
  border-radius: 9px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
}
.warning-box.has-warnings { background: var(--warning-bg); color: #72520a; }
.warning-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}
.warning-box p { margin: 4px 0; }
.summary-cta {
  width: 100%;
  margin-top: 9px;
}
.summary-small {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 10px;
  line-height: 1.55;
}

.builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-panel { padding: 15px; }
.form-panel h3 {
  margin: 0 0 12px;
  font-size: 13px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field {
  display: grid;
  gap: 6px;
}
.field.full { grid-column: 1 / -1; }
.field label {
  color: #475569;
  font-size: 11px;
  font-weight: 650;
}
.field textarea {
  min-height: 74px;
  padding: 9px 10px;
  resize: vertical;
}
.field-help {
  color: var(--soft);
  font-size: 10.5px;
}
.platform-checks {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.platform-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 500;
}
.platform-checks input { accent-color: var(--accent); }
.form-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
}
.form-error {
  color: var(--danger);
  font-size: 11px;
}
.custom-list {
  display: grid;
  gap: 6px;
}
.custom-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.custom-item strong { display: block; font-size: 12.5px; }
.custom-item span {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: 10px;
}
.custom-item code {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  word-break: break-all;
}
.custom-empty {
  padding: 5px 0;
  color: var(--soft);
  font-size: 12px;
}
.icon-button {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font-size: 18px;
}
.icon-button:hover { background: #f1f5f9; color: var(--text); }

.export-section { padding-bottom: 52px; }
.export-layout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 12px;
  align-items: stretch;
}
.profile-panel { padding: 15px; }
.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-heading h3 {
  margin: 0;
  font-size: 14px;
}
.panel-heading span {
  color: var(--soft);
  font-size: 10.5px;
}
.profile-fields { grid-template-columns: 1fr; }
.verification-note {
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}
.verification-note code,
.removal-method code {
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
}
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.platform-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}
.platform-heading {
  display: grid;
  gap: 10px;
}
.platform-badge {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.platform-badge.windows { color: #1d4ed8; border-color: #bfdbfe; }
.platform-card h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -.015em;
}
.platform-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.platform-actions {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.about {
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}
.about p { max-width: 720px; margin: 0; }
.about strong { color: var(--text); }
.about a { color: var(--accent); }

.removal-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(760px, calc(100dvh - 36px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}
.removal-dialog::backdrop {
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(2px);
}
.dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}
.dialog-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dialog-header h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
}
.dialog-close { margin-top: -2px; }
.dialog-body {
  display: grid;
  gap: 22px;
  padding: 22px;
}
.profile-reference {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 7px 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
  font-size: 11px;
}
.profile-reference span { color: var(--muted); }
.profile-reference code { overflow-wrap: anywhere; }
.removal-method {
  padding-top: 2px;
}
.method-number {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.removal-method h3 {
  margin: 0;
  font-size: 15px;
}
.removal-method p,
.removal-method ol {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.removal-method p { margin: 7px 0 0; }
.removal-method ol {
  margin: 8px 0 0;
  padding-left: 20px;
}
.removal-method li + li { margin-top: 4px; }
.command-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 11px;
  padding: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.command-box code {
  min-width: 0;
  color: #0f172a;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.copy-button {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.copy-button:hover { border-color: #9ca3af; }
.method-note { color: var(--soft) !important; font-size: 10.5px !important; }
.dialog-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

@media (max-width: 980px) {
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
  .summary { position: static; }
  .builder-grid,
  .export-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 20px, 1040px); }
  .local-status { display: none; }
  .section { padding: 36px 0; }
  .first-section { padding-top: 24px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-actions { width: 100%; }
  .preset-grid { grid-template-columns: 1fr; }
  .preset-card { min-height: 104px; }
  .toolbar { flex-direction: column; }
  .toolbar select { width: 100%; }
  .policy-row { grid-template-columns: 38px minmax(0, 1fr); }
  .policy-meta {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
  }
  .fields { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .platform-grid { grid-template-columns: 1fr; }
  .profile-reference { grid-template-columns: 1fr; }
  .profile-reference strong,
  .profile-reference code { margin-bottom: 5px; }
  .command-box { grid-template-columns: 1fr; }
  .copy-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
