:root {
  --ink: #1a1208;
  --parchment: #f5eedf;
  --parchment-dark: #e8ddc8;
  --cedar: #7a3b1e;
  --cedar-light: #a0522d;
  --spruce: #c8b89a;
  --spruce-light: #ddd0b8;
  --rosewood: #3d1a0e;
  --gold: #b8860b;
  --gold-light: #d4a32a;
  --shadow: rgba(26,18,8,0.15);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--parchment);
  color: var(--ink);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── Grain texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── Wood grain lines (decorative) ── */
.grain-bar {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--cedar) 0px, var(--cedar) 1px,
    var(--cedar-light) 1px, var(--cedar-light) 3px,
    var(--rosewood) 3px, var(--rosewood) 4px,
    var(--spruce) 4px, var(--spruce) 6px
  );
  opacity: 0.7;
}

/* ── Masthead ── */
header {
  position: relative;
  background-color: var(--rosewood);
  padding: 0;
  overflow: hidden;
}

header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(122,59,30,0.4) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 40px 50px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.site-eyebrow {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--spruce);
  margin-bottom: 16px;
  opacity: 0.85;
}

.site-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 300;
  color: var(--parchment);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.site-title em {
  font-style: italic;
  color: var(--gold-light);
}

.site-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  color: var(--spruce-light);
  margin-top: 14px;
  font-weight: 300;
  letter-spacing: 0.03em;
}

.header-rosette {
  opacity: 0.2;
  flex-shrink: 0;
}

.header-rosette svg {
  width: 120px;
  height: 120px;
}

/* ── Navigation ── */
nav {
  background-color: var(--ink);
  border-bottom: none;
}

/* ── Rosette divider band ── */
.rosette-band {
  background-color: var(--ink);
  width: 100%;
  overflow: hidden;
  line-height: 0;
  display: block;
}

.rosette-band svg {
  display: block;
  width: 100%;
  height: 38px;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 0;
  align-items: center;
}

nav a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--spruce);
  text-decoration: none;
  padding: 16px 22px;
  display: block;
  transition: color 0.2s, background 0.2s;
  border-right: 1px solid rgba(200,184,154,0.1);
}

nav a:first-child { border-left: 1px solid rgba(200,184,154,0.1); }

nav a:hover, nav a.active {
  color: var(--gold-light);
  background: rgba(184,134,11,0.08);
}

/* ── Layout ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  padding: 60px 0 80px;
  align-items: start;
}

/* ── Section header ── */
.section-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cedar);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--spruce), transparent);
}

/* ── Blog posts ── */
.posts { display: flex; flex-direction: column; gap: 0; }

.post {
  border-top: 1px solid var(--spruce-light);
  padding: 44px 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  animation: fadeUp 0.6s ease both;
}

.post:last-child { border-bottom: 1px solid var(--spruce-light); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post:nth-child(1) { animation-delay: 0.05s; }
.post:nth-child(2) { animation-delay: 0.15s; }
.post:nth-child(3) { animation-delay: 0.25s; }

.post-date-block {
  text-align: center;
  padding-top: 4px;
}

.post-date-day {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 300;
  color: var(--cedar);
  line-height: 1;
  display: block;
}

.post-date-month {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--spruce);
  display: block;
  margin-top: 4px;
}

.post-date-year {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--spruce);
  opacity: 0.7;
  display: block;
}

.post-body {}

.post-tag {
  display: inline-block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--cedar);
  padding: 3px 10px;
  margin-bottom: 12px;
  border-radius: 1px;
}

.post-tag.tools { background: var(--rosewood); }
.post-tag.materials { background: var(--gold); color: var(--ink); }

.post-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.post-title a:hover { color: var(--cedar); }

.post-title em { font-style: italic; }

.post-excerpt {
  font-size: 15.5px;
  line-height: 1.7;
  color: #3a2e1e;
  margin-bottom: 18px;
}

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 18px;
  filter: sepia(15%) contrast(1.05);
  display: block;
}

.post-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--spruce-light) 0%, var(--parchment-dark) 50%, var(--spruce) 100%);
  border-radius: 2px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.post-image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    5deg,
    transparent 0px, transparent 8px,
    rgba(122,59,30,0.06) 8px, rgba(122,59,30,0.06) 9px
  );
}

.post-image-placeholder span {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--cedar);
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.read-more {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cedar);
  text-decoration: none;
  border-bottom: 1px solid var(--cedar);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.read-more:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* ── Sidebar ── */
.sidebar { position: sticky; top: 30px; }

.sidebar-card {
  background: var(--parchment-dark);
  border: 1px solid var(--spruce-light);
  padding: 28px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cedar), var(--gold), var(--cedar));
}

.sidebar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--spruce-light);
}

/* Progress tracker */
.progress-list { list-style: none; }

.progress-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(200,184,154,0.4);
  font-size: 14px;
  color: #3a2e1e;
}

.progress-item:last-child { border-bottom: none; }

.progress-item-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  flex: 1;
  min-width: 0;
}

.progress-item-title {
  flex: 1;
  min-width: 0;
}

