Apart from this add photos to the content provided. Add clinical pearls. Also add mechanism of nail change in disease especially psoriasis

Reading File
Reading File
Reading File
Running Command

cd /home/daytona/workspace && python3 -c " from pypdf import PdfReader reader = …

Finding Sources
Finding Sources
Reading File
Searching the Web

nail psoriasis mechanism pathophysiology IL-17 TNF enthesitis clinical photos 2024

Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/nails-pptx && ls /home/daytona/workspace/nails-…

Running Command

node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://upload.wik…

Running Command

curl -s --max-time 10 "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a…

Running Command

curl -s --max-time 10 "https://upload.wikimedia.org/wikipedia/commons/thumb/9/90…

Running Command

ls -la /home/daytona/workspace/nails-pptx/

Ready?

Running Command

ls /home/daytona/workspace/nails-pptx/ && ls /home/daytona/workspace/attachments…

Running Command

file /home/daytona/workspace/nails-pptx/nail_anatomy.png /home/daytona/workspace…

Running Command

# Try fetching actual medical images from open access sources cd /home/daytona/…

Running Command

python3 << 'EOF' from PIL import Image, ImageDraw, ImageFont import os out = "/…

Writing File

~/nails-pptx/build_nails.js

const pptxgen = require("pptxgenjs");
const fs = require("fs");
const path = require("path");

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 x 7.5 inches
pres.title = "Nail Anatomy & Disorders — Dermatology Resident Study";
pres.author = "Dermatology Study";

// ── COLOUR PALETTE ──────────────────────────────────────────
const C = {
  navy:    "1A2F5A",
  teal:    "1ABC9C",
  gold:    "F0A500",
  white:   "FFFFFF",
  light:   "F2F6FC",
  dark:    "1C2833",
  red:     "C0392B",
  purple:  "6C3483",
  green:   "1E8449",
  orange:  "A04000",
  gray:    "566573",
  lblue:   "2E86C1",
  pearl:   "FFF8E7",
};

// ── HELPER: image as base64 ──────────────────────────────────
function imgData(filename) {
  const p = path.join("/home/daytona/workspace/nails-pptx/", filename);
  if (!fs.existsSync(p)) return null;
  const buf = fs.readFileSync(p);
  const ext = path.extname(filename).slice(1).toLowerCase();
  const mime = ext === "jpg" || ext === "jpeg" ? "image/jpeg" : "image/png";
  return `${mime};base64,${buf.toString("base64")}`;
}

// ── HELPER: section header slide ────────────────────────────
function sectionSlide(title, subtitle, bgColor) {
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: bgColor || C.navy} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.15, h:7.5, fill:{color: C.teal} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: C.gold} });
  sl.addText(title, { x:0.5, y:2.5, w:12.3, h:1.2, fontSize:40, bold:true, color:C.white, align:"center" });
  if (subtitle) {
    sl.addText(subtitle, { x:0.5, y:3.9, w:12.3, h:0.8, fontSize:20, color:C.teal, align:"center", italic:true });
  }
  return sl;
}

// ── HELPER: content slide with image on right ───────────────
function contentSlide(opts) {
  // opts: {title, bullets, img, imgX, imgY, imgW, imgH, accentColor, pearl}
  const sl = pres.addSlide();
  const ac = opts.accentColor || C.navy;

  // background
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.light} });
  // top bar
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.75, fill:{color: ac} });
  // accent strip left
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0.75, w:0.08, h:6.75, fill:{color: C.gold} });
  // bottom bar
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: ac} });

  // title
  sl.addText(opts.title, {
    x:0.2, y:0.1, w:13, h:0.58,
    fontSize:22, bold:true, color:C.white, align:"left", valign:"middle", margin:6
  });

  // image
  if (opts.img) {
    const d = imgData(opts.img);
    if (d) {
      sl.addImage({
        data: d,
        x: opts.imgX || 7.8, y: opts.imgY || 0.85,
        w: opts.imgW || 5.2, h: opts.imgH || 5.5,
      });
      // image border
      sl.addShape(pres.shapes.RECTANGLE, {
        x: opts.imgX || 7.8, y: opts.imgY || 0.85,
        w: opts.imgW || 5.2, h: opts.imgH || 5.5,
        fill:{type:"none"}, line:{color: ac, width:1.5}
      });
    }
  }

  // bullets
  const bw = opts.img ? 7.4 : 12.8;
  if (opts.bullets && opts.bullets.length) {
    const items = opts.bullets.map(b => {
      if (b.type === "heading") {
        return [
          { text: b.text, options:{ bold:true, color: ac, fontSize:13, breakLine:true } }
        ];
      } else if (b.type === "sub") {
        return [
          { text: "    " + b.text, options:{ color: C.gray, fontSize:11, breakLine:true, indent:20 } }
        ];
      } else {
        return [
          { text: "• ", options:{ color: ac, bold:true, fontSize:12 } },
          { text: b.text, options:{ color: C.dark, fontSize:12, breakLine:true } }
        ];
      }
    }).flat();
    sl.addText(items, {
      x:0.25, y:0.88, w:bw, h:6.1,
      fontSize:12, fontFace:"Calibri", valign:"top", margin:8,
      wrap:true
    });
  }

  // clinical pearl box
  if (opts.pearl) {
    const py = opts.pearlY || 6.15;
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x:0.25, y:py, w:bw, h:1.0,
      fill:{color: C.pearl}, line:{color: C.gold, width:1.5}, rectRadius:0.08,
      shadow:{type:"outer", color:"000000", blur:4, offset:2, angle:135, opacity:0.1}
    });
    sl.addText([
      { text:"💎 Clinical Pearl: ", options:{bold:true, color: C.orange, fontSize:11} },
      { text: opts.pearl, options:{color: C.dark, fontSize:11} }
    ], { x:0.4, y:py+0.05, w:bw-0.3, h:0.9, valign:"middle", wrap:true });
  }

  return sl;
}

// ── HELPER: two-column content slide ────────────────────────
function twoColSlide(opts) {
  const sl = pres.addSlide();
  const ac = opts.accentColor || C.navy;
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.light} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.75, fill:{color: ac} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0.75, w:0.08, h:6.75, fill:{color: C.gold} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: ac} });
  sl.addText(opts.title, { x:0.2, y:0.1, w:13, h:0.58, fontSize:22, bold:true, color:C.white, align:"left", valign:"middle", margin:6 });

  // col divider
  sl.addShape(pres.shapes.LINE, { x:6.75, y:0.9, w:0, h:6.2, line:{color:ac, width:1, dashType:"dash"} });

  // left col
  if (opts.left && opts.left.length) {
    const items = opts.left.map(b => {
      if (b.type==="heading") return [{text:b.text, options:{bold:true, color:ac, fontSize:13, breakLine:true}}];
      if (b.type==="sub") return [{text:"    "+b.text, options:{color:C.gray, fontSize:11, breakLine:true}}];
      return [{text:"• ", options:{color:ac, bold:true, fontSize:12}},{text:b.text, options:{color:C.dark, fontSize:12, breakLine:true}}];
    }).flat();
    sl.addText(items, { x:0.25, y:0.9, w:6.3, h:6.0, fontSize:12, fontFace:"Calibri", valign:"top", margin:8, wrap:true });
  }
  // right col
  if (opts.right && opts.right.length) {
    const items = opts.right.map(b => {
      if (b.type==="heading") return [{text:b.text, options:{bold:true, color:ac, fontSize:13, breakLine:true}}];
      if (b.type==="sub") return [{text:"    "+b.text, options:{color:C.gray, fontSize:11, breakLine:true}}];
      return [{text:"• ", options:{color:ac, bold:true, fontSize:12}},{text:b.text, options:{color:C.dark, fontSize:12, breakLine:true}}];
    }).flat();
    sl.addText(items, { x:6.9, y:0.9, w:6.2, h:6.0, fontSize:12, fontFace:"Calibri", valign:"top", margin:8, wrap:true });
  }
  return sl;
}

// ── HELPER: full-image diagram slide ─────────────────────────
function diagramSlide(title, imgFile, caption, accentColor) {
  const sl = pres.addSlide();
  const ac = accentColor || C.navy;
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.dark} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.7, fill:{color: ac} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: C.gold} });
  sl.addText(title, { x:0.2, y:0.1, w:13, h:0.55, fontSize:20, bold:true, color:C.white, align:"center", valign:"middle", margin:4 });
  const d = imgData(imgFile);
  if (d) {
    sl.addImage({ data:d, x:0.5, y:0.8, w:12.3, h:6.15 });
  }
  if (caption) {
    sl.addText(caption, { x:0.5, y:7.05, w:12.3, h:0.4, fontSize:10, color:C.teal, align:"center", italic:true });
  }
  return sl;
}

// ── HELPER: mechanism flow slide ─────────────────────────────
function mechanismSlide() {
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color:"1C1C2E"} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.7, fill:{color: C.purple} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: C.gold} });
  sl.addText("MECHANISM OF NAIL CHANGES IN PSORIASIS", {
    x:0.2, y:0.1, w:13, h:0.55, fontSize:21, bold:true, color:C.white, align:"center", valign:"middle"
  });

  const steps = [
    { x:0.3,  y:0.85, w:3.7, h:1.2, bg:"6C3483", text:"① TRIGGER\nGenetic susceptibility\n(HLA-Cw6 NEGATIVE)\n+ Microtrauma / Koebner" },
    { x:4.5,  y:0.85, w:3.7, h:1.2, bg:"1A5276", text:"② DC ACTIVATION\nmDC release IL-23\nStressed keratinocytes\nrelease LL-37, hβD-2/3" },
    { x:8.7,  y:0.85, w:4.3, h:1.2, bg:"1E8449", text:"③ Th17 DIFFERENTIATION\nIL-17A, IL-17F, IL-22\nTNF-α, NF-κB activation\nMast cell recruitment" },
    { x:0.3,  y:2.4,  w:3.7, h:1.3, bg:"B7950B", text:"④ MATRIX INFLAMMATION\nParakeratosis in\nproximal matrix\n→ PITTING" },
    { x:4.5,  y:2.4,  w:3.7, h:1.3, bg:"922B21", text:"⑤ NAIL BED PSORIASIS\nPsoriasiform hyperplasia\nMicrovascular changes\n→ OIL-SPOT / ONYCHOLYSIS" },
    { x:8.7,  y:2.4,  w:4.3, h:1.3, bg:"1F618D", text:"⑥ ENTHESITIS @ DIP\nCytokine spread to\nsynovio-entheseal complex\n→ PSORIATIC ARTHRITIS risk" },
  ];

  steps.forEach(s => {
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x:s.x, y:s.y, w:s.w, h:s.h,
      fill:{color:s.bg}, line:{color:C.gold, width:1}, rectRadius:0.1,
      shadow:{type:"outer",color:"000000",blur:8,offset:3,angle:135,opacity:0.3}
    });
    sl.addText(s.text, {
      x:s.x+0.1, y:s.y+0.05, w:s.w-0.2, h:s.h-0.1,
      fontSize:11, bold:false, color:C.white, align:"center", valign:"middle", wrap:true, margin:4
    });
  });

  // Arrows between boxes (row 1)
  [[4.0,1.45,0.4,0.15],[8.2,1.45,0.4,0.15]].forEach(([x,y,w,h])=>{
    sl.addShape(pres.shapes.RIGHT_ARROW, {x,y,w,h,fill:{color:C.gold},line:{color:C.gold}});
  });

  // summary box
  sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x:0.3, y:4.05, w:12.7, h:1.3,
    fill:{color:"2D2D4E"}, line:{color:C.teal, width:1.5}, rectRadius:0.12
  });
  sl.addText([
    {text:"KEY CYTOKINE AXIS: ", options:{bold:true, color:C.gold, fontSize:13}},
    {text:"IL-23 → Th17 → IL-17A/F + TNF-α → Nail matrix & nail bed inflammation\n", options:{color:C.white, fontSize:12}},
    {text:"VEGF ↑ ", options:{bold:true, color:C.teal, fontSize:12}},
    {text:"→ dilated tortuous capillaries (onychoscopy finding: 90%)\n", options:{color:"#BBBBBB", fontSize:12}},
    {text:"Onychodermal band breach ", options:{bold:true, color:C.gold, fontSize:12}},
    {text:"→ progressive onycholysis (difficult to reverse)", options:{color:"#BBBBBB", fontSize:12}},
  ], {x:0.5, y:4.1, w:12.3, h:1.2, valign:"middle", wrap:true, margin:6});

  // nail changes legend
  sl.addShape(pres.shapes.RECTANGLE, {x:0.3, y:5.55, w:12.7, h:1.55, fill:{color:"252540"}, line:{color:C.purple, width:1}});
  sl.addText("ZAIAS CLASSIFICATION — Nail Changes by Site", {
    x:0.4, y:5.58, w:12.5, h:0.35, fontSize:12, bold:true, color:C.gold, align:"center"
  });
  const zaias = [
    ["PROXIMAL MATRIX","Pitting (parakeratosis foci)\nTransverse furrows\nLeukonychia (rough surface)"],
    ["DISTAL MATRIX / LUNULA","Red spots in lunula\nFocal onycholysis\nErythema of lunula"],
    ["NAIL BED","Salmon/oil-drop patch\nSubungual hyperkeratosis\nSplinter haemorrhages\nOnycholysis (irregular margin)"],
    ["NAIL FOLD","Periungual psoriasis\nCutaneous psoriasis\n(PsA association ↑↑)"],
  ];
  const cols = [0.4, 3.7, 7.0, 10.3];
  zaias.forEach((z,i) => {
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x:cols[i], y:5.98, w:3.1, h:1.0,
      fill:{color:"3A3A5E"}, line:{color:C.teal, width:0.8}, rectRadius:0.07
    });
    sl.addText([
      {text:z[0]+"\n", options:{bold:true, color:C.teal, fontSize:9}},
      {text:z[1], options:{color:C.white, fontSize:9}}
    ], {x:cols[i]+0.05, y:5.99, w:3.0, h:0.95, valign:"top", wrap:true, margin:3});
  });

  return sl;
}

// ── HELPER: quiz slide ───────────────────────────────────────
function quizSlide(qas, title, accentColor) {
  const sl = pres.addSlide();
  const ac = accentColor || C.navy;
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.light} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.7, fill:{color: ac} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: C.gold} });
  sl.addText(title, { x:0.2, y:0.1, w:13, h:0.55, fontSize:20, bold:true, color:C.white, align:"center", valign:"middle" });

  // table header
  sl.addShape(pres.shapes.RECTANGLE, {x:0.3, y:0.78, w:12.7, h:0.4, fill:{color:ac}});
  sl.addText("QUESTION", {x:0.35, y:0.78, w:7.5, h:0.4, fontSize:11, bold:true, color:C.white, valign:"middle"});
  sl.addText("ANSWER", {x:8.0, y:0.78, w:4.8, h:0.4, fontSize:11, bold:true, color:C.white, valign:"middle"});

  qas.forEach((qa, i) => {
    const yy = 1.22 + i * 0.78;
    const bg = i % 2 === 0 ? "FFFFFF" : "EBF5FB";
    sl.addShape(pres.shapes.RECTANGLE, {x:0.3, y:yy, w:12.7, h:0.75, fill:{color:bg}});
    sl.addShape(pres.shapes.LINE, {x:0.3, y:yy+0.75, w:12.7, h:0, line:{color:"CCCCCC", width:0.5}});
    sl.addShape(pres.shapes.LINE, {x:8.0, y:yy, w:0, h:0.75, line:{color:"CCCCCC", width:0.5}});
    sl.addText(qa[0], {x:0.4, y:yy+0.05, w:7.5, h:0.65, fontSize:10, color:C.dark, valign:"middle", wrap:true});
    sl.addText(qa[1], {x:8.1, y:yy+0.05, w:4.8, h:0.65, fontSize:10, color:ac, bold:true, valign:"middle", wrap:true});
  });
  return sl;
}

// ────────────────────────────────────────────────────────────
//  BUILD ALL SLIDES
// ────────────────────────────────────────────────────────────

// ── TITLE SLIDE ──────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.navy} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:5.8, w:13.3, h:1.7, fill:{color:"0F1F3D"} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.25, h:7.5, fill:{color: C.teal} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:5.6, w:13.3, h:0.12, fill:{color: C.gold} });
  sl.addText("NAIL ANATOMY & DISORDERS", {
    x:0.5, y:1.2, w:12.3, h:1.2, fontSize:44, bold:true, color:C.white, align:"center",
    shadow:{type:"outer", color:"000000", blur:8, offset:3, angle:135, opacity:0.4}
  });
  sl.addText("Dermatology Resident Study Note", {
    x:0.5, y:2.6, w:12.3, h:0.7, fontSize:24, color:C.teal, align:"center", italic:true
  });
  sl.addText("Nail Unit • Nail Signs • Psoriasis • Onychomycosis • Lichen Planus • Tumours • Clinical Pearls", {
    x:0.5, y:3.4, w:12.3, h:0.55, fontSize:14, color:"AABBCC", align:"center"
  });
  sl.addText([
    {text:"Sources: ", options:{bold:true, color:C.gold, fontSize:12}},
    {text:"Rook's Dermatology Ch.93 • Fitzpatrick's Ch.91 • Bolivnia 5e • Andrews' Ch.33 • JAAD 2024/2025", options:{color:"AABBCC", fontSize:12}}
  ], { x:0.5, y:6.05, w:12.3, h:0.5, align:"center" });
  sl.addText("With Enhanced Clinical Pearls • Mechanism of Nail Changes • Psoriasis Pathway", {
    x:0.5, y:6.65, w:12.3, h:0.45, fontSize:11, color:C.teal, align:"center", italic:true
  });
}

