:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #667085;
  --line: #dfe5ee;
  --paper: #ffffff;
  --canvas: #f2f6fb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #07875f;
  --green-soft: #ecfdf3;
  --amber: #b54708;
  --amber-soft: #fff7ed;
  --red: #b42318;
  --red-soft: #fef3f2;
  --shadow: 0 16px 38px rgba(25, 45, 82, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(37, 99, 235, .13), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0, var(--canvas) 28rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 36px; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 30px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #2563eb, #1746b4); box-shadow: 0 8px 18px rgba(37, 99, 235, .25); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.secure-chip, .back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid #d9e3f2; border-radius: 999px; color: #475467; background: rgba(255, 255, 255, .78); font-size: 13px; }
.back-link { color: var(--blue); text-decoration: none; font-weight: 750; }
.secure-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(7, 135, 95, .1); }

.home-hero, .service-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 32px;
  border: 1px solid #dbe5f4;
  border-radius: 24px;
  background: linear-gradient(125deg, rgba(255, 255, 255, .97), rgba(239, 246, 255, .94));
  box-shadow: var(--shadow);
}
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .17em; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -.04em; }
.home-hero p:last-child, .service-hero p { margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.hero-badge { flex: 0 0 auto; display: grid; place-items: center; width: 112px; height: 112px; border: 1px solid #cfe0ff; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 8px var(--blue-soft); }
.hero-badge strong { color: var(--blue); font-size: 34px; line-height: 1; }
.hero-badge span { color: var(--muted); font-size: 12px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 30px 4px 15px; }
.section-title h2, .form-heading h2, .dialog-head h2 { margin: 0 0 5px; font-size: 21px; letter-spacing: -.02em; }
.section-title p, .form-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.section-title > span { color: #98a2b3; font-size: 13px; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 236px;
  padding: 21px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 20px rgba(25, 45, 82, .045);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.service-card:hover { transform: translateY(-3px); border-color: #b9cdf5; box-shadow: 0 16px 34px rgba(25, 45, 82, .1); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.service-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--blue); background: var(--blue-soft); border: 1px solid #d5e4ff; font-size: 13px; font-weight: 900; letter-spacing: -.02em; }
.service-icon.large { flex: 0 0 auto; width: 62px; height: 62px; border-radius: 18px; font-size: 16px; }
.channel-tag, .offline-tag { display: inline-flex; align-items: center; width: fit-content; min-height: 26px; padding: 0 9px; border-radius: 999px; color: #2455a4; background: #eef5ff; font-size: 11px; font-weight: 750; }
.offline-tag { color: var(--amber); background: var(--amber-soft); }
.service-card h3 { margin: 18px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.service-card p { flex: 1; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.card-action { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 14px; border-top: 1px solid #edf0f5; color: var(--blue); font-size: 13px; font-weight: 800; }
.card-action::after { content: "→"; font-size: 18px; transition: transform .16s ease; }
.service-card:hover .card-action::after { transform: translateX(3px); }

.service-hero { padding: 24px 27px; }
.service-identity { display: flex; align-items: center; gap: 18px; }
.service-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.service-hero h1 { font-size: clamp(27px, 4vw, 36px); }
.pending-card { flex: 0 0 auto; min-width: 170px; padding: 16px 18px; border-left: 1px solid #d7e2f1; text-align: right; }
.pending-card span, .pending-card small { display: block; color: var(--muted); font-size: 11px; }
.pending-card strong { display: block; margin: 3px 0; color: var(--blue); font-size: 31px; }
.executor-notice { display: flex; align-items: center; gap: 13px; margin: 15px 0; padding: 13px 16px; border: 1px solid #fedf89; border-radius: 14px; color: #7a2e0e; background: #fffaeb; }
.notice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: #f79009; font-weight: 900; }
.executor-notice p { margin: 2px 0 0; color: #854a0e; font-size: 12px; line-height: 1.45; }
.feature-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 5px; border: 1px solid #dfe5ee; border-radius: 14px; background: #e9eef5; }
.feature-tab { min-height: 42px; padding: 0 14px; border: 0; border-radius: 10px; color: #667085; background: transparent; font-weight: 750; }
.feature-tab:hover { color: var(--ink); }
.feature-tab.active { color: var(--blue); background: #fff; box-shadow: 0 3px 10px rgba(16, 24, 40, .08); }

.workspace-panel { margin-top: 12px; padding: 26px 28px 29px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 28px; padding: 0 0 24px; border-bottom: 1px solid #edf0f5; }
.step { position: relative; z-index: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #98a2b3; font-size: 12px; }
.step:not(:last-child)::after { content: ""; position: absolute; z-index: -1; right: -17%; width: 34%; height: 1px; background: #dfe5ee; }
.step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f2f4f7; font-weight: 800; }
.step.active { color: var(--ink); }
.step.active span, .step.done span { color: #fff; background: var(--blue); }
.step.done { color: var(--blue); }
.form-view { max-width: 720px; margin: 0 auto; }
.form-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.section-number { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 900; }
label, .label-like { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 780; }
input, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfd7e4;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
textarea { min-height: 140px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.primary, .secondary { min-height: 44px; padding: 0 19px; border-radius: 11px; font-weight: 780; }
.primary { border: 0; color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(37, 99, 235, .18); }
.primary:hover { background: var(--blue-dark); }
.primary:disabled { cursor: wait; opacity: .6; }
.primary.wide { width: 100%; margin-top: 14px; }
.secondary { border: 1px solid #cfd7e4; color: var(--ink); background: #fff; }
.secondary:hover { background: #f8fafc; }
.actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 19px; }
.label-row, .form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.label-row label { margin-bottom: 8px; }
.help-link { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 750; }
.credential-types { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 0 17px; padding: 0; border: 0; }
.choice { display: flex; align-items: center; gap: 8px; margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice input { width: auto; margin: 0; accent-color: var(--blue); }
.privacy-note { margin: 12px 0 0; padding: 11px 13px; border-left: 3px solid #8ea9d8; border-radius: 6px; color: #475467; background: #f7f9fc; font-size: 12px; line-height: 1.55; }
.verified-card { display: grid; grid-template-columns: 1.4fr 1fr .7fr; gap: 1px; margin-bottom: 20px; overflow: hidden; border: 1px solid #cee0ff; border-radius: 13px; background: #dce9ff; }
.verified-card > div { padding: 13px; background: #f6f9ff; }
.verified-card span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.verified-card strong { font-size: 13px; }
.valid-text { color: var(--green); }
.summary { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.summary div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 15px; }
.summary div + div { border-top: 1px solid #edf0f5; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 750; text-align: right; }
.notice { max-width: 720px; margin: 0 auto 18px; padding: 12px 14px; border: 1px solid #fecdca; border-radius: 11px; color: var(--red); background: var(--red-soft); font-size: 13px; }
.notice.success { border-color: #a6f4c5; color: #067647; background: var(--green-soft); }
.result-view { max-width: 720px; margin: 0 auto; padding: 12px 0; text-align: center; }
.result-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 15px; border-radius: 50%; color: #fff; background: var(--green); font-size: 24px; }
.result-view h2 { margin: 0; }
.result-view code { display: inline-block; max-width: 100%; padding: 10px 13px; border-radius: 9px; background: #f2f4f7; overflow-wrap: anywhere; }
.pending-state { color: var(--amber); font-size: 13px; font-weight: 750; }
.pending-state span { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #f79009; }
.result-view .primary { margin-top: 10px; }
.form-footer { margin-top: 13px; }
.form-footer small { color: var(--muted); }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
.table-wrap.top-gap { margin-top: 22px; }
table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 12px; }
th, td { padding: 12px 13px; text-align: left; border-bottom: 1px solid #edf0f5; }
th { color: #475467; background: #f8fafc; font-weight: 800; }
tbody tr:last-child td { border-bottom: 0; }
.status-good { color: var(--green); font-weight: 800; }
.status-warn { color: var(--amber); font-weight: 800; }
.status-bad { color: var(--red); font-weight: 800; }
.credential-list { display: grid; gap: 12px; }
.credential-item { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfe; }
.credential-item-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.credential-item-head strong { font-size: 14px; }
.credential-item-head span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; }
.credential-item textarea { min-height: 110px; }
.credential-inline { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: end; }
.credential-inline label { margin: 0; }
select { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid #cfd7e4; border-radius: 10px; color: var(--ink); background: #fff; }
.batch-task-results { display: grid; gap: 7px; max-width: 630px; margin: 18px auto 0; text-align: left; }
.batch-task-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; font-size: 11px; }
.batch-task-row code { padding: 0; background: transparent; }
.query-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.task-result { max-width: 720px; margin: 20px auto 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #f9fbfd; }
.task-result dl { margin: 0; }
.task-result dl div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 7px 0; }
.task-result dt { color: var(--muted); }
.task-result dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.task-result.error { color: var(--red); background: var(--red-soft); }

footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 24px; padding: 23px 0 0; color: #667085; font-size: 11px; }
footer span::before { content: "✓"; margin-right: 5px; color: var(--green); font-weight: 900; }
.help-dialog { width: min(520px, calc(100% - 24px)); padding: 23px; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 26px 80px rgba(16, 24, 40, .28); }
.help-dialog::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: #667085; background: #fff; font-size: 22px; }
.help-dialog > p { color: #475467; font-size: 14px; line-height: 1.7; }
.dialog-warning { display: grid; gap: 4px; margin: 17px 0; padding: 12px 14px; border-radius: 11px; color: #7a2e0e; background: var(--amber-soft); font-size: 12px; line-height: 1.55; }

@media (max-width: 820px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .service-hero { align-items: flex-start; }
  .pending-card { min-width: 145px; }
  .verified-card { grid-template-columns: 1fr 1fr; }
  .verified-card > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 20px, 1080px); padding-top: 11px; }
  .site-header { margin-bottom: 18px; }
  .secure-chip { display: none; }
  .home-hero, .service-hero { padding: 21px 18px; border-radius: 19px; }
  .home-hero { align-items: flex-start; }
  .hero-badge { width: 78px; height: 78px; }
  .hero-badge strong { font-size: 25px; }
  .hero-badge span { font-size: 9px; }
  .section-title { margin-top: 23px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 210px; }
  .service-hero { display: block; }
  .service-identity { align-items: flex-start; }
  .service-icon.large { width: 52px; height: 52px; }
  .pending-card { display: flex; align-items: center; gap: 9px; min-width: 0; margin-top: 17px; padding: 12px 0 0; border-top: 1px solid #d7e2f1; border-left: 0; text-align: left; }
  .pending-card strong { margin-left: auto; font-size: 25px; }
  .pending-card small { display: none; }
  .feature-tabs { grid-template-columns: repeat(2, 1fr); }
  .workspace-panel { padding: 20px 14px 22px; border-radius: 17px; }
  .steps { gap: 2px; }
  .step { flex-direction: column; gap: 5px; text-align: center; font-size: 10px; }
  .step:not(:last-child)::after { top: 14px; right: -24%; width: 48%; }
  .form-heading { gap: 10px; }
  .section-number { width: 38px; height: 38px; }
  .credential-types, .credential-inline { grid-template-columns: 1fr; }
  .verified-card { grid-template-columns: 1fr; }
  .verified-card > div:last-child { grid-column: auto; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .query-row { grid-template-columns: 1fr; }
  .query-row .primary { width: 100%; }
  .batch-task-row { grid-template-columns: 1fr; }
  .task-result dl div { grid-template-columns: 100px 1fr; }
}
