/* Global styles — add rules here; output is /css/main.css */

:root {
  /* Page — concrete wall photo fills viewport; fallback while image loads */
  --bg-page-image: url("https://images.unsplash.com/photo-1572782733355-de9749d10fce");
  --color-page-fallback: #7d8184;

  /* Brand & accent */
  --color-brand: #871623;
  --color-accent: #0F52BA;
  --color-accent-hover: #194395;
  /* Text */
  --color-text: #374151;
  --color-text-muted: #6b7280;
  --color-text-footer: #4b5563;

  /* Surfaces */
  --color-surface-frost: rgb(255 251 235 / 0.8);
  --color-surface-white: #ffffff;
  --color-note-paper: #fffbeb;
  --color-polaroid-placeholder: #e5e7eb;
  --color-avatar-bg: #e8e4dc;

  /* Paper / manilla */
  --color-paper-base: #fcfaf5;
  --color-paper-ruled-end: #f7f4eb;
  --color-manilla-tab-start: #d9c9a8;
  --color-manilla-tab-end: #cbb896;
  --color-manilla-body-1: #f0e6d2;
  --color-manilla-body-2: #ebe0c8;
  --color-manilla-body-3: #e8dcc4;

  /* Borders */
  --color-border-manilla: #a89878;
  --color-border-note: #d1d5db;
  --color-border-tape: #fef9c3;

  /* Overlays (rgb / rgba) */
  --color-folder-shine: rgb(255 255 255 / 0.35);
  --color-paper-shine-top: rgb(255 255 255 / 0.9);
  --color-paper-shine-mid: rgb(252 250 245 / 0.98);
  --color-paper-line: rgb(180 170 150 / 0.07);
  --color-divider-manilla: rgb(167 152 120 / 0.35);
  --color-avatar-ring: rgb(167 152 120 / 0.45);
  --color-stamp-bg: rgb(255 255 255 / 0.9);
  --color-stationary-inset: rgb(255 255 255 / 0.65);
  --color-tape-fill: rgb(254 252 232 / 0.3);

  /* Shadows */
  --shadow-folder-tab: 0 -2px 4px rgb(0 0 0 / 0.06);
  --shadow-folder-body: 0 10px 15px -3px rgb(0 0 0 / 0.25);
  --shadow-card: 0 10px 15px -3px rgb(0 0 0 / 0.3);
  --shadow-stationary-a: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-stationary-b: 0 3px 8px rgb(0 0 0 / 0.04);
  --shadow-stationary-combined:
    var(--shadow-stationary-a), var(--shadow-stationary-b),
    inset 0 0 0 1px var(--color-stationary-inset);
  --shadow-avatar: 0 2px 4px rgb(0 0 0 / 0.08), 0 6px 16px rgb(0 0 0 / 0.12);
  --shadow-thumb: 0 4px 6px -1px rgb(0 0 0 / 0.2);
}

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

/*
 * Wall texture on html — fixed + cover so it fills the viewport; body stays
 * transparent with content above. Avoid `html { height: 100% }` for long pages.
 */
html {
  min-height: 100dvh;
  background-color: var(--color-page-fallback);
  background-image: var(--bg-page-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: transparent;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.5rem;
  border: 1px solid var(--color-border-manilla);
  text-align: center;
}

.font-handwriting {
  font-family: "Nothing You Could Do", cursive;
  color: var(--color-brand);
}

.font-typewriter {
  font-family: "Special Elite", monospace;
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--color-accent-hover);
}

/* Header — no bar/frost; sits on page background */
header {
  position: relative;
  flex-shrink: 0;
  z-index: 10;
  padding: 2rem;
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

/* Business card + stamp/icons row; nav is a separate full-width block below */
.header-content__primary {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 5rem;
  width: 100%;
  min-width: 0;
}

/* Stamp centered in remaining width, stickers on the right */
.header-banner {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.header-banner__top {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.header-banner__bottom {
  width: 100%;
  padding-top: 3rem;

}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1.5rem;
  width: 100%;
}

/* Masking-tape strips (no corner tape) — typed label on tape */
.header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Special Elite", monospace;
  font-size: 0.9rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.42rem 0.85rem;
  border-radius: 1px;
  border: 1px solid color-mix(in srgb, var(--color-border-tape) 50%, rgb(180 155 110 / 0.25));
  background: linear-gradient(
    178deg,
    rgb(255 253 240 / 0.58) 0%,
    rgb(254 248 228 / 0.52) 40%,
    rgb(245 232 205 / 0.55) 100%
  );
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.06),
    inset 0 1px 0 rgb(255 255 255 / 0.3);
  text-shadow: 0 0 1px rgb(255 255 255 / 0.35);
  /* Nudge on .header-nav__label only — translateY on <a> moves the whole strip, not text inside it */
  --tape-label-nudge: 0.12em;
  --tape-rotate: -0.4deg;
  transform: rotate(var(--tape-rotate));
  transition:
    color 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease,
    transform 0.28s cubic-bezier(0.33, 1.2, 0.55, 1);
}

.header-nav__label {
  display: inline-block;
  line-height: 1;
  transform: translateY(var(--tape-label-nudge));
}

/* Per-strip tilt (shared with @keyframes header-nav-tape-bounce via --tape-rotate) */
.header-nav a:nth-child(1) {
  --tape-rotate: -1.1deg;
}

.header-nav a:nth-child(2) {
  --tape-rotate: 0.75deg;
}

.header-nav a:nth-child(3) {
  --tape-rotate: -0.65deg;
}

