/* Local self-hosted variable subsets (zero external CDN latency) */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/jakarta-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5EFE6;
  --surface: #FCF9F4;
  --surface-alt: #EFE6D8;
  --paper: #FFFFFF;
  --ink: #241B14;
  --muted: #584B3E;
  --line: #DCCEBC;
  --accent: #C45C26;
  --accent-ink: #9E4418;
  --accent-ink-hover: #7F3410;
  --ok-ink: #1C5939;
  --ok-bg: #E6F2EB;
  --radius: 12px;
  --radius-sm: 7px;
  --max-w: 74rem;
  --prose-w: 44rem;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: clip; font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  overflow-x: clip;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.62;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--accent-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink-hover); }
:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent-ink); color: #FFFFFF;
  padding: 0.75rem 1rem; font-weight: 600; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(245, 239, 230, 0.94);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.78rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1rem, 4vw, 1.22rem); letter-spacing: -0.015em; white-space: nowrap;
}
.brand img { width: 1.75rem; height: 1.75rem; }
.header-controls { display: inline-flex; align-items: center; gap: 0.5rem; }
.nav-toggle, .search-trigger, .modal-close-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem; min-height: 44px; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.search-trigger:hover, .modal-close-btn:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.kbd-hint {
  font-family: inherit; font-size: 0.76rem;
  background: var(--bg); border: 1px solid var(--line);
  padding: 0.05rem 0.38rem; border-radius: 4px; color: var(--accent-ink);
}
@media (pointer: coarse) { .kbd-hint { display: none; } }

.site-nav { display: none; }
.site-nav.is-open {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.75rem 0 1rem; border-top: 1px solid var(--line);
}
.site-nav a {
  font-size: 0.92rem; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 0.5rem 0.72rem; border-radius: var(--radius-sm);
  min-height: 44px; display: inline-flex; align-items: center;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  background: var(--surface); color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (min-width: 64rem) {
  .nav-toggle { display: none; }
  .header-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
  .site-nav { display: flex; flex-direction: row; align-items: center; gap: 0.2rem; padding: 0; border-top: none; }
  .site-nav a { min-height: 40px; padding: 0.4rem 0.68rem; }
}

/* Global Search Modal */
.search-modal {
  position: fixed; inset: 0; background: rgba(36, 27, 20, 0.62);
  z-index: 95; display: flex; align-items: flex-start; justify-content: center;
  padding: 4.25rem 1rem 2rem; backdrop-filter: blur(4px);
}
.search-panel {
  width: 100%; max-width: 40rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 22px 52px rgba(36, 27, 20, 0.25); overflow: hidden;
}
.search-top { display: flex; gap: 0.5rem; padding: 0.85rem; border-bottom: 1px solid var(--line); }
.search-top input {
  flex: 1; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem; min-height: 44px;
}
.search-results { max-height: 22rem; overflow-y: auto; padding: 0.55rem; display: grid; gap: 0.35rem; }
.search-hit {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line);
}
.search-hit:hover, .search-hit.is-selected { border-color: var(--accent-ink); background: var(--bg); }
.search-hit small { color: var(--accent-ink); font-weight: 700; font-size: 0.76rem; }

/* Typography & Prose */
main { flex: 1; padding: 1.5rem 0 3.25rem; }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; color: var(--ink); margin: 0; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.85rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.65rem; }
h2 { font-size: clamp(1.38rem, 2.4vw, 1.8rem); font-weight: 700; letter-spacing: -0.012em; margin: 2.35rem 0 0.9rem; }
h3 { font-size: 1.14rem; font-weight: 700; margin: 1.15rem 0 0.4rem; }
p { margin: 0 0 1rem; max-width: var(--prose-w); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 45rem; margin-bottom: 1.05rem; line-height: 1.55; }
.meta-line {
  font-size: 0.86rem; color: var(--muted);
  margin-bottom: 1.15rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
}

/* Breadcrumbs */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.85rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-ink); text-decoration: underline; }

