/* Notebook page and posts (locked designs: N2 Sketchbook, Notebook post) */

.nb-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 48px; }
.nb-filter { font: inherit; font-size: 17px; line-height: 1.4; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1px solid #3a3f68; background: transparent; color: #d6d2ec; cursor: pointer; }
.nb-filter:hover { border-color: #8e89b0; }
.nb-filter[aria-pressed="true"] { background: #ece8f5; border-color: #ece8f5; color: #191d3a; }
.nb-filter:focus-visible { outline: 2px solid #f0a878; outline-offset: 2px; }
.nb-swatch { display: inline-block; width: 8px; height: 8px; margin-right: 8px; transform: translateY(-2px); }

.nb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.nb-card { position: relative; display: flex; flex-direction: column; background: #20254a; border: 1px solid #2f3561; }
.nb-card[hidden] { display: none; }
.nb-card:hover { border-color: #5a6094; }
.nb-pic { height: 168px; background: #10142e; display: flex; align-items: center; justify-content: center; padding: 0 12px; overflow: hidden; }
.nb-pic svg { display: block; width: 100%; height: auto; }
.nb-text { padding: 16px 18px 20px; }
.nb-meta { margin: 0 0 6px; font-size: 15px; line-height: 1.3; }
.nb-tag { letter-spacing: 0.08em; text-transform: uppercase; }
.nb-date { color: #8e89b0; }
.nb-card h2 { margin: 0 0 6px; font-weight: 500; font-size: 22px; line-height: 1.25; }
.nb-card h2 a { color: var(--ink); text-decoration: none; }
.nb-card h2 a::after { content: ""; position: absolute; inset: 0; }
.nb-card h2 a:focus-visible { outline: none; }
.nb-card:focus-within { outline: 2px solid #f0a878; outline-offset: 2px; }
.nb-line { margin: 0; font-size: 18px; line-height: 1.5; color: #d6d2ec; }

@media (max-width: 900px) { .nb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .nb-filters { margin-bottom: 32px; }
  .nb-grid { grid-template-columns: 1fr; gap: 16px; }
  .nb-pic { height: 200px; }
}

/* A single post */
.post-back { max-width: 760px; margin: 0 auto 14px; font-size: 18px; }
.post-back a { color: #d6d2ec; text-decoration: none; }
.post-back a:hover { color: var(--accent); }
.post { max-width: 760px; margin: 0 auto; background: rgba(16, 20, 46, 0.86); border: 1px solid #343a63; line-height: 1.65; }
.post-hero { height: 380px; background: #10142e; display: flex; align-items: center; justify-content: center; padding: 24px 56px; box-sizing: border-box; }
.post-hero svg { display: block; width: 100%; max-height: 100%; height: auto; }
.post-inner { padding: 44px 64px 28px; }
.post-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; }
.post-meta .nb-swatch { width: 10px; height: 10px; margin: 0; transform: none; }
.post-date { color: #b3aed0; }
.post h1 { text-align: left; font-size: 54px; line-height: 1.12; margin: 0 0 10px; }
.post-sub { margin: 0 0 28px; font-style: italic; font-size: 25px; line-height: 1.35; color: #d6d2ec; }
.post hr { margin: 0 0 30px; border: 0; border-top: 1px solid #343a63; }
.post-inner > p { margin: 0 0 22px; }
.post-inner .post-meta, .post-inner .post-sub { margin-bottom: 28px; }
.post-inner .post-meta { margin-bottom: 14px; }

@media (max-width: 600px) {
  .post { font-size: 19px; }
  .post-hero { height: 220px; padding: 12px 16px; }
  .post-inner { padding: 24px 20px 12px; }
  .post h1 { font-size: 38px; }
  .post-sub { font-size: 21px; }
}

/* Cards and post headers that use a picture file */
.nb-pic-img { padding: 0; }
.nb-pic-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nb-pic-img img.nb-fit { object-fit: contain; }
.post-hero-img { display: block; width: 100%; height: 380px; object-fit: cover; background: #10142e; }

/* Post parts from the locked Notebook post design */
.post-inner .post-project { margin: 0 0 28px; font-size: 16px; color: #b3aed0; }
.post-project a { color: inherit; text-decoration: none; }
.post-project a:hover { color: var(--accent); }
.post-fig { margin: 8px 0 30px; }
.post-fig img { display: block; width: 100%; height: auto; }
.post-fig figcaption { margin-top: 10px; font-style: italic; font-size: 18px; line-height: 1.5; color: #b3aed0; text-align: center; }
.steps img { image-rendering: auto; }
.post-nav { max-width: 760px; margin: 24px auto 0; display: flex; justify-content: space-between; gap: 24px; font-size: 18px; }
.post-nav a { color: #d6d2ec; text-decoration: none; }
.post-nav a:hover { color: var(--accent); }
.post-nav .post-newer { margin-left: auto; text-align: right; }

@media (max-width: 600px) {
  .post-hero-img { height: 220px; }
  .post-fig figcaption { font-size: 16px; }
  .post-nav { flex-direction: column; gap: 12px; font-size: 17px; }
  .post-nav .post-newer { margin-left: 0; text-align: left; }
}

/* Keep the current nav item highlighted over the sky's lighter nav colour */
body.sky .page > header nav a[aria-current="page"] { color: var(--accent); }
