:root {
  color-scheme: light;
  --page: #f1f5f3;
  --surface: #fff;
  --ink: #172b27;
  --muted: #536761;
  --line: #dce6e1;
  --accent: #086347;
  --accent-hover: #054f39;
  --radius: 16px;
  font: 16px/1.55 Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--page);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #168b65; outline-offset: 3px; }
h1, h2, p, dl, ol { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
h2 { font-size: 1.16rem; line-height: 1.35; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
code { overflow-wrap: anywhere; }
pre { max-width: 100%; overflow-x: auto; margin: 0; padding: 16px; border-radius: 10px; background: #edf3ef; }
pre code { font-size: 1em; }

.masthead { background: #102b23; color: #fff; }
.mast-inner { min-height: 66px; max-width: 1450px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; gap: 9px; align-items: center; color: #fff; font-weight: 730; letter-spacing: -.025em; text-decoration: none; }
.brand-symbol { display: flex; align-items: end; gap: 3px; height: 21px; padding: 2px; }
.brand-symbol i { display: block; width: 5px; border-radius: 4px; background: #75e0b2; }
.brand-symbol i:nth-child(1) { height: 9px; }
.brand-symbol i:nth-child(2) { height: 13px; }
.brand-symbol i:nth-child(3) { height: 17px; }
.environment { color: #cbecdd; padding: 2px 8px; font-size: .76rem; border: 1px solid #53786a; border-radius: 999px; }
.mast-action { margin-left: auto; }
.masthead .outline { color: #e3f8ef; background: transparent; border-color: #53786a; }
.masthead .outline:hover { background: #25473c; }

.content { width: min(100% - 32px, 1040px); margin: clamp(24px, 7vh, 74px) auto 52px; }
.shell { display: grid; grid-template-columns: minmax(160px, 200px) minmax(0, 1fr); gap: clamp(18px, 4vw, 50px); max-width: 1450px; padding: 32px clamp(16px, 4vw, 48px) 56px; margin: 0 auto; }
.sidebar { align-self: start; display: grid; gap: 14px; }
.identity { font-weight: 670; overflow-wrap: anywhere; }
.sidebar nav, .main-panel, .docs, .stack { display: grid; gap: 14px; }
.sidebar a { padding: 8px 10px; border-radius: 8px; color: var(--ink); background: #e6efe9; text-decoration: none; }
.sidebar a:hover { background: #d9e9e0; }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; }
.card, .auth-card, .checkout-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); padding: clamp(16px, 3vw, 28px); border-radius: var(--radius); }
.card, .auth-card { display: grid; align-content: start; gap: 14px; }
.auth-card { width: min(100%, 430px); margin: auto; }
.single { width: min(100%, 600px); margin: auto; }
.split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.split > div { display: grid; align-content: start; justify-items: start; gap: 12px; }
.order-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.description { grid-column: span 2; }
label { display: grid; gap: 6px; font-weight: 615; font-size: .93rem; }
input, select { width: 100%; min-height: 44px; border: 1px solid #b7c9be; border-radius: 8px; padding: 8px 10px; color: var(--ink); background: #fcfefc; }
.primary, .outline { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 8px 15px; border: 1px solid; border-radius: 8px; font-weight: 650; text-decoration: none; }
.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.outline { color: var(--accent); border-color: #b7c9be; background: #fff; }
.outline:hover { background: #eef6f1; }
.quiet, time { color: var(--muted); }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border-radius: 999px; background: #e9f0ec; color: var(--muted); font-size: .81rem; font-weight: 630; white-space: nowrap; }
.pill.ok, .notice.success { background: #ddf4e7; color: #075738; }
.notice { background: #edf3ef; padding: 10px 12px; border-radius: 8px; font-size: .95rem; }
.notice.danger { background: #fae8e5; color: #872f22; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-weight: 650; color: var(--muted); }
tbody tr:last-child td { border: 0; }
.details { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 7px 14px; font-size: .95rem; }
.details dt { font-weight: 650; }
dd { margin: 0; overflow-wrap: anywhere; }
.timeline { margin: 0; padding-left: 24px; }
.timeline li { margin-bottom: 5px; }
.timeline code { margin-left: 8px; }

.checkout-page { min-height: 100vh; background: radial-gradient(ellipse at 50% 0, #d9ece2, var(--page) 65%); }
.checkout-card { width: min(100%, 490px); margin: 0 auto; padding: clamp(20px, 5vw, 35px); box-shadow: 0 18px 45px #112b2411; }
.checkout-card h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); margin: 5px 0 8px; }
.merchant { color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }
.status-text { color: var(--muted); }
.amounts { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: baseline; gap: 12px 12px; padding: 20px 0 22px; margin-top: 18px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.amounts dd { text-align: right; font-weight: 660; }
.total-label, .total { border-top: 1px solid var(--line); padding-top: 14px; }
.total { color: var(--accent); font-size: clamp(1.3rem, 5vw, 1.9rem); }
.total-label { font-weight: 670; }
.pay { width: 100%; min-height: 50px; }
.checkout-foot { margin-top: 16px; font-size: .83rem; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; padding-top: 18px; }
  .sidebar nav { display: flex; gap: 8px; flex-wrap: wrap; }
  .order-form, .split { grid-template-columns: 1fr; }
  .description { grid-column: auto; }
  .details { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .details dd + dt { margin-top: 5px; }
}