// ── SECTION 1 HEADER ────────────────────────────────────────
sectionSlide("PART 1 — ANATOMY OF THE NAIL UNIT", "Gross anatomy • Microscopy • Blood supply • Growth • Immunology", C.navy);

// ── ANATOMY OVERVIEW ─────────────────────────────────────────
contentSlide({
  title: "1.1 — NAIL UNIT COMPONENTS",
  img: "img_anatomy.png", imgX:7.5, imgY:0.85, imgW:5.5, imgH:5.5,
  accentColor: C.navy,
  bullets: [
    {type:"heading", text:"NAIL PLATE"},
    {text:"Trilaminar: dorsal (from ventral PNF), intermediate (germinal matrix), ventral (nail bed ~21%)"},
    {text:"Hard hair-type keratins in sulfur-rich proteins (high cysteine, glycine, tyrosine)"},
    {type:"heading", text:"NAIL MATRIX (Germinal)"},
    {text:"Proximal matrix → dorsal 80% of nail plate"},
    {text:"Distal matrix (lunula) → ventral 20% of nail plate"},
    {text:"Keratinization along oblique upward-distal axis"},
    {type:"heading", text:"NAIL BED (Sterile Matrix)"},
    {text:"Epidermis 2-3 cells thick, NO granular layer in health"},
    {text:"Granular layer = PATHOLOGICAL (psoriasis, onychomycosis)"},
    {text:"Collagen tightly apposed to periosteum → rapid osteomyelitis risk"},
    {type:"heading", text:"HYPONYCHIUM & ONYCHODERMAL BAND"},
    {text:"Onychodermal band = nail isthmus = most distal nail-bed attachment"},
    {text:"Breach → progressive onycholysis (difficult to reverse)"},
  ],
  pearl: "No granular layer in healthy nail bed. Its appearance signals disease — think psoriasis or onychomycosis when you see parakeratosis on biopsy."
});

// ── KERATINS + GROWTH ────────────────────────────────────────
twoColSlide({
  title: "1.2 — NAIL KERATINS, GROWTH RATES & IMMUNOLOGY",
  accentColor: C.lblue,
  left: [
    {type:"heading", text:"KERATINS"},
    {text:"K5/K14 — basal layer of nail matrix AND nail bed"},
    {text:"K1/K10 — suprabasal nail matrix (absent in HEALTHY nail bed)"},
    {text:"K1/K10 in nail bed = pathological → psoriasis, onychomycosis"},
    {text:"K6/K16 — various subungual locations (development)"},
    {type:"heading", text:"GROWTH RATES"},
    {text:"Fingernails: ~3 mm/month"},
    {text:"Toenails: ~1 mm/month"},
    {type:"heading", text:"FACTORS — FASTER GROWTH"},
    {text:"Daytime, youth, dominant hand, summer, male sex"},
    {text:"Psoriasis, pityriasis rubra pilaris, hyperthyroidism, HIV"},
    {text:"Drugs: levodopa, itraconazole"},
    {type:"heading", text:"FACTORS — SLOWER GROWTH"},
    {text:"Beau lines, yellow nail syndrome, hypothyroidism"},
    {text:"Drugs: methotrexate, azathioprine, targeted therapies"},
  ],
  right: [
    {type:"heading", text:"IMMUNOLOGY OF THE NAIL"},
    {text:"Nail matrix has IMMUNE PRIVILEGE (like hair matrix, eye, testis)"},
    {text:"MHC class I restricted → protects from autoimmune T-cell attack"},
    {text:"Contains LL-37 (kills Candida albicans)"},
    {text:"hβD-2 and hβD-3 (beta-defensins) in matrix"},
    {type:"heading", text:"SIGNALLING PATHWAYS"},
    {text:"Wnt/β-catenin crucial in nail embryogenesis & maintenance"},
    {text:"R-spondin 4 mutations → autosomal recessive anonychia"},
    {text:"Frizzled-6 (Wnt receptor) mutations → inherited nail dysplasia"},
    {text:"BMPs work with Wnt signalling"},
    {type:"heading", text:"BLOOD SUPPLY"},
    {text:"Paired digital arteries (large palmar + small dorsal)"},
    {text:"Glomus bodies (Masson) → regulate capillary circulation"},
    {text:"Glomus bodies DILATE with cold (opposite of arterioles)"},
    {text:"Superficial arcade: supplies nail fold, extensor tendon, matrix"},
  ]
});

// ── SECTION 2 HEADER ────────────────────────────────────────
sectionSlide("PART 2 — NAIL SIGNS & THEIR SIGNIFICANCE", "Shape • Attachment • Surface • Colour • Systemic associations", "0B3D6B");

// ── SHAPE ABNORMALITIES ──────────────────────────────────────
contentSlide({
  title: "2.1 — ABNORMALITIES OF SHAPE: CLUBBING & KOILONYCHIA",
  img: "img_clubbing.png", imgX:7.6, imgY:0.85, imgW:5.4, imgH:5.2,
  accentColor: C.lblue,
  bullets: [
    {type:"heading", text:"CLUBBING (Hippocratic fingers / Acropachy)"},
    {text:"Lovibond angle > 180° (normally < 160°)"},
    {text:"Schamroth window OBLITERATED (normally open diamond)"},
    {text:"Curth angle (DIP joint) < 160°"},
    {text:"Mechanism: ↑VEGF → nail bed angiogenesis + vasodilation"},
    {text:"HPGD / SLCO2A1 mutations → pachydermoperiostosis (primary)"},
    {type:"heading", text:"CAUSES — Secondary Clubbing"},
    {text:"Respiratory: lung Ca, mesothelioma, CF, cryptogenic FA, sarcoid"},
    {text:"Cardiac: cyanotic CHD, infective endocarditis"},
    {text:"GI: IBD, liver disease, oesophageal Ca"},
    {text:"HIV (37%), POEMS syndrome (70%)"},
    {type:"heading", text:"KOILONYCHIA (Spoon nail)"},
    {text:"Concave, spoon-shaped nail plate"},
    {text:"Most common: iron deficiency anaemia, haemochromatosis"},
    {text:"Also: trichothiodystrophy, familial (AD)"},
    {text:"Secondary: psoriasis, LP, dermatophyte infection"},
  ],
  pearl: "Schamroth window test: oppose dorsal surfaces of two homologous fingers. Normal = diamond window. Clubbing = obliteration. Quick bedside sign."
});

// ── ONYCHOLYSIS + PTERYGIUM ───────────────────────────────────
contentSlide({
  title: "2.2 — ONYCHOLYSIS & PTERYGIUM",
  accentColor: C.red,
  bullets: [
    {type:"heading", text:"ONYCHOLYSIS — Separation from nail bed (distal → proximal)"},
    {text:"Detached plate looks WHITE (apparent leukonychia — air underneath)"},
    {text:"Green = Pseudomonas aeruginosa (pyocyanin pigment = chloronychia)"},
    {type:"heading", text:"Dermoscopic Types (4)"},
    {text:"1. Post-traumatic: regular margin, usually lateral"},
    {text:"2. Psoriatic: IRREGULAR margin, whole free edge, erythematous border"},
    {text:"3. Onychomycosis: ragged/spike edge, mycelium visible proximally"},
    {text:"4. Drug-induced: uniform pattern in midline (photo-onycholysis)"},
    {type:"heading", text:"Key Causes"},
    {text:"Psoriasis (30% of psoriatics), fungal, trauma, photo-onycholysis"},
    {text:"Drugs: doxycycline, psoralens, 5-FU, captopril, retinoids"},
    {text:"Systemic: hypothyroidism, hyperthyroidism, yellow nail syndrome"},
    {type:"heading", text:"PTERYGIUM (Dorsal — True)"},
    {text:"Fibrotic band from PNF divides nail in TWO"},
    {text:"Cause: LICHEN PLANUS (most common), trauma, GVHD, leprosy"},
    {type:"heading", text:"PTERYGIUM INVERSUM UNGUIS (Ventral)"},
    {text:"Forward extension of nail bed epithelium"},
    {text:"Causes: systemic sclerosis, Raynaud, SLE, familial, trauma"},
  ],
  pearl: "The onychodermal band is the 'Achilles heel' of nail attachment. Once breached by psoriasis or trauma, onycholysis becomes progressive. Clip, dry, and apply topical antiseptics."
});

// ── SURFACE CHANGES ──────────────────────────────────────────
twoColSlide({
  title: "2.3 — NAIL SURFACE CHANGES",
  accentColor: C.green,
  left: [
    {type:"heading", text:"BEAU LINES (Transverse Grooves)"},
    {text:"Transverse depressions = temporary arrest of proximal matrix mitosis"},
    {text:"Depth = severity of damage; Width = duration of insult"},
    {text:"Migrate distally as nail grows"},
    {text:"All 20 nails simultaneously = SYSTEMIC cause"},
    {text:"1-2 nails only = local trauma / paronychia"},
    {text:"Beau lines → Onychomadesis when full thickness groove"},
    {type:"heading", text:"PITTING"},
    {text:"Shallow depressions from parakeratosis foci in proximal matrix"},
    {text:"Fine pits (<1mm): PSORIASIS (most common)"},
    {text:">10 pits/nail OR >60 pits total supports psoriasis diagnosis"},
    {text:"Coarse pits: ECZEMA"},
    {text:"Geometric/uniform 'Scotch plaid' pattern: ALOPECIA AREATA"},
    {text:"Elkonyxis = deep single large pit (reactive arthritis, psoriasis)"},
    {type:"heading", text:"TRACHYONYCHIA (Twenty-nail dystrophy)"},
    {text:"Rough sandpaper-like opaque surface; all 20 nails"},
    {text:"Associations: alopecia areata (most common), psoriasis, LP, eczema"},
  ],
  right: [
    {type:"heading", text:"ONYCHOSCHIZIA (Lamellar Dystrophy)"},
    {text:"Distal horizontal lamellar splitting"},
    {text:"Causes: repeated wet-dry cycles, chemical exposure"},
    {text:"Common with aging; NOT a sign of systemic disease"},
    {type:"heading", text:"LONGITUDINAL RIDGING / BEADING"},
    {text:"Normal aging change; NOT clinically significant alone"},
    {type:"heading", text:"MEDIAN CANALIFORM DYSTROPHY OF HELLER"},
    {text:"Midline fir-tree groove; thumbs most commonly"},
    {text:"Distinct from habit-tic (washboard nails — disturbed cuticle)"},
    {text:"Often self-resolving"},
    {type:"heading", text:"PINCER NAIL (Trumpet nail)"},
    {text:"Transverse overcurvature increasing toward distal tip"},
    {text:"3 patterns: psoriasis (thumbs/big toes), inherited, isolated"},
    {text:"Treatment: braces, partial matricectomy, Z-plasty"},
    {type:"heading", text:"PACHYONYCHIA"},
    {text:"Thickened plate, yellow, horseshoe free edge, extreme hardness"},
    {text:"Jadassohn-Lewandowsky syndrome (pachyonychia congenita)"},
    {text:"Acquired: psoriasis, PRP, chronic eczema, onychomycosis"},
  ]
});

// ── COLOUR CHANGES ───────────────────────────────────────────
contentSlide({
  title: "2.4 — NAIL COLOUR CHANGES (CHROMONYCHIA)",
  accentColor: C.purple,
  bullets: [
    {type:"heading", text:"LEUKONYCHIA"},
    {text:"True leukonychia (nail plate): parakeratosis in plate; Mees' lines = arsenic / systemic insult"},
    {text:"Apparent leukonychia (nail BED — disappear with pressure):"},
    {text:"  → Muehrcke's lines (paired transverse bands) = hypoalbuminaemia"},
    {text:"  → Terry's nails (white proximally, normal 1-2mm distally) = hepatic cirrhosis"},
    {text:"  → Half-and-half / Lindsay's nails (white proximal, red-brown distal) = chronic renal failure"},
    {text:"  → Azure lunula = Wilson's disease / argyria"},
    {type:"heading", text:"MELANONYCHIA"},
    {text:"Brown/black: nail matrix melanocytes, subungual haematoma"},
    {text:"ABCDEF rule for nail melanoma:"},
    {text:"  A = Age (40-70), African/Asian/Native American; B = Brown/Black >3mm, Blurred borders"},
    {text:"  C = Change in morphology; D = Digit (thumb > hallux > index)"},
    {text:"  E = Extension to nail fold (Hutchinson's sign); F = Family/personal Hx melanoma"},
    {type:"heading", text:"OTHER COLOURS"},
    {text:"Yellow: yellow nail syndrome, psoriasis (subungual hyperkeratosis), fungal"},
    {text:"Green: Pseudomonas aeruginosa (chloronychia)"},
    {text:"Red lunula: psoriasis, CO poisoning, cardiac failure, alopecia areata"},
    {text:"Splinter haemorrhages: psoriasis, endocarditis, vasculitis, trauma"},
  ],
  pearl: "Pseudo-Hutchinson's sign = apparent periungual pigmentation through a TRANSPARENT cuticle (racial melanonychia, benign nevi). Real Hutchinson's = actual melanin in nail fold skin. Dermoscopy distinguishes both."
});

// ── SYSTEMIC NAIL SIGNS ──────────────────────────────────────
diagramSlide(
  "2.5 — NAIL SIGNS IN SYSTEMIC DISEASE (Quick Reference)",
  "img_systemic.png",
  "Source: Rook's Ch.93, Bolivnia 5e, Fitzpatrick's Ch.91, Andrews' Ch.33",
  C.purple
);

// ── SECTION 3 HEADER ────────────────────────────────────────
sectionSlide("PART 3 — NAIL DISORDERS", "Psoriasis • Lichen Planus • Onychomycosis • Paronychia • Darier Disease • Eczema • Yellow Nail • Tumours", C.red);

// ── NAIL PSORIASIS CLINICAL ──────────────────────────────────
contentSlide({
  title: "3.1a — NAIL PSORIASIS — EPIDEMIOLOGY & CLINICAL FEATURES",
  img: "img_psoriasis_clinical.png", imgX:7.5, imgY:0.85, imgW:5.5, imgH:5.0,
  accentColor: C.red,
  bullets: [
    {type:"heading", text:"EPIDEMIOLOGY"},
    {text:">50% prevalence in plaque psoriasis; 80-90% lifetime incidence"},
    {text:"5-10% have nail psoriasis WITHOUT skin/joint disease"},
    {text:"Annual PsA risk with nail involvement: 0.55-2.55%"},
    {text:"HLA: Cw6 NEGATIVE (cutaneous psoriasis is HLA-Cw6 positive)"},
    {type:"heading", text:"MATRIX SIGNS"},
    {text:"Pitting — proximal matrix parakeratosis (most common, fine pits)"},
    {text:"Transverse furrows — proximal matrix extension"},
    {text:"Crumbling nail — entire matrix; prolonged disease"},
    {text:"Leukonychia with rough surface"},
    {type:"heading", text:"NAIL BED SIGNS"},
    {text:"Salmon / Oil-drop patch — NEARLY PATHOGNOMONIC (yellow-red translucent zone)"},
    {text:"Onycholysis — irregular margin involving whole free edge; erythematous border"},
    {text:"Subungual hyperkeratosis — prolonged; hard keratinous material"},
    {text:"Splinter haemorrhages — short episodes; capillary rupture"},
    {text:"Yellow-green discolouration — secondary yeast / Pseudomonas"},
  ],
  pearl: "Salmon patch (oil-drop sign) = nearly pathognomonic for psoriasis. Unlike pitting (also in AA, eczema), an oil-spot is nearly exclusive to psoriasis. Confirm with onychoscopy: dilated tortuous capillaries (90%)."
});

// ── PSORIASIS MECHANISM SLIDE ────────────────────────────────
mechanismSlide();

