/* 算盒 Sumbox — 官网样式。无外部字体与脚本，系统字体优先。 */
:root {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --ink: #172e27;
  --muted: #5e6b64;
  --line: #e1e6de;
  --accent: #bef264;
  --on-accent: #173426;
  --teal: #245b49;
  --mint: #e5ede0;
  --shadow: 0 1px 2px rgba(23, 46, 39, 0.06), 0 8px 24px rgba(23, 46, 39, 0.06);
  --radius: 20px;
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111c19;
    --surface: #1c2a25;
    --ink: #eff7f2;
    --muted: #a3b5aa;
    --line: #2c3b35;
    --teal: #bcebcd;
    --mint: #243a2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

:root[data-theme="dark"] {
  --bg: #111c19;
  --surface: #1c2a25;
  --ink: #eff7f2;
  --muted: #a3b5aa;
  --line: #2c3b35;
  --teal: #bcebcd;
  --mint: #243a2e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Traditional Chinese pages (zh-Hant/) prefer the Traditional Chinese system fonts. */
html:lang(zh-Hant) body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "PingFang HK", "Heiti TC",
    "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
}

a {
  color: var(--teal);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand small {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 10px 10px;
  border-radius: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--mint);
}

@media (max-width: 420px) {
  .brand small {
    display: none;
  }
  .nav a {
    padding: 10px 8px;
    font-size: 14px;
  }
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero .app-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.15;
  margin: 22px 0 10px;
  letter-spacing: -0.01em;
}

.hero .slogan {
  font-size: clamp(18px, 3.2vw, 22px);
  color: var(--ink);
  margin: 0 0 6px;
}

.hero .subtitle {
  color: var(--muted);
  margin: 0 0 28px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.cta[aria-disabled="true"] {
  cursor: default;
}

.hero .note {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* Sections */
section {
  padding: 40px 0;
}

.section-title {
  font-size: clamp(24px, 4.4vw, 32px);
  line-height: 1.3;
  margin: 0 0 8px;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 640px;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

/* Skin showcase — each skin sets its own palette variables */
.skins {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.skin {
  margin: 0;
  min-width: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
}

.skin .device {
  background: var(--s-bg);
  border-radius: 18px;
  padding: 12px;
  font-family: var(--s-font, inherit);
}

.skin .display {
  background: var(--s-display);
  color: var(--s-display-ink);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: right;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.skin .display small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
}

.skin .keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.skin .keys span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 1.25;
  line-height: 1;
  border-radius: var(--s-radius, 10px);
  background: var(--s-key);
  color: var(--s-key-ink);
  border: var(--s-key-border, 0);
  font-size: 15px;
  font-weight: 500;
}

.skin .keys .op {
  background: var(--s-op);
  color: var(--s-op-ink);
}

.skin .keys .eq {
  background: var(--s-eq);
  color: var(--s-eq-ink);
  font-weight: 700;
}

.skin .meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.skin .meta strong {
  font-size: 16px;
}

.skin .meta span {
  font-size: 13px;
  color: var(--muted);
}

.skin[data-skin="mint"] {
  --s-bg: #f5f6f2; --s-display: #ffffff; --s-display-ink: #172e27;
  --s-key: #ffffff; --s-key-ink: #172e27; --s-op: #e5eddf; --s-op-ink: #172e27;
  --s-eq: #bef264; --s-eq-ink: #173426; --s-radius: 12px;
}
.skin[data-skin="contrast"] {
  --s-bg: #ffffff; --s-display: #ffffff; --s-display-ink: #000000;
  --s-key: #f2f2f2; --s-key-ink: #000000; --s-op: #f2f2f2; --s-op-ink: #0040dd;
  --s-eq: #0040dd; --s-eq-ink: #ffffff; --s-key-border: 2px solid #000000; --s-radius: 10px;
}
.skin[data-skin="paper"] {
  --s-bg: #f3ede1; --s-display: #fbf7ee; --s-display-ink: #1e1e1c;
  --s-key: #ede4d3; --s-key-ink: #1e1e1c; --s-op: #2b2b29; --s-op-ink: #f3ede1;
  --s-eq: #b8322a; --s-eq-ink: #fff6ec; --s-radius: 6px;
  --s-font: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}
.skin[data-skin="lcd"] {
  --s-bg: #2e2f2b; --s-display: #9daf8f; --s-display-ink: #1b2418;
  --s-key: #3a3b37; --s-key-ink: #edede6; --s-op: #5a5c55; --s-op-ink: #edede6;
  --s-eq: #e08a2e; --s-eq-ink: #1b1b1b; --s-radius: 6px;
  --s-font: ui-monospace, "SF Mono", Menlo, monospace;
}
.skin[data-skin="neon"] {
  --s-bg: #07060f; --s-display: #120f24; --s-display-ink: #e8f0ff;
  --s-key: #1a1633; --s-key-ink: #e8f0ff; --s-op: #1a1633; --s-op-ink: #00e5ff;
  --s-eq: linear-gradient(135deg, #00e5ff, #7c4dff); --s-eq-ink: #07060f; --s-radius: 12px;
  --s-font: ui-monospace, "SF Mono", Menlo, monospace;
}
.skin[data-skin="macaron"] {
  --s-bg: #fff8f1; --s-display: #ffffff; --s-display-ink: #5a4452;
  --s-key: #ffffff; --s-key-ink: #5a4452; --s-op: #ffd6e0; --s-op-ink: #5a4452;
  --s-eq: #c73e6e; --s-eq-ink: #ffffff; --s-radius: 999px;
  --s-font: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif;
}
.skin[data-skin="oled"] {
  --s-bg: #000000; --s-display: #000000; --s-display-ink: #f2f2f7;
  --s-key: #0b0b0c; --s-key-ink: #f2f2f7; --s-op: #0b0b0c; --s-op-ink: #64d2ff;
  --s-eq: #5e5ce6; --s-eq-ink: #ffffff; --s-key-border: 1px solid #1f1f22; --s-radius: 999px;
}
.skin[data-skin="ledger"] {
  --s-bg: #e8dbc0; --s-display: #f4ecda; --s-display-ink: #33291f;
  --s-key: #f4ecda; --s-key-ink: #33291f; --s-op: #e8dbc0; --s-op-ink: #a63a3a;
  --s-eq: #2f6b4f; --s-eq-ink: #f4ecda; --s-key-border: 1px solid #d6c6a3; --s-radius: 4px;
}

/* Real application screenshots */
.shots {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
}

.shots figure {
  margin: 0;
  min-width: 0;
}


.shots img {
  display: block;
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--line);
}

.shots figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 15px;
}

/* Promise band */
.promise {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px 20px;
}

.promise ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.promise li {
  padding-left: 28px;
  position: relative;
}

.promise li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-weight: 800;
}

/* Documents (privacy, terms, support) */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 24px;
}

.doc h1 {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.25;
  margin: 0 0 6px;
}

.doc .updated {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 24px;
}

.doc h2 {
  font-size: 20px;
  margin: 32px 0 10px;
}

.doc p,
.doc li {
  font-size: 17px;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
  margin: 8px 0 12px;
}

.doc li + li {
  margin-top: 6px;
}

.doc .aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  margin: 18px 0;
}

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 10px 0;
  padding: 0 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 52px;
  display: flex;
  align-items: center;
  list-style: none;
  gap: 10px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details > *:not(summary) {
  margin-top: 0;
}

