/* rpgcreator.net on the funnel kit: only what the kit does not already do.
   Colours are site.css tokens (--bronze, --parchment, --obsidian, --card). */

/* Sign-in pill sits in the nav, not floating over the hero. */
.fk-nav .auth-strip { position: static; padding: 0; }
.fk-nav .auth-in, .fk-nav .auth-name { min-height: 40px; display: inline-flex; align-items: center; letter-spacing: .14em; }
@media (max-width: 760px) { .fk-nav .auth-in, .fk-nav .auth-name { padding: .45rem .8rem; } }

/* Headings in the display face read better a touch lighter and wider. */
[data-fk] h1, [data-fk] h2 { font-weight: 400; letter-spacing: 0; }
.fk-pre { color: var(--bronze); }

/* Focus rings and 44px taps, everywhere the kit draws a control. */
[data-fk] a:focus-visible, [data-fk] button:focus-visible, [data-fk] input:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.fk-btn, .fk-tabs button, .fk-markers button { min-height: 44px; }

/* The buy panel keeps its site.css look inside the kit's width. */
.kit-buy h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 1.5rem; }
.kit-buy .fk-row { flex-wrap: wrap; }

/* The free chapter form. */
.kit-capture { display: grid; gap: 24px; padding-block: 64px; border-top: 1px solid var(--fk-line); }
.kit-capture h2 { margin-bottom: .4em; }
.kit-capture p { margin: 0; color: var(--fk-muted); }
.kit-capture strong { color: var(--parchment); }
.kit-capture .cap-form input, .kit-capture .cap-form button { min-height: 44px; }
@media (min-width: 900px) { .kit-capture { grid-template-columns: 1fr 1fr; align-items: center; } }

/* Feature tabs: three tabs wrap on a phone instead of pushing the page wide. */
.fk-ft > * { min-width: 0; }
.fk-ft .fk-tabs { flex-wrap: wrap; }

/* The blog: /blog/ list (Beyond's Posts page) and one post. */
.post-crumbs { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--fk-muted); margin-bottom: 20px; }
.post-crumbs a { color: var(--fk-muted); min-height: 44px; display: inline-flex; align-items: center; }
.post-crumbs a:hover { color: var(--bronze); }
.post-list h1 { font-family: var(--fk-font-head); font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; padding-bottom: 16px; border-bottom: 2px solid var(--bronze); }
.post-list-lead { color: var(--fk-muted); font-size: 1.1rem; max-width: 60ch; margin: 20px 0 36px; }
.post-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post-cards a { display: flex; flex-direction: column; height: 100%; background: var(--fk-surface); border: 1px solid var(--fk-line); border-radius: var(--fk-radius); overflow: hidden; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.post-cards a:hover { border-color: var(--bronze); transform: translateY(-2px); }
.post-card-art { position: relative; display: block; aspect-ratio: 16 / 9; }
.post-card-art img { width: 100%; height: 100%; object-fit: cover; }
.post-card-art time { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; font-size: .75rem; background: color-mix(in oklab, var(--obsidian) 82%, transparent); color: var(--parchment); border-radius: 3px; }
.post-card-text { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.post-card-text strong { font-size: 1.2rem; line-height: 1.3; color: var(--parchment); }
.post-card-text > span { color: var(--fk-muted); font-size: .95rem; }

.post { max-width: 760px; padding-block: clamp(24px, 5vw, 56px); }
.post-head h1 { font-family: var(--fk-font-head); font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.15; margin: 12px 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: .5rem; color: var(--fk-muted); font-size: .9rem; margin: 0 0 28px; }
.post-art { width: 100%; border-radius: var(--fk-radius); border: 1px solid var(--fk-line); margin-bottom: 36px; }
.post-body { font-size: 1.1rem; line-height: 1.75; color: color-mix(in oklab, var(--parchment) 88%, transparent); }
.post-body h2 { font-family: var(--fk-font-head); font-size: 1.6rem; margin: 2.2em 0 .6em; color: var(--parchment); }
.post-body h3 { font-size: 1.2rem; margin: 1.8em 0 .5em; color: var(--parchment); }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 1.2em; }
.post-body ul, .post-body ol { padding-left: 1.4em; } .post-body ul { list-style: disc; } .post-body ol { list-style: decimal; }
.post-body li { margin-bottom: .4em; } .post-body li::marker { color: var(--bronze); }
.post-body a { color: var(--bronze); text-decoration: underline; text-underline-offset: 3px; }
.post-body strong { color: var(--parchment); }
.post-body blockquote { margin: 0 0 1.4em; padding: 14px 20px; border-left: 3px solid var(--bronze); background: var(--fk-surface); border-radius: 0 var(--fk-radius) var(--fk-radius) 0; }
.post-body blockquote p { margin: 0; font-style: italic; }
.post-body code { font-size: .9em; padding: 1px 5px; background: var(--fk-surface); border-radius: 3px; }
.post-table { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--fk-line); border-radius: var(--fk-radius); }
.post-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.post-table th, .post-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--fk-line); vertical-align: top; }
.post-table th { color: var(--bronze); font-weight: 600; background: var(--fk-surface); }
.post-table tr:last-child td { border-bottom: 0; }
.post-body > p:last-child { font-size: .85rem; line-height: 1.6; color: var(--fk-muted); border-top: 1px solid var(--fk-line); padding-top: 1.4em; margin-top: 2.4em; }
.post-next { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin-top: 40px; padding: 24px 28px; background: var(--fk-surface); border: 1px solid var(--bronze); border-radius: var(--fk-radius); }
.post-next p { margin: 0; font-size: 1.1rem; max-width: 44ch; }
@media (prefers-reduced-motion: reduce) { .post-cards a { transition: none; } .post-cards a:hover { transform: none; } }

