/* Catalog style "demo17" — the album as a constellation: round planets drifting on a dark forest ground around the DEPO eye, Red Hat Display. Mirrors /demo17/. */
@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@500;700;800;900&family=Red+Hat+Text:wght@400;500;700&display=swap");

:root {
    --ground: #0c1811;
    --ground-2: #122219;
    --ground-3: #173022;
    --ink: #eeeee4;
    --soft: #b9bfae;
    --mute: #8a998c;
    --green: #469a58;
    --green-hi: #7cc58a;
    --yellow: #ffb500;
    --display: "Red Hat Display", system-ui, sans-serif;
    --text: "Red Hat Text", system-ui, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --edge: clamp(16px, 3vw, 48px);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; overflow-x: hidden; color: var(--ink); font: 400 16px/1.6 var(--text);
    background: radial-gradient(ellipse 70% 50% at 50% 0%, #173022 0%, rgb(23 48 34 / 0) 70%), var(--ground);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 500 0.86em/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 18px; border-radius: 999px; background: var(--yellow); color: var(--ground); font-weight: 700; }
.skip:focus { left: 16px; }

.page { position: relative; max-width: 1480px; margin: 0 auto; padding: 0 var(--edge); overflow-x: clip; }

/* ── orbits: three rings around the masthead ──────────────────────────────────────────────── */
.deco { position: absolute; left: 50%; border: 1px solid rgb(238 238 228 / 0.1); border-radius: 50%; pointer-events: none; translate: -50% 0; transform: rotateX(68deg); }
.deco--1 { top: 40px; width: min(520px, 120vw); aspect-ratio: 1; }
.deco--2 { top: -60px; width: min(820px, 160vw); aspect-ratio: 1; border-color: rgb(124 197 138 / 0.14); }
.deco--3 { top: -170px; width: min(1160px, 200vw); aspect-ratio: 1; border-style: dashed; border-color: rgb(238 238 228 / 0.07); }
.deco--1::after, .deco--2::after {
    content: ""; position: absolute; top: 50%; left: -5px; width: 10px; height: 10px; border-radius: 50%;
    background: var(--yellow); box-shadow: 0 0 18px rgb(255 181 0 / 0.6);
}
.deco--2::after { left: auto; right: -4px; top: 30%; width: 8px; height: 8px; background: var(--green-hi); box-shadow: 0 0 14px rgb(124 197 138 / 0.6); }
.catalog--list .deco, .catalog--post .deco { animation: orbit 60s linear infinite; }
.deco--2 { animation-duration: 90s !important; animation-direction: reverse !important; }
@keyframes orbit { to { transform: rotateX(68deg) rotateZ(360deg); } }

/* ── masthead: the eye at the centre ──────────────────────────────────────────────────────── */
.masthead { position: relative; padding: clamp(48px, 8vw, 104px) 0 36px; text-align: center; }
.masthead__inner { display: flex; flex-direction: column; align-items: center; }
.brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.brand::before {
    content: ""; width: clamp(84px, 10vw, 128px); aspect-ratio: 300 / 212; margin-bottom: 18px;
    background: url("/_img/site/logo/logo.png") center / contain no-repeat;
    filter: drop-shadow(0 0 30px rgb(70 154 88 / 0.45));
}
.brand__mark { font: 900 clamp(72px, 13vw, 176px)/0.86 var(--display); letter-spacing: -0.05em; }
.brand__name { margin-top: 10px; font: 700 clamp(20px, 2.2vw, 28px)/1.1 var(--display); letter-spacing: -0.01em; color: var(--green-hi); }
.masthead__tagline { max-width: 44ch; margin: 18px auto 0; color: var(--soft); font-size: 18px; }
.masthead__count { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 7px 16px; border-radius: 999px; background: var(--ground-3); color: var(--soft); font-size: 15px; }
.masthead__num { color: var(--yellow); font: 800 18px/1 var(--display); }

/* ── style bar: a floating panel ──────────────────────────────────────────────────────────── */
.stylebar { position: relative; max-width: 980px; margin: 8px auto 0; padding: 16px 18px; border-radius: 20px; background: var(--ground-2); box-shadow: inset 0 0 0 1px rgb(238 238 228 / 0.07); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.stylebar__label { font: 800 15px/1 var(--display); color: var(--green-hi); }
.stylebar__value { flex: 1 1 240px; min-width: 0; padding: 10px 14px; overflow-x: auto; white-space: nowrap; border-radius: 12px; background: var(--ground); color: var(--ink); }
.stylebar__copy { min-height: 44px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ground); font: 800 15px/1 var(--display); cursor: pointer; transition: transform 160ms ease, background 200ms ease; }
.stylebar__copy:hover { background: var(--ink); }
.stylebar__copy:active { transform: scale(0.96); }
.stylebar__copy.is-done { background: var(--green-hi); }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.stylebar__item { padding: 4px 12px; border-radius: 999px; background: var(--ground-3); color: var(--soft); font-size: 13px; text-decoration: none; }
.stylebar__item:hover { color: var(--ink); }
.stylebar__item.is-active { background: var(--green); color: #fff; }

/* ── categories: role pills ───────────────────────────────────────────────────────────────── */
.categories { position: relative; margin: 36px 0 0; }
.categories__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.categories__link { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 999px; background: var(--ground-3); font: 700 16px/1 var(--display); text-decoration: none; transition: background 200ms ease, color 200ms ease; }
.categories__link:hover { background: #1f3d2c; }
.categories__link.is-active { background: var(--ink); color: var(--ground); }
.categories__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: rgb(0 0 0 / 0.25); font: 700 12px/1 var(--text); }
.categories__link.is-active .categories__count { background: var(--yellow); color: var(--ground); }

/* ── listing header ───────────────────────────────────────────────────────────────────────── */
.content { position: relative; padding: 48px 0 96px; }
.listing__header { margin-bottom: 56px; text-align: center; }
.listing__title { margin: 0; font: 800 clamp(40px, 5vw, 76px)/0.98 var(--display); letter-spacing: -0.035em; }
.listing__intro { max-width: 52ch; margin: 14px auto 0; color: var(--soft); font-size: 18px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; margin-top: 22px; color: var(--soft); }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 6px; }
.toolbar__label { margin-right: 6px; }
.toolbar__opt { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(238 238 228 / 0.2); font: 700 14px/1 var(--display); text-decoration: none; }
.toolbar__opt:hover { box-shadow: inset 0 0 0 1px var(--green-hi); }
.toolbar__opt.is-active { background: var(--green); box-shadow: none; color: #fff; }

/* ── the constellation: round planets, drifting columns ───────────────────────────────────── */
.listing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px clamp(28px, 4vw, 72px); }
@media (min-width: 1000px) {
    .post--card:nth-child(3n + 2) { translate: 0 96px; }
    .post--card:nth-child(3n + 3) { translate: 0 36px; }
    .listing { padding-bottom: 96px; }
}
.post--card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.post__media {
    position: relative; display: block; width: 78%; aspect-ratio: 1; border-radius: 50%;
    background: var(--ground-3); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.7);
}
.post__media::before { /* the planet's own orbit */
    content: ""; position: absolute; inset: -16px; border: 1px dashed rgb(124 197 138 / 0.35); border-radius: 50%;
    transition: inset 500ms var(--ease), border-color 300ms ease;
}
.post__media::after { /* its moon */
    content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%;
    background: var(--yellow); transform: rotate(-40deg) translateX(calc(39cqw + 16px));
}
.post--card { container-type: inline-size; }
.post__thumb { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top center; transition: scale 600ms var(--ease); }
.post--card:hover .post__thumb { scale: 1.04; }
.post--card:hover .post__media::before { inset: -24px; border-color: var(--green-hi); }
.post--card:hover .post__media::after { animation: moon 2.4s linear infinite; }
@keyframes moon { from { transform: rotate(-40deg) translateX(calc(39cqw + 16px)); } to { transform: rotate(320deg) translateX(calc(39cqw + 16px)); } }

.post__body { display: flex; flex-direction: column; align-items: center; padding: 34px 6px 0; }
.post__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; margin: 0 0 10px; color: var(--mute); font-size: 14px; }
.post__num { padding: 4px 11px; border-radius: 999px; background: var(--ground-3); color: var(--ink); font: 700 13px/1.2 var(--display); }
.post__cat { color: var(--green-hi); font-weight: 500; text-decoration: none; }
.post__cat:hover { text-decoration: underline; text-underline-offset: 4px; }
.post__title { margin: 0 0 10px; font: 800 clamp(28px, 2.6vw, 40px)/1 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-color: var(--green-hi); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.post__excerpt { max-width: 42ch; margin: 0 0 20px; color: var(--soft); text-wrap: pretty; }
.post__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 20px; margin: auto 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px; border-radius: 999px; font: 700 15px/1 var(--display); text-decoration: none; transition: background 200ms ease, color 200ms ease, transform 160ms ease; }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--yellow); color: var(--ground); }
.btn--primary:hover { background: var(--ink); }
.post__more { padding: 0; min-height: 44px; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.post__more:hover { text-decoration-color: var(--green-hi); }

/* ── pager ────────────────────────────────────────────────────────────────────────────────── */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 72px; }
.pager__link { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; border-radius: 999px; background: var(--ground-3); font: 700 15px/1 var(--display); text-decoration: none; }
.pager__link:hover { background: #1f3d2c; }
.pager__link.is-active { background: var(--ink); color: var(--ground); }
.pager__link--prev, .pager__link--next { padding: 0 22px; }

/* ── one post ─────────────────────────────────────────────────────────────────────────────── */
.post--full { max-width: 1180px; margin: 0 auto; }
.post--full .post__header { max-width: 900px; margin: 0 auto; padding: 0 0 48px; text-align: center; }
.post--full .post__meta { justify-content: center; }
.post--full .post__title { margin-bottom: 20px; font-size: clamp(52px, 8vw, 124px); font-weight: 800; line-height: 0.94; letter-spacing: -0.045em; }
.post--full .post__excerpt { max-width: 58ch; margin: 0 auto 28px; font-size: 19px; }
.post--full .post__actions { justify-content: center; }
.post--full .post__back { background: var(--ground-3); }
.post--full .post__back:hover { background: #1f3d2c; }

.post__shot { position: relative; margin: 0 0 64px; }
.post__shot::before { /* a wide ring behind the screenshot */
    content: ""; position: absolute; left: 50%; top: -40px; width: 120%; aspect-ratio: 1; translate: -50% 0; z-index: -1;
    border: 1px solid rgb(124 197 138 / 0.12); border-radius: 50%; transform: rotateX(72deg);
}
.post__zoom { display: block; max-height: 760px; overflow: hidden; border-radius: 6px; cursor: zoom-in; box-shadow: 0 40px 100px -30px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(238 238 228 / 0.08); }
.post__zoom img { width: 100%; }
.post__caption { margin-top: 14px; color: var(--mute); font-size: 14px; text-align: center; }

.doc { max-width: 820px; margin: 0 auto; font-size: 17px; color: var(--soft); }
/* docs write "## Section", which the renderer prints as <h3>: h2 and h3 are both section heads */
.doc h2, .doc h3 { position: relative; margin: 64px 0 16px; padding-left: 26px; font: 800 clamp(30px, 3vw, 46px)/1 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.doc h2::before, .doc h3::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 6px rgb(255 181 0 / 0.14); }
.doc h2:first-child, .doc h3:first-child { margin-top: 0; }
.doc h4 { margin: 32px 0 8px; font: 700 21px/1.2 var(--display); color: var(--ink); }
.doc h5, .doc h6 { margin: 24px 0 6px; font: 700 17px/1.3 var(--display); color: var(--ink); }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc ul { padding-left: 0; list-style: none; }
.doc ul li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.doc ul li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.doc strong { color: var(--ink); }
.doc a { color: var(--green-hi); text-underline-offset: 4px; }
.doc a:hover { color: var(--ink); }
.doc code { padding: 2px 7px; border-radius: 6px; background: var(--ground-3); color: var(--ink); overflow-wrap: anywhere; }
.doc pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; border-radius: 14px; background: #08110c; box-shadow: inset 0 0 0 1px rgb(238 238 228 / 0.08); color: var(--ink); }
.doc pre code { padding: 0; background: none; overflow-wrap: normal; }
.doc blockquote { margin: 0 0 20px; padding: 18px 22px; border-radius: 16px; background: var(--ground-2); color: var(--ink); }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc hr { margin: 40px 0; border: 0; border-top: 1px solid var(--ground-3); }
.doc-table { margin: 0 0 20px; overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--ground-3); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 11px 14px; text-align: left; vertical-align: top; }
.doc th { background: var(--ground-3); color: var(--ink); font: 700 14px/1.3 var(--display); }
.doc tbody tr:nth-child(even) { background: var(--ground-2); }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; margin: 48px auto 0; padding: 0; list-style: none; }
.tags__item { padding: 6px 14px; border-radius: 999px; background: var(--ground-3); color: var(--ink); font: 500 14px/1.2 var(--text); }

