/* 听库 product page. Tokens follow the app (app/TaleBridge/App/Theme.swift): periwinkle ground, white
   trays, ink type, clear acrylic shelves; colour lives only in the book covers. No web fonts: PingFang for
   Chinese, the system serif (New York on Apple devices) for English being read, as in the app. */
:root {
  --ground: #D4D0FA; --paper: #FFFFFF; --ink: #16151C; --on-ink: #FFFFFF;
  --muted: #4E4B60; --muted-paper: #5F5C72; --violet: #6F64D6; --mist: #F0EFFA;
  --thumb: #FFFFFF; --hairline: #EEEDF6; --acrylic: rgb(176 168 240);
  --shadow: 0 10px 22px rgb(31 23 69 / .22);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #17151F; --paper: #23202E; --ink: #F4F3FA; --on-ink: #16151C;
    --muted: #B9B6CC; --muted-paper: #B3B0C6; --violet: #9D95F0; --mist: #2E2B3B;
    --thumb: #4A4660; --hairline: #34313F; --acrylic: rgb(120 112 200);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.7 var(--sans);
       -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .04em; margin: 0 0 14px; }
.muted { color: var(--muted); }
h1, h2 { font-weight: 300; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 76px); line-height: 1.2; }
h2 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.25; }
h3 { font-size: 22px; font-weight: 500; margin: 0 0 6px; }
p { margin: 0; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.bar nav { display: flex; gap: 22px; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .bar nav { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 40px 0 72px; }
.hero .lede { font-size: 19px; color: var(--muted); margin-top: 22px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 32px; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
        background: var(--ink); color: var(--on-ink); font-weight: 500; text-decoration: none; }
.pill svg { width: 20px; height: 20px; }
.pill.ghost { background: var(--mist); color: var(--ink); }
.cta .note { font-size: 14px; color: var(--muted); }
.phone { justify-self: center; width: min(320px, 78vw); aspect-ratio: 1206 / 2622; border-radius: 46px; padding: 10px;
         background: #0E0D12; box-shadow: 0 30px 60px rgb(31 23 69 / .28), inset 0 0 0 2px #2A2833; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .hero .phone { margin-top: 12px; }
}

/* covers on an acrylic shelf (BookCover.swift) */
.shelf-head { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 26px; }
.numeral { font-size: clamp(72px, 10vw, 96px); font-weight: 300; line-height: .9; font-variant-numeric: tabular-nums; }
.shelf { position: relative; display: flex; gap: 22px; overflow-x: auto; padding: 6px 24px 34px; margin: 0 -24px;
         scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf-item { flex: 0 0 auto; width: 132px; scroll-snap-align: start; position: relative; }
.shelf-item .age { font-size: 13px; color: var(--muted); margin-top: 12px; }
.cover { position: relative; width: 100%; aspect-ratio: 2 / 3; container-type: inline-size; overflow: hidden;
         border-radius: 3px 6px 6px 3px; background: var(--jacket); box-shadow: var(--shadow); }
.cover b { position: absolute; left: 8%; top: 7%; width: 84%; color: var(--cover-ink); font-weight: 900;
           font-size: 15cqw; line-height: 1.12; letter-spacing: -.02em; }
.cover b.long { font-size: 12cqw; }
.cover .art { position: absolute; left: 7%; top: 27%; width: 86%; bottom: 8%; border-radius: 1cqw; overflow: hidden;
              box-shadow: 0 1cqw 2.5cqw rgb(0 0 0 / .18); }
.cover .art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.cover small { position: absolute; left: 8%; bottom: 2%; font-size: 5cqw; color: var(--cover-ink); opacity: .85; }
.cover::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3%; background: rgb(255 255 255 / .22);
                border-left: 1px solid rgb(0 0 0 / .12); }
/* the clear lip across the lower part of each cover */
.shelf-item .lip { position: absolute; left: -11px; right: -11px; top: calc(132px * 1.5 * .6); height: calc(132px * 1.5 * .4 + 14px);
                   background: color-mix(in srgb, var(--acrylic) 45%, transparent); backdrop-filter: blur(1.5px) saturate(1.1);
                   -webkit-backdrop-filter: blur(1.5px) saturate(1.1); border-top: 1px solid rgb(255 255 255 / .7); pointer-events: none; }
.shelf-item:first-child .lip { border-radius: 10px 0 0 10px; }
.shelf-item:last-child .lip { border-radius: 0 10px 10px 0; }

/* trays */
.tray { background: var(--paper); border-radius: 32px 32px 0 0; margin-top: 64px; padding: 64px 0 24px; }
.tray + .tray { border-radius: 0; margin-top: 0; padding-top: 24px; }
section { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted-paper); margin-top: 14px; }
.ground .section-head p { color: var(--muted); }

/* the reading demo */
.demo { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } .demo .phone { display: none; } }
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 5px; border-radius: 999px;
             background: var(--mist); margin: 0 0 6px; }
