/* The site's own small pages: the account (site/account/), the terms (site/terms/) and the privacy notice (site/privacy/). The landing
   page's night, paper and type, without its scene (build_site.py copies this file to site/acct/page.css). */
@font-face { font-family: 'Fredoka'; src: url('/fonts/Fredoka.ttf') format('truetype'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Hand'; src: url('/fonts/ShantellSans-hand.woff') format('woff'); font-weight: 400 700; font-display: swap; }
:root {
  --sky0: #10152b; --sky1: #192042; --sky2: #26305a; --ink: #2b2f4a; --paper: #f8f1df; --cream: #f6efdc; --text: #e9e6ef; --soft: #bcc1d8; --dim: #8e95b3;
  --wood: #7b5d48; --wood2: #5d4536; --wood3: #9a7a60; --gut: max(16px, calc((100vw - 1180px) / 2));
  --font: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Hand', 'Fredoka', ui-rounded, system-ui, sans-serif; --ease: cubic-bezier(.45, .05, .25, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--sky0); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, #fdf6e3 50%, transparent 51%), radial-gradient(1px 1px at 72% 9%, #e3ebff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 86% 31%, #ffdfb5 50%, transparent 51%), radial-gradient(1px 1px at 33% 42%, #f4f3ee 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 55% 24%, #fdf6e3 50%, transparent 51%), radial-gradient(1px 1px at 6% 63%, #e3ebff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 93% 72%, #fdf6e3 50%, transparent 51%), radial-gradient(1px 1px at 46% 81%, #ffdfb5 50%, transparent 51%),
    linear-gradient(180deg, var(--sky0) 0, var(--sky1) 45%, #1d2650 100%);
  background-size: 420px 380px, 520px 460px, 610px 520px, 380px 410px, 470px 430px, 560px 500px, 640px 560px, 500px 450px, 100% 100%;
  background-attachment: fixed; }
a { color: inherit; }
.hand { font-family: var(--hand); font-weight: 500; }

.pg-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 var(--gut); }
.pg-home { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--cream); text-decoration: none; font: 600 21px/1 var(--font); }
.pg-home svg { width: 30px; height: 30px; }
.pg-home:hover span, .pg-home:focus-visible span { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.pg-me .ss-me { position: relative; }
.pg-me .ss-menu { right: 0; left: auto; }
.pg-main { flex: 1; width: 100%; max-width: calc(1180px + 32px); margin: 0 auto; padding: clamp(26px, 5vw, 48px) 16px clamp(48px, 7vw, 80px); }
.pg-foot { padding: 22px 16px 30px; text-align: center; color: var(--soft); font-size: 14.5px; line-height: 1.6; background: #151e2f; }
.pg-foot p { margin: 0; } .pg-foot b { color: var(--cream); font-weight: 600; } .pg-foot a { color: var(--soft); text-decoration: none; }
.pg-foot a:hover, .pg-foot a:focus-visible { color: var(--cream); } .pg-foot .bar { opacity: .5; margin: 0 4px; }

/* paper cards, as the landing page's notes */
.card { color-scheme: light; position: relative; padding: clamp(24px, 3vw, 34px) clamp(20px, 3vw, 34px) clamp(22px, 2.6vw, 30px); border-radius: 4px; color: var(--ink);
  background: var(--paper) repeating-linear-gradient(180deg, transparent 0 31px, rgba(160, 140, 110, .15) 31px 32px);
  box-shadow: 0 24px 50px rgba(4, 7, 18, .5), 0 4px 12px rgba(4, 7, 18, .3); }
.card::before { content: ''; position: absolute; top: -11px; left: 12%; width: 84px; height: 24px; background: rgba(236, 222, 186, .8); transform: rotate(-4deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12); }
.card h1, .card h2 { margin: 0 0 12px; font: 600 clamp(24px, 2.6vw, 30px)/1.15 var(--hand); color: var(--ink); }
.card h2 .hand { display: block; margin-top: 3px; font-size: 16px; font-weight: 500; color: #a2672a; }
.card p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; }

/* the account */
.acct-wait { color: var(--soft); text-align: center; padding: 60px 0; }
.acct-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 26px); margin-bottom: clamp(22px, 3vw, 34px); }
.acct-head h1 { margin: 0; font: 600 clamp(34px, 5vw, 52px)/1.05 var(--hand); color: var(--cream); }
.acct-head p { margin: 6px 0 0; color: var(--soft); font-size: 16.5px; }
.acct-tabs { position: relative; display: inline-flex; gap: 4px; padding: 4px; margin-bottom: clamp(26px, 3.4vw, 40px); border-radius: 99px; background: rgba(10, 14, 32, .55);
  box-shadow: inset 0 0 0 1px rgba(188, 193, 216, .22); }
.acct-tabs button { padding: 10px 20px 11px; border: 0; border-radius: 99px; background: transparent; color: var(--soft); font: 600 16px/1 var(--font); cursor: pointer; }
.acct-tabs button[aria-selected="true"] { background: var(--cream); color: var(--ink); }
.acct-tabs button:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 2px; }

