:root {
  color-scheme: light;
  --paper: #fcfbf9;
  --ink: #191d27;
  --soft-ink: #535964;
  --line: #dcdde0;
  --blue: #253dad;
  --serif: "Iowan Old Style", "Baskerville", "Songti SC", "Songti TC", Georgia, serif;
  font: 16px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { min-height: 100svh; display: flex; flex-direction: column; margin: 0; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .22em; }
button, select { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #5069ce; outline-offset: 4px; }
.wrap { width: min(1320px, calc(100% - clamp(40px, 9vw, 160px))); margin-inline: auto; }
.mast { border-bottom: 1px solid var(--line); }
.mast-inner, .foot-inner, .mast-nav, .foot nav { display: flex; align-items: center; }
.mast-inner, .foot-inner { justify-content: space-between; gap: 18px; }
.mast-inner { min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 24px; font-weight: 640; line-height: 1; letter-spacing: -.065em; white-space: nowrap; }
.brand-icon { display: block; width: 34px; height: 34px; flex-shrink: 0; }
.mast-nav, .foot nav { flex-wrap: wrap; gap: clamp(16px, 2.3vw, 38px); }
.mast-nav a, .foot a { color: var(--soft-ink); font-size: 14px; text-decoration: none; }
.mast-nav a:hover, .foot a:hover { color: var(--blue); text-decoration: underline; }
#locale { border: 1px solid var(--line); border-radius: 20px; background: var(--paper); padding: 7px 12px; color: var(--ink); font-size: 13px; }
.hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: stretch; gap: clamp(28px, 4.4vw, 78px); padding-block: clamp(32px, 4.3vw, 70px); }
.auth { align-self: center; padding-left: clamp(0px, 2vw, 30px); }
.auth-inner { width: min(100%, 450px); }
.product-name { display: flex; align-items: center; gap: 10px; color: var(--blue); font-size: 14px; font-weight: 630; letter-spacing: .035em; margin: 0 0 22px; }
.product-name::before { content: ""; width: 25px; height: 2px; background: var(--blue); }
.auth h1 { margin: 0; font-size: clamp(36px, 4vw, 62px); font-weight: 610; line-height: 1.14; letter-spacing: -.065em; text-wrap: balance; }
:lang(en) .auth h1 { font-family: var(--serif); font-weight: 500; letter-spacing: -.055em; }
#identity { overflow-wrap: anywhere; font-weight: 600; }
#description { max-width: 28em; color: var(--soft-ink); line-height: 1.7; margin: 18px 0 30px; }
.action { width: min(100%, 350px); min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.action:hover { background: #303541; }
.action.google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
.action.google:hover { background: #262627; }
.action.google::before { content: ""; width: 24px; height: 24px; border: 3px solid white; border-radius: 50%; background: white url('/icons/google-g.png') no-repeat center/18px 18px; box-sizing: border-box; }
.action:disabled { opacity: .7; cursor: wait; }
#status:not(:empty) { color: #8a431b; margin: 12px 0 0; }
#status:empty { display: none; }
.auth-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35em; margin-top: 18px; color: var(--soft-ink); font-size: 14px; }
.auth-links a { font-weight: 620; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.read-before { margin: 26px 0 0; font-size: 12px; color: var(--soft-ink); }
.read-before a { color: inherit; }
.book-cover { position: relative; width: 100%; min-width: 0; overflow: hidden; border-radius: 15px; background: #adbad0; min-height: 390px; aspect-ratio: 1.52; }
.book-cover img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 54% 48%; }
.tour { background: #f0f1f4; border-block: 1px solid #e1e2e6; scroll-margin-top: 16px; }
.tour-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4.4vw, 78px); align-items: center; padding-block: clamp(40px, 4vw, 64px); }
.tour-intro { padding-left: clamp(0px, 2vw, 30px); }
.tour-intro h2 { font-size: clamp(25px, 2.3vw, 35px); letter-spacing: -.045em; line-height: 1.2; margin: 0; }
.tour-intro p { max-width: 30em; margin: 12px 0 20px; color: var(--soft-ink); line-height: 1.75; font-size: 15px; }
.tour-options { display: flex; width: 100%; max-width: 100%; flex-wrap: wrap; gap: 6px; }
.tour-options button { border: 1px solid #cccfd7; background: transparent; color: var(--soft-ink); font-size: 13px; border-radius: 20px; padding: 7px 12px; }
.tour-options button:hover { background: #e3e6ef; }
.tour-options button[aria-selected="true"] { background: #e2e6fa; border-color: #b4bfef; color: #253782; font-weight: 640; }
.tour-panels { min-width: 0; }
.example { min-height: 208px; border-radius: 13px; background: #fff; border: 1px solid var(--line); padding: clamp(20px, 2.4vw, 36px); box-shadow: 0 8px 24px -22px #232e58; }
.example-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.example-heading h3 { margin: 0; font-size: 16px; font-weight: 610; }
.example-heading > span { font-size: 12px; color: var(--soft-ink); }
.amount { display: flex; gap: 0; align-items: baseline; color: #1a263b; font: 500 clamp(32px, 3.25vw, 48px)/1.3 var(--serif); letter-spacing: -.055em; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.amount small { font: 600 12px/1 system-ui,sans-serif; letter-spacing: .02em; color: var(--soft-ink); margin-right: 9px; }
.amount > span { color: #76808e; }
.allocation { display: grid; grid-template-columns: 60fr 25fr 15fr; gap: 3px; height: 9px; margin-top: 15px; border-radius: 3px; overflow: hidden; }
.allocation i, .legend i { background: #374bb9; }
.allocation i:nth-child(2), .legend li:nth-child(2) i { background: #8a9dd5; }
.allocation i:nth-child(3), .legend li:nth-child(3) i { background: #dbcda9; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 5px 17px; font-size: 12px; color: var(--soft-ink); }
.legend li { display: inline-flex; gap: 5px; align-items: center; }
.legend i { width: 7px; height: 7px; border-radius: 2px; }
.legend b { font-weight: 600; color: var(--ink); }
.example p { margin: 12px 0; font-size: 14px; color: var(--soft-ink); }
.example-table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: start; font-variant-numeric: tabular-nums; }
.example-table th { color: var(--soft-ink); font-size: 12px; font-weight: 500; border-bottom: 1px solid var(--line); padding-block: 4px; text-align: start; }
.example-table td { padding-top: 6px; }
.example-table :is(td, th):last-child { text-align: end; }
.backup-path { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.backup-path strong { border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; color: var(--blue); }
.foot { margin-top: auto; }
.foot-inner { color: var(--soft-ink); font-size: 13px; padding-block: 23px; }
.foot a { font-size: 13px; }
.policy { display: grid; grid-template-columns: minmax(160px, 238px) minmax(0, 700px); gap: clamp(40px, 7vw, 105px); padding-block: clamp(40px, 6vw, 90px); }
.policy nav { display: grid; align-content: start; gap: 4px; }
.policy nav a { text-decoration: none; padding: 9px 16px; color: var(--soft-ink); font-size: 15px; border-left: 2px solid var(--line); }
.policy nav a[aria-current] { border-color: var(--blue); color: var(--blue); background: #eef0f9; font-weight: 600; }
.policy article { min-width: 0; }
.policy h1 { font-size: clamp(32px, 4vw, 53px); letter-spacing: -.05em; line-height: 1.2; margin: 0 0 12px; }
.policy time { font-size: 14px; color: var(--soft-ink); }
.policy h2 { padding-top: 24px; border-top: 1px solid var(--line); margin: 32px 0 9px; font-size: 21px; }
.policy p { margin: 8px 0; line-height: 1.85; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .auth, .tour-intro { padding-left: 0; }
  .hero, .tour-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .book-cover { min-height: 345px; aspect-ratio: auto; }
}
@media (max-width: 740px) {
  .mast-inner { min-height: 64px; }
  .brand { font-size: 21px; gap: 6px; }
  .brand-icon { width: 29px; height: 29px; }
  .mast-nav .section-link { display: none; }
  .hero, .tour-layout { grid-template-columns: 1fr; gap: 25px; }
  .hero { padding-block: 32px 24px; }
  .auth-inner { max-width: 540px; width: 100%; }
  .product-name { margin-bottom: 13px; font-size: 13px; }
  .auth h1 { font-size: clamp(36px, 7.2vw, 48px); }
  #description { margin: 13px 0 22px; }
  .action { width: min(100%, 440px); }
  .auth-links { margin-top: 12px; }
  .read-before { margin-top: 15px; }
  .book-cover { min-height: 0; aspect-ratio: 2.05; border-radius: 10px; }
  .book-cover img { object-position: 50% 45%; }
  .tour-layout { padding-block: 30px; gap: 19px; }
  .tour-intro p { margin-bottom: 14px; }
  .example { min-height: 190px; }
  .foot-inner { flex-wrap: wrap; }
  .policy { grid-template-columns: 1fr; gap: 24px; padding-block: 28px; }
  .policy nav { display: flex; flex-wrap: wrap; }
  .policy nav a { padding: 6px 10px; }
}

/* Shared public palette, including account entry, examples and policy pages. */
:root {
  --header-height: 79px;
  --chapter-nav-height: 54px;
  --panel: #fff;
  --tour-paper: #f0f1f4;
  --frame: #e3e8f3;
  --tinted: #e8edfc;
  --chip-line: #bec9e7;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #10131a;
  --ink: #f1f3f8;
  --soft-ink: #b4bac8;
  --line: #343b49;
  --blue: #aabaff;
  --panel: #1a202c;
  --tour-paper: #141923;
  --frame: #242e42;
  --tinted: #283457;
  --chip-line: #4a5980;
}
html { scroll-padding-top: calc(var(--header-height) + 10px); }
.mast { position: sticky; top: 0; z-index: 5; background: var(--paper); }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 7px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle:hover, .theme-toggle[aria-pressed="true"] { background: var(--tinted); color: var(--blue); }
html:not([data-theme]) .theme-toggle { display: none; }
.explore { display: inline-flex; align-items: baseline; gap: .6em; margin-top: 24px; color: var(--blue); font-weight: 600; font-size: 14px; text-decoration: none; }
.explore:hover { text-decoration: underline; }
.story-intro {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  column-gap: clamp(44px, 8vw, 136px);
  padding-block: clamp(58px, 6.5vw, 100px) clamp(36px, 4.5vw, 68px);
  border-top: 1px solid var(--line);
}
.story-intro h2 {
  margin: 0; color: var(--ink); font: 500 clamp(38px, 4.2vw, 64px)/1.1 var(--serif);
  letter-spacing: -.025em;
}
.story-intro h2 span { display: block; }
.story-intro h2 span:last-child { color: var(--brand-ink); }
:lang(en) .story-intro h2 span:last-child { font-style: italic; }
.story-intro p {
  margin: 0; max-inline-size: 39ch; color: var(--soft-ink);
  font-size: clamp(17px, 1.35vw, 20px); line-height: 1.65; text-wrap: pretty;
}
:lang(zh) .story-intro h2 { font-family: inherit; font-size: clamp(32px, 3.55vw, 54px); font-weight: 520; line-height: 1.32; letter-spacing: .005em; }
:lang(zh) .story-intro p { max-inline-size: 24em; line-height: 1.85; }
.chapter-nav { position: sticky; top: var(--header-height); z-index: 3; background: var(--paper); }
.chapter-links { display: flex; gap: clamp(14px, 3vw, 42px); border-bottom: 1px solid var(--line); }
.chapter-links a { display: inline-flex; align-items: center; min-height: calc(var(--chapter-nav-height) - 1px); color: var(--soft-ink); border-bottom: 2px solid transparent; text-decoration: none; font-size: 14px; }
.chapter-links a:hover, .chapter-links a[aria-current] { color: var(--brand-ink); border-color: currentColor; }
.showcase { padding-block: clamp(28px, 3.2vw, 50px); }
.chapter { scroll-margin-top: calc(var(--chapter-nav-height) + 12px); }
.chapter-copy h3 { margin: 0; font-size: clamp(26px, 2.7vw, 42px); font-weight: 560; letter-spacing: -.025em; line-height: 1.2; text-wrap: balance; }
.chapter-copy p { color: var(--soft-ink); line-height: 1.7; font-size: clamp(16px, 1.2vw, 18px); margin: 16px 0 0; max-width: 40ch; text-wrap: pretty; }
.screen { margin: 0; min-width: 0; }
.screen-link { display: block; color: var(--soft-ink); text-decoration: none; border-radius: 16px; background: var(--frame); padding: clamp(10px, 1.4vw, 20px) clamp(10px, 1.4vw, 20px) 0; }
.screen-link:hover .screen-caption > span:last-child { text-decoration: underline; }
.screen-link img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 4px 16px #06102620; }
.screen-caption { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 12px; padding: 10px 1px; }
.screen-caption > span:last-child { color: var(--blue); }
.chapter + .chapter { margin-top: 38px; }
.chapter .screen { margin-top: 18px; }
.tour { background: var(--tour-paper); border-color: var(--line); }
.example { background: var(--panel); }
.amount, .legend b { color: var(--ink); }
.amount > span { color: var(--soft-ink); }
.tour-options button { border-color: var(--line); }
.tour-options button:hover, .policy nav a[aria-current] { background: var(--tinted); }
.tour-options button[aria-selected="true"] { background: var(--tinted); border-color: var(--chip-line); color: var(--blue); }
html[data-theme="dark"] .action:not(.google) { background: var(--blue); border-color: var(--blue); color: #101522; }
html[data-theme="dark"] #status:not(:empty) { color: #ffc298; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* Chapter links should respond immediately, including during a previous scroll. */
  html:has(.chapter:target) { scroll-behavior: auto; }
}
@media (max-width: 760px) {
  .story-intro { grid-template-columns: 1fr; gap: 24px; padding-block: 48px 32px; }
  .story-intro h2 { font-size: clamp(32px, 7.4vw, 46px); }
}
@media (max-width: 740px) {
  :root { --header-height: 65px; --chapter-nav-height: 46px; }
  .mast-nav { gap: 7px; }
  .theme-toggle { width: 34px; height: 34px; }
  .explore { margin-top: 15px; }
  .chapter-links { gap: 18px; }
  .chapter-links a { font-size: 13px; }
  .screen-caption { padding-block: 8px; }
}

.home .mast-nav { margin-inline-start: auto; }
.account-nav { display: flex; align-items: center; gap: 6px; }
.account-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 14px; border-radius: 24px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.account-nav a:hover { background: var(--tinted); }
.account-nav .join { color: var(--paper); background: var(--ink); padding-inline: 20px; }
.account-nav .join:hover { color: var(--paper); background: var(--blue); }
.home-hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr); align-items: center; gap: clamp(28px, 4vw, 68px); padding-block: clamp(44px, 6vw, 96px); }
.home-copy h1 { margin: 0; font-size: clamp(40px, 5.3vw, 79px); line-height: 1.12; letter-spacing: -.055em; font-weight: 610; text-wrap: balance; }
:lang(en) .home-copy h1 { font-family: var(--serif); font-weight: 500; }
.home-copy p { margin: 20px 0 0; max-width: 31em; color: var(--soft-ink); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.7; }
@media (max-width: 850px) {
  html:has(.home) { --header-height: 104px; }
  .home .mast-inner { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand accounts" "settings settings"; gap: 2px 10px; min-height: 103px; padding-block: 8px; }
  .home .brand { grid-area: brand; }
  .home .mast-nav { grid-area: settings; width: 100%; margin-inline-start: 0; gap: 10px 14px; }
  .home .mast-nav .section-link { display: inline; white-space: nowrap; }
  .home .mast-nav .theme-toggle { margin-inline-start: auto; }
  .account-nav { grid-area: accounts; gap: 4px; }
  .home-hero { grid-template-columns: 1fr; gap: 24px; padding-block: 24px 32px; }
  .home-copy p { margin-top: 12px; }
}
@media (max-width: 570px) {
  html:has(.home) { --header-height: 92px; }
  .wrap { width: min(1320px, calc(100% - 32px)); }
  .home .mast-inner { min-height: 91px; padding-block: 6px; gap: 2px 6px; }
  .home .mast-nav { gap: 4px 7px; }
  .home .mast-nav .section-link { font-size: 11.5px; }
  .home #locale { padding: 3px 6px; font-size: 11.5px; }
  .home .theme-toggle { width: 28px; height: 28px; padding: 5px; }
  .account-nav { gap: 2px; }
  .account-nav a { min-height: 34px; padding-inline: 8px; font-size: 13px; }
  .account-nav .join { padding-inline: 13px; }
  .home-hero { padding-block: 16px 24px; gap: 18px; }
  .home-copy h1 { font-size: clamp(34px, 9vw, 46px); }
}