.header-nav a:nth-child(4) {
  --tape-rotate: 1deg;
}

.header-nav a:nth-child(5) {
  --tape-rotate: -0.4deg;
}

.header-nav a:nth-child(n + 6) {
  --tape-rotate: -0.4deg;
}

@keyframes header-nav-tape-bounce {
  0%,
  100% {
    transform: rotate(var(--tape-rotate)) translateY(0);
  }

  35% {
    transform: rotate(var(--tape-rotate)) translateY(-5px);
  }

  55% {
    transform: rotate(var(--tape-rotate)) translateY(2px);
  }

  75% {
    transform: rotate(var(--tape-rotate)) translateY(-1px);
  }
}

.header-nav a:hover {
  color: var(--color-accent-hover);
  text-decoration: none;
  box-shadow:
    0 2px 5px rgb(0 0 0 / 0.1),
    inset 0 1px 0 rgb(255 255 255 / 0.5);
  filter: brightness(1.02);
  animation-name: header-nav-tape-bounce;
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.34, 1.35, 0.55, 1);
  animation-fill-mode: forwards;
}

@media (prefers-reduced-motion: reduce) {
  .header-nav a {
    transition:
      color 0.15s ease,
      box-shadow 0.15s ease,
      filter 0.15s ease;
  }

  .header-nav a:hover {
    animation: none;
  }
}

.header-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Index note cards use --shadow-card; match that lift so the header card reads the same */
.header-business-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
  box-sizing: border-box;
  width: 21rem;
  max-width: 100%;
  height: 12rem;
  flex-shrink: 0;
  align-self: center;
  padding: 1rem 1.35rem;
  background-color: var(--color-paper-base);
  background-image:
    linear-gradient(
      180deg,
      var(--color-paper-shine-top) 0%,
      var(--color-paper-shine-mid) 35%,
      var(--color-paper-ruled-end) 100%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      var(--color-paper-line) 27px,
      var(--color-paper-line) 28px
    );
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  transform: rotate(-3deg);
}

/* Corner tape (same as .note-card / polaroid) — above blood drop, don’t intercept clicks */
header .header-business-card > .tape {
  z-index: 4;
  pointer-events: none;
}

/* Same asset as .note-blood-drop — bottom area, nudged left, larger */
.header-business-card__blood-drop {
  position: absolute;
  bottom: 0.1rem;
  left: 36%;
  z-index: 2;
  width: 4.25rem;
  height: auto;
  transform: translateX(-50%) rotate(-22deg);
  transform-origin: center bottom;
  pointer-events: none;
  object-fit: contain;
}

.header-business-card__brand {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  line-height: 0;
}

header .header-business-card .logo img {
  display: block;
  max-height: 10rem;
  margin-left: -2rem;
  object-fit: contain;
}

.header-business-card__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
}

/* font-size/margins: site title overrides in header .header-business-card .header-title only */
.header-title {
  font-size: 2.5rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  margin-left: 0;
}

/* Phoenix top-left; pull into padding — must not share a later .header-subtitle { margin:0 } reset */
header .header-business-card .header-subtitle.company-name {
  margin: 0 -4.5rem;
  text-align: left;
  white-space: nowrap;
  align-self: stretch;
}

header .header-business-card .header-title {
  margin-left: -2rem;
  margin-bottom: 0;
  line-height: 1.1;
  text-align: center;
  align-self: stretch;
}

header .header-business-card .header-field-notes {
  margin: 0;
  text-align: right;
  align-self: stretch;
}

.header-title a {
  color: inherit;
  text-decoration: none;
}

.header-title a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.header-subtitle {
  font-size: 0.875rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Stamp-style type; deviates from category stamp: white fill + thick border like header icon stickers */
.header-personnel-sign {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: max-content;
  max-width: min(96vw, 28rem);
  flex-shrink: 0;
  margin: 0;
  padding: 0.45rem 1rem;
  border: 4px solid color-mix(in srgb, var(--color-brand) 78%, black);
  background: var(--color-surface-white);
  color: var(--color-brand);
  font-family: "Special Elite", monospace;
  font-weight: bold;
  /* Approaches .header-title (3rem); caps below title so the name stays primary */
  font-size: clamp(1.25rem, 1.15rem + 1.65vw, 2.35rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  transform: rotate(-10deg);
  transform-origin: center center;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.08),
    0 4px 12px rgb(0 0 0 / 0.12);
}

header .header-personnel-sign > .tape {
  z-index: 2;
  pointer-events: none;
}

.header-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1.1rem;
}

/* Icon links: round white sticker (div) + FA glyph — no text stroke/shadow */
.header-icon-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 50%;
}

.header-icon-sticker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: var(--color-surface-white);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.08),
    0 4px 12px rgb(0 0 0 / 0.12);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.header-icon-link i {
  font-size: 1.65rem;
  color: var(--color-brand);
}

.header-icon-link:hover .header-icon-sticker {
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.1),
    0 8px 18px rgb(0 0 0 / 0.16);
  transform: scale(1.05);
}

.header-icon-link:hover i {
  filter: brightness(1.06);
}

.header-icon-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Main grows to fill space between header and footer on short pages */
main {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  z-index: 1;
  min-width: 0;
  min-height: 0;
}

/* Manilla folder (post layout) */
.manilla-folder {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
}

