:root {
    --bg: #fff;
    --fg: #111;
    --muted: #6f6f6f;
    --line: #ebebeb;
    --soft: #f6f6f6;
    color-scheme: light
}

:root[data-theme=dark] {
    --bg: #0d0d0d;
    --fg: #ededed;
    --muted: #8a8a8a;
    --line: #222;
    --soft: #161616;
    color-scheme: dark
}

* {
    box-sizing: border-box;
    margin: 0
}

html {
    scrollbar-gutter: stable
}

body {
    background: var(--bg);
    color: var(--fg);
    font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased
}

main {
    max-width: 560px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 72px 24px 48px;
    display: flex;
    flex-direction: column
}

a {
    color: inherit;
    text-decoration: none
}

svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 28px;
    margin-bottom: 32px
}

h2 {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    margin: 48px 0 8px
}

p {
    color: var(--muted);
    margin-bottom: 12px
}

.lead {
    color: var(--fg)
}

small {
    color: var(--muted);
    font-size: inherit
}

main {
    animation: in .4s ease both
}

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    list-style: none;
    padding: 0
}

.crumbs li+li::before {
    content: "/";
    color: var(--muted);
    margin-right: 8px
}

.crumbs a {
    color: var(--muted);
    transition: color .15s
}

.crumbs a:hover {
    color: var(--fg)
}

.crumbs li:first-child {
    font-weight: 600;
    letter-spacing: -.01em
}

.crumbs [aria-current] {
    color: var(--fg)
}

.icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    transition: background .15s
}

.icon:hover {
    background: var(--soft)
}

#theme {
    margin-right: -6px
}

#theme .moon,
[data-theme=dark] #theme .sun {
    display: none
}

[data-theme=dark] #theme .moon {
    display: block
}

.pages {
    display: flex;
    gap: 16px;
    margin-top: 20px
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 4px
}

.links a,
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    transition: color .15s
}

.links a:hover,
.btn:hover {
    color: var(--fg)
}

.list {
    list-style: none;
    padding: 0
}

.list a,
.list button {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 6px 0;
    text-align: left;
    transition: opacity .15s
}

.list:hover :is(a, button) {
    opacity: .45
}

.list :is(a, button):hover {
    opacity: 1
}

.post .title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.3;
    color: var(--fg);
    margin: 0 0 4px
}

.post small {
    display: block;
    margin-bottom: 24px
}

.post p {
    color: var(--fg)
}

dialog {
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    width: min(420px, 100%);
    height: 100dvh;
    max-height: none;
    padding: 24px;
    border: 0;
    border-left: 1px solid var(--line);
    background: var(--bg);
    color: var(--fg);
    overflow: auto;
    transform: translateX(100%);
    transition: transform .25s ease, overlay .25s allow-discrete, display .25s allow-discrete
}

dialog[open] {
    transform: none
}

@starting-style {
    dialog[open] {
        transform: translateX(100%)
    }
}

dialog::backdrop {
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .25s, overlay .25s allow-discrete, display .25s allow-discrete
}

dialog[open]::backdrop {
    opacity: 1
}

@starting-style {
    dialog[open]::backdrop {
        opacity: 0
    }
}

@media(max-width:600px) {
    dialog {
        inset: auto 0 0 0;
        width: 100%;
        height: auto;
        max-height: 88dvh;
        border: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%)
    }

    @starting-style {
        dialog[open] {
            transform: translateY(100%)
        }
    }
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px
}

.top h3 {
    font-size: 15px;
    font-weight: 600
}

.thumb {
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--soft) repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0/16px 16px
}

.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px
}

.tags span {
    font-size: 13px;
    color: var(--muted);
    background: var(--soft);
    padding: 1px 8px;
    border-radius: 99px
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px
}

.actions .btn {
    color: var(--fg)
}

.actions .btn:hover {
    opacity: .6
}

footer {
    margin-top: auto;
    padding-top: 72px;
    color: var(--muted);
    font-size: 13px
}

:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 3px;
    border-radius: 2px
}

::selection {
    background: var(--fg);
    color: var(--bg)
}

@keyframes in {
    from {
        opacity: 0
    }
}

#view {
    view-transition-name: view
}

::view-transition-group(root) {
    animation: none
}

::view-transition-old(view),
::view-transition-new(view) {
    animation-duration: .18s
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}