/* /book/, Beyond's product page: cover beside the buy box, spreads, contents. */
.book-product { padding-block: 24px 64px; }
.book-grid { display: grid; gap: 32px; align-items: start; }
.book-buy h1 { font-family: var(--fk-font-head); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; margin: .2em 0 .4em; }
.book-line { color: var(--fk-muted); font-size: 1.1rem; max-width: 36rem; margin: 0 0 24px; }
.book-buy .price { margin-bottom: 20px; }
.book-buy .fk-row { flex-wrap: wrap; margin-bottom: 28px; }
@media (min-width: 900px) { .book-grid { grid-template-columns: minmax(280px, 420px) 1fr; gap: 56px; } }

.book-spreads, .book-contents { padding-block: 64px; border-top: 1px solid var(--fk-line); }
.book-lead { color: var(--fk-muted); max-width: 40rem; margin: 0 0 32px; }
.book-spread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.book-spread-list figure { margin: 0; }
.book-spread-list a { display: block; border-radius: 6px; overflow: hidden; outline-offset: 3px; }
.book-spread-list img { display: block; width: 100%; height: auto; transition: transform .3s; }
.book-spread-list a:hover img { transform: scale(1.02); }
.book-spread-list figcaption { margin-top: 10px; font-size: .9rem; color: var(--fk-muted); }
@media (min-width: 900px) { .book-spread-list { grid-template-columns: repeat(3, 1fr); } }
.book-quote { margin: 48px auto 0; max-width: 40rem; text-align: center; font-family: var(--fk-font-head); font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--parchment); }
.book-quote cite { display: block; margin-top: 12px; font-family: var(--fk-font); font-style: normal; font-size: .85rem; color: var(--bronze); letter-spacing: .12em; text-transform: uppercase; }