.manilla-folder .folder-tab {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.5rem 1.25rem 0.65rem;
  margin-bottom: -1px;
  background: linear-gradient(
    180deg,
    var(--color-manilla-tab-start) 0%,
    var(--color-manilla-tab-end) 100%
  );
  border: 1px solid var(--color-border-manilla);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: var(--shadow-folder-tab);
}

/* Title + A–Z letter links as folder tabs (alphabetical TOC in tab row) */
.manilla-folder .folder-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.5rem;
  margin-bottom: -1px;
}

.manilla-folder .folder-tabs .folder-tab--title {
  flex-shrink: 0;
}

.manilla-folder--alpha-toc .folder-tabs nav.alphabetical {
  margin: 0;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.manilla-folder--alpha-toc .folder-tabs nav.alphabetical ol {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  list-style-position: outside;
}

.manilla-folder--alpha-toc .folder-tabs nav.alphabetical li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.manilla-folder--alpha-toc .folder-tabs nav.alphabetical a {
  display: inline-block;
  padding: 0.4rem 0.65rem 0.55rem;
  margin-bottom: -1px;
  font-family: inherit;
  background: linear-gradient(
    180deg,
    var(--color-manilla-tab-start) 0%,
    var(--color-manilla-tab-end) 100%
  );
  border: 1px solid var(--color-border-manilla);
  border-bottom: none;
  border-radius: 0.45rem 0.45rem 0 0;
  box-shadow: var(--shadow-folder-tab);
  color: var(--color-text);
  font-weight: normal;
  letter-spacing: 0.06em;
  text-decoration: none;
  line-height: 1.2;
}

.manilla-folder--alpha-toc .folder-tabs nav.alphabetical a:hover {
  color: var(--color-brand);
}

.manilla-folder--alpha-toc .folder-tabs nav.alphabetical a:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.manilla-folder .folder-body {
  position: relative;
  padding: 20px;
  background:
    linear-gradient(
      180deg,
      var(--color-folder-shine) 0%,
      transparent 40%
    ),
    linear-gradient(
      135deg,
      var(--color-manilla-body-1) 0%,
      var(--color-manilla-body-2) 50%,
      var(--color-manilla-body-3) 100%
    );
  border: 1px solid var(--color-border-manilla);
  border-radius: 0 0.75rem 0.75rem 0.75rem;
  box-shadow: var(--shadow-folder-body);
}

/* Inset paper — folder shows ~20px around the sheet (base matches .note-card) */
.manilla-folder .stationary {
  position: relative;
  isolation: isolate;
  background-color: var(--color-note-paper);
  background-image:
    linear-gradient(
      180deg,
      var(--color-paper-shine-top) 0%,
      var(--color-paper-shine-mid) 35%,
      var(--color-paper-ruled-end) 100%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      var(--color-paper-line) 27px,
      var(--color-paper-line) 28px
    );
  border-radius: 2px;
  box-shadow: var(--shadow-stationary-combined);
  padding: 1.5rem 2rem 2rem;
}

/* Coffee stain PNG (top-right) — src/assets/images/coffee_stain.png → /images/coffee_stain.png */
.manilla-folder .stationary::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  top: 0.35rem;
  right: 0.35rem;
  width: min(48vw, 260px);
  height: min(42vw, 220px);
  background-image: url("/images/coffee_stain.png");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: contain;
  opacity: 0.72;
}

.manilla-folder .stationary > * {
  position: relative;
  z-index: 1;
}

.manilla-folder .stationary-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-divider-manilla);
}

.manilla-folder .stationary-header-brand {
  flex-shrink: 0;
}

.manilla-folder .stationary-header .logo {
  flex-shrink: 0;
  line-height: 0;
}

.manilla-folder .stationary-header .logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 6.5rem;
  max-height: 5.5rem;
  object-fit: contain;
}

/* Text block: column flex; date is last child, aligned right */
.manilla-folder .stationary-header > .stationary-header-brand + div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}

.manilla-folder .stationary-header > .stationary-header-brand + div .header-subtitle {
  margin: 0;
}

.manilla-folder .stationary-header > .stationary-header-brand + div .header-title {
  margin-bottom: 0;
  line-height: 1.15;
}

.manilla-folder .stationary-header > .stationary-header-brand + div .header-date {
  align-self: flex-end;
  margin: 0;
  text-align: right;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--color-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manilla-folder .stationary-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
}

.manilla-folder .stationary-content .stationary-body,
.manilla-folder .stationary-content .content {
  flex: 1;
  min-width: 0;
}

/* Fixed width polaroid; nudged toward folder manilla edge; inner .polaroid tilted */
.manilla-folder .post-polaroid-aside {
  position: relative;
  flex: 0 0 auto;
  width: 300px;
  max-width: 300px;
  min-width: 0;
  /* Cancel stationery left padding (2rem), tuck into folder-body margin (~20px) */
  margin-left: calc(-2rem - 10px);
  padding-left: 0.15rem;
  z-index: 1;
  overflow: visible;
}

.manilla-folder .post-polaroid-aside .polaroid {
  position: relative;
  width: 100%;
  overflow: visible;
  /* Right corner slightly higher than left */
  transform: rotate(-3deg);
  transform-origin: center center;
}

/* Post polaroid: one centered strip top + one bottom (same .tape look as note cards) */
.manilla-folder .post-polaroid-aside .polaroid > .tape-post-top,
.manilla-folder .post-polaroid-aside .polaroid > .tape-post-bottom {
  z-index: 4;
  pointer-events: none;
  left: 50%;
  right: auto;
  width: min(62%, 9.5rem);
  height: 1.5rem;
}

