/* ===============================================================
   ネットワークの森 v4 — BRUTALISM × CREATIVE-BOLD × DOPE
   tone: creative-bold（editorial 完全廃棄）
   effects: brutalism / text-mask / kinetic-typo / magnetic-cursor /
            tilt-3d / morph-shape / stripe-line / noise-bg / glow-edge
   =============================================================== */

:root {
  /* creative-bold パレット */
  --base:       #fafaf9;
  --text:       #0a0a0a;
  --text-sub:   #525252;
  --acc-yellow: #fbbf24;
  --acc-red:    #ef4444;
  --acc-cyan:   #06b6d4;
  --acc-pink:   #ec4899;
  --acc-lime:   #c8ff00;
  --acc-orange: #f59e0b;
  --bg-dark:    #0a0a0a;
  --bg-paper:   #f5f1e8;

  /* Container */
  --container:  1440px;

  /* Brutal shadow */
  --bsh:        8px 8px 0 #0a0a0a;
  --bsh-lg:     12px 12px 0 #0a0a0a;
  --bsh-sm:     4px 4px 0 #0a0a0a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", "Helvetica Neue", "Noto Sans JP", sans-serif;
  background: var(--base);
  color: var(--text);
  line-height: 1.6;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ノイズオーバーレイ（全体）*/
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: multiply;
}

/* スクロール進捗 */
.nf-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 6px;
  background: var(--acc-yellow);
  z-index: 200;
  transition: width 0.1s linear;
  border-bottom: 2px solid var(--text);
}

/* ===========================================================
   ヘッダー — brutal stuck navigation
   =========================================================== */
.nf-header {
  position: sticky; top: 0;
  z-index: 50;
  background: var(--base);
  border-bottom: 3px solid var(--text);
}
.nf-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nf-header__logo {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.nf-header__logo::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--acc-red);
  margin-right: 4px;
}
.nf-header__logo small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  background: var(--text);
  color: var(--acc-yellow);
  padding: 2px 8px;
}
.nf-header__nav {
  display: flex;
  gap: 0;
  margin-left: auto;
  flex-wrap: wrap;
}
.nf-header__nav a {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-left: 2px solid var(--text);
  transition: background .15s, color .15s;
}
.nf-header__nav a:last-child { border-right: 2px solid var(--text); }
.nf-header__nav a:hover { background: var(--text); color: var(--acc-yellow); }
.nf-header__nav a.is-current { background: var(--acc-yellow); }
@media (max-width: 760px) {
  .nf-header__inner { padding: 12px 16px; gap: 10px; }
  .nf-header__nav a { font-size: 0.68rem; padding: 6px 10px; }
  .nf-header__logo small { display: none; }
}

/* ===========================================================
   ヒーロー — BRUTAL × KINETIC × MORPH
   =========================================================== */
.nf-hero {
  background: var(--bg-dark);
  color: var(--base);
  padding: 80px 32px 0;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  border-bottom: 6px solid var(--acc-yellow);
  isolation: isolate;
}
/* ノイズ */
.nf-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}

/* 動く blob 装飾 */
.nf-hero__blob {
  position: absolute;
  pointer-events: none;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  filter: blur(60px);
  opacity: 0.7;
  z-index: 0;
  animation: morph 18s ease-in-out infinite;
}
.nf-hero__blob--1 {
  width: 480px; height: 480px;
  background: linear-gradient(135deg, var(--acc-red), var(--acc-pink));
  top: -120px; left: -120px;
}
.nf-hero__blob--2 {
  width: 380px; height: 380px;
  background: linear-gradient(135deg, var(--acc-cyan), var(--acc-yellow));
  bottom: -100px; right: 10%;
  animation-delay: -6s;
}
.nf-hero__blob--3 {
  width: 280px; height: 280px;
  background: linear-gradient(135deg, var(--acc-yellow), var(--acc-orange));
  top: 30%; right: -80px;
  animation-delay: -12s;
}
@keyframes morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(0deg) scale(1); }
  25%      { border-radius: 30% 70% 70% 30% / 40% 60% 30% 70%; transform: rotate(90deg) scale(1.1); }
  50%      { border-radius: 70% 30% 50% 50% / 30% 70% 40% 60%; transform: rotate(180deg) scale(0.95); }
  75%      { border-radius: 40% 60% 70% 30% / 70% 30% 60% 40%; transform: rotate(270deg) scale(1.05); }
}

