@font-face {
    font-family: "Mochiy Pop One";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/MochiyPopOne-400-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Sniglet";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/Sniglet-400-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Sniglet";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/Sniglet-400-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Sniglet";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/static/fonts/Sniglet-800-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Sniglet";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/static/fonts/Sniglet-800-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Mochi Boom";
    src: url("/static/fonts/MochiBoom.woff2") format("woff2"),
        url("/static/fonts/MochiBoom.otf") format("opentype"),
        url("/static/fonts/MochiBoom.ttf") format("truetype");
    font-display: swap;
}

:root {
    --bg: #0a0a0a;
    --bg-2: #0f0f0f;
    --surface: #131313;
    --surface-2: #1a1a1a;
    --border: #232323;
    --border-2: #2e2e2e;
    --text: #ece9e1;
    --text-2: #b9b5ab;
    --muted: #7d7a73;
    --yellow: #ffd400;
    --yellow-2: #ffe14d;
    --yellow-dim: rgba(255, 212, 0, 0.12);
    --yellow-glow: rgba(255, 212, 0, 0.45);
    --cell-0: #262626;
    --cell-1: #c9a400;
    --cell-2: #e8be00;
    --cell-3: #ffd400;
    --cell-4: #ffe14d;
    --green: #9be564;
    --orange: #ff9f43;
    --radius: 14px;
    --font-head: "Mochi Boom", "Mochiy Pop One", "Sniglet", system-ui, sans-serif;
    --font-body: "Sniglet", "Mochiy Pop One", system-ui, sans-serif;
    --font-code: "M PLUS 1 Code", ui-monospace, monospace;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(255, 212, 0, 0.07), transparent 60%),
        linear-gradient(var(--bg), var(--bg));
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--yellow);
    color: #000;
}

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

code,
pre {
    font-family: var(--font-code);
}

.muted {
    color: var(--muted);
}

.accent,
.hl {
    color: var(--yellow);
}

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.main {
    flex: 1;
    padding-top: 32px;
    padding-bottom: 80px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(10, 10, 10, 0.78);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-size: 15px;
    letter-spacing: 0;
}

.brand b {
    color: var(--yellow);
    font-weight: 400;
}

.brand-mark {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--yellow);
    box-shadow: 0 0 18px var(--yellow-glow);
    transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
    transform: rotate(45deg);
}

.nav {
    display: flex;
    gap: 22px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-2);
}

.nav a:hover {
    color: var(--yellow);
}

.site-footer {
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-2);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    padding-bottom: 24px;
}


.kicker {
    margin: 0 0 8px;
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0;
    color: var(--yellow);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.hero {
    padding: 36px 0 40px;
}

.hero-title {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    letter-spacing: 0;
    font-weight: 400;
    max-width: 880px;
}

.hl {
    position: relative;
    white-space: nowrap;
}

.hl::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: 0.06em;
    height: 0.18em;
    background: var(--yellow);
    opacity: 0.25;
    border-radius: 2px;
}

.hero-sub {
    max-width: 620px;
    margin: 20px 0 0;
    color: var(--text-2);
    font-size: 18px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 28px;
    font-size: 13px;
    color: var(--muted);
}

.hero-stats b {
    color: var(--text);
    font-weight: 700;
}

.graph-card {
    padding: 26px 26px 20px;
    position: relative;
    overflow: hidden;
}

.graph-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--yellow), transparent);
    opacity: 0.6;
}

.graph-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.graph-title {
    margin: 0;
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0;
}

.year-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    font-family: var(--font-body);
    font-size: 12px;
}

.year-tabs a {
    padding: 5px 10px;
    border-radius: 7px;
    color: var(--muted);
    border: 1px solid transparent;
}

.year-tabs a:hover {
    color: var(--text);
}

.year-tabs a.active {
    color: #000;
    background: var(--yellow);
    font-weight: 700;
}

.graph-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-2) transparent;
}

.graph {
    --cell: 20px;
    --gap: 4px;
    display: grid;
    grid-template-columns: 30px auto;
    grid-template-rows: auto auto;
    column-gap: 6px;
    row-gap: 6px;
    width: max-content;
    margin: 0 auto;
}

.graph-months {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(var(--cols), var(--cell));
    column-gap: var(--gap);
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--muted);
    height: 14px;
}

.graph-months span {
    white-space: nowrap;
}

.graph-days {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-rows: repeat(7, var(--cell));
    row-gap: var(--gap);
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--muted);
    line-height: var(--cell);
}

.graph-grid {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, var(--cell));
    grid-auto-columns: var(--cell);
    gap: var(--gap);
}

.cg-cell {
    display: block;
    width: var(--cell, 13px);
    height: var(--cell, 13px);
    border-radius: 5px;
    background: var(--cell-0);
    outline: 1px solid rgba(255, 255, 255, 0.025);
    outline-offset: -1px;
}

.cg-pad {
    background: transparent;
    outline: none;
}

