/* Wasabink — one stylesheet, two skins.
 *
 * The reader side (Discover, Browse, Series) is warm-neutral dark: cover art owns all the colour,
 * orange is for the one thing to do on a page. The creator side (Publish, Dashboard) wears
 * Studio's own blues so the tool sells itself. Same wordmark, same display face, same accent.
 * `html[data-skin]` picks the palette; everything below reads tokens, never hex. */

:root {
  --bg: #171412;
  --bg-2: #1c1916;
  --surface: #201c18;
  --surface-2: #1b1815;
  --line: #221e1a;
  --line-2: #2b2621;
  --line-3: #35302a;
  --ink: #f6f2ed;
  --ink-2: #a89f95;
  --ink-3: #766e66;
  --ink-4: #574f48;
  --accent: #f08a32;
  --accent-hover: #ffa55c;
  --on-accent: #1a1206;
  --ok: #10b981;
  --radius: 10px;
  --radius-s: 8px;
  --gutter: 16px;
  --header: 48px;
  --tabbar: 72px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --disp: "Bricolage Grotesque", var(--font);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

html[data-skin="studio"] {
  --bg: #07111d;
  --bg-2: #0b1623;
  --surface: #0d1a2a;
  --surface-2: #142437;
  --raised: #20364e;
  --line: #1b2e43;
  --line-2: #1b2e43;
  --line-3: #36516d;
  --ink: #eaf0f7;
  --ink-2: #9cb0c7;
  --ink-3: #667a94;
  --ink-4: #4f6179;
  --on-accent: #ffffff;
  --blue: #6e96d9;
  --canvas: #4b5563;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
svg { display: block; }
.disp { font-family: var(--disp); letter-spacing: -0.02em; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap { padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1080px) { :root { --gutter: 48px; } }

/* ---------- header (desktop) + tab bar (mobile) ---------- */

.hdr {
  height: var(--header);
  display: flex; align-items: center; gap: 14px;
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
}
.hdr .brand { display: flex; align-items: center; font-family: var(--disp); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.hdr .brand span { color: var(--ink-3); }
.hdr .brand .mark { width: 26px; height: 26px; margin-right: 9px; border-radius: 6px; }
.hdr .nav { display: none; }
.hdr .grow { flex: 1; }
.hdr .ico { color: var(--ink-2); width: 44px; height: 44px; margin-right: -12px; display: flex; align-items: center; justify-content: center; }
.hdr .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-3); }
.hdr .search { display: none; }
.hdr .cta { display: none; }
.navl { font-size: 13.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.hdr .who { display: none; color: var(--ink); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.navl[aria-current="page"] { color: var(--ink); font-weight: 600; }

@media (min-width: 720px) {
  :root { --header: 66px; --tabbar: 0px; }
  .hdr { gap: 36px; border-bottom-color: var(--line); }
  .hdr .brand { font-size: 20px; }
  .hdr .brand .mark { width: 28px; height: 28px; margin-right: 10px; }
  .hdr .nav { display: flex; align-items: center; gap: 24px; }
  .hdr .who { display: inline; }
  .hdr .ico { display: none; }
  .hdr .search {
    display: flex; align-items: center; gap: 9px;
    width: 268px; height: 38px; padding: 0 12px;
    border-radius: var(--radius-s); background: var(--bg-2); border: 1px solid var(--line-2);
    color: var(--ink-3);
  }
  .hdr .search input {
    flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 13px var(--font); outline: none;
  }
  .hdr .search input::placeholder { color: var(--ink-3); }
  .hdr .cta { display: inline-flex; }
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: var(--tabbar);
  background: rgba(23, 20, 18, 0.94); backdrop-filter: blur(14px);
  border-top: 1px solid #26221e;
  display: flex; align-items: flex-start; padding-top: 9px;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--ink-3); font-size: 10px; font-weight: 500;
}
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabbar a:hover { color: var(--ink); }
@media (min-width: 720px) { .tabbar { display: none; } }

main { padding-bottom: calc(var(--tabbar) + 24px); }

/* ---------- footer: the language switch ---------- */

.foot {
  display: flex; align-items: center; gap: 14px;
  padding: 18px var(--gutter) calc(var(--tabbar) + 18px);
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3);
}
.foot .grow { flex: 1; }
.foot .lang { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.foot .lang label { display: flex; align-items: center; }
.foot .lang select {
  appearance: none; -webkit-appearance: none;
  padding: 6px 26px 6px 10px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--ink); font: 12.5px var(--font); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 9px) 55%; background-size: 4px 4px; background-repeat: no-repeat;
}
.foot .lang select:hover { border-color: var(--line-3); }
main + .foot { margin-top: 20px; }
a.u { color: var(--ink-2); text-decoration: underline; }

/* ---------- buttons, chips, pills ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-3); font-weight: 600; }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-s { height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: var(--radius-s); }
.btn-block { width: 100%; }
button.btn { font-family: inherit; cursor: pointer; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line-2); background: var(--bg-2); white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: var(--line-3); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.chip b { color: var(--ink); font-weight: 600; }
.chip-row { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
/* The four shelves where the header has no room for them: a chip row under it, phones only. */
.shelves { padding: 12px var(--gutter) 0; }
@media (min-width: 720px) { .shelves { display: none; } }
.tag { padding: 5px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-2); }
a.tag { color: var(--ink); border-color: var(--line-3); } a.tag:hover { border-color: var(--accent); }

.badge-ep { padding: 3px 7px; border-radius: 5px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; }

/* ---------- covers ---------- */