.acct-row { margin-bottom: clamp(30px, 4vw, 46px); }
.acct-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 4px; }
.acct-row-head h2 { margin: 0; font: 600 clamp(26px, 3vw, 34px)/1.1 var(--hand); color: var(--cream); }
.acct-row-head .hand { color: #d9c48f; font-size: 18px; transform: rotate(-2deg); }
.acct-row-head i { font-style: normal; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: rgba(246, 239, 220, .14); color: var(--soft); }
/* a shelf: one wooden plank across the page; its books stand on it in a row that slides sideways when it is full */
.acct-box { --cw: 150px; --top: 24px; position: relative; margin: 0 -16px; }
.acct-box::before { content: ''; position: absolute; z-index: 0; left: 16px; right: 16px; top: calc(var(--top) + var(--cw) - 1px); height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, var(--wood3), var(--wood) 40%, var(--wood2)); box-shadow: 0 9px 16px rgba(4, 7, 18, .5); }
.acct-box.none { --cw: 46px; }
.acct-none { position: relative; margin: 0; padding: var(--top) 30px 34px; color: var(--dim); font: 500 17px/1 var(--hand); }
.acct-ledge { position: relative; z-index: 1; display: flex; gap: 22px; margin: 0; padding: var(--top) 30px 14px; list-style: none; overflow-x: auto;
  overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding: 0 30px; scrollbar-width: thin; scrollbar-color: rgba(188, 193, 216, .3) transparent; }
.ab { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; width: calc(var(--cw) + 10px); scroll-snap-align: start; }
.ab-cover { position: relative; z-index: 2; display: block; width: var(--cw); aspect-ratio: 1; transform: rotate(var(--tilt)); transform-origin: 50% 100%;
  transition: transform .3s var(--ease); }
.ab-cover img, .ab-blank { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px 4px 4px 2px; background: #1d2547;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, .08), 0 10px 16px -6px rgba(4, 4, 12, .6); }
.ab-blank { display: grid; place-items: center; padding: 12px; text-align: center; color: var(--cream); font-weight: 600; }
.ab-cover:hover, .ab-cover:focus-visible { transform: translateY(-8px) rotate(var(--tilt)); }
.ab-cover:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 4px; }
.ab-lab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; max-width: 100%; min-height: 4.1em;
  margin-top: 15px; padding: 6px 10px 7px; border-radius: 0 0 9px 9px; background: var(--paper); color: var(--ink); text-align: center;
  box-shadow: 0 4px 10px rgba(4, 7, 18, .35); }
