:root {
  --bg: #fbfaf6;
  --paper: #ffffff;
  --paper-2: #f3f1eb;
  --ink: #171717;
  --muted: #6b675e;
  --line: #ded9ce;
  --line-strong: #c9c2b4;
  --graph-edge-contrast: #332d25;
  --accent: #b72424;
  --accent-dark: #7f1818;
  --shadow: 0 18px 45px rgba(31, 28, 24, .08);
  --soft-shadow: 0 8px 24px rgba(31, 28, 24, .06);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1320px;
  --measure: 760px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #11100e;
  --paper: #171614;
  --paper-2: #211f1b;
  --ink: #f7f0e6;
  --muted: #b9afa2;
  --line: #363129;
  --line-strong: #51493d;
  --graph-edge-contrast: #f7f0e6;
  --accent: #ff5a4f;
  --accent-dark: #f04a40;
  --shadow: 0 18px 45px rgba(0,0,0,.32);
  --soft-shadow: 0 8px 24px rgba(0,0,0,.22);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 7%, transparent), transparent 360px), var(--bg);
  color: var(--ink);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 40px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand-logo { display: block; width: clamp(176px, 18vw, 246px); height: auto; max-height: 40px; object-fit: contain; object-position: left center; }
.nav-tabs { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.nav-tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 11px; border-radius: 999px; font-size: .76rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.nav-tabs a[aria-current="page"], .nav-tabs a:hover { background: var(--paper-2); color: var(--ink); }
.header-actions { display: flex; justify-content: flex-end; gap: 8px; }
.icon-button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; box-shadow: var(--soft-shadow); }
.icon-button:hover { border-color: var(--line-strong); transform: translateY(-1px); color: var(--accent); }
.icon-button svg { width: 18px; height: 18px; }
.menu-button { display: none; position: relative; }
.menu-button span,
.menu-button span:before,
.menu-button span:after {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  display: block;
  transition: transform .18s ease, opacity .18s ease;
}
.menu-button span:before { transform: translateY(-6px); }
.menu-button span:after { transform: translateY(4px); }
.menu-button[aria-expanded="true"] span { transform: rotate(45deg); }
.menu-button[aria-expanded="true"] span:before { opacity: 0; transform: translateY(0); }
.menu-button[aria-expanded="true"] span:after { transform: translateY(-2px) rotate(-90deg); }
.nav-scrim { position: fixed; inset: 0; z-index: 48; border: 0; padding: 0; background: rgba(0,0,0,.28); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; cursor: default; transition: opacity .18s ease; }
body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

.page { max-width: var(--max); margin: 0 auto; padding: clamp(22px, 5vw, 64px) clamp(16px, 4vw, 40px); }
.hero { padding: clamp(34px, 8vw, 96px) 0 clamp(24px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: clamp(24px, 5vw, 70px); align-items: end; }
.kicker { display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-weight: 900; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.kicker:before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 99px; }
h1, h2, h3 { letter-spacing: -.055em; line-height: .98; margin: 0; }
h1 { font-size: clamp(3rem, 10vw, 8rem); max-width: 930px; }
h2 { font-size: clamp(2rem, 5vw, 4.8rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.9rem); }
p { margin: 0; }
.lead { margin-top: 24px; max-width: 760px; color: var(--muted); font-size: clamp(1.03rem, 2vw, 1.34rem); line-height: 1.5; }
.hero-note { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.hero-note strong { display:block; font-size: 1.05rem; margin-bottom: 10px; }
.hero-note p { color: var(--muted); }

.section { margin-top: clamp(36px, 7vw, 88px); }
.section-head { display: flex; gap: 18px; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.section-head p { color: var(--muted); max-width: 680px; }
.section-actions { display:flex; gap: 10px; flex-wrap: wrap; }
.button, .text-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; border: 1px solid var(--line); padding: 11px 16px; font-weight: 900; font-size: .82rem; background: var(--paper); color: var(--ink); box-shadow: var(--soft-shadow); }
.button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.button:hover, .text-link:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.entry-card { min-height: 172px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--soft-shadow); overflow: hidden; }
.entry-card .eyebrow, .note-row .eyebrow, .article-card .eyebrow { color: var(--accent); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.entry-card strong { font-size: 1.35rem; line-height: 1; letter-spacing: -.045em; margin-top: 12px; overflow-wrap: anywhere; }
.entry-card p { color: var(--muted); margin-top: 12px; font-size: .9rem; }
.entry-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }

.notebook { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; box-shadow: var(--soft-shadow); }
.note-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 140px 115px 120px; gap: 18px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.note-row:last-child { border-bottom: 0; }
.note-row:hover { background: var(--paper-2); color: var(--ink); }
.note-title { font-weight: 900; letter-spacing: -.035em; overflow-wrap: anywhere; }
.note-summary { color: var(--muted); font-size: .9rem; margin-top: 4px; max-width: 760px; }
.note-meta { color: var(--muted); font-size: .78rem; font-weight: 800; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; border: 1px solid var(--line); color: var(--muted); background: var(--paper-2); border-radius: 999px; padding: 6px 9px; font-size: .72rem; font-weight: 900; }
.status-pill.owned { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }

.story-strip { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: stretch; }
.story-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 24px; box-shadow: var(--soft-shadow); }
.story-card p { color: var(--muted); margin-top: 12px; }
.about-story-strip { grid-template-columns: minmax(0, 1fr); width: 100%; }
.about-story-strip .story-card { padding: clamp(24px, 3.2vw, 42px); }
.about-story-strip .story-card p { max-width: 1080px; }
.timeline { display: grid; gap: 10px; }
.timeline-item { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); padding: 16px; display:grid; grid-template-columns: 90px minmax(0,1fr); gap: 14px; }
.timeline-item b { color: var(--accent); font-size: .77rem; text-transform: uppercase; letter-spacing: .08em; }
.timeline-item span { color: var(--muted); }

