/* jiaweis.com — one stylesheet, light/dark, no framework */
@font-face { font-family: "Geist"; src: url("/static/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/static/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/static/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/static/fonts/Geist-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #faf9f7; --bg-alt: #f2f0ec; --card: #ffffff; --text: #141312; --muted: #67625c; --faint: #9a948d;
  --line: #e6e2dc; --accent: #ff6b1a; --accent-ink: #ffffff; --ink: #141312; --ink-text: #faf9f7;
  --ok: #1f7a4d; --ok-bg: #e8f5ee; --err: #b42318; --err-bg: #fdecea; --warn: #8a5300; --warn-bg: #fff4e0;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 19, 18, .05), 0 8px 24px rgba(20, 19, 18, .06);
  --font: "Geist", -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110; --bg-alt: #181716; --card: #1c1b1a; --text: #f3f1ee; --muted: #a8a29b; --faint: #7a746d;
    --line: #2d2b29; --ink: #f3f1ee; --ink-text: #141312; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --ok: #5fd39a; --ok-bg: #12291d; --err: #ff8a80; --err-bg: #2c1513; --warn: #ffc56b; --warn-bg: #2b2112;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 700; }
h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 650; }
h3 { font-size: 17px; font-weight: 600; }
.h-sm { font-size: 17px; margin-top: 28px; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }
.fine { font-size: 13px; color: var(--faint); }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* header / footer */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.logo-mark { height: 15px; width: auto; display: block; }
.brand-cn { font-weight: 600; font-size: 15px; letter-spacing: .08em; color: var(--muted); }
.site-nav { display: flex; gap: 22px; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--text); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.nav-link { text-decoration: none; color: var(--muted); }
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0; font-size: 13px; color: var(--faint); }
.foot-row nav { display: flex; gap: 18px; }
.foot-row a { text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--ink-text); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; transition: transform .08s ease, opacity .12s ease; }
.btn:hover { color: var(--ink-text); opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); background: var(--bg-alt); opacity: 1; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row form { margin: 0; }

/* hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .06em; margin-bottom: 14px; }
.lede { font-size: 17px; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.hero-shot { min-width: 0; }
.win { border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; font-size: 12.5px; }
.win-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.win-body { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.win-side { border-right: 1px solid var(--line); padding: 10px 8px; color: var(--muted); background: var(--bg-alt); }
.ws-item { padding: 4px 8px; }
.ws-h { margin: 12px 8px 4px; font-size: 11px; color: var(--faint); }
.ws-proj { padding: 4px 8px; color: var(--text); font-weight: 500; }
.ws-sess { padding: 4px 8px 4px 20px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-sess.on { background: var(--card); color: var(--text); }
.win-main { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.msg { line-height: 1.5; }
.msg.user { align-self: stretch; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--text); }
.msg.step { color: var(--faint); }
.msg.step b { color: var(--text); font-weight: 500; }
.msg .add { color: var(--ok); } .msg .del { color: var(--err); }
.msg.bot { color: var(--text); }
.composer { margin-top: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.composer .chip { border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--muted); font-size: 11px; }
.composer .chip:first-of-type { margin-left: auto; }

/* sections */
.section { padding: 64px 0; }
.section.tinted { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lede { color: var(--muted); font-size: 16px; max-width: 40em; margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }
.f-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); margin-bottom: 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps p { color: var(--muted); font-size: 14px; margin: 0; }
.steps .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--ink-text); font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 16px; margin-bottom: 16px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-sub { color: var(--muted); margin: 0; }
.plan ul { padding-left: 18px; color: var(--muted); font-size: 14px; flex: 1; margin: 10px 0 16px; }
.plan .btn { align-self: flex-start; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }
.legal p, .legal li { color: var(--muted); }
ol.plain, ul.plain { padding-left: 20px; color: var(--muted); }
.dl-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; margin: 0 0 24px; }
.dl-list li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* notices */
.note { padding: 10px 14px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--line); font-size: 14px; }
.note.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.note.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.note.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

/* account pages */
.auth { display: grid; place-items: center; padding: 56px 20px; }
.auth-card { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; }
.sub { color: var(--muted); font-size: 14px; }
.alt { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.app-note { margin-top: 16px; }
.form { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 6px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
input { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); width: 100%; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.code-input { font-size: 22px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.card-input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.inline-form { margin: 6px 0 0; }
.form > .btn:not(.btn-block) { align-self: flex-start; }
.account h1 { margin-bottom: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px 18px; margin-bottom: 16px; }
.panel .h-sm { margin-top: 16px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0 0 6px; font-size: 14px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; word-break: break-all; }
.row-form { flex-direction: row; align-items: flex-end; }
.row-form .grow { flex: 1; }
.danger-zone summary { color: var(--err); padding: 10px 0 4px; }
.danger-zone { padding-top: 6px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 600px) {
  .features, .steps, .plans { grid-template-columns: 1fr; }
  .win-body { grid-template-columns: 1fr; }
  .win-side { display: none; }
  .hero { padding-top: 40px; }
  .row-form { flex-direction: column; align-items: stretch; }
  .kv { grid-template-columns: 90px 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