.cg-l1 {
    background: var(--cell-1);
}

.cg-l2 {
    background: var(--cell-2);
}

.cg-l3 {
    background: var(--cell-3);
}

.cg-l4 {
    background: var(--cell-4);
    box-shadow: 0 0 10px var(--yellow-glow);
}

a.cg-cell {
    box-shadow: 0 0 8px rgba(255, 212, 0, 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a.cg-cell:hover {
    transform: scale(1.35);
    box-shadow: 0 0 16px var(--yellow-glow);
    z-index: 2;
    position: relative;
}

span.cg-l0:hover {
    background: #303030;
}

.cg-today {
    outline: 1px solid var(--text-2);
    outline-offset: 1px;
}

.graph-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-2);
}

.streaks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.stat-num {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 400;
    color: var(--yellow);
    line-height: 1;
}

.stat-label {
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--muted);
}

.legend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--muted);
}

.legend .cg-cell {
    --cell: 11px;
}

.legend span:first-child {
    margin-right: 4px;
}

.legend span:last-child {
    margin-left: 4px;
}

.tooltip {
    position: fixed;
    z-index: 100;
    pointer-events: none;
    background: #000;
    border: 1px solid var(--border-2);
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 12px;
    font-family: var(--font-body);
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    max-width: 280px;
    transform: translate(-50%, calc(-100% - 10px));
}

.tooltip b {
    color: var(--yellow);
}

.tooltip ul {
    margin: 6px 0 0;
    padding: 0 0 0 14px;
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 13px;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
    margin-top: 48px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-head);
    font-size: 24px;
    letter-spacing: 0;
}

.section-head .muted {
    font-size: 12px;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-card {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.post-card:hover {
    border-color: rgba(255, 212, 0, 0.5);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.post-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.post-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 64px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--bg-2);
}

.d-day {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 400;
    color: var(--yellow);
    line-height: 1;
}

.d-rest {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
    letter-spacing: 0;
}

.post-card-title {
    margin: 0;
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.25;
}

.post-card:hover .post-card-title {
    color: var(--yellow);
}

.post-card-desc {
    margin: 6px 0 0;
    color: var(--text-2);
    font-size: 15px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 12px;
    font-size: 12px;
}

.meta a {
    position: relative;
    z-index: 2;
}

.tag {
    color: var(--text-2);
}

.tag:hover {
    color: var(--yellow);
}

.chip {
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    color: var(--text-2);
}

.chip-sim {
    color: var(--yellow);
    border-color: rgba(255, 212, 0, 0.35);
    background: var(--yellow-dim);
}

.badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    border: 1px solid currentColor;
    font-family: var(--font-body);
}

.badge-solved {
    color: var(--green);
}

.badge-partial {
    color: var(--orange);
}

.badge-open {
    color: var(--yellow);
}

.badge-draft {
    color: var(--muted);
    border-style: dashed;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 46px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-2);
    transition: all 0.15s ease;
}

.tag-pill span {
    color: var(--muted);
}

.tag-pill:hover {
    color: #000;
    background: var(--yellow);
    border-color: var(--yellow);
}

.tag-pill:hover span {
    color: rgba(0, 0, 0, 0.6);
}

.status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: var(--text-2);
}

.status-list .badge {
    margin-right: 8px;
}

.empty {
    color: var(--muted);
}

.page-head {
    padding: 20px 0 28px;
}

.page-title {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(32px, 5vw, 46px);
    letter-spacing: 0;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-dir {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-nav-link.right .nav-dir {
    align-self: flex-end;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px 5px 8px;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--muted);
}

.back:hover {
    color: #000;
    background: var(--yellow);
    border-color: var(--yellow);
}

.post {
    max-width: 760px;
    margin: 0 auto;
}

.post-head {
    padding: 12px 0 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.post-head .meta {
    margin-top: 0;
    margin-bottom: 14px;
}

.post-head .meta a:hover {
    color: var(--yellow);
}

.post-title {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(32px, 5.5vw, 50px);
    line-height: 1.08;
    letter-spacing: 0;
}

.post-desc {
    margin: 14px 0 0;
    font-size: 19px;
    color: var(--text-2);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.problem {
    position: relative;
    margin: 0 0 36px;
    padding: 24px 24px 8px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 212, 0, 0.09), rgba(255, 212, 0, 0.02));
    border: 1px solid rgba(255, 212, 0, 0.35);
}

.problem-label {
    position: absolute;
    top: -10px;
    left: 18px;
    padding: 1px 10px;
    border-radius: 6px;
    background: var(--yellow);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.prose {
    font-size: 17.5px;
    color: var(--text);
}

.prose> :first-child {
    margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
    font-family: var(--font-head);
    letter-spacing: 0;
    line-height: 1.25;
    margin: 2.2em 0 0.6em;
}

.prose h2 {
    font-size: 28px;
}

.prose h2::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 12px;
    border-radius: 2px;
    background: var(--yellow);
    vertical-align: 0.15em;
}

.prose h3 {
    font-size: 22px;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0 0 1.2em;
}

.prose li {
    margin: 0.3em 0;
}

.prose li::marker {
    color: var(--yellow);
}

.prose a {
    color: var(--yellow);
    border-bottom: 1px solid rgba(255, 212, 0, 0.35);
}

.prose a:hover {
    border-bottom-color: var(--yellow);
}

.prose strong {
    color: #fff;
}

.prose blockquote {
    margin: 1.5em 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--yellow);
    color: var(--text-2);
    font-style: italic;
}

