/* ==========================================================================
   AWOOGA — Build page (the showcase)
   Hero, build-stat ribbon, timeline, category filters, milestone features,
   masonry gallery cards, lightbox, and the builder's blotter (notebook modal).
   ========================================================================== */

/* ---------- Hero --------------------------------------------------------- */
.build-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(201,162,39,0.22), transparent 55%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: var(--cream);
  padding: clamp(3.5rem, 7vw, 6rem) 0 0;
}
.build-hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.build-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--cream); margin-bottom: 0.5rem; }
.build-hero h1 em { font-style: normal; color: var(--brass-lt); }
.build-hero .lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); }
.build-hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.build-hero__media {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 4px solid rgba(247,241,227,0.9);
  transform: rotate(1.2deg);
}
.build-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.build-hero__badge {
  position: absolute; bottom: 14px; left: 14px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 0.82rem;
  padding: 0.45rem 0.9rem; border-radius: 999px; box-shadow: var(--shadow);
}
@media (max-width: 860px) { .build-hero__inner { grid-template-columns: 1fr; } .build-hero__media { transform: none; } }

/* ---------- Stat ribbon -------------------------------------------------- */
.stat-ribbon { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(247,241,227,0.16); margin-top: clamp(2.5rem, 5vw, 4rem); }
.stat { background: var(--navy-900); padding: 1.4rem 1rem; text-align: center; }
.stat__num { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--brass-lt); line-height: 1; }
.stat__label { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(247,241,227,0.72); margin-top: 0.4rem; }
@media (max-width: 620px) { .stat-ribbon { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Milestones (featured) --------------------------------------- */
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.milestone { position: relative; cursor: pointer; }
.milestone__img { aspect-ratio: 4 / 3; overflow: hidden; }
.milestone__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.milestone:hover .milestone__img img { transform: scale(1.06); }
.milestone__body { padding: 1.1rem 1.2rem 1.3rem; }
.milestone__date { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wood-dk); }
.milestone__cap { font-family: var(--font-display); font-size: 1.08rem; color: var(--navy-900); margin-top: 0.3rem; line-height: 1.3; }
.tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy-900); background: var(--brass); padding: 0.18rem 0.55rem; border-radius: 999px;
  position: absolute; top: 12px; left: 12px; z-index: 2;
}

/* ---------- Timeline ----------------------------------------------------- */
.timeline { position: relative; max-width: 880px; margin-inline: auto; padding: 1rem 0; }
.timeline::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--brass), var(--wood)); border-radius: 3px; }
.tl-item { position: relative; padding: 0 0 2.2rem 64px; }
.tl-item::before {
  content: ""; position: absolute; left: 13px; top: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--cream); border: 4px solid var(--brass); box-shadow: var(--shadow-sm);
}
.tl-item:last-child { padding-bottom: 0.5rem; }
.tl-item__date { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wood-dk); }
.tl-item__title { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy-900); margin: 0.15rem 0 0.4rem; }
.tl-item__text { color: var(--text-soft); margin: 0; }
@media (min-width: 760px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .tl-item { width: 50%; padding: 0 0 2.6rem; }
  .tl-item:nth-child(odd) { left: 0; padding-right: 48px; text-align: right; }
  .tl-item:nth-child(even) { left: 50%; padding-left: 48px; }
  .tl-item:nth-child(odd)::before { left: auto; right: -10px; }
  .tl-item:nth-child(even)::before { left: -10px; }
}

/* ---------- Gallery + filters ------------------------------------------- */
.gallery-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.6rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--navy-800);
  padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.filter:hover { transform: translateY(-2px); }
.filter.is-active { background: var(--navy-900); color: var(--cream); border-color: var(--navy-900); }
.filter__count { font-size: 0.72rem; opacity: 0.7; }

/* Masonry via CSS columns — light, no layout libs, mobile-friendly. */
.masonry { columns: 3 280px; column-gap: 1.2rem; }
.masonry .gcard { break-inside: avoid; margin: 0 0 1.2rem; }
.gcard { position: relative; cursor: zoom-in; padding: 0; }
.gcard img { width: 100%; height: auto; display: block; background: var(--cream-2); transition: transform 0.5s var(--ease); }
.gcard:hover img { transform: scale(1.03); }
.gcard__cap {
  padding: 0.75rem 0.9rem 0.95rem; font-size: 0.9rem; color: var(--text-soft);
  border-top: 1px solid var(--line);
}
.gcard__cap b { color: var(--navy-900); font-weight: 600; display: block; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2rem; color: var(--wood-dk); }
.gcard__more { text-align: center; margin-top: 1.4rem; }
.gcard--video { cursor: pointer; }