.collection-hero { padding: clamp(28px, 6vw, 72px) 0 28px; max-width: 980px; }
.collection-hero h1 { font-size: clamp(2.8rem, 8vw, 7rem); }
.collection-hero p { margin-top: 18px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); max-width: 820px; }
.database-toolbar { display:flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.search-input, select { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 12px 16px; min-height: 44px; outline: none; }
.search-input { min-width: min(100%, 360px); flex: 1; }
.search-input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }

.article-card-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.article-card { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); overflow: hidden; display:flex; flex-direction:column; min-height: 100%; box-shadow: var(--soft-shadow); }
.article-card img { width: 100%; height: 180px; object-fit: cover; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.article-card-body { padding: 18px; display:flex; flex-direction:column; gap: 12px; flex:1; }
.article-card h3 { font-size: 1.2rem; overflow-wrap: anywhere; }
.article-card p { color: var(--muted); font-size: .9rem; }
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }

.article-page { max-width: var(--max); margin: 0 auto; padding: clamp(20px, 5vw, 58px) clamp(16px, 4vw, 40px); }
.breadcrumbs { display:flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .78rem; font-weight: 800; margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }
.article-hero { max-width: 980px; padding: 24px 0 28px; }
.article-hero h1 { font-size: clamp(2.45rem, 7vw, 6.7rem); letter-spacing: -.07em; }
.article-hero .summary { margin-top: 22px; color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.25rem); max-width: 850px; }
.article-meta { display:flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 18px; }
.article-layout { display:grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(24px, 5vw, 70px); align-items:start; }
.article-sidebar { position: sticky; top: 92px; display:grid; gap: 14px; }
.aside-card { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); padding: 18px; box-shadow: var(--soft-shadow); }
.aside-card h2, .aside-card h3 { font-size: 1rem; letter-spacing: -.03em; margin-bottom: 10px; }
.aside-card p, .aside-card li { color: var(--muted); font-size: .88rem; }
.aside-card ul { margin: 8px 0 0; padding-left: 18px; }
.spec-list { display:grid; gap: 8px; }
.spec-list div { display:grid; gap: 3px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.spec-list div:last-child { border-bottom:0; padding-bottom:0; }
.spec-list dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.spec-list dd { margin: 0; font-weight: 800; font-size: .88rem; overflow-wrap:anywhere; }
.article-body { max-width: var(--measure); }
.article-body figure { margin: 0 0 24px; border-radius: var(--radius); overflow:hidden; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--soft-shadow); }
.article-body img { width: 100%; max-height: 420px; object-fit: cover; }
.article-body figure.fit-contain img { object-fit: contain; background: var(--paper-2); padding: 16px; }
.article-body figcaption { border-top: 1px solid var(--line); padding: 10px 14px; color: var(--muted); background: var(--paper-2); font-size: .72rem; font-weight: 800; line-height: 1.35; }
.article-body figcaption a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.article-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 0 0 24px; }
.article-gallery figure { margin: 0; }
.article-gallery img { aspect-ratio: 4 / 3; max-height: none; object-fit: contain; background: var(--paper-2); padding: 16px; }
.pullquote { margin: 24px 0; border-left: 4px solid var(--accent); padding-left: 18px; color: var(--ink); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height:1.35; font-weight: 900; letter-spacing: -.035em; }
.article-body h2 { font-size: clamp(1.6rem, 3.3vw, 2.8rem); margin: 44px 0 14px; }
.article-body h3 { font-size: 1.35rem; margin: 28px 0 10px; }
.article-body p { color: color-mix(in srgb, var(--ink) 78%, var(--muted)); margin: 0 0 18px; }
.article-body ul { margin: 0 0 20px; padding-left: 20px; }
.article-body li { margin: 8px 0; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); }
.decision-box { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.decision-box div { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 16px; }
.decision-box b { display:block; margin-bottom: 6px; }
.decision-box p { margin:0; color:var(--muted); font-size:.92rem; }
.product-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 18px 0 0; }
.product-card { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 16px; display:flex; flex-direction:column; gap: 10px; }
.product-card p { margin: 0; font-size: .88rem; color: var(--muted); }
.product-card a { margin-top:auto; }
.source-list { display:grid; gap: 10px; }
.source-list a { display:block; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--paper-2); }
.source-list strong { display:block; font-size:.86rem; overflow-wrap:anywhere; }
.source-list span { display:block; color: var(--muted); font-size:.75rem; margin-top: 4px; }
.related-list { display:grid; gap: 8px; margin-top: 12px; }
.related-list a { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--paper); font-weight: 800; font-size: .88rem; overflow-wrap:anywhere; }

.photo-page .collection-hero p { max-width: 760px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.photo-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); box-shadow: var(--soft-shadow); }
.photo-link { display: block; background: var(--paper-2); }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-2); }
.photo-card figcaption { display: grid; gap: 7px; padding: 13px 14px 14px; color: var(--muted); font-size: .74rem; font-weight: 750; line-height: 1.35; }
.photo-card figcaption strong { color: var(--ink); font-size: .92rem; line-height: 1.1; }
.photo-card figcaption a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.photo-card figcaption a:hover { color: var(--accent); }