/* Buttons & Actions */
.actions-bar { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin: 1.1rem 0 1.45rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: var(--font-sans); font-size: 0.92rem; font-weight: 600;
  text-decoration: none; border-radius: var(--radius-sm);
  padding: 0.65rem 1.08rem; min-height: 44px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent-ink); color: #FFFFFF; box-shadow: 0 2px 8px rgba(158, 68, 24, 0.22); }
.btn-primary:hover { background: var(--accent-ink-hover); color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(158, 68, 24, 0.26); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent-ink); color: var(--accent-ink); transform: translateY(-1px); }
.btn-soft { background: var(--paper); color: var(--ink); border-color: var(--line); min-height: 40px; padding: 0.45rem 0.85rem; font-size: 0.86rem; }
.btn-soft:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.btn-soft[aria-pressed="true"] { background: var(--accent-ink); color: #FFFFFF; border-color: var(--accent-ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* Home Hero: clean 1-screen presence without cutting lower cards */
.hero {
  padding: 1.05rem 1rem 1.2rem;
  background-color: var(--surface);
  background-image: radial-gradient(rgba(36, 27, 20, 0.065) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 1.5rem;
}
.hero-grid { display: grid; gap: 1.05rem; align-items: center; }
@media (min-width: 56rem) {
  .hero { padding: 2.35rem 2.5rem; min-height: clamp(29rem, 62vh, 36rem); display: flex; align-items: center; margin-bottom: 2.25rem; }
  .hero-grid { grid-template-columns: 1.12fr 0.88fr; gap: 2.5rem; width: 100%; }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.84rem; font-weight: 700; color: var(--accent-ink);
  margin-bottom: 0.45rem;
}
.hero-ink-rule { width: 132px; height: 14px; display: block; margin: 0.25rem 0 0.7rem; overflow: visible; }
.hero-actions { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, 1fr); margin-top: 0.9rem; }
.hero-actions .btn { padding: 0.55rem 0.65rem; font-size: 0.86rem; }
@media (min-width: 34rem) { .hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; } .hero-actions .btn { padding: 0.65rem 1.08rem; font-size: 0.92rem; } }
.hero-quick-facts {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid var(--line);
  font-size: 0.82rem; color: var(--muted); font-weight: 500;
}

.compare-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 0.65rem; box-shadow: 0 12px 28px rgba(36, 27, 20, 0.08);
}
.compare-stage {
  position: relative; width: 100%; max-width: 17.5rem; aspect-ratio: 1 / 1;
  margin: 0 auto; overflow: hidden; border-radius: 8px; background: #FFFFFF;
}
@media (max-width: 35.99rem) {
  .hero { padding: 0.78rem 0.85rem 0.9rem; margin-bottom: 1.15rem; }
  .hero-grid { gap: 0.72rem; }
  .hero .lead { font-size: 0.96rem; margin-bottom: 0.65rem; }
  .hero-actions { margin-top: 0.65rem; gap: 0.42rem; }
  .hero-actions .btn { min-height: 40px; padding: 0.42rem 0.55rem; font-size: 0.82rem; }
  .hero-quick-facts { margin-top: 0.6rem; padding-top: 0.55rem; font-size: 0.76rem; gap: 0.3rem 0.75rem; }
  .compare-stage { max-width: 14.2rem; }
  .actions-bar { gap: 0.45rem; margin: 0.75rem 0 1rem; }
  .actions-bar .btn { font-size: 0.84rem; padding: 0.48rem 0.75rem; min-height: 40px; }
  .filter-pills { gap: 0.35rem; margin: 0.55rem 0 0.8rem; }
  .filter-pill { padding: 0.35rem 0.72rem; font-size: 0.8rem; min-height: 38px; }
}
@media (min-width: 36rem) { .compare-stage { max-width: 24rem; } }
.compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.compare-color-layer { clip-path: inset(0 0 0 var(--pos, 52%)); }
.compare-divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 52%); width: 2px; background: var(--accent-ink); transform: translateX(-1px); pointer-events: none; }
.compare-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-ink); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.compare-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 0.65rem;
  margin-top: 0.65rem; font-size: 0.8rem; color: var(--muted); font-weight: 600;
}
.compare-range { width: 100%; accent-color: var(--accent-ink); cursor: ew-resize; min-height: 28px; }