.prose hr {
    border: none;
    height: 1px;
    background: var(--border-2);
    margin: 2.5em 0;
}

.prose img {
    max-width: 100%;
    border-radius: 10px;
}

.prose :not(pre)>code {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.86em;
    color: var(--yellow-2);
}

.prose pre {
    margin: 1.6em 0;
    padding: 0;
    border-radius: 12px;
    background: #070707;
    border: 1px solid var(--border);
    overflow: hidden;
}

.prose pre code {
    display: block;
    padding: 18px 20px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    background: transparent !important;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 15px;
}

.prose th,
.prose td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.prose th {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0;
    color: var(--yellow);
}

.prose .footnote-definition {
    font-size: 14px;
    color: var(--text-2);
}

.math-display {
    display: block;
    margin: 1.6em 0;
    padding: 6px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    text-align: center;
}

.katex {
    font-size: 1.1em;
}

.katex-display {
    margin: 0;
}

.sim {
    margin: 2em 0;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    background: #070707;
    overflow: hidden;
}

.sim-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-2);
}

.sim-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 10px var(--yellow-glow);
    animation: pulse 2s ease-in-out infinite;
}

.sim.paused .sim-dot {
    animation: none;
    opacity: 0.4;
}

@keyframes pulse {
    50% {
        opacity: 0.35;
    }
}

.sim-stage {
    position: relative;
    height: var(--sim-h, 380px);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    touch-action: none;
}

.sim-stage canvas {
    position: absolute;
    inset: 0;
    display: block;
}

.sim-loading,
.sim-error {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--muted);
}

.sim-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.sim-error {
    margin: 1.5em 0;
    padding: 14px 16px;
    border: 1px dashed #ff6b6b;
    border-radius: 10px;
    color: #ff8a8a;
}

.sim-hud {
    position: absolute;
    top: 12px;
    left: 14px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-2);
    pointer-events: none;
    line-height: 1.6;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(7, 7, 7, 0.72);
    z-index: 1;
}

.sim-hud b {
    color: var(--yellow);
    font-weight: 400;
}

.sim-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-2);
}

.sim-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sim-control output {
    min-width: 42px;
    color: var(--yellow);
}

.sim-control input[type="range"] {
    width: 120px;
    accent-color: var(--yellow);
}

.sim-btn,
.btn {
    display: inline-block;
    padding: 6px 13px;
    border-radius: 8px;
    border: 1px solid var(--yellow);
    background: transparent;
    color: var(--yellow);
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sim-btn:hover,
.btn:hover,
.sim-btn.primary {
    background: var(--yellow);
    color: #000;
}

.sim-btn.primary:hover {
    background: var(--yellow-2);
}

.sim-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.sim-toggle input {
    accent-color: var(--yellow);
}

.sim figcaption {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--muted);
    font-style: italic;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-head);
    font-weight: 400;
    transition: border-color 0.15s ease;
}

.post-nav-link .muted {
    font-size: 12px;
}

.post-nav-link:hover {
    border-color: var(--yellow);
}

.post-nav-link.right {
    text-align: right;
    grid-column: 2;
}

.not-found {
    text-align: center;
    padding: 80px 0;
}

.nf-code {
    font-family: var(--font-head);
    margin: 0;
    font-size: 96px;
    font-weight: 400;
    color: var(--yellow);
    line-height: 1;
    text-shadow: 0 0 40px var(--yellow-glow);
}

.not-found h1 {
    font-family: var(--font-head);
    letter-spacing: 0;
}

.not-found .btn {
    margin-top: 20px;
}

@media (max-width: 860px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding-top: 0;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .wrap {
        padding: 0 16px;
    }

    .nav {
        gap: 14px;
    }

    .brand-text {
        display: none;
    }

    .graph-card {
        padding: 20px 16px 16px;
    }

    .graph {
        --cell: 11px;
        --gap: 2px;
        margin: 0;
    }

    .streaks {
        gap: 18px;
    }

    .post-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px;
    }

    .post-card-date {
        flex-direction: row;
        gap: 8px;
        width: max-content;
        height: auto;
        padding: 4px 10px;
    }

    .d-day {
        font-size: 15px;
    }

    .d-rest {
        margin-top: 0;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav-link.right {
        grid-column: 1;
    }

    .sim-control input[type="range"] {
        width: 90px;
    }
}

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