.nf-hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 60px 0 40px;
}

.nf-hero__meta {
  display: flex;
  gap: 14px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.nf-hero__meta span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 6px 12px;
  border: 2px solid var(--base);
  color: var(--base);
}
.nf-hero__meta span:first-child {
  background: var(--acc-yellow);
  color: var(--text);
  border-color: var(--acc-yellow);
}
.nf-hero__meta span:nth-child(2) {
  background: var(--acc-red);
  color: var(--base);
  border-color: var(--acc-red);
}

/* 巨大タイトル：kinetic-typo + text-mask */
.nf-hero__title {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-size: clamp(3.6rem, 14vw, 14rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin: 0 0 48px;
  text-transform: none;
  color: var(--base);
}
/* word を行単位で overflow: hidden コンテナにする */
.nf-hero__title .line {
  display: block;
  overflow: hidden;
  padding: 0.08em 0;        /* descender / accent クリップ防止 */
  line-height: 0.92;
}
.nf-hero__title .line-inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: lineRise 1s cubic-bezier(.2,.8,.2,1) forwards;
  will-change: transform, opacity;
  vertical-align: bottom;
}
.nf-hero__title .line:nth-child(1) .line-inner { animation-delay: 0.1s; }
.nf-hero__title .line:nth-child(2) .line-inner { animation-delay: 0.22s; }
.nf-hero__title .line:nth-child(3) .line-inner { animation-delay: 0.34s; }
@keyframes lineRise {
  to { transform: translateY(0); opacity: 1; }
}
.nf-hero__title .mask-grad {
  background: linear-gradient(135deg, var(--acc-yellow) 0%, var(--acc-red) 50%, var(--acc-pink) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  /* グラデで透過になると下線が見えなくなる小ハック */
  padding: 0 0.04em;
}
.nf-hero__title .stroke {
  color: transparent;
  -webkit-text-stroke: 3px var(--acc-yellow);
  font-style: italic;
  display: inline-block;
}
.nf-hero__title .underline {
  position: relative;
  display: inline-block;
}
.nf-hero__title .underline::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 0.12em;
  background: var(--acc-red);
  z-index: -1;
}

.nf-hero__sub-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
  margin-top: 32px;
}
@media (max-width: 800px) {
  .nf-hero__sub-row { grid-template-columns: 1fr; gap: 28px; }
}

.nf-hero__lead {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: clamp(0.98rem, 1.4vw, 1.18rem);
  color: rgba(250, 250, 249, 0.85);
  max-width: 50ch;
  line-height: 1.85;
  font-weight: 500;
}
.nf-hero__lead b {
  color: var(--base);
  font-weight: 800;
  background: var(--text);
  padding: 2px 8px;
  margin: 0 2px;
}
.nf-hero__lead em {
  color: var(--acc-yellow);
  font-style: normal;
  font-weight: 800;
}

/* magnetic CTA — brutal-btn 強化 */
.nf-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--acc-yellow);
  border: 3px solid var(--acc-yellow);
  padding: 22px 36px;
  text-decoration: none;
  width: max-content;
  box-shadow: var(--bsh);
  transition: transform .15s, box-shadow .15s, background .15s;
  white-space: nowrap;
  position: relative;
}
.nf-hero__cta::before {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%;
  height: 3px;
  background: var(--text);
}
.nf-hero__cta:hover {
  background: var(--acc-red);
  color: var(--base);
  transform: translate(-3px, -3px);
  box-shadow: var(--bsh-lg);
}
.nf-hero__cta:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--text);
}
.nf-hero__cta svg { width: 22px; height: 22px; flex-shrink: 0; }