.manilla-folder .post-polaroid-aside .polaroid > .tape-post-top {
  top: -0.42rem;
  transform: translateX(-50%) rotate(-1.5deg);
  transform-origin: center center;
}

.manilla-folder .post-polaroid-aside .polaroid > .tape-post-bottom {
  top: auto;
  bottom: -0.42rem;
  transform: translateX(-50%) rotate(1.5deg);
  transform-origin: center center;
}

.manilla-folder .content p {
  margin-bottom: 1.5rem;
  line-height: 1.5rem;
}

.manilla-folder .content h2 {
  margin-bottom: 0;
  padding-bottom: 1.5rem;
}

/* h3: same rhythm as h2; tighten when the next block is a one-line italic tagline (### Title + *em only*) */
.manilla-folder .content h3 {
  margin-bottom: 0;
  padding-bottom: 1.5rem;
}

.manilla-folder .content h3:has(+ p > :is(em, i):only-child) {
  padding-bottom: 0;
}

/* YouTube embed (shortcode) */
.manilla-folder .content .youtube-embed {
  position: relative;
  width: 100%;
  max-width: min(100%, 42rem);
  margin: 0 0 1.5rem;
  aspect-ratio: 16 / 9;
}

.manilla-folder .content .youtube-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Tally shortcode — solid squares = current, regular = remainder of total */
.manilla-folder .content .tally {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.12em;
  vertical-align: baseline;
  margin: 0 0.15em;
  position: relative;
  top: -0.15em;
}

.manilla-folder .content .tally .fa-square {
  font-size: 0.82em;
}

.manilla-folder .content .tally .fa-solid {
  color: var(--color-accent);
}

.manilla-folder .content .tally .fa-regular {
  color: var(--color-text-muted);
}

/*
 * Sticky note row: full width of the paragraph so `padding-inline-start` actually shifts
 * layout (transform alone does not move the box in normal flow).
 */
.manilla-folder .content .evidence-tag-row {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  vertical-align: top;
  margin: 0.35rem 0 0.85rem;
}

/* Evidence tag (`sentence` shortcode) — sticky note (square); theme via `evidence-tag--theme-*` */
.manilla-folder .content .evidence-tag {
  --sticky-note-hi: #fffbeb;
  --sticky-note: #fef3c7;
  --sticky-note-low: #fde68a;
  --sticky-note-border: rgb(253 230 138 / 0.85);
  --sticky-note-shadow-glow: rgb(180 83 9 / 0.18);
  --sticky-note-icon: #a16207;
  --sticky-note-type: #713f12;
  --sticky-note-text: #422006;
  --sticky-note-size: min(100%, 19rem);

  display: inline-block;
  vertical-align: middle;
  width: var(--sticky-note-size);
  max-width: var(--sticky-note-size);
  margin: 0;
  transform-origin: center center;
}

.manilla-folder .content .evidence-tag--theme-blue {
  --sticky-note-hi: #f8fafc;
  --sticky-note: #e0f2fe;
  --sticky-note-low: #bae6fd;
  --sticky-note-border: rgb(125 211 252 / 0.9);
  --sticky-note-shadow-glow: rgb(37 99 235 / 0.22);
  --sticky-note-icon: #1d4ed8;
  --sticky-note-type: #1e3a5f;
  --sticky-note-text: #0f172a;
}

.manilla-folder .content .evidence-tag--theme-green {
  --sticky-note-hi: #f0fdf4;
  --sticky-note: #dcfce7;
  --sticky-note-low: #bbf7d0;
  --sticky-note-border: rgb(134 239 172 / 0.9);
  --sticky-note-shadow-glow: rgb(22 163 74 / 0.22);
  --sticky-note-icon: #15803d;
  --sticky-note-type: #14532d;
  --sticky-note-text: #052e16;
}

.manilla-folder .content .evidence-tag--theme-red {
  --sticky-note-hi: #fff1f2;
  --sticky-note: #ffe4e6;
  --sticky-note-low: #fecdd3;
  --sticky-note-border: rgb(251 113 133 / 0.88);
  --sticky-note-shadow-glow: rgb(220 38 38 / 0.2);
  --sticky-note-icon: #b91c1c;
  --sticky-note-type: #7f1d1d;
  --sticky-note-text: #450a0a;
}

.manilla-folder .content .evidence-tag--theme-yellow {
  --sticky-note-hi: #fffbeb;
  --sticky-note: #fef3c7;
  --sticky-note-low: #fde68a;
  --sticky-note-border: rgb(253 230 138 / 0.85);
  --sticky-note-shadow-glow: rgb(180 83 9 / 0.18);
  --sticky-note-icon: #a16207;
  --sticky-note-type: #713f12;
  --sticky-note-text: #422006;
}

.manilla-folder .content .evidence-tag--theme-magenta {
  --sticky-note-hi: #fdf2f8;
  --sticky-note: #fce7f3;
  --sticky-note-low: #fbcfe8;
  --sticky-note-border: rgb(244 114 182 / 0.9);
  --sticky-note-shadow-glow: rgb(219 39 119 / 0.22);
  --sticky-note-icon: #be185d;
  --sticky-note-type: #831843;
  --sticky-note-text: #500724;
}

/*
 * Horizontal offset = padding on the row (layout); tilt = transform on the note (paint only).
 * Assigned randomly at build time: `evidence-tag-row--stickynote-n`.
 */
.manilla-folder .content .evidence-tag-row--stickynote-1 {
  padding-inline-start: 0;
}