/* Cards & Grids (full-card stretched-link clickable) */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 38rem) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 60rem) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent-ink); box-shadow: 0 10px 24px rgba(36, 27, 20, 0.09); }
.card-thumb {
  position: relative;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 0.75rem; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; overflow: hidden;
}
.card-thumb.is-photo { padding: 0; }
.card-thumb.is-craft-tint { background: linear-gradient(145deg, #FBF7F0 0%, #EFE6D8 100%); }
.card-thumb.is-tint-sage { background: linear-gradient(145deg, #F8FBF8 0%, #EAF2EC 100%); }
.card-thumb.is-tint-sky { background: linear-gradient(145deg, #F7FAFC 0%, #E8F0F6 100%); }
.taller-pulse {
  display: grid; gap: 0.9rem; margin: 1.35rem 0 1.75rem;
  padding: 1.05rem 1.2rem; border: 1px solid var(--line);
  border-left: 4px solid var(--accent-ink); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface) 0%, #FBF6EE 100%);
}
@media (min-width: 48rem) { .taller-pulse { grid-template-columns: 1.35fr 0.65fr; align-items: center; } }
.saved-sheet-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.saved-sheet-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.7rem; display: flex; flex-direction: column; gap: 0.45rem;
}
.saved-sheet-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); border-radius: 4px; }
.card-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.28s ease; }
.card-thumb.is-photo img { object-fit: cover; }
.card:hover .card-thumb img { transform: scale(1.03); }
.card-pill {
  position: absolute; top: 0.55rem; left: 0.55rem;
  font-size: 0.75rem; font-weight: 700; color: var(--ink);
  background: rgba(252, 249, 244, 0.94); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.16rem 0.55rem;
}
.card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card-title { font-family: var(--font-serif); font-size: 1.14rem; font-weight: 700; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-title a:hover { color: var(--accent-ink); }
.card-meta { font-size: 0.86rem; color: var(--muted); margin: 0; }
.card-sub-link { position: relative; z-index: 2; font-size: 0.82rem; font-weight: 600; margin-top: 0.25rem; align-self: flex-start; }

/* Calendar 2027 & Resource Studio */
.studio {
  display: grid; gap: 1.25rem; margin: 1.15rem 0 2rem; align-items: start;
}
@media (max-width: 53.99rem) {
  .studio .dl-panel { order: -1; }
}
@media (min-width: 54rem) {
  .studio { grid-template-columns: 0.95fr 1.05fr; gap: 2rem; }
}
.dl-primary .btn.is-cal-active {
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 2px rgba(158, 68, 24, 0.25);
}
.viewer {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem; box-shadow: 0 8px 24px rgba(36, 27, 20, 0.07);
}
.viewer img {
  width: 100%; height: auto; max-height: 29rem; object-fit: contain; margin: 0 auto; border-radius: 6px;
}
.dl-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.dl-primary {
  display: grid; gap: 0.65rem; grid-template-columns: 1fr;
}
@media (min-width: 34rem) { .dl-primary { grid-template-columns: repeat(2, 1fr); } }

/* Tables */
.table-wrap {
  width: 100%; overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); margin: 0.85rem 0 1.5rem;
}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.93rem; }
th, td { padding: 0.72rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-alt); color: var(--ink); font-weight: 700; font-size: 0.84rem; }
tr:last-child td { border-bottom: none; }