/* マーキー（下部の流れ）*/
.nf-marquee {
  width: 100%;
  overflow: hidden;
  border-top: 3px solid var(--acc-yellow);
  border-bottom: 3px solid var(--acc-yellow);
  background: var(--acc-yellow);
  position: relative;
  z-index: 2;
  padding: 18px 0;
}
.nf-marquee__track {
  display: flex;
  gap: 0;
  animation: marquee 40s linear infinite;
  width: max-content;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.nf-marquee__item {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  padding: 0 32px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nf-marquee__item::after {
  content: '✱';
  color: var(--acc-red);
  font-size: 0.7em;
}
.nf-marquee__item em {
  color: var(--acc-red);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .nf-marquee__track { animation: none; }
  .nf-hero__blob { animation: none; }
  .nf-hero__title .char { transform: none; opacity: 1; animation: none; }
}

@media (max-width: 720px) {
  .nf-hero { padding-top: 40px; min-height: auto; }
  .nf-hero__inner { padding: 24px 0 40px; }
  .nf-hero__meta { gap: 8px; margin-bottom: 32px; }
  .nf-hero__meta span { font-size: 0.58rem; padding: 4px 10px; }
}

/* ===========================================================
   メインコンテナ
   =========================================================== */
.nf-main { position: relative; z-index: 2; }
.nf-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 100px 32px;
  position: relative;
}
@media (max-width: 720px) {
  .nf-container { padding: 60px 20px; }
}

/* 斜め stripe divider */
.nf-stripe-divider {
  height: 40px;
  background: repeating-linear-gradient(
    -45deg,
    var(--acc-yellow) 0 24px,
    var(--text) 24px 48px
  );
  border-top: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  position: relative;
  z-index: 3;
}

/* ===========================================================
   セクションヘッダ — brutal big
   =========================================================== */
.nf-section { margin: 0 0 120px; position: relative; }
.nf-section:last-child { margin-bottom: 0; }

.nf-section-head {
  margin-bottom: 64px;
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 720px) {
  .nf-section-head { grid-template-columns: 1fr; gap: 12px; }
}

.nf-section-head__num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
  padding: 8px 14px;
  background: var(--acc-yellow);
  border: 2px solid var(--text);
  display: inline-block;
  width: max-content;
  grid-column: 1;
  grid-row: 1 / span 2;
  box-shadow: var(--bsh-sm);
  transform: rotate(-2deg);
  align-self: start;
}
@media (max-width: 720px) {
  .nf-section-head__num { grid-row: auto; }
}

.nf-section-head__body { grid-column: 2; }
.nf-section-head > .nf-section-head__title { grid-column: 2; }
.nf-section-head > .nf-section-head__sub   { grid-column: 2; }

.nf-section-head__title {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 0;
  text-transform: none;
}
.nf-section-head__title em {
  font-style: italic;
  color: var(--acc-red);
  position: relative;
}
.nf-section-head__title .stroke {
  color: transparent;
  -webkit-text-stroke: 3px var(--text);
  font-style: italic;
}
.nf-section-head__title .highlight {
  background: var(--acc-yellow);
  padding: 0 12px;
  display: inline-block;
  transform: rotate(-1deg);
  border: 2px solid var(--text);
  box-shadow: var(--bsh-sm);
}
.nf-section-head__sub {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 1.04rem;
  color: var(--text-sub);
  margin-top: 22px;
  max-width: 60ch;
  line-height: 1.85;
  font-weight: 500;
}

/* ===========================================================
   本文
   =========================================================== */
.nf-text {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 1.04rem;
  line-height: 1.95;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 820px;
  font-weight: 500;
}
.nf-text b, .nf-text strong {
  color: var(--text);
  font-weight: 900;
  background: var(--acc-yellow);
  padding: 1px 6px;
}
.nf-text em {
  font-style: italic;
  color: var(--acc-red);
  font-weight: 800;
}
.nf-text code {
  font-family: "JetBrains Mono", monospace;
  background: var(--text);
  color: var(--acc-yellow);
  padding: 3px 10px;
  font-size: 0.88em;
  font-weight: 700;
  border: 2px solid var(--text);
}
.nf-text a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid var(--acc-red);
  font-weight: 800;
  transition: background .15s, color .15s;
}
.nf-text a:hover { background: var(--acc-red); color: var(--base); padding: 0 4px; }

