/* Bupu: the only stylesheet (no inline styles in templates). Values: docs/BRIEF.md section 3. */
:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --text: #111418;
  --text-2: #4A5360;
  --text-3: #5B6470;
  --line: #ECEEF1;
  --border: #D5D9DF;
  --card-line: #E1E4E9;
  --accent: #0A5CFF;
  --accent-hover: #0747C7;
  --accent-bg: #EEF4FF;
  --accent-on-bg: #0747C7;
  --ok: #0B6B3A;
  --ok-bg: #E7F6ED;
  --r-card: 24px;
  --r-box: 16px;
  --r-pill: 999px;
  --tap: 44px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, p, figure, blockquote { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; min-height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { fill: none; stroke: #FFFFFF; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.menu { flex: 1; display: flex; justify-content: center; gap: 4px; }
.pill { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 500; text-decoration: none; }
.pill:hover { color: var(--text); background: var(--bg); }
.actions { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; gap: 2px; margin: 0; }
.lang-btn { min-height: var(--tap); min-width: var(--tap); padding: 0 10px; border: 0; border-radius: var(--r-pill); background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-3); cursor: pointer; }
.lang-btn:hover { color: var(--text); background: var(--bg); }
.lang-btn.is-active { color: var(--accent-on-bg); background: var(--accent-bg); }
.btn-outline { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; }
.btn-outline:hover { background: var(--bg); color: var(--text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; border-radius: var(--r-pill); font: inherit; font-size: 17px; font-weight: 600; line-height: 1.3; cursor: pointer; text-decoration: none; border: 1px solid transparent; text-align: center; }
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }

/* common blocks */
.card { background: var(--surface); border-radius: var(--r-card); padding: 28px; }
.card-title { font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.card p { color: var(--text-2); }
.label { font-size: 14px; font-weight: 500; color: var(--text-3); }
.amount { font-size: 44px; font-weight: 700; line-height: 1.15; margin-top: 6px; letter-spacing: -0.025em; }
.muted { color: var(--text-3); font-size: 14px; margin-top: 8px; }
.card p.muted { color: var(--text-3); }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap; margin-bottom: 14px; }
.badge-accent { background: var(--accent-bg); color: var(--accent-on-bg); }
.badge-neutral { background: var(--bg); color: var(--text-2); }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.row > * { flex: 1 1 300px; min-width: 260px; }
.foot-note { margin-top: 24px; text-align: center; font-size: 14px; color: var(--text-3); }

/* guide bubble */
.guide { display: flex; align-items: flex-start; gap: 16px; margin-top: 32px; }
.guide-avatar { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; }
.guide-bubble { flex: 1; min-width: 0; background: var(--surface); border-radius: 4px 22px 22px 22px; padding: 20px 24px; }
.guide-name { font-size: 14px; font-weight: 600; color: var(--text-3); margin-bottom: 4px; }
.guide-main { font-size: 19px; font-weight: 500; line-height: 1.4; }
.guide-sub { font-size: 16px; color: var(--text-2); margin-top: 6px; }

/* landing */
.hero-in, .section-in, .footer-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 72px 0 40px; }
.hero-in { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-text { flex: 3 1 480px; min-width: 0; }
.hero-title { font-size: 52px; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.hero-sub { font-size: 20px; color: var(--text-2); margin: 20px 0 28px; max-width: 40em; }
.hero-card { flex: 2 1 300px; min-width: 260px; }
.section { padding: 40px 0; }
.section-head { font-size: 28px; font-weight: 700; line-height: 1.25; margin-bottom: 24px; }
.steps3 { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.steps3 > li { flex: 1 1 300px; min-width: 260px; }
.step3-n { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-on-bg); font-weight: 700; margin-bottom: 14px; }
.mode.is-primary-choice { border: 2px solid var(--accent); }
.mode { border: 1px solid var(--border); }
.quote { margin-top: 24px; }
.quote blockquote { font-size: 22px; font-weight: 500; line-height: 1.45; }
.quote figcaption { margin-top: 10px; font-size: 14px; color: var(--text-3); }
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 48px; padding: 28px 0; }
.footer-risk { font-size: 14px; color: var(--text-2); max-width: 60em; }
.footer-company { font-size: 14px; color: var(--text-3); margin-top: 10px; }

/* sign-in, sign-up, verification, password reset, account (brief 3.3: errors under the field + in the guide bubble) */
:root { --err: #B42318; }
main.auth { max-width: 600px; margin: 0 auto; padding: 40px 24px 64px; }
main.auth .guide { margin-top: 0; }
.auth-card { margin-top: 24px; }
.auth-title { font-size: 26px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.2px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-inline { margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field-label { font-size: 15px; font-weight: 500; color: var(--text-2); }
.field-hint { font-size: 14px; color: var(--text-3); }
.field-error { font-size: 14px; font-weight: 500; color: var(--err); }
.input { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--r-box); background: var(--surface); font: inherit; font-size: 16px; color: var(--text); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.input[aria-invalid="true"] { border-color: var(--err); }
.input.is-code { letter-spacing: 4px; font-weight: 600; font-size: 20px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.55; color: var(--text-2); cursor: pointer; }
.check input { flex: 0 0 22px; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.guide-sub.is-error { color: var(--text); font-weight: 500; }
.btn-block { width: 100%; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); color: var(--text); }
.btn-text { min-height: var(--tap); padding: 0 12px; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 500; color: var(--text-2); cursor: pointer; border-radius: var(--r-pill); }
.btn-text:hover { color: var(--text); background: var(--bg); }
.inline-form { margin: 0; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 15px; color: var(--text-2); }
.auth-foot + .auth-foot { margin-top: 8px; }
.facts { margin: 0 0 8px; }
.fact { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; }
.fact dt { color: var(--text-3); font-size: 15px; }
.fact dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px; }
  .menu { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  .actions { margin-left: auto; }
  .hero { padding: 40px 0 24px; }
  .hero-in, .section-in, .footer-in { padding: 0 16px; }
  .hero-in { gap: 24px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 18px; }
  .row, .steps3 { gap: 16px; }
  .row > *, .steps3 > li, .hero-text, .hero-card { flex-basis: 100%; min-width: 0; }
  .card { padding: 22px; }
  .section-head { font-size: 26px; }
  .amount { font-size: 38px; }
  .guide { gap: 12px; }
  .guide-bubble { padding: 16px 18px; }
  .guide-main { font-size: 18px; }
  .quote blockquote { font-size: 19px; }
  main.auth { padding: 24px 16px 48px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}