.segmented button { appearance: none; border: 0; background: none; color: var(--ink); font: 500 15px/1 var(--sans);
                    min-height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer; white-space: nowrap;
                    transition: background .3s, box-shadow .3s; }
.segmented button[aria-pressed="true"] { background: var(--thumb); box-shadow: 0 2px 8px rgb(31 23 69 / .12); }
.segmented button .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--violet);
                         margin-left: 6px; vertical-align: 2px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 22px; }
.controls .label { font-size: 13px; color: var(--muted-paper); width: 100%; margin-bottom: -6px; }
.transcript { display: grid; gap: 22px; min-height: 380px; }
.line .zh { font-size: 16px; line-height: 1.75; color: var(--muted-paper); }
.line .en { font-family: var(--serif); font-size: 22px; line-height: 1.4; margin-top: 4px; }
.line.now .en span { background: color-mix(in srgb, var(--acrylic) 38%, transparent); border-radius: 6px; padding: 2px 6px; margin-left: -6px;
                -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.line.later { opacity: .55; }
.line .zh[hidden] { display: none; }
.demo-note { font-size: 14px; color: var(--muted-paper); margin-top: 18px; }
.cefr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.cefr div { background: var(--mist); border-radius: 20px; padding: 16px 18px; }
.cefr b { display: block; font-weight: 500; }
.cefr span { font-size: 14px; color: var(--muted-paper); }
@media (max-width: 560px) { .cefr { grid-template-columns: 1fr; } }

/* features */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--mist); border-radius: 20px; padding: 22px 22px 24px; }
.card p { font-size: 15px; color: var(--muted-paper); }
.card .icon { width: 28px; height: 28px; margin-bottom: 14px; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips span { background: var(--mist); border-radius: 999px; padding: 6px 14px; font-size: 15px; }
.import { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .import { grid-template-columns: 1fr; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps li::before { counter-increment: step; content: counter(step); font-size: 28px; font-weight: 300; line-height: 1.2;
                    font-variant-numeric: tabular-nums; color: var(--violet); }
.steps p { font-size: 15px; color: var(--muted-paper); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--hairline); border-radius: 20px; padding: 24px; background: var(--paper); }
.plan.featured { border: 2px solid var(--ink); }
.plan .price { font-size: 40px; font-weight: 300; line-height: 1.2; margin: 14px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 16px; color: var(--muted-paper); }
.plan .alt { font-size: 14px; color: var(--muted-paper); }
.plan ul { padding-left: 1.2em; margin: 16px 0 0; font-size: 15px; }
.plan li + li { margin-top: 6px; }
.fine { font-size: 13px; color: var(--muted-paper); margin-top: 18px; }

/* FAQ */
details { border-bottom: 1px solid var(--hairline); padding: 18px 0; }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 300; font-size: 24px; line-height: 1; color: var(--muted-paper); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted-paper); margin-top: 10px; font-size: 15px; }

/* footer */
footer { padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 12px; }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .segmented button { transition: none; } }