/* lead 段落 — 巨大引用風 */
.nf-text--lead {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.5;
  font-weight: 700;
  color: var(--text);
  max-width: 26ch;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}
.nf-text--lead::before {
  content: '◢';
  display: inline-block;
  color: var(--acc-red);
  font-size: 1.6em;
  margin-right: 0.2em;
  vertical-align: middle;
}

/* プルクオート - brutal style */
.nf-quote {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.15;
  color: var(--text);
  margin: 80px 0;
  max-width: 22ch;
  font-weight: 900;
  letter-spacing: -0.03em;
  position: relative;
  padding-left: 0;
}
.nf-quote::before {
  content: '"';
  display: block;
  font-size: 6rem;
  color: var(--acc-red);
  line-height: 0.8;
  font-weight: 900;
  margin-bottom: -20px;
}
.nf-quote em {
  background: var(--acc-yellow);
  font-style: normal;
  padding: 0 8px;
  display: inline-block;
  border: 2px solid var(--text);
  box-shadow: var(--bsh-sm);
  transform: rotate(-1deg);
}
.nf-quote cite {
  display: block;
  font-style: normal;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--text-sub);
  margin-top: 24px;
  text-transform: uppercase;
  font-weight: 700;
}

/* リスト */
.nf-text + ul, .nf-text + ol {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
  margin: 0 0 24px 0;
  padding-left: 1.5em;
  max-width: 760px;
  font-weight: 500;
}
.nf-text + ul li, .nf-text + ol li { margin-bottom: 8px; }

/* ===========================================================
   章カード — BRUTAL × TILT × STRIPE
   =========================================================== */
.nf-chapters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0;
  margin: 64px 0;
}

.nf-chapter-card {
  display: flex;
  flex-direction: column;
  background: var(--base);
  border: 3px solid var(--text);
  padding: 36px 30px 30px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  transition: transform .15s ease, box-shadow .15s ease;
  margin-left: -3px;
  margin-top: -3px;
}
.nf-chapter-card::before {
  /* number background big */
  content: attr(data-num);
  position: absolute;
  right: -10px;
  bottom: -40px;
  font-family: "Helvetica Neue", "Inter", monospace;
  font-size: 13rem;
  font-weight: 900;
  color: var(--text);
  opacity: 0.08;
  line-height: 0.7;
  pointer-events: none;
  letter-spacing: -0.06em;
}
.nf-chapter-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--bsh-lg);
  z-index: 2;
}

/* 大型ヒーロー章カード */
.nf-chapter-card--hero {
  grid-row: span 2;
  background: var(--bg-dark);
  color: var(--base);
  padding: 48px 40px;
  min-height: 700px;
  position: relative;
}
.nf-chapter-card--hero::before {
  color: var(--acc-yellow);
  opacity: 0.15;
  font-size: 18rem;
}
.nf-chapter-card--hero::after {
  /* 斜めストライプ装飾 */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 24px;
  background: repeating-linear-gradient(
    -45deg,
    var(--acc-yellow) 0 14px,
    var(--text) 14px 28px
  );
  pointer-events: none;
}
.nf-chapter-card--hero .nf-chapter-card__title { font-size: 3.6rem; color: var(--base); }
.nf-chapter-card--hero .nf-chapter-card__sub { color: rgba(250, 250, 249, 0.7); font-size: 1rem; }
.nf-chapter-card--hero .nf-chapter-card__icon { background: var(--acc-yellow); color: var(--text); border-color: var(--acc-yellow); }
.nf-chapter-card--hero .nf-chapter-card__icon svg { width: 36px; height: 36px; }
.nf-chapter-card--hero .nf-chapter-card__cta { background: var(--acc-yellow); color: var(--text); border-color: var(--acc-yellow); }
.nf-chapter-card--hero:hover .nf-chapter-card__cta { background: var(--acc-red); color: var(--base); border-color: var(--acc-red); }
.nf-chapter-card--hero .nf-chapter-card__label { color: var(--acc-yellow); }