/* Sheet Print Stage & Hybrid 2-Layer Vector/Canvas Coloring Studio */
.stage-layout { display: grid; gap: 1.5rem; margin: 1.15rem 0 2.25rem; }
@media (min-width: 56rem) {
  .stage-layout { grid-template-columns: 1.18fr 0.82fr; align-items: start; }
}
.sheet-stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; box-shadow: 0 8px 24px rgba(36, 27, 20, 0.07);
}
.stage-top-tools {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.55rem 0.8rem; margin-bottom: 0.85rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line);
}
.paper-toggle {
  display: inline-flex; gap: 0.3rem; align-items: center; flex-wrap: wrap;
  background: var(--bg); padding: 0.25rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.paper-toggle .btn-soft { border: none; min-height: 36px; padding: 0.35rem 0.75rem; font-size: 0.82rem; }

/* Realistic Carta vs A4 Desk Surface + Safe Print Margin Guide */
.sheet-desk {
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem; display: flex; justify-content: center; overflow: hidden;
}
.sheet-frame-wrap {
  position: relative; background: #FFFFFF;
  width: 100%; max-width: 28rem; aspect-ratio: 216 / 279;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; padding: 4.5%;
  box-shadow: 0 10px 26px rgba(36, 27, 20, 0.14);
  transition: aspect-ratio 0.25s ease, padding 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.sheet-frame-wrap::after {
  content: ""; position: absolute; inset: 4.2%; border: 1px dashed rgba(158, 68, 24, 0.25);
  pointer-events: none; border-radius: 2px;
}
.sheet-frame-wrap.is-a4 { aspect-ratio: 210 / 297; max-width: 26.5rem; }
.sheet-frame-wrap.is-framed {
  border: 14px solid #6B4429;
  box-shadow: inset 0 0 0 14px #FAF6F0, inset 0 0 18px rgba(36, 27, 20, 0.16), 0 14px 30px rgba(36, 27, 20, 0.22);
  padding: 6.5%;
}
.sheet-frame-wrap.is-framed::after { display: none; }
.sheet-stage img#stage-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}

.svg-studio-canvas {
  position: relative; width: 100%; height: 100%;
  overflow: hidden; border-radius: 4px; background: #FFFFFF;
  touch-action: none;
}
.studio-viewport {
  position: relative; width: 100%; height: 100%;
  transform-origin: center center; transition: transform 0.14s ease-out;
}
.studio-viewport canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block;
}
#studio-ink-canvas { pointer-events: none; }
#studio-canvas { cursor: crosshair; }

.studio-bar {
  margin-top: 0.85rem; padding: 0.85rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  display: grid; gap: 0.7rem; font-size: 0.85rem;
}
.studio-tools-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem;
}
.tool-seg { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.swatch-row { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.swatch-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink);
  cursor: pointer; padding: 0; transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.swatch-btn:hover { transform: scale(1.08); }
.swatch-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 5px var(--accent-ink); transform: scale(1.08); }
.swatch-custom {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.6rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; min-height: 36px;
}
.swatch-custom input[type="color"] { width: 24px; height: 24px; border: none; padding: 0; background: transparent; cursor: pointer; }
.studio-toast {
  font-size: 0.82rem; font-weight: 600; color: var(--accent-ink);
  min-height: 1.25rem;
}

.sheet-stage-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.65rem; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.pack-specs {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; display: grid; gap: 0.9rem;
}
@media (min-width: 56rem) {
  .pack-specs { position: sticky; top: 5.2rem; }
}
.pack-specs ul { margin: 0; padding-left: 1.15rem; }
.pack-specs li { margin-bottom: 0.4rem; }
.ink-meter {
  padding: 0.7rem 0.85rem; background: var(--ok-bg);
  color: var(--ok-ink); border-radius: var(--radius-sm);
  font-size: 0.86rem; font-weight: 600;
}