.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 820px; margin: 56px auto 0; }
.post__nav-link { display: block; padding: 20px 24px; border-radius: 20px; background: var(--ground-2); font: 800 22px/1.15 var(--display); letter-spacing: -0.02em; text-decoration: none; transition: background 200ms ease; }
.post__nav-link:hover { background: var(--ground-3); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 6px; color: var(--green-hi); font: 500 14px/1 var(--text); }

/* ── notice, colophon ─────────────────────────────────────────────────────────────────────── */
.notice { max-width: 620px; margin: 0 auto; padding: 28px 32px; border-radius: 24px; background: var(--ground-2); text-align: center; font-size: 18px; }
.notice p { margin: 0; }
.notice a { color: var(--green-hi); text-underline-offset: 4px; }
.notice--error { box-shadow: inset 0 0 0 2px #e0645a; color: #ffd2cd; }

.colophon { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px 0 48px; border-top: 1px solid var(--ground-3); color: var(--mute); font-size: 14px; }
.colophon p { margin: 0; }
.colophon code { color: var(--ink); }
.colophon a { color: var(--green-hi); text-underline-offset: 4px; }

/* ── screenshot dialog ────────────────────────────────────────────────────────────────────── */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 18px; background: var(--ground); color: var(--ink); box-shadow: 0 0 0 1px var(--ground-3); }
.zoom::backdrop { background: rgb(4 10 6 / 0.88); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: var(--ground); }
.zoom__close { min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ground); font: 800 15px/1 var(--display); cursor: pointer; }
.zoom__scroll { height: calc(94vh - 64px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 999px) {
    .listing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .listing { grid-template-columns: 1fr; gap: 64px; }
    .post__media { width: 72%; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; }
    .doc h2, .doc h3 { padding-left: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* long words and URLs in the doc and comments wrap instead of widening the page */
.doc p, .doc li, .doc blockquote, .doc td, .doc th, .comment__body { overflow-wrap: anywhere; }
.doc pre, .doc-table { max-width: 100%; }