// ── PSORIASIS TREATMENT ──────────────────────────────────────
contentSlide({
  title: "3.1b — NAIL PSORIASIS — TREATMENT ALGORITHM",
  accentColor: C.red,
  bullets: [
    {type:"heading", text:"≤3 NAILS — MATRIX INVOLVEMENT"},
    {text:"1st line: Intralesional triamcinolone acetonide (after digital nerve block)"},
    {text:"2nd line: Topical vitamin D analogue (calcipotriol) ± topical steroid"},
    {type:"heading", text:"≤3 NAILS — NAIL BED INVOLVEMENT"},
    {text:"1st line: Topical steroids OR topical vitamin D analogue"},
    {type:"heading", text:"> 3 NAILS INVOLVED"},
    {text:"Intralesional steroids ± topical vitamin D + steroids — 1st line"},
    {text:"SYSTEMIC: Methotrexate (≤15mg/week), Ciclosporin (3-5mg/kg short-term)"},
    {text:"Acitretin (0.2-0.4 mg/kg × 6 months)"},
    {type:"heading", text:"BIOLOGICS"},
    {text:"Adalimumab — ONLY FDA-approved specifically for nail psoriasis"},
    {text:"IL-17i: Secukinumab, Ixekizumab, Brodalumab — excellent nail clearance"},
    {text:"IL-23i: Risankizumab, Guselkumab, Ustekinumab"},
    {text:"Anti-TNF: Infliximab, Etanercept, Certolizumab, Golimumab"},
    {type:"heading", text:"SMALL MOLECULES"},
    {text:"Apremilast (PDE4 inhibitor) — especially for mild-moderate nail psoriasis"},
    {text:"Tofacitinib (JAK inhibitor) — emerging evidence"},
    {type:"heading", text:"SCORING: NAPSI"},
    {text:"0-8 per nail (matrix 0-4 + nail bed 0-4); total max = 160 (all 20 nails)"},
  ],
  pearl: "Nail psoriasis is HLA-Cw6 NEGATIVE — the opposite of cutaneous plaque psoriasis. This genetically distinct subset has stronger PsA association. Always screen for joint disease."
});

// ── LICHEN PLANUS ────────────────────────────────────────────
contentSlide({
  title: "3.2 — LICHEN PLANUS OF THE NAILS",
  img: "img_lichen_planus.png", imgX:7.6, imgY:0.85, imgW:5.4, imgH:5.2,
  accentColor: C.gold,
  bullets: [
    {type:"heading", text:"EPIDEMIOLOGY & FEATURES"},
    {text:"5-10% of LP patients; 5th-6th decade; may precede skin LP"},
    {type:"heading", text:"CLINICAL SIGNS"},
    {text:"Dorsal pterygium — MOST CHARACTERISTIC; fibrotic PNF-matrix fusion"},
    {text:"Onychorrhexis — irregular longitudinal ridging and grooving"},
    {text:"Thinning of nail plate → atrophy → nail shedding"},
    {text:"Trachyonychia — 20-nail dystrophy (shiny variant)"},
    {text:"Erythronychia — red longitudinal streaks"},
    {text:"Subungual hyperpigmentation and keratosis"},
    {text:"Idiopathic atrophy of nails = most severe variant (rapid irreversible destruction)"},
    {type:"heading", text:"HISTOLOGY"},
    {text:"Interface dermatitis with band-like lymphocytic infiltrate"},
    {text:"Basal cell liquefaction (identical to cutaneous LP)"},
    {type:"heading", text:"TREATMENT"},
    {text:"Intralesional triamcinolone acetonide (digital nerve block first)"},
    {text:"Oral prednisone 0.5-1 mg/kg × 3 weeks"},
    {text:"IM triamcinolone 0.5-1mg/kg/month × 3-6 months (children)"},
    {text:"Combination: oral retinoids + topical steroids"},
  ],
  pearl: "Dorsal pterygium = lichen planus until proven otherwise. It is irreversible scarring — early aggressive treatment is necessary. LP pterygium splits the nail; psoriasis does NOT cause pterygium."
});

// ── ONYCHOMYCOSIS ────────────────────────────────────────────
contentSlide({
  title: "3.3 — ONYCHOMYCOSIS — CLASSIFICATION & TREATMENT",
  img: "img_onychomycosis.png", imgX:7.6, imgY:0.85, imgW:5.4, imgH:5.2,
  accentColor: C.green,
  bullets: [
    {type:"heading", text:"TYPES & ORGANISMS"},
    {text:"DLSO (most common): T. rubrum (70-80%) — free edge/lateral; hyperkeratosis"},
    {text:"PSO (proximal subungual): T. rubrum — lunula leukonychia — HIV!"},
    {text:"SWO (superficial white): T. interdigitale, moulds — dorsal powdery"},
    {text:"Endonyx: T. soudanense/violaceum — milky white, no hyperkeratosis"},
    {text:"Candida (CDLSO): chronic mucocutaneous candidiasis"},
    {type:"heading", text:"DIFFERENTIAL FROM PSORIASIS"},
    {text:"Onychomycosis: KOH = filaments; ragged/spike dermoscopy edge"},
    {text:"Psoriasis: fine pitting, salmon patch, KOH usually negative"},
    {text:"Up to 20% of psoriatics also have co-infection — treat both!"},
    {type:"heading", text:"DIAGNOSIS"},
    {text:"KOH direct microscopy; Fungal culture (gold standard)"},
    {text:"PAS histology of nail clippings; PCR (faster, more sensitive)"},
    {type:"heading", text:"TREATMENT"},
    {text:"Terbinafine oral 250mg/day × 6 wks (fingernails), 12 wks (toenails)"},
    {text:"Itraconazole: 200mg/day continuous OR pulse (400mg/day × 1 wk/month)"},
    {text:"Topical: ciclopirox 8%, efinaconazole, tavaborole (adjunct)"},
  ],
  pearl: "PSO (proximal subungual onychomycosis) in a young patient = HIV testing MANDATORY. PSO entering via the nail fold is rare in immunocompetent patients. Always get KOH/culture before treating — misdiagnosis rate is high."
});

// ── PARONYCHIA ───────────────────────────────────────────────
twoColSlide({
  title: "3.4 — PARONYCHIA (Acute & Chronic)",
  accentColor: C.orange,
  left: [
    {type:"heading", text:"ACUTE PARONYCHIA"},
    {text:"Rapid onset pain, swelling, erythema of nail folds"},
    {text:"Most common cause: Staphylococcus aureus"},
    {text:"Also: Streptococcus, herpes simplex (herpetic whitlow), orf"},
    {text:"Neutropenic patients: Fusarium, Aspergillus"},
    {text:"3× more common in females; index finger + thumb most common"},
    {type:"heading", text:"TREATMENT — Acute"},
    {text:"Superficial abscess: drain with pointed scalpel (no anaesthesia)"},
    {text:"Deep: penicillinase-resistant antibiotic + surgery if no response 48h"},
    {text:"Herpetic whitlow: oral aciclovir/famciclovir (topical has NO benefit)"},
    {text:"Artificial nails harbour bacteria inaccessible to hand hygiene"},
  ],
  right: [
    {type:"heading", text:"CHRONIC PARONYCHIA"},
    {text:"Insidious; inflammatory dermatosis of nail folds"},
    {text:"Predominantly: domestic/catering workers (wet work), females"},
    {text:"First 3 fingers of dominant hand most affected"},
    {type:"heading", text:"PATHOPHYSIOLOGY (Critical!)"},
    {text:"Candida is NOT the primary pathogen"},
    {text:"Primary cause = IRRITANT REACTION / contact allergy / food hypersensitivity"},
    {text:"Candida = secondary coloniser only"},
    {text:"Systemic antifungals are NOT useful"},
    {type:"heading", text:"CLINICAL FEATURES"},
    {text:"Loss of cuticle (pathognomonic), Beau lines, cross-ridging"},
    {text:"Dark discolouration at lateral edges"},
    {type:"heading", text:"TREATMENT — Chronic"},
    {text:"Avoid wet work; topical imidazoles (for Candida colonisation)"},
    {text:"Topical / intralesional steroids — primary treatment"},
    {text:"Surgical: crescent-shaped excision of PNF (refractory cases)"},
    {text:"Heals by secondary intention in < 2 weeks"},
  ]
});

// ── DARIER + ECZEMA ──────────────────────────────────────────
twoColSlide({
  title: "3.5 & 3.6 — DARIER DISEASE & ECZEMATOUS NAIL DYSTROPHY",
  accentColor: C.purple,
  left: [
    {type:"heading", text:"DARIER DISEASE OF NAILS"},
    {text:"Candy-cane appearance: red (erythronychia) + white (leukonychia) longitudinal bands"},
    {text:"PATHOGNOMONIC — can diagnose Darier disease from nails alone"},
    {text:"Free margin: V-shaped NOTCH and fissure (fragility)"},
    {text:"Multiple nails affected simultaneously"},
    {type:"heading", text:"HISTOLOGY"},
    {text:"Acantholysis + multinucleate giant cells"},
    {text:"Epithelial hyperplasia in nail bed"},
    {text:"Similar to skin Darier disease (ATP2A2 mutation)"},
    {type:"heading", text:"CLINICAL PEARL"},
    {text:"Red+white longitudinal bands + V-notch at free edge = Darier disease"},
    {text:"Even if skin Darier is not clinically apparent"},
  ],
  right: [
    {type:"heading", text:"ECZEMATOUS NAIL DYSTROPHY"},
    {text:"Prevalence: almost ALL hand eczema patients; ~16% atopic dermatitis"},
    {type:"heading", text:"FEATURES"},
    {text:"Thickened, pitted, rough, discoloured nails"},
    {text:"Beau lines (very common)"},
    {text:"COARSE pits (distinguish from fine pits of psoriasis!)"},
    {text:"Loss of cuticle → Candida/bacterial superinfection"},
    {type:"heading", text:"PHOTO-ONYCHOLYSIS"},
    {text:"Tetracyclines, 5-FU, capecitabine → phototoxic onycholysis"},
    {text:"Pattern: matches shape of proximal nail fold"},
    {type:"heading", text:"YELLOW NAIL SYNDROME"},
    {text:"TRIAD: Yellow thickened overcurved nails + Lymphoedema + Pleural effusion"},
    {text:"Also: bronchiectasis, rhinosinusitis, chronic cough"},
    {text:"Absent lunula, loss of cuticle"},
    {text:"Growth < 0.1mm/week (extreme slowdown)"},
    {text:"Treatment: vitamin E (topical/systemic), triazoles"},
  ]
});

// ── NAIL TUMOURS ─────────────────────────────────────────────
twoColSlide({
  title: "3.7 — NAIL TUMOURS (Benign & Malignant)",
  accentColor: C.dark,
  left: [
    {type:"heading", text:"GLOMUS TUMOUR"},
    {text:"1-2% of hand tumours; predominantly women, 4th-5th decade"},
    {text:"TRIAD: Love test (point tenderness) + Hildreth's sign (tourniquet relief) + Cold sensitivity"},
    {text:"Small reddish/bluish spot under nail OR longitudinal erythronychia + distal notch"},
    {text:"Investigation: MRI (gold standard); ultrasound + colour Doppler"},
    {text:"Bone erosion in 50% of cases"},
    {text:"Treatment: surgical excision (transungual approach preferred)"},
    {type:"heading", text:"SUBUNGUAL EXOSTOSIS"},
    {text:"Benign osteochondral outgrowth from distal phalanx"},
    {text:"75% great toenail; porcelain white with telangiectasias"},
    {text:"X-ray: cup-shaped bone outgrowth (diagnostic)"},
    {type:"heading", text:"ONYCHOMATRICOMA"},
    {text:"Classic: longitudinal xanthopachyonychia + woodworm cavities at free edge"},
    {text:"Sea-anemone matrix tumour on nail avulsion"},
  ],
  right: [
    {type:"heading", text:"SUBUNGUAL MELANOMA (Nail Apparatus Melanoma)"},
    {text:"0.18-2.8% of all cutaneous melanomas"},
    {text:"~25% of melanomas in Japanese and African Americans"},
    {text:"Most arise from MATRIX (75%) → longitudinal melanonychia"},
    {text:"Subtype: acral lentiginous melanoma"},
    {text:"BRAF mutations LOW; KIT and NRAS mutations HIGH"},
    {text:"Treatment: in situ → en bloc 5-10mm margins; invasive → amputation"},
    {text:"Sentinel LN biopsy for melanoma > 1mm thickness"},
    {type:"heading", text:"SQUAMOUS CELL CARCINOMA (Most Common Malignant)"},
    {text:"Mean age 60; 75% male"},
    {text:"HPV-associated (genito-digital transmission, up to 60%)"},
    {text:"Right index / middle finger most common"},
    {text:"Mean diagnosis DELAY = 6 years"},
    {text:"Bowen disease = in situ SCC"},
    {text:"Treatment: Mohs surgery; amputation only if bone involved"},
    {type:"heading", text:"DIGITAL MYXOID PSEUDOCYST"},
    {text:"Type B: in PNF → longitudinal nail groove"},
    {text:"MRI confirms DIP joint capsule breach (> 85%)"},
  ]
});

// ── SECTION 4: PSORIASIS MECHANISM (diagram) ─────────────────
sectionSlide("MECHANISM OF NAIL CHANGES IN PSORIASIS", "The IL-23 → Th17 → IL-17/TNF pathway explained step-by-step", C.purple);

// Already added mechanismSlide() above — add another dedicated one here with detail
{
  const sl = pres.addSlide();
  const ac = C.purple;
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.light} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.7, fill:{color: ac} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0.75, w:0.08, h:6.75, fill:{color: C.gold} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: C.gold} });
  sl.addText("PSORIASIS NAIL MECHANISM — DETAILED CYTOKINE PATHWAY", {
    x:0.2, y:0.1, w:13, h:0.55, fontSize:19, bold:true, color:C.white, align:"center", valign:"middle"
  });

  const rows = [
    {heading:"GENETIC BASIS", text:"HLA-Cw6 NEGATIVE (distinct from cutaneous psoriasis which is HLA-Cw6 positive). Asian patients: HLA-B46, HLA-A*02:07. This suggests nail psoriasis is a genetically distinct entity with stronger PsA association."},
    {heading:"ANATOMICAL TRIGGER — ENTHESITIS", text:"The extensor tendon inserts adjacent to the nail root at the DIP joint. Microtrauma (Koebner phenomenon) triggers enthesitis at this synovio-entheseal complex. Nail matrix is anatomically contiguous with the DIP enthesis — inflammation spreads both ways."},
    {heading:"INNATE IMMUNITY (Step 1)", text:"Stressed keratinocytes release antimicrobial peptides (LL-37, hβD-2, hβD-3). These activate plasmacytoid dendritic cells (pDCs), stimulate myeloid DCs (mDCs), and breach the immune privilege of the nail matrix. NF-κB pathway activated."},
    {heading:"IL-23/Th17 AXIS (Step 2-3)", text:"mDCs release IL-23 → differentiates naïve T cells into Th17 cells. Th17 cells produce IL-17A, IL-17F, IL-22 and induce TNF-α from mDCs and mast cells. VEGF upregulation → angiogenesis → dilated tortuous capillaries visible on onychoscopy (90% of cases)."},
    {heading:"MATRIX EFFECTS → PITTING (Step 4)", text:"IL-17/TNF-α in proximal matrix → defective keratinization → parakeratosis foci (clusters of nucleated cells) in the dorsal nail plate surface → these shed as tiny depressions = PITS. Severity correlates with inflammation duration."},
    {heading:"NAIL BED EFFECTS → OIL-SPOT + ONYCHOLYSIS (Step 5)", text:"Psoriasiform hyperplasia of nail bed + parakeratosis + microvascular changes + neutrophil trapping → translucent yellow-red oil-drop/salmon patch. Onychodermal band breach → progressive onycholysis. Subungual hyperkeratosis = nail bed hyperkeratosis."},
    {heading:"PsA RISK (Step 6)", text:"Pro-inflammatory cytokines (IL-17, IL-22, TNF-α) from nail unit spread to adjacent DIP joint synovio-entheseal complex → sensitisation → psoriatic arthritis. Annual PsA risk: 0.55-2.55% with nail involvement vs 0.26-1.14% without."},
  ];

  rows.forEach((r, i) => {
    const yy = 0.82 + i * 0.91;
    const bg = i % 2 === 0 ? "FFFFFF" : "F0ECF9";
    sl.addShape(pres.shapes.RECTANGLE, {x:0.25, y:yy, w:12.8, h:0.88, fill:{color:bg}, line:{color:"DDDDDD", width:0.5}});
    sl.addText(r.heading, {x:0.35, y:yy+0.05, w:2.8, h:0.75, fontSize:10, bold:true, color:ac, valign:"middle", wrap:true});
    sl.addShape(pres.shapes.LINE, {x:3.2, y:yy, w:0, h:0.88, line:{color:ac, width:0.8}});
    sl.addText(r.text, {x:3.3, y:yy+0.05, w:9.6, h:0.75, fontSize:10, color:C.dark, valign:"middle", wrap:true});
  });
}