/* Filter chips above gallery */
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.75rem 0 1rem; }
.filter-pill {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.42rem 0.9rem; min-height: 42px;
  font-family: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.filter-pill:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.filter-pill[aria-pressed="true"] { background: var(--accent-ink) !important; color: #FFFFFF !important; border-color: var(--accent-ink) !important; transition: none; }

.chip-groups { display: grid; gap: 0.85rem; margin: 1rem 0 1.35rem; }
@media (min-width: 54rem) { .chip-groups { grid-template-columns: repeat(3, 1fr); } }
.chip-group-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.chip-group-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent-ink); margin: 0 0 0.5rem; display: block;
}
.dl-row-pair { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.dl-row-pair .btn { flex: 1 1 8.5rem; min-height: 44px; font-size: 0.84rem; padding: 0.45rem 0.65rem; }

.sheet-gallery {
  display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  margin: 1rem 0 2rem;
}
.sheet-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem; display: flex; flex-direction: column; gap: 0.55rem; margin: 0;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.sheet-item:hover { transform: translateY(-2px); border-color: var(--accent-ink); }
.sheet-item.is-active { border-color: var(--accent-ink); box-shadow: 0 0 0 2px rgba(158, 68, 24, 0.22); }
.sheet-item img { width: 100%; border-radius: 4px; background: #FFFFFF; }
.sheet-caption { font-size: 0.88rem; color: var(--ink); font-weight: 600; margin: 0; }
.sheet-submeta { font-size: 0.78rem; color: var(--muted); }
.sheet-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; font-size: 0.82rem; }
.sheet-links a, .sheet-links button {
  padding: 0.35rem 0.65rem; border-radius: 5px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none;
  font-family: inherit; font-size: inherit; cursor: pointer; min-height: 40px;
  display: inline-flex; align-items: center; font-weight: 600;
}
.sheet-links a:hover, .sheet-links button:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

/* Empty state box */
.empty-state {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; margin: 1rem 0 1.5rem;
}

/* Craft Tutorials Hero + Stepper */
.craft-hero-grid { display: grid; gap: 1.5rem; margin: 1rem 0 1.75rem; align-items: start; }
@media (min-width: 52rem) { .craft-hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.craft-hero-figure {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem; margin: 0; box-shadow: 0 8px 22px rgba(36, 27, 20, 0.08);
}
.craft-hero-figure img { width: 100%; border-radius: 6px; }
.materials-box {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-ink);
  border-radius: var(--radius); padding: 1.15rem 1.25rem; margin: 0;
}
.materials-box ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.stepper-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1.05rem; margin: 1rem 0 1.25rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem;
  font-size: 0.9rem;
}
.progress-track { width: 100%; height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-ink); width: 20%; transition: width 0.25s ease; }

.steps-list { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 1.25rem; }
.step-card {
  display: grid; gap: 1rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease; cursor: pointer;
}
.step-card.is-current { border-color: var(--accent-ink); box-shadow: 0 6px 18px rgba(158, 68, 24, 0.14); }
@media (min-width: 44rem) {
  .step-card { grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 1.4rem; }
}
.step-card img { border-radius: var(--radius-sm); width: 100%; }
.step-num { font-size: 0.84rem; font-weight: 700; color: var(--accent-ink); margin-bottom: 0.25rem; }

/* Hub Filter, Palettes Live Mandala & Real 3D Polyhedra */
.hub-filter-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0 1.25rem; }
.hub-search-input {
  font-family: inherit; font-size: 0.98rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem; min-height: 44px; flex: 1 1 16rem; max-width: 24rem;
}
.poly-explorer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; margin: 1rem 0 1.5rem;
  display: grid; gap: 1.25rem; align-items: center;
}
@media (min-width: 48rem) { .poly-explorer { grid-template-columns: 16rem 1fr; } }
.poly-canvas-wrap {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.5rem; text-align: center;
}
.poly-canvas-wrap canvas { width: 220px; height: 190px; margin: 0 auto; display: block; cursor: grab; touch-action: none; }
.poly-canvas-wrap canvas:active { cursor: grabbing; }

.palette-mosaic {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; text-align: center;
}
.palette-mosaic svg { max-width: 19rem; height: auto; margin: 0 auto; display: block; }
.palette-chips {
  display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: center; margin: 1rem 0 0.5rem;
}
.pal-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 0.35rem 0.6rem; font-size: 0.84rem; font-weight: 700; min-height: 40px;
}
.pal-chip input[type="color"] { width: 24px; height: 24px; border: none; padding: 0; background: transparent; cursor: pointer; }
.pal-chip button {
  background: transparent; border: none; color: var(--ink); font-family: inherit;
  font-weight: 700; font-size: 0.84rem; cursor: pointer; padding: 0;
}