/* ---------- Video markers (gallery + milestones) ------------------------- */
/* "Video" pill in the top-right corner of a thumbnail frame. */
.vbadge {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.6rem 0.3rem 0.5rem; border-radius: 999px;
  background: rgba(8, 20, 33, 0.82); color: var(--cream);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); backdrop-filter: blur(2px); pointer-events: none;
}
.vbadge svg { width: 11px; height: 11px; }
.milestone__img { position: relative; }
.milestone__img .vbadge { top: 0.7rem; right: 0.7rem; }
.gallery-empty { text-align: center; color: var(--text-soft); padding: 2rem; }

/* Lazy image fade-in */
img.lazy { opacity: 0; transition: opacity 0.5s var(--ease); }
img.lazy.loaded { opacity: 1; }

/* ---------- Lightbox ----------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(8, 20, 33, 0.94); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox__stage { position: relative; max-width: 1100px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox__imgwrap { display: inline-flex; align-items: flex-start; gap: 12px; max-width: 100%; line-height: 0; }
.lightbox__img { max-width: 100%; max-height: 78vh; min-width: 0; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: #000; }
/* Inline YouTube Short — portrait 9:16. Width is definite (so the iframe never
   collapses to zero inside the flex row) and height follows the aspect ratio. */
.lightbox__video {
  width: min(44vh, 92vw); aspect-ratio: 9 / 16; height: auto; flex: 0 0 auto;
  border: 0; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: #000;
}
@media (max-width: 700px) { .lightbox__video { width: min(42vh, 88vw); } }

/* QR code beside the photo (top-right), with the AWOOGA logo at its center. */
.lightbox__qr {
  position: relative; flex: 0 0 auto; z-index: 2;
  display: block; width: 78px; height: 78px; padding: 6px; line-height: 0;
  background: #f7f1e3; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); transition: transform 0.15s, box-shadow 0.15s;
}
.lightbox__qr:hover, .lightbox__qr:focus-visible { transform: scale(1.06); }
.lightbox__qr.hidden { display: none; }
.lightbox__qr-code { display: block; width: 100%; height: 100%; line-height: 0; }
.lightbox__qr-code canvas, .lightbox__qr-code img { display: block; width: 100% !important; height: 100% !important; }
.lightbox__qr-code table { display: none; }
.lightbox__qr-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 28%; height: 28%; padding: 2px; border-radius: 3px;
  background: #f7f1e3; box-shadow: 0 0 0 2px #f7f1e3;
}
@media (max-width: 700px) {
  .lightbox__imgwrap { gap: 8px; }
  .lightbox__qr { width: 58px; height: 58px; padding: 4px; }
}
.lightbox__cap { color: var(--cream); margin-top: 1rem; text-align: center; max-width: 70ch; font-size: 0.98rem; }
.lightbox__cap span { display: block; color: var(--brass-lt); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.3rem; }
.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(247,241,227,0.12); color: var(--cream); border: 0;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center; transition: background-color 0.2s;
}
.lightbox__btn:hover { background: rgba(247,241,227,0.28); }
.lightbox__prev { left: -6px; }
.lightbox__next { right: -6px; }
.lightbox__close { position: absolute; top: -10px; right: -6px; transform: none; }
.lightbox__counter { position: absolute; top: -8px; left: 0; color: rgba(247,241,227,0.7); font-size: 0.85rem; }
@media (max-width: 700px) {
  .lightbox__prev { left: -2px; } .lightbox__next { right: -2px; }
  .lightbox__btn { width: 44px; height: 44px; }
}

/* ==========================================================================
   Build Timeline Scrubber
   ========================================================================== */
.scrubber { max-width: 680px; margin-inline: auto; }