.ab-lab b { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--a) 55%, var(--ink)); }
.ab-lab span { font-size: 14.5px; font-weight: 500; line-height: 1.18; text-wrap: balance; }
.ab-st { margin-top: auto; padding-top: 10px; }
.ab-st select { appearance: none; padding: 7px 30px 8px 13px; border: 0; border-radius: 99px; color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer;
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.6l3 3 3-3' fill='none' stroke='%232b2f4a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 12px; }
.ab-st select:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 2px; }
.ab-off { position: absolute; z-index: 3; top: -11px; right: -6px; display: grid; place-items: center; width: 32px; height: 32px;
  padding: 0; border: 0; border-radius: 50%; background: #fffaf0; color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 rgba(150, 120, 80, .45), 0 6px 14px rgba(4, 7, 18, .45);
  transition: transform .2s; }
.ab-off svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ab-off:hover, .ab-off:focus-visible { transform: scale(1.12); background: #f6d3c8; }
.ab-off:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 2px; }
.acct-more { margin: 0; text-align: center; }
.acct-more a { color: var(--cream); font-weight: 600; text-decoration: none; border-bottom: 2px dotted rgba(246, 239, 220, .5); }
.acct-empty, .acct-out { max-width: 620px; margin: 10px auto 0; text-align: center; }
.acct-empty .ss-btn, .acct-out .ss-btn { display: inline-block; width: auto; margin-top: 6px; padding: 14px 28px 15px; text-decoration: none; }
.acct-out { padding-top: 38px; }
.acct-out-b { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: -6px 0 18px; }
.acct-out-b .ss-badge:nth-child(2) { transform: translateY(-34px) rotate(-12deg); } .acct-out-b .ss-badge:nth-child(3) { transform: rotate(10deg); }
.acct-out .ss-note { margin-top: 12px; }
@media (max-width: 699.98px) {
  .acct-box { --cw: 118px; } .acct-box.none { --cw: 40px; }
  .acct-ledge { gap: 16px; padding-left: 22px; padding-right: 22px; scroll-padding: 0 22px; } .acct-none { padding-left: 22px; }
  .ab-lab span { font-size: 13.5px; }
  .ab-st select { font-size: 13px; padding: 6px 26px 7px 11px; background-position: right 8px center; }
}

.acct-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(30px, 4vw, 46px) clamp(22px, 3vw, 36px); align-items: start; }
.acct-cards .card:nth-child(odd) { transform: rotate(-.5deg); } .acct-cards .card:nth-child(even) { transform: rotate(.4deg); }
.acct-cards .card.danger { grid-column: 1 / -1; max-width: 640px; justify-self: center; width: 100%; background-color: #f7e9df; }
.card.danger .ss-code { width: 100%; max-width: 400px; justify-self: center; }

/* the checkout page (checkout.html): Paddle's own form opens over it */
.pay { max-width: 620px; margin: 10px auto 0; text-align: center; }
.pay-btns { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; margin: 18px 0 8px; }
.pay-btns .ss-btn { width: auto; padding: 13px 26px 14px; } .pay-back { font-weight: 600; }
.pay-note { margin: 20px 0 0; font-size: 14.5px; color: #776c62; }

/* the books: the whole-library offer, every book owned (read, PDF) or to buy, and the reader */
.acct-lib { display: grid; gap: clamp(26px, 3.4vw, 40px); }
.acct-offer { max-width: 640px; justify-self: center; width: 100%; box-sizing: border-box; transform: rotate(-.4deg); }
.acct-offer h2 { margin: 0 0 6px; } .acct-offer p { margin: 0 0 16px; } .acct-offer .acct-offer-note { margin: 14px 0 0; font-size: 14.5px; color: #776c62; } .acct-offer.mine p { margin: 0; text-align: center; font-weight: 600; }
.lib-grid { --cw: 150px; --tilt: 0deg; display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--cw) + 24px), 1fr)); gap: 30px 18px;
  margin: 18px 0 0; padding: 0; list-style: none; }
.lib-b { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; }
.lib-b .ab-lab { width: calc(var(--cw) + 10px); box-sizing: border-box; }
.lib-tag { position: absolute; z-index: 3; top: -9px; left: calc(50% - var(--cw) / 2 - 8px); padding: 4px 10px 5px; border-radius: 99px; background: #e2725b;
  color: #fffaf0; font: 600 12.5px/1 var(--font); font-style: normal; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 3px 8px rgba(4, 7, 18, .4); }
.lib-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: auto; padding-top: 10px; }
.lib-btn { display: inline-flex; align-items: baseline; gap: 4px; padding: 7px 13px 8px; border: 0; border-radius: 99px; background: var(--cream); color: var(--ink);
  font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.lib-btn:hover, .lib-btn:focus-visible { transform: translateY(-1px); } .lib-btn:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 2px; }