.nf-chapter-card__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  background: var(--text);
  border: 3px solid var(--text);
  color: var(--acc-yellow);
  position: relative;
  z-index: 2;
  transition: transform .15s, background .15s, color .15s;
}
.nf-chapter-card:hover .nf-chapter-card__icon { transform: rotate(-8deg) scale(1.1); }
.nf-chapter-card__icon svg { width: 32px; height: 32px; }

.nf-chapter-card__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 800;
  position: relative;
  z-index: 2;
  background: var(--acc-yellow);
  display: inline-block;
  padding: 3px 10px;
  width: max-content;
  border: 2px solid var(--text);
}
.nf-chapter-card__title {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 18px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  position: relative;
  z-index: 2;
}
.nf-chapter-card__sub {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.94rem;
  color: var(--text-sub);
  line-height: 1.7;
  flex: 1;
  position: relative;
  z-index: 2;
  font-weight: 500;
}
.nf-chapter-card__cta {
  margin-top: 28px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  background: var(--acc-yellow);
  padding: 12px 20px;
  border: 2px solid var(--text);
  box-shadow: var(--bsh-sm);
  width: max-content;
  transition: transform .15s, background .15s, color .15s;
}
.nf-chapter-card__cta svg {
  width: 16px;
  height: 16px;
  transition: transform .15s;
}
.nf-chapter-card:hover .nf-chapter-card__cta {
  background: var(--acc-red);
  color: var(--base);
}
.nf-chapter-card:hover .nf-chapter-card__cta svg { transform: translateX(6px); }

/* カテゴリ別カラー — 色のアクセント変化 */
.nf-chapter-card--basics .nf-chapter-card__icon       { background: var(--acc-yellow); color: var(--text); }
.nf-chapter-card--protocols .nf-chapter-card__icon    { background: var(--acc-cyan); color: var(--text); }
.nf-chapter-card--protocols .nf-chapter-card__label   { background: var(--acc-cyan); }
.nf-chapter-card--security .nf-chapter-card__icon     { background: var(--acc-red); color: var(--base); }
.nf-chapter-card--security .nf-chapter-card__label    { background: var(--acc-red); color: var(--base); }
.nf-chapter-card--cloud .nf-chapter-card__icon        { background: var(--acc-pink); color: var(--base); }
.nf-chapter-card--cloud .nf-chapter-card__label       { background: var(--acc-pink); color: var(--base); }
.nf-chapter-card--troubleshoot .nf-chapter-card__icon { background: var(--acc-lime); color: var(--text); }
.nf-chapter-card--troubleshoot .nf-chapter-card__label{ background: var(--acc-lime); }

@media (max-width: 980px) {
  .nf-chapters { grid-template-columns: 1fr 1fr; }
  .nf-chapter-card--hero { grid-row: auto; grid-column: span 2; min-height: 420px; }
}
@media (max-width: 640px) {
  .nf-chapters { grid-template-columns: 1fr; }
  .nf-chapter-card--hero { grid-column: auto; padding: 36px 24px; min-height: 320px; }
  .nf-chapter-card--hero .nf-chapter-card__title { font-size: 2.4rem; }
}

/* ===========================================================
   一般カード — brutal-box
   =========================================================== */
.nf-card {
  background: var(--base);
  border: 3px solid var(--text);
  padding: 32px 28px;
  margin-bottom: 24px;
  box-shadow: var(--bsh);
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.nf-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--bsh-lg);
}
.nf-card__sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  color: var(--text);
  letter-spacing: 0.22em;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: var(--acc-yellow);
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--text);
}
.nf-card__title {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.nf-card .nf-text {
  margin-bottom: 0;
  font-size: 0.96rem;
  line-height: 1.7;
  max-width: none;
}

.nf-card--cyan .nf-card__sub      { background: var(--acc-cyan); }
.nf-card--pink .nf-card__sub      { background: var(--acc-pink); color: var(--base); }
.nf-card--red .nf-card__sub       { background: var(--acc-red); color: var(--base); }
.nf-card--lime .nf-card__sub      { background: var(--acc-lime); }
.nf-card--dark { background: var(--bg-dark); color: var(--base); }
.nf-card--dark .nf-card__title    { color: var(--base); }
.nf-card--dark .nf-text           { color: rgba(250, 250, 249, 0.85); }
.nf-card--dark .nf-text b         { background: var(--acc-yellow); color: var(--text); }

/* ===========================================================
   汎用グリッド
   =========================================================== */
.nf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 40px 0;
}
.nf-grid--2 { grid-template-columns: repeat(2, 1fr); }
.nf-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .nf-grid--2, .nf-grid--3 { grid-template-columns: 1fr; }
}

