/* FlipbookWow skin over the shared back-of-house styles (app.css).
   Same layout and components as every product in the family; FlipbookWow's colors, fonts and buttons.
   Violet #6c47ff, pink #ff3d7f (main buttons), yellow #ffc53d (upgrade moments), ink #1d1433, ground #f6f3ff. */

:root {
  --ink: #1d1433;
  --ink-2: #3d3358;
  --ink-3: #6b6185;
  --mist: #f6f3ff;
  --line: #e4ddf3;
  --line-2: #efeaf9;
  --paper: #ffffff;
  --signal: #ffc53d;
  --ok: #0f8a6e;
  --pink: #ff3d7f;
  --pink-press: #c81e5a;
  --violet: #6c47ff;
  --display: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  --text: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 12px;
  --r-lg: 20px;
}
h1, h2, h3 { font-weight: 700; letter-spacing: 0; }

/* Main buttons: the site's pink with its pressed edge. */
.btn { font-weight: 700; border-radius: 12px; }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 3px 0 var(--pink-press); }
.btn-primary:hover { background: #ff2a72; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--pink-press); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost:hover { border-color: var(--violet); }

/* Sidebar in deep violet ink. */
.side { background: #1d1433; color: #d6cdf0; }
.side .brand { color: #fff; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; }
.brand b { color: var(--pink); font-weight: 700; }
.nav-item { color: #d6cdf0; }
.nav-item:hover { background: #2a2050; color: #fff; }
.nav-item.active { background: #35296a; color: #fff; }
.nav-item.active .nav-ico { color: var(--signal); }
.side-foot { border-top-color: #352a52; }

/* Upgrade moments stay loud, in FlipbookWow yellow. */
.power-hero { background: radial-gradient(120% 140% at 50% -20%, #4a2fc0 0%, #2a1a66 55%, #1d1433 100%); }
.power-hero p { color: #d6cdf0; }
.power-hero::after { background: radial-gradient(closest-side, rgba(255, 197, 61, .3), transparent 70%); }
.power-hero-bolt { background: radial-gradient(circle at 35% 30%, #ffe29a, var(--signal)); color: #1d1433; }
.btn-power, .power-up-loud { background: linear-gradient(180deg, #ffe08a, var(--signal)); border-color: #e0a81e; color: #1d1433; }
.tier-hot { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(255, 197, 61, .18), 0 18px 40px -18px rgba(108, 71, 255, .45); }
.nav-power { color: #ffd666 !important; }
.nav-power .nav-ico { color: var(--signal); }

/* Period switch on the upgrade and billing pages. */
.period-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; }
.period-switch button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 700 14px var(--text); cursor: pointer; }
.period-switch button[aria-pressed="true"] { background: var(--violet); color: #fff; }
.period-switch button[aria-pressed="true"] .pill { background: #fff; }
.ok-mark { color: var(--ok); font-weight: 800; }
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } .tier-hot { transform: none; } }

/* Sign-in pages on the site's soft violet ground. */
.auth-wrap { background: var(--mist); }
.auth-card { border-radius: 22px; box-shadow: 0 18px 50px -30px rgba(29, 20, 51, .35); }
.auth-card h1 { font-size: 28px; }
.auth-product { background: #ece6ff; color: #4a2fc0; }

/* Notices in brand tints. */
.notice { background: #fff6dc; border-color: #ffe08a; color: #6b4a00; }
.note-upgrade { background: #ece6ff; border: 1px solid #d7ccff; color: #2a1a66; padding: 12px 16px; border-radius: var(--r); margin-bottom: 20px; font-size: 14px; }
.pill-accent { background: #ece6ff; color: #4a2fc0; }

/* Stats: web addresses and link targets keep their own case; device names are capitalized where they are made. */
.bd-label { text-transform: none; }
.bd-label::first-letter { text-transform: uppercase; }
.breakdown-raw .bd-label::first-letter { text-transform: none; }

/* Numbers with their names. The list page and the per-flipbook page use four tiles; on a phone they sit two by two. */
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 14px 14px; }
  .stat-value { font-size: 24px; }
  /* Tables stack into cards on a phone; every value keeps its column name. */
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
  .table td.fbw-link[data-label]::before { display: block; margin-bottom: 4px; }
  .table tr { padding: 12px 4px; }
  .table td.fbw-title { padding-bottom: 6px; }
  /* The delete button sits in the card's top corner instead of on a line of its own. */
  .fbw-books tr { position: relative; }
  .fbw-books td.fbw-title { padding-right: 44px; }
  .fbw-books td.row-del-cell { position: absolute; top: 10px; right: 0; width: auto; padding: 0; }
  /* Pages, views and updated share one line under the link. */
  .fbw-books td.num, .fbw-books td[data-label="Updated"] { display: inline-block; width: auto; padding-right: 16px; text-align: left; }
  /* Compare plans: the feature name, then Free / Pro / Business in a row. */
  .compare td.compare-feature { font-weight: 600; white-space: normal; padding-bottom: 2px; }
  .compare td[data-label] { display: inline-block; width: auto; padding-right: 18px; }
}

/* The flipbook list: quiet links under each title, the share link in its own column. */
.fbw-books td.fbw-link { min-width: 260px; }
.fbw-row-links { display: flex; gap: 12px; margin-top: 4px; font-size: 12.5px; }
.fbw-row-links a { color: var(--ink-3); text-decoration: none; }
.fbw-row-links a:hover { color: var(--violet); text-decoration: underline; }
.fbw-cover-preview { display: block; max-width: 260px; width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--mist); }

/* Breadcrumbs: a long flipbook title trims with an ellipsis instead of running past the edge. */
.crumbs > a, .crumbs > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs > .sep { flex: none; }
.crumbs > .crumb-product { flex: none; }

/* Grid cells may shrink below their content's natural width, so a long link or a row of inputs never pushes the page past a phone's edge. */
.grid-2 > *, .grid-3 > * { min-width: 0; }