.book-toc { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 28px 40px; }
.book-toc h3 { font-family: var(--fk-font-head); font-weight: 400; font-size: 1.2rem; color: var(--bronze); margin: 0; }
.book-toc > li > p { margin: 2px 0 10px; font-size: .85rem; color: var(--fk-muted); font-style: italic; }
.book-toc ul { list-style: none; margin: 0; padding: 0; }
.book-toc ul li { padding: 6px 0; border-bottom: 1px solid var(--fk-line); }
@media (min-width: 700px) { .book-toc { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .book-toc { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .book-spread-list img { transition: none; } .book-spread-list a:hover img { transform: none; } }
.book-cover { aspect-ratio: 800 / 1035; width: 100%; max-width: 300px; }
@media (min-width: 900px) { .book-cover { max-width: 420px; } }

/* /library/, Beyond's Library listing: shelves + search, then the covers. */
.lib-list .post-list-lead strong { color: var(--parchment); }
.lib-bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.lib-bar .fk-tabs { margin: 0; flex-wrap: wrap; }
.lib-bar input { min-height: 44px; width: min(100%, 300px); padding: 0 16px; border-radius: 999px; border: 1px solid var(--fk-line); background: var(--fk-surface); color: var(--fk-text); font: inherit; }
.lib-covers { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lib-covers li[hidden] { display: none; }
@media (min-width: 900px) { .lib-covers { grid-template-columns: repeat(3, 1fr); gap: 40px 32px; } }
.lib-covers a { display: flex; flex-direction: column; gap: 6px; height: 100%; color: inherit; text-decoration: none; }
.lib-cover { display: block; aspect-ratio: 600 / 777; border-radius: var(--fk-radius); overflow: hidden; border: 1px solid var(--fk-line); margin-bottom: 8px; transition: border-color .2s, transform .2s; }
.lib-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-covers a:hover .lib-cover { border-color: var(--bronze); transform: translateY(-3px); }
.lib-covers .fk-badge2 { position: static; align-self: start; }
.lib-covers strong { font-family: var(--fk-font-head); font-weight: 400; font-size: 1.15rem; line-height: 1.25; }
.lib-covers a > span:not([class]) { color: var(--fk-muted); font-size: .92rem; }
.lbk-meta { font-size: .8rem; color: var(--fk-muted); letter-spacing: .04em; }
.lib-got { color: var(--bronze); }
.lib-cta { margin-top: auto; padding-top: 6px; min-height: 44px; display: inline-flex; align-items: center; color: var(--bronze); font-weight: 600; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.lib-covers a:hover .lib-cta { text-decoration: underline; }
.lib-tip { margin: 36px 0 0; color: var(--fk-muted); font-size: .92rem; }
.lib-tip a { color: var(--bronze); }
.lib-list { padding-block: 24px 64px; }
.lib-keep { display: grid; gap: 24px; padding-block: 56px; border-top: 1px solid var(--fk-line); }
.lib-keep h2 { margin: 0 0 .4em; }
.lib-keep p:not(.fk-pre) { margin: 0; color: var(--fk-muted); max-width: 40rem; }
.lib-keep .fk-row { flex-wrap: wrap; }
@media (min-width: 900px) { .lib-keep { grid-template-columns: 1.4fr 1fr; align-items: center; } .lib-keep .fk-row { justify-content: flex-end; } }
@media (prefers-reduced-motion: reduce) { .lib-cover { transition: none; } .lib-covers a:hover .lib-cover { transform: none; } }
.lib-keep .fk-pre { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .6em; }
@media (max-width: 599px) { .lib-covers strong { font-size: 1rem; } .lib-covers a > span:not([class]) { font-size: .85rem; } }

/* App shells (/character/): the next steps under the builder. */
.shell-next { border-top: 1px solid var(--fk-line); }
.shell-next h2 { margin-bottom: 24px; }
.shell-next-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.shell-card { display: grid; gap: 8px; align-content: start; padding: 24px; min-height: 44px; border: 1px solid var(--fk-line); border-radius: var(--fk-radius); background: var(--fk-surface); color: var(--fk-text); text-decoration: none; transition: border-color .15s; }
.shell-card:hover { border-color: var(--bronze); }
.shell-card:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.shell-card strong { font-family: var(--fk-font-head); font-weight: 400; font-size: 1.2rem; color: var(--parchment); }
.shell-card span { color: var(--fk-muted); }
.shell-card em { font-style: normal; color: var(--bronze); margin-top: 4px; }
.shell-buy { margin: 28px 0 0; }
@media (prefers-reduced-motion: reduce) { .shell-card { transition: none; } }

/* /the-app/ */
.fk-tool-hero .fk-hero-tool img { display: block; width: 100%; height: auto; }
.app-classes, .app-devices, .app-own { padding-block: 64px; border-top: 1px solid var(--fk-line); }
.app-classes .fk-head p { color: var(--fk-muted); max-width: 40rem; }
.app-class-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .app-class-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .app-class-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.app-class-list a { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; min-height: 44px; height: 100%; padding: 16px; border: 1px solid var(--fk-line); border-radius: var(--fk-radius); background: var(--fk-surface); color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.app-class-list a:hover, .app-class-list a:focus-visible { border-color: var(--bronze); transform: translateY(-2px); }
.app-die { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--bronze); border-radius: 10px; color: var(--bronze); font-family: var(--fk-font-head); font-size: .95rem; }
.app-class-list strong { font-family: var(--fk-font-head); font-weight: 400; font-size: 1.15rem; color: var(--parchment); }
.app-class-list a > span:last-child { color: var(--fk-muted); font-size: .85rem; line-height: 1.4; }
@media (max-width: 520px) { .app-class-list a { grid-template-columns: 1fr; justify-items: start; padding: 14px; } .app-die { grid-row: auto; width: 40px; height: 40px; } .app-class-list a > span:last-child { display: none; } }
#app-tabs .fk-ft-media > div { aspect-ratio: auto; }
#app-tabs .fk-ft-media .fk-media { display: block; width: 100%; height: auto; object-fit: contain; }
.app-devices { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .app-devices { grid-template-columns: 1.2fr 1fr; } }
.app-devices h2, .app-own h2 { font-family: var(--fk-font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; margin: .2em 0 .5em; }
.app-devices-copy > p { color: var(--fk-muted); max-width: 36rem; }
.app-ticks { list-style: none; margin: 20px 0 28px; padding: 0; }
.app-ticks li { padding: 10px 0; border-bottom: 1px solid var(--fk-line); color: var(--fk-muted); }
.app-ticks strong { color: var(--parchment); font-weight: 600; }
.app-phone { margin: 0 auto; max-width: 300px; }
.app-phone img { display: block; width: 100%; height: auto; border-radius: 40px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.app-own-grid { display: grid; gap: 16px; margin: 8px 0 32px; }
@media (min-width: 800px) { .app-own-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.app-own-grid article { padding: 20px; border: 1px solid var(--fk-line); border-radius: var(--fk-radius); background: var(--fk-surface); }
.app-own-grid h3 { font-family: var(--fk-font-head); font-weight: 400; font-size: 1.15rem; color: var(--bronze); margin: 0 0 8px; }
.app-own-grid p { margin: 0; color: var(--fk-muted); font-size: .95rem; }
.app-own .fk-row { flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .app-class-list a { transition: none; } }

/* /roll/ */
.shell-note { margin: 20px 0 0; color: var(--fk-muted); }
.shell-note a { color: var(--bronze); }

/* /sign-in/ */
.si { display: grid; gap: 40px; align-items: center; padding-block: 48px 64px; }
@media (min-width: 900px) { .si { grid-template-columns: 1fr 1fr; gap: 64px; min-height: min(86svh, 900px); } }
.si-art { margin: 0; border-radius: var(--fk-radius); overflow: hidden; border: 1px solid var(--fk-line); }
.si-art img { display: block; width: 100%; height: 100%; max-height: 760px; object-fit: cover; object-position: 50% 40%; }
@media (max-width: 899px) { .si-art { order: 2; } .si-art img { aspect-ratio: 16 / 9; } }
.si-col { max-width: 26rem; width: 100%; }
.si-col h1, .si-col .si-h1 { font-family: var(--fk-font-head); font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 24px; }
.si-btn { display: flex; align-items: stretch; min-height: 60px; border-radius: var(--fk-radius); background: var(--bronze); color: var(--obsidian); text-decoration: none; font-weight: 600; font-size: 1.1rem; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .8); transition: transform .2s, filter .2s; }
.si-btn > span:last-child { display: flex; align-items: center; padding: 0 22px; }
.si-btn-mark { display: grid; place-items: center; width: 60px; flex: none; margin: 3px; border-radius: calc(var(--fk-radius) - 2px); background: var(--obsidian); color: var(--bronze); }
.si-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.si-btn:focus-visible { outline: 2px solid var(--parchment); outline-offset: 3px; }
.si-new { margin: 18px 0 0; color: var(--fk-muted); }
.si-new strong { color: var(--parchment); }
.si-rule { border: 0; height: 2px; width: 40%; margin: 32px auto; background: linear-gradient(90deg, transparent, var(--bronze), transparent); opacity: .6; }
.si-col h2:not(.si-h1) { font-family: var(--fk-font-head); font-weight: 400; font-size: 1.2rem; color: var(--bronze); margin: 0 0 12px; }
.si-keeps { list-style: none; margin: 0; padding: 0; }
.si-keeps li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--fk-line); }
.si-keeps svg { flex: none; color: var(--bronze); margin-top: 2px; }
.si-keeps strong { display: block; color: var(--parchment); font-weight: 600; }
.si-keeps span { color: var(--fk-muted); font-size: .95rem; }
.si-free { margin: 20px 0 0; color: var(--fk-muted); font-size: .95rem; }
.si-free a, .si-help a { color: var(--bronze); }
.si-col .fk-row { flex-wrap: wrap; margin-top: 24px; }
.si-help { margin: 40px 0 0; font-size: .85rem; color: var(--fk-muted); }
@media (prefers-reduced-motion: reduce) { .si-btn { transition: none; } }

/* /404.html: the old page's d20 + quotes over the dragon, then the tools. */
.nf { position: relative; overflow: hidden; display: grid; place-items: center; min-height: min(88svh, 900px); padding-block: 64px; text-align: center; }
.nf-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.nf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--obsidian), transparent 70%); }
.nf-col { position: relative; z-index: 1; display: grid; justify-items: center; gap: 16px; max-width: 44rem; }
.nf .fk-pre { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.nf h1 { font-family: var(--fk-font-head); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0; }
.nf-lead { margin: 0; color: var(--fk-muted); font-size: 1.1rem; }
.nf-row { flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.d20 { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 160px; height: 160px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.d20:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; border-radius: 50%; }
.d20 svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.d20-poly { fill: color-mix(in oklab, var(--bronze) 12%, transparent); stroke: var(--bronze); stroke-width: 2.5; }
.d20-facet { fill: none; stroke: color-mix(in oklab, var(--bronze) 45%, transparent); stroke-width: 1.25; }
.d20-num { position: relative; font-family: var(--fk-font-head); font-size: 2.6rem; line-height: 1; color: var(--parchment); }
.d20.rolling { animation: d20spin 1.2s cubic-bezier(.22,.9,.28,1); }
@keyframes d20spin { 55% { transform: rotate3d(1,1,0,760deg) scale(1.1); } 100% { transform: rotate3d(1,1,0,1080deg); } }
.quote-wrap { margin: 0; max-width: min(40ch, 90vw); min-height: 6.5em; transition: opacity .25s; }
.quote-wrap.fade { opacity: 0; }
.quote-wrap blockquote { margin: 0; font-family: var(--fk-font-head); font-size: clamp(1.2rem, 2.4vw, 1.6rem); line-height: 1.35; color: var(--parchment); overflow-wrap: break-word; }
.quote-wrap figcaption { margin-top: 10px; font-size: .9rem; color: var(--fk-muted); }
@media (prefers-reduced-motion: reduce) { .d20.rolling { animation: none; } .quote-wrap { transition: none; } }
@media (min-width: 900px) { .nf-next .shell-next-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