/* ===========================================================
   サイドノート（しおり）— brutal
   =========================================================== */
.nf-aside {
  background: var(--acc-yellow);
  border: 3px solid var(--text);
  padding: 28px 32px;
  margin: 40px 0;
  position: relative;
  max-width: 920px;
  box-shadow: var(--bsh);
  transform: rotate(-0.5deg);
}
.nf-aside::before {
  content: 'NOTE';
  position: absolute;
  top: -16px;
  left: 24px;
  background: var(--text);
  color: var(--acc-yellow);
  padding: 4px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 800;
}
.nf-aside__name {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 14px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.nf-aside__desc {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.85;
  font-weight: 500;
}
.nf-aside__desc code {
  background: var(--text);
  color: var(--acc-yellow);
}
.nf-aside__desc b { color: var(--text); font-weight: 900; background: transparent; padding: 0; border-bottom: 3px solid var(--text); }

/* ===========================================================
   テーブル — brutal
   =========================================================== */
.nf-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--base);
  margin: 40px 0;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.94rem;
  border: 3px solid var(--text);
  box-shadow: var(--bsh);
}
.nf-table th {
  background: var(--text);
  color: var(--acc-yellow);
  font-weight: 800;
  padding: 16px 20px;
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}
.nf-table td {
  padding: 18px 20px;
  border-top: 2px solid var(--text);
  color: var(--text);
  vertical-align: top;
  line-height: 1.7;
  font-weight: 500;
}
.nf-table tr:hover td { background: var(--acc-yellow); }
.nf-table td code { background: var(--text); color: var(--acc-yellow); font-size: 0.88em; }
.nf-table td b { color: var(--text); font-weight: 900; background: var(--acc-yellow); padding: 1px 6px; }

/* ===========================================================
   コードブロック — terminal brutal
   =========================================================== */
.nf-pre {
  background: var(--bg-dark);
  color: var(--acc-lime);
  padding: 32px;
  font-family: "JetBrains Mono", "Menlo", monospace;
  font-size: 0.88rem;
  line-height: 1.85;
  overflow-x: auto;
  margin: 32px 0;
  position: relative;
  border: 3px solid var(--text);
  box-shadow: var(--bsh);
}
.nf-pre::before {
  content: '~/network-forest';
  display: block;
  background: var(--acc-lime);
  color: var(--text);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  padding: 4px 14px;
  margin: -32px -32px 20px;
  text-transform: uppercase;
  border-bottom: 3px solid var(--text);
}
.nf-pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border: none;
}

/* ===========================================================
   図解 — brutal box
   =========================================================== */
.nf-figure {
  margin: 56px 0;
  text-align: center;
}
.nf-figure__wrap {
  background: var(--base);
  border: 3px solid var(--text);
  padding: 50px 32px 32px;
  position: relative;
  box-shadow: var(--bsh);
}
.nf-figure__wrap::before {
  content: attr(data-fig);
  position: absolute;
  top: -3px;
  left: -3px;
  background: var(--text);
  color: var(--acc-yellow);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  padding: 6px 14px;
  text-transform: uppercase;
}
.nf-figure svg { max-width: 100%; height: auto; }
.nf-figure__caption {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.86rem;
  color: var(--text-sub);
  margin-top: 24px;
  font-weight: 500;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================================================
   罫線装飾 — stripe band
   =========================================================== */
.nf-rule {
  border: none;
  height: 30px;
  margin: 100px 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--text) 0 16px,
    var(--acc-yellow) 16px 32px
  );
  border-top: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  position: relative;
}