.lib-btn.buy { background: #e2725b; color: #fffaf0; } .lib-btn:disabled { opacity: .7; cursor: default; transform: none; }
.lib-btn.off { background: rgba(246, 239, 220, .16); color: var(--soft); box-shadow: none; cursor: default; transform: none; }
.lib-btn.off small { font-size: 11.5px; font-weight: 500; opacity: .85; }
.acct-orders { margin: 0 0 12px; padding: 0; list-style: none; }
.acct-orders li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 2px dotted #d6c7a5; }
.acct-orders li span { display: grid; } .acct-orders small { color: #776c62; font-size: 13.5px; }
.acct-orders i { flex: none; font-style: normal; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: #3d7a57; color: var(--paper); }
.acct-orders i.st-refunded, .acct-orders i.st-partly-refunded { background: #8e8496; }
.rd { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 11, 26, .96); color: var(--text); }
.rd::backdrop { background: rgba(8, 11, 26, .8); }
.rd-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  height: 100%; box-sizing: border-box; padding: 44px 12px 14px; }
.rd-pic { grid-column: 2; width: 100%; height: 100%; object-fit: contain; border-radius: 3px; }
.rd-n { grid-column: 1 / -1; margin: 0; text-align: center; color: var(--soft); font-size: 15px; }
.rd-go, .rd-x { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(246, 239, 220, .12); color: var(--cream);
  font: 500 30px/1 var(--font); cursor: pointer; }
.rd-go:disabled { opacity: .25; cursor: default; } .rd-go:focus-visible, .rd-x:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 2px; }
.rd-x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; font-size: 26px; }
@media (max-width: 699.98px) {
  .lib-grid { --cw: 118px; gap: 26px 10px; }
  .rd-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; padding: 52px 8px 12px; }
  .rd-pic { grid-column: 1 / -1; grid-row: 1; } .rd-go { grid-row: 2; justify-self: center; } .rd-n { grid-row: 3; }
}
@media (max-width: 799.98px) { .acct-cards { grid-template-columns: minmax(0, 1fr); } }
.acct-mail { word-break: break-all; }
.acct-small { font-size: 14px !important; color: #776c62; }
.acct-dev { margin: 0 0 12px; padding: 0; list-style: none; }
.acct-dev li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 2px dotted #d6c7a5; }
.acct-dev li span { display: grid; } .acct-dev small { color: #776c62; font-size: 13.5px; }
.acct-dev i { font-style: normal; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: #2b2f4a; color: var(--paper); }
.acct-plain { padding: 6px 2px; border: 0; background: none; color: #a8452f; font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: underline;
  text-decoration-style: dotted; text-underline-offset: 3px; }
.acct-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.acct-links a:not(.acct-plain) { color: #5d5670; font-size: 15px; }
.ss-btn.acct-quiet { background: var(--ink); box-shadow: 0 3px 0 #15182a, 0 8px 16px rgba(20, 20, 40, .25); }
.ss-btn.acct-danger { background: #b3513d; box-shadow: 0 3px 0 #7d3426, 0 8px 16px rgba(120, 50, 30, .25); }

/* the terms and the privacy notice */
.doc { max-width: 780px; margin: 0 auto; }
.doc h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 4px; }
.doc .doc-date { color: #776c62; font-size: 14.5px; margin-bottom: 22px; }
.doc h2 { font-size: clamp(21px, 2.2vw, 25px); margin: 26px 0 8px; }
.doc ul { margin: 0 0 12px; padding-left: 22px; } .doc li { margin: 0 0 6px; line-height: 1.5; }
.doc a { color: #a8452f; }
