:root {
  color-scheme: light;
  --canvas: #f7f8f8;
  --paper: #fff;
  --ink: #192632;
  --muted: #52616e;
  --line: #d9e0e3;
  --slate: #385366;
  --mist: #edf1f3;
  --shadow: 0 3px 14px #182a3807;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh }
header, main, footer { width: min(calc(100% - 52px), 1100px); margin-inline: auto }
header { display: flex; align-items: center; gap: 26px; min-height: 74px; border-bottom: 1px solid var(--line) }
button, a { font: inherit; touch-action: manipulation }
button { cursor: pointer }
a { color: var(--slate); text-underline-offset: .2em }
button:focus-visible, a:focus-visible { outline: 3px solid #3e677e; outline-offset: 3px }
[hidden] { display: none !important }
.wordmark { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--ink); font-size: 23px; font-weight: 750; letter-spacing: -.045em; text-decoration: none }
.mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; background: var(--ink); color: var(--paper); border-radius: 8px; font: italic 700 25px Georgia, serif; letter-spacing: -.08em; padding-right: 3px }
#brand, #home { overflow-wrap: anywhere }
#views, #language, .filters, .action-row, .order-actions, .chips, .policies, footer { display: flex; align-items: center; flex-wrap: wrap }
#views { margin-right: auto; gap: 20px }
#views a { display: inline-flex; align-items: center; padding: 10px 2px; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; font-size: 14px }
#views a[aria-current=page] { color: var(--ink); border-color: currentColor; font-weight: 680 }
#session { border: 0; background: transparent; color: var(--muted); padding: 8px; font-size: 14px }
#session:hover, #views a:hover { text-decoration: underline; text-underline-offset: .22em }
#language, #home + nav { display: inline-flex; flex-wrap: nowrap; align-items: center; border: 1px solid var(--line); border-radius: 7px; padding: 3px; gap: 2px; background: var(--paper) }
#home + nav { margin-inline-start: auto; font-size: 0 }
#language button, #home + nav a, .filters button { border: 0; background: transparent; border-radius: 4px; color: var(--muted); padding: 6px 8px; font-size: 13px; text-decoration: none; white-space: nowrap }
#language button[aria-pressed=true], .filters button[aria-pressed=true],
html[lang=zh-HK] #home + nav a[lang=zh-HK], html[lang=zh-CN] #home + nav a[lang=zh-CN], html[lang=en] #home + nav a[lang=en] { background: var(--mist); color: var(--ink); font-weight: 700 }
#language button:hover, #home + nav a:hover, .filters button:hover { color: var(--ink); background: var(--mist) }

