/* The pages for what people search for (/calibre-web-app, /faq…): the home page's colours, set for reading. */
:root {
  color-scheme: dark;
  --ink: #0b0d12; --ink-2: #12151d; --ink-3: #1a1e29; --line: rgba(255,255,255,.1);
  --text: #eef0f5; --muted: #a3a9b8; --dim: #737a8c; --amber: #ff9f0a; --sky: #64d2ff;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--text); font: 17px/1.65 var(--sans); overflow-x: hidden; }
a { color: var(--sky); }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(860px, 100% - 32px); margin: 0 auto; }

/* The bar at the top: the name, the languages, the App Store. */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(11,13,18,.86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 14px; height: 56px; width: min(1180px, 100% - 32px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
header.top details.lang { margin-inline-start: auto; }
details.lang { position: relative; font-size: 14px; color: var(--muted); }
details.lang summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; padding: 6px 2px; white-space: nowrap; }
details.lang summary::-webkit-details-marker { display: none; }
details.lang summary:hover, details.lang[open] summary { color: var(--text); }
details.lang svg { width: 16px; height: 16px; }
details.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); margin: 0; padding: 6px; list-style: none; min-width: 200px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
details.lang a { display: block; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--text); }
details.lang a:hover { background: var(--ink-3); }
details.lang a[aria-current] { color: var(--amber); }
@media (max-width: 430px) { details.lang summary span { display: none; } }

.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 12px 22px; font-weight: 650; font-size: 15px; line-height: 1.2; text-decoration: none; border: 0; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.store { background: #fff; color: #000; }
.btn.store small { display: block; font-size: 10px; font-weight: 500; opacity: .7; line-height: 1; }
.btn.store b { display: block; font-size: 17px; line-height: 1.1; color: inherit; }
.btn.ghost { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 13px; white-space: nowrap; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }

/* The page itself. */
main { padding: 26px 0 40px; }
.crumbs { font-size: 14px; color: var(--dim); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.eyebrow { font: 600 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-top: 26px; }
[lang="ja"] .eyebrow, [lang="zh-Hans"] .eyebrow, [lang="ko"] .eyebrow, [lang="ar"] .eyebrow { letter-spacing: .04em; }
h1 { font-size: clamp(32px, 6vw, 50px); line-height: 1.08; letter-spacing: -.025em; margin: 10px 0 14px; }
h2 { font-size: clamp(23px, 3.4vw, 29px); line-height: 1.2; letter-spacing: -.015em; margin: 46px 0 10px; }
h3 { font-size: 19px; line-height: 1.3; margin: 26px 0 6px; }
p, li, dd { color: #d4d8e2; }
.lede { font-size: 19px; color: var(--muted); max-width: 720px; }
b, strong { color: var(--text); font-weight: 650; }
code { font: 14.5px var(--mono); background: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0; }
ol.steps > li { counter-increment: step; position: relative; padding-inline-start: 44px; margin: 14px 0; }
ol.steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 650 14px/1 var(--sans); color: #000; background: var(--amber); }
ul { padding-inline-start: 1.3em; }
li { margin: 7px 0; }
dl dt { font-weight: 650; margin-top: 16px; }
dl dd { margin: 4px 0 0; }
figure.shot { margin: 30px 0 10px; }
figure.shot img { border-radius: 18px; border: 1px solid var(--line); }
figure.shot.tall img { width: 320px; margin: 0 auto; }
figure.shot figcaption { font-size: 14px; color: var(--dim); margin-top: 10px; text-align: center; }
.box { background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; padding: 6px 22px; margin: 22px 0; }
.box.tip { border-color: rgba(100,210,255,.3); }
.box p { margin: 14px 0; }
.table { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; margin: 14px 0; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td:first-child { font-weight: 600; color: var(--text); }
.guide-link { display: flex; gap: 14px; align-items: flex-start; background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; margin: 26px 0; }
.guide-link svg { width: 26px; height: 26px; color: var(--amber); flex: none; margin-top: 2px; }
.guide-link p { margin: 0; }

/* The questions page. */
.qa { border-top: 1px solid var(--line); padding-top: 2px; }
.qa h2.q { font-size: 21px; margin: 26px 0 6px; }
.qa .a p { margin: 8px 0; }

/* At the foot of every page: the app, the other pages, the languages. */
.get { margin: 50px 0 10px; padding: 34px 24px; text-align: center; border: 1px solid var(--line); border-radius: 26px; background: radial-gradient(500px 240px at 50% 0%, rgba(255,159,10,.14), transparent 70%), var(--ink-2); }
.get h2 { margin: 0 0 8px; }
.get p { color: var(--muted); margin: 0 auto; max-width: 560px; }
.get .cta { justify-content: center; }
.get .req { font: 13px var(--mono); color: var(--dim); margin-top: 16px; }
nav.related { margin: 40px 0 0; }
nav.related h2 { font-size: 18px; margin: 0 0 10px; color: var(--muted); }
nav.related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
nav.related li { margin: 0; }
nav.related a { display: block; height: 100%; padding: 14px 16px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
nav.related a:hover { border-color: rgba(255,159,10,.5); }
nav.related a[aria-current] { color: var(--amber); }
footer { margin-top: 40px; padding: 30px 0 50px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
footer .wrap { width: min(1180px, 100% - 32px); display: flex; flex-direction: column; gap: 14px; }
footer a { color: var(--muted); }
footer nav.languages { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer nav.languages a { text-decoration: none; }
footer nav.languages a:hover, footer nav.languages a[aria-current] { color: var(--text); }
[dir="rtl"] .btn.store b, [dir="rtl"] .btn.store small { text-align: right; }
  .small { font-size: 14px; color: var(--dim); }
@media (max-width: 359px) { header.top .btn.store.small { display: none; } }