/* Cinematic "viewer" panel that frames the whole feature. */
.scrub-panel {
  background: linear-gradient(165deg, #163d61 0%, var(--navy-900) 100%);
  border: 1px solid rgba(227, 195, 90, 0.18);
  border-radius: var(--radius-lg);
  padding: clamp(0.9rem, 2.4vw, 1.5rem);
  box-shadow: 0 30px 70px rgba(12, 32, 52, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scrub-head { display: flex; justify-content: center; margin-bottom: clamp(0.9rem, 2vw, 1.25rem); }

/* Mode toggle: a tactile segmented control (full build vs. 30s highlights). */
.scrub-modes {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.3rem;
  background: rgba(8, 20, 33, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.32);
  max-width: 100%;
}
.scrub-mode {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 0; background: transparent; cursor: pointer;
  border-radius: 999px; padding: 0.5rem 1.05rem;
  font: inherit; font-size: 0.86rem; font-weight: 600;
  color: rgba(247, 241, 227, 0.66);
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.28s var(--ease), box-shadow 0.28s, transform 0.1s;
}
.scrub-mode svg { width: 16px; height: 16px; opacity: 0.85; }
.scrub-mode:hover { color: var(--cream); }
.scrub-mode:active { transform: translateY(1px); }
.scrub-mode.is-active {
  color: var(--navy-900);
  background: linear-gradient(180deg, var(--brass-lt), var(--brass));
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.scrub-mode.is-active svg { opacity: 1; }
.scrub-mode__tag {
  font-style: normal; font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.06rem 0.42rem; border-radius: 999px;
  background: rgba(8, 20, 33, 0.18); color: inherit;
}
.scrub-mode:not(.is-active) .scrub-mode__tag { background: rgba(227, 195, 90, 0.16); color: var(--brass-lt); }

/* Stage */
.scrub-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-900);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.scrub-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.scrub-img.is-front { opacity: 1; }
.scrub-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 20, 33, 0) 52%, rgba(8, 20, 33, 0.80) 100%);
}
.scrub-date {
  position: absolute; left: 18px; bottom: 16px; z-index: 2;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  color: var(--cream); letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.scrub-pos {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  background: rgba(8, 20, 33, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: rgba(247, 241, 227, 0.92);
  font-size: 0.74rem; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 0.28rem 0.7rem; border-radius: 999px;
}
/* A small "Highlights" badge that fades in only in highlights mode. */
.scrub-stage::after {
  content: "Highlights";
  position: absolute; left: 16px; top: 14px; z-index: 2;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--navy-900); background: linear-gradient(180deg, var(--brass-lt), var(--brass));
  padding: 0.22rem 0.6rem; border-radius: 999px;
  opacity: 0; transform: translateY(-4px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  box-shadow: 0 4px 10px rgba(201, 162, 39, 0.4);
}
.scrubber.is-highlights .scrub-stage::after { opacity: 1; transform: none; }

.scrub-cap {
  text-align: center; color: rgba(247, 241, 227, 0.82);
  margin: 1.1rem auto 1.3rem; max-width: 60ch; min-height: 2.6em;
  font-size: 0.98rem;
}

/* Controls */
.scrub-controls { display: flex; align-items: center; gap: 1rem; }
.scrub-play {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 32% 28%, #d2554c, var(--red) 58%, var(--red-dk));
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(184, 71, 63, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}
.scrub-play:hover { transform: scale(1.07); }
.scrub-play:active { transform: scale(0.97); }
.scrub-play svg { width: 24px; height: 24px; }
.scrubber.is-playing .scrub-play {
  background: radial-gradient(circle at 32% 28%, #2b6593, var(--navy-700) 58%, var(--navy-800));
  box-shadow: 0 10px 24px rgba(22, 61, 97, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.scrubber.is-highlights .scrub-play {
  background: radial-gradient(circle at 32% 28%, var(--brass-lt), var(--brass) 60%, var(--wood-dk));
  color: var(--navy-900);
  box-shadow: 0 10px 24px rgba(201, 162, 39, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.scrub-track { position: relative; flex: 1; }
.scrub-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; outline: none; margin: 0;
  cursor: pointer;
  background: linear-gradient(to right,
    var(--brass-lt) 0%, var(--brass) var(--p, 0%),
    rgba(247, 241, 227, 0.16) var(--p, 0%), rgba(247, 241, 227, 0.16) 100%);
}
.scrub-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--brass-lt) 72%);
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.scrub-range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--brass-lt) 72%);
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); cursor: pointer;
}
.scrub-range:hover::-webkit-slider-thumb { transform: scale(1.12); }
.scrub-range:focus-visible { outline: 3px solid var(--brass-lt); outline-offset: 5px; }
.scrub-ticks { position: relative; height: 1.4em; margin-top: 0.55rem; }
.scrub-tick {
  position: absolute; transform: translateX(-50%);
  font-size: 0.7rem; font-weight: 600; color: rgba(247, 241, 227, 0.5);
  white-space: nowrap;
}
.scrub-tick::before {
  content: ""; position: absolute; top: -0.46rem; left: 50%;
  width: 1px; height: 0.32rem; background: rgba(247, 241, 227, 0.25);
}
@media (max-width: 560px) {
  .scrub-stage { aspect-ratio: 1 / 1; }
  .scrub-mode { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
}

/* ==========================================================================
   Builder's Blotter — entry card + scribbled-notebook modal
   ========================================================================== */

/* ---------- Entry card (sits at the foot of the timeline) ---------------- */
.blotter-cta { display: flex; justify-content: center; margin-top: clamp(2.4rem, 5vw, 3.4rem); }
.blotter-card {
  position: relative;
  display: block; width: min(440px, 100%);
  text-align: left; cursor: pointer;
  background:
    repeating-linear-gradient(transparent, transparent 1.55rem, rgba(22, 61, 97, 0.12) 1.55rem, rgba(22, 61, 97, 0.12) calc(1.55rem + 1px)),
    var(--paper);
  border: 1px solid rgba(12, 32, 52, 0.14);
  border-radius: 4px;
  padding: 1.2rem 1.4rem 1.3rem;
  box-shadow: var(--shadow);
  transform: rotate(-1.4deg);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.blotter-card:hover, .blotter-card:focus-visible {
  transform: rotate(-0.4deg) translateY(-3px); box-shadow: var(--shadow-lg); outline: none;
}
.blotter-card:focus-visible { box-shadow: var(--shadow-lg), 0 0 0 3px var(--brass-lt); }
/* A strip of "tape" pinning the card to the page */
.blotter-card__tape {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 92px; height: 24px;
  background: rgba(227, 195, 90, 0.45);
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 1px 2px rgba(12, 32, 52, 0.12);
}
.blotter-card__doodle {
  position: absolute; top: 0.7rem; right: 0.9rem;
  font-size: 1.4rem; color: var(--wood-dk); opacity: 0.55; transform: rotate(8deg);
}
.blotter-card__title {
  display: block;
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: 1.85rem; line-height: 1.1; color: var(--navy-900);
}
.blotter-card__sub {
  display: block; margin-top: 0.3rem;
  font-family: "Patrick Hand", "Inter", sans-serif;
  font-size: 1.02rem; color: var(--ink-soft);
}
.blotter-card__open {
  display: inline-block; margin-top: 0.7rem;
  font-family: "Caveat", cursive; font-weight: 700; font-size: 1.3rem;
  color: var(--red);
}

/* ---------- The notebook modal ------------------------------------------- */
.blotter {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.blotter.is-open { display: flex; }
.blotter__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 20, 33, 0.94); backdrop-filter: blur(4px);
}

.blotter__book {
  position: relative; z-index: 1;
  width: min(720px, 100%); max-height: 88vh; overflow: hidden auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 4px 4px 6px 6px;
  background:
    /* red margin rule */
    linear-gradient(90deg, transparent 52px, rgba(184, 71, 63, 0.35) 52px, rgba(184, 71, 63, 0.35) 53px, transparent 53px),
    /* blue ruled lines */
    repeating-linear-gradient(transparent, transparent 1.85rem, rgba(22, 61, 97, 0.14) 1.85rem, rgba(22, 61, 97, 0.14) calc(1.85rem + 1px)),
    var(--paper);
  box-shadow: var(--shadow-lg);
  outline: none;
  animation: blotter-in 0.4s var(--ease);
}
@keyframes blotter-in { from { opacity: 0; transform: translateY(18px) rotate(-0.6deg); } to { opacity: 1; transform: none; } }

/* Spiral binding across the top */
.blotter__spiral {
  position: sticky; top: 0; z-index: 3; height: 26px;
  background:
    radial-gradient(circle at center, rgba(12, 32, 52, 0.55) 0 4px, transparent 5px) 0 6px / 34px 18px repeat-x,
    linear-gradient(180deg, rgba(12, 32, 52, 0.16), rgba(12, 32, 52, 0));
}
.blotter__spiral::after {
  content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px;
  background: rgba(12, 32, 52, 0.18);
}

.blotter__close {
  position: absolute; top: 8px; right: 10px; z-index: 4;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(12, 32, 52, 0.5); background: var(--paper);
  color: var(--navy-900); font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center;
  transform: rotate(4deg);
  transition: transform 0.18s var(--ease), background-color 0.18s;
}
.blotter__close:hover, .blotter__close:focus-visible {
  transform: rotate(0) scale(1.06); background: var(--brass-lt); outline: none;
}

.blotter__page { padding: 0.4rem clamp(1.2rem, 4vw, 2.4rem) 2.4rem 64px; }

.blotter__eyebrow {
  margin: 0; font-family: "Patrick Hand", sans-serif;
  font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--wood-dk);
}
.blotter__title {
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.2rem); line-height: 1; color: var(--navy-900);
  margin: 0.1rem 0 0.4rem; transform: rotate(-0.8deg);
}
.blotter__intro {
  font-family: "Patrick Hand", sans-serif; font-size: 1.12rem; line-height: 1.85rem;
  color: var(--ink); margin: 0 0 1.4rem; max-width: 56ch;
}