// ── CONNECTIVE TISSUE & DRUGS ─────────────────────────────────
twoColSlide({
  title: "3.8 — NAILS IN CONNECTIVE TISSUE DISEASES & DRUG-INDUCED CHANGES",
  accentColor: C.teal,
  left: [
    {type:"heading", text:"CONNECTIVE TISSUE DISEASES"},
    {text:"Systemic sclerosis: periungual telangiectasias; megacapillaries + avascular areas (4 stages on capillaroscopy); pterygium inversum unguis; acro-osteolysis"},
    {text:"SLE: periungual erythema, splinter haemorrhages, onycholysis"},
    {text:"Dermatomyositis: dilated irregular nail fold capillaries (PATHOGNOMONIC); ragged cuticles (Gottron's equivalent)"},
    {text:"Raynaud: capillaroscopy — normal (primary); decreased + dropout (secondary)"},
    {text:"RA: tortuous/ramified capillary loops; 'fish shoal' pattern"},
    {type:"heading", text:"CAPILLAROSCOPY PEARLS"},
    {text:"Megacapillaries + avascular areas + hazy background = SYSTEMIC SCLEROSIS"},
    {text:"Use nail fold capillaroscopy to distinguish primary vs secondary Raynaud"},
  ],
  right: [
    {type:"heading", text:"DRUG-INDUCED NAIL CHANGES"},
    {text:"Retinoids: onycholysis, paronychia, ingrown toenails, fragility"},
    {text:"EGFR inhibitors (cetuximab, gefitinib): multiple pyogenic granulomas, paronychia"},
    {text:"Taxanes (docetaxel, paclitaxel): multiple PGs, onycholysis, subungual haematoma"},
    {text:"Capecitabine: onycholysis, pigmentation"},
    {text:"Antiretrovirals (indinavir): paronychia, pyogenic granuloma"},
    {text:"Hydroxyurea: melanonychia (drug-induced)"},
    {text:"β-blockers: pincer nails, digital necrosis"},
    {text:"ACE inhibitors (captopril): onycholysis"},
    {text:"Methotrexate: slower nail growth"},
    {text:"Doxycycline / psoralens: photo-onycholysis"},
    {text:"Ciclosporin: ingrown toenails, pyogenic granuloma"},
  ]
});

// ── NAIL SURGERY ─────────────────────────────────────────────
contentSlide({
  title: "PART 4 — NAIL SURGERY OVERVIEW",
  accentColor: C.dark,
  bullets: [
    {type:"heading", text:"ANAESTHESIA"},
    {text:"Distal digital block (preferred over ring block)"},
    {text:"1 cm proximal/lateral to PNF-lateral nail fold junction"},
    {text:"0.5 mL dorsal + 0.5 mL palmar branches × BOTH sides"},
    {text:"Addresses dual innervation (ring block misses dorsal branches)"},
    {type:"heading", text:"KEY PROCEDURES"},
    {text:"Nail avulsion (partial preferred; total avulsion causes nail bed shrinkage + distal pulp expansion)"},
    {text:"Punch biopsy 3mm — for small pigmented lesion < 3mm in distal matrix"},
    {text:"Longitudinal ellipse excision — for longitudinal pigmented bands"},
    {text:"Tangential excision — for wide pigmented areas"},
    {text:"Lateral longitudinal biopsy (sigmoid-shaped) — includes all lateral nail unit structures"},
    {text:"Crescent-shaped PNF excision — chronic paronychia; heals 2° intention in < 2 weeks"},
    {text:"Chemical cautery 88% phenol × 4 min — ingrowing toenail; tourniquet mandatory"},
    {text:"Phenol oozing lasts up to 5 weeks; < 3% recurrence"},
    {type:"heading", text:"IMAGING"},
    {text:"MRI: gold standard for glomus tumour, soft tissue masses, melanoma extent"},
    {text:"High-res ultrasound (>15 MHz hockey-stick): glomus tumour, psoriatic enthesitis"},
    {text:"X-ray: subungual exostosis, acro-osteolysis, SCC bone involvement"},
    {text:"Onychoscopy/dermoscopy: pitting patterns, capillaries, melanonychia"},
  ],
  pearl: "Distal digital block — NOT a ring block — is the correct anaesthesia for nail surgery. Nail has dual innervation (dorsal + palmar). A classic ring block at the base of the digit can miss dorsal branches."
});

// ── CLINICAL PEARLS SLIDE ────────────────────────────────────
diagramSlide(
  "CLINICAL PEARLS — HIGH-YIELD SUMMARY",
  "img_pearls.png",
  "Sources: Rook's Ch.93 • Fitzpatrick's Ch.91 • Andrews' Ch.33 • Bolivnia Dermatology 5e",
  C.orange
);

// ── CLINICAL PEARLS EXPANDED ──────────────────────────────────
{
  const sl = pres.addSlide();
  const ac = C.orange;
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.light} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.7, fill:{color: ac} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0.75, w:0.08, h:6.75, fill:{color: C.gold} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.2, w:13.3, h:0.3, fill:{color: ac} });
  sl.addText("CLINICAL PEARLS — EXPANDED (High-Yield for Exams & Viva)", {
    x:0.2, y:0.1, w:13, h:0.55, fontSize:19, bold:true, color:C.white, align:"center", valign:"middle"
  });

  const pearls = [
    ["1","Onychodermal band = Achilles heel","Once breached (psoriasis/trauma), onycholysis becomes PROGRESSIVE and hard to reverse. Clip, dry, topical antiseptics."],
    ["2","Chronic paronychia ≠ Candida","Candida is a SECONDARY coloniser. Primary = irritant/allergic dermatitis. Systemic antifungals DO NOT HELP. Treat inflammation first."],
    ["3","PSO + young patient = HIV","Proximal Subungual Onychomycosis in an immunocompetent-appearing patient should always trigger HIV testing."],
    ["4","Nail psoriasis = HLA-Cw6 NEGATIVE","Skin psoriasis = HLA-Cw6 positive. Nail psoriasis patients are MORE frequently HLA-Cw6 NEGATIVE — genetically distinct, stronger PsA link."],
    ["5","Salmon patch = nearly pathognomonic","Unlike pitting, the oil-drop/salmon patch is nearly exclusive to psoriasis. Confirm with onychoscopy: dilated tortuous capillaries (90%)."],
    ["6","Glomus tumour triad","Love test (point tenderness) + Hildreth's sign (tourniquet relieves pain) + cold sensitivity. MRI is gold standard. Bone erosion in 50%."],
    ["7","Darier disease candy-cane nails","Red + white longitudinal bands + V-notch at free edge = PATHOGNOMONIC. Can diagnose Darier disease from nails alone."],
    ["8","Dorsal pterygium = LP until proven otherwise","Lichen planus causes irreversible scarring pterygium. Unlike psoriasis which causes pitting and onycholysis, LP causes pterygium."],
    ["9","SCC > melanoma (malignant nail tumour)","SCC is the MOST COMMON malignant nail tumour (not melanoma). HPV-associated; mean diagnostic delay = 6 years. Right index finger."],
    ["10","Hutchinson vs Pseudo-Hutchinson","Real Hutchinson = melanin pigment IN nail fold skin = melanoma. Pseudo = transparency of cuticle reveals nail pigment = benign (racial melanonychia)."],
  ];

  pearls.forEach((p, i) => {
    const row = Math.floor(i / 2);
    const col = i % 2;
    const x = col === 0 ? 0.2 : 6.85;
    const y = 0.82 + row * 1.25;
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x, y, w:6.3, h:1.18,
      fill:{color:C.pearl}, line:{color:ac, width:1}, rectRadius:0.09,
      shadow:{type:"outer", color:"000000", blur:4, offset:2, angle:135, opacity:0.1}
    });
    sl.addText([
      {text:`💎 #${p[0]} — ${p[1]}\n`, options:{bold:true, color:ac, fontSize:10.5}},
      {text:p[2], options:{color:C.dark, fontSize:10}}
    ], {x:x+0.1, y:y+0.06, w:6.1, h:1.05, valign:"top", wrap:true, margin:4});
  });
}

// ── QUIZ SLIDE 1 ─────────────────────────────────────────────
quizSlide([
  ["Normal fingernail growth rate?", "~3 mm/month"],
  ["Which matrix zone produces ventral nail plate?", "Distal matrix (lunula)"],
  ["Onychodermal band is also called?", "Nail isthmus"],
  ["Lovibond angle in clubbing exceeds?", "> 180°"],
  ["Koilonychia most commonly = which deficiency?", "Iron deficiency anaemia"],
  ["K1/K10 in nail bed indicates?", "Pathological (psoriasis/onychomycosis)"],
  ["Yellow nails + lymphoedema + pleural effusion = ?", "Yellow nail syndrome"],
  ["Primary pathogen in chronic paronychia?", "NONE — irritant/allergic dermatitis"],
], "QUIZ PART 1 — ANATOMY, GROWTH & NAIL SIGNS", C.navy);

quizSlide([
  ["Most common organism in DLSO?", "Trichophyton rubrum"],
  ["PSO in young patient → test for?", "HIV"],
  ["Candy-cane nails (red+white + V-notch) = ?", "Darier disease"],
  ["Pterygium of nail most commonly caused by?", "Lichen planus"],
  ["Koenen tumours develop in which syndrome?", "Tuberous sclerosis (around puberty)"],
  ["Triangular lunulae = pathognomonic of?", "Nail-patella syndrome (LMX1B mutation)"],
  ["Most common MALIGNANT nail tumour?", "Squamous cell carcinoma (not melanoma)"],
  ["FDA-approved biologic for nail psoriasis?", "Adalimumab (anti-TNF)"],
  ["NAPSI maximum total score?", "160 (80 fingernails + 80 toenails)"],
  ["Green discolouration under onycholytic nail?", "Pseudomonas aeruginosa (pyocyanin)"],
], "QUIZ PART 2 — NAIL DISORDERS & TREATMENT", C.red);

// ── VIVA Q&A SLIDE ───────────────────────────────────────────
contentSlide({
  title: "VIVA QUESTIONS — PSORIASIS NAIL MECHANISM",
  accentColor: C.purple,
  bullets: [
    {type:"heading", text:"Q: Describe the mechanism of nail pitting in psoriasis."},
    {text:"Proximal matrix is affected by psoriatic inflammation → IL-17/TNF-α → defective keratinization → parakeratosis foci (clusters of nucleated cells without normal cornification) in dorsal nail plate surface → these foci are shed as nail plate grows distally, leaving tiny depressions = PITS. Fine pits (<1mm) = psoriasis. >10 pits/nail OR >60 total supports diagnosis."},
    {type:"heading", text:"Q: Why does nail psoriasis cause psoriatic arthritis?"},
    {text:"The nail matrix is anatomically contiguous with the DIP joint extensor tendon enthesis. Pro-inflammatory cytokines (IL-23, IL-17A/F, TNF-α) from the psoriatic nail unit spread to the adjacent synovio-entheseal complex. This sensitises the DIP joint to trauma-triggered inflammation (Koebner). Annual PsA risk doubles with nail involvement."},
    {type:"heading", text:"Q: What is the Zaias classification of nail psoriasis?"},
    {text:"Based on anatomical site: Proximal matrix → pitting, transverse furrows, leukonychia, crumbling. Distal matrix/lunula → erythema of lunula, focal onycholysis. Nail bed → salmon/oil-drop patch, subungual hyperkeratosis, splinter haemorrhages, onycholysis. Nail fold → periungual psoriasis (PsA association)."},
    {type:"heading", text:"Q: What makes the oil-drop/salmon patch pathognomonic?"},
    {text:"It results from psoriasiform hyperplasia + parakeratosis + microvascular changes + neutrophil trapping in the nail bed — a combination specific to psoriasis. Unlike pitting (also in AA, eczema, LP), oil-spotting is nearly exclusive to psoriasis."},
    {type:"heading", text:"Q: NAPSI scoring?"},
    {text:"0-8 per nail: matrix component (0-4) + nail bed component (0-4). Each scored 0=none, 1=¼ nail, 2=½ nail, 3=¾ nail, 4=entire nail affected. Max total = 160 (all 20 nails × 8)."},
  ],
});

// ── THANK YOU SLIDE ───────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.navy} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.12, fill:{color: C.teal} });
  sl.addShape(pres.shapes.RECTANGLE, { x:0, y:7.38, w:13.3, h:0.12, fill:{color: C.gold} });
  sl.addText("NAIL ANATOMY & DISORDERS", {
    x:0.5, y:2.0, w:12.3, h:1.0, fontSize:36, bold:true, color:C.white, align:"center"
  });
  sl.addText("Dermatology Resident Study Note — Complete Reference", {
    x:0.5, y:3.1, w:12.3, h:0.6, fontSize:20, color:C.teal, align:"center", italic:true
  });
  sl.addText([
    {text:"Sources: ", options:{bold:true, color:C.gold, fontSize:13}},
    {text:"Rook's Dermatology 9e Ch.93 • Fitzpatrick's Dermatology Ch.91 • Bolivnia Dermatology 5e Ch.71 • Andrews' Diseases of the Skin Ch.33\nGoodman & Gilman's Pharmacology • Goldman-Cecil Medicine • JAAD 2024 (Hwang JK et al. PMID 38007038) • JAAD 2025 (Ricardo JW et al. PMID 40023404)", options:{color:"AABBCC", fontSize:12}}
  ], { x:0.5, y:4.2, w:12.3, h:1.2, align:"center", wrap:true });
  sl.addText("With Enhanced Clinical Pearls | Mechanism of Nail Changes in Psoriasis | Psoriasis IL-23/Th17/IL-17 Pathway", {
    x:0.5, y:5.6, w:12.3, h:0.6, fontSize:13, color:C.teal, align:"center", italic:true
  });
}

// ── WRITE FILE ───────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/nails-pptx/Nails_Enhanced.pptx" })
  .then(() => console.log("SUCCESS: Nails_Enhanced.pptx written"))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/nails-pptx && node build_nails.js 2>&1

Running Command

ls -lh /home/daytona/workspace/nails-pptx/Nails_Enhanced.pptx && python3 -m mark…

Running Command

python3 -m markitdown /home/daytona/workspace/nails-pptx/Nails_Enhanced.pptx 2>/…

Running Command

python3 -c " from pypdf import PdfReader import zipfile, os # check PPTX is vali…

Your enhanced presentation is ready:

Nails Enhanced

Presentation · PPTX


What's in the 29-slide deck

Slide(s)Content
1Title slide — styled, with source list
2Section header — Anatomy
3Nail unit components — with illustrated anatomy diagram (image panel)
4Keratins, growth rates & immunology — two-column layout
5Section header — Nail Signs
6Clubbing & Koilonychia — with illustrated image + Schamroth pearl
7Onycholysis & Pterygium — all 4 dermoscopic types
8Nail surface changes — Beau lines, pitting, trachyonychia
9Chromonychia — leukonychia, melanonychia, ABCDEF rule
10Systemic nail signs — full diagram panel
11Section header — Nail Disorders
12Nail psoriasis — clinical — with illustrated image + salmon patch pearl
13🔬 MECHANISM OF NAIL CHANGES IN PSORIASIS — step-by-step coloured flow boxes: trigger → DC activation → Th17 → IL-17/TNF-α → matrix effects (pitting) → nail bed effects (oil-spot) → PsA risk; plus Zaias classification table
14Psoriasis detailed cytokine pathway — 7-row table: genetic basis, enthesitis, innate immunity, IL-23/Th17 axis, matrix pitting mechanism, nail bed oil-spot mechanism, PsA risk
15Nail psoriasis treatment algorithm — NAPSI, biologics, small molecules
16Lichen planus — dorsal pterygium, histology, treatment
17Onychomycosis — types, KOH, treatment
18Paronychia (acute vs chronic) — two-column with Candida myth pearl
19Darier disease & Eczema / Yellow nail — two-column
20Nail tumours — glomus, exostosis, SCC, melanoma
21CTD & Drug-induced — capillaroscopy, drug table
22Nail surgery — anaesthesia, procedures, imaging
23Clinical Pearls diagram
24Clinical Pearls expanded — 10 boxed pearls, each with title + explanation
25–26Quiz Part 1 & 2 — 18 Q&A in table format
27Viva Q&A — Psoriasis mechanism — 5 structured viva questions
28Thank you / References

Just give me in text

Here is the full enhanced content in text:

NAIL ANATOMY & DISORDERS — DERMATOLOGY RESIDENT STUDY NOTE

Sources: Rook's Dermatology Ch.93 • Fitzpatrick's Ch.91 • Bolivnia Dermatology 5e • Andrews' Ch.33 • JAAD 2024/2025

PART 1 — ANATOMY OF THE NAIL UNIT

1.1 Gross Anatomy

ComponentDescriptionFunction
Nail plateTrilaminar: dorsal (from ventral PNF), intermediate/main (germinal matrix), ventral (nail bed ~21%)Protection, fine touch, grooming
Proximal matrixVentral aspect of PNFProduces dorsal 80% of nail plate
Distal matrix (lunula)Visible white half-moonProduces ventral 20% of nail plate
Nail bed (sterile matrix)Epidermis 2-3 cells thick; NO granular layer in healthPlate adherence
Proximal nail fold (PNF)Double-layered fold overlying proximal nail plateProtects matrix from trauma/infection
Cuticle (eponychium)Thin strip of cornified epitheliumSeal against ingress
HyponychiumJunction nail bed/digit tipDistal barrier
Onychodermal bandMost distal attachment of cornified epithelium to nail undersurfaceCritical for nail-bed adhesion
Nail plate structure:
  • Hard hair-type keratins embedded in sulfur-rich, high-cysteine and high-glycine/tyrosine proteins
  • No granular layer in health; granular layer = PATHOLOGICAL (psoriasis, onychomycosis)
Nail bed:
  • Dermis tightly apposed to periosteum — bacterial infections spread rapidly to bone → osteomyelitis risk