/* ===========================================================
   カラーバンド（黒セクション）
   =========================================================== */
.nf-band {
  background: var(--bg-dark);
  color: var(--base);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  border-top: 6px solid var(--acc-yellow);
  border-bottom: 6px solid var(--acc-yellow);
}
.nf-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 50% 60% at 85% 50%, rgba(239, 68, 68, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 15% 30%, rgba(6, 182, 212, 0.3) 0%, transparent 60%);
  pointer-events: none;
}
.nf-band__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.nf-band .nf-section-head__num {
  background: var(--acc-yellow);
  color: var(--text);
}
.nf-band .nf-section-head__title { color: var(--base); }
.nf-band .nf-section-head__title em { color: var(--acc-yellow); }
.nf-band .nf-section-head__sub { color: rgba(250, 250, 249, 0.75); }

/* ===========================================================
   章間ナビゲーション — brutal pager
   =========================================================== */
.nf-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 120px;
  border-top: 6px solid var(--text);
  padding-top: 32px;
}
.nf-pager__item {
  display: block;
  padding: 36px 40px;
  background: var(--base);
  border: 3px solid var(--text);
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, background .15s;
  position: relative;
  margin: 0;
  margin-left: -3px;
}
.nf-pager__item:first-child { margin-left: 0; }
.nf-pager__item:hover {
  background: var(--acc-yellow);
  transform: translate(-4px, -4px);
  box-shadow: var(--bsh-lg);
  z-index: 2;
}

.nf-pager__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text);
  letter-spacing: 0.24em;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: 800;
}
.nf-pager__title {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-weight: 900;
  color: var(--text);
  font-size: 1.6rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.nf-pager__item--prev { text-align: left; }
.nf-pager__item--next { text-align: right; }
@media (max-width: 640px) {
  .nf-pager { grid-template-columns: 1fr; }
  .nf-pager__item { margin-left: 0; margin-top: -3px; }
}

/* ===========================================================
   フッター — brutal black
   =========================================================== */
.nf-foot {
  background: var(--bg-dark);
  color: var(--base);
  padding: 120px 32px 80px;
  position: relative;
  z-index: 2;
  text-align: center;
  overflow: hidden;
  border-top: 6px solid var(--acc-yellow);
}
.nf-foot::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: repeating-linear-gradient(
    -45deg,
    var(--acc-yellow) 0 14px,
    var(--text) 14px 28px
  );
}
.nf-foot::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(239, 68, 68, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 40%, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.nf-foot > * { position: relative; z-index: 2; }
.nf-foot__quote {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--base);
  max-width: 16ch;
  margin: 40px auto 32px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.nf-foot__quote em {
  color: var(--text);
  background: var(--acc-yellow);
  font-style: normal;
  padding: 0 10px;
  display: inline-block;
  border: 3px solid var(--acc-yellow);
  transform: rotate(-2deg);
}
.nf-foot__brand {
  font-family: "Helvetica Neue", "Inter", "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--base);
  text-transform: uppercase;
}
.nf-foot__sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--acc-yellow);
  text-transform: uppercase;
  font-weight: 700;
}
.nf-foot__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--acc-yellow);
  text-decoration: none;
  padding: 16px 32px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 3px solid var(--acc-yellow);
  box-shadow: 6px 6px 0 var(--base);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.nf-foot__back:hover {
  background: var(--acc-red);
  border-color: var(--acc-red);
  color: var(--base);
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--base);
}
.nf-foot__copy {
  margin-top: 36px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: rgba(250, 250, 249, 0.5);
  letter-spacing: 0.14em;
}

/* ===========================================================
   追加カスタム：背景巨大テキスト・カウンター・バッジ・トレイル
   =========================================================== */