.manilla-folder .content .evidence-tag-row--stickynote-2 {
  padding-inline-start: min(12%, 7.5rem);
}

.manilla-folder .content .evidence-tag-row--stickynote-3 {
  padding-inline-start: min(5%, 3.5rem);
}

.manilla-folder .content .evidence-tag-row--stickynote-4 {
  padding-inline-start: min(22%, 13rem);
}

.manilla-folder .content .evidence-tag-row--stickynote-5 {
  padding-inline-start: min(15%, 9rem);
}

.manilla-folder .content .evidence-tag-row--stickynote-1 .evidence-tag {
  transform: rotate(-2.4deg);
}

.manilla-folder .content .evidence-tag-row--stickynote-2 .evidence-tag {
  transform: rotate(1.9deg);
}

.manilla-folder .content .evidence-tag-row--stickynote-3 .evidence-tag {
  transform: rotate(-0.7deg);
}

.manilla-folder .content .evidence-tag-row--stickynote-4 .evidence-tag {
  transform: rotate(2.3deg);
}

.manilla-folder .content .evidence-tag-row--stickynote-5 .evidence-tag {
  transform: rotate(-1.6deg);
}

.manilla-folder .content .evidence-tag__body {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  padding: 0.7rem 0.85rem;
  overflow-x: hidden;
  overflow-y: auto;
  /* Native scrollbars (esp. Windows) clash with the sticky look; hide and keep scroll. */
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 2px;
  background: linear-gradient(
    155deg,
    var(--sticky-note-hi) 0%,
    var(--sticky-note) 42%,
    var(--sticky-note-low) 100%
  );
  box-shadow:
    0 1px 0 rgb(0 0 0 / 0.04),
    0 3px 6px -1px rgb(0 0 0 / 0.12),
    0 8px 14px -4px var(--sticky-note-shadow-glow),
    inset 0 1px 0 rgb(255 255 255 / 0.7);
  border: 1px solid var(--sticky-note-border);
}

.manilla-folder .content .evidence-tag__body::-webkit-scrollbar {
  display: none;
}

.manilla-folder .content .evidence-tag__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.manilla-folder .content .evidence-tag__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--sticky-note-icon);
  opacity: 0.95;
  line-height: 1;
}

.manilla-folder .content .evidence-tag__type {
  font-family: "Nothing You Could Do", cursive;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--sticky-note-type);
  text-transform: capitalize;
}

.manilla-folder .content .evidence-tag__title {
  font-family: "Nothing You Could Do", cursive;
  font-size: 1rem;
  line-height: 1.3;
  font-style: italic;
  color: var(--sticky-note-type);
  opacity: 0.85;
  margin-inline-start: 0.1rem;
}

.manilla-folder .content .evidence-tag__title::before {
  content: "·";
  margin-inline-end: 0.4rem;
  opacity: 0.7;
}

.manilla-folder .content .evidence-tag__text {
  font-family: "Nothing You Could Do", cursive;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--sticky-note-text);
  word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .manilla-folder .content .evidence-tag-row--stickynote-1 .evidence-tag,
  .manilla-folder .content .evidence-tag-row--stickynote-2 .evidence-tag,
  .manilla-folder .content .evidence-tag-row--stickynote-3 .evidence-tag,
  .manilla-folder .content .evidence-tag-row--stickynote-4 .evidence-tag,
  .manilla-folder .content .evidence-tag-row--stickynote-5 .evidence-tag,
  .manilla-folder .content .evidence-tag--paper,
  .manilla-folder .content .evidence-tag--ai {
    transform: none;
  }
}

/*
 * Paper variant (`note` shortcode) — wider rectangular sheet with washi tape on top
 * corners. The rules apply to both `.evidence-tag--paper` (variant modifier) and
 * `.evidence-tag--ai` (type modifier — AI is always paper-styled). Binding to the
 * type modifier as well ensures correct rendering even if Eleventy's hot reload has
 * stale shortcode modules cached.
 */
.manilla-folder .content .evidence-tag-row--paper,
.manilla-folder .content .evidence-tag-row:has(.evidence-tag--ai) {
  display: block;
  padding-inline-start: 0;
  padding-block: 1.25rem 0.75rem;
}

.manilla-folder .content .evidence-tag--paper,
.manilla-folder .content .evidence-tag--ai {
  --sticky-note-size: min(100%, 40rem);
  position: relative;
  display: block;
  margin-inline: auto;
  transform: rotate(-0.4deg);
}

.manilla-folder .content .evidence-tag--paper .evidence-tag__body,
.manilla-folder .content .evidence-tag--ai .evidence-tag__body {
  aspect-ratio: auto;
  padding: 1.25rem 1.5rem 1.4rem;
  border-radius: 1px;
  box-shadow:
    0 1px 0 rgb(0 0 0 / 0.04),
    0 6px 12px -4px rgb(0 0 0 / 0.18),
    0 14px 24px -8px rgb(0 0 0 / 0.12),
    inset 0 1px 0 rgb(255 255 255 / 0.6);
  background: linear-gradient(
    175deg,
    var(--sticky-note-hi) 0%,
    var(--sticky-note) 70%,
    var(--sticky-note-low) 100%
  );
}