.blotter-entry { margin: 0 0 1.5rem; transform: rotate(var(--tilt, 0deg)); }
.blotter-entry__q, .blotter-entry__a { position: relative; margin: 0; padding-left: 1.7rem; }
.blotter-entry__bullet {
  position: absolute; left: 0; top: 0.05em;
  font-family: "Caveat", cursive; font-weight: 700;
}
.blotter-entry__q {
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: 1.5rem; line-height: 1.25; color: var(--navy-900);
}
.blotter-entry__q .blotter-entry__bullet { color: var(--red); font-size: 1.5rem; }
.blotter-entry__a {
  margin-top: 0.25rem;
  font-family: "Patrick Hand", sans-serif; font-size: 1.1rem; line-height: 1.85rem;
  color: var(--ink);
}
.blotter-entry__a .blotter-entry__bullet { color: var(--navy-600); font-size: 1.2rem; }
.blotter-entry__a em { font-style: italic; color: var(--ink-soft); }
.blotter-entry__a strong { font-weight: 700; color: var(--navy-900); }
.blotter-entry__a a {
  color: var(--red); text-decoration: underline; text-decoration-style: wavy;
  text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.blotter-entry__a a:hover, .blotter-entry__a a:focus-visible { color: var(--red-dk); }

.blotter__sign {
  font-family: "Caveat", cursive; font-size: 1.5rem; color: var(--wood-dk);
  text-align: right; transform: rotate(-1.5deg); margin: 1.6rem 0 0;
}

/* ---------- Second section: notes other builders sent the designer -------- */
/* A dashed divider with a centered section mark sets this apart from Adam's
   own blotter above. */
.blotter__divider {
  margin: 2.6rem 0 1.8rem;
  border-top: 2px dashed rgba(12, 32, 52, 0.28);
  text-align: center; line-height: 0;
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: 1.7rem; color: var(--wood-dk);
}
.blotter__title--alt { color: var(--wood-dk); transform: rotate(0.6deg); }
.blotter__intro--alt { color: var(--ink-soft); font-style: italic; }
.blotter__intro--alt strong { font-style: normal; color: var(--navy-900); }

.blotter-cat { margin: 0 0 1.8rem; }
.blotter-cat__title {
  margin: 0 0 0.6rem;
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: 1.85rem; line-height: 1.1; color: var(--navy-900);
  transform: rotate(-0.5deg);
}
.blotter-cat__list { list-style: none; margin: 0; padding: 0; }
.blotter-note {
  position: relative; margin: 0 0 1.05rem; padding-left: 1.7rem;
  font-family: "Patrick Hand", sans-serif; font-size: 1.08rem; line-height: 1.85rem;
  color: var(--ink);
}
/* a hand-drawn dash bullet for each note */
.blotter-note::before {
  content: "—"; position: absolute; left: 0; top: 0;
  font-family: "Caveat", cursive; font-weight: 700; color: var(--red);
}
.blotter-note__src { color: var(--ink-soft); font-style: italic; white-space: nowrap; }

/* Roger Balling's electric ampere-draw table */
.blotter-tbl {
  margin: 0.7rem 0 0.2rem; border-collapse: collapse;
  font-family: "Patrick Hand", sans-serif; font-size: 1rem; color: var(--ink);
}
.blotter-tbl th, .blotter-tbl td {
  border: 1px solid rgba(22, 61, 97, 0.35);
  padding: 0.2rem 0.85rem; text-align: center;
}
.blotter-tbl th {
  font-family: "Caveat", cursive; font-weight: 700; font-size: 1.2rem;
  color: var(--navy-900); background: rgba(227, 195, 90, 0.18);
}

@media (max-width: 560px) {
  .blotter__book {
    background:
      repeating-linear-gradient(transparent, transparent 1.85rem, rgba(22, 61, 97, 0.12) 1.85rem, rgba(22, 61, 97, 0.12) calc(1.85rem + 1px)),
      var(--paper);
  }
  .blotter__page { padding: 0.4rem 1.1rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .blotter__book { animation: none; }
  .blotter-card, .blotter-card:hover, .blotter-card:focus-visible,
  .blotter-entry, .blotter__title, .blotter__sign, .blotter-card__doodle, .blotter-card__tape, .blotter__close {
    transform: none;
  }
}
