/* ============ LinguaFlow 设计系统 v3 ============
   借鉴 Stripe Docs（清晰层级 / 克制边框阴影 / 专业排版）
   与 Discord Support（活力靛蓝主色 / 彩色标签 / 圆润亲和）
   所有页面共用一套变量；class 命名与 JS 模块保持 1:1 */

* { box-sizing: border-box; }

:root {
  --ink: #17172b;
  --muted: #67677f;
  --line: #e6e7f1;
  --line-strong: #d5d7e6;
  --surface: #ffffff;
  --bg: #f6f7fb;
  --accent: #5a5fef;
  --accent-deep: #4448d8;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(90, 95, 239, .26);
  --green: #177a4f;
  --green-soft: #e4f5ec;
  --amber: #96650a;
  --amber-soft: #fbf0d9;
  --red: #bf4040;
  --red-soft: #fbeaea;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(23, 23, 43, .06);
  font-family: Inter, "Noto Sans Thai", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
}

body { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { outline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

button, .button {
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: #26263c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 550;
}
.primary { background: linear-gradient(135deg, var(--accent), #7b5ff0); color: #fff; border-color: transparent; box-shadow: 0 8px 18px var(--accent-ring); }
.quiet { background: transparent; border: 0; color: var(--muted); }
.small { padding: 7px 13px; font-size: 13.5px; border-radius: 10px; }
.mb { margin: 18px 0; }
button.danger, .button.danger { color: var(--red); border-color: #edcccc; background: #fff8f8; }
button.danger:hover { background: #fdeeee; }

@media (prefers-reduced-motion: no-preference) {
  button, .button { transition: background .15s, transform .15s, box-shadow .2s, filter .15s; }
  button:hover, .button:hover { filter: brightness(.97); }
  .primary:hover { filter: saturate(1.08) brightness(1.04); transform: translateY(-1px); }
}

/* ============ 顶部导航 ============ */
header {
  height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: auto;
  padding: 0 32px;
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: -.8px; justify-self: start; color: var(--ink); }
.brand span { font-weight: 400; color: #8a8aa8; }
header .mainnav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #edeef6;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 16px;
}
header .navbtn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 24px; border-radius: 11px; font-size: 15px; font-weight: 600; color: #565673; }
header .navbtn:hover { color: var(--ink); background: #ffffff90; }
header .navbtn.active { background: linear-gradient(135deg, var(--accent), #7b5ff0); color: #fff; box-shadow: 0 6px 16px var(--accent-ring); }
header .authslot { justify-self: end; display: flex; align-items: center; gap: 10px; }
header .authslot .loginbtn { padding: 9px 26px; border-radius: 11px; font-size: 14px; font-weight: 600; border: 1px solid #c9ccdf; background: #fff; }
header .authslot .userchip { font-size: 14px; }

footer { max-width: 1200px; margin: 0 auto; padding: 22px 32px 34px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #8b8ba6; font-size: 13.5px; border-top: 1px solid var(--line); }
footer a { color: var(--accent-deep); font-weight: 550; }
footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ 通知 ============ */
#notice {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: #23233d; color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50;
  max-width: min(90vw, 520px); text-align: center;
}
#notice.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 通用布局 ============ */
main { max-width: 1100px; margin: 34px auto 90px; padding: 0 28px; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .18em; font-weight: 650; margin: 0 0 12px; text-transform: uppercase; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 22px; }
.panel h2 { margin: 0 0 14px; font-size: 16.5px; }
.helper { color: var(--muted); font-size: 13.5px; }
.error { color: var(--red); font-size: 14px; }
.back { display: inline-block; margin-top: 14px; color: var(--accent-deep); font-size: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.toolbar h1 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.chip { font-size: 13px; color: #4b4b6b; background: #eeeff7; border: 1px solid var(--line); border-radius: 100px; padding: 5px 14px; font-weight: 550; }
.auth { display: grid; place-items: center; min-height: 62vh; }
.auth .panel { width: min(420px, 92vw); }
.auth h1 { margin: 0 0 18px; font-size: 22px; }
.auth .eyebrow { color: var(--accent-deep); }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 14px; }
.field span { font-weight: 600; color: #3a3a55; }
input, select, textarea {
  padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 11px;
  background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-ring); border-color: var(--accent); }
textarea { resize: vertical; }
.checkrow { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checkrow:last-child { border-bottom: 0; }
.checkrow span { display: flex; flex-direction: column; }
.checkrow small { color: var(--muted); font-size: 12px; font-weight: 400; }
.checkrow input { width: auto; accent-color: var(--accent); }
.checkrow.disabled { opacity: .55; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* 表格 */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 650; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafafd; }
td { padding: 13px 16px; border-bottom: 1px solid #f0f1f7; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.empty { color: var(--muted); text-align: center; padding: 30px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.pill.queued, .pill.incomplete { background: #edeff5; color: #575770; }
.pill.processing { background: var(--accent-soft); color: var(--accent-deep); }
.pill.completed, .pill.passed { background: var(--green-soft); color: var(--green); }
.pill.failed { background: var(--red-soft); color: var(--red); }
.pill.warning { background: var(--amber-soft); color: var(--amber); }

/* ============ 首页 ============ */
.home-page {
  background:
    radial-gradient(1100px 480px at 85% -12%, #e9ebff 0%, transparent 62%),
    radial-gradient(900px 420px at -12% 26%, #e6f6f0 0%, transparent 55%),
    #f7f8fc;
  min-height: 100vh;
}
.home-page header { border-bottom: 1px solid #e9eaf3; }
.home-page main { margin-top: 26px; margin-bottom: 50px; }
.intro { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 36px; text-align: left; margin-bottom: 26px; }
.intro-copy { padding: 12px 0 12px 12px; }
.intro .eyebrow { color: #7b7cc2; margin-bottom: 16px; }
.intro h1 { font-size: clamp(34px, 4.3vw, 54px); line-height: 1.18; letter-spacing: -.5px; margin: 0 0 20px; font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif; }
.intro h1 .htop, .intro h1 .hbot { display: block; }
.intro h1 .htop { color: #1d1d38; font-weight: 600; }
.intro h1 .hbot { font-weight: 650; background: linear-gradient(92deg, var(--accent), #9b6bf5); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; position: relative; }
.intro h1 .hbot::after { content: ''; position: absolute; left: 2px; bottom: -8px; width: 64px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), #9b6bf5); }
.intro-copy > p:not(.eyebrow) { font-size: 15px; line-height: 2; color: #61617d; letter-spacing: .02em; }
.language-tags { display: flex; gap: 8px; margin-top: 18px; }
.language-tags span { border-radius: 8px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.language-tags span:nth-child(1) { background: #e8ebff; color: #4a4fc4; }
.language-tags span:nth-child(2) { background: #fdf0d7; color: #8a6524; }
.language-tags span:nth-child(3) { background: #e3f2e8; color: #35714f; }
.translation-visual { margin: 0; justify-self: end; width: 100%; max-width: 470px; overflow: visible; }
.translation-visual img { display: block; width: auto; max-width: 100%; height: auto; object-fit: contain; }

.translator { background: #fffdf9; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 34px rgba(35, 38, 82, .07); overflow: hidden; }
.tooltop { display: flex; justify-content: space-between; align-items: center; padding: 18px 26px; border-bottom: 1px solid var(--line); gap: 12px; background: #f6f7fd; }
.tooltop h2 { margin: 0; font-size: 17px; }
.tooltop .chip { background: #eef0ff; border-color: #dfe2fb; color: var(--accent-deep); }
.editor { display: grid; grid-template-columns: 1.15fr 1fr; }
.uploadside, .settingsside { padding: 24px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 215px; border: 2px dashed #c3c6df; border-radius: 14px; background: #f4f5fc; color: #4d4d75; padding: 20px; text-align: center; cursor: pointer; }
.drop svg { width: 40px; height: 40px; color: #8a8ec2; }
.drop strong { font-size: 15px; }
.drop small { color: var(--muted); font-size: 12.5px; }
.drop:focus-within, .drop.drag { border-color: var(--accent); background: #edefff; outline: 2px solid var(--accent-ring); outline-offset: 3px; }
.uploadnote { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; margin-bottom: 14px; }
.route > b { color: #9a9cc0; font-size: 18px; padding-bottom: 12px; }
.keyoptions { margin-top: 6px; background: #f5f6fb; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 4px; }
.keyoptions-title { font-size: 12px; font-weight: 700; color: #5c5c85; letter-spacing: .08em; margin-bottom: 10px; }
.options { margin-top: 14px; background: #f8f8fb; padding: 4px 14px; border: 1px solid var(--line); border-radius: 12px; }
.options summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; color: #3f3f5f; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.options summary::after { content: '＋'; color: #8b8db3; font-size: 16px; }
.options[open] summary::after { content: '－'; }
.options summary small { color: var(--muted); font-weight: 400; font-size: 12px; padding-left: 8px; }
.optionsbody { padding: 4px 0 14px; }
.toolfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 26px; background: #fbfbf7; border-top: 1px solid var(--line); }
.toolfoot .sel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 100%; }
.sel-tag { display: inline-flex; align-items: center; border: 1px solid #dfe1f2; background: #f0f1fa; color: #3f4180; border-radius: 999px; padding: 5px 13px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.runbtn { min-width: 172px; padding: 13px 30px; font-size: 15px; border-radius: 13px; }
button.primary.busy, .runbtn.busy { background: #b9bacc; border-color: #b9bacc; color: #fff; cursor: not-allowed; box-shadow: none; }
.under { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 16px 4px 8px; color: var(--muted); font-size: 13px; }
.under a { color: var(--accent-deep); font-weight: 550; }

/* 进度与交付 */
.progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; margin: 22px 0; }
.progress.hidden { display: none; }
.progresshead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.progresshead h3 { margin: 0; font-size: 16px; display: flex; align-items: center; }
.progressbar { width: 100%; height: 10px; border: 0; border-radius: 999px; background: #e8e9f4; margin: 14px 0 4px; color: var(--accent); }
.progressbar::-webkit-progress-bar { background: #e8e9f4; border-radius: 999px; }
.progressbar::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), #7b5ff0); border-radius: 999px; }
.progressbar::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), #7b5ff0); border-radius: 999px; }
.steps { display: flex; justify-content: space-between; gap: 6px; list-style: none; padding: 0; margin: 14px 0 4px; color: #9d9db6; font-size: 13px; flex-wrap: wrap; }
.steps .done { color: var(--accent-deep); font-weight: 650; }
.runspin { display: inline-block; width: 15px; height: 15px; margin-left: 10px; vertical-align: -3px; border-radius: 50%; border: 2.5px solid rgba(90, 95, 239, .25); border-top-color: var(--accent); animation: lfspin .75s linear infinite; }
@keyframes lfspin { to { transform: rotate(360deg); } }
.report { background: var(--green-soft); color: #3c6b52; border-radius: 12px; padding: 14px 18px; margin-top: 14px; font-size: 14px; }
.report.warning, .report.incomplete { background: var(--amber-soft); color: #7d5a12; }
.report summary { cursor: pointer; font-weight: 650; }
.deliveries { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.deliveries .dlabel { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }

/* 信任区块 */
.trust { margin-top: 54px; }
.trust-head { text-align: center; max-width: 560px; margin: 0 auto 30px; }
.trust-head .eyebrow { color: #7b7cc2; }
.trust-head h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.5px; margin: 0 0 10px; }
.trust-head p { color: var(--muted); margin: 0; font-size: 14.5px; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.flow-step { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.flow-step::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--accent), #9b6bf5); }
.flownum { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 750; font-size: 14px; display: grid; place-items: center; }
.flow-step h3 { margin: 0 0 3px; font-size: 14.5px; }
.flow-step p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.fico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 12px; }
.fico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 14.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 12.8px; line-height: 1.7; }
.trust-more { display: block; text-align: center; margin-top: 26px; color: var(--accent-deep); font-weight: 600; font-size: 14px; }
.trust-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============ 我的文档 ============ */
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid #dfe2fb; color: #3c3e86; border-radius: 13px; padding: 13px 18px; font-size: 14px; margin-bottom: 18px; }
.banner.subtle { background: #f7f8fb; border-color: var(--line); color: var(--muted); }
.banner a { color: var(--accent-deep); font-weight: 650; white-space: nowrap; }
.fname { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; vertical-align: middle; }
.muted-cell { color: #a0a0b5; font-size: 13px; }
.retention { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dlgroup { display: flex; gap: 6px; flex-wrap: wrap; }
.dl { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 12.5px; font-weight: 600; color: #3d3d5c; white-space: nowrap; }
.dl:hover { border-color: var(--accent); color: var(--accent-deep); }
.dl.primary { background: var(--accent-soft); border-color: #d8dbfb; color: var(--accent-deep); }
.dl.subtle { color: var(--muted); }
.spin-hint { display: flex; align-items: center; gap: 8px; margin-top: 16px; }

/* ============ 安全与合规 ============ */
.doc-main { max-width: 880px; }
.doc-hero { text-align: center; padding: 30px 0 10px; }
.doc-hero .eyebrow { color: #7b7cc2; }
.doc-hero h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.6px; margin: 0 0 12px; }
.doc-hero h1 em { font-style: normal; background: linear-gradient(92deg, var(--accent), #9b6bf5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc-hero > p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 15px; }
.doc-section { margin-top: 44px; }
.doc-section h2 { font-size: 20px; letter-spacing: -.3px; margin: 0 0 18px; padding-left: 14px; border-left: 4px solid var(--accent); }
.lc { position: relative; padding-left: 6px; }
.lc-step { display: flex; gap: 16px; position: relative; padding: 0 0 26px 0; }
.lc-step::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: linear-gradient(180deg, #d9dbf0, #ececf6); }
.lc-step:last-child::before { display: none; }
.lc-num { flex: none; width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(135deg, var(--accent), #7b5ff0); color: #fff; font-weight: 750; display: grid; place-items: center; box-shadow: 0 8px 18px var(--accent-ring); z-index: 1; }
.lc-step h3 { margin: 4px 0 3px; font-size: 15.5px; }
.lc-step p { margin: 0; color: var(--muted); font-size: 14px; max-width: 640px; }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sec-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.sec-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 12px; }
.sec-ico svg { width: 23px; height: 23px; }
.sec-card h3 { margin: 0 0 6px; font-size: 15px; }
.sec-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.callout { background: var(--accent-soft); border: 1px solid #dfe2fb; border-radius: 14px; padding: 22px 26px; }
.callout p { margin: 0; font-size: 14.5px; color: #3d3f7e; line-height: 1.9; }
.callout.alt { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.callout.alt p { color: var(--muted); margin-bottom: 16px; }

/* ============ 术语库 ============ */
.termsform .field { margin-bottom: 12px; }

/* ============ 管理后台 ============ */
.admin { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.admin .sidebar { background: #1d1e33; color: #b9bcd9; padding: 24px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.admin .sidebar .brand { color: #fff; }
.admin .sidebar .brand span { color: #8a8cc0; }
.admin .sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.admin .sidebar nav a { padding: 9px 14px; border-radius: 10px; font-size: 14px; color: #a6a9cf; font-weight: 550; }
.admin .sidebar nav a:hover { color: #fff; background: #ffffff10; }
.admin .sidebar nav a.active { background: linear-gradient(135deg, var(--accent), #7b5ff0); color: #fff; }
.admin .sidebar .bottom { margin-top: auto; font-size: 13px; }
.admin .sidebar .bottom a { color: #9d9fc9; }
.admin .sidebar .bottom button { margin-top: 10px; color: #8386b0; }
.admincontent { padding: 30px 38px 70px; }
.admincontent .toolbar { margin-bottom: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat strong { display: block; font-size: 26px; letter-spacing: -.5px; margin-top: 4px; }
.metricbars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 10px 4px 0; }
.metricbars div { flex: 1; background: linear-gradient(180deg, #7b5ff0, var(--accent)); border-radius: 6px 6px 0 0; min-height: 5px; position: relative; }
.metricbars span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--muted); }
.logs { display: flex; flex-direction: column; gap: 8px; }
.log { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.log time { color: var(--muted); margin-right: 8px; }
.providers { display: flex; flex-direction: column; gap: 18px; }
.providerhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.providerhead h2 { flex: 1; min-width: 120px; margin: 0; }
.provider-actions { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.provider-actions .checkrow { margin: 0; padding: 2px 6px; font-size: 13px; border: 0; }
.statechip.on { background: var(--green-soft); color: var(--green); border-color: #cfeeda; }
.statechip.off { background: var(--red-soft); color: var(--red); border-color: #f0d5d5; }
.provider-card select[name^="preset"] { margin: 6px 0 2px; max-width: 340px; }
.savebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; margin-top: 18px; box-shadow: var(--shadow); position: sticky; bottom: 16px; }
.savebar span { color: var(--muted); font-size: 13px; }

/* ============ 响应式 ============ */
@media (max-width: 1020px) {
  .flow, .features { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 950px) {
  .intro { gap: 22px; }
  .intro-copy { padding-left: 0; }
}
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 18px; }
  .admin .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .admin .sidebar .bottom { margin: 0 0 0 auto; display: flex; align-items: center; gap: 10px; }
  .admin .sidebar .bottom button { margin: 0; }
  .admincontent { padding: 22px 20px 60px; }
}
@media (max-width: 820px) {
  header { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 16px; }
  header .navbtn { padding: 8px 12px; font-size: 13px; }
  header .mainnav { gap: 3px; padding: 4px; border-radius: 12px; }
  header .authslot .loginbtn { padding: 7px 16px; font-size: 13px; }
}
@media (max-width: 700px) {
  .editor { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .intro-copy { padding: 0; }
  .intro h1 { font-size: clamp(28px, 8vw, 38px); }
  .intro .eyebrow { margin-bottom: 10px; font-size: 10.5px; }
  .intro-copy > p:not(.eyebrow) { font-size: 13.5px; }
  .language-tags { justify-content: center; margin-top: 12px; }
  .translation-visual { justify-self: center; max-width: 250px; }
  .mobile-break { display: block; }
  .toolfoot { flex-direction: column; align-items: stretch; gap: 12px; }
  .toolfoot .runbtn { width: 100%; }
  .flow, .features, .sec-grid, .pair, .stats { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  header .navbtn { padding: 7px 9px; font-size: 12.5px; }
  header .authslot .loginbtn { padding: 7px 12px; }
  main { padding: 0 16px; }
}