/* 背景の縦回転メガテキスト */
.nf-megatext {
  position: absolute;
  top: 50%;
  right: -120px;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
  font-family: "Helvetica Neue", "Inter", sans-serif;
  font-size: clamp(8rem, 18vw, 18rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(250, 250, 249, 0.08);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  user-select: none;
}
@media (max-width: 900px) {
  .nf-megatext { display: none; }
}

/* 数字カウンター行 */
.nf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 64px 0;
  border: 3px solid var(--text);
  background: var(--base);
  box-shadow: var(--bsh);
}
.nf-stats__item {
  padding: 32px 28px;
  border-right: 3px solid var(--text);
  background: var(--base);
  position: relative;
  transition: background .15s;
}
.nf-stats__item:last-child { border-right: none; }
.nf-stats__item:hover { background: var(--acc-yellow); }
.nf-stats__num {
  font-family: "Helvetica Neue", "Inter", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  display: block;
  margin-bottom: 8px;
}
.nf-stats__num em {
  color: var(--acc-red);
  font-style: normal;
}
.nf-stats__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-sub);
}
@media (max-width: 720px) {
  .nf-stats { grid-template-columns: 1fr 1fr; }
  .nf-stats__item:nth-child(2) { border-right: none; }
  .nf-stats__item:nth-child(1), .nf-stats__item:nth-child(2) { border-bottom: 3px solid var(--text); }
}

/* ステッカー / バッジ */
.nf-badge {
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--acc-red);
  color: var(--base);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Helvetica Neue", "Inter", sans-serif;
  font-weight: 900;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-transform: uppercase;
  border: 3px solid var(--text);
  box-shadow: var(--bsh-sm);
  z-index: 10;
  transform: rotate(-12deg);
  animation: badgeWobble 8s ease-in-out infinite;
}
.nf-badge--yellow { background: var(--acc-yellow); color: var(--text); }
.nf-badge--cyan { background: var(--acc-cyan); color: var(--text); }
.nf-badge--pink { background: var(--acc-pink); color: var(--base); }
@keyframes badgeWobble {
  0%, 100% { transform: rotate(-12deg); }
  50%      { transform: rotate(-8deg); }
}

/* ヒーロー右上の "FREE" ステッカー */
.nf-hero__sticker {
  position: absolute;
  top: 120px;
  right: 4%;
  z-index: 3;
}

/* スクロールヒント */
.nf-scroll-hint {
  position: absolute;
  bottom: 90px;
  left: 32px;
  z-index: 2;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  font-weight: 700;
  color: rgba(250, 250, 249, 0.6);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nf-scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: var(--acc-yellow);
  display: inline-block;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; opacity: 0.4; }
  50%      { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 720px) {
  .nf-scroll-hint { display: none; }
  .nf-hero__sticker { top: 80px; right: 16px; }
  .nf-badge { width: 90px; height: 90px; font-size: 0.7rem; }
}

/* セクションヘッダの装飾アスタリスク（回転） */
.nf-asterisk {
  display: inline-block;
  color: var(--acc-red);
  font-size: 1.2em;
  margin-left: 0.2em;
  animation: asterRot 6s linear infinite;
  transform-origin: center;
}
@keyframes asterRot {
  to { transform: rotate(360deg); }
}

/* hover 時の章カード背景巨大数字を pulse */
.nf-chapter-card:hover::before {
  opacity: 0.18;
  transform: scale(1.05);
}
.nf-chapter-card::before {
  transition: opacity .3s, transform .5s;
}

/* セクション間のスティッキータグ */
.nf-corner-tag {
  position: sticky;
  top: 80px;
  display: inline-block;
  padding: 6px 12px;
  background: var(--text);
  color: var(--acc-yellow);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  .nf-badge, .nf-asterisk, .nf-scroll-hint::after { animation: none; }
}

/* ===========================================================
   アニメーション on scroll
   =========================================================== */
.nf-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(.2,.8,.2,1),
              transform 1s cubic-bezier(.2,.8,.2,1);
}
.nf-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================
   reduce motion
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  .nf-fade { opacity: 1; transform: none; transition: none; }
  .nf-chapter-card:hover { transform: none; }
  .nf-card:hover { transform: none; }
  .nf-pager__item:hover { transform: none; }
  .nf-hero__cta:hover { transform: none; }
  .nf-aside, .nf-quote em, .nf-section-head__num { transform: none; }
}