.progress-item-days {
  font-size: 12px;
  font-weight: 600;
  color: #7a6b58;
  flex-shrink: 0;
}

.progress-item.active-item .progress-item-days {
  color: var(--cedar);
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.progress-dot.done     { background: var(--cedar); }
.progress-dot.active   { background: var(--gold); box-shadow: 0 0 0 3px rgba(184,134,11,0.25); }
.progress-dot.pending  { background: transparent; border: 2px solid var(--spruce); }

.progress-item.done-item   { color: var(--cedar); }
.progress-item.active-item { color: var(--ink); font-weight: bold; }
.progress-item.pending-item { color: #9a8c78; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.stat-box {
  text-align: center;
  background: var(--parchment);
  padding: 14px 8px;
  border: 1px solid var(--spruce-light);
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  color: var(--cedar);
  display: block;
  line-height: 1;
}

.stat-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--spruce);
  display: block;
  margin-top: 4px;
}

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cedar);
  border: 1px solid var(--cedar);
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.tag:hover {
  background: var(--cedar);
  color: var(--parchment);
}

/* About card */
.about-text {
  font-size: 14px;
  line-height: 1.7;
  color: #3a2e1e;
}

.about-text strong { color: var(--cedar); }

.about-sidebar-body .trix-content {
  font-size: 14px;
  line-height: 1.7;
  color: #3a2e1e;
}

.about-sidebar-body .trix-content p {
  margin-bottom: 0.75em;
}

.about-sidebar-body .trix-content p:last-child {
  margin-bottom: 0;
}

.about-sidebar-body .trix-content strong {
  color: var(--cedar);
}

/* ── Footer ── */
footer {
  background: var(--ink);
  padding: 40px;
  text-align: center;
}

.footer-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 300;
  font-style: italic;
  color: var(--parchment);
  margin-bottom: 8px;
}

.footer-sub {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--spruce);
  opacity: 0.7;
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 20px auto;
}

/* ── Featured banner ── */
.featured-banner {
  background: var(--rosewood);
  color: var(--parchment);
  padding: 48px 40px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.featured-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0px, transparent 20px,
    rgba(255,255,255,0.012) 20px, rgba(255,255,255,0.012) 21px
  );
}

.featured-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.featured-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.featured-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--parchment);
  max-width: 700px;
  margin-bottom: 16px;
}

.featured-title em { color: var(--gold-light); }

.featured-meta {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--spruce);
  opacity: 0.8;
  margin-bottom: 20px;
}

.featured-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: var(--spruce-light);
  max-width: 620px;
  margin-bottom: 28px;
}

.btn-primary {
  display: inline-block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold-light);
  padding: 13px 28px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--parchment);
  transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-inner { grid-template-columns: 1fr; padding: 40px 24px 36px; }
  .header-rosette { display: none; }
  .page-wrap { padding: 0 24px; }
  .layout { grid-template-columns: 1fr; gap: 40px; }
  .sidebar { position: static; }
  .post { grid-template-columns: 60px 1fr; gap: 20px; }
  .nav-inner { overflow-x: auto; padding: 0 24px; }
  .featured-banner { padding: 36px 24px; }
  }

/* Action Text / entry body */
.post-show {
  padding-bottom: 80px;
}

.post-show .trix-content {
  max-width: 40rem;
  margin-top: 24px;
}

.post-show .trix-content img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.site-flash {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 40px 0;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
}

.site-flash.notice {
  color: var(--cedar);
}

.site-flash.alert {
  color: #8b2942;
}

.pagination {
  margin-top: 32px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.pagination a,
.pagination span {
  margin-right: 12px;
  color: var(--cedar);
  text-decoration: none;
}

.pagination a:hover {
  color: var(--gold);
}

.pagination .current {
  font-weight: bold;
}

.page-static main {
  max-width: 40rem;
}

.page-static .section-label {
  margin-bottom: 16px;
}

/* Public tools inventory table */
.page-tools main {
  max-width: min(52rem, 100%);
}

.tools-intro {
  margin-bottom: 28px;
}

.tools-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 48px;
  -webkit-overflow-scrolling: touch;
}

.tools-public-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  font-family: 'Josefin Sans', sans-serif;
}

.tools-public-table th,
.tools-public-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--parchment-dark);
  vertical-align: middle;
}

.tools-public-table th {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cedar);
  font-weight: 600;
}

.tools-public-table tbody tr:hover {
  background: rgba(232, 221, 200, 0.35);
}

.tools-col-image {
  width: 120px;
}

.tools-table-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  border: 1px solid var(--parchment-dark);
}

.tools-table-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--parchment-dark);
  color: var(--spruce);
  font-size: 13px;
  border-radius: 2px;
}

.tools-col-name {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
}

.tools-col-supplier {
  color: #3a2e1e;
}

a.tools-supplier-link {
  color: var(--cedar);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.tools-supplier-link:hover {
  color: var(--gold);
}

.tools-col-acq {
  color: #3a2e1e;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .tools-col-acq {
    white-space: normal;
  }
}