.maker-map-page .collection-hero { max-width: 1120px; }
.maker-graph-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  align-items: start;
  max-width: min(1800px, calc(100vw - 48px));
  margin-inline: auto;
}
.graph-detail-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.graph-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--soft-shadow);
}
.graph-panel p,
.graph-panel span,
.graph-panel li {
  color: var(--muted);
  font-size: .86rem;
}
.graph-control-panel {
  display: grid;
  gap: 10px;
}
.graph-control-panel .search-input,
.graph-control-panel select {
  width: 100%;
  min-width: 0;
}
.filter-label {
  color: var(--muted);
  display: block;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.graph-filter-reset {
  justify-self: start;
  margin-top: 2px;
}
.region-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}
.region-button {
  min-height: 62px;
  min-width: 0;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
}
.region-button strong {
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: -.035em;
  grid-column: 2;
}
.region-button span {
  font-size: .78rem;
  font-weight: 800;
}
.region-button > span:not(.region-swatch) {
  grid-column: 2;
  color: var(--muted);
}
.region-swatch {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, var(--region-color) 28%, var(--paper));
  border: 2px solid var(--region-color);
  color: var(--ink);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .03em;
}
.region-button:hover,
.region-button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--region-color, var(--accent));
  background: color-mix(in srgb, var(--region-color, var(--accent)) 13%, var(--paper));
}
.graph-stats {
  grid-template-columns: auto minmax(0, 1fr);
  display: grid;
  gap: 4px 10px;
  align-items: baseline;
}
.graph-stats strong {
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 1;
}
.graph-stage {
  grid-column: 1;
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(color-mix(in srgb, var(--line-strong) 28%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line-strong) 28%, transparent) 1px, transparent 1px),
    var(--paper);
  background-size: 88px 88px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: clamp(760px, 78vh, 980px);
}
.graph-stage-head {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  max-width: min(460px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: var(--soft-shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.graph-stage-head h2 {
  font-size: clamp(.9rem, 1.15vw, 1.18rem);
  margin-top: 4px;
  line-height: 1.05;
}
.graph-back-button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 68%, var(--graph-edge-contrast));
  border-radius: 999px;
  background: color-mix(in srgb, var(--graph-edge-contrast) 92%, var(--accent));
  color: var(--bg);
  cursor: pointer;
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .02em;
  padding: 10px 14px;
  box-shadow: 0 10px 22px color-mix(in srgb, #000 22%, transparent);
}
.graph-back-button:hover,
.graph-back-button:focus-visible {
  background: var(--accent);
  color: var(--ink);
  outline: none;
}
.graph-back-button[hidden],
[data-graph-reset][hidden] {
  display: none;
}
.maker-graph-svg {
  width: 100%;
  min-height: clamp(760px, 78vh, 980px);
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.maker-graph-svg.is-panning {
  cursor: grabbing;
}
.graph-viewport {
  transform-origin: 0 0;
}
.graph-edge {
  stroke: var(--graph-edge-contrast);
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: .84;
}
.graph-lines line { stroke: var(--edge-color, var(--graph-edge-contrast)); stroke-width: 2.4; }
.graph-edge-hit {
  stroke: transparent;
  stroke-width: 26;
  stroke-linecap: round;
  cursor: pointer;
  pointer-events: stroke;
}
.graph-edge-hit.is-focused {
  stroke-width: 34;
}
.graph-lines line.graph-edge {
  stroke: var(--edge-color, var(--graph-edge-contrast));
  stroke-width: 2.25;
  stroke-linecap: round;
  opacity: .82;
  transition: opacity .18s ease, stroke-width .18s ease, stroke .18s ease;
}
.maker-graph-svg marker path {
  fill: context-stroke;
  stroke: context-stroke;
}
.graph-lines .edge-region-member,
.graph-lines .edge-regional-hub {
  stroke: color-mix(in srgb, var(--region-color, var(--edge-color, var(--graph-edge-contrast))) 72%, var(--edge-color, var(--graph-edge-contrast)));
  stroke-width: 2.6;
  opacity: .92;
}
.graph-lines .edge-apprenticeship,
.graph-lines .edge-student,
.graph-lines .edge-family,
.graph-lines .edge-worked-under {
  stroke: var(--edge-color, #2fbf71);
  stroke-width: 3.1;
  opacity: .92;
}
.graph-lines .edge-works-at,
.graph-lines .edge-workshop-background {
  stroke: var(--edge-color, #36a3ff);
  stroke-width: 3.1;
  opacity: .94;
}
.graph-lines .edge-smith-to-sharpener,
.graph-lines .edge-brand-to-sharpener {
  stroke: var(--edge-color, #d99100);
  stroke-width: 3.05;
  opacity: .93;
}
.graph-lines .edge-line-collaboration,
.graph-lines .edge-brand-to-line,
.graph-lines .edge-collaboration,
.graph-lines .edge-alias {
  stroke: var(--edge-color, color-mix(in srgb, var(--accent) 82%, var(--graph-edge-contrast)));
  stroke-width: 2.95;
  opacity: .92;
}
.graph-lines .edge-line-collaboration,
.graph-lines .edge-brand-to-line,
.graph-lines .edge-collaboration {
  stroke: var(--edge-color, #ff6f61);
}
.graph-lines .edge-alias {
  stroke: var(--edge-color, color-mix(in srgb, #18b7a2 88%, var(--graph-edge-contrast)));
}
.graph-lines .source-community,
.graph-lines .source-forum,
.graph-lines .source-reddit {
  stroke-dasharray: 8 7;
  opacity: .84;
}
.graph-lines .confidence-low {
  stroke-width: 2.35;
  opacity: .72;
}
.graph-lines .graph-edge.is-focused {
  stroke-width: 5.2;
  opacity: 1;
  filter: drop-shadow(0 0 8px color-mix(in srgb, currentColor 28%, transparent));
}
.maker-graph-svg.has-focused-item .graph-lines .graph-edge.is-focused {
  opacity: 1 !important;
  stroke-width: 5.2;
}
.graph-lines .graph-edge.is-dimmed {
  opacity: .16;
  stroke-width: 1;
}
.maker-graph-svg.has-focused-item .graph-lines .graph-edge.is-dimmed {
  opacity: .16 !important;
  stroke-width: 1;
}
.edge-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
}
.edge-label-wrap {
  cursor: pointer;
  pointer-events: bounding-box;
  opacity: 1;
  transition: opacity .18s ease;
}
.edge-label-wrap rect {
  fill: color-mix(in srgb, var(--paper) 96%, transparent);
  stroke: var(--edge-color, color-mix(in srgb, var(--line-strong) 74%, transparent));
  stroke-width: 1.25;
}
.edge-label-wrap text {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .03em;
  text-anchor: middle;
  text-transform: uppercase;
  dominant-baseline: middle;
}
.edge-label-wrap.source-community rect,
.edge-label-wrap.source-forum rect,
.edge-label-wrap.source-reddit rect {
  stroke-dasharray: 4 3;
}
.edge-label-wrap.edge-apprenticeship rect,
.edge-label-wrap.edge-student rect,
.edge-label-wrap.edge-family rect,
.edge-label-wrap.edge-worked-under rect {
  stroke: #2fbf71;
}
.edge-label-wrap.edge-works-at rect,
.edge-label-wrap.edge-workshop-background rect {
  stroke: #36a3ff;
}
.edge-label-wrap.edge-smith-to-sharpener rect,
.edge-label-wrap.edge-brand-to-sharpener rect {
  stroke: #d99100;
}
.edge-label-wrap.edge-line-collaboration rect,
.edge-label-wrap.edge-brand-to-line rect,
.edge-label-wrap.edge-collaboration rect {
  stroke: #ff6f61;
}
.edge-label-wrap.confidence-low {
  opacity: .76;
}
.maker-graph-svg.is-active-region .edge-label-wrap {
  opacity: 0;
}
.maker-graph-svg.is-active-region.has-focused-node .edge-label-wrap.is-focused,
.maker-graph-svg.is-active-region.has-focused-item .edge-label-wrap.is-focused {
  opacity: 1 !important;
}
.maker-graph-svg.is-active-region.has-focused-node .edge-label-wrap.is-dimmed,
.maker-graph-svg.is-active-region.has-focused-item .edge-label-wrap.is-dimmed {
  opacity: 0 !important;
}
.graph-center circle {
  fill: var(--ink);
  stroke: var(--accent);
  stroke-width: 3;
}
.node-label-box {
  pointer-events: none;
  overflow: visible;
}
.node-html-label {
  width: 136px;
  height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.02;
  text-align: center;
  text-shadow:
    0 1px 0 var(--paper),
    1px 0 0 var(--paper),
    0 -1px 0 var(--paper),
    -1px 0 0 var(--paper);
}
.node-primary,
.node-secondary {
  display: -webkit-box;
  max-width: 122px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
}
.node-primary {
  -webkit-line-clamp: 2;
  font-size: 14px;
}
.node-secondary {
  -webkit-line-clamp: 1;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hub-node .node-html-label {
  color: var(--bg);
  text-shadow: none;
}
.hub-node .node-secondary {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}
.graph-node {
  cursor: pointer;
  outline: none;
}
.graph-node circle {
  fill: var(--paper-2);
  stroke: var(--line-strong);
  stroke-width: 3;
  transition: fill .18s ease, stroke .18s ease, transform .18s ease, opacity .18s ease;
}
.graph-node:hover circle,
.graph-node:focus-visible circle,
.graph-node.is-active circle {
  fill: color-mix(in srgb, var(--accent) 14%, var(--paper));
  stroke: var(--role-color, var(--accent));
  transform: scale(1.04);
}
.graph-node.is-dragging {
  cursor: grabbing;
}
.graph-node.is-dragging circle {
  stroke-width: 4;
}
.graph-node.is-connected circle {
  stroke-width: 4.5;
}
.graph-node.is-dimmed {
  opacity: .3;
}
.graph-node.is-dimmed .node-label-box {
  opacity: .55;
}
.hub-node circle {
  fill: var(--ink);
  stroke: var(--accent);
  stroke-width: 2.5;
}
.region-node circle {
  fill: color-mix(in srgb, var(--region-color, var(--accent)) 18%, var(--paper));
  stroke: color-mix(in srgb, var(--region-color, var(--accent)) 82%, var(--line-strong));
  stroke-width: 4.2;
  filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--region-color, var(--accent)) 18%, transparent));
}
.region-node:hover circle,
.region-node:focus-visible circle,
.region-node.is-active circle {
  fill: color-mix(in srgb, var(--region-color, var(--accent)) 30%, var(--paper));
  stroke: var(--region-color, var(--accent));
}
.region-node .node-primary {
  font-size: 15px;
}
.region-node .node-secondary {
  font-size: 10.5px;
}
.role-blacksmith {
  --role-color: #ff5a4f;
}
.role-sharpener {
  --role-color: #d99100;
}
.role-polisher {
  --role-color: #00a6c8;
}
.role-maker {
  --role-color: #b49cff;
}
.role-sharpener.role-polisher,
.role-sharpener-polisher {
  --role-color: #18b7a2;
}
.role-maker.role-sharpener,
.role-maker-sharpener {
  --role-color: #b8a149;
}
.role-handle-maker {
  --role-color: #9b6a38;
}
.role-workshop {
  --role-color: #16a37b;
}
.role-brand {
  --role-color: #8aa8ff;
}
.role-cooperative {
  --role-color: #d58cff;
}
.role-collaborator {
  --role-color: #d7d1c5;
}
.edge-source-note {
  display: inline-block;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.maker-node circle {
  stroke: var(--role-color, var(--line-strong));
  fill: color-mix(in srgb, var(--role-color, var(--paper-2)) 12%, var(--paper));
}
.graph-card-grid {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}
.role-legend,
.relationship-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.role-legend span,
.relationship-legend span {
  border: 1px solid var(--role-color, var(--edge-color, var(--line)));
  background: color-mix(in srgb, var(--role-color, var(--edge-color, var(--paper-2))) 15%, var(--paper));
  border-radius: 999px;
  color: var(--ink);
  padding: 7px 9px;
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.relationship-legend {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
.relationship-legend span {
  --role-color: var(--edge-color);
}
.relationship-legend .edge-student {
  --edge-color: #2fbf71;
}
.relationship-legend .edge-works-at {
  --edge-color: #36a3ff;
}
.relationship-legend .edge-smith-sharpener {
  --edge-color: #d99100;
}
.relationship-legend .edge-collaboration {
  --edge-color: #ff6f61;
}
.relationship-legend .edge-community {
  --edge-color: var(--muted);
  border-style: dashed;
}
.regional-geography {
  max-width: min(1800px, calc(100vw - 48px));
  margin: 18px auto 0;
  overflow: hidden;
}
.regional-geography .section-head {
  align-items: end;
  margin-bottom: 12px;
}
.regional-map-svg {
  width: 100%;
  min-height: clamp(520px, 56vw, 760px);
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(color-mix(in srgb, var(--line-strong) 20%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line-strong) 20%, transparent) 1px, transparent 1px),
    var(--paper-2);
  background-size: 92px 92px;
}
.japan-map-shape {
  color: var(--ink);
}
.japan-map-shape path,
.japan-map-shape circle {
  fill: url(#japan-map-fill);
  stroke: color-mix(in srgb, var(--line-strong) 80%, transparent);
  stroke-width: 2;
}
.regional-map-node {
  cursor: pointer;
  outline: none;
}
.regional-map-node circle {
  fill: color-mix(in srgb, var(--region-color) 19%, var(--paper));
  stroke: var(--region-color);
  stroke-width: 3.6;
  filter: drop-shadow(0 10px 16px color-mix(in srgb, var(--region-color) 18%, transparent));
}
.regional-map-node:hover circle,
.regional-map-node:focus-visible circle,
.regional-map-node.is-active circle {
  fill: color-mix(in srgb, var(--region-color) 33%, var(--paper));
  stroke-width: 4.4;
}
.regional-map-node text {
  text-anchor: middle;
  dominant-baseline: middle;
  fill: var(--ink);
  font-weight: 950;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
  pointer-events: none;
}
.regional-map-node .region-flag {
  fill: var(--region-color);
  font-size: 14px;
  letter-spacing: .08em;
}
.regional-map-node .small {
  font-size: 10.5px;
  text-transform: uppercase;
}
.maker-card {
  min-height: 116px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 82%, var(--paper-2));
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.maker-card span {
  color: var(--accent);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.maker-card strong {
  font-size: 1rem;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.maker-card small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.3;
}
.maker-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.graph-detail {
  display: grid;
  gap: 10px;
}
.graph-detail strong {
  display: block;
  font-size: 1.3rem;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.graph-detail h3 {
  font-size: 1rem;
  margin-top: 6px;
}
.graph-detail ul {
  margin: 0;
  padding-left: 18px;
}
.role-badge {
  width: fit-content;
  border: 1px solid var(--role-color, var(--line));
  color: var(--ink);
  background: color-mix(in srgb, var(--role-color, var(--accent)) 14%, var(--paper));
  border-radius: 999px;
  padding: 6px 9px;
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.line-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.line-list span {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--ink);
  font-size: .72rem;
  font-weight: 900;
}
.graph-caveat {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  font-size: .82rem;
}
.graph-note {
  display: grid;
  gap: 14px;
}
.graph-note h2 {
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: .94;
  letter-spacing: -.055em;
}
.graph-note section {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.graph-note h3 {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.graph-note p {
  margin: 0;
}
.wiki-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.wiki-link {
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}
.wiki-link:hover,
.wiki-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
.graph-source-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.graph-source-list a,
.graph-source-list span {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 12px;
  padding: 10px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}
.graph-source-list a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.finder { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.finder-grid { display:grid; grid-template-columns: 360px minmax(0,1fr); gap: 24px; }
.finder-form { display:grid; gap: 18px; }
.finder-group legend { font-weight: 900; letter-spacing:-.025em; margin-bottom: 8px; }
.finder-options { display:grid; gap: 8px; }
.finder-option { display:flex; align-items:center; gap: 10px; border: 1px solid var(--line); background: var(--paper-2); border-radius: 14px; padding: 10px 12px; cursor:pointer; }
.finder-option:hover { border-color: var(--line-strong); }
.finder-result { border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius); padding: 20px; min-height: 100%; }
.finder-result h3 { font-size: clamp(1.5rem, 3vw, 2.6rem); }
.finder-result p { color: var(--muted); margin-top: 10px; }
.finder-specs { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 18px 0; }
.finder-specs div { border:1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--paper); }
.finder-specs b { display:block; font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; }
.finder-specs span { font-weight:900; font-size:.9rem; overflow-wrap:anywhere; }
.finder-section-title {
  margin-top: 24px;
  font-size: 1.35rem !important;
}
.finder-buy-options {
  margin-top: 22px;
}
.finder-subhead {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}
.finder-subhead h3 {
  font-size: 1.35rem;
}
.finder-subhead p {
  max-width: 760px;
  margin-top: 0;
  font-size: .9rem;
}
.finder-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.finder-product-grid.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.finder-product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  padding: 12px;
}
.finder-product-card span {
  color: var(--accent);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.finder-product-card strong {
  font-size: .95rem;
  line-height: 1.15;
}
.finder-product-card p {
  font-size: .8rem;
  line-height: 1.35;
  margin: 0;
}
.finder-product-card a {
  justify-content: center;
  margin-top: auto;
  text-align: center;
}
.finder-product-card.is-compact {
  background: color-mix(in srgb, var(--paper) 78%, var(--paper-2));
  padding: 10px;
}
.finder-product-card.is-compact p {
  display: none;
}
.maintenance-kit { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.maintenance-kit > div { border:1px solid var(--line); background:var(--paper); border-radius:16px; padding:14px; }
.maintenance-kit > div > b { display:block; margin-bottom:4px; }
.maintenance-kit > div > span { color:var(--muted); font-size:.88rem; }

.roll-grid { display:grid; grid-template-columns: minmax(0,1fr) minmax(280px,.6fr); gap: 18px; }
.roll-list { display:grid; gap: 12px; }
.roll-item { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 20px; display:grid; grid-template-columns: 110px minmax(0,1fr); gap: 16px; align-items: start; }
.roll-item .number { font-size: 2.4rem; font-weight: 900; letter-spacing:-.08em; color: var(--accent); }
.roll-item p { color: var(--muted); margin-top: 8px; }

.explore-layout { display:grid; grid-template-columns: 250px minmax(0, 1fr) 360px; gap: 18px; align-items:start; }
.deck-nav, .deck-preview { position: sticky; top: 92px; display:grid; gap: 10px; }
.deck-tab-card { text-align:left; border:1px solid var(--line); background:var(--paper); border-radius:22px; padding:18px; cursor:pointer; box-shadow: var(--soft-shadow); min-height: 108px; overflow:hidden; }
.deck-tab-card strong { display:block; font-size: 1.28rem; letter-spacing:-.055em; line-height:1; overflow-wrap:anywhere; }
.deck-tab-card span { display:block; margin-top: 8px; color:var(--muted); font-size:.82rem; }
.deck-tab-card[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.deck-tab-card[aria-pressed="true"] span { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.card-stage { min-height: 610px; border:1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, var(--paper), var(--paper-2)); padding: 22px; overflow:hidden; box-shadow: var(--shadow); }
.card-stage-head { display:flex; justify-content:space-between; gap:14px; align-items:end; margin-bottom: 18px; }
.card-stage-head p { color:var(--muted); max-width:560px; }
.card-stack { position: relative; min-height: 515px; }
.stack-card { position:absolute; width:min(100%, 720px); min-height: 170px; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--paper); padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.12); cursor:pointer; transition: transform .18s ease, opacity .18s ease, border-color .18s ease; overflow:hidden; overflow-wrap:anywhere; hyphens:auto; }
.stack-card:before { content:""; position:absolute; inset:0 0 auto 0; height:6px; background: var(--accent); }
.stack-card strong { display:block; font-size: clamp(1.2rem, 3vw, 2rem); line-height:.98; letter-spacing:-.06em; padding-right: 22px; overflow-wrap:anywhere; }
.stack-card p { color:var(--muted); margin-top:12px; font-size:.92rem; max-width: 620px; }
.stack-card .eyebrow { margin-top: 12px; }
.stack-card:hover, .stack-card.active { border-color: var(--accent); transform: translate(var(--x), calc(var(--y) - 4px)) rotate(var(--r)) !important; }
.deck-preview { border:1px solid var(--line); background:var(--paper); border-radius:var(--radius); padding: 20px; box-shadow: var(--soft-shadow); }
.deck-preview h3 { font-size:2rem; overflow-wrap:anywhere; }
.deck-preview p { color:var(--muted); margin-top: 12px; }
.preview-meta { display:flex; gap:8px; flex-wrap:wrap; margin: 16px 0; }

.search-dialog { position: fixed; inset: 0; z-index: 100; display:none; place-items:start center; padding: 80px 16px; background: rgba(0,0,0,.35); backdrop-filter: blur(8px); }
.search-dialog.is-open { display:grid; }
.search-panel { width: min(760px, 100%); background: var(--paper); border:1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,.28); overflow:hidden; }
.search-panel header { display:flex; gap:10px; align-items:center; padding: 14px; border-bottom:1px solid var(--line); }
.search-panel input { flex:1; border:0; outline:0; background: transparent; font-size:1rem; }
.search-results { max-height: 60vh; overflow:auto; display:grid; }
.search-result { padding: 14px 18px; border-bottom:1px solid var(--line); }
.search-result strong { display:block; overflow-wrap:anywhere; }
.search-result span { color:var(--muted); font-size:.85rem; }

.footer { border-top: 1px solid var(--line); margin-top: 80px; }
.footer-inner { max-width: var(--max); margin:0 auto; padding: 32px clamp(16px,4vw,40px); display:grid; grid-template-columns: 1fr auto; gap: 20px; color:var(--muted); font-size:.86rem; }
.footer-links { display:flex; gap: 14px; flex-wrap:wrap; }

@media (max-width: 1060px) {
  .header-inner { grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; }
  .brand-logo { width: clamp(156px, 34vw, 216px); max-height: 36px; }
  .header-actions { grid-column: 3; }
  .menu-button { display: grid; }
  .nav-tabs {
    position: fixed;
    z-index: 60;
    top: calc(env(safe-area-inset-top, 0px) + 66px);
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    box-shadow: 0 24px 80px rgba(0,0,0,.24);
    max-height: min(72vh, 560px);
    overflow: auto;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    pointer-events: none;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .nav-tabs.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
  }
  .nav-tabs a {
    min-height: 48px;
    justify-content: space-between;
    border-radius: 16px;
    padding: 13px 14px;
    font-size: .92rem;
    white-space: normal;
  }
  .nav-tabs a:after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: .45;
    flex: 0 0 auto;
  }
  .hero, .story-strip, .finder-grid, .roll-grid, .article-layout, .explore-layout, .maker-graph-shell { grid-template-columns: 1fr; }
  .article-sidebar, .deck-nav, .deck-preview, .graph-detail-panel { position: static; }
  .graph-stage { grid-column: auto; }
  .graph-detail-panel { max-height: none; overflow: visible; }
  .entry-grid, .article-card-grid, .photo-grid, .graph-card-grid, .finder-product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .finder-specs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card-stage { min-height:auto; }
  .card-stack { display:flex; gap:14px; overflow-x:auto; min-height:auto; padding: 10px 6px 18px; scroll-snap-type:x mandatory; }
  .stack-card { position:relative; width:min(78vw, 420px); min-width:min(78vw, 420px); transform:none !important; min-height: 240px; scroll-snap-align:center; }
  .stack-card:hover, .stack-card.active { transform: translateY(-4px) !important; }
  .deck-nav { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .header-inner { padding: 12px 14px; gap: 10px; }
  .brand-logo { width: clamp(138px, 42vw, 188px); max-height: 32px; }
  .hero { padding-top: 28px; }
  h1 { font-size: clamp(2.6rem, 16vw, 4.6rem); }
  .entry-grid, .article-card-grid, .maintenance-kit, .decision-box, .product-grid, .deck-nav, .article-gallery, .photo-grid, .graph-card-grid, .finder-product-grid, .finder-product-grid.is-compact { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 1fr; gap: 8px; }
  .timeline-item, .roll-item { grid-template-columns: 1fr; }
  .finder-specs { grid-template-columns: 1fr; }
  .section-head { display:block; }
  .section-actions { margin-top: 14px; }
  .footer-inner { grid-template-columns: 1fr; }
  .stack-card { width: 86vw; min-width: 86vw; }
  .article-hero h1 { font-size: clamp(2.2rem, 13vw, 4rem); }
  .graph-stage,
  .maker-graph-svg { min-height: 520px; }
  .graph-panel { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}


/* Flickable Explore Deck v2 */
.explore-layout {
  grid-template-columns: minmax(220px, 280px) minmax(420px, 1fr) minmax(280px, 360px);
  gap: clamp(14px, 2vw, 24px);
}
.deck-nav {
  align-content: start;
}
.deck-tab-card {
  position: relative;
  isolation: isolate;
  min-height: 112px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.deck-tab-card:hover {
  transform: translateY(-2px) rotate(-.5deg);
  border-color: var(--line-strong);
}
.deck-tab-card[aria-pressed="true"]:after {
  content: "";
  position: absolute;
  inset: auto 16px 14px 16px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent);
}
.card-stage {
  min-height: clamp(560px, 68vh, 760px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 80% 12%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 280px),
    linear-gradient(135deg, var(--paper), var(--paper-2));
}
.card-stage-head {
  align-items: start;
}
.deck-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: max-content;
}
.deck-control-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  font-weight: 900;
}
.deck-control-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.deck-counter {
  min-width: 72px;
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}
.deck-hint {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  margin: -6px 0 14px;
}
.card-stack {
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  outline: none;
}
.card-stack:focus-visible {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 28px;
}
.stack-card {
  position: absolute;
  width: min(94%, 680px);
  min-width: 0;
  min-height: clamp(360px, 48vh, 520px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 32px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 98%, var(--accent) 2%), var(--paper)),
    var(--paper);
  box-shadow: 0 28px 80px rgba(0,0,0,.16);
  transform:
    translate(calc(var(--drift) * 34px), calc(var(--abs) * 18px))
    rotate(calc(var(--offset) * 2.4deg))
    scale(calc(1 - (var(--abs) * .035)));
  opacity: calc(1 - (var(--abs) * .12));
  z-index: var(--z);
  cursor: grab;
  transition: transform .24s cubic-bezier(.2,.8,.2,1), opacity .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  -webkit-tap-highlight-color: transparent;
}
.stack-card:before {
  height: 7px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent));
}
.stack-card.is-active {
  border-color: var(--accent);
  cursor: grab;
}
.stack-card.is-active:active,
.stack-card.is-dragging {
  cursor: grabbing;
  box-shadow: 0 36px 96px rgba(0,0,0,.22);
}
.stack-card.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.stack-card .eyebrow {
  margin-top: 10px;
  color: var(--accent);
}
.stack-card strong {
  display: block;
  font-size: clamp(2rem, 4.8vw, 4.4rem);
  line-height: .88;
  letter-spacing: -.08em;
  padding-right: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}
.stack-card p {
  color: var(--muted);
  font-size: clamp(.95rem, 1.25vw, 1.08rem);
  line-height: 1.45;
  max-width: 58ch;
  overflow-wrap: anywhere;
}
.deck-preview {
  align-content: start;
}
.deck-preview .button {
  margin-top: 16px;
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted);
  background: var(--paper);
}
@media (max-width: 1180px) {
  .explore-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .deck-nav,
  .deck-preview {
    position: static;
  }
  .deck-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-stage {
    min-height: clamp(540px, 72vh, 720px);
  }
}
@media (max-width: 760px) {
  .deck-nav {
    display: flex;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
  }
  .deck-tab-card {
    min-width: min(78vw, 280px);
    scroll-snap-align: start;
  }
  .card-stage {
    padding: 16px;
    border-radius: 24px;
    min-height: 560px;
  }
  .card-stage-head {
    display: grid;
    gap: 12px;
  }
  .deck-controls {
    justify-content: flex-start;
  }
  .stack-card {
    width: min(92vw, 430px);
    min-height: 370px;
    padding: 24px;
    border-radius: 26px;
  }
  .stack-card strong {
    font-size: clamp(1.8rem, 12vw, 3.2rem);
  }
  .stack-card p {
    font-size: .9rem;
  }
}


/* Kit Builder */
.kit-builder { margin-top: clamp(26px, 5vw, 64px); }
.kit-summary-panel,
.kit-library-panel,
.kit-slots-panel { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--soft-shadow); min-width: 0; }
.kit-summary-panel { margin-bottom: clamp(18px, 3vw, 30px); }
.kit-summary-panel h2,
.kit-library-panel h2,
.kit-slots-panel h2 { font-size: clamp(1.6rem, 3.4vw, 3.1rem); line-height: .92; }
.kit-builder-board { display: grid; grid-template-columns: minmax(340px, .94fr) minmax(0, 1.36fr); gap: clamp(18px, 3vw, 34px); align-items: start; }
.kit-builder .section-head { align-items: start; }
.kit-builder .section-head p,
.kit-summary-panel p { color: var(--muted); margin-top: 10px; }
.kit-control-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.kit-control-row .search-input,
.kit-control-row select { flex: 1 1 180px; min-width: 0; }
.kit-summary { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin: 18px 0; }
.kit-summary div { border: 1px solid var(--line); background: var(--paper-2); border-radius: 16px; padding: 12px; min-width: 0; }
.kit-summary span { display: block; color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.kit-summary strong { display: block; font-size: 1.4rem; letter-spacing: -.05em; line-height: 1; margin-top: 6px; }
.kit-status { display: grid; gap: 8px; }
.kit-status p { margin: 0; border-left: 3px solid var(--accent); padding: 10px 12px; background: var(--paper-2); border-radius: 0 14px 14px 0; color: var(--muted); }
.kit-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; max-height: min(1180px, calc(100vh - 185px)); overflow: auto; padding-right: 4px; scrollbar-width: thin; }
.kit-slots { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.kit-library-card,
.kit-slot-card { border: 1px solid var(--line); background: var(--paper); border-radius: 24px; padding: 18px; box-shadow: var(--soft-shadow); display: flex; flex-direction: column; gap: 12px; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease; }
.kit-library-card { min-height: 320px; cursor: grab; }
.kit-slot-card { min-height: 235px; cursor: pointer; }
.kit-slot-card.filled { cursor: grab; background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 96%, var(--accent) 4%), var(--paper)); }
.kit-library-card:active,
.kit-slot-card.filled:active { cursor: grabbing; }
.kit-library-card:hover,
.kit-slot-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.kit-library-card.is-being-dragged,
.kit-slot-card.is-being-dragged,
.kit-library-card.dragging,
.kit-slot-card.dragging { opacity: .48; transform: scale(.985); }
.kit-builder.is-dragging .kit-slot-card { outline: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -8px; }
.kit-library-card.selected { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.kit-slot-card.active { border-color: var(--accent); box-shadow: var(--shadow); }
.kit-slot-card.empty { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--paper-2) 74%, transparent), color-mix(in srgb, var(--paper-2) 74%, transparent) 10px, var(--paper) 10px, var(--paper) 20px); }
.kit-slots-panel.drag-over,
.kit-slot-card.drag-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); transform: translateY(-2px) scale(1.01); }
.slot-number,
.kit-slot-head,
.kit-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--accent); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.drag-badge,
.drop-badge,
.kit-drop-hint { border: 1px solid color-mix(in srgb, currentColor 32%, var(--line)); border-radius: 999px; padding: 4px 7px; color: var(--muted); background: var(--paper-2); white-space: nowrap; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.kit-item-image { margin: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper-2); aspect-ratio: 16 / 9; min-height: 0; }
.kit-item-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kit-item-image.slot-image { aspect-ratio: 2.25 / 1; border-radius: 16px; }
.kit-library-card h3,
.kit-slot-card strong { font-size: clamp(1.18rem, 2.1vw, 1.95rem); line-height: .98; letter-spacing: -.055em; overflow-wrap: anywhere; }
.kit-library-card p,
.kit-slot-card p { color: var(--muted); font-size: .86rem; line-height: 1.42; margin: 0; }
.kit-library-card dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 0; }
.kit-library-card dl div { border: 1px solid var(--line); background: var(--paper-2); border-radius: 12px; padding: 8px; min-width: 0; }
.kit-library-card dt { color: var(--muted); font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.kit-library-card dd { margin: 3px 0 0; font-size: .78rem; font-weight: 800; overflow-wrap: anywhere; }
.kit-attributes { display: grid; gap: 4px; }
.kit-attributes em { font-style: normal; color: var(--muted); font-size: .72rem; font-weight: 800; overflow-wrap: anywhere; }
.kit-card-footer { display: grid; gap: 4px; color: var(--muted); font-size: .68rem; font-weight: 800; }
.kit-card-footer span:first-child { color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.kit-card-actions,
.slot-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.slot-actions button { appearance: none; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); color: var(--ink); font: inherit; font-size: .7rem; font-weight: 900; padding: 8px 10px; cursor: pointer; }
.slot-actions button:hover { border-color: var(--accent); color: var(--accent); }
.drag-copy { color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.kit-drop-note { color: var(--muted); font-size: .88rem; margin-top: 8px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-row span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; color: var(--muted); font-size: .68rem; font-weight: 900; }
@media (min-width: 1500px) {
  .kit-builder-board { grid-template-columns: minmax(440px, .9fr) minmax(760px, 1.4fr); }
  .kit-slots { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1180px) {
  .kit-builder-board { grid-template-columns: 1fr; }
  .kit-library-grid { max-height: none; }
}
@media (max-width: 820px) {
  .kit-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kit-slots,
  .kit-library-grid { grid-template-columns: 1fr; }
  .kit-slot-card { min-height: 205px; }
  .kit-control-row { display: grid; }
}

/* Backward compatibility for old Roll Builder pages. */
.roll-builder { margin-top: clamp(26px, 5vw, 64px); }
.roll-builder-grid { display: grid; gap: clamp(18px, 3vw, 34px); }
.roll-builder-panel { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--soft-shadow); }
.button.small { padding: 8px 11px; font-size: .74rem; box-shadow: none; }
.button.ghost { color: var(--muted); background: var(--paper-2); }
