/* Bookmuse — shared by every page on bookmuse.wanngo.com: tokens, fonts, nav, buttons, footer, the dark card.
   The look is docs/design-system.md ("On the web") in the Bookmuse repo: cream, charcoal, one coral; flat; no gradients, grain or glow.
   The home page adds landing.css; privacy, support, delete-account and 404 add styles.css. */

/* Bookmuse web tokens: the cream, charcoal, coral look (docs/design-system.md, "On the web"). The values are design/tokens.json's.
   Every web surface (the landing in ../wanngo_web, the dashboard, the pages the backend renders) pastes this block at the top of its
   own CSS and adds nothing else to the palette. Light and dark follow the system until the theme switch sets data-theme. */
:root {
  color-scheme: light dark;
  --bg: #F4E9DC; --surface: #FBF5EC; --card: #494949; --ink: #494949; --ink-2: #68625A;
  --on-card: #F4E9DC; --on-card-2: #C9C0B5;
  --line: rgba(73, 73, 73, .22); --track: rgba(73, 73, 73, .10);
  --coral: #E85E56; --coral-text: #B43A33; --coral-on-card: #FFA59E; --on-coral: #1F1E1D;
  --big-number: rgba(73, 73, 73, .22);
  --r-card: 22px; --r-surface: 16px; --r-chip: 14px; --r-cover: 6px;
  --font: "Avenir Next", "Be Vietnam Pro", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1F1E1D; --surface: #272625; --card: #3D3A38; --ink: #F4E9DC; --ink-2: #A9A29A;
    --line: rgba(244, 233, 220, .20); --track: rgba(244, 233, 220, .10);
    --coral-text: #FF8F86; --big-number: rgba(244, 233, 220, .18);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1F1E1D; --surface: #272625; --card: #3D3A38; --ink: #F4E9DC; --ink-2: #A9A29A;
  --line: rgba(244, 233, 220, .20); --track: rgba(244, 233, 220, .10);
  --coral-text: #FF8F86; --big-number: rgba(244, 233, 220, .18);
}

/* Be Vietnam Pro is the fallback where Avenir Next is not installed (Windows, Android, Linux); it has Vietnamese. */
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/be-vietnam-pro-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--coral-text); }
a:hover { color: var(--ink); }
img, video { display: block; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; color: var(--bg); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left)); }
h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
/* The label: a small coral line above a block. */
.label { font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--coral-text); }

/* The dark card: the one thing to act on. Inside it the tokens answer with their on-card values, so the same parts work on it. */
.dk { --bg: var(--card); --ink: var(--on-card); --ink-2: var(--on-card-2); --line: color-mix(in srgb, var(--on-card) 50%, transparent); --coral-text: var(--coral-on-card); background: var(--card); color: var(--on-card); border-radius: var(--r-card); }

/* Pattern discs and rings: the tile is a mask, the colour is the ink (cream on a dark card); in dark mode the disc dims to half. */
.disc { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--ink); -webkit-mask: var(--pat) 0 0 / var(--tile, 8px) var(--tile, 8px) repeat; mask: var(--pat) 0 0 / var(--tile, 8px) var(--tile, 8px) repeat; }
:root[data-theme="dark"] .disc { opacity: .5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .disc { opacity: .5; } }
.ring { display: block; aspect-ratio: 1; border-radius: 50%; border: 1.3px solid var(--coral); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.short { display: flex; align-items: center; gap: 12px; }
.short a, .signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.short a:hover, .signin:hover { color: var(--ink); }
.short a[aria-current] { color: var(--ink); font-weight: 600; }

/* Buttons: primary is a solid ink capsule with page-coloured text; secondary a capsule with a hairline edge. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 99px; font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap; background: var(--ink); color: var(--bg); transition: transform 0.3s var(--ease); }
.btn:hover { color: var(--bg); transform: scale(1.03); }
.btn.line, .nav .btn { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.line:hover, .nav .btn:hover { color: var(--ink); }

/* Light and dark */
.theme { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 -6px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; transition: color 0.2s; }
.theme:hover { color: var(--ink); }
.theme svg { width: 22px; height: 22px; }
.theme .moon { display: none; }
:root[data-mode="light"] .theme .moon { display: block; }
:root[data-mode="light"] .theme .sun-i { display: none; }
html:not(.js) .theme { display: none; }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 24px; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--ink-2); }
.foot-in .brand { font-size: 15px; min-height: 44px; }
.foot-in .brand img { width: 24px; height: 24px; border-radius: 6px; }
.foot-in nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot-in nav a, .foot-in .by { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.foot-in nav a:hover, .foot-in .by:hover { color: var(--ink); }
.foot-in nav a[aria-current] { color: var(--ink); font-weight: 600; }

@media (max-width: 960px) {
  .nav { position: static; }
  html { scroll-padding-top: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-in { gap: 6px; }
  .btn { padding: 0 16px; }
  .nav .btn { padding: 0 14px; font-size: 14px; }
  .signin { padding: 0 4px; font-size: 13px; }
}
/* Phones: the nav keeps Summaries; Your library (the dashboard, for people who already have an account) waits for a wider screen. */
@media (max-width: 440px) {
  .nav .signin[href^="https://bookmuse-app"] { display: none; }
}

@media (max-width: 350px) {
  .brand { font-size: 15px; gap: 8px; }
  .nav .btn { padding: 0 12px; font-size: 14px; }
}

/* Reduce Motion: nothing animates, nothing eases. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
