/* ============================================================================
   Live-Edge Arizona Rosewood Dining Table — build journal
   Plain CSS, one file. Aesthetic: natural wood tones + matte black.
   ========================================================================= */

/* ----- Design tokens ----- */
:root {
  --rosewood-900: #2b1712;   /* deepest heartwood */
  --rosewood-700: #4a271c;
  --rosewood-500: #7a4a34;   /* primary wood tone */
  --rosewood-300: #b07a58;   /* sapwood / warm accent */
  --rosewood-100: #e6d2c2;   /* pale sapwood */
  --cream:        #f6efe7;   /* page background */
  --cream-card:   #fffaf4;   /* card surfaces */
  --ink:          #1a1714;   /* matte black text/metal */
  --ink-soft:     #443e38;
  --steel:        #14130f;   /* matte-black metal */
  --line:         #e2d5c6;   /* hairline borders */
  --accent:       #c8853f;   /* CTA / highlight */
  --shadow:       0 8px 30px rgba(43, 23, 18, 0.10);
  --shadow-sm:    0 2px 10px rgba(43, 23, 18, 0.08);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--rosewood-700); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; color: var(--rosewood-900); font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.eyebrow {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--rosewood-500);
  margin: 0 0 0.6rem;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #b3712f; }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.22); }
.btn-outline { background: transparent; color: var(--rosewood-700); border-color: var(--rosewood-300); }
.btn-outline:hover { background: var(--rosewood-100); }