.paper-sim {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin: 1.15rem 0 1.75rem;
}
.cite-box {
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; font-size: 0.88rem; margin: 0.75rem 0;
}
.note-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; margin: 1.35rem 0; max-width: var(--prose-w);
}
.chip-list { display: flex; flex-wrap: wrap; gap: 0.55rem; list-style: none; padding: 0; margin: 0.75rem 0 0; }
.chip-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.45rem 0.9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; color: var(--ink); text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chip-list a:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

/* Contact Form */
.contact-form { max-width: 36rem; display: grid; gap: 1rem; margin: 1.15rem 0; }
.field { display: grid; gap: 0.35rem; font-size: 0.92rem; }
.field label, .field span { font-weight: 600; color: var(--ink); }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem; min-height: 44px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent-ink); }
.form-status { font-size: 0.92rem; color: var(--accent-ink); font-weight: 600; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg);
  padding: 1.75rem 0 2.25rem; font-size: 0.88rem; color: var(--muted);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--muted); text-decoration: none; padding: 0.25rem 0; display: inline-block; }
.footer-links a:hover { color: var(--accent-ink); text-decoration: underline; }

/* Ko-fi support (2026-11-21). Re-aplicar tras un rebuild: .footer-support en todas las páginas; .page-support al final de láminas. Sin widget JS. */
.footer-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1.25rem;
  margin: 0 0 1.1rem;
  padding: 0 0 1.1rem;
  border-bottom: 1px solid var(--line);
}
.footer-support p {
  margin: 0;
  max-width: 38rem;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.45;
}
.footer-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: #FFFFFF;
  background: var(--accent-ink);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.95rem;
  min-height: 40px;
  white-space: nowrap;
}
.footer-support-btn:hover { background: var(--accent-ink-hover); color: #FFFFFF; }
.footer-support-btn:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}
.page-support {
  margin: 1.75rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.page-support a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.page-support a:hover { color: var(--accent-ink-hover); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  @page { margin: 12mm; }
  body { background: #FFFFFF !important; color: #111111 !important; margin: 0; padding: 0; }
  [hidden] { display: none !important; }
  .site-header, .site-footer, .breadcrumbs, .actions-bar, .stepper-bar, .skip-link, .search-modal, .page-support { display: none !important; }
  body:has(.pack-specs) .pack-specs,
  body:has(.pack-specs) .sheet-gallery,
  body:has(.pack-specs) .sheet-stage-bar,
  body:has(.pack-specs) .stage-top-tools,
  body:has(.pack-specs) .studio-bar,
  body:has(.pack-specs) .filter-pills,
  body:has(.pack-specs) .page-support,
  body:has(.pack-specs) .related-block,
  body:has(.pack-specs) .prose-block,
  body:has(.pack-specs) .poly-explorer,
  body:has(.pack-specs) .meta-line,
  body:has(.pack-specs) h1,
  body:has(.pack-specs) .lead,
  body:has(.pack-specs) h2 { display: none !important; }
  body:has(.pack-specs) main,
  body:has(.pack-specs) .wrap,
  body:has(.pack-specs) .stage-layout,
  body:has(.pack-specs) .sheet-desk { margin: 0 !important; padding: 0 !important; max-width: none !important; display: block !important; background: #FFFFFF !important; border: none !important; }
  body:has(.pack-specs) .sheet-stage { border: none !important; box-shadow: none !important; padding: 0 !important; background: #FFFFFF !important; }
  body:has(.pack-specs) .sheet-frame-wrap::after { display: none !important; }
  body:has(.pack-specs) .sheet-frame-wrap:not(.is-framed) { border: none !important; box-shadow: none !important; padding: 0 !important; max-width: none !important; }
  body:has(.pack-specs) .sheet-stage img#stage-img { max-height: 94vh !important; width: auto !important; margin: 0 auto !important; }
  body:has(.pack-specs) .svg-studio-canvas { max-height: 94vh !important; width: 100% !important; height: 100% !important; margin: 0 auto !important; }
}

/* Fase B UX & Responsive Polish (2026-11-21) */
.header-inner { flex-shrink: 0; }
.brand { flex-shrink: 0; }
.site-nav a { white-space: nowrap; }
.card-pill { z-index: 2; max-width: calc(100% - 1.1rem); }
.card-thumb.is-cal-thumb { padding-top: 2.35rem; align-items: flex-start; }
@media (max-width: 34rem) {
  .dl-row-pair {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
  }
  .dl-row-pair .btn {
    width: 100%;
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
    flex: initial !important;
  }
}

/* 27-nov-2026 · Plantilla: tutorial con el paso 1 en la primera pantalla del celular, y acciones agrupadas */
@media screen and (max-width: 43.99rem) {
  main.tut-page { display: flex; flex-direction: column; padding-top: 0.7rem; }
  main.tut-page > * { order: 5; }
  main.tut-page > .breadcrumbs, main.tut-page > h1, main.tut-page > .lead, main.tut-page > .meta-line { order: 1; }
  main.tut-page > .steps-h, main.tut-page > .steps-intro, main.tut-page > .stepper-bar, main.tut-page > .steps-list { order: 2; }
  main.tut-page > .actions-bar { order: 3; }
  main.tut-page > .craft-hero-grid { order: 3; }
  main.tut-page > .steps-glance { order: 4; }
  main.tut-page > .breadcrumbs { margin-bottom: 0.35rem; }
  main.tut-page > h1 { font-size: 1.6rem; line-height: 1.12; margin-bottom: 0.35rem; }
  main.tut-page > .lead { font-size: 0.95rem; line-height: 1.42; margin-bottom: 0.4rem; }
  main.tut-page > .meta-line { display: block; font-size: 0.78rem; line-height: 1.4; margin-bottom: 0.3rem; }
  main.tut-page > .meta-line > span + span::before { content: " · "; }
  main.tut-page > .steps-h { margin: 0.5rem 0 0.2rem; font-size: 1.25rem; }
  main.tut-page > .steps-intro { font-size: 0.84rem; line-height: 1.38; margin-bottom: 0.3rem; color: var(--muted); }
  main.tut-page > .stepper-bar { margin: 0.3rem 0 0.5rem; padding: 0.4rem 0.6rem; gap: 0.45rem; flex-wrap: nowrap; }
  main.tut-page > .stepper-bar > div:first-child { white-space: nowrap; }
  main.tut-page > .stepper-bar .btn { min-height: 40px; padding: 0.4rem 0.65rem; font-size: 0.82rem; }
  main.tut-page > .stepper-bar .progress-track { display: none; }
  main.tut-page > .steps-list { margin-top: 0; gap: 0.9rem; }
  main.tut-page .step-card { padding: 0.55rem 0.7rem 0.65rem; gap: 0.4rem; }
  main.tut-page .step-card img { max-height: 10.5rem; object-fit: contain; background: #FBF7F0; }
  main.tut-page > .actions-bar { margin: 0.4rem 0 1.25rem; }
  main.tut-page > .craft-hero-grid { margin-top: 0.5rem; }
}
.pack-actions { gap: 0.55rem 1rem; }
.pack-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pack-dl-label { font-size: 0.86rem; font-weight: 600; color: var(--ink); width: 100%; }
.pack-aux { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.link-btn {
  background: none; border: 0; padding: 0.35rem 0; min-height: 40px; cursor: pointer;
  font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--accent-ink);
  text-decoration: underline; text-underline-offset: 0.18em; display: inline-flex; align-items: center;
}
.link-btn:hover { color: var(--accent-ink-hover); }
@media (min-width: 44rem) { .pack-actions { flex-wrap: nowrap; } .pack-dl-label { width: auto; } }
@media (max-width: 43.99rem) { .pack-aux { width: 100%; gap: 0.1rem 0.85rem; } .pack-aux .link-btn { font-size: 0.84rem; } }