.cov {
  position: relative; overflow: hidden; border-radius: 8px;
  aspect-ratio: 3 / 4; width: 100%;
  background: linear-gradient(160deg, #3b2e52, #241a34);
}
.cov img { width: 100%; height: 100%; object-fit: cover; }
.cov.sq { border-radius: 4px; }

/* ---------- section heads + rails ---------- */

.sec-h {
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
}
.sec-h h2 { margin: 0; font-family: var(--disp); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.sec-h a { color: var(--ink-3); display: flex; align-items: center; gap: 4px; font-size: 12px; }
.sec-h a:hover { color: var(--ink); }
@media (min-width: 720px) { .sec-h h2 { font-size: 20px; } }

.rail {
  display: flex; gap: 12px; padding-inline: var(--gutter);
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex-shrink: 0; scroll-snap-align: start; }

.card-cont {
  width: 208px; background: var(--surface); border-radius: var(--radius); padding: 8px;
  display: flex; gap: 10px;
}
.card-cont .cov { width: 62px; height: 83px; border-radius: 6px; flex-shrink: 0; }
.card-cont .body { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.card-cont .ttl { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cont .met { font-size: 11px; color: var(--ink-2); }
.bar { width: 112px; height: 3px; border-radius: 2px; background: var(--line-3); overflow: hidden; }
.bar i { display: block; height: 3px; background: var(--accent); }

/* ---------- Discover hero ---------- */

.hero {
  position: relative; overflow: hidden; height: 232px;
  background: #2e3a4a;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 8%, rgba(23, 20, 18, 0.82) 42%, rgba(23, 20, 18, 0) 82%); }
.hero .txt { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.hero .kicker { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-2); }
.hero .kicker b { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.hero .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.hero .ttl { margin: 0; font-family: var(--disp); font-size: 27px; font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; text-wrap: pretty; }
.hero .cta { display: flex; align-items: center; gap: 10px; }
.hero .cta .btn-primary { flex: 1; }
.hero .cta .sq { width: 44px; height: 44px; padding: 0; border-radius: var(--radius); border: 1px solid var(--line-3); background: rgba(43, 38, 33, 0.6); color: var(--ink); }
.hero .synopsis { display: none; }
@media (min-width: 720px) {
  .hero { height: 420px; }
  .hero .shade { background: linear-gradient(to top, var(--bg) 4%, rgba(23, 20, 18, 0.7) 40%, rgba(23, 20, 18, 0) 80%), linear-gradient(to right, rgba(23, 20, 18, 0.6), rgba(23, 20, 18, 0) 60%); }
  .hero .txt { bottom: 34px; max-width: 560px; gap: 14px; }
  .hero .ttl { font-size: 44px; }
  .hero .cta .btn-primary { flex: 0 0 auto; padding-inline: 28px; }
  .hero .synopsis { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.5; max-width: 52ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- Discover: the featured carousel ---------- */

/* Scroll-snap does the carousel: a row of full-width heroes that swipes, with no script needed
 * to move. The arrows and dots are on top of it and the script only keeps them in step. */
.carousel { position: relative; }
.carousel .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel .slides::-webkit-scrollbar { display: none; }
.carousel .slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
/* Below the slides on a phone, where a thumb does the paging; at the bottom right of the hero on
 * a desktop, clear of the title and the buttons on its left. */
.carousel .ctrl { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 10px; }
.carousel .arr { display: none; }
.carousel .dots { display: flex; align-items: center; gap: 6px; }
.carousel .dots button {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; cursor: pointer;
  background: var(--line-3); transition: width 0.2s, background 0.2s;
}
.carousel .dots button[aria-selected="true"] { width: 18px; background: var(--accent); }
.carousel .dots button:hover { background: var(--ink-3); }
@media (min-width: 720px) {
  .carousel .ctrl { position: absolute; right: var(--gutter); bottom: 34px; padding: 0; z-index: 2; }
  .carousel .arr {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; padding: 0;
    border: 1px solid var(--line-3); background: rgba(23, 20, 18, 0.62); color: var(--ink); backdrop-filter: blur(8px);
  }
  .carousel .arr:hover { color: var(--accent-hover); border-color: var(--ink-3); }
}

/* ---------- Discover: the genre list ---------- */

/* Every genre, all of them visible — the list wraps rather than scrolls off the edge. */
.genres { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 9px; }
.genre {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 9px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
}
.genre:hover { border-color: var(--line-3); color: var(--ink); }
.genre .n { font-size: 13px; font-weight: 600; }
.genre .c { font-size: 11px; color: var(--ink-3); }
@media (min-width: 720px) { .genres { gap: 10px; } .genre { padding: 11px 16px; } .genre .n { font-size: 14px; } }

/* ---------- Discover: the series list ---------- */

.list { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; flex-direction: column; }
.list li { border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; color: inherit; }
.row:hover { color: inherit; }
.row:hover .ttl { color: var(--accent-hover); }
.row .cov { width: 56px; height: 75px; border-radius: 6px; flex-shrink: 0; }
.row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row .ttl { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; }
/* The title gives way to the badge: it ends in an ellipsis, the badge stays whole. */
.row .ttl .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.row .ttl .badge-ep { flex-shrink: 0; }
.row .gen { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .met { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-3); }
.row .met span { display: inline-flex; align-items: center; gap: 4px; }
.row .met i { width: 3px; height: 3px; border-radius: 50%; background: #3e3832; }
.row .met .price { color: var(--accent); font-weight: 600; }
.row .chev { color: var(--ink-4); flex-shrink: 0; }
@media (min-width: 720px) {
  .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
  .row { padding: 14px 0; }
  .row .cov { width: 64px; height: 85px; }
  .row .ttl { font-size: 15px; }
}
@media (min-width: 1080px) { .list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sec { padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.sec:first-of-type { padding-top: 14px; }
@media (min-width: 720px) { .sec { padding-top: 34px; gap: 14px; } }

/* ---------- Browse ---------- */

.page-h { padding: 22px var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; }
.page-h .t { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-h h1 { margin: 0; font-family: var(--disp); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.page-h .sub { font-size: 13px; color: var(--ink-3); margin-top: 7px; }
.sort { position: relative; }
.sort select {
  appearance: none; -webkit-appearance: none;
  padding: 7px 30px 7px 13px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent;
  color: var(--ink); font: 12.5px var(--font); font-weight: 600; cursor: pointer;
}
.sort::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
/* The label sits in the flow, not over the select: "Sort" is four letters in English and
 * nine in German, and the select's own value must start after whichever it is. */
.sort.labelled { display: inline-flex; align-items: center; border-radius: 7px; border: 1px solid var(--line-2); padding-left: 13px; }
.sort.labelled .lbl { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.sort.labelled select { border: 0; padding-left: 6px; }
@media (min-width: 720px) { .page-h { padding-top: 34px; gap: 22px; } .page-h h1 { font-size: 34px; } }

.grid {
  padding: 22px var(--gutter) 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px;
}
@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding-top: 26px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.card .ttl { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.card .met { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.card .met i { width: 3px; height: 3px; border-radius: 50%; background: #3e3832; }
.card .met .price, .ser-head .stats .price { color: var(--accent); font-weight: 600; }

.notice {
  margin: 22px var(--gutter) 0; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; line-height: 1.5;
}
.notice a { color: var(--accent); font-weight: 600; }
.notice.warn { border-color: #5a3a1a; }
.notice.ok { border-color: #2f5a3a; }
.notice.licence { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.notice.licence b { display: block; color: var(--ink); }
.key-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.key-form input { height: 34px; width: 26ch; padding: 0 10px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 13px var(--mono, monospace); letter-spacing: 0.04em; outline: none; }
.key-form input:focus { border-color: var(--ink-3); }
.social { display: flex; flex-direction: column; gap: 10px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.account { max-width: 460px; }
.account section { display: flex; flex-direction: column; gap: 10px; }
.account h2 { margin: 0; font-size: 16px; font-weight: 700; }
.doors { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doors li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-s); font-size: 13.5px; }
.doors li b { min-width: 7ch; }
.doors li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doors li form { margin: 0; }
.connect { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-note { padding: 28px var(--gutter) 0; font-size: 12px; color: var(--ink-3); }
.foot-note a { color: var(--ink-2); text-decoration: underline; }

/* ---------- Series ---------- */

.ser-banner { position: relative; height: 190px; overflow: hidden; background: #2e3a4a; }
.ser-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1); transform: scale(1.06); }
.ser-banner .shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 4%, rgba(23, 20, 18, 0.55) 60%, rgba(23, 20, 18, 0.35) 100%); }
.ser-top { position: absolute; left: 0; right: 0; top: 0; height: 52px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; z-index: 2; }
.ser-top a, .ser-top button { width: 44px; height: 44px; border-radius: 50%; background: rgba(23, 20, 18, 0.55); backdrop-filter: blur(8px); border: 0; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.ser-head { margin-top: -46px; padding-inline: var(--gutter); display: flex; gap: 14px; align-items: flex-end; position: relative; }
.ser-head .cov { width: 100px; flex-shrink: 0; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.ser-head .meta { display: flex; flex-direction: column; gap: 7px; padding-bottom: 2px; min-width: 0; }
.ser-head h1 { margin: 0; font-family: var(--disp); font-size: 22px; font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; text-wrap: pretty; }
.ser-head .by { font-size: 12.5px; color: var(--ink-2); }
.ser-head .by a { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; } .ser-head .by a:hover { color: var(--ink); text-decoration-color: var(--accent); }
.ser-head .stats { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 11.5px; }
.ser-head .stats span { display: flex; align-items: center; gap: 4px; }
.ser-tags { padding: 14px var(--gutter) 0; display: flex; flex-wrap: wrap; gap: 7px; }
.ser-cta { padding: 14px var(--gutter) 0; display: flex; gap: 10px; }
.ser-cta .btn-primary { flex: 1; height: 46px; font-size: 14.5px; }
.ser-syn { padding: 16px var(--gutter) 0; font-size: 12.5px; line-height: 1.58; color: var(--ink-2); }
.ser-syn.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ser-syn-more { padding: 4px var(--gutter) 0; }
.ser-syn-more summary { color: var(--accent); font-weight: 600; font-size: 12.5px; cursor: pointer; list-style: none; }
.ser-syn-more summary::-webkit-details-marker { display: none; }
.ser-syn-more[open] summary { display: none; }
.ser-syn-more p { margin: 0; font-size: 12.5px; line-height: 1.58; color: var(--ink-2); }
.eps-h { padding: 18px var(--gutter) 8px; display: flex; align-items: center; justify-content: space-between; }
.eps-h h2 { margin: 0; font-family: var(--disp); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.eps-h .sort select { font-weight: 500; color: var(--ink-2); border: 0; padding-left: 0; }
.ep {
  height: 62px; padding-inline: var(--gutter); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; color: inherit;
}
.ep .n { width: 30px; font-size: 12px; color: var(--ink-2); flex-shrink: 0; }
.ep .b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ep .t { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep .s { font-size: 11px; color: var(--ink-3); }
.ep .new { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.ep svg { color: var(--ink-3); flex-shrink: 0; }
a.ep:hover { background: var(--surface-2); color: inherit; }
.ep.off { background: var(--surface-2); }
.ep.off .n, .ep.off .s, .ep.off svg { color: var(--ink-4); }
.ep.off .t { color: #6b635c; font-weight: 500; }
.ep.done .t { color: var(--ink-3); font-weight: 500; }
.ep.done .n, .ep.done .s, .ep.done svg { color: var(--ink-4); }

@media (min-width: 720px) {
  .ser-banner { height: 340px; }
  .ser-top { display: none; }
  .ser-head { margin-top: -120px; gap: 28px; }
  .ser-head .cov { width: 200px; }
  .ser-head h1 { font-size: 40px; }
  .ser-head .by { font-size: 14px; }
  .ser-cta .btn-primary { flex: 0 0 auto; padding-inline: 32px; }
  .ser-syn { font-size: 14.5px; max-width: 72ch; }
  .ser-body { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 0 48px; }
  .ser-body > .left, .ser-body > .right { min-width: 0; }
  .ser-body .eps-h { padding-top: 0; }
  .ser-body .ep { padding-inline: 0; }
  .ser-body .right { padding-right: var(--gutter); }
  .ser-body .left { padding-left: var(--gutter); }
  .ser-body .left .ser-tags, .ser-body .left .ser-cta, .ser-body .left .ser-syn, .ser-body .left .ser-syn-more { padding-inline: 0; }
}

/* ---------- Studio skin: Publish ---------- */

.st-hdr { height: 66px; border-bottom: 1px solid var(--line); padding-inline: var(--gutter); display: flex; align-items: center; gap: 14px; }
.st-hdr .brand { display: flex; align-items: center; font-family: var(--disp); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.st-hdr .brand span { color: var(--accent); margin-left: 0.25em; }
.st-hdr .brand:hover { color: #fff; }
.st-hdr .mark { width: 28px; height: 28px; margin-right: 10px; }
.st-hdr .grow { flex: 1; }
.st-hdr nav { display: none; align-items: center; gap: 26px; }
@media (min-width: 720px) { .st-hdr nav { display: flex; } }

.pub-hero { padding: 40px var(--gutter) 0; display: flex; flex-direction: column; gap: 40px; }
.pub-hero .copy { display: flex; flex-direction: column; gap: 22px; }
.pub-hero .app-mark { width: 72px; height: 72px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)); }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--blue); }
.pub-hero h1 { margin: 0; font-family: var(--disp); font-size: 38px; font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; color: #fff; text-wrap: pretty; }
.pub-hero .lead { font-size: 16px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; margin: 0; }
.pub-hero .lead code { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.pub-hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.pub-hero .ctas .btn { height: 50px; padding-inline: 24px; font-size: 15px; border-radius: 9px; }
.pub-hero .facts { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
@media (min-width: 1080px) {
  .pub-hero { padding-top: 68px; flex-direction: row; gap: 48px; align-items: flex-start; }
  .pub-hero .copy { width: 520px; flex-shrink: 0; padding-top: 26px; }
  .pub-hero h1 { font-size: 54px; }
  .pub-hero .lead { font-size: 17px; }
  .pub-hero .mock { flex: 1; }
  .pub-hero .shot { flex: 1; min-width: 0; }
}

/* the editor mock: an illustration of Studio, built from boxes, nothing loaded */
/* The hero capture is the real app, not a mock: one image, framed like a window. */
.shot { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-3); background: var(--surface); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }
.shot img { display: block; width: 100%; height: auto; }
.mock { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-3); background: var(--surface); position: relative; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }
.mock .bar { height: 38px; width: auto; border-radius: 0; background: #14202a; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 12px; gap: 8px; }
.mock .bar .dots { display: flex; gap: 6px; } .mock .bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-3); }
.mock .bar .file { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-left: 10px; }
.mock .bar .grow { flex: 1; }
.mock .bar .tab { padding: 4px 10px; border-radius: 5px; font-size: 11px; color: var(--ink-3); } .mock .bar .tab.on { background: var(--raised); color: var(--ink); }
.mock .body { display: flex; height: 380px; }
.mock .tools { width: 46px; flex-shrink: 0; background: #0e151b; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; }
.mock .tools i { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); } .mock .tools i.on { background: var(--raised); color: var(--accent); }
.mock .tools hr { width: 22px; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.mock .canvas { flex: 1; background: var(--canvas); position: relative; overflow: hidden; }
.mock .pages { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 232px; display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.mock .pg { width: 232px; background: #f4f0e9; position: relative; overflow: hidden; }
.mock .ring { position: absolute; left: 40px; top: 148px; width: 196px; height: 196px; border-radius: 50%; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  background: conic-gradient(#16283cdd 0deg 44deg, #f08a32ee 44deg 88deg, #16283cdd 88deg 132deg, #1c3049dd 132deg 176deg, #16283cdd 176deg 220deg, #1c3049dd 220deg 264deg, #16283cdd 264deg 308deg, #1c3049dd 308deg 360deg); }
.mock .ring .in { position: absolute; left: 34px; top: 34px; width: 128px; height: 128px; border-radius: 50%; background: #0d1a2af2; border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; }
.mock .ring .in i { width: 48px; height: 48px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.mock .brush { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 6px; background: #0d1a2ae6; border: 1px solid var(--line-3); display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--ink); }
.mock .insp { width: 188px; flex-shrink: 0; background: #131c23; border-left: 1px solid var(--line); display: none; flex-direction: column; }
.mock .insp .h { height: 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 10px; gap: 12px; font-size: 11px; color: var(--ink-3); } .mock .insp .h b { color: var(--ink); font-weight: 600; }
.mock .insp .sec-m { padding: 10px; display: flex; flex-direction: column; gap: 9px; }
.mock .insp .k { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; }
.mock .insp .row { height: 28px; border-radius: 5px; background: var(--raised); border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-size: 11px; }
.mock .insp .row span { color: var(--blue); font-size: 10px; }
.mock .insp .row.dash { background: transparent; border-style: dashed; justify-content: center; color: var(--ink-3); }
.mock .insp .xy { display: flex; gap: 6px; } .mock .insp .xy i { flex: 1; height: 24px; border-radius: 4px; background: var(--raised); border: 1px solid var(--line-3); display: flex; align-items: center; padding: 0 7px; font-family: var(--mono); font-size: 10px; font-style: normal; }
.mock .insp .grow { flex: 1; }
.mock .insp .send { border-top: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mock .insp .send i { height: 30px; border-radius: 6px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: #fff; font-style: normal; }
.mock .tl { position: absolute; left: 46px; right: 0; bottom: 0; height: 58px; background: #0e151b; border-top: 1px solid var(--line); padding: 8px 12px; display: flex; flex-direction: column; gap: 7px; }
.mock .tl .k { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.mock .tl .track { flex: 1; height: 4px; border-radius: 2px; background: var(--raised); position: relative; } .mock .tl .track i { position: absolute; left: 22%; width: 44%; height: 4px; border-radius: 2px; background: var(--blue); }
.mock .tl .frames { display: flex; gap: 4px; align-items: center; } .mock .tl .frames i { width: 28px; height: 22px; border-radius: 3px; background: var(--raised); border: 1px solid var(--line-3); } .mock .tl .frames i.on { background: var(--accent); border-color: var(--accent); } .mock .tl .frames i.dash { background: transparent; border-style: dashed; }
@media (min-width: 720px) { .mock .insp { display: flex; } .mock .tl { right: 188px; } .mock .body { height: 428px; } }

.feat { padding: 60px var(--gutter) 0; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .feat { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-top: 78px; } .feat.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .feat.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feat .c { padding: 26px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 13px; }
.feat .c svg { color: var(--accent); }
.feat h3 { margin: 0; font-family: var(--disp); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.feat p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }

/* A section title above a feature grid, and the "next on the bench" strip: what is coming is
 * said once, tagged, and never mixed into the cards that describe what ships. */
.sec-t { padding: 60px var(--gutter) 0; display: flex; flex-direction: column; gap: 8px; }
.sec-t h2 { margin: 0; font-family: var(--disp); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: #fff; text-wrap: pretty; }
.sec-t p { margin: 0; max-width: 64ch; font-size: 14px; line-height: 1.5; color: var(--ink-3); text-wrap: pretty; }
.feat.tight { padding-top: 24px; }
.feat p code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.next { margin: 40px var(--gutter) 0; padding: 22px 26px; border-radius: 12px; border: 1px dashed var(--line-3); display: flex; flex-direction: column; gap: 16px; }
.next .k { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--blue); }
.next ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px 28px; }
.next li { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.next li b { display: block; padding-bottom: 3px; color: var(--ink); font-weight: 600; }
.soon { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line-3); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--blue); vertical-align: 2px; }
@media (min-width: 720px) { .sec-t { padding-top: 78px; } .sec-t h2 { font-size: 34px; } .feat.tight { padding-top: 28px; } .next ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .next ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.pricing { padding: 60px var(--gutter) 60px; }
.pricing .t { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; padding-bottom: 26px; }
.pricing h2 { margin: 0; font-family: var(--disp); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: #fff; }
.pricing .t p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.tiers { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .pricing { padding-top: 78px; } .pricing h2 { font-size: 34px; } .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tier { padding: 26px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; position: relative; }
.tier.hi { background: var(--surface-2); border-color: var(--accent); }
.tier .most { position: absolute; right: 22px; top: -11px; padding: 3px 11px; border-radius: 5px; background: var(--accent); font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: #fff; letter-spacing: 0.06em; }
.tier .name { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: var(--ink-2); } .tier.hi .name { color: var(--accent); }
.tier .price { font-family: var(--disp); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; color: #fff; line-height: 1; }
.tier .price.s { font-size: 28px; line-height: 1.1; }
.tier .per { font-size: 14px; color: var(--ink-2); }
.tier .who { font-size: 13px; color: var(--ink-3); }
.tier hr { border: 0; border-top: 1px solid var(--line); margin: 0; } .tier.hi hr { border-color: var(--line-3); }
.tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.tier li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; }
.tier li svg { color: var(--ok); flex-shrink: 0; margin-top: 2px; }
.tier li code { font-family: var(--mono); font-size: 12px; }
.tier .grow { flex: 1; }
.tier-note { margin: -6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.tier-note a { color: var(--ink-2); text-decoration: underline; }
.pricing-fine { margin: 26px 0 0; max-width: 78ch; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }

/* ---------- the cart ---------- */

/* The cart icon lives in both headers; the count is a badge that hides at zero and is swapped
 * in by an htmx response when something is added. */
.cart-link { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); flex-shrink: 0; }
.cart-link:hover { color: var(--ink); }
.cart-link .n { position: absolute; top: 5px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.cart-link .n.empty { display: none; }
.hdr .cart-link { margin-right: -6px; }
.in-cart { cursor: default; }
.in-cart a { color: var(--accent); }
.cart-note { display: block; padding-top: 6px; font-size: 12px; color: var(--ink-3); }

.cart { max-width: 640px; margin: 0 auto; }
.cart .notice { margin-inline: var(--gutter); }
.cart-empty { padding: 40px var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; }
.cart-empty h2 { margin: 0; font-family: var(--disp); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.cart-empty p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.cart-empty .ctas { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.cart-lines { margin: 22px var(--gutter) 0; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); overflow: hidden; }
.cart-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 36px; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .cov { width: 48px; height: 64px; border-radius: 4px; background: var(--surface-2); border: 1px dashed var(--line-3); overflow: hidden; }
.cart-line .cov img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.cart-line .cov:has(img) { border: 0; }
.cart-line .mark { width: 48px; height: 48px; }
.cart-line .what { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cart-line .what b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line .what small { font-size: 12px; color: var(--ink-3); }
.cart-line .price { font-weight: 600; white-space: nowrap; }
.cart-line form { display: contents; }
.cart-line .rm { width: 36px; height: 36px; border-radius: var(--radius-s); border: 0; background: transparent; color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cart-line .rm:hover { color: var(--ink); background: var(--surface-2); }
.cart-total { margin: 18px var(--gutter) 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cart-total span { font-size: 14px; color: var(--ink-2); }
.cart-total small { display: block; font-size: 12px; color: var(--ink-3); }
.cart-total b { font-family: var(--disp); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.cart-pay { margin: 18px var(--gutter) 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cart-fine { margin: 18px var(--gutter) 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
@media (min-width: 720px) { .cart-lines { margin-top: 28px; } }

/* ---------- Studio skin: after Checkout ---------- */

/* One card, centred, that changes what it says as the order moves: waiting for the webhook,
 * paid, refunded, or not found. The pending card polls itself and is swapped whole. */
.co { padding: 48px var(--gutter) 60px; display: flex; justify-content: center; }
.co-card { width: 100%; max-width: 560px; padding: 30px 28px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-3); display: flex; flex-direction: column; gap: 18px; }
.co-card h1 { margin: 0; font-family: var(--disp); font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: #fff; text-wrap: pretty; }
.co-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.co-card p b { color: var(--ink); font-weight: 600; }
.co-fine { font-size: 12.5px; color: var(--ink-3); }
.co-fine a { color: var(--ink-2); text-decoration: underline; }
.co-keys { display: flex; flex-direction: column; gap: 8px; }
.co-keys code { display: block; padding: 12px 16px; border-radius: var(--radius-s); background: var(--bg-2); border: 1px solid var(--line-3); font-family: var(--mono); font-size: 18px; letter-spacing: 0.08em; color: #fff; text-align: center; user-select: all; }
.co-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.co-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 12px; font-size: 13.5px; line-height: 1.5; }
.co-steps li::before { counter-increment: step; content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent); }
.co-steps li b { color: #fff; font-weight: 600; padding-top: 4px; }
.co-steps li span { color: var(--ink-2); }
.co-steps li span b { color: var(--ink); }
.co-steps code { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.co-order { margin: 4px 0 0; padding: 14px 16px; border-radius: var(--radius-s); background: var(--bg-2); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.co-order div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.co-order dt { color: var(--ink-3); }
.co-order dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.co-order dd.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0.04em; }
.co-order dd small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.co-card .ctas { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
@media (min-width: 720px) { .co { padding-top: 72px; } .co-card { padding: 38px 36px; gap: 20px; } .co-card h1 { font-size: 38px; } }

/* ---------- Studio skin: Dashboard ---------- */

.dash { display: flex; min-height: 100vh; }
.dash .side { display: none; width: 216px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); flex-direction: column; padding: 0 12px; }
.dash .side .brand { height: 66px; display: flex; align-items: center; gap: 10px; padding: 0 4px; font-family: var(--disp); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.dash .side .brand span { color: var(--ink-3); }
.dash .side .brand small { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--blue); letter-spacing: 0.08em; padding-top: 3px; }
.dash .side nav { display: flex; flex-direction: column; gap: 3px; padding-top: 10px; }
.dash .side nav a { height: 36px; border-radius: 7px; display: flex; align-items: center; gap: 10px; padding: 0 11px; font-size: 13.5px; color: var(--ink-2); }
.dash .side nav a[aria-current="page"] { background: var(--raised); color: #fff; font-weight: 600; }
.dash .side nav a:hover { color: #fff; }
.dash .side .grow { flex: 1; }
.dash .side .me { height: 62px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.dash .side .me i { width: 30px; height: 30px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-3); flex-shrink: 0; }
.dash .side .me b { font-size: 12.5px; font-weight: 600; display: block; }
.dash .side .me small { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.dash .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash .top { height: 66px; flex-shrink: 0; border-bottom: 1px solid var(--line); padding-inline: var(--gutter); display: flex; align-items: center; gap: 16px; }
.dash .top h1 { margin: 0; font-family: var(--disp); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.dash .top .grow { flex: 1; }
.dash .top .brand-m { font-family: var(--disp); font-size: 18px; font-weight: 700; color: #fff; }
.dash .top .brand-m span { color: var(--ink-3); }
@media (min-width: 1080px) { .dash .side { display: flex; } .dash .top .brand-m { display: none; } }
.dash .content { padding: 26px var(--gutter) 40px; display: flex; flex-direction: column; gap: 22px; }
.drop { border-radius: 10px; border: 1px dashed var(--line-3); background: var(--bg-2); display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 22px; }
.drop .ic { width: 40px; height: 40px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.drop b { font-size: 14px; font-weight: 600; display: block; }
.drop b code { font-family: var(--mono); font-size: 13px; }
.drop small { font-size: 12.5px; color: var(--ink-3); } .drop small b { display: inline; font-size: inherit; color: var(--ink); }
.tbl { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.tbl .th, .tbl .tr { display: grid; grid-template-columns: minmax(0, 2fr) 110px 76px; gap: 18px; align-items: center; padding: 0 18px; }
.tbl .th { height: 40px; border-bottom: 1px solid var(--line); background: var(--bg-2); font-size: 11px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.06em; }
.tbl .tr { height: 72px; border-bottom: 1px solid #16273a; font-size: 13px; color: inherit; }
.tbl .tr:last-child { border-bottom: 0; }
/* The series cell is the link to the catalogue page — not the whole row, which also holds
 * the Pricing link, and a link inside a link is not a thing a browser will render. */
a.ser { color: inherit; }
a.ser:hover b { text-decoration: underline; }
.tbl .ser { display: flex; align-items: center; gap: 13px; min-width: 0; }
.tbl .ser .cov { width: 36px; height: 48px; flex-shrink: 0; border-radius: 4px; background: var(--surface-2); border: 1px dashed var(--line-3); }
.tbl .ser .cov img { border-radius: 4px; } .tbl .ser .cov.has { border: 0; }
.tbl .ser b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .ser small { font-size: 11.5px; color: var(--ink-3); }
.tbl .c { display: none; }
.tbl small { font-size: 11.5px; color: var(--ink-3); display: block; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-3); }
.pill.ok { background: rgba(16, 185, 129, 0.14); color: var(--ok); border: 0; }
.pill.rev { background: rgba(110, 150, 217, 0.16); color: var(--blue); border: 0; }
.pill.draft { border: 0; }
.tbl .sell { color: var(--accent); font-weight: 600; }
.tbl .sell:hover { color: var(--accent-hover); }
/* The FORMAT cell: the shelf and, under it, how it reads; a picker while nothing is published. */
.section-pick select { height: 30px; padding: 0 8px; border-radius: var(--radius-s); border: 1px solid var(--line-3); background: var(--bg-2); color: var(--ink); font: 12.5px var(--font); max-width: 100%; }
.section-pick select:focus { border-color: var(--blue); outline: none; }
.section-pick noscript button { margin-top: 4px; }
.section-pick select option:disabled { color: var(--ink-3); }
.tbl small.warn { color: #e0a24a; }
@media (min-width: 900px) {
  .tbl .th, .tbl .tr { grid-template-columns: minmax(0, 2.4fr) 130px minmax(0, 1.3fr) 90px 110px minmax(0, 1fr) 90px; }
  .tbl .c { display: block; }
}
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 60px var(--gutter); text-align: center; }
.empty h2 { margin: 0; font-family: var(--disp); font-size: 32px; font-weight: 700; letter-spacing: -0.03em; color: #fff; }
.empty p { margin: 12px 0 0; font-size: 14.5px; color: var(--ink-2); max-width: 46ch; line-height: 1.55; }
.empty .kinds { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.kind { width: 232px; max-width: 100%; padding: 22px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-3); display: flex; flex-direction: column; gap: 14px; text-align: left; }
.kind.hi { background: var(--surface-2); border-color: var(--accent); }
.kind .pic { height: 96px; border-radius: 8px; background: var(--canvas); display: flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden; }
.kind .pic i { display: block; background: #f4f0e9; width: 54px; height: 72px; }
.kind .pic .col { width: 72px; display: flex; flex-direction: column; gap: 4px; } .kind .pic .col i { width: 72px; height: 30px; }
.kind .pic.rtl { flex-direction: row-reverse; }
.kind h3 { margin: 0; font-family: var(--disp); font-size: 18px; font-weight: 700; color: #fff; }
.kind p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.empty .hint { font-size: 13px; color: var(--ink-3); } .empty .hint b { color: var(--ink); font-weight: 500; }

/* ---------- Studio skin: the Pricing page ---------- */

.pricing-head h2 { margin: 0; font-family: var(--disp); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.pricing-head p { margin: 8px 0 0; max-width: 78ch; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.pricing-head p b { color: var(--ink); font-weight: 600; }
.pricing-card { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.pricing-card h3 { margin: 0; font-family: var(--disp); font-size: 17px; font-weight: 700; color: #fff; }
.pricing-card > p { margin: -6px 0 0; font-size: 13px; line-height: 1.5; }
.pricing-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pricing-row label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.pricing-row small { font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.pricing input[type="number"], .pricing input[type="text"], .pricing select { height: 40px; padding: 0 12px; border-radius: var(--radius-s); border: 1px solid var(--line-3); background: var(--bg-2); color: var(--ink); font: 13.5px var(--font); outline: none; min-width: 0; }
.pricing input:focus, .pricing select:focus { border-color: var(--blue); }
.pricing input[type="number"] { width: 110px; }
.pricing-row select { max-width: 420px; }
.pricing-actions { display: flex; align-items: center; gap: 14px; }
.pricing-volume { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.pricing-volume.new { border-top: 1px dashed var(--line-3); }
.pricing-volume .range { display: flex; align-items: center; gap: 6px; }
.pricing-volume .range i { color: var(--ink-3); font-style: normal; }
.pricing-volume .range input { width: 84px; }
.pricing-volume .rm { width: 38px; height: 38px; border-radius: var(--radius-s); border: 0; background: transparent; color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; justify-self: start; }
.pricing-volume .rm:hover { color: var(--ink); background: var(--surface-2); }

/* New series: the same card as Pricing, with a shelf to pick, genres to tick and a cover to choose. */
.new-series textarea { padding: 10px 12px; border-radius: var(--radius-s); border: 1px solid var(--line-3); background: var(--bg-2); color: var(--ink); font: 13.5px/1.5 var(--font); outline: none; resize: vertical; max-width: 640px; }
.new-series textarea:focus { border-color: var(--blue); }
.new-series input[type="file"] { font: 13px var(--font); color: var(--ink-2); max-width: 100%; }
.new-series input[type="file"]::file-selector-button { margin-right: 12px; height: 34px; padding: 0 12px; border-radius: var(--radius-s); border: 1px solid var(--line-3); background: var(--surface-2); color: var(--ink); font: 12.5px var(--font); cursor: pointer; }
.new-series h3 + .pricing-row, .new-series h3 + .new-kinds, .new-series h3 + .new-genres { margin-top: -4px; }
.new-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.new-kind { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-3); background: var(--bg-2); cursor: pointer; position: relative; }
.new-kind input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.new-kind b { font-size: 14px; color: #fff; }
.new-kind small { font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.new-kind:has(input:checked) { border-color: var(--blue); background: rgba(110, 150, 217, 0.10); }
.new-kind:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.new-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.new-genre { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-3); background: var(--bg-2); font-size: 13px; color: var(--ink); cursor: pointer; }
.new-genre input { margin: 0; accent-color: var(--blue); }
.new-genre:has(input:checked) { border-color: var(--blue); background: rgba(110, 150, 217, 0.10); }
.new-series .dim { margin-top: -8px; }
.new-check { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.new-check input { margin: 0; accent-color: var(--blue); }
.new-check small { grid-column: 2; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
@media (min-width: 900px) {
  .pricing-row { grid-template-columns: 180px minmax(0, 1fr); align-items: center; }
  .pricing-row small { grid-column: 2; }
  .pricing-volume { grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1.6fr) auto 38px; align-items: center; gap: 12px; }
}

/* ---------- Login, 404 ---------- */

.auth { max-width: 380px; margin: 0 auto; padding: 48px var(--gutter) 0; display: flex; flex-direction: column; gap: 22px; }
.auth h1 { margin: 0; font-family: var(--disp); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.auth p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field input { height: 44px; padding: 0 12px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--font); outline: none; }
.field input:focus { border-color: var(--ink-3); }
.form-err { padding: 10px 12px; border-radius: var(--radius-s); background: rgba(166, 50, 68, 0.14); color: #e59aa6; font-size: 13px; }
.lost { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding-inline: var(--gutter); }
.lost .code { font-family: var(--disp); font-size: 72px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink-3); line-height: 1; }
.lost p { margin: 0; color: var(--ink-2); }

/* /download — the reader app, per platform; the visitor's own first */
.dl { max-width: 640px; margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-direction: column; gap: 22px; }
.dl-head h1 { margin: 0 0 8px; font-family: var(--disp); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.dl-head p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.dl-head code { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.dl-then, .dl-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); }
.dl-then { border-color: var(--accent); }
.dl-then .body, .dl-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* A row of several packages puts them under the text when both do not fit side by side. */
.dl-row { flex-wrap: wrap; }
.dl-row .body { min-width: 14em; }
.dl-then .ttl, .dl-row .ttl { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dl-then .met, .dl-row .met { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dl-row.mine { border-color: var(--line-3); background: var(--surface); }
.dl-row .btn { flex-shrink: 0; white-space: nowrap; }
.dl-row .btn.off { opacity: 0.45; cursor: default; }
.dl-foot { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.dl-rel { display: flex; flex-direction: column; gap: 12px; }
.dl-rel-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dl-rel-head h2 { margin: 0; font-family: var(--disp); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.dl-rel-head .met, .dl-old .met { font-size: 12px; color: var(--ink-2); }
.dl-rel h3 { margin: 6px 0 0; font-size: 13px; font-weight: 600; }
.dl-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dl-links .size { font-weight: 400; opacity: 0.7; margin-left: 4px; }
.dl-notes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.dl-old { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 14px; }
.dl-old summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.dl-old[open] summary { margin-bottom: 10px; }
.dl-old .ttl { font-size: 14px; font-weight: 600; }
@media (max-width: 480px) {
  .dl-then, .dl-row { flex-direction: column; align-items: stretch; }
  .dl-row .btn, .dl-then .btn { justify-content: center; }
  .dl-links { justify-content: stretch; }
  .dl-links .btn { flex: 1; }
}

/* the synopsis: three lines, then "More" swaps in the whole thing */
.ser-syn.syn-short { margin: 0; }
.left:has(.ser-syn-more[open]) .syn-short { display: none; }
.ser-syn-more[open] p { padding-top: 16px; }

/* ---------- Studio skin: Documentation ---------- */

/* Two columns from 720px: the contents on the left, the page on the right. Below that the
 * contents fold into a <details> above the page, so a phone reads the page first. */
.docs { display: flex; flex-direction: column; padding: 0 var(--gutter) 60px; }
.docs-nav { padding-top: 18px; }
.docs-nav-fold { display: none; }
.docs-toc, .docs-toc ol { list-style: none; margin: 0; padding: 0; }
.docs-toc > li { margin-bottom: 4px; }
.docs-toc a { display: block; padding: 6px 10px; border-radius: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.docs-toc a:hover { color: var(--ink); background: var(--surface-2); }
.docs-toc a.sec { font-weight: 600; color: var(--ink); }
.docs-toc a.sec.on { color: var(--accent); }
.docs-toc a[aria-current="page"] { color: var(--ink); background: var(--raised); }
.docs-toc ol { padding: 2px 0 6px 12px; border-left: 1px solid var(--line-2); margin-left: 10px; }
.docs-main { min-width: 0; padding-top: 28px; }
@media (max-width: 719px) {
  .docs-nav { padding-top: 12px; }
  .docs-nav-fold { display: block; }
  .docs-nav-fold summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 8px 0; list-style: none; }
  .docs-nav-fold summary::before { content: "▸ "; color: var(--ink-3); }
  .docs-nav-fold[open] summary::before { content: "▾ "; }
  .docs-nav-fold:not([open]) + .docs-toc { display: none; }
}
@media (min-width: 720px) {
  .docs { flex-direction: row; gap: 40px; }
  .docs-nav { width: 220px; flex-shrink: 0; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; padding-top: 28px; padding-bottom: 28px; }
  .docs-main { flex: 1; max-width: 760px; }
}
@media (min-width: 1080px) { .docs { gap: 64px; } .docs-nav { width: 240px; } }

/* The page itself: what Markdown produces, in the skin's tokens. */
.prose { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose h1 { margin: 0 0 18px; font-family: var(--disp); font-size: 36px; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: #fff; text-wrap: pretty; }
.prose h2 { margin: 40px 0 12px; font-family: var(--disp); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.prose h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; color: var(--ink); }
.prose h4 { margin: 22px 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.prose p { margin: 0 0 14px; text-wrap: pretty; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin-bottom: 0; }
.prose code { font-family: var(--mono); font-size: 0.88em; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.prose pre { margin: 0 0 16px; padding: 14px 16px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-s); }
.prose pre code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.55; color: var(--ink); }
.prose blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--ink-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 32px 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-s); border: 1px solid var(--line-2); }
.prose .table-wrap { overflow-x: auto; margin: 0 0 18px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
.prose th { font-weight: 600; color: var(--ink); background: var(--surface); }
.prose td:first-child code { white-space: nowrap; }

.docs-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.docs-pager a { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); max-width: 48%; }
.docs-pager a:hover { border-color: var(--line-3); color: var(--ink); }
.docs-pager .next { margin-left: auto; text-align: right; }
.docs-pager .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }
.docs-pager .t { font-size: 14px; font-weight: 600; }