/* ----- Image placeholders (drop real photos in later, zero layout shift) ----- */
.ph {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, #efe2d2 0 14px, #e9dac7 14px 28px);
  color: var(--rosewood-700);
  border: 1px dashed var(--rosewood-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ph::before {
  content: "📷";
  position: absolute; top: 10px; left: 12px;
  font-size: 1rem; opacity: 0.5;
}
.ph span {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.02em; padding: 0.5rem 1rem; max-width: 90%;
}
.ph-16x9 { aspect-ratio: 16 / 9; }
.ph-4x3  { aspect-ratio: 4 / 3; }
.ph-1x1  { aspect-ratio: 1 / 1; }
.ph-hero { aspect-ratio: 16 / 8; width: 100%; }

/* Real images dropped into slots */
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.toc-card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery-grid img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-sm); display: block;
}
.gallery-slideshow .hero-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Captioned, clickable gallery items */
.gallery-item { margin: 0; cursor: zoom-in; display: flex; flex-direction: column; }
.gallery-item img { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.gallery-item:hover img { box-shadow: var(--shadow); transform: translateY(-2px); }
.gallery-item figcaption {
  font-size: 0.82rem; color: var(--ink-soft); line-height: 1.4;
  padding: 0.5rem 0.15rem 0;
}
.hero-slide img { cursor: zoom-in; }

/* Fullscreen lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 8, 5, 0.93);
  opacity: 0; visibility: hidden; transition: opacity 0.22s ease, visibility 0.22s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 6px; box-shadow: 0 12px 60px rgba(0,0,0,0.55); }
.lightbox-caption { color: #f3ece2; font-size: 0.98rem; margin-top: 1rem; text-align: center; max-width: 72ch; min-height: 1.2em; padding: 0 1rem; }
.lightbox-close, .lightbox-nav {
  position: fixed; background: rgba(0,0,0,0.42); color: #fff; border: none; cursor: pointer;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1;
  transition: background 0.15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(0,0,0,0.72); }
.lightbox-close { top: 18px; right: 18px; width: 46px; height: 46px; font-size: 1.7rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 2rem; }
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }
.lightbox-counter { position: fixed; top: 22px; left: 22px; color: #f3ece2; font-size: 0.85rem; opacity: 0.8; }
@media (max-width: 560px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.5rem; }
  .lightbox-img { max-height: 72vh; }
}

/* ============================================================================
   HEADER (shared)
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(43, 23, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.brand-kyrza { display: inline-flex; align-items: center; text-decoration: none; }
/* Mark fills the 64px header bar, leaving 4px above and below (centered). */
.brand-mark {
  height: 56px; width: auto; display: block;
  transition: opacity 0.15s ease;
}
.brand-kyrza:hover .brand-mark { opacity: 0.78; }
.brand-home { display: inline-flex; align-items: center; text-decoration: none; }
.brand-home::before {
  content: ""; display: inline-block;
  width: 1px; height: 18px; background: rgba(255,255,255,0.28);
  margin: 0 0.6rem 0 0.35rem;
}
.brand-text { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }
.header-actions a { color: var(--rosewood-100); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.header-actions a:hover { color: #fff; }

/* ============================================================================
   HERO
   ========================================================================= */
.hero { position: relative; background: var(--rosewood-900); color: #fff; overflow: hidden; }
.hero-slideshow { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide .ph { width: 100%; height: 100%; border: none; border-radius: 0;
  background: repeating-linear-gradient(45deg, #3a2018 0 18px, #46271c 18px 36px); color: var(--rosewood-100); }
.hero-slide .ph span { font-size: 0.95rem; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,10,7,0.35) 0%, rgba(20,10,7,0.72) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  min-height: clamp(460px, 72vh, 680px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 4rem 0;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .subhead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--rosewood-100); max-width: 60ch; margin: 1.2rem 0 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* slideshow controls */
.slideshow-dots { position: absolute; z-index: 3; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.slideshow-dots button {
  width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.7);
  background: transparent; cursor: pointer; padding: 0; transition: background 0.2s;
}
.slideshow-dots button.is-active { background: #fff; }
.slideshow-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.35); color: #fff; font-size: 1.4rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.slideshow-arrow:hover { background: rgba(0,0,0,0.6); }
.slideshow-arrow.prev { left: 18px; }
.slideshow-arrow.next { right: 18px; }
.hero-gallery-btn {
  position: absolute; z-index: 3; bottom: 14px; right: 18px;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.95rem; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.55); background: rgba(0,0,0,0.4);
  color: #fff; font: inherit; font-size: 0.85rem; font-weight: 600;
  backdrop-filter: blur(2px); transition: background 0.2s, border-color 0.2s;
}
.hero-gallery-btn:hover { background: rgba(0,0,0,0.65); border-color: #fff; }
.hero-gallery-btn span { font-size: 1.05em; line-height: 1; }

/* ============================================================================
   PROJECT SNAPSHOT
   ========================================================================= */
.snapshot { background: var(--cream); }
.snapshot-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: start; }
.specs-card {
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem 2rem; box-shadow: var(--shadow-sm);
}
.specs-card h3 { margin-top: 0; }
.specs-list { list-style: none; margin: 0; padding: 0; }
.specs-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.96rem;
}
.specs-list li:last-child { border-bottom: none; }
.specs-list .k { color: var(--ink-soft); font-weight: 500; }
.specs-list .v { color: var(--rosewood-900); font-weight: 600; text-align: right; }
.snapshot-note {
  background: var(--rosewood-900); color: var(--rosewood-100);
  border-radius: var(--radius); padding: 1.75rem 2rem; align-self: stretch;
  display: flex; flex-direction: column; justify-content: center;
}
.snapshot-note h3 { color: #fff; margin-top: 0; }
.snapshot-note p { margin-bottom: 1.1rem; }
.snapshot-note p:last-child { margin-bottom: 0; }

/* ============================================================================
   TABLE OF CONTENTS
   ========================================================================= */
.toc { background: linear-gradient(180deg, var(--cream) 0%, #efe3d4 100%); }
.toc-head { text-align: center; max-width: 60ch; margin: 0 auto 2.75rem; }
.toc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.toc-card {
  display: flex; flex-direction: column;
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  color: inherit; box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.toc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--rosewood-300); }
.toc-card .ph { border-radius: 0; border-left: none; border-right: none; border-top: none; }
.toc-card-body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.toc-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  align-self: flex-start;
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem;
  color: #fff; background: var(--rosewood-700);
  border-radius: 999px; padding: 0.2rem 0.7rem; letter-spacing: 0.03em;
}
.toc-card h3 { margin: 0; font-size: 1.18rem; }
.toc-card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); flex: 1; }
.toc-time {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600; color: var(--rosewood-500);
  margin-top: 0.3rem;
}

/* ============================================================================
   FOOTER (shared)
   ========================================================================= */
.site-footer {
  background: var(--ink); color: var(--rosewood-100);
  padding: 3rem 0 2.5rem; margin-top: 0;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: center; }
.site-footer h4 { color: #fff; margin: 0 0 0.4rem; font-family: var(--serif); }
.site-footer p { margin: 0; font-size: 0.9rem; opacity: 0.8; }
.site-footer a { color: var(--rosewood-300); }

/* ============================================================================
   STEP PAGES (sidebar + content) — used in Phase 2
   ========================================================================= */
.step-page { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.step-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: start; }
/* Pin the sidebar as the page scrolls. Sticky lives on the <aside> (not the
   inner nav) so its containing block is the full-height grid, giving it room
   to travel. top equals the aside's natural resting offset (65px header +
   2.5rem .step-page padding) so it locks immediately without drifting upward. */
.step-layout aside { position: sticky; top: calc(65px + 2.5rem); align-self: start; }

.build-sidebar {
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1rem; box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.build-sidebar h4 {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rosewood-500); margin: 0 0 0.75rem; padding: 0 0.5rem;
}
.build-sidebar ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.build-sidebar li { margin: 0; }
.build-sidebar a {
  display: flex; gap: 0.6rem; align-items: baseline;
  padding: 0.5rem 0.6rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.3;
  transition: background 0.15s, color 0.15s;
}
.build-sidebar a:hover { background: var(--rosewood-100); color: var(--rosewood-900); }
.build-sidebar a .n { font-weight: 700; color: var(--rosewood-300); min-width: 1.4em; font-size: 0.85rem; }
.build-sidebar li.is-current a { background: var(--rosewood-700); color: #fff; }
.build-sidebar li.is-current a .n { color: var(--rosewood-100); }

.step-content { min-width: 0; }
.step-header { border-bottom: 2px solid var(--line); padding-bottom: 1.5rem; margin-bottom: 2rem; }
.step-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; margin-bottom: 0.5rem; }
.step-badge {
  font-family: var(--sans); font-weight: 700; font-size: 0.8rem; color: #fff;
  background: var(--rosewood-700); border-radius: 999px; padding: 0.25rem 0.8rem;
}
.step-time-label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600; color: var(--rosewood-500);
  background: var(--rosewood-100); border-radius: 999px; padding: 0.25rem 0.8rem;
}
.step-purpose { font-size: 1.1rem; color: var(--ink-soft); max-width: 65ch; }

.content-block { margin-bottom: 2.5rem; }
.content-block h2 { margin: 0 0 0.9rem; }
.content-block ul, .content-block ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.content-block li { margin-bottom: 0.4rem; }

/* Tips block */
.tips {
  background: #f0f7ee; border: 1px solid #cfe3c8; border-left: 4px solid #5e9c4e;
  border-radius: var(--radius-sm); padding: 1.25rem 1.5rem; margin: 0 0 2.5rem;
}
.tips h3 { color: #2f5a23; margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.tips ul { margin: 0; padding-left: 1.2rem; }
.tips li { margin-bottom: 0.35rem; }

/* Mistakes & Fixes callout */
.callout {
  background: #fdf1ec; border: 1px solid #f0cbbb; border-left: 4px solid #c4602f;
  border-radius: var(--radius-sm); padding: 1.25rem 1.5rem; margin: 0 0 2rem;
}
.callout h3 { color: #9c4216; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; }
.callout p:last-child { margin-bottom: 0; }
.callout .fix { font-weight: 600; color: #2f5a23; }

/* Spec / key-instruction box */
.keybox {
  background: var(--rosewood-900); color: var(--rosewood-100);
  border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 0 0 2.5rem;
}
.keybox h3 { color: #fff; margin: 0 0 0.7rem; }
.keybox ul { margin: 0; padding-left: 1.2rem; }
.keybox li { margin-bottom: 0.35rem; }

/* Contained slideshow (final gallery on step 15) */
.gallery-slideshow {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  margin: 0 0 2.5rem; background: var(--rosewood-900);
}
.gallery-slideshow .hero-slideshow { position: absolute; inset: 0; }
.gallery-slideshow .hero-slide .ph { border-radius: 0; border: none; }

/* Image gallery on step pages */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin: 0 0 2.5rem;
}
.gallery-grid .ph { width: 100%; }

/* Inline "view images" CTA — opens a challenge-specific lightbox subset.
   The subset's <img data-lightbox> live in a hidden [data-lightbox-set]. */
[data-lightbox-set] { display: none; }
.inline-gallery-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-weight: 600; line-height: 1.3;
  color: var(--rosewood-700); background: var(--cream-card);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.85rem; margin: 0.25rem 0;
  cursor: pointer; text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease;
}
.inline-gallery-cta:hover { background: var(--rosewood-100); border-color: var(--rosewood-300); }
.inline-gallery-cta::before { content: "\25A3"; font-size: 1.05em; line-height: 1; }
.inline-gallery-cta::after { content: "\2192"; opacity: 0.7; }

/* Prev / next step nav */
.step-nav { display: flex; justify-content: space-between; gap: 1rem; border-top: 2px solid var(--line); padding-top: 1.75rem; margin-top: 1rem; }
.step-nav a {
  display: flex; flex-direction: column; gap: 0.2rem; text-decoration: none;
  padding: 0.9rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream-card); max-width: 48%; transition: border-color 0.15s, transform 0.15s;
}
.step-nav a:hover { border-color: var(--rosewood-300); transform: translateY(-2px); }
.step-nav .dir { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rosewood-500); font-weight: 600; }
.step-nav .ttl { font-weight: 600; color: var(--rosewood-900); }
.step-nav .next { text-align: right; margin-left: auto; }

/* ============================================================================
   TOOLS & MATERIALS DRAWER (Phase 3)
   ========================================================================= */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(20,10,7,0.5); z-index: 90;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; height: 100%; width: min(420px, 90vw);
  background: var(--cream-card); z-index: 100;
  transition: transform 0.28s ease;
  display: flex; flex-direction: column;
}
.drawer-right { right: 0; transform: translateX(100%); box-shadow: -8px 0 40px rgba(0,0,0,0.25); }
.drawer-left  { left: 0;  transform: translateX(-100%); box-shadow:  8px 0 40px rgba(0,0,0,0.25); }
.drawer.is-open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { margin: 0; }
.drawer-tabs {
  display: inline-flex; background: var(--rosewood-100);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.drawer-tab {
  border: none; background: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft);
  padding: 0.4rem 0.95rem; border-radius: 999px; line-height: 1; transition: background 0.15s, color 0.15s;
}
.drawer-tab.is-active { background: var(--rosewood-700); color: #fff; }
.drawer-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.drawer-body { padding: 1.25rem 1.5rem; overflow-y: auto; }
.drawer-body ul { list-style: none; margin: 0; padding: 0; }
.drawer-body li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.drawer-body li:last-child { border-bottom: none; }
.drawer-body .tool-name { font-weight: 600; color: var(--rosewood-900); display: block; }
.drawer-body .tool-note { font-size: 0.86rem; color: var(--ink-soft); }
.tool-row {
  display: flex; gap: 0.85rem; align-items: flex-start;
  text-decoration: none; color: inherit; border-radius: var(--radius-sm);
  padding: 0.2rem; margin: -0.2rem; transition: background 0.15s;
}
.tool-row:hover { background: var(--rosewood-100); }
.tool-thumb {
  width: 58px; height: 58px; flex: 0 0 58px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.tool-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--rosewood-100); font-size: 1.3rem; opacity: 0.75;
}
.tool-row-text { min-width: 0; }
.drawer-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); }
.drawer-foot .btn { width: 100%; justify-content: center; font-size: 0.9rem; }

/* ============================================================================
   TOOLS & MATERIALS FULL GUIDE (tools-and-materials.html)
   ========================================================================= */
.tools-page-head { padding-bottom: 1.5rem; }
.tools-page-head h1 { max-width: 20ch; }
.disclosure {
  font-size: 0.85rem; color: var(--ink-soft); max-width: 72ch;
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-top: 1.25rem;
}
.tools-toc {
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 2.5rem;
}
.tools-toc-label {
  display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700; margin-bottom: 0.85rem;
}
.tools-toc ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.35rem 1.25rem;
}
.tools-toc a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  text-decoration: none; color: var(--rosewood-900); font-weight: 600; font-size: 0.95rem;
  padding: 0.4rem 0.5rem; border-radius: var(--radius-sm); transition: background 0.15s;
}
.tools-toc a:hover { background: var(--rosewood-100); }
.tools-toc-count {
  font-size: 0.78rem; font-weight: 700; color: var(--ink-soft);
  background: var(--rosewood-100); border-radius: 999px; padding: 0.05rem 0.5rem;
}
.tool-cat { margin-bottom: 3rem; scroll-margin-top: 84px; }
.tool-cat h2 { margin: 0 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--line); }
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  display: flex; flex-direction: column;
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  scroll-margin-top: 84px;
}
.tool-card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tool-card .ph { border-radius: 0; border-left: none; border-right: none; border-top: none; }
.tool-card-body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.tool-card-body h3 { margin: 0; font-size: 1.15rem; }
.tool-card-body p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.tool-used { font-size: 0.84rem !important; }
.tool-buy { margin-top: auto; align-self: flex-start; font-size: 0.88rem; padding: 0.6rem 1.1rem; }
.tool-buys { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.tool-buys .tool-buy { margin-top: 0; }

/* ============================================================================
   BUILD PROGRESS (progress.js — localStorage, per-browser)
   ========================================================================= */
.resume-banner {
  background: var(--rosewood-700); color: var(--rosewood-100);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.resume-banner .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding-top: 0.8rem; padding-bottom: 0.8rem; font-size: 0.95rem;
}
.resume-banner .btn { padding: 0.55rem 1.15rem; font-size: 0.88rem; }

.toc-progress { max-width: 560px; margin: 0 auto 2.25rem; text-align: center; }
.toc-progress-label { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.toc-progress-track {
  height: 10px; border-radius: 999px; background: #e5d6c4;
  border: 1px solid var(--line); overflow: hidden;
}
.toc-progress-fill {
  height: 100%; border-radius: 999px; min-width: 4px;
  background: linear-gradient(90deg, var(--rosewood-500), var(--accent));
  transition: width 0.4s ease;
}
.toc-card.is-done { border-color: #5e9c4e; }
.toc-card.is-done .toc-step-num { background: #5e9c4e; }

.build-sidebar li.is-done a .t::after { content: " ✓"; color: #5e9c4e; font-weight: 700; }
.build-sidebar li.is-done.is-current a .t::after { color: #b9e0ae; }

.step-complete {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem;
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.35rem; margin: 0 0 1.75rem;
}
.step-complete-btn {
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  color: var(--rosewood-700); background: transparent;
  border: 1.5px solid var(--rosewood-300); border-radius: 999px;
  padding: 0.6rem 1.3rem; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.step-complete-btn:hover { background: var(--rosewood-100); }
.step-complete-btn.is-done { background: #5e9c4e; border-color: #5e9c4e; color: #fff; }
.step-complete-note { font-size: 0.85rem; color: var(--ink-soft); }

/* ============================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 880px) {
  .snapshot-grid { grid-template-columns: 1fr; }
  .step-layout { grid-template-columns: 1fr; }
  /* Content first on small screens; the step list follows as an "up next" map */
  .step-layout aside { order: 2; position: static; }
  .build-sidebar {
    position: static; max-height: none;
    margin-top: 2rem; margin-bottom: 0;
  }
  .build-sidebar ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.15rem; }
}
@media (max-width: 560px) {
  /* Keep the Tools & Materials drawer reachable from the header on phones */
  .header-actions a:not(.btn):not([data-open-tools]) { display: none; }
  .header-actions { gap: 0.6rem; }
  .header-actions a[data-open-tools] { font-size: 0.82rem; white-space: nowrap; }
  .brand { white-space: nowrap; }
  .brand-text { font-size: 1rem; }
  /* Keep the Kyrza logo (route back to the hub) reachable on phones */
  .brand-mark { height: 48px; }
  .header-actions .btn { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .slideshow-arrow { display: none; }
  .step-nav { flex-direction: column; }
  .step-nav a { max-width: 100%; }
}