/* Two pieces of washi tape at the top corners of the paper. */
.manilla-folder .content .evidence-tag--paper::before,
.manilla-folder .content .evidence-tag--paper::after,
.manilla-folder .content .evidence-tag--ai::before,
.manilla-folder .content .evidence-tag--ai::after {
  content: "";
  position: absolute;
  top: -0.55rem;
  width: 5.5rem;
  height: 1.15rem;
  background: linear-gradient(
    180deg,
    rgba(254, 240, 200, 0.55) 0%,
    rgba(244, 224, 170, 0.7) 50%,
    rgba(254, 240, 200, 0.55) 100%
  );
  border-block: 1px solid rgba(180, 150, 90, 0.25);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: 1;
}

.manilla-folder .content .evidence-tag--paper::before,
.manilla-folder .content .evidence-tag--ai::before {
  left: 0.75rem;
  transform: rotate(-4deg);
}

.manilla-folder .content .evidence-tag--paper::after,
.manilla-folder .content .evidence-tag--ai::after {
  right: 0.75rem;
  transform: rotate(3deg);
}

/* Block quotes — same face/color as .font-handwriting (overrides .font-typewriter on .content) */
.manilla-folder .content blockquote {
  margin: 0 0 1.5rem;
  font-family: "Nothing You Could Do", cursive;
  color: var(--color-brand);
  font-size: 1.25rem;
  font-weight: bold;
  background: url("/images/blood_drop.png") no-repeat left center;
  background-size: 3rem;
  padding-left: 2.2rem;
}

/* Lists: normal indentation — markers outside, nested levels stack padding */
.manilla-folder .content ul,
.manilla-folder .content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  line-height: 1.5rem;
  list-style-position: outside;
}

.manilla-folder .content ul {
  list-style-type: disc;
}

.manilla-folder .content ol {
  list-style-type: decimal;
}

.manilla-folder .content ul ul {
  list-style-type: circle;
}

.manilla-folder .content ul ul ul {
  list-style-type: square;
}

.manilla-folder .content li {
  margin: 0 0 0.35rem;
  padding-left: 0.25rem;
}

.manilla-folder .content li:last-child {
  margin-bottom: 0;
}

.manilla-folder .content li ul,
.manilla-folder .content li ol {
  margin: 0.5rem 0 0.35rem;
}

/* Post footer — author */
.manilla-folder .stationary-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-divider-manilla);
}

.manilla-folder .author {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.manilla-folder .author__text {
  flex: 1;
  min-width: 0;
}

.manilla-folder .author__bio {
  margin: 0;
  line-height: 1.55;
  font-size: 0.875rem;
  color: var(--color-text);
}

.manilla-folder .author__bio a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.manilla-folder .author__bio a:hover {
  color: var(--color-accent-hover);
}

/* Signature: tilt + handwriting — bold for emphasis (cursive may synthesize weight) */
.manilla-folder .author__signature {
  margin: 0 2rem;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: right;
  transform: rotate(-6deg);
  transform-origin: right center;
}

.manilla-folder .author__signature-heart {
  display: inline-block;
  margin-right: -0.08em;
  color: var(--color-brand);
  vertical-align: middle;
  transform: rotate(-14deg);
  transform-origin: center center;
}

.manilla-folder .author__signature-heart .fa-heart {
  font-size: 0.72em;
  vertical-align: -0.08em;
  font-weight: 400;
}

/* Avatar: full circle, right column */
.manilla-folder .author__avatar {
  flex-shrink: 0;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-avatar);
  border: 3px solid var(--color-avatar-ring);
  background: var(--color-avatar-bg);
}

.manilla-folder .author__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