Nail matrix:
  • Keratinization along oblique upward-distal axis
  • MIB-1 (Ki-67) labels proliferating matrix cells
  • Contains dormant melanocytes (distal matrix has active compartment)
💎 Clinical Pearl: No granular layer in healthy nail bed. Its appearance on biopsy signals disease — think psoriasis or onychomycosis.

1.2 Microscopic Anatomy — Keratins

Keratin PairLocation
K5/K14Basal layer of nail matrix AND nail bed
K1/K10Suprabasal nail matrix — ABSENT in healthy nail bed; appears in disease (psoriasis, onychomycosis)
K6/K16Various subungual locations during development
💎 Clinical Pearl: K1/K10 expression in the nail bed = pathological granular layer. This is one histological hallmark distinguishing diseased from healthy nail.

1.3 Nail Growth

FactorFasterSlower
RateFingernails ~3 mm/monthToenails ~1 mm/month
Time of dayDaytimeNight
DominanceDominant handNon-dominant
AgeYouthOld age
SeasonSummerWinter/cold
SexMaleFemale
Disease (faster)Psoriasis, PRP, hyperthyroidism, HIV, AV shunts
Disease (slower)Beau lines, yellow nail syndrome, hypothyroidism, CHF, onychomycosis
Drugs (faster)Levodopa, itraconazole
Drugs (slower)Methotrexate, azathioprine, targeted therapies

1.4 Blood Supply

  • Paired digital arteries (large palmar + small dorsal on each side)
  • Superficial arcade: distal to DIP joint → supplies nail fold, extensor tendon, germinal matrix
  • Glomus bodies (Masson): specialized neuromyoarterial structures; regulate capillary circulation; DILATE with cold (opposite of arterioles) to maintain acral circulation

1.5 Nerve Supply

  • Dual innervation: dorsal + palmar branches
  • Ring block misses dorsal branches → distal digital block is preferred for nail surgery

1.6 Immunology of the Nail

  • Nail matrix has immune privilege (like hair matrix, eye, testis)
  • MHC class I molecules restricted → protects from autoimmune T-cell attack
  • Contains LL-37 (kills Candida albicans), hβD-2 and hβD-3 (beta-defensins)

1.7 Signalling Pathways

  • Wnt/β-catenin: crucial in nail embryogenesis and adult maintenance
  • R-spondin 4 mutations → autosomal recessive anonychia
  • Frizzled-6 (Wnt receptor) mutations → inherited nail dysplasia

PART 2 — NAIL SIGNS AND THEIR SIGNIFICANCE

2.1 Abnormalities of Shape

Clubbing (Hippocratic fingers / Acropachy / Watch-glass nails)

MeasurementNormalClubbing
Lovibond's angle (nail plate - PNF junction)< 160°> 180°
Curth's angle (DIP joint)~180°< 160°
Schamroth's windowOpen diamond windowObliterated
Pathophysiology: Increased blood flow through vasodilated nail unit vasculature; elevated circulating VEGF → nail bed angiogenesis; HPGD and SLCO2A1 mutations → pachydermoperiostosis (primary form)
Causes of secondary clubbing:
  • Respiratory: thoracic carcinoma, mesothelioma, asbestosis, cryptogenic fibrosing alveolitis, sarcoidosis, cystic fibrosis, pulmonary AVM, TB
  • Cardiac: cyanotic heart disease (PDA, septal defect), infective endocarditis, hepatopulmonary syndrome
  • GI: IBD, oesophageal carcinoma, liver disease
  • Endocrine: thyroid disease (thyroid acropachy)
  • Other: HIV (37%), POEMS syndrome (70%), subungual tumour, lupus
💎 Clinical Pearl: Schamroth window test — oppose dorsal surfaces of two homologous fingers from opposite hands. Normal = open diamond window. In clubbing, the window is obliterated as Lovibond's angle exceeds 180°. Quick bedside sign requiring no instruments.

Koilonychia (Spoon nail)

  • Concave, spoon-shaped nail plate
  • Most common systemic associations: iron deficiency anaemia, haemochromatosis
  • Also: trichothiodystrophy, familial (AD) in adults
  • Secondary: psoriasis, lichen planus, dermatophyte infection

Pincer Nail (Trumpet nail / Arched nail)

  • Transverse overcurvature increasing toward distal tip, pinching soft tissues
  • Three patterns: (1) associated with psoriasis (thumbs and big toes), (2) inherited, (3) isolated
  • Treatment: orthopaedic braces, nail plate ablation/partial matricectomy, Z-plasty

Pachyonychia

  • Thickened nail plate, yellowish, horseshoe free edge, extreme hardness
  • Congenital: Jadassohn-Lewandowsky syndrome (pachyonychia congenita)
  • Acquired: psoriasis, PRP, chronic eczema, onychomycosis

Brachyonychia (Racquet nails)

  • Width of nail plate > length; usually thumb; AD with higher prevalence in females
  • Premature ossification of epiphysis of distal phalanx (age 7-10 years)

Anonychia / Nail-Patella Syndrome

  • Anonychia: R-spondin 4, Frizzled-6 or Wnt10a gene mutations
  • Nail-Patella syndrome (Fong syndrome): triangular lunulae are PATHOGNOMONIC; LMX1B gene mutation; absent/hypoplastic patella, posterior iliac horns, glomerulonephritis (20% develop renal failure), "Lester iris"

2.2 Abnormalities of Nail Attachment

Onycholysis

  • Separation of nail plate from nail bed starting DISTALLY at onychodermal band, moving proximally
  • Detached plate looks white (apparent leukonychia — air underneath)
  • Green discolouration = Pseudomonas aeruginosa
Dermoscopic types:
  1. Post-traumatic: regular margin, usually lateral
  2. Psoriatic: irregular margin, involves whole free edge, erythematous border
  3. Onychomycosis: ragged/spike edge, mycelium visible proximally
  4. Drug-induced: uniform pattern in midline (photo-onycholysis)
Causes: trauma, psoriasis (30% of psoriatics), fungal infection, contact dermatitis, photo-onycholysis (psoralens, doxycycline), retinoids, drugs (5-FU, captopril), hypothyroidism, hyperthyroidism, yellow nail syndrome
💎 Clinical Pearl: The onychodermal band is the "Achilles heel" of nail plate attachment. Once breached — in psoriasis, trauma, or infection — onycholysis becomes progressive and is difficult to reverse. Clipping, drying, and topical antiseptics are the cornerstone of management.

Pterygium

  • Dorsal (true) pterygium: fibrotic band from PNF divides nail in two; LICHEN PLANUS (most common), trauma, GVHD, leprosy
  • Ventral pterygium (pterygium inversum unguis): forward extension of nail bed epithelium; systemic sclerosis, Raynaud, lupus, familial, trauma

2.3 Nail Surface Changes

Beau Lines (Transverse Grooves)

  • Transverse depressions = temporary interruption of proximal nail matrix mitotic activity
  • Depth = extent of matrix damage; Width = duration of insult
  • Migrate distally with nail growth
  • All 20 nails simultaneously = SYSTEMIC cause (cytotoxics, severe febrile illness, erythroderma)
  • 1-2 nails only = local trauma or paronychia
  • Beau lines → onychomadesis when full-thickness groove
💎 Clinical Pearl: Beau lines at the same level in all 20 nails simultaneously = systemic cause. Beau lines on only 1-2 nails = local trauma or paronychia.

Pitting

  • Shallow depressions from foci of parakeratosis in proximal matrix
  • Fine pits (<1mm): PSORIASIS — most common; >10 pits/nail OR >60 total supports diagnosis
  • Coarse pits: ECZEMA
  • Geometric "Scotch plaid" / tartan pattern: ALOPECIA AREATA
  • Elkonyxis = deep full-thickness single large pit (reactive arthritis, psoriasis)

Trachyonychia (Twenty-nail dystrophy)

  • Rough, sandpaper-like, opaque surface of all 20 nails; also shiny variant
  • Associations: alopecia areata (most common), psoriasis, lichen planus, eczema, vitiligo, idiopathic
  • Histology: spongiosis and lymphocytic infiltrate of nail matrix

Onychoschizia (Lamellar Dystrophy)

  • Distal horizontal lamellar splitting
  • Causes: repeated wet-dry cycles, chemical exposure
  • Common with aging; NOT a sign of systemic disease

Median Canaliform Dystrophy of Heller

  • Midline longitudinal split with fir-tree appearance; thumbs most commonly
  • Distinct from habit-tic (washboard nails: disturbed cuticle)
  • Often self-resolving

2.4 Nail Colour Changes (Chromonychia)

ColourCause
White — true leukonychia (nail plate)Parakeratosis in plate; Mees' lines = arsenic/systemic insult
White — apparent leukonychia (nail BED, disappear with pressure)Muehrcke's lines = hypoalbuminaemia; Terry's nails = liver disease; half-and-half nails = renal disease
YellowYellow nail syndrome, psoriasis (subungual hyperkeratosis), fungal
GreenPseudomonas aeruginosa (chloronychia, pyocyanin pigment)
Brown/blackMelanonychia (matrix melanocytes), subungual haematoma
Red lunulaPsoriasis, cardiac failure, CO poisoning, alopecia areata
Splinter haemorrhagesLongitudinal capillary haemorrhages; psoriasis, endocarditis, trauma
Apparent leukonychia — Systemic significance:
  • Muehrcke's lines (paired transverse white bands, disappear with pressure) = hypoalbuminaemia (liver disease, nephrotic syndrome)
  • Terry's nails (white proximally, normal 1-2mm distally) = hepatic cirrhosis
  • Half-and-half / Lindsay's nails (proximal white, distal red-brown) = chronic renal failure
  • Azure lunula = Wilson's disease / argyria
💎 Clinical Pearl: In ALL apparent leukonychia, changes are in the nail BED (not plate) and disappear with pressure — because the vascular nail bed changes are compressed. This distinguishes them from true leukonychia (nail plate change — does NOT disappear with pressure).

Melanonychia — ABCDEF Rule for Nail Melanoma