.faq details[open] {
  padding-bottom: 12px;
}

.faq code,
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  background: var(--mint);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 10px;
}

.site-footer a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer p {
  margin: 4px 0;
}

.icp[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Shared product navigation and release status. */
.hero { background: radial-gradient(ellipse at 50% 12%, var(--mint), transparent 65%); }
.hero .app-icon { box-shadow: 0 20px 42px #172e2714; }
.hero .release-status { margin: 18px auto 10px; color: var(--muted); font-size: 14px; max-width: 520px; }
.nav .download-nav { font-weight: 700; }
.skin-disclaimer { margin-top: 14px; }
.privacy-policy-link { margin: 18px 0 0; }
.contact-title { margin: 0; }
.contact-hint { margin: 6px 0 0; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 13px; font-weight: 750; letter-spacing: .08em; }
.our-apps { scroll-margin-top: 90px; }
.app-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 32px; }
.app-choice { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: start; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 28px; box-shadow: var(--shadow); }
.app-choice > img { border-radius: 17px; }
.app-choice h3 { font-size: 25px; margin: 0 0 4px; line-height: 1.25; }
.app-choice h3 a { color: inherit; text-decoration: none; }
.app-choice p { color: var(--muted); font-size: 15px; margin: 8px 0 18px; }
.app-choice .app-tagline { color: var(--ink); font-size: 16px; font-weight: 650; }
.app-choice .availability { font-size: 12px; margin: 9px 0 0; }
.store-pending, .store-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 12px; padding: 9px 16px; font-size: 14px; font-weight: 650; }
.store-pending { color: var(--muted); background: var(--mint); }
.store-link { color: var(--on-accent); background: var(--accent); text-decoration: none; }
.learn-link { display: block; width: fit-content; min-height: 44px; padding-top: 12px; font-size: 14px; }
.site-footer .our-apps-nav { padding-top: 4px; }
.site-footer .filings { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 8px 0; font-size: 12px; }
.site-footer .filings img { margin-right: 5px; width: 14px; height: 16px; }
@media (max-width: 760px) {
  .app-choices { grid-template-columns: 1fr; }
  .app-choice { padding: 22px; }
  .site-header .wrap { align-items: flex-start; padding-top: 12px; padding-bottom: 8px; flex-wrap: wrap; gap: 4px 14px; }
  .nav { gap: 4px 16px; }
  .nav a { min-height: 36px; }
}
@media (max-width: 390px) {
  .app-choice { grid-template-columns: 56px minmax(0,1fr); gap: 16px; padding: 20px; }
  .app-choice > img { width: 56px; height: 56px; border-radius: 14px; }
}

.not-found { text-align: center; padding-top: 80px; }
.not-found-english { margin-top: 32px; }

.shots { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; max-width: 940px; margin: 32px auto 0; }
.shots img { box-shadow: var(--shadow); }
@media (max-width: 600px) { .shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 18px; padding: 0 2px 16px; } .shots figure { min-width: 72%; scroll-snap-align: center; } }
section[id] { scroll-margin-top: 80px; }