@media (max-width: 600px) {
  .manilla-folder .author {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .manilla-folder .author__text {
    order: 2;
    width: 100%;
  }

  .manilla-folder .author__avatar {
    order: 1;
  }

  .manilla-folder .author__signature {
    text-align: right;
  }
}

/* Lore & Characters indexes — simple list (not field-notes / cork board cards) */
.content-index {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.content-index__title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: var(--color-brand);
  margin-bottom: 1.75rem;
  line-height: 1.15;
}

.content-index__lede {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.content-index__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Inside manilla `.content`, `.manilla-folder .content ul` wins specificity over `.content-index__list` — keep index rows unmarked */
.manilla-folder .content .content-index__list {
  list-style: none;
  list-style-type: none;
  padding-left: 0;
}

.manilla-folder .content .content-index__list ul,
.manilla-folder .content .content-index__list ol {
  list-style: none;
  list-style-type: none;
}

.content-index__item {
  border-bottom: 1px solid color-mix(in srgb, var(--color-border-manilla) 55%, transparent);
  padding: 1.1rem 0;
}

.content-index__item-main {
  min-width: 0;
}

.content-index__item--pinned {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  isolation: isolate;
  /* Match `.manilla-folder .stationary` sheet (no coffee stain) */
  background-color: var(--color-note-paper);
  background-image:
    linear-gradient(
      180deg,
      var(--color-paper-shine-top) 0%,
      var(--color-paper-shine-mid) 35%,
      var(--color-paper-ruled-end) 100%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      var(--color-paper-line) 27px,
      var(--color-paper-line) 28px
    );
  border-radius: 2px;
  box-shadow: var(--shadow-stationary-combined);
  padding: 1.1rem 1rem 1.15rem 1.15rem;
  margin: 0.65rem 0;
  border-bottom: none;
  /* Pivot bottom-right: negative rotation drops the left side (y-down coords) so the excerpt sits closer to the next row */
  transform: rotate(-1deg);
  transform-origin: right bottom;
}

.content-index__item--pinned + .content-index__item--pinned {
  margin-top: 1rem;
}

.content-index__item--pinned .content-index__item-main {
  flex: 1;
}

.content-index__pin {
  flex-shrink: 0;
  width: 2.5rem;
  height: auto;
  object-fit: contain;
  align-self: center;
}

.content-index__item:first-child {
  border-top: 1px solid color-mix(in srgb, var(--color-border-manilla) 55%, transparent);
}

/* First unpinned row after pinned block: top border (pinned rows drop bottom border) */
.content-index__item--pinned + .content-index__item:not(.content-index__item--pinned) {
  border-top: 1px solid color-mix(in srgb, var(--color-border-manilla) 55%, transparent);
}

/* Cases index — case number, title link, session count */
.content-index__item--case .content-index__case-number {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.content-index__item--case .content-index__case-number strong {
  color: var(--color-text);
  font-weight: bold;
}

.content-index__item--case .content-index__link {
  display: inline-block;
  margin-top: 0.35rem;
}

.content-index__session-count {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.content-index__case-date {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

/* Case hub — one line: Category: Session ### - date */
.content-index__item--case-hub {
  padding: 0.65rem 0;
}

.content-index__case-hub-line {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--color-text);
}

.content-index__case-hub-line strong {
  font-weight: bold;
  margin-right: 0.25rem;
}

.content-index__link--case-hub {
  display: inline;
  font-size: inherit;
  font-weight: bold;
  letter-spacing: 0.02em;
  text-transform: none;
}

.content-index__link {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.content-index__link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.content-index__excerpt {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  max-width: 36rem;
}

/* Lore/Characters index: <p> inside .content inherits 1.5rem bottom margin — kills gap above row border */
.manilla-folder .content .content-index__excerpt {
  margin-bottom: 0;
}

.content-index__empty {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Blog index — responsive row wrap (flex, not grid) */
.blog-grid {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 2rem;
  padding: 3rem 0;
  z-index: 10;
}

/* Centered watermark behind cards (Field Notes index) */
.blog-grid--field-notes .blog-grid__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.38;
}

.blog-grid--field-notes .blog-grid__pin img {
  display: block;
  width: min(4.5rem, 14vw);
  height: auto;
}

.blog-grid--field-notes > .blog-card,
.blog-grid--field-notes > .blog-grid__empty {
  position: relative;
  z-index: 1;
}

.blog-grid > .blog-card {
  flex: 1 1 300px;
}

.blog-grid > .blog-grid__empty {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}

/* Blog card — max width so a single post does not stretch full row */
.blog-card {
  position: relative;
  width: 100%;
  max-width: 22.5rem;
  transition:
    transform 0.3s ease,
    z-index 0.3s ease;
}

a.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 50;
}

/* Pinned field note — pin at top center of the card */
.blog-card__pin {
  position: absolute;
  left: 50%;
  top: 0.35rem;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  line-height: 0;
}

.blog-card__pin img {
  display: block;
  width: 2.5rem;
  height: auto;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.2));
}

/* Polaroid card */
.polaroid {
  position: relative;
  background: var(--color-surface-white);
  padding: 0.75rem;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.polaroid--post {
  cursor: default;
}

.polaroid-image {
  background: var(--color-polaroid-placeholder);
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.polaroid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-caption {
  padding: 0 0.5rem 0.5rem;
  font-size: 0.875rem;
}

/* Note card */
.note-card {
  position: relative;
  background: var(--color-note-paper);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--color-accent);
  cursor: pointer;
}

.note-blood-drop {
  position: absolute;
  width: 3rem;
  height: auto;
  z-index: 4;
  pointer-events: none;
  object-fit: contain;
}

.note-blood-drop--1 {
  top: 0.1rem;
  left: 0.25rem;
  right: auto;
  bottom: auto;
  transform: rotate(-20deg);
  transform-origin: center center;
}

.note-blood-drop--2 {
  top: -0.1rem;
  left: 35%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%) rotate(14deg);
  transform-origin: center top;
}

.note-blood-drop--3 {
  top: 0.2rem;
  right: 0.15rem;
  left: auto;
  bottom: auto;
  transform: rotate(-10deg);
  transform-origin: center center;
}

.note-blood-drop--4 {
  top: 50%;
  left: 0;
  right: auto;
  bottom: auto;
  transform: translateY(-50%) rotate(18deg);
  transform-origin: left center;
}

.note-blood-drop--5 {
  bottom: -0.15rem;
  right: 0.5rem;
  top: auto;
  left: auto;
  transform: rotate(-22deg);
  transform-origin: bottom right;
}

/* Tape on corners */
.tape {
  position: absolute;
  width: 3rem;
  height: 1.5rem;
  background: var(--color-tape-fill);
  opacity: 0.7;
  border: 1px solid var(--color-border-tape);
}

.tape-left {
  top: -0.5rem;
  left: -0.25rem;
  transform: rotate(12deg);
}

.tape-right {
  top: -0.5rem;
  right: -0.25rem;
  transform: rotate(-12deg);
}

.note-header {
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.note-header__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.note-header__copy .case-label {
  margin: 0;
}

.note-title {
  font-size: 1.25rem;
  margin: 0;
}

.note-thumbnail {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  box-shadow: var(--shadow-thumb);
  transform: rotate(3deg);
  flex-shrink: 0;
}

.note-excerpt {
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.note-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-note);
}

.case-label {
  font-size: 0.75rem;
  font-family: "Courier New", monospace;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: bold;
}

.note-date {
  font-size: 0.75rem;
  font-family: "Courier New", monospace;
  color: var(--color-text-muted);
}

/* Category stamp — shared look (index cards + post letterhead); self-contained typography (no p/.content inheritance) */
.evidence-stamp,
.manilla-folder .stationary-category-stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: max-content;
  max-width: 11rem;
  margin: 0;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-family: "Special Elite", monospace;
  font-weight: bold;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.35rem 0.75rem;
  background: var(--color-stamp-bg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Caps-only line boxes keep extra space below the baseline; nudge ink down optically */
.category-stamp__text {
  display: block;
  transform: translateY(0.14em);
}

/* Index note cards: corner of card */
.evidence-stamp {
  position: absolute;
  bottom: -0.75rem;
  right: -0.75rem;
  left: auto;
  transform: rotate(12deg);
}

/* Post letterhead: under logo column, diagonal across header/content border */
.manilla-folder .stationary-category-stamp {
  position: absolute;
  left: 0;
  right: auto;
  bottom: -0.9rem;
  top: auto;
  transform: rotate(-14deg);
  transform-origin: left bottom;
  z-index: 2;
  pointer-events: none;
}

/* Mailchimp subscribe card — embedded as 3rd item of 2nd row in blog grid */
.mailchimp-subscribe-card {
  cursor: default;
}

.mailchimp-subscribe-card:hover {
  transform: rotate(3deg) !important;
  z-index: auto !important;
}

.mailchimp-subscribe-card .note-card {
  cursor: default;
  height: 100%;
}

.mailchimp-subscribe-card .subscribe-title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.mailchimp-subscribe-card .subscribe-lede {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.mailchimp-subscribe-card .mc-field-group {
  margin-bottom: 0.75rem;
}

.mailchimp-subscribe-card .mc-field-group label {
  display: block;
  font-size: 0.75rem;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.mailchimp-subscribe-card .mc-asterisk {
  color: var(--color-brand);
}

.mailchimp-subscribe-card .mc-field-group input[type="email"],
.mailchimp-subscribe-card .mc-field-group input[type="text"] {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border-note);
  border-radius: 2px;
  background: rgb(255 255 255 / 0.6);
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  color: var(--color-text);
  box-sizing: border-box;
}

.mailchimp-subscribe-card .mc-field-group input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

.mailchimp-subscribe-card .mc-submit-row {
  margin-top: 1rem;
}

.mailchimp-subscribe-card .mc-submit-btn {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding: 0.45rem 1.25rem 0.3rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: "Special Elite", monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mailchimp-subscribe-card .mc-submit-btn:hover {
  background: var(--color-accent-hover);
}

.mailchimp-subscribe-card .mc-response {
  margin-top: 0.5rem;
  font-size: 0.825rem;
  font-family: "Courier New", monospace;
  color: var(--color-text);
}

/* Footer */
footer {
  position: relative;
  flex-shrink: 0;
  z-index: 10;
  margin-top: 5rem;
  padding: 1.5rem;
  border-top: 4px solid var(--color-brand);
  background: var(--color-surface-frost);
  backdrop-filter: blur(8px);
  text-align: center;
}

footer p {
  font-size: 0.75rem;
  color: var(--color-text-footer);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 768px) {
  /* Tighter gap under header → first content (index grid / post), without changing header padding */
  main {
    padding: 0.35rem 1rem 2rem;
  }

  .header-title {
    font-size: 2rem;
  }

  .header-content {
    gap: 1rem;
    text-align: center;
  }

  .header-content__primary {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .header-banner__top {
    flex-direction: column;
    align-items: stretch;
  }

  .header-banner__top .header-personnel-sign {
    align-self: center;
  }

  .header-banner__top .header-icons {
    align-self: stretch;
    justify-content: flex-end;
    width: 100%;
  }

  .header-business-card {
    align-self: center;
    flex-direction: column;
    align-items: center;
    width: min(100%, 21rem);
    max-width: 100%;
    min-height: 12rem;
    height: auto;
    padding: 1rem 1rem;
    overflow: visible;
  }

  .header-business-card__text {
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
  }

  /* Undo desktop negative margins — they pull text/logo outside the card and clip on overflow-x */
  header .header-business-card .logo img {
    margin-left: 0;
    max-height: 5.5rem;
  }

  header .header-business-card .header-subtitle.company-name {
    margin: 0;
    text-align: center;
    white-space: normal;
  }

  header .header-business-card .header-title {
    margin-left: 0;
    text-align: center;
  }

  header .header-business-card .header-field-notes {
    text-align: center;
  }

  .blog-grid {
    padding: 1rem 0 2.5rem;
  }

  .manilla-folder .folder-body {
    padding: 16px;
  }

  .manilla-folder .stationary {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .manilla-folder .stationary-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .manilla-folder .stationary-category-stamp {
    left: 50%;
    right: auto;
    bottom: -0.85rem;
    transform: translateX(-50%) rotate(-12deg);
    transform-origin: center bottom;
  }

  .manilla-folder .stationary-header > .stationary-header-brand + div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  .manilla-folder .stationary-header > .stationary-header-brand + div .header-date {
    align-self: center;
    white-space: normal;
    text-align: center;
  }

  .manilla-folder .stationary-header .logo img {
    max-width: 5rem;
    max-height: 4.5rem;
  }

  .manilla-folder .stationary-content {
    flex-direction: column;
    align-items: center;
  }

  .manilla-folder .post-polaroid-aside {
    flex: 0 1 auto;
    width: min(100%, 300px);
    max-width: 300px;
    margin-left: 0;
  }

  .manilla-folder .folder-tab {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .manilla-folder--alpha-toc .folder-tabs nav.alphabetical a {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
}