LetterStands For
AAge (40-70), African/Asian/Native American ancestry
BBrown/Black band >3mm, Blurred borders
CChange in morphology/colour
DDigit (thumb > hallux > index; single digit)
EExtension of pigment to nail fold (Hutchinson's sign)
FFamily/personal history of melanoma
💎 Clinical Pearl: Pseudo-Hutchinson's sign = periungual pigmentation that simulates Hutchinson's sign but is actually visible nail plate pigmentation through a TRANSPARENT cuticle. Seen in racial melanonychia, benign nevi, Laugier-Hunziker syndrome. Real Hutchinson's sign = actual extension of melanin pigment INTO the nail fold skin. Dermoscopy distinguishes the two.

2.5 Nail Signs in Systemic Disease

SignDisease
ClubbingCardiopulmonary, GI, liver, HIV, POEMS
KoilonychiaIron deficiency anaemia, haemochromatosis
Splinter haemorrhagesEndocarditis, vasculitis, psoriasis, trauma
Muehrcke's linesHypoalbuminaemia (liver disease, nephrotic syndrome)
Terry's nailsHepatic cirrhosis
Half-and-half nails (Lindsay's)Chronic renal failure
Yellow nail syndromeLymphoedema, pleural effusion, bronchiectasis
OnycholysisHypothyroidism, hyperthyroidism
Periungual telangiectasiaDermatomyositis (most specific), SLE, systemic sclerosis
Ragged cuticlesDermatomyositis
Triangular lunulaNail-patella syndrome
Red lunulaPsoriasis, CO poisoning, cardiac failure
Beau lines (all nails)Systemic illness, cytotoxics, erythroderma
Periungual fibromas (Koenen tumours)Tuberous sclerosis (develop around puberty)

PART 3 — NAIL DISORDERS

3.1 Nail Psoriasis

Epidemiology

  • 50% prevalence in plaque psoriasis; 80-90% lifetime incidence
  • 5-10% nail psoriasis WITHOUT skin/joint disease
  • Major risk factor for psoriatic arthritis: annual PsA risk 0.55-2.55% with nail involvement vs 0.26-1.14% without
  • Genetics: HLA-Cw6 NEGATIVE (contrast with skin psoriasis which is HLA-Cw6 positive)
  • Asian patients: HLA-B46, HLA-A*02:07 association

Clinical Features — Zaias Classification

Clinical FeatureSite of DiseaseDuration
MATRIX SIGNS
PittingProximal matrix (parakeratosis foci)Episodic (short)
Transverse furrowsProximal matrix + distal extension1-2 weeks
Crumbling nail plateEntire matrixProlonged
Leukonychia with rough surfaceProximal (± distal) matrixVariable
NAIL BED SIGNS
Splinter haemorrhagesNail bed dermal ridge haemorrhageShort
Oil spot / Salmon patchNail bed psoriasisProlonged
OnycholysisNail bed psoriasisProlonged
Subungual hyperkeratosisNail bed psoriasisProlonged
Yellow/green discolourationSecondary yeast/PseudomonasProlonged
Special features:
  • Salmon (oil-drop) patch: characteristic yellowish-red translucent zone at leading edge of onycholysis — NEARLY PATHOGNOMONIC
  • Acrodermatitis continua of Hallopeau (ACH): sterile pustular form; severe destruction
  • POPP: psoriatic onychopachydermoperiostitis — nail thickening, periosteal reaction, bone erosion without joint involvement
  • Co-infection with onychomycosis: more common in psoriatics; must treat with antifungals alongside psoriasis treatment (Koebner effect)
💎 Clinical Pearl: Salmon patch (oil-drop sign) = NEARLY PATHOGNOMONIC for psoriasis. Unlike pitting (also seen in AA, eczema, LP), oil-spotting is nearly exclusive to psoriasis. Confirm with onychoscopy: dilated tortuous capillaries in 90% of nail psoriasis cases.

═══ MECHANISM OF NAIL CHANGES IN PSORIASIS ═══

Step 1 — Genetic Basis & Trigger

  • HLA-Cw6 NEGATIVE — genetically distinct from cutaneous plaque psoriasis
  • Asian patients: HLA-B46, HLA-A*02:07
  • Trigger: microtrauma at nail unit → Koebner phenomenon
  • The extensor tendon inserts adjacent to the nail root at the DIP joint — the nail matrix is anatomically contiguous with the synovio-entheseal complex

Step 2 — Innate Immune Activation

  • Stressed keratinocytes release antimicrobial peptides (LL-37, hβD-2, hβD-3)
  • These activate plasmacytoid dendritic cells (pDCs) and myeloid DCs (mDCs)
  • This breaches the immune privilege of the nail matrix
  • NF-κB pathway activated; mast cells recruited

Step 3 — IL-23 / Th17 Axis

  • mDCs release IL-23 → differentiates naïve T cells into Th17 cells
  • Th17 cells produce: IL-17A, IL-17F, IL-22, TNF-α
  • TNF-α also released directly by mDCs and stressed keratinocytes
  • VEGF upregulated → angiogenesis → dilated tortuous capillaries (visible on onychoscopy in 90% of nail psoriasis)

Step 4 — Matrix Inflammation → PITTING

  • IL-17/TNF-α in proximal nail matrix → defective keratinization
  • Parakeratosis foci form in the dorsal nail plate surface (clusters of nucleated cells without normal cornification)
  • These foci are shed as the nail plate grows distally, leaving tiny depressions = PITS
  • Fine pits (<1mm) = psoriasis; >10 pits/nail OR >60 total supports diagnosis
  • More severe/prolonged matrix inflammation → transverse furrows → crumbling nail → leukonychia

Step 5 — Nail Bed Inflammation → OIL-SPOT / ONYCHOLYSIS

  • Psoriasiform hyperplasia of nail bed + parakeratosis + microvascular changes + neutrophil trapping
  • Salmon/oil-drop patch (translucent yellow-red zone at leading edge of onycholysis) — nearly pathognomonic
  • Onychodermal band breach → progressive onycholysis (difficult to reverse)
  • Nail bed hyperkeratosis → subungual hyperkeratosis
  • Dermal ridge capillary rupture → splinter haemorrhages

Step 6 — Enthesitis → Psoriatic Arthritis

  • Pro-inflammatory cytokines (IL-23, IL-17A/F, IL-22, TNF-α) from the nail unit spread to the adjacent DIP joint synovio-entheseal complex
  • This sensitises the DIP joint to trauma-triggered inflammation
  • Dysbiosis of nail microbiome + immunogenic antimicrobial peptides from the nail matrix → amplify local cytokine release
  • Result: psoriatic arthritis (PsA) — annual risk doubles with nail involvement
  • This explains why nail psoriasis is the strongest clinical predictor of PsA development

Summary Cytokine Axis:

Microtrauma/Koebner
        ↓
Keratinocyte stress → LL-37, hβD-2/3
        ↓
mDC activation → IL-23
        ↓
Th17 differentiation → IL-17A/F + IL-22 + TNF-α
        ↓
     ┌──────────────────┬────────────────────┐
     ↓                  ↓                    ↓
Proximal matrix    Nail bed            DIP enthesis
Parakeratosis     Hyperplasia +        Enthesitis
→ PITTING         microvascular →      → PsA
                  OIL-SPOT +
                  ONYCHOLYSIS
💎 Clinical Pearl: Nail psoriasis is HLA-Cw6 NEGATIVE — the exact opposite of cutaneous plaque psoriasis. This is a genetically distinct subset with a far stronger association with psoriatic arthritis. Always screen nail psoriasis patients for joint disease.

Nail Psoriasis — Treatment Algorithm

≤3 nails (matrix involvement):
  1. Intralesional triamcinolone acetonide (digital nerve block first) — 1st line
  2. Topical vitamin D analogue ± topical steroids — 2nd line
≤3 nails (nail bed involvement):
  1. Topical steroids OR topical vitamin D — 1st line
>3 nails involved:
  • Intralesional steroids ± topical vitamin D + steroids — 1st line
  • Systemic: Methotrexate (≤15mg/week), Ciclosporin (3-5mg/kg short-term), Acitretin (0.2-0.4mg/kg × 6 months)
  • Biologics:
    • Adalimumab — ONLY FDA-approved specifically for nail psoriasis
    • IL-17 inhibitors: secukinumab, ixekizumab, brodalumab (excellent nail clearance)
    • IL-23 inhibitors: risankizumab, guselkumab, ustekinumab
    • Anti-TNF: infliximab, etanercept, certolizumab, golimumab
  • Small molecules: apremilast (PDE4 inhibitor), tofacitinib (JAK inhibitor)
NAPSI Scoring:
  • 0-8 per nail: matrix component (0-4) + nail bed component (0-4)
  • Each scored 0=none, 1=¼ nail affected, 2=½, 3=¾, 4=entire nail
  • Maximum total score = 160 (all 20 nails)

3.2 Lichen Planus of the Nails (NLP)

Epidemiology: 5-10% of LP patients; most common 5th-6th decade
Clinical features:
  • Dorsal pterygium — MOST CHARACTERISTIC: fibrotic band from PNF divides nail in two (irreversible scarring)
  • Onychorrhexis — irregular longitudinal ridging and grooving
  • Thinning of nail plate → atrophy → nail shedding
  • Trachyonychia — 20-nail dystrophy (shiny variant)
  • Erythronychia — red longitudinal streaks
  • Subungual hyperpigmentation and keratosis
  • Idiopathic atrophy of nails = most severe variant (acute onset, rapid irreversible destruction)
Histology: Interface dermatitis with band-like lymphocytic infiltrate; basal cell liquefaction — identical to cutaneous LP
Treatment:
  • Intralesional triamcinolone acetonide (digital nerve block first)
  • Oral prednisone 0.5-1 mg/kg × 3 weeks
  • IM triamcinolone 0.5-1mg/kg/month × 3-6 months (children)
  • Combination: oral retinoids + topical corticosteroids
💎 Clinical Pearl: Dorsal pterygium = lichen planus until proven otherwise. It represents irreversible scarring — aggressive early treatment is essential. LP pterygium splits the nail plate in two; psoriasis does NOT cause pterygium (it causes pitting and onycholysis).

3.3 Onychomycosis

Classification

TypeDescriptionCommon Organism
DLSO (most common)Starts at free edge/lateral margins; hyperkeratosis, onycholysisT. rubrum (70-80%)
PSO (Proximal Subungual)Via nail fold; leukonychia at LUNULA; HIV patientsT. rubrum
SWO (Superficial White)Powdery white patches on dorsal surfaceT. interdigitale, moulds
EndonyxMilky white, no subungual hyperkeratosisT. soudanense, T. violaceum
CDLSOChronic mucocutaneous candidiasisCandida spp.
Total dystrophicAdvanced end stageAny

Differential from Psoriasis

FeatureOnychomycosisPsoriasis
PittingInfrequentOften, fine
OnycholysisFrequentFrequent
Dermoscopy edgeRagged/spikeIrregular, erythematous border
KOHFilaments abundantUp to 20% also have co-infection

Treatment

  • Terbinafine oral 250mg/day × 6 weeks (fingernails), 12 weeks (toenails) — most effective single agent
  • Itraconazole: 200mg/day continuous OR pulse (400mg/day × 1 week/month × 2-3 months)
  • Fluconazole: 150-450mg weekly × 3-6 months
  • Topical: ciclopirox 8%, efinaconazole, tavaborole (adjunct or mild SWO)
💎 Clinical Pearl: PSO (proximal subungual onychomycosis) in a young patient = HIV testing MANDATORY. PSO entering via the nail fold is rare in immunocompetent patients. Always get KOH/culture before treating — misdiagnosis rate is significant.

3.4 Paronychia

Acute Paronychia

  • Rapid onset: pain, swelling, erythema of nail folds ± abscess
  • Most common cause: Staphylococcus aureus; also Streptococcus, herpes simplex (herpetic whitlow), orf
  • Neutropenic patients: Fusarium, Aspergillus
  • 3× more common in females; index finger + thumb most affected
Treatment:
  • Superficial abscess: drain with pointed scalpel (no anaesthesia needed)
  • Deep: penicillinase-resistant antibiotic + surgery if no response at 48h
  • Herpetic whitlow: oral aciclovir/famciclovir (topical has NO benefit)

Chronic Paronychia

  • Insidious; inflammatory dermatosis of nail folds; loss of cuticle
  • Predominantly: domestic/catering workers (wet work), females
PATHOPHYSIOLOGY — CRITICAL:
  • Candida is NOT the primary pathogen
  • Primary aetiology = irritant reaction / contact allergy / food hypersensitivity
  • Candida = secondary coloniser only
  • Systemic antifungals are NOT useful
Clinical: loss of cuticle, Beau lines, cross-ridging, ± dark discolouration lateral edges
Treatment:
  • Avoid wet work (protective gloves)
  • Topical imidazoles (for Candida colonisation)
  • Topical / intralesional steroids — primary treatment
  • Surgical: crescent-shaped excision of PNF (refractory cases) — heals by secondary intention in < 2 weeks
💎 Clinical Pearl: Chronic paronychia ≠ Candida infection. Candida is a secondary coloniser. The primary aetiology is irritant/allergic dermatitis. Systemic antifungals DO NOT HELP. Treat the inflammation with topical steroids and eliminate wet-work exposure first.

3.5 Darier Disease of the Nails

  • Candy-cane appearance: red (erythronychia) + white (leukonychia) longitudinal bands — PATHOGNOMONIC
  • Free margin: V-shaped notch and fissure (fragility)
  • Histology: acantholysis + multinucleate giant cells + epithelial hyperplasia in nail bed
💎 Clinical Pearl: Candy-cane nails (red + white longitudinal bands + V-notch at free edge) = Darier disease. This combination is pathognomonic and can be used to diagnose Darier disease even when the nail is the only clinical manifestation.

3.6 Eczematous Nail Dystrophy

  • Prevalence: almost all hand eczema patients; ~16% in atopic dermatitis
  • Features: thickened/pitted/rough/discoloured nails; Beau lines (very common); loss of cuticle → Candida/bacterial superinfection
  • Coarse pits — distinguish from fine pits of psoriasis
  • Photo-onycholysis (tetracyclines, 5-FU, capecitabine): matches shape of proximal nail fold

3.7 Yellow Nail Syndrome

Triad:
  1. Yellow, thickened, overcurved nails with absent lunula and loss of cuticle
  2. Lymphoedema (legs)
  3. Pleural effusion
Also associated with: bronchiectasis, rhinosinusitis, chronic cough
  • Growth arrest: < 0.1 mm/week
  • Treatment: vitamin E (topical or systemic), triazoles; treat underlying condition

3.8 Nail Tumours

Glomus Tumour

  • 1-2% of all hand tumours; predominantly women (up to 90%); 4th-5th decade
  • Triad: Love test (point tenderness) + Hildreth's sign (tourniquet relieves pain) + cold sensitivity
  • Presentations: small reddish/bluish spot under nail plate OR longitudinal erythronychia with distal notching/fissure
  • Investigation: MRI (gold standard — highest sensitivity, best extent assessment); high-resolution ultrasound + colour Doppler
  • Bone erosion in 50% of cases
  • Treatment: surgical excision (transungual approach preferred)
💎 Clinical Pearl: Glomus tumour triad = Love test + Hildreth's sign + cold sensitivity. Affects predominantly women under age 40. If there is a mismatch between severity of pain and clinical exam findings, think glomus tumour.

Subungual Exostosis

  • Benign osteochondral outgrowth from distal phalanx; 75% great toenail
  • Porcelain white hue with surface telangiectasias
  • X-ray: cup-shaped bone outgrowth (diagnostic)
  • Treatment: surgical excision

Onychomatricoma

  • Classic features: longitudinal xanthopachyonychia, woodworm cavities at free edge, transverse + longitudinal overcurvature
  • Nail avulsion reveals sea-anemone matrix tumour

Subungual Melanoma (Nail Apparatus Melanoma)

  • 0.18-2.8% of all cutaneous melanomas
  • ~25% of melanomas in Japanese and African Americans
  • Most arise from MATRIX (75%) → longitudinal melanonychia
  • Histological subtype: acral lentiginous melanoma
  • BRAF mutations LOW; KIT and NRAS mutations HIGH
  • Treatment: in situ → en bloc 5-10mm margins; invasive → amputation
  • Sentinel LN biopsy for melanoma > 1mm thickness

Squamous Cell Carcinoma (Most Common Malignant Nail Tumour)

  • Mean age 60; 75% male
  • HPV-associated (up to 60%; genito-digital transmission); right index/middle finger
  • Presents: subungual hyperkeratosis, onycholysis, oozing, nail plate destruction
  • Mean diagnosis delay = 6 years
  • Bowen disease = in situ SCC
  • Treatment: Mohs surgery first line; amputation only if bone involved
💎 Clinical Pearl: SCC is the MOST COMMON malignant nail tumour — NOT melanoma. HPV-associated; genito-digital transmission; right index finger most common. Mean diagnosis delay = 6 years. Treat any chronic subungual hyperkeratosis with persistent oozing as SCC until proven otherwise.

3.9 Nail Changes in Connective Tissue Diseases

DiseaseNail Findings
Systemic sclerosisPeriungual telangiectasias; megacapillaries + avascular areas on capillaroscopy (4 stages); pterygium inversum unguis; acro-osteolysis
SLEPeriungual erythema; splinter haemorrhages; onycholysis
DermatomyositisDilated irregular nail fold capillaries (PATHOGNOMONIC); ragged cuticles
RaynaudCapillaroscopy: normal architecture (primary); decreased + avascular (secondary)
Rheumatoid arthritisTortuous/ramified capillary loops; "fish shoal" pattern
💎 Clinical Pearl: Nail-fold capillaroscopy distinguishes primary Raynaud from secondary Raynaud. Megacapillaries + avascular areas + hazy background = secondary (scleroderma pattern). Normal capillary architecture = primary Raynaud. This is a non-invasive bedside investigation.

3.10 Drug-Induced Nail Disorders

DrugNail Change
RetinoidsOnycholysis, paronychia, ingrown toenails, fragility
EGFR inhibitors (cetuximab, gefitinib)Multiple pyogenic granulomas, paronychia
Taxanes (docetaxel, paclitaxel)Multiple PGs, onycholysis, subungual haematoma, pain
CapecitabineOnycholysis, pigmentation
Antiretrovirals (indinavir)Paronychia, pyogenic granuloma
HydroxyureaMelanonychia
β-blockersPincer nails, digital necrosis
ACE inhibitors (captopril)Onycholysis
MethotrexateSlower nail growth
Doxycycline / psoralensPhoto-onycholysis
CiclosporinIngrown toenails, pyogenic granuloma

PART 4 — IMAGING OF THE NAIL

ModalityKey Uses
X-raySubungual exostosis, acro-osteolysis, bone involvement in SCC
Ultrasound (>15 MHz, hockey-stick probe)Real-time blood flow; solid vs cystic; glomus tumour; psoriatic enthesitis/dactylitis
MRIGold standard for glomus tumour; myxoid cysts; melanoma extent; 1mm resolution
Dermoscopy (onychoscopy)Pitting patterns, onycholysis types, capillaries, melanonychia
CapillaroscopyCTD (4-stage SSc pattern); dermatomyositis megacapillaries
OCTVery high resolution (5-10 μm); onychomycosis monitoring

PART 5 — NAIL SURGERY OVERVIEW

Anaesthesia: Distal digital block (NOT ring block)
  • 1 cm proximal/lateral to PNF-lateral nail fold junction
  • 0.5 mL dorsal + 0.5 mL palmar branches × BOTH sides
  • Addresses dual innervation (ring block misses dorsal branches)
Key procedures:
  • Nail avulsion (partial preferred; total avulsion causes nail bed shrinkage + distal pulp expansion)
  • Punch biopsy 3mm — small pigmented lesion < 3mm in distal matrix
  • Longitudinal ellipse excision — longitudinal pigmented bands
  • Tangential excision — wide pigmented areas
  • Lateral longitudinal biopsy (sigmoid-shaped) — includes all lateral nail unit structures
  • Crescent-shaped PNF excision — chronic paronychia; heals 2° intention in < 2 weeks
  • Chemical cautery 88% phenol × 4 min — ingrowing toenail; tourniquet mandatory; < 3% recurrence; oozing lasts up to 5 weeks
💎 Clinical Pearl: Distal digital block — NOT a ring block — is the correct anaesthesia for nail surgery. The nail has dual innervation (dorsal and palmar branches). A classic ring block at the base of the digit can miss dorsal branches, leaving inadequate anaesthesia.

PART 6 — CLINICAL PEARLS (Complete List)

  1. Onychodermal band = Achilles heel of nail attachment. Once breached (psoriasis/trauma), onycholysis is progressive and hard to reverse. Clip, dry, topical antiseptics.
  2. Chronic paronychia ≠ Candida. Candida is a secondary coloniser. Primary = irritant/allergic dermatitis. Systemic antifungals DO NOT HELP. Treat inflammation first.
  3. PSO + young patient = HIV. Proximal Subungual Onychomycosis in an apparently immunocompetent patient should always trigger HIV testing.
  4. Nail-fold capillaroscopy distinguishes primary from secondary Raynaud. Megacapillaries + avascular areas = scleroderma pattern (secondary). Normal = primary Raynaud.
  5. Pseudo-Hutchinson's sign = periungual pigmentation through a transparent cuticle (racial melanonychia, benign nevi). Real Hutchinson's = actual melanin extension into nail fold skin = melanoma concern.
  6. Glomus tumour triad = Love test + Hildreth's sign + cold sensitivity. Predominantly women < 40. Pain disproportionate to clinical findings = think glomus tumour.
  7. Darier disease candy-cane nails = red + white longitudinal bands + V-notch at free edge — PATHOGNOMONIC. Can diagnose Darier disease from nails alone.
  8. Nail psoriasis is HLA-Cw6 NEGATIVE — opposite of cutaneous plaque psoriasis. Genetically distinct subset with stronger PsA association.
  9. Koenen tumours (periungual fibromas of tuberous sclerosis) are histologically identical to acquired ungual fibrokeratomas — but LACK the hyperkeratotic tip.
  10. Nail melanoma in dark-skinned individuals: ~25% of melanomas in Japanese and African Americans are nail apparatus melanomas. Proportionately nails matter far more in these populations.
  11. Pigment location in free edge: pigment in upper portion → proximal/dorsal matrix origin (higher risk of dystrophy post-biopsy); pigment in lower portion → distal matrix (safer to biopsy).
  12. SCC > melanoma as most common malignant nail tumour. HPV-associated (genito-digital route); right index finger most commonly affected. Mean diagnosis delay = 6 years.
  13. Onychomycosis in toenails does NOT cure with topical treatment alone. Systemic terbinafine is the most effective single agent. Always get KOH/culture before treating.
  14. Beau lines at same level in all 20 nails = systemic cause (cytotoxics, severe illness). Beau lines on 1-2 nails = local trauma or paronychia.
  15. Distal digital block (NOT ring block) for nail surgery — dual innervation requires addressing both dorsal and palmar branches at the lateral digit.

PART 7 — VIVA QUESTIONS & ANSWERS

Q1. Describe the layers of the nail plate and their origin. The nail plate is trilaminar: (1) dorsal plate — from ventral aspect of proximal nail fold; (2) intermediate/main plate — from germinal matrix (main contributor); (3) ventral plate — from nail bed (~21% thickness). The proximal matrix generates the dorsal plate while the distal matrix (lunula) generates the ventral plate. Hard hair-type keratins embedded in sulfur-rich proteins.
Q2. What is the onychodermal band and why is it clinically important? The onychodermal band (nail isthmus) is the most distal zone of cornified epithelium attached to the undersurface of the nail plate — the structural anchor for nail plate to nail bed adhesion. Once breached — as in psoriasis, trauma, or infection — nail plate separation (onycholysis) becomes progressive and is difficult to reverse.
Q3. Describe the mechanism of nail pitting in psoriasis. Proximal matrix is affected by psoriatic inflammation (IL-17/TNF-α) → defective keratinization → parakeratosis foci (clusters of nucleated cells) in the dorsal nail plate surface → these foci are shed as the nail plate grows distally, leaving tiny depressions = PITS. Fine pits (<1mm) = psoriasis. >10 pits/nail OR >60 total supports diagnosis.
Q4. Why does nail psoriasis predispose to psoriatic arthritis? The nail matrix is anatomically contiguous with the DIP joint extensor tendon enthesis. Pro-inflammatory cytokines (IL-23, IL-17A/F, TNF-α) from the psoriatic nail unit spread to the adjacent synovio-entheseal complex, sensitising it to trauma-triggered inflammation (Koebner). Annual PsA risk doubles with nail involvement.
Q5. What are the HLA associations in nail psoriasis vs cutaneous psoriasis? Cutaneous plaque psoriasis is positively associated with HLA-Cw6. Nail psoriasis patients are more frequently HLA-Cw6 NEGATIVE — a separate genotype with stronger PsA association. Asian patients with nail psoriasis show HLA-B46 and HLA-A*02:07 associations.
Q6. What is the NAPSI score? Nail Psoriasis Severity Index: 0-8 per nail — matrix component (0-4: pitting, leukonychia, red spots in lunula, crumbling) + nail bed component (0-4: oil drop, subungual hyperkeratosis, splinter haemorrhages, discolouration). Total maximum = 160 (all 20 nails).
Q7. Compare acute and chronic paronychia. Acute: rapid onset; Staphylococcus aureus most common; treat with drainage ± antibiotics. Chronic: insidious; wet-work workers; loss of cuticle; Candida = secondary coloniser, NOT primary; systemic antifungals useless; treat with topical steroids + avoidance of wet work; crescent PNF excision if refractory.
Q8. What makes the oil-drop/salmon patch pathognomonic for psoriasis? It results from psoriasiform hyperplasia + parakeratosis + microvascular changes + neutrophil trapping in the nail bed — a combination nearly exclusive to psoriasis. Unlike pitting (also in AA, eczema, LP), oil-spotting is nearly specific for psoriasis and is visible as a translucent yellow-red zone at the leading edge of onycholysis.
Q9. ABCDEF rule for longitudinal melanonychia? A = Age (40-70), African/Asian/Native American; B = Brown/Black >3mm with Blurred borders; C = Change in band morphology; D = Digit (thumb > hallux > index, single digit); E = Extension to nail fold (Hutchinson's sign); F = Family/personal history of melanoma.
Q10. What is Schamroth's window test? When the dorsal aspects of two homologous fingers from opposite hands are opposed, a diamond-shaped window of light is normally visible. In clubbing, as Lovibond's angle increases to >180°, this window is obliterated. Quick bedside test for clubbing.

PART 8 — QUIZ (Q & A)

#QuestionAnswer
1Normal fingernail growth rate?~3 mm/month
2Which matrix zone produces ventral nail plate?Distal matrix (lunula)
3Onychodermal band = ?Nail isthmus
4Lovibond's angle in clubbing exceeds?180°
5Koilonychia most commonly = which deficiency?Iron deficiency anaemia
6K1/K10 in nail bed indicates?Pathological (psoriasis/onychomycosis)
7Yellow nails + lymphoedema + pleural effusion = ?Yellow nail syndrome
8Primary pathogen in chronic paronychia?NONE — irritant/allergic dermatitis; Candida = secondary
9Most common organism in DLSO?Trichophyton rubrum
10PSO in young patient → test for?HIV
11Candy-cane nails (red + white + V-notch) = ?Darier disease
12Pterygium of nail most commonly caused by?Lichen planus
13Koenen tumours develop in which syndrome?Tuberous sclerosis (around puberty)
14Triangular lunulae = pathognomonic of?Nail-patella syndrome (LMX1B mutation)
15Nail fold capillaroscopy: megacapillaries + avascular areas = ?Systemic sclerosis
16Most common MALIGNANT nail tumour?Squamous cell carcinoma (not melanoma)
17FDA-approved biologic specifically for nail psoriasis?Adalimumab (anti-TNF)
18NAPSI maximum total score?160
19Gold standard imaging for glomus tumour?MRI
20Green discolouration under onycholytic nail = ?Pseudomonas aeruginosa
21Hutchinson's sign is defined as?Extension of melanin pigment INTO periungual skin (nail fold)
22Nail pitting histologically = ?Foci of parakeratosis in proximal nail matrix
23Most effective drug for toenail onychomycosis?Oral terbinafine 250mg/day × 12 weeks
24Chemical cautery for ingrowing toenail = ?88% phenol × 4 min with tourniquet; <3% recurrence
25HLA in nail psoriasis vs skin psoriasis?Nail = HLA-Cw6 NEGATIVE; Skin = HLA-Cw6 positive
26Crescent-shaped PNF excision used for?Chronic paronychia (refractory)
27Salmon/oil-drop patch = ?NEARLY PATHOGNOMONIC for nail psoriasis
28Nail psoriasis annual PsA risk?0.55-2.55% (vs 0.26-1.14% without nail involvement)
29SCC of nail — mean diagnosis delay?6 years
30Key cytokine responsible for pitting in nail psoriasis?IL-17A/TNF-α → parakeratosis in proximal matrix

Sources: Rook's Dermatology 9e Ch.93 (Pasch, Richert & Iorizzo) • Fitzpatrick's Dermatology Ch.91 (Haneke) • Bolivnia Dermatology 5e Ch.71 (Tosti & Piraccini) • Andrews' Diseases of the Skin Ch.33 • Goodman & Gilman's Pharmacology • Goldman-Cecil Medicine • JAAD 2024 (Hwang JK et al. PMID 38007038) • JAAD 2025 (Ricardo JW et al. PMID 40023404)

Just give me this content along with photos in text

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Searching Content

"![" in /textbooks/9780702082252

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
I found many images. I now have enough image URLs from the textbook. Let me compile the complete text with photos embedded inline:

NAIL ANATOMY & DISORDERS — DERMATOLOGY RESIDENT STUDY NOTE

Sources: Rook's Dermatology Ch.93 • Fitzpatrick's Ch.91 • Bolivnia Dermatology 5e Ch.71 • Andrews' Diseases of the Skin Ch.33 • JAAD 2024/2025

PART 1 — ANATOMY OF THE NAIL UNIT

1.1 Gross Anatomy

ComponentDescriptionFunction
Nail plateTrilaminar: dorsal (from ventral PNF), intermediate/main (germinal matrix), ventral (nail bed ~21%)Protection, fine touch, grooming
Proximal matrixVentral aspect of PNFProduces dorsal 80% of nail plate
Distal matrix (lunula)Visible white half-moonProduces ventral 20% of nail plate
Nail bed (sterile matrix)Epidermis 2-3 cells thick; NO granular layer in healthPlate adherence
Proximal nail fold (PNF)Double-layered fold overlying proximal nail plateProtects matrix from trauma/infection
Cuticle (eponychium)Thin strip of cornified epitheliumSeal against ingress
HyponychiumJunction nail bed/digit tipDistal barrier
Onychodermal bandMost distal cornified attachment to nail undersurfaceCritical for nail-bed adhesion
  • Nail plate contains hard hair-type keratins in sulfur-rich proteins (high cysteine, glycine, tyrosine)
  • No granular layer in health — its appearance = PATHOLOGICAL (psoriasis, onychomycosis)
  • Nail bed dermis tightly apposed to periosteum → rapid osteomyelitis risk from infection
💎 Clinical Pearl: No granular layer in healthy nail bed. Its appearance signals disease. The K1/K10 keratin pair (absent in normal nail bed) appears in psoriasis and onychomycosis — one of the earliest histological signs of nail pathology.

1.2 Keratins

Keratin PairLocation
K5/K14Basal layer of nail matrix AND nail bed
K1/K10Suprabasal nail matrix — ABSENT in healthy nail bed; appears in disease
K6/K16Various subungual locations during development

1.3 Nail Growth Rates

FactorFasterSlower
RateFingernails ~3 mm/monthToenails ~1 mm/month
AgeYouthOld age
SeasonSummerWinter
Disease (faster)Psoriasis, PRP, hyperthyroidism, HIV
Disease (slower)Yellow nail syndrome, hypothyroidism, CHF
Drugs (faster)Levodopa, itraconazole
Drugs (slower)Methotrexate, azathioprine, targeted therapies

1.4 Blood Supply & Immunology

  • Glomus bodies (Masson): dilate with cold (opposite of arterioles) — maintain acral circulation
  • Nail matrix has immune privilege — MHC class I restricted; contains LL-37, hβD-2, hβD-3
  • Wnt/β-catenin signalling crucial in nail embryogenesis; R-spondin 4 mutations → anonychia

PART 2 — NAIL SIGNS AND THEIR SIGNIFICANCE

2.1 Clubbing

Clubbing of fingernails — Lovibond angle obliterated, watch-glass deformity
Fig. 33.52 — Nail deformity (Andrews' Diseases of the Skin)
MeasurementNormalClubbing
Lovibond's angle< 160°> 180°
Schamroth's windowOpen diamondObliterated
Curth's angle (DIP)~180°< 160°
Mechanism: ↑VEGF → nail bed angiogenesis + vasodilation; HPGD/SLCO2A1 mutations in primary
Causes of secondary clubbing:
  • Respiratory: lung Ca, mesothelioma, CF, cryptogenic fibrosing alveolitis, TB
  • Cardiac: cyanotic CHD, infective endocarditis
  • GI: IBD, liver disease, oesophageal Ca
  • HIV (37%), POEMS syndrome (70%)
💎 Clinical Pearl: Schamroth window test — oppose dorsal surfaces of two homologous fingers. Normal = open diamond window of light. Clubbing = window obliterated. Quick, no-instrument bedside sign.

2.2 Koilonychia (Spoon Nail)

  • Concave, spoon-shaped nail plate
  • Most common: iron deficiency anaemia, haemochromatosis
  • Also: trichothiodystrophy, familial (AD)
  • Secondary: psoriasis, lichen planus, dermatophyte infection

2.3 Nail-Patella Syndrome

Nail-patella syndrome — triangular lunulae
Fig. 33.53 Nail-patella syndrome (Andrews' Diseases of the Skin — Courtesy Dr. Marshall Guill)
  • Triangular lunulae — PATHOGNOMONIC
  • LMX1B gene mutation (autosomal dominant)
  • Associated: absent/hypoplastic patella, posterior iliac horns, glomerulonephritis (20% → renal failure), "Lester iris"

2.4 Onycholysis

  • Separation from nail bed distally → proximally; plate looks WHITE (air underneath)
  • Green discolouration = Pseudomonas aeruginosa
Dermoscopic types:
  1. Post-traumatic: regular margin, lateral
  2. Psoriatic: irregular margin, whole free edge, erythematous border
  3. Onychomycosis: ragged/spike edge, mycelium proximally
  4. Drug-induced: uniform midline (photo-onycholysis)
💎 Clinical Pearl: The onychodermal band is the "Achilles heel" of nail plate attachment. Once breached — psoriasis, trauma, infection — onycholysis becomes progressive and is difficult to reverse. Clip, dry, topical antiseptics are the cornerstone.

2.5 Beau Lines

  • Transverse depressions = temporary interruption of proximal matrix mitosis
  • All 20 nails simultaneously = SYSTEMIC cause (cytotoxics, severe illness, erythroderma)
  • 1-2 nails only = local trauma or paronychia
  • Beau lines → onychomadesis when full-thickness groove
💎 Clinical Pearl: Beau lines at the same level in all 20 nails = systemic cause. Beau lines on only 1-2 nails = local trauma or paronychia.

2.6 Pitting

  • Fine pits (<1mm): PSORIASIS — >10 pits/nail OR >60 total supports diagnosis
  • Coarse pits: ECZEMA
  • Geometric "Scotch plaid" / tartan pattern: ALOPECIA AREATA
  • Elkonyxis = deep single large pit (reactive arthritis, psoriasis)

2.7 Nail Colour Changes

ColourCause
True leukonychia (nail plate)Parakeratosis; Mees' lines = arsenic/systemic insult
Apparent leukonychia (nail BED — disappear with pressure)Muehrcke's = hypoalbuminaemia; Terry's = liver disease; Half-and-half = renal failure
YellowYellow nail syndrome, psoriasis, fungal
GreenPseudomonas aeruginosa
Red lunulaPsoriasis, CO poisoning, cardiac failure, AA
Splinter haemorrhagesPsoriasis, endocarditis, vasculitis, trauma
💎 Clinical Pearl: All apparent leukonychia (Muehrcke's, Terry's, half-and-half) involves the nail BED not the plate, and disappears with pressure. True leukonychia (nail plate) does NOT disappear with pressure.

2.8 Melanonychia — ABCDEF Rule

LetterMeaning
AAge (40-70); African/Asian/Native American
BBrown/Black band >3mm, Blurred borders
CChange in morphology
DDigit (thumb > hallux > index)
EExtension to nail fold (Hutchinson's sign)
FFamily/personal history of melanoma
💎 Clinical Pearl: Pseudo-Hutchinson's sign = apparent periungual pigmentation through a transparent cuticle (racial melanonychia, benign nevi). Real Hutchinson's = actual melanin extension INTO the nail fold skin. Dermoscopy distinguishes the two.

2.9 Nail Signs in Systemic Disease

SignDisease
ClubbingCardiopulmonary, GI, liver, HIV, POEMS
KoilonychiaIron deficiency anaemia, haemochromatosis
Splinter haemorrhagesEndocarditis, vasculitis, psoriasis, trauma
Muehrcke's linesHypoalbuminaemia
Terry's nailsHepatic cirrhosis
Half-and-half nails (Lindsay's)Chronic renal failure
Yellow nail syndromeLymphoedema, pleural effusion
Periungual telangiectasiaDermatomyositis (most specific), SLE, SSc
Ragged cuticlesDermatomyositis
Triangular lunulaNail-patella syndrome
Beau lines (all 20 nails)Systemic illness, cytotoxics, erythroderma
Koenen tumours (periungual fibromas)Tuberous sclerosis

PART 3 — NAIL DISORDERS

3.1 Nail Psoriasis

Epidemiology:
  • 50% prevalence in plaque psoriasis; 80-90% lifetime incidence
  • 5-10% nail psoriasis without skin/joint disease
  • Annual PsA risk with nail involvement: 0.55-2.55%
  • HLA-Cw6 NEGATIVE (skin psoriasis = HLA-Cw6 positive)
Zaias Classification:
Clinical FeatureSiteDuration
PittingProximal matrix (parakeratosis foci)Episodic
Transverse furrowsProximal matrix1-2 weeks
Crumbling nailEntire matrixProlonged
Leukonychia with rough surfaceProximal matrixVariable
Splinter haemorrhagesNail bed capillariesShort
Oil spot / Salmon patchNail bedProlonged — PATHOGNOMONIC
OnycholysisNail bedProlonged
Subungual hyperkeratosisNail bedProlonged
💎 Clinical Pearl: Salmon patch (oil-drop sign) = NEARLY PATHOGNOMONIC for psoriasis. Unlike pitting (also in AA, eczema), oil-spotting is nearly exclusive to psoriasis. Confirm with onychoscopy: dilated tortuous capillaries in 90% of cases.

═══ MECHANISM OF NAIL CHANGES IN PSORIASIS ═══

Step 1 — Genetic Basis & Trigger

  • HLA-Cw6 NEGATIVE — genetically distinct from cutaneous psoriasis
  • Trigger: microtrauma at nail unit → Koebner phenomenon
  • Extensor tendon inserts adjacent to nail root at DIP joint → nail matrix is anatomically contiguous with the synovio-entheseal complex of DIP

Step 2 — Innate Immune Activation

  • Stressed keratinocytes → antimicrobial peptides (LL-37, hβD-2, hβD-3)
  • These activate myeloid DCs (mDCs) and plasmacytoid DCs
  • Breaches immune privilege of nail matrix
  • NF-κB pathway activated; mast cells recruited

Step 3 — IL-23 / Th17 Axis

  • mDCs release IL-23 → Th17 cell differentiation
  • Th17 → IL-17A, IL-17F, IL-22, TNF-α
  • VEGF upregulated → angiogenesis → dilated tortuous capillaries (onychoscopy finding in 90%)

Step 4 — Matrix Inflammation → PITTING

  • IL-17/TNF-α in proximal nail matrix → defective keratinization
  • Parakeratosis foci (clusters of nucleated cells without normal cornification) form in dorsal nail plate
  • These foci shed as nail grows distally → tiny depressions = PITS
  • More prolonged matrix inflammation → transverse furrows → crumbling → leukonychia

Step 5 — Nail Bed Inflammation → OIL-SPOT / ONYCHOLYSIS

  • Psoriasiform hyperplasia + parakeratosis + microvascular changes + neutrophil trapping in nail bed
  • Salmon/oil-drop patch (translucent yellow-red zone) — NEARLY PATHOGNOMONIC
  • Onychodermal band breach → progressive onycholysis
  • Nail bed hyperkeratosis → subungual hyperkeratosis
  • Dermal ridge capillary rupture → splinter haemorrhages

Step 6 — Enthesitis → Psoriatic Arthritis

  • IL-17/IL-22/TNF-α from nail unit spread to adjacent DIP joint synovio-entheseal complex
  • Sensitises DIP joint to trauma-triggered inflammation → psoriatic arthritis
  • Annual PsA risk doubles with nail involvement
  • This is why nail psoriasis is the strongest clinical predictor of PsA
Microtrauma / Koebner
         ↓
Keratinocyte stress → LL-37, hβD-2/3
         ↓
mDC activation → IL-23
         ↓
Th17 → IL-17A/F + IL-22 + TNF-α
         ↓
   ┌─────────────────┬────────────────────┐
   ↓                 ↓                    ↓
Proximal matrix   Nail bed           DIP enthesis
Parakeratosis     Hyperplasia +      Enthesitis
→ PITTING         microvascular      → PsA risk
                  → OIL-SPOT +
                    ONYCHOLYSIS
💎 Clinical Pearl: Nail psoriasis is HLA-Cw6 NEGATIVE — opposite of cutaneous plaque psoriasis. Genetically distinct subset with stronger PsA association. Always screen for joint disease.
💎 Clinical Pearl: Adalimumab is the ONLY FDA-approved biologic specifically for nail psoriasis. IL-17 inhibitors (secukinumab, ixekizumab) show excellent nail clearance in trials.

Nail Psoriasis — Treatment Algorithm

ExtentFirst LineSecond Line
≤3 nails, matrixIntralesional triamcinolone acetonideTopical vitamin D ± steroid
≤3 nails, nail bedTopical steroid OR vitamin D
>3 nailsIL steroid ± topical vitamin DSystemic / Biologics
Systemic: Methotrexate ≤15mg/week, Ciclosporin 3-5mg/kg, Acitretin 0.2-0.4mg/kg × 6 months
Biologics: Adalimumab (FDA-approved for nails), IL-17i (secukinumab, ixekizumab, brodalumab), IL-23i (risankizumab, guselkumab, ustekinumab)
Small molecules: Apremilast (PDE4i), Tofacitinib (JAKi)
NAPSI: 0-8 per nail (matrix 0-4 + nail bed 0-4); maximum total = 160

3.2 Lichen Planus of the Nails

  • 5-10% of LP patients; 5th-6th decade
  • Dorsal pterygium — MOST CHARACTERISTIC (fibrotic PNF-matrix fusion, splits nail in 2)
  • Onychorrhexis — irregular longitudinal ridging
  • Thinning → atrophy → shedding
  • Trachyonychia (20-nail dystrophy, shiny variant)
  • Erythronychia, subungual hyperpigmentation
  • Idiopathic atrophy of nails = most severe variant (rapid irreversible destruction)
  • Histology: interface dermatitis, band-like lymphocytes, basal cell liquefaction — identical to cutaneous LP
Treatment: Intralesional triamcinolone; oral prednisone 0.5-1mg/kg × 3 weeks; IM triamcinolone 0.5-1mg/kg/month × 3-6 months in children; oral retinoids + topical steroids
💎 Clinical Pearl: Dorsal pterygium = lichen planus until proven otherwise. Irreversible scarring — early aggressive treatment is essential. LP causes pterygium; psoriasis causes pitting — never confuse the two.

3.3 Onychomycosis

TypeDescriptionOrganism
DLSO (most common)Free edge/lateral; hyperkeratosis, onycholysisT. rubrum (70-80%)
PSOVia nail fold; leukonychia at lunula; HIV!T. rubrum
SWOPowdery white patches on dorsal surfaceT. interdigitale, moulds
EndonyxMilky white, no hyperkeratosisT. soudanense/violaceum
CDLSOChronic mucocutaneous candidiasisCandida spp.
Psoriasis vs Onychomycosis:
FeaturePsoriasisOnychomycosis
PittingFine, irregularRare
Dermoscopy edgeIrregular, erythematous borderRagged/spike
KOHUsually negativeFilaments abundant
Salmon patchPresentAbsent
Treatment:
  • Terbinafine oral 250mg/day × 6 wks (fingernails), 12 wks (toenails) — most effective
  • Itraconazole 200mg/day OR pulse (400mg/day × 1 wk/month × 2-3 cycles)
  • Topical: ciclopirox 8%, efinaconazole (adjunct only)
💎 Clinical Pearl: PSO (proximal subungual onychomycosis) in a young patient = HIV testing MANDATORY. Always get KOH/culture before treating — misdiagnosis rate is high. Topical treatment alone rarely cures toenail onychomycosis.

3.4 Paronychia

Acute

  • Staphylococcus aureus (most common); herpes simplex (herpetic whitlow); orf
  • Treatment: drain abscess; penicillinase-resistant antibiotic; oral aciclovir for herpetic whitlow (topical = no benefit)

Chronic

  • Predominantly wet-work workers, females
  • Candida is NOT the primary pathogen — it is a secondary coloniser
  • Primary = irritant/allergic dermatitis; systemic antifungals are useless
  • Treatment: avoid wet work; topical steroids (primary); imidazoles (for Candida); crescent PNF excision if refractory (heals 2° intention < 2 weeks)
💎 Clinical Pearl: Chronic paronychia ≠ Candida infection. Candida is a secondary coloniser. Primary = irritant/allergic dermatitis. Systemic antifungals DO NOT HELP.

3.5 Darier Disease of the Nails

  • Candy-cane appearance: red + white longitudinal bands — PATHOGNOMONIC
  • Free margin: V-shaped notch and fissure (fragility)
  • Histology: acantholysis + multinucleate giant cells + epithelial hyperplasia
💎 Clinical Pearl: Red + white longitudinal bands + V-notch at free edge = Darier disease. Pathognomonic — can diagnose Darier from nails alone even without skin lesions.

3.6 Eczematous Nail Dystrophy

  • Almost all hand eczema patients affected; ~16% in atopic dermatitis
  • Coarse pits — distinguish from fine pits of psoriasis
  • Beau lines very common; loss of cuticle → Candida/bacterial superinfection
  • Photo-onycholysis (tetracyclines, 5-FU, capecitabine): matches shape of proximal nail fold

3.7 Yellow Nail Syndrome

Triad: (1) Yellow thickened overcurved nails + absent lunula + loss of cuticle; (2) Lymphoedema; (3) Pleural effusion
  • Also: bronchiectasis, rhinosinusitis; growth < 0.1mm/week
  • Treatment: vitamin E (topical/systemic), triazoles

3.8 Nail Tumours

Glomus Tumour

  • Predominantly women, 4th-5th decade
  • Triad: Love test (point tenderness) + Hildreth's sign (tourniquet relieves pain) + cold sensitivity
  • Presentations: reddish/bluish spot under nail OR longitudinal erythronychia with distal notch
  • Investigation: MRI (gold standard); high-res ultrasound + Doppler
  • Bone erosion in 50%
  • Treatment: surgical excision (transungual approach preferred)
💎 Clinical Pearl: Glomus tumour triad = Love test + Hildreth's sign + cold sensitivity. Pain disproportionate to exam findings = think glomus tumour. MRI is gold standard.

Subungual Exostosis

  • Benign osteochondral outgrowth; 75% great toenail
  • X-ray: cup-shaped bone outgrowth (diagnostic)

Subungual Melanoma

  • ~25% of melanomas in Japanese and African Americans
  • Most from matrix (75%) → longitudinal melanonychia; acral lentiginous subtype
  • BRAF mutations LOW; KIT/NRAS mutations HIGH
  • Treatment: in situ → en bloc 5-10mm; invasive → amputation; SLNB if >1mm

SCC — Most Common Malignant Nail Tumour

  • HPV-associated (up to 60%; genito-digital); right index finger
  • Mean diagnosis delay = 6 years
  • Treatment: Mohs surgery; amputation only if bone involved
💎 Clinical Pearl: SCC is the MOST COMMON malignant nail tumour — not melanoma. HPV-associated; right index finger. Mean diagnosis delay = 6 years. Persistent subungual hyperkeratosis + oozing = SCC until proven otherwise.

3.9 Connective Tissue Diseases

DiseaseNail Findings
Systemic sclerosisPeriungual telangiectasias; megacapillaries + avascular areas (4 stages capillaroscopy); pterygium inversum unguis; acro-osteolysis
SLEPeriungual erythema, splinter haemorrhages, onycholysis
DermatomyositisDilated irregular nail fold capillaries — PATHOGNOMONIC; ragged cuticles
RATortuous/ramified capillary loops; "fish shoal" pattern
💎 Clinical Pearl: Nail-fold capillaroscopy distinguishes primary from secondary Raynaud. Megacapillaries + avascular areas + hazy background = systemic sclerosis (secondary). Normal architecture = primary Raynaud.

3.10 Drug-Induced Nail Changes

DrugNail Change
RetinoidsOnycholysis, paronychia, ingrown toenails, fragility
EGFR inhibitorsMultiple pyogenic granulomas, paronychia
TaxanesMultiple PGs, onycholysis, subungual haematoma
HydroxyureaMelanonychia
β-blockersPincer nails, digital necrosis
ACE inhibitors (captopril)Onycholysis
MethotrexateSlower nail growth
Doxycycline/psoralensPhoto-onycholysis

PART 4 — NAIL SURGERY OVERVIEW

Anaesthesia: Distal digital block (NOT ring block)
  • 0.5 mL dorsal + 0.5 mL palmar × both sides
  • Ring block misses dorsal branches (dual innervation)
Key procedures:
  • Nail avulsion: partial preferred (total → nail bed shrinkage)
  • Punch biopsy 3mm — small pigmented lesion < 3mm
  • Longitudinal ellipse — longitudinal pigmented bands
  • Lateral longitudinal biopsy (sigmoid-shaped) — all lateral nail structures
  • Crescent PNF excision — chronic paronychia; heals 2° intention < 2 weeks
  • 88% phenol × 4 min with tourniquet — ingrowing toenail; < 3% recurrence
Imaging:
  • MRI: gold standard — glomus tumour, soft tissue masses, melanoma extent
  • Ultrasound >15 MHz: glomus tumour, psoriatic enthesitis/dactylitis
  • X-ray: subungual exostosis, acro-osteolysis, SCC bone involvement
💎 Clinical Pearl: Distal digital block — NOT ring block — for nail surgery. The nail has dual innervation. A ring block at the digit base misses dorsal branches.

PART 5 — ALL CLINICAL PEARLS

  1. Onychodermal band = once breached → progressive onycholysis, difficult to reverse. Clip, dry, antiseptics.
  2. Chronic paronychia ≠ Candida. Candida = secondary. Primary = irritant dermatitis. Antifungals useless.
  3. PSO + young patient = HIV. Test every time.
  4. Nail-fold capillaroscopy — megacapillaries + avascular areas = scleroderma; normal = primary Raynaud.
  5. Pseudo-Hutchinson's = transparent cuticle revealing nail pigment (benign). Real Hutchinson's = melanin IN nail fold skin (melanoma).
  6. Glomus tumour triad = Love test + Hildreth's sign + cold sensitivity. MRI = gold standard.
  7. Darier candy-cane nails = red + white bands + V-notch = pathognomonic. Diagnose from nails alone.
  8. Nail psoriasis HLA-Cw6 NEGATIVE — skin psoriasis is HLA-Cw6 positive. Genetically distinct; stronger PsA link.
  9. Koenen tumours (tuberous sclerosis) lack the hyperkeratotic tip — histologically identical to ungual fibrokeratomas otherwise.
  10. Nail melanoma in Japanese/African Americans = ~25% of all their melanomas.
  11. SCC > melanoma as most common malignant nail tumour. Mean diagnosis delay = 6 years. HPV-associated.
  12. Toenail onychomycosis does not cure with topical alone. Always get KOH/culture first.
  13. Beau lines all 20 nails = systemic. 1-2 nails only = local.
  14. Distal digital block, not ring block, for nail surgery.
  15. Salmon/oil-drop patch = nearly pathognomonic for psoriasis. Onychoscopy: tortuous capillaries in 90%.
  16. Adalimumab = only FDA-approved biologic specifically for nail psoriasis.
  17. Dorsal pterygium = LP. Psoriasis NEVER causes pterygium — it causes pitting and onycholysis.
  18. NAPSI max = 160 (all 20 nails × 8).

PART 6 — VIVA QUESTIONS & ANSWERS

Q1. Layers of nail plate and their origin? Trilaminar: (1) dorsal — from ventral aspect of PNF; (2) intermediate/main — from germinal matrix; (3) ventral — from nail bed (~21%). Hard hair-type keratins in sulfur-rich proteins.
Q2. Mechanism of nail pitting in psoriasis? IL-17/TNF-α in proximal nail matrix → defective keratinization → parakeratosis foci (nucleated cells without cornification) in dorsal nail plate → shed as nail grows distally → pits. Fine pits = psoriasis; >10/nail or >60 total supports diagnosis.
Q3. Why does nail psoriasis cause psoriatic arthritis? Nail matrix is anatomically contiguous with DIP joint extensor tendon enthesis. IL-17/IL-22/TNF-α from psoriatic nail unit spread to synovio-entheseal complex → sensitises to trauma-triggered inflammation (Koebner) → PsA. Annual PsA risk doubles with nail involvement.
Q4. Zaias classification of nail psoriasis? By site: Proximal matrix → pitting, transverse furrows, leukonychia, crumbling. Distal matrix/lunula → erythema of lunula, focal onycholysis. Nail bed → salmon/oil-drop patch, subungual hyperkeratosis, splinter haemorrhages, onycholysis. Nail fold → periungual psoriasis (PsA association).
Q5. Compare acute vs chronic paronychia. Acute: rapid; S. aureus most common; drain ± antibiotics. Chronic: insidious; wet-work workers; Candida = secondary coloniser NOT primary; systemic antifungals useless; treat with topical steroids; crescent PNF excision if refractory.
Q6. ABCDEF rule for longitudinal melanonychia? A = Age 40-70, African/Asian/Native American; B = Brown/Black >3mm, Blurred borders; C = Change in band; D = Digit (thumb > hallux > index); E = Extension to nail fold (Hutchinson's); F = Family/personal Hx melanoma.
Q7. What makes oil-drop patch pathognomonic? Psoriasiform hyperplasia + parakeratosis + microvascular changes + neutrophil trapping in nail bed — a combination nearly exclusive to psoriasis. Unlike pitting (also in AA, eczema), oil-spotting is nearly specific. Visible as translucent yellow-red zone at leading edge of onycholysis.
Q8. HLA associations nail vs skin psoriasis? Skin psoriasis = HLA-Cw6 POSITIVE. Nail psoriasis = HLA-Cw6 NEGATIVE. Genetically distinct; nail psoriasis is a separate genotype with stronger PsA association.

PART 7 — QUIZ (Q&A)

#QuestionAnswer
1Normal fingernail growth rate?~3 mm/month
2Which matrix zone produces ventral nail plate?Distal matrix (lunula)
3Onychodermal band = ?Nail isthmus
4Lovibond's angle in clubbing exceeds?180°
5Koilonychia — most common systemic cause?Iron deficiency anaemia
6K1/K10 in nail bed = ?Pathological — psoriasis/onychomycosis
7Yellow nails + lymphoedema + pleural effusion = ?Yellow nail syndrome
8Primary pathogen in chronic paronychia?NONE — irritant dermatitis; Candida = secondary
9Most common organism in DLSO?Trichophyton rubrum
10PSO in young patient → test for?HIV
11Candy-cane nails = ?Darier disease
12Pterygium most commonly caused by?Lichen planus
13Koenen tumours → which syndrome?Tuberous sclerosis
14Triangular lunulae → which syndrome?Nail-patella syndrome (LMX1B)
15Megacapillaries + avascular areas on capillaroscopy?Systemic sclerosis
16Most common MALIGNANT nail tumour?SCC (not melanoma)
17FDA-approved biologic for nail psoriasis?Adalimumab
18NAPSI maximum score?160
19Gold standard imaging for glomus tumour?MRI
20Green discolouration under onycholytic nail?Pseudomonas aeruginosa
21Hutchinson's sign = ?Melanin extending INTO periungual skin = melanoma
22Nail pitting histologically = ?Parakeratosis foci in proximal nail matrix
23Best drug for toenail onychomycosis?Oral terbinafine 250mg/day × 12 weeks
24Phenol cautery time for ingrowing toenail?4 min with tourniquet; < 3% recurrence
25HLA in nail psoriasis?HLA-Cw6 NEGATIVE
26Salmon patch = ?Nearly pathognomonic for psoriasis
27Key cytokine pathway in nail psoriasis?IL-23 → Th17 → IL-17A/F + TNF-α
28SCC of nail — mean diagnosis delay?6 years
29Crescent PNF excision used for?Chronic paronychia (refractory)
30Nail psoriasis annual PsA risk?0.55-2.55% (doubles vs no nail involvement)

Sources: Rook's Dermatology 9e Ch.93 • Fitzpatrick's Dermatology Ch.91 • Bolivnia Dermatology 5e Ch.71 • Andrews' Diseases of the Skin Ch.33 • Goodman & Gilman's • Goldman-Cecil Medicine • JAAD 2024 (Hwang JK et al. PMID 38007038) • JAAD 2025 (Ricardo JW et al. PMID 40023404)
This is a shared conversation. Sign in to Orris to start your own chat.