main { padding: 25px 0 32px }
h1, h2, p { margin: 0 }
h1 { font-size: clamp(34px, 4.5vw, 50px); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere }
.hero { isolation: isolate; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 158px; padding: 30px 34px; border: 1px solid var(--line); border-radius: 14px; background: #f1f4f4 }
.hero::after { content: ""; position: absolute; z-index: -1; inset: -1px -18% -1px 66%; transform: skewX(-22deg); border-inline-start: 1px solid #ccd5da; background: #e4eaed }
.hero p { margin-top: 10px; color: #40515e; line-height: 1.55 }
.key-card { min-width: 220px; padding: 15px 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow) }
.key-card strong { font-size: 16px }
.chips { gap: 6px; margin-top: 9px }
.chips span, .kind { border-radius: 4px; background: var(--mist); color: var(--slate); font-size: 12px; padding: 3px 7px }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px }
.filters { gap: 5px; margin-top: 14px }
.merchant, .detail, .note, .order-meta, .status p, .original, .policy-version { color: var(--muted); line-height: 1.5 }
.merchant, .detail { font-size: 14px; margin-top: 12px }
.merchant, .note, .order-meta, .detail, .product-name, .price, .policies, .legal-document { overflow-wrap: anywhere }
.product, .status, .order-row, dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow) }
.product { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 18px 20px 15px; border-top: 3px solid #526b7b }
.product.tank { border-top-color: #8a979e }
.product-top, .buy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.kind { font-weight: 650 }
.purpose { font-size: 17px; line-height: 1.4; font-weight: 700; color: #344956; margin: 8px 0 5px }
.product-name { font-size: 15px; line-height: 1.45 }
.original, .note, .product .detail { font-size: 13px }
.product-name .original { display: inline-block; margin-inline-start: 8px; font-weight: 400 }
.product .detail { margin: 4px 0 0 }
.buy-row { border-top: 1px solid var(--line); margin-top: auto; padding-top: 10px }
.product > :nth-last-child(2) { margin-bottom: 14px }
.price { font-size: clamp(23px, 2.7vw, 32px); font-weight: 710; letter-spacing: -.04em; font-variant-numeric: tabular-nums }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; max-width: 100%; padding: 8px 15px; border-radius: 7px; border: 1px solid transparent; text-decoration: none; font-size: 14px; font-weight: 630 }
.primary { background: var(--ink); color: var(--paper) }
.primary:hover:not(:disabled) { background: var(--slate) }
.secondary { background: var(--paper); color: var(--slate); border-color: #c7d0d5 }
.secondary:hover:not(:disabled) { background: var(--mist) }
button:disabled { cursor: default; background: #eef1f2; color: #626e77; box-shadow: none; border-color: var(--line) }
.action-row, .order-actions, .policies { gap: 10px }
.status { margin-top: 16px; padding: clamp(20px, 4vw, 34px); max-width: 720px }
.status p { margin: 8px 0 16px }
dialog { padding: 24px; width: min(calc(100vw - 32px), 450px); max-height: 88dvh; color: inherit; box-shadow: 0 18px 80px #18253130 }
dialog::backdrop { background: #1a26336b }
dl { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 11px 16px; margin: 20px 0 }
dt { color: var(--muted); overflow-wrap: anywhere }
dd { margin: 0; text-align: end; overflow-wrap: anywhere }
.note, .error { margin-top: 12px; font-size: 14px }
.error { color: #913646; line-height: 1.55 }
.policies { margin: 16px 0 }
.policy-version { font-size: 13px }
dialog .action-row { justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line) }
.order-list, .order-row, .order-actions { margin-top: 18px }
.order-list { display: grid; gap: 10px }
.order-list .order-row { margin: 0 }
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 20px }
.product-kind, .order-meta, .order-status { font-size: 14px }
.product-kind { color: var(--slate); margin-bottom: 5px }
.order-summary .order-meta { margin-top: 5px }
.order-value { display: grid; align-content: start; justify-items: end; gap: 5px; font-variant-numeric: tabular-nums }
.order-status { color: var(--slate) }
.order-date { grid-column: 1 / -1 }
footer { gap: 18px; padding: 16px 0 24px; border-top: 1px solid var(--line) }
footer a, .policy-link { font-size: 13px }
.legal-document { max-width: 760px; line-height: 1.7 }
.legal-document h1 { margin-bottom: 14px }
.legal-document h1 ~ p { color: #3f4e58 }
.legal-document h2 { margin: 1.75rem 0 .4rem }
.legal-document > a { display: inline-block; margin: 1rem 1.5rem 0 0 }

@media (max-width: 760px) {
  header, main, footer { width: calc(100% - 30px) }
  header { gap: 12px }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px 18px }
  .hero::after { inset-inline-start: 79% }
  .key-card { min-width: 0; width: fit-content; max-width: 100% }
}
@media (max-width: 610px) {
  header { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding-top: 10px; gap: 2px 9px }
  #language, #home + nav { grid-area: 1 / 2 }
  #language button, #home + nav a { display: inline-flex; align-items: center; padding: 5px 6px; min-height: 36px }
  #views { grid-area: 2 / 1; gap: 8px }
  #views a, #session, .primary, .secondary { min-height: 44px }
  #session, #login { grid-area: 2 / 2; justify-self: end }
  .grid { grid-template-columns: minmax(0, 1fr) }
  .order-row { grid-template-columns: minmax(0, 1fr); padding: 16px }
  .order-value { display: flex; flex-wrap: wrap; align-items: center; gap: 12px }
  main { padding-top: 16px }
  h1 { line-height: 1.17 }
}

.model-rates { margin: 6px 0 0; }
.model-rates summary { width: fit-content; padding: 10px 3px; cursor: pointer; color: var(--slate); font-size: 14px; font-weight: 630 }
.model-rates summary:focus-visible { outline: 3px solid #3e677e; outline-offset: 2px }
.model-rates summary:hover, .rate-retry:hover { text-decoration: underline; text-underline-offset: .22em }
#model-rates { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--muted); font-size: 14px }
.model-rates table { width: 100%; border-collapse: collapse; table-layout: fixed; overflow-wrap: anywhere; text-align: start; font-size: 14px }
.model-rates th, .model-rates td { padding: 8px 6px; text-align: start; vertical-align: top; line-height: 1.45 }
.model-rates tr > :first-child { width: 34%; padding-inline-start: 0 }
.model-rates tr > :nth-child(2) { width: 23% }
.model-rates tr > :last-child { padding-inline-end: 0 }
.model-rates thead th { color: var(--muted); padding-block-start: 0; font-size: 13px; font-weight: 580 }
.model-rates tbody tr { border-top: 1px solid var(--line); color: var(--ink) }
.model-rates td span { display: inline-block; margin-inline-end: .9em; font-variant-numeric: tabular-nums }
.rate-retry { border: 0; padding: 5px; color: var(--slate); font: inherit; font-weight: 650; background: transparent }
.product-group { margin-top: 18px }
.product-group > .product-top { justify-content: flex-start }
.product-group > .purpose { margin: 3px 0 0; font-size: 14px; font-weight: 500; color: var(--muted) }
.product-group .tier-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 10px }
.tier-grid h3 { margin: 0; font-size: 18px; line-height: 1.4 }
@media (max-width: 610px) {
  .product-group .tier-grid { grid-template-columns: minmax(0, 1fr) }
  #model-rates { padding: 11px }
  .model-rates table { font-size: 13px }
  .model-rates td span { display: block; margin-inline-end: 0 }
}
